@citolab/qti-components 7.0.9 → 7.0.10
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.
- package/cdn/chunks/chunk-22SOGZF4.js +1 -0
- package/cdn/chunks/chunk-2TYVSDOR.js +10 -0
- package/cdn/chunks/chunk-2UE47PDO.js +8 -0
- package/cdn/chunks/chunk-3AZDOXQ2.js +1 -0
- package/cdn/chunks/chunk-3JYWJ2NK.js +7 -0
- package/cdn/chunks/chunk-46LUBNDT.js +1 -0
- package/cdn/chunks/chunk-4AQLM6EU.js +1 -0
- package/cdn/chunks/chunk-4F3SWHSX.js +3537 -0
- package/cdn/chunks/chunk-4JDR4LHD.js +7 -0
- package/cdn/chunks/chunk-4PRM73PT.js +3530 -0
- package/cdn/chunks/chunk-4PWQZQY3.js +17 -0
- package/cdn/chunks/chunk-5A43OJRS.js +24 -0
- package/cdn/chunks/chunk-5E2MIJGV.js +0 -0
- package/cdn/chunks/chunk-5ETOPNVH.js +1 -0
- package/cdn/chunks/chunk-5HNHSP7A.js +3530 -0
- package/cdn/chunks/chunk-5JUDXKGO.js +7 -0
- package/cdn/chunks/chunk-6A2O5DS7.js +1 -0
- package/cdn/chunks/chunk-6FKGN7HB.js +1 -0
- package/cdn/chunks/chunk-7AZEP5VB.js +8 -0
- package/cdn/chunks/chunk-7CQK5FSF.js +3530 -0
- package/cdn/chunks/chunk-APXB6KK5.js +8 -0
- package/cdn/chunks/chunk-AV37OE2S.js +1 -0
- package/cdn/chunks/chunk-AWIOWT4I.js +1 -0
- package/cdn/chunks/chunk-BB6R7AIH.js +8 -0
- package/cdn/chunks/chunk-CKOTA237.js +1 -0
- package/cdn/chunks/chunk-CZTZFTHC.js +8 -0
- package/cdn/chunks/chunk-D3JZV5XV.js +1 -0
- package/cdn/chunks/chunk-DI3XOGVR.js +951 -0
- package/cdn/chunks/chunk-DSZDMYQL.js +1 -0
- package/cdn/chunks/chunk-ELG6OUC7.js +1 -0
- package/cdn/chunks/chunk-EQNTO3QG.js +8 -0
- package/cdn/chunks/chunk-ESTNU24A.js +1 -0
- package/cdn/chunks/chunk-EUHRWJ5R.js +48 -0
- package/cdn/chunks/chunk-EVPWT7PO.js +1 -0
- package/cdn/chunks/chunk-EXAWEKDS.js +1 -0
- package/cdn/chunks/chunk-FCESHSJ3.js +73 -0
- package/cdn/chunks/chunk-G457CJP5.js +1 -0
- package/cdn/chunks/chunk-GIFBDBLN.js +8 -0
- package/cdn/chunks/chunk-GIYY5ZKS.js +939 -0
- package/cdn/chunks/chunk-GTFFARVB.js +8 -0
- package/cdn/chunks/chunk-GYPMDM7U.js +41 -0
- package/cdn/chunks/chunk-HG75NNFK.js +1 -0
- package/cdn/chunks/chunk-HV4JN3XB.js +1 -0
- package/cdn/chunks/chunk-HXPYDFGQ.js +8 -0
- package/cdn/chunks/chunk-IDGQY66Q.js +8 -0
- package/cdn/chunks/chunk-J5BEBS4Y.js +1 -0
- package/cdn/chunks/chunk-JLT3S3BD.js +1 -0
- package/cdn/chunks/chunk-K2TKSKEN.js +1 -0
- package/cdn/chunks/chunk-K4LCPCDE.js +1 -0
- package/cdn/chunks/chunk-KFA5RO3O.js +1 -0
- package/cdn/chunks/chunk-KFLS5ISA.js +1 -0
- package/cdn/chunks/chunk-KJEXS4DB.js +1 -0
- package/cdn/chunks/chunk-L33RHCU4.js +1 -0
- package/cdn/chunks/chunk-LPXDIJR2.js +1 -0
- package/cdn/chunks/chunk-LQ3DVN7N.js +1 -0
- package/cdn/chunks/chunk-LXNE62HZ.js +1 -0
- package/cdn/chunks/chunk-M2YG5XJI.js +8 -0
- package/cdn/chunks/chunk-M5OZ7YYR.js +3537 -0
- package/cdn/chunks/chunk-MCB43U5P.js +1 -0
- package/cdn/chunks/chunk-NFO577XB.js +939 -0
- package/cdn/chunks/chunk-NXTUDFAR.js +8 -0
- package/cdn/chunks/chunk-PAQSIIBJ.js +939 -0
- package/cdn/chunks/chunk-PAWTFMTX.js +8 -0
- package/cdn/chunks/chunk-PP4PDVVF.js +1 -0
- package/cdn/chunks/chunk-PZ7WEWHR.js +41 -0
- package/cdn/chunks/chunk-QEQPGKII.js +939 -0
- package/cdn/chunks/chunk-QICNOCJ6.js +1 -0
- package/cdn/chunks/chunk-QII27W7O.js +1 -0
- package/cdn/chunks/chunk-QYXRVCGM.js +6 -0
- package/cdn/chunks/chunk-REVF4YJC.js +8 -0
- package/cdn/chunks/chunk-S7SSPYIM.js +1 -0
- package/cdn/chunks/chunk-SCAVRW3H.js +1 -0
- package/cdn/chunks/chunk-TAJ4OCKW.js +3530 -0
- package/cdn/chunks/chunk-TH2YUX3A.js +17 -0
- package/cdn/chunks/chunk-TV7GYNJO.js +1 -0
- package/cdn/chunks/chunk-UXPSLBXO.js +1 -0
- package/cdn/chunks/chunk-VCH5D4D5.js +1 -0
- package/cdn/chunks/chunk-VE4IM4WS.js +8 -0
- package/cdn/chunks/chunk-VQPS5EII.js +939 -0
- package/cdn/chunks/chunk-WIDUHBF5.js +8 -0
- package/cdn/chunks/chunk-WTMZDTN4.js +1 -0
- package/cdn/chunks/chunk-X6XFTJQH.js +8 -0
- package/cdn/chunks/chunk-XEXDWGVU.js +939 -0
- package/cdn/chunks/chunk-XHBOTQFL.js +1 -0
- package/cdn/chunks/chunk-Y3GKQGXZ.js +8 -0
- package/cdn/chunks/chunk-YM6G2V57.js +8 -0
- package/cdn/chunks/chunk-YWZPZLWC.js +1 -0
- package/cdn/chunks/chunk-YYGAT2GT.js +1 -0
- package/cdn/chunks/chunk-Z7NL2OYT.js +1 -0
- package/cdn/chunks/chunk-ZCSHWAC6.js +1 -0
- package/cdn/chunks/chunk-ZILMGYR5.js +1 -0
- package/cdn/chunks/chunk-ZJMQOR5E.js +0 -0
- package/cdn/chunks/chunk-ZXVHR32G.js +1 -0
- package/cdn/exports/config.context.js +1 -1
- package/cdn/exports/interaction.js +1 -1
- package/cdn/index.global.js +1 -1
- package/cdn/index.js +1 -1
- package/cdn/qti-components/index.js +1 -1
- package/cdn/qti-item/core/index.js +1 -1
- package/cdn/qti-test/components/index.js +1 -1
- package/cdn/qti-test/components/test-container.js +1 -1
- package/cdn/qti-test/components/test-end-attempt.js +1 -1
- package/cdn/qti-test/components/test-item-link.js +1 -1
- package/cdn/qti-test/components/test-navigation.js +1 -1
- package/cdn/qti-test/components/test-next.js +1 -1
- package/cdn/qti-test/components/test-paging-buttons-stamp copy.js +1 -0
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
- package/cdn/qti-test/components/test-paging-buttons-stamp.stories copy.css +1 -0
- package/cdn/qti-test/components/test-paging-buttons-stamp.stories copy.js +264 -0
- package/cdn/qti-test/components/test-prev.js +1 -1
- package/cdn/qti-test/components/test-print-item-variables.js +1 -0
- package/cdn/qti-test/components/test-section-buttons-stamp.js +1 -0
- package/cdn/qti-test/components/test-section-link.js +1 -0
- package/cdn/qti-test/components/test-show-correct-response.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/dist/chunks/chunk-25BRPHJE.js +630 -0
- package/dist/chunks/chunk-25BRPHJE.js.map +1 -0
- package/dist/chunks/chunk-25ZCG5KD.js +6432 -0
- package/dist/chunks/chunk-25ZCG5KD.js.map +1 -0
- package/dist/chunks/chunk-2Q7RXYGX.js +213 -0
- package/dist/chunks/chunk-2Q7RXYGX.js.map +1 -0
- package/dist/chunks/chunk-2VA7CRTS.js +30 -0
- package/dist/chunks/chunk-2VA7CRTS.js.map +1 -0
- package/dist/chunks/chunk-36RGXVXQ.js +3634 -0
- package/dist/chunks/chunk-36RGXVXQ.js.map +1 -0
- package/dist/chunks/chunk-3F566AXX.js +210 -0
- package/dist/chunks/chunk-3F566AXX.js.map +1 -0
- package/dist/chunks/chunk-4475MTP7.js +630 -0
- package/dist/chunks/chunk-4475MTP7.js.map +1 -0
- package/dist/chunks/chunk-4GJ5LAU5.js +631 -0
- package/dist/chunks/chunk-4GJ5LAU5.js.map +1 -0
- package/dist/chunks/chunk-4HI4Q5TO.js +3641 -0
- package/dist/chunks/chunk-4HI4Q5TO.js.map +1 -0
- package/dist/chunks/chunk-4L5S7AON.js +621 -0
- package/dist/chunks/chunk-4L5S7AON.js.map +1 -0
- package/dist/chunks/chunk-52EWQN42.js +634 -0
- package/dist/chunks/chunk-52EWQN42.js.map +1 -0
- package/dist/chunks/chunk-5BSOZZMV.js +621 -0
- package/dist/chunks/chunk-5BSOZZMV.js.map +1 -0
- package/dist/chunks/chunk-5DFTIWBN.js +95 -0
- package/dist/chunks/chunk-5DFTIWBN.js.map +1 -0
- package/dist/chunks/chunk-5DZX4TPP.js +45 -0
- package/dist/chunks/chunk-5DZX4TPP.js.map +1 -0
- package/dist/chunks/chunk-5FQYXHVK.js +213 -0
- package/dist/chunks/chunk-5FQYXHVK.js.map +1 -0
- package/dist/chunks/chunk-5JJ7ELEU.js +39 -0
- package/dist/chunks/chunk-5JJ7ELEU.js.map +1 -0
- package/dist/chunks/chunk-5OMC3DTZ.js +3628 -0
- package/dist/chunks/chunk-5OMC3DTZ.js.map +1 -0
- package/dist/chunks/chunk-63WMM765.js +30 -0
- package/dist/chunks/chunk-63WMM765.js.map +1 -0
- package/dist/chunks/chunk-7ABTMTDB.js +86 -0
- package/dist/chunks/chunk-7ABTMTDB.js.map +1 -0
- package/dist/chunks/chunk-7K6TWSAK.js +626 -0
- package/dist/chunks/chunk-7K6TWSAK.js.map +1 -0
- package/dist/chunks/chunk-7QZ4E5WZ.js +210 -0
- package/dist/chunks/chunk-7QZ4E5WZ.js.map +1 -0
- package/dist/chunks/chunk-7RB2AUJE.js +622 -0
- package/dist/chunks/chunk-7RB2AUJE.js.map +1 -0
- package/dist/chunks/chunk-7WZH7TKG.js +210 -0
- package/dist/chunks/chunk-7WZH7TKG.js.map +1 -0
- package/dist/chunks/chunk-7YREO7KD.js +214 -0
- package/dist/chunks/chunk-7YREO7KD.js.map +1 -0
- package/dist/chunks/chunk-AI3BVEE3.js +102 -0
- package/dist/chunks/chunk-AI3BVEE3.js.map +1 -0
- package/dist/chunks/chunk-AZOWZY7V.js +95 -0
- package/dist/chunks/chunk-AZOWZY7V.js.map +1 -0
- package/dist/chunks/chunk-AZZW7WYD.js +3634 -0
- package/dist/chunks/chunk-AZZW7WYD.js.map +1 -0
- package/dist/chunks/chunk-B4YBRGOO.js +72 -0
- package/dist/chunks/chunk-B4YBRGOO.js.map +1 -0
- package/dist/chunks/chunk-BBFU7KGH.js +6432 -0
- package/dist/chunks/chunk-BBFU7KGH.js.map +1 -0
- package/dist/chunks/chunk-BCX6AQCQ.js +210 -0
- package/dist/chunks/chunk-BCX6AQCQ.js.map +1 -0
- package/dist/chunks/chunk-BJHVTP5W.js +95 -0
- package/dist/chunks/chunk-BJHVTP5W.js.map +1 -0
- package/dist/chunks/chunk-BOMM6A7V.js +19 -0
- package/dist/chunks/chunk-BOMM6A7V.js.map +1 -0
- package/dist/chunks/chunk-C5Q3SNXK.js +623 -0
- package/dist/chunks/chunk-C5Q3SNXK.js.map +1 -0
- package/dist/chunks/chunk-CONPNDHF.js +6416 -0
- package/dist/chunks/chunk-CONPNDHF.js.map +1 -0
- package/dist/chunks/chunk-CP63JV6J.js +56 -0
- package/dist/chunks/chunk-CP63JV6J.js.map +1 -0
- package/dist/chunks/chunk-DRATSVXW.js +99 -0
- package/dist/chunks/chunk-DRATSVXW.js.map +1 -0
- package/dist/chunks/chunk-E7UCMQNT.js +98 -0
- package/dist/chunks/chunk-E7UCMQNT.js.map +1 -0
- package/dist/chunks/chunk-ECTTGUKY.js +72 -0
- package/dist/chunks/chunk-ECTTGUKY.js.map +1 -0
- package/dist/chunks/chunk-F3JNWOBS.js +630 -0
- package/dist/chunks/chunk-F3JNWOBS.js.map +1 -0
- package/dist/chunks/chunk-FKOHVQD5.js +565 -0
- package/dist/chunks/chunk-FKOHVQD5.js.map +1 -0
- package/dist/chunks/chunk-FKYQ474Y.js +634 -0
- package/dist/chunks/chunk-FKYQ474Y.js.map +1 -0
- package/dist/chunks/chunk-FRNEKC5E.js +211 -0
- package/dist/chunks/chunk-FRNEKC5E.js.map +1 -0
- package/dist/chunks/chunk-GM2VH33L.js +214 -0
- package/dist/chunks/chunk-GM2VH33L.js.map +1 -0
- package/dist/chunks/chunk-HRCCW6MA.js +8 -0
- package/dist/chunks/chunk-HRCCW6MA.js.map +1 -0
- package/dist/chunks/chunk-ILL4KEGU.js +616 -0
- package/dist/chunks/chunk-ILL4KEGU.js.map +1 -0
- package/dist/chunks/chunk-IPWVQUFB.js +641 -0
- package/dist/chunks/chunk-IPWVQUFB.js.map +1 -0
- package/dist/chunks/chunk-IQVU7D3B.js +1 -0
- package/dist/chunks/chunk-IQVU7D3B.js.map +1 -0
- package/dist/chunks/chunk-JCEYFPPV.js +100 -0
- package/dist/chunks/chunk-JCEYFPPV.js.map +1 -0
- package/dist/chunks/chunk-JMIFSDZ7.js +52 -0
- package/dist/chunks/chunk-JMIFSDZ7.js.map +1 -0
- package/dist/chunks/chunk-JPATXTKN.js +629 -0
- package/dist/chunks/chunk-JPATXTKN.js.map +1 -0
- package/dist/chunks/chunk-KB5LRYDB.js +1 -0
- package/dist/chunks/chunk-KB5LRYDB.js.map +1 -0
- package/dist/chunks/chunk-KEF7X2OE.js +3621 -0
- package/dist/chunks/chunk-KEF7X2OE.js.map +1 -0
- package/dist/chunks/chunk-L5B7J2ZT.js +43 -0
- package/dist/chunks/chunk-L5B7J2ZT.js.map +1 -0
- package/dist/chunks/chunk-LU3O7U7W.js +45 -0
- package/dist/chunks/chunk-LU3O7U7W.js.map +1 -0
- package/dist/chunks/chunk-M3ONQ3OO.js +45 -0
- package/dist/chunks/chunk-M3ONQ3OO.js.map +1 -0
- package/dist/chunks/chunk-MBF6HEKO.js +39 -0
- package/dist/chunks/chunk-MBF6HEKO.js.map +1 -0
- package/dist/chunks/chunk-NW6WMWBC.js +94 -0
- package/dist/chunks/chunk-NW6WMWBC.js.map +1 -0
- package/dist/chunks/chunk-NXSALC5S.js +633 -0
- package/dist/chunks/chunk-NXSALC5S.js.map +1 -0
- package/dist/chunks/chunk-OTLH5OUZ.js +44 -0
- package/dist/chunks/chunk-OTLH5OUZ.js.map +1 -0
- package/dist/chunks/chunk-P7CW3RY4.js +6538 -0
- package/dist/chunks/chunk-P7CW3RY4.js.map +1 -0
- package/dist/chunks/chunk-PWOPGMKY.js +210 -0
- package/dist/chunks/chunk-PWOPGMKY.js.map +1 -0
- package/dist/chunks/chunk-QC5NBP3D.js +44 -0
- package/dist/chunks/chunk-QC5NBP3D.js.map +1 -0
- package/dist/chunks/chunk-QHWSY3K6.js +30 -0
- package/dist/chunks/chunk-QHWSY3K6.js.map +1 -0
- package/dist/chunks/chunk-QL3I5UMG.js +43 -0
- package/dist/chunks/chunk-QL3I5UMG.js.map +1 -0
- package/dist/chunks/chunk-QV4U5W67.js +43 -0
- package/dist/chunks/chunk-QV4U5W67.js.map +1 -0
- package/dist/chunks/chunk-R7HYOALH.js +213 -0
- package/dist/chunks/chunk-R7HYOALH.js.map +1 -0
- package/dist/chunks/chunk-SC5PDBVU.js +629 -0
- package/dist/chunks/chunk-SC5PDBVU.js.map +1 -0
- package/dist/chunks/chunk-SFRILOXM.js +624 -0
- package/dist/chunks/chunk-SFRILOXM.js.map +1 -0
- package/dist/chunks/chunk-ST5C4HZG.js +3621 -0
- package/dist/chunks/chunk-ST5C4HZG.js.map +1 -0
- package/dist/chunks/chunk-T524XBVZ.js +45 -0
- package/dist/chunks/chunk-T524XBVZ.js.map +1 -0
- package/dist/chunks/chunk-TN5UCQIV.js +614 -0
- package/dist/chunks/chunk-TN5UCQIV.js.map +1 -0
- package/dist/chunks/chunk-TWGONQQT.js +44 -0
- package/dist/chunks/chunk-TWGONQQT.js.map +1 -0
- package/dist/chunks/chunk-UDDWTISS.js +615 -0
- package/dist/chunks/chunk-UDDWTISS.js.map +1 -0
- package/dist/chunks/chunk-URMN5M77.js +36 -0
- package/dist/chunks/chunk-URMN5M77.js.map +1 -0
- package/dist/chunks/chunk-VPMLJM47.js +621 -0
- package/dist/chunks/chunk-VPMLJM47.js.map +1 -0
- package/dist/chunks/chunk-WYIX3HQR.js +634 -0
- package/dist/chunks/chunk-WYIX3HQR.js.map +1 -0
- package/dist/chunks/chunk-XISZU4KI.js +614 -0
- package/dist/chunks/chunk-XISZU4KI.js.map +1 -0
- package/dist/chunks/chunk-Y32L6VYU.js +91 -0
- package/dist/chunks/chunk-Y32L6VYU.js.map +1 -0
- package/dist/chunks/chunk-Y35P6GUT.js +99 -0
- package/dist/chunks/chunk-Y35P6GUT.js.map +1 -0
- package/dist/chunks/chunk-YUWIMPXO.js +75 -0
- package/dist/chunks/chunk-YUWIMPXO.js.map +1 -0
- package/dist/chunks/chunk-ZJHKJMHR.js +52 -0
- package/dist/chunks/chunk-ZJHKJMHR.js.map +1 -0
- package/dist/chunks/chunk-ZO73DF5R.js +36 -0
- package/dist/chunks/chunk-ZO73DF5R.js.map +1 -0
- package/dist/chunks/chunk-ZRA43QD3.js +52 -0
- package/dist/chunks/chunk-ZRA43QD3.js.map +1 -0
- package/dist/exports/computed.context.d.ts +3 -1
- package/dist/exports/computed.context.js +1 -1
- package/dist/exports/config.context.d.ts +1 -0
- package/dist/exports/config.context.js +4 -3
- package/dist/exports/config.context.js.map +1 -1
- package/dist/exports/interaction.d.ts +5 -2
- package/dist/exports/interaction.js +1 -1
- package/dist/exports/item.context.d.ts +1 -1
- package/dist/exports/qti-assessment-item.context.d.ts +1 -1
- package/dist/exports/qti-condition-expression.d.ts +1 -1
- package/dist/exports/qti-expression.d.ts +1 -1
- package/dist/exports/session.context.d.ts +3 -3
- package/dist/exports/test.context.d.ts +1 -1
- package/dist/exports/variables.d.ts +1 -1
- package/dist/index.d.ts +9 -6
- package/dist/index.js +26 -15
- package/dist/item.css +14 -1
- package/dist/qti-components/index.d.ts +4 -4
- package/dist/qti-components/index.js +2 -2
- package/dist/qti-components-jsx.d.ts +82 -36
- package/dist/qti-item/core/index.js +1 -1
- package/dist/qti-loader/index.d.ts +3 -3
- package/dist/qti-response-declaration-BwciEk5R.d.ts +1022 -0
- package/dist/qti-response-declaration-CCx746w0.d.ts +1023 -0
- package/dist/qti-response-declaration-CRGM9w_b.d.ts +1023 -0
- package/dist/qti-response-declaration-CbWRpo5c.d.ts +1033 -0
- package/dist/qti-test/components/index.d.ts +10 -8
- package/dist/qti-test/components/index.js +22 -11
- package/dist/qti-test/components/test-container.js +1 -1
- package/dist/qti-test/components/test-end-attempt.d.ts +0 -3
- package/dist/qti-test/components/test-end-attempt.js +1 -3
- package/dist/qti-test/components/test-item-link.js +1 -1
- package/dist/qti-test/components/test-navigation.d.ts +21 -8
- package/dist/qti-test/components/test-navigation.js +2 -3
- package/dist/qti-test/components/test-next.js +2 -2
- package/dist/qti-test/components/test-paging-buttons-stamp copy.js +44 -0
- package/dist/qti-test/components/test-paging-buttons-stamp copy.js.map +1 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.js +2 -2
- package/dist/qti-test/components/test-paging-buttons-stamp.stories copy.css +93 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.stories copy.css.map +1 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.stories copy.js +9774 -0
- package/dist/qti-test/components/test-paging-buttons-stamp.stories copy.js.map +1 -0
- package/dist/qti-test/components/test-prev.js +2 -2
- package/dist/qti-test/components/test-print-item-variables.d.ts +15 -0
- package/dist/qti-test/components/test-print-item-variables.js +9 -0
- package/dist/qti-test/components/test-print-item-variables.js.map +1 -0
- package/dist/qti-test/components/test-section-buttons-stamp.d.ts +20 -0
- package/dist/qti-test/components/test-section-buttons-stamp.js +9 -0
- package/dist/qti-test/components/test-section-buttons-stamp.js.map +1 -0
- package/dist/qti-test/components/test-section-link.d.ts +18 -0
- package/dist/qti-test/components/test-section-link.js +9 -0
- package/dist/qti-test/components/test-section-link.js.map +1 -0
- package/dist/qti-test/components/test-show-correct-response.d.ts +0 -3
- package/dist/qti-test/components/test-show-correct-response.js +1 -3
- package/dist/qti-test/core/index.d.ts +5 -5
- package/dist/qti-test/core/index.js +1 -1
- package/dist/qti-test-part-8W7-lWmu.d.ts +85 -0
- package/dist/qti-test-part-BEPYFFNO.d.ts +85 -0
- package/dist/qti-test-part-CTzSuEgA.d.ts +85 -0
- package/dist/qti-test-part-CcFpkf1G.d.ts +85 -0
- package/dist/variables-D70AFbp2.d.ts +47 -0
- package/dist/vscode.html-custom-data.json +35 -10
- package/package.json +2 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sessionContext
|
|
3
|
+
} from "./chunk-QTH3WLGY.js";
|
|
4
|
+
import {
|
|
5
|
+
testContext
|
|
6
|
+
} from "./chunk-ODLYMQOS.js";
|
|
7
|
+
import {
|
|
8
|
+
computedContext
|
|
9
|
+
} from "./chunk-HRCCW6MA.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-63WMM765.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-test/components/test-navigation.ts
|
|
15
|
+
import { consume, provide } from "@lit/context";
|
|
16
|
+
import { html, LitElement } from "lit";
|
|
17
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
18
|
+
var TestNavigation = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.identifier = void 0;
|
|
22
|
+
this.initContext = [];
|
|
23
|
+
this.configContext = {};
|
|
24
|
+
this.autoScoreItems = false;
|
|
25
|
+
this.addEventListener("qti-assessment-test-connected", this._handleTestConnected.bind(this));
|
|
26
|
+
this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
|
|
27
|
+
this.addEventListener("qti-interaction-changed", this._handleInteractionChanged.bind(this));
|
|
28
|
+
this.addEventListener("test-end-attempt", this._handleTestEndAttempt.bind(this));
|
|
29
|
+
this.addEventListener("test-show-correct-response", this._handleTestShowCorrectResponse.bind(this));
|
|
30
|
+
}
|
|
31
|
+
_handleTestEndAttempt(_event) {
|
|
32
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
33
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
|
|
34
|
+
);
|
|
35
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
36
|
+
qtiAssessmentItemEl.processResponse();
|
|
37
|
+
}
|
|
38
|
+
_handleTestShowCorrectResponse(event) {
|
|
39
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
40
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
|
|
41
|
+
);
|
|
42
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
43
|
+
qtiAssessmentItemEl.showCorrectResponse(event.detail);
|
|
44
|
+
}
|
|
45
|
+
_handleInteractionChanged(_event) {
|
|
46
|
+
if (this.autoScoreItems) {
|
|
47
|
+
const assessmentItem = _event.composedPath()[0].closest("qti-assessment-item");
|
|
48
|
+
const scoreOutcomeIdentifier = assessmentItem.variables.find((v) => v.identifier === "SCORE");
|
|
49
|
+
if (scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === "false") {
|
|
50
|
+
assessmentItem.processResponse();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
render() {
|
|
55
|
+
return html`<slot></slot>`;
|
|
56
|
+
}
|
|
57
|
+
/* PK: on test connected we can build the computed context */
|
|
58
|
+
_handleTestConnected(event) {
|
|
59
|
+
this._testElement = event.detail;
|
|
60
|
+
const testPartElements = Array.from(this._testElement?.querySelectorAll(`qti-test-part`) || []);
|
|
61
|
+
this.computedContext = {
|
|
62
|
+
testParts: testPartElements.map((testPart) => {
|
|
63
|
+
const sectionElements = [...testPart.querySelectorAll(`qti-assessment-section`)];
|
|
64
|
+
return {
|
|
65
|
+
active: false,
|
|
66
|
+
identifier: testPart.identifier,
|
|
67
|
+
sections: sectionElements.map((section) => {
|
|
68
|
+
const itemElements = [...section.querySelectorAll(`qti-assessment-item-ref`)];
|
|
69
|
+
return {
|
|
70
|
+
active: false,
|
|
71
|
+
identifier: section.identifier,
|
|
72
|
+
title: section.title,
|
|
73
|
+
items: itemElements.map((item) => {
|
|
74
|
+
return {
|
|
75
|
+
active: false,
|
|
76
|
+
identifier: item.identifier,
|
|
77
|
+
href: item.href
|
|
78
|
+
};
|
|
79
|
+
})
|
|
80
|
+
};
|
|
81
|
+
})
|
|
82
|
+
};
|
|
83
|
+
})
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/* PK: on item connected we can add item only properties in the xml */
|
|
87
|
+
_handleItemConnected(event) {
|
|
88
|
+
const itemElement = event.detail;
|
|
89
|
+
this.computedContext = {
|
|
90
|
+
...this.computedContext,
|
|
91
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
92
|
+
return {
|
|
93
|
+
...testPart,
|
|
94
|
+
sections: testPart.sections.map((section) => {
|
|
95
|
+
return {
|
|
96
|
+
...section,
|
|
97
|
+
items: section.items.map(
|
|
98
|
+
(item) => item.identifier === itemElement.identifier ? {
|
|
99
|
+
...item,
|
|
100
|
+
title: itemElement.title,
|
|
101
|
+
adaptive: itemElement.adaptive == "true" || false,
|
|
102
|
+
timeDependent: itemElement.timeDependent == "true" || false
|
|
103
|
+
} : item
|
|
104
|
+
)
|
|
105
|
+
};
|
|
106
|
+
})
|
|
107
|
+
};
|
|
108
|
+
})
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/* PK: on every change of the candidate we will recomputed the computedContext */
|
|
112
|
+
willUpdate(_changedProperties) {
|
|
113
|
+
if (!this.computedContext) return;
|
|
114
|
+
let itemIndex = 1;
|
|
115
|
+
this.computedContext = {
|
|
116
|
+
...this.computedContext,
|
|
117
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
118
|
+
return {
|
|
119
|
+
...testPart,
|
|
120
|
+
active: this._sessionContext?.navPartId === testPart.identifier || false,
|
|
121
|
+
sections: testPart.sections.map((section) => {
|
|
122
|
+
return {
|
|
123
|
+
...section,
|
|
124
|
+
active: this._sessionContext?.navSectionId === section.identifier || false,
|
|
125
|
+
completed: section.items.every(
|
|
126
|
+
(item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"
|
|
127
|
+
),
|
|
128
|
+
items: section.items.map((item) => {
|
|
129
|
+
const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
|
|
130
|
+
let computedItem;
|
|
131
|
+
if (this.initContext) {
|
|
132
|
+
const initContext = this.initContext.find((i) => i.identifier === item.identifier);
|
|
133
|
+
computedItem = { ...item, ...itemContext, ...initContext };
|
|
134
|
+
} else {
|
|
135
|
+
computedItem = { ...item, ...itemContext };
|
|
136
|
+
}
|
|
137
|
+
const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
|
|
138
|
+
const score = parseInt(rawscore?.toString());
|
|
139
|
+
const completionStatus = computedItem.variables?.find((v) => v.identifier === "completionStatus")?.value;
|
|
140
|
+
const categories = computedItem.category ? computedItem.category?.split(" ") : [];
|
|
141
|
+
const type = categories.includes(this.configContext?.infoItemCategory) ? "info" : "regular";
|
|
142
|
+
const active = this._sessionContext?.navItemId === computedItem.identifier || false;
|
|
143
|
+
const correct = (
|
|
144
|
+
// this._testContext.view === 'scorer' &&
|
|
145
|
+
type == "regular" && score !== void 0 && !isNaN(score) && score > 0 || false
|
|
146
|
+
);
|
|
147
|
+
const incorrect = (
|
|
148
|
+
// this._testContext.view === 'scorer' &&
|
|
149
|
+
type == "regular" && score !== void 0 && !isNaN(score) && score <= 0 || false
|
|
150
|
+
);
|
|
151
|
+
const completed = (
|
|
152
|
+
// this._testContext.view === 'candidate' &&
|
|
153
|
+
completionStatus === "completed"
|
|
154
|
+
);
|
|
155
|
+
const response = computedItem.variables?.find((v) => v.identifier === "RESPONSE")?.value || "";
|
|
156
|
+
const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;
|
|
157
|
+
return {
|
|
158
|
+
...computedItem,
|
|
159
|
+
// rawscore, // not necessary for outside world
|
|
160
|
+
// score, // not necessary for outside world
|
|
161
|
+
// completionStatus, // not necessary for outside world
|
|
162
|
+
// categories, // not necessary for outside world
|
|
163
|
+
type,
|
|
164
|
+
active,
|
|
165
|
+
correct,
|
|
166
|
+
incorrect,
|
|
167
|
+
completed,
|
|
168
|
+
index,
|
|
169
|
+
response
|
|
170
|
+
};
|
|
171
|
+
})
|
|
172
|
+
};
|
|
173
|
+
})
|
|
174
|
+
};
|
|
175
|
+
})
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
__decorateClass([
|
|
180
|
+
property({ type: String })
|
|
181
|
+
], TestNavigation.prototype, "identifier", 2);
|
|
182
|
+
__decorateClass([
|
|
183
|
+
state()
|
|
184
|
+
], TestNavigation.prototype, "initContext", 2);
|
|
185
|
+
__decorateClass([
|
|
186
|
+
state(),
|
|
187
|
+
consume({ context: testContext, subscribe: true })
|
|
188
|
+
], TestNavigation.prototype, "_testContext", 2);
|
|
189
|
+
__decorateClass([
|
|
190
|
+
state(),
|
|
191
|
+
consume({ context: sessionContext, subscribe: true })
|
|
192
|
+
], TestNavigation.prototype, "_sessionContext", 2);
|
|
193
|
+
__decorateClass([
|
|
194
|
+
state()
|
|
195
|
+
], TestNavigation.prototype, "configContext", 2);
|
|
196
|
+
__decorateClass([
|
|
197
|
+
state(),
|
|
198
|
+
provide({ context: computedContext })
|
|
199
|
+
], TestNavigation.prototype, "computedContext", 2);
|
|
200
|
+
__decorateClass([
|
|
201
|
+
property({ type: Boolean, attribute: "auto-score-items" })
|
|
202
|
+
], TestNavigation.prototype, "autoScoreItems", 2);
|
|
203
|
+
TestNavigation = __decorateClass([
|
|
204
|
+
customElement("test-navigation")
|
|
205
|
+
], TestNavigation);
|
|
206
|
+
|
|
207
|
+
export {
|
|
208
|
+
TestNavigation
|
|
209
|
+
};
|
|
210
|
+
//# sourceMappingURL=chunk-PWOPGMKY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-navigation.ts"],"sourcesContent":["import { consume, provide } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { testContext } from '../../exports/test.context';\nimport { sessionContext } from '../../exports/session.context';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { QtiAssessmentItem } from '../../qti-components';\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { PropertyValues } from 'lit';\nimport type { QtiAssessmentItemRef, QtiAssessmentSection, QtiAssessmentTest, QtiTestPart } from '../core';\nimport type { ConfigContext } from '../../exports/config.context';\nimport type { SessionContext } from '../../exports/session.context';\nimport type { TestContext } from '../../exports/test.context';\n\ntype CustomEventMap = {\n 'test-end-attempt': CustomEvent;\n 'test-show-correct-response': CustomEvent<{ value: boolean }>;\n};\n\ndeclare global {\n interface GlobalEventHandlersEventMap extends CustomEventMap {}\n}\n\n@customElement('test-navigation')\nexport class TestNavigation extends LitElement {\n @property({ type: String }) identifier = undefined;\n\n @state()\n public initContext: { identifier: string; [key: string]: any }[] = [];\n\n @state()\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n @state()\n @consume({ context: sessionContext, subscribe: true })\n public _sessionContext?: SessionContext;\n\n @state()\n public configContext: ConfigContext = {};\n\n @state()\n @provide({ context: computedContext })\n public computedContext: ComputedContext;\n\n @property({ type: Boolean, attribute: 'auto-score-items' }) autoScoreItems = false;\n\n private _testElement: QtiAssessmentTest;\n\n constructor() {\n super();\n this.addEventListener('qti-assessment-test-connected', this._handleTestConnected.bind(this));\n this.addEventListener('qti-assessment-item-connected', this._handleItemConnected.bind(this));\n\n this.addEventListener('qti-interaction-changed', this._handleInteractionChanged.bind(this));\n\n this.addEventListener('test-end-attempt', this._handleTestEndAttempt.bind(this));\n this.addEventListener('test-show-correct-response', this._handleTestShowCorrectResponse.bind(this));\n }\n\n private _handleTestEndAttempt(_event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.processResponse();\n }\n\n private _handleTestShowCorrectResponse(event: CustomEvent) {\n const qtiItemEl = this._testElement.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${this._sessionContext.navItemId}\"]`\n );\n const qtiAssessmentItemEl = qtiItemEl.assessmentItem;\n qtiAssessmentItemEl.showCorrectResponse(event.detail);\n }\n\n private _handleInteractionChanged(_event: CustomEvent) {\n if (this.autoScoreItems) {\n const assessmentItem = (_event.composedPath()[0] as HTMLElement).closest('qti-assessment-item');\n const scoreOutcomeIdentifier = assessmentItem.variables.find(v => v.identifier === 'SCORE') as OutcomeVariable;\n if (scoreOutcomeIdentifier.externalScored === null && assessmentItem.adaptive === 'false') {\n assessmentItem.processResponse();\n }\n }\n }\n\n render() {\n return html`<slot></slot>`;\n }\n\n /* PK: on test connected we can build the computed context */\n _handleTestConnected(event: CustomEvent) {\n this._testElement = event.detail as QtiAssessmentTest;\n const testPartElements = Array.from(this._testElement?.querySelectorAll<QtiTestPart>(`qti-test-part`) || []);\n this.computedContext = {\n testParts: testPartElements.map(testPart => {\n const sectionElements = [...testPart.querySelectorAll<QtiAssessmentSection>(`qti-assessment-section`)];\n return {\n active: false,\n identifier: testPart.identifier,\n sections: sectionElements.map(section => {\n const itemElements = [...section.querySelectorAll<QtiAssessmentItemRef>(`qti-assessment-item-ref`)];\n return {\n active: false,\n identifier: section.identifier,\n title: section.title,\n items: itemElements.map(item => {\n return {\n active: false,\n identifier: item.identifier,\n href: item.href\n };\n })\n };\n })\n };\n })\n };\n\n // const sections = this.computedContext?.testParts.flatMap(testPart => testPart.sections);\n\n // let id;\n // if (this.navigate === 'section') {\n // id = sections.find(section => section.active).identifier;\n // }\n // if (this.navigate === 'item') {\n // id = sections.flatMap(section => section.items).find(item => item.active).identifier;\n // }\n\n // if (id) {\n // this.dispatchEvent(\n // new CustomEvent('qti-request-navigation', {\n // detail: { type: this.navigate, id },\n // bubbles: true,\n // composed: true\n // })\n // );\n // }\n }\n\n /* PK: on item connected we can add item only properties in the xml */\n _handleItemConnected(event: CustomEvent) {\n const itemElement = event.detail as QtiAssessmentItem;\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n items: section.items.map(item =>\n item.identifier === itemElement.identifier\n ? {\n ...item,\n title: itemElement.title,\n adaptive: itemElement.adaptive == 'true' || false,\n timeDependent: itemElement.timeDependent == 'true' || false\n }\n : item\n )\n };\n })\n };\n })\n };\n }\n\n /* PK: on every change of the candidate we will recomputed the computedContext */\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) return;\n\n let itemIndex = 1;\n this.computedContext = {\n ...this.computedContext,\n testParts: this.computedContext.testParts.map(testPart => {\n return {\n ...testPart,\n active: this._sessionContext?.navPartId === testPart.identifier || false,\n sections: testPart.sections.map(section => {\n return {\n ...section,\n active: this._sessionContext?.navSectionId === section.identifier || false,\n completed: section.items.every(\n item =>\n this._testContext.items\n .find(i => i.identifier === item.identifier)\n ?.variables.find(v => v.identifier === 'completionStatus').value === 'completed'\n ),\n\n items: section.items.map(item => {\n const itemContext = this._testContext?.items.find(i => i.identifier === item.identifier);\n let computedItem;\n\n if (this.initContext) {\n const initContext = this.initContext.find(i => i.identifier === item.identifier);\n computedItem = { ...item, ...itemContext, ...initContext };\n } else {\n computedItem = { ...item, ...itemContext };\n }\n\n const rawscore = computedItem.variables?.find(vr => vr.identifier == 'SCORE')?.value;\n const score = parseInt(rawscore?.toString());\n const completionStatus = computedItem.variables?.find(v => v.identifier === 'completionStatus')?.value;\n const categories = computedItem.category ? computedItem.category?.split(' ') : [];\n\n const type = categories.includes(this.configContext?.infoItemCategory) ? 'info' : 'regular'; // rounded-full\n const active = this._sessionContext?.navItemId === computedItem.identifier || false; // !border-sky-600\n\n const correct =\n // this._testContext.view === 'scorer' &&\n (type == 'regular' && score !== undefined && !isNaN(score) && score > 0) || false; // bg-green-100 border-green-400\n const incorrect =\n // this._testContext.view === 'scorer' &&\n (type == 'regular' && score !== undefined && !isNaN(score) && score <= 0) || false; // bg-red-100 border-red-400\n const completed =\n // this._testContext.view === 'candidate' &&\n completionStatus === 'completed';\n // || item.category === this.host._configContext?.infoItemCategory || false\n const response = computedItem.variables?.find(v => v.identifier === 'RESPONSE')?.value || '';\n\n const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;\n\n return {\n ...computedItem,\n // rawscore, // not necessary for outside world\n // score, // not necessary for outside world\n // completionStatus, // not necessary for outside world\n // categories, // not necessary for outside world\n type,\n active,\n correct,\n incorrect,\n completed,\n index,\n response\n };\n })\n };\n })\n };\n })\n };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,SAAS,eAAe;AACjC,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe,UAAU,aAAa;AAyBxC,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAyB7C,cAAc;AACZ,UAAM;AAzBoB,sBAAa;AAGzC,SAAO,cAA4D,CAAC;AAWpE,SAAO,gBAA+B,CAAC;AAMqB,0BAAiB;AAM3E,SAAK,iBAAiB,iCAAiC,KAAK,qBAAqB,KAAK,IAAI,CAAC;AAC3F,SAAK,iBAAiB,iCAAiC,KAAK,qBAAqB,KAAK,IAAI,CAAC;AAE3F,SAAK,iBAAiB,2BAA2B,KAAK,0BAA0B,KAAK,IAAI,CAAC;AAE1F,SAAK,iBAAiB,oBAAoB,KAAK,sBAAsB,KAAK,IAAI,CAAC;AAC/E,SAAK,iBAAiB,8BAA8B,KAAK,+BAA+B,KAAK,IAAI,CAAC;AAAA,EACpG;AAAA,EAEQ,sBAAsB,QAAqB;AACjD,UAAM,YAAY,KAAK,aAAa;AAAA,MAClC,uCAAuC,KAAK,gBAAgB,SAAS;AAAA,IACvE;AACA,UAAM,sBAAsB,UAAU;AACtC,wBAAoB,gBAAgB;AAAA,EACtC;AAAA,EAEQ,+BAA+B,OAAoB;AACzD,UAAM,YAAY,KAAK,aAAa;AAAA,MAClC,uCAAuC,KAAK,gBAAgB,SAAS;AAAA,IACvE;AACA,UAAM,sBAAsB,UAAU;AACtC,wBAAoB,oBAAoB,MAAM,MAAM;AAAA,EACtD;AAAA,EAEQ,0BAA0B,QAAqB;AACrD,QAAI,KAAK,gBAAgB;AACvB,YAAM,iBAAkB,OAAO,aAAa,EAAE,CAAC,EAAkB,QAAQ,qBAAqB;AAC9F,YAAM,yBAAyB,eAAe,UAAU,KAAK,OAAK,EAAE,eAAe,OAAO;AAC1F,UAAI,uBAAuB,mBAAmB,QAAQ,eAAe,aAAa,SAAS;AACzF,uBAAe,gBAAgB;AAAA,MACjC;AAAA,IACF;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,qBAAqB,OAAoB;AACvC,SAAK,eAAe,MAAM;AAC1B,UAAM,mBAAmB,MAAM,KAAK,KAAK,cAAc,iBAA8B,eAAe,KAAK,CAAC,CAAC;AAC3G,SAAK,kBAAkB;AAAA,MACrB,WAAW,iBAAiB,IAAI,cAAY;AAC1C,cAAM,kBAAkB,CAAC,GAAG,SAAS,iBAAuC,wBAAwB,CAAC;AACrG,eAAO;AAAA,UACL,QAAQ;AAAA,UACR,YAAY,SAAS;AAAA,UACrB,UAAU,gBAAgB,IAAI,aAAW;AACvC,kBAAM,eAAe,CAAC,GAAG,QAAQ,iBAAuC,yBAAyB,CAAC;AAClG,mBAAO;AAAA,cACL,QAAQ;AAAA,cACR,YAAY,QAAQ;AAAA,cACpB,OAAO,QAAQ;AAAA,cACf,OAAO,aAAa,IAAI,UAAQ;AAC9B,uBAAO;AAAA,kBACL,QAAQ;AAAA,kBACR,YAAY,KAAK;AAAA,kBACjB,MAAM,KAAK;AAAA,gBACb;AAAA,cACF,CAAC;AAAA,YACH;AAAA,UACF,CAAC;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EAqBF;AAAA;AAAA,EAGA,qBAAqB,OAAoB;AACvC,UAAM,cAAc,MAAM;AAC1B,SAAK,kBAAkB;AAAA,MACrB,GAAG,KAAK;AAAA,MACR,WAAW,KAAK,gBAAgB,UAAU,IAAI,cAAY;AACxD,eAAO;AAAA,UACL,GAAG;AAAA,UACH,UAAU,SAAS,SAAS,IAAI,aAAW;AACzC,mBAAO;AAAA,cACL,GAAG;AAAA,cACH,OAAO,QAAQ,MAAM;AAAA,gBAAI,UACvB,KAAK,eAAe,YAAY,aAC5B;AAAA,kBACE,GAAG;AAAA,kBACH,OAAO,YAAY;AAAA,kBACnB,UAAU,YAAY,YAAY,UAAU;AAAA,kBAC5C,eAAe,YAAY,iBAAiB,UAAU;AAAA,gBACxD,IACA;AAAA,cACN;AAAA,YACF;AAAA,UACF,CAAC;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA;AAAA,EAGU,WAAW,oBAA0C;AAC7D,QAAI,CAAC,KAAK,gBAAiB;AAE3B,QAAI,YAAY;AAChB,SAAK,kBAAkB;AAAA,MACrB,GAAG,KAAK;AAAA,MACR,WAAW,KAAK,gBAAgB,UAAU,IAAI,cAAY;AACxD,eAAO;AAAA,UACL,GAAG;AAAA,UACH,QAAQ,KAAK,iBAAiB,cAAc,SAAS,cAAc;AAAA,UACnE,UAAU,SAAS,SAAS,IAAI,aAAW;AACzC,mBAAO;AAAA,cACL,GAAG;AAAA,cACH,QAAQ,KAAK,iBAAiB,iBAAiB,QAAQ,cAAc;AAAA,cACrE,WAAW,QAAQ,MAAM;AAAA,gBACvB,UACE,KAAK,aAAa,MACf,KAAK,OAAK,EAAE,eAAe,KAAK,UAAU,GACzC,UAAU,KAAK,OAAK,EAAE,eAAe,kBAAkB,EAAE,UAAU;AAAA,cAC3E;AAAA,cAEA,OAAO,QAAQ,MAAM,IAAI,UAAQ;AAC/B,sBAAM,cAAc,KAAK,cAAc,MAAM,KAAK,OAAK,EAAE,eAAe,KAAK,UAAU;AACvF,oBAAI;AAEJ,oBAAI,KAAK,aAAa;AACpB,wBAAM,cAAc,KAAK,YAAY,KAAK,OAAK,EAAE,eAAe,KAAK,UAAU;AAC/E,iCAAe,EAAE,GAAG,MAAM,GAAG,aAAa,GAAG,YAAY;AAAA,gBAC3D,OAAO;AACL,iCAAe,EAAE,GAAG,MAAM,GAAG,YAAY;AAAA,gBAC3C;AAEA,sBAAM,WAAW,aAAa,WAAW,KAAK,QAAM,GAAG,cAAc,OAAO,GAAG;AAC/E,sBAAM,QAAQ,SAAS,UAAU,SAAS,CAAC;AAC3C,sBAAM,mBAAmB,aAAa,WAAW,KAAK,OAAK,EAAE,eAAe,kBAAkB,GAAG;AACjG,sBAAM,aAAa,aAAa,WAAW,aAAa,UAAU,MAAM,GAAG,IAAI,CAAC;AAEhF,sBAAM,OAAO,WAAW,SAAS,KAAK,eAAe,gBAAgB,IAAI,SAAS;AAClF,sBAAM,SAAS,KAAK,iBAAiB,cAAc,aAAa,cAAc;AAE9E,sBAAM;AAAA;AAAA,kBAEH,QAAQ,aAAa,UAAU,UAAa,CAAC,MAAM,KAAK,KAAK,QAAQ,KAAM;AAAA;AAC9E,sBAAM;AAAA;AAAA,kBAEH,QAAQ,aAAa,UAAU,UAAa,CAAC,MAAM,KAAK,KAAK,SAAS,KAAM;AAAA;AAC/E,sBAAM;AAAA;AAAA,kBAEJ,qBAAqB;AAAA;AAEvB,sBAAM,WAAW,aAAa,WAAW,KAAK,OAAK,EAAE,eAAe,UAAU,GAAG,SAAS;AAE1F,sBAAM,QAAQ,WAAW,SAAS,KAAK,eAAe,gBAAgB,IAAI,OAAO;AAEjF,uBAAO;AAAA,kBACL,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKH;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,gBACF;AAAA,cACF,CAAC;AAAA,YACH;AAAA,UACF,CAAC;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF;AA3N8B;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GADf,eACiB;AAGrB;AAAA,EADN,MAAM;AAAA,GAHI,eAIJ;AAIA;AAAA,EAFN,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,aAAa,WAAW,KAAK,CAAC;AAAA,GAPvC,eAQJ;AAIA;AAAA,EAFN,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,gBAAgB,WAAW,KAAK,CAAC;AAAA,GAX1C,eAYJ;AAGA;AAAA,EADN,MAAM;AAAA,GAdI,eAeJ;AAIA;AAAA,EAFN,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,gBAAgB,CAAC;AAAA,GAlB1B,eAmBJ;AAEqD;AAAA,EAA3D,SAAS,EAAE,MAAM,SAAS,WAAW,mBAAmB,CAAC;AAAA,GArB/C,eAqBiD;AArBjD,iBAAN;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass
|
|
3
|
+
} from "./chunk-H2JE6IVU.js";
|
|
4
|
+
|
|
5
|
+
// src/lib/qti-test/components/test-section-link.ts
|
|
6
|
+
import { css, html, LitElement } from "lit";
|
|
7
|
+
import { customElement, property } from "lit/decorators.js";
|
|
8
|
+
var TestSectionLink = class extends LitElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.itemId = null;
|
|
12
|
+
this.addEventListener("click", () => this._requestItem(this.itemId));
|
|
13
|
+
}
|
|
14
|
+
_requestItem(identifier) {
|
|
15
|
+
this.dispatchEvent(
|
|
16
|
+
new CustomEvent("qti-request-test-section", {
|
|
17
|
+
composed: true,
|
|
18
|
+
bubbles: true,
|
|
19
|
+
detail: identifier
|
|
20
|
+
})
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return html` <slot></slot> `;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
TestSectionLink.styles = css`
|
|
28
|
+
:host {
|
|
29
|
+
display: block;
|
|
30
|
+
user-select: none;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
__decorateClass([
|
|
35
|
+
property({ type: String, attribute: "item-id" })
|
|
36
|
+
], TestSectionLink.prototype, "itemId", 2);
|
|
37
|
+
TestSectionLink = __decorateClass([
|
|
38
|
+
customElement("test-section-link")
|
|
39
|
+
], TestSectionLink);
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
TestSectionLink
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=chunk-QC5NBP3D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-section-link.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\n@customElement('test-section-link')\nexport class TestSectionLink extends LitElement {\n static styles = css`\n :host {\n display: block;\n user-select: none;\n cursor: pointer;\n }\n `;\n\n @property({ type: String, attribute: 'item-id' })\n private itemId: string = null;\n\n private _requestItem(identifier: string) {\n this.dispatchEvent(\n new CustomEvent('qti-request-test-section', {\n composed: true,\n bubbles: true,\n detail: identifier\n })\n );\n }\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-section-link': TestSectionLink;\n }\n}\n"],"mappings":";;;;;AAAA,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,eAAe,gBAAgB;AAGjC,IAAM,kBAAN,cAA8B,WAAW;AAAA,EAsB9C,cAAc;AACZ,UAAM;AAbR,SAAQ,SAAiB;AAcvB,SAAK,iBAAiB,SAAS,MAAM,KAAK,aAAa,KAAK,MAAM,CAAC;AAAA,EACrE;AAAA,EAbQ,aAAa,YAAoB;AACvC,SAAK;AAAA,MACH,IAAI,YAAY,4BAA4B;AAAA,QAC1C,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAOA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AA9Ba,gBACJ,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASR;AAAA,EADP,SAAS,EAAE,MAAM,QAAQ,WAAW,UAAU,CAAC;AAAA,GATrC,gBAUH;AAVG,kBAAN;AAAA,EADN,cAAc,mBAAmB;AAAA,GACrB;","names":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-HRCCW6MA.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-print-item-variables.ts
|
|
9
|
+
import { html, LitElement } from "lit";
|
|
10
|
+
import { consume } from "@lit/context";
|
|
11
|
+
import { customElement } from "lit/decorators.js";
|
|
12
|
+
var TestPrintVariables = class extends LitElement {
|
|
13
|
+
render() {
|
|
14
|
+
const activeItem = this.computedContext?.testParts.flatMap(
|
|
15
|
+
(testPart) => testPart.sections.flatMap((section) => section.items).find((item) => item.active)
|
|
16
|
+
);
|
|
17
|
+
return html` <small><pre>${JSON.stringify(activeItem, null, 2)}</pre></small> `;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
__decorateClass([
|
|
21
|
+
consume({ context: computedContext, subscribe: true })
|
|
22
|
+
], TestPrintVariables.prototype, "computedContext", 2);
|
|
23
|
+
TestPrintVariables = __decorateClass([
|
|
24
|
+
customElement("test-print-item-variables")
|
|
25
|
+
], TestPrintVariables);
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
TestPrintVariables
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-QHWSY3K6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-print-item-variables.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { consume } from '@lit/context';\nimport { customElement } from 'lit/decorators.js';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext } from '../../exports/computed.context';\n\n@customElement('test-print-item-variables')\nexport class TestPrintVariables extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n public computedContext?: ComputedContext;\n\n render() {\n const activeItem = this.computedContext?.testParts.flatMap(testPart =>\n testPart.sections.flatMap(section => section.items).find(item => item.active)\n );\n\n return html` <small><pre>${JSON.stringify(activeItem, null, 2)}</pre></small> `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-print-item-variables': TestPrintVariables;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe;AACxB,SAAS,qBAAqB;AAOvB,IAAM,qBAAN,cAAiC,WAAW;AAAA,EAIjD,SAAS;AACP,UAAM,aAAa,KAAK,iBAAiB,UAAU;AAAA,MAAQ,cACzD,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK,EAAE,KAAK,UAAQ,KAAK,MAAM;AAAA,IAC9E;AAEA,WAAO,oBAAoB,KAAK,UAAU,YAAY,MAAM,CAAC,CAAC;AAAA,EAChE;AACF;AATS;AAAA,EADN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,mBAEJ;AAFI,qBAAN;AAAA,EADN,cAAc,2BAA2B;AAAA,GAC7B;","names":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-HRCCW6MA.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-section-buttons-stamp.ts
|
|
9
|
+
import { html, LitElement } from "lit";
|
|
10
|
+
import { customElement } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "stampino";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestSectionsButtonsStamp = class extends LitElement {
|
|
14
|
+
createRenderRoot() {
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this._internals = this.attachInternals();
|
|
20
|
+
this._internals.ariaLabel = "pagination";
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback();
|
|
24
|
+
const templateElement = this.querySelector("template");
|
|
25
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
if (!this.computedContext) return html``;
|
|
29
|
+
const sections = this.computedContext.testParts.flatMap((testPart) => testPart.sections);
|
|
30
|
+
return html` ${sections.map((item) => this.myTemplate({ item }))} `;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
__decorateClass([
|
|
34
|
+
consume({ context: computedContext, subscribe: true })
|
|
35
|
+
], TestSectionsButtonsStamp.prototype, "computedContext", 2);
|
|
36
|
+
TestSectionsButtonsStamp = __decorateClass([
|
|
37
|
+
customElement("test-sections-buttons-stamp")
|
|
38
|
+
], TestSectionsButtonsStamp);
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
TestSectionsButtonsStamp
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=chunk-QL3I5UMG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-section-buttons-stamp.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n@customElement('test-sections-buttons-stamp')\nexport class TestSectionsButtonsStamp extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n myTemplate: TemplateFunction;\n private _internals: ElementInternals;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n this._internals.ariaLabel = 'pagination';\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n render() {\n if (!this.computedContext) return html``;\n const sections = this.computedContext.testParts.flatMap(testPart => testPart.sections);\n\n return html` ${sections.map(item => this.myTemplate({ item }))} `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-sections-buttons-stamp': TestSectionsButtonsStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,kBAAkB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAQjB,IAAM,2BAAN,cAAuC,WAAW;AAAA,EAO7C,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,cAAc;AACZ,UAAM;AACN,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,YAAY;AAAA,EAC9B;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEA,SAAS;AACP,QAAI,CAAC,KAAK,gBAAiB,QAAO;AAClC,UAAM,WAAW,KAAK,gBAAgB,UAAU,QAAQ,cAAY,SAAS,QAAQ;AAErF,WAAO,QAAQ,SAAS,IAAI,UAAQ,KAAK,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;AAAA,EAChE;AACF;AA3BU;AAAA,EADP,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,yBAEH;AAFG,2BAAN;AAAA,EADN,cAAc,6BAA6B;AAAA,GAC/B;","names":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computedContext
|
|
3
|
+
} from "./chunk-HRCCW6MA.js";
|
|
4
|
+
import {
|
|
5
|
+
__decorateClass
|
|
6
|
+
} from "./chunk-H2JE6IVU.js";
|
|
7
|
+
|
|
8
|
+
// src/lib/qti-test/components/test-section-buttons-stamp.ts
|
|
9
|
+
import { html, LitElement } from "lit";
|
|
10
|
+
import { customElement } from "lit/decorators.js";
|
|
11
|
+
import { prepareTemplate } from "stampino";
|
|
12
|
+
import { consume } from "@lit/context";
|
|
13
|
+
var TestSectionButtonsStamp = class extends LitElement {
|
|
14
|
+
createRenderRoot() {
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this._internals = this.attachInternals();
|
|
20
|
+
this._internals.ariaLabel = "pagination";
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback();
|
|
24
|
+
const templateElement = this.querySelector("template");
|
|
25
|
+
this.myTemplate = prepareTemplate(templateElement);
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
if (!this.computedContext) return html``;
|
|
29
|
+
const sections = this.computedContext.testParts.flatMap((testPart) => testPart.sections);
|
|
30
|
+
return html` ${sections.map((item) => this.myTemplate({ item }))} `;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
__decorateClass([
|
|
34
|
+
consume({ context: computedContext, subscribe: true })
|
|
35
|
+
], TestSectionButtonsStamp.prototype, "computedContext", 2);
|
|
36
|
+
TestSectionButtonsStamp = __decorateClass([
|
|
37
|
+
customElement("test-section-buttons-stamp")
|
|
38
|
+
], TestSectionButtonsStamp);
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
TestSectionButtonsStamp
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=chunk-QV4U5W67.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/qti-test/components/test-section-buttons-stamp.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { prepareTemplate } from 'stampino';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from 'stampino';\n\n@customElement('test-section-buttons-stamp')\nexport class TestSectionButtonsStamp extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n myTemplate: TemplateFunction;\n private _internals: ElementInternals;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n this._internals.ariaLabel = 'pagination';\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n render() {\n if (!this.computedContext) return html``;\n const sections = this.computedContext.testParts.flatMap(testPart => testPart.sections);\n\n return html` ${sections.map(item => this.myTemplate({ item }))} `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-section-buttons-stamp': TestSectionButtonsStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,kBAAkB;AACjC,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAQjB,IAAM,0BAAN,cAAsC,WAAW;AAAA,EAO5C,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,cAAc;AACZ,UAAM;AACN,SAAK,aAAa,KAAK,gBAAgB;AACvC,SAAK,WAAW,YAAY;AAAA,EAC9B;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEA,SAAS;AACP,QAAI,CAAC,KAAK,gBAAiB,QAAO;AAClC,UAAM,WAAW,KAAK,gBAAgB,UAAU,QAAQ,cAAY,SAAS,QAAQ;AAErF,WAAO,QAAQ,SAAS,IAAI,UAAQ,KAAK,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;AAAA,EAChE;AACF;AA3BU;AAAA,EADP,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,wBAEH;AAFG,0BAAN;AAAA,EADN,cAAc,4BAA4B;AAAA,GAC9B;","names":[]}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import {
|
|
2
|
+
sessionContext
|
|
3
|
+
} from "./chunk-QTH3WLGY.js";
|
|
4
|
+
import {
|
|
5
|
+
testContext
|
|
6
|
+
} from "./chunk-ODLYMQOS.js";
|
|
7
|
+
import {
|
|
8
|
+
computedContext
|
|
9
|
+
} from "./chunk-HRCCW6MA.js";
|
|
10
|
+
import {
|
|
11
|
+
__decorateClass
|
|
12
|
+
} from "./chunk-H2JE6IVU.js";
|
|
13
|
+
|
|
14
|
+
// src/lib/qti-test/components/test-navigation.ts
|
|
15
|
+
import { consume, provide } from "@lit/context";
|
|
16
|
+
import { html, LitElement } from "lit";
|
|
17
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
18
|
+
var TestNavigation = class extends LitElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.identifier = void 0;
|
|
22
|
+
this.initContext = [];
|
|
23
|
+
this.configContext = {};
|
|
24
|
+
this.autoScoreItems = false;
|
|
25
|
+
this.addEventListener("qti-assessment-test-connected", this._handleTestConnected.bind(this));
|
|
26
|
+
this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
|
|
27
|
+
this.addEventListener("qti-interaction-changed", this._handleInteractionChanged.bind(this));
|
|
28
|
+
this.addEventListener("test-end-attempt", this._handleTestEndAttempt.bind(this));
|
|
29
|
+
this.addEventListener("test-show-correct-response", this._handleTestShowCorrectResponse.bind(this));
|
|
30
|
+
}
|
|
31
|
+
_handleTestEndAttempt(_event) {
|
|
32
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
33
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
|
|
34
|
+
);
|
|
35
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
36
|
+
qtiAssessmentItemEl.processResponse();
|
|
37
|
+
}
|
|
38
|
+
_handleTestShowCorrectResponse(event) {
|
|
39
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
40
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
|
|
41
|
+
);
|
|
42
|
+
const qtiAssessmentItemEl = qtiItemEl.assessmentItem;
|
|
43
|
+
qtiAssessmentItemEl.showCorrectResponse(event.detail);
|
|
44
|
+
}
|
|
45
|
+
_handleInteractionChanged(_event) {
|
|
46
|
+
if (this.autoScoreItems) {
|
|
47
|
+
const qtiItemEl = this._testElement.querySelector(
|
|
48
|
+
`qti-assessment-item-ref[identifier="${this._sessionContext.navItemId}"]`
|
|
49
|
+
);
|
|
50
|
+
const qtiAssessmentItem = qtiItemEl.assessmentItem;
|
|
51
|
+
const scoreOutcomeIdentifier = qtiAssessmentItem.variables.find((v) => v.identifier === "SCORE");
|
|
52
|
+
if (scoreOutcomeIdentifier.externalScored === null && qtiAssessmentItem.adaptive === "false") {
|
|
53
|
+
qtiAssessmentItem.processResponse();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
58
|
+
return html`<slot></slot>`;
|
|
59
|
+
}
|
|
60
|
+
/* PK: on test connected we can build the computed context */
|
|
61
|
+
_handleTestConnected(event) {
|
|
62
|
+
this._testElement = event.detail;
|
|
63
|
+
const testPartElements = Array.from(this._testElement?.querySelectorAll(`qti-test-part`) || []);
|
|
64
|
+
this.computedContext = {
|
|
65
|
+
testParts: testPartElements.map((testPart, indexTestPart) => {
|
|
66
|
+
const sectionElements = [...testPart.querySelectorAll(`qti-assessment-section`)];
|
|
67
|
+
return {
|
|
68
|
+
active: indexTestPart == 0,
|
|
69
|
+
identifier: testPart.identifier,
|
|
70
|
+
sections: sectionElements.map((section, indexSection) => {
|
|
71
|
+
const itemElements = [...section.querySelectorAll(`qti-assessment-item-ref`)];
|
|
72
|
+
return {
|
|
73
|
+
active: indexSection == 0,
|
|
74
|
+
identifier: section.identifier,
|
|
75
|
+
title: section.title,
|
|
76
|
+
items: itemElements.map((item, indexItem) => {
|
|
77
|
+
return {
|
|
78
|
+
active: indexItem == 0,
|
|
79
|
+
identifier: item.identifier,
|
|
80
|
+
href: item.href
|
|
81
|
+
};
|
|
82
|
+
})
|
|
83
|
+
};
|
|
84
|
+
})
|
|
85
|
+
};
|
|
86
|
+
})
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/* PK: on item connected we can add item only properties in the xml */
|
|
90
|
+
_handleItemConnected(event) {
|
|
91
|
+
const itemElement = event.detail;
|
|
92
|
+
this.computedContext = {
|
|
93
|
+
...this.computedContext,
|
|
94
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
95
|
+
return {
|
|
96
|
+
...testPart,
|
|
97
|
+
sections: testPart.sections.map((section) => {
|
|
98
|
+
return {
|
|
99
|
+
...section,
|
|
100
|
+
items: section.items.map(
|
|
101
|
+
(item) => item.identifier === itemElement.identifier ? {
|
|
102
|
+
...item,
|
|
103
|
+
title: itemElement.title,
|
|
104
|
+
adaptive: itemElement.adaptive == "true" || false,
|
|
105
|
+
timeDependent: itemElement.timeDependent == "true" || false
|
|
106
|
+
} : item
|
|
107
|
+
)
|
|
108
|
+
};
|
|
109
|
+
})
|
|
110
|
+
};
|
|
111
|
+
})
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/* PK: on every change of the candidate we will recomputed the computedContext */
|
|
115
|
+
willUpdate(_changedProperties) {
|
|
116
|
+
if (!this.computedContext) return;
|
|
117
|
+
let itemIndex = 1;
|
|
118
|
+
this.computedContext = {
|
|
119
|
+
...this.computedContext,
|
|
120
|
+
testParts: this.computedContext.testParts.map((testPart) => {
|
|
121
|
+
return {
|
|
122
|
+
...testPart,
|
|
123
|
+
active: this._sessionContext?.navPartId === testPart.identifier || false,
|
|
124
|
+
sections: testPart.sections.map((section) => {
|
|
125
|
+
return {
|
|
126
|
+
...section,
|
|
127
|
+
active: this._sessionContext?.navSectionId === section.identifier || false,
|
|
128
|
+
completed: section.items.every(
|
|
129
|
+
(item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"
|
|
130
|
+
),
|
|
131
|
+
items: section.items.map((item) => {
|
|
132
|
+
const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
|
|
133
|
+
let computedItem;
|
|
134
|
+
if (this.initContext) {
|
|
135
|
+
const initContext = this.initContext.find((i) => i.identifier === item.identifier);
|
|
136
|
+
computedItem = { ...item, ...itemContext, ...initContext };
|
|
137
|
+
} else {
|
|
138
|
+
computedItem = { ...item, ...itemContext };
|
|
139
|
+
}
|
|
140
|
+
const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
|
|
141
|
+
const score = parseInt(rawscore?.toString());
|
|
142
|
+
const completionStatus = computedItem.variables?.find((v) => v.identifier === "completionStatus")?.value;
|
|
143
|
+
const categories = computedItem.category ? computedItem.category?.split(" ") : [];
|
|
144
|
+
const type = categories.includes(this.configContext?.infoItemCategory) ? "info" : "regular";
|
|
145
|
+
const active = this._sessionContext?.navItemId === computedItem.identifier || false;
|
|
146
|
+
const correct = (
|
|
147
|
+
// this._testContext.view === 'scorer' &&
|
|
148
|
+
type == "regular" && score !== void 0 && !isNaN(score) && score > 0 || false
|
|
149
|
+
);
|
|
150
|
+
const incorrect = (
|
|
151
|
+
// this._testContext.view === 'scorer' &&
|
|
152
|
+
type == "regular" && score !== void 0 && !isNaN(score) && score <= 0 || false
|
|
153
|
+
);
|
|
154
|
+
const completed = (
|
|
155
|
+
// this._testContext.view === 'candidate' &&
|
|
156
|
+
completionStatus === "completed"
|
|
157
|
+
);
|
|
158
|
+
const response = computedItem.variables?.find((v) => v.identifier === "RESPONSE")?.value || "";
|
|
159
|
+
const index = categories.includes(this.configContext?.infoItemCategory) ? null : itemIndex++;
|
|
160
|
+
return {
|
|
161
|
+
...computedItem,
|
|
162
|
+
// rawscore, // not necessary for outside world
|
|
163
|
+
// score, // not necessary for outside world
|
|
164
|
+
// completionStatus, // not necessary for outside world
|
|
165
|
+
// categories, // not necessary for outside world
|
|
166
|
+
type,
|
|
167
|
+
active,
|
|
168
|
+
correct,
|
|
169
|
+
incorrect,
|
|
170
|
+
completed,
|
|
171
|
+
index,
|
|
172
|
+
response
|
|
173
|
+
};
|
|
174
|
+
})
|
|
175
|
+
};
|
|
176
|
+
})
|
|
177
|
+
};
|
|
178
|
+
})
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
__decorateClass([
|
|
183
|
+
property({ type: String })
|
|
184
|
+
], TestNavigation.prototype, "identifier", 2);
|
|
185
|
+
__decorateClass([
|
|
186
|
+
state()
|
|
187
|
+
], TestNavigation.prototype, "initContext", 2);
|
|
188
|
+
__decorateClass([
|
|
189
|
+
state(),
|
|
190
|
+
consume({ context: testContext, subscribe: true })
|
|
191
|
+
], TestNavigation.prototype, "_testContext", 2);
|
|
192
|
+
__decorateClass([
|
|
193
|
+
state(),
|
|
194
|
+
consume({ context: sessionContext, subscribe: true })
|
|
195
|
+
], TestNavigation.prototype, "_sessionContext", 2);
|
|
196
|
+
__decorateClass([
|
|
197
|
+
state()
|
|
198
|
+
], TestNavigation.prototype, "configContext", 2);
|
|
199
|
+
__decorateClass([
|
|
200
|
+
state(),
|
|
201
|
+
provide({ context: computedContext })
|
|
202
|
+
], TestNavigation.prototype, "computedContext", 2);
|
|
203
|
+
__decorateClass([
|
|
204
|
+
property({ type: Boolean, attribute: "auto-score-items" })
|
|
205
|
+
], TestNavigation.prototype, "autoScoreItems", 2);
|
|
206
|
+
TestNavigation = __decorateClass([
|
|
207
|
+
customElement("test-navigation")
|
|
208
|
+
], TestNavigation);
|
|
209
|
+
|
|
210
|
+
export {
|
|
211
|
+
TestNavigation
|
|
212
|
+
};
|
|
213
|
+
//# sourceMappingURL=chunk-R7HYOALH.js.map
|