@citolab/qti-components 7.3.23 → 7.4.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 (346) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +5485 -1
  3. package/custom-elements.json +29837 -0
  4. package/dist/chunks/chunk-6K4ROGDD.js +364 -0
  5. package/dist/chunks/chunk-6K4ROGDD.js.map +1 -0
  6. package/dist/chunks/chunk-GUDRSXIP.js +189 -0
  7. package/dist/chunks/chunk-GUDRSXIP.js.map +1 -0
  8. package/dist/chunks/{chunk-WFUXZ4UT.js → chunk-JDY5GL7E.js} +13 -1
  9. package/dist/chunks/{chunk-WFUXZ4UT.js.map → chunk-JDY5GL7E.js.map} +1 -1
  10. package/dist/chunks/{chunk-LF6SO3JU.js → chunk-LN74Z5QM.js} +653 -450
  11. package/dist/chunks/chunk-LN74Z5QM.js.map +1 -0
  12. package/dist/chunks/{chunk-ELDMXTUQ.js → chunk-O5N4DCU6.js} +7 -2
  13. package/dist/chunks/chunk-O5N4DCU6.js.map +1 -0
  14. package/dist/chunks/chunk-TJ6ZOT7A.js +2235 -0
  15. package/dist/chunks/chunk-TJ6ZOT7A.js.map +1 -0
  16. package/dist/computed-item.context-DpK-sS0T.d.ts +19 -0
  17. package/dist/{exports/config.context.d.ts → config.context-CmQ9L62n.d.ts} +1 -4
  18. package/dist/custom-elements.json +29837 -0
  19. package/dist/index.d.ts +8 -39
  20. package/dist/index.js +34 -104
  21. package/{cdn/chunks/chunk-5TDBMEY5.js → dist/item.css} +7 -24
  22. package/dist/qti-assessment-item-D77dJ1Ot.d.ts +104 -0
  23. package/dist/qti-components/index.d.ts +1238 -19
  24. package/dist/qti-components/index.js +6 -14
  25. package/dist/qti-components-jsx.d.ts +4463 -0
  26. package/dist/qti-item/index.d.ts +113 -0
  27. package/dist/qti-item/index.js +16 -0
  28. package/dist/qti-loader/index.d.ts +2 -6
  29. package/dist/qti-loader/index.js +24 -5
  30. package/dist/qti-loader/index.js.map +1 -1
  31. package/dist/qti-test/index.d.ts +593 -0
  32. package/dist/qti-test/index.js +62 -0
  33. package/dist/qti-transformers/index.d.ts +38 -2
  34. package/dist/qti-transformers/index.js +1 -2
  35. package/dist/test.context-L609DNAz.d.ts +58 -0
  36. package/dist/variables-Vgyr6yyW.d.ts +58 -0
  37. package/dist/vscode.css-custom-data.json +11 -0
  38. package/dist/vscode.html-custom-data.json +1135 -0
  39. package/package.json +74 -116
  40. package/cdn/chunks/chunk-2BSPQRNR.js +0 -6
  41. package/cdn/chunks/chunk-3CVBBZDT.js +0 -17
  42. package/cdn/chunks/chunk-3IBGLVHA.js +0 -1
  43. package/cdn/chunks/chunk-3YQMAZEO.js +0 -29
  44. package/cdn/chunks/chunk-5UQLGV7F.js +0 -5
  45. package/cdn/chunks/chunk-5WLHU3FH.js +0 -8
  46. package/cdn/chunks/chunk-6SGFGN34.js +0 -8
  47. package/cdn/chunks/chunk-6XVY32RS.js +0 -1
  48. package/cdn/chunks/chunk-7ME56ODO.js +0 -1
  49. package/cdn/chunks/chunk-CZDMOYYF.js +0 -1
  50. package/cdn/chunks/chunk-DNBBQ7LY.js +0 -1
  51. package/cdn/chunks/chunk-DP5FVJRS.js +0 -21
  52. package/cdn/chunks/chunk-E6IOJ4MV.js +0 -23
  53. package/cdn/chunks/chunk-G76Y52EL.js +0 -1471
  54. package/cdn/chunks/chunk-HCXHHI6V.js +0 -18
  55. package/cdn/chunks/chunk-HDMF4QZO.js +0 -48
  56. package/cdn/chunks/chunk-HKWYQB5Z.js +0 -37
  57. package/cdn/chunks/chunk-J5P2GBPV.js +0 -1
  58. package/cdn/chunks/chunk-KWPDTFYH.js +0 -1
  59. package/cdn/chunks/chunk-LIUOA3YV.js +0 -1
  60. package/cdn/chunks/chunk-LO2NM3CE.js +0 -1
  61. package/cdn/chunks/chunk-MD33BNWM.js +0 -1
  62. package/cdn/chunks/chunk-MRQ46JRY.js +0 -8
  63. package/cdn/chunks/chunk-NJP4VZB3.js +0 -8
  64. package/cdn/chunks/chunk-O4RAJ3LM.js +0 -25
  65. package/cdn/chunks/chunk-OSLUHYFD.js +0 -8
  66. package/cdn/chunks/chunk-P6SSTAJ2.js +0 -1
  67. package/cdn/chunks/chunk-PP62N3C4.js +0 -8
  68. package/cdn/chunks/chunk-PU7OABT3.js +0 -1
  69. package/cdn/chunks/chunk-PUI3LIFH.js +0 -0
  70. package/cdn/chunks/chunk-QBAXWCYQ.js +0 -5
  71. package/cdn/chunks/chunk-QEFO63QX.js +0 -8
  72. package/cdn/chunks/chunk-QQCGUVEV.js +0 -1
  73. package/cdn/chunks/chunk-QQR6POPY.js +0 -1
  74. package/cdn/chunks/chunk-RGNFAPWY.js +0 -2
  75. package/cdn/chunks/chunk-S5QDLZ6J.js +0 -1
  76. package/cdn/chunks/chunk-SEM2PEP6.js +0 -5
  77. package/cdn/chunks/chunk-SVVO2SFS.js +0 -1
  78. package/cdn/chunks/chunk-TCHROQU3.js +0 -1
  79. package/cdn/chunks/chunk-UMDZKG6K.js +0 -1
  80. package/cdn/chunks/chunk-VEG7LKS3.js +0 -48
  81. package/cdn/chunks/chunk-WCCTDLQ4.js +0 -8
  82. package/cdn/chunks/chunk-X4FA36TC.js +0 -1
  83. package/cdn/chunks/chunk-XJ2CFTZP.js +0 -1
  84. package/cdn/chunks/chunk-XUJ7TXHW.js +0 -1
  85. package/cdn/chunks/chunk-YCBNF5QU.js +0 -17
  86. package/cdn/chunks/chunk-YHLQ2JQ2.js +0 -1
  87. package/cdn/chunks/chunk-ZPCQH3EY.js +0 -10
  88. package/cdn/exports/computed-item.context.js +0 -1
  89. package/cdn/exports/computed.context.js +0 -1
  90. package/cdn/exports/config.context.js +0 -1
  91. package/cdn/exports/expression-result.js +0 -0
  92. package/cdn/exports/interaction.interface.js +0 -0
  93. package/cdn/exports/interaction.js +0 -1
  94. package/cdn/exports/item.context.js +0 -1
  95. package/cdn/exports/qti-assessment-item.context.js +0 -1
  96. package/cdn/exports/qti-condition-expression.js +0 -1
  97. package/cdn/exports/qti-expression.js +0 -1
  98. package/cdn/exports/qti-test.js +0 -0
  99. package/cdn/exports/qti.context.js +0 -1
  100. package/cdn/exports/session.context.js +0 -1
  101. package/cdn/exports/test.context.js +0 -1
  102. package/cdn/exports/variables.js +0 -0
  103. package/cdn/qti-components/index.js +0 -1
  104. package/cdn/qti-item/components/item-container.js +0 -1
  105. package/cdn/qti-item/components/item-correct-response-mode.js +0 -10
  106. package/cdn/qti-item/components/item-show-candidate-correction.js +0 -8
  107. package/cdn/qti-item/components/item-show-correct-response.js +0 -1
  108. package/cdn/qti-item/components/print-item-variables.js +0 -1
  109. package/cdn/qti-item/components/styles.js +0 -1
  110. package/cdn/qti-item/core/index.js +0 -1
  111. package/cdn/qti-loader/index.js +0 -1
  112. package/cdn/qti-test/components/index.js +0 -1
  113. package/cdn/qti-test/components/styles.js +0 -1
  114. package/cdn/qti-test/components/test-check-item.js +0 -1
  115. package/cdn/qti-test/components/test-container.js +0 -1
  116. package/cdn/qti-test/components/test-end-attempt.js +0 -1
  117. package/cdn/qti-test/components/test-item-link.js +0 -1
  118. package/cdn/qti-test/components/test-navigation.js +0 -1
  119. package/cdn/qti-test/components/test-next.js +0 -1
  120. package/cdn/qti-test/components/test-paging-buttons-stamp.js +0 -1
  121. package/cdn/qti-test/components/test-prev.js +0 -1
  122. package/cdn/qti-test/components/test-print-context.js +0 -1
  123. package/cdn/qti-test/components/test-print-item-variables.js +0 -1
  124. package/cdn/qti-test/components/test-scoring-buttons.js +0 -1
  125. package/cdn/qti-test/components/test-scoring-feedback.js +0 -1
  126. package/cdn/qti-test/components/test-section-buttons-stamp.js +0 -1
  127. package/cdn/qti-test/components/test-section-link.js +0 -1
  128. package/cdn/qti-test/components/test-show-correct-response.js +0 -1
  129. package/cdn/qti-test/components/test-stamp.js +0 -1
  130. package/cdn/qti-test/components/test-view-toggle.js +0 -1
  131. package/cdn/qti-test/components/test-view.js +0 -1
  132. package/cdn/qti-test/core/index.js +0 -1
  133. package/cdn/qti-transformers/index.js +0 -1
  134. package/dist/chunks/chunk-22IRJWWY.js +0 -10
  135. package/dist/chunks/chunk-22IRJWWY.js.map +0 -1
  136. package/dist/chunks/chunk-36G5MQKR.js +0 -85
  137. package/dist/chunks/chunk-36G5MQKR.js.map +0 -1
  138. package/dist/chunks/chunk-4OGJBG35.js +0 -8
  139. package/dist/chunks/chunk-4OGJBG35.js.map +0 -1
  140. package/dist/chunks/chunk-5KCXO2RP.js +0 -36
  141. package/dist/chunks/chunk-5KCXO2RP.js.map +0 -1
  142. package/dist/chunks/chunk-5ZHHNEDA.js +0 -30
  143. package/dist/chunks/chunk-5ZHHNEDA.js.map +0 -1
  144. package/dist/chunks/chunk-7K44TDQO.js +0 -91
  145. package/dist/chunks/chunk-7K44TDQO.js.map +0 -1
  146. package/dist/chunks/chunk-7OMJMXHK.js +0 -50
  147. package/dist/chunks/chunk-7OMJMXHK.js.map +0 -1
  148. package/dist/chunks/chunk-AZIKAG7K.js +0 -8
  149. package/dist/chunks/chunk-AZIKAG7K.js.map +0 -1
  150. package/dist/chunks/chunk-BLBSZDQ4.js +0 -52
  151. package/dist/chunks/chunk-BLBSZDQ4.js.map +0 -1
  152. package/dist/chunks/chunk-CJADUWEC.js +0 -10
  153. package/dist/chunks/chunk-CJADUWEC.js.map +0 -1
  154. package/dist/chunks/chunk-CP34TICQ.js +0 -45
  155. package/dist/chunks/chunk-CP34TICQ.js.map +0 -1
  156. package/dist/chunks/chunk-CTESMSQO.js +0 -56
  157. package/dist/chunks/chunk-CTESMSQO.js.map +0 -1
  158. package/dist/chunks/chunk-DZAMXOSC.js +0 -30
  159. package/dist/chunks/chunk-DZAMXOSC.js.map +0 -1
  160. package/dist/chunks/chunk-E6V3JHVT.js +0 -31
  161. package/dist/chunks/chunk-E6V3JHVT.js.map +0 -1
  162. package/dist/chunks/chunk-EJZQSOHU.js +0 -85
  163. package/dist/chunks/chunk-EJZQSOHU.js.map +0 -1
  164. package/dist/chunks/chunk-ELDMXTUQ.js.map +0 -1
  165. package/dist/chunks/chunk-EMVOKXSA.js +0 -84
  166. package/dist/chunks/chunk-EMVOKXSA.js.map +0 -1
  167. package/dist/chunks/chunk-ERYHQVOT.js +0 -8
  168. package/dist/chunks/chunk-ERYHQVOT.js.map +0 -1
  169. package/dist/chunks/chunk-ETLOKJAG.js +0 -94
  170. package/dist/chunks/chunk-ETLOKJAG.js.map +0 -1
  171. package/dist/chunks/chunk-FL72PF4D.js +0 -19
  172. package/dist/chunks/chunk-FL72PF4D.js.map +0 -1
  173. package/dist/chunks/chunk-GAHXUFMQ.js +0 -93
  174. package/dist/chunks/chunk-GAHXUFMQ.js.map +0 -1
  175. package/dist/chunks/chunk-H2JE6IVU.js +0 -15
  176. package/dist/chunks/chunk-H2JE6IVU.js.map +0 -1
  177. package/dist/chunks/chunk-H6KHXSIO.js +0 -8
  178. package/dist/chunks/chunk-H6KHXSIO.js.map +0 -1
  179. package/dist/chunks/chunk-HFAUM56X.js +0 -208
  180. package/dist/chunks/chunk-HFAUM56X.js.map +0 -1
  181. package/dist/chunks/chunk-JQ6HWGRY.js +0 -22
  182. package/dist/chunks/chunk-JQ6HWGRY.js.map +0 -1
  183. package/dist/chunks/chunk-KG5Z2CKO.js +0 -86
  184. package/dist/chunks/chunk-KG5Z2CKO.js.map +0 -1
  185. package/dist/chunks/chunk-KSXNC564.js +0 -43
  186. package/dist/chunks/chunk-KSXNC564.js.map +0 -1
  187. package/dist/chunks/chunk-LF6SO3JU.js.map +0 -1
  188. package/dist/chunks/chunk-NJNQOQUU.js +0 -8
  189. package/dist/chunks/chunk-NJNQOQUU.js.map +0 -1
  190. package/dist/chunks/chunk-ODHS7HDB.js +0 -94
  191. package/dist/chunks/chunk-ODHS7HDB.js.map +0 -1
  192. package/dist/chunks/chunk-QCB6P7DH.js +0 -146
  193. package/dist/chunks/chunk-QCB6P7DH.js.map +0 -1
  194. package/dist/chunks/chunk-QU7KR7VX.js +0 -367
  195. package/dist/chunks/chunk-QU7KR7VX.js.map +0 -1
  196. package/dist/chunks/chunk-TU6COU44.js +0 -82
  197. package/dist/chunks/chunk-TU6COU44.js.map +0 -1
  198. package/dist/chunks/chunk-TUKEQ36K.js +0 -60
  199. package/dist/chunks/chunk-TUKEQ36K.js.map +0 -1
  200. package/dist/chunks/chunk-TWYN56XO.js +0 -92
  201. package/dist/chunks/chunk-TWYN56XO.js.map +0 -1
  202. package/dist/chunks/chunk-UHQVQBCL.js +0 -89
  203. package/dist/chunks/chunk-UHQVQBCL.js.map +0 -1
  204. package/dist/chunks/chunk-WFFIUFJJ.js +0 -28
  205. package/dist/chunks/chunk-WFFIUFJJ.js.map +0 -1
  206. package/dist/chunks/chunk-WN6TJQI2.js +0 -103
  207. package/dist/chunks/chunk-WN6TJQI2.js.map +0 -1
  208. package/dist/chunks/chunk-WPEFNKMC.js +0 -923
  209. package/dist/chunks/chunk-WPEFNKMC.js.map +0 -1
  210. package/dist/chunks/chunk-YPMZLHGG.js +0 -52
  211. package/dist/chunks/chunk-YPMZLHGG.js.map +0 -1
  212. package/dist/chunks/chunk-YWEWSQJR.js +0 -40
  213. package/dist/chunks/chunk-YWEWSQJR.js.map +0 -1
  214. package/dist/chunks/chunk-ZGSNDSK3.js +0 -1
  215. package/dist/chunks/chunk-ZGSNDSK3.js.map +0 -1
  216. package/dist/exports/computed-item.context.d.ts +0 -29
  217. package/dist/exports/computed-item.context.js +0 -8
  218. package/dist/exports/computed-item.context.js.map +0 -1
  219. package/dist/exports/computed.context.d.ts +0 -42
  220. package/dist/exports/computed.context.js +0 -8
  221. package/dist/exports/computed.context.js.map +0 -1
  222. package/dist/exports/config.context.js +0 -8
  223. package/dist/exports/config.context.js.map +0 -1
  224. package/dist/exports/expression-result.d.ts +0 -19
  225. package/dist/exports/expression-result.js +0 -1
  226. package/dist/exports/expression-result.js.map +0 -1
  227. package/dist/exports/interaction.d.ts +0 -8
  228. package/dist/exports/interaction.interface.d.ts +0 -13
  229. package/dist/exports/interaction.interface.js +0 -1
  230. package/dist/exports/interaction.interface.js.map +0 -1
  231. package/dist/exports/interaction.js +0 -12
  232. package/dist/exports/interaction.js.map +0 -1
  233. package/dist/exports/item.context.d.ts +0 -8
  234. package/dist/exports/item.context.js +0 -8
  235. package/dist/exports/item.context.js.map +0 -1
  236. package/dist/exports/qti-assessment-item.context.d.ts +0 -14
  237. package/dist/exports/qti-assessment-item.context.js +0 -8
  238. package/dist/exports/qti-assessment-item.context.js.map +0 -1
  239. package/dist/exports/qti-condition-expression.d.ts +0 -15
  240. package/dist/exports/qti-condition-expression.js +0 -11
  241. package/dist/exports/qti-condition-expression.js.map +0 -1
  242. package/dist/exports/qti-expression.d.ts +0 -8
  243. package/dist/exports/qti-expression.js +0 -10
  244. package/dist/exports/qti-expression.js.map +0 -1
  245. package/dist/exports/qti-test.d.ts +0 -40
  246. package/dist/exports/qti-test.js +0 -1
  247. package/dist/exports/qti-test.js.map +0 -1
  248. package/dist/exports/qti.context.d.ts +0 -14
  249. package/dist/exports/qti.context.js +0 -8
  250. package/dist/exports/qti.context.js.map +0 -1
  251. package/dist/exports/session.context.d.ts +0 -26
  252. package/dist/exports/session.context.js +0 -10
  253. package/dist/exports/session.context.js.map +0 -1
  254. package/dist/exports/test.context.d.ts +0 -21
  255. package/dist/exports/test.context.js +0 -10
  256. package/dist/exports/test.context.js.map +0 -1
  257. package/dist/exports/variables.d.ts +0 -8
  258. package/dist/exports/variables.js +0 -1
  259. package/dist/exports/variables.js.map +0 -1
  260. package/dist/qti-item/components/item-container.d.ts +0 -40
  261. package/dist/qti-item/components/item-container.js +0 -11
  262. package/dist/qti-item/components/item-container.js.map +0 -1
  263. package/dist/qti-item/components/item-correct-response-mode.d.ts +0 -17
  264. package/dist/qti-item/components/item-correct-response-mode.js +0 -62
  265. package/dist/qti-item/components/item-correct-response-mode.js.map +0 -1
  266. package/dist/qti-item/components/item-show-candidate-correction.d.ts +0 -34
  267. package/dist/qti-item/components/item-show-candidate-correction.js +0 -88
  268. package/dist/qti-item/components/item-show-candidate-correction.js.map +0 -1
  269. package/dist/qti-item/components/item-show-correct-response.d.ts +0 -33
  270. package/dist/qti-item/components/item-show-correct-response.js +0 -10
  271. package/dist/qti-item/components/item-show-correct-response.js.map +0 -1
  272. package/dist/qti-item/components/print-item-variables.d.ts +0 -23
  273. package/dist/qti-item/components/print-item-variables.js +0 -9
  274. package/dist/qti-item/components/print-item-variables.js.map +0 -1
  275. package/dist/qti-item/components/styles.d.ts +0 -8
  276. package/dist/qti-item/components/styles.js +0 -14
  277. package/dist/qti-item/components/styles.js.map +0 -1
  278. package/dist/qti-item/core/index.d.ts +0 -51
  279. package/dist/qti-item/core/index.js +0 -26
  280. package/dist/qti-response-declaration-DKr08ANy.d.ts +0 -1397
  281. package/dist/qti-test/components/index.d.ts +0 -33
  282. package/dist/qti-test/components/index.js +0 -87
  283. package/dist/qti-test/components/styles.d.ts +0 -8
  284. package/dist/qti-test/components/styles.js +0 -14
  285. package/dist/qti-test/components/styles.js.map +0 -1
  286. package/dist/qti-test/components/test-check-item.d.ts +0 -16
  287. package/dist/qti-test/components/test-check-item.js +0 -9
  288. package/dist/qti-test/components/test-check-item.js.map +0 -1
  289. package/dist/qti-test/components/test-container.d.ts +0 -39
  290. package/dist/qti-test/components/test-container.js +0 -11
  291. package/dist/qti-test/components/test-container.js.map +0 -1
  292. package/dist/qti-test/components/test-end-attempt.d.ts +0 -16
  293. package/dist/qti-test/components/test-end-attempt.js +0 -9
  294. package/dist/qti-test/components/test-end-attempt.js.map +0 -1
  295. package/dist/qti-test/components/test-item-link.d.ts +0 -18
  296. package/dist/qti-test/components/test-item-link.js +0 -9
  297. package/dist/qti-test/components/test-item-link.js.map +0 -1
  298. package/dist/qti-test/components/test-navigation.d.ts +0 -73
  299. package/dist/qti-test/components/test-navigation.js +0 -13
  300. package/dist/qti-test/components/test-navigation.js.map +0 -1
  301. package/dist/qti-test/components/test-next.d.ts +0 -48
  302. package/dist/qti-test/components/test-next.js +0 -12
  303. package/dist/qti-test/components/test-next.js.map +0 -1
  304. package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +0 -23
  305. package/dist/qti-test/components/test-paging-buttons-stamp.js +0 -9
  306. package/dist/qti-test/components/test-paging-buttons-stamp.js.map +0 -1
  307. package/dist/qti-test/components/test-prev.d.ts +0 -46
  308. package/dist/qti-test/components/test-prev.js +0 -12
  309. package/dist/qti-test/components/test-prev.js.map +0 -1
  310. package/dist/qti-test/components/test-print-context.d.ts +0 -25
  311. package/dist/qti-test/components/test-print-context.js +0 -9
  312. package/dist/qti-test/components/test-print-context.js.map +0 -1
  313. package/dist/qti-test/components/test-print-item-variables.d.ts +0 -27
  314. package/dist/qti-test/components/test-print-item-variables.js +0 -9
  315. package/dist/qti-test/components/test-print-item-variables.js.map +0 -1
  316. package/dist/qti-test/components/test-scoring-buttons.d.ts +0 -32
  317. package/dist/qti-test/components/test-scoring-buttons.js +0 -9
  318. package/dist/qti-test/components/test-scoring-buttons.js.map +0 -1
  319. package/dist/qti-test/components/test-scoring-feedback.d.ts +0 -27
  320. package/dist/qti-test/components/test-scoring-feedback.js +0 -9
  321. package/dist/qti-test/components/test-scoring-feedback.js.map +0 -1
  322. package/dist/qti-test/components/test-section-buttons-stamp.d.ts +0 -23
  323. package/dist/qti-test/components/test-section-buttons-stamp.js +0 -9
  324. package/dist/qti-test/components/test-section-buttons-stamp.js.map +0 -1
  325. package/dist/qti-test/components/test-section-link.d.ts +0 -18
  326. package/dist/qti-test/components/test-section-link.js +0 -9
  327. package/dist/qti-test/components/test-section-link.js.map +0 -1
  328. package/dist/qti-test/components/test-show-correct-response.d.ts +0 -39
  329. package/dist/qti-test/components/test-show-correct-response.js +0 -10
  330. package/dist/qti-test/components/test-show-correct-response.js.map +0 -1
  331. package/dist/qti-test/components/test-stamp.d.ts +0 -31
  332. package/dist/qti-test/components/test-stamp.js +0 -9
  333. package/dist/qti-test/components/test-stamp.js.map +0 -1
  334. package/dist/qti-test/components/test-view-toggle.d.ts +0 -19
  335. package/dist/qti-test/components/test-view-toggle.js +0 -9
  336. package/dist/qti-test/components/test-view-toggle.js.map +0 -1
  337. package/dist/qti-test/components/test-view.d.ts +0 -24
  338. package/dist/qti-test/components/test-view.js +0 -10
  339. package/dist/qti-test/components/test-view.js.map +0 -1
  340. package/dist/qti-test/core/index.d.ts +0 -105
  341. package/dist/qti-test/core/index.js +0 -36
  342. package/dist/qti-test/core/index.js.map +0 -1
  343. package/dist/qti-test-feedback-CZsbp6z4.d.ts +0 -91
  344. package/dist/qti-transform-item-C9WtMeDR.d.ts +0 -39
  345. /package/dist/qti-item/{core/index.js.map → index.js.map} +0 -0
  346. /package/dist/qti-test/{components/index.js.map → index.js.map} +0 -0
