@citolab/qti-components 7.1.4 → 7.1.5
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/chunks/chunk-24FGNKCD.js +1007 -0
- package/cdn/chunks/chunk-2GQCYBJ3.js +5 -0
- package/cdn/chunks/chunk-2OZT6A22.js +5 -0
- package/cdn/chunks/chunk-3AJ3S2FB.js +23 -0
- package/cdn/chunks/chunk-3M6EKDMW.js +1 -0
- package/cdn/chunks/chunk-3QCUKN7V.js +1 -0
- package/cdn/chunks/chunk-4LPUHBZG.js +5 -0
- package/cdn/chunks/chunk-5UN2ELTW.js +23 -0
- package/cdn/chunks/chunk-5VTVIA6M.js +23 -0
- package/cdn/chunks/chunk-6JHIITOD.js +1 -0
- package/cdn/chunks/chunk-7UDDUERA.js +1007 -0
- package/cdn/chunks/chunk-7ZNR6KCO.js +5 -0
- package/cdn/chunks/chunk-AAOFOYWA.js +5 -0
- package/cdn/chunks/chunk-AJMJQJUQ.js +5 -0
- package/cdn/chunks/chunk-CY2CQDCJ.js +5 -0
- package/cdn/chunks/chunk-D2GQ4BES.js +1 -0
- package/cdn/chunks/chunk-D6WQKU5P.js +5 -0
- package/cdn/chunks/chunk-DMIFXRAW.js +5 -0
- package/cdn/chunks/chunk-DQ7GTTCX.js +5 -0
- package/cdn/chunks/chunk-DVRZBFAS.js +5 -0
- package/cdn/chunks/chunk-E6M5VAZC.js +1007 -0
- package/cdn/chunks/chunk-EJDPW23L.js +5 -0
- package/cdn/chunks/chunk-FWCOZSKN.js +5 -0
- package/cdn/chunks/chunk-G24US7VC.js +23 -0
- package/cdn/chunks/chunk-HCWGJCF3.js +1007 -0
- package/cdn/chunks/chunk-IUEV6I3Y.js +5 -0
- package/cdn/chunks/chunk-J4CI5WG7.js +23 -0
- package/cdn/chunks/chunk-JEZ3FDS2.js +1007 -0
- package/cdn/chunks/chunk-L7FX2BSJ.js +1007 -0
- package/cdn/chunks/chunk-L7G3YUQJ.js +23 -0
- package/cdn/chunks/chunk-LKOMJADF.js +5 -0
- package/cdn/chunks/chunk-M2YVQSR3.js +5 -0
- package/cdn/chunks/chunk-MADHY2TG.js +5 -0
- package/cdn/chunks/chunk-MCE2HPAI.js +23 -0
- package/cdn/chunks/chunk-MPVVJRN5.js +5 -0
- package/cdn/chunks/chunk-MYK3AVE5.js +5 -0
- package/cdn/chunks/chunk-NQUXPDU3.js +1 -0
- package/cdn/chunks/chunk-O64TZW6N.js +5 -0
- package/cdn/chunks/chunk-OM6BKR6U.js +5 -0
- package/cdn/chunks/chunk-PTEZUFUL.js +5 -0
- package/cdn/chunks/chunk-Q3MPB5OG.js +23 -0
- package/cdn/chunks/chunk-RC3C5C7I.js +5 -0
- package/cdn/chunks/chunk-RDREFUYQ.js +1007 -0
- package/cdn/chunks/chunk-RPBLXGHD.js +5 -0
- package/cdn/chunks/chunk-RWCWDO5R.js +5 -0
- package/cdn/chunks/chunk-SEJ6XHOU.js +1 -0
- package/cdn/chunks/chunk-SHZ5UCLJ.js +5 -0
- package/cdn/chunks/chunk-SRXFURHS.js +5 -0
- package/cdn/chunks/chunk-TJWJV2U3.js +5 -0
- package/cdn/chunks/chunk-URO7DOBX.js +1 -0
- package/cdn/chunks/chunk-UVCZCMPG.js +5 -0
- package/cdn/chunks/chunk-V2HYQXWT.js +1007 -0
- package/cdn/chunks/chunk-V6VPFEQB.js +1 -0
- package/cdn/chunks/chunk-V7S5DVXO.js +5 -0
- package/cdn/chunks/chunk-VAKXKPIY.js +1007 -0
- package/cdn/chunks/chunk-VCATS6AD.js +5 -0
- package/cdn/chunks/chunk-VGBHSWOI.js +5 -0
- package/cdn/chunks/chunk-VTBQWQOW.js +23 -0
- package/cdn/chunks/chunk-W567D2AF.js +1 -0
- package/cdn/chunks/chunk-WQFK6JFL.js +5 -0
- package/cdn/chunks/chunk-WRAB6IVU.js +5 -0
- package/cdn/chunks/chunk-WWNOVLDK.js +23 -0
- package/cdn/chunks/chunk-XJHAZYHN.js +1007 -0
- package/cdn/chunks/chunk-YCTL45GB.js +1 -0
- package/cdn/chunks/chunk-ZRWDLR2Y.js +5 -0
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +1 -1
- package/cdn/qti-components/index.js +1 -1
- package/cdn/qti-item/components/item-container.js +1 -1
- package/cdn/qti-item/core/index.js +1 -1
- package/cdn/qti-loader/index.js +1 -1
- package/cdn/qti-test/components/index.js +1 -1
- package/cdn/qti-test/components/test-container.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/cdn/qti-transformers/index.js +1 -1
- package/dist/chunks/chunk-2IXFDXDW.js +646 -0
- package/dist/chunks/chunk-2IXFDXDW.js.map +1 -0
- package/dist/chunks/chunk-2RRW2DFF.js +31 -0
- package/dist/chunks/chunk-2RRW2DFF.js.map +1 -0
- package/dist/chunks/chunk-2SENMECZ.js +383 -0
- package/dist/chunks/chunk-2SENMECZ.js.map +1 -0
- package/dist/chunks/chunk-2YIXNTLW.js +31 -0
- package/dist/chunks/chunk-2YIXNTLW.js.map +1 -0
- package/dist/chunks/chunk-323JSMZF.js +6888 -0
- package/dist/chunks/chunk-323JSMZF.js.map +1 -0
- package/dist/chunks/chunk-334SZRIZ.js +627 -0
- package/dist/chunks/chunk-334SZRIZ.js.map +1 -0
- package/dist/chunks/chunk-42QJNL24.js +383 -0
- package/dist/chunks/chunk-42QJNL24.js.map +1 -0
- package/dist/chunks/chunk-4QHU4ILT.js +627 -0
- package/dist/chunks/chunk-4QHU4ILT.js.map +1 -0
- package/dist/chunks/chunk-5LEN6QDS.js +31 -0
- package/dist/chunks/chunk-5LEN6QDS.js.map +1 -0
- package/dist/chunks/chunk-5QMNVSHC.js +94 -0
- package/dist/chunks/chunk-5QMNVSHC.js.map +1 -0
- package/dist/chunks/chunk-5WS6ZWUN.js +374 -0
- package/dist/chunks/chunk-5WS6ZWUN.js.map +1 -0
- package/dist/chunks/chunk-673CG4KG.js +94 -0
- package/dist/chunks/chunk-673CG4KG.js.map +1 -0
- package/dist/chunks/chunk-6VFH66FM.js +94 -0
- package/dist/chunks/chunk-6VFH66FM.js.map +1 -0
- package/dist/chunks/chunk-6YED6PQC.js +6888 -0
- package/dist/chunks/chunk-6YED6PQC.js.map +1 -0
- package/dist/chunks/chunk-75QW5V24.js +6888 -0
- package/dist/chunks/chunk-75QW5V24.js.map +1 -0
- package/dist/chunks/chunk-AVDZJOCT.js +400 -0
- package/dist/chunks/chunk-AVDZJOCT.js.map +1 -0
- package/dist/chunks/chunk-BCMG64M3.js +94 -0
- package/dist/chunks/chunk-BCMG64M3.js.map +1 -0
- package/dist/chunks/chunk-CHFTTHPJ.js +383 -0
- package/dist/chunks/chunk-CHFTTHPJ.js.map +1 -0
- package/dist/chunks/chunk-DT72VPM7.js +32 -0
- package/dist/chunks/chunk-DT72VPM7.js.map +1 -0
- package/dist/chunks/chunk-E2WYWXM3.js +6888 -0
- package/dist/chunks/chunk-E2WYWXM3.js.map +1 -0
- package/dist/chunks/chunk-E4XNZM6H.js +383 -0
- package/dist/chunks/chunk-E4XNZM6H.js.map +1 -0
- package/dist/chunks/chunk-ECTDE6XC.js +646 -0
- package/dist/chunks/chunk-ECTDE6XC.js.map +1 -0
- package/dist/chunks/chunk-EN7ICTLG.js +94 -0
- package/dist/chunks/chunk-EN7ICTLG.js.map +1 -0
- package/dist/chunks/chunk-EV2QQBO6.js +94 -0
- package/dist/chunks/chunk-EV2QQBO6.js.map +1 -0
- package/dist/chunks/chunk-FJI6VGC6.js +94 -0
- package/dist/chunks/chunk-FJI6VGC6.js.map +1 -0
- package/dist/chunks/chunk-FKUTUG6E.js +94 -0
- package/dist/chunks/chunk-FKUTUG6E.js.map +1 -0
- package/dist/chunks/chunk-FOAIUAWY.js +627 -0
- package/dist/chunks/chunk-FOAIUAWY.js.map +1 -0
- package/dist/chunks/chunk-GR52YZQB.js +31 -0
- package/dist/chunks/chunk-GR52YZQB.js.map +1 -0
- package/dist/chunks/chunk-GRT2RDCX.js +6888 -0
- package/dist/chunks/chunk-GRT2RDCX.js.map +1 -0
- package/dist/chunks/chunk-GT4B3SMY.js +94 -0
- package/dist/chunks/chunk-GT4B3SMY.js.map +1 -0
- package/dist/chunks/chunk-I6JSNAIT.js +627 -0
- package/dist/chunks/chunk-I6JSNAIT.js.map +1 -0
- package/dist/chunks/chunk-IKNXVVXK.js +32 -0
- package/dist/chunks/chunk-IKNXVVXK.js.map +1 -0
- package/dist/chunks/chunk-KJ5Y7Q3K.js +94 -0
- package/dist/chunks/chunk-KJ5Y7Q3K.js.map +1 -0
- package/dist/chunks/chunk-KNV7LPEA.js +94 -0
- package/dist/chunks/chunk-KNV7LPEA.js.map +1 -0
- package/dist/chunks/chunk-LCYRSF7H.js +6888 -0
- package/dist/chunks/chunk-LCYRSF7H.js.map +1 -0
- package/dist/chunks/chunk-LLVJY74K.js +373 -0
- package/dist/chunks/chunk-LLVJY74K.js.map +1 -0
- package/dist/chunks/chunk-LOCV27GA.js +31 -0
- package/dist/chunks/chunk-LOCV27GA.js.map +1 -0
- package/dist/chunks/chunk-LVPRIPTY.js +94 -0
- package/dist/chunks/chunk-LVPRIPTY.js.map +1 -0
- package/dist/chunks/chunk-MHPLSF7C.js +645 -0
- package/dist/chunks/chunk-MHPLSF7C.js.map +1 -0
- package/dist/chunks/chunk-MWVK6TYO.js +94 -0
- package/dist/chunks/chunk-MWVK6TYO.js.map +1 -0
- package/dist/chunks/chunk-NC7KY56H.js +627 -0
- package/dist/chunks/chunk-NC7KY56H.js.map +1 -0
- package/dist/chunks/chunk-O55K2M54.js +94 -0
- package/dist/chunks/chunk-O55K2M54.js.map +1 -0
- package/dist/chunks/chunk-PEV4JLKR.js +374 -0
- package/dist/chunks/chunk-PEV4JLKR.js.map +1 -0
- package/dist/chunks/chunk-POTLDXHV.js +627 -0
- package/dist/chunks/chunk-POTLDXHV.js.map +1 -0
- package/dist/chunks/chunk-QA5CX4HN.js +94 -0
- package/dist/chunks/chunk-QA5CX4HN.js.map +1 -0
- package/dist/chunks/chunk-QCZ76WFB.js +6888 -0
- package/dist/chunks/chunk-QCZ76WFB.js.map +1 -0
- package/dist/chunks/chunk-QS6VHKJL.js +94 -0
- package/dist/chunks/chunk-QS6VHKJL.js.map +1 -0
- package/dist/chunks/chunk-RVZE4R2K.js +400 -0
- package/dist/chunks/chunk-RVZE4R2K.js.map +1 -0
- package/dist/chunks/chunk-SGUZHURT.js +94 -0
- package/dist/chunks/chunk-SGUZHURT.js.map +1 -0
- package/dist/chunks/chunk-SJYWAAZE.js +31 -0
- package/dist/chunks/chunk-SJYWAAZE.js.map +1 -0
- package/dist/chunks/chunk-STQBRYLA.js +31 -0
- package/dist/chunks/chunk-STQBRYLA.js.map +1 -0
- package/dist/chunks/chunk-TAO7UEFH.js +400 -0
- package/dist/chunks/chunk-TAO7UEFH.js.map +1 -0
- package/dist/chunks/chunk-TC3OIHDQ.js +6888 -0
- package/dist/chunks/chunk-TC3OIHDQ.js.map +1 -0
- package/dist/chunks/chunk-TOJHUALI.js +646 -0
- package/dist/chunks/chunk-TOJHUALI.js.map +1 -0
- package/dist/chunks/chunk-TPAA44Y7.js +31 -0
- package/dist/chunks/chunk-TPAA44Y7.js.map +1 -0
- package/dist/chunks/chunk-TRYCV7IM.js +31 -0
- package/dist/chunks/chunk-TRYCV7IM.js.map +1 -0
- package/dist/chunks/chunk-TVNMKAMJ.js +645 -0
- package/dist/chunks/chunk-TVNMKAMJ.js.map +1 -0
- package/dist/chunks/chunk-U4RFKBRP.js +94 -0
- package/dist/chunks/chunk-U4RFKBRP.js.map +1 -0
- package/dist/chunks/chunk-UGLQ4IE6.js +94 -0
- package/dist/chunks/chunk-UGLQ4IE6.js.map +1 -0
- package/dist/chunks/chunk-UJFRZXCT.js +647 -0
- package/dist/chunks/chunk-UJFRZXCT.js.map +1 -0
- package/dist/chunks/chunk-UMF3ZNLB.js +627 -0
- package/dist/chunks/chunk-UMF3ZNLB.js.map +1 -0
- package/dist/chunks/chunk-UPOAW5KH.js +6888 -0
- package/dist/chunks/chunk-UPOAW5KH.js.map +1 -0
- package/dist/chunks/chunk-UYO3TSPZ.js +373 -0
- package/dist/chunks/chunk-UYO3TSPZ.js.map +1 -0
- package/dist/chunks/chunk-VDCLAPUT.js +627 -0
- package/dist/chunks/chunk-VDCLAPUT.js.map +1 -0
- package/dist/chunks/chunk-WEBEBLJU.js +94 -0
- package/dist/chunks/chunk-WEBEBLJU.js.map +1 -0
- package/dist/chunks/chunk-WWFGVIQF.js +627 -0
- package/dist/chunks/chunk-WWFGVIQF.js.map +1 -0
- package/dist/chunks/chunk-XBCKVU3I.js +94 -0
- package/dist/chunks/chunk-XBCKVU3I.js.map +1 -0
- package/dist/chunks/chunk-XOKC45VV.js +631 -0
- package/dist/chunks/chunk-XOKC45VV.js.map +1 -0
- package/dist/chunks/chunk-YHEITHMB.js +6888 -0
- package/dist/chunks/chunk-YHEITHMB.js.map +1 -0
- package/dist/chunks/chunk-YSGGRW2E.js +6888 -0
- package/dist/chunks/chunk-YSGGRW2E.js.map +1 -0
- package/dist/chunks/chunk-ZLOEM737.js +94 -0
- package/dist/chunks/chunk-ZLOEM737.js.map +1 -0
- package/dist/index.js +17 -17
- package/dist/qti-components/index.js +2 -2
- package/dist/qti-components-jsx.d.ts +1 -3
- package/dist/qti-item/components/item-container.js +2 -2
- package/dist/qti-item/core/index.js +2 -2
- package/dist/qti-loader/index.js +2 -2
- package/dist/qti-test/components/index.js +6 -6
- package/dist/qti-test/components/test-container.js +2 -2
- package/dist/qti-test/core/index.js +3 -3
- package/dist/qti-transformers/index.d.ts +3 -14
- package/dist/qti-transformers/index.js +1 -1
- package/dist/vscode.html-custom-data.json +1 -2
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
item_default
|
|
3
|
+
} from "./chunk-NQPY5GBW.js";
|
|
4
|
+
import {
|
|
5
|
+
watch
|
|
6
|
+
} from "./chunk-ELDMXTUQ.js";
|
|
7
|
+
import {
|
|
8
|
+
qtiTransformTest
|
|
9
|
+
} from "./chunk-PEV4JLKR.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-H2JE6IVU.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-test/components/test-container.ts
|
|
15
|
+
import { LitElement, html } from "lit";
|
|
16
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
17
|
+
import { until } from "lit/directives/until.js";
|
|
18
|
+
var TestContainer = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.testURL = null;
|
|
22
|
+
this.testDoc = null;
|
|
23
|
+
this.testXML = null;
|
|
24
|
+
/** Template content if provided */
|
|
25
|
+
this.templateContent = null;
|
|
26
|
+
}
|
|
27
|
+
async handleTestURLChange() {
|
|
28
|
+
if (!this.testURL) return;
|
|
29
|
+
try {
|
|
30
|
+
const api = await qtiTransformTest().load(this.testURL);
|
|
31
|
+
this.testDoc = api.htmlDoc();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error("Error loading or parsing XML:", error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
handleTestXMLChange() {
|
|
37
|
+
if (!this.testXML) return;
|
|
38
|
+
try {
|
|
39
|
+
this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error("Error parsing XML:", error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async connectedCallback() {
|
|
45
|
+
super.connectedCallback();
|
|
46
|
+
this.initializeTemplateContent();
|
|
47
|
+
this.applyStyles();
|
|
48
|
+
if (this.testURL) {
|
|
49
|
+
this.handleTestURLChange();
|
|
50
|
+
}
|
|
51
|
+
if (this.testXML) {
|
|
52
|
+
this.handleTestXMLChange();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
initializeTemplateContent() {
|
|
56
|
+
const template = this.querySelector("template");
|
|
57
|
+
this.templateContent = template ? template.content : html``;
|
|
58
|
+
}
|
|
59
|
+
applyStyles() {
|
|
60
|
+
const sheet = new CSSStyleSheet();
|
|
61
|
+
sheet.replaceSync(item_default);
|
|
62
|
+
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
return html`
|
|
66
|
+
${this.templateContent}
|
|
67
|
+
<slot></slot>
|
|
68
|
+
${until(this.testDoc, html`<span>Loading...</span>`)}
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
__decorateClass([
|
|
73
|
+
property({ type: String, attribute: "test-url" })
|
|
74
|
+
], TestContainer.prototype, "testURL", 2);
|
|
75
|
+
__decorateClass([
|
|
76
|
+
state()
|
|
77
|
+
], TestContainer.prototype, "testDoc", 2);
|
|
78
|
+
__decorateClass([
|
|
79
|
+
state()
|
|
80
|
+
], TestContainer.prototype, "testXML", 2);
|
|
81
|
+
__decorateClass([
|
|
82
|
+
watch("testURL", { waitUntilFirstUpdate: true })
|
|
83
|
+
], TestContainer.prototype, "handleTestURLChange", 1);
|
|
84
|
+
__decorateClass([
|
|
85
|
+
watch("testXML", { waitUntilFirstUpdate: true })
|
|
86
|
+
], TestContainer.prototype, "handleTestXMLChange", 1);
|
|
87
|
+
TestContainer = __decorateClass([
|
|
88
|
+
customElement("test-container")
|
|
89
|
+
], TestContainer);
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
TestContainer
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-ZLOEM737.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-container.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\n\nimport { watch } from '../../decorators/watch';\nimport itemCss from '../../../item.css?inline';\nimport { qtiTransformTest } from '../../qti-transformers';\n\n/**\n * `<test-container>` is a custom element designed for hosting the qti-assessment-item.\n * The `qti-assessment-test` will be placed inside the shadow DOM of this element.\n * The element loads the test from the provided URL and renders it inside the shadow DOM.\n *\n * ```html\n * <qti-test>\n * <test-navigation>\n * <test-container class=\"m-4 bg-white\" test-url=\"./path/to/assessmenttest.xml\"></test-container>\n * </test-navigation>\n * </qti-test>\n * ```\n */\n@customElement('test-container')\nexport class TestContainer extends LitElement {\n /** URL of the item to load */\n @property({ type: String, attribute: 'test-url' })\n testURL: string = null;\n\n /** A parsed HTML document */\n @state()\n testDoc: DocumentFragment = null;\n\n /** The raw XML string */\n @state()\n testXML: string = null;\n\n /** Template content if provided */\n private templateContent = null;\n\n @watch('testURL', { waitUntilFirstUpdate: true })\n protected async handleTestURLChange() {\n if (!this.testURL) return;\n try {\n const api = await qtiTransformTest().load(this.testURL);\n this.testDoc = api.htmlDoc();\n } catch (error) {\n console.error('Error loading or parsing XML:', error);\n }\n }\n\n @watch('testXML', { waitUntilFirstUpdate: true })\n protected handleTestXMLChange() {\n if (!this.testXML) return;\n try {\n this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();\n } catch (error) {\n console.error('Error parsing XML:', error);\n }\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n this.initializeTemplateContent();\n this.applyStyles();\n if (this.testURL) {\n this.handleTestURLChange();\n }\n if (this.testXML) {\n this.handleTestXMLChange();\n }\n }\n\n private initializeTemplateContent() {\n const template = this.querySelector('template') as HTMLTemplateElement;\n this.templateContent = template ? template.content : html``;\n }\n\n private applyStyles() {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(itemCss);\n this.shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n render() {\n return html`\n ${this.templateContent}\n <slot></slot>\n ${until(this.testDoc, html`<span>Loading...</span>`)}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-container': TestContainer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,YAAY;AACjC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,aAAa;AAoBf,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC;AAAA;AAGL,mBAAkB;AAIlB,mBAA4B;AAI5B,mBAAkB;AAGlB;AAAA,SAAQ,kBAAkB;AAAA;AAAA,EAG1B,MAAgB,sBAAsB;AACpC,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,YAAM,MAAM,MAAM,iBAAiB,EAAE,KAAK,KAAK,OAAO;AACtD,WAAK,UAAU,IAAI,QAAQ;AAAA,IAC7B,SAAS,OAAO;AACd,cAAQ,MAAM,iCAAiC,KAAK;AAAA,IACtD;AAAA,EACF;AAAA,EAGU,sBAAsB;AAC9B,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,WAAK,UAAU,iBAAiB,EAAE,MAAM,KAAK,OAAO,EAAE,QAAQ;AAAA,IAChE,SAAS,OAAO;AACd,cAAQ,MAAM,sBAAsB,KAAK;AAAA,IAC3C;AAAA,EACF;AAAA,EAEA,MAAM,oBAAmC;AACvC,UAAM,kBAAkB;AACxB,SAAK,0BAA0B;AAC/B,SAAK,YAAY;AACjB,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AACA,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AAAA,EACF;AAAA,EAEQ,4BAA4B;AAClC,UAAM,WAAW,KAAK,cAAc,UAAU;AAC9C,SAAK,kBAAkB,WAAW,SAAS,UAAU;AAAA,EACvD;AAAA,EAEQ,cAAc;AACpB,UAAM,QAAQ,IAAI,cAAc;AAChC,UAAM,YAAY,YAAO;AACzB,SAAK,WAAW,qBAAqB,CAAC,KAAK;AAAA,EAC7C;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,QACH,KAAK,eAAe;AAAA;AAAA,QAEpB,MAAM,KAAK,SAAS,6BAA6B,CAAC;AAAA;AAAA,EAExD;AACF;AAhEE;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,WAAW,CAAC;AAAA,GAFtC,cAGX;AAIA;AAAA,EADC,MAAM;AAAA,GANI,cAOX;AAIA;AAAA,EADC,MAAM;AAAA,GAVI,cAWX;AAMgB;AAAA,EADf,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAhBrC,cAiBK;AAWN;AAAA,EADT,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA3BrC,cA4BD;AA5BC,gBAAN;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB;","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
QtiAssessmentItemRef,
|
|
3
|
+
QtiAssessmentSection,
|
|
4
|
+
QtiAssessmentTest,
|
|
5
|
+
QtiTest,
|
|
6
|
+
QtiTestFeedback,
|
|
7
|
+
QtiTestPart
|
|
8
|
+
} from "./chunks/chunk-334SZRIZ.js";
|
|
1
9
|
import {
|
|
2
10
|
QtiItem
|
|
3
11
|
} from "./chunks/chunk-DPPA3O5U.js";
|
|
4
12
|
import {
|
|
5
13
|
ItemContainer
|
|
6
|
-
} from "./chunks/chunk-
|
|
14
|
+
} from "./chunks/chunk-BCMG64M3.js";
|
|
7
15
|
import {
|
|
8
16
|
ItemShowCorrectResponse
|
|
9
17
|
} from "./chunks/chunk-YBLTM23L.js";
|
|
@@ -11,18 +19,7 @@ import {
|
|
|
11
19
|
PrintItemVariables
|
|
12
20
|
} from "./chunks/chunk-MOQDHNO5.js";
|
|
13
21
|
import "./chunks/chunk-DZAMXOSC.js";
|
|
14
|
-
import {
|
|
15
|
-
QtiAssessmentItemRef,
|
|
16
|
-
QtiAssessmentSection,
|
|
17
|
-
QtiAssessmentTest,
|
|
18
|
-
QtiTest,
|
|
19
|
-
QtiTestFeedback,
|
|
20
|
-
QtiTestPart
|
|
21
|
-
} from "./chunks/chunk-YKULE4IF.js";
|
|
22
22
|
import "./chunks/chunk-UEX52I7G.js";
|
|
23
|
-
import {
|
|
24
|
-
TestPrintContext
|
|
25
|
-
} from "./chunks/chunk-WPUMEBSF.js";
|
|
26
23
|
import {
|
|
27
24
|
TestPrintVariables
|
|
28
25
|
} from "./chunks/chunk-MQS7RZFR.js";
|
|
@@ -40,7 +37,7 @@ import {
|
|
|
40
37
|
} from "./chunks/chunk-HXGGGOV2.js";
|
|
41
38
|
import {
|
|
42
39
|
TestContainer
|
|
43
|
-
} from "./chunks/chunk-
|
|
40
|
+
} from "./chunks/chunk-FKUTUG6E.js";
|
|
44
41
|
import {
|
|
45
42
|
TestEndAttempt
|
|
46
43
|
} from "./chunks/chunk-5KCXO2RP.js";
|
|
@@ -60,8 +57,11 @@ import {
|
|
|
60
57
|
TestPrev
|
|
61
58
|
} from "./chunks/chunk-3AKMYTDK.js";
|
|
62
59
|
import "./chunks/chunk-K6EUKFNW.js";
|
|
63
|
-
import
|
|
60
|
+
import {
|
|
61
|
+
TestPrintContext
|
|
62
|
+
} from "./chunks/chunk-WPUMEBSF.js";
|
|
64
63
|
import "./chunks/chunk-NQPY5GBW.js";
|
|
64
|
+
import "./chunks/chunk-5ZHHNEDA.js";
|
|
65
65
|
import "./chunks/chunk-UZ4QB5IO.js";
|
|
66
66
|
import {
|
|
67
67
|
INITIAL_TEST_CONTEXT,
|
|
@@ -154,7 +154,7 @@ import {
|
|
|
154
154
|
QtiVariable,
|
|
155
155
|
qtiAndMixin,
|
|
156
156
|
qtiSubtractMixin
|
|
157
|
-
} from "./chunks/chunk-
|
|
157
|
+
} from "./chunks/chunk-6YED6PQC.js";
|
|
158
158
|
import "./chunks/chunk-D3RGDWKP.js";
|
|
159
159
|
import "./chunks/chunk-ELDMXTUQ.js";
|
|
160
160
|
import "./chunks/chunk-OOQLWOYU.js";
|
|
@@ -163,12 +163,12 @@ import "./chunks/chunk-NJNQOQUU.js";
|
|
|
163
163
|
import {
|
|
164
164
|
getItemByUri,
|
|
165
165
|
getManifestInfo
|
|
166
|
-
} from "./chunks/chunk-
|
|
166
|
+
} from "./chunks/chunk-STQBRYLA.js";
|
|
167
167
|
import {
|
|
168
168
|
qtiTransformItem,
|
|
169
169
|
qtiTransformManifest,
|
|
170
170
|
qtiTransformTest
|
|
171
|
-
} from "./chunks/chunk-
|
|
171
|
+
} from "./chunks/chunk-LLVJY74K.js";
|
|
172
172
|
import "./chunks/chunk-TR375NFI.js";
|
|
173
173
|
import "./chunks/chunk-6Z5YR5U2.js";
|
|
174
174
|
import "./chunks/chunk-U5CYRPC3.js";
|
|
@@ -85,13 +85,13 @@ import {
|
|
|
85
85
|
QtiVariable,
|
|
86
86
|
qtiAndMixin,
|
|
87
87
|
qtiSubtractMixin
|
|
88
|
-
} from "../chunks/chunk-
|
|
88
|
+
} from "../chunks/chunk-6YED6PQC.js";
|
|
89
89
|
import "../chunks/chunk-D3RGDWKP.js";
|
|
90
90
|
import "../chunks/chunk-ELDMXTUQ.js";
|
|
91
91
|
import "../chunks/chunk-OOQLWOYU.js";
|
|
92
92
|
import "../chunks/chunk-I7HVKMDI.js";
|
|
93
93
|
import "../chunks/chunk-NJNQOQUU.js";
|
|
94
|
-
import "../chunks/chunk-
|
|
94
|
+
import "../chunks/chunk-LLVJY74K.js";
|
|
95
95
|
import "../chunks/chunk-U5CYRPC3.js";
|
|
96
96
|
import "../chunks/chunk-JQ6HWGRY.js";
|
|
97
97
|
import "../chunks/chunk-H2JE6IVU.js";
|
|
@@ -867,9 +867,7 @@ export type QtiTestFeedbackProps = {
|
|
|
867
867
|
|
|
868
868
|
export type QtiTestProps = {
|
|
869
869
|
/** TestContext will be stored in sessionStorage with given attribute value if provided */
|
|
870
|
-
"
|
|
871
|
-
/** */
|
|
872
|
-
"nav-item-id"?: string | null;
|
|
870
|
+
"cache-transform"?: boolean;
|
|
873
871
|
/** */
|
|
874
872
|
navigate?: "item" | "section";
|
|
875
873
|
/** */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ItemContainer
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-BCMG64M3.js";
|
|
4
4
|
import "../../chunks/chunk-NQPY5GBW.js";
|
|
5
5
|
import "../../chunks/chunk-ELDMXTUQ.js";
|
|
6
|
-
import "../../chunks/chunk-
|
|
6
|
+
import "../../chunks/chunk-LLVJY74K.js";
|
|
7
7
|
import "../../chunks/chunk-H2JE6IVU.js";
|
|
8
8
|
export {
|
|
9
9
|
ItemContainer
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "../../chunks/chunk-DPPA3O5U.js";
|
|
4
4
|
import {
|
|
5
5
|
ItemContainer
|
|
6
|
-
} from "../../chunks/chunk-
|
|
6
|
+
} from "../../chunks/chunk-BCMG64M3.js";
|
|
7
7
|
import {
|
|
8
8
|
ItemShowCorrectResponse
|
|
9
9
|
} from "../../chunks/chunk-YBLTM23L.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import "../../chunks/chunk-DZAMXOSC.js";
|
|
14
14
|
import "../../chunks/chunk-NQPY5GBW.js";
|
|
15
15
|
import "../../chunks/chunk-ELDMXTUQ.js";
|
|
16
|
-
import "../../chunks/chunk-
|
|
16
|
+
import "../../chunks/chunk-LLVJY74K.js";
|
|
17
17
|
import "../../chunks/chunk-TR375NFI.js";
|
|
18
18
|
import "../../chunks/chunk-H2JE6IVU.js";
|
|
19
19
|
export {
|
package/dist/qti-loader/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getItemByUri,
|
|
3
3
|
getManifestInfo
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-STQBRYLA.js";
|
|
5
|
+
import "../chunks/chunk-LLVJY74K.js";
|
|
6
6
|
import "../chunks/chunk-H2JE6IVU.js";
|
|
7
7
|
export {
|
|
8
8
|
getItemByUri,
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import "../../chunks/chunk-UEX52I7G.js";
|
|
2
|
-
import {
|
|
3
|
-
TestPrintContext
|
|
4
|
-
} from "../../chunks/chunk-WPUMEBSF.js";
|
|
5
2
|
import {
|
|
6
3
|
TestPrintVariables
|
|
7
4
|
} from "../../chunks/chunk-MQS7RZFR.js";
|
|
@@ -19,7 +16,7 @@ import {
|
|
|
19
16
|
} from "../../chunks/chunk-HXGGGOV2.js";
|
|
20
17
|
import {
|
|
21
18
|
TestContainer
|
|
22
|
-
} from "../../chunks/chunk-
|
|
19
|
+
} from "../../chunks/chunk-FKUTUG6E.js";
|
|
23
20
|
import {
|
|
24
21
|
TestEndAttempt
|
|
25
22
|
} from "../../chunks/chunk-5KCXO2RP.js";
|
|
@@ -39,13 +36,16 @@ import {
|
|
|
39
36
|
TestPrev
|
|
40
37
|
} from "../../chunks/chunk-3AKMYTDK.js";
|
|
41
38
|
import "../../chunks/chunk-K6EUKFNW.js";
|
|
42
|
-
import
|
|
39
|
+
import {
|
|
40
|
+
TestPrintContext
|
|
41
|
+
} from "../../chunks/chunk-WPUMEBSF.js";
|
|
43
42
|
import "../../chunks/chunk-NQPY5GBW.js";
|
|
43
|
+
import "../../chunks/chunk-5ZHHNEDA.js";
|
|
44
44
|
import "../../chunks/chunk-UZ4QB5IO.js";
|
|
45
45
|
import "../../chunks/chunk-CJADUWEC.js";
|
|
46
46
|
import "../../chunks/chunk-D3RGDWKP.js";
|
|
47
47
|
import "../../chunks/chunk-ELDMXTUQ.js";
|
|
48
|
-
import "../../chunks/chunk-
|
|
48
|
+
import "../../chunks/chunk-LLVJY74K.js";
|
|
49
49
|
import "../../chunks/chunk-6Z5YR5U2.js";
|
|
50
50
|
import "../../chunks/chunk-H2JE6IVU.js";
|
|
51
51
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TestContainer
|
|
3
|
-
} from "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-FKUTUG6E.js";
|
|
4
4
|
import "../../chunks/chunk-NQPY5GBW.js";
|
|
5
5
|
import "../../chunks/chunk-ELDMXTUQ.js";
|
|
6
|
-
import "../../chunks/chunk-
|
|
6
|
+
import "../../chunks/chunk-LLVJY74K.js";
|
|
7
7
|
import "../../chunks/chunk-H2JE6IVU.js";
|
|
8
8
|
export {
|
|
9
9
|
TestContainer
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
QtiTest,
|
|
6
6
|
QtiTestFeedback,
|
|
7
7
|
QtiTestPart
|
|
8
|
-
} from "../../chunks/chunk-
|
|
8
|
+
} from "../../chunks/chunk-334SZRIZ.js";
|
|
9
9
|
import "../../chunks/chunk-UZ4QB5IO.js";
|
|
10
10
|
import {
|
|
11
11
|
INITIAL_TEST_CONTEXT,
|
|
12
12
|
testContext
|
|
13
13
|
} from "../../chunks/chunk-CJADUWEC.js";
|
|
14
|
-
import "../../chunks/chunk-
|
|
14
|
+
import "../../chunks/chunk-6YED6PQC.js";
|
|
15
15
|
import "../../chunks/chunk-D3RGDWKP.js";
|
|
16
16
|
import "../../chunks/chunk-ELDMXTUQ.js";
|
|
17
17
|
import "../../chunks/chunk-OOQLWOYU.js";
|
|
18
18
|
import "../../chunks/chunk-I7HVKMDI.js";
|
|
19
19
|
import "../../chunks/chunk-NJNQOQUU.js";
|
|
20
|
-
import "../../chunks/chunk-
|
|
20
|
+
import "../../chunks/chunk-LLVJY74K.js";
|
|
21
21
|
import "../../chunks/chunk-U5CYRPC3.js";
|
|
22
22
|
import "../../chunks/chunk-JQ6HWGRY.js";
|
|
23
23
|
import "../../chunks/chunk-H2JE6IVU.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type transformItemApi = {
|
|
2
|
-
load: (uri: string,
|
|
2
|
+
load: (uri: string, cancelPreviousRequest?: boolean) => Promise<transformItemApi>;
|
|
3
3
|
parse: (xmlString: string) => transformItemApi;
|
|
4
4
|
path: (location: string) => transformItemApi;
|
|
5
5
|
fn: (fn: (xmlFragment: XMLDocument) => void) => transformItemApi;
|
|
@@ -8,25 +8,14 @@ type transformItemApi = {
|
|
|
8
8
|
extendElementsWithClass: (param?: string) => transformItemApi;
|
|
9
9
|
customInteraction: (baseRef: string, baseItem: string) => transformItemApi;
|
|
10
10
|
convertCDATAtoComment: () => transformItemApi;
|
|
11
|
-
shuffleInteractions: (
|
|
12
|
-
[interactionId: string]: string[];
|
|
13
|
-
} | undefined) => {
|
|
14
|
-
api: transformItemApi;
|
|
15
|
-
result: {
|
|
16
|
-
interactionId: string;
|
|
17
|
-
ids: {
|
|
18
|
-
original: string[];
|
|
19
|
-
shuffled: string[];
|
|
20
|
-
} | undefined;
|
|
21
|
-
}[];
|
|
22
|
-
};
|
|
11
|
+
shuffleInteractions: () => transformItemApi;
|
|
23
12
|
stripStyleSheets: () => transformItemApi;
|
|
24
13
|
html: () => string;
|
|
25
14
|
xml: () => string;
|
|
26
15
|
htmlDoc: () => DocumentFragment;
|
|
27
16
|
xmlDoc: () => XMLDocument;
|
|
28
17
|
};
|
|
29
|
-
declare const qtiTransformItem: () => transformItemApi;
|
|
18
|
+
declare const qtiTransformItem: (cache?: boolean) => transformItemApi;
|
|
30
19
|
|
|
31
20
|
declare const qtiTransformManifest: () => {
|
|
32
21
|
load: (uri: string) => Promise<{
|
|
@@ -818,11 +818,10 @@
|
|
|
818
818
|
"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-navigation>\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 </test-navigation>\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\n\n### **Events:**\n - **qti-test-connected**\n- **qti-test-context-updated**",
|
|
819
819
|
"attributes": [
|
|
820
820
|
{
|
|
821
|
-
"name": "
|
|
821
|
+
"name": "cache-transform",
|
|
822
822
|
"description": "TestContext will be stored in sessionStorage with given attribute value if provided",
|
|
823
823
|
"values": []
|
|
824
824
|
},
|
|
825
|
-
{ "name": "nav-item-id", "values": [] },
|
|
826
825
|
{
|
|
827
826
|
"name": "navigate",
|
|
828
827
|
"values": [{ "name": "item" }, { "name": "section" }]
|