@citolab/qti-components 7.1.5 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/cdn/chunks/chunk-2GVQHMFN.js +5 -0
  2. package/cdn/chunks/chunk-34TLO462.js +1 -0
  3. package/cdn/chunks/chunk-3AUZHOWF.js +5 -0
  4. package/cdn/chunks/chunk-3BTFQ7WO.js +5 -0
  5. package/cdn/chunks/chunk-3G52PPHF.js +1 -0
  6. package/cdn/chunks/chunk-3T7FMZJJ.js +5 -0
  7. package/cdn/chunks/chunk-3WMAQ764.js +23 -0
  8. package/cdn/chunks/chunk-3XYZ63C3.js +1 -0
  9. package/cdn/chunks/chunk-43VY76CQ.js +5 -0
  10. package/cdn/chunks/chunk-4VDQDT6F.js +1 -0
  11. package/cdn/chunks/chunk-4XDZ5XHU.js +1007 -0
  12. package/cdn/chunks/chunk-52V4Q43H.js +5 -0
  13. package/cdn/chunks/chunk-5DVS53XB.js +1007 -0
  14. package/cdn/chunks/chunk-6BZPFYLZ.js +1 -0
  15. package/cdn/chunks/chunk-7B6HAKFL.js +1 -0
  16. package/cdn/chunks/chunk-7BENQ76L.js +1 -0
  17. package/cdn/chunks/chunk-A6PJTNI7.js +23 -0
  18. package/cdn/chunks/chunk-AFBSMLI4.js +5 -0
  19. package/cdn/chunks/chunk-AU2GM346.js +23 -0
  20. package/cdn/chunks/chunk-B345O2HX.js +1 -0
  21. package/cdn/chunks/chunk-B3RMHCUZ.js +1 -0
  22. package/cdn/chunks/chunk-BFPXRWNH.js +5 -0
  23. package/cdn/chunks/chunk-BGBABJCL.js +5 -0
  24. package/cdn/chunks/chunk-BKSBIZJA.js +5 -0
  25. package/cdn/chunks/chunk-BWG4B5VP.js +0 -0
  26. package/cdn/chunks/chunk-C25LH4KA.js +1 -0
  27. package/cdn/chunks/chunk-CDCBI3YD.js +1 -0
  28. package/cdn/chunks/chunk-CQPD5NPM.js +1 -0
  29. package/cdn/chunks/chunk-CS6UCV2Q.js +5 -0
  30. package/cdn/chunks/chunk-D3C4N6YO.js +8 -0
  31. package/cdn/chunks/chunk-D74A6CWS.js +8 -0
  32. package/cdn/chunks/chunk-DFZQWABG.js +5 -0
  33. package/cdn/chunks/chunk-DHZMASGY.js +5 -0
  34. package/cdn/chunks/chunk-EZ7OIK2M.js +1007 -0
  35. package/cdn/chunks/chunk-F2WLIUYH.js +5 -0
  36. package/cdn/chunks/chunk-F3ZZJBV2.js +5 -0
  37. package/cdn/chunks/chunk-FCH2GIHD.js +1 -0
  38. package/cdn/chunks/chunk-FKUEIENC.js +5 -0
  39. package/cdn/chunks/chunk-FMCWO2FJ.js +17 -0
  40. package/cdn/chunks/chunk-FQW2YR3J.js +1 -0
  41. package/cdn/chunks/chunk-FVEUVB2H.js +23 -0
  42. package/cdn/chunks/chunk-GMF365YO.js +16 -0
  43. package/cdn/chunks/chunk-GWRXCQHZ.js +23 -0
  44. package/cdn/chunks/chunk-HAXNBTTE.js +1 -0
  45. package/cdn/chunks/chunk-HEAJ2NEA.js +1007 -0
  46. package/cdn/chunks/chunk-HKBOCCDM.js +5 -0
  47. package/cdn/chunks/chunk-HRLTVAPZ.js +5 -0
  48. package/cdn/chunks/chunk-HZ5STZXK.js +5 -0
  49. package/cdn/chunks/chunk-I5HGXKPD.js +1007 -0
  50. package/cdn/chunks/chunk-IELXBBZK.js +5 -0
  51. package/cdn/chunks/chunk-IHL5T5GX.js +5 -0
  52. package/cdn/chunks/chunk-J2M4UG43.js +1 -0
  53. package/cdn/chunks/chunk-JAMSX45C.js +1 -0
  54. package/cdn/chunks/chunk-JEPI46VU.js +5 -0
  55. package/cdn/chunks/chunk-JSQUXTN4.js +1033 -0
  56. package/cdn/chunks/chunk-JXDOR5ZC.js +1 -0
  57. package/cdn/chunks/chunk-JZCJOPJ4.js +1007 -0
  58. package/cdn/chunks/chunk-KKEW6E2D.js +5 -0
  59. package/cdn/chunks/chunk-L4UTGAI5.js +5 -0
  60. package/cdn/chunks/chunk-LMLG3NBM.js +5 -0
  61. package/cdn/chunks/chunk-MM2ZXHVH.js +5 -0
  62. package/cdn/chunks/chunk-NQQE76LE.js +1 -0
  63. package/cdn/chunks/chunk-O6CWZJXT.js +28 -0
  64. package/cdn/chunks/chunk-OSEDGNNB.js +1007 -0
  65. package/cdn/chunks/chunk-PJFHT7NY.js +5 -0
  66. package/cdn/chunks/chunk-PKWOG7OF.js +5 -0
  67. package/cdn/chunks/chunk-PTG4PTFS.js +5 -0
  68. package/cdn/chunks/chunk-QIRSCGXH.js +1007 -0
  69. package/cdn/chunks/chunk-RIPDQPTC.js +5 -0
  70. package/cdn/chunks/chunk-RO5THFZ6.js +5 -0
  71. package/cdn/chunks/chunk-SQ3RENJ6.js +5 -0
  72. package/cdn/chunks/chunk-SUOAWPV7.js +23 -0
  73. package/cdn/chunks/chunk-T43NJLH5.js +5 -0
  74. package/cdn/chunks/chunk-TIH5N4LQ.js +1007 -0
  75. package/cdn/chunks/chunk-TOUJRNTD.js +1007 -0
  76. package/cdn/chunks/chunk-TSMKXWWV.js +5 -0
  77. package/cdn/chunks/chunk-TU4L55WU.js +5 -0
  78. package/cdn/chunks/chunk-UDPQY4OA.js +1007 -0
  79. package/cdn/chunks/chunk-ULI6NOVG.js +23 -0
  80. package/cdn/chunks/chunk-UTEMKKYS.js +1 -0
  81. package/cdn/chunks/chunk-UV3CSMRU.js +5 -0
  82. package/cdn/chunks/chunk-V2RDHKE2.js +5 -0
  83. package/cdn/chunks/chunk-VQLIWL6K.js +5 -0
  84. package/cdn/chunks/chunk-VZEUFE5C.js +3455 -0
  85. package/cdn/chunks/chunk-W5B2MLGL.js +1 -0
  86. package/cdn/chunks/chunk-WJGOCWFB.js +1 -0
  87. package/cdn/chunks/chunk-WLQN7SVZ.js +1033 -0
  88. package/cdn/chunks/chunk-WUX2JPB5.js +17 -0
  89. package/cdn/chunks/chunk-X7FRU3B6.js +5 -0
  90. package/cdn/chunks/chunk-XS46RWY6.js +5 -0
  91. package/cdn/chunks/chunk-XTNESJMB.js +5 -0
  92. package/cdn/chunks/chunk-Y2EDF22E.js +16 -0
  93. package/cdn/chunks/chunk-YE4ZNHXG.js +23 -0
  94. package/cdn/chunks/chunk-YMFPA4QO.js +5 -0
  95. package/cdn/chunks/chunk-YRK3ZLQP.js +1033 -0
  96. package/cdn/index.global.js +1 -1
  97. package/cdn/index.js +1 -1
  98. package/cdn/qti-components/index.js +1 -1
  99. package/cdn/qti-item/components/item-container.js +1 -1
  100. package/cdn/qti-item/core/index.js +1 -1
  101. package/cdn/qti-loader/index.js +1 -1
  102. package/cdn/qti-test/components/index.js +1 -1
  103. package/cdn/qti-test/components/test-container.js +1 -1
  104. package/cdn/qti-test/components/test-navigation.js +1 -1
  105. package/cdn/qti-test/components/test-next.js +1 -1
  106. package/cdn/qti-test/components/test-scoring-buttons.js +1 -1
  107. package/cdn/qti-test/components/test-scoring-feedback.js +1 -1
  108. package/cdn/qti-test/components/test-show-correct-response.js +1 -1
  109. package/cdn/qti-test/components/test-stamp.js +1 -0
  110. package/cdn/qti-test/components/test-view-toggle.js +1 -1
  111. package/cdn/qti-test/core/index.js +1 -1
  112. package/cdn/qti-transformers/index.js +1 -1
  113. package/dist/chunks/chunk-2GPGOKL6.js +94 -0
  114. package/dist/chunks/chunk-2GPGOKL6.js.map +1 -0
  115. package/dist/chunks/chunk-2J22QBLB.js +94 -0
  116. package/dist/chunks/chunk-2J22QBLB.js.map +1 -0
  117. package/dist/chunks/chunk-34F2DVNP.js +85 -0
  118. package/dist/chunks/chunk-34F2DVNP.js.map +1 -0
  119. package/dist/chunks/chunk-3TM6VQEG.js +375 -0
  120. package/dist/chunks/chunk-3TM6VQEG.js.map +1 -0
  121. package/dist/chunks/chunk-3YVVZ2MO.js +374 -0
  122. package/dist/chunks/chunk-3YVVZ2MO.js.map +1 -0
  123. package/dist/chunks/chunk-46RFKXS6.js +94 -0
  124. package/dist/chunks/chunk-46RFKXS6.js.map +1 -0
  125. package/dist/chunks/chunk-47BWT37I.js +94 -0
  126. package/dist/chunks/chunk-47BWT37I.js.map +1 -0
  127. package/dist/chunks/chunk-4EXSIVXY.js +68 -0
  128. package/dist/chunks/chunk-4EXSIVXY.js.map +1 -0
  129. package/dist/chunks/chunk-4JL6LXWC.js +94 -0
  130. package/dist/chunks/chunk-4JL6LXWC.js.map +1 -0
  131. package/dist/chunks/chunk-4TQ3YR2O.js +31 -0
  132. package/dist/chunks/chunk-4TQ3YR2O.js.map +1 -0
  133. package/dist/chunks/chunk-4VEH63K4.js +854 -0
  134. package/dist/chunks/chunk-4VEH63K4.js.map +1 -0
  135. package/dist/chunks/chunk-5FKTC6XV.js +99 -0
  136. package/dist/chunks/chunk-5FKTC6XV.js.map +1 -0
  137. package/dist/chunks/chunk-5SZAGP4N.js +863 -0
  138. package/dist/chunks/chunk-5SZAGP4N.js.map +1 -0
  139. package/dist/chunks/chunk-64EQ3AQ4.js +240 -0
  140. package/dist/chunks/chunk-64EQ3AQ4.js.map +1 -0
  141. package/dist/chunks/chunk-6MECYIS2.js +94 -0
  142. package/dist/chunks/chunk-6MECYIS2.js.map +1 -0
  143. package/dist/chunks/chunk-6T5ICOX2.js +94 -0
  144. package/dist/chunks/chunk-6T5ICOX2.js.map +1 -0
  145. package/dist/chunks/chunk-6ZK4ZDQA.js +94 -0
  146. package/dist/chunks/chunk-6ZK4ZDQA.js.map +1 -0
  147. package/dist/chunks/chunk-7KTTLJUH.js +45 -0
  148. package/dist/chunks/chunk-7KTTLJUH.js.map +1 -0
  149. package/dist/chunks/chunk-7LFQ6D75.js +95 -0
  150. package/dist/chunks/chunk-7LFQ6D75.js.map +1 -0
  151. package/dist/chunks/chunk-7T5WVG7T.js +853 -0
  152. package/dist/chunks/chunk-7T5WVG7T.js.map +1 -0
  153. package/dist/chunks/chunk-A5IAS5VV.js +54 -0
  154. package/dist/chunks/chunk-A5IAS5VV.js.map +1 -0
  155. package/dist/chunks/chunk-A5W753FL.js +92 -0
  156. package/dist/chunks/chunk-A5W753FL.js.map +1 -0
  157. package/dist/chunks/chunk-ABDJRZ2V.js +78 -0
  158. package/dist/chunks/chunk-ABDJRZ2V.js.map +1 -0
  159. package/dist/chunks/chunk-AN33KA5S.js +94 -0
  160. package/dist/chunks/chunk-AN33KA5S.js.map +1 -0
  161. package/dist/chunks/chunk-B2SP77UV.js +818 -0
  162. package/dist/chunks/chunk-B2SP77UV.js.map +1 -0
  163. package/dist/chunks/chunk-BB7V3D2X.js +250 -0
  164. package/dist/chunks/chunk-BB7V3D2X.js.map +1 -0
  165. package/dist/chunks/chunk-BJAP2552.js +6893 -0
  166. package/dist/chunks/chunk-BJAP2552.js.map +1 -0
  167. package/dist/chunks/chunk-BSPLGP2R.js +627 -0
  168. package/dist/chunks/chunk-BSPLGP2R.js.map +1 -0
  169. package/dist/chunks/chunk-BWUEY6V5.js +818 -0
  170. package/dist/chunks/chunk-BWUEY6V5.js.map +1 -0
  171. package/dist/chunks/chunk-C7YUIKFQ.js +249 -0
  172. package/dist/chunks/chunk-C7YUIKFQ.js.map +1 -0
  173. package/dist/chunks/chunk-CIZ7HKZC.js +42 -0
  174. package/dist/chunks/chunk-CIZ7HKZC.js.map +1 -0
  175. package/dist/chunks/chunk-CJSBOJOH.js +6888 -0
  176. package/dist/chunks/chunk-CJSBOJOH.js.map +1 -0
  177. package/dist/chunks/chunk-CYB63HHS.js +31 -0
  178. package/dist/chunks/chunk-CYB63HHS.js.map +1 -0
  179. package/dist/chunks/chunk-DFSZKFKS.js +43 -0
  180. package/dist/chunks/chunk-DFSZKFKS.js.map +1 -0
  181. package/dist/chunks/chunk-DNRSH4DB.js +854 -0
  182. package/dist/chunks/chunk-DNRSH4DB.js.map +1 -0
  183. package/dist/chunks/chunk-DPDCXMHW.js +81 -0
  184. package/dist/chunks/chunk-DPDCXMHW.js.map +1 -0
  185. package/dist/chunks/chunk-DQ62VQEH.js +627 -0
  186. package/dist/chunks/chunk-DQ62VQEH.js.map +1 -0
  187. package/dist/chunks/chunk-E4G74EVO.js +99 -0
  188. package/dist/chunks/chunk-E4G74EVO.js.map +1 -0
  189. package/dist/chunks/chunk-EA7DHOYO.js +6903 -0
  190. package/dist/chunks/chunk-EA7DHOYO.js.map +1 -0
  191. package/dist/chunks/chunk-EAFJQRTV.js +56 -0
  192. package/dist/chunks/chunk-EAFJQRTV.js.map +1 -0
  193. package/dist/chunks/chunk-EL4TPH56.js +94 -0
  194. package/dist/chunks/chunk-EL4TPH56.js.map +1 -0
  195. package/dist/chunks/chunk-FI6LX4IS.js +853 -0
  196. package/dist/chunks/chunk-FI6LX4IS.js.map +1 -0
  197. package/dist/chunks/chunk-FORIPEB2.js +241 -0
  198. package/dist/chunks/chunk-FORIPEB2.js.map +1 -0
  199. package/dist/chunks/chunk-G3TG4ADZ.js +8 -0
  200. package/dist/chunks/chunk-G3TG4ADZ.js.map +1 -0
  201. package/dist/chunks/chunk-H4XZSMVR.js +375 -0
  202. package/dist/chunks/chunk-H4XZSMVR.js.map +1 -0
  203. package/dist/chunks/chunk-H6O2X4MD.js +42 -0
  204. package/dist/chunks/chunk-H6O2X4MD.js.map +1 -0
  205. package/dist/chunks/chunk-H7W3RQS4.js +627 -0
  206. package/dist/chunks/chunk-H7W3RQS4.js.map +1 -0
  207. package/dist/chunks/chunk-HMHM2W7Z.js +241 -0
  208. package/dist/chunks/chunk-HMHM2W7Z.js.map +1 -0
  209. package/dist/chunks/chunk-I3RHYDUK.js +6917 -0
  210. package/dist/chunks/chunk-I3RHYDUK.js.map +1 -0
  211. package/dist/chunks/chunk-IHNLBY62.js +42 -0
  212. package/dist/chunks/chunk-IHNLBY62.js.map +1 -0
  213. package/dist/chunks/chunk-ILA6BNIO.js +31 -0
  214. package/dist/chunks/chunk-ILA6BNIO.js.map +1 -0
  215. package/dist/chunks/chunk-JFZF77EN.js +31 -0
  216. package/dist/chunks/chunk-JFZF77EN.js.map +1 -0
  217. package/dist/chunks/chunk-JOQ2E6SE.js +92 -0
  218. package/dist/chunks/chunk-JOQ2E6SE.js.map +1 -0
  219. package/dist/chunks/chunk-JQBEZ43O.js +240 -0
  220. package/dist/chunks/chunk-JQBEZ43O.js.map +1 -0
  221. package/dist/chunks/chunk-JQQ755AG.js +854 -0
  222. package/dist/chunks/chunk-JQQ755AG.js.map +1 -0
  223. package/dist/chunks/chunk-JRDTY7YA.js +627 -0
  224. package/dist/chunks/chunk-JRDTY7YA.js.map +1 -0
  225. package/dist/chunks/chunk-JU7QJQ6F.js +853 -0
  226. package/dist/chunks/chunk-JU7QJQ6F.js.map +1 -0
  227. package/dist/chunks/chunk-K6LM7XK5.js +94 -0
  228. package/dist/chunks/chunk-K6LM7XK5.js.map +1 -0
  229. package/dist/chunks/chunk-K6PU3ZO4.js +853 -0
  230. package/dist/chunks/chunk-K6PU3ZO4.js.map +1 -0
  231. package/dist/chunks/chunk-KD26ZB2H.js +3445 -0
  232. package/dist/chunks/chunk-KD26ZB2H.js.map +1 -0
  233. package/dist/chunks/chunk-KGL6SIOD.js +6893 -0
  234. package/dist/chunks/chunk-KGL6SIOD.js.map +1 -0
  235. package/dist/chunks/chunk-KIRLKN6I.js +68 -0
  236. package/dist/chunks/chunk-KIRLKN6I.js.map +1 -0
  237. package/dist/chunks/chunk-L74KEUIS.js +94 -0
  238. package/dist/chunks/chunk-L74KEUIS.js.map +1 -0
  239. package/dist/chunks/chunk-LEXNKJYF.js +6888 -0
  240. package/dist/chunks/chunk-LEXNKJYF.js.map +1 -0
  241. package/dist/chunks/chunk-LVE5GKDT.js +94 -0
  242. package/dist/chunks/chunk-LVE5GKDT.js.map +1 -0
  243. package/dist/chunks/chunk-LVZHVB7F.js +31 -0
  244. package/dist/chunks/chunk-LVZHVB7F.js.map +1 -0
  245. package/dist/chunks/chunk-MGLNBEW4.js +33 -0
  246. package/dist/chunks/chunk-MGLNBEW4.js.map +1 -0
  247. package/dist/chunks/chunk-MS7YRGNG.js +56 -0
  248. package/dist/chunks/chunk-MS7YRGNG.js.map +1 -0
  249. package/dist/chunks/chunk-N25ZKAHQ.js +50 -0
  250. package/dist/chunks/chunk-N25ZKAHQ.js.map +1 -0
  251. package/dist/chunks/chunk-N46CJQRI.js +94 -0
  252. package/dist/chunks/chunk-N46CJQRI.js.map +1 -0
  253. package/dist/chunks/chunk-N4QWREF4.js +375 -0
  254. package/dist/chunks/chunk-N4QWREF4.js.map +1 -0
  255. package/dist/chunks/chunk-NM3JA4DH.js +6893 -0
  256. package/dist/chunks/chunk-NM3JA4DH.js.map +1 -0
  257. package/dist/chunks/chunk-NOHVLBCB.js +371 -0
  258. package/dist/chunks/chunk-NOHVLBCB.js.map +1 -0
  259. package/dist/chunks/chunk-NQSOVEFB.js +31 -0
  260. package/dist/chunks/chunk-NQSOVEFB.js.map +1 -0
  261. package/dist/chunks/chunk-OA7AFFCB.js +866 -0
  262. package/dist/chunks/chunk-OA7AFFCB.js.map +1 -0
  263. package/dist/chunks/chunk-OLNSD7FR.js +31 -0
  264. package/dist/chunks/chunk-OLNSD7FR.js.map +1 -0
  265. package/dist/chunks/chunk-OREE4FRY.js +42 -0
  266. package/dist/chunks/chunk-OREE4FRY.js.map +1 -0
  267. package/dist/chunks/chunk-P66WO2Q5.js +870 -0
  268. package/dist/chunks/chunk-P66WO2Q5.js.map +1 -0
  269. package/dist/chunks/chunk-PKOIFI5C.js +853 -0
  270. package/dist/chunks/chunk-PKOIFI5C.js.map +1 -0
  271. package/dist/chunks/chunk-QFV3VHZ4.js +43 -0
  272. package/dist/chunks/chunk-QFV3VHZ4.js.map +1 -0
  273. package/dist/chunks/chunk-QTKNSVUO.js +854 -0
  274. package/dist/chunks/chunk-QTKNSVUO.js.map +1 -0
  275. package/dist/chunks/chunk-RSGEN2FF.js +6917 -0
  276. package/dist/chunks/chunk-RSGEN2FF.js.map +1 -0
  277. package/dist/chunks/chunk-S6XGFD5B.js +6893 -0
  278. package/dist/chunks/chunk-S6XGFD5B.js.map +1 -0
  279. package/dist/chunks/chunk-SOT463MH.js +68 -0
  280. package/dist/chunks/chunk-SOT463MH.js.map +1 -0
  281. package/dist/chunks/chunk-SZMR2BFI.js +94 -0
  282. package/dist/chunks/chunk-SZMR2BFI.js.map +1 -0
  283. package/dist/chunks/chunk-TDKYWAGB.js +50 -0
  284. package/dist/chunks/chunk-TDKYWAGB.js.map +1 -0
  285. package/dist/chunks/chunk-TDNCAAAT.js +627 -0
  286. package/dist/chunks/chunk-TDNCAAAT.js.map +1 -0
  287. package/dist/chunks/chunk-TVOHUHS4.js +94 -0
  288. package/dist/chunks/chunk-TVOHUHS4.js.map +1 -0
  289. package/dist/chunks/chunk-UE3R54FP.js +853 -0
  290. package/dist/chunks/chunk-UE3R54FP.js.map +1 -0
  291. package/dist/chunks/chunk-UUEOV5NM.js +1 -0
  292. package/dist/chunks/chunk-UUEOV5NM.js.map +1 -0
  293. package/dist/chunks/chunk-UZRIKXLU.js +94 -0
  294. package/dist/chunks/chunk-UZRIKXLU.js.map +1 -0
  295. package/dist/chunks/chunk-VAYGVW5R.js +6903 -0
  296. package/dist/chunks/chunk-VAYGVW5R.js.map +1 -0
  297. package/dist/chunks/chunk-VEWD22O5.js +383 -0
  298. package/dist/chunks/chunk-VEWD22O5.js.map +1 -0
  299. package/dist/chunks/chunk-VF32HLF4.js +81 -0
  300. package/dist/chunks/chunk-VF32HLF4.js.map +1 -0
  301. package/dist/chunks/chunk-VY7QNZVM.js +6893 -0
  302. package/dist/chunks/chunk-VY7QNZVM.js.map +1 -0
  303. package/dist/chunks/chunk-W4FWEMCO.js +871 -0
  304. package/dist/chunks/chunk-W4FWEMCO.js.map +1 -0
  305. package/dist/chunks/chunk-W5VRVGBL.js +81 -0
  306. package/dist/chunks/chunk-W5VRVGBL.js.map +1 -0
  307. package/dist/chunks/chunk-WDGXLQLI.js +94 -0
  308. package/dist/chunks/chunk-WDGXLQLI.js.map +1 -0
  309. package/dist/chunks/chunk-WTTOJHIM.js +371 -0
  310. package/dist/chunks/chunk-WTTOJHIM.js.map +1 -0
  311. package/dist/chunks/chunk-WZZOX7S2.js +853 -0
  312. package/dist/chunks/chunk-WZZOX7S2.js.map +1 -0
  313. package/dist/chunks/chunk-X2G652U7.js +6903 -0
  314. package/dist/chunks/chunk-X2G652U7.js.map +1 -0
  315. package/dist/chunks/chunk-XKQP4R6O.js +380 -0
  316. package/dist/chunks/chunk-XKQP4R6O.js.map +1 -0
  317. package/dist/chunks/chunk-Z3SN77PI.js +31 -0
  318. package/dist/chunks/chunk-Z3SN77PI.js.map +1 -0
  319. package/dist/chunks/chunk-ZECYUSVI.js +43 -0
  320. package/dist/chunks/chunk-ZECYUSVI.js.map +1 -0
  321. package/dist/chunks/chunk-ZSPVMGE5.js +94 -0
  322. package/dist/chunks/chunk-ZSPVMGE5.js.map +1 -0
  323. package/dist/chunks/chunk-ZTXBJYUG.js +94 -0
  324. package/dist/chunks/chunk-ZTXBJYUG.js.map +1 -0
  325. package/dist/exports/computed-item.context.d.ts +1 -1
  326. package/dist/exports/computed.context.d.ts +1 -1
  327. package/dist/exports/interaction.d.ts +1 -1
  328. package/dist/exports/item.context.d.ts +1 -1
  329. package/dist/exports/qti-assessment-item.context.d.ts +1 -1
  330. package/dist/exports/qti-condition-expression.d.ts +1 -1
  331. package/dist/exports/qti-expression.d.ts +1 -1
  332. package/dist/exports/session.context.d.ts +2 -2
  333. package/dist/exports/test.context.d.ts +1 -1
  334. package/dist/exports/variables.d.ts +1 -1
  335. package/dist/index.d.ts +7 -2
  336. package/dist/index.js +39 -23
  337. package/dist/item.css +26 -130
  338. package/dist/qti-components/index.d.ts +2 -2
  339. package/dist/qti-components/index.js +2 -2
  340. package/dist/qti-components-jsx.d.ts +84 -2
  341. package/dist/qti-item/components/item-container.js +3 -3
  342. package/dist/qti-item/components/item-show-correct-response.d.ts +1 -1
  343. package/dist/qti-item/components/print-item-variables.d.ts +1 -1
  344. package/dist/qti-item/core/index.d.ts +1 -1
  345. package/dist/qti-item/core/index.js +3 -3
  346. package/dist/qti-loader/index.d.ts +1 -1
  347. package/dist/qti-loader/index.js +2 -2
  348. package/dist/qti-response-declaration-C3kpm650.d.ts +1171 -0
  349. package/dist/qti-test/components/index.d.ts +7 -2
  350. package/dist/qti-test/components/index.js +29 -13
  351. package/dist/qti-test/components/test-container.js +3 -3
  352. package/dist/qti-test/components/test-navigation.d.ts +3 -2
  353. package/dist/qti-test/components/test-navigation.js +1 -1
  354. package/dist/qti-test/components/test-next.d.ts +1 -1
  355. package/dist/qti-test/components/test-next.js +1 -1
  356. package/dist/qti-test/components/test-prev.d.ts +1 -1
  357. package/dist/qti-test/components/test-print-context.d.ts +1 -1
  358. package/dist/qti-test/components/test-print-item-variables.d.ts +1 -1
  359. package/dist/qti-test/components/test-scoring-buttons.d.ts +2 -1
  360. package/dist/qti-test/components/test-scoring-buttons.js +1 -1
  361. package/dist/qti-test/components/test-scoring-feedback.d.ts +9 -1273
  362. package/dist/qti-test/components/test-scoring-feedback.js +4 -60
  363. package/dist/qti-test/components/test-scoring-feedback.js.map +1 -1
  364. package/dist/qti-test/components/test-show-correct-response.d.ts +1 -1
  365. package/dist/qti-test/components/test-show-correct-response.js +1 -1
  366. package/dist/qti-test/components/test-stamp.d.ts +18 -0
  367. package/dist/qti-test/components/test-stamp.js +9 -0
  368. package/dist/qti-test/components/test-stamp.js.map +1 -0
  369. package/dist/qti-test/components/test-view-toggle.d.ts +2 -2
  370. package/dist/qti-test/components/test-view-toggle.js +1 -1
  371. package/dist/qti-test/core/index.d.ts +4 -4
  372. package/dist/qti-test/core/index.js +3 -3
  373. package/dist/qti-test-feedback-CG8nrjhS.d.ts +98 -0
  374. package/dist/qti-test-feedback-R38tNXBH.d.ts +98 -0
  375. package/dist/qti-transformers/index.d.ts +4 -1
  376. package/dist/qti-transformers/index.js +1 -1
  377. package/dist/vscode.html-custom-data.json +32 -7
  378. package/package.json +4 -4
