@citolab/qti-components 7.0.6-beta.0 → 7.0.6-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/cdn/{chunk-QGKK4T2J.js → chunks/chunk-3V6LA7B3.js} +1 -1
  2. package/cdn/chunks/chunk-4UJBK6JO.js +1 -0
  3. package/cdn/chunks/chunk-4WXQYE2P.js +8 -0
  4. package/cdn/{chunk-L4TDHAKL.js → chunks/chunk-5BR5CJFH.js} +5 -5
  5. package/cdn/chunks/chunk-5GCSZ3CH.js +73 -0
  6. package/cdn/{chunk-BLKKKK6C.js → chunks/chunk-5P7CTN7Q.js} +1 -1
  7. package/cdn/{chunk-A536ZOJJ.js → chunks/chunk-6S4CDN3T.js} +1 -1
  8. package/cdn/chunks/chunk-7XYBFL7U.js +934 -0
  9. package/cdn/chunks/chunk-DZCKF45D.js +5 -0
  10. package/cdn/chunks/chunk-EHK76KRT.js +1 -0
  11. package/cdn/chunks/chunk-IAP2CEE7.js +1 -0
  12. package/cdn/chunks/chunk-IMJOPCFR.js +1 -0
  13. package/cdn/chunks/chunk-KWPDTFYH.js +1 -0
  14. package/cdn/{chunk-MFWSHIPH.js → chunks/chunk-L4CUWIE6.js} +1 -1
  15. package/cdn/{chunk-4DFVJE2A.js → chunks/chunk-LZZB4VGC.js} +1 -1
  16. package/cdn/{chunk-SQDSHH6N.js → chunks/chunk-MJMONWKB.js} +1 -1
  17. package/cdn/chunks/chunk-N5OHGRGG.js +8 -0
  18. package/cdn/chunks/chunk-NDHSIO2G.js +8 -0
  19. package/cdn/{chunk-ROXN2HIJ.js → chunks/chunk-PKT2SJQD.js} +1 -1
  20. package/cdn/chunks/chunk-QQCGUVEV.js +1 -0
  21. package/cdn/chunks/chunk-QV6I5NVQ.js +8 -0
  22. package/cdn/chunks/chunk-R33OODNX.js +1 -0
  23. package/cdn/chunks/chunk-RXKI3AO4.js +1 -0
  24. package/cdn/chunks/chunk-TQBDBMWL.js +5 -0
  25. package/cdn/chunks/chunk-X2KBNXRO.js +6 -0
  26. package/cdn/chunks/chunk-XUJ7TXHW.js +1 -0
  27. package/cdn/exports/expression-result.js +0 -0
  28. package/cdn/exports/interaction.interface.js +0 -0
  29. package/cdn/exports/interaction.js +1 -0
  30. package/cdn/exports/item.context.js +1 -0
  31. package/cdn/exports/qti-assessment-item.context.js +1 -0
  32. package/cdn/exports/qti-condition-expression.js +1 -0
  33. package/cdn/exports/qti-expression.js +1 -0
  34. package/cdn/exports/variables.js +0 -0
  35. package/cdn/index.global.js +7 -58
  36. package/cdn/index.js +1 -1
  37. package/cdn/qti-components/index.js +1 -1
  38. package/cdn/qti-item/core/index.js +1 -1
  39. package/cdn/qti-loader/index.js +1 -1
  40. package/cdn/qti-test/components/index.js +1 -1
  41. package/cdn/qti-test/components/styles.js +1 -1
  42. package/cdn/qti-test/components/test-component.abstract.js +1 -1
  43. package/cdn/qti-test/components/test-item-link.js +1 -1
  44. package/cdn/qti-test/components/test-next.js +1 -1
  45. package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
  46. package/cdn/qti-test/components/test-prev.js +1 -1
  47. package/cdn/qti-test/components/test-view.js +1 -1
  48. package/cdn/qti-test/core/index.js +1 -1
  49. package/cdn/qti-transformers/index.js +1 -1
  50. package/dist/{chunk-ANLIJZBL.js → chunks/chunk-3EU75IUF.js} +4 -4
  51. package/dist/chunks/chunk-3EU75IUF.js.map +1 -0
  52. package/dist/{chunk-CNQYM52B.js → chunks/chunk-4GNVYCBN.js} +65 -7
  53. package/dist/chunks/chunk-4GNVYCBN.js.map +1 -0
  54. package/dist/{chunk-UB5K44DB.js → chunks/chunk-4O5F7WV7.js} +1 -1
  55. package/dist/chunks/chunk-4O5F7WV7.js.map +1 -0
  56. package/dist/{chunk-OO6JSYLP.js → chunks/chunk-6JXR63MH.js} +4 -4
  57. package/dist/chunks/chunk-6JXR63MH.js.map +1 -0
  58. package/dist/{chunk-4FH7P7YI.js → chunks/chunk-7QMCKYDR.js} +4 -4
  59. package/dist/chunks/chunk-7QMCKYDR.js.map +1 -0
  60. package/dist/{chunk-3TFUBCJW.js → chunks/chunk-A24F75DB.js} +4 -4
  61. package/dist/chunks/chunk-A24F75DB.js.map +1 -0
  62. package/dist/chunks/chunk-BPHQLJWE.js +102 -0
  63. package/dist/chunks/chunk-BPHQLJWE.js.map +1 -0
  64. package/dist/chunks/chunk-D3RGDWKP.js +37 -0
  65. package/dist/chunks/chunk-D3RGDWKP.js.map +1 -0
  66. package/dist/chunks/chunk-DLUJN2FW.js +22 -0
  67. package/dist/chunks/chunk-DLUJN2FW.js.map +1 -0
  68. package/dist/{chunk-4YG2FPKK.js → chunks/chunk-ELDMXTUQ.js} +1 -1
  69. package/dist/chunks/chunk-ELDMXTUQ.js.map +1 -0
  70. package/dist/chunks/chunk-FV7HWK54.js +29 -0
  71. package/dist/chunks/chunk-FV7HWK54.js.map +1 -0
  72. package/dist/{chunk-6SG3NMKU.js → chunks/chunk-GSWZT6N2.js} +4 -4
  73. package/dist/chunks/chunk-GSWZT6N2.js.map +1 -0
  74. package/dist/chunks/chunk-H2JE6IVU.js +15 -0
  75. package/dist/{chunk-QYN5S4EM.js → chunks/chunk-HHVRU3AJ.js} +5 -5
  76. package/dist/chunks/chunk-HHVRU3AJ.js.map +1 -0
  77. package/dist/{chunk-2CHF3TMY.js → chunks/chunk-J2SHENRN.js} +1 -1
  78. package/dist/{chunk-UBZPSVSE.js → chunks/chunk-K6ATVWMP.js} +5131 -5341
  79. package/dist/chunks/chunk-K6ATVWMP.js.map +1 -0
  80. package/dist/chunks/chunk-KOEILLVS.js +8 -0
  81. package/dist/chunks/chunk-KOEILLVS.js.map +1 -0
  82. package/dist/{chunk-F7HTXGGH.js → chunks/chunk-KYAIMBP5.js} +3 -3
  83. package/dist/chunks/chunk-KYAIMBP5.js.map +1 -0
  84. package/dist/{chunk-F3NTI6TX.js → chunks/chunk-UFYWCLXF.js} +1 -1
  85. package/dist/chunks/chunk-UFYWCLXF.js.map +1 -0
  86. package/dist/chunks/chunk-UN2IFSGC.js +1 -0
  87. package/dist/{chunk-2OA7E3E7.js → chunks/chunk-XDMSEAYC.js} +1 -1
  88. package/dist/chunks/chunk-XDMSEAYC.js.map +1 -0
  89. package/dist/chunks/chunk-XSI6FXGD.js +19 -0
  90. package/dist/chunks/chunk-XSI6FXGD.js.map +1 -0
  91. package/dist/chunks/chunk-ZPNJ2HP5.js +71 -0
  92. package/dist/chunks/chunk-ZPNJ2HP5.js.map +1 -0
  93. package/dist/exports/expression-result.d.ts +19 -0
  94. package/dist/exports/expression-result.js +1 -0
  95. package/dist/exports/expression-result.js.map +1 -0
  96. package/dist/exports/interaction.d.ts +23 -0
  97. package/dist/exports/interaction.interface.d.ts +13 -0
  98. package/dist/exports/interaction.interface.js +1 -0
  99. package/dist/exports/interaction.interface.js.map +1 -0
  100. package/dist/exports/interaction.js +8 -0
  101. package/dist/exports/interaction.js.map +1 -0
  102. package/dist/exports/item.context.d.ts +12 -0
  103. package/dist/exports/item.context.js +8 -0
  104. package/dist/exports/item.context.js.map +1 -0
  105. package/dist/exports/qti-assessment-item.context.d.ts +10 -0
  106. package/dist/exports/qti-assessment-item.context.js +8 -0
  107. package/dist/exports/qti-assessment-item.context.js.map +1 -0
  108. package/dist/exports/qti-condition-expression.d.ts +13 -0
  109. package/dist/exports/qti-condition-expression.js +10 -0
  110. package/dist/exports/qti-condition-expression.js.map +1 -0
  111. package/dist/exports/qti-expression.d.ts +21 -0
  112. package/dist/exports/qti-expression.js +9 -0
  113. package/dist/exports/qti-expression.js.map +1 -0
  114. package/dist/exports/variables.d.ts +3 -0
  115. package/dist/exports/variables.js +1 -0
  116. package/dist/exports/variables.js.map +1 -0
  117. package/dist/index.d.ts +12 -3
  118. package/dist/index.js +35 -28
  119. package/dist/qti-components/index.d.ts +36 -9
  120. package/dist/qti-components/index.js +10 -16
  121. package/dist/qti-components-jsx.d.ts +328 -623
  122. package/dist/qti-item/core/index.js +5 -5
  123. package/dist/qti-loader/index.d.ts +7 -1
  124. package/dist/qti-loader/index.js +5 -23
  125. package/dist/qti-loader/index.js.map +1 -1
  126. package/dist/{qti-simple-choice-DxWcdKHi.d.ts → qti-response-declaration-DAeBp8HH.d.ts} +463 -613
  127. package/dist/qti-test/components/index.d.ts +8 -2
  128. package/dist/qti-test/components/index.js +12 -11
  129. package/dist/qti-test/components/styles.js +2 -2
  130. package/dist/qti-test/components/test-component.abstract.d.ts +8 -2
  131. package/dist/qti-test/components/test-component.abstract.js +5 -4
  132. package/dist/qti-test/components/test-item-link.d.ts +8 -2
  133. package/dist/qti-test/components/test-item-link.js +7 -6
  134. package/dist/qti-test/components/test-next.d.ts +8 -2
  135. package/dist/qti-test/components/test-next.js +7 -6
  136. package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +8 -2
  137. package/dist/qti-test/components/test-paging-buttons-stamp.js +6 -5
  138. package/dist/qti-test/components/test-prev.d.ts +8 -2
  139. package/dist/qti-test/components/test-prev.js +7 -6
  140. package/dist/qti-test/components/test-view.d.ts +8 -2
  141. package/dist/qti-test/components/test-view.js +6 -5
  142. package/dist/qti-test/core/index.d.ts +15 -4
  143. package/dist/qti-test/core/index.js +6 -6
  144. package/dist/qti-transformers/index.js +2 -2
  145. package/dist/{test.context-DbSTxKk_.d.ts → test.context-CaENAJNk.d.ts} +4 -2
  146. package/dist/variables-cO3DzqJy.d.ts +33 -0
  147. package/dist/vscode.html-custom-data.json +208 -275
  148. package/package.json +14 -20
  149. package/cdn/chunk-4I75QSIL.js +0 -8
  150. package/cdn/chunk-5WCOPF7O.js +0 -73
  151. package/cdn/chunk-DC2R556M.js +0 -5
  152. package/cdn/chunk-GALSGMIP.js +0 -5
  153. package/cdn/chunk-KYOTSBCX.js +0 -1
  154. package/cdn/chunk-T4A5AZCI.js +0 -939
  155. package/cdn/chunk-VI2WKTN4.js +0 -1
  156. package/cdn/qti-components/index.global.js +0 -226
  157. package/cdn/qti-item/core/index.global.js +0 -149
  158. package/cdn/qti-loader/index.global.js +0 -1
  159. package/cdn/qti-test/components/index.global.js +0 -207
  160. package/cdn/qti-test/components/styles.global.js +0 -44
  161. package/cdn/qti-test/components/test-component.abstract.global.js +0 -170
  162. package/cdn/qti-test/components/test-item-link.global.js +0 -170
  163. package/cdn/qti-test/components/test-next.global.js +0 -170
  164. package/cdn/qti-test/components/test-next.spec.css +0 -1
  165. package/cdn/qti-test/components/test-next.spec.global.js +0 -64
  166. package/cdn/qti-test/components/test-next.spec.js +0 -713
  167. package/cdn/qti-test/components/test-paging-buttons-stamp.global.js +0 -207
  168. package/cdn/qti-test/components/test-prev.global.js +0 -170
  169. package/cdn/qti-test/components/test-view.global.js +0 -170
  170. package/cdn/qti-test/core/index.global.js +0 -205
  171. package/cdn/qti-transformers/index.global.js +0 -1
  172. package/dist/chunk-2OA7E3E7.js.map +0 -1
  173. package/dist/chunk-3TFUBCJW.js.map +0 -1
  174. package/dist/chunk-44VE5POH.js +0 -55
  175. package/dist/chunk-4FH7P7YI.js.map +0 -1
  176. package/dist/chunk-4YG2FPKK.js.map +0 -1
  177. package/dist/chunk-6SG3NMKU.js.map +0 -1
  178. package/dist/chunk-ANLIJZBL.js.map +0 -1
  179. package/dist/chunk-CNQYM52B.js.map +0 -1
  180. package/dist/chunk-F3NTI6TX.js.map +0 -1
  181. package/dist/chunk-F7HTXGGH.js.map +0 -1
  182. package/dist/chunk-MAC76UNI.js +0 -1
  183. package/dist/chunk-OO6JSYLP.js.map +0 -1
  184. package/dist/chunk-QYN5S4EM.js.map +0 -1
  185. package/dist/chunk-UB5K44DB.js.map +0 -1
  186. package/dist/chunk-UBZPSVSE.js.map +0 -1
  187. package/dist/qti-test/components/test-next.spec.css +0 -2481
  188. package/dist/qti-test/components/test-next.spec.css.map +0 -1
  189. package/dist/qti-test/components/test-next.spec.d.ts +0 -13
  190. package/dist/qti-test/components/test-next.spec.js +0 -45904
  191. package/dist/qti-test/components/test-next.spec.js.map +0 -1
  192. /package/cdn/{chunk-22HAPLRD.js → chunks/chunk-3GO57DNP.js} +0 -0
  193. /package/cdn/{chunk-LVW3MHTI.js → chunks/chunk-5FCXUJAG.js} +0 -0
  194. /package/cdn/{chunk-IXSX4SJX.js → chunks/chunk-6MCYE7P5.js} +0 -0
  195. /package/cdn/{chunk-M6AATWPS.js → chunks/chunk-FRS2J3OS.js} +0 -0
  196. /package/dist/{chunk-44VE5POH.js.map → chunks/chunk-H2JE6IVU.js.map} +0 -0
  197. /package/dist/{chunk-2CHF3TMY.js.map → chunks/chunk-J2SHENRN.js.map} +0 -0
  198. /package/dist/{chunk-MAC76UNI.js.map → chunks/chunk-UN2IFSGC.js.map} +0 -0
