@citolab/qti-components 7.0.6-beta.0 → 7.0.6-beta.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.
Files changed (198) hide show
  1. package/cdn/{chunk-QGKK4T2J.js → chunks/chunk-3V6LA7B3.js} +1 -1
  2. package/cdn/chunks/chunk-4UJBK6JO.js +1 -0
  3. package/cdn/chunks/chunk-4WXQYE2P.js +8 -0
  4. package/cdn/{chunk-L4TDHAKL.js → chunks/chunk-5BR5CJFH.js} +5 -5
  5. package/cdn/chunks/chunk-5GCSZ3CH.js +73 -0
  6. package/cdn/{chunk-BLKKKK6C.js → chunks/chunk-5P7CTN7Q.js} +1 -1
  7. package/cdn/{chunk-A536ZOJJ.js → chunks/chunk-6S4CDN3T.js} +1 -1
  8. package/cdn/chunks/chunk-7XYBFL7U.js +934 -0
  9. package/cdn/chunks/chunk-DZCKF45D.js +5 -0
  10. package/cdn/chunks/chunk-EHK76KRT.js +1 -0
  11. package/cdn/chunks/chunk-IAP2CEE7.js +1 -0
  12. package/cdn/chunks/chunk-IMJOPCFR.js +1 -0
  13. package/cdn/chunks/chunk-KWPDTFYH.js +1 -0
  14. package/cdn/{chunk-MFWSHIPH.js → chunks/chunk-L4CUWIE6.js} +1 -1
  15. package/cdn/{chunk-4DFVJE2A.js → chunks/chunk-LZZB4VGC.js} +1 -1
  16. package/cdn/{chunk-SQDSHH6N.js → chunks/chunk-MJMONWKB.js} +1 -1
  17. package/cdn/chunks/chunk-N5OHGRGG.js +8 -0
  18. package/cdn/chunks/chunk-NDHSIO2G.js +8 -0
  19. package/cdn/{chunk-ROXN2HIJ.js → chunks/chunk-PKT2SJQD.js} +1 -1
  20. package/cdn/chunks/chunk-QQCGUVEV.js +1 -0
  21. package/cdn/chunks/chunk-QV6I5NVQ.js +8 -0
  22. package/cdn/chunks/chunk-R33OODNX.js +1 -0
  23. package/cdn/chunks/chunk-RXKI3AO4.js +1 -0
  24. package/cdn/chunks/chunk-TQBDBMWL.js +5 -0
  25. package/cdn/chunks/chunk-X2KBNXRO.js +6 -0
  26. package/cdn/chunks/chunk-XUJ7TXHW.js +1 -0
  27. package/cdn/exports/expression-result.js +0 -0
  28. package/cdn/exports/interaction.interface.js +0 -0
  29. package/cdn/exports/interaction.js +1 -0
  30. package/cdn/exports/item.context.js +1 -0
  31. package/cdn/exports/qti-assessment-item.context.js +1 -0
  32. package/cdn/exports/qti-condition-expression.js +1 -0
  33. package/cdn/exports/qti-expression.js +1 -0
  34. package/cdn/exports/variables.js +0 -0
  35. package/cdn/index.global.js +7 -58
  36. package/cdn/index.js +1 -1
  37. package/cdn/qti-components/index.js +1 -1
  38. package/cdn/qti-item/core/index.js +1 -1
  39. package/cdn/qti-loader/index.js +1 -1
  40. package/cdn/qti-test/components/index.js +1 -1
  41. package/cdn/qti-test/components/styles.js +1 -1
  42. package/cdn/qti-test/components/test-component.abstract.js +1 -1
  43. package/cdn/qti-test/components/test-item-link.js +1 -1
  44. package/cdn/qti-test/components/test-next.js +1 -1
  45. package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
  46. package/cdn/qti-test/components/test-prev.js +1 -1
  47. package/cdn/qti-test/components/test-view.js +1 -1
  48. package/cdn/qti-test/core/index.js +1 -1
  49. package/cdn/qti-transformers/index.js +1 -1
  50. package/dist/{chunk-ANLIJZBL.js → chunks/chunk-3EU75IUF.js} +4 -4
  51. package/dist/chunks/chunk-3EU75IUF.js.map +1 -0
  52. package/dist/{chunk-CNQYM52B.js → chunks/chunk-4GNVYCBN.js} +65 -7
  53. package/dist/chunks/chunk-4GNVYCBN.js.map +1 -0
  54. package/dist/{chunk-UB5K44DB.js → chunks/chunk-4O5F7WV7.js} +1 -1
  55. package/dist/chunks/chunk-4O5F7WV7.js.map +1 -0
  56. package/dist/{chunk-OO6JSYLP.js → chunks/chunk-6JXR63MH.js} +4 -4
  57. package/dist/chunks/chunk-6JXR63MH.js.map +1 -0
  58. package/dist/{chunk-4FH7P7YI.js → chunks/chunk-7QMCKYDR.js} +4 -4
  59. package/dist/chunks/chunk-7QMCKYDR.js.map +1 -0
  60. package/dist/{chunk-3TFUBCJW.js → chunks/chunk-A24F75DB.js} +4 -4
  61. package/dist/chunks/chunk-A24F75DB.js.map +1 -0
  62. package/dist/chunks/chunk-BPHQLJWE.js +102 -0
  63. package/dist/chunks/chunk-BPHQLJWE.js.map +1 -0
  64. package/dist/chunks/chunk-D3RGDWKP.js +37 -0
  65. package/dist/chunks/chunk-D3RGDWKP.js.map +1 -0
  66. package/dist/chunks/chunk-DLUJN2FW.js +22 -0
  67. package/dist/chunks/chunk-DLUJN2FW.js.map +1 -0
  68. package/dist/{chunk-4YG2FPKK.js → chunks/chunk-ELDMXTUQ.js} +1 -1
  69. package/dist/chunks/chunk-ELDMXTUQ.js.map +1 -0
  70. package/dist/chunks/chunk-FV7HWK54.js +29 -0
  71. package/dist/chunks/chunk-FV7HWK54.js.map +1 -0
  72. package/dist/{chunk-6SG3NMKU.js → chunks/chunk-GSWZT6N2.js} +4 -4
  73. package/dist/chunks/chunk-GSWZT6N2.js.map +1 -0
  74. package/dist/chunks/chunk-H2JE6IVU.js +15 -0
  75. package/dist/{chunk-QYN5S4EM.js → chunks/chunk-HHVRU3AJ.js} +5 -5
  76. package/dist/chunks/chunk-HHVRU3AJ.js.map +1 -0
  77. package/dist/{chunk-2CHF3TMY.js → chunks/chunk-J2SHENRN.js} +1 -1
  78. package/dist/{chunk-UBZPSVSE.js → chunks/chunk-K6ATVWMP.js} +5131 -5341
  79. package/dist/chunks/chunk-K6ATVWMP.js.map +1 -0
  80. package/dist/chunks/chunk-KOEILLVS.js +8 -0
  81. package/dist/chunks/chunk-KOEILLVS.js.map +1 -0
  82. package/dist/{chunk-F7HTXGGH.js → chunks/chunk-KYAIMBP5.js} +3 -3
  83. package/dist/chunks/chunk-KYAIMBP5.js.map +1 -0
  84. package/dist/{chunk-F3NTI6TX.js → chunks/chunk-UFYWCLXF.js} +1 -1
  85. package/dist/chunks/chunk-UFYWCLXF.js.map +1 -0
  86. package/dist/chunks/chunk-UN2IFSGC.js +1 -0
  87. package/dist/{chunk-2OA7E3E7.js → chunks/chunk-XDMSEAYC.js} +1 -1
  88. package/dist/chunks/chunk-XDMSEAYC.js.map +1 -0
  89. package/dist/chunks/chunk-XSI6FXGD.js +19 -0
  90. package/dist/chunks/chunk-XSI6FXGD.js.map +1 -0
  91. package/dist/chunks/chunk-ZPNJ2HP5.js +71 -0
  92. package/dist/chunks/chunk-ZPNJ2HP5.js.map +1 -0
  93. package/dist/exports/expression-result.d.ts +19 -0
  94. package/dist/exports/expression-result.js +1 -0
  95. package/dist/exports/expression-result.js.map +1 -0
  96. package/dist/exports/interaction.d.ts +23 -0
  97. package/dist/exports/interaction.interface.d.ts +13 -0
  98. package/dist/exports/interaction.interface.js +1 -0
  99. package/dist/exports/interaction.interface.js.map +1 -0
  100. package/dist/exports/interaction.js +8 -0
  101. package/dist/exports/interaction.js.map +1 -0
  102. package/dist/exports/item.context.d.ts +12 -0
  103. package/dist/exports/item.context.js +8 -0
  104. package/dist/exports/item.context.js.map +1 -0
  105. package/dist/exports/qti-assessment-item.context.d.ts +10 -0
  106. package/dist/exports/qti-assessment-item.context.js +8 -0
  107. package/dist/exports/qti-assessment-item.context.js.map +1 -0
  108. package/dist/exports/qti-condition-expression.d.ts +13 -0
  109. package/dist/exports/qti-condition-expression.js +10 -0
  110. package/dist/exports/qti-condition-expression.js.map +1 -0
  111. package/dist/exports/qti-expression.d.ts +21 -0
  112. package/dist/exports/qti-expression.js +9 -0
  113. package/dist/exports/qti-expression.js.map +1 -0
  114. package/dist/exports/variables.d.ts +3 -0
  115. package/dist/exports/variables.js +1 -0
  116. package/dist/exports/variables.js.map +1 -0
  117. package/dist/index.d.ts +12 -3
  118. package/dist/index.js +35 -28
  119. package/dist/qti-components/index.d.ts +36 -9
  120. package/dist/qti-components/index.js +10 -16
  121. package/dist/qti-components-jsx.d.ts +328 -623
  122. package/dist/qti-item/core/index.js +5 -5
  123. package/dist/qti-loader/index.d.ts +7 -1
  124. package/dist/qti-loader/index.js +5 -23
  125. package/dist/qti-loader/index.js.map +1 -1
  126. package/dist/{qti-simple-choice-DxWcdKHi.d.ts → qti-response-declaration-DAeBp8HH.d.ts} +463 -613
  127. package/dist/qti-test/components/index.d.ts +8 -2
  128. package/dist/qti-test/components/index.js +12 -11
  129. package/dist/qti-test/components/styles.js +2 -2
  130. package/dist/qti-test/components/test-component.abstract.d.ts +8 -2
  131. package/dist/qti-test/components/test-component.abstract.js +5 -4
  132. package/dist/qti-test/components/test-item-link.d.ts +8 -2
  133. package/dist/qti-test/components/test-item-link.js +7 -6
  134. package/dist/qti-test/components/test-next.d.ts +8 -2
  135. package/dist/qti-test/components/test-next.js +7 -6
  136. package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +8 -2
  137. package/dist/qti-test/components/test-paging-buttons-stamp.js +6 -5
  138. package/dist/qti-test/components/test-prev.d.ts +8 -2
  139. package/dist/qti-test/components/test-prev.js +7 -6
  140. package/dist/qti-test/components/test-view.d.ts +8 -2
  141. package/dist/qti-test/components/test-view.js +6 -5
  142. package/dist/qti-test/core/index.d.ts +15 -4
  143. package/dist/qti-test/core/index.js +6 -6
  144. package/dist/qti-transformers/index.js +2 -2
  145. package/dist/{test.context-DbSTxKk_.d.ts → test.context-CaENAJNk.d.ts} +4 -2
  146. package/dist/variables-cO3DzqJy.d.ts +33 -0
  147. package/dist/vscode.html-custom-data.json +208 -275
  148. package/package.json +14 -20
  149. package/cdn/chunk-4I75QSIL.js +0 -8
  150. package/cdn/chunk-5WCOPF7O.js +0 -73
  151. package/cdn/chunk-DC2R556M.js +0 -5
  152. package/cdn/chunk-GALSGMIP.js +0 -5
  153. package/cdn/chunk-KYOTSBCX.js +0 -1
  154. package/cdn/chunk-T4A5AZCI.js +0 -939
  155. package/cdn/chunk-VI2WKTN4.js +0 -1
  156. package/cdn/qti-components/index.global.js +0 -226
  157. package/cdn/qti-item/core/index.global.js +0 -149
  158. package/cdn/qti-loader/index.global.js +0 -1
  159. package/cdn/qti-test/components/index.global.js +0 -207
  160. package/cdn/qti-test/components/styles.global.js +0 -44
  161. package/cdn/qti-test/components/test-component.abstract.global.js +0 -170
  162. package/cdn/qti-test/components/test-item-link.global.js +0 -170
  163. package/cdn/qti-test/components/test-next.global.js +0 -170
  164. package/cdn/qti-test/components/test-next.spec.css +0 -1
  165. package/cdn/qti-test/components/test-next.spec.global.js +0 -64
  166. package/cdn/qti-test/components/test-next.spec.js +0 -713
  167. package/cdn/qti-test/components/test-paging-buttons-stamp.global.js +0 -207
  168. package/cdn/qti-test/components/test-prev.global.js +0 -170
  169. package/cdn/qti-test/components/test-view.global.js +0 -170
  170. package/cdn/qti-test/core/index.global.js +0 -205
  171. package/cdn/qti-transformers/index.global.js +0 -1
  172. package/dist/chunk-2OA7E3E7.js.map +0 -1
  173. package/dist/chunk-3TFUBCJW.js.map +0 -1
  174. package/dist/chunk-44VE5POH.js +0 -55
  175. package/dist/chunk-4FH7P7YI.js.map +0 -1
  176. package/dist/chunk-4YG2FPKK.js.map +0 -1
  177. package/dist/chunk-6SG3NMKU.js.map +0 -1
  178. package/dist/chunk-ANLIJZBL.js.map +0 -1
  179. package/dist/chunk-CNQYM52B.js.map +0 -1
  180. package/dist/chunk-F3NTI6TX.js.map +0 -1
  181. package/dist/chunk-F7HTXGGH.js.map +0 -1
  182. package/dist/chunk-MAC76UNI.js +0 -1
  183. package/dist/chunk-OO6JSYLP.js.map +0 -1
  184. package/dist/chunk-QYN5S4EM.js.map +0 -1
  185. package/dist/chunk-UB5K44DB.js.map +0 -1
  186. package/dist/chunk-UBZPSVSE.js.map +0 -1
  187. package/dist/qti-test/components/test-next.spec.css +0 -2481
  188. package/dist/qti-test/components/test-next.spec.css.map +0 -1
  189. package/dist/qti-test/components/test-next.spec.d.ts +0 -13
  190. package/dist/qti-test/components/test-next.spec.js +0 -45904
  191. package/dist/qti-test/components/test-next.spec.js.map +0 -1
  192. /package/cdn/{chunk-22HAPLRD.js → chunks/chunk-3GO57DNP.js} +0 -0
  193. /package/cdn/{chunk-LVW3MHTI.js → chunks/chunk-5FCXUJAG.js} +0 -0
  194. /package/cdn/{chunk-IXSX4SJX.js → chunks/chunk-6MCYE7P5.js} +0 -0
  195. /package/cdn/{chunk-M6AATWPS.js → chunks/chunk-FRS2J3OS.js} +0 -0
  196. /package/dist/{chunk-44VE5POH.js.map → chunks/chunk-H2JE6IVU.js.map} +0 -0
  197. /package/dist/{chunk-2CHF3TMY.js.map → chunks/chunk-J2SHENRN.js.map} +0 -0
  198. /package/dist/{chunk-MAC76UNI.js.map → chunks/chunk-UN2IFSGC.js.map} +0 -0
