@citolab/qti-components 7.0.5 → 7.0.6-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-3V6LA7B3.js +8 -0
- package/cdn/chunks/chunk-4WXQYE2P.js +8 -0
- package/cdn/chunks/chunk-5BR5CJFH.js +24 -0
- package/cdn/chunks/chunk-5GCSZ3CH.js +73 -0
- package/cdn/chunks/chunk-5P7CTN7Q.js +11 -0
- package/cdn/chunks/chunk-6MCYE7P5.js +1 -0
- package/cdn/chunks/chunk-6S4CDN3T.js +43 -0
- package/cdn/chunks/chunk-DZCKF45D.js +5 -0
- package/cdn/chunks/chunk-FRS2J3OS.js +59 -0
- package/cdn/chunks/chunk-FTKONGII.js +934 -0
- package/cdn/chunks/chunk-IAP2CEE7.js +1 -0
- package/cdn/chunks/chunk-IMJOPCFR.js +1 -0
- package/cdn/chunks/chunk-KWPDTFYH.js +1 -0
- package/cdn/chunks/{chunk-UIEC4LXR.js → chunk-L4CUWIE6.js} +1 -1
- package/cdn/chunks/chunk-LZZB4VGC.js +48 -0
- package/cdn/chunks/{chunk-CFXQCNG6.js → chunk-MJMONWKB.js} +18 -2
- package/cdn/chunks/chunk-PKT2SJQD.js +8 -0
- package/cdn/chunks/chunk-QQCGUVEV.js +1 -0
- package/cdn/chunks/chunk-R33OODNX.js +1 -0
- package/cdn/chunks/chunk-RXKI3AO4.js +1 -0
- package/cdn/chunks/chunk-TQBDBMWL.js +5 -0
- package/cdn/chunks/chunk-X2KBNXRO.js +6 -0
- package/cdn/exports/interaction.js +1 -0
- package/cdn/exports/item.context.js +1 -0
- package/cdn/exports/qti-assessment-item.context.js +1 -0
- package/cdn/exports/qti-condition-expression.js +1 -0
- package/cdn/exports/qti-expression.js +1 -0
- package/cdn/index.global.js +56 -107
- package/cdn/index.js +1 -4503
- package/cdn/qti-components/index.js +1 -924
- package/cdn/qti-item/core/index.js +1 -0
- package/cdn/qti-loader/index.js +1 -23
- package/cdn/qti-test/components/index.js +1 -3598
- package/cdn/qti-test/components/styles.js +1 -17
- package/cdn/qti-test/components/test-component.abstract.js +1 -1
- package/cdn/qti-test/components/test-item-link.js +1 -24
- package/cdn/qti-test/components/test-next.js +1 -24
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -3
- package/cdn/qti-test/components/test-prev.js +1 -24
- package/cdn/qti-test/components/test-view.js +1 -11
- package/cdn/qti-test/core/index.js +1 -0
- package/cdn/qti-transformers/index.js +1 -23
- package/dist/chunks/{chunk-PUBGXXTM.js → chunk-2V6LQV2K.js} +5 -5
- package/dist/chunks/{chunk-LKINC6JO.js → chunk-3EU75IUF.js} +6 -6
- package/dist/chunks/chunk-3EU75IUF.js.map +1 -0
- package/dist/chunks/chunk-4GNVYCBN.js +627 -0
- package/dist/chunks/chunk-4GNVYCBN.js.map +1 -0
- package/dist/chunks/{chunk-HWA4A3SR.js → chunk-4WVLWWYJ.js} +5 -5
- package/dist/chunks/chunk-6JXR63MH.js +50 -0
- package/dist/chunks/chunk-6JXR63MH.js.map +1 -0
- package/dist/chunks/{chunk-3ROZMGAN.js → chunk-7QMCKYDR.js} +3 -3
- package/dist/chunks/{chunk-W4B23OIP.js → chunk-A24F75DB.js} +3 -3
- package/dist/chunks/chunk-BPHQLJWE.js +102 -0
- package/dist/chunks/chunk-BPHQLJWE.js.map +1 -0
- package/dist/chunks/chunk-DLUJN2FW.js +22 -0
- package/dist/chunks/chunk-DLUJN2FW.js.map +1 -0
- package/dist/chunks/{chunk-3OXGDCSU.js → chunk-DU37U6PW.js} +4835 -4991
- package/dist/chunks/chunk-DU37U6PW.js.map +1 -0
- package/dist/chunks/{chunk-XPDS72XY.js → chunk-FV7HWK54.js} +1 -1
- package/dist/chunks/chunk-FV7HWK54.js.map +1 -0
- package/dist/chunks/chunk-GSWZT6N2.js +50 -0
- package/dist/chunks/chunk-GSWZT6N2.js.map +1 -0
- package/dist/{qti-item/qti-item.js → chunks/chunk-H2JE6IVU.js} +2 -13
- package/dist/chunks/{chunk-LROTNPC2.js → chunk-HHVRU3AJ.js} +21 -8
- package/dist/chunks/chunk-HHVRU3AJ.js.map +1 -0
- package/dist/chunks/{chunk-Y6UWSECL.js → chunk-J2SHENRN.js} +2 -2
- package/dist/chunks/chunk-J2SHENRN.js.map +1 -0
- package/dist/chunks/chunk-KOEILLVS.js +8 -0
- package/dist/chunks/chunk-KOEILLVS.js.map +1 -0
- package/dist/chunks/{chunk-ZEFOMZNY.js → chunk-KYAIMBP5.js} +3 -3
- package/dist/chunks/chunk-O6WEZVEM.js +43 -0
- package/dist/chunks/chunk-O6WEZVEM.js.map +1 -0
- package/dist/chunks/{chunk-XDFXD3BI.js → chunk-UFYWCLXF.js} +2 -2
- package/dist/chunks/chunk-UFYWCLXF.js.map +1 -0
- package/dist/chunks/chunk-UN2IFSGC.js +1 -0
- package/dist/chunks/chunk-XSI6FXGD.js +19 -0
- package/dist/chunks/chunk-XSI6FXGD.js.map +1 -0
- package/dist/chunks/chunk-ZPNJ2HP5.js +71 -0
- package/dist/chunks/chunk-ZPNJ2HP5.js.map +1 -0
- package/dist/exports/expression-result.d.ts +19 -0
- package/dist/exports/expression-result.js +1 -0
- package/dist/exports/interaction.d.ts +23 -0
- package/dist/exports/interaction.interface.d.ts +13 -0
- package/dist/exports/interaction.interface.js +1 -0
- package/dist/exports/interaction.js +8 -0
- package/dist/exports/item.context.d.ts +12 -0
- package/dist/exports/item.context.js +8 -0
- package/dist/exports/qti-assessment-item.context.d.ts +10 -0
- package/dist/exports/qti-assessment-item.context.js +8 -0
- package/dist/exports/qti-condition-expression.d.ts +13 -0
- package/dist/exports/qti-condition-expression.js +10 -0
- package/dist/exports/qti-expression.d.ts +21 -0
- package/dist/exports/qti-expression.js +9 -0
- package/dist/exports/variables.d.ts +3 -0
- package/dist/exports/variables.js +1 -0
- package/dist/exports/variables.js.map +1 -0
- package/dist/index.d.ts +12 -8
- package/dist/index.js +140 -11045
- package/dist/index.js.map +1 -1
- package/dist/qti-components/index.d.ts +36 -9
- package/dist/qti-components/index.js +95 -6438
- package/dist/qti-components/index.js.map +1 -1
- package/dist/qti-components-jsx.d.ts +371 -666
- package/dist/qti-item/{components/item-container.d.ts → core/index.d.ts} +22 -1
- package/dist/qti-item/core/index.js +13 -0
- package/dist/qti-item/core/index.js.map +1 -0
- package/dist/qti-loader/index.d.ts +7 -1
- package/dist/qti-loader/index.js +6 -305
- package/dist/qti-loader/index.js.map +1 -1
- package/dist/{qti-simple-choice-DxWcdKHi.d.ts → qti-response-declaration-DAeBp8HH.d.ts} +463 -613
- package/dist/qti-test/components/index.d.ts +8 -4
- package/dist/qti-test/components/index.js +24 -4135
- package/dist/qti-test/components/index.js.map +1 -1
- package/dist/qti-test/components/styles.js +7 -22
- package/dist/qti-test/components/styles.js.map +1 -1
- package/dist/qti-test/components/test-component.abstract.d.ts +8 -3
- package/dist/qti-test/components/test-component.abstract.js +7 -145
- package/dist/qti-test/components/test-component.abstract.js.map +1 -1
- package/dist/qti-test/components/test-item-link.d.ts +8 -3
- package/dist/qti-test/components/test-item-link.js +9 -198
- package/dist/qti-test/components/test-item-link.js.map +1 -1
- package/dist/qti-test/components/test-next.d.ts +8 -3
- package/dist/qti-test/components/test-next.js +9 -205
- package/dist/qti-test/components/test-next.js.map +1 -1
- package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +8 -3
- package/dist/qti-test/components/test-paging-buttons-stamp.js +8 -214
- package/dist/qti-test/components/test-paging-buttons-stamp.js.map +1 -1
- package/dist/qti-test/components/test-prev.d.ts +8 -3
- package/dist/qti-test/components/test-prev.js +9 -205
- package/dist/qti-test/components/test-prev.js.map +1 -1
- package/dist/qti-test/components/test-view.d.ts +8 -3
- package/dist/qti-test/components/test-view.js +8 -205
- package/dist/qti-test/components/test-view.js.map +1 -1
- package/dist/qti-test/core/index.d.ts +132 -0
- package/dist/qti-test/core/index.js +27 -0
- package/dist/qti-test/core/index.js.map +1 -0
- package/dist/qti-transformers/index.js +6 -287
- package/dist/qti-transformers/index.js.map +1 -1
- package/dist/{test-base-BJwG9Ie8.d.ts → test.context-CaENAJNk.d.ts} +22 -30
- package/dist/variables-cO3DzqJy.d.ts +33 -0
- package/dist/vscode.html-custom-data.json +226 -293
- package/package.json +83 -77
- package/cdn/chunks/chunk-5O3Z7TDV.js +0 -1
- package/cdn/chunks/chunk-65LFT33L.js +0 -8
- package/cdn/chunks/chunk-6D25UFJR.js +0 -8
- package/cdn/chunks/chunk-6UGPNL7M.js +0 -1
- package/cdn/chunks/chunk-CSUKVUZF.js +0 -3
- package/cdn/chunks/chunk-CSY3WI5A.js +0 -1
- package/cdn/chunks/chunk-G5O7EN45.js +0 -5
- package/cdn/chunks/chunk-JLNHEMQG.js +0 -1
- package/cdn/chunks/chunk-LPWIM7QJ.js +0 -902
- package/cdn/chunks/chunk-M3YRM3AV.js +0 -1
- package/cdn/chunks/chunk-M6BOWL2U.js +0 -1
- package/cdn/chunks/chunk-P5IE36FO.js +0 -8
- package/cdn/chunks/chunk-PXH5KN5O.js +0 -1
- package/cdn/chunks/chunk-RBEI6NIF.js +0 -1
- package/cdn/chunks/chunk-SMKIYFFI.js +0 -1
- package/cdn/chunks/chunk-SRLMW23F.js +0 -0
- package/cdn/chunks/chunk-T3YDLD2H.js +0 -11
- package/cdn/chunks/chunk-T4HD2C4F.js +0 -1
- package/cdn/chunks/chunk-T6IXJ4W4.js +0 -1
- package/cdn/chunks/chunk-TFAUBGP2.js +0 -0
- package/cdn/chunks/chunk-V44O3GTW.js +0 -0
- package/cdn/chunks/chunk-V6B54FQW.js +0 -5
- package/cdn/chunks/chunk-V6KX6BQN.js +0 -1
- package/cdn/chunks/chunk-VYANBI35.js +0 -1
- package/cdn/chunks/chunk-ZIZLFFSG.js +0 -0
- package/cdn/index.css +0 -1
- package/cdn/qti-components/index.global.js +0 -226
- package/cdn/qti-item/components/index.css +0 -1
- 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.css +0 -1
- 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/index.css +0 -1
- 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.css +0 -1
- package/cdn/qti-test/components/index.global.js +0 -242
- 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-container.css +0 -1
- package/cdn/qti-test/components/test-container.global.js +0 -149
- package/cdn/qti-test/components/test-container.js +0 -3549
- 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 -297
- package/cdn/qti-test/components/test-next.spec.js +0 -5215
- 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/index.css +0 -1
- 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/chunks/chunk-3G2DDBJW.js +0 -44
- package/dist/chunks/chunk-3G2DDBJW.js.map +0 -1
- package/dist/chunks/chunk-3NLCJYSX.js +0 -1
- package/dist/chunks/chunk-3OXGDCSU.js.map +0 -1
- package/dist/chunks/chunk-6YE2KJ4C.js +0 -55
- package/dist/chunks/chunk-AAQCM2FP.js +0 -56
- package/dist/chunks/chunk-AAQCM2FP.js.map +0 -1
- package/dist/chunks/chunk-DJLE6EV2.js +0 -36
- package/dist/chunks/chunk-DJLE6EV2.js.map +0 -1
- package/dist/chunks/chunk-EW5CTHAD.js +0 -1
- package/dist/chunks/chunk-IKZWK2C5.js +0 -1
- package/dist/chunks/chunk-IP7JSYO6.js +0 -1
- package/dist/chunks/chunk-JE6BMXZU.js +0 -94
- package/dist/chunks/chunk-JE6BMXZU.js.map +0 -1
- package/dist/chunks/chunk-JSPJGWGT.js +0 -20
- package/dist/chunks/chunk-JSPJGWGT.js.map +0 -1
- package/dist/chunks/chunk-LKINC6JO.js.map +0 -1
- package/dist/chunks/chunk-LROTNPC2.js.map +0 -1
- package/dist/chunks/chunk-MTMT2RMF.js +0 -63
- package/dist/chunks/chunk-MTMT2RMF.js.map +0 -1
- package/dist/chunks/chunk-NDJZGJUR.js +0 -65
- package/dist/chunks/chunk-NDJZGJUR.js.map +0 -1
- package/dist/chunks/chunk-OE2LFIH2.js +0 -1
- package/dist/chunks/chunk-OJ2XGDWK.js +0 -1
- package/dist/chunks/chunk-QRCUNRP5.js +0 -75
- package/dist/chunks/chunk-QRCUNRP5.js.map +0 -1
- package/dist/chunks/chunk-S6JJYCO7.js +0 -51
- package/dist/chunks/chunk-S6JJYCO7.js.map +0 -1
- package/dist/chunks/chunk-U3AALKEP.js +0 -1
- package/dist/chunks/chunk-UCQFSRYF.js +0 -34
- package/dist/chunks/chunk-UCQFSRYF.js.map +0 -1
- package/dist/chunks/chunk-URGVQ64M.js +0 -1
- package/dist/chunks/chunk-V4FXK4TP.js +0 -128
- package/dist/chunks/chunk-V4FXK4TP.js.map +0 -1
- package/dist/chunks/chunk-XDFXD3BI.js.map +0 -1
- package/dist/chunks/chunk-XPDS72XY.js.map +0 -1
- package/dist/chunks/chunk-Y6UWSECL.js.map +0 -1
- package/dist/index-Cvrd4KQA.d.ts +0 -109
- 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.js +0 -3856
- package/dist/qti-item/components/item-container.js.map +0 -1
- 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.map +0 -1
- package/dist/qti-test/components/test-container.d.ts +0 -37
- package/dist/qti-test/components/test-container.js +0 -3782
- package/dist/qti-test/components/test-container.js.map +0 -1
- package/dist/qti-test/components/test-next.spec.d.ts +0 -16
- package/dist/qti-test/components/test-next.spec.js +0 -56915
- 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.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/cdn/chunks/{chunk-6DMSHH5X.js → chunk-3GO57DNP.js} +0 -0
- /package/cdn/{chunks/chunk-DAZR7RUI.js → exports/expression-result.js} +0 -0
- /package/cdn/{chunks/chunk-EOPEMJS3.js → exports/interaction.interface.js} +0 -0
- /package/cdn/{chunks/chunk-GEFUIFM7.js → exports/variables.js} +0 -0
- /package/dist/chunks/{chunk-PUBGXXTM.js.map → chunk-2V6LQV2K.js.map} +0 -0
- /package/dist/chunks/{chunk-HWA4A3SR.js.map → chunk-4WVLWWYJ.js.map} +0 -0
- /package/dist/chunks/{chunk-3ROZMGAN.js.map → chunk-7QMCKYDR.js.map} +0 -0
- /package/dist/chunks/{chunk-W4B23OIP.js.map → chunk-A24F75DB.js.map} +0 -0
- /package/dist/chunks/{chunk-3NLCJYSX.js.map → chunk-H2JE6IVU.js.map} +0 -0
- /package/dist/chunks/{chunk-ZEFOMZNY.js.map → chunk-KYAIMBP5.js.map} +0 -0
- /package/dist/chunks/{chunk-6YE2KJ4C.js.map → chunk-UN2IFSGC.js.map} +0 -0
- /package/dist/{chunks/chunk-EW5CTHAD.js.map → exports/expression-result.js.map} +0 -0
- /package/dist/{chunks/chunk-IKZWK2C5.js.map → exports/interaction.interface.js.map} +0 -0
- /package/dist/{chunks/chunk-IP7JSYO6.js.map → exports/interaction.js.map} +0 -0
- /package/dist/{chunks/chunk-OE2LFIH2.js.map → exports/item.context.js.map} +0 -0
- /package/dist/{chunks/chunk-OJ2XGDWK.js.map → exports/qti-assessment-item.context.js.map} +0 -0
- /package/dist/{chunks/chunk-U3AALKEP.js.map → exports/qti-condition-expression.js.map} +0 -0
- /package/dist/{chunks/chunk-URGVQ64M.js.map → exports/qti-expression.js.map} +0 -0
|
@@ -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-6YE2KJ4C.js.map
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__decorateClass
|
|
3
|
-
} from "./chunk-6YE2KJ4C.js";
|
|
4
|
-
|
|
5
|
-
// src/lib/qti-test/qti-assessment-test/qti-test-part.ts
|
|
6
|
-
import { html, LitElement } from "lit";
|
|
7
|
-
import { customElement, property } from "lit/decorators.js";
|
|
8
|
-
var QtiTestPart = class extends LitElement {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.identifier = "";
|
|
12
|
-
this.title = "";
|
|
13
|
-
this.class = "";
|
|
14
|
-
this.NavigationMode = "nonlinear";
|
|
15
|
-
this.submissionMode = "individual";
|
|
16
|
-
}
|
|
17
|
-
async connectedCallback() {
|
|
18
|
-
super.connectedCallback();
|
|
19
|
-
await this.updateComplete;
|
|
20
|
-
this.dispatchEvent(
|
|
21
|
-
new Event("qti-test-part-connected", {
|
|
22
|
-
bubbles: true,
|
|
23
|
-
composed: true
|
|
24
|
-
})
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return html` <slot></slot>`;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
__decorateClass([
|
|
32
|
-
property({ type: String })
|
|
33
|
-
], QtiTestPart.prototype, "identifier", 2);
|
|
34
|
-
__decorateClass([
|
|
35
|
-
property({ type: String })
|
|
36
|
-
], QtiTestPart.prototype, "title", 2);
|
|
37
|
-
__decorateClass([
|
|
38
|
-
property({ type: String })
|
|
39
|
-
], QtiTestPart.prototype, "class", 2);
|
|
40
|
-
__decorateClass([
|
|
41
|
-
property({ type: String, attribute: "navigation-mode" })
|
|
42
|
-
], QtiTestPart.prototype, "NavigationMode", 2);
|
|
43
|
-
__decorateClass([
|
|
44
|
-
property({ type: String, attribute: "submission-mode" })
|
|
45
|
-
], QtiTestPart.prototype, "submissionMode", 2);
|
|
46
|
-
QtiTestPart = __decorateClass([
|
|
47
|
-
customElement("qti-test-part")
|
|
48
|
-
], QtiTestPart);
|
|
49
|
-
if (!customElements.get("qti-test-part")) {
|
|
50
|
-
customElements.define("qti-test-part", QtiTestPart);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export {
|
|
54
|
-
QtiTestPart
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=chunk-AAQCM2FP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/qti-assessment-test/qti-test-part.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n@customElement('qti-test-part')\nexport class QtiTestPart extends LitElement {\n @property({ type: String }) identifier: string = '';\n @property({ type: String }) title: string = '';\n @property({ type: String }) class: string = '';\n\n @property({ type: String, attribute: 'navigation-mode' })\n NavigationMode: 'linear' | 'nonlinear' = 'nonlinear';\n\n @property({ type: String, attribute: 'submission-mode' })\n submissionMode: 'individual' | 'simultaneous' = 'individual';\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new Event('qti-test-part-connected', {\n bubbles: true,\n composed: true\n })\n );\n }\n\n render() {\n return html` <slot></slot>`;\n }\n}\n\nif (!customElements.get('qti-test-part')) {\n customElements.define('qti-test-part', QtiTestPart);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-test-part': QtiTestPart;\n }\n}\n"],"mappings":";;;;;AAAA,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe,gBAAgB;AAEjC,IAAM,cAAN,cAA0B,WAAW;AAAA,EAArC;AAAA;AACuB,sBAAqB;AACrB,iBAAgB;AAChB,iBAAgB;AAG5C,0BAAyC;AAGzC,0BAAgD;AAAA;AAAA,EAEhD,MAAM,oBAAmC;AACvC,UAAM,kBAAkB;AACxB,UAAM,KAAK;AACX,SAAK;AAAA,MACH,IAAI,MAAM,2BAA2B;AAAA,QACnC,SAAS;AAAA,QACT,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AAxB8B;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GADf,YACiB;AACA;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAFf,YAEiB;AACA;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAHf,YAGiB;AAG5B;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,kBAAkB,CAAC;AAAA,GAL7C,YAMX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,kBAAkB,CAAC;AAAA,GAR7C,YASX;AATW,cAAN;AAAA,EADN,cAAc,eAAe;AAAA,GACjB;AA2Bb,IAAI,CAAC,eAAe,IAAI,eAAe,GAAG;AACxC,iBAAe,OAAO,iBAAiB,WAAW;AACpD;","names":[]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TestLoaderMixin
|
|
3
|
-
} from "./chunk-UCQFSRYF.js";
|
|
4
|
-
import {
|
|
5
|
-
TestNavigationMixin
|
|
6
|
-
} from "./chunk-NDJZGJUR.js";
|
|
7
|
-
import {
|
|
8
|
-
TestViewMixin
|
|
9
|
-
} from "./chunk-S6JJYCO7.js";
|
|
10
|
-
import {
|
|
11
|
-
TestBase
|
|
12
|
-
} from "./chunk-V4FXK4TP.js";
|
|
13
|
-
import {
|
|
14
|
-
__decorateClass
|
|
15
|
-
} from "./chunk-6YE2KJ4C.js";
|
|
16
|
-
|
|
17
|
-
// src/lib/qti-test/qti-test.ts
|
|
18
|
-
import { html } from "lit";
|
|
19
|
-
import { customElement } from "lit/decorators.js";
|
|
20
|
-
var QtiTest = class extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {
|
|
21
|
-
/**
|
|
22
|
-
* Renders the component's template.
|
|
23
|
-
* Provides a default `<slot>` for content projection.
|
|
24
|
-
*/
|
|
25
|
-
render() {
|
|
26
|
-
return html`<slot></slot>`;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
QtiTest = __decorateClass([
|
|
30
|
-
customElement("qti-test")
|
|
31
|
-
], QtiTest);
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
QtiTest
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=chunk-DJLE6EV2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/qti-test.ts"],"sourcesContent":["import { html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { TestLoaderMixin, TestNavigationMixin, TestViewMixin } from './mixins';\nimport { TestBase } from './test-base';\n\n/**\n * `<qti-test>` is a custom element designed for rendering and interacting with QTI (Question and Test Interoperability) tests.\n *\n * This component leverages several mixins to provide functionality for loading, navigating, processing, and displaying QTI test assessments.\n *\n * ### Example Usage\n *\n * Minimal example including navigation:\n *\n * ```html\n * <qti-test>\n * <test-container test-url=\"./path/to/assessment.xml\"></test-container>\n * <nav class=\"flex\">\n * <test-prev></test-prev>\n * <test-next></test-next>\n * </nav>\n * </qti-test>\n * ```\n *\n * Use the following file structure\n * A qti-test loads a QTI3.0 assessmenttest.xml file from a package folder.\n *\n * ```plaintext\n * Root/\n * ├── index.html\n * └── /assets/api/examples/\n * ├── assessmenttest.xml\n * └── imsmanifest.xml\n *\n * ```\n *\n * ### Test components\n *\n * Use test components inside the qti-test component for added functionality.\n * ### Test next\n * `<test-next> | TestNext`\n *\n * ### Test prev\n *\n * `<test-prev> | TestPrev`\n * ### Test components\n *\n * You can use normal class names to style the elements.\n * And you can use the `test-prev` and `test-next` elements to navigate through the test.\n *\n */\n@customElement('qti-test')\nexport class QtiTest extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {\n /**\n * Renders the component's template.\n * Provides a default `<slot>` for content projection.\n */\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-test': QtiTest;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,qBAAqB;AAmDvB,IAAM,UAAN,cAAsB,gBAAgB,oBAAoB,cAAc,QAAQ,CAAC,CAAC,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA,EAKzF,SAAS;AACP,WAAO;AAAA,EACT;AACF;AARa,UAAN;AAAA,EADN,cAAc,UAAU;AAAA,GACZ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-EW5CTHAD.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-IKZWK2C5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-IP7JSYO6.js.map
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
item_default
|
|
3
|
-
} from "./chunk-Y6UWSECL.js";
|
|
4
|
-
import {
|
|
5
|
-
watch
|
|
6
|
-
} from "./chunk-ELDMXTUQ.js";
|
|
7
|
-
import {
|
|
8
|
-
qtiTransformTest
|
|
9
|
-
} from "./chunk-XDMSEAYC.js";
|
|
10
|
-
import {
|
|
11
|
-
__decorateClass
|
|
12
|
-
} from "./chunk-6YE2KJ4C.js";
|
|
13
|
-
|
|
14
|
-
// src/lib/qti-test/components/test-container.ts
|
|
15
|
-
import { LitElement, html } from "lit";
|
|
16
|
-
import { customElement, property, state } from "lit/decorators.js";
|
|
17
|
-
import { until } from "lit/directives/until.js";
|
|
18
|
-
var TestContainer = class extends LitElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.testURL = null;
|
|
22
|
-
this.testDoc = null;
|
|
23
|
-
this.testXML = null;
|
|
24
|
-
/** Template content if provided */
|
|
25
|
-
this.templateContent = null;
|
|
26
|
-
}
|
|
27
|
-
async handleTestURLChange() {
|
|
28
|
-
if (!this.testURL) return;
|
|
29
|
-
try {
|
|
30
|
-
const api = await qtiTransformTest().load(this.testURL);
|
|
31
|
-
this.testDoc = api.htmlDoc();
|
|
32
|
-
} catch (error) {
|
|
33
|
-
console.error("Error loading or parsing XML:", error);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
handleTestXMLChange() {
|
|
37
|
-
if (!this.testXML) return;
|
|
38
|
-
try {
|
|
39
|
-
this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();
|
|
40
|
-
} catch (error) {
|
|
41
|
-
console.error("Error parsing XML:", error);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
async connectedCallback() {
|
|
45
|
-
super.connectedCallback();
|
|
46
|
-
this.initializeTemplateContent();
|
|
47
|
-
this.applyStyles();
|
|
48
|
-
if (this.testURL) {
|
|
49
|
-
this.handleTestURLChange();
|
|
50
|
-
}
|
|
51
|
-
if (this.testXML) {
|
|
52
|
-
this.handleTestXMLChange();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
initializeTemplateContent() {
|
|
56
|
-
const template = this.querySelector("template");
|
|
57
|
-
this.templateContent = template ? template.content : html``;
|
|
58
|
-
}
|
|
59
|
-
applyStyles() {
|
|
60
|
-
const sheet = new CSSStyleSheet();
|
|
61
|
-
sheet.replaceSync(item_default);
|
|
62
|
-
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
65
|
-
return html`
|
|
66
|
-
${this.templateContent}
|
|
67
|
-
<slot></slot>
|
|
68
|
-
${until(this.testDoc, html`<span>Loading...</span>`)}
|
|
69
|
-
`;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
__decorateClass([
|
|
73
|
-
property({ type: String, attribute: "test-url" })
|
|
74
|
-
], TestContainer.prototype, "testURL", 2);
|
|
75
|
-
__decorateClass([
|
|
76
|
-
state()
|
|
77
|
-
], TestContainer.prototype, "testDoc", 2);
|
|
78
|
-
__decorateClass([
|
|
79
|
-
state()
|
|
80
|
-
], TestContainer.prototype, "testXML", 2);
|
|
81
|
-
__decorateClass([
|
|
82
|
-
watch("testURL", { waitUntilFirstUpdate: true })
|
|
83
|
-
], TestContainer.prototype, "handleTestURLChange", 1);
|
|
84
|
-
__decorateClass([
|
|
85
|
-
watch("testXML", { waitUntilFirstUpdate: true })
|
|
86
|
-
], TestContainer.prototype, "handleTestXMLChange", 1);
|
|
87
|
-
TestContainer = __decorateClass([
|
|
88
|
-
customElement("test-container")
|
|
89
|
-
], TestContainer);
|
|
90
|
-
|
|
91
|
-
export {
|
|
92
|
-
TestContainer
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=chunk-JE6BMXZU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/components/test-container.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\nimport { watch } from '../../decorators/watch';\nimport itemCss from '../../../item.css?inline';\nimport { qtiTransformTest } from '../../qti-transformers';\n\n/**\n * `<test-container>` is a custom element designed for hosting the qti-assessment-item.\n * The `qti-assessment-test` will be placed inside the shadow DOM of this element.\n * The element loads the test from the provided URL and renders it inside the shadow DOM.\n *\n * ```html\n * <qti-test>\n * <test-container class=\"m-4 bg-white\" test-url=\"./path/to/assessmenttest.xml\"></test-container>\n * </qti-test>\n * ```\n */\n@customElement('test-container')\nexport class TestContainer extends LitElement {\n /** URL of the item to load */\n @property({ type: String, attribute: 'test-url' })\n testURL: string = null;\n\n /** A parsed HTML document */\n @state()\n testDoc: DocumentFragment = null;\n\n /** The raw XML string */\n @state()\n testXML: string = null;\n\n /** Template content if provided */\n private templateContent = null;\n\n @watch('testURL', { waitUntilFirstUpdate: true })\n protected async handleTestURLChange() {\n if (!this.testURL) return;\n try {\n const api = await qtiTransformTest().load(this.testURL);\n this.testDoc = api.htmlDoc();\n } catch (error) {\n console.error('Error loading or parsing XML:', error);\n }\n }\n\n @watch('testXML', { waitUntilFirstUpdate: true })\n protected handleTestXMLChange() {\n if (!this.testXML) return;\n try {\n this.testDoc = qtiTransformTest().parse(this.testXML).htmlDoc();\n } catch (error) {\n console.error('Error parsing XML:', error);\n }\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n this.initializeTemplateContent();\n this.applyStyles();\n if (this.testURL) {\n this.handleTestURLChange();\n }\n if (this.testXML) {\n this.handleTestXMLChange();\n }\n }\n\n private initializeTemplateContent() {\n const template = this.querySelector('template') as HTMLTemplateElement;\n this.templateContent = template ? template.content : html``;\n }\n\n private applyStyles() {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(itemCss);\n this.shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n render() {\n return html`\n ${this.templateContent}\n <slot></slot>\n ${until(this.testDoc, html`<span>Loading...</span>`)}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-container': TestContainer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,YAAY;AACjC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,aAAa;AAiBf,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC;AAAA;AAGL,mBAAkB;AAIlB,mBAA4B;AAI5B,mBAAkB;AAGlB;AAAA,SAAQ,kBAAkB;AAAA;AAAA,EAG1B,MAAgB,sBAAsB;AACpC,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,YAAM,MAAM,MAAM,iBAAiB,EAAE,KAAK,KAAK,OAAO;AACtD,WAAK,UAAU,IAAI,QAAQ;AAAA,IAC7B,SAAS,OAAO;AACd,cAAQ,MAAM,iCAAiC,KAAK;AAAA,IACtD;AAAA,EACF;AAAA,EAGU,sBAAsB;AAC9B,QAAI,CAAC,KAAK,QAAS;AACnB,QAAI;AACF,WAAK,UAAU,iBAAiB,EAAE,MAAM,KAAK,OAAO,EAAE,QAAQ;AAAA,IAChE,SAAS,OAAO;AACd,cAAQ,MAAM,sBAAsB,KAAK;AAAA,IAC3C;AAAA,EACF;AAAA,EAEA,MAAM,oBAAmC;AACvC,UAAM,kBAAkB;AACxB,SAAK,0BAA0B;AAC/B,SAAK,YAAY;AACjB,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AACA,QAAI,KAAK,SAAS;AAChB,WAAK,oBAAoB;AAAA,IAC3B;AAAA,EACF;AAAA,EAEQ,4BAA4B;AAClC,UAAM,WAAW,KAAK,cAAc,UAAU;AAC9C,SAAK,kBAAkB,WAAW,SAAS,UAAU;AAAA,EACvD;AAAA,EAEQ,cAAc;AACpB,UAAM,QAAQ,IAAI,cAAc;AAChC,UAAM,YAAY,YAAO;AACzB,SAAK,WAAW,qBAAqB,CAAC,KAAK;AAAA,EAC7C;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,QACH,KAAK,eAAe;AAAA;AAAA,QAEpB,MAAM,KAAK,SAAS,6BAA6B,CAAC;AAAA;AAAA,EAExD;AACF;AAhEE;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,WAAW,CAAC;AAAA,GAFtC,cAGX;AAIA;AAAA,EADC,MAAM;AAAA,GANI,cAOX;AAIA;AAAA,EADC,MAAM;AAAA,GAVI,cAWX;AAMgB;AAAA,EADf,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAhBrC,cAiBK;AAWN;AAAA,EADT,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA3BrC,cA4BD;AA5BC,gBAAN;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB;","names":[]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__decorateClass
|
|
3
|
-
} from "./chunk-6YE2KJ4C.js";
|
|
4
|
-
|
|
5
|
-
// src/lib/qti-item/qti-item.ts
|
|
6
|
-
import { html, LitElement } from "lit";
|
|
7
|
-
import { customElement } from "lit/decorators.js";
|
|
8
|
-
var QtiItem = class extends LitElement {
|
|
9
|
-
render() {
|
|
10
|
-
return html`<slot></slot>`;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
QtiItem = __decorateClass([
|
|
14
|
-
customElement("qti-item")
|
|
15
|
-
], QtiItem);
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
QtiItem
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=chunk-JSPJGWGT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-item/qti-item.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\n/**\n * `<qti-item>` is a custom element designed for rendering a single `qti-assessment-item`.\n * It can also host some functionalities to interact with the item like scoring, showing feedback, etc.\n * Placing a mandatory `<item-container>` inside '<qti-item>' will load or parse the item and render it.\n * See `<item-container>` for more details.\n *\n * ```html\n * <qti-item>\n * <item-container class=\"m-4 bg-white\" item-url=\"./path/to/item.xml\"></item-container>\n * </qti-item>\n * ```\n */\n@customElement('qti-item')\nexport class QtiItem extends LitElement {\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-item': QtiItem;\n }\n}\n"],"mappings":";;;;;AAAA,SAAS,MAAM,kBAAkB;AACjC,SAAS,qBAAqB;AAevB,IAAM,UAAN,cAAsB,WAAW;AAAA,EACtC,SAAS;AACP,WAAO;AAAA,EACT;AACF;AAJa,UAAN;AAAA,EADN,cAAc,UAAU;AAAA,GACZ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/components/test-component.abstract.ts","../../src/lib/decorators/prop-internal-state.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { LitElement } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { propInternalState } from '../../decorators';\nimport { testContext, testElement, TestElement, TestContext } from '../context';\nimport { watch } from '../../decorators/watch';\n\nexport abstract class TestComponent extends LitElement {\n @propInternalState({\n type: Boolean,\n reflect: true,\n aria: 'ariaDisabled' // Maps to `aria-disabled` attribute\n })\n public disabled = true;\n\n @state()\n @consume({ context: testContext, subscribe: true })\n protected _testContext?: TestContext;\n\n @state()\n @consume({ context: testElement, subscribe: true })\n protected _testElement?: TestElement;\n @watch('_testElement')\n _handleTestElementChange(_oldValue: TestElement, newValue: TestElement) {\n if (newValue.el) {\n this.disabled = false;\n }\n }\n\n protected _internals: ElementInternals;\n\n protected items;\n protected itemIndex;\n protected view;\n\n constructor() {\n super();\n this._internals = this.attachInternals();\n }\n\n protected willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n if (changedProperties.has('_testContext')) {\n const { items = [], navItemId } = this._testContext ?? {};\n this.itemIndex = items.findIndex(item => item.identifier === navItemId);\n this.items = items;\n this.view = this._testContext?.view;\n }\n }\n\n protected _switchView(view: string) {\n this.dispatchEvent(\n new CustomEvent('on-test-switch-view', {\n composed: true,\n bubbles: true,\n detail: view\n })\n );\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-test-item', {\n composed: true,\n bubbles: true,\n detail: identifier\n })\n );\n }\n}\n","import { ReactiveElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { PropertyDeclaration } from 'lit';\n\n// Extended decorator options\ninterface InternalStateOptions extends PropertyDeclaration {\n aria?: string; // Corresponding ARIA attribute, e.g., 'aria-disabled'\n}\n\nexport function propInternalState(options: InternalStateOptions) {\n return (protoOrDescriptor: any, name: string) => {\n // Apply the default Lit `@property` decorator\n property(options)(protoOrDescriptor, name);\n\n // Intercept the property descriptor to enhance functionality\n const key = `__${name}`; // Internal backing field\n\n Object.defineProperty(protoOrDescriptor, name, {\n get() {\n return this[key];\n },\n set(value: any) {\n const oldValue = this[key];\n this[key] = value;\n\n // Trigger updates if value changes\n if (oldValue !== value) {\n // Update internals state\n if (this._internals?.states) {\n const stateName = name.toLowerCase();\n if (value) {\n this._internals.states.add(`--${stateName}`);\n } else {\n this._internals.states.delete(`--${stateName}`);\n }\n }\n\n // Update ARIA attributes if specified\n if (options.aria && this._internals) {\n const ariaAttribute = options.aria;\n if (value) {\n this._internals[ariaAttribute] = 'true';\n } else {\n this._internals[ariaAttribute] = null;\n }\n }\n\n // Request an update\n (this as ReactiveElement).requestUpdate(name, oldValue);\n }\n },\n configurable: true,\n enumerable: true\n });\n };\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,eAAe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,YAAM,EAAE,QAAQ,CAAC,GAAG,UAAU,IAAI,KAAK,gBAAgB,CAAC;AACxD,WAAK,YAAY,MAAM,UAAU,UAAQ,KAAK,eAAe,SAAS;AACtE,WAAK,QAAQ;AACb,WAAK,OAAO,KAAK,cAAc;AAAA,IACjC;AAAA,EACF;AAAA,EAEU,YAAY,MAAc;AAClC,SAAK;AAAA,MACH,IAAI,YAAY,uBAAuB;AAAA,QACrC,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEU,aAAa,YAA0B;AAC/C,SAAK;AAAA,MACH,IAAI,YAAY,yBAAyB;AAAA,QACvC,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,MACV,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAvDS;AAAA,EALN,kBAAkB;AAAA,IACjB,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA;AAAA,EACR,CAAC;AAAA,GALmB,cAMb;AAIG;AAAA,EAFT,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,aAAa,WAAW,KAAK,CAAC;AAAA,GAT9B,cAUV;AAIA;AAAA,EAFT,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,aAAa,WAAW,KAAK,CAAC;AAAA,GAb9B,cAcV;AAEV;AAAA,EADC,MAAM,cAAc;AAAA,GAfD,cAgBpB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-item/components/item-container.ts"],"sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { until } from 'lit/directives/until.js';\nimport { watch } from '../../decorators/watch';\nimport itemCss from '../../../item.css?inline';\nimport { qtiTransformItem } from '../../qti-transformers';\n\n/**\n * `<item-container>` is a custom element designed for hosting the qti-assessment-item.\n * The `qti-assessment-item` will be placed inside the shadow DOM of this element.\n * The element loads the item from the provided URL and renders it inside the shadow DOM.\n *\n * ### Styling\n * Add a class to the element for styling.\n *\n * ```html\n * <qti-item>\n * <item-container class=\"m-4 bg-white\" item-url=\"./path/to/item.xml\"></item-container>\n * </qti-item>\n * ```\n */\n@customElement('item-container')\nexport class ItemContainer extends LitElement {\n /** URL of the item to load */\n @property({ type: String, attribute: 'item-url' })\n itemURL: string = null;\n\n /** A parsed HTML document */\n @state()\n itemDoc: DocumentFragment = null;\n\n /** The raw XML string */\n @state()\n itemXML: string = null;\n\n /** Template content if provided */\n private templateContent = null;\n\n @watch('itemURL', { waitUntilFirstUpdate: true })\n protected async handleItemURLChange() {\n if (!this.itemURL) return;\n try {\n const api = await qtiTransformItem().load(this.itemURL);\n this.itemDoc = api.htmlDoc();\n } catch (error) {\n console.error('Error loading or parsing XML:', error);\n }\n }\n\n @watch('itemXML', { waitUntilFirstUpdate: true })\n protected handleItemXMLChange() {\n if (!this.itemXML) return;\n try {\n this.itemDoc = qtiTransformItem().parse(this.itemXML).htmlDoc();\n } catch (error) {\n console.error('Error parsing XML:', error);\n }\n }\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n this.initializeTemplateContent();\n this.applyStyles();\n if (this.itemURL) {\n this.handleItemURLChange();\n }\n if (this.itemXML) {\n this.handleItemXMLChange();\n }\n }\n\n private initializeTemplateContent() {\n const template = this.querySelector('template') as HTMLTemplateElement;\n this.templateContent = template ? template.content : html``;\n }\n\n private applyStyles() {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync(itemCss);\n this.shadowRoot.adoptedStyleSheets = [sheet];\n }\n\n render() {\n return html`\n ${this.templateContent}\n <slot></slot>\n ${until(this.itemDoc, html`<span>Loading...</span>`)}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'item-container': ItemContainer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,YAAY;AACjC,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,aAAa;AAoBf,IAAM,gBAAN,cAA4B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AA,GANI,cAOX;AAIA;AAAA,EADC,MAAM;AAAA,GAVI,cAWX;AAMgB;AAAA,EADf,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GAhBrC,cAiBK;AAWN;AAAA,EADT,MAAM,WAAW,EAAE,sBAAsB,KAAK,CAAC;AAAA,GA3BrC,cA4BD;AA5BC,gBAAN;AAAA,EADN,cAAc,gBAAgB;AAAA,GAClB;","names":[]}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
testContext
|
|
3
|
-
} from "./chunk-XDFXD3BI.js";
|
|
4
|
-
import {
|
|
5
|
-
__decorateClass
|
|
6
|
-
} from "./chunk-6YE2KJ4C.js";
|
|
7
|
-
|
|
8
|
-
// src/lib/qti-test/qti-assessment-test/qti-assessment-section.ts
|
|
9
|
-
import { consume } from "@lit/context";
|
|
10
|
-
import { html, LitElement } from "lit";
|
|
11
|
-
import { property } from "lit/decorators.js";
|
|
12
|
-
var stringToBooleanConverter = {
|
|
13
|
-
fromAttribute(value) {
|
|
14
|
-
return value === "true";
|
|
15
|
-
},
|
|
16
|
-
toAttribute(value) {
|
|
17
|
-
return value ? "true" : "false";
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
var QtiAssessmentSection = class extends LitElement {
|
|
21
|
-
async connectedCallback() {
|
|
22
|
-
super.connectedCallback();
|
|
23
|
-
await this.updateComplete;
|
|
24
|
-
this.dispatchEvent(
|
|
25
|
-
new Event("qti-assessment-section-connected", {
|
|
26
|
-
bubbles: true,
|
|
27
|
-
composed: true
|
|
28
|
-
})
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
render() {
|
|
32
|
-
return html`<slot name="qti-rubric-block"></slot><slot></slot>`;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
__decorateClass([
|
|
36
|
-
property({ type: String })
|
|
37
|
-
], QtiAssessmentSection.prototype, "identifier", 2);
|
|
38
|
-
__decorateClass([
|
|
39
|
-
property({ type: String })
|
|
40
|
-
], QtiAssessmentSection.prototype, "required", 2);
|
|
41
|
-
__decorateClass([
|
|
42
|
-
property({ type: Boolean, converter: stringToBooleanConverter })
|
|
43
|
-
], QtiAssessmentSection.prototype, "fixed", 2);
|
|
44
|
-
__decorateClass([
|
|
45
|
-
property({ type: String })
|
|
46
|
-
], QtiAssessmentSection.prototype, "title", 2);
|
|
47
|
-
__decorateClass([
|
|
48
|
-
property({ type: Boolean, converter: stringToBooleanConverter })
|
|
49
|
-
], QtiAssessmentSection.prototype, "visible", 2);
|
|
50
|
-
__decorateClass([
|
|
51
|
-
property({ type: Boolean, converter: stringToBooleanConverter, attribute: "keep-together" })
|
|
52
|
-
], QtiAssessmentSection.prototype, "keepTogether", 2);
|
|
53
|
-
__decorateClass([
|
|
54
|
-
consume({ context: testContext, subscribe: true })
|
|
55
|
-
], QtiAssessmentSection.prototype, "_testContext", 2);
|
|
56
|
-
if (!customElements.get("qti-assessment-section")) {
|
|
57
|
-
customElements.define("qti-assessment-section", QtiAssessmentSection);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export {
|
|
61
|
-
QtiAssessmentSection
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=chunk-MTMT2RMF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/qti-assessment-test/qti-assessment-section.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { testContext, TestContext } from '../context';\n\n// https://www.imsglobal.org/sites/default/files/spec/qti/v3/info/index.html#Root_AssessmentSection\n\nconst stringToBooleanConverter = {\n fromAttribute(value: string): boolean {\n return value === 'true';\n },\n toAttribute(value: boolean): string {\n return value ? 'true' : 'false';\n }\n};\n\nexport class QtiAssessmentSection extends LitElement {\n @property({ type: String }) identifier: string;\n @property({ type: String }) required: string;\n @property({ type: Boolean, converter: stringToBooleanConverter }) fixed: boolean;\n @property({ type: String }) title: string;\n @property({ type: Boolean, converter: stringToBooleanConverter }) visible: boolean;\n @property({ type: Boolean, converter: stringToBooleanConverter, attribute: 'keep-together' }) keepTogether: boolean;\n\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n async connectedCallback(): Promise<void> {\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new Event('qti-assessment-section-connected', {\n bubbles: true,\n composed: true\n })\n );\n }\n\n render() {\n return html`<slot name=\"qti-rubric-block\"></slot><slot></slot>`;\n }\n}\n\nif (!customElements.get('qti-assessment-section')) {\n customElements.define('qti-assessment-section', QtiAssessmentSection);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-assessment-section': QtiAssessmentSection;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,MAAM,kBAAkB;AACjC,SAAS,gBAAgB;AAKzB,IAAM,2BAA2B;AAAA,EAC/B,cAAc,OAAwB;AACpC,WAAO,UAAU;AAAA,EACnB;AAAA,EACA,YAAY,OAAwB;AAClC,WAAO,QAAQ,SAAS;AAAA,EAC1B;AACF;AAEO,IAAM,uBAAN,cAAmC,WAAW;AAAA,EAWnD,MAAM,oBAAmC;AACvC,UAAM,kBAAkB;AACxB,UAAM,KAAK;AACX,SAAK;AAAA,MACH,IAAI,MAAM,oCAAoC;AAAA,QAC5C,SAAS;AAAA,QACT,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AAxB8B;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GADf,qBACiB;AACA;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAFf,qBAEiB;AACsC;AAAA,EAAjE,SAAS,EAAE,MAAM,SAAS,WAAW,yBAAyB,CAAC;AAAA,GAHrD,qBAGuD;AACtC;AAAA,EAA3B,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAJf,qBAIiB;AACsC;AAAA,EAAjE,SAAS,EAAE,MAAM,SAAS,WAAW,yBAAyB,CAAC;AAAA,GALrD,qBAKuD;AAC4B;AAAA,EAA7F,SAAS,EAAE,MAAM,SAAS,WAAW,0BAA0B,WAAW,gBAAgB,CAAC;AAAA,GANjF,qBAMmF;AAGvF;AAAA,EADN,QAAQ,EAAE,SAAS,aAAa,WAAW,KAAK,CAAC;AAAA,GARvC,qBASJ;AAkBT,IAAI,CAAC,eAAe,IAAI,wBAAwB,GAAG;AACjD,iBAAe,OAAO,0BAA0B,oBAAoB;AACtE;","names":[]}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// src/lib/qti-test/mixins/test-navigation.mixin.ts
|
|
2
|
-
var TestNavigationMixin = (superClass) => {
|
|
3
|
-
class TestNavigationClass extends superClass {
|
|
4
|
-
constructor(...args) {
|
|
5
|
-
super(...args);
|
|
6
|
-
this.addEventListener("qti-request-test-item", ({ detail: navItemId }) => {
|
|
7
|
-
if (!navItemId) return;
|
|
8
|
-
this._clearLoadedItems();
|
|
9
|
-
const itemRefEl = this.testElement.el.querySelector(
|
|
10
|
-
`qti-assessment-item-ref[identifier="${navItemId}"]`
|
|
11
|
-
);
|
|
12
|
-
const promise = this._loadItemRequest(itemRefEl.href, false);
|
|
13
|
-
const navPartId = itemRefEl.closest("qti-test-part").identifier;
|
|
14
|
-
const navSectionId = itemRefEl.closest("qti-assessment-section").identifier;
|
|
15
|
-
this._testContext = { ...this._testContext, navPartId, navSectionId, navItemId, navItemLoading: true };
|
|
16
|
-
if (promise) {
|
|
17
|
-
promise.then((doc) => {
|
|
18
|
-
itemRefEl.xmlDoc = doc;
|
|
19
|
-
requestAnimationFrame(
|
|
20
|
-
() => this.dispatchEvent(new CustomEvent("qti-item-connected", { bubbles: true, composed: true }))
|
|
21
|
-
);
|
|
22
|
-
this._testContext = { ...this._testContext, navItemLoading: false };
|
|
23
|
-
}).catch((error) => console.error("Failed to load item:", error));
|
|
24
|
-
} else {
|
|
25
|
-
console.info("Load item request was not handled:", itemRefEl.href);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
this.addEventListener("qti-assessment-test-connected", () => {
|
|
29
|
-
let navItemId = this._testContext.navItemId;
|
|
30
|
-
if (!navItemId) {
|
|
31
|
-
const itemRefEl = this.testElement.el.querySelector("qti-assessment-item-ref");
|
|
32
|
-
navItemId = itemRefEl.identifier;
|
|
33
|
-
}
|
|
34
|
-
this.dispatchEvent(
|
|
35
|
-
new CustomEvent("qti-request-test-item", { detail: navItemId, bubbles: true, composed: true })
|
|
36
|
-
);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
_clearLoadedItems() {
|
|
40
|
-
const itemRefEls = this.testElement.el.querySelectorAll(`qti-assessment-test qti-assessment-item-ref`);
|
|
41
|
-
Array.from(itemRefEls).forEach((itemElement) => {
|
|
42
|
-
itemElement.xmlDoc = null;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
_loadItemRequest(href, cancelPreviousRequest = true) {
|
|
46
|
-
const event = new CustomEvent("qti-load-item-request", {
|
|
47
|
-
bubbles: true,
|
|
48
|
-
composed: true,
|
|
49
|
-
detail: {
|
|
50
|
-
href,
|
|
51
|
-
promise: null,
|
|
52
|
-
cancelPreviousRequest
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
this.dispatchEvent(event);
|
|
56
|
-
return event.detail.promise;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return TestNavigationClass;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export {
|
|
63
|
-
TestNavigationMixin
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=chunk-NDJZGJUR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/mixins/test-navigation.mixin.ts"],"sourcesContent":["import { QtiAssessmentItemRef } from '../qti-assessment-test';\nimport { TestBase } from '../test-base';\n\ndeclare module '../context/test.context' {\n interface TestContext {\n navPartId?: string | null;\n navSectionId?: string | null;\n navItemId?: string | null;\n navItemLoading?: boolean;\n navTestLoading?: boolean;\n }\n}\n\ntype Constructor<T = {}> = abstract new (...args: any[]) => T;\n\ndeclare class TestNavigationInterface {}\nexport const TestNavigationMixin = <T extends Constructor<TestBase>>(superClass: T) => {\n abstract class TestNavigationClass extends superClass {\n constructor(...args: any[]) {\n super(...args);\n\n // this.addEventListener('qti-request-test-part', (e: CustomEvent) => {\n // this._clearLoadedItems();\n // });\n\n // Load all items of a section\n // this.addEventListener('qti-request-test-section', ({ detail: navSectionId }: CustomEvent<string>) => {\n // this._clearLoadedItems();\n\n // const sectionRefEl = this.testElement.el.querySelector<QtiAssessmentItemRef>(\n // `qti-assessment-section[identifier=\"${navSectionId}\"]`\n // );\n\n // const itemRefEls = this.testElement.el.querySelectorAll(\n // `qti-assessment-section[identifier=\"${navSectionId}\"] > qti-assessment-item-ref`\n // );\n\n // const navPartId = sectionRefEl.closest('qti-test-part').identifier;\n\n // this._testContext = { ...this._testContext, navPartId, navSectionId, navItemId: null };\n\n // const items = Array.from(itemRefEls).map((itemRef: QtiAssessmentItemRef) => {\n // return { identifier: itemRef.identifier, href: itemRef.href, element: itemRef };\n // });\n\n // const promises = items.map((item, index) => {\n // return new Promise((resolve, reject) => {\n // return this._loadItemRequest(item.href, false)\n // .then(doc => (item.element.xmlDoc = doc))\n // .then(() => resolve(item))\n // .catch(error => console.error('Failed to load item:', error));\n // });\n // });\n\n // Promise.all(promises)\n // .then(results => {\n // requestAnimationFrame(() =>\n // this.dispatchEvent(new CustomEvent('qti-test-connected', { detail: results, bubbles: true, composed: true }))\n // );\n // })\n // .catch(error => console.error('One or more promises failed:', error));\n // });\n\n // load an item\n this.addEventListener('qti-request-test-item', ({ detail: navItemId }: CustomEvent<string>) => {\n if (!navItemId) return;\n this._clearLoadedItems();\n\n const itemRefEl = this.testElement.el.querySelector<QtiAssessmentItemRef>(\n `qti-assessment-item-ref[identifier=\"${navItemId}\"]`\n );\n\n const promise = this._loadItemRequest(itemRefEl.href, false);\n\n const navPartId = itemRefEl.closest('qti-test-part').identifier;\n const navSectionId = itemRefEl.closest('qti-assessment-section').identifier;\n this._testContext = { ...this._testContext, navPartId, navSectionId, navItemId, navItemLoading: true };\n\n if (promise) {\n promise\n .then(doc => {\n itemRefEl.xmlDoc = doc;\n requestAnimationFrame(() =>\n this.dispatchEvent(new CustomEvent('qti-item-connected', { bubbles: true, composed: true }))\n );\n this._testContext = { ...this._testContext, navItemLoading: false };\n })\n .catch(error => console.error('Failed to load item:', error));\n } else {\n console.info('Load item request was not handled:', itemRefEl.href);\n }\n });\n\n this.addEventListener('qti-assessment-test-connected', () => {\n let navItemId = this._testContext.navItemId;\n if (!navItemId) {\n const itemRefEl = this.testElement.el.querySelector<QtiAssessmentItemRef>('qti-assessment-item-ref');\n navItemId = itemRefEl.identifier;\n }\n this.dispatchEvent(\n new CustomEvent('qti-request-test-item', { detail: navItemId, bubbles: true, composed: true })\n );\n });\n }\n\n private _clearLoadedItems(): void {\n const itemRefEls = this.testElement.el.querySelectorAll(`qti-assessment-test qti-assessment-item-ref`);\n Array.from(itemRefEls).forEach((itemElement: QtiAssessmentItemRef) => {\n itemElement.xmlDoc = null;\n });\n }\n\n private _loadItemRequest(href: string, cancelPreviousRequest: boolean = true): Promise<DocumentFragment> {\n const event = new CustomEvent('qti-load-item-request', {\n bubbles: true,\n composed: true,\n detail: {\n href: href,\n promise: null,\n cancelPreviousRequest\n }\n });\n this.dispatchEvent(event);\n\n return event.detail.promise;\n }\n }\n\n return TestNavigationClass as Constructor<TestNavigationInterface> & T;\n};\n"],"mappings":";AAgBO,IAAM,sBAAsB,CAAkC,eAAkB;AAAA,EACrF,MAAe,4BAA4B,WAAW;AAAA,IACpD,eAAe,MAAa;AAC1B,YAAM,GAAG,IAAI;AA6Cb,WAAK,iBAAiB,yBAAyB,CAAC,EAAE,QAAQ,UAAU,MAA2B;AAC7F,YAAI,CAAC,UAAW;AAChB,aA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I,YAAY,yBAAyB;AAAA,QACrD,SAAS;AAAA,QACT,UAAU;AAAA,QACV,QAAQ;AAAA,UACN;AAAA,UACA,SAAS;AAAA,UACT;AAAA,QACF;AAAA,MACF,CAAC;AACD,WAAK,cAAc,KAAK;AAExB,aAAO,MAAM,OAAO;AAAA,IACtB;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-OE2LFIH2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=chunk-OJ2XGDWK.js.map
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
testContext
|
|
3
|
-
} from "./chunk-XDFXD3BI.js";
|
|
4
|
-
import {
|
|
5
|
-
__decorateClass
|
|
6
|
-
} from "./chunk-6YE2KJ4C.js";
|
|
7
|
-
|
|
8
|
-
// src/lib/qti-test/qti-assessment-test/qti-assessment-item-ref.ts
|
|
9
|
-
import { consume } from "@lit/context";
|
|
10
|
-
import { html, LitElement } from "lit";
|
|
11
|
-
import { property } from "lit/decorators.js";
|
|
12
|
-
var stringToBooleanConverter = {
|
|
13
|
-
fromAttribute(value) {
|
|
14
|
-
return value === "true";
|
|
15
|
-
},
|
|
16
|
-
toAttribute(value) {
|
|
17
|
-
return value ? "true" : "false";
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
var QtiAssessmentItemRef = class extends LitElement {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
this.weigths = /* @__PURE__ */ new Map();
|
|
24
|
-
}
|
|
25
|
-
// the XMLDocument
|
|
26
|
-
createRenderRoot() {
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
get assessmentItem() {
|
|
30
|
-
return this.renderRoot?.querySelector("qti-assessment-item");
|
|
31
|
-
}
|
|
32
|
-
async connectedCallback() {
|
|
33
|
-
super.connectedCallback();
|
|
34
|
-
await this.updateComplete;
|
|
35
|
-
this.dispatchEvent(
|
|
36
|
-
new CustomEvent("qti-assessment-item-ref-connected", {
|
|
37
|
-
bubbles: true,
|
|
38
|
-
composed: true,
|
|
39
|
-
detail: { identifier: this.identifier, href: this.href, category: this.category }
|
|
40
|
-
})
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
return html`${this.xmlDoc}`;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
__decorateClass([
|
|
48
|
-
property({ type: String })
|
|
49
|
-
], QtiAssessmentItemRef.prototype, "category", 2);
|
|
50
|
-
__decorateClass([
|
|
51
|
-
property({ type: String })
|
|
52
|
-
], QtiAssessmentItemRef.prototype, "identifier", 2);
|
|
53
|
-
__decorateClass([
|
|
54
|
-
property({ type: Boolean, converter: stringToBooleanConverter })
|
|
55
|
-
], QtiAssessmentItemRef.prototype, "required", 2);
|
|
56
|
-
__decorateClass([
|
|
57
|
-
property({ type: Boolean, converter: stringToBooleanConverter })
|
|
58
|
-
], QtiAssessmentItemRef.prototype, "fixed", 2);
|
|
59
|
-
__decorateClass([
|
|
60
|
-
property({ type: String })
|
|
61
|
-
], QtiAssessmentItemRef.prototype, "href", 2);
|
|
62
|
-
__decorateClass([
|
|
63
|
-
consume({ context: testContext, subscribe: true })
|
|
64
|
-
], QtiAssessmentItemRef.prototype, "_testContext", 2);
|
|
65
|
-
__decorateClass([
|
|
66
|
-
property({ type: Object, attribute: false })
|
|
67
|
-
], QtiAssessmentItemRef.prototype, "xmlDoc", 2);
|
|
68
|
-
if (!customElements.get("qti-assessment-item-ref")) {
|
|
69
|
-
customElements.define("qti-assessment-item-ref", QtiAssessmentItemRef);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export {
|
|
73
|
-
QtiAssessmentItemRef
|
|
74
|
-
};
|
|
75
|
-
//# sourceMappingURL=chunk-QRCUNRP5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/qti-assessment-test/qti-assessment-item-ref.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { testContext, TestContext } from '../context';\nimport { QtiAssessmentItem } from '../../qti-components';\n\n// Converter function to interpret \"true\" and \"false\" as booleans\nconst stringToBooleanConverter = {\n fromAttribute(value: string): boolean {\n return value === 'true';\n },\n toAttribute(value: boolean): string {\n return value ? 'true' : 'false';\n }\n};\n\n// @customElement('qti-assessment-item-ref')\nexport class QtiAssessmentItemRef extends LitElement {\n @property({ type: String }) category?: string;\n @property({ type: String }) identifier?: string;\n @property({ type: Boolean, converter: stringToBooleanConverter }) required?: boolean;\n @property({ type: Boolean, converter: stringToBooleanConverter }) fixed?: boolean;\n @property({ type: String }) href?: string;\n\n @consume({ context: testContext, subscribe: true })\n public _testContext?: TestContext;\n\n weigths: Map<string, number> = new Map();\n\n @property({ type: Object, attribute: false })\n xmlDoc!: DocumentFragment; // the XMLDocument\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n get assessmentItem(): QtiAssessmentItem | null {\n return this.renderRoot?.querySelector('qti-assessment-item');\n }\n\n async connectedCallback(): Promise<void> {\n // debugger;\n super.connectedCallback();\n await this.updateComplete;\n this.dispatchEvent(\n new CustomEvent('qti-assessment-item-ref-connected', {\n bubbles: true,\n composed: true,\n detail: { identifier: this.identifier, href: this.href, category: this.category }\n })\n );\n }\n\n render() {\n return html`${this.xmlDoc}`;\n }\n}\n\nif (!customElements.get('qti-assessment-item-ref')) {\n customElements.define('qti-assessment-item-ref', QtiAssessmentItemRef);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'qti-assessment-item-ref': QtiAssessmentItemRef;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,MAAM,kBAAkB;AACjC,SAAS,gBAAgB;AAKzB,IAAM,2BAA2B;AAAA,EAC/B,cAAc,OAAwB;AACpC,WAAO,UAAU;AAAA,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AAoB;AACvE;","names":[]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// src/lib/qti-test/mixins/test-view.mixin.ts
|
|
2
|
-
var TestViewMixin = (superClass) => {
|
|
3
|
-
class TestViewClass extends superClass {
|
|
4
|
-
constructor(...args) {
|
|
5
|
-
super(...args);
|
|
6
|
-
this._testContext = { ...this._testContext, view: "candidate" };
|
|
7
|
-
this.addEventListener("on-test-switch-view", (e) => {
|
|
8
|
-
this._testContext = { ...this._testContext, view: e.detail };
|
|
9
|
-
this._updateElementView();
|
|
10
|
-
});
|
|
11
|
-
this.addEventListener("qti-assessment-test-connected", () => {
|
|
12
|
-
this._updateElementView();
|
|
13
|
-
});
|
|
14
|
-
this.addEventListener("qti-assessment-item-connected", (e) => {
|
|
15
|
-
this._updateElementView();
|
|
16
|
-
this._setCorrectResponseVisibility(e.detail);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
willUpdate(changedProperties) {
|
|
20
|
-
super.willUpdate(changedProperties);
|
|
21
|
-
if (changedProperties.has("_testContext")) {
|
|
22
|
-
this._updateElementView();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
// Method to handle view updates for elements based on the current context view
|
|
26
|
-
_updateElementView() {
|
|
27
|
-
if (this.testElement && this.testElement.el) {
|
|
28
|
-
const viewElements = Array.from(this.testElement.el.querySelectorAll("[view]"));
|
|
29
|
-
viewElements.forEach((element) => {
|
|
30
|
-
element.classList.toggle("show", element.getAttribute("view") === this._testContext.view);
|
|
31
|
-
});
|
|
32
|
-
const assessmentItem = this.testElement.el.querySelector(
|
|
33
|
-
`qti-assessment-item[identifier="${this._testContext.navItemId}"]`
|
|
34
|
-
);
|
|
35
|
-
if (assessmentItem) {
|
|
36
|
-
assessmentItem.showCorrectResponse(this._testContext.view === "scorer");
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
// Event handler for connected QTI assessment items
|
|
41
|
-
_setCorrectResponseVisibility(assessmentItem) {
|
|
42
|
-
assessmentItem.showCorrectResponse(this._testContext.view === "scorer");
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return TestViewClass;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
TestViewMixin
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=chunk-S6JJYCO7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/mixins/test-view.mixin.ts"],"sourcesContent":["import { QtiAssessmentItem } from '../../qti-components';\nimport { TestBase } from '../test-base';\n\nexport type View = 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor' | '';\n\ndeclare module '../context' {\n interface TestContext {\n view?: View;\n }\n}\n\ntype Constructor<T = {}> = abstract new (...args: any[]) => T;\n\ndeclare class TestViewInterface {}\n\nexport const TestViewMixin = <T extends Constructor<TestBase>>(superClass: T) => {\n abstract class TestViewClass extends superClass {\n constructor(...args: any[]) {\n super(...args);\n this._testContext = { ...this._testContext, view: 'candidate' };\n\n this.addEventListener('on-test-switch-view', (e: CustomEvent<View>) => {\n this._testContext = { ...this._testContext, view: e.detail };\n this._updateElementView();\n });\n this.addEventListener('qti-assessment-test-connected', () => {\n this._updateElementView();\n });\n this.addEventListener('qti-assessment-item-connected', (e: CustomEvent) => {\n this._updateElementView();\n this._setCorrectResponseVisibility(e.detail);\n });\n }\n\n willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n super.willUpdate(changedProperties);\n if (changedProperties.has('_testContext')) {\n // if (previousContext && previousContext.view !== this._testContext.view) {\n this._updateElementView();\n // }\n }\n }\n\n // Method to handle view updates for elements based on the current context view\n private _updateElementView() {\n if (this.testElement && this.testElement.el) {\n const viewElements = Array.from(this.testElement.el.querySelectorAll('[view]'));\n\n viewElements.forEach((element: HTMLElement) => {\n element.classList.toggle('show', element.getAttribute('view') === this._testContext.view);\n });\n\n const assessmentItem = this.testElement.el.querySelector<QtiAssessmentItem>(\n `qti-assessment-item[identifier=\"${this._testContext.navItemId}\"]`\n );\n if (assessmentItem) {\n assessmentItem.showCorrectResponse(this._testContext.view === 'scorer');\n }\n }\n }\n\n // Event handler for connected QTI assessment items\n private _setCorrectResponseVisibility(assessmentItem: QtiAssessmentItem): void {\n assessmentItem.showCorrectResponse(this._testContext.view === 'scorer');\n }\n }\n\n return TestViewClass as Constructor<TestViewInterface> & T;\n};\n"],"mappings":";AAeO,IAAM,gBAAgB,CAAkC,eAAkB;AAAA,EAC/E,MAAe,sBAAsB,WAAW;AAAA,IAC9C,eAAe,MAAa;AAC1B,YAAM,GAAG,IAAI;AACb,WAAK,eAAe,EAAE,GAAG,KAAK,cAAc,MAAM,YAAY;AAE9D,WAAK,iBAAiB,uBAAuB,CAAC,MAAyB;AACrE,aAAK,eAAe,EAAE,GAAG,KAAK,cAAc,MAAM,EAAE,OAAO;AAC3D,aAAK,mBAAmB;AAAA,MAC1B,CAAC;AACD,WAAK,iBAAiB,iCAAiC,MAAM;AAC3D,aAAK,mBAAmB;AAAA,MAC1B,CAAC;AACD,WAAK,iBAAiB,iCAAiC,CAAC,MAAmB;AACzE,aAAK,mBAAmB;AACxB,aAAK,8BAA8B,EAAE,MAAM;AAAA,MAC7C,CAAC;AAAA,IACH;AAAA,IAEA,WAAW,mBAA2D;AACpE,YAAM,WAAW,iBAAiB;AAClC,UAAI,kBAAkB,IAAI,cAAc,GAAG;AAEzC,aAAK,mBAAmB;AAAA,MAE1B;AAAA,IACF;AAAA;AAAA,IAGQ,qBAAqB;AAC3B,UAAI,KAAK,eAAe,KAAK,YAAY,IAAI;AAC3C,cAAM,eAAe,MAAM,KAAK,KAAK,YAAY,GAAG,iBAAiB,QAAQ,CAAC;AAE9E,qBAAa,QAAQ,CAAC,YAAyB;AAC7C,kBAAQ,UAAU,OAAO,QAAQ,QAAQ,aAAa,MAAM,MAAM,KAAK,aAAa,IAAI;AAAA,QAC1F,CAAC;AAED,cAAM,iBAAiB,KAAK,YAAY,GA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