@citolab/qti-components 7.28.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +6178 -2946
- package/dist/base.d.ts +9 -50
- package/dist/base.js +31 -6
- package/dist/chunk-5QYII4OZ.js +1374 -0
- package/dist/chunk-5QYII4OZ.js.map +1 -0
- package/dist/{chunk-FK2IVMS3.js → chunk-5SJS36BI.js} +4264 -3647
- package/dist/chunk-5SJS36BI.js.map +1 -0
- package/dist/chunk-64XSIBGO.js +241 -0
- package/dist/chunk-64XSIBGO.js.map +1 -0
- package/dist/{chunk-F6WP6WEF.js → chunk-7V4HJFHW.js} +3 -3
- package/dist/{chunk-F6WP6WEF.js.map → chunk-7V4HJFHW.js.map} +1 -1
- package/dist/{chunk-Z2SUBRH5.js → chunk-H3J7LFRO.js} +834 -1005
- package/dist/chunk-H3J7LFRO.js.map +1 -0
- package/dist/chunk-IJD53WY6.js +719 -0
- package/dist/chunk-IJD53WY6.js.map +1 -0
- package/dist/chunk-KYEZRYO6.js +1608 -0
- package/dist/chunk-KYEZRYO6.js.map +1 -0
- package/dist/{chunk-PINGOK2F.js → chunk-LZJHHZQ2.js} +1979 -1775
- package/dist/chunk-LZJHHZQ2.js.map +1 -0
- package/dist/chunk-MGF5F3S2.js +11 -0
- package/dist/chunk-MGF5F3S2.js.map +1 -0
- package/dist/chunk-MJVPNN7W.js +11 -0
- package/dist/chunk-MJVPNN7W.js.map +1 -0
- package/dist/{chunk-YLIYPNMK.js → chunk-NA2N2WSG.js} +1303 -1193
- package/dist/chunk-NA2N2WSG.js.map +1 -0
- package/dist/chunk-V5G7X53Y.js +11 -0
- package/dist/chunk-V5G7X53Y.js.map +1 -0
- package/dist/chunk-W4QZPCNC.js +294 -0
- package/dist/chunk-W4QZPCNC.js.map +1 -0
- package/dist/chunk-WCQ26LV7.js +102 -0
- package/dist/chunk-WCQ26LV7.js.map +1 -0
- package/dist/{chunk-OQ77SE2W.js → chunk-WVVMNF74.js} +851 -925
- package/dist/chunk-WVVMNF74.js.map +1 -0
- package/dist/{chunk-N7S3GNUP.js → chunk-X3E5HXG2.js} +2 -2
- package/dist/corrections.d.ts +1 -0
- package/dist/corrections.js +84 -0
- package/dist/elements.d.ts +1 -399
- package/dist/elements.js +6 -5
- package/dist/index.d.ts +9 -23
- package/dist/index.js +189 -76
- package/dist/interactions.d.ts +1 -915
- package/dist/interactions.js +19 -15
- package/dist/item.css +4118 -1920
- package/dist/item.d.ts +1 -127
- package/dist/item.js +6 -11
- package/dist/loader.d.ts +1 -22
- package/dist/loader.js +2 -3
- package/dist/processing.d.ts +1 -731
- package/dist/processing.js +2 -3
- package/dist/qti-components-jsx.d.ts +5394 -2718
- package/dist/test.d.ts +1 -537
- package/dist/test.js +26 -11
- package/dist/transformers.d.ts +1 -18
- package/dist/transformers.js +1 -2
- package/package.json +20 -16
- package/custom-elements.json +0 -43161
- package/dist/chunk-BPIDAS3T.js +0 -495
- package/dist/chunk-BPIDAS3T.js.map +0 -1
- package/dist/chunk-FK2IVMS3.js.map +0 -1
- package/dist/chunk-LQZCSHN5.js +0 -3673
- package/dist/chunk-LQZCSHN5.js.map +0 -1
- package/dist/chunk-OQ77SE2W.js.map +0 -1
- package/dist/chunk-PINGOK2F.js.map +0 -1
- package/dist/chunk-QXBXORM3.js +0 -27
- package/dist/chunk-U2FLSHK7.js +0 -510
- package/dist/chunk-U2FLSHK7.js.map +0 -1
- package/dist/chunk-YLIYPNMK.js.map +0 -1
- package/dist/chunk-Z2SUBRH5.js.map +0 -1
- package/dist/computed-item.context-DfsW_96S.d.ts +0 -22
- package/dist/computed.context-DHbxad0N.d.ts +0 -45
- package/dist/config.context-BjZ2bZSY.d.ts +0 -42
- package/dist/interaction-Bgzlw7Iu.d.ts +0 -110
- package/dist/item.context-CkUeDcaO.d.ts +0 -15
- package/dist/qti-condition-expression-B1BYmCcq.d.ts +0 -26
- package/dist/qti-feedback-ChmXhZuf.d.ts +0 -21
- package/dist/qti-rule-base-ajOnfGXY.d.ts +0 -16
- package/dist/qti-transform-test-DMx816H0.d.ts +0 -68
- package/dist/qti.context-B8PSyIWm.d.ts +0 -14
- package/dist/test.context-CByZZjkR.d.ts +0 -15
- package/dist/variables-CMYcDbyW.d.ts +0 -70
- /package/dist/{chunk-N7S3GNUP.js.map → chunk-X3E5HXG2.js.map} +0 -0
- /package/dist/{chunk-QXBXORM3.js.map → corrections.js.map} +0 -0
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { V as VariableDeclaration } from './variables-CMYcDbyW.js';
|
|
2
|
-
|
|
3
|
-
type ComputedItemContext = {
|
|
4
|
-
identifier: string;
|
|
5
|
-
href?: string;
|
|
6
|
-
correct?: boolean;
|
|
7
|
-
incorrect?: boolean;
|
|
8
|
-
completed?: boolean;
|
|
9
|
-
adaptive?: boolean;
|
|
10
|
-
timeDependent?: boolean;
|
|
11
|
-
title?: string;
|
|
12
|
-
label?: string;
|
|
13
|
-
score?: number;
|
|
14
|
-
maxScore?: number;
|
|
15
|
-
completionStatus?: string;
|
|
16
|
-
variables: ReadonlyArray<VariableDeclaration<string | string[] | null>>;
|
|
17
|
-
};
|
|
18
|
-
declare const computedItemContext: {
|
|
19
|
-
__context__: Readonly<ComputedItemContext>;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export { type ComputedItemContext as C, computedItemContext as c };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { C as ComputedItemContext } from './computed-item.context-DfsW_96S.js';
|
|
2
|
-
|
|
3
|
-
type View = 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor' | '';
|
|
4
|
-
interface SessionContext {
|
|
5
|
-
navPartId?: string | null;
|
|
6
|
-
navSectionId?: string | null;
|
|
7
|
-
navItemRefId?: string | null;
|
|
8
|
-
navItemLoading?: boolean;
|
|
9
|
-
navTestLoading?: boolean;
|
|
10
|
-
view?: View;
|
|
11
|
-
}
|
|
12
|
-
declare const INITIAL_SESSION_CONTEXT: Readonly<SessionContext>;
|
|
13
|
-
declare const sessionContext: {
|
|
14
|
-
__context__: Readonly<SessionContext>;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type ComputedItem = ComputedItemContext & {
|
|
18
|
-
categories?: string[];
|
|
19
|
-
type?: 'info' | 'regular';
|
|
20
|
-
index?: number;
|
|
21
|
-
active?: boolean;
|
|
22
|
-
};
|
|
23
|
-
type ComputedContext = {
|
|
24
|
-
view: View;
|
|
25
|
-
identifier: string;
|
|
26
|
-
title: string;
|
|
27
|
-
testParts: {
|
|
28
|
-
active?: boolean;
|
|
29
|
-
identifier: string;
|
|
30
|
-
navigationMode: 'linear' | 'nonlinear';
|
|
31
|
-
submissionMode: 'individual' | 'simultaneous';
|
|
32
|
-
sections: {
|
|
33
|
-
active?: boolean;
|
|
34
|
-
identifier: string;
|
|
35
|
-
title: string;
|
|
36
|
-
completed?: boolean;
|
|
37
|
-
items: ComputedItem[];
|
|
38
|
-
}[];
|
|
39
|
-
}[];
|
|
40
|
-
};
|
|
41
|
-
declare const computedContext: {
|
|
42
|
-
__context__: Readonly<ComputedContext>;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export { type ComputedContext as C, INITIAL_SESSION_CONTEXT as I, type SessionContext as S, type View as V, type ComputedItem as a, computedContext as c, sessionContext as s };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
type CorrectResponseMode = 'internal' | 'full';
|
|
2
|
-
/**
|
|
3
|
-
* Configuration context for QTI components. Provides runtime options for assessment item and interaction behavior.
|
|
4
|
-
*/
|
|
5
|
-
interface ConfigContext {
|
|
6
|
-
/**
|
|
7
|
-
* Optional category label for info items, used for reporting or display purposes.
|
|
8
|
-
* Example: "General Information", "Instructions".
|
|
9
|
-
*/
|
|
10
|
-
infoItemCategory?: string;
|
|
11
|
-
/**
|
|
12
|
-
* If true, calls reportValidity() on interactions after scoring to show validation feedback.
|
|
13
|
-
* Used to trigger UI validation after a scoring event.
|
|
14
|
-
*/
|
|
15
|
-
reportValidityAfterScoring?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* If true, disables further selection in choice interactions after the maximum number of choices is reached.
|
|
18
|
-
* Used in multiple-choice and similar interactions to enforce maxChoices.
|
|
19
|
-
*/
|
|
20
|
-
disableAfterIfMaxChoicesReached?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Controls the mode for showing correct responses:
|
|
23
|
-
* - 'internal': Only show correct responses for the current interaction.
|
|
24
|
-
* - 'full': Show all correct responses for the item.
|
|
25
|
-
*/
|
|
26
|
-
correctResponseMode?: CorrectResponseMode;
|
|
27
|
-
/**
|
|
28
|
-
* Optional prompt text to display in inline choice interactions when no option is selected.
|
|
29
|
-
* Example: "Select an answer..."
|
|
30
|
-
*/
|
|
31
|
-
inlineChoicePrompt?: string;
|
|
32
|
-
/**
|
|
33
|
-
* If true, only show the full correct response when the candidate's response is incorrect.
|
|
34
|
-
* Used to control feedback visibility in review/correction modes.
|
|
35
|
-
*/
|
|
36
|
-
fullCorrectResponseOnlyWhenIncorrect?: boolean;
|
|
37
|
-
}
|
|
38
|
-
declare const configContext: {
|
|
39
|
-
__context__: Readonly<ConfigContext>;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export { type ConfigContext as C, type CorrectResponseMode as a, configContext as c };
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
import { C as ConfigContext } from './config.context-BjZ2bZSY.js';
|
|
3
|
-
import { f as ResponseVariable } from './variables-CMYcDbyW.js';
|
|
4
|
-
|
|
5
|
-
interface IInteraction {
|
|
6
|
-
/** The correct response for this interaction */
|
|
7
|
-
correctResponse: Readonly<string | string[] | null>;
|
|
8
|
-
/** Shows which choices are correct with inline indicators */
|
|
9
|
-
showCorrectResponse: boolean;
|
|
10
|
-
/** Shows a cloned interaction with the correct answers filled in */
|
|
11
|
-
showFullCorrectResponse: boolean;
|
|
12
|
-
/** Shows feedback on candidate's selections compared to correct response */
|
|
13
|
-
showCandidateCorrection: boolean;
|
|
14
|
-
response: string | string[];
|
|
15
|
-
responseIdentifier: string;
|
|
16
|
-
disabled: boolean;
|
|
17
|
-
readonly: boolean;
|
|
18
|
-
validate(): boolean;
|
|
19
|
-
reportValidity(): boolean;
|
|
20
|
-
reset(): void;
|
|
21
|
-
saveResponse(value: string | string[]): void;
|
|
22
|
-
toggleCorrectResponse(show: boolean): void;
|
|
23
|
-
toggleCandidateCorrection(show: boolean): void;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare enum Correctness {
|
|
27
|
-
Correct = "correct",
|
|
28
|
-
PartiallyCorrect = "partially-correct",
|
|
29
|
-
Incorrect = "incorrect"
|
|
30
|
-
}
|
|
31
|
-
declare abstract class Interaction extends LitElement implements IInteraction {
|
|
32
|
-
private _context;
|
|
33
|
-
protected configContext: ConfigContext;
|
|
34
|
-
static formAssociated: boolean;
|
|
35
|
-
protected _internals: ElementInternals;
|
|
36
|
-
get internals(): ElementInternals;
|
|
37
|
-
responseIdentifier: string;
|
|
38
|
-
disabled: boolean;
|
|
39
|
-
readonly: boolean;
|
|
40
|
-
name: any;
|
|
41
|
-
/**
|
|
42
|
-
* The correct response for this interaction. Can be set as a comma-separated
|
|
43
|
-
* string via attribute or as string/string[] via property.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```html
|
|
47
|
-
* <qti-choice-interaction correct-response="A,B">
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
set correctResponseAttr(val: string | null);
|
|
51
|
-
get correctResponseAttr(): string | null;
|
|
52
|
-
/**
|
|
53
|
-
* Shows which choices are correct with inline indicators.
|
|
54
|
-
* Adds `correct-response` / `incorrect-response` states to choices.
|
|
55
|
-
*/
|
|
56
|
-
showCorrectResponse: boolean;
|
|
57
|
-
protected _handleShowCorrectResponseChange: (_: boolean, show: boolean) => void;
|
|
58
|
-
/**
|
|
59
|
-
* Shows a cloned interaction with the correct answers filled in.
|
|
60
|
-
* Creates a disabled copy positioned after this interaction.
|
|
61
|
-
*/
|
|
62
|
-
showFullCorrectResponse: boolean;
|
|
63
|
-
protected _handleShowFullCorrectResponseChange: (_: boolean, show: boolean) => void;
|
|
64
|
-
/**
|
|
65
|
-
* Shows feedback on candidate's selections compared to correct response.
|
|
66
|
-
* Adds `candidate-correct` / `candidate-incorrect` states to choices.
|
|
67
|
-
*/
|
|
68
|
-
showCandidateCorrection: boolean;
|
|
69
|
-
protected _handleShowCandidateCorrectionChange: (_: boolean, show: boolean) => void;
|
|
70
|
-
protected _isFullCorrectResponse: boolean;
|
|
71
|
-
get isFullCorrectResponse(): Readonly<boolean>;
|
|
72
|
-
set isFullCorrectResponse(val: Readonly<boolean>);
|
|
73
|
-
protected _correctResponse: string | string[] | null;
|
|
74
|
-
/**
|
|
75
|
-
* Get/set correct response programmatically.
|
|
76
|
-
* This property syncs with the `correct-response` attribute.
|
|
77
|
-
*/
|
|
78
|
-
get correctResponse(): Readonly<string | string[] | null>;
|
|
79
|
-
set correctResponse(val: Readonly<string | string[] | null>);
|
|
80
|
-
/**
|
|
81
|
-
* Returns the correctness of the current response compared to correct response.
|
|
82
|
-
* Works in both standalone mode (using `correct-response` attribute) and
|
|
83
|
-
* item context mode (using responseVariable).
|
|
84
|
-
*/
|
|
85
|
-
get correctness(): Readonly<Correctness | null>;
|
|
86
|
-
get isInline(): boolean;
|
|
87
|
-
get responseVariable(): ResponseVariable | undefined;
|
|
88
|
-
toggleCorrectResponse(show: boolean): void;
|
|
89
|
-
protected toggleFullCorrectResponse(show: boolean): Promise<void>;
|
|
90
|
-
protected toggleInternalCorrectResponse(show: boolean): void;
|
|
91
|
-
toggleCandidateCorrection(show: boolean): void;
|
|
92
|
-
constructor();
|
|
93
|
-
abstract validate(): boolean;
|
|
94
|
-
get value(): string | null;
|
|
95
|
-
set value(val: string | null);
|
|
96
|
-
abstract get response(): string | string[] | null;
|
|
97
|
-
abstract set response(val: string | string[] | null);
|
|
98
|
-
reportValidity(): boolean;
|
|
99
|
-
reset(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Called by the browser when the associated form is reset.
|
|
102
|
-
* Part of the Form-Associated Custom Elements API.
|
|
103
|
-
*/
|
|
104
|
-
formResetCallback(): void;
|
|
105
|
-
connectedCallback(): void;
|
|
106
|
-
protected firstUpdated(): void;
|
|
107
|
-
saveResponse(value: string | string[], state?: string | null): void;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export { Correctness as C, type IInteraction as I, Interaction as a };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { V as VariableDeclaration } from './variables-CMYcDbyW.js';
|
|
2
|
-
|
|
3
|
-
interface ItemContext {
|
|
4
|
-
identifier?: string;
|
|
5
|
-
href?: string;
|
|
6
|
-
variables?: ReadonlyArray<VariableDeclaration<string | string[] | null>>;
|
|
7
|
-
/**
|
|
8
|
-
* Optional per-interaction opaque state, keyed by responseIdentifier.
|
|
9
|
-
* Used for interactions that support state save/restore (e.g. PCI).
|
|
10
|
-
*/
|
|
11
|
-
state?: Record<string, string | null>;
|
|
12
|
-
}
|
|
13
|
-
declare const itemContextVariables: VariableDeclaration<string | string[]>[];
|
|
14
|
-
|
|
15
|
-
export { type ItemContext as I, itemContextVariables as i };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as lit from 'lit';
|
|
2
|
-
import { LitElement } from 'lit';
|
|
3
|
-
import { Q as QtiContext, a as QtiContextType } from './qti.context-B8PSyIWm.js';
|
|
4
|
-
import { f as ResponseVariable, V as VariableDeclaration } from './variables-CMYcDbyW.js';
|
|
5
|
-
import { I as ItemContext } from './item.context-CkUeDcaO.js';
|
|
6
|
-
|
|
7
|
-
interface QtiExpressionBase<T> {
|
|
8
|
-
calculate(): Readonly<T>;
|
|
9
|
-
}
|
|
10
|
-
declare abstract class QtiExpression<T> extends LitElement implements QtiExpressionBase<T> {
|
|
11
|
-
protected result: any;
|
|
12
|
-
static styles: lit.CSSResult;
|
|
13
|
-
render(): lit.TemplateResult<1>;
|
|
14
|
-
calculate(): Readonly<T>;
|
|
15
|
-
protected getResult(): Readonly<T>;
|
|
16
|
-
protected context?: ItemContext;
|
|
17
|
-
protected qtiContext?: QtiContext;
|
|
18
|
-
getVariables: () => (ResponseVariable | VariableDeclaration<QtiContextType>)[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare abstract class QtiConditionExpression extends QtiExpression<boolean> {
|
|
22
|
-
calculate(): Readonly<boolean>;
|
|
23
|
-
getResult(): Readonly<boolean>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { QtiConditionExpression as Q, QtiExpression as a, type QtiExpressionBase as b };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as lit from 'lit';
|
|
2
|
-
import { LitElement } from 'lit';
|
|
3
|
-
import { a as Cardinality } from './variables-CMYcDbyW.js';
|
|
4
|
-
|
|
5
|
-
declare abstract class QtiVariableDeclaration extends LitElement {
|
|
6
|
-
render(): lit.TemplateResult<1>;
|
|
7
|
-
protected defaultValues(cardinality: Cardinality): string | string[];
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare abstract class QtiFeedback extends LitElement {
|
|
11
|
-
#private;
|
|
12
|
-
protected showHide: 'show' | 'hide';
|
|
13
|
-
outcomeIdentifier: string;
|
|
14
|
-
protected identifier: string;
|
|
15
|
-
showStatus: string;
|
|
16
|
-
private _context?;
|
|
17
|
-
connectedCallback(): void;
|
|
18
|
-
checkShowFeedback(outcomeIdentifier: string): void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { QtiFeedback as Q, QtiVariableDeclaration as a };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Interface for any object that can process QTI rules
|
|
5
|
-
*/
|
|
6
|
-
interface QtiRuleBase {
|
|
7
|
-
process(): any;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Abstract base class for QTI rule DOM elements
|
|
11
|
-
*/
|
|
12
|
-
declare abstract class QtiRuleElement extends LitElement implements QtiRuleBase {
|
|
13
|
-
abstract process(): any;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { type QtiRuleBase as Q, QtiRuleElement as a };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
interface ModuleResolutionConfig {
|
|
2
|
-
waitSeconds?: number;
|
|
3
|
-
context?: string;
|
|
4
|
-
catchError?: boolean;
|
|
5
|
-
urlArgs?: string;
|
|
6
|
-
paths: {
|
|
7
|
-
[key: string]: string | string[];
|
|
8
|
-
};
|
|
9
|
-
shim?: {
|
|
10
|
-
[key: string]: {
|
|
11
|
-
deps?: string[];
|
|
12
|
-
exports?: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
type LoadOptions = {
|
|
17
|
-
signal?: AbortSignal;
|
|
18
|
-
/** Whether to auto-run `shuffleInteractions()` after loading. Defaults to `true` for backwards compatibility. */
|
|
19
|
-
shuffle?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type transformItemApi = {
|
|
22
|
-
load: (uri: string, opts?: AbortSignal | LoadOptions) => Promise<transformItemApi>;
|
|
23
|
-
parse: (xmlString: string) => transformItemApi;
|
|
24
|
-
path: (location: string) => transformItemApi;
|
|
25
|
-
fn: (fn: (xmlFragment: XMLDocument) => void) => transformItemApi;
|
|
26
|
-
pciHooks: (uri: string) => transformItemApi;
|
|
27
|
-
configurePci: (baseUrl: string, getModuleResolutionConfig: (baseUrl: string, fileUrl: string) => Promise<ModuleResolutionConfig>, selector?: string) => Promise<transformItemApi>;
|
|
28
|
-
extendElementName: (elementName: string, extend: string) => transformItemApi;
|
|
29
|
-
extendElementsWithClass: (param?: string) => transformItemApi;
|
|
30
|
-
customInteraction: (baseRef: string, baseItem: string) => transformItemApi;
|
|
31
|
-
convertCDATAtoComment: () => transformItemApi;
|
|
32
|
-
shuffleInteractions: () => transformItemApi;
|
|
33
|
-
stripStyleSheets: () => transformItemApi;
|
|
34
|
-
html: () => string;
|
|
35
|
-
xml: () => string;
|
|
36
|
-
htmlDoc: () => DocumentFragment;
|
|
37
|
-
xmlDoc: () => XMLDocument;
|
|
38
|
-
};
|
|
39
|
-
declare const qtiTransformItem: (cache?: boolean) => transformItemApi;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Returns an object with methods to load, parse and transform QTI tests.
|
|
43
|
-
* @returns An object with methods to load, parse and transform QTI tests.
|
|
44
|
-
* @example
|
|
45
|
-
* const qtiTransformer = qtiTransformTest();
|
|
46
|
-
* await qtiTransformer.load('https://example.com/test.xml');
|
|
47
|
-
* const items = qtiTransformer.items();
|
|
48
|
-
* const html = qtiTransformer.html();
|
|
49
|
-
* const xml = qtiTransformer.xml();
|
|
50
|
-
*/
|
|
51
|
-
type transformTestApi = {
|
|
52
|
-
load: (uri: string, signal?: AbortSignal) => Promise<transformTestApi>;
|
|
53
|
-
parse: (xmlString: string) => transformTestApi;
|
|
54
|
-
path: (location: string) => transformTestApi;
|
|
55
|
-
fn: (fn: (xmlFragment: XMLDocument) => void) => transformTestApi;
|
|
56
|
-
items: () => {
|
|
57
|
-
identifier: string;
|
|
58
|
-
href: string;
|
|
59
|
-
category: string;
|
|
60
|
-
}[];
|
|
61
|
-
html: () => string;
|
|
62
|
-
xml: () => string;
|
|
63
|
-
htmlDoc: () => DocumentFragment;
|
|
64
|
-
xmlDoc: () => XMLDocument;
|
|
65
|
-
};
|
|
66
|
-
declare const qtiTransformTest: () => transformTestApi;
|
|
67
|
-
|
|
68
|
-
export { type LoadOptions as L, type ModuleResolutionConfig as M, qtiTransformTest as a, type transformTestApi as b, qtiTransformItem as q, type transformItemApi as t };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
type QtiContextType = {
|
|
2
|
-
testIdentifier: string;
|
|
3
|
-
candidateIdentifier: string;
|
|
4
|
-
environmentIdentifier: string;
|
|
5
|
-
[key: string]: string | string[];
|
|
6
|
-
};
|
|
7
|
-
interface QtiContext {
|
|
8
|
-
QTI_CONTEXT: QtiContextType;
|
|
9
|
-
}
|
|
10
|
-
declare const qtiContext: {
|
|
11
|
-
__context__: Readonly<QtiContext>;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { type QtiContext as Q, type QtiContextType as a, qtiContext as q };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { I as ItemContext } from './item.context-CkUeDcaO.js';
|
|
2
|
-
import { V as VariableDeclaration } from './variables-CMYcDbyW.js';
|
|
3
|
-
|
|
4
|
-
interface TestContext {
|
|
5
|
-
items: (ItemContext & {
|
|
6
|
-
category?: string;
|
|
7
|
-
})[];
|
|
8
|
-
testOutcomeVariables?: VariableDeclaration<string | string[] | null>[];
|
|
9
|
-
}
|
|
10
|
-
declare const INITIAL_TEST_CONTEXT: Readonly<TestContext>;
|
|
11
|
-
declare const testContext: {
|
|
12
|
-
__context__: Readonly<TestContext>;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export { INITIAL_TEST_CONTEXT as I, type TestContext as T, testContext as t };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
interface directedPair {
|
|
2
|
-
destination: string;
|
|
3
|
-
source: string;
|
|
4
|
-
}
|
|
5
|
-
interface ResponseInteraction {
|
|
6
|
-
responseIdentifier: string;
|
|
7
|
-
response: string | string[];
|
|
8
|
-
state?: string | null;
|
|
9
|
-
}
|
|
10
|
-
interface Calculate {
|
|
11
|
-
calculate: () => string | string[];
|
|
12
|
-
}
|
|
13
|
-
type float = number;
|
|
14
|
-
type integer = number;
|
|
15
|
-
type BaseType = 'boolean' | 'directedPair' | 'duration' | 'float' | 'integer' | 'string' | 'identifier' | 'pair' | 'record';
|
|
16
|
-
type Multiple = string | string[][];
|
|
17
|
-
type Ordered = string | string[][];
|
|
18
|
-
type Cardinality = 'multiple' | 'ordered' | 'single' | 'record';
|
|
19
|
-
|
|
20
|
-
type QtiAreaMapping = {
|
|
21
|
-
defaultValue: number;
|
|
22
|
-
lowerBound?: number;
|
|
23
|
-
upperBound?: number;
|
|
24
|
-
areaMapEntries: QtiAreaMapEntry[];
|
|
25
|
-
};
|
|
26
|
-
type QtiAreaMapEntry = {
|
|
27
|
-
shape: areaShape;
|
|
28
|
-
coords: string;
|
|
29
|
-
mappedValue: number;
|
|
30
|
-
defaultValue: number;
|
|
31
|
-
};
|
|
32
|
-
type QtiMapping = {
|
|
33
|
-
defaultValue: number;
|
|
34
|
-
lowerBound?: number;
|
|
35
|
-
upperBound?: number;
|
|
36
|
-
mapEntries: QtiMapEntry[];
|
|
37
|
-
};
|
|
38
|
-
type QtiMapEntry = {
|
|
39
|
-
mapKey: string;
|
|
40
|
-
mappedValue: number;
|
|
41
|
-
caseSensitive: boolean;
|
|
42
|
-
};
|
|
43
|
-
type areaShape = 'default' | 'circle' | 'rect' | 'ellipse' | 'poly';
|
|
44
|
-
interface VariableValue<T> {
|
|
45
|
-
identifier: string;
|
|
46
|
-
value: Readonly<T>;
|
|
47
|
-
defaultValue?: T | null;
|
|
48
|
-
type: 'outcome' | 'response' | 'context' | 'template';
|
|
49
|
-
}
|
|
50
|
-
interface VariableDeclaration<T> extends VariableValue<T> {
|
|
51
|
-
cardinality?: Cardinality;
|
|
52
|
-
baseType?: BaseType;
|
|
53
|
-
}
|
|
54
|
-
interface OutcomeVariable extends VariableDeclaration<string | string[] | null> {
|
|
55
|
-
interpolationTable?: Map<number, number>;
|
|
56
|
-
externalScored?: 'human' | 'externalMachine' | null;
|
|
57
|
-
}
|
|
58
|
-
interface ResponseVariable extends VariableDeclaration<string | string[] | null> {
|
|
59
|
-
candidateResponse?: string | string[] | null;
|
|
60
|
-
mapping?: QtiMapping;
|
|
61
|
-
areaMapping?: QtiAreaMapping;
|
|
62
|
-
correctResponse?: string | string[] | null;
|
|
63
|
-
}
|
|
64
|
-
interface TemplateVariable extends VariableDeclaration<string | string[] | number | boolean | null> {
|
|
65
|
-
type: 'template';
|
|
66
|
-
mathVariable?: boolean;
|
|
67
|
-
paramVariable?: boolean;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export type { BaseType as B, Calculate as C, Multiple as M, Ordered as O, QtiAreaMapEntry as Q, ResponseInteraction as R, TemplateVariable as T, VariableDeclaration as V, Cardinality as a, OutcomeVariable as b, QtiAreaMapping as c, QtiMapEntry as d, QtiMapping as e, ResponseVariable as f, VariableValue as g, areaShape as h, directedPair as i, float as j, integer as k };
|
|
File without changes
|
|
File without changes
|