package/cdn/index.js CHANGED
@@ -1 +1 @@
1
- import{a as Lo,b as Oo,c as Po,d as Qo,e as Ro,f as So}from"./chunk-DC2R556M.js";import{$,A,Aa as Bo,B,Ba as Co,C,Ca as Do,D,Da as Eo,E,Ea as Fo,F,Fa as Go,G,Ga as Ho,H,Ha as Io,I,Ia as Jo,J,Ja as Ko,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a as o,aa as oo,b as r,ba as ro,c as e,ca as eo,d as f,da as fo,e as m,ea as mo,f as p,fa as po,g as t,ga as to,h as x,ha as xo,i as a,ia as ao,j as b,ja as bo,k as c,ka as co,l as d,la as go,m as g,ma as ho,n as h,na as io,o as i,oa as jo,p as j,pa as ko,q as k,qa as lo,r as l,ra as no,s as n,sa as qo,t as q,ta as so,u as s,ua as uo,v as u,va as vo,w as v,wa as wo,x as w,xa as yo,y,ya as zo,z,za as Ao}from"./chunk-T4A5AZCI.js";import{a as Zo,b as _o}from"./chunk-GALSGMIP.js";import"./chunk-SQDSHH6N.js";import"./chunk-L4TDHAKL.js";import"./chunk-LVW3MHTI.js";import"./chunk-22HAPLRD.js";import{a as Xo}from"./chunk-4I75QSIL.js";import{a as Uo}from"./chunk-QGKK4T2J.js";import{a as Yo}from"./chunk-A536ZOJJ.js";import{a as Vo}from"./chunk-ROXN2HIJ.js";import{a as Wo}from"./chunk-BLKKKK6C.js";import"./chunk-MFWSHIPH.js";import{a as To}from"./chunk-KYOTSBCX.js";import{a as Mo,b as No}from"./chunk-IXSX4SJX.js";import"./chunk-M6AATWPS.js";import"./chunk-5WCOPF7O.js";import"./chunk-4DFVJE2A.js";import"./chunk-VI2WKTN4.js";export{m as ActiveElementMixin,k as Interaction,Zo as ItemContainer,K as QtiAnd,e as QtiAssessmentItem,Po as QtiAssessmentItemRef,Qo as QtiAssessmentSection,f as QtiAssessmentStimulusRef,Ro as QtiAssessmentTest,Do as QtiAssociableHotspot,go as QtiAssociateInteraction,M as QtiBaseValue,u as QtiChoiceInteraction,c as QtiCompanionMaterialsInfo,J as QtiConditionExpression,N as QtiContains,d as QtiContentBody,O as QtiCorrect,ho as QtiCustomInteraction,Co as QtiCustomOperator,io as QtiEndAttemptInteraction,Q as QtiEqual,P as QtiEqualRounded,I as QtiExpression,l as QtiExtendedTextInteraction,h as QtiFeedbackBlock,i as QtiFeedbackInline,Eo as QtiGap,Fo as QtiGapImg,jo as QtiGapMatchInteraction,Go as QtiGapText,ko as QtiGraphicAssociateInteraction,lo as QtiGraphicGapMatchInteraction,no as QtiGraphicOrderInteraction,R as QtiGt,S as QtiGte,Ho as QtiHotspotChoice,qo as QtiHotspotInteraction,Io as QtiHottext,q as QtiHottextInteraction,Jo as QtiInlineChoice,s as QtiInlineChoiceInteraction,T as QtiIsNull,_o as QtiItem,p as QtiItemBody,B as QtiLookupOutcomeValue,U as QtiLt,V as QtiLte,W as QtiMapResponse,X as QtiMapping,Y as QtiMatch,uo as QtiMatchInteraction,vo as QtiMediaInteraction,Z as QtiMember,j as QtiModalFeedback,_ as QtiMultiple,$ as QtiNot,oo as QtiOr,wo as QtiOrderInteraction,ro as QtiOrdered,a as QtiOutcomeDeclaration,w as QtiOutcomeProcessing,y as QtiOutcomeProcessingProcessor,co as QtiPortableCustomInteraction,yo as QtiPositionObjectInteraction,zo as QtiPositionObjectStage,eo as QtiPrintedVariable,fo as QtiProduct,t as QtiPrompt,C as QtiResponseCondition,b as QtiResponseDeclaration,F as QtiResponseElse,H as QtiResponseElseIf,G as QtiResponseIf,z as QtiResponseProcessing,g as QtiRubricBlock,A as QtiRule,Ao as QtiSelectPointInteraction,D as QtiSetOutcomeValue,E as QtiSetOutcomeValueRule,so as QtiSimpleAssociableChoice,Ko as QtiSimpleChoice,Bo as QtiSliderInteraction,to as QtiStringMatch,x as QtiStylesheet,mo as QtiSubtract,xo as QtiSum,ao as QtiSumExpression,Oo as QtiTest,So as QtiTestPart,n as QtiTextEntryInteraction,v as QtiUploadInteraction,bo as QtiVariable,To as TestComponent,Lo as TestContainer,Xo as TestItemLink,Uo as TestNext,Yo as TestPagingButtonsStamp,Vo as TestPrev,Wo as TestView,r as itemContext,o as itemContextVariables,L as qtiAndMixin,po as qtiSubtractMixin,Mo as testContext,No as testElement};
1
+ import{$ as eo,A as D,Aa as Eo,B as E,Ba as Fo,C as F,Ca as Go,D as G,Da as Ho,E as H,F as I,G as J,H as K,I as L,J as M,K as N,L as O,M as P,N as Q,O as R,P as S,Q as T,R as U,S as V,T as W,U as X,V as Y,W as Z,X as _,Y as $,Z as oo,_ as ro,a as o,aa as fo,b as m,ba as mo,c as p,ca as po,d as t,da as to,e as x,ea as xo,f as a,fa as ao,g as b,ga as bo,h as c,ha as co,i as d,ia as go,j as g,ja as ho,k as h,ka as io,l as i,la as jo,m as j,ma as ko,n as k,na as lo,o as l,oa as no,p as n,pa as qo,q,qa as so,r as s,ra as uo,s as u,sa as vo,t as v,ta as wo,u as w,ua as yo,v as y,va as zo,w as z,wa as Ao,x as A,xa as Bo,y as B,ya as Co,z as C,za as Do}from"./chunks/chunk-7XYBFL7U.js";import{a as Yo,b as Zo}from"./chunks/chunk-4UJBK6JO.js";import{a as Wo,b as Xo}from"./chunks/chunk-TQBDBMWL.js";import{a as Io,b as Lo,c as Mo,d as No,e as Oo,f as Po}from"./chunks/chunk-DZCKF45D.js";import"./chunks/chunk-MJMONWKB.js";import"./chunks/chunk-5BR5CJFH.js";import{a as r,b as e,c as f}from"./chunks/chunk-5FCXUJAG.js";import"./chunks/chunk-3GO57DNP.js";import{a as Uo}from"./chunks/chunk-4WXQYE2P.js";import{a as Ro}from"./chunks/chunk-3V6LA7B3.js";import{a as Vo}from"./chunks/chunk-6S4CDN3T.js";import{a as So}from"./chunks/chunk-PKT2SJQD.js";import{a as To}from"./chunks/chunk-5P7CTN7Q.js";import{a as Qo}from"./chunks/chunk-IMJOPCFR.js";import"./chunks/chunk-EHK76KRT.js";import{a as Jo,b as Ko}from"./chunks/chunk-6MCYE7P5.js";import"./chunks/chunk-XUJ7TXHW.js";import"./chunks/chunk-L4CUWIE6.js";import"./chunks/chunk-R33OODNX.js";import"./chunks/chunk-KWPDTFYH.js";import"./chunks/chunk-RXKI3AO4.js";import"./chunks/chunk-X2KBNXRO.js";import"./chunks/chunk-5GCSZ3CH.js";import"./chunks/chunk-LZZB4VGC.js";import"./chunks/chunk-QQCGUVEV.js";import"./chunks/chunk-FRS2J3OS.js";import"./chunks/chunk-IAP2CEE7.js";export{Wo as ItemContainer,oo as QtiAnd,o as QtiAssessmentItem,Mo as QtiAssessmentItemRef,No as QtiAssessmentSection,m as QtiAssessmentStimulusRef,Oo as QtiAssessmentTest,c as QtiAssociableHotspot,d as QtiAssociateInteraction,eo as QtiBaseValue,g as QtiChoiceInteraction,p as QtiCompanionMaterialsInfo,fo as QtiContains,Do as QtiContentBody,mo as QtiCorrect,h as QtiCustomInteraction,t as QtiCustomOperator,i as QtiEndAttemptInteraction,to as QtiEqual,po as QtiEqualRounded,j as QtiExtendedTextInteraction,x as QtiFeedbackBlock,a as QtiFeedbackInline,q as QtiGap,k as QtiGapImg,l as QtiGapMatchInteraction,n as QtiGapText,s as QtiGraphicAssociateInteraction,u as QtiGraphicGapMatchInteraction,v as QtiGraphicOrderInteraction,xo as QtiGt,ao as QtiGte,w as QtiHotspotChoice,y as QtiHotspotInteraction,A as QtiHottext,z as QtiHottextInteraction,C as QtiInlineChoice,B as QtiInlineChoiceInteraction,bo as QtiIsNull,Xo as QtiItem,P as QtiItemBody,V as QtiLookupOutcomeValue,co as QtiLt,go as QtiLte,ho as QtiMapResponse,io as QtiMapping,jo as QtiMatch,E as QtiMatchInteraction,F as QtiMediaInteraction,ko as QtiMember,b as QtiModalFeedback,lo as QtiMultiple,no as QtiNot,qo as QtiOr,G as QtiOrderInteraction,so as QtiOrdered,Go as QtiOutcomeDeclaration,Q as QtiOutcomeProcessing,R as QtiOutcomeProcessingProcessor,H as QtiPortableCustomInteraction,I as QtiPositionObjectInteraction,J as QtiPositionObjectStage,uo as QtiPrintedVariable,vo as QtiProduct,S as QtiPrompt,W as QtiResponseCondition,Ho as QtiResponseDeclaration,Z as QtiResponseElse,$ as QtiResponseElseIf,_ as QtiResponseIf,T as QtiResponseProcessing,Eo as QtiRubricBlock,U as QtiRule,K as QtiSelectPointInteraction,X as QtiSetOutcomeValue,Y as QtiSetOutcomeValueRule,D as QtiSimpleAssociableChoice,L as QtiSimpleChoice,M as QtiSliderInteraction,zo as QtiStringMatch,Fo as QtiStylesheet,wo as QtiSubtract,Ao as QtiSum,Bo as QtiSumExpression,Lo as QtiTest,Po as QtiTestPart,N as QtiTextEntryInteraction,O as QtiUploadInteraction,Co as QtiVariable,Qo as TestComponent,Io as TestContainer,Uo as TestItemLink,Ro as TestNext,Vo as TestPagingButtonsStamp,So as TestPrev,To as TestView,Zo as getItemByUri,Yo as getManifestInfo,ro as qtiAndMixin,yo as qtiSubtractMixin,r as qtiTransformItem,e as qtiTransformManifest,f as qtiTransformTest,Jo as testContext,Ko as testElement};
@@ -1 +1 @@
1
- import{$,A,Aa,B,Ba,C,Ca,D,Da,E,Ea,F,Fa,G,Ga,H,Ha,I,Ia,J,Ja,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunk-T4A5AZCI.js";import"../chunk-L4TDHAKL.js";import"../chunk-LVW3MHTI.js";import"../chunk-M6AATWPS.js";import"../chunk-5WCOPF7O.js";import"../chunk-4DFVJE2A.js";import"../chunk-VI2WKTN4.js";export{e as ActiveElementMixin,q as Interaction,K as QtiAnd,c as QtiAssessmentItem,d as QtiAssessmentStimulusRef,Ca as QtiAssociableHotspot,la as QtiAssociateInteraction,M as QtiBaseValue,v as QtiChoiceInteraction,k as QtiCompanionMaterialsInfo,J as QtiConditionExpression,N as QtiContains,l as QtiContentBody,O as QtiCorrect,ma as QtiCustomInteraction,Ba as QtiCustomOperator,na as QtiEndAttemptInteraction,Q as QtiEqual,P as QtiEqualRounded,I as QtiExpression,r as QtiExtendedTextInteraction,n as QtiFeedbackBlock,o as QtiFeedbackInline,Da as QtiGap,Ea as QtiGapImg,oa as QtiGapMatchInteraction,Fa as QtiGapText,pa as QtiGraphicAssociateInteraction,qa as QtiGraphicGapMatchInteraction,ra as QtiGraphicOrderInteraction,R as QtiGt,S as QtiGte,Ga as QtiHotspotChoice,sa as QtiHotspotInteraction,Ha as QtiHottext,t as QtiHottextInteraction,Ia as QtiInlineChoice,u as QtiInlineChoiceInteraction,T as QtiIsNull,f as QtiItemBody,B as QtiLookupOutcomeValue,U as QtiLt,V as QtiLte,W as QtiMapResponse,X as QtiMapping,Y as QtiMatch,ua as QtiMatchInteraction,va as QtiMediaInteraction,Z as QtiMember,p as QtiModalFeedback,_ as QtiMultiple,$ as QtiNot,aa as QtiOr,wa as QtiOrderInteraction,ba as QtiOrdered,i as QtiOutcomeDeclaration,x as QtiOutcomeProcessing,y as QtiOutcomeProcessingProcessor,ka as QtiPortableCustomInteraction,xa as QtiPositionObjectInteraction,ya as QtiPositionObjectStage,ca as QtiPrintedVariable,da as QtiProduct,g as QtiPrompt,C as QtiResponseCondition,j as QtiResponseDeclaration,F as QtiResponseElse,H as QtiResponseElseIf,G as QtiResponseIf,z as QtiResponseProcessing,m as QtiRubricBlock,A as QtiRule,za as QtiSelectPointInteraction,D as QtiSetOutcomeValue,E as QtiSetOutcomeValueRule,ta as QtiSimpleAssociableChoice,Ja as QtiSimpleChoice,Aa as QtiSliderInteraction,ga as QtiStringMatch,h as QtiStylesheet,ea as QtiSubtract,ha as QtiSum,ia as QtiSumExpression,s as QtiTextEntryInteraction,w as QtiUploadInteraction,ja as QtiVariable,b as itemContext,a as itemContextVariables,L as qtiAndMixin,fa as qtiSubtractMixin};
1
+ import{$,A,Aa,B,Ba,C,Ca,D,Da,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,g,ga,h,ha,i,ia,j,ja,k,ka,l,la,m,ma,n,na,o,oa,p,pa,q,qa,r,ra,s,sa,t,ta,u,ua,v,va,w,wa,x,xa,y,ya,z,za}from"../chunks/chunk-7XYBFL7U.js";import"../chunks/chunk-5BR5CJFH.js";import"../chunks/chunk-5FCXUJAG.js";import"../chunks/chunk-EHK76KRT.js";import"../chunks/chunk-XUJ7TXHW.js";import"../chunks/chunk-R33OODNX.js";import"../chunks/chunk-KWPDTFYH.js";import"../chunks/chunk-RXKI3AO4.js";import"../chunks/chunk-X2KBNXRO.js";import"../chunks/chunk-5GCSZ3CH.js";import"../chunks/chunk-LZZB4VGC.js";import"../chunks/chunk-QQCGUVEV.js";import"../chunks/chunk-FRS2J3OS.js";import"../chunks/chunk-IAP2CEE7.js";export{Z as QtiAnd,a as QtiAssessmentItem,b as QtiAssessmentStimulusRef,h as QtiAssociableHotspot,i as QtiAssociateInteraction,$ as QtiBaseValue,j as QtiChoiceInteraction,c as QtiCompanionMaterialsInfo,aa as QtiContains,za as QtiContentBody,ba as QtiCorrect,k as QtiCustomInteraction,d as QtiCustomOperator,l as QtiEndAttemptInteraction,da as QtiEqual,ca as QtiEqualRounded,m as QtiExtendedTextInteraction,e as QtiFeedbackBlock,f as QtiFeedbackInline,q as QtiGap,n as QtiGapImg,o as QtiGapMatchInteraction,p as QtiGapText,r as QtiGraphicAssociateInteraction,s as QtiGraphicGapMatchInteraction,t as QtiGraphicOrderInteraction,ea as QtiGt,fa as QtiGte,u as QtiHotspotChoice,v as QtiHotspotInteraction,x as QtiHottext,w as QtiHottextInteraction,z as QtiInlineChoice,y as QtiInlineChoiceInteraction,ga as QtiIsNull,M as QtiItemBody,S as QtiLookupOutcomeValue,ha as QtiLt,ia as QtiLte,ja as QtiMapResponse,ka as QtiMapping,la as QtiMatch,B as QtiMatchInteraction,C as QtiMediaInteraction,ma as QtiMember,g as QtiModalFeedback,na as QtiMultiple,oa as QtiNot,pa as QtiOr,D as QtiOrderInteraction,qa as QtiOrdered,Ca as QtiOutcomeDeclaration,N as QtiOutcomeProcessing,O as QtiOutcomeProcessingProcessor,E as QtiPortableCustomInteraction,F as QtiPositionObjectInteraction,G as QtiPositionObjectStage,ra as QtiPrintedVariable,sa as QtiProduct,P as QtiPrompt,T as QtiResponseCondition,Da as QtiResponseDeclaration,W as QtiResponseElse,Y as QtiResponseElseIf,X as QtiResponseIf,Q as QtiResponseProcessing,Aa as QtiRubricBlock,R as QtiRule,H as QtiSelectPointInteraction,U as QtiSetOutcomeValue,V as QtiSetOutcomeValueRule,A as QtiSimpleAssociableChoice,I as QtiSimpleChoice,J as QtiSliderInteraction,va as QtiStringMatch,Ba as QtiStylesheet,ta as QtiSubtract,wa as QtiSum,xa as QtiSumExpression,K as QtiTextEntryInteraction,L as QtiUploadInteraction,ya as QtiVariable,_ as qtiAndMixin,ua as qtiSubtractMixin};
@@ -1 +1 @@
1
- import{a,b}from"../../chunk-GALSGMIP.js";import"../../chunk-SQDSHH6N.js";import"../../chunk-L4TDHAKL.js";import"../../chunk-LVW3MHTI.js";import"../../chunk-5WCOPF7O.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{a as ItemContainer,b as QtiItem};
1
+ import{a,b}from"../../chunks/chunk-TQBDBMWL.js";import"../../chunks/chunk-MJMONWKB.js";import"../../chunks/chunk-5BR5CJFH.js";import"../../chunks/chunk-5FCXUJAG.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as ItemContainer,b as QtiItem};
@@ -1 +1 @@
1
- import{a as i,b as o,c as r}from"../chunk-LVW3MHTI.js";import"../chunk-VI2WKTN4.js";var h=async s=>{let t=s.substring(0,s.lastIndexOf("/")),e=await o().load(`${s}`).then(n=>n.assessmentTest()),m=await r().load(`${t}/${e.href}`).then(n=>n.htmlDoc()),f=await r().load(`${t}/${e.href}`).then(n=>n.items()),a=`${t}/${e.href}`,c=`${t}/${e.href.substring(0,e.href.lastIndexOf("/"))}`;return{testHTMLDoc:m,testURI:c,testURL:a,items:f,testIdentifier:e.identifier}},d=async s=>i().load(s).then(t=>t.htmlDoc().firstElementChild);export{d as getItemByUri,h as getManifestInfo};
1
+ import{a,b}from"../chunks/chunk-4UJBK6JO.js";import"../chunks/chunk-5FCXUJAG.js";import"../chunks/chunk-IAP2CEE7.js";export{b as getItemByUri,a as getManifestInfo};
@@ -1 +1 @@
1
- import"../../chunk-22HAPLRD.js";import{a as e}from"../../chunk-4I75QSIL.js";import{a as b}from"../../chunk-QGKK4T2J.js";import{a as f}from"../../chunk-A536ZOJJ.js";import{a as c}from"../../chunk-ROXN2HIJ.js";import{a as d}from"../../chunk-BLKKKK6C.js";import"../../chunk-MFWSHIPH.js";import{a}from"../../chunk-KYOTSBCX.js";import"../../chunk-IXSX4SJX.js";import"../../chunk-M6AATWPS.js";import"../../chunk-5WCOPF7O.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{a as TestComponent,e as TestItemLink,b as TestNext,f as TestPagingButtonsStamp,c as TestPrev,d as TestView};
1
+ import"../../chunks/chunk-3GO57DNP.js";import{a as e}from"../../chunks/chunk-4WXQYE2P.js";import{a as b}from"../../chunks/chunk-3V6LA7B3.js";import{a as f}from"../../chunks/chunk-6S4CDN3T.js";import{a as c}from"../../chunks/chunk-PKT2SJQD.js";import{a as d}from"../../chunks/chunk-5P7CTN7Q.js";import{a}from"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestComponent,e as TestItemLink,b as TestNext,f as TestPagingButtonsStamp,c as TestPrev,d as TestView};
@@ -1 +1 @@
1
- import{a,b,c,d}from"../../chunk-MFWSHIPH.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{b as btn,c as dis,a as form,d as ind};
1
+ import{a,b,c,d}from"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-IAP2CEE7.js";export{b as btn,c as dis,a as form,d as ind};
@@ -1 +1 @@
1
- import{a}from"../../chunk-KYOTSBCX.js";import"../../chunk-IXSX4SJX.js";import"../../chunk-M6AATWPS.js";import"../../chunk-5WCOPF7O.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{a as TestComponent};
1
+ import{a}from"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestComponent};
@@ -1 +1 @@
1
- import{a}from"../../chunk-4I75QSIL.js";import"../../chunk-MFWSHIPH.js";import"../../chunk-KYOTSBCX.js";import"../../chunk-IXSX4SJX.js";import"../../chunk-M6AATWPS.js";import"../../chunk-5WCOPF7O.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{a as TestItemLink};
1
+ import{a}from"../../chunks/chunk-4WXQYE2P.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestItemLink};
@@ -1 +1 @@
1
- import{a}from"../../chunk-QGKK4T2J.js";import"../../chunk-MFWSHIPH.js";import"../../chunk-KYOTSBCX.js";import"../../chunk-IXSX4SJX.js";import"../../chunk-M6AATWPS.js";import"../../chunk-5WCOPF7O.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{a as TestNext};
1
+ import{a}from"../../chunks/chunk-3V6LA7B3.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestNext};
@@ -1 +1 @@
1
- import{a}from"../../chunk-A536ZOJJ.js";import"../../chunk-KYOTSBCX.js";import"../../chunk-IXSX4SJX.js";import"../../chunk-M6AATWPS.js";import"../../chunk-5WCOPF7O.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{a as TestPagingButtonsStamp};
1
+ import{a}from"../../chunks/chunk-6S4CDN3T.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestPagingButtonsStamp};
@@ -1 +1 @@
1
- import{a}from"../../chunk-ROXN2HIJ.js";import"../../chunk-MFWSHIPH.js";import"../../chunk-KYOTSBCX.js";import"../../chunk-IXSX4SJX.js";import"../../chunk-M6AATWPS.js";import"../../chunk-5WCOPF7O.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{a as TestPrev};
1
+ import{a}from"../../chunks/chunk-PKT2SJQD.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-L4CUWIE6.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestPrev};
@@ -1 +1 @@
1
- import{a}from"../../chunk-BLKKKK6C.js";import"../../chunk-KYOTSBCX.js";import"../../chunk-IXSX4SJX.js";import"../../chunk-M6AATWPS.js";import"../../chunk-5WCOPF7O.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{a as TestView};
1
+ import{a}from"../../chunks/chunk-5P7CTN7Q.js";import"../../chunks/chunk-IMJOPCFR.js";import"../../chunks/chunk-EHK76KRT.js";import"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{a as TestView};
@@ -1 +1 @@
1
- import{a,b as d,c as e,d as f,e as g,f as h}from"../../chunk-DC2R556M.js";import"../../chunk-SQDSHH6N.js";import"../../chunk-L4TDHAKL.js";import"../../chunk-LVW3MHTI.js";import{a as b,b as c}from"../../chunk-IXSX4SJX.js";import"../../chunk-M6AATWPS.js";import"../../chunk-5WCOPF7O.js";import"../../chunk-4DFVJE2A.js";import"../../chunk-VI2WKTN4.js";export{e as QtiAssessmentItemRef,f as QtiAssessmentSection,g as QtiAssessmentTest,d as QtiTest,h as QtiTestPart,a as TestContainer,b as testContext,c as testElement};
1
+ import{a,b as d,c as e,d as f,e as g,f as h}from"../../chunks/chunk-DZCKF45D.js";import"../../chunks/chunk-MJMONWKB.js";import"../../chunks/chunk-5BR5CJFH.js";import"../../chunks/chunk-5FCXUJAG.js";import{a as b,b as c}from"../../chunks/chunk-6MCYE7P5.js";import"../../chunks/chunk-XUJ7TXHW.js";import"../../chunks/chunk-5GCSZ3CH.js";import"../../chunks/chunk-LZZB4VGC.js";import"../../chunks/chunk-FRS2J3OS.js";import"../../chunks/chunk-IAP2CEE7.js";export{e as QtiAssessmentItemRef,f as QtiAssessmentSection,g as QtiAssessmentTest,d as QtiTest,h as QtiTestPart,a as TestContainer,b as testContext,c as testElement};
@@ -1 +1 @@
1
- import{a,b,c}from"../chunk-LVW3MHTI.js";import"../chunk-VI2WKTN4.js";export{a as qtiTransformItem,b as qtiTransformManifest,c as qtiTransformTest};
1
+ import{a,b,c}from"../chunks/chunk-5FCXUJAG.js";import"../chunks/chunk-IAP2CEE7.js";export{a as qtiTransformItem,b as qtiTransformManifest,c as qtiTransformTest};
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  testContext,
3
3
  testElement
4
- } from "./chunk-F3NTI6TX.js";
4
+ } from "./chunk-UFYWCLXF.js";
5
5
  import {
6
6
  watch
7
- } from "./chunk-4YG2FPKK.js";
7
+ } from "./chunk-ELDMXTUQ.js";
8
8
  import {
9
9
  __decorateClass
10
- } from "./chunk-44VE5POH.js";
10
+ } from "./chunk-H2JE6IVU.js";
11
11
 
