@citolab/qti-components 6.9.1-beta.9 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.global.js +277 -0
- package/cdn/index.js +4681 -0
- package/dist/custom-element-eslint-rules.js +337 -0
- package/dist/custom-elements.json +23648 -4595
- package/dist/index.d.ts +465 -0
- package/dist/index.js +13059 -1784
- package/dist/index.js.map +1 -0
- package/dist/item.css +2792 -726
- package/dist/loader/index.d.ts +20 -0
- package/dist/loader/index.js +305 -0
- package/dist/loader/index.js.map +1 -0
- package/dist/qti-components-jsx.d.ts +2174 -0
- package/dist/{qti-simple-choice-CafJuhnH.d.ts → qti-simple-choice-DG8ImdPz.d.ts} +184 -172
- package/dist/transformers/index.d.ts +75 -0
- package/dist/transformers/index.js +288 -0
- package/dist/transformers/index.js.map +1 -0
- package/dist/vscode.css-custom-data.json +72 -0
- package/dist/vscode.html-custom-data.json +917 -0
- package/package.json +169 -78
- package/dist/chunk-62FWJYVB.js +0 -24
- package/dist/chunk-E7TLXHQH.js +0 -2
- package/dist/qti-components/index.d.ts +0 -150
- package/dist/qti-components/index.js +0 -573
- package/dist/qti-item/index.d.ts +0 -19
- package/dist/qti-item/index.js +0 -1506
- package/dist/qti-loader/index.d.ts +0 -5
- package/dist/qti-loader/index.js +0 -2
- package/dist/qti-transformers/index.d.ts +0 -170
- package/dist/qti-transformers/index.js +0 -2
- /package/{LICENSE → LICENSE.md} +0 -0
- /package/{readme.md → README.md} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import * as lit from 'lit';
|
|
3
|
-
import { LitElement, CSSResultGroup, PropertyValueMap } from 'lit';
|
|
3
|
+
import { LitElement, CSSResultGroup, PropertyValueMap, PropertyValues } from 'lit';
|
|
4
4
|
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
5
5
|
|
|
6
6
|
interface directedPair {
|
|
@@ -30,16 +30,6 @@ type InteractionChangedDetails = ResponseInteraction & {
|
|
|
30
30
|
item: string;
|
|
31
31
|
};
|
|
32
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
33
|
type QtiInteractionChanged = CustomEvent<InteractionChangedDetails>;
|
|
44
34
|
declare global {
|
|
45
35
|
interface GlobalEventHandlersEventMap {
|
|
@@ -47,20 +37,6 @@ declare global {
|
|
|
47
37
|
}
|
|
48
38
|
}
|
|
49
39
|
|
|
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
40
|
type QtiOutcomeChanged = CustomEvent<OutcomeChangedDetails>;
|
|
65
41
|
declare global {
|
|
66
42
|
interface GlobalEventHandlersEventMap {
|
|
@@ -68,20 +44,6 @@ declare global {
|
|
|
68
44
|
}
|
|
69
45
|
}
|
|
70
46
|
|
|
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
47
|
declare class QtiMapping extends LitElement {
|
|
86
48
|
defaultValue: number;
|
|
87
49
|
lowerBound: number;
|
|
@@ -111,22 +73,6 @@ interface ResponseVariable extends VariableDeclaration<string | string[] | null>
|
|
|
111
73
|
correctResponse?: string | string[] | null;
|
|
112
74
|
}
|
|
113
75
|
|
|
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
76
|
/**
|
|
131
77
|
* @summary The qti-assessment-item element contains all the other QTI 3 item structures.
|
|
132
78
|
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.dltnnj87l0yj
|
|
@@ -172,6 +118,7 @@ declare class QtiAssessmentItem extends LitElement {
|
|
|
172
118
|
private handleUpdateResponseVariable;
|
|
173
119
|
updateResponseVariable(identifier: string, value: string | string[] | undefined): void;
|
|
174
120
|
updateOutcomeVariable(identifier: string, value: string | string[] | undefined): void;
|
|
121
|
+
validate(): boolean | null;
|
|
175
122
|
private _getCompletionStatus;
|
|
176
123
|
private _emit;
|
|
177
124
|
}
|
|
@@ -202,7 +149,7 @@ declare class QtiAssessmentStimulusRef extends LitElement {
|
|
|
202
149
|
* Loads and appends the stimulus to the specified element.
|
|
203
150
|
* @param stimulusRef - The element to which the stimulus will be appended.
|
|
204
151
|
*/
|
|
205
|
-
|
|
152
|
+
updateStimulusRef(stimulusRef: Element): Promise<void>;
|
|
206
153
|
}
|
|
207
154
|
declare global {
|
|
208
155
|
interface HTMLElementTagNameMap {
|
|
@@ -210,38 +157,28 @@ declare global {
|
|
|
210
157
|
}
|
|
211
158
|
}
|
|
212
159
|
|
|
160
|
+
type Constructor$2<T = {}> = abstract new (...args: any[]) => T;
|
|
161
|
+
interface ChoiceInterface {
|
|
162
|
+
identifier: string;
|
|
163
|
+
disabled: boolean;
|
|
164
|
+
readonly: boolean;
|
|
165
|
+
}
|
|
213
166
|
/**
|
|
214
|
-
*
|
|
167
|
+
* A mixin that adds choice functionality to a LitElement-based class.
|
|
168
|
+
* It dispatches events with a custom `type` and handles selection logic.
|
|
215
169
|
*
|
|
216
|
-
* @
|
|
217
|
-
* @
|
|
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
|
|
170
|
+
* @param Base - The base class to extend.
|
|
171
|
+
* @param type - The type of the choice, used in event names.
|
|
172
|
+
* @returns A new class extending the base class with choice functionality.
|
|
224
173
|
*/
|
|
225
|
-
|
|
174
|
+
interface ActiveElementMixinInterface {
|
|
226
175
|
identifier: string;
|
|
227
|
-
|
|
176
|
+
tabIndex: number;
|
|
228
177
|
disabled: boolean;
|
|
229
178
|
readonly: boolean;
|
|
230
|
-
|
|
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
|
-
}
|
|
179
|
+
internals: ElementInternals;
|
|
244
180
|
}
|
|
181
|
+
declare function ActiveElementMixin<T extends Constructor$2<LitElement>>(Base: T, type: string): Constructor$2<ActiveElementMixinInterface> & T;
|
|
245
182
|
|
|
246
183
|
/**
|
|
247
184
|
* @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.
|
|
@@ -274,8 +211,9 @@ declare global {
|
|
|
274
211
|
}
|
|
275
212
|
|
|
276
213
|
declare class QtiStylesheet extends LitElement {
|
|
277
|
-
private
|
|
214
|
+
private styleElement;
|
|
278
215
|
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
216
|
+
private minifyCss;
|
|
279
217
|
disconnectedCallback(): void;
|
|
280
218
|
}
|
|
281
219
|
declare global {
|
|
@@ -360,7 +298,7 @@ declare class QtiRubricBlock extends LitElement {
|
|
|
360
298
|
use: 'instructions' | 'scoring' | 'navigation';
|
|
361
299
|
view: 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor';
|
|
362
300
|
classNames: any;
|
|
363
|
-
handleclassNamesChange(
|
|
301
|
+
handleclassNamesChange(): void;
|
|
364
302
|
static styles: lit.CSSResult;
|
|
365
303
|
render(): lit_html.TemplateResult<1>;
|
|
366
304
|
connectedCallback(): void;
|
|
@@ -376,6 +314,7 @@ declare abstract class QtiFeedback extends LitElement {
|
|
|
376
314
|
outcomeIdentifier: string;
|
|
377
315
|
protected identifier: string;
|
|
378
316
|
showStatus: string;
|
|
317
|
+
private _context?;
|
|
379
318
|
connectedCallback(): void;
|
|
380
319
|
checkShowFeedback(outcomeIdentifier: string): void;
|
|
381
320
|
private showFeedback;
|
|
@@ -412,35 +351,55 @@ declare global {
|
|
|
412
351
|
}
|
|
413
352
|
}
|
|
414
353
|
|
|
415
|
-
|
|
354
|
+
interface IInteraction {
|
|
355
|
+
correctResponse: Readonly<string | string[]>;
|
|
356
|
+
value: string | string[];
|
|
416
357
|
responseIdentifier: string;
|
|
417
|
-
/** disabled should be exposed to the attributes and accessible as property */
|
|
418
358
|
disabled: boolean;
|
|
419
|
-
/** readonly should be exposed to the attributes and accessible as property */
|
|
420
359
|
readonly: boolean;
|
|
360
|
+
validate(): boolean;
|
|
361
|
+
reportValidity(): boolean;
|
|
362
|
+
reset(): void;
|
|
363
|
+
saveResponse(value: string | string[]): void;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
declare abstract class Interaction extends LitElement implements IInteraction {
|
|
367
|
+
static formAssociated: boolean;
|
|
368
|
+
responseIdentifier: any;
|
|
369
|
+
disabled: boolean;
|
|
370
|
+
readonly: boolean;
|
|
371
|
+
protected _correctResponse: string | string[];
|
|
372
|
+
protected _internals: ElementInternals;
|
|
373
|
+
constructor();
|
|
421
374
|
abstract validate(): boolean;
|
|
422
|
-
|
|
423
|
-
|
|
375
|
+
reportValidity(): boolean;
|
|
376
|
+
reset(): void;
|
|
377
|
+
abstract get value(): string | string[];
|
|
378
|
+
abstract set value(val: string | string[]);
|
|
379
|
+
get correctResponse(): string | string[];
|
|
380
|
+
set correctResponse(value: string | string[]);
|
|
424
381
|
connectedCallback(): void;
|
|
425
382
|
saveResponse(value: string | string[]): void;
|
|
426
383
|
}
|
|
427
384
|
|
|
428
385
|
declare class QtiExtendedTextInteraction extends Interaction {
|
|
429
|
-
|
|
386
|
+
private _rows;
|
|
430
387
|
/** expected length is mapped to the property maxlength on the textarea */
|
|
431
388
|
expectedLength: number;
|
|
432
389
|
patternMask: string;
|
|
433
390
|
/** text appearing in the extended-text-nteraction if it is empty */
|
|
434
391
|
placeholderText: string;
|
|
392
|
+
dataPatternmaskMessage: string;
|
|
435
393
|
private _value;
|
|
436
394
|
classNames: any;
|
|
437
|
-
handleclassNamesChange(
|
|
438
|
-
|
|
395
|
+
handleclassNamesChange(_: any, classes: string): void;
|
|
396
|
+
get value(): string | string[];
|
|
397
|
+
set value(val: string | string[]);
|
|
439
398
|
validate(): boolean;
|
|
399
|
+
reportValidity(): boolean;
|
|
440
400
|
static get styles(): lit.CSSResult[];
|
|
441
401
|
render(): lit_html.TemplateResult<1>;
|
|
442
402
|
protected textChanged(event: Event): void;
|
|
443
|
-
reset(): void;
|
|
444
403
|
private setEmptyAttribute;
|
|
445
404
|
}
|
|
446
405
|
declare global {
|
|
@@ -450,21 +409,19 @@ declare global {
|
|
|
450
409
|
}
|
|
451
410
|
|
|
452
411
|
declare class QtiTextEntryInteraction extends Interaction {
|
|
412
|
+
static styles: CSSResultGroup;
|
|
453
413
|
expectedLength: number;
|
|
454
414
|
patternMask: string;
|
|
455
415
|
placeholderText: string;
|
|
416
|
+
dataPatternmaskMessage: string;
|
|
456
417
|
private _value;
|
|
457
|
-
private _correctValue;
|
|
458
|
-
private _size;
|
|
459
418
|
inputRef: lit_html_directives_ref_js.Ref<HTMLInputElement>;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
set response(value: string | undefined);
|
|
419
|
+
get value(): string | string[];
|
|
420
|
+
set value(val: string | string[]);
|
|
463
421
|
validate(): boolean;
|
|
464
|
-
static get styles(): lit.CSSResult[];
|
|
465
|
-
set correctResponse(value: string);
|
|
466
422
|
render(): lit_html.TemplateResult<1>;
|
|
467
423
|
protected textChanged(event: Event): void;
|
|
424
|
+
reportValidity(): boolean;
|
|
468
425
|
reset(): void;
|
|
469
426
|
private setEmptyAttribute;
|
|
470
427
|
}
|
|
@@ -474,13 +431,14 @@ declare global {
|
|
|
474
431
|
}
|
|
475
432
|
}
|
|
476
433
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
434
|
+
type Choice = HTMLElement & ChoiceInterface & {
|
|
435
|
+
internals: ElementInternals;
|
|
436
|
+
};
|
|
437
|
+
interface ChoicesInterface extends IInteraction {
|
|
480
438
|
correctResponse: string | string[];
|
|
481
439
|
}
|
|
482
440
|
|
|
483
|
-
declare const QtiHottextInteraction_base: (new (...args: any[]) => ChoicesInterface) & typeof
|
|
441
|
+
declare const QtiHottextInteraction_base: (abstract new (...args: any[]) => ChoicesInterface) & typeof Interaction;
|
|
484
442
|
declare class QtiHottextInteraction extends QtiHottextInteraction_base {
|
|
485
443
|
connectedCallback(): void;
|
|
486
444
|
render: () => lit_html.TemplateResult<1>;
|
|
@@ -507,8 +465,9 @@ declare class QtiInlineChoiceInteraction extends Interaction {
|
|
|
507
465
|
disconnectedCallback(): void;
|
|
508
466
|
validate(): boolean;
|
|
509
467
|
reset(): void;
|
|
510
|
-
set
|
|
511
|
-
|
|
468
|
+
set value(value: string);
|
|
469
|
+
get value(): string;
|
|
470
|
+
set correctResponse(value: string | string[]);
|
|
512
471
|
choiceSelected(event: Event): void;
|
|
513
472
|
}
|
|
514
473
|
declare global {
|
|
@@ -517,11 +476,29 @@ declare global {
|
|
|
517
476
|
}
|
|
518
477
|
}
|
|
519
478
|
|
|
520
|
-
|
|
479
|
+
type Orientation = 'horizontal' | 'vertical' | undefined;
|
|
480
|
+
declare const QtiChoiceInteraction_base: (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => ChoicesInterface) & typeof Interaction;
|
|
481
|
+
/**
|
|
482
|
+
* An sample element.
|
|
483
|
+
*
|
|
484
|
+
* @slot - default slot of the choices
|
|
485
|
+
* @slot prompt - slot of the prompt
|
|
486
|
+
*
|
|
487
|
+
* @csspart slot - The choice elements
|
|
488
|
+
* @csspart prompt - The prompt
|
|
489
|
+
* @csspart message - The validation message
|
|
490
|
+
*
|
|
491
|
+
* @cssprop [--qti-bg-active=#ffecec] - The active background color
|
|
492
|
+
* @cssprop [--qti-border-active=#f86d70] - The active border color
|
|
493
|
+
* @cssprop [--qti-padding-horizontal=1px] - The option horizontal padding
|
|
494
|
+
* @cssprop [--qti-padding-vertical=solid] - The option vertical padding
|
|
495
|
+
* @cssprop [--qti-border-radius=8px] - The option border radius
|
|
496
|
+
*/
|
|
521
497
|
declare class QtiChoiceInteraction extends QtiChoiceInteraction_base implements ChoicesInterface {
|
|
522
498
|
static styles: CSSResultGroup;
|
|
523
|
-
|
|
524
|
-
|
|
499
|
+
constructor();
|
|
500
|
+
/** @deprecated, use 'qti-orientation-horizontal' or 'qti-orientation-vertical' instead */
|
|
501
|
+
orientation: Orientation;
|
|
525
502
|
render(): lit_html.TemplateResult<1>;
|
|
526
503
|
}
|
|
527
504
|
declare global {
|
|
@@ -566,7 +543,7 @@ declare abstract class QtiExpression<T> extends LitElement implements QtiExpress
|
|
|
566
543
|
render(): lit_html.TemplateResult<1>;
|
|
567
544
|
calculate(): Readonly<T>;
|
|
568
545
|
protected getResult(): Readonly<T>;
|
|
569
|
-
|
|
546
|
+
protected context?: ItemContext;
|
|
570
547
|
getVariables: () => VariableDeclaration<number | string | (number | string)[] | null>[];
|
|
571
548
|
}
|
|
572
549
|
|
|
@@ -604,28 +581,53 @@ declare abstract class QtiConditionExpression extends QtiExpression<boolean> {
|
|
|
604
581
|
getResult(): Readonly<boolean>;
|
|
605
582
|
}
|
|
606
583
|
|
|
607
|
-
type Constructor<T> = new (...args: any[]) => T;
|
|
584
|
+
type Constructor$1<T> = new (...args: any[]) => T;
|
|
608
585
|
declare const QtiAnd_base: {
|
|
609
586
|
new (...args: any[]): {
|
|
610
|
-
calculateChildren(children: Array<MockQtiExpression<any>>): boolean;
|
|
587
|
+
calculateChildren(children: Array<MockQtiExpression$1<any>>): boolean;
|
|
611
588
|
};
|
|
612
|
-
} & Constructor<QtiConditionExpression>;
|
|
589
|
+
} & Constructor$1<QtiConditionExpression>;
|
|
613
590
|
declare class QtiAnd extends QtiAnd_base {
|
|
614
591
|
calculate(): boolean;
|
|
615
592
|
}
|
|
593
|
+
type MockQtiExpression$1<T> = {
|
|
594
|
+
calculate: () => T;
|
|
595
|
+
};
|
|
596
|
+
type MockConstructor$1 = new (...args: any[]) => {};
|
|
597
|
+
declare function qtiAndMixin<TBase extends MockConstructor$1>(Base: TBase): {
|
|
598
|
+
new (...args: any[]): {
|
|
599
|
+
calculateChildren(children: Array<MockQtiExpression$1<any>>): boolean;
|
|
600
|
+
};
|
|
601
|
+
} & TBase;
|
|
602
|
+
|
|
603
|
+
declare global {
|
|
604
|
+
interface HTMLElementTagNameMap {
|
|
605
|
+
'qti-and': QtiAnd;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
type Constructor<T> = new (...args: any[]) => T;
|
|
610
|
+
declare const QtiSubtract_base: {
|
|
611
|
+
new (...args: any[]): {
|
|
612
|
+
calculateChildren(children: Array<MockQtiExpression<any>>): number;
|
|
613
|
+
};
|
|
614
|
+
} & Constructor<QtiExpression<number>>;
|
|
615
|
+
declare class QtiSubtract extends QtiSubtract_base {
|
|
616
|
+
getResult(): number;
|
|
617
|
+
}
|
|
616
618
|
type MockQtiExpression<T> = {
|
|
617
619
|
calculate: () => T;
|
|
618
620
|
};
|
|
619
621
|
type MockConstructor = new (...args: any[]) => {};
|
|
620
|
-
declare function
|
|
622
|
+
declare function qtiSubtractMixin<TBase extends MockConstructor>(Base: TBase): {
|
|
621
623
|
new (...args: any[]): {
|
|
622
|
-
calculateChildren(children: Array<MockQtiExpression<any>>):
|
|
624
|
+
calculateChildren(children: Array<MockQtiExpression<any>>): number;
|
|
623
625
|
};
|
|
624
626
|
} & TBase;
|
|
625
627
|
|
|
626
628
|
declare global {
|
|
627
629
|
interface HTMLElementTagNameMap {
|
|
628
|
-
'qti-
|
|
630
|
+
'qti-subtract': QtiSubtract;
|
|
629
631
|
}
|
|
630
632
|
}
|
|
631
633
|
|
|
@@ -683,7 +685,6 @@ declare class QtiPortableCustomInteraction extends Interaction {
|
|
|
683
685
|
private intervalId;
|
|
684
686
|
private rawResponse;
|
|
685
687
|
private pci;
|
|
686
|
-
responseIdentifier: string;
|
|
687
688
|
module: string;
|
|
688
689
|
customInteractionTypeIdentifier: string;
|
|
689
690
|
private _errorMessage;
|
|
@@ -691,7 +692,8 @@ declare class QtiPortableCustomInteraction extends Interaction {
|
|
|
691
692
|
private startChecking;
|
|
692
693
|
private stopChecking;
|
|
693
694
|
validate(): boolean;
|
|
694
|
-
set
|
|
695
|
+
set value(_: string | string[]);
|
|
696
|
+
get value(): string | string[];
|
|
695
697
|
getTAOConfig(node: any): {};
|
|
696
698
|
register(pci: IMSpci<unknown>): void;
|
|
697
699
|
connectedCallback(): void;
|
|
@@ -710,20 +712,15 @@ declare global {
|
|
|
710
712
|
}
|
|
711
713
|
}
|
|
712
714
|
|
|
713
|
-
|
|
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;
|
|
715
|
+
declare const QtiAssociateInteraction_base: (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
722
716
|
declare class QtiAssociateInteraction extends QtiAssociateInteraction_base {
|
|
723
717
|
private _childrenMap;
|
|
724
|
-
static styles:
|
|
718
|
+
static styles: CSSResultGroup;
|
|
719
|
+
private _registerChoiceHandler;
|
|
720
|
+
constructor();
|
|
721
|
+
private _registerChoice;
|
|
725
722
|
render(): lit_html.TemplateResult<1>;
|
|
726
|
-
|
|
723
|
+
disconnectedCallback(): void;
|
|
727
724
|
}
|
|
728
725
|
declare global {
|
|
729
726
|
interface HTMLElementTagNameMap {
|
|
@@ -734,7 +731,6 @@ declare global {
|
|
|
734
731
|
declare class QtiCustomInteraction extends Interaction {
|
|
735
732
|
private rawResponse;
|
|
736
733
|
constructor();
|
|
737
|
-
responseIdentifier: string;
|
|
738
734
|
data: string;
|
|
739
735
|
baseItemUrl: string;
|
|
740
736
|
baseRefUrl: string;
|
|
@@ -752,7 +748,8 @@ declare class QtiCustomInteraction extends Interaction {
|
|
|
752
748
|
private postToWindowAndIframes;
|
|
753
749
|
handlePostMessage(event: MessageEvent): void;
|
|
754
750
|
validate(): boolean;
|
|
755
|
-
|
|
751
|
+
get value(): string | string[];
|
|
752
|
+
set value(val: string | string[]);
|
|
756
753
|
disconnectedCallback(): void;
|
|
757
754
|
render(): lit_html.TemplateResult<1>;
|
|
758
755
|
}
|
|
@@ -766,9 +763,10 @@ declare class QtiEndAttemptInteraction extends Interaction {
|
|
|
766
763
|
countAttempt: string;
|
|
767
764
|
title: 'end attempt';
|
|
768
765
|
validate(): boolean;
|
|
769
|
-
|
|
766
|
+
get value(): string | string[];
|
|
767
|
+
set value(_: string | string[]);
|
|
770
768
|
render(): lit_html.TemplateResult<1>;
|
|
771
|
-
endAttempt(
|
|
769
|
+
endAttempt(_: Event): void;
|
|
772
770
|
}
|
|
773
771
|
declare global {
|
|
774
772
|
interface HTMLElementTagNameMap {
|
|
@@ -776,11 +774,16 @@ declare global {
|
|
|
776
774
|
}
|
|
777
775
|
}
|
|
778
776
|
|
|
779
|
-
declare const QtiGapMatchInteraction_base: (new (...args: any[]) => IInteraction) & typeof
|
|
777
|
+
declare const QtiGapMatchInteraction_base: (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
780
778
|
declare class QtiGapMatchInteraction extends QtiGapMatchInteraction_base {
|
|
781
|
-
|
|
779
|
+
private observer;
|
|
780
|
+
private resizeObserver;
|
|
781
|
+
static styles: CSSResultGroup;
|
|
782
782
|
render(): lit_html.TemplateResult<1>;
|
|
783
|
-
|
|
783
|
+
firstUpdated(_changedProperties: PropertyValues): void;
|
|
784
|
+
disconnectedCallback(): void;
|
|
785
|
+
private updateMinDimensionsForDrowZones;
|
|
786
|
+
set correctResponse(value: string | string[]);
|
|
784
787
|
}
|
|
785
788
|
declare global {
|
|
786
789
|
interface HTMLElementTagNameMap {
|
|
@@ -809,7 +812,8 @@ declare class QtiGraphicAssociateInteraction extends Interaction {
|
|
|
809
812
|
constructor();
|
|
810
813
|
reset(): void;
|
|
811
814
|
validate(): boolean;
|
|
812
|
-
set
|
|
815
|
+
set value(val: string | string[]);
|
|
816
|
+
get value(): string | string[];
|
|
813
817
|
render(): lit_html.TemplateResult<1>;
|
|
814
818
|
private positionHotspotOnRegister;
|
|
815
819
|
firstUpdated(e: any): void;
|
|
@@ -821,10 +825,14 @@ declare global {
|
|
|
821
825
|
}
|
|
822
826
|
}
|
|
823
827
|
|
|
824
|
-
declare const QtiGraphicGapMatchInteraction_base: (new (...args: any[]) => IInteraction) & typeof
|
|
828
|
+
declare const QtiGraphicGapMatchInteraction_base: (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
825
829
|
declare class QtiGraphicGapMatchInteraction extends QtiGraphicGapMatchInteraction_base {
|
|
826
|
-
static styles:
|
|
830
|
+
static styles: CSSResultGroup;
|
|
831
|
+
private observer;
|
|
832
|
+
private resizeObserver;
|
|
827
833
|
render(): lit_html.TemplateResult<1>;
|
|
834
|
+
firstUpdated(_changedProperties: PropertyValues): void;
|
|
835
|
+
private updateMinDimensionsForDrowZones;
|
|
828
836
|
private positionHotspotOnRegister;
|
|
829
837
|
connectedCallback(): void;
|
|
830
838
|
disconnectedCallback(): void;
|
|
@@ -835,9 +843,10 @@ declare global {
|
|
|
835
843
|
}
|
|
836
844
|
}
|
|
837
845
|
|
|
838
|
-
declare const QtiGraphicOrderInteraction_base: (new (...args: any[]) => ChoicesInterface) & typeof
|
|
846
|
+
declare const QtiGraphicOrderInteraction_base: (abstract new (...args: any[]) => ChoicesInterface) & typeof Interaction;
|
|
839
847
|
declare class QtiGraphicOrderInteraction extends QtiGraphicOrderInteraction_base {
|
|
840
848
|
choiceOrdering: boolean;
|
|
849
|
+
protected _choiceElements: Choice[];
|
|
841
850
|
static styles: lit.CSSResult[];
|
|
842
851
|
render(): lit_html.TemplateResult<1>;
|
|
843
852
|
private setHotspotOrder;
|
|
@@ -851,7 +860,7 @@ declare global {
|
|
|
851
860
|
}
|
|
852
861
|
}
|
|
853
862
|
|
|
854
|
-
declare const QtiHotspotInteraction_base: (new (...args: any[]) => ChoicesInterface) & typeof
|
|
863
|
+
declare const QtiHotspotInteraction_base: (abstract new (...args: any[]) => ChoicesInterface) & typeof Interaction;
|
|
855
864
|
declare class QtiHotspotInteraction extends QtiHotspotInteraction_base {
|
|
856
865
|
static styles: lit.CSSResult[];
|
|
857
866
|
render(): lit_html.TemplateResult<1>;
|
|
@@ -865,7 +874,8 @@ declare global {
|
|
|
865
874
|
}
|
|
866
875
|
}
|
|
867
876
|
|
|
868
|
-
declare
|
|
877
|
+
declare const QtiSimpleAssociableChoice_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
878
|
+
declare class QtiSimpleAssociableChoice extends QtiSimpleAssociableChoice_base {
|
|
869
879
|
static styles: lit.CSSResult;
|
|
870
880
|
/** the minimal number of selections a candidate must make */
|
|
871
881
|
matchMin: number;
|
|
@@ -881,16 +891,18 @@ declare global {
|
|
|
881
891
|
}
|
|
882
892
|
}
|
|
883
893
|
|
|
884
|
-
declare const QtiMatchInteraction_base: (new (...args: any[]) => IInteraction) & typeof
|
|
894
|
+
declare const QtiMatchInteraction_base: (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
885
895
|
declare class QtiMatchInteraction extends QtiMatchInteraction_base {
|
|
886
|
-
static styles:
|
|
896
|
+
static styles: CSSResultGroup;
|
|
887
897
|
rows: QtiSimpleAssociableChoice[];
|
|
888
898
|
cols: QtiSimpleAssociableChoice[];
|
|
889
899
|
lastCheckedRadio: HTMLInputElement | null;
|
|
890
|
-
|
|
900
|
+
_response: string | string[];
|
|
901
|
+
get value(): string[];
|
|
902
|
+
set value(val: string[]);
|
|
891
903
|
correctOptions: string[];
|
|
892
904
|
responseIdentifier: string;
|
|
893
|
-
connectedCallback(): void
|
|
905
|
+
connectedCallback(): Promise<void>;
|
|
894
906
|
handleRadioClick: (e: any) => void;
|
|
895
907
|
handleRadioChange: (e: any) => void;
|
|
896
908
|
set correctResponse(responseValue: string | string[]);
|
|
@@ -903,10 +915,11 @@ declare global {
|
|
|
903
915
|
}
|
|
904
916
|
|
|
905
917
|
declare class QtiMediaInteraction extends Interaction {
|
|
906
|
-
|
|
918
|
+
private _value;
|
|
907
919
|
reset(): void;
|
|
908
920
|
validate(): boolean;
|
|
909
|
-
|
|
921
|
+
get value(): string | string[];
|
|
922
|
+
set value(val: string | string[]);
|
|
910
923
|
static get properties(): {
|
|
911
924
|
step: {
|
|
912
925
|
type: NumberConstructor;
|
|
@@ -925,17 +938,17 @@ declare global {
|
|
|
925
938
|
}
|
|
926
939
|
}
|
|
927
940
|
|
|
928
|
-
declare const QtiOrderInteraction_base: (new (...args: any[]) => {}) & (new (...args: any[]) => IInteraction) & typeof
|
|
941
|
+
declare const QtiOrderInteraction_base: (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
929
942
|
declare class QtiOrderInteraction extends QtiOrderInteraction_base {
|
|
943
|
+
static styles: lit.CSSResult;
|
|
930
944
|
childrenMap: Element[];
|
|
931
945
|
nrChoices: number;
|
|
932
946
|
correctResponses: string[];
|
|
933
947
|
showCorrectResponses: boolean;
|
|
934
948
|
/** orientation of choices */
|
|
935
949
|
orientation: 'horizontal' | 'vertical';
|
|
936
|
-
static styles: lit.CSSResult[];
|
|
937
950
|
render(): lit_html.TemplateResult<1>;
|
|
938
|
-
set correctResponse(value:
|
|
951
|
+
set correctResponse(value: string | string[]);
|
|
939
952
|
protected getResponse(): string[];
|
|
940
953
|
firstUpdated(changedProps: any): Promise<void>;
|
|
941
954
|
}
|
|
@@ -955,7 +968,7 @@ declare class QtiPositionObjectStage extends LitElement {
|
|
|
955
968
|
constructor();
|
|
956
969
|
dragElementHandler(event: any): void;
|
|
957
970
|
firstUpdated(a: any): void;
|
|
958
|
-
removeMoveListener(
|
|
971
|
+
removeMoveListener(): void;
|
|
959
972
|
disconnectedCallback(): void;
|
|
960
973
|
}
|
|
961
974
|
declare global {
|
|
@@ -974,7 +987,8 @@ declare class QtiSelectPointInteraction extends Interaction {
|
|
|
974
987
|
render(): lit_html.TemplateResult<1>;
|
|
975
988
|
reset(): void;
|
|
976
989
|
validate(): boolean;
|
|
977
|
-
set
|
|
990
|
+
set value(val: string | string[]);
|
|
991
|
+
get value(): string | string[];
|
|
978
992
|
firstUpdated(): void;
|
|
979
993
|
disconnectedCallback(): void;
|
|
980
994
|
}
|
|
@@ -1008,10 +1022,9 @@ declare global {
|
|
|
1008
1022
|
* @slot prompt - slot where the prompt is placed.
|
|
1009
1023
|
*/
|
|
1010
1024
|
declare class QtiSliderInteraction extends Interaction {
|
|
1025
|
+
private _value;
|
|
1011
1026
|
csLive: CSSStyleDeclaration;
|
|
1012
|
-
private _knob;
|
|
1013
1027
|
private _rail;
|
|
1014
|
-
value: number;
|
|
1015
1028
|
stepLabel: boolean;
|
|
1016
1029
|
reverse: boolean;
|
|
1017
1030
|
private _min;
|
|
@@ -1023,10 +1036,12 @@ declare class QtiSliderInteraction extends Interaction {
|
|
|
1023
1036
|
private _step;
|
|
1024
1037
|
set step(value: number);
|
|
1025
1038
|
get step(): number;
|
|
1026
|
-
_handleDisabledChange: (
|
|
1027
|
-
_handleReadonlyChange: (
|
|
1039
|
+
_handleDisabledChange: () => void;
|
|
1040
|
+
_handleReadonlyChange: () => void;
|
|
1028
1041
|
reset(): void;
|
|
1029
1042
|
validate(): boolean;
|
|
1043
|
+
get value(): string | string[];
|
|
1044
|
+
set value(val: string | string[]);
|
|
1030
1045
|
constructor();
|
|
1031
1046
|
set response(myResponse: string | string[]);
|
|
1032
1047
|
static styles: lit.CSSResult[];
|
|
@@ -1059,7 +1074,7 @@ declare class QtiCustomOperator extends LitElement implements Calculate {
|
|
|
1059
1074
|
private operatorFunction;
|
|
1060
1075
|
private _context?;
|
|
1061
1076
|
render(): lit_html.TemplateResult<1>;
|
|
1062
|
-
handleSlotChange(
|
|
1077
|
+
handleSlotChange(): void;
|
|
1063
1078
|
calculate(): any;
|
|
1064
1079
|
}
|
|
1065
1080
|
declare global {
|
|
@@ -1101,7 +1116,8 @@ declare global {
|
|
|
1101
1116
|
}
|
|
1102
1117
|
}
|
|
1103
1118
|
|
|
1104
|
-
declare
|
|
1119
|
+
declare const QtiGapText_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
1120
|
+
declare class QtiGapText extends QtiGapText_base {
|
|
1105
1121
|
static styles: lit.CSSResult;
|
|
1106
1122
|
tabindex: number | undefined;
|
|
1107
1123
|
connectedCallback(): void;
|
|
@@ -1113,7 +1129,8 @@ declare global {
|
|
|
1113
1129
|
}
|
|
1114
1130
|
}
|
|
1115
1131
|
|
|
1116
|
-
declare
|
|
1132
|
+
declare const QtiHotspotChoice_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
1133
|
+
declare class QtiHotspotChoice extends QtiHotspotChoice_base {
|
|
1117
1134
|
static styles: lit.CSSResult;
|
|
1118
1135
|
order: number;
|
|
1119
1136
|
}
|
|
@@ -1123,7 +1140,8 @@ declare global {
|
|
|
1123
1140
|
}
|
|
1124
1141
|
}
|
|
1125
1142
|
|
|
1126
|
-
declare
|
|
1143
|
+
declare const QtiHottext_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
1144
|
+
declare class QtiHottext extends QtiHottext_base {
|
|
1127
1145
|
static styles: lit.CSSResult;
|
|
1128
1146
|
render(): lit_html.TemplateResult<1>;
|
|
1129
1147
|
}
|
|
@@ -1147,21 +1165,15 @@ declare global {
|
|
|
1147
1165
|
}
|
|
1148
1166
|
}
|
|
1149
1167
|
|
|
1168
|
+
declare const QtiSimpleChoice_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
1150
1169
|
/**
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
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.
|
|
1170
|
+
* qti-order-interaction
|
|
1171
|
+
* qti-choice-interaction
|
|
1161
1172
|
*/
|
|
1162
|
-
declare class QtiSimpleChoice extends
|
|
1173
|
+
declare class QtiSimpleChoice extends QtiSimpleChoice_base {
|
|
1163
1174
|
static styles: lit.CSSResult;
|
|
1164
1175
|
marker: string;
|
|
1176
|
+
get checked(): boolean;
|
|
1165
1177
|
render(): lit_html.TemplateResult<1>;
|
|
1166
1178
|
}
|
|
1167
1179
|
declare global {
|
|
@@ -1170,4 +1182,4 @@ declare global {
|
|
|
1170
1182
|
}
|
|
1171
1183
|
}
|
|
1172
1184
|
|
|
1173
|
-
export {
|
|
1185
|
+
export { qtiSubtractMixin 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, type Orientation as N, type OutcomeChangedDetails as O, QtiChoiceInteraction as P, QtiRule as Q, type ResponseVariable as R, QtiOutcomeProcessing as S, QtiOutcomeProcessingProcessor as T, QtiResponseProcessing as U, type VariableDeclaration as V, QtiLookupOutcomeValue as W, QtiAnd as X, qtiAndMixin as Y, QtiMapping as Z, QtiSubtract as _, type QtiRuleBase as a, QtiPortableCustomInteraction as a0, QtiAssociateInteraction as a1, QtiCustomInteraction as a2, QtiEndAttemptInteraction as a3, QtiGapMatchInteraction as a4, QtiGraphicAssociateInteraction as a5, QtiGraphicGapMatchInteraction as a6, QtiGraphicOrderInteraction as a7, QtiHotspotInteraction as a8, QtiMatchInteraction as a9, QtiMediaInteraction as aa, QtiOrderInteraction as ab, QtiPositionObjectStage as ac, QtiSelectPointInteraction as ad, QtiSliderInteraction as ae, itemContextVariables as af, itemContext as ag, QtiCustomOperator as ah, Interaction as ai, QtiAssociableHotspot as aj, QtiGap as ak, QtiGapImg as al, QtiGapText as am, QtiHotspotChoice as an, QtiHottext as ao, QtiInlineChoice as ap, QtiSimpleAssociableChoice as aq, QtiSimpleChoice as ar, type QtiExpressionBase as b, QtiExpression as c, QtiConditionExpression as d, QtiAssessmentItem as e, type InteractionChangedDetails as f, type QtiInteractionChanged as g, type QtiOutcomeChanged as h, type directedPair as i, type ResponseInteraction as j, type float as k, type integer as l, type Ordered as m, type Cardinality as n, type VariableValue as o, type OutcomeVariable 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 };
|