@citolab/qti-components 7.0.4 → 7.0.6-beta.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/chunk-22HAPLRD.js +0 -0
- package/cdn/chunk-4DFVJE2A.js +48 -0
- package/cdn/chunk-4I75QSIL.js +8 -0
- package/cdn/chunk-5WCOPF7O.js +73 -0
- package/cdn/chunk-A536ZOJJ.js +43 -0
- package/cdn/chunk-BLKKKK6C.js +11 -0
- package/cdn/chunk-DC2R556M.js +5 -0
- package/cdn/chunk-GALSGMIP.js +5 -0
- package/cdn/chunk-IXSX4SJX.js +1 -0
- package/cdn/chunk-KYOTSBCX.js +1 -0
- package/cdn/chunk-L4TDHAKL.js +24 -0
- package/cdn/chunk-LVW3MHTI.js +23 -0
- package/cdn/chunk-M6AATWPS.js +59 -0
- package/cdn/chunk-MFWSHIPH.js +17 -0
- package/cdn/chunk-QGKK4T2J.js +8 -0
- package/cdn/chunk-ROXN2HIJ.js +8 -0
- package/cdn/chunk-SQDSHH6N.js +3539 -0
- package/cdn/chunk-T4A5AZCI.js +939 -0
- package/cdn/chunk-VI2WKTN4.js +1 -0
- package/cdn/index.global.js +36 -36
- package/cdn/index.js +1 -4783
- package/cdn/qti-components/index.global.js +226 -0
- package/cdn/qti-components/index.js +1 -0
- package/cdn/qti-item/core/index.global.js +149 -0
- package/cdn/qti-item/core/index.js +1 -0
- package/cdn/qti-loader/index.global.js +1 -0
- package/cdn/qti-loader/index.js +1 -0
- package/cdn/qti-test/components/index.global.js +207 -0
- package/cdn/qti-test/components/index.js +1 -0
- package/cdn/qti-test/components/styles.global.js +44 -0
- package/cdn/qti-test/components/styles.js +1 -0
- package/cdn/qti-test/components/test-component.abstract.global.js +170 -0
- package/cdn/qti-test/components/test-component.abstract.js +1 -0
- package/cdn/qti-test/components/test-item-link.global.js +170 -0
- package/cdn/qti-test/components/test-item-link.js +1 -0
- package/cdn/qti-test/components/test-next.global.js +170 -0
- package/cdn/qti-test/components/test-next.js +1 -0
- package/cdn/qti-test/components/test-next.spec.css +1 -0
- package/cdn/qti-test/components/test-next.spec.global.js +64 -0
- package/cdn/qti-test/components/test-next.spec.js +713 -0
- package/cdn/qti-test/components/test-paging-buttons-stamp.global.js +207 -0
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -0
- package/cdn/qti-test/components/test-prev.global.js +170 -0
- package/cdn/qti-test/components/test-prev.js +1 -0
- package/cdn/qti-test/components/test-view.global.js +170 -0
- package/cdn/qti-test/components/test-view.js +1 -0
- package/cdn/qti-test/core/index.global.js +205 -0
- package/cdn/qti-test/core/index.js +1 -0
- package/cdn/qti-transformers/index.global.js +1 -0
- package/cdn/qti-transformers/index.js +1 -0
- package/dist/chunk-2CHF3TMY.js +3529 -0
- package/dist/chunk-2CHF3TMY.js.map +1 -0
- package/dist/{transformers/index.js → chunk-2OA7E3E7.js} +2 -1
- package/dist/chunk-2OA7E3E7.js.map +1 -0
- package/dist/chunk-3TFUBCJW.js +72 -0
- package/dist/chunk-3TFUBCJW.js.map +1 -0
- package/dist/chunk-44VE5POH.js +55 -0
- package/dist/chunk-44VE5POH.js.map +1 -0
- package/dist/chunk-4FH7P7YI.js +43 -0
- package/dist/chunk-4FH7P7YI.js.map +1 -0
- package/dist/chunk-4YG2FPKK.js +31 -0
- package/dist/chunk-4YG2FPKK.js.map +1 -0
- package/dist/chunk-6SG3NMKU.js +50 -0
- package/dist/chunk-6SG3NMKU.js.map +1 -0
- package/dist/chunk-ANLIJZBL.js +118 -0
- package/dist/chunk-ANLIJZBL.js.map +1 -0
- package/dist/chunk-CNQYM52B.js +569 -0
- package/dist/chunk-CNQYM52B.js.map +1 -0
- package/dist/chunk-F3NTI6TX.js +10 -0
- package/dist/chunk-F3NTI6TX.js.map +1 -0
- package/dist/chunk-F7HTXGGH.js +78 -0
- package/dist/chunk-F7HTXGGH.js.map +1 -0
- package/dist/chunk-MAC76UNI.js +1 -0
- package/dist/chunk-MAC76UNI.js.map +1 -0
- package/dist/chunk-OO6JSYLP.js +50 -0
- package/dist/chunk-OO6JSYLP.js.map +1 -0
- package/dist/chunk-QYN5S4EM.js +107 -0
- package/dist/chunk-QYN5S4EM.js.map +1 -0
- package/dist/chunk-UB5K44DB.js +30 -0
- package/dist/chunk-UB5K44DB.js.map +1 -0
- package/dist/chunk-UBZPSVSE.js +6301 -0
- package/dist/chunk-UBZPSVSE.js.map +1 -0
- package/dist/index.d.ts +13 -503
- package/dist/index.js +132 -13584
- package/dist/index.js.map +1 -1
- package/dist/item.css +10 -10
- package/dist/qti-components/index.d.ts +150 -0
- package/dist/qti-components/index.js +188 -0
- package/dist/qti-components/index.js.map +1 -0
- package/dist/qti-components-jsx.d.ts +147 -201
- package/dist/qti-item/core/index.d.ts +61 -0
- package/dist/qti-item/core/index.js +13 -0
- package/dist/qti-item/core/index.js.map +1 -0
- package/dist/{loader → qti-loader}/index.d.ts +1 -1
- package/dist/qti-loader/index.js +29 -0
- package/dist/qti-loader/index.js.map +1 -0
- package/dist/{qti-simple-choice-D0GiMrqD.d.ts → qti-simple-choice-DxWcdKHi.d.ts} +30 -40
- package/dist/qti-test/components/index.d.ts +11 -0
- package/dist/qti-test/components/index.js +32 -0
- package/dist/qti-test/components/index.js.map +1 -0
- package/dist/qti-test/components/styles.d.ts +8 -0
- package/dist/qti-test/components/styles.js +14 -0
- package/dist/qti-test/components/styles.js.map +1 -0
- package/dist/qti-test/components/test-component.abstract.d.ts +22 -0
- package/dist/qti-test/components/test-component.abstract.js +10 -0
- package/dist/qti-test/components/test-component.abstract.js.map +1 -0
- package/dist/qti-test/components/test-item-link.d.ts +20 -0
- package/dist/qti-test/components/test-item-link.js +12 -0
- package/dist/qti-test/components/test-item-link.js.map +1 -0
- package/dist/qti-test/components/test-next.d.ts +31 -0
- package/dist/qti-test/components/test-next.js +12 -0
- package/dist/qti-test/components/test-next.js.map +1 -0
- package/dist/qti-test/components/test-next.spec.css +2481 -0
- package/dist/qti-test/components/test-next.spec.css.map +1 -0
- package/dist/qti-test/components/test-next.spec.d.ts +13 -0
- package/dist/qti-test/components/test-next.spec.js +45904 -0
- package/dist/qti-test/components/test-next.spec.js.map +1 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +21 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.js +11 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.js.map +1 -0
- package/dist/qti-test/components/test-prev.d.ts +31 -0
- package/dist/qti-test/components/test-prev.js +12 -0
- package/dist/qti-test/components/test-prev.js.map +1 -0
- package/dist/qti-test/components/test-view.d.ts +26 -0
- package/dist/qti-test/components/test-view.js +11 -0
- package/dist/qti-test/components/test-view.js.map +1 -0
- package/dist/qti-test/core/index.d.ts +121 -0
- package/dist/qti-test/core/index.js +27 -0
- package/dist/qti-test/core/index.js.map +1 -0
- package/dist/qti-transformers/index.js +12 -0
- package/dist/qti-transformers/index.js.map +1 -0
- package/dist/test.context-DbSTxKk_.d.ts +99 -0
- package/dist/vscode.html-custom-data.json +53 -42
- package/package.json +100 -111
- package/dist/custom-element-eslint-rules.js +0 -329
- package/dist/custom-elements.json +0 -27271
- package/dist/loader/index.js +0 -310
- package/dist/loader/index.js.map +0 -1
- package/dist/qti-simple-choice-CfgBEvdI.d.ts +0 -1143
- package/dist/qti-simple-choice-UTrFa_RQ.d.ts +0 -1177
- package/dist/qti-simple-choice-zEsDq3c0.d.ts +0 -1147
- package/dist/transformers/index.js.map +0 -1
- /package/dist/{transformers → qti-transformers}/index.d.ts +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import { TestComponent } from './test-component.abstract.js';
|
|
3
|
+
import 'lit';
|
|
4
|
+
import '../../test.context-DbSTxKk_.js';
|
|
5
|
+
import '../../qti-simple-choice-DxWcdKHi.js';
|
|
6
|
+
import 'lit-html/directives/ref.js';
|
|
7
|
+
|
|
8
|
+
declare class TestPagingButtonsStamp extends TestComponent {
|
|
9
|
+
private maxDisplayedItems;
|
|
10
|
+
private skipOnCategory;
|
|
11
|
+
protected createRenderRoot(): this;
|
|
12
|
+
constructor();
|
|
13
|
+
render(): lit_html.TemplateResult<1>;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'test-paging-buttons-stamp': TestPagingButtonsStamp;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { TestPagingButtonsStamp };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TestPagingButtonsStamp
|
|
3
|
+
} from "../../chunk-F7HTXGGH.js";
|
|
4
|
+
import "../../chunk-ANLIJZBL.js";
|
|
5
|
+
import "../../chunk-F3NTI6TX.js";
|
|
6
|
+
import "../../chunk-4YG2FPKK.js";
|
|
7
|
+
import "../../chunk-44VE5POH.js";
|
|
8
|
+
export {
|
|
9
|
+
TestPagingButtonsStamp
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=test-paging-buttons-stamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
3
|
+
import { TestComponent } from './test-component.abstract.js';
|
|
4
|
+
import '../../test.context-DbSTxKk_.js';
|
|
5
|
+
import '../../qti-simple-choice-DxWcdKHi.js';
|
|
6
|
+
import 'lit-html/directives/ref.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents a custom element for navigating to the previous test item.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This element provides functionality for navigating to the previous test item.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <test-prev></test-prev>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare class TestPrev extends TestComponent {
|
|
20
|
+
static styles: lit.CSSResult;
|
|
21
|
+
constructor();
|
|
22
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
23
|
+
render(): lit_html.TemplateResult<1>;
|
|
24
|
+
}
|
|
25
|
+
declare global {
|
|
26
|
+
interface HTMLElementTagNameMap {
|
|
27
|
+
'test-previous': TestPrev;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { TestPrev };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TestPrev
|
|
3
|
+
} from "../../chunk-6SG3NMKU.js";
|
|
4
|
+
import "../../chunk-UB5K44DB.js";
|
|
5
|
+
import "../../chunk-ANLIJZBL.js";
|
|
6
|
+
import "../../chunk-F3NTI6TX.js";
|
|
7
|
+
import "../../chunk-4YG2FPKK.js";
|
|
8
|
+
import "../../chunk-44VE5POH.js";
|
|
9
|
+
export {
|
|
10
|
+
TestPrev
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=test-prev.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import { TestComponent } from './test-component.abstract.js';
|
|
3
|
+
import 'lit';
|
|
4
|
+
import '../../test.context-DbSTxKk_.js';
|
|
5
|
+
import '../../qti-simple-choice-DxWcdKHi.js';
|
|
6
|
+
import 'lit-html/directives/ref.js';
|
|
7
|
+
|
|
8
|
+
declare class TestView extends TestComponent {
|
|
9
|
+
static DEFAULT_VIEW_OPTIONS: string[];
|
|
10
|
+
/** label accompanying the select view dropdown */
|
|
11
|
+
label: string;
|
|
12
|
+
/** The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor'] */
|
|
13
|
+
viewOptions: any;
|
|
14
|
+
protected _handleViewOptionsChange: () => void;
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
private _viewOptions;
|
|
17
|
+
private updateViewOptions;
|
|
18
|
+
render(): lit_html.TemplateResult<1>;
|
|
19
|
+
}
|
|
20
|
+
declare global {
|
|
21
|
+
interface HTMLElementTagNameMap {
|
|
22
|
+
'test-view': TestView;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { TestView };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TestView
|
|
3
|
+
} from "../../chunk-3TFUBCJW.js";
|
|
4
|
+
import "../../chunk-ANLIJZBL.js";
|
|
5
|
+
import "../../chunk-F3NTI6TX.js";
|
|
6
|
+
import "../../chunk-4YG2FPKK.js";
|
|
7
|
+
import "../../chunk-44VE5POH.js";
|
|
8
|
+
export {
|
|
9
|
+
TestView
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=test-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { T as TestContext, d as TestElement } from '../../test.context-DbSTxKk_.js';
|
|
4
|
+
export { Q as QtiAssessmentItemRef, a as QtiAssessmentSection, b as QtiAssessmentTest, c as QtiTestPart, t as testContext, e as testElement } from '../../test.context-DbSTxKk_.js';
|
|
5
|
+
import '../../qti-simple-choice-DxWcdKHi.js';
|
|
6
|
+
import 'lit-html/directives/ref.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* `<test-container>` is a custom element designed for hosting the qti-assessment-item.
|
|
10
|
+
* The `qti-assessment-test` will be placed inside the shadow DOM of this element.
|
|
11
|
+
* The element loads the test from the provided URL and renders it inside the shadow DOM.
|
|
12
|
+
*
|
|
13
|
+
* ```html
|
|
14
|
+
* <qti-test>
|
|
15
|
+
* <test-container class="m-4 bg-white" test-url="./path/to/assessmenttest.xml"></test-container>
|
|
16
|
+
* </qti-test>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare class TestContainer extends LitElement {
|
|
20
|
+
/** URL of the item to load */
|
|
21
|
+
testURL: string;
|
|
22
|
+
/** A parsed HTML document */
|
|
23
|
+
testDoc: DocumentFragment;
|
|
24
|
+
/** The raw XML string */
|
|
25
|
+
testXML: string;
|
|
26
|
+
/** Template content if provided */
|
|
27
|
+
private templateContent;
|
|
28
|
+
protected handleTestURLChange(): Promise<void>;
|
|
29
|
+
protected handleTestXMLChange(): void;
|
|
30
|
+
connectedCallback(): Promise<void>;
|
|
31
|
+
private initializeTemplateContent;
|
|
32
|
+
private applyStyles;
|
|
33
|
+
render(): lit_html.TemplateResult<1>;
|
|
34
|
+
}
|
|
35
|
+
declare global {
|
|
36
|
+
interface HTMLElementTagNameMap {
|
|
37
|
+
'test-container': TestContainer;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare abstract class TestBase extends LitElement {
|
|
42
|
+
protected _testContext: Readonly<TestContext>;
|
|
43
|
+
protected testElement: TestElement;
|
|
44
|
+
constructor();
|
|
45
|
+
get context(): TestContext;
|
|
46
|
+
set context(testContext: TestContext);
|
|
47
|
+
private _updateItemVariablesInTestContext;
|
|
48
|
+
/**
|
|
49
|
+
* Updates the variables of an assessment item in the test context.
|
|
50
|
+
* - Matches the assessment item with the corresponding test context item.
|
|
51
|
+
* - If the item is not found, logs a warning.
|
|
52
|
+
* - Updates variables in the test context if exactly one variable exists.
|
|
53
|
+
* - Otherwise, syncs the assessment item's variables with the test context.
|
|
54
|
+
*
|
|
55
|
+
* @param assessmentItem - The assessment item to update.
|
|
56
|
+
*/
|
|
57
|
+
private _updateItemInTestContext;
|
|
58
|
+
connectedCallback(): void;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
declare const QtiTest_base: (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => {}) & typeof TestBase;
|
|
62
|
+
/**
|
|
63
|
+
* `<qti-test>` is a custom element designed for rendering and interacting with QTI (Question and Test Interoperability) tests.
|
|
64
|
+
*
|
|
65
|
+
* This component leverages several mixins to provide functionality for loading, navigating, processing, and displaying QTI test assessments.
|
|
66
|
+
*
|
|
67
|
+
* ### Example Usage
|
|
68
|
+
*
|
|
69
|
+
* Minimal example including navigation:
|
|
70
|
+
*
|
|
71
|
+
* ```html
|
|
72
|
+
* <qti-test>
|
|
73
|
+
* <test-container test-url="./path/to/assessment.xml"></test-container>
|
|
74
|
+
* <nav class="flex">
|
|
75
|
+
* <test-prev></test-prev>
|
|
76
|
+
* <test-next></test-next>
|
|
77
|
+
* </nav>
|
|
78
|
+
* </qti-test>
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* Use the following file structure
|
|
82
|
+
* A qti-test loads a QTI3.0 assessmenttest.xml file from a package folder.
|
|
83
|
+
*
|
|
84
|
+
* ```plaintext
|
|
85
|
+
* Root/
|
|
86
|
+
* ├── index.html
|
|
87
|
+
* └── /assets/api/examples/
|
|
88
|
+
* ├── assessmenttest.xml
|
|
89
|
+
* └── imsmanifest.xml
|
|
90
|
+
*
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* ### Test components
|
|
94
|
+
*
|
|
95
|
+
* Use test components inside the qti-test component for added functionality.
|
|
96
|
+
* ### Test next
|
|
97
|
+
* `<test-next> | TestNext`
|
|
98
|
+
*
|
|
99
|
+
* ### Test prev
|
|
100
|
+
*
|
|
101
|
+
* `<test-prev> | TestPrev`
|
|
102
|
+
* ### Test components
|
|
103
|
+
*
|
|
104
|
+
* You can use normal class names to style the elements.
|
|
105
|
+
* And you can use the `test-prev` and `test-next` elements to navigate through the test.
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
108
|
+
declare class QtiTest extends QtiTest_base {
|
|
109
|
+
/**
|
|
110
|
+
* Renders the component's template.
|
|
111
|
+
* Provides a default `<slot>` for content projection.
|
|
112
|
+
*/
|
|
113
|
+
render(): lit_html.TemplateResult<1>;
|
|
114
|
+
}
|
|
115
|
+
declare global {
|
|
116
|
+
interface HTMLElementTagNameMap {
|
|
117
|
+
'qti-test': QtiTest;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export { QtiTest, TestContainer, TestContext, TestElement };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
QtiAssessmentItemRef,
|
|
3
|
+
QtiAssessmentSection,
|
|
4
|
+
QtiAssessmentTest,
|
|
5
|
+
QtiTest,
|
|
6
|
+
QtiTestPart,
|
|
7
|
+
TestContainer
|
|
8
|
+
} from "../../chunk-CNQYM52B.js";
|
|
9
|
+
import "../../chunk-2CHF3TMY.js";
|
|
10
|
+
import "../../chunk-2OA7E3E7.js";
|
|
11
|
+
import {
|
|
12
|
+
testContext,
|
|
13
|
+
testElement
|
|
14
|
+
} from "../../chunk-F3NTI6TX.js";
|
|
15
|
+
import "../../chunk-4YG2FPKK.js";
|
|
16
|
+
import "../../chunk-44VE5POH.js";
|
|
17
|
+
export {
|
|
18
|
+
QtiAssessmentItemRef,
|
|
19
|
+
QtiAssessmentSection,
|
|
20
|
+
QtiAssessmentTest,
|
|
21
|
+
QtiTest,
|
|
22
|
+
QtiTestPart,
|
|
23
|
+
TestContainer,
|
|
24
|
+
testContext,
|
|
25
|
+
testElement
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { j as QtiAssessmentItem, af as ItemContext, e as VariableDeclaration } from './qti-simple-choice-DxWcdKHi.js';
|
|
4
|
+
|
|
5
|
+
declare class QtiAssessmentItemRef extends LitElement {
|
|
6
|
+
category?: string;
|
|
7
|
+
identifier?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
fixed?: boolean;
|
|
10
|
+
href?: string;
|
|
11
|
+
_testContext?: TestContext;
|
|
12
|
+
weigths: Map<string, number>;
|
|
13
|
+
xmlDoc: DocumentFragment;
|
|
14
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
15
|
+
get assessmentItem(): QtiAssessmentItem | null;
|
|
16
|
+
connectedCallback(): Promise<void>;
|
|
17
|
+
render(): lit_html.TemplateResult<1>;
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
'qti-assessment-item-ref': QtiAssessmentItemRef;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class QtiAssessmentSection extends LitElement {
|
|
26
|
+
identifier: string;
|
|
27
|
+
required: string;
|
|
28
|
+
fixed: boolean;
|
|
29
|
+
title: string;
|
|
30
|
+
visible: boolean;
|
|
31
|
+
keepTogether: boolean;
|
|
32
|
+
_testContext?: TestContext;
|
|
33
|
+
connectedCallback(): Promise<void>;
|
|
34
|
+
render(): lit_html.TemplateResult<1>;
|
|
35
|
+
}
|
|
36
|
+
declare global {
|
|
37
|
+
interface HTMLElementTagNameMap {
|
|
38
|
+
'qti-assessment-section': QtiAssessmentSection;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare class QtiAssessmentTest extends LitElement {
|
|
43
|
+
identifier: string;
|
|
44
|
+
title: string;
|
|
45
|
+
_testContext?: TestContext;
|
|
46
|
+
connectedCallback(): Promise<void>;
|
|
47
|
+
render(): lit_html.TemplateResult<1>;
|
|
48
|
+
}
|
|
49
|
+
declare global {
|
|
50
|
+
interface HTMLElementTagNameMap {
|
|
51
|
+
'qti-assessment-test': QtiAssessmentTest;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare class QtiTestPart extends LitElement {
|
|
56
|
+
identifier: string;
|
|
57
|
+
title: string;
|
|
58
|
+
class: string;
|
|
59
|
+
NavigationMode: 'linear' | 'nonlinear';
|
|
60
|
+
submissionMode: 'individual' | 'simultaneous';
|
|
61
|
+
connectedCallback(): Promise<void>;
|
|
62
|
+
render(): lit_html.TemplateResult<1>;
|
|
63
|
+
}
|
|
64
|
+
declare global {
|
|
65
|
+
interface HTMLElementTagNameMap {
|
|
66
|
+
'qti-test-part': QtiTestPart;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
type View = 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor' | '';
|
|
71
|
+
declare module '../context/test.context' {
|
|
72
|
+
interface TestContext {
|
|
73
|
+
view?: View;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface TestContext {
|
|
78
|
+
items: (ItemContext & {
|
|
79
|
+
category?: string;
|
|
80
|
+
})[];
|
|
81
|
+
testOutcomeVariables: VariableDeclaration<string | string[]>[];
|
|
82
|
+
navPartId?: string | null;
|
|
83
|
+
navSectionId?: string | null;
|
|
84
|
+
navItemId?: string | null;
|
|
85
|
+
navItemLoading?: boolean;
|
|
86
|
+
navTestLoading?: boolean;
|
|
87
|
+
view?: View;
|
|
88
|
+
}
|
|
89
|
+
declare const testContext: {
|
|
90
|
+
__context__: Readonly<TestContext>;
|
|
91
|
+
};
|
|
92
|
+
type TestElement = {
|
|
93
|
+
el: QtiAssessmentTest;
|
|
94
|
+
};
|
|
95
|
+
declare const testElement: {
|
|
96
|
+
__context__: Readonly<TestElement>;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export { QtiAssessmentItemRef as Q, type TestContext as T, QtiAssessmentSection as a, QtiAssessmentTest as b, QtiTestPart as c, type TestElement as d, testElement as e, testContext as t };
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
},
|
|
417
417
|
{
|
|
418
418
|
"name": "qti-hottext-interaction",
|
|
419
|
-
"description": "\n---\n\n\n### **Events:**\n - **qti-register-interaction**\n- **qti-interaction-response**",
|
|
419
|
+
"description": "\n---\n\n\n### **Events:**\n - **qti-register-interaction**\n- **qti-interaction-response**\n\n### **Methods:**\n ",
|
|
420
420
|
"attributes": [
|
|
421
421
|
{ "name": "min-choices", "values": [] },
|
|
422
422
|
{ "name": "max-choices", "values": [] },
|
|
@@ -450,7 +450,7 @@
|
|
|
450
450
|
},
|
|
451
451
|
{
|
|
452
452
|
"name": "qti-choice-interaction",
|
|
453
|
-
"description": "An sample element.\n---\n\n\n### **Events:**\n - **qti-register-interaction**\n- **qti-interaction-response**\n\n### **Slots:**\n - _default_ - default slot of the choices\n- **prompt** - slot of the prompt\n\n### **CSS Properties:**\n - **--qti-bg-active** - The active background color _(default: #ffecec)_\n- **--qti-border-active** - The active border color _(default: #f86d70)_\n- **--qti-padding-horizontal** - The option horizontal padding _(default: 1px)_\n- **--qti-padding-vertical** - The option vertical padding _(default: solid)_\n- **--qti-border-radius** - The option border radius _(default: 8px)_\n\n### **CSS Parts:**\n - **slot** - The choice elements\n- **prompt** - The prompt\n- **message** - The validation message",
|
|
453
|
+
"description": "An sample element.\n---\n\n\n### **Events:**\n - **qti-register-interaction**\n- **qti-interaction-response**\n\n### **Methods:**\n \n\n### **Slots:**\n - _default_ - default slot of the choices\n- **prompt** - slot of the prompt\n\n### **CSS Properties:**\n - **--qti-bg-active** - The active background color _(default: #ffecec)_\n- **--qti-border-active** - The active border color _(default: #f86d70)_\n- **--qti-padding-horizontal** - The option horizontal padding _(default: 1px)_\n- **--qti-padding-vertical** - The option vertical padding _(default: solid)_\n- **--qti-border-radius** - The option border radius _(default: 8px)_\n\n### **CSS Parts:**\n - **slot** - The choice elements\n- **prompt** - The prompt\n- **message** - The validation message",
|
|
454
454
|
"attributes": [
|
|
455
455
|
{ "name": "orientation", "values": [{ "name": "Orientation" }] },
|
|
456
456
|
{ "name": "class", "values": [] },
|
|
@@ -519,12 +519,12 @@
|
|
|
519
519
|
},
|
|
520
520
|
{
|
|
521
521
|
"name": "qti-associate-interaction",
|
|
522
|
-
"description": "\n---\n\n\n### **Events:**\n - **qti-
|
|
522
|
+
"description": "\n---\n\n\n### **Events:**\n - **qti-interaction-response**\n- **qti-register-interaction**",
|
|
523
523
|
"attributes": [
|
|
524
524
|
{ "name": "min-associations", "values": [] },
|
|
525
525
|
{ "name": "max-associations", "values": [] },
|
|
526
|
-
{ "name": "disabled", "values": [] },
|
|
527
526
|
{ "name": "response-identifier", "values": [] },
|
|
527
|
+
{ "name": "disabled", "values": [] },
|
|
528
528
|
{ "name": "readonly", "values": [] }
|
|
529
529
|
],
|
|
530
530
|
"references": []
|
|
@@ -545,24 +545,27 @@
|
|
|
545
545
|
},
|
|
546
546
|
{
|
|
547
547
|
"name": "qti-end-attempt-interaction",
|
|
548
|
-
"description": "\n---\n\n\n### **Events:**\n - **end-attempt
|
|
548
|
+
"description": "\n---\n\n\n### **Events:**\n - **end-attempt**",
|
|
549
549
|
"attributes": [
|
|
550
|
-
{ "name": "count-attempt", "values": [] },
|
|
551
|
-
{ "name": "title", "values": [{ "name": "end attempt" }] },
|
|
552
550
|
{ "name": "response-identifier", "values": [] },
|
|
553
551
|
{ "name": "disabled", "values": [] },
|
|
554
|
-
{
|
|
552
|
+
{
|
|
553
|
+
"name": "count-attempt",
|
|
554
|
+
"description": "Defines the number of attempts that a user can make using the 'endAttemptInteraction' mechanism (this can be used to limit the number of hints, etc.). [More information](https://www.imsglobal.org/sites/default/files/spec/qti/v3/info/index.html#DataCharacteristic_EndAttemptInteraction.Attr_count-attempt)",
|
|
555
|
+
"values": [{ "name": "true" }, { "name": "false" }]
|
|
556
|
+
},
|
|
557
|
+
{ "name": "title", "values": [] }
|
|
555
558
|
],
|
|
556
559
|
"references": []
|
|
557
560
|
},
|
|
558
561
|
{
|
|
559
562
|
"name": "qti-gap-match-interaction",
|
|
560
|
-
"description": "\n---\n\n\n### **Events:**\n - **qti-
|
|
563
|
+
"description": "\n---\n\n\n### **Events:**\n - **qti-interaction-response**\n- **qti-register-interaction**",
|
|
561
564
|
"attributes": [
|
|
562
565
|
{ "name": "min-associations", "values": [] },
|
|
563
566
|
{ "name": "max-associations", "values": [] },
|
|
564
|
-
{ "name": "disabled", "values": [] },
|
|
565
567
|
{ "name": "response-identifier", "values": [] },
|
|
568
|
+
{ "name": "disabled", "values": [] },
|
|
566
569
|
{ "name": "readonly", "values": [] }
|
|
567
570
|
],
|
|
568
571
|
"references": []
|
|
@@ -591,19 +594,19 @@
|
|
|
591
594
|
},
|
|
592
595
|
{
|
|
593
596
|
"name": "qti-graphic-gap-match-interaction",
|
|
594
|
-
"description": "\n---\n\n\n### **Events:**\n - **qti-
|
|
597
|
+
"description": "\n---\n\n\n### **Events:**\n - **qti-interaction-response**\n- **qti-register-interaction**",
|
|
595
598
|
"attributes": [
|
|
596
599
|
{ "name": "min-associations", "values": [] },
|
|
597
600
|
{ "name": "max-associations", "values": [] },
|
|
598
|
-
{ "name": "disabled", "values": [] },
|
|
599
601
|
{ "name": "response-identifier", "values": [] },
|
|
602
|
+
{ "name": "disabled", "values": [] },
|
|
600
603
|
{ "name": "readonly", "values": [] }
|
|
601
604
|
],
|
|
602
605
|
"references": []
|
|
603
606
|
},
|
|
604
607
|
{
|
|
605
608
|
"name": "qti-graphic-order-interaction",
|
|
606
|
-
"description": "\n---\n\n\n### **Events:**\n - **qti-register-interaction**\n- **qti-interaction-response**",
|
|
609
|
+
"description": "\n---\n\n\n### **Events:**\n - **qti-register-interaction**\n- **qti-interaction-response**\n\n### **Methods:**\n ",
|
|
607
610
|
"attributes": [
|
|
608
611
|
{ "name": "min-choices", "values": [] },
|
|
609
612
|
{ "name": "max-choices", "values": [] },
|
|
@@ -615,7 +618,7 @@
|
|
|
615
618
|
},
|
|
616
619
|
{
|
|
617
620
|
"name": "qti-hotspot-interaction",
|
|
618
|
-
"description": "\n---\n\n\n### **Events:**\n - **qti-register-interaction**\n- **qti-interaction-response**",
|
|
621
|
+
"description": "\n---\n\n\n### **Events:**\n - **qti-register-interaction**\n- **qti-interaction-response**\n\n### **Methods:**\n ",
|
|
619
622
|
"attributes": [
|
|
620
623
|
{ "name": "min-choices", "values": [] },
|
|
621
624
|
{ "name": "max-choices", "values": [] },
|
|
@@ -627,7 +630,7 @@
|
|
|
627
630
|
},
|
|
628
631
|
{
|
|
629
632
|
"name": "qti-match-interaction",
|
|
630
|
-
"description": "\n---\n\n\n### **Events:**\n - **qti-
|
|
633
|
+
"description": "\n---\n\n\n### **Events:**\n - **qti-interaction-response**\n- **qti-register-interaction**",
|
|
631
634
|
"attributes": [
|
|
632
635
|
{ "name": "class", "values": [] },
|
|
633
636
|
{ "name": "response-identifier", "values": [] },
|
|
@@ -650,7 +653,7 @@
|
|
|
650
653
|
},
|
|
651
654
|
{
|
|
652
655
|
"name": "qti-order-interaction",
|
|
653
|
-
"description": "\n---\n\n\n### **Events:**\n - **qti-
|
|
656
|
+
"description": "\n---\n\n\n### **Events:**\n - **qti-interaction-response**\n- **qti-register-interaction**",
|
|
654
657
|
"attributes": [
|
|
655
658
|
{
|
|
656
659
|
"name": "orientation",
|
|
@@ -664,8 +667,8 @@
|
|
|
664
667
|
},
|
|
665
668
|
{ "name": "min-associations", "values": [] },
|
|
666
669
|
{ "name": "max-associations", "values": [] },
|
|
667
|
-
{ "name": "disabled", "values": [] },
|
|
668
670
|
{ "name": "response-identifier", "values": [] },
|
|
671
|
+
{ "name": "disabled", "values": [] },
|
|
669
672
|
{ "name": "readonly", "values": [] }
|
|
670
673
|
],
|
|
671
674
|
"references": []
|
|
@@ -804,6 +807,24 @@
|
|
|
804
807
|
],
|
|
805
808
|
"references": []
|
|
806
809
|
},
|
|
810
|
+
{
|
|
811
|
+
"name": "item-container",
|
|
812
|
+
"description": "`<item-container>` is a custom element designed for hosting the qti-assessment-item.\nThe `qti-assessment-item` will be placed inside the shadow DOM of this element.\nThe element loads the item from the provided URL and renders it inside the shadow DOM.\n\n### Styling\nAdd a class to the element for styling.\n\n```html\n<qti-item>\n <item-container class=\"m-4 bg-white\" item-url=\"./path/to/item.xml\"></item-container>\n</qti-item>\n```\n---\n",
|
|
813
|
+
"attributes": [
|
|
814
|
+
{
|
|
815
|
+
"name": "item-url",
|
|
816
|
+
"description": "URL of the item to load",
|
|
817
|
+
"values": []
|
|
818
|
+
}
|
|
819
|
+
],
|
|
820
|
+
"references": []
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"name": "qti-item",
|
|
824
|
+
"description": "`<qti-item>` is a custom element designed for rendering a single `qti-assessment-item`.\nIt can also host some functionalities to interact with the item like scoring, showing feedback, etc.\nPlacing a mandatory `<item-container>` inside '<qti-item>' will load or parse the item and render it.\nSee `<item-container>` for more details.\n\n```html\n<qti-item>\n <item-container class=\"m-4 bg-white\" item-url=\"./path/to/item.xml\"></item-container>\n</qti-item>\n```\n---\n",
|
|
825
|
+
"attributes": [],
|
|
826
|
+
"references": []
|
|
827
|
+
},
|
|
807
828
|
{
|
|
808
829
|
"name": "qti-assessment-item-ref",
|
|
809
830
|
"description": "\n---\n\n\n### **Events:**\n - **qti-assessment-item-ref-connected**",
|
|
@@ -856,12 +877,6 @@
|
|
|
856
877
|
],
|
|
857
878
|
"references": []
|
|
858
879
|
},
|
|
859
|
-
{
|
|
860
|
-
"name": "qti-test",
|
|
861
|
-
"description": "`<qti-test>` is a custom element designed for rendering and interacting with QTI (Question and Test Interoperability) tests.\n\nThis component leverages several mixins to provide functionality for loading, navigating, processing, and displaying QTI test assessments.\n\n### Example Usage\n\nMinimal example including navigation:\n\n```html\n<qti-test>\n <test-container test-url=\"./path/to/assessment.xml\"></test-container>\n <nav class=\"flex\">\n <test-prev></test-prev>\n <test-next></test-next>\n </nav>\n</qti-test>\n```\n\nUse the following file structure\nA qti-test loads a QTI3.0 assessmenttest.xml file from a package folder.\n\n```plaintext\nRoot/\n├── index.html\n└── /assets/api/examples/\n ├── assessmenttest.xml\n └── imsmanifest.xml\n\n```\n\n### Test components\n\nUse test components inside the qti-test component for added functionality.\n### Test next\n`<test-next> | TestNext`\n\n### Test prev\n\n`<test-prev> | TestPrev`\n### Test components\n\nYou can use normal class names to style the elements.\nAnd you can use the `test-prev` and `test-next` elements to navigate through the test.\n---\n",
|
|
862
|
-
"attributes": [],
|
|
863
|
-
"references": []
|
|
864
|
-
},
|
|
865
880
|
{
|
|
866
881
|
"name": "test-next",
|
|
867
882
|
"description": "Represents a custom element for navigating to the next test item.\n---\n\n\n### **Events:**\n - **on-test-switch-view**\n- **qti-request-test-item**",
|
|
@@ -878,8 +893,16 @@
|
|
|
878
893
|
"name": "test-view",
|
|
879
894
|
"description": "\n---\n\n\n### **Events:**\n - **on-test-switch-view**\n- **qti-request-test-item**",
|
|
880
895
|
"attributes": [
|
|
881
|
-
{
|
|
882
|
-
|
|
896
|
+
{
|
|
897
|
+
"name": "label",
|
|
898
|
+
"description": "label accompanying the select view dropdown",
|
|
899
|
+
"values": []
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"name": "view-options",
|
|
903
|
+
"description": "The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor']",
|
|
904
|
+
"values": []
|
|
905
|
+
}
|
|
883
906
|
],
|
|
884
907
|
"references": []
|
|
885
908
|
},
|
|
@@ -889,18 +912,6 @@
|
|
|
889
912
|
"attributes": [{ "name": "item-id", "values": [] }],
|
|
890
913
|
"references": []
|
|
891
914
|
},
|
|
892
|
-
{
|
|
893
|
-
"name": "test-container",
|
|
894
|
-
"description": "`<test-container>` is a custom element designed for hosting the qti-assessment-item.\nThe `qti-assessment-test` will be placed inside the shadow DOM of this element.\nThe element loads the item from the provided URL and renders it inside the shadow DOM.\n\n### Styling\nAdd a class to the element for styling.\n\n```html\n<qti-test>\n <test-container class=\"m-4 bg-white\" test-url=\"./path/to/item.xml\"></test-container>\n</qti-test>\n```\n---\n",
|
|
895
|
-
"attributes": [
|
|
896
|
-
{
|
|
897
|
-
"name": "test-url",
|
|
898
|
-
"description": "URL of the item to load",
|
|
899
|
-
"values": []
|
|
900
|
-
}
|
|
901
|
-
],
|
|
902
|
-
"references": []
|
|
903
|
-
},
|
|
904
915
|
{
|
|
905
916
|
"name": "test-paging-buttons-stamp",
|
|
906
917
|
"description": "\n---\n\n\n### **Events:**\n - **on-test-switch-view**\n- **qti-request-test-item**",
|
|
@@ -911,17 +922,17 @@
|
|
|
911
922
|
"references": []
|
|
912
923
|
},
|
|
913
924
|
{
|
|
914
|
-
"name": "qti-
|
|
915
|
-
"description": "`<qti-
|
|
925
|
+
"name": "qti-test",
|
|
926
|
+
"description": "`<qti-test>` is a custom element designed for rendering and interacting with QTI (Question and Test Interoperability) tests.\n\nThis component leverages several mixins to provide functionality for loading, navigating, processing, and displaying QTI test assessments.\n\n### Example Usage\n\nMinimal example including navigation:\n\n```html\n<qti-test>\n <test-container test-url=\"./path/to/assessment.xml\"></test-container>\n <nav class=\"flex\">\n <test-prev></test-prev>\n <test-next></test-next>\n </nav>\n</qti-test>\n```\n\nUse the following file structure\nA qti-test loads a QTI3.0 assessmenttest.xml file from a package folder.\n\n```plaintext\nRoot/\n├── index.html\n└── /assets/api/examples/\n ├── assessmenttest.xml\n └── imsmanifest.xml\n\n```\n\n### Test components\n\nUse test components inside the qti-test component for added functionality.\n### Test next\n`<test-next> | TestNext`\n\n### Test prev\n\n`<test-prev> | TestPrev`\n### Test components\n\nYou can use normal class names to style the elements.\nAnd you can use the `test-prev` and `test-next` elements to navigate through the test.\n---\n",
|
|
916
927
|
"attributes": [],
|
|
917
928
|
"references": []
|
|
918
929
|
},
|
|
919
930
|
{
|
|
920
|
-
"name": "
|
|
921
|
-
"description": "`<
|
|
931
|
+
"name": "test-container",
|
|
932
|
+
"description": "`<test-container>` is a custom element designed for hosting the qti-assessment-item.\nThe `qti-assessment-test` will be placed inside the shadow DOM of this element.\nThe element loads the test from the provided URL and renders it inside the shadow DOM.\n\n```html\n<qti-test>\n <test-container class=\"m-4 bg-white\" test-url=\"./path/to/assessmenttest.xml\"></test-container>\n</qti-test>\n```\n---\n",
|
|
922
933
|
"attributes": [
|
|
923
934
|
{
|
|
924
|
-
"name": "
|
|
935
|
+
"name": "test-url",
|
|
925
936
|
"description": "URL of the item to load",
|
|
926
937
|
"values": []
|
|
927
938
|
}
|