12
12
  // src/lib/qti-test/components/test-component.abstract.ts
13
13
  import { consume } from "@lit/context";
@@ -115,4 +115,4 @@ __decorateClass([
115
115
  export {
116
116
  TestComponent
117
117
  };
118
- //# sourceMappingURL=chunk-ANLIJZBL.js.map
118
+ //# sourceMappingURL=chunk-3EU75IUF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-component.abstract.ts","../../src/lib/decorators/prop-internal-state.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { LitElement } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { propInternalState } from '../../decorators';\nimport type { TestElement, TestContext } from '../core/context';\nimport { testContext, testElement } from '../core/context';\nimport { watch } from '../../decorators/watch';\n\nexport abstract class TestComponent 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 @state()\n @consume({ context: testContext, subscribe: true })\n protected _testContext?: TestContext;\n\n @state()\n @consume({ context: testElement, subscribe: true })\n protected _testElement?: TestElement;\n @watch('_testElement')\n _handleTestElementChange(_oldValue: TestElement, newValue: TestElement) {\n if (newValue.el) {\n this.disabled = false;\n }\n }\n\n protected _internals: ElementInternals;\n\n protected items;\n protected itemIndex;\n protected view;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n protected willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n if (changedProperties.has('_testContext')) {\n const { items = [], navItemId } = this._testContext ?? {};\n this.itemIndex = items.findIndex(item => item.identifier === navItemId);\n this.items = items;\n this.view = this._testContext?.view;\n }\n }\n\n protected _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 _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-test-item', {\n composed: true,\n bubbles: true,\n detail: identifier\n })\n );\n }\n}\n","import type { ReactiveElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { PropertyDeclaration } from 'lit';\n\n// Extended decorator options\ninterface InternalStateOptions extends PropertyDeclaration {\n aria?: string; // Corresponding ARIA attribute, e.g., 'aria-disabled'\n}\n\nexport function propInternalState(options: InternalStateOptions) {\n return (protoOrDescriptor: any, name: string) => {\n // Apply the default Lit `@property` decorator\n property(options)(protoOrDescriptor, name);\n\n // Intercept the property descriptor to enhance functionality\n const key = `__${name}`; // Internal backing field\n\n Object.defineProperty(protoOrDescriptor, name, {\n get() {\n return this[key];\n },\n set(value: any) {\n const oldValue = this[key];\n this[key] = value;\n\n // Trigger updates if value changes\n if (oldValue !== value) {\n // Update internals state\n if (this._internals?.states) {\n const stateName = name.toLowerCase();\n if (value) {\n this._internals.states.add(`--${stateName}`);\n } else {\n this._internals.states.delete(`--${stateName}`);\n }\n }\n\n // Update ARIA attributes if specified\n if (options.aria && this._internals) {\n const ariaAttribute = options.aria;\n if (value) {\n this._internals[ariaAttribute] = 'true';\n } else {\n this._internals[ariaAttribute] = null;\n }\n }\n\n // Request an update\n (this as ReactiveElement).requestUpdate(name, oldValue);\n }\n },\n configurable: true,\n enumerable: true\n });\n };\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B,SAAS,aAAa;;;ACDtB,SAAS,gBAAgB;AAQlB,SAAS,kBAAkB,SAA+B;AAC/D,SAAO,CAAC,mBAAwB,SAAiB;AAE/C,aAAS,OAAO,EAAE,mBAAmB,IAAI;AAGzC,UAAM,MAAM,KAAK,IAAI;AAErB,WAAO,eAAe,mBAAmB,MAAM;AAAA,MAC7C,MAAM;AACJ,eAAO,KAAK,GAAG;AAAA,MACjB;AAAA,MACA,IAAI,OAAY;AACd,cAAM,WAAW,KAAK,GAAG;AACzB,aAAK,GAAG,IAAI;AAGZ,YAAI,aAAa,OAAO;AAEtB,cAAI,KAAK,YAAY,QAAQ;AAC3B,kBAAM,YA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AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAvDS;AAAA,EALN,kBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA;AAAA,EACR,CAAC;AAAA,GALmB,cAMb;AAIG;AAAA,EAFT,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,aAAa,WAAW,KAAK,CAAC;AAAA,GAT9B,cAUV;AAIA;AAAA,EAFT,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,aAAa,WAAW,KAAK,CAAC;AAAA,GAb9B,cAcV;AAEV;AAAA,EADC,MAAM,cAAc;AAAA,GAfD,cAgBpB;","names":[]}
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  item_default
3
- } from "./chunk-2CHF3TMY.js";
3
+ } from "./chunk-J2SHENRN.js";
4
4
  import {
5
5
  qtiTransformItem,
6
6
  qtiTransformTest
7
- } from "./chunk-2OA7E3E7.js";
7
+ } from "./chunk-XDMSEAYC.js";
8
8
  import {
9
9
  testContext,
10
10
  testElement
11
- } from "./chunk-F3NTI6TX.js";
11
+ } from "./chunk-UFYWCLXF.js";
12
12
  import {
13
13
  watch
14
- } from "./chunk-4YG2FPKK.js";
14
+ } from "./chunk-ELDMXTUQ.js";
15
15
  import {
16
16
  __decorateClass
17
- } from "./chunk-44VE5POH.js";
17
+ } from "./chunk-H2JE6IVU.js";
18
18
 
