@citolab/qti-components 7.1.0 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/cdn/chunks/chunk-27WPPEWB.js +1 -0
  2. package/cdn/chunks/chunk-2HL3OFY7.js +1 -0
  3. package/cdn/chunks/chunk-33UT2QKP.js +5 -0
  4. package/cdn/chunks/chunk-3M3VWZCU.js +8 -0
  5. package/cdn/chunks/chunk-3QAOJL7Y.js +1007 -0
  6. package/cdn/chunks/chunk-3R4ZTZYA.js +5 -0
  7. package/cdn/chunks/chunk-6RVWXAM7.js +8 -0
  8. package/cdn/chunks/chunk-7HXSSTSU.js +1 -0
  9. package/cdn/chunks/chunk-7JXSJZV5.js +8 -0
  10. package/cdn/chunks/chunk-7RLNGBXK.js +1 -0
  11. package/cdn/chunks/chunk-AHZ3W4YP.js +8 -0
  12. package/cdn/chunks/chunk-C73FEG6J.js +1 -0
  13. package/cdn/chunks/chunk-CFS5WXCD.js +1 -0
  14. package/cdn/chunks/chunk-CZDMOYYF.js +1 -0
  15. package/cdn/chunks/chunk-EEFB2V7Q.js +27 -0
  16. package/cdn/chunks/chunk-ELZQC26E.js +5 -0
  17. package/cdn/chunks/chunk-EPOG3VSF.js +5 -0
  18. package/cdn/chunks/chunk-FDKTSUOQ.js +48 -0
  19. package/cdn/chunks/chunk-FJOHSSA3.js +1 -0
  20. package/cdn/chunks/chunk-G5YNM432.js +5 -0
  21. package/cdn/chunks/chunk-GIJVMMKY.js +1007 -0
  22. package/cdn/chunks/chunk-GTHARXCW.js +10 -0
  23. package/cdn/chunks/chunk-IRLG6H7G.js +1 -0
  24. package/cdn/chunks/chunk-J3F2YSRA.js +1007 -0
  25. package/cdn/chunks/chunk-J4ISS5TZ.js +5 -0
  26. package/cdn/chunks/chunk-KBJYE746.js +5 -0
  27. package/cdn/chunks/chunk-KIH2VB5Z.js +1 -0
  28. package/cdn/chunks/chunk-KJJG5SSY.js +1 -0
  29. package/cdn/chunks/chunk-KLRM2GAU.js +8 -0
  30. package/cdn/chunks/chunk-KQT5S3DK.js +5 -0
  31. package/cdn/chunks/chunk-LDKKOMIK.js +3570 -0
  32. package/cdn/chunks/chunk-LDXZOGPY.js +10 -0
  33. package/cdn/chunks/chunk-LUVDXKE2.js +5 -0
  34. package/cdn/chunks/chunk-LZQKENA3.js +1 -0
  35. package/cdn/chunks/chunk-MGLK2Q6K.js +5 -0
  36. package/cdn/chunks/chunk-MK2CR5DP.js +1 -0
  37. package/cdn/chunks/chunk-N5JQAYOR.js +1 -0
  38. package/cdn/chunks/chunk-NJUBWVY3.js +10 -0
  39. package/cdn/chunks/chunk-NW5VVFA5.js +5 -0
  40. package/cdn/chunks/chunk-OYUWBJSX.js +1 -0
  41. package/cdn/chunks/chunk-PBZODDGJ.js +1 -0
  42. package/cdn/chunks/chunk-PJFJOZNR.js +48 -0
  43. package/cdn/chunks/chunk-PMIMCEQ2.js +1 -0
  44. package/cdn/chunks/chunk-PYOOOJUP.js +3547 -0
  45. package/cdn/chunks/chunk-Q6HFDDZ4.js +1 -0
  46. package/cdn/chunks/chunk-QQR6POPY.js +1 -0
  47. package/cdn/chunks/chunk-QS2LH2IW.js +1007 -0
  48. package/cdn/chunks/chunk-QUFRWTHS.js +1 -0
  49. package/cdn/chunks/chunk-RJB5E47I.js +1 -0
  50. package/cdn/chunks/chunk-SFY52QPM.js +1 -0
  51. package/cdn/chunks/chunk-SUXBSENJ.js +48 -0
  52. package/cdn/chunks/chunk-SYO32O6X.js +1 -0
  53. package/cdn/chunks/chunk-TUWPPE7H.js +1 -0
  54. package/cdn/chunks/chunk-UHILPQTT.js +10 -0
  55. package/cdn/chunks/chunk-UOY4MCKX.js +6 -0
  56. package/cdn/chunks/chunk-VLCD4DFD.js +8 -0
  57. package/cdn/chunks/chunk-VRTU4ZV6.js +48 -0
  58. package/cdn/chunks/chunk-VXDODYB5.js +1007 -0
  59. package/cdn/chunks/chunk-W7GYEQJQ.js +1 -0
  60. package/cdn/chunks/chunk-WNI2D7SG.js +1 -0
  61. package/cdn/chunks/chunk-WNJ3YFMW.js +1 -0
  62. package/cdn/chunks/chunk-WRFAZSRX.js +1007 -0
  63. package/cdn/chunks/chunk-WTUTTA5R.js +1 -0
  64. package/cdn/chunks/chunk-WXFIEBQR.js +0 -0
  65. package/cdn/chunks/chunk-X75XIXUI.js +10 -0
  66. package/cdn/chunks/chunk-XPI6OOWN.js +27 -0
  67. package/cdn/chunks/chunk-YBPCVJIX.js +10 -0
  68. package/cdn/chunks/chunk-YTSCJPU2.js +1007 -0
  69. package/cdn/chunks/chunk-YZQZGOYM.js +1 -0
  70. package/cdn/exports/session.context.js +1 -1
  71. package/cdn/exports/test.context.js +1 -1
  72. package/cdn/index.global.js +1 -1
  73. package/cdn/index.js +1 -1
  74. package/cdn/qti-components/index.js +1 -1
  75. package/cdn/qti-test/components/index.js +1 -1
  76. package/cdn/qti-test/components/test-navigation.js +1 -1
  77. package/cdn/qti-test/components/test-print-context.js +1 -0
  78. package/cdn/qti-test/components/test-print-item-variables copy.js +1 -0
  79. package/cdn/qti-test/components/test-print-item-variables.js +1 -1
  80. package/cdn/qti-test/components/test-print-item-variables.stories copy.js +233 -0
  81. package/cdn/qti-test/components/test-print-test-context.js +1 -0
  82. package/cdn/qti-test/components/test-view.js +1 -1
  83. package/cdn/qti-test/core/index.js +1 -1
  84. package/dist/chunks/chunk-2BVFKYAB.js +659 -0
  85. package/dist/chunks/chunk-2BVFKYAB.js.map +1 -0
  86. package/dist/chunks/chunk-2ZTRBYHP.js +660 -0
  87. package/dist/chunks/chunk-2ZTRBYHP.js.map +1 -0
  88. package/dist/chunks/chunk-36LEJZEY.js +87 -0
  89. package/dist/chunks/chunk-36LEJZEY.js.map +1 -0
  90. package/dist/chunks/chunk-373M5NVS.js +62 -0
  91. package/dist/chunks/chunk-373M5NVS.js.map +1 -0
  92. package/dist/chunks/chunk-3DEV5ARX.js +89 -0
  93. package/dist/chunks/chunk-3DEV5ARX.js.map +1 -0
  94. package/dist/chunks/chunk-3GCBMXXY.js +62 -0
  95. package/dist/chunks/chunk-3GCBMXXY.js.map +1 -0
  96. package/dist/chunks/chunk-3NH5KOQ4.js +89 -0
  97. package/dist/chunks/chunk-3NH5KOQ4.js.map +1 -0
  98. package/dist/chunks/chunk-4BIRH5VP.js +99 -0
  99. package/dist/chunks/chunk-4BIRH5VP.js.map +1 -0
  100. package/dist/chunks/chunk-4O3EJ3SA.js +3884 -0
  101. package/dist/chunks/chunk-4O3EJ3SA.js.map +1 -0
  102. package/dist/chunks/chunk-4Z3IMDB5.js +84 -0
  103. package/dist/chunks/chunk-4Z3IMDB5.js.map +1 -0
  104. package/dist/chunks/chunk-6ITJ2I3A.js +82 -0
  105. package/dist/chunks/chunk-6ITJ2I3A.js.map +1 -0
  106. package/dist/chunks/chunk-75ZDJN64.js +32 -0
  107. package/dist/chunks/chunk-75ZDJN64.js.map +1 -0
  108. package/dist/chunks/chunk-76SJLOAE.js +84 -0
  109. package/dist/chunks/chunk-76SJLOAE.js.map +1 -0
  110. package/dist/chunks/chunk-7JS7FRDO.js +89 -0
  111. package/dist/chunks/chunk-7JS7FRDO.js.map +1 -0
  112. package/dist/chunks/chunk-7WL6TAJE.js +6872 -0
  113. package/dist/chunks/chunk-7WL6TAJE.js.map +1 -0
  114. package/dist/chunks/chunk-AD5H6KYS.js +78 -0
  115. package/dist/chunks/chunk-AD5H6KYS.js.map +1 -0
  116. package/dist/chunks/chunk-AQLCQATM.js +62 -0
  117. package/dist/chunks/chunk-AQLCQATM.js.map +1 -0
  118. package/dist/chunks/chunk-AWQHFFVL.js +659 -0
  119. package/dist/chunks/chunk-AWQHFFVL.js.map +1 -0
  120. package/dist/chunks/chunk-BO6QD3VK.js +27 -0
  121. package/dist/chunks/chunk-BO6QD3VK.js.map +1 -0
  122. package/dist/chunks/chunk-BWM6SEM3.js +659 -0
  123. package/dist/chunks/chunk-BWM6SEM3.js.map +1 -0
  124. package/dist/chunks/chunk-C2FVCRYJ.js +660 -0
  125. package/dist/chunks/chunk-C2FVCRYJ.js.map +1 -0
  126. package/dist/chunks/chunk-CIVMCP3W.js +78 -0
  127. package/dist/chunks/chunk-CIVMCP3W.js.map +1 -0
  128. package/dist/chunks/chunk-CJADUWEC.js +10 -0
  129. package/dist/chunks/chunk-CJADUWEC.js.map +1 -0
  130. package/dist/chunks/chunk-DCKLAFBL.js +79 -0
  131. package/dist/chunks/chunk-DCKLAFBL.js.map +1 -0
  132. package/dist/chunks/chunk-EHRC7LG6.js +3638 -0
  133. package/dist/chunks/chunk-EHRC7LG6.js.map +1 -0
  134. package/dist/chunks/chunk-ELXD2ZSR.js +218 -0
  135. package/dist/chunks/chunk-ELXD2ZSR.js.map +1 -0
  136. package/dist/chunks/chunk-EQUEIZJL.js +27 -0
  137. package/dist/chunks/chunk-EQUEIZJL.js.map +1 -0
  138. package/dist/chunks/chunk-EREPAU3B.js +80 -0
  139. package/dist/chunks/chunk-EREPAU3B.js.map +1 -0
  140. package/dist/chunks/chunk-EXOIDEQ6.js +660 -0
  141. package/dist/chunks/chunk-EXOIDEQ6.js.map +1 -0
  142. package/dist/chunks/chunk-FFF7WZJF.js +33 -0
  143. package/dist/chunks/chunk-FFF7WZJF.js.map +1 -0
  144. package/dist/chunks/chunk-FJJMZEPV.js +95 -0
  145. package/dist/chunks/chunk-FJJMZEPV.js.map +1 -0
  146. package/dist/chunks/chunk-G5DLHZE2.js +659 -0
  147. package/dist/chunks/chunk-G5DLHZE2.js.map +1 -0
  148. package/dist/chunks/chunk-HD63HGFY.js +52 -0
  149. package/dist/chunks/chunk-HD63HGFY.js.map +1 -0
  150. package/dist/chunks/chunk-HUKKTEBP.js +99 -0
  151. package/dist/chunks/chunk-HUKKTEBP.js.map +1 -0
  152. package/dist/chunks/chunk-HXGGGOV2.js +86 -0
  153. package/dist/chunks/chunk-HXGGGOV2.js.map +1 -0
  154. package/dist/chunks/chunk-HZYAIUVZ.js +6872 -0
  155. package/dist/chunks/chunk-HZYAIUVZ.js.map +1 -0
  156. package/dist/chunks/chunk-IT744RXI.js +75 -0
  157. package/dist/chunks/chunk-IT744RXI.js.map +1 -0
  158. package/dist/chunks/chunk-IXVOEGNZ.js +87 -0
  159. package/dist/chunks/chunk-IXVOEGNZ.js.map +1 -0
  160. package/dist/chunks/chunk-JEM74SR3.js +85 -0
  161. package/dist/chunks/chunk-JEM74SR3.js.map +1 -0
  162. package/dist/chunks/chunk-JP22YLJ6.js +219 -0
  163. package/dist/chunks/chunk-JP22YLJ6.js.map +1 -0
  164. package/dist/chunks/chunk-JVGOS45U.js +660 -0
  165. package/dist/chunks/chunk-JVGOS45U.js.map +1 -0
  166. package/dist/chunks/chunk-JWVGRAWQ.js +6872 -0
  167. package/dist/chunks/chunk-JWVGRAWQ.js.map +1 -0
  168. package/dist/chunks/chunk-JWX6ZOZ6.js +86 -0
  169. package/dist/chunks/chunk-JWX6ZOZ6.js.map +1 -0
  170. package/dist/chunks/chunk-JZMZLOTW.js +32 -0
  171. package/dist/chunks/chunk-JZMZLOTW.js.map +1 -0
  172. package/dist/chunks/chunk-KS3SCUUO.js +92 -0
  173. package/dist/chunks/chunk-KS3SCUUO.js.map +1 -0
  174. package/dist/chunks/chunk-LOPCNZ26.js +95 -0
  175. package/dist/chunks/chunk-LOPCNZ26.js.map +1 -0
  176. package/dist/chunks/chunk-M4E2ACHZ.js +75 -0
  177. package/dist/chunks/chunk-M4E2ACHZ.js.map +1 -0
  178. package/dist/chunks/chunk-MQS7RZFR.js +85 -0
  179. package/dist/chunks/chunk-MQS7RZFR.js.map +1 -0
  180. package/dist/chunks/chunk-N3JFTFIL.js +79 -0
  181. package/dist/chunks/chunk-N3JFTFIL.js.map +1 -0
  182. package/dist/chunks/chunk-OSMLF3OH.js +6868 -0
  183. package/dist/chunks/chunk-OSMLF3OH.js.map +1 -0
  184. package/dist/chunks/chunk-OWWUE3LK.js +660 -0
  185. package/dist/chunks/chunk-OWWUE3LK.js.map +1 -0
  186. package/dist/chunks/chunk-P36CLOLO.js +27 -0
  187. package/dist/chunks/chunk-P36CLOLO.js.map +1 -0
  188. package/dist/chunks/chunk-PL32YWZA.js +30 -0
  189. package/dist/chunks/chunk-PL32YWZA.js.map +1 -0
  190. package/dist/chunks/chunk-Q5JLRHTY.js +659 -0
  191. package/dist/chunks/chunk-Q5JLRHTY.js.map +1 -0
  192. package/dist/chunks/chunk-TC5ZLAPV.js +218 -0
  193. package/dist/chunks/chunk-TC5ZLAPV.js.map +1 -0
  194. package/dist/chunks/chunk-TRSEENUK.js +45 -0
  195. package/dist/chunks/chunk-TRSEENUK.js.map +1 -0
  196. package/dist/chunks/chunk-UEX52I7G.js +1 -0
  197. package/dist/chunks/chunk-UEX52I7G.js.map +1 -0
  198. package/dist/chunks/chunk-UFRDMBKM.js +43 -0
  199. package/dist/chunks/chunk-UFRDMBKM.js.map +1 -0
  200. package/dist/chunks/chunk-USJXIVR4.js +6872 -0
  201. package/dist/chunks/chunk-USJXIVR4.js.map +1 -0
  202. package/dist/chunks/chunk-UZ4QB5IO.js +10 -0
  203. package/dist/chunks/chunk-UZ4QB5IO.js.map +1 -0
  204. package/dist/chunks/chunk-WJBYWKIF.js +32 -0
  205. package/dist/chunks/chunk-WJBYWKIF.js.map +1 -0
  206. package/dist/chunks/chunk-WOVQFPIV.js +6872 -0
  207. package/dist/chunks/chunk-WOVQFPIV.js.map +1 -0
  208. package/dist/chunks/chunk-WPUMEBSF.js +33 -0
  209. package/dist/chunks/chunk-WPUMEBSF.js.map +1 -0
  210. package/dist/chunks/chunk-WVVYYP6F.js +218 -0
  211. package/dist/chunks/chunk-WVVYYP6F.js.map +1 -0
  212. package/dist/chunks/chunk-XSHHCMRC.js +217 -0
  213. package/dist/chunks/chunk-XSHHCMRC.js.map +1 -0
  214. package/dist/chunks/chunk-XZTGFLMB.js +6872 -0
  215. package/dist/chunks/chunk-XZTGFLMB.js.map +1 -0
  216. package/dist/chunks/chunk-ZBMTSE6Q.js +660 -0
  217. package/dist/chunks/chunk-ZBMTSE6Q.js.map +1 -0
  218. package/dist/chunks/chunk-ZMTMIG3C.js +77 -0
  219. package/dist/chunks/chunk-ZMTMIG3C.js.map +1 -0
  220. package/dist/chunks/chunk-ZSR4X4I6.js +638 -0
  221. package/dist/chunks/chunk-ZSR4X4I6.js.map +1 -0
  222. package/dist/exports/interaction.js +1 -1
  223. package/dist/exports/session.context.d.ts +1 -1
  224. package/dist/exports/session.context.js +3 -1
  225. package/dist/exports/test.context.d.ts +2 -1
  226. package/dist/exports/test.context.js +3 -1
  227. package/dist/index.d.ts +3 -2
  228. package/dist/index.js +54 -46
  229. package/dist/qti-components/index.js +2 -2
  230. package/dist/qti-components-jsx.d.ts +35 -2
  231. package/dist/qti-response-declaration-5PnLgbOQ.d.ts +1143 -0
  232. package/dist/qti-response-declaration-PJkGU8F8.d.ts +1151 -0
  233. package/dist/qti-test/components/index.d.ts +2 -1
  234. package/dist/qti-test/components/index.js +16 -12
  235. package/dist/qti-test/components/test-navigation.d.ts +1 -1
  236. package/dist/qti-test/components/test-navigation.js +3 -3
  237. package/dist/qti-test/components/test-next.js +2 -2
  238. package/dist/qti-test/components/test-prev.js +2 -2
  239. package/dist/qti-test/components/test-print-context.d.ts +20 -0
  240. package/dist/qti-test/components/test-print-context.js +9 -0
  241. package/dist/qti-test/components/test-print-context.js.map +1 -0
  242. package/dist/qti-test/components/test-print-item-variables copy.js +86 -0
  243. package/dist/qti-test/components/test-print-item-variables copy.js.map +1 -0
  244. package/dist/qti-test/components/test-print-item-variables.d.ts +2 -2
  245. package/dist/qti-test/components/test-print-item-variables.js +1 -1
  246. package/dist/qti-test/components/test-print-item-variables.stories copy.js +9731 -0
  247. package/dist/qti-test/components/test-print-item-variables.stories copy.js.map +1 -0
  248. package/dist/qti-test/components/test-print-test-context.js +86 -0
  249. package/dist/qti-test/components/test-print-test-context.js.map +1 -0
  250. package/dist/qti-test/components/test-view.js +2 -2
  251. package/dist/qti-test/core/index.d.ts +3 -3
  252. package/dist/qti-test/core/index.js +15 -3
  253. package/dist/qti-test-feedback-BuFBq7JH.d.ts +97 -0
  254. package/dist/qti-test-feedback-CZsPCqSt.d.ts +97 -0
  255. package/dist/qti-test-feedback-CaNdRC7L.d.ts +96 -0
  256. package/dist/qti-test-part-BIeEZIWw.d.ts +85 -0
  257. package/dist/qti-test-part-C_jSX7Zz.d.ts +85 -0
  258. package/dist/vscode.html-custom-data.json +17 -6
  259. package/package.json +1 -1