@@ -0,0 +1,8 @@
1
+ // src/lib/exports/qti-assessment-item.context.ts
2
+ import { createContext } from "@lit/context";
3
+ var itemContext = createContext(Symbol("item"));
4
+
5
+ export {
6
+ itemContext
7
+ };
8
+ //# sourceMappingURL=chunk-KOEILLVS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/exports/qti-assessment-item.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\nimport type { ItemContext } from './item.context';\n\nexport const itemContext = createContext<ItemContext>(Symbol('item'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAGvB,IAAM,cAAc,cAA2B,OAAO,MAAM,CAAC;","names":[]}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  TestComponent
3
- } from "./chunk-ANLIJZBL.js";
3
+ } from "./chunk-3EU75IUF.js";
4
4
  import {
5
5
  __decorateClass
6
- } from "./chunk-44VE5POH.js";
6
+ } from "./chunk-H2JE6IVU.js";
7
7
 
8
8
  // src/lib/qti-test/components/test-paging-buttons-stamp.ts
9
9
  import { html } from "lit";
@@ -75,4 +75,4 @@ TestPagingButtonsStamp = __decorateClass([
75
75
  export {
76
76
  TestPagingButtonsStamp
77
77
  };
78
- //# sourceMappingURL=chunk-F7HTXGGH.js.map
78
+ //# sourceMappingURL=chunk-KYAIMBP5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-paging-buttons-stamp.ts"],"sourcesContent":["import { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { TestComponent } from './test-component.abstract';\nimport { prepareTemplate } from 'stampino';\n\n@customElement('test-paging-buttons-stamp')\nexport class TestPagingButtonsStamp extends TestComponent {\n @property({ type: Number, attribute: 'max-displayed-items' })\n private maxDisplayedItems = 2;\n\n @property({ type: String, attribute: 'skip-on-category' })\n private skipOnCategory = 'dep-informational';\n\n protected createRenderRoot() {\n return this;\n }\n\n constructor() {\n super();\n this._internals.ariaLabel = 'pagination';\n }\n\n render() {\n const items = this._testContext.items.reduce(\n (acc, item) => {\n const isDepInfoItem = item.category?.split(' ').includes(this.skipOnCategory);\n const newIndex = isDepInfoItem ? 'i' : acc.counter++;\n acc.result.push({\n ...item,\n newIndex // Assign the new index, which only increments for non-info items\n });\n return acc;\n },\n { counter: 0, result: [] }\n ).result;\n\n // Get the index of the current item\n const itemIndex = items.findIndex(item => item.identifier === this._testContext.navItemId);\n\n // Calculate the start and end range based on maxDisplayedItems\n const start = Math.max(0, itemIndex - this.maxDisplayedItems);\n const end = Math.min(items.length, itemIndex + this.maxDisplayedItems + 1);\n\n // console.log('start', start, 'end', end);\n // Adjust the items array to only include the clamped range\n const clampedItems = items.slice(start, end);\n\n return html`\n ${clampedItems.map(item => {\n const rawscore = item.variables.find(vr => vr.identifier == 'SCORE');\n const score = parseInt(rawscore?.value?.toString());\n const completionStatus = item.variables.find(v => v.identifier === 'completionStatus')?.value;\n const type = item.category !== this.skipOnCategory ? 'regular' : 'info'; // rounded-full\n const active = this._testContext.navItemId === item.identifier; // !border-sky-600\n const correct =\n this._testContext.view === 'scorer' && type == 'regular' && score !== undefined && !isNaN(score) && score > 0; // bg-green-100 border-green-400\n const incorrect =\n this._testContext.view === 'scorer' &&\n type == 'regular' &&\n score !== undefined &&\n !isNaN(score) &&\n score <= 0; // bg-red-100 border-red-400\n const answered =\n this._testContext.view === 'candidate' &&\n completionStatus === 'completed' &&\n item.category !== this.skipOnCategory; // bg-slate-300 shadow-sm\n\n const computedItem = {\n ...item,\n type,\n active,\n correct,\n incorrect,\n answered\n };\n\n const templateElement = this.firstElementChild as HTMLTemplateElement;\n const myTemplate = prepareTemplate(templateElement);\n return myTemplate({ item: computedItem });\n })}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-paging-buttons-stamp': TestPagingButtonsStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,eAAe,gBAAgB;AAGxC,SAAS,uBAAuB;AAGzB,IAAM,yBAAN,cAAqC,cAAc;AAAA,EAWxD,cAAc;AACZ,UAAM;AAVR,SAAQ,oBAAoB;AAG5B,SAAQ,iBAAiB;AAQvB,SAAK,WAAW,YAAY;AAAA,EAC9B;AAAA,EAPU,mBAAmB;AAC3B,WAAO;AAAA,EACT;AAAA,EAOA,SAAS;AACP,UAAM,QAAQ,KAAK,aAAa,MAAM;AAAA,MACpC,CAAC,KAAK,SAAS;AACb,cAAM,gBAAgB,KAAK,UAAU,MAAM,GAAG,EAAE,SAAS,KAAK,cAAc;AAC5E,cAAM,WAAW,gBAAgB,MAAM,IAAI;AAC3C,YAAI,OAAO,KAAK;AAAA,UACd,GAAG;AAAA,UACH;AAAA;AAAA,QACF,CAAC;AACD,eAAO;AAAA,MACT;AAAA,MACA,EAAE,SAAS,GAAG,QAAQ,CAAC,EAAE;AAAA,IAC3B,EAAE;AAGF,UAAM,YAAY,MAAM,UAAU,UAAQ,KAAK,eAAe,KAAK,aAAa,SAAS;AAGzF,UAAM,QAAQ,KAAK,IAAI,GAAG,YAAY,KAAK,iBAAiB;AAC5D,UAAM,MAAM,KAAK,IAAI,MAAM,QAAQ,YAAY,KAAK,oBAAoB,CAAC;AAIzE,UAAM,eAAe,MAAM,MAAM,OAAO,GAAG;AAE3C,WAAO;AAAA,QACH,aAAa,IAAI,UAAQ;AACzB,YAAM,WAAW,KAAK,UAAU,KAAK,QAAM,GAAG,cAAc,OAAO;AACnE,YAAM,QAAQ,SAAS,UAAU,OAAO,SAAS,CAAC;AAClD,YAAM,mBAAmB,KAAK,UAAU,KAAK,OAAK,EAAE,eAAe,kBAAkB,GAAG;AACxF,YAAM,OAAO,KAAK,aAAa,KAAK,iBAAiB,YAAY;AACjE,YAAM,SAAS,KAAK,aAAa,cAAc,KAAK;AACpD,YAAM,UACJ,KAAK,aAAa,SAAS,YAAY,QAAQ,aAAa,UAAU,UAAa,CAAC,MAAM,KAAK,KAAK,QAAQ;AAC9G,YAAM,YACJ,KAAK,aAAa,SAAS,YAC3B,QAAQ,aACR,UAAU,UACV,CAAC,MAAM,KAAK,KACZ,SAAS;AACX,YAAM,WACJ,KAAK,aAAa,SAAS,eAC3B,qBAAqB,eACrB,KAAK,aAAa,KAAK;AAEzB,YAAM,eAAe;AAAA,QACnB,GAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAEA,YAAM,kBAAkB,KAAK;AAC7B,YAAM,aAAa,gBAAgB,eAAe;AAClD,aAAO,WAAW,EAAE,MAAM,aAAa,CAAC;AAAA,IAC1C,CAAC,CAAC;AAAA;AAAA,EAEN;AACF;AA1EU;AAAA,EADP,SAAS,EAAE,MAAM,QAAQ,WAAW,sBAAsB,CAAC;AAAA,GADjD,uBAEH;AAGA;AAAA,EADP,SAAS,EAAE,MAAM,QAAQ,WAAW,mBAAmB,CAAC;AAAA,GAJ9C,uBAKH;AALG,yBAAN;AAAA,EADN,cAAc,2BAA2B;AAAA,GAC7B;","names":[]}
@@ -7,4 +7,4 @@ export {
7
7
  testContext,
8
8
  testElement
9
9
  };
10
- //# sourceMappingURL=chunk-F3NTI6TX.js.map
10
+ //# sourceMappingURL=chunk-UFYWCLXF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/core/context/test.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\nimport type { QtiAssessmentTest } from '../qti-assessment-test';\nimport type { View } from '../mixins/test-view.mixin';\nimport type { VariableDeclaration } from '../../../exports/variables';\nimport type { ItemContext } from '../../../exports/item.context';\n\nexport interface TestContext {\n items: (ItemContext & { category?: string })[];\n testOutcomeVariables: VariableDeclaration<string | string[] | null>[];\n navPartId?: string | null;\n navSectionId?: string | null;\n navItemId?: string | null;\n navItemLoading?: boolean;\n navTestLoading?: boolean;\n view?: View;\n}\n\nexport const testContext = createContext<Readonly<TestContext>>(Symbol('test'));\n\nexport type TestElement = {\n el: QtiAssessmentTest;\n};\n\nexport const testElement = createContext<Readonly<TestElement>>(Symbol('testElement'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAiBvB,IAAM,cAAc,cAAqC,OAAO,MAAM,CAAC;AAMvE,IAAM,cAAc,cAAqC,OAAO,aAAa,CAAC;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-UN2IFSGC.js.map
@@ -291,4 +291,4 @@ export {
291
291
  qtiTransformManifest,
292
292
  qtiTransformTest
293
293
  };
294
- //# sourceMappingURL=chunk-2OA7E3E7.js.map
294
+ //# sourceMappingURL=chunk-XDMSEAYC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-transformers/qti-transformers.ts","../../src/lib/qti-transformers/qti-transform-item.ts","../../src/lib/qti-transformers/qti-transform-manifest.ts","../../src/lib/qti-transformers/qti-transform-test.ts"],"sourcesContent":["const xml = String.raw;\n\n/* <!-- convert CDATA to comments -->\n <xsl:template match=\"text()[contains(., 'CDATA')]\">\n <xsl:comment>\n <xsl:value-of select=\".\"/>\n </xsl:comment>\n</xsl:template>\n*/\n\n/*\n <!-- remove xml comments -->\n <xsl:template match=\"comment()\" />\n */\n\nconst xmlToHTML = xml`<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n<xsl:output method=\"html\" version=\"5.0\" encoding=\"UTF-8\" indent=\"yes\" />\n <xsl:template match=\"@*|node()\">\n <xsl:copy>\n <xsl:apply-templates select=\"@*|node()\"/>\n </xsl:copy>\n </xsl:template>\n\n <!-- remove existing namespaces -->\n <xsl:template match=\"*\">\n <!-- remove element prefix -->\n <xsl:element name=\"{local-name()}\">\n <!-- process attributes -->\n <xsl:for-each select=\"@*\">\n <!-- remove attribute prefix -->\n <xsl:attribute name=\"{local-name()}\">\n <xsl:value-of select=\".\"/>\n </xsl:attribute>\n </xsl:for-each>\n <xsl:apply-templates/>\n </xsl:element>\n</xsl:template>\n</xsl:stylesheet>`;\n\n// Function to extend elements with a specific tag name by adding an extension suffix\nexport function extendElementName(xmlFragment: XMLDocument, tagName: string, extension: string) {\n xmlFragment.querySelectorAll(tagName).forEach(element => {\n const newTagName = `${tagName}-${extension}`;\n const newElement = createElementWithNewTagName(element, newTagName);\n element.replaceWith(newElement);\n });\n}\n\n// Function to extend any element with a specific class pattern (e.g., \"extend:suffix\")\nexport function extendElementsWithClass(xmlFragment: XMLDocument, classNamePattern: string) {\n xmlFragment.querySelectorAll('*').forEach(element => {\n const classList = element.classList;\n if (classList) {\n classList.forEach(className => {\n if (className.startsWith(`${classNamePattern}:`)) {\n const suffix = className.slice(`${classNamePattern}:`.length);\n const newTagName = `${element.nodeName}-${suffix}`;\n const newElement = createElementWithNewTagName(element, newTagName);\n element.replaceWith(newElement);\n }\n });\n }\n });\n}\n\n// Helper function to create a new element with a new tag name and copy attributes and children\nfunction createElementWithNewTagName(element, newTagName) {\n const newElement = document.createElement(newTagName);\n // Copy attributes\n for (const attr of element.attributes) {\n newElement.setAttribute(attr.name, attr.value);\n }\n // Copy child nodes\n while (element.firstChild) {\n newElement.appendChild(element.firstChild);\n }\n return newElement;\n}\n\nexport function itemsFromTest(xmlFragment: DocumentFragment) {\n const items: { identifier: string; href: string; category: string }[] = [];\n xmlFragment.querySelectorAll('qti-assessment-item-ref').forEach(el => {\n const identifier = el.getAttribute('identifier');\n const href = el.getAttribute('href');\n const category = el.getAttribute('category');\n items.push({ identifier, href, category });\n });\n return items;\n}\n\nlet currentRequest: XMLHttpRequest | null = null;\n\nexport function loadXML(url, cancelPreviousRequest = false) {\n if (cancelPreviousRequest && currentRequest !== null) {\n currentRequest.abort(); // Abort the ongoing request if there is one\n }\n\n return new Promise<XMLDocument | null>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n currentRequest = xhr; // Store the current request\n\n xhr.open('GET', url, true);\n xhr.responseType = 'document';\n\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve(xhr.responseXML);\n } else {\n reject(xhr.statusText);\n }\n };\n\n xhr.onerror = () => {\n reject(xhr.statusText);\n };\n\n xhr.send();\n });\n}\n\nexport function parseXML(xmlDocument: string) {\n const parser = new DOMParser();\n const xmlFragment = parser.parseFromString(xmlDocument, 'text/xml');\n return xmlFragment;\n}\n\nexport function toHTML(xmlFragment: Document): DocumentFragment {\n const processor = new XSLTProcessor();\n const xsltDocument = new DOMParser().parseFromString(xmlToHTML, 'text/xml');\n processor.importStylesheet(xsltDocument);\n const itemHTMLFragment = processor.transformToFragment(xmlFragment, document);\n return itemHTMLFragment;\n}\n\nexport function setLocation(xmlFragment: DocumentFragment, location: string) {\n if (!location.endsWith('/')) {\n location += '/';\n }\n\n xmlFragment.querySelectorAll('[src],[href],[primary-path]').forEach(elWithSrc => {\n let attr: 'src' | 'href' | 'primary-path' | '' = '';\n\n if (elWithSrc.getAttribute('src')) {\n attr = 'src';\n }\n if (elWithSrc.getAttribute('href')) {\n attr = 'href';\n }\n if (elWithSrc.getAttribute('primary-path')) {\n attr = 'primary-path';\n }\n const attrValue = elWithSrc.getAttribute(attr)?.trim();\n\n if (!attrValue.startsWith('data:') && !attrValue.startsWith('http')) {\n const newSrcValue = location + encodeURI(attrValue);\n elWithSrc.setAttribute(attr, newSrcValue);\n }\n });\n}\n\nexport function convertCDATAtoComment(xmlFragment: DocumentFragment) {\n const cdataElements = xmlFragment.querySelectorAll('qti-custom-operator[class=\"js.org\"] > qti-base-value');\n cdataElements.forEach(element => {\n const commentText = document.createComment(element.textContent);\n element.replaceChild(commentText, element.firstChild);\n });\n}\n\nexport function stripStyleSheets(xmlFragment: DocumentFragment) {\n // remove qti-stylesheet tag\n xmlFragment.querySelectorAll('qti-stylesheet').forEach(stylesheet => stylesheet.remove());\n}\n","/**\n * Browser based QTI-XML to HTML transformer.\n * Returns an object with methods to load, parse, transform and serialize QTI XML items.\n * @returns An object with methods to load, parse, transform and serialize QTI XML items.\n * @example\n * const qtiTransformer = qtiTransformItem();\n * await qtiTransformer.load('path/to/xml/file.xml');\n * qtiTransformer.path('/assessmentItem/itemBody');\n * const html = qtiTransformer.html();\n * const xml = qtiTransformer.xml();\n * const htmldoc = qtiTransformer.htmldoc();\n * const xmldoc = qtiTransformer.xmldoc();\n *\n * qtiTransformItem().parse(storyXML).html()\n */\n\nimport {\n convertCDATAtoComment,\n extendElementName,\n extendElementsWithClass,\n loadXML,\n parseXML,\n setLocation,\n stripStyleSheets,\n toHTML\n} from './qti-transformers';\n\nexport type transformItemApi = {\n load: (uri: string, cancelPreviousRequest?: boolean) => Promise<transformItemApi>;\n parse: (xmlString: string) => transformItemApi;\n path: (location: string) => transformItemApi;\n fn: (fn: (xmlFragment: XMLDocument) => void) => transformItemApi;\n pciHooks: (uri: string) => transformItemApi;\n extendElementName: (elementName: string, extend: string) => transformItemApi;\n extendElementsWithClass: (param?: string) => transformItemApi;\n customInteraction: (baseRef: string, baseItem: string) => transformItemApi;\n convertCDATAtoComment: () => transformItemApi;\n stripStyleSheets: () => transformItemApi;\n html: () => string;\n xml: () => string;\n htmlDoc: () => DocumentFragment;\n xmlDoc: () => XMLDocument;\n};\n\nexport const qtiTransformItem = () => {\n let xmlFragment: XMLDocument;\n\n const api: transformItemApi = {\n async load(uri: string, cancelPreviousRequest = false): Promise<typeof api> {\n return new Promise<typeof api>(resolve => {\n loadXML(uri, cancelPreviousRequest).then(xml => {\n xmlFragment = xml;\n // set the base path for images and other resources,\n // you probably want to set the base path to the document root else you can use the path method to set it\n api.path(uri.substring(0, uri.lastIndexOf('/')));\n return resolve(api);\n });\n });\n },\n parse(xmlString: string): typeof api {\n xmlFragment = parseXML(xmlString);\n return api;\n },\n path: (location: string): typeof api => {\n setLocation(xmlFragment, location);\n return api;\n },\n fn(fn: (xmlFragment: XMLDocument) => void): typeof api {\n fn(xmlFragment);\n return api;\n },\n pciHooks(uri: string): typeof api {\n const attributes = ['hook', 'module'];\n const documentPath = uri.substring(0, uri.lastIndexOf('/'));\n for (const attribute of attributes) {\n const srcAttributes = xmlFragment.querySelectorAll('[' + attribute + ']');\n srcAttributes.forEach(node => {\n const srcValue = node.getAttribute(attribute)!;\n if (!srcValue.startsWith('data:') && !srcValue.startsWith('http')) {\n // Just paste the relative path of the src location after the documentrootPath\n // old pcis can have a .js, new pci's don't\n node.setAttribute('base-url', uri);\n node.setAttribute(\n 'module',\n documentPath + '/' + encodeURI(srcValue + (srcValue.endsWith('.js') ? '' : '.js'))\n );\n }\n });\n }\n return api;\n },\n extendElementName: (tagName: string, extension: string): typeof api => {\n extendElementName(xmlFragment, tagName, extension);\n return api;\n },\n extendElementsWithClass: (param: string = 'extend'): typeof api => {\n extendElementsWithClass(xmlFragment, param);\n return api;\n },\n customInteraction(baseRef: string, baseItem: string): typeof api {\n const qtiCustomInteraction = xmlFragment.querySelector('qti-custom-interaction');\n const qtiCustomInteractionObject = qtiCustomInteraction.querySelector('object');\n\n qtiCustomInteraction.setAttribute('data-base-ref', baseRef);\n qtiCustomInteraction.setAttribute('data-base-item', baseRef + baseItem);\n qtiCustomInteraction.setAttribute('data', qtiCustomInteractionObject.getAttribute('data'));\n qtiCustomInteraction.setAttribute('width', qtiCustomInteractionObject.getAttribute('width'));\n qtiCustomInteraction.setAttribute('height', qtiCustomInteractionObject.getAttribute('height'));\n\n qtiCustomInteraction.removeChild(qtiCustomInteractionObject);\n return api;\n },\n convertCDATAtoComment(): typeof api {\n convertCDATAtoComment(xmlFragment);\n return api;\n },\n stripStyleSheets(): typeof api {\n stripStyleSheets(xmlFragment);\n return api;\n },\n html() {\n return new XMLSerializer().serializeToString(toHTML(xmlFragment));\n },\n xml(): string {\n return new XMLSerializer().serializeToString(xmlFragment);\n },\n htmlDoc() {\n return toHTML(xmlFragment);\n },\n xmlDoc(): XMLDocument {\n return xmlFragment; // new XMLSerializer().serializeToString(xmlFragment);\n }\n };\n return api;\n};\n","import { loadXML, parseXML } from './qti-transformers';\n\nexport const qtiTransformManifest = (): {\n load: (uri: string) => Promise<typeof api>;\n assessmentTest: () => { href: string; identifier: string };\n} => {\n let xmlFragment: XMLDocument;\n\n const api = {\n async load(uri) {\n return new Promise<typeof api>(resolve => {\n loadXML(uri).then(xml => {\n xmlFragment = xml;\n return resolve(api);\n });\n });\n },\n parse(xmlString: string) {\n xmlFragment = parseXML(xmlString);\n },\n assessmentTest() {\n const el = xmlFragment.querySelector('resource[type=\"imsqti_test_xmlv3p0\"]');\n return { href: el.getAttribute('href'), identifier: el.getAttribute('identifier') };\n }\n };\n return api;\n};\n","/**\n * Returns an object with methods to load, parse and transform QTI tests.\n * @returns An object with methods to load, parse and transform QTI tests.\n * @example\n * const qtiTransformer = qtiTransformTest();\n * await qtiTransformer.load('https://example.com/test.xml');\n * const items = qtiTransformer.items();\n * const html = qtiTransformer.html();\n * const xml = qtiTransformer.xml();\n */\n\nimport { itemsFromTest, loadXML, parseXML, setLocation, toHTML } from './qti-transformers';\n\nexport type transformTestApi = {\n load: (uri: string) => Promise<transformTestApi>;\n parse: (xmlString: string) => transformTestApi;\n path: (location: string) => transformTestApi;\n fn: (fn: (xmlFragment: XMLDocument) => void) => transformTestApi;\n items: () => { identifier: string; href: string; category: string }[];\n html: () => string;\n xml: () => string;\n htmlDoc: () => DocumentFragment;\n xmlDoc: () => XMLDocument;\n};\n\nexport const qtiTransformTest = (): transformTestApi => {\n let xmlFragment: XMLDocument;\n\n const api: transformTestApi = {\n async load(uri) {\n return new Promise<transformTestApi>((resolve, _) => {\n loadXML(uri).then(xml => {\n xmlFragment = xml;\n\n api.path(uri.substring(0, uri.lastIndexOf('/')));\n return resolve(api);\n });\n });\n },\n parse(xmlString: string) {\n xmlFragment = parseXML(xmlString);\n return api;\n },\n path: (location: string): typeof api => {\n setLocation(xmlFragment, location);\n return api;\n },\n fn(fn: (xmlFragment: XMLDocument) => void) {\n fn(xmlFragment);\n return api;\n },\n items() {\n return itemsFromTest(xmlFragment);\n },\n html() {\n return new XMLSerializer().serializeToString(toHTML(xmlFragment));\n },\n xml(): string {\n return new XMLSerializer().serializeToString(xmlFragment);\n },\n htmlDoc() {\n return toHTML(xmlFragment);\n },\n xmlDoc(): XMLDocument {\n return xmlFragment;\n }\n };\n return api;\n};\n"],"mappings":";AAAA,IAAM,MAAM,OAAO;AAenB,IAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBX,SAAS,kBAAkB,aAA0B,SAAiB,WAAmB;AAC9F,cAAY,iBAAiB,OAAO,EAAE,QAAQ,aAAW;AACvD,UAAM,aAAa,GAAG,OAAO,IAAI,SAAS;AAC1C,UAAM,aAAa,4BAA4B,SAAS,UAAU;AAClE,YAAQ,YAAY,UAAU;AAAA,EAChC,CAAC;AACH;AAGO,SAAS,wBAAwB,aAA0B,kBAA0B;AAC1F,cAAY,iBAAiB,GAAG,EAAE,QAAQ,aAAW;AACnD,UAAM,YAAY,QAAQ;AAC1B,QAAI,WAAW;AACb,gBAAU,QAAQ,eAAa;AAC7B,YAAI,UAAU,WAAW,GAAG,gBAAgB,GAAG,GAAG;AAChD,gBAAM,SAAS,UAAU,MAAM,GAAG,gBAAgB,IAAI,MAAM;AAC5D,gBAAM,aAAa,GAAG,QAAQ,QAAQ,IAAI,MAAM;AAChD,gBAAM,aAAa,4BAA4B,SAAS,UAAU;AAClE,kBAAQ,YAA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ACF;AACA,SAAO;AACT;;;ACDO,IAAM,mBAAmB,MAAwB;AACtD,MAAI;AAEJ,QAAM,MAAwB;AAAA,IAC5B,MAAM,KAAK,KAAK;AACd,aAAO,IAAI,QAA0B,CAAC,SAAS,MAAM;AACnD,gBAAQ,GAAG,EAAE,KAAK,CAAAC,SAAO;AACvB,wBAAcA;AAEd,cAAI,KAAK,IAAI,UAAU,GAAG,IAAI,YAAY,GAAG,CAAC,CAAC;AAC/C,iBAAO,QAAQ,GAAG;AAAA,QACpB,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,IACA,MAAM,WAAmB;AACvB,oBAAc,SAAS,SAAS;AAChC,aAAO;AAAA,IACT;AAAA,IACA,MAAM,CAAC,aAAiC;AACtC,kBAAY,aAAa,QAAQ;AACjC,aAAO;AAAA,IACT;AAAA,IACA,GAAG,IAAwC;AACzC,SAAG,WAAW;AACd,aAAO;AAAA,IACT;AAAA,IACA,QAAQ;AACN,aAAO,cAAc,WAAW;AAAA,IAClC;AAAA,IACA,OAAO;AACL,aAAO,IAAI,cAAc,EAAE,kBAAkB,OAAO,WAAW,CAAC;AAAA,IAClE;AAAA,IACA,MAAc;AACZ,aAAO,IAAI,cAAc,EAAE,kBAAkB,WAAW;AAAA,IAC1D;AAAA,IACA,UAAU;AACR,aAAO,OAAO,WAAW;AAAA,IAC3B;AAAA,IACA,SAAsB;AACpB,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;","names":["xml","xml","xml"]}
@@ -0,0 +1,19 @@
1
+ import {
2
+ QtiExpression
3
+ } from "./chunk-BPHQLJWE.js";
4
+
5
+ // src/lib/exports/qti-condition-expression.ts
6
+ var QtiConditionExpression = class extends QtiExpression {
7
+ calculate() {
8
+ this.result = this.getResult();
9
+ return this.result;
10
+ }
11
+ getResult() {
12
+ throw new Error("Not implemented");
13
+ }
14
+ };
15
+
16
+ export {
17
+ QtiConditionExpression
18
+ };
19
+ //# sourceMappingURL=chunk-XSI6FXGD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/exports/qti-condition-expression.ts"],"sourcesContent":["import { QtiExpression } from './qti-expression';\n\nexport abstract class QtiConditionExpression extends QtiExpression<boolean> {\n public calculate(): Readonly<boolean> {\n this.result = this.getResult();\n return this.result;\n }\n\n public getResult(): Readonly<boolean> {\n throw new Error('Not implemented');\n }\n}\n"],"mappings":";;;;;AAEO,IAAe,yBAAf,cAA8C,cAAuB;AAAA,EACnE,YAA+B;AACpC,SAAK,SAAS,KAAK,UAAU;AAC7B,WAAO,KAAK;AAAA,EACd;AAAA,EAEO,YAA+B;AACpC,UAAM,IAAI,MAAM,iBAAiB;AAAA,EACnC;AACF;","names":[]}
@@ -0,0 +1,71 @@
1
+ import {
2
+ __decorateClass
3
+ } from "./chunk-H2JE6IVU.js";
4
+
5
+ // src/lib/exports/interaction.ts
6
+ import { property, state } from "lit/decorators.js";
7
+ import { LitElement } from "lit";
8
+ var Interaction = class extends LitElement {
9
+ constructor() {
10
+ super();
11
+ this.disabled = false;
12
+ this.readonly = false;
13
+ this._internals = this.attachInternals();
14
+ }
15
+ reportValidity() {
16
+ return this._internals.reportValidity();
17
+ }
18
+ reset() {
19
+ this.value = "";
20
+ }
21
+ get correctResponse() {
22
+ return this._correctResponse;
23
+ }
24
+ set correctResponse(value) {
25
+ this._correctResponse = value;
26
+ }
27
+ connectedCallback() {
28
+ super.connectedCallback();
29
+ this.dispatchEvent(
30
+ new CustomEvent("qti-register-interaction", {
31
+ bubbles: true,
32
+ composed: true,
33
+ cancelable: false,
34
+ detail: {
35
+ responseIdentifier: this.responseIdentifier
36
+ }
37
+ })
38
+ );
39
+ }
40
+ saveResponse(value) {
41
+ this.dispatchEvent(
42
+ new CustomEvent("qti-interaction-response", {
43
+ bubbles: true,
44
+ composed: true,
45
+ cancelable: false,
46
+ detail: {
47
+ responseIdentifier: this.responseIdentifier,
48
+ response: Array.isArray(value) ? [...value] : value
49
+ }
50
+ })
51
+ );
52
+ }
53
+ };
54
+ Interaction.formAssociated = true;
55
+ __decorateClass([
56
+ property({ type: String, attribute: "response-identifier" })
57
+ ], Interaction.prototype, "responseIdentifier", 2);
58
+ __decorateClass([
59
+ property({ reflect: true, type: Boolean })
60
+ ], Interaction.prototype, "disabled", 2);
61
+ __decorateClass([
62
+ property({ reflect: true, type: Boolean })
63
+ ], Interaction.prototype, "readonly", 2);
64
+ __decorateClass([
65
+ state()
66
+ ], Interaction.prototype, "_correctResponse", 2);
67
+
68
+ export {
69
+ Interaction
70
+ };
71
+ //# sourceMappingURL=chunk-ZPNJ2HP5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/exports/interaction.ts"],"sourcesContent":["import { property, state } from 'lit/decorators.js';\nimport { LitElement } from 'lit';\nimport type { IInteraction } from './interaction.interface';\n\nexport abstract class Interaction extends LitElement implements IInteraction {\n static formAssociated = true;\n\n @property({ type: String, attribute: 'response-identifier' }) responseIdentifier;\n\n @property({ reflect: true, type: Boolean }) disabled = false;\n\n @property({ reflect: true, type: Boolean }) readonly = false;\n\n @state()\n protected _correctResponse: string | string[];\n protected _internals: ElementInternals;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n abstract validate(): boolean;\n\n public reportValidity(): boolean {\n return this._internals.reportValidity();\n }\n\n public reset(): void {\n this.value = '';\n }\n\n abstract get value(): string | string[] | null;\n abstract set value(val: string | string[] | null);\n\n public get correctResponse(): string | string[] {\n return this._correctResponse;\n }\n set correctResponse(value: string | string[]) {\n this._correctResponse = value;\n }\n\n public override connectedCallback() {\n super.connectedCallback();\n\n this.dispatchEvent(\n new CustomEvent('qti-register-interaction', {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: {\n responseIdentifier: this.responseIdentifier\n }\n })\n );\n }\n\n public saveResponse(value: string | string[]) {\n this.dispatchEvent(\n new CustomEvent('qti-interaction-response', {\n bubbles: true,\n composed: true,\n cancelable: false,\n detail: {\n responseIdentifier: this.responseIdentifier,\n response: Array.isArray(value) ? [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AC;AAAA,GAPtB,YAOwB;AAGlC;AAAA,EADT,MAAM;AAAA,GATa,YAUV;","names":[]}
@@ -0,0 +1,19 @@
1
+ interface directedPair {
2
+ destination: string;
3
+ source: string;
4
+ }
5
+ interface ResponseInteraction {
6
+ responseIdentifier: string;
7
+ response: string | string[];
8
+ }
9
+ interface Calculate {
10
+ calculate: () => string | string[];
11
+ }
12
+ type float = number;
13
+ type integer = number;
14
+ type BaseType = 'boolean' | 'directedPair' | 'duration' | 'float' | 'integer' | 'string' | 'identifier' | 'pair';
15
+ type Multiple = string | string[][];
16
+ type Ordered = string | string[][];
17
+ type Cardinality = 'multiple' | 'ordered' | 'single';
18
+
19
+ export type { BaseType, Calculate, Cardinality, Multiple, Ordered, ResponseInteraction, directedPair, float, integer };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=expression-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,23 @@
1
+ import { LitElement } from 'lit';
2
+ import { IInteraction } from './interaction.interface.js';
3
+
4
+ declare abstract class Interaction extends LitElement implements IInteraction {
5
+ static formAssociated: boolean;
6
+ responseIdentifier: any;
7
+ disabled: boolean;
8
+ readonly: boolean;
9
+ protected _correctResponse: string | string[];
10
+ protected _internals: ElementInternals;
11
+ constructor();
12
+ abstract validate(): boolean;
13
+ reportValidity(): boolean;
14
+ reset(): void;
15
+ abstract get value(): string | string[] | null;
16
+ abstract set value(val: string | string[] | null);
17
+ get correctResponse(): string | string[];
18
+ set correctResponse(value: string | string[]);
19
+ connectedCallback(): void;
20
+ saveResponse(value: string | string[]): void;
21
+ }
22
+
23
+ export { Interaction };
@@ -0,0 +1,13 @@
1
+ interface IInteraction {
2
+ correctResponse: Readonly<string | string[]>;
3
+ value: string | string[];
4
+ responseIdentifier: string;
5
+ disabled: boolean;
6
+ readonly: boolean;
7
+ validate(): boolean;
8
+ reportValidity(): boolean;
9
+ reset(): void;
10
+ saveResponse(value: string | string[]): void;
11
+ }
12
+
13
+ export type { IInteraction };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=interaction.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,8 @@
1
+ import {
2
+ Interaction
3
+ } from "../chunks/chunk-ZPNJ2HP5.js";
4
+ import "../chunks/chunk-H2JE6IVU.js";
5
+ export {
6
+ Interaction
7
+ };
8
+ //# sourceMappingURL=interaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,12 @@
1
+ import { V as VariableDeclaration } from '../variables-cO3DzqJy.js';
2
+ import 'lit';
3
+ import './expression-result.js';
4
+
5
+ interface ItemContext {
6
+ href?: string;
7
+ identifier: string;
8
+ variables: ReadonlyArray<VariableDeclaration<string | string[] | null>>;
9
+ }
10
+ declare const itemContextVariables: VariableDeclaration<string | string[]>[];
11
+
12
+ export { type ItemContext, itemContextVariables };
@@ -0,0 +1,8 @@
1
+ import {
2
+ itemContextVariables
3
+ } from "../chunks/chunk-DLUJN2FW.js";
4
+ import "../chunks/chunk-H2JE6IVU.js";
5
+ export {
6
+ itemContextVariables
7
+ };
8
+ //# sourceMappingURL=item.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,10 @@
1
+ import { ItemContext } from './item.context.js';
2
+ import '../variables-cO3DzqJy.js';
3
+ import 'lit';
4
+ import './expression-result.js';
5
+
6
+ declare const itemContext: {
7
+ __context__: ItemContext;
8
+ };
9
+
10
+ export { itemContext };
@@ -0,0 +1,8 @@
1
+ import {
2
+ itemContext
3
+ } from "../chunks/chunk-KOEILLVS.js";
4
+ import "../chunks/chunk-H2JE6IVU.js";
5
+ export {
6
+ itemContext
7
+ };
8
+ //# sourceMappingURL=qti-assessment-item.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,13 @@
1
+ import { QtiExpression } from './qti-expression.js';
2
+ import 'lit-html';
3
+ import 'lit';
4
+ import '../variables-cO3DzqJy.js';
5
+ import './expression-result.js';
6
+ import './item.context.js';
7
+
8
+ declare abstract class QtiConditionExpression extends QtiExpression<boolean> {
9
+ calculate(): Readonly<boolean>;
10
+ getResult(): Readonly<boolean>;
11
+ }
12
+
13
+ export { QtiConditionExpression };
@@ -0,0 +1,10 @@
1
+ import {
2
+ QtiConditionExpression
3
+ } from "../chunks/chunk-XSI6FXGD.js";
4
+ import "../chunks/chunk-BPHQLJWE.js";
5
+ import "../chunks/chunk-KOEILLVS.js";
6
+ import "../chunks/chunk-H2JE6IVU.js";
7
+ export {
8
+ QtiConditionExpression
9
+ };
10
+ //# sourceMappingURL=qti-condition-expression.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,21 @@
1
+ import * as lit_html from 'lit-html';
2
+ import * as lit from 'lit';
3
+ import { LitElement } from 'lit';
4
+ import { V as VariableDeclaration } from '../variables-cO3DzqJy.js';
5
+ import { ItemContext } from './item.context.js';
6
+ import './expression-result.js';
7
+
8
+ interface QtiExpressionBase<T> {
9
+ calculate(): Readonly<T>;
10
+ }
11
+ declare abstract class QtiExpression<T> extends LitElement implements QtiExpressionBase<T> {
12
+ protected result: any;
13
+ static styles: lit.CSSResult;
14
+ render(): lit_html.TemplateResult<1>;
15
+ calculate(): Readonly<T>;
16
+ protected getResult(): Readonly<T>;
17
+ protected context?: ItemContext;
18
+ getVariables: () => VariableDeclaration<number | string | (number | string)[] | null>[];
19
+ }
20
+
21
+ export { QtiExpression, type QtiExpressionBase };
@@ -0,0 +1,9 @@
1
+ import {
2
+ QtiExpression
3
+ } from "../chunks/chunk-BPHQLJWE.js";
4
+ import "../chunks/chunk-KOEILLVS.js";
5
+ import "../chunks/chunk-H2JE6IVU.js";
6
+ export {
7
+ QtiExpression
8
+ };
9
+ //# sourceMappingURL=qti-expression.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,3 @@
1
+ export { O as OutcomeVariable, R as ResponseVariable, V as VariableDeclaration, a as VariableValue } from '../variables-cO3DzqJy.js';
2
+ import './expression-result.js';
3
+ import 'lit';
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=variables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- export { m as ActiveElementMixin, A as ActiveElementMixinInterface, B as BaseType, C as Calculate, c as Cardinality, l as ChoiceInterface, aj as Interaction, I as InteractionChangedDetails, af as ItemContext, M as Multiple, b as Ordered, F as Orientation, O as OutcomeChangedDetails, g as OutcomeVariable, P as QtiAnd, j as QtiAssessmentItem, k as QtiAssessmentStimulusRef, ak as QtiAssociableHotspot, a1 as QtiAssociateInteraction, G as QtiChoiceInteraction, s as QtiCompanionMaterialsInfo, T as QtiConditionExpression, t as QtiContentBody, a2 as QtiCustomInteraction, ai as QtiCustomOperator, a3 as QtiEndAttemptInteraction, W as QtiExpression, U as QtiExpressionBase, y as QtiExtendedTextInteraction, v as QtiFeedbackBlock, w as QtiFeedbackInline, al as QtiGap, am as QtiGapImg, a4 as QtiGapMatchInteraction, an as QtiGapText, a5 as QtiGraphicAssociateInteraction, a6 as QtiGraphicGapMatchInteraction, a7 as QtiGraphicOrderInteraction, ao as QtiHotspotChoice, a8 as QtiHotspotInteraction, ap as QtiHottext, D as QtiHottextInteraction, aq as QtiInlineChoice, E as QtiInlineChoiceInteraction, Q as QtiInteractionChanged, n as QtiItemBody, N as QtiLookupOutcomeValue, X as QtiMapping, a9 as QtiMatchInteraction, aa as QtiMediaInteraction, x as QtiModalFeedback, ab as QtiOrderInteraction, a as QtiOutcomeChanged, q as QtiOutcomeDeclaration, J as QtiOutcomeProcessing, K as QtiOutcomeProcessingProcessor, a0 as QtiPortableCustomInteraction, ac as QtiPositionObjectStage, o as QtiPrompt, r as QtiResponseDeclaration, L as QtiResponseProcessing, u as QtiRubricBlock, _ as QtiRule, $ as QtiRuleBase, ad as QtiSelectPointInteraction, ar as QtiSimpleAssociableChoice, as as QtiSimpleChoice, ae as QtiSliderInteraction, p as QtiStylesheet, Y as QtiSubtract, z as QtiTextEntryInteraction, H as QtiUploadInteraction, R as ResponseInteraction, h as ResponseVariable, e as VariableDeclaration, V as VariableValue, d as directedPair, f as float, i as integer, ah as itemContext, ag as itemContextVariables, S as qtiAndMixin, Z as qtiSubtractMixin } from './qti-simple-choice-DxWcdKHi.js';
2
- export { QtiBaseValue, QtiContains, QtiCorrect, QtiEqual, QtiEqualRounded, QtiGt, QtiGte, QtiIsNull, QtiLt, QtiLte, QtiMapResponse, QtiMatch, QtiMember, QtiMultiple, QtiNot, QtiOr, QtiOrdered, QtiPositionObjectInteraction, QtiPrintedVariable, QtiProduct, QtiResponseCondition, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiSetOutcomeValue, QtiSetOutcomeValueRule, QtiStringMatch, QtiSum, QtiSumExpression, QtiVariable } from './qti-components/index.js';
1
+ export { O as Orientation, Q as QtiAssessmentItem, a as QtiAssessmentStimulusRef, g as QtiAssociableHotspot, h as QtiAssociateInteraction, i as QtiChoiceInteraction, b as QtiCompanionMaterialsInfo, W as QtiContentBody, j as QtiCustomInteraction, c as QtiCustomOperator, k as QtiEndAttemptInteraction, l as QtiExtendedTextInteraction, d as QtiFeedbackBlock, e as QtiFeedbackInline, p as QtiGap, m as QtiGapImg, n as QtiGapMatchInteraction, o as QtiGapText, q as QtiGraphicAssociateInteraction, r as QtiGraphicGapMatchInteraction, s as QtiGraphicOrderInteraction, t as QtiHotspotChoice, u as QtiHotspotInteraction, w as QtiHottext, v as QtiHottextInteraction, y as QtiInlineChoice, x as QtiInlineChoiceInteraction, K as QtiItemBody, R as QtiLookupOutcomeValue, z as QtiMatchInteraction, A as QtiMediaInteraction, f as QtiModalFeedback, B as QtiOrderInteraction, Z as QtiOutcomeDeclaration, L as QtiOutcomeProcessing, M as QtiOutcomeProcessingProcessor, C as QtiPortableCustomInteraction, D as QtiPositionObjectStage, N as QtiPrompt, _ as QtiResponseDeclaration, P as QtiResponseProcessing, X as QtiRubricBlock, U as QtiRule, V as QtiRuleBase, E as QtiSelectPointInteraction, F as QtiSimpleAssociableChoice, G as QtiSimpleChoice, H as QtiSliderInteraction, Y as QtiStylesheet, S as QtiSubtract, I as QtiTextEntryInteraction, J as QtiUploadInteraction, T as qtiSubtractMixin } from './qti-response-declaration-DAeBp8HH.js';
2
+ export { QtiAnd, QtiBaseValue, QtiContains, QtiCorrect, QtiEqual, QtiEqualRounded, QtiGt, QtiGte, QtiIsNull, QtiLt, QtiLte, QtiMapResponse, QtiMatch, QtiMember, QtiMultiple, QtiNot, QtiOr, QtiOrdered, QtiPositionObjectInteraction, QtiPrintedVariable, QtiProduct, QtiResponseCondition, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiSetOutcomeValue, QtiSetOutcomeValueRule, QtiStringMatch, QtiSum, QtiSumExpression, QtiVariable, qtiAndMixin } from './qti-components/index.js';
3
+ export { Q as QtiMapping } from './variables-cO3DzqJy.js';
3
4
  export { QtiTest, TestContainer } from './qti-test/core/index.js';
4
- export { Q as QtiAssessmentItemRef, a as QtiAssessmentSection, b as QtiAssessmentTest, c as QtiTestPart, T as TestContext, d as TestElement, t as testContext, e as testElement } from './test.context-DbSTxKk_.js';
5
+ export { Q as QtiAssessmentItemRef, a as QtiAssessmentSection, b as QtiAssessmentTest, c as QtiTestPart, T as TestContext, d as TestElement, t as testContext, e as testElement } from './test.context-CaENAJNk.js';
5
6
  export { TestComponent } from './qti-test/components/test-component.abstract.js';
6
7
  export { TestNext } from './qti-test/components/test-next.js';
7
8
  export { TestPrev } from './qti-test/components/test-prev.js';
@@ -9,6 +10,14 @@ export { TestView } from './qti-test/components/test-view.js';
9
10
  export { TestItemLink } from './qti-test/components/test-item-link.js';
10
11
  export { TestPagingButtonsStamp } from './qti-test/components/test-paging-buttons-stamp.js';
11
12
  export { ItemContainer, QtiItem } from './qti-item/core/index.js';
13
+ export { ManifestInfo, getItemByUri, getManifestInfo } from './qti-loader/index.js';
14
+ export { qtiTransformItem, qtiTransformManifest, qtiTransformTest, transformItemApi, transformTestApi } from './qti-transformers/index.js';
12
15
  import 'lit-html';
13
16
  import 'lit';
17
+ import './exports/expression-result.js';
18
+ import './exports/interaction.interface.js';
19
+ import './exports/interaction.js';
14
20
  import 'lit-html/directives/ref.js';
21
+ import './exports/qti-expression.js';
22
+ import './exports/item.context.js';
23
+ import './exports/qti-condition-expression.js';
package/dist/index.js CHANGED
@@ -5,10 +5,8 @@ import {
5
5
  QtiTest,
6
6
  QtiTestPart,
7
7
  TestContainer
8
- } from "./chunk-CNQYM52B.js";
8
+ } from "./chunks/chunk-4GNVYCBN.js";
9
9
  import {
10
- ActiveElementMixin,
11
- Interaction,
12
10
  QtiAnd,
13
11
  QtiAssessmentItem,
14
12
  QtiAssessmentStimulusRef,
@@ -17,7 +15,6 @@ import {
17
15
  QtiBaseValue,
18
16
  QtiChoiceInteraction,
19
17
  QtiCompanionMaterialsInfo,
20
- QtiConditionExpression,
21
18
  QtiContains,
22
19
  QtiContentBody,
23
20
  QtiCorrect,
@@ -26,7 +23,6 @@ import {
26
23
  QtiEndAttemptInteraction,
27
24
  QtiEqual,
28
25
  QtiEqualRounded,
29
- QtiExpression,
30
26
  QtiExtendedTextInteraction,
31
27
  QtiFeedbackBlock,
32
28
  QtiFeedbackInline,
@@ -93,46 +89,56 @@ import {
93
89
  QtiTextEntryInteraction,
94
90
  QtiUploadInteraction,
95
91
  QtiVariable,
96
- itemContext,
97
- itemContextVariables,
98
92
  qtiAndMixin,
99
93
  qtiSubtractMixin
100
- } from "./chunk-UBZPSVSE.js";
94
+ } from "./chunks/chunk-K6ATVWMP.js";
95
+ import {
96
+ getItemByUri,
97
+ getManifestInfo
98
+ } from "./chunks/chunk-FV7HWK54.js";
101
99
  import {
102
100
  ItemContainer,
103
101
  QtiItem
104
- } from "./chunk-QYN5S4EM.js";
105
- import "./chunk-2CHF3TMY.js";
106
- import "./chunk-2OA7E3E7.js";
107
- import "./chunk-MAC76UNI.js";
102
+ } from "./chunks/chunk-HHVRU3AJ.js";
103
+ import "./chunks/chunk-J2SHENRN.js";
104
+ import {
105
+ qtiTransformItem,
106
+ qtiTransformManifest,
107
+ qtiTransformTest
108
+ } from "./chunks/chunk-XDMSEAYC.js";
109
+ import "./chunks/chunk-UN2IFSGC.js";
108
110
  import {
109
111
  TestItemLink
110
- } from "./chunk-4FH7P7YI.js";
112
+ } from "./chunks/chunk-7QMCKYDR.js";
111
113
  import {
112
114
  TestNext
113
- } from "./chunk-OO6JSYLP.js";
115
+ } from "./chunks/chunk-6JXR63MH.js";
114
116
  import {
115
117
  TestPagingButtonsStamp
116
- } from "./chunk-F7HTXGGH.js";
118
+ } from "./chunks/chunk-KYAIMBP5.js";
117
119
  import {
118
120
  TestPrev
119
- } from "./chunk-6SG3NMKU.js";
121
+ } from "./chunks/chunk-GSWZT6N2.js";
120
122
  import {
121
123
  TestView
122
- } from "./chunk-3TFUBCJW.js";
123
- import "./chunk-UB5K44DB.js";
124
+ } from "./chunks/chunk-A24F75DB.js";
125
+ import "./chunks/chunk-4O5F7WV7.js";
124
126
  import {
125
127
  TestComponent
126
- } from "./chunk-ANLIJZBL.js";
128
+ } from "./chunks/chunk-3EU75IUF.js";
127
129
  import {
128
130
  testContext,
129
131
  testElement
130
- } from "./chunk-F3NTI6TX.js";
131
- import "./chunk-4YG2FPKK.js";
132
- import "./chunk-44VE5POH.js";
132
+ } from "./chunks/chunk-UFYWCLXF.js";
133
+ import "./chunks/chunk-D3RGDWKP.js";
134
+ import "./chunks/chunk-ELDMXTUQ.js";
135
+ import "./chunks/chunk-ZPNJ2HP5.js";
136
+ import "./chunks/chunk-DLUJN2FW.js";
137
+ import "./chunks/chunk-XSI6FXGD.js";
138
+ import "./chunks/chunk-BPHQLJWE.js";
139
+ import "./chunks/chunk-KOEILLVS.js";
140
+ import "./chunks/chunk-H2JE6IVU.js";
133
141
  export {
134
- ActiveElementMixin,
135
- Interaction,
136
142
  ItemContainer,
137
143
  QtiAnd,
138
144
  QtiAssessmentItem,
@@ -145,7 +151,6 @@ export {
145
151
  QtiBaseValue,
146
152
  QtiChoiceInteraction,
147
153
  QtiCompanionMaterialsInfo,
148
- QtiConditionExpression,
149
154
  QtiContains,
150
155
  QtiContentBody,
151
156
  QtiCorrect,
@@ -154,7 +159,6 @@ export {
154
159
  QtiEndAttemptInteraction,
155
160
  QtiEqual,
156
161
  QtiEqualRounded,
157
- QtiExpression,
158
162
  QtiExtendedTextInteraction,
159
163
  QtiFeedbackBlock,
160
164
  QtiFeedbackInline,
@@ -231,10 +235,13 @@ export {
231
235
  TestPagingButtonsStamp,
232
236
  TestPrev,
233
237
  TestView,
234
- itemContext,
235
- itemContextVariables,
238
+ getItemByUri,
239
+ getManifestInfo,
236
240
  qtiAndMixin,
237
241
  qtiSubtractMixin,
242
+ qtiTransformItem,
243
+ qtiTransformManifest,
244
+ qtiTransformTest,
238
245
  testContext,
239
246
  testElement
240
247
  };