19
19
  // src/lib/qti-test/core/components/test-container.ts
20
20
  import { LitElement, html } from "lit";
@@ -347,8 +347,66 @@ __decorateClass([
347
347
  provide({ context: testElement })
348
348
  ], TestBase.prototype, "testElement", 2);
349
349
 
350
+ // src/lib/qti-test/core/mixins/test-processing.mixin.ts
351
+ var TestProcessingMixin = (superClass) => {
352
+ class TestProcessingElement extends superClass {
353
+ constructor(...args) {
354
+ super(...args);
355
+ this.addEventListener("qti-register-variable", (e) => {
356
+ this._testContext = {
357
+ ...this._testContext,
358
+ testOutcomeVariables: [...this._testContext.testOutcomeVariables, e.detail.variable]
359
+ };
360
+ e.stopPropagation();
361
+ });
362
+ this.addEventListener(
363
+ "qti-set-outcome-value",
364
+ (e) => {
365
+ const { outcomeIdentifier, value } = e.detail;
366
+ this.updateOutcomeVariable(outcomeIdentifier, value);
367
+ e.stopPropagation();
368
+ }
369
+ );
370
+ }
371
+ outcomeProcessing() {
372
+ const outcomeProcessor = this.querySelector("qti-outcome-processing");
373
+ if (!outcomeProcessor) return false;
374
+ outcomeProcessor?.process();
375
+ return true;
376
+ }
377
+ /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
378
+ updateOutcomeVariable(identifier, value) {
379
+ const outcomeVariable = this.getOutcome(identifier);
380
+ if (!outcomeVariable) {
381
+ console.warn(`Can not set qti-outcome-identifier: ${identifier}, it is not available`);
382
+ return;
383
+ }
384
+ this._testContext = {
385
+ ...this._testContext,
386
+ testOutcomeVariables: this._testContext.testOutcomeVariables.map((v) => {
387
+ if (v.identifier !== identifier) {
388
+ return v;
389
+ }
390
+ return {
391
+ ...v,
392
+ value: outcomeVariable.cardinality === "single" ? value : [...v.value, value]
393
+ };
394
+ })
395
+ };
396
+ }
397
+ getOutcome(identifier) {
398
+ return this.getVariable(identifier);
399
+ }
400
+ getVariable(identifier) {
401
+ return this._testContext.testOutcomeVariables.find((v) => v.identifier === identifier) || null;
402
+ }
403
+ /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */
404
+ }
405
+ return TestProcessingElement;
406
+ };
407
+
350
408
  // src/lib/qti-test/core/qti-test.ts
