@citolab/qti-components 7.2.2 → 7.3.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 (427) hide show
  1. package/cdn/chunks/chunk-2PEB7XOI.js +1 -0
  2. package/cdn/chunks/chunk-2YSPUZLT.js +2 -0
  3. package/cdn/chunks/chunk-3HVTDMTS.js +1 -0
  4. package/cdn/chunks/chunk-3YJ5LGHO.js +1 -0
  5. package/cdn/chunks/chunk-4HD4LAOA.js +2 -0
  6. package/cdn/chunks/chunk-4PXGOA73.js +1 -0
  7. package/cdn/chunks/chunk-4U6VOTDY.js +2 -0
  8. package/cdn/chunks/chunk-5B5ZBB3H.js +2 -0
  9. package/cdn/chunks/chunk-6KJL4I6M.js +1 -0
  10. package/cdn/chunks/chunk-7ASLC5ZB.js +1 -0
  11. package/cdn/chunks/chunk-7OAHC7YP.js +1 -0
  12. package/cdn/chunks/chunk-7P7BX6D6.js +1 -0
  13. package/cdn/chunks/chunk-AH2FX4HG.js +1 -0
  14. package/cdn/chunks/chunk-ALDED3YL.js +1 -0
  15. package/cdn/chunks/chunk-AOQNGPU3.js +1 -0
  16. package/cdn/chunks/chunk-ARYTJGGM.js +8 -0
  17. package/cdn/chunks/chunk-BS7S3RPY.js +1 -0
  18. package/cdn/chunks/chunk-BSL7QSJS.js +1 -0
  19. package/cdn/chunks/chunk-C2RWTG52.js +1 -0
  20. package/cdn/chunks/chunk-DKMPPZUE.js +2 -0
  21. package/cdn/chunks/chunk-DNPPZXZF.js +1 -0
  22. package/cdn/chunks/chunk-EJQGI6MR.js +1 -0
  23. package/cdn/chunks/chunk-EKAFL2KP.js +1 -0
  24. package/cdn/chunks/chunk-F63HVNEI.js +1 -0
  25. package/cdn/chunks/chunk-FKNSURIA.js +2 -0
  26. package/cdn/chunks/chunk-FNCQNHCU.js +1 -0
  27. package/cdn/chunks/chunk-GTDTMMHF.js +2 -0
  28. package/cdn/chunks/chunk-GYF5ZDB3.js +1 -0
  29. package/cdn/chunks/chunk-H6ZOKOLE.js +1 -0
  30. package/cdn/chunks/chunk-HCAWI7AZ.js +1 -0
  31. package/cdn/chunks/chunk-I25TBSYM.js +8 -0
  32. package/cdn/chunks/chunk-IAXDPXPS.js +2 -0
  33. package/cdn/chunks/chunk-JATFFFTP.js +1 -0
  34. package/cdn/chunks/chunk-JFCDOKX7.js +2 -0
  35. package/cdn/chunks/chunk-JSCH2J4L.js +2 -0
  36. package/cdn/chunks/chunk-LZMZV6TD.js +2 -0
  37. package/cdn/chunks/chunk-MR6ZHDES.js +1 -0
  38. package/cdn/chunks/chunk-N6A5NZLH.js +1 -0
  39. package/cdn/chunks/chunk-NNGQPZRR.js +2 -0
  40. package/cdn/chunks/chunk-NTHP3CIK.js +1 -0
  41. package/cdn/chunks/chunk-NUS4RU5N.js +1 -0
  42. package/cdn/chunks/chunk-OJTWWSZH.js +1 -0
  43. package/cdn/chunks/chunk-P6SSTAJ2.js +1 -0
  44. package/cdn/chunks/chunk-PACSO5NR.js +1 -0
  45. package/cdn/chunks/chunk-Q4UYMUWQ.js +1 -0
  46. package/cdn/chunks/chunk-QNNLXEUP.js +1 -0
  47. package/cdn/chunks/chunk-R345NUSS.js +2 -0
  48. package/cdn/chunks/chunk-RATUNBN5.js +1 -0
  49. package/cdn/chunks/chunk-RAXTSUAP.js +1 -0
  50. package/cdn/chunks/chunk-SGUBIUUK.js +1 -0
  51. package/cdn/chunks/chunk-SKCRMPN3.js +8 -0
  52. package/cdn/chunks/chunk-SXYEFBGL.js +2 -0
  53. package/cdn/chunks/chunk-TDDS7QJB.js +48 -0
  54. package/cdn/chunks/chunk-TDKNW4KB.js +1 -0
  55. package/cdn/chunks/chunk-TTH5243V.js +1 -0
  56. package/cdn/chunks/chunk-U4D7JJMM.js +1 -0
  57. package/cdn/chunks/chunk-UGQPBOTB.js +17 -0
  58. package/cdn/chunks/chunk-UO3YPQWX.js +1 -0
  59. package/cdn/chunks/chunk-UOYDBSKF.js +1 -0
  60. package/cdn/chunks/chunk-W3L3NJQM.js +1 -0
  61. package/cdn/chunks/chunk-XDXLBDGD.js +2 -0
  62. package/cdn/chunks/chunk-XLVU3CES.js +1 -0
  63. package/cdn/chunks/chunk-YL5IGHSU.js +1 -0
  64. package/cdn/chunks/chunk-ZNLWZYAX.js +5 -0
  65. package/cdn/chunks/chunk-ZWUH2GAI.js +1 -0
  66. package/cdn/exports/computed.context.js +1 -1
  67. package/cdn/index.js +1 -1
  68. package/cdn/qti-test/components/index.js +1 -1
  69. package/cdn/qti-test/components/test-navigation.js +1 -1
  70. package/cdn/qti-test/components/test-next.js +1 -1
  71. package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
  72. package/cdn/qti-test/components/test-prev.js +1 -1
  73. package/cdn/qti-test/components/test-print-context.js +1 -1
  74. package/cdn/qti-test/components/test-print-item-variables.js +1 -1
  75. package/cdn/qti-test/components/test-scoring-buttons.js +1 -1
  76. package/cdn/qti-test/components/test-scoring-feedback.js +1 -1
  77. package/cdn/qti-test/components/test-scoring-toggle.js +1 -0
  78. package/cdn/qti-test/components/test-section-buttons-stamp.js +1 -1
  79. package/cdn/qti-test/components/test-show-correct-response.js +1 -1
  80. package/cdn/qti-test/components/test-stamp.js +1 -1
  81. package/cdn/qti-test/components/test-view-toggle copy.js +1 -0
  82. package/cdn/qti-test/components/test-view-toggle.js +1 -1
  83. package/cdn/qti-test/core/index.js +1 -1
  84. package/dist/chunks/chunk-22IRJWWY.js +10 -0
  85. package/dist/chunks/chunk-22IRJWWY.js.map +1 -0
  86. package/dist/chunks/chunk-254VCWDJ.js +249 -0
  87. package/dist/chunks/chunk-254VCWDJ.js.map +1 -0
  88. package/dist/chunks/chunk-2SJOPI6B.js +45 -0
  89. package/dist/chunks/chunk-2SJOPI6B.js.map +1 -0
  90. package/dist/chunks/chunk-2WZXGGU3.js +85 -0
  91. package/dist/chunks/chunk-2WZXGGU3.js.map +1 -0
  92. package/dist/chunks/chunk-36G5MQKR.js +85 -0
  93. package/dist/chunks/chunk-36G5MQKR.js.map +1 -0
  94. package/dist/chunks/chunk-3L7UTYZ5.js +92 -0
  95. package/dist/chunks/chunk-3L7UTYZ5.js.map +1 -0
  96. package/dist/chunks/chunk-3N546FXF.js +81 -0
  97. package/dist/chunks/chunk-3N546FXF.js.map +1 -0
  98. package/dist/chunks/chunk-3QOIGEC7.js +92 -0
  99. package/dist/chunks/chunk-3QOIGEC7.js.map +1 -0
  100. package/dist/chunks/chunk-3UAT3IXP.js +85 -0
  101. package/dist/chunks/chunk-3UAT3IXP.js.map +1 -0
  102. package/dist/chunks/chunk-4KYSAVEL.js +85 -0
  103. package/dist/chunks/chunk-4KYSAVEL.js.map +1 -0
  104. package/dist/chunks/chunk-4OGJBG35.js +8 -0
  105. package/dist/chunks/chunk-4OGJBG35.js.map +1 -0
  106. package/dist/chunks/chunk-4UEAQMY4.js +28 -0
  107. package/dist/chunks/chunk-4UEAQMY4.js.map +1 -0
  108. package/dist/chunks/chunk-5F52D6LQ.js +64 -0
  109. package/dist/chunks/chunk-5F52D6LQ.js.map +1 -0
  110. package/dist/chunks/chunk-5FEXUWZH.js +28 -0
  111. package/dist/chunks/chunk-5FEXUWZH.js.map +1 -0
  112. package/dist/chunks/chunk-6ELX5242.js +234 -0
  113. package/dist/chunks/chunk-6ELX5242.js.map +1 -0
  114. package/dist/chunks/chunk-6FJB3RNO.js +65 -0
  115. package/dist/chunks/chunk-6FJB3RNO.js.map +1 -0
  116. package/dist/chunks/chunk-6HSX33RT.js +239 -0
  117. package/dist/chunks/chunk-6HSX33RT.js.map +1 -0
  118. package/dist/chunks/chunk-6KHKAHVS.js +235 -0
  119. package/dist/chunks/chunk-6KHKAHVS.js.map +1 -0
  120. package/dist/chunks/chunk-6YAR3VHX.js +56 -0
  121. package/dist/chunks/chunk-6YAR3VHX.js.map +1 -0
  122. package/dist/chunks/chunk-7SGVY6AL.js +85 -0
  123. package/dist/chunks/chunk-7SGVY6AL.js.map +1 -0
  124. package/dist/chunks/chunk-7ZME7TLK.js +81 -0
  125. package/dist/chunks/chunk-7ZME7TLK.js.map +1 -0
  126. package/dist/chunks/chunk-AZIKAG7K.js +8 -0
  127. package/dist/chunks/chunk-AZIKAG7K.js.map +1 -0
  128. package/dist/chunks/chunk-B2J3M334.js +92 -0
  129. package/dist/chunks/chunk-B2J3M334.js.map +1 -0
  130. package/dist/chunks/chunk-BEFR3ACM.js +241 -0
  131. package/dist/chunks/chunk-BEFR3ACM.js.map +1 -0
  132. package/dist/chunks/chunk-BSDFAZ5E.js +43 -0
  133. package/dist/chunks/chunk-BSDFAZ5E.js.map +1 -0
  134. package/dist/chunks/chunk-BTNZ5BZC.js +99 -0
  135. package/dist/chunks/chunk-BTNZ5BZC.js.map +1 -0
  136. package/dist/chunks/chunk-CL26AHAV.js +65 -0
  137. package/dist/chunks/chunk-CL26AHAV.js.map +1 -0
  138. package/dist/chunks/chunk-CLLDFOBO.js +64 -0
  139. package/dist/chunks/chunk-CLLDFOBO.js.map +1 -0
  140. package/dist/chunks/chunk-CO4K3UIU.js +81 -0
  141. package/dist/chunks/chunk-CO4K3UIU.js.map +1 -0
  142. package/dist/chunks/chunk-CRFBT36M.js +85 -0
  143. package/dist/chunks/chunk-CRFBT36M.js.map +1 -0
  144. package/dist/chunks/chunk-CRI6TK2F.js +81 -0
  145. package/dist/chunks/chunk-CRI6TK2F.js.map +1 -0
  146. package/dist/chunks/chunk-CS3XEHIS.js +64 -0
  147. package/dist/chunks/chunk-CS3XEHIS.js.map +1 -0
  148. package/dist/chunks/chunk-D47JA24G.js +85 -0
  149. package/dist/chunks/chunk-D47JA24G.js.map +1 -0
  150. package/dist/chunks/chunk-DIEBUNEE.js +83 -0
  151. package/dist/chunks/chunk-DIEBUNEE.js.map +1 -0
  152. package/dist/chunks/chunk-DLBPLBZU.js +85 -0
  153. package/dist/chunks/chunk-DLBPLBZU.js.map +1 -0
  154. package/dist/chunks/chunk-DNBDU6ZU.js +45 -0
  155. package/dist/chunks/chunk-DNBDU6ZU.js.map +1 -0
  156. package/dist/chunks/chunk-DNLC7HVK.js +870 -0
  157. package/dist/chunks/chunk-DNLC7HVK.js.map +1 -0
  158. package/dist/chunks/chunk-DSAPUEWR.js +81 -0
  159. package/dist/chunks/chunk-DSAPUEWR.js.map +1 -0
  160. package/dist/chunks/chunk-DZAOLWAS.js +238 -0
  161. package/dist/chunks/chunk-DZAOLWAS.js.map +1 -0
  162. package/dist/chunks/chunk-E572KIOQ.js +83 -0
  163. package/dist/chunks/chunk-E572KIOQ.js.map +1 -0
  164. package/dist/chunks/chunk-EIIKSMCN.js +96 -0
  165. package/dist/chunks/chunk-EIIKSMCN.js.map +1 -0
  166. package/dist/chunks/chunk-EJZQSOHU.js +85 -0
  167. package/dist/chunks/chunk-EJZQSOHU.js.map +1 -0
  168. package/dist/chunks/chunk-EP4SJRC6.js +99 -0
  169. package/dist/chunks/chunk-EP4SJRC6.js.map +1 -0
  170. package/dist/chunks/chunk-EXNO2VEU.js +85 -0
  171. package/dist/chunks/chunk-EXNO2VEU.js.map +1 -0
  172. package/dist/chunks/chunk-FAMJLVHG.js +92 -0
  173. package/dist/chunks/chunk-FAMJLVHG.js.map +1 -0
  174. package/dist/chunks/chunk-FBE6FA2H.js +45 -0
  175. package/dist/chunks/chunk-FBE6FA2H.js.map +1 -0
  176. package/dist/chunks/chunk-FEIMJLFV.js +85 -0
  177. package/dist/chunks/chunk-FEIMJLFV.js.map +1 -0
  178. package/dist/chunks/chunk-FIN4YG3K.js +233 -0
  179. package/dist/chunks/chunk-FIN4YG3K.js.map +1 -0
  180. package/dist/chunks/chunk-FQMHR6ZF.js +92 -0
  181. package/dist/chunks/chunk-FQMHR6ZF.js.map +1 -0
  182. package/dist/chunks/chunk-FS7SRRSA.js +96 -0
  183. package/dist/chunks/chunk-FS7SRRSA.js.map +1 -0
  184. package/dist/chunks/chunk-G5R527RC.js +90 -0
  185. package/dist/chunks/chunk-G5R527RC.js.map +1 -0
  186. package/dist/chunks/chunk-GBGZRLXO.js +45 -0
  187. package/dist/chunks/chunk-GBGZRLXO.js.map +1 -0
  188. package/dist/chunks/chunk-GBU4IXYM.js +95 -0
  189. package/dist/chunks/chunk-GBU4IXYM.js.map +1 -0
  190. package/dist/chunks/chunk-GDZ632HR.js +244 -0
  191. package/dist/chunks/chunk-GDZ632HR.js.map +1 -0
  192. package/dist/chunks/chunk-GE7AVAEW.js +99 -0
  193. package/dist/chunks/chunk-GE7AVAEW.js.map +1 -0
  194. package/dist/chunks/chunk-GXXWWT6Y.js +96 -0
  195. package/dist/chunks/chunk-GXXWWT6Y.js.map +1 -0
  196. package/dist/chunks/chunk-H7YSTWT5.js +45 -0
  197. package/dist/chunks/chunk-H7YSTWT5.js.map +1 -0
  198. package/dist/chunks/chunk-HAP4ICAJ.js +8 -0
  199. package/dist/chunks/chunk-HAP4ICAJ.js.map +1 -0
  200. package/dist/chunks/chunk-HARRGXYA.js +243 -0
  201. package/dist/chunks/chunk-HARRGXYA.js.map +1 -0
  202. package/dist/chunks/chunk-HNCSSLU6.js +95 -0
  203. package/dist/chunks/chunk-HNCSSLU6.js.map +1 -0
  204. package/dist/chunks/chunk-IDZOOEB2.js +85 -0
  205. package/dist/chunks/chunk-IDZOOEB2.js.map +1 -0
  206. package/dist/chunks/chunk-IGSFWBNK.js +235 -0
  207. package/dist/chunks/chunk-IGSFWBNK.js.map +1 -0
  208. package/dist/chunks/chunk-IPRRYKZD.js +95 -0
  209. package/dist/chunks/chunk-IPRRYKZD.js.map +1 -0
  210. package/dist/chunks/chunk-J3I5LKXH.js +60 -0
  211. package/dist/chunks/chunk-J3I5LKXH.js.map +1 -0
  212. package/dist/chunks/chunk-JDSSQE7I.js +56 -0
  213. package/dist/chunks/chunk-JDSSQE7I.js.map +1 -0
  214. package/dist/chunks/chunk-JKX62AOP.js +8 -0
  215. package/dist/chunks/chunk-JKX62AOP.js.map +1 -0
  216. package/dist/chunks/chunk-JMYRH33D.js +84 -0
  217. package/dist/chunks/chunk-JMYRH33D.js.map +1 -0
  218. package/dist/chunks/chunk-JX3F6YCC.js +43 -0
  219. package/dist/chunks/chunk-JX3F6YCC.js.map +1 -0
  220. package/dist/chunks/chunk-JXMZQ3DF.js +249 -0
  221. package/dist/chunks/chunk-JXMZQ3DF.js.map +1 -0
  222. package/dist/chunks/chunk-K7JGTBMV.js +248 -0
  223. package/dist/chunks/chunk-K7JGTBMV.js.map +1 -0
  224. package/dist/chunks/chunk-KBQUCIRG.js +233 -0
  225. package/dist/chunks/chunk-KBQUCIRG.js.map +1 -0
  226. package/dist/chunks/chunk-KGVAUC45.js +242 -0
  227. package/dist/chunks/chunk-KGVAUC45.js.map +1 -0
  228. package/dist/chunks/chunk-KH3ZEJAY.js +95 -0
  229. package/dist/chunks/chunk-KH3ZEJAY.js.map +1 -0
  230. package/dist/chunks/chunk-KIK3YNR7.js +95 -0
  231. package/dist/chunks/chunk-KIK3YNR7.js.map +1 -0
  232. package/dist/chunks/chunk-KKV6WBJ2.js +234 -0
  233. package/dist/chunks/chunk-KKV6WBJ2.js.map +1 -0
  234. package/dist/chunks/chunk-KWCQRFC3.js +56 -0
  235. package/dist/chunks/chunk-KWCQRFC3.js.map +1 -0
  236. package/dist/chunks/chunk-KWUJVUKA.js +99 -0
  237. package/dist/chunks/chunk-KWUJVUKA.js.map +1 -0
  238. package/dist/chunks/chunk-LMWMNMIU.js +99 -0
  239. package/dist/chunks/chunk-LMWMNMIU.js.map +1 -0
  240. package/dist/chunks/chunk-LSTECKJV.js +56 -0
  241. package/dist/chunks/chunk-LSTECKJV.js.map +1 -0
  242. package/dist/chunks/chunk-LWBXN5C4.js +66 -0
  243. package/dist/chunks/chunk-LWBXN5C4.js.map +1 -0
  244. package/dist/chunks/chunk-LXQKATBH.js +91 -0
  245. package/dist/chunks/chunk-LXQKATBH.js.map +1 -0
  246. package/dist/chunks/chunk-M2PGI5QL.js +92 -0
  247. package/dist/chunks/chunk-M2PGI5QL.js.map +1 -0
  248. package/dist/chunks/chunk-M3D3T5OO.js +45 -0
  249. package/dist/chunks/chunk-M3D3T5OO.js.map +1 -0
  250. package/dist/chunks/chunk-M43YVT6M.js +8 -0
  251. package/dist/chunks/chunk-M43YVT6M.js.map +1 -0
  252. package/dist/chunks/chunk-MJMLVDAV.js +82 -0
  253. package/dist/chunks/chunk-MJMLVDAV.js.map +1 -0
  254. package/dist/chunks/chunk-MNYMPXJZ.js +95 -0
  255. package/dist/chunks/chunk-MNYMPXJZ.js.map +1 -0
  256. package/dist/chunks/chunk-MT3XAJZC.js +61 -0
  257. package/dist/chunks/chunk-MT3XAJZC.js.map +1 -0
  258. package/dist/chunks/chunk-MYRQCWA6.js +81 -0
  259. package/dist/chunks/chunk-MYRQCWA6.js.map +1 -0
  260. package/dist/chunks/chunk-NY5T6G3K.js +8 -0
  261. package/dist/chunks/chunk-NY5T6G3K.js.map +1 -0
  262. package/dist/chunks/chunk-NYR2RLEI.js +65 -0
  263. package/dist/chunks/chunk-NYR2RLEI.js.map +1 -0
  264. package/dist/chunks/chunk-O3WD4F3W.js +92 -0
  265. package/dist/chunks/chunk-O3WD4F3W.js.map +1 -0
  266. package/dist/chunks/chunk-OALKFNG4.js +99 -0
  267. package/dist/chunks/chunk-OALKFNG4.js.map +1 -0
  268. package/dist/chunks/chunk-OB2TPXBB.js +85 -0
  269. package/dist/chunks/chunk-OB2TPXBB.js.map +1 -0
  270. package/dist/chunks/chunk-OH5UJYOH.js +83 -0
  271. package/dist/chunks/chunk-OH5UJYOH.js.map +1 -0
  272. package/dist/chunks/chunk-OLDZGCD4.js +45 -0
  273. package/dist/chunks/chunk-OLDZGCD4.js.map +1 -0
  274. package/dist/chunks/chunk-ONVGVU57.js +243 -0
  275. package/dist/chunks/chunk-ONVGVU57.js.map +1 -0
  276. package/dist/chunks/chunk-OWELU5YR.js +43 -0
  277. package/dist/chunks/chunk-OWELU5YR.js.map +1 -0
  278. package/dist/chunks/chunk-P4CAO52E.js +43 -0
  279. package/dist/chunks/chunk-P4CAO52E.js.map +1 -0
  280. package/dist/chunks/chunk-P6SNSCN4.js +235 -0
  281. package/dist/chunks/chunk-P6SNSCN4.js.map +1 -0
  282. package/dist/chunks/chunk-PJIOSYIC.js +241 -0
  283. package/dist/chunks/chunk-PJIOSYIC.js.map +1 -0
  284. package/dist/chunks/chunk-PRYR7UB6.js +95 -0
  285. package/dist/chunks/chunk-PRYR7UB6.js.map +1 -0
  286. package/dist/chunks/chunk-PSGZN2AP.js +8 -0
  287. package/dist/chunks/chunk-PSGZN2AP.js.map +1 -0
  288. package/dist/chunks/chunk-PWNPDEWD.js +43 -0
  289. package/dist/chunks/chunk-PWNPDEWD.js.map +1 -0
  290. package/dist/chunks/chunk-QHGH7FF6.js +28 -0
  291. package/dist/chunks/chunk-QHGH7FF6.js.map +1 -0
  292. package/dist/chunks/chunk-QKAKO3CZ.js +233 -0
  293. package/dist/chunks/chunk-QKAKO3CZ.js.map +1 -0
  294. package/dist/chunks/chunk-QSFYRRIN.js +85 -0
  295. package/dist/chunks/chunk-QSFYRRIN.js.map +1 -0
  296. package/dist/chunks/chunk-QVPOOZ5O.js +64 -0
  297. package/dist/chunks/chunk-QVPOOZ5O.js.map +1 -0
  298. package/dist/chunks/chunk-QXKGZ752.js +43 -0
  299. package/dist/chunks/chunk-QXKGZ752.js.map +1 -0
  300. package/dist/chunks/chunk-QZ4TYR6G.js +43 -0
  301. package/dist/chunks/chunk-QZ4TYR6G.js.map +1 -0
  302. package/dist/chunks/chunk-R5HX7O5I.js +81 -0
  303. package/dist/chunks/chunk-R5HX7O5I.js.map +1 -0
  304. package/dist/chunks/chunk-RF2VC7DN.js +239 -0
  305. package/dist/chunks/chunk-RF2VC7DN.js.map +1 -0
  306. package/dist/chunks/chunk-RIPZMRDA.js +238 -0
  307. package/dist/chunks/chunk-RIPZMRDA.js.map +1 -0
  308. package/dist/chunks/chunk-RKBUP3WS.js +28 -0
  309. package/dist/chunks/chunk-RKBUP3WS.js.map +1 -0
  310. package/dist/chunks/chunk-RTPJGNMA.js +230 -0
  311. package/dist/chunks/chunk-RTPJGNMA.js.map +1 -0
  312. package/dist/chunks/chunk-S6F2NHT6.js +85 -0
  313. package/dist/chunks/chunk-S6F2NHT6.js.map +1 -0
  314. package/dist/chunks/chunk-SI7DUJBA.js +28 -0
  315. package/dist/chunks/chunk-SI7DUJBA.js.map +1 -0
  316. package/dist/chunks/chunk-SRCICFU7.js +28 -0
  317. package/dist/chunks/chunk-SRCICFU7.js.map +1 -0
  318. package/dist/chunks/chunk-SXRET5LH.js +235 -0
  319. package/dist/chunks/chunk-SXRET5LH.js.map +1 -0
  320. package/dist/chunks/chunk-THUTSBBP.js +56 -0
  321. package/dist/chunks/chunk-THUTSBBP.js.map +1 -0
  322. package/dist/chunks/chunk-TPZRDVLI.js +85 -0
  323. package/dist/chunks/chunk-TPZRDVLI.js.map +1 -0
  324. package/dist/chunks/chunk-TYH4XFYQ.js +84 -0
  325. package/dist/chunks/chunk-TYH4XFYQ.js.map +1 -0
  326. package/dist/chunks/chunk-TZGAS66M.js +56 -0
  327. package/dist/chunks/chunk-TZGAS66M.js.map +1 -0
  328. package/dist/chunks/chunk-U54LOZ6V.js +235 -0
  329. package/dist/chunks/chunk-U54LOZ6V.js.map +1 -0
  330. package/dist/chunks/chunk-U7WNOBID.js +235 -0
  331. package/dist/chunks/chunk-U7WNOBID.js.map +1 -0
  332. package/dist/chunks/chunk-UDZ6DBC4.js +65 -0
  333. package/dist/chunks/chunk-UDZ6DBC4.js.map +1 -0
  334. package/dist/chunks/chunk-UF7XJJHR.js +56 -0
  335. package/dist/chunks/chunk-UF7XJJHR.js.map +1 -0
  336. package/dist/chunks/chunk-UFJLGWZN.js +95 -0
  337. package/dist/chunks/chunk-UFJLGWZN.js.map +1 -0
  338. package/dist/chunks/chunk-UNB4FVMX.js +248 -0
  339. package/dist/chunks/chunk-UNB4FVMX.js.map +1 -0
  340. package/dist/chunks/chunk-US5NIIW7.js +244 -0
  341. package/dist/chunks/chunk-US5NIIW7.js.map +1 -0
  342. package/dist/chunks/chunk-VMAASK34.js +234 -0
  343. package/dist/chunks/chunk-VMAASK34.js.map +1 -0
  344. package/dist/chunks/chunk-VN2QDEVU.js +250 -0
  345. package/dist/chunks/chunk-VN2QDEVU.js.map +1 -0
  346. package/dist/chunks/chunk-W5FVZTR6.js +56 -0
  347. package/dist/chunks/chunk-W5FVZTR6.js.map +1 -0
  348. package/dist/chunks/chunk-WFFIUFJJ.js +28 -0
  349. package/dist/chunks/chunk-WFFIUFJJ.js.map +1 -0
  350. package/dist/chunks/chunk-WFSIKRZ3.js +95 -0
  351. package/dist/chunks/chunk-WFSIKRZ3.js.map +1 -0
  352. package/dist/chunks/chunk-WHTJNLWJ.js +235 -0
  353. package/dist/chunks/chunk-WHTJNLWJ.js.map +1 -0
  354. package/dist/chunks/chunk-X7TJEF7P.js +78 -0
  355. package/dist/chunks/chunk-X7TJEF7P.js.map +1 -0
  356. package/dist/chunks/chunk-XCECF27R.js +45 -0
  357. package/dist/chunks/chunk-XCECF27R.js.map +1 -0
  358. package/dist/chunks/chunk-XCJMG5II.js +229 -0
  359. package/dist/chunks/chunk-XCJMG5II.js.map +1 -0
  360. package/dist/chunks/chunk-XNNXOUDF.js +245 -0
  361. package/dist/chunks/chunk-XNNXOUDF.js.map +1 -0
  362. package/dist/chunks/chunk-YBFPPPMD.js +233 -0
  363. package/dist/chunks/chunk-YBFPPPMD.js.map +1 -0
  364. package/dist/chunks/chunk-YQXKY6CK.js +99 -0
  365. package/dist/chunks/chunk-YQXKY6CK.js.map +1 -0
  366. package/dist/chunks/chunk-YS4T2ORC.js +86 -0
  367. package/dist/chunks/chunk-YS4T2ORC.js.map +1 -0
  368. package/dist/chunks/chunk-YSK5NQO6.js +235 -0
  369. package/dist/chunks/chunk-YSK5NQO6.js.map +1 -0
  370. package/dist/chunks/chunk-YZSGZTWA.js +8 -0
  371. package/dist/chunks/chunk-YZSGZTWA.js.map +1 -0
  372. package/dist/chunks/chunk-Z6FBIC76.js +83 -0
  373. package/dist/chunks/chunk-Z6FBIC76.js.map +1 -0
  374. package/dist/chunks/chunk-ZNU2BCTJ.js +95 -0
  375. package/dist/chunks/chunk-ZNU2BCTJ.js.map +1 -0
  376. package/dist/chunks/chunk-ZTFOPRHT.js +242 -0
  377. package/dist/chunks/chunk-ZTFOPRHT.js.map +1 -0
  378. package/dist/chunks/chunk-ZZFSVIVR.js +85 -0
  379. package/dist/chunks/chunk-ZZFSVIVR.js.map +1 -0
  380. package/dist/exports/computed-item.context.d.ts +3 -0
  381. package/dist/exports/computed-item.context.js +1 -1
  382. package/dist/exports/computed.context.d.ts +5 -0
  383. package/dist/exports/computed.context.js +1 -1
  384. package/dist/exports/session.context.d.ts +16 -1
  385. package/dist/exports/session.context.js +1 -1
  386. package/dist/index.d.ts +2 -1
  387. package/dist/index.js +20 -20
  388. package/dist/qti-components-jsx.d.ts +5 -4
  389. package/dist/qti-item/components/item-show-correct-response.js +2 -2
  390. package/dist/qti-item/components/print-item-variables.js +2 -2
  391. package/dist/qti-item/core/index.js +4 -4
  392. package/dist/qti-test/components/index.d.ts +4 -3
  393. package/dist/qti-test/components/index.js +15 -15
  394. package/dist/qti-test/components/test-navigation.d.ts +4 -3
  395. package/dist/qti-test/components/test-navigation.js +3 -3
  396. package/dist/qti-test/components/test-next.d.ts +4 -1
  397. package/dist/qti-test/components/test-next.js +2 -2
  398. package/dist/qti-test/components/test-paging-buttons-stamp.js +2 -2
  399. package/dist/qti-test/components/test-prev.d.ts +4 -1
  400. package/dist/qti-test/components/test-prev.js +2 -2
  401. package/dist/qti-test/components/test-print-context.d.ts +4 -1
  402. package/dist/qti-test/components/test-print-context.js +2 -2
  403. package/dist/qti-test/components/test-print-item-variables.d.ts +4 -1
  404. package/dist/qti-test/components/test-print-item-variables.js +2 -2
  405. package/dist/qti-test/components/test-scoring-buttons.d.ts +7 -1
  406. package/dist/qti-test/components/test-scoring-buttons.js +2 -2
  407. package/dist/qti-test/components/test-scoring-feedback.d.ts +4 -1
  408. package/dist/qti-test/components/test-scoring-feedback.js +2 -2
  409. package/dist/qti-test/components/test-scoring-toggle.d.ts +20 -0
  410. package/dist/qti-test/components/test-scoring-toggle.js +9 -0
  411. package/dist/qti-test/components/test-scoring-toggle.js.map +1 -0
  412. package/dist/qti-test/components/test-section-buttons-stamp.js +2 -2
  413. package/dist/qti-test/components/test-show-correct-response.d.ts +4 -1
  414. package/dist/qti-test/components/test-show-correct-response.js +2 -2
  415. package/dist/qti-test/components/test-stamp.d.ts +2 -2
  416. package/dist/qti-test/components/test-stamp.js +2 -2
  417. package/dist/qti-test/components/test-view-toggle copy.js +63 -0
  418. package/dist/qti-test/components/test-view-toggle copy.js.map +1 -0
  419. package/dist/qti-test/components/test-view-toggle.d.ts +4 -3
  420. package/dist/qti-test/components/test-view-toggle.js +2 -2
  421. package/dist/qti-test/components/test-view.js +2 -2
  422. package/dist/qti-test/core/index.d.ts +3 -2
  423. package/dist/qti-test/core/index.js +2 -2
  424. package/dist/qti-test-feedback-BGPOO6Zu.d.ts +98 -0
  425. package/dist/qti-test-feedback-C2mE_Xcg.d.ts +85 -0
  426. package/dist/vscode.html-custom-data.json +1 -1
  427. package/package.json +17 -17
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-next.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\n\nimport * as styles from './styles';\nimport { propInternalState, watch } from '../../decorators';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext, ComputedItem } from '../../exports/computed.context';\n\n/**\n * Represents a custom element for navigating to the next test item.\n *\n * @remarks\n * This element provides functionality for navigating to the next test item.\n *\n * @example\n * ```html\n * <test-next></test-next>\n * ```\n */\n@customElement('test-next')\nexport class TestNext extends LitElement {\n @propInternalState({\n type: Boolean,\n reflect: true,\n aria: 'ariaDisabled' // Maps to `aria-disabled` attribute\n })\n public disabled = true;\n\n @consume({ context: computedContext, subscribe: true })\n protected computedContext: ComputedContext;\n\n sectionItems: ComputedItem[];\n itemIndex: number;\n\n @watch('computedContext')\n _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {\n if (newValue) {\n this.disabled = false;\n }\n }\n\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n private _internals: ElementInternals;\n\n constructor() {\n super();\n\n this._internals = this.attachInternals();\n this._internals.role = 'button';\n this._internals.ariaLabel = 'Next item';\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this.disabled) this._requestItem(this.sectionItems[this.itemIndex + 1].identifier);\n });\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.checkDisabled();\n }\n\n willUpdate(_changedProperties: Map<string | number | symbol, unknown>) {\n if (!this.computedContext) return;\n const testPart = this.computedContext?.testParts.find(testPart => testPart.active);\n if (!testPart) return;\n this.sectionItems = testPart.sections.flatMap(section => section.items);\n this.itemIndex = this.sectionItems.findIndex(item => item.active);\n this.checkDisabled();\n }\n\n checkDisabled() {\n this.disabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems?.length - 1;\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n composed: true,\n bubbles: true,\n detail: {\n type: 'item',\n id: identifier\n }\n })\n );\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-next': TestNext;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AAoBjB,IAAM,WAAN,cAAuB,WAAW;AAAA,EA+BvC,cAAc;AACZ,UAAM;AA1BR,SAAO,WAAW;AA4BhB,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,OAAO;AACvB,SAAK,WAAW,YAAY;AAE5B,SAAK,iBAAiB,SAAS,OAAK;AAClC,QAAE,eAAe;AACjB,UAAI,CAAC,KAAK,SAAU,MAAK,aAAa,KAAK,aAAa,KAAK,YAAY,CAAC,EAAE,UAAU;AAAA,IACxF,CAAC;AAAA,EACH;AAAA,EA3BA,yBAAyB,WAA4B,UAA2B;AAC9E,QAAI,UAAU;AACZ,WAAK,WAAW;AAAA,IAClB;AAAA,EACF;AAAA,EAyBA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,WAAW,oBAA4D;AACrE,QAAI,CAAC,KAAK,gBAAiB;AAC3B,UAAM,WAAW,KAAK,iBAAiB,UAAU,KAAK,CAAAA,cAAYA,UAAS,MAAM;AACjF,QAAI,CAAC,SAAU;AACf,SAAK,eAAe,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK;AACtE,SAAK,YAAY,KAAK,aAAa,UAAU,UAAQ,KAAK,MAAM;AAChE,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,gBAAgB;AACd,SAAK,WAAW,CAAC,KAAK,mBAAmB,KAAK,YAAY,KAAK,KAAK,aAAa,KAAK,cAAc,SAAS;AAAA,EAC/G;AAAA,EAEU,aAAa,YAA0B;AAC/C,SAAK;AAAA,MACH,IAAI,YAAY,0BAA0B;AAAA,QACxC,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,IAAI;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AA9Ea,SAqBJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AApBT;AAAA,EALN,kBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA;AAAA,EACR,CAAC;AAAA,GALU,SAMJ;AAGG;AAAA,EADT,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAR3C,SASD;AAMV;AAAA,EADC,MAAM,iBAAiB;AAAA,GAdb,SAeX;AAfW,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":["testPart"]}
@@ -0,0 +1,56 @@
1
+ import {
2
+ computedContext
3
+ } from "./chunk-NY5T6G3K.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/qti-test/components/test-scoring-feedback.ts
9
+ import { consume } from "@lit/context";
10
+ import { html, LitElement } from "lit";
11
+ import { customElement, property } from "lit/decorators.js";
12
+ var TestScoringFeedback = class extends LitElement {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.view = null;
16
+ }
17
+ render() {
18
+ const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
19
+ if (!activeItem || !activeItem.variables) return html``;
20
+ if (activeItem["category"] === "dep-informational") return html`<div>${this.dataset.informational}</div>`;
21
+ const completionStatus = activeItem?.variables.find((v) => v.identifier === "completionStatus")?.value;
22
+ const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
23
+ const score = parseInt(scoreOutcome?.value);
24
+ const externalScored = activeItem["externalScored"];
25
+ const feedbackText = () => {
26
+ if (completionStatus !== "completed") {
27
+ return this.dataset.textNoResponse;
28
+ }
29
+ if (!externalScored && score !== void 0 && !Number.isNaN(score)) {
30
+ return score > 0 ? this.dataset.textCorrect : this.dataset.textIncorrect;
31
+ }
32
+ if (externalScored === "externalMachine") {
33
+ return Number.isNaN(score) || score === void 0 ? "We konden je antwoord geen score geven, omdat we te weinig antwoorden konden vinden die op jouw antwoord leken. Kijk je antwoord zelf na." : `We hebben je antwoord ${score === 0 ? "geen punten" : score == 1 ? "\xE9\xE9n punt" : `${score} punten`} gegeven. Je kunt je score zelf aanpassen als je denkt dat dat niet klopt.`;
34
+ }
35
+ if (externalScored === "human") {
36
+ return Number.isNaN(score) ? "" : "Deze score heb je zelf toegekend.";
37
+ }
38
+ return this.dataset.scoreUnknown;
39
+ };
40
+ return html`<div>${feedbackText()}</div>`;
41
+ }
42
+ };
43
+ __decorateClass([
44
+ consume({ context: computedContext, subscribe: true })
45
+ ], TestScoringFeedback.prototype, "computedContext", 2);
46
+ __decorateClass([
47
+ property({ type: String, attribute: "view" })
48
+ ], TestScoringFeedback.prototype, "view", 2);
49
+ TestScoringFeedback = __decorateClass([
50
+ customElement("test-scoring-feedback")
51
+ ], TestScoringFeedback);
52
+
53
+ export {
54
+ TestScoringFeedback
55
+ };
56
+ //# sourceMappingURL=chunk-LSTECKJV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-scoring-feedback.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { ViewMode } from 'storybook/internal/types';\n\n@customElement('test-scoring-feedback')\nexport class TestScoringFeedback extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n protected computedContext?: ComputedContext;\n\n @property({ type: String, attribute: 'view' })\n public view: ViewMode = null;\n\n render() {\n const activeItem = this.computedContext?.testParts\n .flatMap(testPart => testPart.sections.flatMap(section => section.items))\n .find(item => item.active);\n\n if (!activeItem || !activeItem.variables) return html``;\n\n if (activeItem['category'] === 'dep-informational') return html`<div>${this.dataset.informational}</div>`;\n\n const completionStatus = activeItem?.variables.find(v => v.identifier === 'completionStatus')?.value;\n const scoreOutcome = activeItem?.variables.find(vr => vr.identifier == 'SCORE') as OutcomeVariable;\n\n const score = parseInt(scoreOutcome?.value as string);\n const externalScored = activeItem['externalScored'];\n\n const feedbackText = () => {\n if (completionStatus !== 'completed') {\n return this.dataset.textNoResponse;\n }\n\n if (!externalScored && score !== undefined && !Number.isNaN(score)) {\n return score > 0 ? this.dataset.textCorrect : this.dataset.textIncorrect;\n }\n\n if (externalScored === 'externalMachine') {\n return Number.isNaN(score) || score === undefined\n ? 'We konden je antwoord geen score geven, omdat we te weinig antwoorden konden vinden die op jouw antwoord leken. Kijk je antwoord zelf na.'\n : `We hebben je antwoord ${score === 0 ? 'geen punten' : score == 1 ? 'één punt' : `${score} punten`} gegeven. Je kunt je score zelf aanpassen als je denkt dat dat niet klopt.`;\n }\n\n if (externalScored === 'human') {\n return Number.isNaN(score) ? '' : 'Deze score heb je zelf toegekend.';\n }\n\n return this.dataset.scoreUnknown;\n };\n\n return html`<div>${feedbackText()}</div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-scoring-feedback': TestScoringFeedback;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe,gBAAgB;AASjC,IAAM,sBAAN,cAAkC,WAAW;AAAA,EAA7C;AAAA;AAKL,SAAO,OAAiB;AAAA;AAAA,EAExB,SAAS;AACP,UAAM,aAAa,KAAK,iBAAiB,UACtC,QAAQ,cAAY,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK,CAAC,EACvE,KAAK,UAAQ,KAAK,MAAM;AAE3B,QAAI,CAAC,cAAc,CAAC,WAAW,UAAW,QAAO;AAEjD,QAAI,WAAW,UAAU,MAAM,oBAAqB,QAAO,YAAY,KAAK,QAAQ,aAAa;AAEjG,UAAM,mBAAmB,YAAY,UAAU,KAAK,OAAK,EAAE,eAAe,kBAAkB,GAAG;AAC/F,UAAM,eAAe,YAAY,UAAU,KAAK,QAAM,GAAG,cAAc,OAAO;AAE9E,UAAM,QAAQ,SAAS,cAAc,KAAe;AACpD,UAAM,iBAAiB,WAAW,gBAAgB;AAElD,UAAM,eAAe,MAAM;AACzB,UAAI,qBAAqB,aAAa;AACpC,eAAO,KAAK,QAAQ;AAAA,MACtB;AAEA,UAAI,CAAC,kBAAkB,UAAU,UAAa,CAAC,OAAO,MAAM,KAAK,GAAG;AAClE,eAAO,QAAQ,IAAI,KAAK,QAAQ,cAAc,KAAK,QAAQ;AAAA,MAC7D;AAEA,UAAI,mBAAmB,mBAAmB;AACxC,eAAO,OAAO,MAAM,KAAK,KAAK,UAAU,SACpC,8IACA,yBAAyB,UAAU,IAAI,gBAAgB,SAAS,IAAI,mBAAa,GAAG,KAAK,SAAS;AAAA,MACxG;AAEA,UAAI,mBAAmB,SAAS;AAC9B,eAAO,OAAO,MAAM,KAAK,IAAI,KAAK;AAAA,MACpC;AAEA,aAAO,KAAK,QAAQ;AAAA,IACtB;AAEA,WAAO,YAAY,aAAa,CAAC;AAAA,EACnC;AACF;AA5CY;AAAA,EADT,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,oBAED;AAGH;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,WAAW,OAAO,CAAC;AAAA,GAJlC,oBAKJ;AALI,sBAAN;AAAA,EADN,cAAc,uBAAuB;AAAA,GACzB;","names":[]}
@@ -0,0 +1,66 @@
1
+ import {
2
+ sessionContext
3
+ } from "./chunk-UZ4QB5IO.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/qti-test/components/test-view-toggle.ts
9
+ import { consume } from "@lit/context";
10
+ import { html, LitElement, nothing } from "lit";
11
+ import { customElement } from "lit/decorators.js";
12
+ import { prepareTemplate } from "stampino";
13
+ var TestViewToggle = class extends LitElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.viewOptions = ["candidate", "scorer", ""];
17
+ }
18
+ createRenderRoot() {
19
+ return this;
20
+ }
21
+ connectedCallback() {
22
+ super.connectedCallback();
23
+ const templateElement = this.querySelector("template");
24
+ if (!templateElement) {
25
+ this.myTemplate = null;
26
+ return;
27
+ }
28
+ this.myTemplate = prepareTemplate(templateElement);
29
+ }
30
+ _switchView(view) {
31
+ this.dispatchEvent(
32
+ new CustomEvent("on-test-switch-view", {
33
+ composed: true,
34
+ bubbles: true,
35
+ detail: view
36
+ })
37
+ );
38
+ }
39
+ firstUpdated(_changedProperties) {
40
+ this.addEventListener("click", () => {
41
+ debugger;
42
+ if (this.sessionContext?.view === "scorer") {
43
+ this._switchView("candidate");
44
+ }
45
+ if (this.sessionContext?.view === "candidate") {
46
+ this._switchView("scorer");
47
+ }
48
+ });
49
+ }
50
+ render() {
51
+ return html`${this.myTemplate ? this.myTemplate({
52
+ view: this.sessionContext?.view
53
+ }) : nothing}`;
54
+ }
55
+ };
56
+ __decorateClass([
57
+ consume({ context: sessionContext, subscribe: true })
58
+ ], TestViewToggle.prototype, "sessionContext", 2);
59
+ TestViewToggle = __decorateClass([
60
+ customElement("test-view-toggle")
61
+ ], TestViewToggle);
62
+
63
+ export {
64
+ TestViewToggle
65
+ };
66
+ //# sourceMappingURL=chunk-LWBXN5C4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-view-toggle.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { html, LitElement, nothing } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\n\nimport { sessionContext } from '../../exports/session.context';\n\nimport type { PropertyValues } from 'lit';\nimport type { SessionContext } from '../../exports/session.context';\n\n@customElement('test-view-toggle')\nexport class TestViewToggle extends LitElement {\n myTemplate: any;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n @consume({ context: sessionContext, subscribe: true })\n private sessionContext: SessionContext;\n\n viewOptions = ['candidate', 'scorer', ''];\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n _switchView(view: string) {\n this.dispatchEvent(\n new CustomEvent('on-test-switch-view', {\n composed: true,\n bubbles: true,\n detail: view\n })\n );\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.addEventListener('click', () => {\n debugger;\n if (this.sessionContext?.view === 'scorer') {\n this._switchView('candidate');\n }\n if (this.sessionContext?.view === 'candidate') {\n this._switchView('scorer');\n }\n });\n }\n\n render() {\n return html`${this.myTemplate\n ? this.myTemplate({\n view: this.sessionContext?.view\n })\n : nothing}`;\n // <label for=\"viewToggle\" part=\"label\">\n // <input\n // type=\"checkbox\"\n // role=\"switch\"\n // aria-checked=${this.sessionContext?.view === 'scorer'}\n // id=\"viewToggle\"\n // class=${`${this.classForInput}`}\n // ?checked=${this.sessionContext?.view === 'scorer'}\n // @change=${(e: Event) => {\n // const el = e.target as HTMLInputElement;\n // if (el.checked) {\n // this._switchView('scorer');\n // } else {\n // this._switchView('candidate');\n // }\n // }}\n // />\n // </label>\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-view-toggle': TestViewToggle;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAQzB,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAAxC;AAAA;AAUL,uBAAc,CAAC,aAAa,UAAU,EAAE;AAAA;AAAA,EAP9B,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAOA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEA,YAAY,MAAc;AACxB,SAAK;AAAA,MACH,IAAI,YAAY,uBAAuB;AAAA,QACrC,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEU,aAAa,oBAA0C;AAC/D,SAAK,iBAAiB,SAAS,MAAM;AACnC;AACA,UAAI,KAAK,gBAAgB,SAAS,UAAU;AAC1C,aAAK,YAAY,WAAW;AAAA,MAC9B;AACA,UAAI,KAAK,gBAAgB,SAAS,aAAa;AAC7C,aAAK,YAAY,QAAQ;AAAA,MAC3B;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,SAAS;AACP,WAAO,OAAO,KAAK,aACf,KAAK,WAAW;AAAA,MACd,MAAM,KAAK,gBAAgB;AAAA,IAC7B,CAAC,IACD,OAAO;AAAA,EAmBb;AACF;AA7DU;AAAA,EADP,QAAQ,EAAE,SAAS,gBAAgB,WAAW,KAAK,CAAC;AAAA,GAP1C,eAQH;AARG,iBAAN;AAAA,EADN,cAAc,kBAAkB;AAAA,GACpB;","names":[]}
@@ -0,0 +1,91 @@
1
+ import {
2
+ computedContext
3
+ } from "./chunk-DTZHLZH2.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/qti-test/components/test-stamp.ts
9
+ import { html, LitElement, nothing } from "lit";
10
+ import { customElement, property, state } from "lit/decorators.js";
11
+ import { prepareTemplate } from "stampino";
12
+ import { consume } from "@lit/context";
13
+ var TestStamp = class extends LitElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.debug = false;
17
+ this.stampContext = null;
18
+ }
19
+ createRenderRoot() {
20
+ return this;
21
+ }
22
+ connectedCallback() {
23
+ super.connectedCallback();
24
+ const templateElement = this.querySelector("template");
25
+ if (!templateElement) {
26
+ this.myTemplate = null;
27
+ return;
28
+ }
29
+ this.myTemplate = prepareTemplate(templateElement);
30
+ }
31
+ willUpdate(_changedProperties) {
32
+ if (!this.computedContext) {
33
+ this.stampContext = null;
34
+ return;
35
+ }
36
+ const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
37
+ if (!activeTestPart) {
38
+ this.stampContext = null;
39
+ return;
40
+ }
41
+ const augmentedTestPart = {
42
+ ...activeTestPart,
43
+ items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables, ...rest }) => rest)),
44
+ sections: activeTestPart.sections.map((section) => ({
45
+ ...section,
46
+ items: section.items.map(({ variables, ...rest }) => rest)
47
+ }))
48
+ };
49
+ const activeSection = augmentedTestPart.sections.find((section) => section.active);
50
+ if (!activeSection) {
51
+ this.stampContext = null;
52
+ return;
53
+ }
54
+ const augmentedSection = activeSection ? { ...activeSection, items: activeSection.items } : null;
55
+ const augmentedItem = augmentedSection?.items.find((item) => item.active);
56
+ if (!augmentedItem) {
57
+ this.stampContext = null;
58
+ return;
59
+ }
60
+ const { testParts, ...activeTest } = this.computedContext;
61
+ this.stampContext = {
62
+ item: augmentedItem || null,
63
+ section: augmentedSection || null,
64
+ testpart: augmentedTestPart,
65
+ test: activeTest
66
+ };
67
+ }
68
+ render() {
69
+ if (!this.stampContext) return nothing;
70
+ return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
71
+ ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
72
+ }
73
+ };
74
+ __decorateClass([
75
+ property({ type: Boolean, reflect: true })
76
+ ], TestStamp.prototype, "debug", 2);
77
+ __decorateClass([
78
+ state(),
79
+ consume({ context: computedContext, subscribe: true })
80
+ ], TestStamp.prototype, "computedContext", 2);
81
+ __decorateClass([
82
+ state()
83
+ ], TestStamp.prototype, "stampContext", 2);
84
+ TestStamp = __decorateClass([
85
+ customElement("test-stamp")
86
+ ], TestStamp);
87
+
88
+ export {
89
+ TestStamp
90
+ };
91
+ //# sourceMappingURL=chunk-LXQKATBH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n test?: unknown;\n testpart?: unknown;\n section?: unknown;\n item?: unknown;\n } | null = null;\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n // If no computed context is available, clear the stamp context\n if (!this.computedContext) {\n this.stampContext = null;\n return;\n }\n\n // Find the active test part\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n if (!activeTestPart) {\n this.stampContext = null;\n return;\n }\n\n // Augment the active test part by removing variables from items\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n // Find and augment the active section\n const activeSection = augmentedTestPart.sections.find(section => section.active);\n if (!activeSection) {\n this.stampContext = null;\n return;\n }\n const augmentedSection = activeSection ? { ...activeSection, items: activeSection.items } : null;\n\n // Find the active item within the active section\n const augmentedItem = augmentedSection?.items.find(item => item.active);\n if (!augmentedItem) {\n this.stampContext = null;\n return;\n }\n // Extract the active test data excluding test parts\n const { testParts, ...activeTest } = this.computedContext;\n\n // Set the stamp context with the augmented data\n this.stampContext = {\n item: augmentedItem || null,\n section: augmentedSection || null,\n testpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;AASjB,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAOf,SAAQ,eAKG;AAAA;AAAA,EAID,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEU,WAAW,oBAA0C;AAE7D,QAAI,CAAC,KAAK,iBAAiB;AACzB,WAAK,eAAe;AACpB;AAAA,IACF;AAGA,UAAM,iBAAiB,KAAK,gBAAgB,UAAU,KAAK,cAAY,SAAS,MAAM;AACtF,QAAI,CAAC,gBAAgB;AACnB,WAAK,eAAe;AACpB;AAAA,IACF;AAGA,UAAM,oBAAoB;AAAA,MACxB,GAAG;AAAA,MACH,OAAO,eAAe,SAAS,QAAQ,aAAW,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,MAAM,IAAI,CAAC;AAAA,MACrG,UAAU,eAAe,SAAS,IAAI,cAAY;AAAA,QAChD,GAAG;AAAA,QACH,OAAO,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAW,GAAG,KAAK,MAAM,IAAI;AAAA,MAC3D,EAAE;AAAA,IACJ;AAGA,UAAM,gBAAgB,kBAAkB,SAAS,KAAK,aAAW,QAAQ,MAAM;AAC/E,QAAI,CAAC,eAAe;AAClB,WAAK,eAAe;AACpB;AAAA,IACF;AACA,UAAM,mBAAmB,gBAAgB,EAAE,GAAG,eAAe,OAAO,cAAc,MAAM,IAAI;AAG5F,UAAM,gBAAgB,kBAAkB,MAAM,KAAK,UAAQ,KAAK,MAAM;AACtE,QAAI,CAAC,eAAe;AAClB,WAAK,eAAe;AACpB;AAAA,IACF;AAEA,UAAM,EAAE,WAAW,GAAG,WAAW,IAAI,KAAK;AAG1C,SAAK,eAAe;AAAA,MAClB,MAAM,iBAAiB;AAAA,MACvB,SAAS,oBAAoB;AAAA,MAC7B,UAAU;AAAA,MACV,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,SAAS;AACP,QAAI,CAAC,KAAK,aAAc,QAAO;AAC/B,WAAO,QAAQ,KAAK,QAAQ,mBAAmB,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC,CAAC,mBAAmB,OAAO;AAAA,MACjH,KAAK,aAAa,KAAK,WAAW,KAAK,YAAY,IAAI,OAAO;AAAA,EAClE;AACF;AArFS;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAL/B,UAMJ;AAIC;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,UAUH;AAGA;AAAA,EADP,MAAM;AAAA,GAZI,UAaH;AAbG,YAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":[]}
@@ -0,0 +1,92 @@
1
+ import {
2
+ btn,
3
+ dis
4
+ } from "./chunk-5ZHHNEDA.js";
5
+ import {
6
+ computedContext
7
+ } from "./chunk-PSGZN2AP.js";
8
+ import {
9
+ __decorateClass
10
+ } from "./chunk-H2JE6IVU.js";
11
+
12
+ // src/lib/qti-test/components/test-show-correct-response.ts
13
+ import { css, html, LitElement } from "lit";
14
+ import { customElement, property } from "lit/decorators.js";
15
+ import { consume } from "@lit/context";
16
+ var TestShowCorrectResponse = class extends LitElement {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.shown = false;
20
+ this.disabled = false;
21
+ this.showCorrectText = "Show correct response";
22
+ this.hideCorrectText = "Hide correct response";
23
+ this.noCorrectResponseText = "No correct response specified";
24
+ }
25
+ // Store previous active item reference
26
+ willUpdate(_changedProperties) {
27
+ const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
28
+ if (this._previousActiveItem !== activeItem) {
29
+ this.shown = false;
30
+ this._previousActiveItem = activeItem;
31
+ }
32
+ if (activeItem) {
33
+ const containsCorrectResponse = !!activeItem?.variables?.some((v) => v["correctResponse"]);
34
+ const containsMapping = !!activeItem?.variables?.some((v) => {
35
+ return v["mapping"]?.mapEntries?.length > 0 || v["areaMapping"]?.areaMapEntries?.length > 0;
36
+ });
37
+ this.disabled = !containsCorrectResponse && !containsMapping;
38
+ } else {
39
+ this.disabled = true;
40
+ }
41
+ }
42
+ _toggleState() {
43
+ if (this.disabled) return;
44
+ this.shown = !this.shown;
45
+ this.dispatchEvent(
46
+ new CustomEvent("test-show-correct-response", {
47
+ detail: this.shown,
48
+ bubbles: true
49
+ })
50
+ );
51
+ }
52
+ _getDisplayedText() {
53
+ return this.disabled ? this.noCorrectResponseText : this.shown ? this.hideCorrectText : this.showCorrectText;
54
+ }
55
+ render() {
56
+ return html` <div @click="${this._toggleState}">${this._getDisplayedText()}</div> `;
57
+ }
58
+ };
59
+ TestShowCorrectResponse.styles = css`
60
+ :host {
61
+ ${btn};
62
+ }
63
+ :host([disabled]) {
64
+ ${dis};
65
+ }
66
+ `;
67
+ __decorateClass([
68
+ consume({ context: computedContext, subscribe: true })
69
+ ], TestShowCorrectResponse.prototype, "computedContext", 2);
70
+ __decorateClass([
71
+ property({ type: Boolean, reflect: true })
72
+ ], TestShowCorrectResponse.prototype, "shown", 2);
73
+ __decorateClass([
74
+ property({ type: Boolean, reflect: true })
75
+ ], TestShowCorrectResponse.prototype, "disabled", 2);
76
+ __decorateClass([
77
+ property({ type: String })
78
+ ], TestShowCorrectResponse.prototype, "showCorrectText", 2);
79
+ __decorateClass([
80
+ property({ type: String })
81
+ ], TestShowCorrectResponse.prototype, "hideCorrectText", 2);
82
+ __decorateClass([
83
+ property({ type: String })
84
+ ], TestShowCorrectResponse.prototype, "noCorrectResponseText", 2);
85
+ TestShowCorrectResponse = __decorateClass([
86
+ customElement("test-show-correct-response")
87
+ ], TestShowCorrectResponse);
88
+
89
+ export {
90
+ TestShowCorrectResponse
91
+ };
92
+ //# sourceMappingURL=chunk-M2PGI5QL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-show-correct-response.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\n\nimport * as styles from './styles';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext } from '../../exports/computed.context';\n\n@customElement('test-show-correct-response')\nexport class TestShowCorrectResponse extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n public computedContext?: ComputedContext;\n\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n @property({ type: Boolean, reflect: true }) shown = false;\n @property({ type: Boolean, reflect: true }) disabled = false;\n @property({ type: String }) showCorrectText = 'Show correct response';\n @property({ type: String }) hideCorrectText = 'Hide correct response';\n @property({ type: String }) noCorrectResponseText = 'No correct response specified';\n\n private _previousActiveItem?: unknown; // Store previous active item reference\n\n willUpdate(_changedProperties: Map<string | number | symbol, unknown>) {\n const activeItem = this.computedContext?.testParts\n .flatMap(testPart => testPart.sections.flatMap(section => section.items))\n .find(item => item.active);\n\n // If active item changed, reset shown before the update\n if (this._previousActiveItem !== activeItem) {\n this.shown = false;\n this._previousActiveItem = activeItem; // Update previous active item\n }\n\n if (activeItem) {\n const containsCorrectResponse = !!activeItem?.variables?.some(v => v['correctResponse']);\n const containsMapping = !!activeItem?.variables?.some(v => {\n return v['mapping']?.mapEntries?.length > 0 || v['areaMapping']?.areaMapEntries?.length > 0;\n });\n this.disabled = !containsCorrectResponse && !containsMapping;\n } else {\n this.disabled = true;\n }\n }\n private _toggleState() {\n if (this.disabled) return;\n this.shown = !this.shown;\n\n this.dispatchEvent(\n new CustomEvent('test-show-correct-response', {\n detail: this.shown,\n bubbles: true\n })\n );\n }\n\n private _getDisplayedText(): string {\n return this.disabled ? this.noCorrectResponseText : this.shown ? this.hideCorrectText : this.showCorrectText;\n }\n\n render() {\n return html` <div @click=\"${this._toggleState}\">${this._getDisplayedText()}</div> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-show-correct-response': TestShowCorrectResponse;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,eAAe,gBAAgB;AACxC,SAAS,eAAe;AAQjB,IAAM,0BAAN,cAAsC,WAAW;AAAA,EAAjD;AAAA;AAauC,iBAAQ;AACR,oBAAW;AAC3B,2BAAkB;AAClB,2BAAkB;AAClB,iCAAwB;AAAA;AAAA;AAAA,EAIpD,WAAW,oBAA4D;AACrE,UAAM,aAAa,KAAK,iBAAiB,UACtC,QAAQ,cAAY,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK,CAAC,EACvE,KAAK,UAAQ,KAAK,MAAM;AAG3B,QAAI,KAAK,wBAAwB,YAAY;AAC3C,WAAK,QAAQ;AACb,WAAK,sBAAsB;AAAA,IAC7B;AAEA,QAAI,YAAY;AACd,YAAM,0BAA0B,CAAC,CAAC,YAAY,WAAW,KAAK,OAAK,EAAE,iBAAiB,CAAC;AACvF,YAAM,kBAAkB,CAAC,CAAC,YAAY,WAAW,KAAK,OAAK;AACzD,eAAO,EAAE,SAAS,GAAG,YAAY,SAAS,KAAK,EAAE,aAAa,GAAG,gBAAgB,SAAS;AAAA,MAC5F,CAAC;AACD,WAAK,WAAW,CAAC,2BAA2B,CAAC;AAAA,IAC/C,OAAO;AACL,WAAK,WAAW;AAAA,IAClB;AAAA,EACF;AAAA,EACQ,eAAe;AACrB,QAAI,KAAK,SAAU;AACnB,SAAK,QAAQ,CAAC,KAAK;AAEnB,SAAK;AAAA,MACH,IAAI,YAAY,8BAA8B;AAAA,QAC5C,QAAQ,KAAK;AAAA,QACb,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEQ,oBAA4B;AAClC,WAAO,KAAK,WAAW,KAAK,wBAAwB,KAAK,QAAQ,KAAK,kBAAkB,KAAK;AAAA,EAC/F;AAAA,EAEA,SAAS;AACP,WAAO,qBAAqB,KAAK,YAAY,KAAK,KAAK,kBAAkB,CAAC;AAAA,EAC5E;AACF;AA7Da,wBAIJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AAPT;AAAA,EADN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,wBAEJ;AAWqC;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAb/B,wBAaiC;AACA;AAAA,EAA3C,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAd/B,wBAciC;AAChB;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAff,wBAeiB;AACA;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAhBf,wBAgBiB;AACA;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAjBf,wBAiBiB;AAjBjB,0BAAN;AAAA,EADN,cAAc,4BAA4B;AAAA,GAC9B;","names":[]}
@@ -0,0 +1,45 @@
1
+ import {
2
+ computedContext
3
+ } from "./chunk-HAP4ICAJ.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/qti-test/components/test-paging-buttons-stamp.ts
9
+ import { html, LitElement } from "lit";
10
+ import { customElement } from "lit/decorators.js";
11
+ import { prepareTemplate } from "stampino";
12
+ import { consume } from "@lit/context";
13
+ var TestPagingButtonsStamp = class extends LitElement {
14
+ createRenderRoot() {
15
+ return this;
16
+ }
17
+ constructor() {
18
+ super();
19
+ this._internals = this.attachInternals();
20
+ this._internals.ariaLabel = "pagination";
21
+ }
22
+ connectedCallback() {
23
+ super.connectedCallback();
24
+ const templateElement = this.querySelector("template");
25
+ this.myTemplate = prepareTemplate(templateElement);
26
+ }
27
+ render() {
28
+ if (!this.computedContext) return html``;
29
+ const items = this.computedContext.testParts.flatMap(
30
+ (testPart) => testPart.sections.flatMap((section) => section.items)
31
+ );
32
+ return html` ${items.map((item) => this.myTemplate({ item }))} `;
33
+ }
34
+ };
35
+ __decorateClass([
36
+ consume({ context: computedContext, subscribe: true })
37
+ ], TestPagingButtonsStamp.prototype, "computedContext", 2);
38
+ TestPagingButtonsStamp = __decorateClass([
39
+ customElement("test-paging-buttons-stamp")
40
+ ], TestPagingButtonsStamp);
41
+
42
+ export {
43
+ TestPagingButtonsStamp
44
+ };
45
+ //# sourceMappingURL=chunk-M3D3T5OO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-paging-buttons-stamp.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n@customElement('test-paging-buttons-stamp')\nexport class TestPagingButtonsStamp extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n myTemplate: TemplateFunction;\n private _internals: ElementInternals;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n this._internals.ariaLabel = 'pagination';\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n render() {\n if (!this.computedContext) return html``;\n const items = this.computedContext.testParts.flatMap(testPart =>\n testPart.sections.flatMap(section => section.items)\n );\n\n return html` ${items.map(item => this.myTemplate({ item }))} `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-paging-buttons-stamp': TestPagingButtonsStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,kBAAkB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAQjB,IAAM,yBAAN,cAAqC,WAAW;AAAA,EAO3C,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,cAAc;AACZ,UAAM;AACN,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,YAAY;AAAA,EAC9B;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEA,SAAS;AACP,QAAI,CAAC,KAAK,gBAAiB,QAAO;AAClC,UAAM,QAAQ,KAAK,gBAAgB,UAAU;AAAA,MAAQ,cACnD,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK;AAAA,IACpD;AAEA,WAAO,QAAQ,MAAM,IAAI,UAAQ,KAAK,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;AAAA,EAC7D;AACF;AA7BU;AAAA,EADP,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,uBAEH;AAFG,yBAAN;AAAA,EADN,cAAc,2BAA2B;AAAA,GAC7B;","names":[]}
@@ -0,0 +1,8 @@
1
+ // src/lib/exports/computed.context.ts
2
+ import { createContext } from "@lit/context";
3
+ var computedContext = createContext(Symbol("computedContext"));
4
+
5
+ export {
6
+ computedContext
7
+ };
8
+ //# sourceMappingURL=chunk-M43YVT6M.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/exports/computed.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\n\nimport type { ComputedItemContext } from './computed-item.context';\n\nexport type ComputedItem = ComputedItemContext & {\n // rawscore?: Readonly<string | string[]>; // not necessary for outside world\n // score?: number; // not necessary for outside world\n // completionStatus?: Readonly<string | string[]>; // not necessary for outside world\n // categories?: string[]; // not necessary for outside world\n type?: 'info' | 'regular';\n index?: number;\n active?: boolean;\n};\n\nexport type ComputedContext = {\n // testElement?: HTMLElement;\n identifier: string;\n title: string;\n view?: 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor';\n testParts: {\n active?: boolean;\n identifier: string;\n navigationMode: 'linear' | 'nonlinear';\n submissionMode: 'individual' | 'simultaneous';\n sections: {\n active?: boolean;\n identifier: string;\n title: string;\n completed?: boolean;\n items: ComputedItem[];\n }[];\n }[];\n};\n\nexport const computedContext = createContext<Readonly<ComputedContext>>(Symbol('computedContext'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAkCvB,IAAM,kBAAkB,cAAyC,OAAO,iBAAiB,CAAC;","names":[]}
@@ -0,0 +1,82 @@
1
+ import {
2
+ computedContext
3
+ } from "./chunk-AZIKAG7K.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/qti-test/components/test-scoring-buttons.ts
9
+ import { html, LitElement, nothing } from "lit";
10
+ import { consume } from "@lit/context";
11
+ import { customElement, property } from "lit/decorators.js";
12
+ import { prepareTemplate } from "stampino";
13
+ var TestScoringButtons = class extends LitElement {
14
+ constructor() {
15
+ super();
16
+ this.view = "";
17
+ this.disabled = false;
18
+ this.myTemplate = null;
19
+ this.addEventListener("click", (e) => {
20
+ const target = e.target;
21
+ const value = parseInt(target.value);
22
+ if (target.tagName === "INPUT") {
23
+ this._changeOutcomeScore(value);
24
+ }
25
+ });
26
+ }
27
+ createRenderRoot() {
28
+ return this;
29
+ }
30
+ connectedCallback() {
31
+ super.connectedCallback();
32
+ const templateElement = this.querySelector("template");
33
+ if (!templateElement) {
34
+ this.myTemplate = null;
35
+ return;
36
+ }
37
+ this.myTemplate = prepareTemplate(templateElement);
38
+ }
39
+ _changeOutcomeScore(value) {
40
+ const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
41
+ const sectionItems = testPart.sections.flatMap((section) => section.items);
42
+ const currentItemIdentifier = sectionItems.find((item) => item.active)?.identifier;
43
+ this.dispatchEvent(
44
+ new CustomEvent("test-update-outcome-variable", {
45
+ detail: {
46
+ assessmentItemRefId: currentItemIdentifier,
47
+ outcomeVariableId: "SCORE",
48
+ value
49
+ },
50
+ bubbles: true
51
+ })
52
+ );
53
+ }
54
+ render() {
55
+ const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
56
+ if (!activeItem || !activeItem.variables) return html``;
57
+ const maxScore = activeItem.variables.find((vr) => vr.identifier == "MAXSCORE")?.value;
58
+ const scoreOutcome = activeItem.variables.find((vr) => vr.identifier == "SCORE");
59
+ const score = scoreOutcome?.value;
60
+ this.disabled = !(scoreOutcome?.externalScored === "human");
61
+ if (!maxScore || !scoreOutcome) return nothing;
62
+ const scores = [...Array(Number(maxScore) + 1).keys()];
63
+ return html`${this.myTemplate ? this.myTemplate({ scores, score }) : nothing}`;
64
+ }
65
+ };
66
+ __decorateClass([
67
+ property({ type: String, attribute: "view" })
68
+ ], TestScoringButtons.prototype, "view", 2);
69
+ __decorateClass([
70
+ property({ type: Boolean })
71
+ ], TestScoringButtons.prototype, "disabled", 2);
72
+ __decorateClass([
73
+ consume({ context: computedContext, subscribe: true })
74
+ ], TestScoringButtons.prototype, "computedContext", 2);
75
+ TestScoringButtons = __decorateClass([
76
+ customElement("test-scoring-buttons")
77
+ ], TestScoringButtons);
78
+
79
+ export {
80
+ TestScoringButtons
81
+ };
82
+ //# sourceMappingURL=chunk-MJMLVDAV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-scoring-buttons.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { consume } from '@lit/context';\nimport { customElement, property } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { TemplateFunction } from 'stampino';\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\n\n@customElement('test-scoring-buttons')\nexport class TestScoringButtons extends LitElement {\n @property({ type: String, attribute: 'view' }) view = ''; // is only an attribute, but this is here because.. react\n @property({ type: Boolean }) disabled: boolean = false;\n myTemplate: TemplateFunction | null = null;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n @consume({ context: computedContext, subscribe: true })\n protected computedContext?: ComputedContext;\n\n private _changeOutcomeScore(value: number) {\n const testPart = this.computedContext?.testParts.find(testPart => testPart.active);\n const sectionItems = testPart.sections.flatMap(section => section.items);\n const currentItemIdentifier = sectionItems.find(item => item.active)?.identifier;\n\n this.dispatchEvent(\n new CustomEvent('test-update-outcome-variable', {\n detail: {\n assessmentItemRefId: currentItemIdentifier,\n outcomeVariableId: 'SCORE',\n value\n },\n bubbles: true\n })\n );\n }\n\n render() {\n const activeItem = this.computedContext?.testParts\n .flatMap(testPart => testPart.sections.flatMap(section => section.items))\n .find(item => item.active);\n\n if (!activeItem || !activeItem.variables) return html``;\n\n const maxScore = activeItem.variables.find(vr => vr.identifier == 'MAXSCORE')?.value;\n const scoreOutcome = activeItem.variables.find(vr => vr.identifier == 'SCORE') as OutcomeVariable;\n\n const score = scoreOutcome?.value;\n\n this.disabled = !(scoreOutcome?.externalScored === 'human');\n\n if (!maxScore || !scoreOutcome) return nothing;\n const scores = [...Array(Number(maxScore) + 1).keys()];\n\n return html`${this.myTemplate ? this.myTemplate({ scores, score }) : nothing}`;\n }\n\n constructor() {\n super();\n this.addEventListener('click', e => {\n const target = e.target as HTMLInputElement;\n const value = parseInt(target.value);\n if (target.tagName === 'INPUT') {\n this._changeOutcomeScore(value);\n }\n });\n\n // return maxScore\n // ? html`\n // <form part=\"form\">\n // ${[...Array(Number(maxScore) + 1).keys()].map(itemIndex => {\n // const identifier = `scoring-buttons${itemIndex}${activeItem.identifier}`;\n // return html` <input\n // part=\"input\"\n // type=\"radio\"\n // ?disabled=${this.disabled}\n // .checked=${itemIndex === Number(score)}\n // @change=${() => this._changeOutcomeScore(itemIndex)}\n // id=${identifier}\n // name=${`scoring-buttons-${activeItem.identifier}`}\n // value=${itemIndex}\n // />\n\n // <label part=\"label\" for=${identifier}>${itemIndex}</label>`;\n // })}\n // </form>\n // <slot></slot>\n // `\n // : nothing;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-scoring-buttons': TestScoringButtons;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe;AACxB,SAAS,eAAe,gBAAgB;AACxC,SAAS,uBAAuB;AASzB,IAAM,qBAAN,cAAiC,WAAW;AAAA,EA2DjD,cAAc;AACZ,UAAM;AA3DuC,gBAAO;AACzB,oBAAoB;AACjD,sBAAsC;AA0DpC,SAAK,iBAAiB,SAAS,OAAK;AAClC,YAAM,SAAS,EAAE;AACjB,YAAM,QAAQ,SAAS,OAAO,KAAK;AACnC,UAAI,OAAO,YAAY,SAAS;AAC9B,aAAK,oBAAoB,KAAK;AAAA,MAChC;AAAA,IACF,CAAC;AAAA,EAwBH;AAAA,EAtFU,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAKQ,oBAAoB,OAAe;AACzC,UAAM,WAAW,KAAK,iBAAiB,UAAU,KAAK,CAAAA,cAAYA,UAAS,MAAM;AACjF,UAAM,eAAe,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK;AACvE,UAAM,wBAAwB,aAAa,KAAK,UAAQ,KAAK,MAAM,GAAG;AAEtE,SAAK;AAAA,MACH,IAAI,YAAY,gCAAgC;AAAA,QAC9C,QAAQ;AAAA,UACN,qBAAqB;AAAA,UACrB,mBAAmB;AAAA,UACnB;AAAA,QACF;AAAA,QACA,SAAS;AAAA,MACX,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,SAAS;AACP,UAAM,aAAa,KAAK,iBAAiB,UACtC,QAAQ,cAAY,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK,CAAC,EACvE,KAAK,UAAQ,KAAK,MAAM;AAE3B,QAAI,CAAC,cAAc,CAAC,WAAW,UAAW,QAAO;AAEjD,UAAM,WAAW,WAAW,UAAU,KAAK,QAAM,GAAG,cAAc,UAAU,GAAG;AAC/E,UAAM,eAAe,WAAW,UAAU,KAAK,QAAM,GAAG,cAAc,OAAO;AAE7E,UAAM,QAAQ,cAAc;AAE5B,SAAK,WAAW,EAAE,cAAc,mBAAmB;AAEnD,QAAI,CAAC,YAAY,CAAC,aAAc,QAAO;AACvC,UAAM,SAAS,CAAC,GAAG,MAAM,OAAO,QAAQ,IAAI,CAAC,EAAE,KAAK,CAAC;AAErD,WAAO,OAAO,KAAK,aAAa,KAAK,WAAW,EAAE,QAAQ,MAAM,CAAC,IAAI,OAAO;AAAA,EAC9E;AAmCF;AA3FiD;AAAA,EAA9C,SAAS,EAAE,MAAM,QAAQ,WAAW,OAAO,CAAC;AAAA,GADlC,mBACoC;AAClB;AAAA,EAA5B,SAAS,EAAE,MAAM,QAAQ,CAAC;AAAA,GAFhB,mBAEkB;AAkBnB;AAAA,EADT,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAnB3C,mBAoBD;AApBC,qBAAN;AAAA,EADN,cAAc,sBAAsB;AAAA,GACxB;","names":["testPart"]}
@@ -0,0 +1,95 @@
1
+ import {
2
+ computedContext
3
+ } from "./chunk-YZSGZTWA.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/qti-test/components/test-stamp.ts
9
+ import { html, LitElement, nothing } from "lit";
10
+ import { customElement, property, state } from "lit/decorators.js";
11
+ import { prepareTemplate } from "stampino";
12
+ import { consume } from "@lit/context";
13
+
14
+ // dist/chunks/chunk-22IRJWWY.js
15
+ import { createContext } from "@lit/context";
16
+ var sessionContext = createContext(Symbol("testContext"));
17
+
18
+ // src/lib/qti-test/components/test-stamp.ts
19
+ var TestStamp = class extends LitElement {
20
+ constructor() {
21
+ super(...arguments);
22
+ this.debug = false;
23
+ this.stampContext = null;
24
+ }
25
+ createRenderRoot() {
26
+ return this;
27
+ }
28
+ connectedCallback() {
29
+ super.connectedCallback();
30
+ const templateElement = this.querySelector("template");
31
+ if (!templateElement) {
32
+ this.myTemplate = null;
33
+ return;
34
+ }
35
+ this.myTemplate = prepareTemplate(templateElement);
36
+ }
37
+ willUpdate(_changedProperties) {
38
+ if (!this.computedContext) {
39
+ this.stampContext = null;
40
+ return;
41
+ }
42
+ const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
43
+ const activeSection = activeTestPart?.sections.find((section) => section.active);
44
+ const activeItem = activeSection?.items.find((item) => item.active);
45
+ const { variables, ...augmentedItem } = activeItem || {};
46
+ if (!activeTestPart || !activeSection || !activeItem) {
47
+ this.stampContext = null;
48
+ return;
49
+ }
50
+ const augmentedTestPart = {
51
+ ...activeTestPart,
52
+ items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables: variables2, ...rest }) => rest)),
53
+ sections: activeTestPart.sections.map((section) => ({
54
+ ...section,
55
+ items: section.items.map(({ variables: variables2, ...rest }) => rest)
56
+ }))
57
+ };
58
+ const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables: variables2, ...rest }) => rest) };
59
+ const { testParts, ...activeTest } = this.computedContext;
60
+ this.stampContext = {
61
+ view: this.computedContext.view,
62
+ item: augmentedItem,
63
+ section: augmentedSection,
64
+ testpart: augmentedTestPart,
65
+ test: activeTest
66
+ };
67
+ }
68
+ render() {
69
+ if (!this.stampContext) return nothing;
70
+ return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
71
+ ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
72
+ }
73
+ };
74
+ __decorateClass([
75
+ property({ type: Boolean, reflect: true })
76
+ ], TestStamp.prototype, "debug", 2);
77
+ __decorateClass([
78
+ state(),
79
+ consume({ context: computedContext, subscribe: true })
80
+ ], TestStamp.prototype, "computedContext", 2);
81
+ __decorateClass([
82
+ state(),
83
+ consume({ context: sessionContext, subscribe: true })
84
+ ], TestStamp.prototype, "sessionContext", 2);
85
+ __decorateClass([
86
+ state()
87
+ ], TestStamp.prototype, "stampContext", 2);
88
+ TestStamp = __decorateClass([
89
+ customElement("test-stamp")
90
+ ], TestStamp);
91
+
92
+ export {
93
+ TestStamp
94
+ };
95
+ //# sourceMappingURL=chunk-MNYMPXJZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts","../../src/lib/exports/session.context.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\nimport { sessionContext } from '../../../../dist/exports/session.context';\n\nimport type { SessionContext } from '../../../../dist/exports/session.context';\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n @consume({ context: sessionContext, subscribe: true })\n private sessionContext: SessionContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n testpart?: unknown;\n section?: unknown;\n item?: unknown;\n } | null = null;\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n this.stampContext = null;\n return;\n }\n\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n const { variables, ...augmentedItem } = activeItem || {};\n\n if (!activeTestPart || !activeSection || !activeItem) {\n this.stampContext = null;\n return;\n }\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n item: augmentedItem,\n section: augmentedSection,\n testpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n","import { createContext } from '@lit/context';\n\nimport type { View } from '../qti-test/core/mixins/test-view.mixin';\n\nexport interface SessionContext {\n navPartId?: string | null;\n navSectionId?: string | null;\n navItemRefId?: string | null;\n navItemLoading?: boolean;\n navTestLoading?: boolean;\n view?: View;\n}\n\nexport const INITIAL_SESSION_CONTEXT: Readonly<SessionContext> = { view: 'candidate' };\n\nexport const sessionContext = createContext<Readonly<SessionContext>>(Symbol('testContext'));\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;;;ACHxB,SAAS,qBAAqB;AAevB,IAAM,iBAAiB,cAAwC,OAAO,aAAa,CAAC;;;ADApF,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAWf,SAAQ,eAMG;AAAA;AAAA,EAID,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEU,WAAW,oBAA0C;AAC7D,QAAI,CAAC,KAAK,iBAAiB;AACzB,WAAK,eAAe;AACpB;AAAA,IACF;AAEA,UAAM,iBAAiB,KAAK,gBAAgB,UAAU,KAAK,cAAY,SAAS,MAAM;AACtF,UAAM,gBAAgB,gBAAgB,SAAS,KAAK,aAAW,QAAQ,MAAM;AAC7E,UAAM,aAAa,eAAe,MAAM,KAAK,UAAQ,KAAK,MAAM;AAChE,UAAM,EAAE,WAAW,GAAG,cAAc,IAAI,cAAc,CAAC;AAEvD,QAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,YAAY;AACpD,WAAK,eAAe;AACpB;AAAA,IACF;AAEA,UAAM,oBAAoB;AAAA,MACxB,GAAG;AAAA,MACH,OAAO,eAAe,SAAS,QAAQ,aAAW,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI,CAAC;AAAA,MACrG,UAAU,eAAe,SAAS,IAAI,cAAY;AAAA,QAChD,GAAG;AAAA,QACH,OAAO,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI;AAAA,MAC3D,EAAE;AAAA,IACJ;AAEA,UAAM,mBAAmB,EAAE,GAAG,eAAe,OAAO,cAAc,MAAM,IAAI,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI,EAAE;AAC9G,UAAM,EAAE,WAAW,GAAG,WAAW,IAAI,KAAK;AAE1C,SAAK,eAAe;AAAA,MAClB,MAAM,KAAK,gBAAgB;AAAA,MAC3B,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,MACV,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,SAAS;AACP,QAAI,CAAC,KAAK,aAAc,QAAO;AAC/B,WAAO,QAAQ,KAAK,QAAQ,mBAAmB,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC,CAAC,mBAAmB,OAAO;AAAA,MACjH,KAAK,aAAa,KAAK,WAAW,KAAK,YAAY,IAAI,OAAO;AAAA,EAClE;AACF;AA7ES;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAL/B,UAMJ;AAIC;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,UAUH;AAIA;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,gBAAgB,WAAW,KAAK,CAAC;AAAA,GAb1C,UAcH;AAGA;AAAA,EADP,MAAM;AAAA,GAhBI,UAiBH;AAjBG,YAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":["variables"]}