@@ -0,0 +1,863 @@
1
+ import {
2
+ INITIAL_SESSION_CONTEXT,
3
+ sessionContext
4
+ } from "./chunk-UZ4QB5IO.js";
5
+ import {
6
+ INITIAL_TEST_CONTEXT,
7
+ testContext
8
+ } from "./chunk-CJADUWEC.js";
9
+ import {
10
+ QtiModalFeedback
11
+ } from "./chunk-I3RHYDUK.js";
12
+ import {
13
+ qtiTransformItem
14
+ } from "./chunk-XKQP4R6O.js";
15
+ import {
16
+ __decorateClass
17
+ } from "./chunk-H2JE6IVU.js";
18
+
19
+ // src/lib/qti-test/core/qti-test.ts
20
+ import { html } from "lit";
21
+ import { customElement } from "lit/decorators.js";
22
+
23
+ // src/lib/qti-test/core/mixins/test-navigation.mixin.ts
24
+ import { property } from "lit/decorators.js";
25
+ var NavigationErrorType = /* @__PURE__ */ ((NavigationErrorType2) => {
26
+ NavigationErrorType2["ITEM_NOT_FOUND"] = "item-not-found";
27
+ NavigationErrorType2["SECTION_NOT_FOUND"] = "section-not-found";
28
+ NavigationErrorType2["LOAD_ERROR"] = "load-error";
29
+ NavigationErrorType2["NETWORK_ERROR"] = "network-error";
30
+ NavigationErrorType2["TIMEOUT_ERROR"] = "timeout-error";
31
+ return NavigationErrorType2;
32
+ })(NavigationErrorType || {});
33
+ var TestNavigationMixin = (superClass) => {
34
+ class TestNavigationClass extends superClass {
35
+ constructor(...args) {
36
+ super(...args);
37
+ this.navigate = null;
38
+ this.cacheTransform = false;
39
+ this.requestTimeout = 3e4;
40
+ this.showLoadingIndicators = true;
41
+ this._activeRequests = [];
42
+ this._navigationInProgress = false;
43
+ this._lastError = null;
44
+ this._lastNavigationRequestId = null;
45
+ this._targetNavigation = null;
46
+ this.addEventListener(
47
+ "qti-request-navigation",
48
+ async ({ detail }) => {
49
+ if (!detail?.id) return;
50
+ const navigationRequestId = `nav_${Date.now()}_${Math.random()}`;
51
+ this._lastNavigationRequestId = navigationRequestId;
52
+ try {
53
+ this._navigationInProgress = true;
54
+ this._lastError = null;
55
+ this._dispatchStatusEvent({ loading: true, type: detail.type, id: detail.id });
56
+ this._cancelActiveRequests();
57
+ this._targetNavigation = { type: detail.type, id: detail.id };
58
+ if (detail.type === "item") {
59
+ await this._navigateToItem(detail.id);
60
+ } else if (detail.type === "section") {
61
+ await this._navigateToSection(detail.id);
62
+ }
63
+ if (this._lastNavigationRequestId !== navigationRequestId) {
64
+ console.log("Navigation was superseded by a newer request");
65
+ return;
66
+ }
67
+ } catch (error) {
68
+ if (this._lastNavigationRequestId === navigationRequestId) {
69
+ const navError = this._normalizeError(error, detail.type, detail.id);
70
+ this._lastError = navError;
71
+ this._dispatchErrorEvent(navError);
72
+ console.error(`Navigation error (${navError.type}):`, navError.message, navError.details);
73
+ }
74
+ } finally {
75
+ if (this._lastNavigationRequestId === navigationRequestId) {
76
+ this._navigationInProgress = false;
77
+ this._dispatchStatusEvent({ loading: false, type: detail.type, id: detail.id });
78
+ }
79
+ }
80
+ }
81
+ );
82
+ this.addEventListener("qti-assessment-test-connected", (e) => {
83
+ this._testElement = e.detail;
84
+ this._initializeNavigation();
85
+ });
86
+ }
87
+ /**
88
+ * Initialize navigation when test is first connected
89
+ */
90
+ _initializeNavigation() {
91
+ let id;
92
+ if (this.navigate === "section") {
93
+ id = this._testElement.querySelector("qti-assessment-section")?.identifier;
94
+ }
95
+ if (this.navigate === "item") {
96
+ id = this.sessionContext.navItemId ?? this._testElement.querySelector("qti-assessment-item-ref")?.identifier;
97
+ }
98
+ if (id) {
99
+ this.dispatchEvent(
100
+ new CustomEvent("qti-request-navigation", {
101
+ detail: { type: this.navigate === "section" ? "section" : "item", id },
102
+ bubbles: true,
103
+ composed: true
104
+ })
105
+ );
106
+ }
107
+ }
108
+ navigateTo(type, id) {
109
+ this.dispatchEvent(
110
+ new CustomEvent("qti-request-navigation", {
111
+ detail: { type, id },
112
+ bubbles: true,
113
+ composed: true
114
+ })
115
+ );
116
+ }
117
+ /**
118
+ * Navigates to a specific item
119
+ */
120
+ async _navigateToItem(itemId) {
121
+ const itemRefEl = this._testElement?.querySelector(
122
+ `qti-assessment-item-ref[identifier="${itemId}"]`
123
+ );
124
+ if (!itemRefEl) {
125
+ throw {
126
+ type: "item-not-found" /* ITEM_NOT_FOUND */,
127
+ message: `Item with identifier "${itemId}" not found.`,
128
+ itemId
129
+ };
130
+ }
131
+ const navPartId = itemRefEl.closest("qti-test-part")?.identifier;
132
+ const navSectionId = itemRefEl.closest("qti-assessment-section")?.identifier;
133
+ this.sessionContext = {
134
+ ...this.sessionContext,
135
+ navPartId,
136
+ navSectionId,
137
+ navItemId: itemId,
138
+ navItemLoading: true
139
+ };
140
+ console.log("Navigating to item:", itemId);
141
+ try {
142
+ await this._loadItems([itemId]);
143
+ } finally {
144
+ this.sessionContext = {
145
+ ...this.sessionContext,
146
+ navItemLoading: false
147
+ };
148
+ }
149
+ }
150
+ /**
151
+ * Navigates to a specific section
152
+ */
153
+ async _navigateToSection(sectionId) {
154
+ const sectionRefEl = this._testElement?.querySelector(
155
+ `qti-assessment-section[identifier="${sectionId}"]`
156
+ );
157
+ if (!sectionRefEl) {
158
+ throw {
159
+ type: "section-not-found" /* SECTION_NOT_FOUND */,
160
+ message: `Section with identifier "${sectionId}" not found.`,
161
+ sectionId
162
+ };
163
+ }
164
+ const navPartId = sectionRefEl.closest("qti-test-part")?.identifier;
165
+ this.sessionContext = {
166
+ ...this.sessionContext,
167
+ navPartId,
168
+ navSectionId: sectionId,
169
+ navItemId: null,
170
+ navItemLoading: true
171
+ };
172
+ try {
173
+ const itemIds = this._getSectionItemIds(sectionId);
174
+ await this._loadItems(itemIds);
175
+ } finally {
176
+ this.sessionContext = {
177
+ ...this.sessionContext,
178
+ navItemLoading: false
179
+ };
180
+ }
181
+ }
182
+ /**
183
+ * Normalize different error types into a consistent NavigationError format
184
+ */
185
+ _normalizeError(error, navigationType, id) {
186
+ if (error && error.type && Object.values(NavigationErrorType).includes(error.type)) {
187
+ return error;
188
+ }
189
+ if (error instanceof DOMException && error.name === "AbortError") {
190
+ return {
191
+ type: "network-error" /* NETWORK_ERROR */,
192
+ message: "Navigation was cancelled because a new navigation was requested.",
193
+ details: error
194
+ };
195
+ }
196
+ if (error.name === "TimeoutError" || error.message && error.message.includes("timeout")) {
197
+ return {
198
+ type: "timeout-error" /* TIMEOUT_ERROR */,
199
+ message: "Request timed out. Please check your network connection.",
200
+ details: error
201
+ };
202
+ }
203
+ if (error instanceof TypeError && error.message.includes("network")) {
204
+ return {
205
+ type: "network-error" /* NETWORK_ERROR */,
206
+ message: "A network error occurred. Please check your connection.",
207
+ details: error
208
+ };
209
+ }
210
+ return {
211
+ type: "load-error" /* LOAD_ERROR */,
212
+ message: `Failed to load ${navigationType}: ${id}`,
213
+ details: error,
214
+ itemId: navigationType === "item" ? id : void 0,
215
+ sectionId: navigationType === "section" ? id : void 0
216
+ };
217
+ }
218
+ /**
219
+ * Dispatch error event to notify the UI
220
+ */
221
+ _dispatchErrorEvent(error) {
222
+ this.dispatchEvent(
223
+ new CustomEvent("qti-navigation-error", {
224
+ detail: error,
225
+ bubbles: true,
226
+ composed: true
227
+ })
228
+ );
229
+ }
230
+ /**
231
+ * Dispatch status event to indicate loading state
232
+ */
233
+ _dispatchStatusEvent(status) {
234
+ if (this.showLoadingIndicators) {
235
+ this.dispatchEvent(
236
+ new CustomEvent("qti-navigation-status", {
237
+ detail: status,
238
+ bubbles: true,
239
+ composed: true
240
+ })
241
+ );
242
+ }
243
+ }
244
+ /**
245
+ * Cancels all active HTTP requests
246
+ */
247
+ _cancelActiveRequests() {
248
+ if (this._activeRequests.length > 0) {
249
+ console.info(`Cancelling ${this._activeRequests.length} pending requests`);
250
+ this._activeRequests.forEach((request) => {
251
+ if (request && request.readyState !== 4) {
252
+ request.abort();
253
+ }
254
+ });
255
+ this._activeRequests = [];
256
+ }
257
+ }
258
+ /**
259
+ * Load items with improved error handling and timeout
260
+ */
261
+ async _loadItems(itemIds) {
262
+ if (!this._testElement || itemIds.length === 0) return;
263
+ const itemRefEls = itemIds.map(
264
+ (id) => this._testElement.querySelector(`qti-assessment-item-ref[identifier="${id}"]`)
265
+ );
266
+ const missingItems = itemRefEls.reduce((missing, el, index) => {
267
+ if (!el) missing.push(itemIds[index]);
268
+ return missing;
269
+ }, []);
270
+ if (missingItems.length > 0) {
271
+ const error = {
272
+ type: "item-not-found" /* ITEM_NOT_FOUND */,
273
+ message: `One or more items not found: ${missingItems.join(", ")}`,
274
+ details: { missingItems }
275
+ };
276
+ throw error;
277
+ }
278
+ this._clearLoadedItems();
279
+ const itemLoadPromises = itemRefEls.map(async (itemRef) => {
280
+ if (!itemRef) return null;
281
+ const timeoutPromise = new Promise((_, reject) => {
282
+ setTimeout(() => {
283
+ reject({
284
+ name: "TimeoutError",
285
+ message: `Request for item ${itemRef.identifier} timed out after ${this.requestTimeout}ms`
286
+ });
287
+ }, this.requestTimeout);
288
+ });
289
+ try {
290
+ const { promise, request } = qtiTransformItem(this.cacheTransform).load(itemRef.href);
291
+ if (request instanceof XMLHttpRequest) {
292
+ this._activeRequests.push(request);
293
+ }
294
+ const apiResult = await Promise.race([promise, timeoutPromise]);
295
+ return {
296
+ itemRef,
297
+ doc: apiResult.htmlDoc(),
298
+ request
299
+ };
300
+ } catch (error) {
301
+ if (error instanceof DOMException && error.name === "AbortError" || error && error.name === "TimeoutError") {
302
+ console.log(
303
+ `Request for item ${itemRef.identifier} was ${error.name === "TimeoutError" ? "timed out" : "aborted"}`
304
+ );
305
+ return null;
306
+ }
307
+ error.itemId = itemRef.identifier;
308
+ throw error;
309
+ }
310
+ });
311
+ try {
312
+ const results = await Promise.all(itemLoadPromises);
313
+ const validResults = results.filter((result) => result !== null);
314
+ validResults.forEach(({ itemRef, doc }) => {
315
+ if (itemRef && doc) itemRef.xmlDoc = doc;
316
+ });
317
+ this._activeRequests = [];
318
+ requestAnimationFrame(() => {
319
+ this.dispatchEvent(
320
+ new CustomEvent("qti-test-loaded", {
321
+ detail: validResults.map(({ itemRef }) => ({
322
+ identifier: itemRef?.identifier,
323
+ element: itemRef
324
+ })),
325
+ bubbles: true,
326
+ composed: true
327
+ })
328
+ );
329
+ });
330
+ if (validResults.length === 0 && itemIds.length > 0) {
331
+ throw {
332
+ type: "load-error" /* LOAD_ERROR */,
333
+ message: "All item requests failed to load",
334
+ details: { itemIds }
335
+ };
336
+ }
337
+ return validResults;
338
+ } catch (error) {
339
+ console.error("Error loading items:", error);
340
+ throw error;
341
+ }
342
+ }
343
+ /**
344
+ * Gets all item IDs in a section
345
+ */
346
+ _getSectionItemIds(navSectionId) {
347
+ const sectionRefEl = this._testElement?.querySelector(
348
+ `qti-assessment-section[identifier="${navSectionId}"]`
349
+ );
350
+ if (!sectionRefEl) {
351
+ throw {
352
+ type: "section-not-found" /* SECTION_NOT_FOUND */,
353
+ message: `Section with identifier "${navSectionId}" not found.`,
354
+ sectionId: navSectionId
355
+ };
356
+ }
357
+ return Array.from(
358
+ this._testElement.querySelectorAll(
359
+ `qti-assessment-section[identifier="${navSectionId}"] > qti-assessment-item-ref`
360
+ )
361
+ ).map((itemRef) => itemRef.identifier);
362
+ }
363
+ /**
364
+ * Clears all loaded items
365
+ */
366
+ _clearLoadedItems() {
367
+ const itemRefEls = this._testElement?.querySelectorAll(
368
+ `qti-assessment-test qti-assessment-item-ref`
369
+ );
370
+ Array.from(itemRefEls || []).forEach((itemElement) => {
371
+ itemElement.xmlDoc = null;
372
+ });
373
+ }
374
+ /**
375
+ * Retry the last failed navigation
376
+ */
377
+ retryNavigation() {
378
+ if (this._lastError) {
379
+ const type = this._lastError.itemId ? "item" : "section";
380
+ const id = this._lastError.itemId || this._lastError.sectionId;
381
+ if (id) {
382
+ this.dispatchEvent(
383
+ new CustomEvent("qti-request-navigation", {
384
+ detail: { type, id },
385
+ bubbles: true,
386
+ composed: true
387
+ })
388
+ );
389
+ }
390
+ } else if (this._targetNavigation) {
391
+ this.dispatchEvent(
392
+ new CustomEvent("qti-request-navigation", {
393
+ detail: this._targetNavigation,
394
+ bubbles: true,
395
+ composed: true
396
+ })
397
+ );
398
+ }
399
+ }
400
+ }
401
+ __decorateClass([
402
+ property({ type: String })
403
+ ], TestNavigationClass.prototype, "navigate", 2);
404
+ __decorateClass([
405
+ property({ type: Boolean, attribute: "cache-transform" })
406
+ ], TestNavigationClass.prototype, "cacheTransform", 2);
407
+ __decorateClass([
408
+ property({ type: Number })
409
+ ], TestNavigationClass.prototype, "requestTimeout", 2);
410
+ __decorateClass([
411
+ property({ type: Boolean })
412
+ ], TestNavigationClass.prototype, "showLoadingIndicators", 2);
413
+ return TestNavigationClass;
414
+ };
415
+
416
+ // src/lib/qti-test/core/mixins/test-view.mixin.ts
417
+ var TestViewMixin = (superClass) => {
418
+ class TestViewClass extends superClass {
419
+ constructor(...args) {
420
+ super(...args);
421
+ this.sessionContext = { ...this.sessionContext, view: "candidate" };
422
+ this.addEventListener("on-test-switch-view", (e) => {
423
+ this.sessionContext = { ...this.sessionContext, view: e.detail };
424
+ this._updateElementView();
425
+ });
426
+ this.addEventListener("qti-assessment-test-connected", () => {
427
+ this._updateElementView();
428
+ });
429
+ this.addEventListener("qti-assessment-item-connected", (e) => {
430
+ this._updateElementView();
431
+ this._setCorrectResponseVisibility(e.detail);
432
+ });
433
+ }
434
+ willUpdate(changedProperties) {
435
+ super.willUpdate(changedProperties);
436
+ if (changedProperties.has("sessionContext")) {
437
+ this._updateElementView();
438
+ }
439
+ }
440
+ // Method to handle view updates for elements based on the current context view
441
+ _updateElementView() {
442
+ if (this._testElement) {
443
+ const viewElements = Array.from(this._testElement.querySelectorAll("[view]"));
444
+ viewElements.forEach((element) => {
445
+ element.classList.toggle("show", element.getAttribute("view") === this.sessionContext.view);
446
+ });
447
+ const assessmentItemRef = this._testElement.querySelector(
448
+ `qti-assessment-item-ref[identifier="${this.sessionContext.navItemId}"]`
449
+ );
450
+ const assessmentItem = assessmentItemRef?.assessmentItem;
451
+ if (assessmentItem) {
452
+ assessmentItem.showCorrectResponse(this.sessionContext.view === "scorer");
453
+ }
454
+ }
455
+ }
456
+ // Event handler for connected QTI assessment items
457
+ _setCorrectResponseVisibility(assessmentItem) {
458
+ assessmentItem.showCorrectResponse(this.sessionContext.view === "scorer");
459
+ }
460
+ }
461
+ return TestViewClass;
462
+ };
463
+
464
+ // src/lib/qti-test/core/test-base.ts
465
+ import { provide } from "@lit/context";
466
+ import { LitElement } from "lit";
467
+ import { property as property2 } from "lit/decorators.js";
468
+ var TestBase = class extends LitElement {
469
+ constructor() {
470
+ super();
471
+ this.testContext = INITIAL_TEST_CONTEXT;
472
+ this.sessionContext = INITIAL_SESSION_CONTEXT;
473
+ /**
474
+ * Updates the variables of an assessment item in the test context.
475
+ * - Matches the assessment item with the corresponding test context item.
476
+ * - If the item is not found, logs a warning.
477
+ * - Updates variables in the test context if exactly one variable exists.
478
+ * - Otherwise, syncs the assessment item's variables with the test context.
479
+ *
480
+ * @param assessmentItem - The assessment item to update.
481
+ */
482
+ this._updateItemInTestContext = (assessmentItem) => {
483
+ const context = assessmentItem._context;
484
+ const identifier = context.identifier;
485
+ const fullVariables = context.variables;
486
+ const itemContext = this.testContext.items.find((i) => i?.identifier === identifier);
487
+ if (!itemContext) {
488
+ console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);
489
+ return;
490
+ }
491
+ if (itemContext.variables?.length === 1) {
492
+ this._updateItemVariablesInTestContext(identifier, fullVariables);
493
+ } else {
494
+ assessmentItem.variables = [...itemContext.variables || []];
495
+ }
496
+ };
497
+ this.addEventListener("qti-assessment-test-connected", (e) => {
498
+ this.testContext = INITIAL_TEST_CONTEXT;
499
+ this.sessionContext = INITIAL_SESSION_CONTEXT;
500
+ if (this.testContext && this.testContext.items.length > 0) return;
501
+ this._testElement = e.detail;
502
+ const items = Array.from(this._testElement.querySelectorAll("qti-assessment-item-ref")).map((itemRef) => {
503
+ return {
504
+ href: itemRef.href,
505
+ identifier: itemRef.identifier,
506
+ category: itemRef.category,
507
+ variables: [
508
+ {
509
+ identifier: "completionStatus",
510
+ value: "not_attempted",
511
+ type: "outcome"
512
+ }
513
+ ]
514
+ };
515
+ });
516
+ this.testContext = { ...this.testContext, items };
517
+ });
518
+ this.addEventListener("qti-assessment-item-connected", (e) => {
519
+ const assessmentItem = e.detail;
520
+ const assessmentRefId = assessmentItem.closest("qti-assessment-item-ref")?.identifier;
521
+ if (assessmentRefId) {
522
+ assessmentItem.assessmentItemRefId = assessmentRefId;
523
+ }
524
+ this._updateItemInTestContext(e.detail);
525
+ });
526
+ this.addEventListener("qti-item-context-updated", (e) => {
527
+ this._updateItemVariablesInTestContext(e.detail.itemContext.identifier, e.detail.itemContext.variables);
528
+ });
529
+ }
530
+ _updateItemVariablesInTestContext(identifier, variables) {
531
+ this.testContext = {
532
+ ...this.testContext,
533
+ // Spread existing test context properties
534
+ items: this.testContext.items.map((itemContext) => {
535
+ if (itemContext.identifier !== identifier) {
536
+ return itemContext;
537
+ }
538
+ return {
539
+ ...itemContext,
540
+ // Keep other properties of the item context
541
+ variables: variables.map((variable) => {
542
+ const matchingVariable = itemContext.variables.find((v) => v.identifier === variable.identifier);
543
+ return matchingVariable ? { ...matchingVariable, ...variable } : variable;
544
+ })
545
+ };
546
+ })
547
+ };
548
+ this.dispatchEvent(
549
+ new CustomEvent("qti-test-context-updated", { detail: this.testContext, bubbles: false, composed: false })
550
+ );
551
+ }
552
+ };
553
+ __decorateClass([
554
+ property2({ attribute: false, type: Object }),
555
+ provide({ context: testContext })
556
+ ], TestBase.prototype, "testContext", 2);
557
+ __decorateClass([
558
+ property2({ attribute: false, type: Object }),
559
+ provide({ context: sessionContext })
560
+ ], TestBase.prototype, "sessionContext", 2);
561
+
562
+ // src/lib/qti-test/core/mixins/test-processing.mixin.ts
563
+ var TestProcessingMixin = (superClass) => {
564
+ class TestProcessingElement extends superClass {
565
+ constructor(...args) {
566
+ super(...args);
567
+ this.addEventListener("qti-register-variable", (e) => {
568
+ this.testContext = {
569
+ ...this.testContext,
570
+ testOutcomeVariables: [...this.testContext.testOutcomeVariables || [], e.detail.variable]
571
+ };
572
+ e.stopPropagation();
573
+ });
574
+ this.addEventListener(
575
+ "qti-set-outcome-value",
576
+ (e) => {
577
+ const { outcomeIdentifier, value } = e.detail;
578
+ this.updateOutcomeVariable(outcomeIdentifier, value);
579
+ e.stopPropagation();
580
+ }
581
+ );
582
+ }
583
+ outcomeProcessing() {
584
+ const outcomeProcessor = this.querySelector("qti-outcome-processing");
585
+ if (!outcomeProcessor) return false;
586
+ outcomeProcessor?.process();
587
+ return true;
588
+ }
589
+ /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
590
+ updateOutcomeVariable(identifier, value) {
591
+ const outcomeVariable = this.getOutcome(identifier);
592
+ if (!outcomeVariable) {
593
+ console.warn(`Can not set qti-outcome-identifier: ${identifier}, it is not available`);
594
+ return;
595
+ }
596
+ this.testContext = {
597
+ ...this.testContext,
598
+ testOutcomeVariables: this.testContext.testOutcomeVariables?.map((v) => {
599
+ if (v.identifier !== identifier) {
600
+ return v;
601
+ }
602
+ return {
603
+ ...v,
604
+ value: outcomeVariable.cardinality === "single" ? value : [...v.value, value]
605
+ };
606
+ })
607
+ };
608
+ }
609
+ getOutcome(identifier) {
610
+ return this.getVariable(identifier);
611
+ }
612
+ getVariable(identifier) {
613
+ return this.testContext.testOutcomeVariables?.find((v) => v.identifier === identifier) || null;
614
+ }
615
+ /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
616
+ }
617
+ return TestProcessingElement;
618
+ };
619
+
620
+ // src/lib/qti-test/core/qti-test.ts
621
+ var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestBase))) {
622
+ // export class QtiTest extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {
623
+ /**
624
+ * Renders the component's template.
625
+ * Provides a default `<slot>` for content projection.
626
+ */
627
+ async connectedCallback() {
628
+ super.connectedCallback();
629
+ await this.updateComplete;
630
+ this.dispatchEvent(new CustomEvent("qti-test-connected", { detail: this }));
631
+ }
632
+ render() {
633
+ return html`<slot></slot>`;
634
+ }
635
+ };
636
+ QtiTest = __decorateClass([
637
+ customElement("qti-test")
638
+ ], QtiTest);
639
+
640
+ // src/lib/qti-test/core/qti-assessment-test/qti-assessment-item-ref.ts
641
+ import { LitElement as LitElement2 } from "lit";
642
+ import { property as property3 } from "lit/decorators.js";
643
+ import { prepareTemplate } from "stampino";
644
+ var stringToBooleanConverter = {
645
+ fromAttribute(value) {
646
+ return value === "true";
647
+ },
648
+ toAttribute(value) {
649
+ return value ? "true" : "false";
650
+ }
651
+ };
652
+ var QtiAssessmentItemRef = class extends LitElement2 {
653
+ constructor() {
654
+ super(...arguments);
655
+ // @consume({ context: computedContext, subscribe: true })
656
+ // private computedContext: ComputedContext;
657
+ this.weigths = /* @__PURE__ */ new Map();
658
+ }
659
+ // the XMLDocument
660
+ createRenderRoot() {
661
+ return this;
662
+ }
663
+ get assessmentItem() {
664
+ return this.renderRoot?.querySelector("qti-assessment-item");
665
+ }
666
+ async connectedCallback() {
667
+ super.connectedCallback();
668
+ const templateElement = this.getRootNode().host.closest("qti-test").querySelector("template[item-ref]");
669
+ if (templateElement) this.myTemplate = prepareTemplate(templateElement);
670
+ await this.updateComplete;
671
+ this.dispatchEvent(
672
+ new CustomEvent("qti-assessment-item-ref-connected", {
673
+ bubbles: true,
674
+ composed: true,
675
+ detail: { identifier: this.identifier, href: this.href, category: this.category }
676
+ })
677
+ );
678
+ }
679
+ render() {
680
+ return this.myTemplate ? this.myTemplate({ xmlDoc: this.xmlDoc }) : this.xmlDoc;
681
+ }
682
+ };
683
+ __decorateClass([
684
+ property3({ type: String })
685
+ ], QtiAssessmentItemRef.prototype, "category", 2);
686
+ __decorateClass([
687
+ property3({ type: String })
688
+ ], QtiAssessmentItemRef.prototype, "identifier", 2);
689
+ __decorateClass([
690
+ property3({ type: Boolean, converter: stringToBooleanConverter })
691
+ ], QtiAssessmentItemRef.prototype, "required", 2);
692
+ __decorateClass([
693
+ property3({ type: Boolean, converter: stringToBooleanConverter })
694
+ ], QtiAssessmentItemRef.prototype, "fixed", 2);
695
+ __decorateClass([
696
+ property3({ type: String })
697
+ ], QtiAssessmentItemRef.prototype, "href", 2);
698
+ __decorateClass([
699
+ property3({ type: Object, attribute: false })
700
+ ], QtiAssessmentItemRef.prototype, "xmlDoc", 2);
701
+ if (!customElements.get("qti-assessment-item-ref")) {
702
+ customElements.define("qti-assessment-item-ref", QtiAssessmentItemRef);
703
+ }
704
+
705
+ // src/lib/qti-test/core/qti-assessment-test/qti-assessment-section.ts
706
+ import { consume } from "@lit/context";
707
+ import { html as html2, LitElement as LitElement3 } from "lit";
708
+ import { property as property4 } from "lit/decorators.js";
709
+ var stringToBooleanConverter2 = {
710
+ fromAttribute(value) {
711
+ return value === "true";
712
+ },
713
+ toAttribute(value) {
714
+ return value ? "true" : "false";
715
+ }
716
+ };
717
+ var QtiAssessmentSection = class extends LitElement3 {
718
+ async connectedCallback() {
719
+ super.connectedCallback();
720
+ await this.updateComplete;
721
+ this.dispatchEvent(
722
+ new Event("qti-assessment-section-connected", {
723
+ bubbles: true,
724
+ composed: true
725
+ })
726
+ );
727
+ }
728
+ render() {
729
+ return html2`<slot name="qti-rubric-block"></slot><slot></slot>`;
730
+ }
731
+ };
732
+ __decorateClass([
733
+ property4({ type: String })
734
+ ], QtiAssessmentSection.prototype, "identifier", 2);
735
+ __decorateClass([
736
+ property4({ type: String })
737
+ ], QtiAssessmentSection.prototype, "required", 2);
738
+ __decorateClass([
739
+ property4({ type: Boolean, converter: stringToBooleanConverter2 })
740
+ ], QtiAssessmentSection.prototype, "fixed", 2);
741
+ __decorateClass([
742
+ property4({ type: String })
743
+ ], QtiAssessmentSection.prototype, "title", 2);
744
+ __decorateClass([
745
+ property4({ type: Boolean, converter: stringToBooleanConverter2 })
746
+ ], QtiAssessmentSection.prototype, "visible", 2);
747
+ __decorateClass([
748
+ property4({ type: Boolean, converter: stringToBooleanConverter2, attribute: "keep-together" })
749
+ ], QtiAssessmentSection.prototype, "keepTogether", 2);
750
+ __decorateClass([
751
+ consume({ context: testContext, subscribe: true })
752
+ ], QtiAssessmentSection.prototype, "_testContext", 2);
753
+ if (!customElements.get("qti-assessment-section")) {
754
+ customElements.define("qti-assessment-section", QtiAssessmentSection);
755
+ }
756
+
757
+ // src/lib/qti-test/core/qti-assessment-test/qti-assessment-test.ts
758
+ import { consume as consume2 } from "@lit/context";
759
+ import { html as html3, LitElement as LitElement4 } from "lit";
760
+ import { customElement as customElement2, property as property5 } from "lit/decorators.js";
761
+ var QtiAssessmentTest = class extends LitElement4 {
762
+ async connectedCallback() {
763
+ super.connectedCallback();
764
+ await this.updateComplete;
765
+ this.dispatchEvent(
766
+ new CustomEvent("qti-assessment-test-connected", {
767
+ detail: this,
768
+ bubbles: true,
769
+ composed: true
770
+ })
771
+ );
772
+ }
773
+ render() {
774
+ return html3` <slot></slot>`;
775
+ }
776
+ };
777
+ __decorateClass([
778
+ property5({ type: String })
779
+ ], QtiAssessmentTest.prototype, "identifier", 2);
780
+ __decorateClass([
781
+ property5({ type: String })
782
+ ], QtiAssessmentTest.prototype, "title", 2);
783
+ __decorateClass([
784
+ consume2({ context: testContext, subscribe: true })
785
+ ], QtiAssessmentTest.prototype, "_testContext", 2);
786
+ QtiAssessmentTest = __decorateClass([
787
+ customElement2("qti-assessment-test")
788
+ ], QtiAssessmentTest);
789
+
790
+ // src/lib/qti-test/core/qti-assessment-test/qti-test-part.ts
791
+ import { html as html4, LitElement as LitElement5 } from "lit";
792
+ import { customElement as customElement3, property as property6 } from "lit/decorators.js";
793
+ var QtiTestPart = class extends LitElement5 {
794
+ constructor() {
795
+ super(...arguments);
796
+ this.identifier = "";
797
+ this.title = "";
798
+ this.class = "";
799
+ this.NavigationMode = "nonlinear";
800
+ this.submissionMode = "individual";
801
+ }
802
+ async connectedCallback() {
803
+ super.connectedCallback();
804
+ await this.updateComplete;
805
+ this.dispatchEvent(
806
+ new Event("qti-test-part-connected", {
807
+ bubbles: true,
808
+ composed: true
809
+ })
810
+ );
811
+ }
812
+ render() {
813
+ return html4` <slot></slot>`;
814
+ }
815
+ };
816
+ __decorateClass([
817
+ property6({ type: String })
818
+ ], QtiTestPart.prototype, "identifier", 2);
819
+ __decorateClass([
820
+ property6({ type: String })
821
+ ], QtiTestPart.prototype, "title", 2);
822
+ __decorateClass([
823
+ property6({ type: String })
824
+ ], QtiTestPart.prototype, "class", 2);
825
+ __decorateClass([
826
+ property6({ type: String, attribute: "navigation-mode" })
827
+ ], QtiTestPart.prototype, "NavigationMode", 2);
828
+ __decorateClass([
829
+ property6({ type: String, attribute: "submission-mode" })
830
+ ], QtiTestPart.prototype, "submissionMode", 2);
831
+ QtiTestPart = __decorateClass([
832
+ customElement3("qti-test-part")
833
+ ], QtiTestPart);
834
+ if (!customElements.get("qti-test-part")) {
835
+ customElements.define("qti-test-part", QtiTestPart);
836
+ }
837
+
838
+ // src/lib/qti-test/core/qti-assessment-test/qti-test-feedback.ts
839
+ import { customElement as customElement4 } from "lit/decorators.js";
840
+ import { css, html as html5 } from "lit";
841
+ var QtiTestFeedback = class extends QtiModalFeedback {
842
+ render() {
843
+ return html5``;
844
+ }
845
+ };
846
+ QtiTestFeedback.styles = css`
847
+ :host {
848
+ color: gray;
849
+ }
850
+ `;
851
+ QtiTestFeedback = __decorateClass([
852
+ customElement4("qti-test-feedback")
853
+ ], QtiTestFeedback);
854
+
855
+ export {
856
+ QtiTest,
857
+ QtiAssessmentItemRef,
858
+ QtiAssessmentSection,
859
+ QtiAssessmentTest,
860
+ QtiTestPart,
861
+ QtiTestFeedback
862
+ };
863
+ //# sourceMappingURL=chunk-5SZAGP4N.js.map