351
- var QtiTest = class extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {
409
+ var QtiTest = class extends TestLoaderMixin(TestProcessingMixin(TestNavigationMixin(TestViewMixin(TestBase)))) {
352
410
  /**
353
411
  * Renders the component's template.
354
412
  * Provides a default `<slot>` for content projection.
@@ -566,4 +624,4 @@ export {
566
624
  QtiAssessmentTest,
567
625
  QtiTestPart
568
626
  };
569
- //# sourceMappingURL=chunk-CNQYM52B.js.map
627
+ //# sourceMappingURL=chunk-4GNVYCBN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/core/components/test-container.ts","../../src/lib/qti-test/core/qti-test.ts","../../src/lib/qti-test/core/mixins/test-loader.mixin.ts","../../src/lib/qti-test/core/mixins/test-navigation.mixin.ts","../../src/lib/qti-test/core/mixins/test-view.mixin.ts","../../src/lib/qti-test/core/test-base.ts","../../src/lib/qti-test/core/mixins/test-processing.mixin.ts","../../src/lib/qti-test/core/qti-assessment-test/qti-assessment-item-ref.ts","../../src/lib/qti-test/core/qti-assessment-test/qti-assessment-section.ts","../../src/lib/qti-test/core/qti-assessment-test/qti-assessment-test.ts","../../src/lib/qti-test/core/qti-assessment-test/qti-test-part.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\nimport { watch } from '../../../decorators/watch';\nimport itemCss from '../../../../item.css?inline';\nimport { qtiTransformTest } from '../../../qti-transformers';\n\n/**\n * `<test-container>` is a custom element designed for hosting the qti-assessment-item.\n * The `qti-assessment-test` will be placed inside the shadow DOM of this element.\n * The element loads the test from the provided URL and renders it inside the shadow DOM.\n *\n * ```html\n * <qti-test>\n * <test-container class=\"m-4 bg-white\" test-url=\"./path/to/assessmenttest.xml\"></test-container>\n * </qti-test>\n * ```\n */\n@customElement('test-container')\nexport class TestContainer extends LitElement {\n /** URL of the item to load */\n @property({ type: String, attribute: 'test-url' })\n testURL: string = null;\n\n /** A parsed HTML document */\n @state()\n testDoc: DocumentFragment = null;\n\n /** The raw XML string */\n @state()\n testXML: string = null;\n\n /** Template content if provided */\n private templateContent = null;\n\n @watch('testURL', { waitUntilFirstUpdate: true })\n protected async handleTestURLChange() {\n if (!this.testURL) return;\n try {\n const api = await qtiTransformTest().load(this.testURL);\n this.testDoc = api.htmlDoc();\n } catch (error) {\n console.error('Error loading or parsing XML:', error);\n }\n }\n\n @watch('testXML', { waitUntilFirstUpdate: true })\n protected handleTestXMLChange() {\n if (!this.testXML) return;\n try {\n this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();\n } catch (error) {\n console.error('Error parsing XML:', error);\n }\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n this.initializeTemplateContent();\n this.applyStyles();\n if (this.testURL) {\n this.handleTestURLChange();\n }\n if (this.testXML) {\n this.handleTestXMLChange();\n }\n }\n\n private initializeTemplateContent() {\n const template = this.querySelector('template') as HTMLTemplateElement;\n this.templateContent = template ? template.content : html``;\n }\n\n private applyStyles() {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(itemCss);\n this.shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n render() {\n return html`\n ${this.templateContent}\n <slot></slot>\n ${until(this.testDoc, html`<span>Loading...</span>`)}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-container': TestContainer;\n }\n}\n","import { html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { TestLoaderMixin, TestNavigationMixin, TestViewMixin } from './mixins';\nimport { TestBase } from './test-base';\nimport { TestProcessingMixin } from './mixins/test-processing.mixin';\n\n/**\n * `<qti-test>` is a custom element designed for rendering and interacting with QTI (Question and Test Interoperability) tests.\n *\n * This component leverages several mixins to provide functionality for loading, navigating, processing, and displaying QTI test assessments.\n *\n * ### Example Usage\n *\n * Minimal example including navigation:\n *\n * ```html\n * <qti-test>\n * <test-container test-url=\"./path/to/assessment.xml\"></test-container>\n * <nav class=\"flex\">\n * <test-prev></test-prev>\n * <test-next></test-next>\n * </nav>\n * </qti-test>\n * ```\n *\n * Use the following file structure\n * A qti-test loads a QTI3.0 assessmenttest.xml file from a package folder.\n *\n * ```plaintext\n * Root/\n * ├── index.html\n * └── /assets/api/examples/\n * ├── assessmenttest.xml\n * └── imsmanifest.xml\n *\n * ```\n *\n * ### Test components\n *\n * Use test components inside the qti-test component for added functionality.\n * ### Test next\n * `<test-next> | TestNext`\n *\n * ### Test prev\n *\n * `<test-prev> | TestPrev`\n * ### Test components\n *\n * You can use normal class names to style the elements.\n * And you can use the `test-prev` and `test-next` elements to navigate through the test.\n *\n */\n@customElement('qti-test')\nexport class QtiTest extends TestLoaderMixin(TestProcessingMixin(TestNavigationMixin(TestViewMixin(TestBase)))) {\n /**\n * Renders the component's template.\n * Provides a default `<slot>` for content projection.\n */\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-test': QtiTest;\n }\n}\n","import type { LitElement } from 'lit';\nimport { qtiTransformItem } from '../../../qti-transformers';\n\n// const setSessionData = <T>(key: string, value?: T): void => sessionStorage.setItem(key, JSON.stringify(value));\n// const getSessionData = <T>(key: string): T | null => (sessionStorage.getItem(key) ? JSON.parse(sessionStorage.getItem(key)!) : null);\n\ntype Constructor<T = {}> = abstract new (...args: any[]) => T;\n\ndeclare class TestLoaderInterface {}\nexport const TestLoaderMixin = <T extends Constructor<LitElement>>(superClass: T) => {\n abstract class TestLoaderClass extends superClass {\n // private testURL = '';\n\n constructor(...args: any[]) {\n super(...args);\n\n // this.addEventListener('qti-load-test-request', (e: CustomEvent /* 1. Request the test */) => {\n // const { testURL } = e.detail;\n // if (!testURL) {\n // console.warn(\n // 'No test found, there should be an attribute test-url with the path to the test on the test-container'\n // );\n // } else {\n // this.testURL = testURL;\n // }\n\n // e.detail.promise = (async () => {\n // e.preventDefault(); /* indicates that the event was catched and handled */\n // const api = await qtiTransformTest().load(`${this.testURL}`); /* 6. load the item */\n // return api.htmlDoc(); /* 3. Return html version of the assessment.xml */\n // })();\n // });\n\n this.addEventListener('qti-assessment-test-connected', () => {\n // this.context = getSessionData(`testcontext-${this.testURL}`); /* 4. Set the context */\n });\n\n this.addEventListener('qti-load-item-request' /* 5. Request the item */, ({ detail }: CustomEvent) => {\n // if (!this.testURL) return;\n detail.promise = (async () => {\n const api = await qtiTransformItem().load(\n `${detail.href}`,\n detail.cancelPreviousRequest\n ); /* 6. load the item */\n return api.htmlDoc(); /* 7. Return HTML version of the item.xml */\n })();\n });\n\n this.addEventListener('qti-interaction-changed', _e => {\n /* 8. Interaction changed */\n // const scoreOutcomeIdentifier = qtiAssessmentItem.variables.find(v => v.identifier === 'SCORE') as OutcomeVariable;\n // if (scoreOutcomeIdentifier.externalScored === null && qtiAssessmentItem.adaptive === 'false') {\n // qtiAssessmentItem.processResponse(); /* 9. Process the response */\n // }\n // setSessionData(`testcontext-${this.testURL}`, this.context); /* 10. Update the context */\n });\n\n this.addEventListener('qti-outcome-changed', () => {\n // setSessionData(`testcontext-${this.testURL}`, this.context); /* 10. Update the context */\n });\n }\n }\n\n return TestLoaderClass as Constructor<TestLoaderInterface> & T;\n};\n","import type { QtiAssessmentItemRef } from '../qti-assessment-test';\nimport type { TestBase } from '../test-base';\n\ndeclare module '../context/test.context' {\n interface TestContext {\n navPartId?: string | null;\n navSectionId?: string | null;\n navItemId?: string | null;\n navItemLoading?: boolean;\n navTestLoading?: boolean;\n }\n}\n\ntype Constructor<T = {}> = abstract new (...args: any[]) => T;\n\ndeclare class TestNavigationInterface {}\nexport const TestNavigationMixin = <T extends Constructor<TestBase>>(superClass: T) => {\n abstract class TestNavigationClass extends superClass {\n constructor(...args: any[]) {\n super(...args);\n\n // load an item\n this.addEventListener('qti-request-test-item', ({ detail: navItemId }: CustomEvent<string>) => {\n if (!navItemId) return;\n this._clearLoadedItems();\n\n const itemRefEl = this.testElement.el.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${navItemId}\"]`\n );\n\n const promise = this._loadItemRequest(itemRefEl.href, false);\n\n const navPartId = itemRefEl.closest('qti-test-part').identifier;\n const navSectionId = itemRefEl.closest('qti-assessment-section').identifier;\n this._testContext = { ...this._testContext, navPartId, navSectionId, navItemId, navItemLoading: true };\n\n if (promise) {\n promise\n .then(doc => {\n itemRefEl.xmlDoc = doc;\n requestAnimationFrame(() =>\n this.dispatchEvent(new CustomEvent('qti-item-connected', { bubbles: true, composed: true }))\n );\n this._testContext = { ...this._testContext, navItemLoading: false };\n })\n .catch(error => console.error('Failed to load item:', error));\n } else {\n console.info('Load item request was not handled:', itemRefEl.href);\n }\n });\n\n this.addEventListener('qti-assessment-test-connected', () => {\n let navItemId = this._testContext.navItemId;\n if (!navItemId) {\n const itemRefEl = this.testElement.el.querySelector<QtiAssessmentItemRef>('qti-assessment-item-ref');\n navItemId = itemRefEl.identifier;\n }\n this.dispatchEvent(\n new CustomEvent('qti-request-test-item', { detail: navItemId, bubbles: true, composed: true })\n );\n });\n }\n\n private _clearLoadedItems(): void {\n const itemRefEls = this.testElement.el.querySelectorAll(`qti-assessment-test qti-assessment-item-ref`);\n Array.from(itemRefEls).forEach((itemElement: QtiAssessmentItemRef) => {\n itemElement.xmlDoc = null;\n });\n }\n\n private _loadItemRequest(href: string, cancelPreviousRequest: boolean = true): Promise<DocumentFragment> {\n const event = new CustomEvent('qti-load-item-request', {\n bubbles: true,\n composed: true,\n detail: {\n href: href,\n promise: null,\n cancelPreviousRequest\n }\n });\n this.dispatchEvent(event);\n\n return event.detail.promise;\n }\n }\n\n return TestNavigationClass as Constructor<TestNavigationInterface> & T;\n};\n","import type { QtiAssessmentItem } from '../../../qti-components';\nimport type { TestBase } from '../test-base';\n\nexport type View = 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor' | '';\n\ndeclare module '../context/test.context' {\n interface TestContext {\n view?: View;\n }\n}\n\ntype Constructor<T = {}> = abstract new (...args: any[]) => T;\n\ndeclare class TestViewInterface {}\n\nexport const TestViewMixin = <T extends Constructor<TestBase>>(superClass: T) => {\n abstract class TestViewClass extends superClass {\n constructor(...args: any[]) {\n super(...args);\n this._testContext = { ...this._testContext, view: 'candidate' };\n\n this.addEventListener('on-test-switch-view', (e: CustomEvent<View>) => {\n this._testContext = { ...this._testContext, view: e.detail };\n this._updateElementView();\n });\n this.addEventListener('qti-assessment-test-connected', () => {\n this._updateElementView();\n });\n this.addEventListener('qti-assessment-item-connected', (e: CustomEvent) => {\n this._updateElementView();\n this._setCorrectResponseVisibility(e.detail);\n });\n }\n\n willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n super.willUpdate(changedProperties);\n if (changedProperties.has('_testContext')) {\n // if (previousContext && previousContext.view !== this._testContext.view) {\n this._updateElementView();\n // }\n }\n }\n\n // Method to handle view updates for elements based on the current context view\n private _updateElementView() {\n if (this.testElement && this.testElement.el) {\n const viewElements = Array.from(this.testElement.el.querySelectorAll('[view]'));\n\n viewElements.forEach((element: HTMLElement) => {\n element.classList.toggle('show', element.getAttribute('view') === this._testContext.view);\n });\n\n const assessmentItem = this.testElement.el.querySelector<QtiAssessmentItem>(\n `qti-assessment-item[identifier=\"${this._testContext.navItemId}\"]`\n );\n if (assessmentItem) {\n assessmentItem.showCorrectResponse(this._testContext.view === 'scorer');\n }\n }\n }\n\n // Event handler for connected QTI assessment items\n private _setCorrectResponseVisibility(assessmentItem: QtiAssessmentItem): void {\n assessmentItem.showCorrectResponse(this._testContext.view === 'scorer');\n }\n }\n\n return TestViewClass as Constructor<TestViewInterface> & T;\n};\n","import { provide } from '@lit/context';\nimport { LitElement } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport type { TestContext, TestElement } from './context';\nimport { testContext, testElement } from './context';\nimport type { QtiAssessmentTest } from './qti-assessment-test';\nimport type { QtiAssessmentItem } from '../../qti-components/';\nimport type { VariableValue } from '../../exports/variables';\nimport type { ItemContext } from '../../exports/item.context';\n\nexport abstract class TestBase extends LitElement {\n @state()\n @provide({ context: testContext })\n protected _testContext: Readonly<TestContext> = { items: [], testOutcomeVariables: [] };\n\n @state()\n @provide({ context: testElement })\n protected testElement: TestElement = { el: null };\n\n constructor() {\n super();\n\n this.addEventListener('qti-assessment-test-connected', (e: CustomEvent<QtiAssessmentTest>) => {\n const qtiAssessmentTest = e.detail;\n\n const items = Array.from(qtiAssessmentTest.querySelectorAll('qti-assessment-item-ref')).map(\n (itemRef): ItemContext & { category: string } => ({\n href: itemRef.href,\n identifier: itemRef.identifier,\n category: itemRef.category,\n variables: [{ identifier: 'completionStatus', value: 'not_attempted', type: 'outcome' }]\n })\n );\n this.testElement = { el: qtiAssessmentTest };\n this._testContext = { ...this._testContext, items };\n });\n this.addEventListener('qti-assessment-item-connected', (e: CustomEvent<QtiAssessmentItem>) => {\n this._updateItemInTestContext(e.detail);\n });\n this.addEventListener('qti-outcome-changed', e => {\n const assessmentitem = e.composedPath()[0] as QtiAssessmentItem;\n this._updateItemVariablesInTestContext(assessmentitem.identifier, assessmentitem.variables);\n });\n\n // this.addEventListener(\n // 'qti-assessment-item-ref-connected',\n // (e: CustomEvent<{ href: string; identifier: string; category: string }> & { target: QtiAssessmentItemRef }) => {\n // this._addItemToTestContext(e);\n // }\n // );\n }\n\n get context(): TestContext {\n return this._testContext;\n }\n\n // /* restores the context by updating existing items and adding new items from the \"contextToRestore\" parameter into the \"this._context.items\" array. */\n set context(testContext: TestContext) {\n if (testContext === null || testContext === undefined) return;\n this._testContext = { ...testContext }; // Clone the context to avoid modifying the original object\n // // append the items that are not yet in the context and replace the ones that are\n testContext.items?.forEach(itemContext => {\n const existingItemContext = this._testContext.items.find(i => i.identifier === itemContext.identifier);\n if (existingItemContext) {\n existingItemContext.variables = itemContext.variables;\n } else {\n this._testContext.items.push(itemContext);\n }\n });\n }\n\n private _updateItemVariablesInTestContext(\n identifier: string,\n variables: VariableValue<string | string[] | null>[]\n ): void {\n // Update the test context with modified variables for the specified item\n this._testContext = {\n ...this._testContext, // Spread existing test context properties\n items: this._testContext.items.map(itemContext => {\n // If the item identifier doesn't match, keep it unchanged\n if (itemContext.identifier !== identifier) {\n return itemContext;\n }\n\n // Update the matching item with new variables\n return {\n ...itemContext, // Keep other properties of the item context\n variables: variables.map(variable => {\n // Find a matching variable in the current item context\n const matchingVariable = itemContext.variables.find(v => v.identifier === variable.identifier);\n\n // Merge matching variable with the new one, or use the new variable if no match\n return matchingVariable ? { ...matchingVariable, ...variable } : variable;\n })\n };\n })\n };\n }\n\n /**\n * Updates the variables of an assessment item in the test context.\n * - Matches the assessment item with the corresponding test context item.\n * - If the item is not found, logs a warning.\n * - Updates variables in the test context if exactly one variable exists.\n * - Otherwise, syncs the assessment item's variables with the test context.\n *\n * @param assessmentItem - The assessment item to update.\n */\n private _updateItemInTestContext = (assessmentItem: QtiAssessmentItem): void => {\n const { identifier, variables } = assessmentItem;\n\n // console.log(this._testContext);\n\n // Find the corresponding item in the test context by identifier\n const itemContext = this._testContext.items.find(i => i?.identifier === identifier);\n\n if (!itemContext) {\n console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);\n return;\n }\n\n // Update variables in the test context or sync them to the assessment item\n if (itemContext.variables?.length === 1) {\n // The loaded qti-assessment-item itself has variables which are not in test context yet.\n this._updateItemVariablesInTestContext(identifier, variables);\n } else {\n // Sync the assessment item's variables with the test context\n assessmentItem.variables = [...(itemContext.variables || [])];\n }\n };\n\n // private _addItemToTestContext(\n // e: CustomEvent<{ href: string; identifier: string; category: string }> & { target: QtiAssessmentItemRef }\n // ): void {\n // const { href, identifier, category } = e.detail;\n\n // // Update test context items, adding a new item if the identifier is not already in the list\n // if (!this._testContext.items.some(item => item.identifier === identifier)) {\n // this._testContext.items.push({\n // href,\n // identifier,\n // category,\n // variables: [{ identifier: 'completionStatus', value: 'not_attempted', type: 'outcome' }]\n // // category: e.target.category\n // });\n // }\n // }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('qti-test', '');\n }\n}\n","import type { OutcomeVariable, VariableDeclaration, QtiOutcomeProcessing } from '../../../qti-components';\nimport type { TestBase } from '../test-base';\n\ntype Constructor<T = {}> = abstract new (...args: any[]) => T;\n\ndeclare class TestProcessingInterface {\n updateOutcomeVariable(identifier: string, value: string | string[] | undefined): void;\n getOutcome(identifier: string): Readonly<OutcomeVariable>;\n getVariable(identifier: string): Readonly<VariableDeclaration<string | string[] | null>>;\n outcomeProcessing(): boolean;\n}\nexport const TestProcessingMixin = <T extends Constructor<TestBase>>(superClass: T) => {\n abstract class TestProcessingElement extends superClass {\n constructor(...args: any[]) {\n super(...args);\n this.addEventListener('qti-register-variable', (e: CustomEvent<{ variable: any }>) => {\n this._testContext = {\n ...this._testContext,\n testOutcomeVariables: [...this._testContext.testOutcomeVariables, e.detail.variable]\n };\n e.stopPropagation();\n });\n // wordt aangeroepen vanuit de processingtemplate\n this.addEventListener(\n 'qti-set-outcome-value',\n (e: CustomEvent<{ outcomeIdentifier: string; value: string | string[] }>) => {\n const { outcomeIdentifier, value } = e.detail;\n this.updateOutcomeVariable(outcomeIdentifier, value);\n e.stopPropagation();\n }\n );\n }\n\n outcomeProcessing(): boolean {\n const outcomeProcessor = this.querySelector('qti-outcome-processing') as unknown as QtiOutcomeProcessing;\n if (!outcomeProcessor) return false;\n outcomeProcessor?.process();\n return true;\n }\n\n /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */\n\n public updateOutcomeVariable(identifier: string, value: string | string[] | undefined) {\n const outcomeVariable = this.getOutcome(identifier);\n if (!outcomeVariable) {\n console.warn(`Can not set qti-outcome-identifier: ${identifier}, it is not available`);\n return;\n }\n this._testContext = {\n ...this._testContext,\n testOutcomeVariables: this._testContext.testOutcomeVariables.map(v => {\n if (v.identifier !== identifier) {\n return v;\n }\n return {\n ...v,\n value: outcomeVariable.cardinality === 'single' ? value : [...v.value, value as string]\n };\n })\n };\n }\n\n public getOutcome(identifier: string): Readonly<OutcomeVariable> {\n return this.getVariable(identifier) as OutcomeVariable;\n }\n public getVariable(identifier: string): Readonly<VariableDeclaration<string | string[] | null>> {\n return this._testContext.testOutcomeVariables.find(v => v.identifier === identifier) || null;\n }\n /* --------------------------- ENABLED WHEN UNIT TESTING OUTCOME PROCESSING ------------------------------------ */\n }\n\n return TestProcessingElement as Constructor<TestProcessingInterface> & T;\n};\n","import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { TestContext } from '../context';\nimport { testContext } from '../context';\nimport type { QtiAssessmentItem } from '../../../qti-components';\n\n// Converter function to interpret \"true\" and \"false\" as booleans\nconst stringToBooleanConverter = {\n fromAttribute(value: string): boolean {\n return value === 'true';\n },\n toAttribute(value: boolean): string {\n return value ? 'true' : 'false';\n }\n};\n\n// @customElement('qti-assessment-item-ref')\nexport class QtiAssessmentItemRef extends LitElement {\n @property({ type: String }) category?: string;\n @property({ type: String }) identifier?: string;\n @property({ type: Boolean, converter: stringToBooleanConverter }) required?: boolean;\n @property({ type: Boolean, converter: stringToBooleanConverter }) fixed?: boolean;\n @property({ type: String }) href?: string;\n\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n weigths: Map<string, number> = new Map();\n\n @property({ type: Object, attribute: false })\n xmlDoc!: DocumentFragment; // the XMLDocument\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n get assessmentItem(): QtiAssessmentItem | null {\n return this.renderRoot?.querySelector('qti-assessment-item');\n }\n\n async connectedCallback(): Promise<void> {\n // debugger;\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new CustomEvent('qti-assessment-item-ref-connected', {\n bubbles: true,\n composed: true,\n detail: { identifier: this.identifier, href: this.href, category: this.category }\n })\n );\n }\n\n render() {\n return html`${this.xmlDoc}`;\n }\n}\n\nif (!customElements.get('qti-assessment-item-ref')) {\n customElements.define('qti-assessment-item-ref', QtiAssessmentItemRef);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-assessment-item-ref': QtiAssessmentItemRef;\n }\n}\n","import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { TestContext } from '../context';\nimport { testContext } from '../context';\n\n// https://www.imsglobal.org/sites/default/files/spec/qti/v3/info/index.html#Root_AssessmentSection\n\nconst stringToBooleanConverter = {\n fromAttribute(value: string): boolean {\n return value === 'true';\n },\n toAttribute(value: boolean): string {\n return value ? 'true' : 'false';\n }\n};\n\nexport class QtiAssessmentSection extends LitElement {\n @property({ type: String }) identifier: string;\n @property({ type: String }) required: string;\n @property({ type: Boolean, converter: stringToBooleanConverter }) fixed: boolean;\n @property({ type: String }) title: string;\n @property({ type: Boolean, converter: stringToBooleanConverter }) visible: boolean;\n @property({ type: Boolean, converter: stringToBooleanConverter, attribute: 'keep-together' }) keepTogether: boolean;\n\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new Event('qti-assessment-section-connected', {\n bubbles: true,\n composed: true\n })\n );\n }\n\n render() {\n return html`<slot name=\"qti-rubric-block\"></slot><slot></slot>`;\n }\n}\n\nif (!customElements.get('qti-assessment-section')) {\n customElements.define('qti-assessment-section', QtiAssessmentSection);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-assessment-section': QtiAssessmentSection;\n }\n}\n","import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport type { TestContext } from '../context';\nimport { testContext } from '../context';\n\n@customElement('qti-assessment-test')\nexport class QtiAssessmentTest extends LitElement {\n @property({ type: String }) identifier: string;\n @property({ type: String }) title: string;\n\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new CustomEvent('qti-assessment-test-connected', {\n detail: this,\n bubbles: true,\n composed: true\n })\n );\n }\n\n render() {\n return html` <slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-assessment-test': QtiAssessmentTest;\n }\n}\n","import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n@customElement('qti-test-part')\nexport class QtiTestPart extends LitElement {\n @property({ type: String }) identifier: string = '';\n @property({ type: String }) title: string = '';\n @property({ type: String }) class: string = '';\n\n @property({ type: String, attribute: 'navigation-mode' })\n NavigationMode: 'linear' | 'nonlinear' = 'nonlinear';\n\n @property({ type: String, attribute: 'submission-mode' })\n submissionMode: 'individual' | 'simultaneous' = 'individual';\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new Event('qti-test-part-connected', {\n bubbles: true,\n composed: true\n })\n );\n }\n\n render() {\n return html` <slot></slot>`;\n }\n}\n\nif (!customElements.get('qti-test-part')) {\n customElements.define('qti-test-part', QtiTestPart);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-test-part': QtiTestPart;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY,YAAY;AACjC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,aAAa;AAiBf,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC;AAAA;AAGL,mBAAkB;AAIlB,mBAA4B;AAI5B,mBAAkB;AAGlB;AAAA,SAAQ,kBAAkB;AAAA;AAAA,EAG1B,MAAgB,sBAAsB;AACpC,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,YAAM,MAAM,MAAM,iBAAiB,EAAE,KAAK,KAAK,OAAO;AACtD,WAAK,UAAU,IAAI,QAAQ;AAAA,IAC7B,SAAS,OAAO;AACd,cAAQ,MAAM,iCAAiC,KAAK;AAAA,IACtD;AAAA,EACF;AAAA,EAGU,sBAAsB;AAC9B,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,WAAK,UAAU,iBAAiB,EAAE,MAAM,KAAK,OAAO,EAAE,QAAQ;AAAA,IAChE,SAAS,OAAO;AACd,cAAQ,MAAM,sBAAsB,KAAK;AAAA,IAC3C;AAAA,EACF;AAAA,EAEA,MAAM,oBAAmC;AACvC,UAAM,kBAAkB;AACxB,SAAK,0BAA0B;AAC/B,SAAK,YAAY;AACjB,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3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AACA;AAAA,EAA3BA,UAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAHf,YAGiB;AAG5B;AAAA,EADCA,UAAS,EAAE,MAAM,QAAQ,WAAW,kBAAkB,CAAC;AAAA,GAL7C,YAMX;AAGA;AAAA,EADCA,UAAS,EAAE,MAAM,QAAQ,WAAW,kBAAkB,CAAC;AAAA,GAR7C,YASX;AATW,cAAN;AAAA,EADNC,eAAc,eAAe;AAAA,GACjB;AA2Bb,IAAI,CAAC,eAAe,IAAI,eAAe,GAAG;AACxC,iBAAe,OAAO,iBAAiB,WAAW;AACpD;","names":["html","customElement","LitElement","state","LitElement","testContext","state","html","customElement","html","LitElement","property","LitElement","html","property","consume","html","LitElement","property","stringToBooleanConverter","LitElement","html","property","consume","consume","html","LitElement","customElement","property","LitElement","html","property","consume","customElement","html","LitElement","customElement","property","LitElement","html","property","customElement"]}
@@ -27,4 +27,4 @@ export {
27
27
  dis,
28
28
  ind
29
29
  };
30
- //# sourceMappingURL=chunk-UB5K44DB.js.map
30
+ //# sourceMappingURL=chunk-4O5F7WV7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/styles.ts"],"sourcesContent":["// /* eslint-disable lit-plugin(no-invalid-css) */\nimport { css } from 'lit';\n\nexport const form = css`\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n padding: 0.5rem 1rem;\n border-radius: 0.25rem;\n user-select: none;\n`;\n\nexport const btn = css`\n background-color: lightgray;\n ${form};\n`;\n\nexport const dis = css`\n cursor: not-allowed;\n opacity: 0.5;\n`;\n\nexport const ind = css`\n ${form};\n border: 1px solid gray;\n`;\n"],"mappings":";AACA,SAAS,WAAW;AAEb,IAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASb,IAAM,MAAM;AAAA;AAAA,IAEf,IAAI;AAAA;AAGD,IAAM,MAAM;AAAA;AAAA;AAAA;AAKZ,IAAM,MAAM;AAAA,IACf,IAAI;AAAA;AAAA;","names":[]}
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  btn,
3
3
  dis
4
- } from "./chunk-UB5K44DB.js";
4
+ } from "./chunk-4O5F7WV7.js";
5
5
  import {
6
6
  TestComponent
7
- } from "./chunk-ANLIJZBL.js";
7
+ } from "./chunk-3EU75IUF.js";
8
8
  import {
9
9
  __decorateClass
10
- } from "./chunk-44VE5POH.js";
10
+ } from "./chunk-H2JE6IVU.js";
11
11
 
