@citolab/qti-components 7.3.23 → 7.4.0
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/index.global.js +1 -1
- package/cdn/index.js +5485 -1
- package/custom-elements.json +29837 -0
- package/dist/chunks/chunk-6K4ROGDD.js +364 -0
- package/dist/chunks/chunk-6K4ROGDD.js.map +1 -0
- package/dist/chunks/chunk-GUDRSXIP.js +189 -0
- package/dist/chunks/chunk-GUDRSXIP.js.map +1 -0
- package/dist/chunks/{chunk-WFUXZ4UT.js → chunk-JDY5GL7E.js} +13 -1
- package/dist/chunks/{chunk-WFUXZ4UT.js.map → chunk-JDY5GL7E.js.map} +1 -1
- package/dist/chunks/{chunk-LF6SO3JU.js → chunk-LN74Z5QM.js} +653 -450
- package/dist/chunks/chunk-LN74Z5QM.js.map +1 -0
- package/dist/chunks/{chunk-ELDMXTUQ.js → chunk-O5N4DCU6.js} +7 -2
- package/dist/chunks/chunk-O5N4DCU6.js.map +1 -0
- package/dist/chunks/chunk-TJ6ZOT7A.js +2235 -0
- package/dist/chunks/chunk-TJ6ZOT7A.js.map +1 -0
- package/dist/computed-item.context-DpK-sS0T.d.ts +19 -0
- package/dist/{exports/config.context.d.ts → config.context-CmQ9L62n.d.ts} +1 -4
- package/dist/custom-elements.json +29837 -0
- package/dist/index.d.ts +8 -39
- package/dist/index.js +34 -104
- package/{cdn/chunks/chunk-5TDBMEY5.js → dist/item.css} +7 -24
- package/dist/qti-assessment-item-D77dJ1Ot.d.ts +104 -0
- package/dist/qti-components/index.d.ts +1238 -19
- package/dist/qti-components/index.js +6 -14
- package/dist/qti-components-jsx.d.ts +4463 -0
- package/dist/qti-item/index.d.ts +113 -0
- package/dist/qti-item/index.js +16 -0
- package/dist/qti-loader/index.d.ts +2 -6
- package/dist/qti-loader/index.js +24 -5
- package/dist/qti-loader/index.js.map +1 -1
- package/dist/qti-test/index.d.ts +593 -0
- package/dist/qti-test/index.js +62 -0
- package/dist/qti-transformers/index.d.ts +38 -2
- package/dist/qti-transformers/index.js +1 -2
- package/dist/test.context-L609DNAz.d.ts +58 -0
- package/dist/variables-Vgyr6yyW.d.ts +58 -0
- package/dist/vscode.css-custom-data.json +11 -0
- package/dist/vscode.html-custom-data.json +1135 -0
- package/package.json +74 -116
- package/cdn/chunks/chunk-2BSPQRNR.js +0 -6
- package/cdn/chunks/chunk-3CVBBZDT.js +0 -17
- package/cdn/chunks/chunk-3IBGLVHA.js +0 -1
- package/cdn/chunks/chunk-3YQMAZEO.js +0 -29
- package/cdn/chunks/chunk-5UQLGV7F.js +0 -5
- package/cdn/chunks/chunk-5WLHU3FH.js +0 -8
- package/cdn/chunks/chunk-6SGFGN34.js +0 -8
- package/cdn/chunks/chunk-6XVY32RS.js +0 -1
- package/cdn/chunks/chunk-7ME56ODO.js +0 -1
- package/cdn/chunks/chunk-CZDMOYYF.js +0 -1
- package/cdn/chunks/chunk-DNBBQ7LY.js +0 -1
- package/cdn/chunks/chunk-DP5FVJRS.js +0 -21
- package/cdn/chunks/chunk-E6IOJ4MV.js +0 -23
- package/cdn/chunks/chunk-G76Y52EL.js +0 -1471
- package/cdn/chunks/chunk-HCXHHI6V.js +0 -18
- package/cdn/chunks/chunk-HDMF4QZO.js +0 -48
- package/cdn/chunks/chunk-HKWYQB5Z.js +0 -37
- package/cdn/chunks/chunk-J5P2GBPV.js +0 -1
- package/cdn/chunks/chunk-KWPDTFYH.js +0 -1
- package/cdn/chunks/chunk-LIUOA3YV.js +0 -1
- package/cdn/chunks/chunk-LO2NM3CE.js +0 -1
- package/cdn/chunks/chunk-MD33BNWM.js +0 -1
- package/cdn/chunks/chunk-MRQ46JRY.js +0 -8
- package/cdn/chunks/chunk-NJP4VZB3.js +0 -8
- package/cdn/chunks/chunk-O4RAJ3LM.js +0 -25
- package/cdn/chunks/chunk-OSLUHYFD.js +0 -8
- package/cdn/chunks/chunk-P6SSTAJ2.js +0 -1
- package/cdn/chunks/chunk-PP62N3C4.js +0 -8
- package/cdn/chunks/chunk-PU7OABT3.js +0 -1
- package/cdn/chunks/chunk-PUI3LIFH.js +0 -0
- package/cdn/chunks/chunk-QBAXWCYQ.js +0 -5
- package/cdn/chunks/chunk-QEFO63QX.js +0 -8
- package/cdn/chunks/chunk-QQCGUVEV.js +0 -1
- package/cdn/chunks/chunk-QQR6POPY.js +0 -1
- package/cdn/chunks/chunk-RGNFAPWY.js +0 -2
- package/cdn/chunks/chunk-S5QDLZ6J.js +0 -1
- package/cdn/chunks/chunk-SEM2PEP6.js +0 -5
- package/cdn/chunks/chunk-SVVO2SFS.js +0 -1
- package/cdn/chunks/chunk-TCHROQU3.js +0 -1
- package/cdn/chunks/chunk-UMDZKG6K.js +0 -1
- package/cdn/chunks/chunk-VEG7LKS3.js +0 -48
- package/cdn/chunks/chunk-WCCTDLQ4.js +0 -8
- package/cdn/chunks/chunk-X4FA36TC.js +0 -1
- package/cdn/chunks/chunk-XJ2CFTZP.js +0 -1
- package/cdn/chunks/chunk-XUJ7TXHW.js +0 -1
- package/cdn/chunks/chunk-YCBNF5QU.js +0 -17
- package/cdn/chunks/chunk-YHLQ2JQ2.js +0 -1
- package/cdn/chunks/chunk-ZPCQH3EY.js +0 -10
- package/cdn/exports/computed-item.context.js +0 -1
- package/cdn/exports/computed.context.js +0 -1
- package/cdn/exports/config.context.js +0 -1
- package/cdn/exports/expression-result.js +0 -0
- package/cdn/exports/interaction.interface.js +0 -0
- package/cdn/exports/interaction.js +0 -1
- package/cdn/exports/item.context.js +0 -1
- package/cdn/exports/qti-assessment-item.context.js +0 -1
- package/cdn/exports/qti-condition-expression.js +0 -1
- package/cdn/exports/qti-expression.js +0 -1
- package/cdn/exports/qti-test.js +0 -0
- package/cdn/exports/qti.context.js +0 -1
- package/cdn/exports/session.context.js +0 -1
- package/cdn/exports/test.context.js +0 -1
- package/cdn/exports/variables.js +0 -0
- package/cdn/qti-components/index.js +0 -1
- package/cdn/qti-item/components/item-container.js +0 -1
- package/cdn/qti-item/components/item-correct-response-mode.js +0 -10
- package/cdn/qti-item/components/item-show-candidate-correction.js +0 -8
- package/cdn/qti-item/components/item-show-correct-response.js +0 -1
- package/cdn/qti-item/components/print-item-variables.js +0 -1
- package/cdn/qti-item/components/styles.js +0 -1
- package/cdn/qti-item/core/index.js +0 -1
- package/cdn/qti-loader/index.js +0 -1
- package/cdn/qti-test/components/index.js +0 -1
- package/cdn/qti-test/components/styles.js +0 -1
- package/cdn/qti-test/components/test-check-item.js +0 -1
- package/cdn/qti-test/components/test-container.js +0 -1
- package/cdn/qti-test/components/test-end-attempt.js +0 -1
- package/cdn/qti-test/components/test-item-link.js +0 -1
- package/cdn/qti-test/components/test-navigation.js +0 -1
- package/cdn/qti-test/components/test-next.js +0 -1
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +0 -1
- package/cdn/qti-test/components/test-prev.js +0 -1
- package/cdn/qti-test/components/test-print-context.js +0 -1
- package/cdn/qti-test/components/test-print-item-variables.js +0 -1
- package/cdn/qti-test/components/test-scoring-buttons.js +0 -1
- package/cdn/qti-test/components/test-scoring-feedback.js +0 -1
- package/cdn/qti-test/components/test-section-buttons-stamp.js +0 -1
- package/cdn/qti-test/components/test-section-link.js +0 -1
- package/cdn/qti-test/components/test-show-correct-response.js +0 -1
- package/cdn/qti-test/components/test-stamp.js +0 -1
- package/cdn/qti-test/components/test-view-toggle.js +0 -1
- package/cdn/qti-test/components/test-view.js +0 -1
- package/cdn/qti-test/core/index.js +0 -1
- package/cdn/qti-transformers/index.js +0 -1
- package/dist/chunks/chunk-22IRJWWY.js +0 -10
- package/dist/chunks/chunk-22IRJWWY.js.map +0 -1
- package/dist/chunks/chunk-36G5MQKR.js +0 -85
- package/dist/chunks/chunk-36G5MQKR.js.map +0 -1
- package/dist/chunks/chunk-4OGJBG35.js +0 -8
- package/dist/chunks/chunk-4OGJBG35.js.map +0 -1
- package/dist/chunks/chunk-5KCXO2RP.js +0 -36
- package/dist/chunks/chunk-5KCXO2RP.js.map +0 -1
- package/dist/chunks/chunk-5ZHHNEDA.js +0 -30
- package/dist/chunks/chunk-5ZHHNEDA.js.map +0 -1
- package/dist/chunks/chunk-7K44TDQO.js +0 -91
- package/dist/chunks/chunk-7K44TDQO.js.map +0 -1
- package/dist/chunks/chunk-7OMJMXHK.js +0 -50
- package/dist/chunks/chunk-7OMJMXHK.js.map +0 -1
- package/dist/chunks/chunk-AZIKAG7K.js +0 -8
- package/dist/chunks/chunk-AZIKAG7K.js.map +0 -1
- package/dist/chunks/chunk-BLBSZDQ4.js +0 -52
- package/dist/chunks/chunk-BLBSZDQ4.js.map +0 -1
- package/dist/chunks/chunk-CJADUWEC.js +0 -10
- package/dist/chunks/chunk-CJADUWEC.js.map +0 -1
- package/dist/chunks/chunk-CP34TICQ.js +0 -45
- package/dist/chunks/chunk-CP34TICQ.js.map +0 -1
- package/dist/chunks/chunk-CTESMSQO.js +0 -56
- package/dist/chunks/chunk-CTESMSQO.js.map +0 -1
- package/dist/chunks/chunk-DZAMXOSC.js +0 -30
- package/dist/chunks/chunk-DZAMXOSC.js.map +0 -1
- package/dist/chunks/chunk-E6V3JHVT.js +0 -31
- package/dist/chunks/chunk-E6V3JHVT.js.map +0 -1
- package/dist/chunks/chunk-EJZQSOHU.js +0 -85
- package/dist/chunks/chunk-EJZQSOHU.js.map +0 -1
- package/dist/chunks/chunk-ELDMXTUQ.js.map +0 -1
- package/dist/chunks/chunk-EMVOKXSA.js +0 -84
- package/dist/chunks/chunk-EMVOKXSA.js.map +0 -1
- package/dist/chunks/chunk-ERYHQVOT.js +0 -8
- package/dist/chunks/chunk-ERYHQVOT.js.map +0 -1
- package/dist/chunks/chunk-ETLOKJAG.js +0 -94
- package/dist/chunks/chunk-ETLOKJAG.js.map +0 -1
- package/dist/chunks/chunk-FL72PF4D.js +0 -19
- package/dist/chunks/chunk-FL72PF4D.js.map +0 -1
- package/dist/chunks/chunk-GAHXUFMQ.js +0 -93
- package/dist/chunks/chunk-GAHXUFMQ.js.map +0 -1
- package/dist/chunks/chunk-H2JE6IVU.js +0 -15
- package/dist/chunks/chunk-H2JE6IVU.js.map +0 -1
- package/dist/chunks/chunk-H6KHXSIO.js +0 -8
- package/dist/chunks/chunk-H6KHXSIO.js.map +0 -1
- package/dist/chunks/chunk-HFAUM56X.js +0 -208
- package/dist/chunks/chunk-HFAUM56X.js.map +0 -1
- package/dist/chunks/chunk-JQ6HWGRY.js +0 -22
- package/dist/chunks/chunk-JQ6HWGRY.js.map +0 -1
- package/dist/chunks/chunk-KG5Z2CKO.js +0 -86
- package/dist/chunks/chunk-KG5Z2CKO.js.map +0 -1
- package/dist/chunks/chunk-KSXNC564.js +0 -43
- package/dist/chunks/chunk-KSXNC564.js.map +0 -1
- package/dist/chunks/chunk-LF6SO3JU.js.map +0 -1
- package/dist/chunks/chunk-NJNQOQUU.js +0 -8
- package/dist/chunks/chunk-NJNQOQUU.js.map +0 -1
- package/dist/chunks/chunk-ODHS7HDB.js +0 -94
- package/dist/chunks/chunk-ODHS7HDB.js.map +0 -1
- package/dist/chunks/chunk-QCB6P7DH.js +0 -146
- package/dist/chunks/chunk-QCB6P7DH.js.map +0 -1
- package/dist/chunks/chunk-QU7KR7VX.js +0 -367
- package/dist/chunks/chunk-QU7KR7VX.js.map +0 -1
- package/dist/chunks/chunk-TU6COU44.js +0 -82
- package/dist/chunks/chunk-TU6COU44.js.map +0 -1
- package/dist/chunks/chunk-TUKEQ36K.js +0 -60
- package/dist/chunks/chunk-TUKEQ36K.js.map +0 -1
- package/dist/chunks/chunk-TWYN56XO.js +0 -92
- package/dist/chunks/chunk-TWYN56XO.js.map +0 -1
- package/dist/chunks/chunk-UHQVQBCL.js +0 -89
- package/dist/chunks/chunk-UHQVQBCL.js.map +0 -1
- package/dist/chunks/chunk-WFFIUFJJ.js +0 -28
- package/dist/chunks/chunk-WFFIUFJJ.js.map +0 -1
- package/dist/chunks/chunk-WN6TJQI2.js +0 -103
- package/dist/chunks/chunk-WN6TJQI2.js.map +0 -1
- package/dist/chunks/chunk-WPEFNKMC.js +0 -923
- package/dist/chunks/chunk-WPEFNKMC.js.map +0 -1
- package/dist/chunks/chunk-YPMZLHGG.js +0 -52
- package/dist/chunks/chunk-YPMZLHGG.js.map +0 -1
- package/dist/chunks/chunk-YWEWSQJR.js +0 -40
- package/dist/chunks/chunk-YWEWSQJR.js.map +0 -1
- package/dist/chunks/chunk-ZGSNDSK3.js +0 -1
- package/dist/chunks/chunk-ZGSNDSK3.js.map +0 -1
- package/dist/exports/computed-item.context.d.ts +0 -29
- package/dist/exports/computed-item.context.js +0 -8
- package/dist/exports/computed-item.context.js.map +0 -1
- package/dist/exports/computed.context.d.ts +0 -42
- package/dist/exports/computed.context.js +0 -8
- package/dist/exports/computed.context.js.map +0 -1
- package/dist/exports/config.context.js +0 -8
- package/dist/exports/config.context.js.map +0 -1
- package/dist/exports/expression-result.d.ts +0 -19
- package/dist/exports/expression-result.js +0 -1
- package/dist/exports/expression-result.js.map +0 -1
- package/dist/exports/interaction.d.ts +0 -8
- package/dist/exports/interaction.interface.d.ts +0 -13
- package/dist/exports/interaction.interface.js +0 -1
- package/dist/exports/interaction.interface.js.map +0 -1
- package/dist/exports/interaction.js +0 -12
- package/dist/exports/interaction.js.map +0 -1
- package/dist/exports/item.context.d.ts +0 -8
- package/dist/exports/item.context.js +0 -8
- package/dist/exports/item.context.js.map +0 -1
- package/dist/exports/qti-assessment-item.context.d.ts +0 -14
- package/dist/exports/qti-assessment-item.context.js +0 -8
- package/dist/exports/qti-assessment-item.context.js.map +0 -1
- package/dist/exports/qti-condition-expression.d.ts +0 -15
- package/dist/exports/qti-condition-expression.js +0 -11
- package/dist/exports/qti-condition-expression.js.map +0 -1
- package/dist/exports/qti-expression.d.ts +0 -8
- package/dist/exports/qti-expression.js +0 -10
- package/dist/exports/qti-expression.js.map +0 -1
- package/dist/exports/qti-test.d.ts +0 -40
- package/dist/exports/qti-test.js +0 -1
- package/dist/exports/qti-test.js.map +0 -1
- package/dist/exports/qti.context.d.ts +0 -14
- package/dist/exports/qti.context.js +0 -8
- package/dist/exports/qti.context.js.map +0 -1
- package/dist/exports/session.context.d.ts +0 -26
- package/dist/exports/session.context.js +0 -10
- package/dist/exports/session.context.js.map +0 -1
- package/dist/exports/test.context.d.ts +0 -21
- package/dist/exports/test.context.js +0 -10
- package/dist/exports/test.context.js.map +0 -1
- package/dist/exports/variables.d.ts +0 -8
- package/dist/exports/variables.js +0 -1
- package/dist/exports/variables.js.map +0 -1
- package/dist/qti-item/components/item-container.d.ts +0 -40
- package/dist/qti-item/components/item-container.js +0 -11
- package/dist/qti-item/components/item-container.js.map +0 -1
- package/dist/qti-item/components/item-correct-response-mode.d.ts +0 -17
- package/dist/qti-item/components/item-correct-response-mode.js +0 -62
- package/dist/qti-item/components/item-correct-response-mode.js.map +0 -1
- package/dist/qti-item/components/item-show-candidate-correction.d.ts +0 -34
- package/dist/qti-item/components/item-show-candidate-correction.js +0 -88
- package/dist/qti-item/components/item-show-candidate-correction.js.map +0 -1
- package/dist/qti-item/components/item-show-correct-response.d.ts +0 -33
- package/dist/qti-item/components/item-show-correct-response.js +0 -10
- package/dist/qti-item/components/item-show-correct-response.js.map +0 -1
- package/dist/qti-item/components/print-item-variables.d.ts +0 -23
- package/dist/qti-item/components/print-item-variables.js +0 -9
- package/dist/qti-item/components/print-item-variables.js.map +0 -1
- package/dist/qti-item/components/styles.d.ts +0 -8
- package/dist/qti-item/components/styles.js +0 -14
- package/dist/qti-item/components/styles.js.map +0 -1
- package/dist/qti-item/core/index.d.ts +0 -51
- package/dist/qti-item/core/index.js +0 -26
- package/dist/qti-response-declaration-DKr08ANy.d.ts +0 -1397
- package/dist/qti-test/components/index.d.ts +0 -33
- package/dist/qti-test/components/index.js +0 -87
- package/dist/qti-test/components/styles.d.ts +0 -8
- package/dist/qti-test/components/styles.js +0 -14
- package/dist/qti-test/components/styles.js.map +0 -1
- package/dist/qti-test/components/test-check-item.d.ts +0 -16
- package/dist/qti-test/components/test-check-item.js +0 -9
- package/dist/qti-test/components/test-check-item.js.map +0 -1
- package/dist/qti-test/components/test-container.d.ts +0 -39
- package/dist/qti-test/components/test-container.js +0 -11
- package/dist/qti-test/components/test-container.js.map +0 -1
- package/dist/qti-test/components/test-end-attempt.d.ts +0 -16
- package/dist/qti-test/components/test-end-attempt.js +0 -9
- package/dist/qti-test/components/test-end-attempt.js.map +0 -1
- package/dist/qti-test/components/test-item-link.d.ts +0 -18
- package/dist/qti-test/components/test-item-link.js +0 -9
- package/dist/qti-test/components/test-item-link.js.map +0 -1
- package/dist/qti-test/components/test-navigation.d.ts +0 -73
- package/dist/qti-test/components/test-navigation.js +0 -13
- package/dist/qti-test/components/test-navigation.js.map +0 -1
- package/dist/qti-test/components/test-next.d.ts +0 -48
- package/dist/qti-test/components/test-next.js +0 -12
- package/dist/qti-test/components/test-next.js.map +0 -1
- package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +0 -23
- package/dist/qti-test/components/test-paging-buttons-stamp.js +0 -9
- package/dist/qti-test/components/test-paging-buttons-stamp.js.map +0 -1
- package/dist/qti-test/components/test-prev.d.ts +0 -46
- package/dist/qti-test/components/test-prev.js +0 -12
- package/dist/qti-test/components/test-prev.js.map +0 -1
- package/dist/qti-test/components/test-print-context.d.ts +0 -25
- package/dist/qti-test/components/test-print-context.js +0 -9
- package/dist/qti-test/components/test-print-context.js.map +0 -1
- package/dist/qti-test/components/test-print-item-variables.d.ts +0 -27
- package/dist/qti-test/components/test-print-item-variables.js +0 -9
- package/dist/qti-test/components/test-print-item-variables.js.map +0 -1
- package/dist/qti-test/components/test-scoring-buttons.d.ts +0 -32
- package/dist/qti-test/components/test-scoring-buttons.js +0 -9
- package/dist/qti-test/components/test-scoring-buttons.js.map +0 -1
- package/dist/qti-test/components/test-scoring-feedback.d.ts +0 -27
- package/dist/qti-test/components/test-scoring-feedback.js +0 -9
- package/dist/qti-test/components/test-scoring-feedback.js.map +0 -1
- package/dist/qti-test/components/test-section-buttons-stamp.d.ts +0 -23
- package/dist/qti-test/components/test-section-buttons-stamp.js +0 -9
- package/dist/qti-test/components/test-section-buttons-stamp.js.map +0 -1
- package/dist/qti-test/components/test-section-link.d.ts +0 -18
- package/dist/qti-test/components/test-section-link.js +0 -9
- package/dist/qti-test/components/test-section-link.js.map +0 -1
- package/dist/qti-test/components/test-show-correct-response.d.ts +0 -39
- package/dist/qti-test/components/test-show-correct-response.js +0 -10
- package/dist/qti-test/components/test-show-correct-response.js.map +0 -1
- package/dist/qti-test/components/test-stamp.d.ts +0 -31
- package/dist/qti-test/components/test-stamp.js +0 -9
- package/dist/qti-test/components/test-stamp.js.map +0 -1
- package/dist/qti-test/components/test-view-toggle.d.ts +0 -19
- package/dist/qti-test/components/test-view-toggle.js +0 -9
- package/dist/qti-test/components/test-view-toggle.js.map +0 -1
- package/dist/qti-test/components/test-view.d.ts +0 -24
- package/dist/qti-test/components/test-view.js +0 -10
- package/dist/qti-test/components/test-view.js.map +0 -1
- package/dist/qti-test/core/index.d.ts +0 -105
- package/dist/qti-test/core/index.js +0 -36
- package/dist/qti-test/core/index.js.map +0 -1
- package/dist/qti-test-feedback-CZsbp6z4.d.ts +0 -91
- package/dist/qti-transform-item-C9WtMeDR.d.ts +0 -39
- /package/dist/qti-item/{core/index.js.map → index.js.map} +0 -0
- /package/dist/qti-test/{components/index.js.map → index.js.map} +0 -0
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
computedContext
|
|
3
|
-
} from "./chunk-AZIKAG7K.js";
|
|
4
|
-
import {
|
|
5
|
-
__decorateClass
|
|
6
|
-
} from "./chunk-H2JE6IVU.js";
|
|
7
|
-
|
|
8
|
-
// src/lib/qti-test/components/test-scoring-feedback.ts
|
|
9
|
-
import { consume } from "@lit/context";
|
|
10
|
-
import { html, LitElement } from "lit";
|
|
11
|
-
import { customElement, property } from "lit/decorators.js";
|
|
12
|
-
var TestScoringFeedback = class extends LitElement {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.view = null;
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
|
|
19
|
-
if (!activeItem || !activeItem.variables) return html``;
|
|
20
|
-
if (activeItem["category"] === "dep-informational") return html`<div>${this.dataset.informational}</div>`;
|
|
21
|
-
const completionStatus = activeItem?.variables.find((v) => v.identifier === "completionStatus")?.value;
|
|
22
|
-
const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
|
|
23
|
-
const score = parseFloat(scoreOutcome?.value);
|
|
24
|
-
const externalScored = activeItem["externalScored"];
|
|
25
|
-
const feedbackText = () => {
|
|
26
|
-
if (completionStatus !== "completed") {
|
|
27
|
-
return this.dataset.textNoResponse;
|
|
28
|
-
}
|
|
29
|
-
if (!externalScored && score !== void 0 && !Number.isNaN(score)) {
|
|
30
|
-
return score > 0 ? this.dataset.textCorrect : this.dataset.textIncorrect;
|
|
31
|
-
}
|
|
32
|
-
if (externalScored === "externalMachine") {
|
|
33
|
-
return Number.isNaN(score) || score === void 0 ? this.dataset.scoreUnknown : `We hebben je antwoord ${score === 0 ? "geen punten" : score == 1 ? "\xE9\xE9n punt" : `${score} punten`} gegeven. Je kunt je score zelf aanpassen als je denkt dat dat niet klopt.`;
|
|
34
|
-
}
|
|
35
|
-
if (externalScored === "human") {
|
|
36
|
-
return Number.isNaN(score) ? "" : "Deze score heb je zelf toegekend.";
|
|
37
|
-
}
|
|
38
|
-
return this.dataset.inProgress;
|
|
39
|
-
};
|
|
40
|
-
return html`<div>${feedbackText()}</div>`;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
__decorateClass([
|
|
44
|
-
consume({ context: computedContext, subscribe: true })
|
|
45
|
-
], TestScoringFeedback.prototype, "computedContext", 2);
|
|
46
|
-
__decorateClass([
|
|
47
|
-
property({ type: String, attribute: "view" })
|
|
48
|
-
], TestScoringFeedback.prototype, "view", 2);
|
|
49
|
-
TestScoringFeedback = __decorateClass([
|
|
50
|
-
customElement("test-scoring-feedback")
|
|
51
|
-
], TestScoringFeedback);
|
|
52
|
-
|
|
53
|
-
export {
|
|
54
|
-
TestScoringFeedback
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=chunk-CTESMSQO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/components/test-scoring-feedback.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { OutcomeVariable } from '../../exports/variables';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { ViewMode } from 'storybook/internal/types';\n\n@customElement('test-scoring-feedback')\nexport class TestScoringFeedback extends LitElement {\n @consume({ context: computedContext, subscribe: true })\n protected computedContext?: ComputedContext;\n\n @property({ type: String, attribute: 'view' })\n public view: ViewMode = null;\n\n render() {\n const activeItem = this.computedContext?.testParts\n .flatMap(testPart => testPart.sections.flatMap(section => section.items))\n .find(item => item.active);\n\n if (!activeItem || !activeItem.variables) return html``;\n\n if (activeItem['category'] === 'dep-informational') return html`<div>${this.dataset.informational}</div>`;\n\n const completionStatus = activeItem?.variables.find(v => v.identifier === 'completionStatus')?.value;\n const scoreOutcome = activeItem?.variables.find(vr => vr.identifier == 'SCORE') as OutcomeVariable;\n\n const score = parseFloat(scoreOutcome?.value as string);\n const externalScored = activeItem['externalScored'];\n\n const feedbackText = () => {\n if (completionStatus !== 'completed') {\n return this.dataset.textNoResponse;\n }\n\n if (!externalScored && score !== undefined && !Number.isNaN(score)) {\n return score > 0 ? this.dataset.textCorrect : this.dataset.textIncorrect;\n }\n\n if (externalScored === 'externalMachine') {\n return Number.isNaN(score) || score === undefined\n ? this.dataset.scoreUnknown\n : `We hebben je antwoord ${score === 0 ? 'geen punten' : score == 1 ? 'één punt' : `${score} punten`} gegeven. Je kunt je score zelf aanpassen als je denkt dat dat niet klopt.`;\n }\n\n if (externalScored === 'human') {\n return Number.isNaN(score) ? '' : 'Deze score heb je zelf toegekend.';\n }\n\n return this.dataset.inProgress;\n };\n\n return html`<div>${feedbackText()}</div>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-scoring-feedback': TestScoringFeedback;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,MAAM,kBAAkB;AACjC,SAAS,eAAe,gBAAgB;AASjC,IAAM,sBAAN,cAAkC,WAAW;AAAA,EAA7C;AAAA;AAKL,SAAO,OAAiB;AAAA;AAAA,EAExB,SAAS;AACP,UAAM,aAAa,KAAK,iBAAiB,UACtC,QAAQ,cAAY,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK,CAAC,EACvE,KAAK,UAAQ,KAAK,MAAM;AAE3B,QAAI,CAAC,cAAc,CAAC,WAAW,UAAW,QAAO;AAEjD,QAAI,WAAW,UAAU,MAAM,oBAAqB,QAAO,YAAY,KAAK,QAAQ,aAAa;AAEjG,UAAM,mBAAmB,YAAY,UAAU,KAAK,OAAK,EAAE,eAAe,kBAAkB,GAAG;AAC/F,UAAM,eAAe,YAAY,UAAU,KAAK,QAAM,GAAG,cAAc,OAAO;AAE9E,UAAM,QAAQ,WAAW,cAAc,KAAe;AACtD,UAAM,iBAAiB,WAAW,gBAAgB;AAElD,UAAM,eAAe,MAAM;AACzB,UAAI,qBAAqB,aAAa;AACpC,eAAO,KAAK,QAAQ;AAAA,MACtB;AAEA,UAAI,CAAC,kBAAkB,UAAU,UAAa,CAAC,OAAO,MAAM,KAAK,GAAG;AAClE,eAAO,QAAQ,IAAI,KAAK,QAAQ,cAAc,KAAK,QAAQ;AAAA,MAC7D;AAEA,UAAI,mBAAmB,mBAAmB;AACxC,eAAO,OAAO,MAAM,KAAK,KAAK,UAAU,SACpC,KAAK,QAAQ,eACb,yBAAyB,UAAU,IAAI,gBAAgB,SAAS,IAAI,mBAAa,GAAG,KAAK,SAAS;AAAA,MACxG;AAEA,UAAI,mBAAmB,SAAS;AAC9B,eAAO,OAAO,MAAM,KAAK,IAAI,KAAK;AAAA,MACpC;AAEA,aAAO,KAAK,QAAQ;AAAA,IACtB;AAEA,WAAO,YAAY,aAAa,CAAC;AAAA,EACnC;AACF;AA5CY;AAAA,EADT,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAD3C,oBAED;AAGH;AAAA,EADN,SAAS,EAAE,MAAM,QAAQ,WAAW,OAAO,CAAC;AAAA,GAJlC,oBAKJ;AALI,sBAAN;AAAA,EADN,cAAc,uBAAuB;AAAA,GACzB;","names":[]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// src/lib/qti-item/components/styles.ts
|
|
2
|
-
import { css } from "lit";
|
|
3
|
-
var form = css`
|
|
4
|
-
display: inline-flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
padding: 0.5rem 1rem;
|
|
8
|
-
border-radius: 0.25rem;
|
|
9
|
-
user-select: none;
|
|
10
|
-
`;
|
|
11
|
-
var btn = css`
|
|
12
|
-
background-color: lightgray;
|
|
13
|
-
${form};
|
|
14
|
-
`;
|
|
15
|
-
var dis = css`
|
|
16
|
-
cursor: not-allowed;
|
|
17
|
-
opacity: 0.8;
|
|
18
|
-
`;
|
|
19
|
-
var ind = css`
|
|
20
|
-
${form};
|
|
21
|
-
border: 1px solid gray;
|
|
22
|
-
`;
|
|
23
|
-
|
|
24
|
-
export {
|
|
25
|
-
form,
|
|
26
|
-
btn,
|
|
27
|
-
dis,
|
|
28
|
-
ind
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=chunk-DZAMXOSC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-item/components/styles.ts"],"sourcesContent":["// /* eslint-disable lit-plugin(no-invalid-css) */\nimport { css } from 'lit';\n\nexport const form = css`\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n padding: 0.5rem 1rem;\n border-radius: 0.25rem;\n user-select: none;\n`;\n\nexport const btn = css`\n background-color: lightgray;\n ${form};\n`;\n\nexport const dis = css`\n cursor: not-allowed;\n opacity: 0.8;\n`;\n\nexport const ind = css`\n ${form};\n border: 1px solid gray;\n`;\n"],"mappings":";AACA,SAAS,WAAW;AAEb,IAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASb,IAAM,MAAM;AAAA;AAAA,IAEf,IAAI;AAAA;AAGD,IAAM,MAAM;AAAA;AAAA;AAAA;AAKZ,IAAM,MAAM;AAAA,IACf,IAAI;AAAA;AAAA;","names":[]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
qtiTransformItem,
|
|
3
|
-
qtiTransformManifest,
|
|
4
|
-
qtiTransformTest
|
|
5
|
-
} from "./chunk-WFUXZ4UT.js";
|
|
6
|
-
|
|
7
|
-
// src/lib/qti-loader/qti-loader.ts
|
|
8
|
-
var getManifestInfo = async (manifestURL) => {
|
|
9
|
-
const baseURI = manifestURL.substring(0, manifestURL.lastIndexOf("/"));
|
|
10
|
-
const test = await qtiTransformManifest().load(`${manifestURL}`).then((api) => api.assessmentTest());
|
|
11
|
-
const testHTMLDoc = await qtiTransformTest().load(`${baseURI}/${test.href}`).then((api) => api.htmlDoc());
|
|
12
|
-
const items = await qtiTransformTest().load(`${baseURI}/${test.href}`).then((api) => api.items());
|
|
13
|
-
const testURL = `${baseURI}/${test.href}`;
|
|
14
|
-
const testURI = `${baseURI}/${test.href.substring(0, test.href.lastIndexOf("/"))}`;
|
|
15
|
-
return {
|
|
16
|
-
testHTMLDoc,
|
|
17
|
-
testURI,
|
|
18
|
-
testURL,
|
|
19
|
-
items,
|
|
20
|
-
testIdentifier: test.identifier
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
var getItemByUri = async (itemUri) => {
|
|
24
|
-
return qtiTransformItem().load(itemUri).promise.then((api) => api.htmlDoc().firstElementChild);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
getManifestInfo,
|
|
29
|
-
getItemByUri
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=chunk-E6V3JHVT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-loader/qti-loader.ts"],"sourcesContent":["import { qtiTransformItem, qtiTransformTest } from '../qti-transformers';\nimport { qtiTransformManifest } from '../qti-transformers/qti-transform-manifest';\n\nimport type { QtiAssessmentItem } from '../qti-components';\n\nexport type ManifestInfo = {\n testIdentifier: string;\n testHTMLDoc: DocumentFragment;\n testURI: string;\n testURL: string;\n items: {\n identifier: string;\n href: string;\n category: string;\n }[];\n};\n\n// Utility function to ensure package URIs end with a '/'\n// const normalizeUri = (uri: string) => (uri.endsWith('/') ? uri : `${uri}/`);\n\n// Fetches assessment data from the manifest\nexport const getManifestInfo = async (manifestURL: string): Promise<ManifestInfo> => {\n const baseURI = manifestURL.substring(0, manifestURL.lastIndexOf('/'));\n\n const test = await qtiTransformManifest()\n .load(`${manifestURL}`)\n .then(api => api.assessmentTest());\n\n const testHTMLDoc = await qtiTransformTest()\n .load(`${baseURI}/${test.href}`)\n .then(api => api.htmlDoc());\n\n const items = await qtiTransformTest()\n .load(`${baseURI}/${test.href}`)\n .then(api => api.items());\n\n const testURL = `${baseURI}/${test.href}`;\n const testURI = `${baseURI}/${test.href.substring(0, test.href.lastIndexOf('/'))}`;\n\n return {\n testHTMLDoc,\n testURI,\n testURL,\n items,\n testIdentifier: test.identifier\n };\n};\n\n// Fetches a single item by URI\nexport const getItemByUri = async (itemUri: string): Promise<QtiAssessmentItem> => {\n return qtiTransformItem()\n .load(itemUri)\n .promise.then(api => api.htmlDoc().firstElementChild as QtiAssessmentItem);\n};\n"],"mappings":";;;;;;;AAqBO,IAAM,kBAAkB,OAAO,gBAA+C;AACnF,QAAM,UAAU,YAAY,UAAU,GAAG,YAAY,YAAY,GAAG,CAAC;AAErE,QAAM,OAAO,MAAM,qBAAqB,EACrC,KAAK,GAAG,WAAW,EAAE,EACrB,KAAK,SAAO,IAAI,eAAe,CAAC;AAEnC,QAAM,cAAc,MAAM,iBAAiB,EACxC,KAAK,GAAG,OAAO,IAAI,KAAK,IAAI,EAAE,EAC9B,KAAK,SAAO,IAAI,QAAQ,CAAC;AAE5B,QAAM,QAAQ,MAAM,iBAAiB,EAClC,KAAK,GAAG,OAAO,IAAI,KAAK,IAAI,EAAE,EAC9B,KAAK,SAAO,IAAI,MAAM,CAAC;AAE1B,QAAM,UAAU,GAAG,OAAO,IAAI,KAAK,IAAI;AACvC,QAAM,UAAU,GAAG,OAAO,IAAI,KAAK,KAAK,UAAU,GAAG,KAAK,KAAK,YAAY,GAAG,CAAC,CAAC;AAEhF,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,gBAAgB,KAAK;AAAA,EACvB;AACF;AAGO,IAAM,eAAe,OAAO,YAAgD;AACjF,SAAO,iBAAiB,EACrB,KAAK,OAAO,EACZ,QAAQ,KAAK,SAAO,IAAI,QAAQ,EAAE,iBAAsC;AAC7E;","names":[]}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
computedItemContext
|
|
3
|
-
} from "./chunk-4OGJBG35.js";
|
|
4
|
-
import {
|
|
5
|
-
__decorateClass
|
|
6
|
-
} from "./chunk-H2JE6IVU.js";
|
|
7
|
-
|
|
8
|
-
// src/lib/qti-item/components/print-item-variables.ts
|
|
9
|
-
import { consume } from "@lit/context";
|
|
10
|
-
import { css, html, LitElement } from "lit";
|
|
11
|
-
import { customElement } from "lit/decorators.js";
|
|
12
|
-
var PrintItemVariables = class extends LitElement {
|
|
13
|
-
render() {
|
|
14
|
-
const activeItem = this.computedContext;
|
|
15
|
-
if (!activeItem || !activeItem.variables) return html``;
|
|
16
|
-
const responseVariables = activeItem.variables.filter((v) => v.type === "response");
|
|
17
|
-
const outcomeVariables = activeItem.variables.filter((v) => v.type === "outcome");
|
|
18
|
-
const renderTable = (variables, title) => html`
|
|
19
|
-
<h3>${title}</h3>
|
|
20
|
-
<table>
|
|
21
|
-
<thead>
|
|
22
|
-
<tr>
|
|
23
|
-
<th>Identifier</th>
|
|
24
|
-
<th>Value</th>
|
|
25
|
-
<th>Cardinality</th>
|
|
26
|
-
<th>Base Type</th>
|
|
27
|
-
<th>Correct Response / Mappings</th>
|
|
28
|
-
</tr>
|
|
29
|
-
</thead>
|
|
30
|
-
<tbody>
|
|
31
|
-
${variables.map((v) => {
|
|
32
|
-
const correctResponse = v.correctResponse ? Array.isArray(v.correctResponse) ? v.correctResponse.join(", ") : v.correctResponse : "";
|
|
33
|
-
const mapEntries = v.mapping?.mapEntries?.map((m) => `${m.mapKey}=${m.mappedValue}pt`).join(", ") || "";
|
|
34
|
-
const areaMapEntries = v.areaMapping?.areaMapEntries?.map((m) => `${m.shape}(${m.coords})=${m.mappedValue}pt`).join(", ") || "";
|
|
35
|
-
return html`
|
|
36
|
-
<tr>
|
|
37
|
-
<td>${v.identifier}</td>
|
|
38
|
-
<td>${Array.isArray(v.value) ? v.value.join(", ") : v.value}</td>
|
|
39
|
-
<td>${v.cardinality}</td>
|
|
40
|
-
<td>${v.baseType}</td>
|
|
41
|
-
<td>${correctResponse || mapEntries || areaMapEntries}</td>
|
|
42
|
-
</tr>
|
|
43
|
-
`;
|
|
44
|
-
})}
|
|
45
|
-
</tbody>
|
|
46
|
-
</table>
|
|
47
|
-
`;
|
|
48
|
-
return html`
|
|
49
|
-
${renderTable(responseVariables, "Response Variables")} ${renderTable(outcomeVariables, "Outcome Variables")}
|
|
50
|
-
`;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
PrintItemVariables.styles = css`
|
|
54
|
-
table {
|
|
55
|
-
width: 100%;
|
|
56
|
-
border-collapse: collapse;
|
|
57
|
-
margin: 20px 0;
|
|
58
|
-
font-size: 14px;
|
|
59
|
-
text-align: left;
|
|
60
|
-
}
|
|
61
|
-
th,
|
|
62
|
-
td {
|
|
63
|
-
border: 1px solid #ddd;
|
|
64
|
-
padding: 8px;
|
|
65
|
-
}
|
|
66
|
-
th {
|
|
67
|
-
background-color: #f4f4f4;
|
|
68
|
-
font-weight: bold;
|
|
69
|
-
}
|
|
70
|
-
h3 {
|
|
71
|
-
margin-top: 20px;
|
|
72
|
-
font-size: 16px;
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
75
|
-
__decorateClass([
|
|
76
|
-
consume({ context: computedItemContext, subscribe: true })
|
|
77
|
-
], PrintItemVariables.prototype, "computedContext", 2);
|
|
78
|
-
PrintItemVariables = __decorateClass([
|
|
79
|
-
customElement("print-item-variables")
|
|
80
|
-
], PrintItemVariables);
|
|
81
|
-
|
|
82
|
-
export {
|
|
83
|
-
PrintItemVariables
|
|
84
|
-
};
|
|
85
|
-
//# sourceMappingURL=chunk-EJZQSOHU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-item/components/print-item-variables.ts"],"sourcesContent":["import { consume } from '@lit/context';\nimport { css, html, LitElement } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport { computedItemContext } from '../../exports/computed-item.context';\n\nimport type { ResponseVariable } from '../../exports/variables';\nimport type { ComputedItemContext } from '../../exports/computed-item.context';\n\n@customElement('print-item-variables')\nexport class PrintItemVariables extends LitElement {\n @consume({ context: computedItemContext, subscribe: true })\n protected computedContext?: ComputedItemContext;\n\n static styles = css`\n table {\n width: 100%;\n border-collapse: collapse;\n margin: 20px 0;\n font-size: 14px;\n text-align: left;\n }\n th,\n td {\n border: 1px solid #ddd;\n padding: 8px;\n }\n th {\n background-color: #f4f4f4;\n font-weight: bold;\n }\n h3 {\n margin-top: 20px;\n font-size: 16px;\n }\n `;\n\n render() {\n const activeItem = this.computedContext;\n\n if (!activeItem || !activeItem.variables) return html``;\n\n const responseVariables: ResponseVariable[] = activeItem.variables.filter(v => v.type === 'response');\n const outcomeVariables = activeItem.variables.filter(v => v.type === 'outcome');\n\n const renderTable = (variables: ResponseVariable[], title: string) => html`\n <h3>${title}</h3>\n <table>\n <thead>\n <tr>\n <th>Identifier</th>\n <th>Value</th>\n <th>Cardinality</th>\n <th>Base Type</th>\n <th>Correct Response / Mappings</th>\n </tr>\n </thead>\n <tbody>\n ${variables.map(v => {\n const correctResponse = v.correctResponse\n ? Array.isArray(v.correctResponse)\n ? v.correctResponse.join(', ')\n : v.correctResponse\n : '';\n\n const mapEntries = v.mapping?.mapEntries?.map(m => `${m.mapKey}=${m.mappedValue}pt`).join(', ') || '';\n\n const areaMapEntries =\n v.areaMapping?.areaMapEntries?.map(m => `${m.shape}(${m.coords})=${m.mappedValue}pt`).join(', ') || '';\n\n return html`\n <tr>\n <td>${v.identifier}</td>\n <td>${Array.isArray(v.value) ? v.value.join(', ') : v.value}</td>\n <td>${v.cardinality}</td>\n <td>${v.baseType}</td>\n <td>${correctResponse || mapEntries || areaMapEntries}</td>\n </tr>\n `;\n })}\n </tbody>\n </table>\n `;\n\n return html`\n ${renderTable(responseVariables, 'Response Variables')} ${renderTable(outcomeVariables, 'Outcome Variables')}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'print-item-variables': PrintItemVariables;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,qBAAqB;AAQvB,IAAM,qBAAN,cAAiC,WAAW;AAAA,EA2BjD,SAAS;AACP,UAAM,aAAa,KAAK;AAExB,QAAI,CAAC,cAAc,CAAC,WAAW,UAAW,QAAO;AAEjD,UAAM,oBAAwC,WAAW,UAAU,OAAO,OAAK,EAAE,SAAS,UAAU;AACpG,UAAM,mBAAmB,WAAW,UAAU,OAAO,OAAK,EAAE,SAAS,SAAS;AAE9E,UAAM,cAAc,CAAC,WAA+B,UAAkB;AAAA,YAC9D,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAYL,UAAU,IAAI,OAAK;AACnB,YAAM,kBAAkB,EAAE,kBACtB,MAAM,QAAQ,EAAE,eAAe,IAC7B,EAAE,gBAAgB,KAAK,IAAI,IAC3B,EAAE,kBACJ;AAEJ,YAAM,aAAa,EAAE,SAAS,YAAY,IAAI,OAAK,GAAG,EAAE,MAAM,IAAI,EAAE,WAAW,IAAI,EAAE,KAAK,IAAI,KAAK;AAEnG,YAAM,iBACJ,EAAE,aAAa,gBAAgB,IAAI,OAAK,GAAG,EAAE,KAAK,IAAI,EAAE,MAAM,KAAK,EAAE,WAAW,IAAI,EAAE,KAAK,IAAI,KAAK;AAEtG,aAAO;AAAA;AAAA,sBAEG,EAAE,UAAU;AAAA,sBACZ,MAAM,QAAQ,EAAE,KAAK,IAAI,EAAE,MAAM,KAAK,IAAI,IAAI,EAAE,KAAK;AAAA,sBACrD,EAAE,WAAW;AAAA,sBACb,EAAE,QAAQ;AAAA,sBACV,mBAAmB,cAAc,cAAc;AAAA;AAAA;AAAA,IAG3D,CAAC,CAAC;AAAA;AAAA;AAAA;AAKR,WAAO;AAAA,QACH,YAAY,mBAAmB,oBAAoB,CAAC,IAAI,YAAY,kBAAkB,mBAAmB,CAAC;AAAA;AAAA,EAEhH;AACF;AA9Ea,mBAIJ,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAFN;AAAA,EADT,QAAQ,EAAE,SAAS,qBAAqB,WAAW,KAAK,CAAC;AAAA,GAD/C,mBAED;AAFC,qBAAN;AAAA,EADN,cAAc,sBAAsB;AAAA,GACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/decorators/watch.ts"],"sourcesContent":["import type { LitElement } from 'lit';\n\ntype UpdateHandler = (prev?: unknown, next?: unknown) => void;\n\ntype NonUndefined<A> = A extends undefined ? never : A;\n\nexport type UpdateHandlerFunctionKeys<T extends object> = {\n [K in keyof T]-?: NonUndefined<T[K]> extends UpdateHandler ? K : never;\n}[keyof T];\n\ninterface WatchOptions {\n /**\n * If true, will only start watching after the initial update/render\n */\n waitUntilFirstUpdate?: boolean;\n}\n\n/**\n * Runs when observed properties change, e.g. @property or @state, but before the component updates. To wait for an\n * update to complete after a change occurs, use `await this.updateComplete` in the handler. To start watching after the\n * initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n *\n * Usage:\n *\n * @watch('propName')\n * handlePropChange(oldValue, newValue) {\n * ...\n * }\n */\nexport function watch(propertyName: string | string[], options?: WatchOptions) {\n const resolvedOptions: Required<WatchOptions> = {\n waitUntilFirstUpdate: false,\n ...options\n };\n return <ElemClass extends LitElement>(\n proto: ElemClass,\n decoratedFnName: UpdateHandlerFunctionKeys<ElemClass> | any\n ) => {\n // @ts-expect-error - update is a protected property\n const { update } = proto;\n const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];\n\n // @ts-expect-error - update is a protected property\n proto.update = function (this: ElemClass, changedProps: Map<keyof ElemClass, ElemClass[keyof ElemClass]>) {\n watchedProperties.forEach(property => {\n const key = property as keyof ElemClass;\n if (changedProps.has(key)) {\n const oldValue = changedProps.get(key);\n const newValue = this[key];\n\n if (oldValue !== newValue) {\n if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {\n (this[decoratedFnName] as unknown as UpdateHandler)(oldValue, newValue);\n }\n }\n }\n });\n\n update.call(this, changedProps);\n };\n };\n}\n"],"mappings":";AA6BO,SAAS,MAAM,cAAiC,SAAwB;AAC7E,QAAM,kBAA0C;AAAA,IAC9C,sBAAsB;AAAA,IACtB,GAAG;AAAA,EACL;AACA,SAAO,CACL,OACA,oBACG;AAEH,UAAM,EAAE,OAAO,IAAI;AACnB,UAAM,oBAAoB,MAAM,QAAQ,YAAY,IAAI,eAAe,CAAC,YAAY;AAGpF,UAAM,SAAS,SAA2B,cAAgE;AACxG,wBAAkB,QAAQ,cAAY;AACpC,cAAM,MAAM;AACZ,YAAI,aAAa,IAAI,GAAG,GAAG;AACzB,gBAAM,WAAW,aAAa,IAAI,GAAG;AACrC,gBAAM,WAAW,KAAK,GAAG;AAEzB,cAAI,aAAa,UAAU;AACzB,gBAAI,CAAC,gBAAgB,wBAAwB,KAAK,YAAY;AAC5D,cAAC,KAAK,eAAe,EAA+B,UAAU,QAAQ;AAAA,YACxE;AAAA,UACF;AAAA,QACF;AAAA,MACF,CAAC;AAED,aAAO,KAAK,MAAM,YAAY;AAAA,IAChC;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
btn,
|
|
3
|
-
dis
|
|
4
|
-
} from "./chunk-5ZHHNEDA.js";
|
|
5
|
-
import {
|
|
6
|
-
watch
|
|
7
|
-
} from "./chunk-ELDMXTUQ.js";
|
|
8
|
-
import {
|
|
9
|
-
computedContext
|
|
10
|
-
} from "./chunk-AZIKAG7K.js";
|
|
11
|
-
import {
|
|
12
|
-
__decorateClass
|
|
13
|
-
} from "./chunk-H2JE6IVU.js";
|
|
14
|
-
|
|
15
|
-
// src/lib/qti-test/components/test-prev.ts
|
|
16
|
-
import { css, html, LitElement } from "lit";
|
|
17
|
-
import { customElement, property } from "lit/decorators.js";
|
|
18
|
-
import { consume } from "@lit/context";
|
|
19
|
-
var TestPrev = class extends LitElement {
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
this._internalDisabled = true;
|
|
23
|
-
this.addEventListener("click", (e) => {
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
if (!this._internalDisabled) this._requestItem(this.sectionItems[this.itemIndex - 1].identifier);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
_handleTestElementChange(_oldValue, newValue) {
|
|
29
|
-
if (newValue) {
|
|
30
|
-
this._internalDisabled = false;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
willUpdate(_changedProperties) {
|
|
34
|
-
if (!this.computedContext) return;
|
|
35
|
-
const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
|
|
36
|
-
if (!testPart) return;
|
|
37
|
-
this.sectionItems = testPart.sections.flatMap((section) => section.items);
|
|
38
|
-
this.itemIndex = this.sectionItems.findIndex((item) => item.active);
|
|
39
|
-
this.checkDisabled();
|
|
40
|
-
}
|
|
41
|
-
checkDisabled() {
|
|
42
|
-
this._internalDisabled = !this.computedContext || this.itemIndex === 0 || this.itemIndex === -1;
|
|
43
|
-
}
|
|
44
|
-
_requestItem(identifier) {
|
|
45
|
-
this.dispatchEvent(
|
|
46
|
-
new CustomEvent("qti-request-navigation", {
|
|
47
|
-
composed: true,
|
|
48
|
-
bubbles: true,
|
|
49
|
-
detail: {
|
|
50
|
-
type: "item",
|
|
51
|
-
id: identifier
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
render() {
|
|
57
|
-
return html`<slot></slot>`;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
TestPrev.styles = css`
|
|
61
|
-
:host {
|
|
62
|
-
${btn};
|
|
63
|
-
}
|
|
64
|
-
:host([disabled]) {
|
|
65
|
-
${dis};
|
|
66
|
-
}
|
|
67
|
-
`;
|
|
68
|
-
__decorateClass([
|
|
69
|
-
property({ type: Boolean, reflect: true, attribute: "disabled" })
|
|
70
|
-
], TestPrev.prototype, "_internalDisabled", 2);
|
|
71
|
-
__decorateClass([
|
|
72
|
-
consume({ context: computedContext, subscribe: true })
|
|
73
|
-
], TestPrev.prototype, "computedContext", 2);
|
|
74
|
-
__decorateClass([
|
|
75
|
-
watch("computedContext")
|
|
76
|
-
], TestPrev.prototype, "_handleTestElementChange", 1);
|
|
77
|
-
TestPrev = __decorateClass([
|
|
78
|
-
customElement("test-prev")
|
|
79
|
-
], TestPrev);
|
|
80
|
-
|
|
81
|
-
export {
|
|
82
|
-
TestPrev
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=chunk-EMVOKXSA.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/components/test-prev.ts"],"sourcesContent":["import { css, html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { consume } from '@lit/context';\n\nimport * as styles from './styles';\nimport { watch } from '../../decorators';\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { ComputedContext, ComputedItem } from '../../exports/computed.context';\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 LitElement {\n @property({ type: Boolean, reflect: true, attribute: 'disabled' })\n public _internalDisabled = true;\n\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n sectionItems: ComputedItem[];\n itemIndex: number;\n\n @watch('computedContext')\n _handleTestElementChange(_oldValue: ComputedContext, newValue: ComputedContext) {\n if (newValue) {\n this._internalDisabled = false;\n }\n }\n\n static styles = css`\n :host {\n ${styles.btn};\n }\n :host([disabled]) {\n ${styles.dis};\n }\n `;\n\n constructor() {\n super();\n\n this.addEventListener('click', e => {\n e.preventDefault();\n if (!this._internalDisabled) this._requestItem(this.sectionItems[this.itemIndex - 1].identifier);\n });\n }\n\n willUpdate(_changedProperties: Map<string | number | symbol, unknown>) {\n if (!this.computedContext) return;\n const testPart = this.computedContext?.testParts.find(testPart => testPart.active);\n if (!testPart) return;\n this.sectionItems = testPart.sections.flatMap(section => section.items);\n this.itemIndex = this.sectionItems.findIndex(item => item.active);\n this.checkDisabled();\n }\n\n checkDisabled() {\n this._internalDisabled = !this.computedContext || this.itemIndex === 0 || this.itemIndex === -1;\n }\n\n protected _requestItem(identifier: string): void {\n this.dispatchEvent(\n new CustomEvent('qti-request-navigation', {\n composed: true,\n bubbles: true,\n detail: {\n type: 'item',\n id: identifier\n }\n })\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"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,KAAK,MAAM,kBAAkB;AACtC,SAAS,eAAe,gBAAgB;AACxC,SAAS,eAAe;AAoBjB,IAAM,WAAN,cAAuB,WAAW;AAAA,EA0BvC,cAAc;AACZ,UAAM;AAzBR,SAAO,oBAAoB;AA2BzB,SAAK,iBAAiB,SAAS,OAAK;AAClC,QAAE,eAAe;AACjB,UAAI,CAAC,KAAK,kBAAmB,MAAK,aAAa,KAAK,aAAa,KAAK,YAAY,CAAC,EAAE,UAAU;AAAA,IACjG,CAAC;AAAA,EACH;AAAA,EAtBA,yBAAyB,WAA4B,UAA2B;AAC9E,QAAI,UAAU;AACZ,WAAK,oBAAoB;AAAA,IAC3B;AAAA,EACF;AAAA,EAoBA,WAAW,oBAA4D;AACrE,QAAI,CAAC,KAAK,gBAAiB;AAC3B,UAAM,WAAW,KAAK,iBAAiB,UAAU,KAAK,CAAAA,cAAYA,UAAS,MAAM;AACjF,QAAI,CAAC,SAAU;AACf,SAAK,eAAe,SAAS,SAAS,QAAQ,aAAW,QAAQ,KAAK;AACtE,SAAK,YAAY,KAAK,aAAa,UAAU,UAAQ,KAAK,MAAM;AAChE,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,gBAAgB;AACd,SAAK,oBAAoB,CAAC,KAAK,mBAAmB,KAAK,cAAc,KAAK,KAAK,cAAc;AAAA,EAC/F;AAAA,EAEU,aAAa,YAA0B;AAC/C,SAAK;AAAA,MACH,IAAI,YAAY,0BAA0B;AAAA,QACxC,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,IAAI;AAAA,QACN;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AAAA,EAEA,SAAS;AACP,WAAO;AAAA,EACT;AACF;AAhEa,SAiBJ,SAAS;AAAA;AAAA,QAEH,GAAG;AAAA;AAAA;AAAA,QAGH,GAAG;AAAA;AAAA;AApBT;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,MAAM,WAAW,WAAW,CAAC;AAAA,GADtD,SAEJ;AAGC;AAAA,EADP,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAJ3C,SAKH;AAMR;AAAA,EADC,MAAM,iBAAiB;AAAA,GAVb,SAWX;AAXW,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;","names":["testPart"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/exports/config.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\n\nexport type CorrectResponseMode = 'internal' | 'full';\n\nexport interface ConfigContext {\n infoItemCategory?: string;\n reportValidityAfterScoring?: boolean;\n disableAfterIfMaxChoicesReached?: boolean;\n correctResponseMode?: CorrectResponseMode;\n inlineChoicePrompt?: string;\n}\n\nexport const configContext = createContext<Readonly<ConfigContext>>(Symbol('configContext'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAYvB,IAAM,gBAAgB,cAAuC,OAAO,eAAe,CAAC;","names":[]}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
item_default
|
|
3
|
-
} from "./chunk-LSEB52SP.js";
|
|
4
|
-
import {
|
|
5
|
-
watch
|
|
6
|
-
} from "./chunk-ELDMXTUQ.js";
|
|
7
|
-
import {
|
|
8
|
-
qtiTransformItem
|
|
9
|
-
} from "./chunk-WFUXZ4UT.js";
|
|
10
|
-
import {
|
|
11
|
-
__decorateClass
|
|
12
|
-
} from "./chunk-H2JE6IVU.js";
|
|
13
|
-
|
|
14
|
-
// src/lib/qti-item/components/item-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 ItemContainer = class extends LitElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.itemURL = null;
|
|
22
|
-
this.itemDoc = null;
|
|
23
|
-
this.itemXML = null;
|
|
24
|
-
/** Template content if provided */
|
|
25
|
-
this.templateContent = null;
|
|
26
|
-
}
|
|
27
|
-
async handleItemURLChange() {
|
|
28
|
-
if (!this.itemURL) return;
|
|
29
|
-
try {
|
|
30
|
-
const { promise: api } = await qtiTransformItem().load(this.itemURL);
|
|
31
|
-
this.itemDoc = (await api).htmlDoc();
|
|
32
|
-
} catch (error) {
|
|
33
|
-
console.error("Error loading or parsing XML:", error);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
handleItemXMLChange() {
|
|
37
|
-
if (!this.itemXML) return;
|
|
38
|
-
try {
|
|
39
|
-
this.itemDoc = qtiTransformItem().parse(this.itemXML).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.itemURL) {
|
|
49
|
-
this.handleItemURLChange();
|
|
50
|
-
}
|
|
51
|
-
if (this.itemXML) {
|
|
52
|
-
this.handleItemXMLChange();
|
|
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.itemDoc, html`<span>Loading...</span>`)}
|
|
69
|
-
`;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
__decorateClass([
|
|
73
|
-
property({ type: String, attribute: "item-url" })
|
|
74
|
-
], ItemContainer.prototype, "itemURL", 2);
|
|
75
|
-
__decorateClass([
|
|
76
|
-
state()
|
|
77
|
-
], ItemContainer.prototype, "itemDoc", 2);
|
|
78
|
-
__decorateClass([
|
|
79
|
-
state()
|
|
80
|
-
], ItemContainer.prototype, "itemXML", 2);
|
|
81
|
-
__decorateClass([
|
|
82
|
-
watch("itemURL", { waitUntilFirstUpdate: true })
|
|
83
|
-
], ItemContainer.prototype, "handleItemURLChange", 1);
|
|
84
|
-
__decorateClass([
|
|
85
|
-
watch("itemXML", { waitUntilFirstUpdate: true })
|
|
86
|
-
], ItemContainer.prototype, "handleItemXMLChange", 1);
|
|
87
|
-
ItemContainer = __decorateClass([
|
|
88
|
-
customElement("item-container")
|
|
89
|
-
], ItemContainer);
|
|
90
|
-
|
|
91
|
-
export {
|
|
92
|
-
ItemContainer
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=chunk-ETLOKJAG.js.map
|
|
@@ -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';\n\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 { promise: api } = await qtiTransformItem().load(this.itemURL);\n this.itemDoc = (await 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;AAqBf,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,EAAE,SAAS,IAAI,IAAI,MAAM,iBAAiB,EAAE,KAAK,KAAK,OAAO;AACnE,WAAK,WAAW,MAAM,KAAK,QAAQ;AAAA,IACrC,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,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
QtiExpression
|
|
3
|
-
} from "./chunk-QCB6P7DH.js";
|
|
4
|
-
|
|
5
|
-
// src/lib/exports/qti-condition-expression.ts
|
|
6
|
-
var QtiConditionExpression = class extends QtiExpression {
|
|
7
|
-
calculate() {
|
|
8
|
-
this.result = this.getResult();
|
|
9
|
-
return this.result;
|
|
10
|
-
}
|
|
11
|
-
getResult() {
|
|
12
|
-
throw new Error("Not implemented");
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
QtiConditionExpression
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=chunk-FL72PF4D.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/exports/qti-condition-expression.ts"],"sourcesContent":["import { QtiExpression } from './qti-expression';\n\nexport abstract class QtiConditionExpression extends QtiExpression<boolean> {\n public calculate(): Readonly<boolean> {\n this.result = this.getResult();\n return this.result;\n }\n\n public getResult(): Readonly<boolean> {\n throw new Error('Not implemented');\n }\n}\n"],"mappings":";;;;;AAEO,IAAe,yBAAf,cAA8C,cAAuB;AAAA,EACnE,YAA+B;AACpC,SAAK,SAAS,KAAK,UAAU;AAC7B,WAAO,KAAK;AAAA,EACd;AAAA,EAEO,YAA+B;AACpC,UAAM,IAAI,MAAM,iBAAiB;AAAA,EACnC;AACF;","names":[]}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
computedContext
|
|
3
|
-
} from "./chunk-AZIKAG7K.js";
|
|
4
|
-
import {
|
|
5
|
-
__decorateClass
|
|
6
|
-
} from "./chunk-H2JE6IVU.js";
|
|
7
|
-
|
|
8
|
-
// src/lib/qti-test/components/test-stamp.ts
|
|
9
|
-
import { html, LitElement, nothing } from "lit";
|
|
10
|
-
import { customElement, property, state } from "lit/decorators.js";
|
|
11
|
-
import { prepareTemplate } from "@heximal/templates";
|
|
12
|
-
import { consume } from "@lit/context";
|
|
13
|
-
var TestStamp = class extends LitElement {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.debug = false;
|
|
17
|
-
this.stampContext = {
|
|
18
|
-
view: "candidate",
|
|
19
|
-
activeItem: {},
|
|
20
|
-
activeSection: {
|
|
21
|
-
items: []
|
|
22
|
-
},
|
|
23
|
-
activeTestpart: {
|
|
24
|
-
items: [],
|
|
25
|
-
sections: []
|
|
26
|
-
},
|
|
27
|
-
test: {}
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
createRenderRoot() {
|
|
31
|
-
return this;
|
|
32
|
-
}
|
|
33
|
-
connectedCallback() {
|
|
34
|
-
super.connectedCallback();
|
|
35
|
-
const templateElement = this.querySelector("template");
|
|
36
|
-
if (!templateElement) {
|
|
37
|
-
this.myTemplate = null;
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
this.myTemplate = prepareTemplate(templateElement);
|
|
41
|
-
}
|
|
42
|
-
willUpdate(_changedProperties) {
|
|
43
|
-
if (!this.computedContext) {
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const activeTestPart = this.computedContext.testParts.find((testPart) => testPart.active);
|
|
47
|
-
const activeSection = activeTestPart?.sections.find((section) => section.active);
|
|
48
|
-
const activeItem = activeSection?.items.find((item) => item.active);
|
|
49
|
-
const { variables, ...augmentedItem } = activeItem || {};
|
|
50
|
-
if (!activeTestPart || !activeSection || !activeItem) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const augmentedTestPart = {
|
|
54
|
-
...activeTestPart,
|
|
55
|
-
items: activeTestPart.sections.flatMap((section) => section.items.map(({ variables: variables2, ...rest }) => rest)),
|
|
56
|
-
sections: activeTestPart.sections.map((section) => ({
|
|
57
|
-
...section,
|
|
58
|
-
items: section.items.map(({ variables: variables2, ...rest }) => rest)
|
|
59
|
-
}))
|
|
60
|
-
};
|
|
61
|
-
const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables: variables2, ...rest }) => rest) };
|
|
62
|
-
const { testParts, ...activeTest } = this.computedContext;
|
|
63
|
-
this.stampContext = {
|
|
64
|
-
view: this.computedContext.view,
|
|
65
|
-
activeItem: augmentedItem,
|
|
66
|
-
activeSection: augmentedSection,
|
|
67
|
-
activeTestpart: augmentedTestPart,
|
|
68
|
-
test: activeTest
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
render() {
|
|
72
|
-
return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}
|
|
73
|
-
${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
__decorateClass([
|
|
77
|
-
property({ type: Boolean, reflect: true })
|
|
78
|
-
], TestStamp.prototype, "debug", 2);
|
|
79
|
-
__decorateClass([
|
|
80
|
-
state(),
|
|
81
|
-
consume({ context: computedContext, subscribe: true })
|
|
82
|
-
], TestStamp.prototype, "computedContext", 2);
|
|
83
|
-
__decorateClass([
|
|
84
|
-
state()
|
|
85
|
-
], TestStamp.prototype, "stampContext", 2);
|
|
86
|
-
TestStamp = __decorateClass([
|
|
87
|
-
customElement("test-stamp")
|
|
88
|
-
], TestStamp);
|
|
89
|
-
|
|
90
|
-
export {
|
|
91
|
-
TestStamp
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=chunk-GAHXUFMQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/qti-test/components/test-stamp.ts"],"sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { prepareTemplate } from '@heximal/templates';\nimport { consume } from '@lit/context';\n\nimport { computedContext } from '../../exports/computed.context';\n\nimport type { View } from '../core/mixins/test-view.mixin';\nimport type { PropertyValues } from 'lit';\nimport type { ComputedContext } from '../../exports/computed.context';\nimport type { TemplateFunction } from '@heximal/templates';\n\n/**\n * A custom web component that renders a test stamp using the Lit framework.\n * This component is deprecated and will be removed in the future.\n * @customElement\n * @extends {LitElement}\n */\n@customElement('test-stamp')\nexport class TestStamp extends LitElement {\n /**\n * Indicates whether the component is in debug mode.\n * When set to `true`, the available objects and properties (i.e.: stampContext) is displayed.\n */\n @property({ type: Boolean, reflect: true })\n public debug = false;\n\n @state()\n @consume({ context: computedContext, subscribe: true })\n private computedContext: ComputedContext;\n\n @state()\n private stampContext: {\n view?: View;\n test?: unknown;\n activeTestpart?: unknown;\n activeSection?: unknown;\n activeItem?: unknown;\n } = {\n view: 'candidate',\n activeItem: {},\n activeSection: {\n items: []\n },\n activeTestpart: {\n items: [],\n sections: []\n },\n test: {}\n };\n\n myTemplate: TemplateFunction;\n\n protected createRenderRoot(): HTMLElement | DocumentFragment {\n return this;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n const templateElement = this.querySelector<HTMLTemplateElement>('template');\n if (!templateElement) {\n this.myTemplate = null;\n return;\n }\n this.myTemplate = prepareTemplate(templateElement);\n }\n\n protected willUpdate(_changedProperties: PropertyValues): void {\n if (!this.computedContext) {\n return;\n }\n const activeTestPart = this.computedContext.testParts.find(testPart => testPart.active);\n const activeSection = activeTestPart?.sections.find(section => section.active);\n const activeItem = activeSection?.items.find(item => item.active);\n const { variables, ...augmentedItem } = activeItem || {};\n\n if (!activeTestPart || !activeSection || !activeItem) {\n return;\n }\n\n const augmentedTestPart = {\n ...activeTestPart,\n items: activeTestPart.sections.flatMap(section => section.items.map(({ variables, ...rest }) => rest)),\n sections: activeTestPart.sections.map(section => ({\n ...section,\n items: section.items.map(({ variables, ...rest }) => rest)\n }))\n };\n\n const augmentedSection = { ...activeSection, items: activeSection.items.map(({ variables, ...rest }) => rest) };\n const { testParts, ...activeTest } = this.computedContext;\n\n this.stampContext = {\n view: this.computedContext.view,\n activeItem: augmentedItem,\n activeSection: augmentedSection,\n activeTestpart: augmentedTestPart,\n test: activeTest\n };\n }\n\n render() {\n // if (!this.stampContext) return nothing;\n return html` ${this.debug ? html`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing}\n ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'test-stamp': TestStamp;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,MAAM,YAAY,eAAe;AAC1C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,uBAAuB;AAChC,SAAS,eAAe;AAgBjB,IAAM,YAAN,cAAwB,WAAW;AAAA,EAAnC;AAAA;AAML,SAAO,QAAQ;AAOf,SAAQ,eAMJ;AAAA,MACF,MAAM;AAAA,MACN,YAAY,CAAC;AAAA,MACb,eAAe;AAAA,QACb,OAAO,CAAC;AAAA,MACV;AAAA,MACA,gBAAgB;AAAA,QACd,OAAO,CAAC;AAAA,QACR,UAAU,CAAC;AAAA,MACb;AAAA,MACA,MAAM,CAAC;AAAA,IACT;AAAA;AAAA,EAIU,mBAAmD;AAC3D,WAAO;AAAA,EACT;AAAA,EAEA,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,UAAM,kBAAkB,KAAK,cAAmC,UAAU;AAC1E,QAAI,CAAC,iBAAiB;AACpB,WAAK,aAAa;AAClB;AAAA,IACF;AACA,SAAK,aAAa,gBAAgB,eAAe;AAAA,EACnD;AAAA,EAEU,WAAW,oBAA0C;AAC7D,QAAI,CAAC,KAAK,iBAAiB;AACzB;AAAA,IACF;AACA,UAAM,iBAAiB,KAAK,gBAAgB,UAAU,KAAK,cAAY,SAAS,MAAM;AACtF,UAAM,gBAAgB,gBAAgB,SAAS,KAAK,aAAW,QAAQ,MAAM;AAC7E,UAAM,aAAa,eAAe,MAAM,KAAK,UAAQ,KAAK,MAAM;AAChE,UAAM,EAAE,WAAW,GAAG,cAAc,IAAI,cAAc,CAAC;AAEvD,QAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,YAAY;AACpD;AAAA,IACF;AAEA,UAAM,oBAAoB;AAAA,MACxB,GAAG;AAAA,MACH,OAAO,eAAe,SAAS,QAAQ,aAAW,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI,CAAC;AAAA,MACrG,UAAU,eAAe,SAAS,IAAI,cAAY;AAAA,QAChD,GAAG;AAAA,QACH,OAAO,QAAQ,MAAM,IAAI,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI;AAAA,MAC3D,EAAE;AAAA,IACJ;AAEA,UAAM,mBAAmB,EAAE,GAAG,eAAe,OAAO,cAAc,MAAM,IAAI,CAAC,EAAE,WAAAA,YAAW,GAAG,KAAK,MAAM,IAAI,EAAE;AAC9G,UAAM,EAAE,WAAW,GAAG,WAAW,IAAI,KAAK;AAE1C,SAAK,eAAe;AAAA,MAClB,MAAM,KAAK,gBAAgB;AAAA,MAC3B,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,gBAAgB;AAAA,MAChB,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,SAAS;AAEP,WAAO,QAAQ,KAAK,QAAQ,mBAAmB,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC,CAAC,mBAAmB,OAAO;AAAA,MACjH,KAAK,aAAa,KAAK,WAAW,KAAK,YAAY,IAAI,OAAO;AAAA,EAClE;AACF;AAjFS;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAL/B,UAMJ;AAIC;AAAA,EAFP,MAAM;AAAA,EACN,QAAQ,EAAE,SAAS,iBAAiB,WAAW,KAAK,CAAC;AAAA,GAT3C,UAUH;AAGA;AAAA,EADP,MAAM;AAAA,GAZI,UAaH;AAbG,YAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":["variables"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
-
if (decorator = decorators[i])
|
|
7
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
-
if (kind && result) __defProp(target, key, result);
|
|
9
|
-
return result;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
__decorateClass
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=chunk-H2JE6IVU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/exports/qti.context.ts"],"sourcesContent":["import { createContext } from '@lit/context';\n\nexport type QtiContextType = {\n testIdentifier: string;\n candidateIdentifier: string;\n environmentIdentifier: string;\n [key: string]: string | string[]; // Allow for additional context variables\n};\n\nexport interface QtiContext {\n QTI_CONTEXT: QtiContextType;\n}\n\nexport const qtiContext = createContext<Readonly<QtiContext>>(Symbol('qtiContext'));\n"],"mappings":";AAAA,SAAS,qBAAqB;AAavB,IAAM,aAAa,cAAoC,OAAO,YAAY,CAAC;","names":[]}
|