@@ -0,0 +1,33 @@
1
+ import {
2
+ computedContext
3
+ } from "./chunk-6Z5YR5U2.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/qti-test/components/test-print-context.ts
9
+ import { html, LitElement } from "lit";
10
+ import { consume } from "@lit/context";
11
+ import { customElement } from "lit/decorators.js";
12
+ var TestPrintContext = class extends LitElement {
13
+ render() {
14
+ const activeItems = this.computedContext?.testParts.flatMap(
15
+ (testPart) => testPart.sections.flatMap((section) => section.items).find((item) => item.active)
16
+ );
17
+ if (!activeItems) return html``;
18
+ const activeItem = activeItems.length > 0 ? activeItems[0] : null;
19
+ delete activeItem?.variables;
20
+ return html` <small><pre>${JSON.stringify(activeItem, null, 2)}</pre></small> `;
21
+ }
22
+ };
23
+ __decorateClass([
24
+ consume({ context: computedContext, subscribe: true })
25
+ ], TestPrintContext.prototype, "computedContext", 2);
26
+ TestPrintContext = __decorateClass([
27
+ customElement("test-print-context")
28
+ ], TestPrintContext);
29
+
30
+ export {
31
+ TestPrintContext
32
+ };
33
+ //# sourceMappingURL=chunk-WPUMEBSF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-print-context.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { consume } from '@lit/context';\nimport { customElement } from 'lit/decorators.js';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext } from '../../exports/computed.context';\n\n@customElement('test-print-context')\nexport class TestPrintContext extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n public computedContext?: ComputedContext;\n\n render() {\n const activeItems = this.computedContext?.testParts.flatMap(testPart =>\n testPart.sections.flatMap(section => section.items).find(item => item.active)\n );\n if (!activeItems) return html``;\n const activeItem = activeItems.length > 0 ? activeItems[0] : null;\n delete activeItem?.variables;\n return html` <small><pre>${JSON.stringify(activeItem, null, 2)}</pre></small> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-print-context': TestPrintContext;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAOvB,IAAM,mBAAN,cAA+B,WAAW;AAAA,EAI/C,SAAS;AACP,UAAM,cAAc,KAAK,iBAAiB,UAAU;AAAA,MAAQ,cAC1D,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK,EAAE,KAAK,UAAQ,KAAK,MAAM;AAAA,IAC9E;AACA,QAAI,CAAC,YAAa,QAAO;AACzB,UAAM,aAAa,YAAY,SAAS,IAAI,YAAY,CAAC,IAAI;AAC7D,WAAO,YAAY;AACnB,WAAO,oBAAoB,KAAK,UAAU,YAAY,MAAM,CAAC,CAAC;AAAA,EAChE;AACF;AAXS;AAAA,EADN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,iBAEJ;AAFI,mBAAN;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB;","names":[]}
@@ -0,0 +1,218 @@
1
+ import {
2
+ sessionContext
3
+ } from "./chunk-QTH3WLGY.js";
4
+ import {
5
+ testContext
6
+ } from "./chunk-CJADUWEC.js";
7
+ import {
8
+ computedContext
9
+ } from "./chunk-6Z5YR5U2.js";
10
+ import {
11
+ __decorateClass
12
+ } from "./chunk-H2JE6IVU.js";
13
+
14
+ // src/lib/qti-test/components/test-navigation.ts
15
+ import { consume, provide } from "@lit/context";
16
+ import { html, LitElement } from "lit";
17
+ import { customElement, property, state } from "lit/decorators.js";
18
+ var TestNavigation = class extends LitElement {
19
+ constructor() {
20
+ super();
21
+ this.identifier = void 0;
22
+ this.initContext = [];
23
+ this.configContext = {};
24
+ this.autoScoreItems = false;
25
+ this.addEventListener("qti-assessment-test-connected", this._handleTestConnected.bind(this));
26
+ this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
27
+ this.addEventListener("qti-interaction-changed", this._handleInteractionChanged.bind(this));
28
+ this.addEventListener("test-end-attempt", this._handleTestEndAttempt.bind(this));
29
+ this.addEventListener("test-show-correct-response", this._handleTestShowCorrectResponse.bind(this));
30
+ }
31
+ _handleTestEndAttempt(_event) {
32
+ const qtiItemEl = this._testElement.querySelector(
33
+ `qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
34
+ );
35
+ const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
36
+ const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
37
+ qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);
38
+ }
39
+ _handleTestShowCorrectResponse(event) {
40
+ const qtiItemEl = this._testElement.querySelector(
41
+ `qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
42
+ );
43
+ const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
44
+ qtiAssessmentItemEl.showCorrectResponse(event.detail);
45
+ }
46
+ _handleInteractionChanged(_event) {
47
+ if (this.autoScoreItems) {
48
+ const assessmentItem = _event.composedPath()[0].closest("qti-assessment-item");
49
+ const scoreOutcomeIdentifier = assessmentItem.variables.find((v) => v.identifier === "SCORE");
50
+ if (scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === "false") {
51
+ assessmentItem.processResponse();
52
+ }
53
+ }
54
+ }
55
+ render() {
56
+ return html`<slot></slot>`;
57
+ }
58
+ /* PK: on test connected we can build the computed context */
59
+ _handleTestConnected(event) {
60
+ this._testElement = event.detail;
61
+ const testPartElements = Array.from(this._testElement?.querySelectorAll(`qti-test-part`) || []);
62
+ this.computedContext = {
63
+ testParts: testPartElements.map((testPart) => {
64
+ const sectionElements = [...testPart.querySelectorAll(`qti-assessment-section`)];
65
+ return {
66
+ active: false,
67
+ identifier: testPart.identifier,
68
+ sections: sectionElements.map((section) => {
69
+ const itemElements = [...section.querySelectorAll(`qti-assessment-item-ref`)];
70
+ return {
71
+ active: false,
72
+ identifier: section.identifier,
73
+ title: section.title,
74
+ items: itemElements.map((item) => {
75
+ return {
76
+ active: false,
77
+ identifier: item.identifier,
78
+ href: item.href,
79
+ variables: []
80
+ };
81
+ })
82
+ };
83
+ })
84
+ };
85
+ })
86
+ };
87
+ }
88
+ /* PK: on item connected we can add item only properties in the xml */
89
+ _handleItemConnected(event) {
90
+ const itemElement = event.detail;
91
+ this.computedContext = {
92
+ ...this.computedContext,
93
+ testParts: this.computedContext.testParts.map((testPart) => {
94
+ return {
95
+ ...testPart,
96
+ sections: testPart.sections.map((section) => {
97
+ return {
98
+ ...section,
99
+ items: section.items.map((item) => {
100
+ if (item.identifier !== itemElement.identifier) {
101
+ return item;
102
+ }
103
+ return {
104
+ ...item,
105
+ label: itemElement.getAttribute("label"),
106
+ title: itemElement.title,
107
+ adaptive: itemElement.adaptive == "true" || false,
108
+ timeDependent: itemElement.timeDependent == "true" || false,
109
+ variables: itemElement._context.variables
110
+ };
111
+ })
112
+ };
113
+ })
114
+ };
115
+ })
116
+ };
117
+ }
118
+ /* PK: on every change of the candidate we will recomputed the computedContext */
119
+ willUpdate(_changedProperties) {
120
+ if (!this.computedContext) return;
121
+ let itemIndex = 1;
122
+ this.computedContext = {
123
+ ...this.computedContext,
124
+ testParts: this.computedContext.testParts.map((testPart) => {
125
+ return {
126
+ ...testPart,
127
+ active: this._sessionContext?.navPartId === testPart.identifier || false,
128
+ sections: testPart.sections.map((section) => {
129
+ return {
130
+ ...section,
131
+ active: this._sessionContext?.navSectionId === section.identifier || false,
132
+ completed: section.items.every(
133
+ (item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"
134
+ ),
135
+ items: section.items.map((item) => {
136
+ const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
137
+ let computedItem;
138
+ if (this.initContext) {
139
+ const initContext = this.initContext.find((i) => i.identifier === item.identifier);
140
+ computedItem = { ...item, ...itemContext, ...initContext };
141
+ } else {
142
+ computedItem = { ...item, ...itemContext };
143
+ }
144
+ const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
145
+ const score = parseInt(rawscore?.toString());
146
+ const completionStatus = computedItem.variables?.find((v) => v.identifier === "completionStatus")?.value;
147
+ const categories = computedItem.category ? computedItem.category?.split(" ") : [];
148
+ const type = categories.includes(this.configContext?.infoItemCategory) ? "info" : "regular";
149
+ const active = this._sessionContext?.navItemId === computedItem.identifier || false;
150
+ const correct = (
151
+ // this._testContext.view === 'scorer' &&
152
+ type == "regular" && score !== void 0 && !isNaN(score) && score > 0 || false
153
+ );
154
+ const incorrect = (
155
+ // this._testContext.view === 'scorer' &&
156
+ type == "regular" && score !== void 0 && !isNaN(score) && score <= 0 || false
157
+ );
158
+ const completed = (
159
+ // this._testContext.view === 'candidate' &&
160
+ completionStatus === "completed"
161
+ );
162
+ const response = computedItem.variables?.find((v) => v.identifier === "RESPONSE")?.value || "";
163
+ const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;
164
+ return {
165
+ ...computedItem,
166
+ // rawscore, // not necessary for outside world
167
+ // score, // not necessary for outside world
168
+ // completionStatus, // not necessary for outside world
169
+ // categories, // not necessary for outside world
170
+ type,
171
+ active,
172
+ correct,
173
+ incorrect,
174
+ completed,
175
+ index,
176
+ response,
177
+ view: this._sessionContext.view
178
+ };
179
+ })
180
+ };
181
+ })
182
+ };
183
+ })
184
+ };
185
+ }
186
+ };
187
+ __decorateClass([
188
+ property({ type: String })
189
+ ], TestNavigation.prototype, "identifier", 2);
190
+ __decorateClass([
191
+ state()
192
+ ], TestNavigation.prototype, "initContext", 2);
193
+ __decorateClass([
194
+ state(),
195
+ consume({ context: testContext, subscribe: true })
196
+ ], TestNavigation.prototype, "_testContext", 2);
197
+ __decorateClass([
198
+ state(),
199
+ consume({ context: sessionContext, subscribe: true })
200
+ ], TestNavigation.prototype, "_sessionContext", 2);
201
+ __decorateClass([
202
+ state()
203
+ ], TestNavigation.prototype, "configContext", 2);
204
+ __decorateClass([
205
+ state(),
206
+ provide({ context: computedContext })
207
+ ], TestNavigation.prototype, "computedContext", 2);
208
+ __decorateClass([
209
+ property({ type: Boolean, attribute: "auto-score-items" })
210
+ ], TestNavigation.prototype, "autoScoreItems", 2);
211
+ TestNavigation = __decorateClass([
212
+ customElement("test-navigation")
213
+ ], TestNavigation);
214
+
215
+ export {
216
+ TestNavigation
217
+ };
218
+ //# sourceMappingURL=chunk-WVVYYP6F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-navigation.ts"],"sourcesContent":["import { consume, provide } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { testContext } from '../../exports/test.context';\nimport { sessionContext } from '../../exports/session.context';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedItemContext } from '../../exports/computed-item.context';\nimport type { QtiAssessmentItem } from '../../qti-components';\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { PropertyValues } from 'lit';\nimport type { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiTestPart } from '../core';\nimport type { ConfigContext } from '../../exports/config.context';\nimport type { SessionContext } from '../../exports/session.context';\nimport type { TestContext } from '../../exports/test.context';\n\ntype CustomEventMap = {\n 'test-end-attempt': CustomEvent;\n 'test-show-correct-response': CustomEvent<{ value: boolean }>;\n};\n\ndeclare global {\n interface GlobalEventHandlersEventMap extends CustomEventMap {}\n}\n\n@customElement('test-navigation')\nexport class TestNavigation extends LitElement {\n @property({ type: String }) identifier = undefined;\n\n @state()\n public initContext: { identifier: string; [key: string]: any }[] = [];\n\n @state()\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n @state()\n @consume({ context: sessionContext, subscribe: true })\n public _sessionContext?: SessionContext;\n\n @state()\n public configContext: ConfigContext = {};\n\n @state()\n @provide({ context: computedContext })\n public computedContext: ComputedContext;\n\n @property({ type: Boolean, attribute: 'auto-score-items' }) autoScoreItems = false;\n\n private _testElement: QtiAssessmentTest;\n\n constructor() {\n super();\n this.addEventListener('qti-assessment-test-connected', this._handleTestConnected.bind(this));\n this.addEventListener('qti-assessment-item-connected', this._handleItemConnected.bind(this));\n\n this.addEventListener('qti-interaction-changed', this._handleInteractionChanged.bind(this));\n\n this.addEventListener('test-end-attempt', this._handleTestEndAttempt.bind(this));\n this.addEventListener('test-show-correct-response', this._handleTestShowCorrectResponse.bind(this));\n }\n\n private _handleTestEndAttempt(_event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;\n qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);\n }\n\n private _handleTestShowCorrectResponse(event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.showCorrectResponse(event.detail);\n }\n\n private _handleInteractionChanged(_event: CustomEvent) {\n if (this.autoScoreItems) {\n const assessmentItem = (_event.composedPath()[0] as HTMLElement).closest('qti-assessment-item');\n const scoreOutcomeIdentifier = assessmentItem.variables.find(v => v.identifier === 'SCORE') as OutcomeVariable;\n if (scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === 'false') {\n assessmentItem.processResponse();\n }\n }\n }\n\n render() {\n return html`<slot></slot>`;\n }\n\n /* PK: on test connected we can build the computed context */\n _handleTestConnected(event: CustomEvent) {\n this._testElement = event.detail as QtiAssessmentTest;\n const testPartElements = Array.from(this._testElement?.querySelectorAll<QtiTestPart>(`qti-test-part`) || []);\n this.computedContext = {\n testParts: testPartElements.map(testPart => {\n const sectionElements = [...testPart.querySelectorAll<QtiAssessmentSection>(`qti-assessment-section`)];\n return {\n active: false,\n identifier: testPart.identifier,\n sections: sectionElements.map(section => {\n const itemElements = [...section.querySelectorAll<QtiAssessmentItemRef>(`qti-assessment-item-ref`)];\n return {\n active: false,\n identifier: section.identifier,\n title: section.title,\n items: itemElements.map(item => {\n return {\n active: false,\n identifier: item.identifier,\n href: item.href,\n variables: []\n } as ComputedItemContext;\n })\n };\n })\n };\n })\n };\n\n // const sections = this.computedContext?.testParts.flatMap(testPart => testPart.sections);\n\n // let id;\n // if (this.navigate === 'section') {\n // id = sections.find(section => section.active).identifier;\n // }\n // if (this.navigate === 'item') {\n // id = sections.flatMap(section => section.items).find(item => item.active).identifier;\n // }\n\n // if (id) {\n // this.dispatchEvent(\n // new CustomEvent('qti-request-navigation', {\n // detail: { type: this.navigate, id },\n // bubbles: true,\n // composed: true\n // })\n // );\n // }\n }\n\n /* PK: on item connected we can add item only properties in the xml */\n _handleItemConnected(event: CustomEvent) {\n const itemElement = event.detail as QtiAssessmentItem;\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n items: section.items.map(item => {\n if (item.identifier !== itemElement.identifier) {\n return item;\n }\n return {\n ...item,\n label: itemElement.getAttribute('label'),\n title: itemElement.title,\n adaptive: itemElement.adaptive == 'true' || false,\n timeDependent: itemElement.timeDependent == 'true' || false,\n variables: (itemElement as any)._context.variables\n };\n })\n };\n })\n };\n })\n };\n }\n\n /* PK: on every change of the candidate we will recomputed the computedContext */\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) return;\n\n let itemIndex = 1;\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n active: this._sessionContext?.navPartId === testPart.identifier || false,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n active: this._sessionContext?.navSectionId === section.identifier || false,\n completed: section.items.every(\n item =>\n this._testContext.items\n .find(i => i.identifier === item.identifier)\n ?.variables.find(v => v.identifier === 'completionStatus').value === 'completed'\n ),\n\n items: section.items.map(item => {\n const itemContext = this._testContext?.items.find(i => i.identifier === item.identifier);\n let computedItem;\n\n if (this.initContext) {\n const initContext = this.initContext.find(i => i.identifier === item.identifier);\n computedItem = { ...item, ...itemContext, ...initContext };\n } else {\n computedItem = { ...item, ...itemContext };\n }\n\n const rawscore = computedItem.variables?.find(vr => vr.identifier == 'SCORE')?.value;\n const score = parseInt(rawscore?.toString());\n const completionStatus = computedItem.variables?.find(v => v.identifier === 'completionStatus')?.value;\n const categories = computedItem.category ? computedItem.category?.split(' ') : [];\n\n const type = categories.includes(this.configContext?.infoItemCategory) ? 'info' : 'regular'; // rounded-full\n const active = this._sessionContext?.navItemId === computedItem.identifier || false; // !border-sky-600\n\n const correct =\n // this._testContext.view === 'scorer' &&\n (type == 'regular' && score !== undefined && !isNaN(score) && score > 0) || false; // bg-green-100 border-green-400\n const incorrect =\n // this._testContext.view === 'scorer' &&\n (type == 'regular' && score !== undefined && !isNaN(score) && score <= 0) || false; // bg-red-100 border-red-400\n const completed =\n // this._testContext.view === 'candidate' &&\n completionStatus === 'completed';\n // || item.category === this.host._configContext?.infoItemCategory || false\n const response = computedItem.variables?.find(v => v.identifier === 'RESPONSE')?.value || '';\n\n const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;\n\n return {\n ...computedItem,\n // rawscore, // not necessary for outside world\n // score, // not necessary for outside world\n // completionStatus, // not necessary for outside world\n // categories, // not necessary for outside world\n type,\n active,\n correct,\n incorrect,\n completed,\n index,\n response,\n view: this._sess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SAAS,aAAa,WAAW,KAAK,CAAC;AAAA,GAPvC,eAQJ;AAIA;AAAA,EAFN,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,gBAAgB,WAAW,KAAK,CAAC;AAAA,GAX1C,eAYJ;AAGA;AAAA,EADN,MAAM;AAAA,GAdI,eAeJ;AAIA;AAAA,EAFN,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,gBAAgB,CAAC;AAAA,GAlB1B,eAmBJ;AAEqD;AAAA,EAA3D,SAAS,EAAE,MAAM,SAAS,WAAW,mBAAmB,CAAC;AAAA,GArB/C,eAqBiD;AArBjD,iBAAN;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB;","names":[]}
@@ -0,0 +1,217 @@
1
+ import {
2
+ sessionContext
3
+ } from "./chunk-QTH3WLGY.js";
4
+ import {
5
+ testContext
6
+ } from "./chunk-CJADUWEC.js";
7
+ import {
8
+ computedContext
9
+ } from "./chunk-6Z5YR5U2.js";
10
+ import {
11
+ __decorateClass
12
+ } from "./chunk-H2JE6IVU.js";
13
+
14
+ // src/lib/qti-test/components/test-navigation.ts
15
+ import { consume, provide } from "@lit/context";
16
+ import { html, LitElement } from "lit";
17
+ import { customElement, property, state } from "lit/decorators.js";
18
+ var TestNavigation = class extends LitElement {
19
+ constructor() {
20
+ super();
21
+ this.identifier = void 0;
22
+ this.initContext = [];
23
+ this.configContext = {};
24
+ this.autoScoreItems = false;
25
+ this.addEventListener("qti-assessment-test-connected", this._handleTestConnected.bind(this));
26
+ this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
27
+ this.addEventListener("qti-interaction-changed", this._handleInteractionChanged.bind(this));
28
+ this.addEventListener("test-end-attempt", this._handleTestEndAttempt.bind(this));
29
+ this.addEventListener("test-show-correct-response", this._handleTestShowCorrectResponse.bind(this));
30
+ }
31
+ _handleTestEndAttempt(_event) {
32
+ const qtiItemEl = this._testElement.querySelector(
33
+ `qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
34
+ );
35
+ const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
36
+ const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
37
+ qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);
38
+ }
39
+ _handleTestShowCorrectResponse(event) {
40
+ const qtiItemEl = this._testElement.querySelector(
41
+ `qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
42
+ );
43
+ const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
44
+ qtiAssessmentItemEl.showCorrectResponse(event.detail);
45
+ }
46
+ _handleInteractionChanged(_event) {
47
+ if (this.autoScoreItems) {
48
+ const assessmentItem = _event.composedPath()[0].closest("qti-assessment-item");
49
+ const scoreOutcomeIdentifier = assessmentItem.variables.find((v) => v.identifier === "SCORE");
50
+ if (scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === "false") {
51
+ assessmentItem.processResponse();
52
+ }
53
+ }
54
+ }
55
+ render() {
56
+ return html`<slot></slot>`;
57
+ }
58
+ /* PK: on test connected we can build the computed context */
59
+ _handleTestConnected(event) {
60
+ this._testElement = event.detail;
61
+ const testPartElements = Array.from(this._testElement?.querySelectorAll(`qti-test-part`) || []);
62
+ this.computedContext = {
63
+ testParts: testPartElements.map((testPart) => {
64
+ const sectionElements = [...testPart.querySelectorAll(`qti-assessment-section`)];
65
+ return {
66
+ active: false,
67
+ identifier: testPart.identifier,
68
+ sections: sectionElements.map((section) => {
69
+ const itemElements = [...section.querySelectorAll(`qti-assessment-item-ref`)];
70
+ return {
71
+ active: false,
72
+ identifier: section.identifier,
73
+ title: section.title,
74
+ items: itemElements.map((item) => {
75
+ return {
76
+ active: false,
77
+ identifier: item.identifier,
78
+ href: item.href,
79
+ variables: []
80
+ };
81
+ })
82
+ };
83
+ })
84
+ };
85
+ })
86
+ };
87
+ }
88
+ /* PK: on item connected we can add item only properties in the xml */
89
+ _handleItemConnected(event) {
90
+ const itemElement = event.detail;
91
+ this.computedContext = {
92
+ ...this.computedContext,
93
+ testParts: this.computedContext.testParts.map((testPart) => {
94
+ return {
95
+ ...testPart,
96
+ sections: testPart.sections.map((section) => {
97
+ return {
98
+ ...section,
99
+ items: section.items.map((item) => {
100
+ if (item.identifier !== itemElement.identifier) {
101
+ return item;
102
+ }
103
+ return {
104
+ ...item,
105
+ label: itemElement.getAttribute("label"),
106
+ title: itemElement.title,
107
+ adaptive: itemElement.adaptive == "true" || false,
108
+ timeDependent: itemElement.timeDependent == "true" || false,
109
+ variables: itemElement._context.variables
110
+ };
111
+ })
112
+ };
113
+ })
114
+ };
115
+ })
116
+ };
117
+ }
118
+ /* PK: on every change of the candidate we will recomputed the computedContext */
119
+ willUpdate(_changedProperties) {
120
+ if (!this.computedContext) return;
121
+ let itemIndex = 1;
122
+ this.computedContext = {
123
+ ...this.computedContext,
124
+ testParts: this.computedContext.testParts.map((testPart) => {
125
+ return {
126
+ ...testPart,
127
+ active: this._sessionContext?.navPartId === testPart.identifier || false,
128
+ sections: testPart.sections.map((section) => {
129
+ return {
130
+ ...section,
131
+ active: this._sessionContext?.navSectionId === section.identifier || false,
132
+ completed: section.items.every(
133
+ (item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"
134
+ ),
135
+ items: section.items.map((item) => {
136
+ const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
137
+ let computedItem;
138
+ if (this.initContext) {
139
+ const initContext = this.initContext.find((i) => i.identifier === item.identifier);
140
+ computedItem = { ...item, ...itemContext, ...initContext };
141
+ } else {
142
+ computedItem = { ...item, ...itemContext };
143
+ }
144
+ const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
145
+ const score = parseInt(rawscore?.toString());
146
+ const completionStatus = computedItem.variables?.find((v) => v.identifier === "completionStatus")?.value;
147
+ const categories = computedItem.category ? computedItem.category?.split(" ") : [];
148
+ const type = categories.includes(this.configContext?.infoItemCategory) ? "info" : "regular";
149
+ const active = this._sessionContext?.navItemId === computedItem.identifier || false;
150
+ const correct = (
151
+ // this._testContext.view === 'scorer' &&
152
+ type == "regular" && score !== void 0 && !isNaN(score) && score > 0 || false
153
+ );
154
+ const incorrect = (
155
+ // this._testContext.view === 'scorer' &&
156
+ type == "regular" && score !== void 0 && !isNaN(score) && score <= 0 || false
157
+ );
158
+ const completed = (
159
+ // this._testContext.view === 'candidate' &&
160
+ completionStatus === "completed"
161
+ );
162
+ const response = computedItem.variables?.find((v) => v.identifier === "RESPONSE")?.value || "";
163
+ const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;
164
+ return {
165
+ ...computedItem,
166
+ // rawscore, // not necessary for outside world
167
+ // score, // not necessary for outside world
168
+ // completionStatus, // not necessary for outside world
169
+ // categories, // not necessary for outside world
170
+ type,
171
+ active,
172
+ correct,
173
+ incorrect,
174
+ completed,
175
+ index,
176
+ response
177
+ };
178
+ })
179
+ };
180
+ })
181
+ };
182
+ })
183
+ };
184
+ }
185
+ };
186
+ __decorateClass([
187
+ property({ type: String })
188
+ ], TestNavigation.prototype, "identifier", 2);
189
+ __decorateClass([
190
+ state()
191
+ ], TestNavigation.prototype, "initContext", 2);
192
+ __decorateClass([
193
+ state(),
194
+ consume({ context: testContext, subscribe: true })
195
+ ], TestNavigation.prototype, "_testContext", 2);
196
+ __decorateClass([
197
+ state(),
198
+ consume({ context: sessionContext, subscribe: true })
199
+ ], TestNavigation.prototype, "_sessionContext", 2);
200
+ __decorateClass([
201
+ state()
202
+ ], TestNavigation.prototype, "configContext", 2);
203
+ __decorateClass([
204
+ state(),
205
+ provide({ context: computedContext })
206
+ ], TestNavigation.prototype, "computedContext", 2);
207
+ __decorateClass([
208
+ property({ type: Boolean, attribute: "auto-score-items" })
209
+ ], TestNavigation.prototype, "autoScoreItems", 2);
210
+ TestNavigation = __decorateClass([
211
+ customElement("test-navigation")
212
+ ], TestNavigation);
213
+
214
+ export {
215
+ TestNavigation
216
+ };
217
+ //# sourceMappingURL=chunk-XSHHCMRC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-navigation.ts"],"sourcesContent":["import { consume, provide } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { testContext } from '../../exports/test.context';\nimport { sessionContext } from '../../exports/session.context';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedItemContext } from '../../exports/computed-item.context';\nimport type { QtiAssessmentItem } from '../../qti-components';\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { PropertyValues } from 'lit';\nimport type { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiTestPart } from '../core';\nimport type { ConfigContext } from '../../exports/config.context';\nimport type { SessionContext } from '../../exports/session.context';\nimport type { TestContext } from '../../exports/test.context';\n\ntype CustomEventMap = {\n 'test-end-attempt': CustomEvent;\n 'test-show-correct-response': CustomEvent<{ value: boolean }>;\n};\n\ndeclare global {\n interface GlobalEventHandlersEventMap extends CustomEventMap {}\n}\n\n@customElement('test-navigation')\nexport class TestNavigation extends LitElement {\n @property({ type: String }) identifier = undefined;\n\n @state()\n public initContext: { identifier: string; [key: string]: any }[] = [];\n\n @state()\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n @state()\n @consume({ context: sessionContext, subscribe: true })\n public _sessionContext?: SessionContext;\n\n @state()\n public configContext: ConfigContext = {};\n\n @state()\n @provide({ context: computedContext })\n public computedContext: ComputedContext;\n\n @property({ type: Boolean, attribute: 'auto-score-items' }) autoScoreItems = false;\n\n private _testElement: QtiAssessmentTest;\n\n constructor() {\n super();\n this.addEventListener('qti-assessment-test-connected', this._handleTestConnected.bind(this));\n this.addEventListener('qti-assessment-item-connected', this._handleItemConnected.bind(this));\n\n this.addEventListener('qti-interaction-changed', this._handleInteractionChanged.bind(this));\n\n this.addEventListener('test-end-attempt', this._handleTestEndAttempt.bind(this));\n this.addEventListener('test-show-correct-response', this._handleTestShowCorrectResponse.bind(this));\n }\n\n private _handleTestEndAttempt(_event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;\n qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);\n }\n\n private _handleTestShowCorrectResponse(event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.showCorrectResponse(event.detail);\n }\n\n private _handleInteractionChanged(_event: CustomEvent) {\n if (this.autoScoreItems) {\n const assessmentItem = (_event.composedPath()[0] as HTMLElement).closest('qti-assessment-item');\n const scoreOutcomeIdentifier = assessmentItem.variables.find(v => v.identifier === 'SCORE') as OutcomeVariable;\n if (scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === 'false') {\n assessmentItem.processResponse();\n }\n }\n }\n\n render() {\n return html`<slot></slot>`;\n }\n\n /* PK: on test connected we can build the computed context */\n _handleTestConnected(event: CustomEvent) {\n this._testElement = event.detail as QtiAssessmentTest;\n const testPartElements = Array.from(this._testElement?.querySelectorAll<QtiTestPart>(`qti-test-part`) || []);\n this.computedContext = {\n testParts: testPartElements.map(testPart => {\n const sectionElements = [...testPart.querySelectorAll<QtiAssessmentSection>(`qti-assessment-section`)];\n return {\n active: false,\n identifier: testPart.identifier,\n sections: sectionElements.map(section => {\n const itemElements = [...section.querySelectorAll<QtiAssessmentItemRef>(`qti-assessment-item-ref`)];\n return {\n active: false,\n identifier: section.identifier,\n title: section.title,\n items: itemElements.map(item => {\n return {\n active: false,\n identifier: item.identifier,\n href: item.href,\n variables: []\n } as ComputedItemContext;\n })\n };\n })\n };\n })\n };\n\n // const sections = this.computedContext?.testParts.flatMap(testPart => testPart.sections);\n\n // let id;\n // if (this.navigate === 'section') {\n // id = sections.find(section => section.active).identifier;\n // }\n // if (this.navigate === 'item') {\n // id = sections.flatMap(section => section.items).find(item => item.active).identifier;\n // }\n\n // if (id) {\n // this.dispatchEvent(\n // new CustomEvent('qti-request-navigation', {\n // detail: { type: this.navigate, id },\n // bubbles: true,\n // composed: true\n // })\n // );\n // }\n }\n\n /* PK: on item connected we can add item only properties in the xml */\n _handleItemConnected(event: CustomEvent) {\n const itemElement = event.detail as QtiAssessmentItem;\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n items: section.items.map(item => {\n if (item.identifier !== itemElement.identifier) {\n return item;\n }\n return {\n ...item,\n label: itemElement.getAttribute('label'),\n title: itemElement.title,\n adaptive: itemElement.adaptive == 'true' || false,\n timeDependent: itemElement.timeDependent == 'true' || false,\n variables: (itemElement as any)._context.variables\n };\n })\n };\n })\n };\n })\n };\n }\n\n /* PK: on every change of the candidate we will recomputed the computedContext */\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) return;\n\n let itemIndex = 1;\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n active: this._sessionContext?.navPartId === testPart.identifier || false,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n active: this._sessionContext?.navSectionId === section.identifier || false,\n completed: section.items.every(\n item =>\n this._testContext.items\n .find(i => i.identifier === item.identifier)\n ?.variables.find(v => v.identifier === 'completionStatus').value === 'completed'\n ),\n\n items: section.items.map(item => {\n const itemContext = this._testContext?.items.find(i => i.identifier === item.identifier);\n let computedItem;\n\n if (this.initContext) {\n const initContext = this.initContext.find(i => i.identifier === item.identifier);\n computedItem = { ...item, ...itemContext, ...initContext };\n } else {\n computedItem = { ...item, ...itemContext };\n }\n\n const rawscore = computedItem.variables?.find(vr => vr.identifier == 'SCORE')?.value;\n const score = parseInt(rawscore?.toString());\n const completionStatus = computedItem.variables?.find(v => v.identifier === 'completionStatus')?.value;\n const categories = computedItem.category ? computedItem.category?.split(' ') : [];\n\n const type = categories.includes(this.configContext?.infoItemCategory) ? 'info' : 'regular'; // rounded-full\n const active = this._sessionContext?.navItemId === computedItem.identifier || false; // !border-sky-600\n\n const correct =\n // this._testContext.view === 'scorer' &&\n (type == 'regular' && score !== undefined && !isNaN(score) && score > 0) || false; // bg-green-100 border-green-400\n const incorrect =\n // this._testContext.view === 'scorer' &&\n (type == 'regular' && score !== undefined && !isNaN(score) && score <= 0) || false; // bg-red-100 border-red-400\n const completed =\n // this._testContext.view === 'candidate' &&\n completionStatus === 'completed';\n // || item.category === this.host._configContext?.infoItemCategory || false\n const response = computedItem.variables?.find(v => v.identifier === 'RESPONSE')?.value || '';\n\n const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;\n\n return {\n ...computedItem,\n // rawscore, // not necessary for outside world\n // score, // not necessary for outside world\n // completionStatus, // not necessary for outside world\n // categories, // not necessary for outside world\n type,\n active,\n correct,\n incorrect,\n completed,\n index,\n response\n };\n })\n };\n })\n };\n })\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,SAAS,eAAe;AACjC,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe,UAAU,aAAa;AA0BxC,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAyB7C,cAAc;AACZ,UAAM;AAzBoB,sBAAa;AAGzC,SAAO,cAA4D,CAAC;AAWpE,SAAO,gBAA+B,CAAC;AAMqB,0BAAiB;AAM3E,SAAK,iBAAiB,iCAAiC,KAAK,qBAAqB,KAAK,IAAI,CAAC;AAC3F,SAAK,iBAAiB,iCAAiC,KAAK,qBAAqB,KAAK,IAAI,CAAC;AAE3F,SAAK,iBAAiB,2BAA2B,KAAK,0BAA0B,KAAK,IAAI,CAAC;AAE1F,SAAK,iBAA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