@citolab/qti-components 7.14.3 → 7.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +4044 -4030
- package/custom-elements.json +10478 -26460
- package/dist/base.d.ts +8 -0
- package/dist/base.js +50 -0
- package/dist/{chunks/chunk-DGBI4IU5.js → chunk-2DOYPVF5.js} +252 -136
- package/dist/chunk-2DOYPVF5.js.map +1 -0
- package/dist/chunk-2ZEJ3RR5.js +89 -0
- package/dist/chunk-2ZEJ3RR5.js.map +1 -0
- package/dist/{chunks/chunk-E4GR4K26.js → chunk-352OTVTY.js} +1481 -442
- package/dist/chunk-352OTVTY.js.map +1 -0
- package/dist/{chunks/chunk-C4ELTNV7.js → chunk-C2HQFI2C.js} +857 -3819
- package/dist/chunk-C2HQFI2C.js.map +1 -0
- package/dist/chunk-DWIRLYDS.js +20 -0
- package/dist/chunk-DWIRLYDS.js.map +1 -0
- package/dist/{chunks/chunk-H2JE6IVU.js → chunk-EUXUH3YW.js} +1 -1
- package/dist/chunk-F44CI35W.js +145 -0
- package/dist/chunk-F44CI35W.js.map +1 -0
- package/dist/{chunks/chunk-XBPO6E25.js → chunk-INKI27D5.js} +6 -5
- package/dist/chunk-INKI27D5.js.map +1 -0
- package/dist/chunk-JEUY3MYB.js +2010 -0
- package/dist/chunk-JEUY3MYB.js.map +1 -0
- package/dist/chunk-O4XIWHTF.js +1139 -0
- package/dist/chunk-O4XIWHTF.js.map +1 -0
- package/dist/chunk-RI47B4ZT.js +1753 -0
- package/dist/chunk-RI47B4ZT.js.map +1 -0
- package/dist/{qti-loader/index.js → chunk-VEV4DGPH.js} +6 -6
- package/dist/chunk-VEV4DGPH.js.map +1 -0
- package/dist/{chunks/chunk-TN75CWLX.js → chunk-W4SQRNWO.js} +97 -2
- package/dist/chunk-W4SQRNWO.js.map +1 -0
- package/dist/elements.d.ts +1 -0
- package/dist/elements.js +42 -0
- package/dist/index.d.ts +8 -24
- package/dist/index.js +117 -285
- package/dist/index.js.map +1 -1
- package/dist/interactions.d.ts +1 -0
- package/dist/interactions.js +72 -0
- package/dist/item.d.ts +1 -0
- package/dist/item.js +23 -0
- package/dist/loader.d.ts +1 -0
- package/dist/loader.js +11 -0
- package/dist/processing.d.ts +1 -0
- package/dist/processing.js +103 -0
- package/dist/qti-components-jsx.d.ts +1475 -2388
- package/dist/test.d.ts +1 -0
- package/dist/{qti-test/index.js → test.js} +11 -19
- package/dist/transformers.d.ts +1 -0
- package/dist/{qti-transformers/index.js → transformers.js} +3 -3
- package/dist/vscode.html-custom-data.json +469 -631
- package/package.json +67 -164
- package/dist/chunks/chunk-4OGJBG35.js +0 -8
- package/dist/chunks/chunk-4OGJBG35.js.map +0 -1
- package/dist/chunks/chunk-AGV5GOTF.js +0 -234
- package/dist/chunks/chunk-AGV5GOTF.js.map +0 -1
- package/dist/chunks/chunk-BHJSX3Q6.js +0 -8
- package/dist/chunks/chunk-BHJSX3Q6.js.map +0 -1
- package/dist/chunks/chunk-C4ELTNV7.js.map +0 -1
- package/dist/chunks/chunk-C5RLRG3L.js +0 -10
- package/dist/chunks/chunk-C5RLRG3L.js.map +0 -1
- package/dist/chunks/chunk-CJADUWEC.js +0 -10
- package/dist/chunks/chunk-CJADUWEC.js.map +0 -1
- package/dist/chunks/chunk-DGBI4IU5.js.map +0 -1
- package/dist/chunks/chunk-DVQQ7I6Y.js +0 -8
- package/dist/chunks/chunk-DVQQ7I6Y.js.map +0 -1
- package/dist/chunks/chunk-E4GR4K26.js.map +0 -1
- package/dist/chunks/chunk-ELDMXTUQ.js +0 -31
- package/dist/chunks/chunk-ELDMXTUQ.js.map +0 -1
- package/dist/chunks/chunk-GAAFN7QF.js +0 -146
- package/dist/chunks/chunk-GAAFN7QF.js.map +0 -1
- package/dist/chunks/chunk-H6KHXSIO.js +0 -8
- package/dist/chunks/chunk-H6KHXSIO.js.map +0 -1
- package/dist/chunks/chunk-JQ6HWGRY.js +0 -22
- package/dist/chunks/chunk-JQ6HWGRY.js.map +0 -1
- package/dist/chunks/chunk-NJNQOQUU.js +0 -8
- package/dist/chunks/chunk-NJNQOQUU.js.map +0 -1
- package/dist/chunks/chunk-P4QBOVQ2.js +0 -206
- package/dist/chunks/chunk-P4QBOVQ2.js.map +0 -1
- package/dist/chunks/chunk-SV4K25ZI.js +0 -19
- package/dist/chunks/chunk-SV4K25ZI.js.map +0 -1
- package/dist/chunks/chunk-TN75CWLX.js.map +0 -1
- package/dist/chunks/chunk-XBPO6E25.js.map +0 -1
- package/dist/exports/computed-item.context.d.ts +0 -23
- package/dist/exports/computed-item.context.js +0 -8
- package/dist/exports/computed.context.d.ts +0 -34
- package/dist/exports/computed.context.js +0 -8
- package/dist/exports/config.context.d.ts +0 -14
- package/dist/exports/config.context.js +0 -8
- package/dist/exports/expression-result.d.ts +0 -19
- package/dist/exports/expression-result.js +0 -1
- package/dist/exports/interaction.d.ts +0 -46
- package/dist/exports/interaction.interface.d.ts +0 -13
- package/dist/exports/interaction.interface.js +0 -1
- package/dist/exports/interaction.js +0 -12
- package/dist/exports/item.context.d.ts +0 -11
- package/dist/exports/item.context.js +0 -8
- package/dist/exports/qti-assessment-item.context.d.ts +0 -9
- package/dist/exports/qti-assessment-item.context.js +0 -8
- package/dist/exports/qti-condition-expression.d.ts +0 -14
- package/dist/exports/qti-condition-expression.js +0 -11
- package/dist/exports/qti-condition-expression.js.map +0 -1
- package/dist/exports/qti-expression.d.ts +0 -23
- package/dist/exports/qti-expression.js +0 -10
- package/dist/exports/qti-expression.js.map +0 -1
- package/dist/exports/qti-test.d.ts +0 -12
- package/dist/exports/qti-test.js +0 -1
- package/dist/exports/qti-test.js.map +0 -1
- package/dist/exports/qti.context.d.ts +0 -14
- package/dist/exports/qti.context.js +0 -8
- package/dist/exports/qti.context.js.map +0 -1
- package/dist/exports/session.context.d.ts +0 -15
- package/dist/exports/session.context.js +0 -10
- package/dist/exports/session.context.js.map +0 -1
- package/dist/exports/test.context.d.ts +0 -16
- package/dist/exports/test.context.js +0 -10
- package/dist/exports/test.context.js.map +0 -1
- package/dist/exports/variables.d.ts +0 -2
- package/dist/exports/variables.js +0 -1
- package/dist/exports/variables.js.map +0 -1
- package/dist/qti-assessment-item-l-mN3teH.d.ts +0 -105
- package/dist/qti-components/index.d.ts +0 -1524
- package/dist/qti-components/index.js +0 -216
- package/dist/qti-components/index.js.map +0 -1
- package/dist/qti-item/index.d.ts +0 -114
- package/dist/qti-item/index.js +0 -19
- package/dist/qti-item/index.js.map +0 -1
- package/dist/qti-loader/index.d.ts +0 -21
- package/dist/qti-loader/index.js.map +0 -1
- package/dist/qti-modal-feedback-Cp3CHVKw.d.ts +0 -30
- package/dist/qti-test/index.d.ts +0 -480
- package/dist/qti-test/index.js.map +0 -1
- package/dist/qti-test-mmY8zNIj.d.ts +0 -120
- package/dist/qti-transform-test-Bz9A3hmD.d.ts +0 -63
- package/dist/qti-transformers/index.d.ts +0 -18
- package/dist/qti-transformers/index.js.map +0 -1
- package/dist/variables-BCkyLoXK.d.ts +0 -55
- package/readme.md +0 -59
- /package/dist/{chunks/chunk-H2JE6IVU.js.map → base.js.map} +0 -0
- /package/dist/{exports/computed-item.context.js.map → chunk-EUXUH3YW.js.map} +0 -0
- /package/dist/{exports/computed.context.js.map → elements.js.map} +0 -0
- /package/dist/{exports/config.context.js.map → interactions.js.map} +0 -0
- /package/dist/{exports/expression-result.js.map → item.js.map} +0 -0
- /package/dist/{exports/interaction.interface.js.map → loader.js.map} +0 -0
- /package/dist/{exports/interaction.js.map → processing.js.map} +0 -0
- /package/dist/{exports/item.context.js.map → test.js.map} +0 -0
- /package/dist/{exports/qti-assessment-item.context.js.map → transformers.js.map} +0 -0
package/dist/qti-test/index.d.ts
DELETED
|
@@ -1,480 +0,0 @@
|
|
|
1
|
-
import * as lit_html from 'lit-html';
|
|
2
|
-
import { e as VariableValue, O as OutcomeVariable, V as VariableDeclaration } from '../variables-BCkyLoXK.js';
|
|
3
|
-
import * as lit from 'lit';
|
|
4
|
-
import { LitElement, PropertyValues, nothing } from 'lit';
|
|
5
|
-
import { SessionContext, View } from '../exports/session.context.js';
|
|
6
|
-
import { b as QtiAssessmentTest, I as IQtiTest } from '../qti-test-mmY8zNIj.js';
|
|
7
|
-
export { Q as QtiAssessmentItemRef, a as QtiAssessmentSection, d as QtiTestFeedback, c as QtiTestPart } from '../qti-test-mmY8zNIj.js';
|
|
8
|
-
import { TestContext } from '../exports/test.context.js';
|
|
9
|
-
export { INITIAL_TEST_CONTEXT, testContext } from '../exports/test.context.js';
|
|
10
|
-
import { QtiContext } from '../exports/qti.context.js';
|
|
11
|
-
import { ComputedContext, ComputedItem } from '../exports/computed.context.js';
|
|
12
|
-
import { ConfigContext } from '../exports/config.context.js';
|
|
13
|
-
import { TemplateFunction } from '@heximal/templates';
|
|
14
|
-
import '../exports/expression-result.js';
|
|
15
|
-
import '../qti-transform-test-Bz9A3hmD.js';
|
|
16
|
-
import '../qti-assessment-item-l-mN3teH.js';
|
|
17
|
-
import '../qti-modal-feedback-Cp3CHVKw.js';
|
|
18
|
-
import '../exports/item.context.js';
|
|
19
|
-
import '../exports/computed-item.context.js';
|
|
20
|
-
|
|
21
|
-
declare abstract class TestBase extends LitElement {
|
|
22
|
-
testContext: Readonly<TestContext>;
|
|
23
|
-
sessionContext: Readonly<SessionContext>;
|
|
24
|
-
protected _testElement: QtiAssessmentTest;
|
|
25
|
-
updateItemVariables(itemRefID: string, variables: VariableValue<string | string[] | null>[]): void;
|
|
26
|
-
constructor();
|
|
27
|
-
private _updateItemVariablesInTestContext;
|
|
28
|
-
/**
|
|
29
|
-
* Updates the variables of an assessment item in the test context.
|
|
30
|
-
* - Matches the assessment item with the corresponding test context item.
|
|
31
|
-
* - If the item is not found, logs a warning.
|
|
32
|
-
* - Updates variables in the test context if exactly one variable exists.
|
|
33
|
-
* - Otherwise, syncs the assessment item's variables with the test context.
|
|
34
|
-
*
|
|
35
|
-
* @param assessmentItem - The assessment item to update.
|
|
36
|
-
*/
|
|
37
|
-
private _updateItemInTestContext;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare const QtiTest_base: (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => {
|
|
41
|
-
updateOutcomeVariable(identifier: string, value: string | string[] | undefined): void;
|
|
42
|
-
getOutcome(identifier: string): Readonly<OutcomeVariable>;
|
|
43
|
-
getVariable(identifier: string): Readonly<VariableDeclaration<string | string[] | null>>;
|
|
44
|
-
outcomeProcessing(): boolean;
|
|
45
|
-
}) & typeof TestBase;
|
|
46
|
-
/**
|
|
47
|
-
* `<qti-test>` is a custom element designed for rendering and interacting with QTI (Question and Test Interoperability) tests.
|
|
48
|
-
*
|
|
49
|
-
* This component leverages several mixins to provide functionality for loading, navigating, processing, and displaying QTI test assessments.
|
|
50
|
-
*
|
|
51
|
-
* ### Example Usage
|
|
52
|
-
*
|
|
53
|
-
* Minimal example including navigation:
|
|
54
|
-
*
|
|
55
|
-
* ```html
|
|
56
|
-
* <qti-test>
|
|
57
|
-
* <test-navigation>
|
|
58
|
-
* <test-container test-url="./path/to/assessment.xml"></test-container>
|
|
59
|
-
* <nav class="flex">
|
|
60
|
-
* <test-prev></test-prev>
|
|
61
|
-
* <test-next></test-next>
|
|
62
|
-
* </nav>
|
|
63
|
-
* </test-navigation>
|
|
64
|
-
* </qti-test>
|
|
65
|
-
* ```
|
|
66
|
-
*
|
|
67
|
-
* Use the following file structure
|
|
68
|
-
* A qti-test loads a QTI3.0 assessmenttest.xml file from a package folder.
|
|
69
|
-
*
|
|
70
|
-
* ```plaintext
|
|
71
|
-
* Root/
|
|
72
|
-
* ├── index.html
|
|
73
|
-
* └── /assets/api/examples/
|
|
74
|
-
* ├── assessmenttest.xml
|
|
75
|
-
* └── imsmanifest.xml
|
|
76
|
-
*
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* ### Test components
|
|
80
|
-
*
|
|
81
|
-
* Use test components inside the qti-test component for added functionality.
|
|
82
|
-
* ### Test next
|
|
83
|
-
* `<test-next> | TestNext`
|
|
84
|
-
*
|
|
85
|
-
* ### Test prev
|
|
86
|
-
*
|
|
87
|
-
* `<test-prev> | TestPrev`
|
|
88
|
-
* ### Test components
|
|
89
|
-
*
|
|
90
|
-
* You can use normal class names to style the elements.
|
|
91
|
-
* And you can use the `test-prev` and `test-next` elements to navigate through the test.
|
|
92
|
-
*
|
|
93
|
-
*/
|
|
94
|
-
declare class QtiTest extends QtiTest_base implements IQtiTest {
|
|
95
|
-
/**
|
|
96
|
-
* Renders the component's template.
|
|
97
|
-
* Provides a default `<slot>` for content projection.
|
|
98
|
-
*/
|
|
99
|
-
connectedCallback(): Promise<void>;
|
|
100
|
-
render(): lit_html.TemplateResult<1>;
|
|
101
|
-
}
|
|
102
|
-
declare global {
|
|
103
|
-
interface HTMLElementTagNameMap {
|
|
104
|
-
'qti-test': QtiTest;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
type CustomEventMap = {
|
|
109
|
-
'test-end-attempt': CustomEvent;
|
|
110
|
-
'test-show-correct-response': CustomEvent<{
|
|
111
|
-
value: boolean;
|
|
112
|
-
}>;
|
|
113
|
-
};
|
|
114
|
-
declare global {
|
|
115
|
-
interface GlobalEventHandlersEventMap extends CustomEventMap {
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
declare class TestNavigation extends LitElement {
|
|
119
|
-
identifier: any;
|
|
120
|
-
initContext: {
|
|
121
|
-
identifier: string;
|
|
122
|
-
[key: string]: any;
|
|
123
|
-
}[];
|
|
124
|
-
qtiContext: QtiContext;
|
|
125
|
-
configContext: ConfigContext;
|
|
126
|
-
protected _testContext?: TestContext;
|
|
127
|
-
protected _sessionContext?: SessionContext;
|
|
128
|
-
protected computedContext: ComputedContext;
|
|
129
|
-
autoScoreItems: boolean;
|
|
130
|
-
private _testElement;
|
|
131
|
-
constructor();
|
|
132
|
-
/**
|
|
133
|
-
* Handles the 'test-end-attempt' event.
|
|
134
|
-
* @private
|
|
135
|
-
* @listens TestNavigation#test-end-attempt
|
|
136
|
-
* @param {CustomEvent} event - The custom event object.
|
|
137
|
-
*/
|
|
138
|
-
private _handleTestEndAttempt;
|
|
139
|
-
/**
|
|
140
|
-
* Handles the 'test-show-correct-response' event.
|
|
141
|
-
* @private
|
|
142
|
-
* @listens TestNavigation#test-show-correct-response
|
|
143
|
-
* @param {CustomEvent} event - The custom event object.
|
|
144
|
-
*/
|
|
145
|
-
private _handleTestShowCorrectResponse;
|
|
146
|
-
/**
|
|
147
|
-
* Handles the 'test-show-candidate-correction' event.
|
|
148
|
-
* @private
|
|
149
|
-
* @listens TestNavigation#test-show-candidate-correction
|
|
150
|
-
* @param {CustomEvent} event - The custom event object.
|
|
151
|
-
*/
|
|
152
|
-
private _handleTestShowCandidateCorrection;
|
|
153
|
-
private _handleTestUpdateOutcomeVariable;
|
|
154
|
-
private _handleInteractionChanged;
|
|
155
|
-
render(): lit_html.TemplateResult<1>;
|
|
156
|
-
private _handleTestConnected;
|
|
157
|
-
/**
|
|
158
|
-
* Extract default values from a qti-context-declaration element
|
|
159
|
-
*/
|
|
160
|
-
private _extractDefaultValues;
|
|
161
|
-
private _handleItemConnected;
|
|
162
|
-
protected willUpdate(_changedProperties: PropertyValues): void;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Represents a custom element for navigating to the next test item.
|
|
167
|
-
*
|
|
168
|
-
* @remarks
|
|
169
|
-
* This element provides functionality for navigating to the next test item.
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* ```html
|
|
173
|
-
* <test-next></test-next>
|
|
174
|
-
* ```
|
|
175
|
-
*/
|
|
176
|
-
declare class TestNext extends LitElement {
|
|
177
|
-
_internalDisabled: boolean;
|
|
178
|
-
protected computedContext: ComputedContext;
|
|
179
|
-
sectionItems: ComputedItem[];
|
|
180
|
-
itemIndex: number;
|
|
181
|
-
_handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext): void;
|
|
182
|
-
static styles: lit.CSSResult;
|
|
183
|
-
private _internals;
|
|
184
|
-
constructor();
|
|
185
|
-
connectedCallback(): void;
|
|
186
|
-
willUpdate(_changedProperties: Map<string | number | symbol, unknown>): void;
|
|
187
|
-
checkDisabled(): void;
|
|
188
|
-
protected _requestItem(identifier: string): void;
|
|
189
|
-
render(): lit_html.TemplateResult<1>;
|
|
190
|
-
}
|
|
191
|
-
declare global {
|
|
192
|
-
interface HTMLElementTagNameMap {
|
|
193
|
-
'test-next': TestNext;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Represents a custom element for navigating to the previous test item.
|
|
199
|
-
*
|
|
200
|
-
* @remarks
|
|
201
|
-
* This element provides functionality for navigating to the previous test item.
|
|
202
|
-
*
|
|
203
|
-
* @example
|
|
204
|
-
* ```html
|
|
205
|
-
* <test-prev></test-prev>
|
|
206
|
-
* ```
|
|
207
|
-
*/
|
|
208
|
-
declare class TestPrev extends LitElement {
|
|
209
|
-
_internalDisabled: boolean;
|
|
210
|
-
private computedContext;
|
|
211
|
-
sectionItems: ComputedItem[];
|
|
212
|
-
itemIndex: number;
|
|
213
|
-
_handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext): void;
|
|
214
|
-
static styles: lit.CSSResult;
|
|
215
|
-
constructor();
|
|
216
|
-
willUpdate(_changedProperties: Map<string | number | symbol, unknown>): void;
|
|
217
|
-
checkDisabled(): void;
|
|
218
|
-
protected _requestItem(identifier: string): void;
|
|
219
|
-
render(): lit_html.TemplateResult<1>;
|
|
220
|
-
}
|
|
221
|
-
declare global {
|
|
222
|
-
interface HTMLElementTagNameMap {
|
|
223
|
-
'test-previous': TestPrev;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
declare class TestView extends LitElement {
|
|
228
|
-
static DEFAULT_VIEW_OPTIONS: string[];
|
|
229
|
-
private sessionContext;
|
|
230
|
-
/** label accompanying the select view dropdown */
|
|
231
|
-
label: string;
|
|
232
|
-
/** The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor'] */
|
|
233
|
-
viewOptions: any;
|
|
234
|
-
protected _handleViewOptionsChange: () => void;
|
|
235
|
-
connectedCallback(): void;
|
|
236
|
-
private _viewOptions;
|
|
237
|
-
private updateViewOptions;
|
|
238
|
-
protected _switchView(view: string): void;
|
|
239
|
-
render(): lit_html.TemplateResult<1>;
|
|
240
|
-
}
|
|
241
|
-
declare global {
|
|
242
|
-
interface HTMLElementTagNameMap {
|
|
243
|
-
'test-view': TestView;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
declare class TestItemLink extends LitElement {
|
|
248
|
-
static styles: lit.CSSResult;
|
|
249
|
-
private itemId;
|
|
250
|
-
constructor();
|
|
251
|
-
protected _requestItem(identifier: string): void;
|
|
252
|
-
render(): lit_html.TemplateResult<1>;
|
|
253
|
-
}
|
|
254
|
-
declare global {
|
|
255
|
-
interface HTMLElementTagNameMap {
|
|
256
|
-
'test-item-link': TestItemLink;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
declare class TestEndAttempt extends LitElement {
|
|
261
|
-
static styles: lit.CSSResult;
|
|
262
|
-
constructor();
|
|
263
|
-
render(): lit_html.TemplateResult<1>;
|
|
264
|
-
}
|
|
265
|
-
declare global {
|
|
266
|
-
interface HTMLElementTagNameMap {
|
|
267
|
-
'test-end-attempt': TestEndAttempt;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* @deprecated test-show-correct-response is deprecated and will be removed in the future.
|
|
273
|
-
*/
|
|
274
|
-
declare class TestShowCorrectResponse extends LitElement {
|
|
275
|
-
computedContext?: ComputedContext;
|
|
276
|
-
static styles: lit.CSSResult;
|
|
277
|
-
shown: boolean;
|
|
278
|
-
disabled: boolean;
|
|
279
|
-
showCorrectText: string;
|
|
280
|
-
hideCorrectText: string;
|
|
281
|
-
noCorrectResponseText: string;
|
|
282
|
-
private _previousActiveItem?;
|
|
283
|
-
willUpdate(_changedProperties: Map<string | number | symbol, unknown>): void;
|
|
284
|
-
private _toggleState;
|
|
285
|
-
private _getDisplayedText;
|
|
286
|
-
render(): lit_html.TemplateResult<1>;
|
|
287
|
-
}
|
|
288
|
-
declare global {
|
|
289
|
-
interface HTMLElementTagNameMap {
|
|
290
|
-
'test-show-correct-response': TestShowCorrectResponse;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* @deprecated test-paging-buttons-stamp is deprecated and will be removed in the future.
|
|
296
|
-
*/
|
|
297
|
-
declare class TestPagingButtonsStamp extends LitElement {
|
|
298
|
-
private computedContext;
|
|
299
|
-
myTemplate: TemplateFunction;
|
|
300
|
-
private _internals;
|
|
301
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
302
|
-
constructor();
|
|
303
|
-
connectedCallback(): void;
|
|
304
|
-
render(): lit_html.TemplateResult<1>;
|
|
305
|
-
}
|
|
306
|
-
declare global {
|
|
307
|
-
interface HTMLElementTagNameMap {
|
|
308
|
-
'test-paging-buttons-stamp': TestPagingButtonsStamp;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* `<test-container>` is a custom element designed for hosting the qti-assessment-item.
|
|
314
|
-
* The `qti-assessment-test` will be placed inside the shadow DOM of this element.
|
|
315
|
-
* The element loads the test from the provided URL and renders it inside the shadow DOM.
|
|
316
|
-
*
|
|
317
|
-
* ```html
|
|
318
|
-
* <qti-test>
|
|
319
|
-
* <test-navigation>
|
|
320
|
-
* <test-container class="m-4 bg-white" test-url="./path/to/assessmenttest.xml"></test-container>
|
|
321
|
-
* </test-navigation>
|
|
322
|
-
* </qti-test>
|
|
323
|
-
* ```
|
|
324
|
-
*/
|
|
325
|
-
declare class TestContainer extends LitElement {
|
|
326
|
-
/** URL of the item to load */
|
|
327
|
-
testURL: string;
|
|
328
|
-
/** A parsed HTML document */
|
|
329
|
-
testDoc: DocumentFragment;
|
|
330
|
-
/** The raw XML string */
|
|
331
|
-
testXML: string;
|
|
332
|
-
/** Template content if provided */
|
|
333
|
-
private templateContent;
|
|
334
|
-
/** Callback function to transform the test after loading */
|
|
335
|
-
protected handleTestURLChange(): Promise<void>;
|
|
336
|
-
protected handleTestXMLChange(): void;
|
|
337
|
-
connectedCallback(): Promise<void>;
|
|
338
|
-
private initializeTemplateContent;
|
|
339
|
-
private applyStyles;
|
|
340
|
-
render(): lit_html.TemplateResult<1>;
|
|
341
|
-
}
|
|
342
|
-
declare global {
|
|
343
|
-
interface HTMLElementTagNameMap {
|
|
344
|
-
'test-container': TestContainer;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
declare class TestPrintVariables extends LitElement {
|
|
349
|
-
computedContext?: ComputedContext;
|
|
350
|
-
static styles: lit.CSSResult;
|
|
351
|
-
render(): lit_html.TemplateResult<1>;
|
|
352
|
-
}
|
|
353
|
-
declare global {
|
|
354
|
-
interface HTMLElementTagNameMap {
|
|
355
|
-
'test-print-item-variables': TestPrintVariables;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* @deprecated test-section-buttons-stamp is deprecated and will be removed in the future.
|
|
361
|
-
*/
|
|
362
|
-
declare class TestSectionButtonsStamp extends LitElement {
|
|
363
|
-
private computedContext;
|
|
364
|
-
myTemplate: TemplateFunction;
|
|
365
|
-
private _internals;
|
|
366
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
367
|
-
constructor();
|
|
368
|
-
connectedCallback(): void;
|
|
369
|
-
render(): lit_html.TemplateResult<1>;
|
|
370
|
-
}
|
|
371
|
-
declare global {
|
|
372
|
-
interface HTMLElementTagNameMap {
|
|
373
|
-
'test-section-buttons-stamp': TestSectionButtonsStamp;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
declare class TestSectionLink extends LitElement {
|
|
378
|
-
static styles: lit.CSSResult;
|
|
379
|
-
private sectionId;
|
|
380
|
-
private _requestItem;
|
|
381
|
-
constructor();
|
|
382
|
-
render(): lit_html.TemplateResult<1>;
|
|
383
|
-
}
|
|
384
|
-
declare global {
|
|
385
|
-
interface HTMLElementTagNameMap {
|
|
386
|
-
'test-section-link': TestSectionLink;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
declare class TestPrintContext extends LitElement {
|
|
391
|
-
computedContext?: ComputedContext;
|
|
392
|
-
render(): lit_html.TemplateResult<1>;
|
|
393
|
-
}
|
|
394
|
-
declare global {
|
|
395
|
-
interface HTMLElementTagNameMap {
|
|
396
|
-
'test-print-context': TestPrintContext;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* A custom web component that renders a test stamp using the Lit framework.
|
|
402
|
-
* This component is deprecated and will be removed in the future.
|
|
403
|
-
* @customElement
|
|
404
|
-
* @extends {LitElement}
|
|
405
|
-
*/
|
|
406
|
-
declare class TestStamp extends LitElement {
|
|
407
|
-
/**
|
|
408
|
-
* Indicates whether the component is in debug mode.
|
|
409
|
-
* When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.
|
|
410
|
-
*/
|
|
411
|
-
debug: boolean;
|
|
412
|
-
private computedContext;
|
|
413
|
-
private stampContext;
|
|
414
|
-
myTemplate: TemplateFunction;
|
|
415
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
416
|
-
connectedCallback(): void;
|
|
417
|
-
protected willUpdate(_changedProperties: PropertyValues): void;
|
|
418
|
-
render(): lit_html.TemplateResult<1>;
|
|
419
|
-
}
|
|
420
|
-
declare global {
|
|
421
|
-
interface HTMLElementTagNameMap {
|
|
422
|
-
'test-stamp': TestStamp;
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
declare class TestScoringButtons extends LitElement {
|
|
427
|
-
view: string;
|
|
428
|
-
disabled: boolean;
|
|
429
|
-
myTemplate: TemplateFunction | null;
|
|
430
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
431
|
-
connectedCallback(): void;
|
|
432
|
-
protected computedContext?: ComputedContext;
|
|
433
|
-
private _changeOutcomeScore;
|
|
434
|
-
render(): lit_html.TemplateResult<1> | typeof nothing;
|
|
435
|
-
constructor();
|
|
436
|
-
}
|
|
437
|
-
declare global {
|
|
438
|
-
interface HTMLElementTagNameMap {
|
|
439
|
-
'test-scoring-buttons': TestScoringButtons;
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
declare class TestViewToggle extends LitElement {
|
|
444
|
-
myTemplate: any;
|
|
445
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
446
|
-
private sessionContext;
|
|
447
|
-
connectedCallback(): void;
|
|
448
|
-
_switchView(view: string): void;
|
|
449
|
-
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
450
|
-
render(): lit_html.TemplateResult<1>;
|
|
451
|
-
}
|
|
452
|
-
declare global {
|
|
453
|
-
interface HTMLElementTagNameMap {
|
|
454
|
-
'test-view-toggle': TestViewToggle;
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
declare class TestScoringFeedback extends LitElement {
|
|
459
|
-
protected computedContext?: ComputedContext;
|
|
460
|
-
view: View;
|
|
461
|
-
render(): lit_html.TemplateResult<1>;
|
|
462
|
-
}
|
|
463
|
-
declare global {
|
|
464
|
-
interface HTMLElementTagNameMap {
|
|
465
|
-
'test-scoring-feedback': TestScoringFeedback;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
declare class TestCheckItem extends LitElement {
|
|
470
|
-
static styles: lit.CSSResult;
|
|
471
|
-
constructor();
|
|
472
|
-
render(): lit_html.TemplateResult<1>;
|
|
473
|
-
}
|
|
474
|
-
declare global {
|
|
475
|
-
interface HTMLElementTagNameMap {
|
|
476
|
-
'test-check-item': TestCheckItem;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
export { QtiAssessmentTest, QtiTest, TestCheckItem, TestContainer, TestContext, TestEndAttempt, TestItemLink, TestNavigation, TestNext, TestPagingButtonsStamp, TestPrev, TestPrintContext, TestPrintVariables, TestScoringButtons, TestScoringFeedback, TestSectionButtonsStamp, TestSectionLink, TestShowCorrectResponse, TestStamp, TestView, TestViewToggle };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { t as transformItemApi, a as transformTestApi } from './qti-transform-test-Bz9A3hmD.js';
|
|
2
|
-
import * as lit from 'lit';
|
|
3
|
-
import { LitElement } from 'lit';
|
|
4
|
-
import { Q as QtiAssessmentItem } from './qti-assessment-item-l-mN3teH.js';
|
|
5
|
-
import { TemplateFunction } from '@heximal/templates';
|
|
6
|
-
import * as lit_html from 'lit-html';
|
|
7
|
-
import { TestContext } from './exports/test.context.js';
|
|
8
|
-
import { a as QtiModalFeedback } from './qti-modal-feedback-Cp3CHVKw.js';
|
|
9
|
-
import { SessionContext } from './exports/session.context.js';
|
|
10
|
-
import { e as VariableValue, O as OutcomeVariable, V as VariableDeclaration } from './variables-BCkyLoXK.js';
|
|
11
|
-
|
|
12
|
-
declare class QtiAssessmentTest extends LitElement {
|
|
13
|
-
identifier: string;
|
|
14
|
-
get title(): string;
|
|
15
|
-
set title(value: string);
|
|
16
|
-
_testContext?: TestContext;
|
|
17
|
-
private _title;
|
|
18
|
-
connectedCallback(): Promise<void>;
|
|
19
|
-
render(): lit_html.TemplateResult<1>;
|
|
20
|
-
}
|
|
21
|
-
declare global {
|
|
22
|
-
interface HTMLElementTagNameMap {
|
|
23
|
-
'qti-assessment-test': QtiAssessmentTest;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
declare class QtiAssessmentItemRef extends LitElement {
|
|
28
|
-
category?: string;
|
|
29
|
-
identifier?: string;
|
|
30
|
-
required?: boolean;
|
|
31
|
-
fixed?: boolean;
|
|
32
|
-
href?: string;
|
|
33
|
-
weigths: Map<string, number>;
|
|
34
|
-
xmlDoc: DocumentFragment;
|
|
35
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
36
|
-
get assessmentItem(): QtiAssessmentItem | null;
|
|
37
|
-
myTemplate: TemplateFunction;
|
|
38
|
-
connectedCallback(): Promise<void>;
|
|
39
|
-
render(): unknown;
|
|
40
|
-
}
|
|
41
|
-
declare global {
|
|
42
|
-
interface HTMLElementTagNameMap {
|
|
43
|
-
'qti-assessment-item-ref': QtiAssessmentItemRef;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare class QtiAssessmentSection extends LitElement {
|
|
48
|
-
identifier: string;
|
|
49
|
-
required: string;
|
|
50
|
-
fixed: boolean;
|
|
51
|
-
get title(): string;
|
|
52
|
-
set title(value: string);
|
|
53
|
-
visible: boolean;
|
|
54
|
-
keepTogether: boolean;
|
|
55
|
-
_testContext?: TestContext;
|
|
56
|
-
private _title;
|
|
57
|
-
connectedCallback(): Promise<void>;
|
|
58
|
-
render(): lit_html.TemplateResult<1>;
|
|
59
|
-
}
|
|
60
|
-
declare global {
|
|
61
|
-
interface HTMLElementTagNameMap {
|
|
62
|
-
'qti-assessment-section': QtiAssessmentSection;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare class QtiTestPart extends LitElement {
|
|
67
|
-
identifier: string;
|
|
68
|
-
get title(): string;
|
|
69
|
-
set title(value: string);
|
|
70
|
-
class: string;
|
|
71
|
-
navigationMode: 'linear' | 'nonlinear';
|
|
72
|
-
submissionMode: 'individual' | 'simultaneous';
|
|
73
|
-
private _title;
|
|
74
|
-
connectedCallback(): Promise<void>;
|
|
75
|
-
render(): lit_html.TemplateResult<1>;
|
|
76
|
-
}
|
|
77
|
-
declare global {
|
|
78
|
-
interface HTMLElementTagNameMap {
|
|
79
|
-
'qti-test-part': QtiTestPart;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
declare class QtiTestFeedback extends QtiModalFeedback {
|
|
84
|
-
static styles: lit.CSSResult;
|
|
85
|
-
render(): lit_html.TemplateResult<1>;
|
|
86
|
-
}
|
|
87
|
-
declare global {
|
|
88
|
-
interface HTMLElementTagNameMap {
|
|
89
|
-
'qti-test-feedback': QtiTestFeedback;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
type PostLoadTransformCallback = (transformer: transformItemApi, itemRef: QtiAssessmentItemRef) => transformItemApi | Promise<transformItemApi>;
|
|
94
|
-
type PostLoadTestTransformCallback = (transformer: transformTestApi, testElement: QtiAssessmentTest) => transformTestApi | Promise<transformTestApi>;
|
|
95
|
-
|
|
96
|
-
interface QtiTest extends LitElement, ITestNavigationMixin, ITestProcessingMixin, IQtiTest {
|
|
97
|
-
}
|
|
98
|
-
interface IQtiTest {
|
|
99
|
-
testContext: Readonly<TestContext>;
|
|
100
|
-
sessionContext: Readonly<SessionContext>;
|
|
101
|
-
updateItemVariables(itemRefID: string, variables: VariableValue<string | string[] | null>[]): void;
|
|
102
|
-
}
|
|
103
|
-
interface ITestNavigationMixin {
|
|
104
|
-
navigate: 'item' | 'section' | null;
|
|
105
|
-
cacheTransform: boolean;
|
|
106
|
-
requestTimeout: number;
|
|
107
|
-
showLoadingIndicators: boolean;
|
|
108
|
-
postLoadTransformCallback: PostLoadTransformCallback | null;
|
|
109
|
-
postLoadTestTransformCallback: PostLoadTestTransformCallback | null;
|
|
110
|
-
navigateTo(type: 'item' | 'section', id?: string): void;
|
|
111
|
-
retryNavigation(): void;
|
|
112
|
-
}
|
|
113
|
-
interface ITestProcessingMixin {
|
|
114
|
-
updateOutcomeVariable(identifier: string, value: string | string[] | undefined): void;
|
|
115
|
-
getOutcome(identifier: string): Readonly<OutcomeVariable>;
|
|
116
|
-
getVariable(identifier: string): Readonly<VariableDeclaration<string | string[] | null>>;
|
|
117
|
-
outcomeProcessing(): boolean;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export { type IQtiTest as I, QtiAssessmentItemRef as Q, QtiAssessmentSection as a, QtiAssessmentTest as b, QtiTestPart as c, QtiTestFeedback as d, type QtiTest as e, type ITestNavigationMixin as f, type ITestProcessingMixin as g };
|
|
@@ -1,63 +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 transformItemApi = {
|
|
17
|
-
load: (uri: string, signal?: AbortSignal) => Promise<transformItemApi>;
|
|
18
|
-
parse: (xmlString: string) => transformItemApi;
|
|
19
|
-
path: (location: string) => transformItemApi;
|
|
20
|
-
fn: (fn: (xmlFragment: XMLDocument) => void) => transformItemApi;
|
|
21
|
-
pciHooks: (uri: string) => transformItemApi;
|
|
22
|
-
configurePci: (baseUrl: string, getModuleResolutionConfig: (baseUrl: string, fileUrl: string) => Promise<ModuleResolutionConfig>, selector?: string) => Promise<transformItemApi>;
|
|
23
|
-
extendElementName: (elementName: string, extend: string) => transformItemApi;
|
|
24
|
-
extendElementsWithClass: (param?: string) => transformItemApi;
|
|
25
|
-
customInteraction: (baseRef: string, baseItem: string) => transformItemApi;
|
|
26
|
-
convertCDATAtoComment: () => transformItemApi;
|
|
27
|
-
shuffleInteractions: () => transformItemApi;
|
|
28
|
-
stripStyleSheets: () => transformItemApi;
|
|
29
|
-
html: () => string;
|
|
30
|
-
xml: () => string;
|
|
31
|
-
htmlDoc: () => DocumentFragment;
|
|
32
|
-
xmlDoc: () => XMLDocument;
|
|
33
|
-
};
|
|
34
|
-
declare const qtiTransformItem: (cache?: boolean) => transformItemApi;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Returns an object with methods to load, parse and transform QTI tests.
|
|
38
|
-
* @returns An object with methods to load, parse and transform QTI tests.
|
|
39
|
-
* @example
|
|
40
|
-
* const qtiTransformer = qtiTransformTest();
|
|
41
|
-
* await qtiTransformer.load('https://example.com/test.xml');
|
|
42
|
-
* const items = qtiTransformer.items();
|
|
43
|
-
* const html = qtiTransformer.html();
|
|
44
|
-
* const xml = qtiTransformer.xml();
|
|
45
|
-
*/
|
|
46
|
-
type transformTestApi = {
|
|
47
|
-
load: (uri: string, signal?: AbortSignal) => Promise<transformTestApi>;
|
|
48
|
-
parse: (xmlString: string) => transformTestApi;
|
|
49
|
-
path: (location: string) => transformTestApi;
|
|
50
|
-
fn: (fn: (xmlFragment: XMLDocument) => void) => transformTestApi;
|
|
51
|
-
items: () => {
|
|
52
|
-
identifier: string;
|
|
53
|
-
href: string;
|
|
54
|
-
category: string;
|
|
55
|
-
}[];
|
|
56
|
-
html: () => string;
|
|
57
|
-
xml: () => string;
|
|
58
|
-
htmlDoc: () => DocumentFragment;
|
|
59
|
-
xmlDoc: () => XMLDocument;
|
|
60
|
-
};
|
|
61
|
-
declare const qtiTransformTest: () => transformTestApi;
|
|
62
|
-
|
|
63
|
-
export { type ModuleResolutionConfig as M, type transformTestApi as a, qtiTransformTest as b, qtiTransformItem as q, type transformItemApi as t };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export { M as ModuleResolutionConfig, q as qtiTransformItem, b as qtiTransformTest, t as transformItemApi, a as transformTestApi } from '../qti-transform-test-Bz9A3hmD.js';
|
|
2
|
-
|
|
3
|
-
declare const qtiTransformManifest: () => {
|
|
4
|
-
load: (uri: string, signal?: AbortSignal) => Promise<{
|
|
5
|
-
load(uri: any, signal: any): Promise</*elided*/ any>;
|
|
6
|
-
parse(xmlString: string): void;
|
|
7
|
-
assessmentTest(): {
|
|
8
|
-
href: string;
|
|
9
|
-
identifier: string;
|
|
10
|
-
};
|
|
11
|
-
}>;
|
|
12
|
-
assessmentTest: () => {
|
|
13
|
-
href: string;
|
|
14
|
-
identifier: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { qtiTransformManifest };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|