@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
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
3
|
+
import { LitElement } from 'lit';
|
|
4
|
+
import { Q as QtiRule, a as QtiRuleBase, b as QtiExpressionBase, c as QtiExpression, B as BaseType, d as QtiConditionExpression, R as ResponseVariable, V as VariableDeclaration, I as ItemContext, e as QtiAssessmentItem } from './qti-simple-choice-DG8ImdPz.js';
|
|
5
|
+
export { s as ActiveElementMixin, A as ActiveElementMixinInterface, C as Calculate, n as Cardinality, r as ChoiceInterface, ai as Interaction, f as InteractionChangedDetails, M as Multiple, m as Ordered, N as Orientation, O as OutcomeChangedDetails, p as OutcomeVariable, X as QtiAnd, q as QtiAssessmentStimulusRef, aj as QtiAssociableHotspot, a1 as QtiAssociateInteraction, P as QtiChoiceInteraction, y as QtiCompanionMaterialsInfo, z as QtiContentBody, a2 as QtiCustomInteraction, ah as QtiCustomOperator, a3 as QtiEndAttemptInteraction, H as QtiExtendedTextInteraction, E as QtiFeedbackBlock, F as QtiFeedbackInline, ak as QtiGap, al as QtiGapImg, a4 as QtiGapMatchInteraction, am as QtiGapText, a5 as QtiGraphicAssociateInteraction, a6 as QtiGraphicGapMatchInteraction, a7 as QtiGraphicOrderInteraction, an as QtiHotspotChoice, a8 as QtiHotspotInteraction, ao as QtiHottext, K as QtiHottextInteraction, ap as QtiInlineChoice, L as QtiInlineChoiceInteraction, g as QtiInteractionChanged, t as QtiItemBody, W as QtiLookupOutcomeValue, Z as QtiMapping, a9 as QtiMatchInteraction, aa as QtiMediaInteraction, G as QtiModalFeedback, ab as QtiOrderInteraction, h as QtiOutcomeChanged, w as QtiOutcomeDeclaration, S as QtiOutcomeProcessing, T as QtiOutcomeProcessingProcessor, a0 as QtiPortableCustomInteraction, ac as QtiPositionObjectStage, u as QtiPrompt, x as QtiResponseDeclaration, U as QtiResponseProcessing, D as QtiRubricBlock, ad as QtiSelectPointInteraction, aq as QtiSimpleAssociableChoice, ar as QtiSimpleChoice, ae as QtiSliderInteraction, v as QtiStylesheet, _ as QtiSubtract, J as QtiTextEntryInteraction, j as ResponseInteraction, o as VariableValue, i as directedPair, k as float, l as integer, ag as itemContext, af as itemContextVariables, Y as qtiAndMixin, $ as qtiSubtractMixin } from './qti-simple-choice-DG8ImdPz.js';
|
|
6
|
+
import 'lit-html/directives/ref.js';
|
|
7
|
+
|
|
8
|
+
declare class QtiResponseCondition extends QtiRule {
|
|
9
|
+
render(): lit_html.TemplateResult<1>;
|
|
10
|
+
process(): void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare class QtiSetOutcomeValue extends QtiRule {
|
|
14
|
+
process(): void;
|
|
15
|
+
}
|
|
16
|
+
declare class QtiSetOutcomeValueRule<T> implements QtiRuleBase {
|
|
17
|
+
private expression;
|
|
18
|
+
constructor(expression: QtiExpressionBase<T>);
|
|
19
|
+
process(): any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class QtiResponseElse extends LitElement {
|
|
23
|
+
render(): lit_html.TemplateResult<1>;
|
|
24
|
+
calculate(): boolean;
|
|
25
|
+
getSubRules(): QtiRule[];
|
|
26
|
+
process(): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class QtiResponseIf extends QtiResponseElse {
|
|
30
|
+
calculate(): boolean;
|
|
31
|
+
getSubRules(): QtiRule[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class QtiResponseElseIf extends QtiResponseIf {
|
|
35
|
+
render(): lit_html.TemplateResult<1>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class QtiBaseValue extends QtiExpression<string> {
|
|
39
|
+
baseType: BaseType;
|
|
40
|
+
getResult(): string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class QtiContains extends QtiConditionExpression {
|
|
44
|
+
getResult(): boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare class QtiCorrect extends QtiExpression<string | string[]> {
|
|
48
|
+
get interpretation(): string;
|
|
49
|
+
getResult(): string | string[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare class QtiEqualRounded extends QtiExpression<boolean> {
|
|
53
|
+
roundingMode: 'decimalPlaces' | 'significantFigures';
|
|
54
|
+
get figures(): number;
|
|
55
|
+
getResult(): boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare class QtiEqual extends QtiExpression<boolean> {
|
|
59
|
+
toleranceMode: 'exact' | 'relative' | 'absolute';
|
|
60
|
+
getResult(): boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare class QtiGt extends QtiExpression<boolean> {
|
|
64
|
+
getResult(): boolean;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare class QtiGte extends QtiConditionExpression {
|
|
68
|
+
getResult(): boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare class QtiIsNull extends QtiExpression<boolean> {
|
|
72
|
+
getResult(): boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare class QtiLt extends QtiExpression<boolean> {
|
|
76
|
+
getResult(): boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
declare class QtiLte extends QtiConditionExpression {
|
|
80
|
+
getResult(): boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare class QtiMapResponse extends QtiExpression<number> {
|
|
84
|
+
identifier: string;
|
|
85
|
+
getResult(): number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
declare class QtiMatch extends QtiExpression<boolean> {
|
|
89
|
+
getResult(): boolean;
|
|
90
|
+
static match(valueToMap: ResponseVariable, correctValueInfo: ResponseVariable): boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare class QtiMember extends QtiExpression<boolean | null> {
|
|
94
|
+
getResult(): boolean;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
declare class QtiMultiple extends QtiExpression<VariableDeclaration<string | string[]>[]> {
|
|
98
|
+
getResult(): ResponseVariable[];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare class QtiNot extends QtiExpression<boolean> {
|
|
102
|
+
render(): lit_html.TemplateResult<1>;
|
|
103
|
+
getResult(): boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare class QtiOr extends QtiConditionExpression {
|
|
107
|
+
getResult(): boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
declare class QtiOrdered extends QtiExpression<ResponseVariable[]> {
|
|
111
|
+
getResult(): ResponseVariable[];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
declare class QtiPrintedVariable extends LitElement {
|
|
115
|
+
identifier: string;
|
|
116
|
+
protected context?: ItemContext;
|
|
117
|
+
render(): lit_html.TemplateResult<1>;
|
|
118
|
+
calculate(): VariableDeclaration<string | string[]>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
declare class QtiProduct extends QtiExpression<number> {
|
|
122
|
+
getResult(): number;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
declare class QtiStringMatch extends QtiExpression<boolean> {
|
|
126
|
+
caseSensitive: string;
|
|
127
|
+
getResult(): boolean;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare class QtiSum extends QtiExpression<number> {
|
|
131
|
+
private _expression;
|
|
132
|
+
constructor();
|
|
133
|
+
getResult(): number;
|
|
134
|
+
}
|
|
135
|
+
declare class QtiSumExpression implements QtiExpressionBase<number> {
|
|
136
|
+
private expressions;
|
|
137
|
+
constructor(expressions: QtiExpressionBase<number>[]);
|
|
138
|
+
calculate(): number;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
declare class QtiVariable extends QtiExpression<string | string[]> {
|
|
142
|
+
getResult(): Readonly<string | string[]>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
declare class QtiPositionObjectInteraction extends LitElement {
|
|
146
|
+
render(): lit_html.TemplateResult<1>;
|
|
147
|
+
static styles: lit.CSSResult[];
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
interface TestContext {
|
|
151
|
+
items: (ItemContext & {
|
|
152
|
+
category?: string;
|
|
153
|
+
})[];
|
|
154
|
+
testOutcomeVariables: VariableDeclaration<string | string[]>[];
|
|
155
|
+
}
|
|
156
|
+
type TestElement = {
|
|
157
|
+
el: QtiAssessmentTest;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
declare class QtiAssessmentItemRef extends LitElement {
|
|
161
|
+
category?: string;
|
|
162
|
+
identifier?: string;
|
|
163
|
+
required?: boolean;
|
|
164
|
+
fixed?: boolean;
|
|
165
|
+
href?: string;
|
|
166
|
+
_testContext?: TestContext;
|
|
167
|
+
weigths: Map<string, number>;
|
|
168
|
+
xmlDoc: DocumentFragment;
|
|
169
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
170
|
+
get assessmentItem(): QtiAssessmentItem | null;
|
|
171
|
+
connectedCallback(): Promise<void>;
|
|
172
|
+
render(): lit_html.TemplateResult<1>;
|
|
173
|
+
}
|
|
174
|
+
declare global {
|
|
175
|
+
interface HTMLElementTagNameMap {
|
|
176
|
+
'qti-assessment-item-ref': QtiAssessmentItemRef;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
declare class QtiAssessmentSection extends LitElement {
|
|
181
|
+
identifier: string;
|
|
182
|
+
required: string;
|
|
183
|
+
fixed: boolean;
|
|
184
|
+
title: string;
|
|
185
|
+
visible: boolean;
|
|
186
|
+
keepTogether: boolean;
|
|
187
|
+
_testContext?: TestContext;
|
|
188
|
+
connectedCallback(): Promise<void>;
|
|
189
|
+
render(): lit_html.TemplateResult<1>;
|
|
190
|
+
}
|
|
191
|
+
declare global {
|
|
192
|
+
interface HTMLElementTagNameMap {
|
|
193
|
+
'qti-assessment-section': QtiAssessmentSection;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
declare class QtiAssessmentTest extends LitElement {
|
|
198
|
+
identifier: string;
|
|
199
|
+
title: string;
|
|
200
|
+
_testContext?: TestContext;
|
|
201
|
+
connectedCallback(): Promise<void>;
|
|
202
|
+
render(): lit_html.TemplateResult<1>;
|
|
203
|
+
}
|
|
204
|
+
declare global {
|
|
205
|
+
interface HTMLElementTagNameMap {
|
|
206
|
+
'qti-assessment-test': QtiAssessmentTest;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare class QtiTestPart extends LitElement {
|
|
211
|
+
identifier: string;
|
|
212
|
+
title: string;
|
|
213
|
+
class: string;
|
|
214
|
+
NavigationMode: 'linear' | 'nonlinear';
|
|
215
|
+
submissionMode: 'individual' | 'simultaneous';
|
|
216
|
+
connectedCallback(): Promise<void>;
|
|
217
|
+
render(): lit_html.TemplateResult<1>;
|
|
218
|
+
}
|
|
219
|
+
declare global {
|
|
220
|
+
interface HTMLElementTagNameMap {
|
|
221
|
+
'qti-test-part': QtiTestPart;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare abstract class TestBase extends LitElement {
|
|
226
|
+
protected _testContext: Readonly<TestContext>;
|
|
227
|
+
protected testElement: TestElement;
|
|
228
|
+
constructor();
|
|
229
|
+
get context(): TestContext;
|
|
230
|
+
set context(testContext: TestContext);
|
|
231
|
+
private _updateItemVariablesInTestContext;
|
|
232
|
+
/**
|
|
233
|
+
* Updates the variables of an assessment item in the test context.
|
|
234
|
+
* - Matches the assessment item with the corresponding test context item.
|
|
235
|
+
* - If the item is not found, logs a warning.
|
|
236
|
+
* - Updates variables in the test context if exactly one variable exists.
|
|
237
|
+
* - Otherwise, syncs the assessment item's variables with the test context.
|
|
238
|
+
*
|
|
239
|
+
* @param assessmentItem - The assessment item to update.
|
|
240
|
+
*/
|
|
241
|
+
private _updateItemInTestContext;
|
|
242
|
+
connectedCallback(): void;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare const QtiTest_base: (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => {}) & typeof TestBase;
|
|
246
|
+
/**
|
|
247
|
+
* `<qti-test>` is a custom element designed for rendering and interacting with QTI (Question and Test Interoperability) tests.
|
|
248
|
+
*
|
|
249
|
+
* This component leverages several mixins to provide functionality for loading, navigating, processing, and displaying QTI test assessments.
|
|
250
|
+
*
|
|
251
|
+
* ### Example Usage
|
|
252
|
+
*
|
|
253
|
+
* Minimal markup:
|
|
254
|
+
* ```html
|
|
255
|
+
* <qti-test test="./path/to/assessment.xml">
|
|
256
|
+
* <test-container></test-container>
|
|
257
|
+
* </qti-test>
|
|
258
|
+
* ```
|
|
259
|
+
*
|
|
260
|
+
* With navigation buttons:
|
|
261
|
+
* ```html
|
|
262
|
+
* <qti-test >
|
|
263
|
+
* <test-container test-url="./path/to/assessment.xml"></test-container>
|
|
264
|
+
* <div class="flex">
|
|
265
|
+
* <test-prev></test-prev>
|
|
266
|
+
* <test-next></test-next>
|
|
267
|
+
* </div>
|
|
268
|
+
* </qti-test>
|
|
269
|
+
* ```
|
|
270
|
+
*
|
|
271
|
+
* You can use normal class names to style the elements.
|
|
272
|
+
* And you can use the `test-prev` and `test-next` elements to navigate through the test.
|
|
273
|
+
*
|
|
274
|
+
* @attr {string} testURL - the relative location to the QTI assessment.xml file
|
|
275
|
+
*
|
|
276
|
+
* @tag qti-player
|
|
277
|
+
*
|
|
278
|
+
* ### Features
|
|
279
|
+
*
|
|
280
|
+
* - **Dynamic Template Loading**:
|
|
281
|
+
* If a `<template>` element is included as a child of `<qti-test>`, its content is dynamically appended to the shadow DOM.
|
|
282
|
+
*/
|
|
283
|
+
declare class QtiTest extends QtiTest_base {
|
|
284
|
+
/**
|
|
285
|
+
* Lifecycle callback invoked when the element is added to the DOM.
|
|
286
|
+
* Automatically appends the content of a `<template>` element (if present)
|
|
287
|
+
* to the shadow DOM.
|
|
288
|
+
*/
|
|
289
|
+
connectedCallback(): void;
|
|
290
|
+
/**
|
|
291
|
+
* Renders the component's template.
|
|
292
|
+
* Provides a default `<slot>` for content projection.
|
|
293
|
+
*/
|
|
294
|
+
render(): lit_html.TemplateResult<1>;
|
|
295
|
+
}
|
|
296
|
+
declare global {
|
|
297
|
+
interface HTMLElementTagNameMap {
|
|
298
|
+
'qti-test': QtiTest;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
declare abstract class TestComponent extends LitElement {
|
|
303
|
+
disabled: boolean;
|
|
304
|
+
_testContext?: TestContext;
|
|
305
|
+
_testElement?: TestElement;
|
|
306
|
+
_handleTestElementChange(_oldValue: TestElement, newValue: TestElement): void;
|
|
307
|
+
protected _internals: ElementInternals;
|
|
308
|
+
protected items: any;
|
|
309
|
+
protected itemIndex: any;
|
|
310
|
+
protected view: any;
|
|
311
|
+
constructor();
|
|
312
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
313
|
+
protected _switchView(view: string): void;
|
|
314
|
+
protected _requestItem(identifier: string): void;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Represents a custom element for navigating to the next test item.
|
|
319
|
+
*
|
|
320
|
+
* @remarks
|
|
321
|
+
* This element provides functionality for navigating to the next test item.
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* ```html
|
|
325
|
+
* <test-next></test-next>
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
declare class TestNext extends TestComponent {
|
|
329
|
+
static styles: lit.CSSResult;
|
|
330
|
+
constructor();
|
|
331
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
332
|
+
render(): lit_html.TemplateResult<1>;
|
|
333
|
+
}
|
|
334
|
+
declare global {
|
|
335
|
+
interface HTMLElementTagNameMap {
|
|
336
|
+
'test-next': TestNext;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Represents a custom element for navigating to the previous test item.
|
|
342
|
+
*
|
|
343
|
+
* @remarks
|
|
344
|
+
* This element provides functionality for navigating to the previous test item.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```html
|
|
348
|
+
* <test-prev></test-prev>
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
declare class TestPrev extends TestComponent {
|
|
352
|
+
static styles: lit.CSSResult;
|
|
353
|
+
constructor();
|
|
354
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
355
|
+
render(): lit_html.TemplateResult<1>;
|
|
356
|
+
}
|
|
357
|
+
declare global {
|
|
358
|
+
interface HTMLElementTagNameMap {
|
|
359
|
+
'test-previous': TestPrev;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
declare class TestView extends TestComponent {
|
|
364
|
+
static DEFAULT_VIEW_OPTIONS: string[];
|
|
365
|
+
label: string;
|
|
366
|
+
viewOptions: string;
|
|
367
|
+
_handleViewOptionsChange: (_: string, viewOptions: string) => void;
|
|
368
|
+
private _viewOptions;
|
|
369
|
+
render(): lit_html.TemplateResult<1>;
|
|
370
|
+
}
|
|
371
|
+
declare global {
|
|
372
|
+
interface HTMLElementTagNameMap {
|
|
373
|
+
'test-view': TestView;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
declare class TestItemLink extends TestComponent {
|
|
378
|
+
private itemId;
|
|
379
|
+
constructor();
|
|
380
|
+
render(): lit_html.TemplateResult<1>;
|
|
381
|
+
}
|
|
382
|
+
declare global {
|
|
383
|
+
interface HTMLElementTagNameMap {
|
|
384
|
+
'test-item-link': TestItemLink;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* `<test-container>` is a custom element designed for hosting the qti-assessment-test.
|
|
390
|
+
* The `qti-assessment-test` will be placed inside the shadow DOM of this element.
|
|
391
|
+
*
|
|
392
|
+
* ### Example Usage
|
|
393
|
+
* The `test-container` element to hosts the visual representation of the items.
|
|
394
|
+
* You can style the container by adding a class to the element.
|
|
395
|
+
*
|
|
396
|
+
* ```html
|
|
397
|
+
* <qti-test testurl="./path/to/assessment.xml">
|
|
398
|
+
* <test-container class="container bg-white m-2"></test-container>
|
|
399
|
+
* </qti-test>
|
|
400
|
+
* ```
|
|
401
|
+
*
|
|
402
|
+
* @tag test-container
|
|
403
|
+
*/
|
|
404
|
+
declare class TestContainer extends LitElement {
|
|
405
|
+
/**
|
|
406
|
+
* Internal state for the dynamically loaded content.
|
|
407
|
+
* This is a Promise resolving to the content that will be rendered.
|
|
408
|
+
*/
|
|
409
|
+
private content;
|
|
410
|
+
testURL: string;
|
|
411
|
+
/**
|
|
412
|
+
* Preloaded content from a `<template>` child, if present.
|
|
413
|
+
*/
|
|
414
|
+
private preContent;
|
|
415
|
+
/**
|
|
416
|
+
* Lifecycle callback invoked when the element is added to the DOM.
|
|
417
|
+
* Handles template preloading and dispatches a `qti-load-test-request` event
|
|
418
|
+
* if no template is found.
|
|
419
|
+
*/
|
|
420
|
+
connectedCallback(): Promise<void>;
|
|
421
|
+
/**
|
|
422
|
+
* Renders the component content.
|
|
423
|
+
* Preloaded template content is rendered first, followed by the default slot
|
|
424
|
+
* and dynamically loaded content.
|
|
425
|
+
*/
|
|
426
|
+
render(): lit_html.TemplateResult<1>;
|
|
427
|
+
}
|
|
428
|
+
declare global {
|
|
429
|
+
interface HTMLElementTagNameMap {
|
|
430
|
+
'test-container': TestContainer;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
declare class TestPagingButtonsStamp extends TestComponent {
|
|
435
|
+
private maxDisplayedItems;
|
|
436
|
+
private skipOnCategory;
|
|
437
|
+
protected createRenderRoot(): this;
|
|
438
|
+
constructor();
|
|
439
|
+
render(): lit_html.TemplateResult<1>;
|
|
440
|
+
}
|
|
441
|
+
declare global {
|
|
442
|
+
interface HTMLElementTagNameMap {
|
|
443
|
+
'test-paging-buttons-stamp': TestPagingButtonsStamp;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
type Constructor<T = {}> = new (...args: any[]) => T;
|
|
448
|
+
interface QtiItemInterface {
|
|
449
|
+
identifier?: string;
|
|
450
|
+
href?: string;
|
|
451
|
+
xmlDoc: DocumentFragment;
|
|
452
|
+
assessmentItem: QtiAssessmentItem | null;
|
|
453
|
+
}
|
|
454
|
+
declare function QtiItemMixin<T extends Constructor<LitElement>>(Base: T): Constructor<QtiItemInterface> & T;
|
|
455
|
+
|
|
456
|
+
declare const QtiItem_base: (new (...args: any[]) => QtiItemInterface) & typeof LitElement;
|
|
457
|
+
declare class QtiItem extends QtiItem_base {
|
|
458
|
+
}
|
|
459
|
+
declare global {
|
|
460
|
+
interface HTMLElementTagNameMap {
|
|
461
|
+
'qti-item': QtiItem;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export { BaseType, ItemContext, QtiAssessmentItem, QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiBaseValue, QtiConditionExpression, QtiContains, QtiCorrect, QtiEqual, QtiEqualRounded, QtiExpression, QtiExpressionBase, QtiGt, QtiGte, QtiIsNull, QtiItem, type QtiItemInterface, QtiItemMixin, QtiLt, QtiLte, QtiMapResponse, QtiMatch, QtiMember, QtiMultiple, QtiNot, QtiOr, QtiOrdered, QtiPositionObjectInteraction, QtiPrintedVariable, QtiProduct, QtiResponseCondition, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiRule, QtiRuleBase, QtiSetOutcomeValue, QtiSetOutcomeValueRule, QtiStringMatch, QtiSum, QtiSumExpression, QtiTest, QtiTestPart, QtiVariable, ResponseVariable, TestContainer, TestItemLink, TestNext, TestPagingButtonsStamp, TestPrev, TestView, VariableDeclaration };
|