@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,217 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return result;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
// src/lib/qti-test/components/test-paging-buttons-stamp.ts
|
|
13
|
-
import { html } from "lit";
|
|
14
|
-
import { customElement, property as property2 } from "lit/decorators.js";
|
|
15
|
-
|
|
16
|
-
// src/lib/qti-test/components/test-component.abstract.ts
|
|
17
|
-
import { consume } from "@lit/context";
|
|
18
|
-
import { LitElement } from "lit";
|
|
19
|
-
import { state } from "lit/decorators.js";
|
|
20
|
-
|
|
21
|
-
// src/lib/decorators/watch.ts
|
|
22
|
-
function watch(propertyName, options) {
|
|
23
|
-
const resolvedOptions = {
|
|
24
|
-
waitUntilFirstUpdate: false,
|
|
25
|
-
...options
|
|
26
|
-
};
|
|
27
|
-
return (proto, decoratedFnName) => {
|
|
28
|
-
const { update } = proto;
|
|
29
|
-
const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
|
|
30
|
-
proto.update = function(changedProps) {
|
|
31
|
-
watchedProperties.forEach((property3) => {
|
|
32
|
-
const key = property3;
|
|
33
|
-
if (changedProps.has(key)) {
|
|
34
|
-
const oldValue = changedProps.get(key);
|
|
35
|
-
const newValue = this[key];
|
|
36
|
-
if (oldValue !== newValue) {
|
|
37
|
-
if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {
|
|
38
|
-
this[decoratedFnName](oldValue, newValue);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
update.call(this, changedProps);
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// src/lib/decorators/prop-internal-state.ts
|
|
49
|
-
import { property } from "lit/decorators.js";
|
|
50
|
-
function propInternalState(options) {
|
|
51
|
-
return (protoOrDescriptor, name) => {
|
|
52
|
-
property(options)(protoOrDescriptor, name);
|
|
53
|
-
const key = `__${name}`;
|
|
54
|
-
Object.defineProperty(protoOrDescriptor, name, {
|
|
55
|
-
get() {
|
|
56
|
-
return this[key];
|
|
57
|
-
},
|
|
58
|
-
set(value) {
|
|
59
|
-
const oldValue = this[key];
|
|
60
|
-
this[key] = value;
|
|
61
|
-
if (oldValue !== value) {
|
|
62
|
-
if (this._internals?.states) {
|
|
63
|
-
const stateName = name.toLowerCase();
|
|
64
|
-
if (value) {
|
|
65
|
-
this._internals.states.add(`--${stateName}`);
|
|
66
|
-
} else {
|
|
67
|
-
this._internals.states.delete(`--${stateName}`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
if (options.aria && this._internals) {
|
|
71
|
-
const ariaAttribute = options.aria;
|
|
72
|
-
if (value) {
|
|
73
|
-
this._internals[ariaAttribute] = "true";
|
|
74
|
-
} else {
|
|
75
|
-
this._internals[ariaAttribute] = null;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
this.requestUpdate(name, oldValue);
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
configurable: true,
|
|
82
|
-
enumerable: true
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// src/lib/qti-test/context/test.context.ts
|
|
88
|
-
import { createContext } from "@lit/context";
|
|
89
|
-
var testContext = createContext(Symbol("test"));
|
|
90
|
-
var testElement = createContext(Symbol("testElement"));
|
|
91
|
-
|
|
92
|
-
// src/lib/qti-test/components/test-component.abstract.ts
|
|
93
|
-
var TestComponent = class extends LitElement {
|
|
94
|
-
constructor() {
|
|
95
|
-
super();
|
|
96
|
-
this.disabled = true;
|
|
97
|
-
this._internals = this.attachInternals();
|
|
98
|
-
}
|
|
99
|
-
_handleTestElementChange(_oldValue, newValue) {
|
|
100
|
-
if (newValue.el) {
|
|
101
|
-
this.disabled = false;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
willUpdate(changedProperties) {
|
|
105
|
-
if (changedProperties.has("_testContext")) {
|
|
106
|
-
const { items = [], navItemId } = this._testContext ?? {};
|
|
107
|
-
this.itemIndex = items.findIndex((item) => item.identifier === navItemId);
|
|
108
|
-
this.items = items;
|
|
109
|
-
this.view = this._testContext?.view;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
_switchView(view) {
|
|
113
|
-
this.dispatchEvent(
|
|
114
|
-
new CustomEvent("on-test-switch-view", {
|
|
115
|
-
composed: true,
|
|
116
|
-
bubbles: true,
|
|
117
|
-
detail: view
|
|
118
|
-
})
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
_requestItem(identifier) {
|
|
122
|
-
this.dispatchEvent(
|
|
123
|
-
new CustomEvent("qti-request-test-item", {
|
|
124
|
-
composed: true,
|
|
125
|
-
bubbles: true,
|
|
126
|
-
detail: identifier
|
|
127
|
-
})
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
__decorateClass([
|
|
132
|
-
propInternalState({
|
|
133
|
-
type: Boolean,
|
|
134
|
-
reflect: true,
|
|
135
|
-
aria: "ariaDisabled"
|
|
136
|
-
// Maps to `aria-disabled` attribute
|
|
137
|
-
})
|
|
138
|
-
], TestComponent.prototype, "disabled", 2);
|
|
139
|
-
__decorateClass([
|
|
140
|
-
state(),
|
|
141
|
-
consume({ context: testContext, subscribe: true })
|
|
142
|
-
], TestComponent.prototype, "_testContext", 2);
|
|
143
|
-
__decorateClass([
|
|
144
|
-
state(),
|
|
145
|
-
consume({ context: testElement, subscribe: true })
|
|
146
|
-
], TestComponent.prototype, "_testElement", 2);
|
|
147
|
-
__decorateClass([
|
|
148
|
-
watch("_testElement")
|
|
149
|
-
], TestComponent.prototype, "_handleTestElementChange", 1);
|
|
150
|
-
|
|
151
|
-
// src/lib/qti-test/components/test-paging-buttons-stamp.ts
|
|
152
|
-
import { prepareTemplate } from "stampino";
|
|
153
|
-
var TestPagingButtonsStamp = class extends TestComponent {
|
|
154
|
-
constructor() {
|
|
155
|
-
super();
|
|
156
|
-
this.maxDisplayedItems = 2;
|
|
157
|
-
this.skipOnCategory = "dep-informational";
|
|
158
|
-
this._internals.ariaLabel = "pagination";
|
|
159
|
-
}
|
|
160
|
-
createRenderRoot() {
|
|
161
|
-
return this;
|
|
162
|
-
}
|
|
163
|
-
render() {
|
|
164
|
-
const items = this._testContext.items.reduce(
|
|
165
|
-
(acc, item) => {
|
|
166
|
-
const isDepInfoItem = item.category?.split(" ").includes(this.skipOnCategory);
|
|
167
|
-
const newIndex = isDepInfoItem ? "i" : acc.counter++;
|
|
168
|
-
acc.result.push({
|
|
169
|
-
...item,
|
|
170
|
-
newIndex
|
|
171
|
-
// Assign the new index, which only increments for non-info items
|
|
172
|
-
});
|
|
173
|
-
return acc;
|
|
174
|
-
},
|
|
175
|
-
{ counter: 0, result: [] }
|
|
176
|
-
).result;
|
|
177
|
-
const itemIndex = items.findIndex((item) => item.identifier === this._testContext.navItemId);
|
|
178
|
-
const start = Math.max(0, itemIndex - this.maxDisplayedItems);
|
|
179
|
-
const end = Math.min(items.length, itemIndex + this.maxDisplayedItems + 1);
|
|
180
|
-
const clampedItems = items.slice(start, end);
|
|
181
|
-
return html`
|
|
182
|
-
${clampedItems.map((item) => {
|
|
183
|
-
const rawscore = item.variables.find((vr) => vr.identifier == "SCORE");
|
|
184
|
-
const score = parseInt(rawscore?.value?.toString());
|
|
185
|
-
const completionStatus = item.variables.find((v) => v.identifier === "completionStatus")?.value;
|
|
186
|
-
const type = item.category !== this.skipOnCategory ? "regular" : "info";
|
|
187
|
-
const active = this._testContext.navItemId === item.identifier;
|
|
188
|
-
const correct = this._testContext.view === "scorer" && type == "regular" && score !== void 0 && !isNaN(score) && score > 0;
|
|
189
|
-
const incorrect = this._testContext.view === "scorer" && type == "regular" && score !== void 0 && !isNaN(score) && score <= 0;
|
|
190
|
-
const answered = this._testContext.view === "candidate" && completionStatus === "completed" && item.category !== this.skipOnCategory;
|
|
191
|
-
const computedItem = {
|
|
192
|
-
...item,
|
|
193
|
-
type,
|
|
194
|
-
active,
|
|
195
|
-
correct,
|
|
196
|
-
incorrect,
|
|
197
|
-
answered
|
|
198
|
-
};
|
|
199
|
-
const templateElement = this.firstElementChild;
|
|
200
|
-
const myTemplate = prepareTemplate(templateElement);
|
|
201
|
-
return myTemplate({ item: computedItem });
|
|
202
|
-
})}
|
|
203
|
-
`;
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
__decorateClass([
|
|
207
|
-
property2({ type: Number, attribute: "max-displayed-items" })
|
|
208
|
-
], TestPagingButtonsStamp.prototype, "maxDisplayedItems", 2);
|
|
209
|
-
__decorateClass([
|
|
210
|
-
property2({ type: String, attribute: "skip-on-category" })
|
|
211
|
-
], TestPagingButtonsStamp.prototype, "skipOnCategory", 2);
|
|
212
|
-
TestPagingButtonsStamp = __decorateClass([
|
|
213
|
-
customElement("test-paging-buttons-stamp")
|
|
214
|
-
], TestPagingButtonsStamp);
|
|
1
|
+
import {
|
|
2
|
+
TestPagingButtonsStamp
|
|
3
|
+
} from "../../chunks/chunk-KYAIMBP5.js";
|
|
4
|
+
import "../../chunks/chunk-3EU75IUF.js";
|
|
5
|
+
import "../../chunks/chunk-UFYWCLXF.js";
|
|
6
|
+
import "../../chunks/chunk-D3RGDWKP.js";
|
|
7
|
+
import "../../chunks/chunk-ELDMXTUQ.js";
|
|
8
|
+
import "../../chunks/chunk-H2JE6IVU.js";
|
|
215
9
|
export {
|
|
216
10
|
TestPagingButtonsStamp
|
|
217
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/qti-test/components/test-paging-buttons-stamp.ts","../../../src/lib/qti-test/components/test-component.abstract.ts","../../../src/lib/decorators/watch.ts","../../../src/lib/decorators/prop-internal-state.ts","../../../src/lib/qti-test/context/test.context.ts"],"sourcesContent":["import { html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { TestComponent } from './test-component.abstract';\nimport { prepareTemplate } from 'stampino';\n\n@customElement('test-paging-buttons-stamp')\nexport class TestPagingButtonsStamp extends TestComponent {\n @property({ type: Number, attribute: 'max-displayed-items' })\n private maxDisplayedItems = 2;\n\n @property({ type: String, attribute: 'skip-on-category' })\n private skipOnCategory = 'dep-informational';\n\n protected createRenderRoot() {\n return this;\n }\n\n constructor() {\n super();\n this._internals.ariaLabel = 'pagination';\n }\n\n render() {\n const items = this._testContext.items.reduce(\n (acc, item) => {\n const isDepInfoItem = item.category?.split(' ').includes(this.skipOnCategory);\n const newIndex = isDepInfoItem ? 'i' : acc.counter++;\n acc.result.push({\n ...item,\n newIndex // Assign the new index, which only increments for non-info items\n });\n return acc;\n },\n { counter: 0, result: [] }\n ).result;\n\n // Get the index of the current item\n const itemIndex = items.findIndex(item => item.identifier === this._testContext.navItemId);\n\n // Calculate the start and end range based on maxDisplayedItems\n const start = Math.max(0, itemIndex - this.maxDisplayedItems);\n const end = Math.min(items.length, itemIndex + this.maxDisplayedItems + 1);\n\n // console.log('start', start, 'end', end);\n // Adjust the items array to only include the clamped range\n const clampedItems = items.slice(start, end);\n\n return html`\n ${clampedItems.map(item => {\n const rawscore = item.variables.find(vr => vr.identifier == 'SCORE');\n const score = parseInt(rawscore?.value?.toString());\n const completionStatus = item.variables.find(v => v.identifier === 'completionStatus')?.value;\n const type = item.category !== this.skipOnCategory ? 'regular' : 'info'; // rounded-full\n const active = this._testContext.navItemId === item.identifier; // !border-sky-600\n const correct =\n this._testContext.view === 'scorer' && type == 'regular' && score !== undefined && !isNaN(score) && score > 0; // bg-green-100 border-green-400\n const incorrect =\n this._testContext.view === 'scorer' &&\n type == 'regular' &&\n score !== undefined &&\n !isNaN(score) &&\n score <= 0; // bg-red-100 border-red-400\n const answered =\n this._testContext.view === 'candidate' &&\n completionStatus === 'completed' &&\n item.category !== this.skipOnCategory; // bg-slate-300 shadow-sm\n\n const computedItem = {\n ...item,\n type,\n active,\n correct,\n incorrect,\n answered\n };\n\n const templateElement = this.firstElementChild as HTMLTemplateElement;\n const myTemplate = prepareTemplate(templateElement);\n return myTemplate({ item: computedItem });\n })}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-paging-buttons-stamp': TestPagingButtonsStamp;\n }\n}\n","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 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","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","import { createContext } from '@lit/context';\nimport { QtiAssessmentTest } from '../qti-assessment-test';\nimport { ItemContext, VariableDeclaration } from '../../qti-components';\nimport { View } from '../mixins/test-view.mixin';\n\nexport interface TestContext {\n items: (ItemContext & { category?: string })[];\n testOutcomeVariables: VariableDeclaration<string | string[]>[];\n navPartId?: string | null;\n navSectionId?: string | null;\n navItemId?: string | null;\n navItemLoading?: boolean;\n navTestLoading?: boolean;\n view?: View;\n}\n\nexport const testContext = createContext<Readonly<TestContext>>(Symbol('test'));\n\nexport type TestElement = {\n el: QtiAssessmentTest;\n};\n\nexport const testElement = createContext<Readonly<TestElement>>(Symbol('testElement'));\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,eAAe,YAAAA,iBAAgB;;;ACDxC,SAAS,eAAe;AACxB,SAAS,kBAAkB;AAC3B,SAAS,aAAa;;;AC2Bf,SAAS,MAAM,cAAiC,SAAwB;AAC7E,QAAM,kBAA0C;AAAA,IAC9C,sBAAsB;AAAA,IACtB,GAAG;AAAA,EACL;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YAAM,mBAAmB,KAAK,UAAU,KAAK,OAAK,EAAE,eAAe,kBAAkB,GAAG;AACxF,YAAM,OAAO,KAAK,aAAa,KAAK,iBAAiB,YAAY;AACjE,YAAM,SAAS,KAAK,aAAa,cAAc,KAAK;AACpD,YAAM,UACJ,KAAK,aAAa,SAAS,YAAY,QAAQ,aAAa,UAAU,UAAa,CAAC,MAAM,KAAK,KAAK,QAAQ;AAC9G,YAAM,YACJ,KAAK,aAAa,SAAS,YAC3B,QAAQ,aACR,UAAU,UACV,CAAC,MAAM,KAAK,KACZ,SAAS;AACX,YAAM,WACJ,KAAK,aAAa,SAAS,eAC3B,qBAAqB,eACrB,KAAK,aAAa,KAAK;AAEzB,YAAM,eAAe;AAAA,QACnB,GAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAEA,YAAM,kBAAkB,KAAK;AAC7B,YAAM,aAAa,gBAAgB,eAAe;AAClD,aAAO,WAAW,EAAE,MAAM,aAAa,CAAC;AAAA,IAC1C,CAAC,CAAC;AAAA;AAAA,EAEN;AACF;AA1EU;AAAA,EADPC,UAAS,EAAE,MAAM,QAAQ,WAAW,sBAAsB,CAAC;AAAA,GADjD,uBAEH;AAGA;AAAA,EADPA,UAAS,EAAE,MAAM,QAAQ,WAAW,mBAAmB,CAAC;AAAA,GAJ9C,uBAKH;AALG,yBAAN;AAAA,EADN,cAAc,2BAA2B;AAAA,GAC7B;","names":["property","property","property"]}
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import * as lit from 'lit';
|
|
3
3
|
import { TestComponent } from './test-component.abstract.js';
|
|
4
|
-
import '../../test-
|
|
5
|
-
import '
|
|
6
|
-
import '../../
|
|
4
|
+
import '../../test.context-CaENAJNk.js';
|
|
5
|
+
import '../../variables-cO3DzqJy.js';
|
|
6
|
+
import '../../exports/expression-result.js';
|
|
7
|
+
import '../../exports/item.context.js';
|
|
8
|
+
import '../../qti-response-declaration-DAeBp8HH.js';
|
|
9
|
+
import '../../exports/interaction.interface.js';
|
|
10
|
+
import '../../exports/interaction.js';
|
|
7
11
|
import 'lit-html/directives/ref.js';
|
|
12
|
+
import '../../exports/qti-expression.js';
|
|
8
13
|
|
|
9
14
|
/**
|
|
10
15
|
* Represents a custom element for navigating to the previous test item.
|
|
@@ -1,208 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
// src/lib/qti-test/components/test-prev.ts
|
|
13
|
-
import { css as css2, html } from "lit";
|
|
14
|
-
import { customElement } from "lit/decorators.js";
|
|
15
|
-
|
|
16
|
-
// src/lib/qti-test/components/test-component.abstract.ts
|
|
17
|
-
import { consume } from "@lit/context";
|
|
18
|
-
import { LitElement } from "lit";
|
|
19
|
-
import { state } from "lit/decorators.js";
|
|
20
|
-
|
|
21
|
-
// src/lib/decorators/watch.ts
|
|
22
|
-
function watch(propertyName, options) {
|
|
23
|
-
const resolvedOptions = {
|
|
24
|
-
waitUntilFirstUpdate: false,
|
|
25
|
-
...options
|
|
26
|
-
};
|
|
27
|
-
return (proto, decoratedFnName) => {
|
|
28
|
-
const { update } = proto;
|
|
29
|
-
const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
|
|
30
|
-
proto.update = function(changedProps) {
|
|
31
|
-
watchedProperties.forEach((property2) => {
|
|
32
|
-
const key = property2;
|
|
33
|
-
if (changedProps.has(key)) {
|
|
34
|
-
const oldValue = changedProps.get(key);
|
|
35
|
-
const newValue = this[key];
|
|
36
|
-
if (oldValue !== newValue) {
|
|
37
|
-
if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {
|
|
38
|
-
this[decoratedFnName](oldValue, newValue);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
update.call(this, changedProps);
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// src/lib/decorators/prop-internal-state.ts
|
|
49
|
-
import { property } from "lit/decorators.js";
|
|
50
|
-
function propInternalState(options) {
|
|
51
|
-
return (protoOrDescriptor, name) => {
|
|
52
|
-
property(options)(protoOrDescriptor, name);
|
|
53
|
-
const key = `__${name}`;
|
|
54
|
-
Object.defineProperty(protoOrDescriptor, name, {
|
|
55
|
-
get() {
|
|
56
|
-
return this[key];
|
|
57
|
-
},
|
|
58
|
-
set(value) {
|
|
59
|
-
const oldValue = this[key];
|
|
60
|
-
this[key] = value;
|
|
61
|
-
if (oldValue !== value) {
|
|
62
|
-
if (this._internals?.states) {
|
|
63
|
-
const stateName = name.toLowerCase();
|
|
64
|
-
if (value) {
|
|
65
|
-
this._internals.states.add(`--${stateName}`);
|
|
66
|
-
} else {
|
|
67
|
-
this._internals.states.delete(`--${stateName}`);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
if (options.aria && this._internals) {
|
|
71
|
-
const ariaAttribute = options.aria;
|
|
72
|
-
if (value) {
|
|
73
|
-
this._internals[ariaAttribute] = "true";
|
|
74
|
-
} else {
|
|
75
|
-
this._internals[ariaAttribute] = null;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
this.requestUpdate(name, oldValue);
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
configurable: true,
|
|
82
|
-
enumerable: true
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// src/lib/qti-test/context/test.context.ts
|
|
88
|
-
import { createContext } from "@lit/context";
|
|
89
|
-
var testContext = createContext(Symbol("test"));
|
|
90
|
-
var testElement = createContext(Symbol("testElement"));
|
|
91
|
-
|
|
92
|
-
// src/lib/qti-test/components/test-component.abstract.ts
|
|
93
|
-
var TestComponent = class extends LitElement {
|
|
94
|
-
constructor() {
|
|
95
|
-
super();
|
|
96
|
-
this.disabled = true;
|
|
97
|
-
this._internals = this.attachInternals();
|
|
98
|
-
}
|
|
99
|
-
_handleTestElementChange(_oldValue, newValue) {
|
|
100
|
-
if (newValue.el) {
|
|
101
|
-
this.disabled = false;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
willUpdate(changedProperties) {
|
|
105
|
-
if (changedProperties.has("_testContext")) {
|
|
106
|
-
const { items = [], navItemId } = this._testContext ?? {};
|
|
107
|
-
this.itemIndex = items.findIndex((item) => item.identifier === navItemId);
|
|
108
|
-
this.items = items;
|
|
109
|
-
this.view = this._testContext?.view;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
_switchView(view) {
|
|
113
|
-
this.dispatchEvent(
|
|
114
|
-
new CustomEvent("on-test-switch-view", {
|
|
115
|
-
composed: true,
|
|
116
|
-
bubbles: true,
|
|
117
|
-
detail: view
|
|
118
|
-
})
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
_requestItem(identifier) {
|
|
122
|
-
this.dispatchEvent(
|
|
123
|
-
new CustomEvent("qti-request-test-item", {
|
|
124
|
-
composed: true,
|
|
125
|
-
bubbles: true,
|
|
126
|
-
detail: identifier
|
|
127
|
-
})
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
__decorateClass([
|
|
132
|
-
propInternalState({
|
|
133
|
-
type: Boolean,
|
|
134
|
-
reflect: true,
|
|
135
|
-
aria: "ariaDisabled"
|
|
136
|
-
// Maps to `aria-disabled` attribute
|
|
137
|
-
})
|
|
138
|
-
], TestComponent.prototype, "disabled", 2);
|
|
139
|
-
__decorateClass([
|
|
140
|
-
state(),
|
|
141
|
-
consume({ context: testContext, subscribe: true })
|
|
142
|
-
], TestComponent.prototype, "_testContext", 2);
|
|
143
|
-
__decorateClass([
|
|
144
|
-
state(),
|
|
145
|
-
consume({ context: testElement, subscribe: true })
|
|
146
|
-
], TestComponent.prototype, "_testElement", 2);
|
|
147
|
-
__decorateClass([
|
|
148
|
-
watch("_testElement")
|
|
149
|
-
], TestComponent.prototype, "_handleTestElementChange", 1);
|
|
150
|
-
|
|
151
|
-
// src/lib/qti-test/components/styles.ts
|
|
152
|
-
import { css } from "lit";
|
|
153
|
-
var form = css`
|
|
154
|
-
display: inline-flex;
|
|
155
|
-
align-items: center;
|
|
156
|
-
cursor: pointer;
|
|
157
|
-
padding: 0.5rem 1rem;
|
|
158
|
-
border-radius: 0.25rem;
|
|
159
|
-
user-select: none;
|
|
160
|
-
`;
|
|
161
|
-
var btn = css`
|
|
162
|
-
background-color: lightgray;
|
|
163
|
-
${form};
|
|
164
|
-
`;
|
|
165
|
-
var dis = css`
|
|
166
|
-
cursor: not-allowed;
|
|
167
|
-
opacity: 0.5;
|
|
168
|
-
`;
|
|
169
|
-
var ind = css`
|
|
170
|
-
${form};
|
|
171
|
-
border: 1px solid gray;
|
|
172
|
-
`;
|
|
173
|
-
|
|
174
|
-
// src/lib/qti-test/components/test-prev.ts
|
|
175
|
-
var TestPrev = class extends TestComponent {
|
|
176
|
-
constructor() {
|
|
177
|
-
super();
|
|
178
|
-
this._internals.role = "button";
|
|
179
|
-
this._internals.ariaLabel = "Next item";
|
|
180
|
-
this.addEventListener("click", (e) => {
|
|
181
|
-
e.preventDefault();
|
|
182
|
-
if (!this.disabled) this._requestItem(this.items[this.itemIndex - 1].identifier);
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
willUpdate(changedProperties) {
|
|
186
|
-
super.willUpdate(changedProperties);
|
|
187
|
-
if (changedProperties.has("_testContext")) {
|
|
188
|
-
this.disabled = !this._testElement?.el || this.itemIndex === 0 || this.itemIndex === -1;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
render() {
|
|
192
|
-
return html`<slot></slot>`;
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
TestPrev.styles = css2`
|
|
196
|
-
:host {
|
|
197
|
-
${btn};
|
|
198
|
-
}
|
|
199
|
-
:host([disabled]) {
|
|
200
|
-
${dis};
|
|
201
|
-
}
|
|
202
|
-
`;
|
|
203
|
-
TestPrev = __decorateClass([
|
|
204
|
-
customElement("test-prev")
|
|
205
|
-
], TestPrev);
|
|
1
|
+
import {
|
|
2
|
+
TestPrev
|
|
3
|
+
} from "../../chunks/chunk-GSWZT6N2.js";
|
|
4
|
+
import "../../chunks/chunk-4O5F7WV7.js";
|
|
5
|
+
import "../../chunks/chunk-3EU75IUF.js";
|
|
6
|
+
import "../../chunks/chunk-UFYWCLXF.js";
|
|
7
|
+
import "../../chunks/chunk-D3RGDWKP.js";
|
|
8
|
+
import "../../chunks/chunk-ELDMXTUQ.js";
|
|
9
|
+
import "../../chunks/chunk-H2JE6IVU.js";
|
|
206
10
|
export {
|
|
207
11
|
TestPrev
|
|
208
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/qti-test/components/test-prev.ts","../../../src/lib/qti-test/components/test-component.abstract.ts","../../../src/lib/decorators/watch.ts","../../../src/lib/decorators/prop-internal-state.ts","../../../src/lib/qti-test/context/test.context.ts","../../../src/lib/qti-test/components/styles.ts"],"sourcesContent":["import { css, html } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { TestComponent } from './test-component.abstract';\nimport * as styles from './styles';\n\n/**\n * Represents a custom element for navigating to the previous test item.\n *\n * @remarks\n * This element provides functionality for navigating to the previous test item.\n *\n * @example\n * ```html\n * <test-prev></test-prev>\n * ```\n */\n@customElement('test-prev')\nexport class TestPrev extends TestComponent {\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n constructor() {\n super();\n this._internals.role = 'button';\n this._internals.ariaLabel = 'Next item';\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this.disabled) this._requestItem(this.items[this.itemIndex - 1].identifier);\n });\n }\n\n willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n super.willUpdate(changedProperties);\n if (changedProperties.has('_testContext')) {\n this.disabled = !this._testElement?.el || this.itemIndex === 0 || this.itemIndex === -1;\n }\n }\n\n render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-previous': TestPrev;\n }\n}\n","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 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","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","import { createContext } from '@lit/context';\nimport { QtiAssessmentTest } from '../qti-assessment-test';\nimport { ItemContext, VariableDeclaration } from '../../qti-components';\nimport { View } from '../mixins/test-view.mixin';\n\nexport interface TestContext {\n items: (ItemContext & { category?: string })[];\n testOutcomeVariables: VariableDeclaration<string | string[]>[];\n navPartId?: string | null;\n navSectionId?: string | null;\n navItemId?: string | null;\n navItemLoading?: boolean;\n navTestLoading?: boolean;\n view?: View;\n}\n\nexport const testContext = createContext<Readonly<TestContext>>(Symbol('test'));\n\nexport type TestElement = {\n el: QtiAssessmentTest;\n};\n\nexport const testElement = createContext<Readonly<TestElement>>(Symbol('testElement'));\n","// /* eslint-disable lit-plugin(no-invalid-css) */\nimport { css } from 'lit';\n\nexport const form = css`\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n padding: 0.5rem 1rem;\n border-radius: 0.25rem;\n user-select: none;\n`;\n\nexport const btn = css`\n background-color: lightgray;\n ${form};\n`;\n\nexport const dis = css`\n cursor: not-allowed;\n opacity: 0.5;\n`;\n\nexport const ind = css`\n ${form};\n border: 1px solid gray;\n`;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,OAAAA,MAAK,YAAY;AAC1B,SAAS,qBAAqB;;;ACD9B,SAAS,eAAe;AACxB,SAAS,kB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;AAAA,GACb;","names":["css","property","css"]}
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
2
|
import { TestComponent } from './test-component.abstract.js';
|
|
3
3
|
import 'lit';
|
|
4
|
-
import '../../test-
|
|
5
|
-
import '
|
|
6
|
-
import '../../
|
|
4
|
+
import '../../test.context-CaENAJNk.js';
|
|
5
|
+
import '../../variables-cO3DzqJy.js';
|
|
6
|
+
import '../../exports/expression-result.js';
|
|
7
|
+
import '../../exports/item.context.js';
|
|
8
|
+
import '../../qti-response-declaration-DAeBp8HH.js';
|
|
9
|
+
import '../../exports/interaction.interface.js';
|
|
10
|
+
import '../../exports/interaction.js';
|
|
7
11
|
import 'lit-html/directives/ref.js';
|
|
12
|
+
import '../../exports/qti-expression.js';
|
|
8
13
|
|
|
9
14
|
declare class TestView extends TestComponent {
|
|
10
15
|
static DEFAULT_VIEW_OPTIONS: string[];
|