12
12
  // src/lib/qti-test/components/test-next.ts
13
13
  import { css, html } from "lit";
@@ -47,4 +47,4 @@ TestNext = __decorateClass([
47
47
  export {
48
48
  TestNext
49
49
  };
50
- //# sourceMappingURL=chunk-OO6JSYLP.js.map
50
+ //# sourceMappingURL=chunk-6JXR63MH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-next.ts"],"sourcesContent":["import { css, html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport * as styles from './styles';\nimport { TestComponent } from './test-component.abstract';\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 TestComponent {\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n constructor() {\n super();\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.items[this.itemIndex + 1].identifier);\n });\n }\n\n willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n super.willUpdate(changedProperties);\n if (changedProperties.has('_testContext')) {\n this.disabled = !this._testElement?.el || this.itemIndex < 0 || this.itemIndex >= this.items.length - 1;\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,YAAY;AAC1B,SAAS,qBAAqB;AAgBvB,IAAM,WAAN,cAAuB,cAAc;AAAA,EAU1C,cAAc;AACZ,UAAM;AACN,SAAK,WAAW,OAAO;AACvB,SAAK,WAAW,YAAY;AAE5B,SAAK,iBAAiB,SAAS,OAAK;AAClC,QAAE,eAAe;AACjB,UAAI,CAAC,KAAK,SAAU,MAAK,aAAa,KAAK,MAAM,KAAK,YAAY,CAAC,EAAE,UAAU;AAAA,IACjF,CAAC;AAAA,EACH;AAAA,EAEA,WAAW,mBAA2D;AACpE,UAAM,WAAW,iBAAiB;AAClC,QAAI,kBAAkB,IAAI,cAAc,GAAG;AACzC,WAAK,WAAW,CAAC,KAAK,cAAc,MAAM,KAAK,YAAY,KAAK,KAAK,aAAa,KAAK,MAAM,SAAS;AAAA,IACxG;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AA/Ba,SACJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AANL,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":[]}
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  btn,
3
3
  dis
4
- } from "./chunk-UB5K44DB.js";
4
+ } from "./chunk-4O5F7WV7.js";
5
5
  import {
6
6
  TestComponent
7
- } from "./chunk-ANLIJZBL.js";
7
+ } from "./chunk-3EU75IUF.js";
8
8
  import {
9
9
  __decorateClass
10
- } from "./chunk-44VE5POH.js";
10
+ } from "./chunk-H2JE6IVU.js";
11
11
 
