@citolab/qti-components 7.0.8 → 7.0.9-beta.1
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-3AHQU35T.js +1 -0
- package/cdn/chunks/chunk-4AGTWY6I.js +1 -0
- package/cdn/{chunk-A536ZOJJ.js → chunks/chunk-6EIGTAJQ.js} +2 -4
- package/cdn/chunks/chunk-6UEXCXHG.js +17 -0
- package/cdn/chunks/chunk-BJL2ZC5L.js +1 -0
- package/{dist/chunks/chunk-NZQKGIJP.js → cdn/chunks/chunk-DKMHSSEK.js} +13 -24
- package/cdn/chunks/chunk-EG3QNAM6.js +939 -0
- package/cdn/chunks/chunk-FB3WTNRH.js +8 -0
- package/cdn/chunks/chunk-GCKESRQG.js +1 -0
- package/cdn/chunks/{chunk-4ILXLVT5.js → chunk-I5J4YQIW.js} +13 -34
- package/cdn/chunks/chunk-IKDNYCM7.js +1 -0
- package/cdn/chunks/chunk-KDO3T66B.js +1 -0
- package/cdn/chunks/chunk-KQPTKMFJ.js +1 -0
- package/cdn/chunks/chunk-M5PPZ5M3.js +59 -0
- package/cdn/chunks/chunk-O5MMIBRR.js +10 -0
- package/cdn/chunks/chunk-OEXGDZO2.js +8 -0
- package/cdn/chunks/{chunk-RXKI3AO4.js → chunk-R45JL2ZY.js} +1 -1
- package/cdn/chunks/chunk-W2VSEYLY.js +8 -0
- package/cdn/chunks/chunk-WYDU2FBY.js +8 -0
- package/cdn/chunks/chunk-X7T7HK65.js +8 -0
- package/cdn/chunks/{chunk-X2KBNXRO.js → chunk-YIYKK4RV.js} +1 -1
- package/cdn/exports/computed.context.js +1 -0
- package/cdn/exports/config.context.js +1 -0
- package/cdn/exports/qti-assessment-item.context.js +1 -1
- package/cdn/exports/qti-condition-expression.js +1 -1
- package/cdn/exports/qti-expression.js +1 -1
- package/cdn/exports/session.context.js +1 -0
- package/cdn/exports/test.context.js +1 -0
- 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 -3549
- 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 -0
- package/cdn/qti-test/components/test-next.js +1 -1
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -1
- package/cdn/qti-test/components/test-prev.js +1 -1
- package/cdn/qti-test/components/test-show-correct-response.js +1 -1
- package/cdn/qti-test/components/test-view.js +1 -1
- package/cdn/qti-test/core/index.js +1 -1
- package/dist/chunks/chunk-3A4IOMBQ.js +8 -0
- package/dist/chunks/chunk-3A4IOMBQ.js.map +1 -0
- package/dist/chunks/{chunk-E4TWZ2DL.js → chunk-5E4OEZCA.js} +495 -179
- package/dist/chunks/chunk-5E4OEZCA.js.map +1 -0
- package/dist/chunks/{chunk-J2SHENRN.js → chunk-BH5H7BSS.js} +107 -21
- package/dist/chunks/chunk-BH5H7BSS.js.map +1 -0
- package/dist/chunks/chunk-CBYNKDSF.js +1 -0
- package/dist/chunks/{chunk-WWN5AD6V.js → chunk-CHINL5UJ.js} +12 -7
- package/dist/chunks/chunk-CHINL5UJ.js.map +1 -0
- package/dist/chunks/{chunk-W4272Q5U.js → chunk-CWCYTL3F.js} +18 -8
- package/dist/chunks/chunk-CWCYTL3F.js.map +1 -0
- package/dist/chunks/{chunk-GQ5P3NWC.js → chunk-FZVLLSCM.js} +18 -8
- package/dist/chunks/chunk-FZVLLSCM.js.map +1 -0
- package/dist/chunks/chunk-GNCPECOC.js +45 -0
- package/dist/chunks/chunk-GNCPECOC.js.map +1 -0
- package/dist/chunks/{chunk-YOXF6JPS.js → chunk-GRYVMG5Q.js} +135 -193
- package/dist/chunks/chunk-GRYVMG5Q.js.map +1 -0
- package/dist/chunks/{chunk-BPHQLJWE.js → chunk-I7HVKMDI.js} +2 -2
- package/dist/chunks/chunk-I7HVKMDI.js.map +1 -0
- package/dist/chunks/chunk-J4MM4JXS.js +8 -0
- package/dist/chunks/chunk-J4MM4JXS.js.map +1 -0
- package/dist/chunks/{chunk-FV7HWK54.js → chunk-JUAS2TVR.js} +1 -1
- package/dist/chunks/chunk-JUAS2TVR.js.map +1 -0
- package/dist/chunks/chunk-K6EUKFNW.js +43 -0
- package/dist/chunks/chunk-K6EUKFNW.js.map +1 -0
- package/dist/chunks/chunk-LZ7UIV5O.js +91 -0
- package/dist/chunks/chunk-LZ7UIV5O.js.map +1 -0
- package/dist/chunks/{chunk-KOEILLVS.js → chunk-NJNQOQUU.js} +1 -1
- package/dist/chunks/chunk-NJNQOQUU.js.map +1 -0
- package/dist/chunks/chunk-ODLYMQOS.js +8 -0
- package/dist/chunks/chunk-ODLYMQOS.js.map +1 -0
- package/dist/chunks/{chunk-XSI6FXGD.js → chunk-OOQLWOYU.js} +2 -2
- package/dist/chunks/{chunk-NHA53UTY.js → chunk-PR6AZWRP.js} +3 -6
- package/dist/chunks/chunk-PR6AZWRP.js.map +1 -0
- package/dist/chunks/chunk-QAA6MWGE.js +170 -0
- package/dist/chunks/chunk-QAA6MWGE.js.map +1 -0
- package/dist/{chunk-2CHF3TMY.js → chunks/chunk-QGPXAPBK.js} +119 -20
- package/dist/chunks/chunk-QGPXAPBK.js.map +1 -0
- package/dist/chunks/chunk-QTH3WLGY.js +8 -0
- package/dist/chunks/chunk-QTH3WLGY.js.map +1 -0
- package/dist/chunks/{chunk-DLUJN2FW.js → chunk-W7ZXKJ5O.js} +1 -1
- package/dist/chunks/chunk-W7ZXKJ5O.js.map +1 -0
- package/dist/chunks/{chunk-OIRWOI3E.js → chunk-WRHEO7NG.js} +1 -1
- package/dist/chunks/chunk-WRHEO7NG.js.map +1 -0
- package/dist/chunks/chunk-WXART76T.js +95 -0
- package/dist/chunks/chunk-WXART76T.js.map +1 -0
- package/dist/exports/computed.context.d.ts +30 -0
- package/dist/exports/computed.context.js +8 -0
- package/dist/exports/config.context.d.ts +8 -0
- package/dist/exports/config.context.js +8 -0
- package/dist/exports/interaction.js +1 -1
- package/dist/exports/item.context.d.ts +3 -3
- package/dist/exports/item.context.js +1 -1
- package/dist/exports/qti-assessment-item.context.d.ts +1 -1
- package/dist/exports/qti-assessment-item.context.js +1 -1
- package/dist/exports/qti-condition-expression.d.ts +1 -1
- package/dist/exports/qti-condition-expression.js +3 -3
- package/dist/exports/qti-expression.d.ts +1 -1
- package/dist/exports/qti-expression.js +2 -2
- package/dist/exports/session.context.d.ts +12 -0
- package/dist/exports/session.context.js +8 -0
- package/dist/exports/test.context.d.ts +16 -0
- package/dist/exports/test.context.js +8 -0
- package/dist/exports/variables.d.ts +1 -1
- package/dist/index.d.ts +11 -6
- package/dist/index.js +62 -55
- package/dist/item.css +7 -16
- package/dist/qti-components/index.d.ts +44 -26
- package/dist/qti-components/index.js +11 -7
- package/dist/qti-components-jsx.d.ts +144 -86
- package/dist/qti-item/core/index.js +2 -3
- package/dist/qti-loader/index.d.ts +2 -2
- package/dist/qti-loader/index.js +1 -1
- package/dist/{qti-response-declaration-Di9CsqiJ.d.ts → qti-response-declaration-CESClJ3_.d.ts} +7 -3
- package/dist/qti-test/components/index.d.ts +11 -5
- package/dist/qti-test/components/index.js +28 -19
- package/dist/qti-test/components/test-container.d.ts +3 -1
- package/dist/qti-test/components/test-container.js +6 -3778
- package/dist/qti-test/components/test-container.js.map +1 -1
- package/dist/qti-test/components/test-end-attempt.d.ts +4 -11
- package/dist/qti-test/components/test-end-attempt.js +3 -5
- package/dist/qti-test/components/test-item-link.d.ts +2 -11
- package/dist/qti-test/components/test-item-link.js +1 -5
- package/dist/qti-test/components/test-navigation.d.ts +35 -0
- package/dist/qti-test/components/test-navigation.js +12 -0
- package/dist/qti-test/components/test-navigation.js.map +1 -0
- package/dist/qti-test/components/test-next.d.ts +12 -12
- package/dist/qti-test/components/test-next.js +4 -4
- package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +8 -15
- package/dist/qti-test/components/test-paging-buttons-stamp.js +2 -5
- package/dist/qti-test/components/test-prev.d.ts +11 -12
- package/dist/qti-test/components/test-prev.js +4 -4
- package/dist/qti-test/components/test-show-correct-response.d.ts +4 -11
- package/dist/qti-test/components/test-show-correct-response.js +3 -5
- package/dist/qti-test/components/test-view.d.ts +3 -12
- package/dist/qti-test/components/test-view.js +2 -4
- package/dist/qti-test/core/index.d.ts +18 -48
- package/dist/qti-test/core/index.js +7 -12
- package/dist/{test.context-C2LBA3w4.d.ts → qti-test-part-BAM_WUTL.d.ts} +17 -33
- package/dist/{variables-cO3DzqJy.d.ts → variables-DNDfraER.d.ts} +14 -1
- package/dist/vscode.html-custom-data.json +49 -30
- package/package.json +20 -19
- package/cdn/chunk-4DFVJE2A.js +0 -48
- package/cdn/chunk-4I75QSIL.js +0 -8
- package/cdn/chunk-5WCOPF7O.js +0 -73
- package/cdn/chunk-66PERJA3.js +0 -939
- package/cdn/chunk-6WNSQ7U6.js +0 -939
- package/cdn/chunk-AT2C24P4.js +0 -8
- package/cdn/chunk-BLKKKK6C.js +0 -11
- package/cdn/chunk-DC2R556M.js +0 -5
- package/cdn/chunk-GALSGMIP.js +0 -5
- package/cdn/chunk-IXSX4SJX.js +0 -1
- package/cdn/chunk-KYOTSBCX.js +0 -1
- package/cdn/chunk-L4TDHAKL.js +0 -24
- package/cdn/chunk-LVW3MHTI.js +0 -23
- package/cdn/chunk-M6AATWPS.js +0 -59
- package/cdn/chunk-MFWSHIPH.js +0 -17
- package/cdn/chunk-QGKK4T2J.js +0 -8
- package/cdn/chunk-ROXN2HIJ.js +0 -8
- package/cdn/chunk-SQDSHH6N.js +0 -3539
- package/cdn/chunk-TJMODUN5.js +0 -8
- package/cdn/chunk-VI2WKTN4.js +0 -1
- package/cdn/chunk-Z6SKK5ZX.js +0 -8
- package/cdn/chunks/chunk-3GO57DNP.js +0 -0
- package/cdn/chunks/chunk-3V6LA7B3.js +0 -8
- package/cdn/chunks/chunk-4PEUIMDK.js +0 -8
- package/cdn/chunks/chunk-4WXQYE2P.js +0 -8
- package/cdn/chunks/chunk-5P7CTN7Q.js +0 -11
- package/cdn/chunks/chunk-5X76K77R.js +0 -8
- package/cdn/chunks/chunk-6MCYE7P5.js +0 -1
- package/cdn/chunks/chunk-6PW2L463.js +0 -0
- package/cdn/chunks/chunk-6S4CDN3T.js +0 -43
- package/cdn/chunks/chunk-76VGZJCP.js +0 -934
- package/cdn/chunks/chunk-7RBGYKOX.js +0 -5
- package/cdn/chunks/chunk-7XYBFL7U.js +0 -934
- package/cdn/chunks/chunk-AJJJAZWM.js +0 -1
- package/cdn/chunks/chunk-ANDPD7F2.js +0 -5
- package/cdn/chunks/chunk-ARHBUT6F.js +0 -5
- package/cdn/chunks/chunk-AUHO2E7V.js +0 -934
- package/cdn/chunks/chunk-CZ3CSGCE.js +0 -934
- package/cdn/chunks/chunk-D3GR6AUG.js +0 -43
- package/cdn/chunks/chunk-DZCKF45D.js +0 -5
- package/cdn/chunks/chunk-EFU4L43Q.js +0 -8
- package/cdn/chunks/chunk-FM5C34DM.js +0 -934
- package/cdn/chunks/chunk-FRS2J3OS.js +0 -59
- package/cdn/chunks/chunk-GMK2YRB2.js +0 -934
- package/cdn/chunks/chunk-H2V2RXUW.js +0 -11
- package/cdn/chunks/chunk-HUMOYGEM.js +0 -43
- package/cdn/chunks/chunk-IMJOPCFR.js +0 -1
- package/cdn/chunks/chunk-IQZ7AOCQ.js +0 -8
- package/cdn/chunks/chunk-J3JSSCM6.js +0 -5
- package/cdn/chunks/chunk-KHLUVO6Y.js +0 -8
- package/cdn/chunks/chunk-LARBLB7K.js +0 -8
- package/cdn/chunks/chunk-LNFCEHB3.js +0 -934
- package/cdn/chunks/chunk-MJMONWKB.js +0 -3539
- package/cdn/chunks/chunk-N5OHGRGG.js +0 -8
- package/cdn/chunks/chunk-NDHSIO2G.js +0 -8
- package/cdn/chunks/chunk-NRY3WHJD.js +0 -5
- package/cdn/chunks/chunk-PKT2SJQD.js +0 -8
- package/cdn/chunks/chunk-PPWEIKLT.js +0 -1
- package/cdn/chunks/chunk-PT523RSK.js +0 -8
- package/cdn/chunks/chunk-QD3NT5PG.js +0 -934
- package/cdn/chunks/chunk-QTK4CPHP.js +0 -8
- package/cdn/chunks/chunk-QV6I5NVQ.js +0 -8
- package/cdn/chunks/chunk-R33OODNX.js +0 -1
- package/cdn/chunks/chunk-RIXTWE2H.js +0 -8
- package/cdn/chunks/chunk-ROZIP5LG.js +0 -8
- package/cdn/chunks/chunk-RPZVSBLM.js +0 -8
- package/cdn/chunks/chunk-SATSEEWJ.js +0 -934
- package/cdn/chunks/chunk-SXM25YH3.js +0 -934
- package/cdn/chunks/chunk-T2KKTMAT.js +0 -934
- package/cdn/chunks/chunk-TEYXRLTI.js +0 -8
- package/cdn/chunks/chunk-TQBDBMWL.js +0 -5
- package/cdn/chunks/chunk-TV3SPOLH.js +0 -8
- package/cdn/chunks/chunk-TVDTF6P6.js +0 -934
- package/cdn/chunks/chunk-U2TE6TOV.js +0 -934
- package/cdn/chunks/chunk-W5Y3ZU2W.js +0 -5
- package/cdn/chunks/chunk-WPGJ54IP.js +0 -1
- package/cdn/chunks/chunk-YHWMZAZD.js +0 -43
- package/cdn/chunks/chunk-YVZ742ID.js +0 -934
- package/cdn/chunks/chunk-YWH4TGMA.js +0 -5
- package/cdn/chunks/chunk-YXR6KSZI.js +0 -11
- package/cdn/qti-components/index.global.js +0 -226
- package/cdn/qti-item/components/index.global.js +0 -149
- package/cdn/qti-item/components/index.js +0 -3549
- package/cdn/qti-item/components/item-container.global.js +0 -149
- package/cdn/qti-item/components/item-container.js +0 -3549
- package/cdn/qti-item/core/index.global.js +0 -149
- package/cdn/qti-item/index.global.js +0 -149
- package/cdn/qti-item/index.js +0 -3549
- package/cdn/qti-item/qti-item.global.js +0 -114
- package/cdn/qti-item/qti-item.js +0 -1
- package/cdn/qti-loader/index.global.js +0 -1
- package/cdn/qti-test/components/index.global.js +0 -207
- package/cdn/qti-test/components/styles.global.js +0 -44
- package/cdn/qti-test/components/test-component.abstract.global.js +0 -170
- package/cdn/qti-test/components/test-component.abstract.js +0 -1
- package/cdn/qti-test/components/test-container.global.js +0 -149
- package/cdn/qti-test/components/test-item-link.global.js +0 -170
- package/cdn/qti-test/components/test-next.global.js +0 -170
- package/cdn/qti-test/components/test-next.spec.css +0 -1
- package/cdn/qti-test/components/test-next.spec.global.js +0 -64
- package/cdn/qti-test/components/test-next.spec.js +0 -713
- package/cdn/qti-test/components/test-paging-buttons-stamp.global.js +0 -207
- package/cdn/qti-test/components/test-prev.global.js +0 -170
- package/cdn/qti-test/components/test-view.global.js +0 -170
- package/cdn/qti-test/context/index.global.js +0 -58
- package/cdn/qti-test/context/index.js +0 -1
- package/cdn/qti-test/context/test.context.global.js +0 -58
- package/cdn/qti-test/context/test.context.js +0 -1
- package/cdn/qti-test/core/index.global.js +0 -205
- package/cdn/qti-test/index.global.js +0 -242
- package/cdn/qti-test/index.js +0 -3598
- package/cdn/qti-test/mixins/index.global.js +0 -1
- package/cdn/qti-test/mixins/index.js +0 -23
- package/cdn/qti-test/mixins/test-loader.mixin.global.js +0 -1
- package/cdn/qti-test/mixins/test-loader.mixin.js +0 -23
- package/cdn/qti-test/mixins/test-navigation.mixin.global.js +0 -1
- package/cdn/qti-test/mixins/test-navigation.mixin.js +0 -1
- package/cdn/qti-test/mixins/test-view.mixin.global.js +0 -1
- package/cdn/qti-test/mixins/test-view.mixin.js +0 -1
- package/cdn/qti-test/qti-assessment-test/index.global.js +0 -170
- package/cdn/qti-test/qti-assessment-test/index.js +0 -1
- package/cdn/qti-test/qti-assessment-test/qti-assessment-item-ref.global.js +0 -170
- package/cdn/qti-test/qti-assessment-test/qti-assessment-item-ref.js +0 -1
- package/cdn/qti-test/qti-assessment-test/qti-assessment-section.global.js +0 -170
- package/cdn/qti-test/qti-assessment-test/qti-assessment-section.js +0 -1
- package/cdn/qti-test/qti-assessment-test/qti-assessment-test.global.js +0 -170
- package/cdn/qti-test/qti-assessment-test/qti-assessment-test.js +0 -1
- package/cdn/qti-test/qti-assessment-test/qti-test-part.global.js +0 -114
- package/cdn/qti-test/qti-assessment-test/qti-test-part.js +0 -1
- package/cdn/qti-test/qti-test.global.js +0 -170
- package/cdn/qti-test/qti-test.js +0 -23
- package/cdn/qti-test/test-base.global.js +0 -170
- package/cdn/qti-test/test-base.js +0 -1
- package/cdn/qti-transformers/index.global.js +0 -1
- package/dist/chunk-2CHF3TMY.js.map +0 -1
- package/dist/chunk-2LWLX7WV.js +0 -6307
- package/dist/chunk-2LWLX7WV.js.map +0 -1
- package/dist/chunk-2OA7E3E7.js +0 -294
- package/dist/chunk-2OA7E3E7.js.map +0 -1
- package/dist/chunk-3G364JZC.js +0 -72
- package/dist/chunk-3G364JZC.js.map +0 -1
- package/dist/chunk-44VE5POH.js +0 -55
- package/dist/chunk-4YG2FPKK.js +0 -31
- package/dist/chunk-4YG2FPKK.js.map +0 -1
- package/dist/chunk-6TUE644E.js +0 -569
- package/dist/chunk-6TUE644E.js.map +0 -1
- package/dist/chunk-6ZMD232X.js +0 -78
- package/dist/chunk-6ZMD232X.js.map +0 -1
- package/dist/chunk-AYRSHIHA.js +0 -50
- package/dist/chunk-AYRSHIHA.js.map +0 -1
- package/dist/chunk-BN32D5J2.js +0 -43
- package/dist/chunk-BN32D5J2.js.map +0 -1
- package/dist/chunk-CJRXRBRQ.js +0 -50
- package/dist/chunk-CJRXRBRQ.js.map +0 -1
- package/dist/chunk-GPJ6WTE5.js +0 -118
- package/dist/chunk-GPJ6WTE5.js.map +0 -1
- package/dist/chunk-KAUHKHPH.js +0 -50
- package/dist/chunk-KAUHKHPH.js.map +0 -1
- package/dist/chunk-MAC76UNI.js +0 -1
- package/dist/chunk-QYN5S4EM.js +0 -107
- package/dist/chunk-QYN5S4EM.js.map +0 -1
- package/dist/chunk-UB5K44DB.js +0 -30
- package/dist/chunk-UB5K44DB.js.map +0 -1
- package/dist/chunk-UJTJIU3C.js +0 -43
- package/dist/chunk-UJTJIU3C.js.map +0 -1
- package/dist/chunk-XVQZ5JI5.js +0 -50
- package/dist/chunk-XVQZ5JI5.js.map +0 -1
- package/dist/chunk-XW3PQRKW.js +0 -6306
- package/dist/chunk-XW3PQRKW.js.map +0 -1
- package/dist/chunk-YQ7EXOAK.js +0 -10
- package/dist/chunk-YQ7EXOAK.js.map +0 -1
- package/dist/chunks/chunk-2V6LQV2K.js +0 -50
- package/dist/chunks/chunk-2V6LQV2K.js.map +0 -1
- package/dist/chunks/chunk-3EU75IUF.js +0 -118
- package/dist/chunks/chunk-3EU75IUF.js.map +0 -1
- package/dist/chunks/chunk-3QQFMVDS.js +0 -118
- package/dist/chunks/chunk-3QQFMVDS.js.map +0 -1
- package/dist/chunks/chunk-4GNVYCBN.js +0 -627
- package/dist/chunks/chunk-4GNVYCBN.js.map +0 -1
- package/dist/chunks/chunk-4MQV5IRV.js +0 -59
- package/dist/chunks/chunk-4MQV5IRV.js.map +0 -1
- package/dist/chunks/chunk-4WVLWWYJ.js +0 -50
- package/dist/chunks/chunk-4WVLWWYJ.js.map +0 -1
- package/dist/chunks/chunk-5KVGRLYT.js +0 -10
- package/dist/chunks/chunk-5KVGRLYT.js.map +0 -1
- package/dist/chunks/chunk-5PCD2B62.js +0 -6091
- package/dist/chunks/chunk-5PCD2B62.js.map +0 -1
- package/dist/chunks/chunk-5RTLOB3Q.js +0 -59
- package/dist/chunks/chunk-5RTLOB3Q.js.map +0 -1
- package/dist/chunks/chunk-6JXR63MH.js +0 -50
- package/dist/chunks/chunk-6JXR63MH.js.map +0 -1
- package/dist/chunks/chunk-6PAEJQSQ.js +0 -6058
- package/dist/chunks/chunk-6PAEJQSQ.js.map +0 -1
- package/dist/chunks/chunk-6QT4LIPL.js +0 -623
- package/dist/chunks/chunk-6QT4LIPL.js.map +0 -1
- package/dist/chunks/chunk-7QMCKYDR.js +0 -43
- package/dist/chunks/chunk-7QMCKYDR.js.map +0 -1
- package/dist/chunks/chunk-A24F75DB.js +0 -72
- package/dist/chunks/chunk-A24F75DB.js.map +0 -1
- package/dist/chunks/chunk-AUWATZ65.js +0 -10
- package/dist/chunks/chunk-AUWATZ65.js.map +0 -1
- package/dist/chunks/chunk-AXTEKPP5.js +0 -6084
- package/dist/chunks/chunk-AXTEKPP5.js.map +0 -1
- package/dist/chunks/chunk-B6MJCAOF.js +0 -6063
- package/dist/chunks/chunk-B6MJCAOF.js.map +0 -1
- package/dist/chunks/chunk-BJ2JLJIJ.js +0 -623
- package/dist/chunks/chunk-BJ2JLJIJ.js.map +0 -1
- package/dist/chunks/chunk-BPHQLJWE.js.map +0 -1
- package/dist/chunks/chunk-CD3E4M5Y.js +0 -107
- package/dist/chunks/chunk-CD3E4M5Y.js.map +0 -1
- package/dist/chunks/chunk-CEXAR7BF.js +0 -52
- package/dist/chunks/chunk-CEXAR7BF.js.map +0 -1
- package/dist/chunks/chunk-CWYAQA25.js +0 -6067
- package/dist/chunks/chunk-CWYAQA25.js.map +0 -1
- package/dist/chunks/chunk-D3QX5N57.js +0 -6117
- package/dist/chunks/chunk-D3QX5N57.js.map +0 -1
- package/dist/chunks/chunk-DLUJN2FW.js.map +0 -1
- package/dist/chunks/chunk-DNHDFXTV.js +0 -59
- package/dist/chunks/chunk-DNHDFXTV.js.map +0 -1
- package/dist/chunks/chunk-E4TWZ2DL.js.map +0 -1
- package/dist/chunks/chunk-FV7HWK54.js.map +0 -1
- package/dist/chunks/chunk-GQ5P3NWC.js.map +0 -1
- package/dist/chunks/chunk-GSWZT6N2.js +0 -50
- package/dist/chunks/chunk-GSWZT6N2.js.map +0 -1
- package/dist/chunks/chunk-HHVRU3AJ.js +0 -107
- package/dist/chunks/chunk-HHVRU3AJ.js.map +0 -1
- package/dist/chunks/chunk-HOTNM5DT.js +0 -1
- package/dist/chunks/chunk-IWG66KQQ.js +0 -107
- package/dist/chunks/chunk-IWG66KQQ.js.map +0 -1
- package/dist/chunks/chunk-J2SHENRN.js.map +0 -1
- package/dist/chunks/chunk-K6ATVWMP.js +0 -6091
- package/dist/chunks/chunk-K6ATVWMP.js.map +0 -1
- package/dist/chunks/chunk-KOEILLVS.js.map +0 -1
- package/dist/chunks/chunk-KYAIMBP5.js +0 -78
- package/dist/chunks/chunk-KYAIMBP5.js.map +0 -1
- package/dist/chunks/chunk-LNISKMIL.js +0 -6063
- package/dist/chunks/chunk-LNISKMIL.js.map +0 -1
- package/dist/chunks/chunk-LNKJEW5E.js +0 -627
- package/dist/chunks/chunk-LNKJEW5E.js.map +0 -1
- package/dist/chunks/chunk-LXJA3VP2.js +0 -72
- package/dist/chunks/chunk-LXJA3VP2.js.map +0 -1
- package/dist/chunks/chunk-MLT7V47R.js +0 -100
- package/dist/chunks/chunk-MLT7V47R.js.map +0 -1
- package/dist/chunks/chunk-N5FPZNMX.js +0 -43
- package/dist/chunks/chunk-N5FPZNMX.js.map +0 -1
- package/dist/chunks/chunk-NHA53UTY.js.map +0 -1
- package/dist/chunks/chunk-NZQKGIJP.js.map +0 -1
- package/dist/chunks/chunk-O6WEZVEM.js +0 -43
- package/dist/chunks/chunk-O6WEZVEM.js.map +0 -1
- package/dist/chunks/chunk-OIRWOI3E.js.map +0 -1
- package/dist/chunks/chunk-PWOY6REC.js +0 -6064
- package/dist/chunks/chunk-PWOY6REC.js.map +0 -1
- package/dist/chunks/chunk-QJELKGWM.js +0 -6061
- package/dist/chunks/chunk-QJELKGWM.js.map +0 -1
- package/dist/chunks/chunk-QUB54PXZ.js +0 -50
- package/dist/chunks/chunk-QUB54PXZ.js.map +0 -1
- package/dist/chunks/chunk-RX3BRYYI.js +0 -59
- package/dist/chunks/chunk-RX3BRYYI.js.map +0 -1
- package/dist/chunks/chunk-UEEMM6H2.js +0 -6090
- package/dist/chunks/chunk-UEEMM6H2.js.map +0 -1
- package/dist/chunks/chunk-UFYWCLXF.js +0 -10
- package/dist/chunks/chunk-UFYWCLXF.js.map +0 -1
- package/dist/chunks/chunk-UN2IFSGC.js +0 -1
- package/dist/chunks/chunk-VAPB5TN4.js +0 -46
- package/dist/chunks/chunk-VAPB5TN4.js.map +0 -1
- package/dist/chunks/chunk-VBF3GCZK.js +0 -50
- package/dist/chunks/chunk-VBF3GCZK.js.map +0 -1
- package/dist/chunks/chunk-W4272Q5U.js.map +0 -1
- package/dist/chunks/chunk-WWN5AD6V.js.map +0 -1
- package/dist/chunks/chunk-X226BX2U.js +0 -78
- package/dist/chunks/chunk-X226BX2U.js.map +0 -1
- package/dist/chunks/chunk-XCHS3RTZ.js +0 -107
- package/dist/chunks/chunk-XCHS3RTZ.js.map +0 -1
- package/dist/chunks/chunk-YFC3BVN2.js +0 -78
- package/dist/chunks/chunk-YFC3BVN2.js.map +0 -1
- package/dist/chunks/chunk-YOXF6JPS.js.map +0 -1
- package/dist/chunks/chunk-YQB6YLNW.js +0 -78
- package/dist/chunks/chunk-YQB6YLNW.js.map +0 -1
- package/dist/chunks/chunk-Z5THRO6Z.js +0 -46
- package/dist/chunks/chunk-Z5THRO6Z.js.map +0 -1
- package/dist/chunks/chunk-ZHAJ3CMP.js +0 -6091
- package/dist/chunks/chunk-ZHAJ3CMP.js.map +0 -1
- package/dist/chunks/chunk-ZPNJ2HP5.js +0 -71
- package/dist/chunks/chunk-ZPNJ2HP5.js.map +0 -1
- package/dist/chunks/chunk-ZQXZ6PK7.js +0 -649
- package/dist/chunks/chunk-ZQXZ6PK7.js.map +0 -1
- package/dist/custom-element-eslint-rules.js +0 -337
- package/dist/custom-elements.json +0 -27158
- package/dist/loader/index.d.ts +0 -20
- package/dist/loader/index.js +0 -310
- package/dist/loader/index.js.map +0 -1
- package/dist/qti-components/index.cjs +0 -6773
- package/dist/qti-components/index.cjs.map +0 -1
- package/dist/qti-components/index.d.cts +0 -150
- package/dist/qti-item/components/index.d.ts +0 -3
- package/dist/qti-item/components/index.js +0 -3856
- package/dist/qti-item/components/index.js.map +0 -1
- package/dist/qti-item/components/item-container.d.ts +0 -40
- package/dist/qti-item/components/item-container.js +0 -3856
- package/dist/qti-item/components/item-container.js.map +0 -1
- package/dist/qti-item/index.cjs +0 -89
- package/dist/qti-item/index.cjs.map +0 -1
- package/dist/qti-item/index.d.cts +0 -24
- package/dist/qti-item/index.d.ts +0 -4
- package/dist/qti-item/index.js +0 -3869
- package/dist/qti-item/index.js.map +0 -1
- package/dist/qti-item/qti-item.d.ts +0 -25
- package/dist/qti-item/qti-item.js +0 -26
- package/dist/qti-item/qti-item.js.map +0 -1
- package/dist/qti-loader/index.cjs +0 -332
- package/dist/qti-loader/index.cjs.map +0 -1
- package/dist/qti-loader/index.d.cts +0 -20
- package/dist/qti-response-declaration-DAeBp8HH.d.ts +0 -1008
- package/dist/qti-response-declaration-ucAqd0qK.d.ts +0 -1034
- package/dist/qti-simple-choice-3M44uWiN.d.ts +0 -1153
- package/dist/qti-simple-choice-B5GnzbqW.d.ts +0 -1080
- package/dist/qti-simple-choice-BOLF9wXz.d.ts +0 -1170
- package/dist/qti-simple-choice-BeixIkA0.d.ts +0 -1088
- package/dist/qti-simple-choice-BiEjEO6s.d.ts +0 -1152
- package/dist/qti-simple-choice-Bo_ikO6H.d.ts +0 -1198
- package/dist/qti-simple-choice-C0CcrtK5.d.ts +0 -1169
- package/dist/qti-simple-choice-Cgh1-Jbr.d.cts +0 -1185
- package/dist/qti-simple-choice-Cgh1-Jbr.d.ts +0 -1185
- package/dist/qti-simple-choice-Cn5y-Ta8.d.ts +0 -1158
- package/dist/qti-simple-choice-D0GiMrqD.d.ts +0 -1168
- package/dist/qti-simple-choice-DxWcdKHi.d.ts +0 -1158
- package/dist/qti-simple-choice-R_LxBTp8.d.ts +0 -1158
- package/dist/qti-simple-choice-hAIyfF0z.d.ts +0 -1114
- package/dist/qti-simple-choice-o4rje1RA.d.ts +0 -1176
- package/dist/qti-simple-choice-v2GxpPNh.d.ts +0 -1181
- package/dist/qti-test/components/test-component.abstract.d.ts +0 -26
- package/dist/qti-test/components/test-component.abstract.js +0 -11
- package/dist/qti-test/components/test-next.spec.css +0 -2481
- package/dist/qti-test/components/test-next.spec.css.map +0 -1
- package/dist/qti-test/components/test-next.spec.d.ts +0 -13
- package/dist/qti-test/components/test-next.spec.js +0 -45904
- package/dist/qti-test/components/test-next.spec.js.map +0 -1
- package/dist/qti-test/context/index.d.ts +0 -6
- package/dist/qti-test/context/index.js +0 -9
- package/dist/qti-test/context/index.js.map +0 -1
- package/dist/qti-test/context/test.context.d.ts +0 -6
- package/dist/qti-test/context/test.context.js +0 -9
- package/dist/qti-test/context/test.context.js.map +0 -1
- package/dist/qti-test/index.cjs +0 -4823
- package/dist/qti-test/index.cjs.map +0 -1
- package/dist/qti-test/index.d.cts +0 -304
- package/dist/qti-test/index.d.ts +0 -14
- package/dist/qti-test/index.js +0 -4746
- package/dist/qti-test/index.js.map +0 -1
- package/dist/qti-test/mixins/index.d.ts +0 -8
- package/dist/qti-test/mixins/index.js +0 -350
- package/dist/qti-test/mixins/index.js.map +0 -1
- package/dist/qti-test/mixins/test-loader.mixin.d.ts +0 -8
- package/dist/qti-test/mixins/test-loader.mixin.js +0 -240
- package/dist/qti-test/mixins/test-loader.mixin.js.map +0 -1
- package/dist/qti-test/mixins/test-navigation.mixin.d.ts +0 -22
- package/dist/qti-test/mixins/test-navigation.mixin.js +0 -64
- package/dist/qti-test/mixins/test-navigation.mixin.js.map +0 -1
- package/dist/qti-test/mixins/test-view.mixin.d.ts +0 -6
- package/dist/qti-test/mixins/test-view.mixin.js +0 -50
- package/dist/qti-test/mixins/test-view.mixin.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/index.d.ts +0 -6
- package/dist/qti-test/qti-assessment-test/index.js +0 -221
- package/dist/qti-test/qti-assessment-test/index.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.d.ts +0 -6
- package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.js +0 -85
- package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/qti-assessment-section.d.ts +0 -6
- package/dist/qti-test/qti-assessment-test/qti-assessment-section.js +0 -73
- package/dist/qti-test/qti-assessment-test/qti-assessment-section.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/qti-assessment-test.d.ts +0 -6
- package/dist/qti-test/qti-assessment-test/qti-assessment-test.js +0 -54
- package/dist/qti-test/qti-assessment-test/qti-assessment-test.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/qti-test-part.d.ts +0 -19
- package/dist/qti-test/qti-assessment-test/qti-test-part.js +0 -62
- package/dist/qti-test/qti-assessment-test/qti-test-part.js.map +0 -1
- package/dist/qti-test/qti-test.d.ts +0 -68
- package/dist/qti-test/qti-test.js +0 -500
- package/dist/qti-test/qti-test.js.map +0 -1
- package/dist/qti-test/test-base.d.ts +0 -6
- package/dist/qti-test/test-base.js +0 -137
- package/dist/qti-test/test-base.js.map +0 -1
- package/dist/qti-transformers/index.cjs +0 -316
- package/dist/qti-transformers/index.cjs.map +0 -1
- package/dist/qti-transformers/index.d.cts +0 -75
- package/dist/test-base-BJwG9Ie8.d.ts +0 -109
- package/dist/test.context-Bx-606B3.d.ts +0 -99
- package/dist/test.context-CB5V4xJz.d.ts +0 -99
- package/dist/test.context-CaENAJNk.d.ts +0 -101
- package/dist/test.context-CmsDQ8k2.d.ts +0 -99
- package/dist/transformers/index.d.ts +0 -76
- package/dist/transformers/index.js +0 -293
- package/dist/transformers/index.js.map +0 -1
- /package/cdn/{chunk-22HAPLRD.js → chunks/chunk-MTNLMWSG.js} +0 -0
- /package/dist/{chunk-44VE5POH.js.map → chunks/chunk-CBYNKDSF.js.map} +0 -0
- /package/dist/chunks/{chunk-XSI6FXGD.js.map → chunk-OOQLWOYU.js.map} +0 -0
- /package/dist/{chunk-MAC76UNI.js.map → exports/computed.context.js.map} +0 -0
- /package/dist/{chunks/chunk-HOTNM5DT.js.map → exports/config.context.js.map} +0 -0
- /package/dist/{chunks/chunk-UN2IFSGC.js.map → exports/session.context.js.map} +0 -0
- /package/dist/{qti-test/components/test-component.abstract.js.map → exports/test.context.js.map} +0 -0
package/dist/chunk-2OA7E3E7.js
DELETED
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
// src/lib/qti-transformers/qti-transformers.ts
|
|
2
|
-
var xml = String.raw;
|
|
3
|
-
var xmlToHTML = xml`<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
4
|
-
<xsl:output method="html" version="5.0" encoding="UTF-8" indent="yes" />
|
|
5
|
-
<xsl:template match="@*|node()">
|
|
6
|
-
<xsl:copy>
|
|
7
|
-
<xsl:apply-templates select="@*|node()"/>
|
|
8
|
-
</xsl:copy>
|
|
9
|
-
</xsl:template>
|
|
10
|
-
|
|
11
|
-
<!-- remove existing namespaces -->
|
|
12
|
-
<xsl:template match="*">
|
|
13
|
-
<!-- remove element prefix -->
|
|
14
|
-
<xsl:element name="{local-name()}">
|
|
15
|
-
<!-- process attributes -->
|
|
16
|
-
<xsl:for-each select="@*">
|
|
17
|
-
<!-- remove attribute prefix -->
|
|
18
|
-
<xsl:attribute name="{local-name()}">
|
|
19
|
-
<xsl:value-of select="."/>
|
|
20
|
-
</xsl:attribute>
|
|
21
|
-
</xsl:for-each>
|
|
22
|
-
<xsl:apply-templates/>
|
|
23
|
-
</xsl:element>
|
|
24
|
-
</xsl:template>
|
|
25
|
-
</xsl:stylesheet>`;
|
|
26
|
-
function extendElementName(xmlFragment, tagName, extension) {
|
|
27
|
-
xmlFragment.querySelectorAll(tagName).forEach((element) => {
|
|
28
|
-
const newTagName = `${tagName}-${extension}`;
|
|
29
|
-
const newElement = createElementWithNewTagName(element, newTagName);
|
|
30
|
-
element.replaceWith(newElement);
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function extendElementsWithClass(xmlFragment, classNamePattern) {
|
|
34
|
-
xmlFragment.querySelectorAll("*").forEach((element) => {
|
|
35
|
-
const classList = element.classList;
|
|
36
|
-
if (classList) {
|
|
37
|
-
classList.forEach((className) => {
|
|
38
|
-
if (className.startsWith(`${classNamePattern}:`)) {
|
|
39
|
-
const suffix = className.slice(`${classNamePattern}:`.length);
|
|
40
|
-
const newTagName = `${element.nodeName}-${suffix}`;
|
|
41
|
-
const newElement = createElementWithNewTagName(element, newTagName);
|
|
42
|
-
element.replaceWith(newElement);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function createElementWithNewTagName(element, newTagName) {
|
|
49
|
-
const newElement = document.createElement(newTagName);
|
|
50
|
-
for (const attr of element.attributes) {
|
|
51
|
-
newElement.setAttribute(attr.name, attr.value);
|
|
52
|
-
}
|
|
53
|
-
while (element.firstChild) {
|
|
54
|
-
newElement.appendChild(element.firstChild);
|
|
55
|
-
}
|
|
56
|
-
return newElement;
|
|
57
|
-
}
|
|
58
|
-
function itemsFromTest(xmlFragment) {
|
|
59
|
-
const items = [];
|
|
60
|
-
xmlFragment.querySelectorAll("qti-assessment-item-ref").forEach((el) => {
|
|
61
|
-
const identifier = el.getAttribute("identifier");
|
|
62
|
-
const href = el.getAttribute("href");
|
|
63
|
-
const category = el.getAttribute("category");
|
|
64
|
-
items.push({ identifier, href, category });
|
|
65
|
-
});
|
|
66
|
-
return items;
|
|
67
|
-
}
|
|
68
|
-
var currentRequest = null;
|
|
69
|
-
function loadXML(url, cancelPreviousRequest = false) {
|
|
70
|
-
if (cancelPreviousRequest && currentRequest !== null) {
|
|
71
|
-
currentRequest.abort();
|
|
72
|
-
}
|
|
73
|
-
return new Promise((resolve, reject) => {
|
|
74
|
-
const xhr = new XMLHttpRequest();
|
|
75
|
-
currentRequest = xhr;
|
|
76
|
-
xhr.open("GET", url, true);
|
|
77
|
-
xhr.responseType = "document";
|
|
78
|
-
xhr.onload = () => {
|
|
79
|
-
if (xhr.status >= 200 && xhr.status < 300) {
|
|
80
|
-
resolve(xhr.responseXML);
|
|
81
|
-
} else {
|
|
82
|
-
reject(xhr.statusText);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
xhr.onerror = () => {
|
|
86
|
-
reject(xhr.statusText);
|
|
87
|
-
};
|
|
88
|
-
xhr.send();
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function parseXML(xmlDocument) {
|
|
92
|
-
const parser = new DOMParser();
|
|
93
|
-
const xmlFragment = parser.parseFromString(xmlDocument, "text/xml");
|
|
94
|
-
return xmlFragment;
|
|
95
|
-
}
|
|
96
|
-
function toHTML(xmlFragment) {
|
|
97
|
-
const processor = new XSLTProcessor();
|
|
98
|
-
const xsltDocument = new DOMParser().parseFromString(xmlToHTML, "text/xml");
|
|
99
|
-
processor.importStylesheet(xsltDocument);
|
|
100
|
-
const itemHTMLFragment = processor.transformToFragment(xmlFragment, document);
|
|
101
|
-
return itemHTMLFragment;
|
|
102
|
-
}
|
|
103
|
-
function setLocation(xmlFragment, location) {
|
|
104
|
-
if (!location.endsWith("/")) {
|
|
105
|
-
location += "/";
|
|
106
|
-
}
|
|
107
|
-
xmlFragment.querySelectorAll("[src],[href],[primary-path]").forEach((elWithSrc) => {
|
|
108
|
-
let attr = "";
|
|
109
|
-
if (elWithSrc.getAttribute("src")) {
|
|
110
|
-
attr = "src";
|
|
111
|
-
}
|
|
112
|
-
if (elWithSrc.getAttribute("href")) {
|
|
113
|
-
attr = "href";
|
|
114
|
-
}
|
|
115
|
-
if (elWithSrc.getAttribute("primary-path")) {
|
|
116
|
-
attr = "primary-path";
|
|
117
|
-
}
|
|
118
|
-
const attrValue = elWithSrc.getAttribute(attr)?.trim();
|
|
119
|
-
if (!attrValue.startsWith("data:") && !attrValue.startsWith("http")) {
|
|
120
|
-
const newSrcValue = location + encodeURI(attrValue);
|
|
121
|
-
elWithSrc.setAttribute(attr, newSrcValue);
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
function convertCDATAtoComment(xmlFragment) {
|
|
126
|
-
const cdataElements = xmlFragment.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value');
|
|
127
|
-
cdataElements.forEach((element) => {
|
|
128
|
-
const commentText = document.createComment(element.textContent);
|
|
129
|
-
element.replaceChild(commentText, element.firstChild);
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
function stripStyleSheets(xmlFragment) {
|
|
133
|
-
xmlFragment.querySelectorAll("qti-stylesheet").forEach((stylesheet) => stylesheet.remove());
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// src/lib/qti-transformers/qti-transform-item.ts
|
|
137
|
-
var qtiTransformItem = () => {
|
|
138
|
-
let xmlFragment;
|
|
139
|
-
const api = {
|
|
140
|
-
async load(uri, cancelPreviousRequest = false) {
|
|
141
|
-
return new Promise((resolve) => {
|
|
142
|
-
loadXML(uri, cancelPreviousRequest).then((xml2) => {
|
|
143
|
-
xmlFragment = xml2;
|
|
144
|
-
api.path(uri.substring(0, uri.lastIndexOf("/")));
|
|
145
|
-
return resolve(api);
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
},
|
|
149
|
-
parse(xmlString) {
|
|
150
|
-
xmlFragment = parseXML(xmlString);
|
|
151
|
-
return api;
|
|
152
|
-
},
|
|
153
|
-
path: (location) => {
|
|
154
|
-
setLocation(xmlFragment, location);
|
|
155
|
-
return api;
|
|
156
|
-
},
|
|
157
|
-
fn(fn) {
|
|
158
|
-
fn(xmlFragment);
|
|
159
|
-
return api;
|
|
160
|
-
},
|
|
161
|
-
pciHooks(uri) {
|
|
162
|
-
const attributes = ["hook", "module"];
|
|
163
|
-
const documentPath = uri.substring(0, uri.lastIndexOf("/"));
|
|
164
|
-
for (const attribute of attributes) {
|
|
165
|
-
const srcAttributes = xmlFragment.querySelectorAll("[" + attribute + "]");
|
|
166
|
-
srcAttributes.forEach((node) => {
|
|
167
|
-
const srcValue = node.getAttribute(attribute);
|
|
168
|
-
if (!srcValue.startsWith("data:") && !srcValue.startsWith("http")) {
|
|
169
|
-
node.setAttribute("base-url", uri);
|
|
170
|
-
node.setAttribute(
|
|
171
|
-
"module",
|
|
172
|
-
documentPath + "/" + encodeURI(srcValue + (srcValue.endsWith(".js") ? "" : ".js"))
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
return api;
|
|
178
|
-
},
|
|
179
|
-
extendElementName: (tagName, extension) => {
|
|
180
|
-
extendElementName(xmlFragment, tagName, extension);
|
|
181
|
-
return api;
|
|
182
|
-
},
|
|
183
|
-
extendElementsWithClass: (param = "extend") => {
|
|
184
|
-
extendElementsWithClass(xmlFragment, param);
|
|
185
|
-
return api;
|
|
186
|
-
},
|
|
187
|
-
customInteraction(baseRef, baseItem) {
|
|
188
|
-
const qtiCustomInteraction = xmlFragment.querySelector("qti-custom-interaction");
|
|
189
|
-
const qtiCustomInteractionObject = qtiCustomInteraction.querySelector("object");
|
|
190
|
-
qtiCustomInteraction.setAttribute("data-base-ref", baseRef);
|
|
191
|
-
qtiCustomInteraction.setAttribute("data-base-item", baseRef + baseItem);
|
|
192
|
-
qtiCustomInteraction.setAttribute("data", qtiCustomInteractionObject.getAttribute("data"));
|
|
193
|
-
qtiCustomInteraction.setAttribute("width", qtiCustomInteractionObject.getAttribute("width"));
|
|
194
|
-
qtiCustomInteraction.setAttribute("height", qtiCustomInteractionObject.getAttribute("height"));
|
|
195
|
-
qtiCustomInteraction.removeChild(qtiCustomInteractionObject);
|
|
196
|
-
return api;
|
|
197
|
-
},
|
|
198
|
-
convertCDATAtoComment() {
|
|
199
|
-
convertCDATAtoComment(xmlFragment);
|
|
200
|
-
return api;
|
|
201
|
-
},
|
|
202
|
-
stripStyleSheets() {
|
|
203
|
-
stripStyleSheets(xmlFragment);
|
|
204
|
-
return api;
|
|
205
|
-
},
|
|
206
|
-
html() {
|
|
207
|
-
return new XMLSerializer().serializeToString(toHTML(xmlFragment));
|
|
208
|
-
},
|
|
209
|
-
xml() {
|
|
210
|
-
return new XMLSerializer().serializeToString(xmlFragment);
|
|
211
|
-
},
|
|
212
|
-
htmlDoc() {
|
|
213
|
-
return toHTML(xmlFragment);
|
|
214
|
-
},
|
|
215
|
-
xmlDoc() {
|
|
216
|
-
return xmlFragment;
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
return api;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
// src/lib/qti-transformers/qti-transform-manifest.ts
|
|
223
|
-
var qtiTransformManifest = () => {
|
|
224
|
-
let xmlFragment;
|
|
225
|
-
const api = {
|
|
226
|
-
async load(uri) {
|
|
227
|
-
return new Promise((resolve) => {
|
|
228
|
-
loadXML(uri).then((xml2) => {
|
|
229
|
-
xmlFragment = xml2;
|
|
230
|
-
return resolve(api);
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
},
|
|
234
|
-
parse(xmlString) {
|
|
235
|
-
xmlFragment = parseXML(xmlString);
|
|
236
|
-
},
|
|
237
|
-
assessmentTest() {
|
|
238
|
-
const el = xmlFragment.querySelector('resource[type="imsqti_test_xmlv3p0"]');
|
|
239
|
-
return { href: el.getAttribute("href"), identifier: el.getAttribute("identifier") };
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
return api;
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
// src/lib/qti-transformers/qti-transform-test.ts
|
|
246
|
-
var qtiTransformTest = () => {
|
|
247
|
-
let xmlFragment;
|
|
248
|
-
const api = {
|
|
249
|
-
async load(uri) {
|
|
250
|
-
return new Promise((resolve, _) => {
|
|
251
|
-
loadXML(uri).then((xml2) => {
|
|
252
|
-
xmlFragment = xml2;
|
|
253
|
-
api.path(uri.substring(0, uri.lastIndexOf("/")));
|
|
254
|
-
return resolve(api);
|
|
255
|
-
});
|
|
256
|
-
});
|
|
257
|
-
},
|
|
258
|
-
parse(xmlString) {
|
|
259
|
-
xmlFragment = parseXML(xmlString);
|
|
260
|
-
return api;
|
|
261
|
-
},
|
|
262
|
-
path: (location) => {
|
|
263
|
-
setLocation(xmlFragment, location);
|
|
264
|
-
return api;
|
|
265
|
-
},
|
|
266
|
-
fn(fn) {
|
|
267
|
-
fn(xmlFragment);
|
|
268
|
-
return api;
|
|
269
|
-
},
|
|
270
|
-
items() {
|
|
271
|
-
return itemsFromTest(xmlFragment);
|
|
272
|
-
},
|
|
273
|
-
html() {
|
|
274
|
-
return new XMLSerializer().serializeToString(toHTML(xmlFragment));
|
|
275
|
-
},
|
|
276
|
-
xml() {
|
|
277
|
-
return new XMLSerializer().serializeToString(xmlFragment);
|
|
278
|
-
},
|
|
279
|
-
htmlDoc() {
|
|
280
|
-
return toHTML(xmlFragment);
|
|
281
|
-
},
|
|
282
|
-
xmlDoc() {
|
|
283
|
-
return xmlFragment;
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
return api;
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
export {
|
|
290
|
-
qtiTransformItem,
|
|
291
|
-
qtiTransformManifest,
|
|
292
|
-
qtiTransformTest
|
|
293
|
-
};
|
|
294
|
-
//# sourceMappingURL=chunk-2OA7E3E7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/qti-transformers/qti-transformers.ts","../src/lib/qti-transformers/qti-transform-item.ts","../src/lib/qti-transformers/qti-transform-manifest.ts","../src/lib/qti-transformers/qti-transform-test.ts"],"sourcesContent":["const xml = String.raw;\n\n/* <!-- convert CDATA to comments -->\n <xsl:template match=\"text()[contains(., 'CDATA')]\">\n <xsl:comment>\n <xsl:value-of select=\".\"/>\n </xsl:comment>\n</xsl:template>\n*/\n\n/*\n <!-- remove xml comments -->\n <xsl:template match=\"comment()\" />\n */\n\nconst xmlToHTML = xml`<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n<xsl:output method=\"html\" version=\"5.0\" encoding=\"UTF-8\" indent=\"yes\" />\n <xsl:template match=\"@*|node()\">\n <xsl:copy>\n <xsl:apply-templates select=\"@*|node()\"/>\n </xsl:copy>\n </xsl:template>\n\n <!-- remove existing namespaces -->\n <xsl:template match=\"*\">\n <!-- remove element prefix -->\n <xsl:element name=\"{local-name()}\">\n <!-- process attributes -->\n <xsl:for-each select=\"@*\">\n <!-- remove attribute prefix -->\n <xsl:attribute name=\"{local-name()}\">\n <xsl:value-of select=\".\"/>\n </xsl:attribute>\n </xsl:for-each>\n <xsl:apply-templates/>\n </xsl:element>\n</xsl:template>\n</xsl:stylesheet>`;\n\n// Function to extend elements with a specific tag name by adding an extension suffix\nexport function extendElementName(xmlFragment: XMLDocument, tagName: string, extension: string) {\n xmlFragment.querySelectorAll(tagName).forEach(element => {\n const newTagName = `${tagName}-${extension}`;\n const newElement = createElementWithNewTagName(element, newTagName);\n element.replaceWith(newElement);\n });\n}\n\n// Function to extend any element with a specific class pattern (e.g., \"extend:suffix\")\nexport function extendElementsWithClass(xmlFragment: XMLDocument, classNamePattern: string) {\n xmlFragment.querySelectorAll('*').forEach(element => {\n const classList = element.classList;\n if (classList) {\n classList.forEach(className => {\n if (className.startsWith(`${classNamePattern}:`)) {\n const suffix = className.slice(`${classNamePattern}:`.length);\n const newTagName = `${element.nodeName}-${suffix}`;\n const newElement = createElementWithNewTagName(element, newTagName);\n element.replaceWith(newElement);\n }\n });\n }\n });\n}\n\n// Helper function to create a new element with a new tag name and copy attributes and children\nfunction createElementWithNewTagName(element, newTagName) {\n const newElement = document.createElement(newTagName);\n // Copy attributes\n for (const attr of element.attributes) {\n newElement.setAttribute(attr.name, attr.value);\n }\n // Copy child nodes\n while (element.firstChild) {\n newElement.appendChild(element.firstChild);\n }\n return newElement;\n}\n\nexport function itemsFromTest(xmlFragment: DocumentFragment) {\n const items: { identifier: string; href: string; category: string }[] = [];\n xmlFragment.querySelectorAll('qti-assessment-item-ref').forEach(el => {\n const identifier = el.getAttribute('identifier');\n const href = el.getAttribute('href');\n const category = el.getAttribute('category');\n items.push({ identifier, href, category });\n });\n return items;\n}\n\nlet currentRequest: XMLHttpRequest | null = null;\n\nexport function loadXML(url, cancelPreviousRequest = false) {\n if (cancelPreviousRequest && currentRequest !== null) {\n currentRequest.abort(); // Abort the ongoing request if there is one\n }\n\n return new Promise<XMLDocument | null>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n currentRequest = xhr; // Store the current request\n\n xhr.open('GET', url, true);\n xhr.responseType = 'document';\n\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve(xhr.responseXML);\n } else {\n reject(xhr.statusText);\n }\n };\n\n xhr.onerror = () => {\n reject(xhr.statusText);\n };\n\n xhr.send();\n });\n}\n\nexport function parseXML(xmlDocument: string) {\n const parser = new DOMParser();\n const xmlFragment = parser.parseFromString(xmlDocument, 'text/xml');\n return xmlFragment;\n}\n\nexport function toHTML(xmlFragment: Document): DocumentFragment {\n const processor = new XSLTProcessor();\n const xsltDocument = new DOMParser().parseFromString(xmlToHTML, 'text/xml');\n processor.importStylesheet(xsltDocument);\n const itemHTMLFragment = processor.transformToFragment(xmlFragment, document);\n return itemHTMLFragment;\n}\n\nexport function setLocation(xmlFragment: DocumentFragment, location: string) {\n if (!location.endsWith('/')) {\n location += '/';\n }\n\n xmlFragment.querySelectorAll('[src],[href],[primary-path]').forEach(elWithSrc => {\n let attr: 'src' | 'href' | 'primary-path' | '' = '';\n\n if (elWithSrc.getAttribute('src')) {\n attr = 'src';\n }\n if (elWithSrc.getAttribute('href')) {\n attr = 'href';\n }\n if (elWithSrc.getAttribute('primary-path')) {\n attr = 'primary-path';\n }\n const attrValue = elWithSrc.getAttribute(attr)?.trim();\n\n if (!attrValue.startsWith('data:') && !attrValue.startsWith('http')) {\n const newSrcValue = location + encodeURI(attrValue);\n elWithSrc.setAttribute(attr, newSrcValue);\n }\n });\n}\n\nexport function convertCDATAtoComment(xmlFragment: DocumentFragment) {\n const cdataElements = xmlFragment.querySelectorAll('qti-custom-operator[class=\"js.org\"] > qti-base-value');\n cdataElements.forEach(element => {\n const commentText = document.createComment(element.textContent);\n element.replaceChild(commentText, element.firstChild);\n });\n}\n\nexport function stripStyleSheets(xmlFragment: DocumentFragment) {\n // remove qti-stylesheet tag\n xmlFragment.querySelectorAll('qti-stylesheet').forEach(stylesheet => stylesheet.remove());\n}\n","/**\n * Browser based QTI-XML to HTML transformer.\n * Returns an object with methods to load, parse, transform and serialize QTI XML items.\n * @returns An object with methods to load, parse, transform and serialize QTI XML items.\n * @example\n * const qtiTransformer = qtiTransformItem();\n * await qtiTransformer.load('path/to/xml/file.xml');\n * qtiTransformer.path('/assessmentItem/itemBody');\n * const html = qtiTransformer.html();\n * const xml = qtiTransformer.xml();\n * const htmldoc = qtiTransformer.htmldoc();\n * const xmldoc = qtiTransformer.xmldoc();\n *\n * qtiTransformItem().parse(storyXML).html()\n */\n\nimport {\n convertCDATAtoComment,\n extendElementName,\n extendElementsWithClass,\n loadXML,\n parseXML,\n setLocation,\n stripStyleSheets,\n toHTML\n} from './qti-transformers';\n\nexport type transformItemApi = {\n load: (uri: string, cancelPreviousRequest?: boolean) => Promise<transformItemApi>;\n parse: (xmlString: string) => transformItemApi;\n path: (location: string) => transformItemApi;\n fn: (fn: (xmlFragment: XMLDocument) => void) => transformItemApi;\n pciHooks: (uri: string) => transformItemApi;\n extendElementName: (elementName: string, extend: string) => transformItemApi;\n extendElementsWithClass: (param?: string) => transformItemApi;\n customInteraction: (baseRef: string, baseItem: string) => transformItemApi;\n convertCDATAtoComment: () => transformItemApi;\n stripStyleSheets: () => transformItemApi;\n html: () => string;\n xml: () => string;\n htmlDoc: () => DocumentFragment;\n xmlDoc: () => XMLDocument;\n};\n\nexport const qtiTransformItem = () => {\n let xmlFragment: XMLDocument;\n\n const api: transformItemApi = {\n async load(uri: string, cancelPreviousRequest = false): Promise<typeof api> {\n return new Promise<typeof api>(resolve => {\n loadXML(uri, cancelPreviousRequest).then(xml => {\n xmlFragment = xml;\n // set the base path for images and other resources,\n // you probably want to set the base path to the document root else you can use the path method to set it\n api.path(uri.substring(0, uri.lastIndexOf('/')));\n return resolve(api);\n });\n });\n },\n parse(xmlString: string): typeof api {\n xmlFragment = parseXML(xmlString);\n return api;\n },\n path: (location: string): typeof api => {\n setLocation(xmlFragment, location);\n return api;\n },\n fn(fn: (xmlFragment: XMLDocument) => void): typeof api {\n fn(xmlFragment);\n return api;\n },\n pciHooks(uri: string): typeof api {\n const attributes = ['hook', 'module'];\n const documentPath = uri.substring(0, uri.lastIndexOf('/'));\n for (const attribute of attributes) {\n const srcAttributes = xmlFragment.querySelectorAll('[' + attribute + ']');\n srcAttributes.forEach(node => {\n const srcValue = node.getAttribute(attribute)!;\n if (!srcValue.startsWith('data:') && !srcValue.startsWith('http')) {\n // Just paste the relative path of the src location after the documentrootPath\n // old pcis can have a .js, new pci's don't\n node.setAttribute('base-url', uri);\n node.setAttribute(\n 'module',\n documentPath + '/' + encodeURI(srcValue + (srcValue.endsWith('.js') ? '' : '.js'))\n );\n }\n });\n }\n return api;\n },\n extendElementName: (tagName: string, extension: string): typeof api => {\n extendElementName(xmlFragment, tagName, extension);\n return api;\n },\n extendElementsWithClass: (param: string = 'extend'): typeof api => {\n extendElementsWithClass(xmlFragment, param);\n return api;\n },\n customInteraction(baseRef: string, baseItem: string): typeof api {\n const qtiCustomInteraction = xmlFragment.querySelector('qti-custom-interaction');\n const qtiCustomInteractionObject = qtiCustomInteraction.querySelector('object');\n\n qtiCustomInteraction.setAttribute('data-base-ref', baseRef);\n qtiCustomInteraction.setAttribute('data-base-item', baseRef + baseItem);\n qtiCustomInteraction.setAttribute('data', qtiCustomInteractionObject.getAttribute('data'));\n qtiCustomInteraction.setAttribute('width', qtiCustomInteractionObject.getAttribute('width'));\n qtiCustomInteraction.setAttribute('height', qtiCustomInteractionObject.getAttribute('height'));\n\n qtiCustomInteraction.removeChild(qtiCustomInteractionObject);\n return api;\n },\n convertCDATAtoComment(): typeof api {\n convertCDATAtoComment(xmlFragment);\n return api;\n },\n stripStyleSheets(): typeof api {\n stripStyleSheets(xmlFragment);\n return api;\n },\n html() {\n return new XMLSerializer().serializeToString(toHTML(xmlFragment));\n },\n xml(): string {\n return new XMLSerializer().serializeToString(xmlFragment);\n },\n htmlDoc() {\n return toHTML(xmlFragment);\n },\n xmlDoc(): XMLDocument {\n return xmlFragment; // new XMLSerializer().serializeToString(xmlFragment);\n }\n };\n return api;\n};\n","import { loadXML, parseXML } from './qti-transformers';\n\nexport const qtiTransformManifest = (): {\n load: (uri: string) => Promise<typeof api>;\n assessmentTest: () => { href: string; identifier: string };\n} => {\n let xmlFragment: XMLDocument;\n\n const api = {\n async load(uri) {\n return new Promise<typeof api>(resolve => {\n loadXML(uri).then(xml => {\n xmlFragment = xml;\n return resolve(api);\n });\n });\n },\n parse(xmlString: string) {\n xmlFragment = parseXML(xmlString);\n },\n assessmentTest() {\n const el = xmlFragment.querySelector('resource[type=\"imsqti_test_xmlv3p0\"]');\n return { href: el.getAttribute('href'), identifier: el.getAttribute('identifier') };\n }\n };\n return api;\n};\n","/**\n * Returns an object with methods to load, parse and transform QTI tests.\n * @returns An object with methods to load, parse and transform QTI tests.\n * @example\n * const qtiTransformer = qtiTransformTest();\n * await qtiTransformer.load('https://example.com/test.xml');\n * const items = qtiTransformer.items();\n * const html = qtiTransformer.html();\n * const xml = qtiTransformer.xml();\n */\n\nimport { itemsFromTest, loadXML, parseXML, setLocation, toHTML } from './qti-transformers';\n\nexport type transformTestApi = {\n load: (uri: string) => Promise<transformTestApi>;\n parse: (xmlString: string) => transformTestApi;\n path: (location: string) => transformTestApi;\n fn: (fn: (xmlFragment: XMLDocument) => void) => transformTestApi;\n items: () => { identifier: string; href: string; category: string }[];\n html: () => string;\n xml: () => string;\n htmlDoc: () => DocumentFragment;\n xmlDoc: () => XMLDocument;\n};\n\nexport const qtiTransformTest = (): transformTestApi => {\n let xmlFragment: XMLDocument;\n\n const api: transformTestApi = {\n async load(uri) {\n return new Promise<transformTestApi>((resolve, _) => {\n loadXML(uri).then(xml => {\n xmlFragment = xml;\n\n api.path(uri.substring(0, uri.lastIndexOf('/')));\n return resolve(api);\n });\n });\n },\n parse(xmlString: string) {\n xmlFragment = parseXML(xmlString);\n return api;\n },\n path: (location: string): typeof api => {\n setLocation(xmlFragment, location);\n return api;\n },\n fn(fn: (xmlFragment: XMLDocument) => void) {\n fn(xmlFragment);\n return api;\n },\n items() {\n return itemsFromTest(xmlFragment);\n },\n html() {\n return new XMLSerializer().serializeToString(toHTML(xmlFragment));\n },\n xml(): string {\n return new XMLSerializer().serializeToString(xmlFragment);\n },\n htmlDoc() {\n return toHTML(xmlFragment);\n },\n xmlDoc(): XMLDocument {\n return xmlFragment;\n }\n };\n return api;\n};\n"],"mappings":";AAAA,IAAM,MAAM,OAAO;AAenB,IAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBX,SAAS,kBAAkB,aAA0B,SAAiB,WAAmB;AAC9F,cAAY,iBAAiB,OAAO,EAAE,QAAQ,aAAW;AACvD,UAAM,aAAa,GAAG,OAAO,IAAI,SAAS;AAC1C,UAAM,aAAa,4BAA4B,SAAS,UAAU;AAClE,YAAQ,YAAY,UAAU;AAAA,EAChC,CAAC;AACH;AAGO,SAAS,wBAAwB,aAA0B,kBAA0B;AAC1F,cAAY,iBAAiB,GAAG,EAAE,QAAQ,aAAW;AACnD,UAAM,YAAY,QAAQ;AAC1B,QAAI,WAAW;AACb,gBAAU,QAAQ,eAAa;AAC7B,YAAI,UAAU,WAAW,GAAG,gBAAgB,GAAG,GAAG;AAChD,gBAAM,SAAS,UAAU,MAAM,GAAG,gBAAgB,IAAI,MAAM;AAC5D,gBAAM,aAAa,GAAG,QAAQ,QAAQ,IAAI,MAAM;AAChD,gBAAM,aAAa,4BAA4B,SAAS,UAAU;AAClE,kBAAQ,YAAY,UAAU;AAAA,QAChC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;AAGA,SAAS,4BAA4B,SAAS,YAAY;AACxD,QAAM,aAAa,SAAS,cAAc,UAAU;AAEpD,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AS,MAAM;AACnD,gBAAQ,GAAG,EAAE,KAAK,CAAAC,SAAO;AACvB,wBAAcA;AAEd,cAAI,KAAK,IAAI,UAAU,GAAG,IAAI,YAAY,GAAG,CAAC,CAAC;AAC/C,iBAAO,QAAQ,GAAG;AAAA,QACpB,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,IACA,MAAM,WAAmB;AACvB,oBAAc,SAAS,SAAS;AAChC,aAAO;AAAA,IACT;AAAA,IACA,MAAM,CAAC,aAAiC;AACtC,kBAAY,aAAa,QAAQ;AACjC,aAAO;AAAA,IACT;AAAA,IACA,GAAG,IAAwC;AACzC,SAAG,WAAW;AACd,aAAO;AAAA,IACT;AAAA,IACA,QAAQ;AACN,aAAO,cAAc,WAAW;AAAA,IAClC;AAAA,IACA,OAAO;AACL,aAAO,IAAI,cAAc,EAAE,kBAAkB,OAAO,WAAW,CAAC;AAAA,IAClE;AAAA,IACA,MAAc;AACZ,aAAO,IAAI,cAAc,EAAE,kBAAkB,WAAW;AAAA,IAC1D;AAAA,IACA,UAAU;AACR,aAAO,OAAO,WAAW;AAAA,IAC3B;AAAA,IACA,SAAsB;AACpB,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;","names":["xml","xml","xml"]}
|
package/dist/chunk-3G364JZC.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TestComponent
|
|
3
|
-
} from "./chunk-GPJ6WTE5.js";
|
|
4
|
-
import {
|
|
5
|
-
watch
|
|
6
|
-
} from "./chunk-4YG2FPKK.js";
|
|
7
|
-
import {
|
|
8
|
-
__decorateClass
|
|
9
|
-
} from "./chunk-44VE5POH.js";
|
|
10
|
-
|
|
11
|
-
// src/lib/qti-test/components/test-view.ts
|
|
12
|
-
import { html } from "lit";
|
|
13
|
-
import { customElement, property, state } from "lit/decorators.js";
|
|
14
|
-
var TestView = class extends TestComponent {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.label = "view";
|
|
18
|
-
this._handleViewOptionsChange = () => {
|
|
19
|
-
this.updateViewOptions();
|
|
20
|
-
};
|
|
21
|
-
this._viewOptions = TestView.DEFAULT_VIEW_OPTIONS;
|
|
22
|
-
}
|
|
23
|
-
connectedCallback() {
|
|
24
|
-
super.connectedCallback();
|
|
25
|
-
this.updateViewOptions();
|
|
26
|
-
}
|
|
27
|
-
updateViewOptions() {
|
|
28
|
-
if (this.viewOptions) {
|
|
29
|
-
const options = this.viewOptions.split(",").map((opt) => opt.trim());
|
|
30
|
-
this._viewOptions = options.filter((opt) => TestView.DEFAULT_VIEW_OPTIONS.includes(opt));
|
|
31
|
-
} else {
|
|
32
|
-
this._viewOptions = TestView.DEFAULT_VIEW_OPTIONS;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
render() {
|
|
36
|
-
return html`
|
|
37
|
-
<label part="label" for="viewSelect">${this.label}</label>
|
|
38
|
-
<select
|
|
39
|
-
part="select"
|
|
40
|
-
id="viewSelect"
|
|
41
|
-
.disabled=${this.disabled}
|
|
42
|
-
@change=${(e) => {
|
|
43
|
-
const el = e.target;
|
|
44
|
-
this._switchView(el.value);
|
|
45
|
-
}}
|
|
46
|
-
>
|
|
47
|
-
${this._viewOptions.map((v) => html`<option value="${v}" ?selected=${v === this.view}>${v}</option>`)}
|
|
48
|
-
</select>
|
|
49
|
-
`;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
TestView.DEFAULT_VIEW_OPTIONS = ["author", "candidate", "proctor", "scorer", "testConstructor", "tutor"];
|
|
53
|
-
__decorateClass([
|
|
54
|
-
property({ type: String })
|
|
55
|
-
], TestView.prototype, "label", 2);
|
|
56
|
-
__decorateClass([
|
|
57
|
-
property({ type: String, attribute: "view-options" })
|
|
58
|
-
], TestView.prototype, "viewOptions", 2);
|
|
59
|
-
__decorateClass([
|
|
60
|
-
watch("viewOptions", { waitUntilFirstUpdate: true })
|
|
61
|
-
], TestView.prototype, "_handleViewOptionsChange", 2);
|
|
62
|
-
__decorateClass([
|
|
63
|
-
state()
|
|
64
|
-
], TestView.prototype, "_viewOptions", 2);
|
|
65
|
-
TestView = __decorateClass([
|
|
66
|
-
customElement("test-view")
|
|
67
|
-
], TestView);
|
|
68
|
-
|
|
69
|
-
export {
|
|
70
|
-
TestView
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=chunk-3G364JZC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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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Ae,EAAE,sBAAsB,KAAK,CAAC;AAAA,GATzC,SAUD;AAUF;AAAA,EADP,MAAM;AAAA,GAnBI,SAoBH;AApBG,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":[]}
|
package/dist/chunk-44VE5POH.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
-
}) : x)(function(x) {
|
|
11
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
-
};
|
|
17
|
-
var __export = (target, all) => {
|
|
18
|
-
for (var name in all)
|
|
19
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
20
|
-
};
|
|
21
|
-
var __copyProps = (to, from, except, desc) => {
|
|
22
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
-
for (let key of __getOwnPropNames(from))
|
|
24
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
25
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
26
|
-
}
|
|
27
|
-
return to;
|
|
28
|
-
};
|
|
29
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
-
mod
|
|
36
|
-
));
|
|
37
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
38
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
39
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
40
|
-
if (decorator = decorators[i])
|
|
41
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
42
|
-
if (kind && result) __defProp(target, key, result);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
46
|
-
|
|
47
|
-
export {
|
|
48
|
-
__require,
|
|
49
|
-
__commonJS,
|
|
50
|
-
__export,
|
|
51
|
-
__toESM,
|
|
52
|
-
__decorateClass,
|
|
53
|
-
__publicField
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=chunk-44VE5POH.js.map
|
package/dist/chunk-4YG2FPKK.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// src/lib/decorators/watch.ts
|
|
2
|
-
function watch(propertyName, options) {
|
|
3
|
-
const resolvedOptions = {
|
|
4
|
-
waitUntilFirstUpdate: false,
|
|
5
|
-
...options
|
|
6
|
-
};
|
|
7
|
-
return (proto, decoratedFnName) => {
|
|
8
|
-
const { update } = proto;
|
|
9
|
-
const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
|
|
10
|
-
proto.update = function(changedProps) {
|
|
11
|
-
watchedProperties.forEach((property) => {
|
|
12
|
-
const key = property;
|
|
13
|
-
if (changedProps.has(key)) {
|
|
14
|
-
const oldValue = changedProps.get(key);
|
|
15
|
-
const newValue = this[key];
|
|
16
|
-
if (oldValue !== newValue) {
|
|
17
|
-
if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {
|
|
18
|
-
this[decoratedFnName](oldValue, newValue);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
update.call(this, changedProps);
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
watch
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=chunk-4YG2FPKK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/decorators/watch.ts"],"sourcesContent":["import type { LitElement } from 'lit';\n\ntype UpdateHandler = (prev?: unknown, next?: unknown) => void;\n\ntype NonUndefined<A> = A extends undefined ? never : A;\n\nexport type UpdateHandlerFunctionKeys<T extends object> = {\n [K in keyof T]-?: NonUndefined<T[K]> extends UpdateHandler ? K : never;\n}[keyof T];\n\ninterface WatchOptions {\n /**\n * If true, will only start watching after the initial update/render\n */\n waitUntilFirstUpdate?: boolean;\n}\n\n/**\n * Runs when observed properties change, e.g. @property or @state, but before the component updates. To wait for an\n * update to complete after a change occurs, use `await this.updateComplete` in the handler. To start watching after the\n * initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n *\n * Usage:\n *\n * @watch('propName')\n * handlePropChange(oldValue, newValue) {\n * ...\n * }\n */\nexport function watch(propertyName: string | string[], options?: WatchOptions) {\n const resolvedOptions: Required<WatchOptions> = {\n waitUntilFirstUpdate: false,\n ...options\n };\n return <ElemClass extends LitElement>(\n proto: ElemClass,\n decoratedFnName: UpdateHandlerFunctionKeys<ElemClass> | any\n ) => {\n // @ts-expect-error - update is a protected property\n const { update } = proto;\n const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];\n\n // @ts-expect-error - update is a protected property\n proto.update = function (this: ElemClass, changedProps: Map<keyof ElemClass, ElemClass[keyof ElemClass]>) {\n watchedProperties.forEach(property => {\n const key = property as keyof ElemClass;\n if (changedProps.has(key)) {\n const oldValue = changedProps.get(key);\n const newValue = this[key];\n\n if (oldValue !== newValue) {\n if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {\n (this[decoratedFnName] as unknown as UpdateHandler)(oldValue, newValue);\n }\n }\n }\n });\n\n update.call(this, changedProps);\n };\n };\n}\n"],"mappings":";AA6BO,SAAS,MAAM,cAAiC,SAAwB;AAC7E,QAAM,kBAA0C;AAAA,IAC9C,sBAAsB;AAAA,IACtB,GAAG;AAAA,EACL;AACA,SAAO,CACL,OACA,oBACG;AAEH,UAAM,EAAE,OAAO,IAAI;AACnB,UAAM,oBAAoB,MAAM,QAAQ,YAAY,IAAI,eAAe,CAAC,YAAY;AAGpF,UAAM,SAAS,SAA2B,cAAgE;AACxG,wBAAkB,QAAQ,cAAY;AACpC,cAAM,MAAM;AACZ,YAAI,aAAa,IAAI,GAAG,GAAG;AACzB,gBAAM,WAAW,aAAa,IAAI,GAAG;AACrC,gBAAM,WAAW,KAAK,GAAG;AAEzB,cAAI,aAAa,UAAU;AACzB,gBAAI,CAAC,gBAAgB,wBAAwB,KAAK,YAAY;AAC5D,cAAC,KAAK,eAAe,EAA+B,UAAU,QAAQ;AAAA,YACxE;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAED,aAAO,KAAK,MAAM,YAAY;AAAA,IAChC;AAAA,EACF;AACF;","names":[]}
|