@@ -1,923 +0,0 @@
1
- import {
2
- QtiModalFeedback
3
- } from "./chunk-LF6SO3JU.js";
4
- import {
5
- qtiTransformItem
6
- } from "./chunk-WFUXZ4UT.js";
7
- import {
8
- INITIAL_SESSION_CONTEXT,
9
- sessionContext
10
- } from "./chunk-22IRJWWY.js";
11
- import {
12
- INITIAL_TEST_CONTEXT,
13
- testContext
14
- } from "./chunk-CJADUWEC.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.postLoadTransformCallback = null;
42
- this._navigationInProgress = false;
43
- this._activeRequests = [];
44
- this._lastError = null;
45
- this._lastNavigationRequestId = null;
46
- this._targetNavigation = null;
47
- this.addEventListener(
48
- "qti-request-navigation",
49
- async ({ detail }) => {
50
- if (!detail?.id) return;
51
- const navigationRequestId = `nav_${Date.now()}_${Math.random()}`;
52
- this._lastNavigationRequestId = navigationRequestId;
53
- try {
54
- this._navigationInProgress = true;
55
- this._lastError = null;
56
- this._dispatchStatusEvent({ loading: true, type: detail.type, id: detail.id });
57
- this._cancelActiveRequests();
58
- this._targetNavigation = { type: detail.type, id: detail.id };
59
- if (detail.type === "item") {
60
- await this._navigateToItem(detail.id);
61
- } else if (detail.type === "section") {
62
- await this._navigateToSection(detail.id);
63
- }
64
- if (this._lastNavigationRequestId !== navigationRequestId) {
65
- console.log("Navigation was superseded by a newer request");
66
- return;
67
- }
68
- } catch (error) {
69
- if (this._lastNavigationRequestId === navigationRequestId) {
70
- const navError = this._normalizeError(error, detail.type, detail.id);
71
- this._lastError = navError;
72
- this._dispatchErrorEvent(navError);
73
- console.error(`Navigation error (${navError.type}):`, navError.message, navError.details);
74
- }
75
- } finally {
76
- if (this._lastNavigationRequestId === navigationRequestId) {
77
- this._navigationInProgress = false;
78
- this._dispatchStatusEvent({ loading: false, type: detail.type, id: detail.id });
79
- }
80
- }
81
- }
82
- );
83
- this.addEventListener("qti-assessment-test-connected", (e) => {
84
- this._testElement = e.detail;
85
- this._initializeNavigation();
86
- });
87
- }
88
- /**
89
- * Initialize navigation when test is first connected
90
- */
91
- _initializeNavigation() {
92
- let id;
93
- if (this.navigate === "section") {
94
- id = this._testElement.querySelector("qti-assessment-section")?.identifier;
95
- }
96
- if (this.navigate === "item") {
97
- id = this.sessionContext.navItemRefId ?? this._testElement.querySelector("qti-assessment-item-ref")?.identifier;
98
- }
99
- if (id) {
100
- this.dispatchEvent(
101
- new CustomEvent("qti-request-navigation", {
102
- detail: { type: this.navigate === "section" ? "section" : "item", id },
103
- bubbles: true,
104
- composed: true
105
- })
106
- );
107
- }
108
- }
109
- navigateTo(type, id) {
110
- if (!id) {
111
- if (type === "section") {
112
- id = this._testElement?.querySelector("qti-assessment-section")?.identifier;
113
- }
114
- if (type === "item") {
115
- id = this._testElement?.querySelector("qti-assessment-item-ref")?.identifier;
116
- }
117
- }
118
- this.dispatchEvent(
119
- new CustomEvent("qti-request-navigation", {
120
- detail: { type, id },
121
- bubbles: true,
122
- composed: true
123
- })
124
- );
125
- }
126
- /**
127
- * Navigates to a specific item
128
- */
129
- async _navigateToItem(itemId) {
130
- const itemRefEl = this._testElement?.querySelector(
131
- `qti-assessment-item-ref[identifier="${itemId}"]`
132
- );
133
- if (!itemRefEl) {
134
- throw {
135
- type: "item-not-found" /* ITEM_NOT_FOUND */,
136
- message: `Item with identifier "${itemId}" not found.`,
137
- itemId
138
- };
139
- }
140
- const navPartId = itemRefEl.closest("qti-test-part")?.identifier;
141
- const navSectionId = itemRefEl.closest("qti-assessment-section")?.identifier;
142
- this.sessionContext = {
143
- ...this.sessionContext,
144
- navPartId,
145
- navSectionId,
146
- navItemRefId: itemId,
147
- navItemLoading: true
148
- };
149
- try {
150
- await this._loadItems([itemId]);
151
- } finally {
152
- this.sessionContext = {
153
- ...this.sessionContext,
154
- navItemLoading: false
155
- };
156
- }
157
- }
158
- /**
159
- * Navigates to a specific section
160
- */
161
- async _navigateToSection(sectionId) {
162
- const sectionRefEl = this._testElement?.querySelector(
163
- `qti-assessment-section[identifier="${sectionId}"]`
164
- );
165
- if (!sectionRefEl) {
166
- throw {
167
- type: "section-not-found" /* SECTION_NOT_FOUND */,
168
- message: `Section with identifier "${sectionId}" not found.`,
169
- sectionId
170
- };
171
- }
172
- const navPartId = sectionRefEl.closest("qti-test-part")?.identifier;
173
- this.sessionContext = {
174
- ...this.sessionContext,
175
- navPartId,
176
- navSectionId: sectionId,
177
- navItemRefId: null,
178
- navItemLoading: true
179
- };
180
- try {
181
- const itemIds = this._getSectionItemIds(sectionId);
182
- await this._loadItems(itemIds);
183
- } finally {
184
- this.sessionContext = {
185
- ...this.sessionContext,
186
- navItemLoading: false
187
- };
188
- }
189
- }
190
- /**
191
- * Normalize different error types into a consistent NavigationError format
192
- */
193
- _normalizeError(error, navigationType, id) {
194
- if (error && error.type && Object.values(NavigationErrorType).includes(error.type)) {
195
- return error;
196
- }
197
- if (error instanceof DOMException && error.name === "AbortError") {
198
- return {
199
- type: "network-error" /* NETWORK_ERROR */,
200
- message: "Navigation was cancelled because a new navigation was requested.",
201
- details: error
202
- };
203
- }
204
- if (error.name === "TimeoutError" || error.message && error.message.includes("timeout")) {
205
- return {
206
- type: "timeout-error" /* TIMEOUT_ERROR */,
207
- message: "Request timed out. Please check your network connection.",
208
- details: error
209
- };
210
- }
211
- if (error instanceof TypeError && error.message.includes("network")) {
212
- return {
213
- type: "network-error" /* NETWORK_ERROR */,
214
- message: "A network error occurred. Please check your connection.",
215
- details: error
216
- };
217
- }
218
- return {
219
- type: "load-error" /* LOAD_ERROR */,
220
- message: `Failed to load ${navigationType}: ${id}`,
221
- details: error,
222
- itemId: navigationType === "item" ? id : void 0,
223
- sectionId: navigationType === "section" ? id : void 0
224
- };
225
- }
226
- /**
227
- * Dispatch error event to notify the UI
228
- */
229
- _dispatchErrorEvent(error) {
230
- this.dispatchEvent(
231
- new CustomEvent("qti-navigation-error", {
232
- detail: error,
233
- bubbles: true,
234
- composed: true
235
- })
236
- );
237
- }
238
- /**
239
- * Dispatch status event to indicate loading state
240
- */
241
- _dispatchStatusEvent(status) {
242
- if (this.showLoadingIndicators) {
243
- this.dispatchEvent(
244
- new CustomEvent("qti-navigation-status", {
245
- detail: status,
246
- bubbles: true,
247
- composed: true
248
- })
249
- );
250
- }
251
- }
252
- /**
253
- * Cancels all active HTTP requests
254
- */
255
- _cancelActiveRequests() {
256
- if (this._activeRequests.length > 0) {
257
- console.info(`Cancelling ${this._activeRequests.length} pending requests`);
258
- this._activeRequests.forEach((request) => {
259
- if (request && request.readyState !== 4) {
260
- request.abort();
261
- }
262
- });
263
- this._activeRequests = [];
264
- }
265
- }
266
- /**
267
- * Load items with improved error handling and timeout
268
- */
269
- async _loadItems(itemIds) {
270
- if (!this._testElement || itemIds.length === 0) return;
271
- const itemRefEls = itemIds.map(
272
- (id) => this._testElement.querySelector(`qti-assessment-item-ref[identifier="${id}"]`)
273
- );
274
- const missingItems = itemRefEls.reduce((missing, el, index) => {
275
- if (!el) missing.push(itemIds[index]);
276
- return missing;
277
- }, []);
278
- if (missingItems.length > 0) {
279
- const error = {
280
- type: "item-not-found" /* ITEM_NOT_FOUND */,
281
- message: `One or more items not found: ${missingItems.join(", ")}`,
282
- details: { missingItems }
283
- };
284
- throw error;
285
- }
286
- this._clearLoadedItems();
287
- const itemLoadPromises = itemRefEls.map(async (itemRef) => {
288
- if (!itemRef) return null;
289
- const timeoutPromise = new Promise((_, reject) => {
290
- setTimeout(() => {
291
- reject({
292
- name: "TimeoutError",
293
- message: `Request for item ${itemRef.identifier} timed out after ${this.requestTimeout}ms`
294
- });
295
- }, this.requestTimeout);
296
- });
297
- try {
298
- const { promise, request } = qtiTransformItem(this.cacheTransform).load(itemRef.href);
299
- if (request instanceof XMLHttpRequest) {
300
- this._activeRequests.push(request);
301
- }
302
- const loadedTransformer = await Promise.race([promise, timeoutPromise]);
303
- let finalTransformer = loadedTransformer;
304
- console.log(`Loaded item 123: ${itemRef.identifier}`);
305
- if (this.postLoadTransformCallback) {
306
- finalTransformer = await this.postLoadTransformCallback(loadedTransformer, itemRef);
307
- }
308
- return {
309
- itemRef,
310
- doc: finalTransformer.htmlDoc(),
311
- request
312
- };
313
- } catch (error) {
314
- if (error instanceof DOMException && error.name === "AbortError" || error && error.name === "TimeoutError") {
315
- console.log(
316
- `Request for item ${itemRef.identifier} was ${error.name === "TimeoutError" ? "timed out" : "aborted"}`
317
- );
318
- return null;
319
- }
320
- error.itemId = itemRef.identifier;
321
- throw error;
322
- }
323
- });
324
- try {
325
- const results = await Promise.all(itemLoadPromises);
326
- const validResults = results.filter((result) => result !== null);
327
- validResults.forEach(({ itemRef, doc }) => {
328
- if (itemRef && doc) itemRef.xmlDoc = doc;
329
- });
330
- this._activeRequests = [];
331
- requestAnimationFrame(() => {
332
- this.dispatchEvent(
333
- new CustomEvent("qti-test-loaded", {
334
- detail: validResults.map(({ itemRef }) => ({
335
- identifier: itemRef?.identifier,
336
- element: itemRef
337
- })),
338
- bubbles: true,
339
- composed: true
340
- })
341
- );
342
- });
343
- if (validResults.length === 0 && itemIds.length > 0) {
344
- throw {
345
- type: "load-error" /* LOAD_ERROR */,
346
- message: "All item requests failed to load",
347
- details: { itemIds }
348
- };
349
- }
350
- return validResults;
351
- } catch (error) {
352
- console.error("Error loading items:", error);
353
- throw error;
354
- }
355
- }
356
- /**
357
- * Gets all item IDs in a section
358
- */
359
- _getSectionItemIds(navSectionId) {
360
- const sectionRefEl = this._testElement?.querySelector(
361
- `qti-assessment-section[identifier="${navSectionId}"]`
362
- );
363
- if (!sectionRefEl) {
364
- throw {
365
- type: "section-not-found" /* SECTION_NOT_FOUND */,
366
- message: `Section with identifier "${navSectionId}" not found.`,
367
- sectionId: navSectionId
368
- };
369
- }
370
- return Array.from(
371
- this._testElement.querySelectorAll(
372
- `qti-assessment-section[identifier="${navSectionId}"] > qti-assessment-item-ref`
373
- )
374
- ).map((itemRef) => itemRef.identifier);
375
- }
376
- /**
377
- * Clears all loaded items
378
- */
379
- _clearLoadedItems() {
380
- const itemRefEls = this._testElement?.querySelectorAll(
381
- `qti-assessment-test qti-assessment-item-ref`
382
- );
383
- Array.from(itemRefEls || []).forEach((itemElement) => {
384
- itemElement.xmlDoc = null;
385
- });
386
- }
387
- /**
388
- * Retry the last failed navigation
389
- */
390
- retryNavigation() {
391
- if (this._lastError) {
392
- const type = this._lastError.itemId ? "item" : "section";
393
- const id = this._lastError.itemId || this._lastError.sectionId;
394
- if (id) {
395
- this.dispatchEvent(
396
- new CustomEvent("qti-request-navigation", {
397
- detail: { type, id },
398
- bubbles: true,
399
- composed: true
400
- })
401
- );
402
- }
403
- } else if (this._targetNavigation) {
404
- this.dispatchEvent(
405
- new CustomEvent("qti-request-navigation", {
406
- detail: this._targetNavigation,
407
- bubbles: true,
408
- composed: true
409
- })
410
- );
411
- }
412
- }
413
- }
414
- __decorateClass([
415
- property({ type: String })
416
- ], TestNavigationClass.prototype, "navigate", 2);
417
- __decorateClass([
418
- property({ type: Boolean, attribute: "cache-transform" })
419
- ], TestNavigationClass.prototype, "cacheTransform", 2);
420
- __decorateClass([
421
- property({ type: Number })
422
- ], TestNavigationClass.prototype, "requestTimeout", 2);
423
- __decorateClass([
424
- property({ type: Boolean })
425
- ], TestNavigationClass.prototype, "showLoadingIndicators", 2);
426
- __decorateClass([
427
- property({ type: Function })
428
- ], TestNavigationClass.prototype, "postLoadTransformCallback", 2);
429
- return TestNavigationClass;
430
- };
431
-
432
- // src/lib/qti-test/core/mixins/test-view.mixin.ts
433
- var TestViewMixin = (superClass) => {
434
- class TestViewClass extends superClass {
435
- constructor(...args) {
436
- super(...args);
437
- this.sessionContext = { ...this.sessionContext, view: "candidate" };
438
- this.addEventListener("on-test-switch-view", (e) => {
439
- this.sessionContext = { ...this.sessionContext, view: e.detail };
440
- this._updateElementView();
441
- });
442
- this.addEventListener("qti-assessment-test-connected", () => {
443
- this._updateElementView();
444
- });
445
- this.addEventListener("qti-assessment-item-connected", (e) => {
446
- this._updateElementView();
447
- this._setCorrectResponseVisibility(e.detail);
448
- });
449
- }
450
- willUpdate(changedProperties) {
451
- super.willUpdate(changedProperties);
452
- if (changedProperties.has("sessionContext")) {
453
- this._updateElementView();
454
- }
455
- }
456
- // Method to handle view updates for elements based on the current context view
457
- _updateElementView() {
458
- if (this._testElement) {
459
- const viewElements = Array.from(this._testElement.querySelectorAll("[view]"));
460
- viewElements.forEach((element) => {
461
- element.classList.toggle("show", element.getAttribute("view") === this.sessionContext.view);
462
- });
463
- const assessmentItemRef = this._testElement.querySelector(
464
- `qti-assessment-item-ref[identifier="${this.sessionContext.navItemRefId}"]`
465
- );
466
- const assessmentItem = assessmentItemRef?.assessmentItem;
467
- if (assessmentItem) {
468
- assessmentItem.showCorrectResponse(this.sessionContext.view === "scorer");
469
- }
470
- }
471
- }
472
- // Event handler for connected QTI assessment items
473
- _setCorrectResponseVisibility(assessmentItem) {
474
- assessmentItem.showCorrectResponse(this.sessionContext.view === "scorer");
475
- }
476
- }
477
- return TestViewClass;
478
- };
479
-
480
- // src/lib/qti-test/core/test-base.ts
481
- import { provide } from "@lit/context";
482
- import { LitElement } from "lit";
483
- import { property as property2 } from "lit/decorators.js";
484
- var TestBase = class extends LitElement {
485
- constructor() {
486
- super();
487
- this.testContext = INITIAL_TEST_CONTEXT;
488
- this.sessionContext = INITIAL_SESSION_CONTEXT;
489
- /**
490
- * Updates the variables of an assessment item in the test context.
491
- * - Matches the assessment item with the corresponding test context item.
492
- * - If the item is not found, logs a warning.
493
- * - Updates variables in the test context if exactly one variable exists.
494
- * - Otherwise, syncs the assessment item's variables with the test context.
495
- *
496
- * @param assessmentItem - The assessment item to update.
497
- */
498
- this._updateItemInTestContext = (assessmentItem) => {
499
- const context = assessmentItem._context;
500
- const identifier = context.identifier;
501
- const fullVariables = context.variables;
502
- const itemContext = this.testContext.items.find((i) => i?.identifier === identifier);
503
- if (!itemContext) {
504
- console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);
505
- return;
506
- }
507
- if (itemContext.variables?.length === 1) {
508
- this._updateItemVariablesInTestContext(identifier, fullVariables);
509
- } else {
510
- assessmentItem.variables = [...itemContext.variables || []];
511
- }
512
- };
513
- this.addEventListener("qti-assessment-test-connected", (e) => {
514
- this.testContext = INITIAL_TEST_CONTEXT;
515
- this.sessionContext = INITIAL_SESSION_CONTEXT;
516
- if (this.testContext && this.testContext.items.length > 0) return;
517
- this._testElement = e.detail;
518
- const items = Array.from(this._testElement.querySelectorAll("qti-assessment-item-ref")).map((itemRef) => {
519
- return {
520
- href: itemRef.href,
521
- identifier: itemRef.identifier,
522
- category: itemRef.category,
523
- variables: [
524
- {
525
- identifier: "completionStatus",
526
- value: "not_attempted",
527
- type: "outcome"
528
- }
529
- ]
530
- };
531
- });
532
- this.testContext = { ...this.testContext, items };
533
- });
534
- this.addEventListener("qti-assessment-item-connected", (e) => {
535
- const assessmentItem = e.detail;
536
- const assessmentRefId = assessmentItem.closest("qti-assessment-item-ref")?.identifier;
537
- if (assessmentRefId) {
538
- assessmentItem.assessmentItemRefId = assessmentRefId;
539
- }
540
- this._updateItemInTestContext(e.detail);
541
- });
542
- this.addEventListener("qti-item-context-updated", (e) => {
543
- this._updateItemVariablesInTestContext(e.detail.itemContext.identifier, e.detail.itemContext.variables);
544
- });
545
- }
546
- updateItemVariables(itemRefID, variables) {
547
- const itemContext = this.testContext.items.find((item) => item.identifier === itemRefID);
548
- if (itemContext) {
549
- itemContext.variables = itemContext.variables.map((variable) => {
550
- const updatedVariable = variables.find((v) => v.identifier === variable.identifier);
551
- return updatedVariable ? { ...variable, ...updatedVariable } : variable;
552
- });
553
- }
554
- const itemRef = this._testElement.querySelector(
555
- `qti-assessment-item-ref[identifier="${itemRefID}"]`
556
- );
557
- if (itemRef && itemRef.assessmentItem) {
558
- if (itemRef.assessmentItem) {
559
- itemRef.assessmentItem.variables = variables;
560
- }
561
- }
562
- }
563
- _updateItemVariablesInTestContext(identifier, variables) {
564
- this.testContext = {
565
- ...this.testContext,
566
- // Spread existing test context properties
567
- items: this.testContext.items.map((itemContext) => {
568
- if (itemContext.identifier !== identifier) {
569
- return itemContext;
570
- }
571
- return {
572
- ...itemContext,
573
- // Keep other properties of the item context
574
- variables: variables.map((variable) => {
575
- const matchingVariable = itemContext.variables.find((v) => v.identifier === variable.identifier);
576
- return matchingVariable ? { ...matchingVariable, ...variable } : variable;
577
- })
578
- };
579
- })
580
- };
581
- this.dispatchEvent(
582
- new CustomEvent("qti-test-context-updated", { detail: this.testContext, bubbles: false, composed: false })
583
- );
584
- }
585
- };
586
- __decorateClass([
587
- property2({ attribute: false, type: Object }),
588
- provide({ context: testContext })
589
- ], TestBase.prototype, "testContext", 2);
590
- __decorateClass([
591
- property2({ attribute: false, type: Object }),
592
- provide({ context: sessionContext })
593
- ], TestBase.prototype, "sessionContext", 2);
594
-
595
- // src/lib/qti-test/core/mixins/test-processing.mixin.ts
596
- var TestProcessingMixin = (superClass) => {
597
- class TestProcessingElement extends superClass {
598
- constructor(...args) {
599
- super(...args);
600
- this.addEventListener("qti-register-variable", (e) => {
601
- this.testContext = {
602
- ...this.testContext,
603
- testOutcomeVariables: [...this.testContext.testOutcomeVariables || [], e.detail.variable]
604
- };
605
- e.stopPropagation();
606
- });
607
- this.addEventListener(
608
- "qti-set-outcome-value",
609
- (e) => {
610
- const { outcomeIdentifier, value } = e.detail;
611
- this.updateOutcomeVariable(outcomeIdentifier, value);
612
- e.stopPropagation();
613
- }
614
- );
615
- }
616
- outcomeProcessing() {
617
- const outcomeProcessor = this.querySelector("qti-outcome-processing");
618
- if (!outcomeProcessor) return false;
619
- outcomeProcessor?.process();
620
- return true;
621
- }
622
- /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
623
- updateOutcomeVariable(identifier, value) {
624
- const outcomeVariable = this.getOutcome(identifier);
625
- if (!outcomeVariable) {
626
- console.warn(`Can not set qti-outcome-identifier: ${identifier}, it is not available`);
627
- return;
628
- }
629
- this.testContext = {
630
- ...this.testContext,
631
- testOutcomeVariables: this.testContext.testOutcomeVariables?.map((v) => {
632
- if (v.identifier !== identifier) {
633
- return v;
634
- }
635
- return {
636
- ...v,
637
- value: outcomeVariable.cardinality === "single" ? value : [...v.value, value]
638
- };
639
- })
640
- };
641
- }
642
- getOutcome(identifier) {
643
- return this.getVariable(identifier);
644
- }
645
- getVariable(identifier) {
646
- return this.testContext.testOutcomeVariables?.find((v) => v.identifier === identifier) || null;
647
- }
648
- /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
649
- }
650
- return TestProcessingElement;
651
- };
652
-
653
- // src/lib/qti-test/core/qti-test.ts
654
- var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestBase))) {
655
- // export class QtiTest extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {
656
- /**
657
- * Renders the component's template.
658
- * Provides a default `<slot>` for content projection.
659
- */
660
- async connectedCallback() {
661
- super.connectedCallback();
662
- await this.updateComplete;
663
- this.dispatchEvent(new CustomEvent("qti-test-connected", { detail: this }));
664
- }
665
- render() {
666
- return html`<slot></slot>`;
667
- }
668
- };
669
- QtiTest = __decorateClass([
670
- customElement("qti-test")
671
- ], QtiTest);
672
-
673
- // src/lib/qti-test/core/qti-assessment-test/qti-assessment-item-ref.ts
674
- import { LitElement as LitElement2 } from "lit";
675
- import { property as property3 } from "lit/decorators.js";
676
- import { prepareTemplate } from "@heximal/templates";
677
- var stringToBooleanConverter = {
678
- fromAttribute(value) {
679
- return value === "true";
680
- },
681
- toAttribute(value) {
682
- return value ? "true" : "false";
683
- }
684
- };
685
- var QtiAssessmentItemRef = class extends LitElement2 {
686
- constructor() {
687
- super(...arguments);
688
- // @consume({ context: computedContext, subscribe: true })
689
- // private computedContext: ComputedContext;
690
- this.weigths = /* @__PURE__ */ new Map();
691
- }
692
- // the XMLDocument
693
- createRenderRoot() {
694
- return this;
695
- }
696
- get assessmentItem() {
697
- return this.renderRoot?.querySelector("qti-assessment-item");
698
- }
699
- async connectedCallback() {
700
- super.connectedCallback();
701
- const templateElement = this.getRootNode().host.closest("qti-test").querySelector("template[item-ref]");
702
- if (templateElement) this.myTemplate = prepareTemplate(templateElement);
703
- await this.updateComplete;
704
- this.dispatchEvent(
705
- new CustomEvent("qti-assessment-item-ref-connected", {
706
- bubbles: true,
707
- composed: true,
708
- detail: { identifier: this.identifier, href: this.href, category: this.category }
709
- })
710
- );
711
- }
712
- render() {
713
- return this.myTemplate ? this.myTemplate({ xmlDoc: this.xmlDoc }) : this.xmlDoc;
714
- }
715
- };
716
- __decorateClass([
717
- property3({ type: String })
718
- ], QtiAssessmentItemRef.prototype, "category", 2);
719
- __decorateClass([
720
- property3({ type: String })
721
- ], QtiAssessmentItemRef.prototype, "identifier", 2);
722
- __decorateClass([
723
- property3({ type: Boolean, converter: stringToBooleanConverter })
724
- ], QtiAssessmentItemRef.prototype, "required", 2);
725
- __decorateClass([
726
- property3({ type: Boolean, converter: stringToBooleanConverter })
727
- ], QtiAssessmentItemRef.prototype, "fixed", 2);
728
- __decorateClass([
729
- property3({ type: String })
730
- ], QtiAssessmentItemRef.prototype, "href", 2);
731
- __decorateClass([
732
- property3({ type: Object, attribute: false })
733
- ], QtiAssessmentItemRef.prototype, "xmlDoc", 2);
734
- if (!customElements.get("qti-assessment-item-ref")) {
735
- customElements.define("qti-assessment-item-ref", QtiAssessmentItemRef);
736
- }
737
-
738
- // src/lib/qti-test/core/qti-assessment-test/qti-assessment-section.ts
739
- import { consume } from "@lit/context";
740
- import { html as html2, LitElement as LitElement3 } from "lit";
741
- import { property as property4 } from "lit/decorators.js";
742
- var stringToBooleanConverter2 = {
743
- fromAttribute(value) {
744
- return value === "true";
745
- },
746
- toAttribute(value) {
747
- return value ? "true" : "false";
748
- }
749
- };
750
- var QtiAssessmentSection = class extends LitElement3 {
751
- constructor() {
752
- super(...arguments);
753
- this._title = "";
754
- }
755
- get title() {
756
- return this._title;
757
- }
758
- set title(value) {
759
- this._title = value;
760
- this.removeAttribute("title");
761
- this.setAttribute("data-title", value);
762
- }
763
- async connectedCallback() {
764
- this._title = this.getAttribute("title") || "";
765
- super.connectedCallback();
766
- await this.updateComplete;
767
- this.dispatchEvent(
768
- new Event("qti-assessment-section-connected", {
769
- bubbles: true,
770
- composed: true
771
- })
772
- );
773
- }
774
- render() {
775
- return html2`<slot name="qti-rubric-block"></slot><slot></slot>`;
776
- }
777
- };
778
- __decorateClass([
779
- property4({ type: String })
780
- ], QtiAssessmentSection.prototype, "identifier", 2);
781
- __decorateClass([
782
- property4({ type: String })
783
- ], QtiAssessmentSection.prototype, "required", 2);
784
- __decorateClass([
785
- property4({ type: Boolean, converter: stringToBooleanConverter2 })
786
- ], QtiAssessmentSection.prototype, "fixed", 2);
787
- __decorateClass([
788
- property4({ type: Boolean, converter: stringToBooleanConverter2 })
789
- ], QtiAssessmentSection.prototype, "visible", 2);
790
- __decorateClass([
791
- property4({ type: Boolean, converter: stringToBooleanConverter2, attribute: "keep-together" })
792
- ], QtiAssessmentSection.prototype, "keepTogether", 2);
793
- __decorateClass([
794
- consume({ context: testContext, subscribe: true })
795
- ], QtiAssessmentSection.prototype, "_testContext", 2);
796
- if (!customElements.get("qti-assessment-section")) {
797
- customElements.define("qti-assessment-section", QtiAssessmentSection);
798
- }
799
-
800
- // src/lib/qti-test/core/qti-assessment-test/qti-assessment-test.ts
801
- import { consume as consume2 } from "@lit/context";
802
- import { html as html3, LitElement as LitElement4 } from "lit";
803
- import { customElement as customElement2, property as property5 } from "lit/decorators.js";
804
- var QtiAssessmentTest = class extends LitElement4 {
805
- constructor() {
806
- super(...arguments);
807
- this._title = "";
808
- }
809
- get title() {
810
- return this._title;
811
- }
812
- set title(value) {
813
- this._title = value;
814
- this.removeAttribute("title");
815
- this.setAttribute("data-title", value);
816
- }
817
- async connectedCallback() {
818
- super.connectedCallback();
819
- await this.updateComplete;
820
- this.dispatchEvent(
821
- new CustomEvent("qti-assessment-test-connected", {
822
- detail: this,
823
- bubbles: true,
824
- composed: true
825
- })
826
- );
827
- }
828
- render() {
829
- return html3` <slot></slot>`;
830
- }
831
- };
832
- __decorateClass([
833
- property5({ type: String })
834
- ], QtiAssessmentTest.prototype, "identifier", 2);
835
- __decorateClass([
836
- property5({ type: String })
837
- ], QtiAssessmentTest.prototype, "title", 1);
838
- __decorateClass([
839
- consume2({ context: testContext, subscribe: true })
840
- ], QtiAssessmentTest.prototype, "_testContext", 2);
841
- QtiAssessmentTest = __decorateClass([
842
- customElement2("qti-assessment-test")
843
- ], QtiAssessmentTest);
844
-
845
- // src/lib/qti-test/core/qti-assessment-test/qti-test-part.ts
846
- import { html as html4, LitElement as LitElement5 } from "lit";
847
- import { customElement as customElement3, property as property6 } from "lit/decorators.js";
848
- var QtiTestPart = class extends LitElement5 {
849
- constructor() {
850
- super(...arguments);
851
- this.identifier = "";
852
- this.class = "";
853
- this.navigationMode = "nonlinear";
854
- this.submissionMode = "individual";
855
- this._title = "";
856
- }
857
- get title() {
858
- return this._title;
859
- }
860
- set title(value) {
861
- this._title = value;
862
- this.removeAttribute("title");
863
- this.setAttribute("data-title", value);
864
- }
865
- async connectedCallback() {
866
- super.connectedCallback();
867
- await this.updateComplete;
868
- this.dispatchEvent(
869
- new Event("qti-test-part-connected", {
870
- bubbles: true,
871
- composed: true
872
- })
873
- );
874
- }
875
- render() {
876
- return html4` <slot></slot>`;
877
- }
878
- };
879
- __decorateClass([
880
- property6({ type: String })
881
- ], QtiTestPart.prototype, "identifier", 2);
882
- __decorateClass([
883
- property6({ type: String })
884
- ], QtiTestPart.prototype, "class", 2);
885
- __decorateClass([
886
- property6({ type: String, attribute: "navigation-mode" })
887
- ], QtiTestPart.prototype, "navigationMode", 2);
888
- __decorateClass([
889
- property6({ type: String, attribute: "submission-mode" })
890
- ], QtiTestPart.prototype, "submissionMode", 2);
891
- QtiTestPart = __decorateClass([
892
- customElement3("qti-test-part")
893
- ], QtiTestPart);
894
- if (!customElements.get("qti-test-part")) {
895
- customElements.define("qti-test-part", QtiTestPart);
896
- }
897
-
898
- // src/lib/qti-test/core/qti-assessment-test/qti-test-feedback.ts
899
- import { customElement as customElement4 } from "lit/decorators.js";
900
- import { css, html as html5 } from "lit";
901
- var QtiTestFeedback = class extends QtiModalFeedback {
902
- render() {
903
- return html5``;
904
- }
905
- };
906
- QtiTestFeedback.styles = css`
907
- :host {
908
- color: gray;
909
- }
910
- `;
911
- QtiTestFeedback = __decorateClass([
912
- customElement4("qti-test-feedback")
913
- ], QtiTestFeedback);
914
-
915
- export {
916
- QtiTest,
917
- QtiAssessmentItemRef,
918
- QtiAssessmentSection,
919
- QtiAssessmentTest,
920
- QtiTestPart,
921
- QtiTestFeedback
922
- };
923
- //# sourceMappingURL=chunk-WPEFNKMC.js.map