12
12
  // src/lib/qti-test/components/test-item-link.ts
13
13
  import { css, html } from "lit";
@@ -40,4 +40,4 @@ TestItemLink = __decorateClass([
40
40
  export {
41
41
  TestItemLink
42
42
  };
43
- //# sourceMappingURL=chunk-4FH7P7YI.js.map
43
+ //# sourceMappingURL=chunk-7QMCKYDR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-item-link.ts"],"sourcesContent":["import { css, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { TestComponent } from './test-component.abstract';\nimport * as styles from './styles';\n\n@customElement('test-item-link')\nexport class TestItemLink extends TestComponent {\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n @property({ type: String, attribute: 'item-id' })\n private itemId: string = null;\n\n constructor() {\n super();\n this.addEventListener('click', () => this._requestItem(this.itemId));\n }\n\n render() {\n return html` <slot></slot> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-item-link': TestItemLink;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,KAAK,YAAY;AAC1B,SAAS,eAAe,gBAAgB;AAKjC,IAAM,eAAN,cAA2B,cAAc;AAAA,EAa9C,cAAc;AACZ,UAAM;AAHR,SAAQ,SAAiB;AAIvB,SAAK,iBAAiB,SAAS,MAAM,KAAK,aAAa,KAAK,MAAM,CAAC;AAAA,EACrE;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AArBa,aACJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AAKR;AAAA,EADP,SAAS,EAAE,MAAM,QAAQ,WAAW,UAAU,CAAC;AAAA,GAVrC,aAWH;AAXG,eAAN;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB;","names":[]}
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  TestComponent
3
- } from "./chunk-ANLIJZBL.js";
3
+ } from "./chunk-3EU75IUF.js";
4
4
  import {
5
5
  watch
6
- } from "./chunk-4YG2FPKK.js";
6
+ } from "./chunk-ELDMXTUQ.js";
7
7
  import {
8
8
  __decorateClass
9
- } from "./chunk-44VE5POH.js";
9
+ } from "./chunk-H2JE6IVU.js";
10
10
 
11
11
  // src/lib/qti-test/components/test-view.ts
12
12
  import { html } from "lit";
@@ -69,4 +69,4 @@ TestView = __decorateClass([
69
69
  export {
70
70
  TestView
71
71
  };
72
- //# sourceMappingURL=chunk-3TFUBCJW.js.map
72
+ //# sourceMappingURL=chunk-A24F75DB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/qti-test/components/test-view.ts"],"sourcesContent":["import { html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { TestComponent } from './test-component.abstract';\nimport { watch } from '../../decorators/watch';\n\n@customElement('test-view')\nexport class TestView extends TestComponent {\n static DEFAULT_VIEW_OPTIONS = ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor'];\n\n /** label accompanying the select view dropdown */\n @property({ type: String })\n label = 'view';\n\n /** The options to display in the dropdown, default: ['author', 'candidate', 'proctor', 'scorer', 'testConstructor', 'tutor'] */\n @property({ type: String, attribute: 'view-options' }) viewOptions;\n @watch('viewOptions', { waitUntilFirstUpdate: true })\n protected _handleViewOptionsChange = () => {\n this.updateViewOptions();\n };\n\n connectedCallback(): void {\n super.connectedCallback();\n this.updateViewOptions();\n }\n\n @state()\n private _viewOptions: string[] = TestView.DEFAULT_VIEW_OPTIONS;\n\n private updateViewOptions() {\n if (this.viewOptions) {\n const options = this.viewOptions.split(',').map(opt => opt.trim());\n this._viewOptions = options.filter(opt => TestView.DEFAULT_VIEW_OPTIONS.includes(opt));\n } else {\n this._viewOptions = TestView.DEFAULT_VIEW_OPTIONS;\n }\n }\n\n render() {\n return html`\n <label part=\"label\" for=\"viewSelect\">${this.label}</label>\n <select\n part=\"select\"\n id=\"viewSelect\"\n .disabled=${this.disabled}\n @change=${(e: Event) => {\n const el = e.target as HTMLSelectElement;\n this._switchView(el.value);\n }}\n >\n ${this._viewOptions.map(v => html`<option value=\"${v}\" ?selected=${v === this.view}>${v}</option>`)}\n </select>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-view': TestView;\n }\n}\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,eAAe,UAAU,a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@@
1
+ import {
2
+ itemContext
3
+ } from "./chunk-KOEILLVS.js";
4
+ import {
5
+ __decorateClass
6
+ } from "./chunk-H2JE6IVU.js";
7
+
8
+ // src/lib/exports/qti-expression.ts
9
+ import { consume } from "@lit/context";
10
+ import { css, html, LitElement } from "lit";
11
+ import { state } from "lit/decorators.js";
12
+ var QtiExpression = class extends LitElement {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.getVariables = () => (
16
+ // FIXME: if this itself is multiple, this will never enter the qti-multiple switch
17
+ // See this example here: https://github.com/1EdTech/qti-examples/blob/master/qtiv3-examples/packaging/items/Example05-feedbackBlock-adaptive.xml
18
+ Array.from(this.children).map((e) => {
19
+ switch (e.tagName.toLowerCase()) {
20
+ case "qti-base-value": {
21
+ return {
22
+ baseType: e.getAttribute("base-type"),
23
+ value: e.textContent.trim(),
24
+ cardinality: "single"
25
+ };
26
+ }
27
+ case "qti-variable": {
28
+ const identifier = e.getAttribute("identifier") || "";
29
+ const variable = this.context.variables.find((v) => v.identifier === identifier) || null;
30
+ return variable;
31
+ }
32
+ case "qti-multiple": {
33
+ const multiple = e;
34
+ const values = multiple.getResult();
35
+ if (values.length > 0) {
36
+ return {
37
+ identifier: "",
38
+ baseType: values[0].baseType,
39
+ value: values.map((v) => v.value),
40
+ cardinality: "multiple",
41
+ type: "response"
42
+ };
43
+ }
44
+ return null;
45
+ }
46
+ case "qti-correct": {
47
+ const identifier = e.getAttribute("identifier") || "";
48
+ const responseVariable = this.context.variables.find((v) => v.identifier === identifier) || null;
49
+ return {
50
+ baseType: responseVariable.baseType,
51
+ value: responseVariable.correctResponse,
52
+ cardinality: responseVariable.cardinality
53
+ };
54
+ }
55
+ default: {
56
+ try {
57
+ const expression = e;
58
+ const value = expression.getResult();
59
+ return {
60
+ baseType: "integer",
61
+ value: value.toString(),
62
+ cardinality: "single"
63
+ };
64
+ } catch (error) {
65
+ console.warn("default not sufficient");
66
+ }
67
+ return null;
68
+ }
69
+ }
70
+ }).filter((v) => v !== null)
71
+ );
72
+ }
73
+ render() {
74
+ return html`<pre>${JSON.stringify(this.result, null, 2)}</pre>
75
+ <slot></slot>`;
76
+ }
77
+ calculate() {
78
+ this.result = this.getResult();
79
+ return this.result;
80
+ }
81
+ getResult() {
82
+ throw new Error("Not implemented");
83
+ }
84
+ };
85
+ // hide the slot with css
86
+ QtiExpression.styles = css`
87
+ slot {
88
+ display: none;
89
+ }
90
+ `;
91
+ __decorateClass([
92
+ state()
93
+ ], QtiExpression.prototype, "result", 2);
94
+ __decorateClass([
95
+ consume({ context: itemContext, subscribe: true }),
96
+ state()
97
+ ], QtiExpression.prototype, "context", 2);
98
+
99
+ export {
100
+ QtiExpression
101
+ };
102
+ //# sourceMappingURL=chunk-BPHQLJWE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/exports/qti-expression.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { css, html, LitElement } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport type { ResponseVariable, VariableDeclaration } from './variables';\nimport { itemContext } from './qti-assessment-item.context';\nimport type { QtiMultiple } from '../qti-components/qti-response-processing/qti-expression/qti-multiple/qti-multiple';\nimport type { ItemContext } from './item.context';\n\nexport interface QtiExpressionBase<T> {\n // get assessmentItem(): QtiAssessmentItem;\n\n // getVariables(): VariableDeclaration<number | string | (number | string)[] | null>[];\n calculate(): Readonly<T>;\n}\n\nexport abstract class QtiExpression<T> extends LitElement implements QtiExpressionBase<T> {\n @state()\n protected result: any;\n\n // hide the slot with css\n static styles = css`\n slot {\n display: none;\n }\n `;\n\n override render() {\n return html`<pre>${JSON.stringify(this.result, null, 2)}</pre>\n <slot></slot>`;\n }\n\n public calculate(): Readonly<T> {\n this.result = this.getResult();\n return this.result;\n }\n\n protected getResult(): Readonly<T> {\n throw new Error('Not implemented');\n }\n\n @consume({ context: itemContext, subscribe: true })\n @state()\n protected context?: ItemContext;\n\n getVariables = (): VariableDeclaration<number | string | (number | string)[] | null>[] =>\n // FIXME: if this itself is multiple, this will never enter the qti-multiple switch\n // See this example here: https://github.com/1EdTech/qti-examples/blob/master/qtiv3-examples/packaging/items/Example05-feedbackBlock-adaptive.xml\n\n Array.from(this.children)\n .map((e: Element) => {\n switch (e.tagName.toLowerCase()) {\n case 'qti-base-value': {\n return {\n baseType: e.getAttribute('base-type'),\n value: e.textContent.trim(),\n cardinality: 'single'\n } as ResponseVariable;\n }\n case 'qti-variable': {\n const identifier = e.getAttribute('identifier') || '';\n const variable = this.context.variables.find(v => v.identifier === identifier) || null;\n return variable;\n }\n case 'qti-multiple': {\n const multiple = e as QtiMultiple;\n const values = multiple.getResult();\n if (values.length > 0) {\n return {\n identifier: '',\n baseType: values[0].baseType,\n value: values.map(v => v.value),\n cardinality: 'multiple',\n type: 'response'\n } as ResponseVariable;\n }\n return null;\n }\n case 'qti-correct': {\n const identifier = e.getAttribute('identifier') || '';\n const responseVariable: ResponseVariable =\n this.context.variables.find(v => v.identifier === identifier) || null;\n return {\n baseType: responseVariable.baseType,\n value: responseVariable.correctResponse,\n cardinality: responseVariable.cardinality\n } as ResponseVariable;\n }\n default: {\n // added for use of qti-equal-rounded\n try {\n const expression = e as QtiExpression<number>;\n const value = expression.getResult();\n return {\n baseType: 'integer',\n value: value.toString(),\n cardinality: 'single'\n } as ResponseVariable;\n } catch (error) {\n console.warn('default not sufficient');\n }\n return null;\n }\n }\n })\n .filter(v => v !== null);\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,aAAa;AAaf,IAAe,gBAAf,cAAwC,WAA2C;AAAA,EAAnF;AAAA;AA6BL,wBAAe;AAAA;AAAA;AAAA,MAIb,MAAM,KAAK,KAAK,QAAQ,EACrB,IAAI,CAAC,MAAe;AACnB,gBAAQ,EAAE,QAAQ,YAAY,GAAG;AAAA,UAC/B,KAAK,kBAAkB;AACrB,mBAAO;AAAA,cACL,UAAU,EAAE,aAAa,WAAW;AAAA,cACpC,OAA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