@citolab/qti-components 7.3.23 → 7.4.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/index.global.js +1 -1
- package/cdn/index.js +5485 -1
- package/custom-elements.json +29837 -0
- package/dist/chunks/chunk-4BDOB6KY.js +365 -0
- package/dist/chunks/chunk-4BDOB6KY.js.map +1 -0
- package/dist/chunks/{chunk-LF6SO3JU.js → chunk-7RW7LCEJ.js} +459 -587
- package/dist/chunks/chunk-7RW7LCEJ.js.map +1 -0
- package/dist/chunks/chunk-APBAIN6D.js +2237 -0
- package/dist/chunks/chunk-APBAIN6D.js.map +1 -0
- package/dist/chunks/{chunk-22IRJWWY.js → chunk-C5RLRG3L.js} +1 -1
- package/dist/chunks/chunk-C5RLRG3L.js.map +1 -0
- package/dist/chunks/{chunk-AZIKAG7K.js → chunk-DVQQ7I6Y.js} +1 -1
- package/dist/chunks/chunk-DVQQ7I6Y.js.map +1 -0
- package/dist/chunks/{chunk-QCB6P7DH.js → chunk-GAAFN7QF.js} +1 -1
- package/dist/chunks/{chunk-QCB6P7DH.js.map → chunk-GAAFN7QF.js.map} +1 -1
- package/dist/chunks/chunk-K47QFOQX.js +175 -0
- package/dist/chunks/chunk-K47QFOQX.js.map +1 -0
- package/dist/chunks/{chunk-FL72PF4D.js → chunk-SV4K25ZI.js} +2 -2
- package/dist/custom-elements.json +29837 -0
- package/dist/exports/computed-item.context.d.ts +1 -7
- package/dist/exports/computed.context.d.ts +2 -10
- package/dist/exports/computed.context.js +1 -1
- package/dist/exports/interaction.d.ts +45 -7
- package/dist/exports/item.context.d.ts +10 -7
- package/dist/exports/qti-assessment-item.context.d.ts +2 -7
- package/dist/exports/qti-condition-expression.d.ts +4 -5
- package/dist/exports/qti-condition-expression.js +2 -2
- package/dist/exports/qti-expression.d.ts +22 -7
- package/dist/exports/qti-expression.js +1 -1
- package/dist/exports/qti-test.d.ts +10 -38
- package/dist/exports/session.context.d.ts +2 -13
- package/dist/exports/session.context.js +1 -1
- package/dist/exports/test.context.d.ts +2 -7
- package/dist/exports/variables.d.ts +1 -7
- package/dist/index.d.ts +12 -31
- package/dist/index.js +38 -95
- package/{cdn/chunks/chunk-5TDBMEY5.js → dist/item.css} +7 -24
- package/dist/qti-assessment-item-l-mN3teH.d.ts +105 -0
- package/dist/qti-components/index.d.ts +1173 -16
- package/dist/qti-components/index.js +6 -5
- package/dist/qti-components-jsx.d.ts +4463 -0
- package/dist/qti-item/index.d.ts +114 -0
- package/dist/qti-item/index.js +19 -0
- package/dist/qti-loader/index.d.ts +2 -5
- package/dist/qti-loader/index.js +24 -4
- package/dist/qti-loader/index.js.map +1 -1
- package/dist/qti-modal-feedback-PKbhO-3w.d.ts +30 -0
- package/dist/qti-test/index.d.ts +480 -0
- package/dist/qti-test/index.js +69 -0
- package/dist/{qti-test-feedback-CZsbp6z4.d.ts → qti-test-BwvOhz_-.d.ts} +45 -18
- package/dist/variables-BCkyLoXK.d.ts +55 -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.map +0 -1
- package/dist/chunks/chunk-36G5MQKR.js +0 -85
- package/dist/chunks/chunk-36G5MQKR.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.map +0 -1
- package/dist/chunks/chunk-BLBSZDQ4.js +0 -52
- package/dist/chunks/chunk-BLBSZDQ4.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-EMVOKXSA.js +0 -84
- package/dist/chunks/chunk-EMVOKXSA.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-GAHXUFMQ.js +0 -93
- package/dist/chunks/chunk-GAHXUFMQ.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-ODHS7HDB.js +0 -94
- package/dist/chunks/chunk-ODHS7HDB.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/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/chunks/{chunk-FL72PF4D.js.map → chunk-SV4K25ZI.js.map} +0 -0
- /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,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
QtiFeedback,
|
|
3
|
+
convertNumberToUniversalFormat,
|
|
4
|
+
removeDoubleSlashes
|
|
5
|
+
} from "./chunk-K47QFOQX.js";
|
|
4
6
|
import {
|
|
5
7
|
watch
|
|
6
8
|
} from "./chunk-ELDMXTUQ.js";
|
|
@@ -9,10 +11,10 @@ import {
|
|
|
9
11
|
} from "./chunk-WFUXZ4UT.js";
|
|
10
12
|
import {
|
|
11
13
|
QtiConditionExpression
|
|
12
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SV4K25ZI.js";
|
|
13
15
|
import {
|
|
14
16
|
QtiExpression
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GAAFN7QF.js";
|
|
16
18
|
import {
|
|
17
19
|
testContext
|
|
18
20
|
} from "./chunk-CJADUWEC.js";
|
|
@@ -36,6 +38,41 @@ import {
|
|
|
36
38
|
import { provide } from "@lit/context";
|
|
37
39
|
import { LitElement, html } from "lit";
|
|
38
40
|
import { customElement, property } from "lit/decorators.js";
|
|
41
|
+
|
|
42
|
+
// src/lib/decorators/live-query.ts
|
|
43
|
+
function liveQuery(querySelector, _options) {
|
|
44
|
+
let observer;
|
|
45
|
+
return (proto, decoratedFnName) => {
|
|
46
|
+
const { connectedCallback, disconnectedCallback } = proto;
|
|
47
|
+
proto.connectedCallback = function() {
|
|
48
|
+
connectedCallback.call(this);
|
|
49
|
+
const callback = (mutationList) => {
|
|
50
|
+
const elementsToWatch = Array.from(this.querySelectorAll(querySelector)).concat(
|
|
51
|
+
Array.from(this.shadowRoot?.querySelectorAll(querySelector) || [])
|
|
52
|
+
);
|
|
53
|
+
for (const mutation of mutationList) {
|
|
54
|
+
const addedNodes = Array.from(mutation.addedNodes).map((e) => e);
|
|
55
|
+
const removedNodes = Array.from(mutation.addedNodes).map((e) => e);
|
|
56
|
+
if (mutation.type === "childList" && addedNodes.find((n) => elementsToWatch.includes(n))) {
|
|
57
|
+
this[decoratedFnName](addedNodes, removedNodes);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
observer = new MutationObserver(callback);
|
|
62
|
+
observer.observe(this, { childList: true, subtree: true });
|
|
63
|
+
const elementsAdded = Array.from(this.querySelectorAll(querySelector)).concat(
|
|
64
|
+
Array.from(this.shadowRoot?.querySelectorAll(querySelector) || [])
|
|
65
|
+
);
|
|
66
|
+
this[decoratedFnName](Array.from(elementsAdded), []);
|
|
67
|
+
};
|
|
68
|
+
proto.disconnectedCallback = function() {
|
|
69
|
+
disconnectedCallback.call(this);
|
|
70
|
+
observer.disconnect();
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// src/lib/qti-components/qti-assessment-item/qti-assessment-item.ts
|
|
39
76
|
var QtiAssessmentItem = class extends LitElement {
|
|
40
77
|
constructor() {
|
|
41
78
|
super(...arguments);
|
|
@@ -555,80 +592,6 @@ QtiCustomOperator = __decorateClass([
|
|
|
555
592
|
// src/lib/qti-components/qti-feedback/qti-feedback-block/qti-feedback-block.ts
|
|
556
593
|
import { css, html as html3 } from "lit";
|
|
557
594
|
import { customElement as customElement5 } from "lit/decorators.js";
|
|
558
|
-
|
|
559
|
-
// src/lib/qti-components/qti-feedback/qti-feedback.ts
|
|
560
|
-
import { consume as consume2 } from "@lit/context";
|
|
561
|
-
import { LitElement as LitElement5 } from "lit";
|
|
562
|
-
import { property as property3, state as state2 } from "lit/decorators.js";
|
|
563
|
-
|
|
564
|
-
// src/lib/qti-components/internal/utils.ts
|
|
565
|
-
var decimalSeparator = () => {
|
|
566
|
-
return new Intl.NumberFormat().format(0.1).replace(/\d/g, "");
|
|
567
|
-
};
|
|
568
|
-
var convertNumberToUniversalFormat = (number) => {
|
|
569
|
-
if (typeof number === "string") {
|
|
570
|
-
return number;
|
|
571
|
-
}
|
|
572
|
-
const dSep = decimalSeparator();
|
|
573
|
-
if (dSep === ".") {
|
|
574
|
-
return number.toLocaleString();
|
|
575
|
-
} else {
|
|
576
|
-
return number.toString().replace(".", "").replace(dSep, ".");
|
|
577
|
-
}
|
|
578
|
-
};
|
|
579
|
-
function IsNullOrUndefined(value) {
|
|
580
|
-
return value === null || value === void 0;
|
|
581
|
-
}
|
|
582
|
-
function removeDoubleSlashes(str) {
|
|
583
|
-
const singleForwardSlashes = str.replace(/([^:]\/)\/+/g, "$1").replace(/\/\//g, "/").replace("http:/", "http://").replace("https:/", "https://");
|
|
584
|
-
return singleForwardSlashes;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
// src/lib/qti-components/qti-feedback/qti-feedback.ts
|
|
588
|
-
var QtiFeedback = class extends LitElement5 {
|
|
589
|
-
connectedCallback() {
|
|
590
|
-
super.connectedCallback();
|
|
591
|
-
this.dispatchEvent(
|
|
592
|
-
new CustomEvent("qti-register-feedback", {
|
|
593
|
-
bubbles: true,
|
|
594
|
-
composed: true,
|
|
595
|
-
detail: this
|
|
596
|
-
})
|
|
597
|
-
);
|
|
598
|
-
}
|
|
599
|
-
checkShowFeedback(outcomeIdentifier) {
|
|
600
|
-
const outcomeVariable = this._context.variables.find((v) => v.identifier === outcomeIdentifier) || null;
|
|
601
|
-
if (this.outcomeIdentifier !== outcomeIdentifier || !outcomeVariable) return;
|
|
602
|
-
let isFound = false;
|
|
603
|
-
if (Array.isArray(outcomeVariable.value)) {
|
|
604
|
-
isFound = outcomeVariable.value.includes(this.identifier);
|
|
605
|
-
} else {
|
|
606
|
-
isFound = !IsNullOrUndefined(this.identifier) && !IsNullOrUndefined(outcomeVariable?.value) && this.identifier === outcomeVariable.value || false;
|
|
607
|
-
}
|
|
608
|
-
this.showFeedback(isFound);
|
|
609
|
-
}
|
|
610
|
-
showFeedback(value) {
|
|
611
|
-
this.showStatus = value && this.showHide === "show" || !value && this.showHide === "hide" ? "on" : "off";
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
__decorateClass([
|
|
615
|
-
property3({ type: String, attribute: "show-hide" })
|
|
616
|
-
], QtiFeedback.prototype, "showHide", 2);
|
|
617
|
-
__decorateClass([
|
|
618
|
-
property3({ type: String, attribute: "outcome-identifier" })
|
|
619
|
-
], QtiFeedback.prototype, "outcomeIdentifier", 2);
|
|
620
|
-
__decorateClass([
|
|
621
|
-
property3({ type: String })
|
|
622
|
-
], QtiFeedback.prototype, "identifier", 2);
|
|
623
|
-
__decorateClass([
|
|
624
|
-
property3({ type: String, attribute: false })
|
|
625
|
-
], QtiFeedback.prototype, "showStatus", 2);
|
|
626
|
-
__decorateClass([
|
|
627
|
-
consume2({ context: itemContext, subscribe: true }),
|
|
628
|
-
state2()
|
|
629
|
-
], QtiFeedback.prototype, "_context", 2);
|
|
630
|
-
|
|
631
|
-
// src/lib/qti-components/qti-feedback/qti-feedback-block/qti-feedback-block.ts
|
|
632
595
|
var QtiFeedbackBlock = class extends QtiFeedback {
|
|
633
596
|
render() {
|
|
634
597
|
return html3` <slot part="feedback" class="feedback ${this.showStatus}"></slot> `;
|
|
@@ -679,97 +642,10 @@ QtiFeedbackInline = __decorateClass([
|
|
|
679
642
|
customElement6("qti-feedback-inline")
|
|
680
643
|
], QtiFeedbackInline);
|
|
681
644
|
|
|
682
|
-
// src/lib/qti-components/qti-feedback/qti-modal-feedback/qti-modal-feedback.ts
|
|
683
|
-
import { css as css3, html as html5 } from "lit";
|
|
684
|
-
import { customElement as customElement7 } from "lit/decorators.js";
|
|
685
|
-
var QtiModalFeedback = class extends QtiFeedback {
|
|
686
|
-
render() {
|
|
687
|
-
return html5`
|
|
688
|
-
<dialog class="qti-dialog" part="feedback" ?open="${this.showStatus === "on"}">
|
|
689
|
-
<slot></slot>
|
|
690
|
-
<div style="margin-top: var(--qti-gap-size); text-align: center;">
|
|
691
|
-
<button class="button close-button" @click="${this.closeFeedback}">Close</button>
|
|
692
|
-
</div>
|
|
693
|
-
</dialog>
|
|
694
|
-
`;
|
|
695
|
-
}
|
|
696
|
-
openFeedback() {
|
|
697
|
-
const dialog = this.shadowRoot?.querySelector("dialog");
|
|
698
|
-
if (dialog && !dialog.open) {
|
|
699
|
-
dialog.showModal();
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
closeFeedback() {
|
|
703
|
-
const dialog = this.shadowRoot?.querySelector("dialog");
|
|
704
|
-
if (dialog && dialog.open) {
|
|
705
|
-
dialog.close();
|
|
706
|
-
this.showStatus = "off";
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
connectedCallback() {
|
|
710
|
-
super.connectedCallback();
|
|
711
|
-
if (this.showStatus === "on") {
|
|
712
|
-
this.openFeedback();
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
updated(changedProperties) {
|
|
716
|
-
if (changedProperties.has("showStatus")) {
|
|
717
|
-
if (this.showStatus === "on") {
|
|
718
|
-
this.openFeedback();
|
|
719
|
-
} else {
|
|
720
|
-
this.closeFeedback();
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
};
|
|
725
|
-
QtiModalFeedback.styles = css3`
|
|
726
|
-
.qti-dialog {
|
|
727
|
-
background: var(--qti-bg);
|
|
728
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
729
|
-
border-radius: var(--qti-border-radius);
|
|
730
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
731
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
732
|
-
position: fixed;
|
|
733
|
-
top: 50%;
|
|
734
|
-
left: 50%;
|
|
735
|
-
transform: translate(-50%, -50%);
|
|
736
|
-
z-index: 1000;
|
|
737
|
-
width: auto;
|
|
738
|
-
max-width: 90%;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
.button {
|
|
742
|
-
border-radius: var(--qti-border-radius);
|
|
743
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
744
|
-
background-color: var(--qti-bg-active);
|
|
745
|
-
border: var(--qti-border-active);
|
|
746
|
-
cursor: pointer;
|
|
747
|
-
position: relative;
|
|
748
|
-
display: inline-block;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
.button:hover {
|
|
752
|
-
background-color: var(--qti-hover-bg);
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
.button:disabled {
|
|
756
|
-
background-color: var(--qti-disabled-bg);
|
|
757
|
-
color: var(--qti-disabled-color);
|
|
758
|
-
cursor: not-allowed;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.button:focus {
|
|
762
|
-
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
763
|
-
}
|
|
764
|
-
`;
|
|
765
|
-
QtiModalFeedback = __decorateClass([
|
|
766
|
-
customElement7("qti-modal-feedback")
|
|
767
|
-
], QtiModalFeedback);
|
|
768
|
-
|
|
769
645
|
// src/lib/qti-components/qti-interaction/qti-associable-hotspot.ts
|
|
770
|
-
import { LitElement as
|
|
771
|
-
import { customElement as
|
|
772
|
-
var QtiAssociableHotspot = class extends
|
|
646
|
+
import { LitElement as LitElement5, css as css3, html as html5 } from "lit";
|
|
647
|
+
import { customElement as customElement7 } from "lit/decorators.js";
|
|
648
|
+
var QtiAssociableHotspot = class extends LitElement5 {
|
|
773
649
|
connectedCallback() {
|
|
774
650
|
super.connectedCallback();
|
|
775
651
|
this.dispatchEvent(
|
|
@@ -781,10 +657,10 @@ var QtiAssociableHotspot = class extends LitElement6 {
|
|
|
781
657
|
);
|
|
782
658
|
}
|
|
783
659
|
render() {
|
|
784
|
-
return
|
|
660
|
+
return html5` <slot name="drags"></slot> `;
|
|
785
661
|
}
|
|
786
662
|
};
|
|
787
|
-
QtiAssociableHotspot.styles =
|
|
663
|
+
QtiAssociableHotspot.styles = css3`
|
|
788
664
|
:host {
|
|
789
665
|
display: flex;
|
|
790
666
|
user-select: none;
|
|
@@ -792,15 +668,15 @@ QtiAssociableHotspot.styles = css4`
|
|
|
792
668
|
}
|
|
793
669
|
`;
|
|
794
670
|
QtiAssociableHotspot = __decorateClass([
|
|
795
|
-
|
|
671
|
+
customElement7("qti-associable-hotspot")
|
|
796
672
|
], QtiAssociableHotspot);
|
|
797
673
|
|
|
798
674
|
// src/lib/qti-components/qti-interaction/qti-associate-interaction/qti-associate-interaction.ts
|
|
799
|
-
import { html as
|
|
800
|
-
import { customElement as
|
|
675
|
+
import { html as html6 } from "lit";
|
|
676
|
+
import { customElement as customElement8, state as state2 } from "lit/decorators.js";
|
|
801
677
|
|
|
802
678
|
// src/lib/qti-components/qti-interaction/internal/drag-drop/drag-drop-interaction-mixin.ts
|
|
803
|
-
import { property as
|
|
679
|
+
import { property as property3 } from "lit/decorators.js";
|
|
804
680
|
|
|
805
681
|
// src/lib/qti-components/qti-interaction/internal/drag-drop/flippables-mixin.ts
|
|
806
682
|
var FlippablesMixin = (superClass, _droppablesSel, _draggablesSel) => {
|
|
@@ -1575,13 +1451,13 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
|
|
|
1575
1451
|
}
|
|
1576
1452
|
}
|
|
1577
1453
|
__decorateClass([
|
|
1578
|
-
|
|
1454
|
+
property3({ attribute: false, type: Object })
|
|
1579
1455
|
], DragDropInteractionElement.prototype, "configuration", 2);
|
|
1580
1456
|
__decorateClass([
|
|
1581
|
-
|
|
1457
|
+
property3({ type: Number, reflect: true, attribute: "min-associations" })
|
|
1582
1458
|
], DragDropInteractionElement.prototype, "minAssociations", 2);
|
|
1583
1459
|
__decorateClass([
|
|
1584
|
-
|
|
1460
|
+
property3({ type: Number, reflect: true, attribute: "max-associations" })
|
|
1585
1461
|
], DragDropInteractionElement.prototype, "maxAssociations", 2);
|
|
1586
1462
|
__decorateClass([
|
|
1587
1463
|
liveQuery(dragContainersSelector)
|
|
@@ -1596,8 +1472,8 @@ var DragDropInteractionMixin = (superClass, draggablesSelector, droppablesSelect
|
|
|
1596
1472
|
};
|
|
1597
1473
|
|
|
1598
1474
|
// src/lib/qti-components/qti-interaction/qti-associate-interaction/qti-associate-interaction.styles.ts
|
|
1599
|
-
import { css as
|
|
1600
|
-
var qti_associate_interaction_styles_default =
|
|
1475
|
+
import { css as css4 } from "lit";
|
|
1476
|
+
var qti_associate_interaction_styles_default = css4`
|
|
1601
1477
|
:host {
|
|
1602
1478
|
display: block; /* necessary to calculate scaling position */
|
|
1603
1479
|
}
|
|
@@ -1642,11 +1518,11 @@ var QtiAssociateInteraction = class extends DragDropInteractionMixin(
|
|
|
1642
1518
|
this._childrenMap.push(choice);
|
|
1643
1519
|
}
|
|
1644
1520
|
render() {
|
|
1645
|
-
return
|
|
1521
|
+
return html6` <slot name="prompt"></slot>
|
|
1646
1522
|
<slot name="qti-simple-associable-choice"></slot>
|
|
1647
1523
|
<div part="drop-container">
|
|
1648
1524
|
${this._childrenMap.length > 0 && Array.from(Array(Math.ceil(this._childrenMap.length / 2)).keys()).map(
|
|
1649
|
-
(_, index) =>
|
|
1525
|
+
(_, index) => html6`<div part="associables-container">
|
|
1650
1526
|
<div name="left${index}" part="drop-list" class="dl" identifier="droplist${index}_left"></div>
|
|
1651
1527
|
<div name="right${index}" part="drop-list" class="dl" identifier="droplist${index}_right"></div>
|
|
1652
1528
|
</div>`
|
|
@@ -1662,19 +1538,19 @@ var QtiAssociateInteraction = class extends DragDropInteractionMixin(
|
|
|
1662
1538
|
};
|
|
1663
1539
|
QtiAssociateInteraction.styles = qti_associate_interaction_styles_default;
|
|
1664
1540
|
__decorateClass([
|
|
1665
|
-
|
|
1541
|
+
state2()
|
|
1666
1542
|
], QtiAssociateInteraction.prototype, "_childrenMap", 2);
|
|
1667
1543
|
QtiAssociateInteraction = __decorateClass([
|
|
1668
|
-
|
|
1544
|
+
customElement8("qti-associate-interaction")
|
|
1669
1545
|
], QtiAssociateInteraction);
|
|
1670
1546
|
|
|
1671
1547
|
// src/lib/qti-components/qti-interaction/qti-choice-interaction/qti-choice-interaction.ts
|
|
1672
|
-
import { html as
|
|
1673
|
-
import { customElement as
|
|
1548
|
+
import { html as html7 } from "lit";
|
|
1549
|
+
import { customElement as customElement9, property as property6 } from "lit/decorators.js";
|
|
1674
1550
|
|
|
1675
1551
|
// src/lib/qti-components/qti-interaction/internal/choices/choices.mixin.ts
|
|
1676
|
-
import { property as
|
|
1677
|
-
import { consume as
|
|
1552
|
+
import { property as property4, query, state as state3 } from "lit/decorators.js";
|
|
1553
|
+
import { consume as consume2 } from "@lit/context";
|
|
1678
1554
|
var ChoicesMixin = (superClass, selector) => {
|
|
1679
1555
|
class ChoicesMixinElement extends superClass {
|
|
1680
1556
|
constructor() {
|
|
@@ -1884,10 +1760,10 @@ var ChoicesMixin = (superClass, selector) => {
|
|
|
1884
1760
|
query("#validation-message")
|
|
1885
1761
|
], ChoicesMixinElement.prototype, "_validationMessageElement", 2);
|
|
1886
1762
|
__decorateClass([
|
|
1887
|
-
|
|
1763
|
+
property4({ type: Number, attribute: "min-choices" })
|
|
1888
1764
|
], ChoicesMixinElement.prototype, "minChoices", 2);
|
|
1889
1765
|
__decorateClass([
|
|
1890
|
-
|
|
1766
|
+
property4({ type: Number, attribute: "max-choices" })
|
|
1891
1767
|
], ChoicesMixinElement.prototype, "maxChoices", 2);
|
|
1892
1768
|
__decorateClass([
|
|
1893
1769
|
watch("maxChoices", { waitUntilFirstUpdate: true })
|
|
@@ -1899,20 +1775,20 @@ var ChoicesMixin = (superClass, selector) => {
|
|
|
1899
1775
|
watch("readonly", { waitUntilFirstUpdate: true })
|
|
1900
1776
|
], ChoicesMixinElement.prototype, "_handleReadonlyChange", 2);
|
|
1901
1777
|
__decorateClass([
|
|
1902
|
-
|
|
1778
|
+
state3()
|
|
1903
1779
|
], ChoicesMixinElement.prototype, "response", 2);
|
|
1904
1780
|
__decorateClass([
|
|
1905
1781
|
watch("response", { waitUntilFirstUpdate: true })
|
|
1906
1782
|
], ChoicesMixinElement.prototype, "_handleValueChange", 2);
|
|
1907
1783
|
__decorateClass([
|
|
1908
|
-
|
|
1909
|
-
|
|
1784
|
+
state3(),
|
|
1785
|
+
consume2({ context: configContext, subscribe: true })
|
|
1910
1786
|
], ChoicesMixinElement.prototype, "_configContext", 2);
|
|
1911
1787
|
return ChoicesMixinElement;
|
|
1912
1788
|
};
|
|
1913
1789
|
|
|
1914
1790
|
// src/lib/qti-components/qti-interaction/internal/vocabulary/vocabulary-mixin.ts
|
|
1915
|
-
import { property as
|
|
1791
|
+
import { property as property5 } from "lit/decorators.js";
|
|
1916
1792
|
var VocabularyMixin = (superClass, _selector) => {
|
|
1917
1793
|
class VocabularyElement extends superClass {
|
|
1918
1794
|
constructor() {
|
|
@@ -1979,7 +1855,7 @@ var VocabularyMixin = (superClass, _selector) => {
|
|
|
1979
1855
|
}
|
|
1980
1856
|
}
|
|
1981
1857
|
__decorateClass([
|
|
1982
|
-
|
|
1858
|
+
property5({
|
|
1983
1859
|
type: String,
|
|
1984
1860
|
reflect: true
|
|
1985
1861
|
})
|
|
@@ -1988,8 +1864,8 @@ var VocabularyMixin = (superClass, _selector) => {
|
|
|
1988
1864
|
};
|
|
1989
1865
|
|
|
1990
1866
|
// src/lib/qti-components/qti-interaction/qti-choice-interaction/qti-choice-interaction.styles.ts
|
|
1991
|
-
import { css as
|
|
1992
|
-
var qti_choice_interaction_styles_default =
|
|
1867
|
+
import { css as css5 } from "lit";
|
|
1868
|
+
var qti_choice_interaction_styles_default = css5`
|
|
1993
1869
|
:host {
|
|
1994
1870
|
display: block;
|
|
1995
1871
|
}
|
|
@@ -2072,7 +1948,7 @@ var QtiChoiceInteraction = class extends VocabularyMixin(ChoicesMixin(Interactio
|
|
|
2072
1948
|
this.style.setProperty("--item-count", choices.length.toString());
|
|
2073
1949
|
}
|
|
2074
1950
|
render() {
|
|
2075
|
-
return
|
|
1951
|
+
return html7`
|
|
2076
1952
|
<slot part="prompt" name="prompt"></slot>
|
|
2077
1953
|
<slot part="slot" @slotchange=${this._handleSlotChange}></slot>
|
|
2078
1954
|
<div part="message" role="alert" id="validation-message"></div>
|
|
@@ -2081,15 +1957,15 @@ var QtiChoiceInteraction = class extends VocabularyMixin(ChoicesMixin(Interactio
|
|
|
2081
1957
|
};
|
|
2082
1958
|
QtiChoiceInteraction.styles = qti_choice_interaction_styles_default;
|
|
2083
1959
|
__decorateClass([
|
|
2084
|
-
|
|
1960
|
+
property6({ type: String })
|
|
2085
1961
|
], QtiChoiceInteraction.prototype, "orientation", 2);
|
|
2086
1962
|
QtiChoiceInteraction = __decorateClass([
|
|
2087
|
-
|
|
1963
|
+
customElement9("qti-choice-interaction")
|
|
2088
1964
|
], QtiChoiceInteraction);
|
|
2089
1965
|
|
|
2090
1966
|
// src/lib/qti-components/qti-interaction/qti-custom-interaction/qti-custom-interaction.ts
|
|
2091
|
-
import { html as
|
|
2092
|
-
import { customElement as
|
|
1967
|
+
import { html as html8 } from "lit";
|
|
1968
|
+
import { customElement as customElement10, property as property7, state as state4 } from "lit/decorators.js";
|
|
2093
1969
|
var QtiCustomInteraction = class extends Interaction {
|
|
2094
1970
|
constructor() {
|
|
2095
1971
|
super();
|
|
@@ -2265,7 +2141,7 @@ var QtiCustomInteraction = class extends Interaction {
|
|
|
2265
2141
|
super.disconnectedCallback();
|
|
2266
2142
|
}
|
|
2267
2143
|
render() {
|
|
2268
|
-
return
|
|
2144
|
+
return html8`<iframe
|
|
2269
2145
|
width=${this.getAttribute("width")}
|
|
2270
2146
|
height=${this.getAttribute("height")}
|
|
2271
2147
|
frameborder="0"
|
|
@@ -2273,35 +2149,35 @@ var QtiCustomInteraction = class extends Interaction {
|
|
|
2273
2149
|
id="pciContainer"
|
|
2274
2150
|
>
|
|
2275
2151
|
</iframe>
|
|
2276
|
-
${this._errorMessage &&
|
|
2152
|
+
${this._errorMessage && html8`<div style="color:red">
|
|
2277
2153
|
<h1>Error</h1>
|
|
2278
2154
|
${this._errorMessage}
|
|
2279
2155
|
</div>`}`;
|
|
2280
2156
|
}
|
|
2281
2157
|
};
|
|
2282
2158
|
__decorateClass([
|
|
2283
|
-
|
|
2159
|
+
property7({ type: String, attribute: "data" })
|
|
2284
2160
|
], QtiCustomInteraction.prototype, "data", 2);
|
|
2285
2161
|
__decorateClass([
|
|
2286
|
-
|
|
2162
|
+
property7({ type: String, attribute: "data-base-item" })
|
|
2287
2163
|
], QtiCustomInteraction.prototype, "baseItemUrl", 2);
|
|
2288
2164
|
__decorateClass([
|
|
2289
|
-
|
|
2165
|
+
property7({ type: String, attribute: "data-base-ref" })
|
|
2290
2166
|
], QtiCustomInteraction.prototype, "baseRefUrl", 2);
|
|
2291
2167
|
__decorateClass([
|
|
2292
|
-
|
|
2168
|
+
property7({ type: String, attribute: "id" })
|
|
2293
2169
|
], QtiCustomInteraction.prototype, "id", 2);
|
|
2294
2170
|
__decorateClass([
|
|
2295
|
-
|
|
2171
|
+
state4()
|
|
2296
2172
|
], QtiCustomInteraction.prototype, "_errorMessage", 2);
|
|
2297
2173
|
QtiCustomInteraction = __decorateClass([
|
|
2298
|
-
|
|
2174
|
+
customElement10("qti-custom-interaction")
|
|
2299
2175
|
], QtiCustomInteraction);
|
|
2300
2176
|
|
|
2301
2177
|
// src/lib/qti-components/qti-interaction/qti-end-attempt-interaction/qti-end-attempt-interaction.ts
|
|
2302
|
-
import { html as
|
|
2303
|
-
import { customElement as
|
|
2304
|
-
var QtiEndAttemptInteraction = class extends
|
|
2178
|
+
import { html as html9, LitElement as LitElement6 } from "lit";
|
|
2179
|
+
import { customElement as customElement11, property as property8 } from "lit/decorators.js";
|
|
2180
|
+
var QtiEndAttemptInteraction = class extends LitElement6 {
|
|
2305
2181
|
constructor() {
|
|
2306
2182
|
super(...arguments);
|
|
2307
2183
|
this.disabled = false;
|
|
@@ -2309,7 +2185,7 @@ var QtiEndAttemptInteraction = class extends LitElement7 {
|
|
|
2309
2185
|
this.title = "end attempt";
|
|
2310
2186
|
}
|
|
2311
2187
|
render() {
|
|
2312
|
-
return
|
|
2188
|
+
return html9`<button ?disabled=${this.disabled} part="button" @click=${this.endAttempt}>${this.title}</button>`;
|
|
2313
2189
|
}
|
|
2314
2190
|
endAttempt(_) {
|
|
2315
2191
|
this.dispatchEvent(
|
|
@@ -2322,29 +2198,29 @@ var QtiEndAttemptInteraction = class extends LitElement7 {
|
|
|
2322
2198
|
}
|
|
2323
2199
|
};
|
|
2324
2200
|
__decorateClass([
|
|
2325
|
-
|
|
2201
|
+
property8({ type: String, attribute: "response-identifier" })
|
|
2326
2202
|
], QtiEndAttemptInteraction.prototype, "responseIdentifier", 2);
|
|
2327
2203
|
__decorateClass([
|
|
2328
|
-
|
|
2204
|
+
property8({ reflect: true, type: Boolean })
|
|
2329
2205
|
], QtiEndAttemptInteraction.prototype, "disabled", 2);
|
|
2330
2206
|
__decorateClass([
|
|
2331
|
-
|
|
2207
|
+
property8({ type: String, attribute: "count-attempt" })
|
|
2332
2208
|
], QtiEndAttemptInteraction.prototype, "countAttempt", 2);
|
|
2333
2209
|
__decorateClass([
|
|
2334
|
-
|
|
2210
|
+
property8({ type: String })
|
|
2335
2211
|
], QtiEndAttemptInteraction.prototype, "title", 2);
|
|
2336
2212
|
QtiEndAttemptInteraction = __decorateClass([
|
|
2337
|
-
|
|
2213
|
+
customElement11("qti-end-attempt-interaction")
|
|
2338
2214
|
], QtiEndAttemptInteraction);
|
|
2339
2215
|
|
|
2340
2216
|
// src/lib/qti-components/qti-interaction/qti-extended-text-interaction/qti-extended-text-interaction.ts
|
|
2341
|
-
import { html as
|
|
2217
|
+
import { html as html10 } from "lit";
|
|
2342
2218
|
import { ifDefined as ifDefined2 } from "lit/directives/if-defined.js";
|
|
2343
|
-
import { customElement as
|
|
2219
|
+
import { customElement as customElement12, property as property9, state as state5 } from "lit/decorators.js";
|
|
2344
2220
|
|
|
2345
2221
|
// src/lib/qti-components/qti-interaction/qti-extended-text-interaction/qti-extended-text-interaction.styles.ts
|
|
2346
|
-
import { css as
|
|
2347
|
-
var qti_extended_text_interaction_styles_default =
|
|
2222
|
+
import { css as css6 } from "lit";
|
|
2223
|
+
var qti_extended_text_interaction_styles_default = css6`
|
|
2348
2224
|
/* PK: display host as block, else design will be collapsed */
|
|
2349
2225
|
:host {
|
|
2350
2226
|
display: block;
|
|
@@ -2420,7 +2296,7 @@ var QtiExtendedTextInteraction = class extends Interaction {
|
|
|
2420
2296
|
return isValid;
|
|
2421
2297
|
}
|
|
2422
2298
|
render() {
|
|
2423
|
-
return
|
|
2299
|
+
return html10`<slot name="prompt"></slot
|
|
2424
2300
|
><textarea
|
|
2425
2301
|
part="textarea"
|
|
2426
2302
|
name="${this.responseIdentifier}"
|
|
@@ -2455,40 +2331,40 @@ var QtiExtendedTextInteraction = class extends Interaction {
|
|
|
2455
2331
|
};
|
|
2456
2332
|
QtiExtendedTextInteraction.styles = qti_extended_text_interaction_styles_default;
|
|
2457
2333
|
__decorateClass([
|
|
2458
|
-
|
|
2334
|
+
state5()
|
|
2459
2335
|
], QtiExtendedTextInteraction.prototype, "_rows", 2);
|
|
2460
2336
|
__decorateClass([
|
|
2461
|
-
|
|
2337
|
+
property9({ type: Number, attribute: "expected-length" })
|
|
2462
2338
|
], QtiExtendedTextInteraction.prototype, "expectedLength", 2);
|
|
2463
2339
|
__decorateClass([
|
|
2464
|
-
|
|
2340
|
+
property9({ type: String, attribute: "pattern-mask" })
|
|
2465
2341
|
], QtiExtendedTextInteraction.prototype, "patternMask", 2);
|
|
2466
2342
|
__decorateClass([
|
|
2467
|
-
|
|
2343
|
+
property9({ type: String, attribute: "placeholder-text" })
|
|
2468
2344
|
], QtiExtendedTextInteraction.prototype, "placeholderText", 2);
|
|
2469
2345
|
__decorateClass([
|
|
2470
|
-
|
|
2346
|
+
property9({ type: String, attribute: "data-patternmask-message" })
|
|
2471
2347
|
], QtiExtendedTextInteraction.prototype, "dataPatternmaskMessage", 2);
|
|
2472
2348
|
__decorateClass([
|
|
2473
|
-
|
|
2349
|
+
property9({ type: String, attribute: "class" })
|
|
2474
2350
|
], QtiExtendedTextInteraction.prototype, "classNames", 2);
|
|
2475
2351
|
__decorateClass([
|
|
2476
2352
|
watch("classNames")
|
|
2477
2353
|
], QtiExtendedTextInteraction.prototype, "handleclassNamesChange", 1);
|
|
2478
2354
|
__decorateClass([
|
|
2479
|
-
|
|
2355
|
+
state5()
|
|
2480
2356
|
], QtiExtendedTextInteraction.prototype, "response", 2);
|
|
2481
2357
|
__decorateClass([
|
|
2482
2358
|
watch("response", { waitUntilFirstUpdate: true })
|
|
2483
2359
|
], QtiExtendedTextInteraction.prototype, "_handleResponseChange", 2);
|
|
2484
2360
|
QtiExtendedTextInteraction = __decorateClass([
|
|
2485
|
-
|
|
2361
|
+
customElement12("qti-extended-text-interaction")
|
|
2486
2362
|
], QtiExtendedTextInteraction);
|
|
2487
2363
|
|
|
2488
2364
|
// src/lib/qti-components/qti-interaction/qti-gap-img.ts
|
|
2489
|
-
import { css as
|
|
2490
|
-
import { customElement as
|
|
2491
|
-
var QtiGapImg = class extends
|
|
2365
|
+
import { css as css7, LitElement as LitElement7 } from "lit";
|
|
2366
|
+
import { customElement as customElement13, property as property10 } from "lit/decorators.js";
|
|
2367
|
+
var QtiGapImg = class extends LitElement7 {
|
|
2492
2368
|
constructor() {
|
|
2493
2369
|
super(...arguments);
|
|
2494
2370
|
this.tabindex = 0;
|
|
@@ -2497,26 +2373,26 @@ var QtiGapImg = class extends LitElement8 {
|
|
|
2497
2373
|
this.setAttribute("slot", "drags");
|
|
2498
2374
|
}
|
|
2499
2375
|
};
|
|
2500
|
-
QtiGapImg.styles =
|
|
2376
|
+
QtiGapImg.styles = css7`
|
|
2501
2377
|
:host {
|
|
2502
2378
|
display: flex;
|
|
2503
2379
|
user-select: none;
|
|
2504
2380
|
}
|
|
2505
2381
|
`;
|
|
2506
2382
|
__decorateClass([
|
|
2507
|
-
|
|
2383
|
+
property10({ type: Number, reflect: true })
|
|
2508
2384
|
], QtiGapImg.prototype, "tabindex", 2);
|
|
2509
2385
|
QtiGapImg = __decorateClass([
|
|
2510
|
-
|
|
2386
|
+
customElement13("qti-gap-img")
|
|
2511
2387
|
], QtiGapImg);
|
|
2512
2388
|
|
|
2513
2389
|
// src/lib/qti-components/qti-interaction/qti-gap-match-interaction/qti-gap-match-interaction.ts
|
|
2514
|
-
import { html as
|
|
2515
|
-
import { customElement as
|
|
2390
|
+
import { html as html11 } from "lit";
|
|
2391
|
+
import { customElement as customElement14 } from "lit/decorators.js";
|
|
2516
2392
|
|
|
2517
2393
|
// src/lib/qti-components/qti-interaction/qti-gap-match-interaction/qti-gap-match-interaction.styles.ts
|
|
2518
|
-
import { css as
|
|
2519
|
-
var qti_gap_match_interaction_styles_default =
|
|
2394
|
+
import { css as css8 } from "lit";
|
|
2395
|
+
var qti_gap_match_interaction_styles_default = css8`
|
|
2520
2396
|
:host {
|
|
2521
2397
|
display: flex;
|
|
2522
2398
|
align-items: flex-start;
|
|
@@ -2560,7 +2436,7 @@ var QtiGapMatchInteraction = class extends DragDropInteractionMixin(
|
|
|
2560
2436
|
`slot[part='drags']`
|
|
2561
2437
|
) {
|
|
2562
2438
|
render() {
|
|
2563
|
-
return
|
|
2439
|
+
return html11`<slot name="prompt"> </slot>
|
|
2564
2440
|
<slot part="drags" name="drags"></slot>
|
|
2565
2441
|
<slot part="drops"></slot>
|
|
2566
2442
|
<div role="alert" part="message" id="validation-message"></div>`;
|
|
@@ -2606,16 +2482,16 @@ var QtiGapMatchInteraction = class extends DragDropInteractionMixin(
|
|
|
2606
2482
|
};
|
|
2607
2483
|
QtiGapMatchInteraction.styles = qti_gap_match_interaction_styles_default;
|
|
2608
2484
|
QtiGapMatchInteraction = __decorateClass([
|
|
2609
|
-
|
|
2485
|
+
customElement14("qti-gap-match-interaction")
|
|
2610
2486
|
], QtiGapMatchInteraction);
|
|
2611
2487
|
|
|
2612
2488
|
// src/lib/qti-components/qti-interaction/qti-gap-text.ts
|
|
2613
|
-
import { css as
|
|
2614
|
-
import { customElement as
|
|
2489
|
+
import { css as css9, html as html13, LitElement as LitElement8 } from "lit";
|
|
2490
|
+
import { customElement as customElement15, property as property12 } from "lit/decorators.js";
|
|
2615
2491
|
|
|
2616
2492
|
// src/lib/qti-components/qti-interaction/internal/active-element/active-element.mixin.ts
|
|
2617
|
-
import { html as
|
|
2618
|
-
import { property as
|
|
2493
|
+
import { html as html12 } from "lit";
|
|
2494
|
+
import { property as property11 } from "lit/decorators.js";
|
|
2619
2495
|
var ariaBooleanConverter = {
|
|
2620
2496
|
toAttribute: (value) => value ? "true" : "false",
|
|
2621
2497
|
fromAttribute: (value) => value === "true"
|
|
@@ -2681,17 +2557,17 @@ function ActiveElementMixin(Base, type) {
|
|
|
2681
2557
|
);
|
|
2682
2558
|
}
|
|
2683
2559
|
render() {
|
|
2684
|
-
return
|
|
2560
|
+
return html12`<slot></slot>`;
|
|
2685
2561
|
}
|
|
2686
2562
|
}
|
|
2687
2563
|
__decorateClass([
|
|
2688
|
-
|
|
2564
|
+
property11({ type: String })
|
|
2689
2565
|
], QtiChoice.prototype, "identifier", 2);
|
|
2690
2566
|
__decorateClass([
|
|
2691
|
-
|
|
2567
|
+
property11({ type: Number, reflect: true, attribute: "tabindex" })
|
|
2692
2568
|
], QtiChoice.prototype, "tabIndex", 2);
|
|
2693
2569
|
__decorateClass([
|
|
2694
|
-
|
|
2570
|
+
property11({
|
|
2695
2571
|
type: Boolean,
|
|
2696
2572
|
reflect: true,
|
|
2697
2573
|
attribute: "aria-disabled",
|
|
@@ -2699,7 +2575,7 @@ function ActiveElementMixin(Base, type) {
|
|
|
2699
2575
|
})
|
|
2700
2576
|
], QtiChoice.prototype, "disabled", 2);
|
|
2701
2577
|
__decorateClass([
|
|
2702
|
-
|
|
2578
|
+
property11({
|
|
2703
2579
|
type: Boolean,
|
|
2704
2580
|
reflect: true,
|
|
2705
2581
|
attribute: "aria-readonly",
|
|
@@ -2713,7 +2589,7 @@ function ActiveElementMixin(Base, type) {
|
|
|
2713
2589
|
}
|
|
2714
2590
|
|
|
2715
2591
|
// src/lib/qti-components/qti-interaction/qti-gap-text.ts
|
|
2716
|
-
var QtiGapText = class extends ActiveElementMixin(
|
|
2592
|
+
var QtiGapText = class extends ActiveElementMixin(LitElement8, "qti-gap-text") {
|
|
2717
2593
|
constructor() {
|
|
2718
2594
|
super(...arguments);
|
|
2719
2595
|
this.tabindex = 0;
|
|
@@ -2723,50 +2599,50 @@ var QtiGapText = class extends ActiveElementMixin(LitElement9, "qti-gap-text") {
|
|
|
2723
2599
|
this.setAttribute("slot", "drags");
|
|
2724
2600
|
}
|
|
2725
2601
|
render() {
|
|
2726
|
-
return
|
|
2602
|
+
return html13`<slot></slot>`;
|
|
2727
2603
|
}
|
|
2728
2604
|
};
|
|
2729
|
-
QtiGapText.styles =
|
|
2605
|
+
QtiGapText.styles = css9`
|
|
2730
2606
|
:host {
|
|
2731
2607
|
display: inline-flex;
|
|
2732
2608
|
user-select: none;
|
|
2733
2609
|
}
|
|
2734
2610
|
`;
|
|
2735
2611
|
__decorateClass([
|
|
2736
|
-
|
|
2612
|
+
property12({ type: Number, reflect: true })
|
|
2737
2613
|
], QtiGapText.prototype, "tabindex", 2);
|
|
2738
2614
|
QtiGapText = __decorateClass([
|
|
2739
|
-
|
|
2615
|
+
customElement15("qti-gap-text")
|
|
2740
2616
|
], QtiGapText);
|
|
2741
2617
|
|
|
2742
2618
|
// src/lib/qti-components/qti-interaction/qti-gap.ts
|
|
2743
|
-
import { css as
|
|
2744
|
-
import { customElement as
|
|
2745
|
-
var QtiGap = class extends
|
|
2619
|
+
import { css as css10, html as html14, LitElement as LitElement9 } from "lit";
|
|
2620
|
+
import { customElement as customElement16, property as property13 } from "lit/decorators.js";
|
|
2621
|
+
var QtiGap = class extends LitElement9 {
|
|
2746
2622
|
constructor() {
|
|
2747
2623
|
super(...arguments);
|
|
2748
2624
|
this.tabindex = 0;
|
|
2749
2625
|
}
|
|
2750
2626
|
render() {
|
|
2751
|
-
return
|
|
2627
|
+
return html14` <slot name="drags"></slot>`;
|
|
2752
2628
|
}
|
|
2753
2629
|
};
|
|
2754
|
-
QtiGap.styles =
|
|
2630
|
+
QtiGap.styles = css10`
|
|
2755
2631
|
:host {
|
|
2756
2632
|
display: flex;
|
|
2757
2633
|
user-select: none;
|
|
2758
2634
|
}
|
|
2759
2635
|
`;
|
|
2760
2636
|
__decorateClass([
|
|
2761
|
-
|
|
2637
|
+
property13({ type: Number, reflect: true })
|
|
2762
2638
|
], QtiGap.prototype, "tabindex", 2);
|
|
2763
2639
|
QtiGap = __decorateClass([
|
|
2764
|
-
|
|
2640
|
+
customElement16("qti-gap")
|
|
2765
2641
|
], QtiGap);
|
|
2766
2642
|
|
|
2767
2643
|
// src/lib/qti-components/qti-interaction/qti-graphic-associate-interaction/qti-graphic-associate-interaction.ts
|
|
2768
|
-
import { html as
|
|
2769
|
-
import { customElement as
|
|
2644
|
+
import { html as html15, svg } from "lit";
|
|
2645
|
+
import { customElement as customElement17, queryAssignedElements, state as state6 } from "lit/decorators.js";
|
|
2770
2646
|
import { ifDefined as ifDefined3 } from "lit/directives/if-defined.js";
|
|
2771
2647
|
import { repeat } from "lit/directives/repeat.js";
|
|
2772
2648
|
|
|
@@ -2865,8 +2741,8 @@ function positionShapes(shape, coordsNumber, img, hotspot) {
|
|
|
2865
2741
|
}
|
|
2866
2742
|
|
|
2867
2743
|
// src/lib/qti-components/qti-interaction/qti-graphic-associate-interaction/qti-graphic-associate-interaction.styles.ts
|
|
2868
|
-
import { css as
|
|
2869
|
-
var qti_graphic_associate_interaction_styles_default =
|
|
2744
|
+
import { css as css11 } from "lit";
|
|
2745
|
+
var qti_graphic_associate_interaction_styles_default = css11`
|
|
2870
2746
|
slot:not([name='prompt']) {
|
|
2871
2747
|
// position: relative; /* qti-hotspot-choice relative to the slot */
|
|
2872
2748
|
display: block;
|
|
@@ -2929,7 +2805,7 @@ var QtiGraphicAssociateInteraction = class extends Interaction {
|
|
|
2929
2805
|
this._correctLines = correctResponses;
|
|
2930
2806
|
}
|
|
2931
2807
|
render() {
|
|
2932
|
-
return
|
|
2808
|
+
return html15`<slot name="prompt"></slot>
|
|
2933
2809
|
<line-container>
|
|
2934
2810
|
<svg
|
|
2935
2811
|
width=${ifDefined3(this.grImage[0]?.width)}
|
|
@@ -3037,31 +2913,31 @@ var QtiGraphicAssociateInteraction = class extends Interaction {
|
|
|
3037
2913
|
};
|
|
3038
2914
|
QtiGraphicAssociateInteraction.styles = qti_graphic_associate_interaction_styles_default;
|
|
3039
2915
|
__decorateClass([
|
|
3040
|
-
|
|
2916
|
+
state6()
|
|
3041
2917
|
], QtiGraphicAssociateInteraction.prototype, "_correctLines", 2);
|
|
3042
2918
|
__decorateClass([
|
|
3043
|
-
|
|
2919
|
+
state6()
|
|
3044
2920
|
], QtiGraphicAssociateInteraction.prototype, "startCoord", 2);
|
|
3045
2921
|
__decorateClass([
|
|
3046
|
-
|
|
2922
|
+
state6()
|
|
3047
2923
|
], QtiGraphicAssociateInteraction.prototype, "mouseCoord", 2);
|
|
3048
2924
|
__decorateClass([
|
|
3049
2925
|
queryAssignedElements({ selector: "img" })
|
|
3050
2926
|
], QtiGraphicAssociateInteraction.prototype, "grImage", 2);
|
|
3051
2927
|
__decorateClass([
|
|
3052
|
-
|
|
2928
|
+
state6()
|
|
3053
2929
|
], QtiGraphicAssociateInteraction.prototype, "_response", 2);
|
|
3054
2930
|
QtiGraphicAssociateInteraction = __decorateClass([
|
|
3055
|
-
|
|
2931
|
+
customElement17("qti-graphic-associate-interaction")
|
|
3056
2932
|
], QtiGraphicAssociateInteraction);
|
|
3057
2933
|
|
|
3058
2934
|
// src/lib/qti-components/qti-interaction/qti-graphic-gap-match-interaction/qti-graphic-gap-match-interaction.ts
|
|
3059
|
-
import { html as
|
|
3060
|
-
import { customElement as
|
|
2935
|
+
import { html as html16 } from "lit";
|
|
2936
|
+
import { customElement as customElement18 } from "lit/decorators.js";
|
|
3061
2937
|
|
|
3062
2938
|
// src/lib/qti-components/qti-interaction/qti-graphic-gap-match-interaction/qti-graphic-gap-match-interaction.styles.ts
|
|
3063
|
-
import { css as
|
|
3064
|
-
var qti_graphic_gap_match_interaction_styles_default =
|
|
2939
|
+
import { css as css12 } from "lit";
|
|
2940
|
+
var qti_graphic_gap_match_interaction_styles_default = css12`
|
|
3065
2941
|
:host {
|
|
3066
2942
|
display: flex;
|
|
3067
2943
|
align-items: flex-start;
|
|
@@ -3125,7 +3001,7 @@ var QtiGraphicGapMatchInteraction = class extends DragDropInteractionMixin(
|
|
|
3125
3001
|
`slot[part='drags']`
|
|
3126
3002
|
) {
|
|
3127
3003
|
render() {
|
|
3128
|
-
return
|
|
3004
|
+
return html16` <slot name="prompt"></slot>
|
|
3129
3005
|
<slot part="image"></slot>
|
|
3130
3006
|
<slot part="drags" name="drags" class="hover-border"></slot>
|
|
3131
3007
|
<div role="alert" part="message" id="validation-message"></div>`;
|
|
@@ -3168,16 +3044,16 @@ var QtiGraphicGapMatchInteraction = class extends DragDropInteractionMixin(
|
|
|
3168
3044
|
};
|
|
3169
3045
|
QtiGraphicGapMatchInteraction.styles = qti_graphic_gap_match_interaction_styles_default;
|
|
3170
3046
|
QtiGraphicGapMatchInteraction = __decorateClass([
|
|
3171
|
-
|
|
3047
|
+
customElement18("qti-graphic-gap-match-interaction")
|
|
3172
3048
|
], QtiGraphicGapMatchInteraction);
|
|
3173
3049
|
|
|
3174
3050
|
// src/lib/qti-components/qti-interaction/qti-graphic-order-interaction/qti-graphic-order-interaction.ts
|
|
3175
|
-
import { html as
|
|
3176
|
-
import { customElement as
|
|
3051
|
+
import { html as html17 } from "lit";
|
|
3052
|
+
import { customElement as customElement19 } from "lit/decorators.js";
|
|
3177
3053
|
|
|
3178
3054
|
// src/lib/qti-components/qti-interaction/qti-graphic-order-interaction/qti-graphic-order-interaction.styles.ts
|
|
3179
|
-
import { css as
|
|
3180
|
-
var qti_graphic_order_interaction_styles_default =
|
|
3055
|
+
import { css as css13 } from "lit";
|
|
3056
|
+
var qti_graphic_order_interaction_styles_default = css13`
|
|
3181
3057
|
slot:not([name='prompt']) {
|
|
3182
3058
|
position: relative; /* qti-hotspot-choice relative to the slot */
|
|
3183
3059
|
display: block;
|
|
@@ -3197,7 +3073,7 @@ var QtiGraphicOrderInteraction = class extends ChoicesMixin(Interaction, "qti-ho
|
|
|
3197
3073
|
this._choiceElements = [];
|
|
3198
3074
|
}
|
|
3199
3075
|
render() {
|
|
3200
|
-
return
|
|
3076
|
+
return html17`
|
|
3201
3077
|
<slot name="prompt"></slot>
|
|
3202
3078
|
<slot></slot>
|
|
3203
3079
|
<div role="alert" part="message" id="validation-message"></div>
|
|
@@ -3266,15 +3142,15 @@ var QtiGraphicOrderInteraction = class extends ChoicesMixin(Interaction, "qti-ho
|
|
|
3266
3142
|
};
|
|
3267
3143
|
QtiGraphicOrderInteraction.styles = qti_graphic_order_interaction_styles_default;
|
|
3268
3144
|
QtiGraphicOrderInteraction = __decorateClass([
|
|
3269
|
-
|
|
3145
|
+
customElement19("qti-graphic-order-interaction")
|
|
3270
3146
|
], QtiGraphicOrderInteraction);
|
|
3271
3147
|
|
|
3272
3148
|
// src/lib/qti-components/qti-interaction/qti-hotspot-choice.ts
|
|
3273
|
-
import { css as
|
|
3274
|
-
import { customElement as
|
|
3275
|
-
var QtiHotspotChoice = class extends ActiveElementMixin(
|
|
3149
|
+
import { css as css14, LitElement as LitElement10 } from "lit";
|
|
3150
|
+
import { customElement as customElement20, property as property14 } from "lit/decorators.js";
|
|
3151
|
+
var QtiHotspotChoice = class extends ActiveElementMixin(LitElement10, "qti-hotspot-choice") {
|
|
3276
3152
|
};
|
|
3277
|
-
QtiHotspotChoice.styles =
|
|
3153
|
+
QtiHotspotChoice.styles = css14`
|
|
3278
3154
|
:host {
|
|
3279
3155
|
display: flex;
|
|
3280
3156
|
user-select: none;
|
|
@@ -3282,22 +3158,22 @@ QtiHotspotChoice.styles = css15`
|
|
|
3282
3158
|
}
|
|
3283
3159
|
`;
|
|
3284
3160
|
__decorateClass([
|
|
3285
|
-
|
|
3161
|
+
property14({ attribute: "aria-ordervalue", type: Number, reflect: true })
|
|
3286
3162
|
], QtiHotspotChoice.prototype, "order", 2);
|
|
3287
3163
|
__decorateClass([
|
|
3288
|
-
|
|
3164
|
+
property14({ attribute: "aria-ordercorrectvalue", type: Number, reflect: true })
|
|
3289
3165
|
], QtiHotspotChoice.prototype, "orderCorrect", 2);
|
|
3290
3166
|
QtiHotspotChoice = __decorateClass([
|
|
3291
|
-
|
|
3167
|
+
customElement20("qti-hotspot-choice")
|
|
3292
3168
|
], QtiHotspotChoice);
|
|
3293
3169
|
|
|
3294
3170
|
// src/lib/qti-components/qti-interaction/qti-hotspot-interaction/qti-hotspot-interaction.ts
|
|
3295
|
-
import { html as
|
|
3296
|
-
import { customElement as
|
|
3171
|
+
import { html as html18 } from "lit";
|
|
3172
|
+
import { customElement as customElement21 } from "lit/decorators.js";
|
|
3297
3173
|
|
|
3298
3174
|
// src/lib/qti-components/qti-interaction/qti-hotspot-interaction/qti-hotspot-interaction.styles.ts
|
|
3299
|
-
import { css as
|
|
3300
|
-
var qti_hotspot_interaction_styles_default =
|
|
3175
|
+
import { css as css15 } from "lit";
|
|
3176
|
+
var qti_hotspot_interaction_styles_default = css15`
|
|
3301
3177
|
slot:not([name='prompt']) {
|
|
3302
3178
|
position: relative; /* qti-hotspot-choice relative to the slot */
|
|
3303
3179
|
display: block;
|
|
@@ -3314,7 +3190,7 @@ var qti_hotspot_interaction_styles_default = css16`
|
|
|
3314
3190
|
// src/lib/qti-components/qti-interaction/qti-hotspot-interaction/qti-hotspot-interaction.ts
|
|
3315
3191
|
var QtiHotspotInteraction = class extends ChoicesMixin(Interaction, "qti-hotspot-choice") {
|
|
3316
3192
|
render() {
|
|
3317
|
-
return
|
|
3193
|
+
return html18`
|
|
3318
3194
|
<slot name="prompt"></slot>
|
|
3319
3195
|
<slot></slot>
|
|
3320
3196
|
`;
|
|
@@ -3338,17 +3214,17 @@ var QtiHotspotInteraction = class extends ChoicesMixin(Interaction, "qti-hotspot
|
|
|
3338
3214
|
};
|
|
3339
3215
|
QtiHotspotInteraction.styles = qti_hotspot_interaction_styles_default;
|
|
3340
3216
|
QtiHotspotInteraction = __decorateClass([
|
|
3341
|
-
|
|
3217
|
+
customElement21("qti-hotspot-interaction")
|
|
3342
3218
|
], QtiHotspotInteraction);
|
|
3343
3219
|
|
|
3344
3220
|
// src/lib/qti-components/qti-interaction/qti-hottext-interaction/qti-hottext-interaction.ts
|
|
3345
|
-
import { html as
|
|
3346
|
-
import { customElement as
|
|
3221
|
+
import { html as html19 } from "lit";
|
|
3222
|
+
import { customElement as customElement22, property as property15 } from "lit/decorators.js";
|
|
3347
3223
|
var QtiHottextInteraction = class extends ChoicesMixin(Interaction, "qti-hottext") {
|
|
3348
3224
|
constructor() {
|
|
3349
3225
|
super(...arguments);
|
|
3350
3226
|
this.class = "";
|
|
3351
|
-
this.render = () =>
|
|
3227
|
+
this.render = () => html19`<slot></slot>
|
|
3352
3228
|
<div part="message" role="alert" id="validation-message"></div>`;
|
|
3353
3229
|
}
|
|
3354
3230
|
// NOTE: there is no way to get the variant with radiobuttons or checkboxes
|
|
@@ -3382,36 +3258,36 @@ var QtiHottextInteraction = class extends ChoicesMixin(Interaction, "qti-hottext
|
|
|
3382
3258
|
}
|
|
3383
3259
|
};
|
|
3384
3260
|
__decorateClass([
|
|
3385
|
-
|
|
3261
|
+
property15({ type: String, reflect: true })
|
|
3386
3262
|
], QtiHottextInteraction.prototype, "class", 2);
|
|
3387
3263
|
QtiHottextInteraction = __decorateClass([
|
|
3388
|
-
|
|
3264
|
+
customElement22("qti-hottext-interaction")
|
|
3389
3265
|
], QtiHottextInteraction);
|
|
3390
3266
|
|
|
3391
3267
|
// src/lib/qti-components/qti-interaction/qti-hottext.ts
|
|
3392
|
-
import { css as
|
|
3393
|
-
import { customElement as
|
|
3394
|
-
var QtiHottext = class extends ActiveElementMixin(
|
|
3268
|
+
import { css as css16, html as html20, LitElement as LitElement11 } from "lit";
|
|
3269
|
+
import { customElement as customElement23 } from "lit/decorators.js";
|
|
3270
|
+
var QtiHottext = class extends ActiveElementMixin(LitElement11, "qti-hottext") {
|
|
3395
3271
|
render() {
|
|
3396
|
-
return
|
|
3272
|
+
return html20`<div part="ch"><div part="cha"></div></div>
|
|
3397
3273
|
<slot></slot> `;
|
|
3398
3274
|
}
|
|
3399
3275
|
};
|
|
3400
|
-
QtiHottext.styles =
|
|
3276
|
+
QtiHottext.styles = css16`
|
|
3401
3277
|
:host {
|
|
3402
3278
|
display: flex;
|
|
3403
3279
|
user-select: none;
|
|
3404
3280
|
}
|
|
3405
3281
|
`;
|
|
3406
3282
|
QtiHottext = __decorateClass([
|
|
3407
|
-
|
|
3283
|
+
customElement23("qti-hottext")
|
|
3408
3284
|
], QtiHottext);
|
|
3409
3285
|
|
|
3410
3286
|
// src/lib/qti-components/qti-interaction/qti-inline-choice-interaction/qti-inline-choice-interaction.ts
|
|
3411
|
-
import { css as
|
|
3412
|
-
import { customElement as
|
|
3287
|
+
import { css as css17, html as html21 } from "lit";
|
|
3288
|
+
import { customElement as customElement24, property as property16, state as state7 } from "lit/decorators.js";
|
|
3413
3289
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
3414
|
-
import { consume as
|
|
3290
|
+
import { consume as consume3 } from "@lit/context";
|
|
3415
3291
|
var QtiInlineChoiceInteraction = class extends Interaction {
|
|
3416
3292
|
constructor() {
|
|
3417
3293
|
super(...arguments);
|
|
@@ -3424,7 +3300,7 @@ var QtiInlineChoiceInteraction = class extends Interaction {
|
|
|
3424
3300
|
}
|
|
3425
3301
|
static get styles() {
|
|
3426
3302
|
return [
|
|
3427
|
-
|
|
3303
|
+
css17`
|
|
3428
3304
|
:host {
|
|
3429
3305
|
display: inline-block;
|
|
3430
3306
|
}
|
|
@@ -3450,10 +3326,10 @@ var QtiInlineChoiceInteraction = class extends Interaction {
|
|
|
3450
3326
|
];
|
|
3451
3327
|
}
|
|
3452
3328
|
render() {
|
|
3453
|
-
return
|
|
3329
|
+
return html21`
|
|
3454
3330
|
<select part="select" @change="${this.choiceSelected}" ?disabled="${this.disabled}" ?readonly="${this.readonly}">
|
|
3455
3331
|
${this.options.map(
|
|
3456
|
-
(option) =>
|
|
3332
|
+
(option) => html21`
|
|
3457
3333
|
<option value="${option.value}" ?selected="${option.selected}">${unsafeHTML(option.textContent)}</option>
|
|
3458
3334
|
`
|
|
3459
3335
|
)}
|
|
@@ -3536,29 +3412,29 @@ QtiInlineChoiceInteraction.inputWidthClass = [
|
|
|
3536
3412
|
"qti-input-width-72"
|
|
3537
3413
|
];
|
|
3538
3414
|
__decorateClass([
|
|
3539
|
-
|
|
3415
|
+
state7()
|
|
3540
3416
|
], QtiInlineChoiceInteraction.prototype, "options", 2);
|
|
3541
3417
|
__decorateClass([
|
|
3542
|
-
|
|
3418
|
+
state7()
|
|
3543
3419
|
], QtiInlineChoiceInteraction.prototype, "correctOption", 2);
|
|
3544
3420
|
__decorateClass([
|
|
3545
|
-
|
|
3421
|
+
property16({ attribute: "data-prompt", type: String })
|
|
3546
3422
|
], QtiInlineChoiceInteraction.prototype, "dataPrompt", 2);
|
|
3547
3423
|
__decorateClass([
|
|
3548
|
-
|
|
3549
|
-
|
|
3424
|
+
consume3({ context: configContext, subscribe: true }),
|
|
3425
|
+
property16({ attribute: false })
|
|
3550
3426
|
], QtiInlineChoiceInteraction.prototype, "configContext", 2);
|
|
3551
3427
|
QtiInlineChoiceInteraction = __decorateClass([
|
|
3552
|
-
|
|
3428
|
+
customElement24("qti-inline-choice-interaction")
|
|
3553
3429
|
], QtiInlineChoiceInteraction);
|
|
3554
3430
|
|
|
3555
3431
|
// src/lib/qti-components/qti-interaction/qti-inline-choice.ts
|
|
3556
|
-
import { css as
|
|
3557
|
-
import { customElement as
|
|
3558
|
-
var QtiInlineChoice = class extends
|
|
3432
|
+
import { css as css18, html as html22, LitElement as LitElement12 } from "lit";
|
|
3433
|
+
import { customElement as customElement25, property as property17 } from "lit/decorators.js";
|
|
3434
|
+
var QtiInlineChoice = class extends LitElement12 {
|
|
3559
3435
|
static get styles() {
|
|
3560
3436
|
return [
|
|
3561
|
-
|
|
3437
|
+
css18`
|
|
3562
3438
|
:host {
|
|
3563
3439
|
display: block;
|
|
3564
3440
|
cursor: pointer;
|
|
@@ -3581,7 +3457,7 @@ var QtiInlineChoice = class extends LitElement13 {
|
|
|
3581
3457
|
this.removeEventListener("click", this._onSelectInlineChoice);
|
|
3582
3458
|
}
|
|
3583
3459
|
render() {
|
|
3584
|
-
return
|
|
3460
|
+
return html22` <slot></slot> `;
|
|
3585
3461
|
}
|
|
3586
3462
|
_onSelectInlineChoice() {
|
|
3587
3463
|
this.dispatchEvent(
|
|
@@ -3595,16 +3471,16 @@ var QtiInlineChoice = class extends LitElement13 {
|
|
|
3595
3471
|
}
|
|
3596
3472
|
};
|
|
3597
3473
|
__decorateClass([
|
|
3598
|
-
|
|
3474
|
+
property17({ type: String })
|
|
3599
3475
|
], QtiInlineChoice.prototype, "identifier", 2);
|
|
3600
3476
|
QtiInlineChoice = __decorateClass([
|
|
3601
|
-
|
|
3477
|
+
customElement25("qti-inline-choice")
|
|
3602
3478
|
], QtiInlineChoice);
|
|
3603
3479
|
|
|
3604
3480
|
// src/lib/qti-components/qti-interaction/qti-simple-associable-choice.ts
|
|
3605
|
-
import { css as
|
|
3606
|
-
import { customElement as
|
|
3607
|
-
var QtiSimpleAssociableChoice = class extends ActiveElementMixin(
|
|
3481
|
+
import { css as css19, html as html23, LitElement as LitElement13 } from "lit";
|
|
3482
|
+
import { customElement as customElement26, property as property18 } from "lit/decorators.js";
|
|
3483
|
+
var QtiSimpleAssociableChoice = class extends ActiveElementMixin(LitElement13, "qti-simple-associable-choice") {
|
|
3608
3484
|
constructor() {
|
|
3609
3485
|
super(...arguments);
|
|
3610
3486
|
this.matchMin = 0;
|
|
@@ -3624,13 +3500,13 @@ var QtiSimpleAssociableChoice = class extends ActiveElementMixin(LitElement14, "
|
|
|
3624
3500
|
// So we have a slot for whenever another qti-simple-associable-choice is dropped in here.
|
|
3625
3501
|
// And we have slot for content like in this associate interaction
|
|
3626
3502
|
render() {
|
|
3627
|
-
return
|
|
3503
|
+
return html23`
|
|
3628
3504
|
<slot part="slot"></slot>
|
|
3629
3505
|
<slot part="dropslot" name="qti-simple-associable-choice"></slot>
|
|
3630
3506
|
`;
|
|
3631
3507
|
}
|
|
3632
3508
|
};
|
|
3633
|
-
QtiSimpleAssociableChoice.styles =
|
|
3509
|
+
QtiSimpleAssociableChoice.styles = css19`
|
|
3634
3510
|
:host {
|
|
3635
3511
|
display: flex;
|
|
3636
3512
|
user-select: none;
|
|
@@ -3644,19 +3520,19 @@ QtiSimpleAssociableChoice.styles = css20`
|
|
|
3644
3520
|
}
|
|
3645
3521
|
`;
|
|
3646
3522
|
__decorateClass([
|
|
3647
|
-
|
|
3523
|
+
property18({
|
|
3648
3524
|
type: Number,
|
|
3649
3525
|
attribute: "match-min"
|
|
3650
3526
|
})
|
|
3651
3527
|
], QtiSimpleAssociableChoice.prototype, "matchMin", 2);
|
|
3652
3528
|
__decorateClass([
|
|
3653
|
-
|
|
3529
|
+
property18({
|
|
3654
3530
|
type: Number,
|
|
3655
3531
|
attribute: "match-max"
|
|
3656
3532
|
})
|
|
3657
3533
|
], QtiSimpleAssociableChoice.prototype, "matchMax", 2);
|
|
3658
3534
|
__decorateClass([
|
|
3659
|
-
|
|
3535
|
+
property18({
|
|
3660
3536
|
type: String,
|
|
3661
3537
|
attribute: "fixed",
|
|
3662
3538
|
converter: {
|
|
@@ -3666,17 +3542,17 @@ __decorateClass([
|
|
|
3666
3542
|
})
|
|
3667
3543
|
], QtiSimpleAssociableChoice.prototype, "fixed", 2);
|
|
3668
3544
|
QtiSimpleAssociableChoice = __decorateClass([
|
|
3669
|
-
|
|
3545
|
+
customElement26("qti-simple-associable-choice")
|
|
3670
3546
|
], QtiSimpleAssociableChoice);
|
|
3671
3547
|
|
|
3672
3548
|
// src/lib/qti-components/qti-interaction/qti-match-interaction/qti-match-interaction.ts
|
|
3673
|
-
import { html as
|
|
3674
|
-
import { customElement as
|
|
3549
|
+
import { html as html24, nothing } from "lit";
|
|
3550
|
+
import { customElement as customElement27, property as property19, state as state8 } from "lit/decorators.js";
|
|
3675
3551
|
import { unsafeHTML as unsafeHTML2 } from "lit/directives/unsafe-html.js";
|
|
3676
3552
|
|
|
3677
3553
|
// src/lib/qti-components/qti-interaction/qti-match-interaction/qti-match-interaction.styles.ts
|
|
3678
|
-
import { css as
|
|
3679
|
-
var qti_match_interaction_styles_default =
|
|
3554
|
+
import { css as css20 } from "lit";
|
|
3555
|
+
var qti_match_interaction_styles_default = css20`
|
|
3680
3556
|
slot:not([hidden]) {
|
|
3681
3557
|
/* slot where the */
|
|
3682
3558
|
display: flex;
|
|
@@ -3867,19 +3743,19 @@ var QtiMatchInteraction = class extends DragDropInteractionMixin(
|
|
|
3867
3743
|
render() {
|
|
3868
3744
|
const isTabular = this.class.split(" ").includes("qti-match-tabular");
|
|
3869
3745
|
const hasCorrectResponse = this.correctOptions !== null;
|
|
3870
|
-
return
|
|
3746
|
+
return html24`
|
|
3871
3747
|
<slot name="prompt"></slot>
|
|
3872
3748
|
<slot ?hidden=${isTabular}></slot>
|
|
3873
3749
|
|
|
3874
|
-
${isTabular ?
|
|
3750
|
+
${isTabular ? html24`
|
|
3875
3751
|
<table part="table">
|
|
3876
3752
|
<tr part="r-header">
|
|
3877
3753
|
<td></td>
|
|
3878
|
-
${this.targetChoices.map((col) =>
|
|
3754
|
+
${this.targetChoices.map((col) => html24`<th part="r-header">${unsafeHTML2(col.innerHTML)}</th>`)}
|
|
3879
3755
|
</tr>
|
|
3880
3756
|
|
|
3881
3757
|
${this.sourceChoices.map(
|
|
3882
|
-
(row) =>
|
|
3758
|
+
(row) => html24`<tr part="row">
|
|
3883
3759
|
<td part="c-header">${unsafeHTML2(row.innerHTML)}</td>
|
|
3884
3760
|
${this.targetChoices.map((col) => {
|
|
3885
3761
|
const rowId = row.getAttribute("identifier");
|
|
@@ -3891,7 +3767,7 @@ var QtiMatchInteraction = class extends DragDropInteractionMixin(
|
|
|
3891
3767
|
const isCorrect = !!this.correctOptions?.find((option) => option.source === rowId && option.target === colId);
|
|
3892
3768
|
const part = type === "radio" ? `rb ${checked ? "rb-checked" : ""} ${hasCorrectResponse ? isCorrect ? "rb-correct" : "rb-incorrect" : ""}` : `cb ${checked ? "cb-checked" : ""} ${hasCorrectResponse ? isCorrect ? "cb-correct" : "cb-incorrect" : ""}`;
|
|
3893
3769
|
const disable = this.correctOptions?.length > 0 ? true : row.matchMax === 1 ? false : row.matchMax !== 0 && selectedInRowCount >= row.matchMax && !checked;
|
|
3894
|
-
return
|
|
3770
|
+
return html24`<td part="input-cell">
|
|
3895
3771
|
<div
|
|
3896
3772
|
class="input-container"
|
|
3897
3773
|
style="position: relative; width: 24px; height: 24px; margin: 0 auto;"
|
|
@@ -3905,7 +3781,7 @@ var QtiMatchInteraction = class extends DragDropInteractionMixin(
|
|
|
3905
3781
|
@change=${(e) => this.handleRadioChange(e)}
|
|
3906
3782
|
@click=${(e) => row.matchMax === 1 ? this.handleRadioClick(e) : null}
|
|
3907
3783
|
/>
|
|
3908
|
-
${type === "checkbox" && checked ?
|
|
3784
|
+
${type === "checkbox" && checked ? html24`
|
|
3909
3785
|
<svg
|
|
3910
3786
|
part="checkmark"
|
|
3911
3787
|
viewBox="0 0 24 24"
|
|
@@ -3928,24 +3804,24 @@ var QtiMatchInteraction = class extends DragDropInteractionMixin(
|
|
|
3928
3804
|
};
|
|
3929
3805
|
QtiMatchInteraction.styles = qti_match_interaction_styles_default;
|
|
3930
3806
|
__decorateClass([
|
|
3931
|
-
|
|
3807
|
+
property19({ type: String })
|
|
3932
3808
|
], QtiMatchInteraction.prototype, "class", 2);
|
|
3933
3809
|
__decorateClass([
|
|
3934
|
-
|
|
3810
|
+
state8()
|
|
3935
3811
|
], QtiMatchInteraction.prototype, "_response", 2);
|
|
3936
3812
|
__decorateClass([
|
|
3937
|
-
|
|
3813
|
+
property19({ type: String, attribute: "response-identifier" })
|
|
3938
3814
|
], QtiMatchInteraction.prototype, "responseIdentifier", 2);
|
|
3939
3815
|
__decorateClass([
|
|
3940
|
-
|
|
3816
|
+
state8()
|
|
3941
3817
|
], QtiMatchInteraction.prototype, "correctOptions", 2);
|
|
3942
3818
|
QtiMatchInteraction = __decorateClass([
|
|
3943
|
-
|
|
3819
|
+
customElement27("qti-match-interaction")
|
|
3944
3820
|
], QtiMatchInteraction);
|
|
3945
3821
|
|
|
3946
3822
|
// src/lib/qti-components/qti-interaction/qti-media-interaction/qti-media-interaction.ts
|
|
3947
|
-
import { css as
|
|
3948
|
-
import { customElement as
|
|
3823
|
+
import { css as css21, html as html25 } from "lit";
|
|
3824
|
+
import { customElement as customElement28 } from "lit/decorators.js";
|
|
3949
3825
|
var QtiMediaInteraction = class extends Interaction {
|
|
3950
3826
|
constructor() {
|
|
3951
3827
|
super();
|
|
@@ -3982,7 +3858,7 @@ var QtiMediaInteraction = class extends Interaction {
|
|
|
3982
3858
|
};
|
|
3983
3859
|
}
|
|
3984
3860
|
render() {
|
|
3985
|
-
return
|
|
3861
|
+
return html25` <slot name="prompt"></slot>
|
|
3986
3862
|
<slot></slot>`;
|
|
3987
3863
|
}
|
|
3988
3864
|
connectedCallback() {
|
|
@@ -3996,18 +3872,18 @@ var QtiMediaInteraction = class extends Interaction {
|
|
|
3996
3872
|
}
|
|
3997
3873
|
}
|
|
3998
3874
|
};
|
|
3999
|
-
QtiMediaInteraction.styles = [
|
|
3875
|
+
QtiMediaInteraction.styles = [css21``];
|
|
4000
3876
|
QtiMediaInteraction = __decorateClass([
|
|
4001
|
-
|
|
3877
|
+
customElement28("qti-media-interaction")
|
|
4002
3878
|
], QtiMediaInteraction);
|
|
4003
3879
|
|
|
4004
3880
|
// src/lib/qti-components/qti-interaction/qti-order-interaction/qti-order-interaction.ts
|
|
4005
|
-
import { html as
|
|
4006
|
-
import { customElement as
|
|
3881
|
+
import { html as html26 } from "lit";
|
|
3882
|
+
import { customElement as customElement29, property as property20, state as state9 } from "lit/decorators.js";
|
|
4007
3883
|
|
|
4008
3884
|
// src/lib/qti-components/qti-interaction/qti-order-interaction/qti-order-interaction.styles.ts
|
|
4009
|
-
import { css as
|
|
4010
|
-
var qti_order_interaction_styles_default =
|
|
3885
|
+
import { css as css22 } from "lit";
|
|
3886
|
+
var qti_order_interaction_styles_default = css22`
|
|
4011
3887
|
[part='drags'] {
|
|
4012
3888
|
display: flex;
|
|
4013
3889
|
align-items: flex-start;
|
|
@@ -4076,12 +3952,12 @@ var QtiOrderInteraction = class extends DragDropInteractionMixin(
|
|
|
4076
3952
|
if (this.nrChoices < choices.length) {
|
|
4077
3953
|
this.nrChoices = choices.length;
|
|
4078
3954
|
}
|
|
4079
|
-
return
|
|
3955
|
+
return html26` <slot name="prompt"> </slot>
|
|
4080
3956
|
<div part="container">
|
|
4081
3957
|
<slot part="drags"> </slot>
|
|
4082
3958
|
<div part="drops">
|
|
4083
3959
|
${[...Array(this.nrChoices)].map(
|
|
4084
|
-
(_, i) =>
|
|
3960
|
+
(_, i) => html26`<drop-list role="region" part="drop-list" identifier="droplist${i}"></drop-list>`
|
|
4085
3961
|
)}
|
|
4086
3962
|
</div>
|
|
4087
3963
|
</div>`;
|
|
@@ -4144,29 +4020,29 @@ var QtiOrderInteraction = class extends DragDropInteractionMixin(
|
|
|
4144
4020
|
};
|
|
4145
4021
|
QtiOrderInteraction.styles = qti_order_interaction_styles_default;
|
|
4146
4022
|
__decorateClass([
|
|
4147
|
-
|
|
4023
|
+
state9()
|
|
4148
4024
|
], QtiOrderInteraction.prototype, "nrChoices", 2);
|
|
4149
4025
|
__decorateClass([
|
|
4150
|
-
|
|
4026
|
+
state9()
|
|
4151
4027
|
], QtiOrderInteraction.prototype, "correctResponses", 2);
|
|
4152
4028
|
__decorateClass([
|
|
4153
|
-
|
|
4029
|
+
state9()
|
|
4154
4030
|
], QtiOrderInteraction.prototype, "showCorrectResponses", 2);
|
|
4155
4031
|
__decorateClass([
|
|
4156
|
-
|
|
4032
|
+
property20({ type: String })
|
|
4157
4033
|
], QtiOrderInteraction.prototype, "orientation", 2);
|
|
4158
4034
|
QtiOrderInteraction = __decorateClass([
|
|
4159
|
-
|
|
4035
|
+
customElement29("qti-order-interaction")
|
|
4160
4036
|
], QtiOrderInteraction);
|
|
4161
4037
|
|
|
4162
4038
|
// src/lib/qti-components/qti-interaction/qti-portable-custom-interaction/qti-portable-custom-interaction.ts
|
|
4163
|
-
import { css as
|
|
4164
|
-
import { customElement as
|
|
4165
|
-
import { consume as
|
|
4039
|
+
import { css as css24, html as html27 } from "lit";
|
|
4040
|
+
import { customElement as customElement30, property as property21, state as state10 } from "lit/decorators.js";
|
|
4041
|
+
import { consume as consume4 } from "@lit/context";
|
|
4166
4042
|
|
|
4167
4043
|
// src/lib/qti-components/qti-interaction/qti-portable-custom-interaction/qti-portable-custom-interaction.styles.ts
|
|
4168
|
-
import { css as
|
|
4169
|
-
var qti_portable_custom_interaction_styles_default =
|
|
4044
|
+
import { css as css23 } from "lit";
|
|
4045
|
+
var qti_portable_custom_interaction_styles_default = css23`
|
|
4170
4046
|
::slotted(qti-interaction-markup) {
|
|
4171
4047
|
display: none;
|
|
4172
4048
|
}
|
|
@@ -5420,9 +5296,9 @@ var QtiPortableCustomInteraction = class extends Interaction {
|
|
|
5420
5296
|
}
|
|
5421
5297
|
}
|
|
5422
5298
|
render() {
|
|
5423
|
-
return
|
|
5299
|
+
return html27`
|
|
5424
5300
|
<slot></slot>
|
|
5425
|
-
${this._errorMessage ?
|
|
5301
|
+
${this._errorMessage ? html27`<div style="color:red">
|
|
5426
5302
|
<h1>Error</h1>
|
|
5427
5303
|
${this._errorMessage}
|
|
5428
5304
|
</div>` : ""}
|
|
@@ -5433,7 +5309,7 @@ var QtiPortableCustomInteraction = class extends Interaction {
|
|
|
5433
5309
|
QtiPortableCustomInteraction.styles = [
|
|
5434
5310
|
qti_portable_custom_interaction_styles_default,
|
|
5435
5311
|
// Add default width/height for direct mode
|
|
5436
|
-
|
|
5312
|
+
css24`
|
|
5437
5313
|
:host {
|
|
5438
5314
|
display: block;
|
|
5439
5315
|
width: 100%;
|
|
@@ -5447,55 +5323,55 @@ QtiPortableCustomInteraction.styles = [
|
|
|
5447
5323
|
`
|
|
5448
5324
|
];
|
|
5449
5325
|
__decorateClass([
|
|
5450
|
-
|
|
5326
|
+
property21({ type: String, attribute: "module" })
|
|
5451
5327
|
], QtiPortableCustomInteraction.prototype, "module", 2);
|
|
5452
5328
|
__decorateClass([
|
|
5453
|
-
|
|
5329
|
+
property21({ type: String, attribute: "custom-interaction-type-identifier" })
|
|
5454
5330
|
], QtiPortableCustomInteraction.prototype, "customInteractionTypeIdentifier", 2);
|
|
5455
5331
|
__decorateClass([
|
|
5456
|
-
|
|
5332
|
+
property21({ type: String, attribute: "data-require-paths" })
|
|
5457
5333
|
], QtiPortableCustomInteraction.prototype, "requirePathsJson", 2);
|
|
5458
5334
|
__decorateClass([
|
|
5459
|
-
|
|
5335
|
+
property21({ type: String, attribute: "data-require-shim" })
|
|
5460
5336
|
], QtiPortableCustomInteraction.prototype, "requireShimJson", 2);
|
|
5461
5337
|
__decorateClass([
|
|
5462
|
-
|
|
5338
|
+
property21({ type: String, attribute: "data-require-js-url" })
|
|
5463
5339
|
], QtiPortableCustomInteraction.prototype, "requireJsUrl", 2);
|
|
5464
5340
|
__decorateClass([
|
|
5465
|
-
|
|
5341
|
+
property21({ type: String, attribute: "data-base-url" })
|
|
5466
5342
|
], QtiPortableCustomInteraction.prototype, "baseUrl", 2);
|
|
5467
5343
|
__decorateClass([
|
|
5468
|
-
|
|
5344
|
+
property21({ type: Boolean, attribute: "data-use-iframe" })
|
|
5469
5345
|
], QtiPortableCustomInteraction.prototype, "useIframe", 2);
|
|
5470
5346
|
__decorateClass([
|
|
5471
|
-
|
|
5347
|
+
property21({ type: Boolean, attribute: "data-use-default-shims" })
|
|
5472
5348
|
], QtiPortableCustomInteraction.prototype, "useDefaultShims", 2);
|
|
5473
5349
|
__decorateClass([
|
|
5474
|
-
|
|
5350
|
+
property21({ type: Boolean, attribute: "data-use-default-paths" })
|
|
5475
5351
|
], QtiPortableCustomInteraction.prototype, "useDefaultPaths", 2);
|
|
5476
5352
|
__decorateClass([
|
|
5477
|
-
|
|
5353
|
+
state10()
|
|
5478
5354
|
], QtiPortableCustomInteraction.prototype, "_errorMessage", 2);
|
|
5479
5355
|
__decorateClass([
|
|
5480
|
-
|
|
5481
|
-
|
|
5356
|
+
consume4({ context: itemContext, subscribe: true }),
|
|
5357
|
+
state10()
|
|
5482
5358
|
], QtiPortableCustomInteraction.prototype, "context", 2);
|
|
5483
5359
|
__decorateClass([
|
|
5484
|
-
|
|
5360
|
+
state10()
|
|
5485
5361
|
], QtiPortableCustomInteraction.prototype, "response", 2);
|
|
5486
5362
|
QtiPortableCustomInteraction = __decorateClass([
|
|
5487
|
-
|
|
5363
|
+
customElement30("qti-portable-custom-interaction")
|
|
5488
5364
|
], QtiPortableCustomInteraction);
|
|
5489
5365
|
|
|
5490
5366
|
// src/lib/qti-components/qti-interaction/qti-position-object-interaction/qti-position-object-interaction.ts
|
|
5491
|
-
import { LitElement as
|
|
5492
|
-
var QtiPositionObjectInteraction = class extends
|
|
5367
|
+
import { LitElement as LitElement14, css as css25, html as html28 } from "lit";
|
|
5368
|
+
var QtiPositionObjectInteraction = class extends LitElement14 {
|
|
5493
5369
|
render() {
|
|
5494
|
-
return
|
|
5370
|
+
return html28`<slot></slot>`;
|
|
5495
5371
|
}
|
|
5496
5372
|
static {
|
|
5497
5373
|
this.styles = [
|
|
5498
|
-
|
|
5374
|
+
css25`
|
|
5499
5375
|
:host {
|
|
5500
5376
|
display: block;
|
|
5501
5377
|
}
|
|
@@ -5513,11 +5389,11 @@ var QtiPositionObjectInteraction = class extends LitElement15 {
|
|
|
5513
5389
|
customElements.define("qti-position-object-interaction", QtiPositionObjectInteraction);
|
|
5514
5390
|
|
|
5515
5391
|
// src/lib/qti-components/qti-interaction/qti-position-object-interaction/qti-position-object-stage.ts
|
|
5516
|
-
import { LitElement as
|
|
5517
|
-
import { customElement as
|
|
5518
|
-
var QtiPositionObjectStage = class extends
|
|
5392
|
+
import { LitElement as LitElement15, css as css26, html as html29 } from "lit";
|
|
5393
|
+
import { customElement as customElement31 } from "lit/decorators.js";
|
|
5394
|
+
var QtiPositionObjectStage = class extends LitElement15 {
|
|
5519
5395
|
render() {
|
|
5520
|
-
return
|
|
5396
|
+
return html29`<slot></slot>`;
|
|
5521
5397
|
}
|
|
5522
5398
|
constructor() {
|
|
5523
5399
|
super();
|
|
@@ -5556,7 +5432,7 @@ var QtiPositionObjectStage = class extends LitElement16 {
|
|
|
5556
5432
|
}
|
|
5557
5433
|
};
|
|
5558
5434
|
QtiPositionObjectStage.styles = [
|
|
5559
|
-
|
|
5435
|
+
css26`
|
|
5560
5436
|
:host {
|
|
5561
5437
|
display: inline-block;
|
|
5562
5438
|
position: relative;
|
|
@@ -5564,12 +5440,12 @@ QtiPositionObjectStage.styles = [
|
|
|
5564
5440
|
`
|
|
5565
5441
|
];
|
|
5566
5442
|
QtiPositionObjectStage = __decorateClass([
|
|
5567
|
-
|
|
5443
|
+
customElement31("qti-position-object-stage")
|
|
5568
5444
|
], QtiPositionObjectStage);
|
|
5569
5445
|
|
|
5570
5446
|
// src/lib/qti-components/qti-interaction/qti-select-point-interaction/qti-select-point-interaction.ts
|
|
5571
|
-
import { css as
|
|
5572
|
-
import { customElement as
|
|
5447
|
+
import { css as css27, html as html30 } from "lit";
|
|
5448
|
+
import { customElement as customElement32, property as property22, state as state11 } from "lit/decorators.js";
|
|
5573
5449
|
import { repeat as repeat2 } from "lit/directives/repeat.js";
|
|
5574
5450
|
import { styleMap } from "lit/directives/style-map.js";
|
|
5575
5451
|
|
|
@@ -5816,7 +5692,7 @@ var QtiSelectPointInteraction = class extends Interaction {
|
|
|
5816
5692
|
}
|
|
5817
5693
|
}
|
|
5818
5694
|
render() {
|
|
5819
|
-
return
|
|
5695
|
+
return html30` <slot name="prompt"></slot>
|
|
5820
5696
|
<point-container>
|
|
5821
5697
|
${repeat2(
|
|
5822
5698
|
(this.response || []).filter((point) => point),
|
|
@@ -5834,7 +5710,7 @@ var QtiSelectPointInteraction = class extends Interaction {
|
|
|
5834
5710
|
} else if (this._responseCorrection[index] === false) {
|
|
5835
5711
|
correctionPart = " incorrect";
|
|
5836
5712
|
}
|
|
5837
|
-
return
|
|
5713
|
+
return html30`
|
|
5838
5714
|
<button
|
|
5839
5715
|
part="point${correctionPart}"
|
|
5840
5716
|
style=${styleMap({
|
|
@@ -5866,7 +5742,7 @@ var QtiSelectPointInteraction = class extends Interaction {
|
|
|
5866
5742
|
${repeat2(
|
|
5867
5743
|
this._correctAreas?.filter((area) => area) || [],
|
|
5868
5744
|
(area) => area,
|
|
5869
|
-
(area, i) =>
|
|
5745
|
+
(area, i) => html30`<div
|
|
5870
5746
|
style=${styleMap({
|
|
5871
5747
|
position: "absolute",
|
|
5872
5748
|
pointerEvents: "none",
|
|
@@ -5909,7 +5785,7 @@ var QtiSelectPointInteraction = class extends Interaction {
|
|
|
5909
5785
|
}
|
|
5910
5786
|
};
|
|
5911
5787
|
QtiSelectPointInteraction.styles = [
|
|
5912
|
-
|
|
5788
|
+
css27`
|
|
5913
5789
|
:host {
|
|
5914
5790
|
display: block;
|
|
5915
5791
|
}
|
|
@@ -5927,34 +5803,34 @@ QtiSelectPointInteraction.styles = [
|
|
|
5927
5803
|
`
|
|
5928
5804
|
];
|
|
5929
5805
|
__decorateClass([
|
|
5930
|
-
|
|
5806
|
+
property22({
|
|
5931
5807
|
type: Number,
|
|
5932
5808
|
attribute: "max-choices"
|
|
5933
5809
|
})
|
|
5934
5810
|
], QtiSelectPointInteraction.prototype, "maxChoices", 2);
|
|
5935
5811
|
__decorateClass([
|
|
5936
|
-
|
|
5812
|
+
property22({
|
|
5937
5813
|
type: Number,
|
|
5938
5814
|
attribute: "min-choices"
|
|
5939
5815
|
})
|
|
5940
5816
|
], QtiSelectPointInteraction.prototype, "minChoices", 2);
|
|
5941
5817
|
__decorateClass([
|
|
5942
|
-
|
|
5818
|
+
state11()
|
|
5943
5819
|
], QtiSelectPointInteraction.prototype, "response", 2);
|
|
5944
5820
|
__decorateClass([
|
|
5945
|
-
|
|
5821
|
+
state11()
|
|
5946
5822
|
], QtiSelectPointInteraction.prototype, "_correctAreas", 2);
|
|
5947
5823
|
__decorateClass([
|
|
5948
|
-
|
|
5824
|
+
state11()
|
|
5949
5825
|
], QtiSelectPointInteraction.prototype, "_responseCorrection", 2);
|
|
5950
5826
|
QtiSelectPointInteraction = __decorateClass([
|
|
5951
|
-
|
|
5827
|
+
customElement32("qti-select-point-interaction")
|
|
5952
5828
|
], QtiSelectPointInteraction);
|
|
5953
5829
|
|
|
5954
5830
|
// src/lib/qti-components/qti-interaction/qti-simple-choice.ts
|
|
5955
|
-
import { css as
|
|
5956
|
-
import { customElement as
|
|
5957
|
-
var QtiSimpleChoice = class extends ActiveElementMixin(
|
|
5831
|
+
import { css as css28, html as html31, LitElement as LitElement16, nothing as nothing2 } from "lit";
|
|
5832
|
+
import { customElement as customElement33, property as property23 } from "lit/decorators.js";
|
|
5833
|
+
var QtiSimpleChoice = class extends ActiveElementMixin(LitElement16, "qti-simple-choice") {
|
|
5958
5834
|
constructor() {
|
|
5959
5835
|
super(...arguments);
|
|
5960
5836
|
this.templateIdentifier = null;
|
|
@@ -5965,14 +5841,14 @@ var QtiSimpleChoice = class extends ActiveElementMixin(LitElement17, "qti-simple
|
|
|
5965
5841
|
return this["internals"].states.has("--checked");
|
|
5966
5842
|
}
|
|
5967
5843
|
render() {
|
|
5968
|
-
return
|
|
5844
|
+
return html31`<div part="ch">
|
|
5969
5845
|
<div part="cha"></div>
|
|
5970
5846
|
</div>
|
|
5971
|
-
${this.marker ?
|
|
5847
|
+
${this.marker ? html31`<div id="label">${this.marker}</div>` : nothing2}
|
|
5972
5848
|
<slot part="slot"></slot>`;
|
|
5973
5849
|
}
|
|
5974
5850
|
};
|
|
5975
|
-
QtiSimpleChoice.styles =
|
|
5851
|
+
QtiSimpleChoice.styles = css28`
|
|
5976
5852
|
:host {
|
|
5977
5853
|
display: flex;
|
|
5978
5854
|
align-items: center;
|
|
@@ -5991,13 +5867,13 @@ QtiSimpleChoice.styles = css29`
|
|
|
5991
5867
|
}
|
|
5992
5868
|
`;
|
|
5993
5869
|
__decorateClass([
|
|
5994
|
-
|
|
5870
|
+
property23({ type: String, attribute: "template-identifier" })
|
|
5995
5871
|
], QtiSimpleChoice.prototype, "templateIdentifier", 2);
|
|
5996
5872
|
__decorateClass([
|
|
5997
|
-
|
|
5873
|
+
property23({ type: String, attribute: "show-hide" })
|
|
5998
5874
|
], QtiSimpleChoice.prototype, "showHide", 2);
|
|
5999
5875
|
__decorateClass([
|
|
6000
|
-
|
|
5876
|
+
property23({
|
|
6001
5877
|
type: Boolean,
|
|
6002
5878
|
converter: {
|
|
6003
5879
|
fromAttribute: (value) => value === "true",
|
|
@@ -6006,19 +5882,19 @@ __decorateClass([
|
|
|
6006
5882
|
})
|
|
6007
5883
|
], QtiSimpleChoice.prototype, "fixed", 2);
|
|
6008
5884
|
__decorateClass([
|
|
6009
|
-
|
|
5885
|
+
property23({ type: String, attribute: false })
|
|
6010
5886
|
], QtiSimpleChoice.prototype, "marker", 2);
|
|
6011
5887
|
QtiSimpleChoice = __decorateClass([
|
|
6012
|
-
|
|
5888
|
+
customElement33("qti-simple-choice")
|
|
6013
5889
|
], QtiSimpleChoice);
|
|
6014
5890
|
|
|
6015
5891
|
// src/lib/qti-components/qti-interaction/qti-slider-interaction/qti-slider-interaction.ts
|
|
6016
|
-
import { html as
|
|
6017
|
-
import { customElement as
|
|
5892
|
+
import { html as html32 } from "lit";
|
|
5893
|
+
import { customElement as customElement34, property as property24, query as query2 } from "lit/decorators.js";
|
|
6018
5894
|
|
|
6019
5895
|
// src/lib/qti-components/qti-interaction/qti-slider-interaction/qti-slider-interaction.styles.ts
|
|
6020
|
-
import { css as
|
|
6021
|
-
var qti_slider_interaction_styles_default =
|
|
5896
|
+
import { css as css29 } from "lit";
|
|
5897
|
+
var qti_slider_interaction_styles_default = css29`
|
|
6022
5898
|
:host {
|
|
6023
5899
|
display: block;
|
|
6024
5900
|
--show-bounds: true;
|
|
@@ -6159,7 +6035,7 @@ var QtiSliderInteraction = class extends Interaction {
|
|
|
6159
6035
|
this.requestUpdate();
|
|
6160
6036
|
}
|
|
6161
6037
|
render() {
|
|
6162
|
-
return
|
|
6038
|
+
return html32`
|
|
6163
6039
|
<slot name="prompt"></slot>
|
|
6164
6040
|
<div id="slider" part="slider">
|
|
6165
6041
|
<div id="bounds" part="bounds">
|
|
@@ -6174,7 +6050,7 @@ var QtiSliderInteraction = class extends Interaction {
|
|
|
6174
6050
|
<div id="value" part="value">${this.response}</div>
|
|
6175
6051
|
</div>
|
|
6176
6052
|
|
|
6177
|
-
${this._correctResponseNumber !== null ?
|
|
6053
|
+
${this._correctResponseNumber !== null ? html32`
|
|
6178
6054
|
<div id="knob-correct" part="knob-correct">
|
|
6179
6055
|
<div id="value" part="value">${this._correctResponseNumber}</div>
|
|
6180
6056
|
</div>
|
|
@@ -6224,27 +6100,27 @@ __decorateClass([
|
|
|
6224
6100
|
query2("#rail")
|
|
6225
6101
|
], QtiSliderInteraction.prototype, "_rail", 2);
|
|
6226
6102
|
__decorateClass([
|
|
6227
|
-
|
|
6103
|
+
property24({ type: Number, attribute: "lower-bound" })
|
|
6228
6104
|
], QtiSliderInteraction.prototype, "min", 2);
|
|
6229
6105
|
__decorateClass([
|
|
6230
|
-
|
|
6106
|
+
property24({ type: Number, attribute: "upper-bound" })
|
|
6231
6107
|
], QtiSliderInteraction.prototype, "max", 2);
|
|
6232
6108
|
__decorateClass([
|
|
6233
|
-
|
|
6109
|
+
property24({ type: Number, attribute: "step" })
|
|
6234
6110
|
], QtiSliderInteraction.prototype, "step", 2);
|
|
6235
6111
|
QtiSliderInteraction = __decorateClass([
|
|
6236
|
-
|
|
6112
|
+
customElement34("qti-slider-interaction")
|
|
6237
6113
|
], QtiSliderInteraction);
|
|
6238
6114
|
|
|
6239
6115
|
// src/lib/qti-components/qti-interaction/qti-text-entry-interaction/qti-text-entry-interaction.ts
|
|
6240
|
-
import { html as
|
|
6241
|
-
import { customElement as
|
|
6116
|
+
import { html as html33, nothing as nothing3 } from "lit";
|
|
6117
|
+
import { customElement as customElement35, property as property25, query as query3, state as state12 } from "lit/decorators.js";
|
|
6242
6118
|
import { ifDefined as ifDefined4 } from "lit/directives/if-defined.js";
|
|
6243
6119
|
import { createRef } from "lit/directives/ref.js";
|
|
6244
6120
|
|
|
6245
6121
|
// src/lib/qti-components/qti-interaction/qti-text-entry-interaction/qti-text-entry-interaction.styles.ts
|
|
6246
|
-
import { css as
|
|
6247
|
-
var qti_text_entry_interaction_styles_default =
|
|
6122
|
+
import { css as css30 } from "lit";
|
|
6123
|
+
var qti_text_entry_interaction_styles_default = css30`
|
|
6248
6124
|
:host {
|
|
6249
6125
|
display: inline-block;
|
|
6250
6126
|
}
|
|
@@ -6430,7 +6306,7 @@ var QtiTextEntryInteraction = class extends Interaction {
|
|
|
6430
6306
|
}
|
|
6431
6307
|
}
|
|
6432
6308
|
render() {
|
|
6433
|
-
return
|
|
6309
|
+
return html33`
|
|
6434
6310
|
<input
|
|
6435
6311
|
part="input"
|
|
6436
6312
|
name="${this.responseIdentifier}"
|
|
@@ -6450,7 +6326,7 @@ var QtiTextEntryInteraction = class extends Interaction {
|
|
|
6450
6326
|
?disabled="${this.disabled}"
|
|
6451
6327
|
?readonly="${this.readonly}"
|
|
6452
6328
|
/>
|
|
6453
|
-
${this._correctResponse ?
|
|
6329
|
+
${this._correctResponse ? html33`<div part="correct">${this._correctResponse}</div>` : nothing3}
|
|
6454
6330
|
`;
|
|
6455
6331
|
}
|
|
6456
6332
|
// ${this._correctResponse ? html`<div popover part="correct">${this._correctResponse}</div>` : nothing}
|
|
@@ -6481,19 +6357,19 @@ var QtiTextEntryInteraction = class extends Interaction {
|
|
|
6481
6357
|
};
|
|
6482
6358
|
QtiTextEntryInteraction.styles = qti_text_entry_interaction_styles_default;
|
|
6483
6359
|
__decorateClass([
|
|
6484
|
-
|
|
6360
|
+
property25({ type: Number, attribute: "expected-length" })
|
|
6485
6361
|
], QtiTextEntryInteraction.prototype, "expectedLength", 2);
|
|
6486
6362
|
__decorateClass([
|
|
6487
|
-
|
|
6363
|
+
property25({ type: String, attribute: "pattern-mask" })
|
|
6488
6364
|
], QtiTextEntryInteraction.prototype, "patternMask", 2);
|
|
6489
6365
|
__decorateClass([
|
|
6490
|
-
|
|
6366
|
+
property25({ type: String, attribute: "placeholder-text" })
|
|
6491
6367
|
], QtiTextEntryInteraction.prototype, "placeholderText", 2);
|
|
6492
6368
|
__decorateClass([
|
|
6493
|
-
|
|
6369
|
+
property25({ type: String, attribute: "data-patternmask-message" })
|
|
6494
6370
|
], QtiTextEntryInteraction.prototype, "dataPatternmaskMessage", 2);
|
|
6495
6371
|
__decorateClass([
|
|
6496
|
-
|
|
6372
|
+
state12()
|
|
6497
6373
|
], QtiTextEntryInteraction.prototype, "response", 2);
|
|
6498
6374
|
__decorateClass([
|
|
6499
6375
|
query3("input")
|
|
@@ -6502,12 +6378,12 @@ __decorateClass([
|
|
|
6502
6378
|
watch("response", { waitUntilFirstUpdate: true })
|
|
6503
6379
|
], QtiTextEntryInteraction.prototype, "_handleValueChange", 2);
|
|
6504
6380
|
QtiTextEntryInteraction = __decorateClass([
|
|
6505
|
-
|
|
6381
|
+
customElement35("qti-text-entry-interaction")
|
|
6506
6382
|
], QtiTextEntryInteraction);
|
|
6507
6383
|
|
|
6508
6384
|
// src/lib/qti-components/qti-interaction/qti-upload-interaction/qti-upload-interaction.ts
|
|
6509
|
-
import { css as
|
|
6510
|
-
import { customElement as
|
|
6385
|
+
import { css as css31, html as html34 } from "lit";
|
|
6386
|
+
import { customElement as customElement36 } from "lit/decorators.js";
|
|
6511
6387
|
var QtiUploadInteraction = class extends Interaction {
|
|
6512
6388
|
constructor() {
|
|
6513
6389
|
super(...arguments);
|
|
@@ -6541,7 +6417,7 @@ var QtiUploadInteraction = class extends Interaction {
|
|
|
6541
6417
|
};
|
|
6542
6418
|
}
|
|
6543
6419
|
render() {
|
|
6544
|
-
return
|
|
6420
|
+
return html34`
|
|
6545
6421
|
<div>
|
|
6546
6422
|
<slot name="prompt"></slot>
|
|
6547
6423
|
<input type="file" @change="${this._onFileChange}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" />
|
|
@@ -6571,7 +6447,7 @@ var QtiUploadInteraction = class extends Interaction {
|
|
|
6571
6447
|
}
|
|
6572
6448
|
};
|
|
6573
6449
|
QtiUploadInteraction.styles = [
|
|
6574
|
-
|
|
6450
|
+
css31`
|
|
6575
6451
|
:host {
|
|
6576
6452
|
display: block;
|
|
6577
6453
|
margin: 1em 0;
|
|
@@ -6583,38 +6459,38 @@ QtiUploadInteraction.styles = [
|
|
|
6583
6459
|
`
|
|
6584
6460
|
];
|
|
6585
6461
|
QtiUploadInteraction = __decorateClass([
|
|
6586
|
-
|
|
6462
|
+
customElement36("qti-upload-interaction")
|
|
6587
6463
|
], QtiUploadInteraction);
|
|
6588
6464
|
|
|
6589
6465
|
// src/lib/qti-components/qti-item-body/qti-item-body.ts
|
|
6590
|
-
import { customElement as
|
|
6591
|
-
import { html as
|
|
6466
|
+
import { customElement as customElement37 } from "lit/decorators.js";
|
|
6467
|
+
import { html as html35, LitElement as LitElement17 } from "lit";
|
|
6592
6468
|
|
|
6593
6469
|
// src/lib/qti-components/qti-item-body/qti-item-body.styles.ts
|
|
6594
|
-
import { css as
|
|
6595
|
-
var qti_item_body_styles_default =
|
|
6470
|
+
import { css as css32 } from "lit";
|
|
6471
|
+
var qti_item_body_styles_default = css32`
|
|
6596
6472
|
:host {
|
|
6597
6473
|
display: block;
|
|
6598
6474
|
}
|
|
6599
6475
|
`;
|
|
6600
6476
|
|
|
6601
6477
|
// src/lib/qti-components/qti-item-body/qti-item-body.ts
|
|
6602
|
-
var QtiItemBody = class extends
|
|
6478
|
+
var QtiItemBody = class extends LitElement17 {
|
|
6603
6479
|
render() {
|
|
6604
|
-
return
|
|
6480
|
+
return html35`<slot part="qti-rubric-blocks" name="qti-rubric-block"></slot><slot></slot>`;
|
|
6605
6481
|
}
|
|
6606
6482
|
};
|
|
6607
6483
|
QtiItemBody.styles = qti_item_body_styles_default;
|
|
6608
6484
|
QtiItemBody = __decorateClass([
|
|
6609
|
-
|
|
6485
|
+
customElement37("qti-item-body")
|
|
6610
6486
|
], QtiItemBody);
|
|
6611
6487
|
|
|
6612
6488
|
// src/lib/qti-components/qti-outcome-processing/qti-outcome-processing.ts
|
|
6613
|
-
import { css as
|
|
6614
|
-
import { customElement as
|
|
6615
|
-
var QtiOutcomeProcessing = class extends
|
|
6489
|
+
import { css as css33, html as html36, LitElement as LitElement18 } from "lit";
|
|
6490
|
+
import { customElement as customElement38 } from "lit/decorators.js";
|
|
6491
|
+
var QtiOutcomeProcessing = class extends LitElement18 {
|
|
6616
6492
|
render() {
|
|
6617
|
-
return
|
|
6493
|
+
return html36`<slot></slot>`;
|
|
6618
6494
|
}
|
|
6619
6495
|
process() {
|
|
6620
6496
|
const logic = new QtiOutcomeProcessingProcessor();
|
|
@@ -6623,14 +6499,14 @@ var QtiOutcomeProcessing = class extends LitElement19 {
|
|
|
6623
6499
|
}
|
|
6624
6500
|
};
|
|
6625
6501
|
QtiOutcomeProcessing.styles = [
|
|
6626
|
-
|
|
6502
|
+
css33`
|
|
6627
6503
|
:host {
|
|
6628
6504
|
display: none;
|
|
6629
6505
|
}
|
|
6630
6506
|
`
|
|
6631
6507
|
];
|
|
6632
6508
|
QtiOutcomeProcessing = __decorateClass([
|
|
6633
|
-
|
|
6509
|
+
customElement38("qti-outcome-processing")
|
|
6634
6510
|
], QtiOutcomeProcessing);
|
|
6635
6511
|
var QtiOutcomeProcessingProcessor = class {
|
|
6636
6512
|
process(rules) {
|
|
@@ -6641,11 +6517,11 @@ var QtiOutcomeProcessingProcessor = class {
|
|
|
6641
6517
|
};
|
|
6642
6518
|
|
|
6643
6519
|
// src/lib/qti-components/qti-prompt/qti-prompt.ts
|
|
6644
|
-
import { html as
|
|
6645
|
-
import { customElement as
|
|
6646
|
-
var QtiPrompt = class extends
|
|
6520
|
+
import { html as html37, LitElement as LitElement19 } from "lit";
|
|
6521
|
+
import { customElement as customElement39 } from "lit/decorators.js";
|
|
6522
|
+
var QtiPrompt = class extends LitElement19 {
|
|
6647
6523
|
render() {
|
|
6648
|
-
return
|
|
6524
|
+
return html37`<slot></slot>`;
|
|
6649
6525
|
}
|
|
6650
6526
|
connectedCallback() {
|
|
6651
6527
|
const inInteraction = this.parentElement.tagName.endsWith("INTERACTION");
|
|
@@ -6655,12 +6531,12 @@ var QtiPrompt = class extends LitElement20 {
|
|
|
6655
6531
|
}
|
|
6656
6532
|
};
|
|
6657
6533
|
QtiPrompt = __decorateClass([
|
|
6658
|
-
|
|
6534
|
+
customElement39("qti-prompt")
|
|
6659
6535
|
], QtiPrompt);
|
|
6660
6536
|
|
|
6661
6537
|
// src/lib/qti-components/qti-response-processing/qti-response-processing/qti-response-processing.ts
|
|
6662
|
-
import { css as
|
|
6663
|
-
import { customElement as
|
|
6538
|
+
import { css as css34, html as html38, LitElement as LitElement20 } from "lit";
|
|
6539
|
+
import { customElement as customElement40 } from "lit/decorators.js";
|
|
6664
6540
|
|
|
6665
6541
|
// src/lib/qti-components/internal/template-strings.ts
|
|
6666
6542
|
var matchCorrect = `<qti-response-processing>
|
|
@@ -6717,9 +6593,9 @@ var mapResponsePoint = `<qti-response-processing>
|
|
|
6717
6593
|
</qti-response-processing>`;
|
|
6718
6594
|
|
|
6719
6595
|
// src/lib/qti-components/qti-response-processing/qti-response-processing/qti-response-processing.ts
|
|
6720
|
-
var QtiResponseProcessing = class extends
|
|
6596
|
+
var QtiResponseProcessing = class extends LitElement20 {
|
|
6721
6597
|
render() {
|
|
6722
|
-
return
|
|
6598
|
+
return html38`<slot></slot>`;
|
|
6723
6599
|
}
|
|
6724
6600
|
process() {
|
|
6725
6601
|
const assessmentItem = this.closest("qti-assessment-item");
|
|
@@ -6754,33 +6630,33 @@ var QtiResponseProcessing = class extends LitElement21 {
|
|
|
6754
6630
|
}
|
|
6755
6631
|
};
|
|
6756
6632
|
QtiResponseProcessing.styles = [
|
|
6757
|
-
|
|
6633
|
+
css34`
|
|
6758
6634
|
:host {
|
|
6759
6635
|
display: none;
|
|
6760
6636
|
}
|
|
6761
6637
|
`
|
|
6762
6638
|
];
|
|
6763
6639
|
QtiResponseProcessing = __decorateClass([
|
|
6764
|
-
|
|
6640
|
+
customElement40("qti-response-processing")
|
|
6765
6641
|
], QtiResponseProcessing);
|
|
6766
6642
|
|
|
6767
6643
|
// src/lib/qti-components/qti-response-processing/qti-rule/qti-lookup-outcome-value/qti-lookup-outcome-value.ts
|
|
6768
|
-
import { property as
|
|
6769
|
-
import { consume as
|
|
6644
|
+
import { property as property26, state as state13 } from "lit/decorators.js";
|
|
6645
|
+
import { consume as consume5 } from "@lit/context";
|
|
6770
6646
|
|
|
6771
6647
|
// src/lib/qti-components/qti-response-processing/qti-rule/qti-rule.ts
|
|
6772
|
-
import { customElement as
|
|
6773
|
-
import { html as
|
|
6774
|
-
var QtiRule = class extends
|
|
6648
|
+
import { customElement as customElement41 } from "lit/decorators.js";
|
|
6649
|
+
import { html as html39, LitElement as LitElement21 } from "lit";
|
|
6650
|
+
var QtiRule = class extends LitElement21 {
|
|
6775
6651
|
render() {
|
|
6776
|
-
return
|
|
6652
|
+
return html39`<slot></slot>`;
|
|
6777
6653
|
}
|
|
6778
6654
|
process() {
|
|
6779
6655
|
throw new Error("Not implemented");
|
|
6780
6656
|
}
|
|
6781
6657
|
};
|
|
6782
6658
|
QtiRule = __decorateClass([
|
|
6783
|
-
|
|
6659
|
+
customElement41("qti-rule")
|
|
6784
6660
|
], QtiRule);
|
|
6785
6661
|
|
|
6786
6662
|
// src/lib/qti-components/qti-response-processing/qti-rule/qti-lookup-outcome-value/qti-lookup-outcome-value.ts
|
|
@@ -6813,19 +6689,19 @@ var QtiLookupOutcomeValue = class extends QtiRule {
|
|
|
6813
6689
|
}
|
|
6814
6690
|
};
|
|
6815
6691
|
__decorateClass([
|
|
6816
|
-
|
|
6692
|
+
property26({ type: String })
|
|
6817
6693
|
], QtiLookupOutcomeValue.prototype, "identifier", 2);
|
|
6818
6694
|
__decorateClass([
|
|
6819
|
-
|
|
6820
|
-
|
|
6695
|
+
consume5({ context: itemContext, subscribe: true }),
|
|
6696
|
+
state13()
|
|
6821
6697
|
], QtiLookupOutcomeValue.prototype, "context", 2);
|
|
6822
6698
|
customElements.define("qti-lookup-outcome-value", QtiLookupOutcomeValue);
|
|
6823
6699
|
|
|
6824
6700
|
// src/lib/qti-components/qti-response-processing/qti-rule/qti-response-condition/qti-response-condition.ts
|
|
6825
|
-
import { html as
|
|
6701
|
+
import { html as html40 } from "lit";
|
|
6826
6702
|
var QtiResponseCondition = class extends QtiRule {
|
|
6827
6703
|
render() {
|
|
6828
|
-
return
|
|
6704
|
+
return html40`<slot></slot>`;
|
|
6829
6705
|
}
|
|
6830
6706
|
process() {
|
|
6831
6707
|
const branches = [...this.children];
|
|
@@ -6898,10 +6774,10 @@ var QtiSetOutcomeValueRule = class {
|
|
|
6898
6774
|
customElements.define("qti-set-outcome-value", QtiSetOutcomeValue);
|
|
6899
6775
|
|
|
6900
6776
|
// src/lib/qti-components/qti-response-processing/qti-response-else/qti-response-else.ts
|
|
6901
|
-
import { LitElement as
|
|
6902
|
-
var QtiResponseElse = class extends
|
|
6777
|
+
import { LitElement as LitElement22, html as html41 } from "lit";
|
|
6778
|
+
var QtiResponseElse = class extends LitElement22 {
|
|
6903
6779
|
render() {
|
|
6904
|
-
return
|
|
6780
|
+
return html41`<slot></slot>`;
|
|
6905
6781
|
}
|
|
6906
6782
|
calculate() {
|
|
6907
6783
|
return true;
|
|
@@ -6920,7 +6796,7 @@ var QtiResponseElse = class extends LitElement23 {
|
|
|
6920
6796
|
customElements.define("qti-response-else", QtiResponseElse);
|
|
6921
6797
|
|
|
6922
6798
|
// src/lib/qti-components/qti-response-processing/qti-response-else/qti-response-if/qti-response-else-if/qti-response-else-if.ts
|
|
6923
|
-
import { html as
|
|
6799
|
+
import { html as html42 } from "lit";
|
|
6924
6800
|
|
|
6925
6801
|
// src/lib/qti-components/qti-response-processing/qti-response-else/qti-response-if/qti-response-if.ts
|
|
6926
6802
|
var QtiResponseIf = class extends QtiResponseElse {
|
|
@@ -6942,20 +6818,20 @@ customElements.define("qti-response-if", QtiResponseIf);
|
|
|
6942
6818
|
// src/lib/qti-components/qti-response-processing/qti-response-else/qti-response-if/qti-response-else-if/qti-response-else-if.ts
|
|
6943
6819
|
var QtiResponseElseIf = class extends QtiResponseIf {
|
|
6944
6820
|
render() {
|
|
6945
|
-
return
|
|
6821
|
+
return html42`${super.render()}`;
|
|
6946
6822
|
}
|
|
6947
6823
|
};
|
|
6948
6824
|
customElements.define("qti-response-else-if", QtiResponseElseIf);
|
|
6949
6825
|
|
|
6950
6826
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-and/qti-and.ts
|
|
6951
|
-
import { customElement as
|
|
6827
|
+
import { customElement as customElement42 } from "lit/decorators.js";
|
|
6952
6828
|
var QtiAnd = class extends qtiAndMixin(QtiConditionExpression) {
|
|
6953
6829
|
calculate() {
|
|
6954
6830
|
return this.calculateChildren(Array.from(this.children));
|
|
6955
6831
|
}
|
|
6956
6832
|
};
|
|
6957
6833
|
QtiAnd = __decorateClass([
|
|
6958
|
-
|
|
6834
|
+
customElement42("qti-and")
|
|
6959
6835
|
], QtiAnd);
|
|
6960
6836
|
function qtiAndMixin(Base) {
|
|
6961
6837
|
return class MockQtiAnd extends Base {
|
|
@@ -6992,7 +6868,7 @@ function qtiAndMixin(Base) {
|
|
|
6992
6868
|
}
|
|
6993
6869
|
|
|
6994
6870
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-basevalue/qti-basevalue.ts
|
|
6995
|
-
import { property as
|
|
6871
|
+
import { property as property27 } from "lit/decorators.js";
|
|
6996
6872
|
var QtiBaseValue = class extends QtiExpression {
|
|
6997
6873
|
constructor() {
|
|
6998
6874
|
super(...arguments);
|
|
@@ -7004,7 +6880,7 @@ var QtiBaseValue = class extends QtiExpression {
|
|
|
7004
6880
|
}
|
|
7005
6881
|
};
|
|
7006
6882
|
__decorateClass([
|
|
7007
|
-
|
|
6883
|
+
property27({ type: String, attribute: "base-type" })
|
|
7008
6884
|
], QtiBaseValue.prototype, "baseType", 2);
|
|
7009
6885
|
customElements.define("qti-base-value", QtiBaseValue);
|
|
7010
6886
|
|
|
@@ -7084,8 +6960,8 @@ var QtiCorrect = class extends QtiExpression {
|
|
|
7084
6960
|
customElements.define("qti-correct", QtiCorrect);
|
|
7085
6961
|
|
|
7086
6962
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-default/qti-default.ts
|
|
7087
|
-
import { property as
|
|
7088
|
-
import { consume as
|
|
6963
|
+
import { property as property28, state as state14 } from "lit/decorators.js";
|
|
6964
|
+
import { consume as consume6 } from "@lit/context";
|
|
7089
6965
|
var QtiDefault = class extends QtiExpression {
|
|
7090
6966
|
constructor() {
|
|
7091
6967
|
super(...arguments);
|
|
@@ -7135,20 +7011,20 @@ var QtiDefault = class extends QtiExpression {
|
|
|
7135
7011
|
}
|
|
7136
7012
|
};
|
|
7137
7013
|
__decorateClass([
|
|
7138
|
-
|
|
7014
|
+
property28({ type: String })
|
|
7139
7015
|
], QtiDefault.prototype, "identifier", 2);
|
|
7140
7016
|
__decorateClass([
|
|
7141
|
-
|
|
7142
|
-
|
|
7017
|
+
consume6({ context: itemContext, subscribe: true }),
|
|
7018
|
+
state14()
|
|
7143
7019
|
], QtiDefault.prototype, "context", 2);
|
|
7144
7020
|
__decorateClass([
|
|
7145
|
-
|
|
7146
|
-
|
|
7021
|
+
state14(),
|
|
7022
|
+
consume6({ context: testContext, subscribe: true })
|
|
7147
7023
|
], QtiDefault.prototype, "_testContext", 2);
|
|
7148
7024
|
customElements.define("qti-default", QtiDefault);
|
|
7149
7025
|
|
|
7150
7026
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-equal-rounded/qti-equal-rounded.ts
|
|
7151
|
-
import { property as
|
|
7027
|
+
import { property as property29 } from "lit/decorators.js";
|
|
7152
7028
|
var QtiEqualRounded = class extends QtiExpression {
|
|
7153
7029
|
constructor() {
|
|
7154
7030
|
super(...arguments);
|
|
@@ -7215,7 +7091,7 @@ var QtiEqualRounded = class extends QtiExpression {
|
|
|
7215
7091
|
}
|
|
7216
7092
|
};
|
|
7217
7093
|
__decorateClass([
|
|
7218
|
-
|
|
7094
|
+
property29({ type: String })
|
|
7219
7095
|
], QtiEqualRounded.prototype, "roundingMode", 2);
|
|
7220
7096
|
customElements.define("qti-equal-rounded", QtiEqualRounded);
|
|
7221
7097
|
|
|
@@ -7266,7 +7142,7 @@ var QtiRound = class extends QtiExpression {
|
|
|
7266
7142
|
customElements.define("qti-round", QtiRound);
|
|
7267
7143
|
|
|
7268
7144
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-round-to/qti-round-to.ts
|
|
7269
|
-
import { property as
|
|
7145
|
+
import { property as property30 } from "lit/decorators.js";
|
|
7270
7146
|
var QtiRoundTo = class extends QtiExpression {
|
|
7271
7147
|
constructor() {
|
|
7272
7148
|
super(...arguments);
|
|
@@ -7348,15 +7224,15 @@ var QtiRoundTo = class extends QtiExpression {
|
|
|
7348
7224
|
}
|
|
7349
7225
|
};
|
|
7350
7226
|
__decorateClass([
|
|
7351
|
-
|
|
7227
|
+
property30({ type: String, attribute: "rounding-mode" })
|
|
7352
7228
|
], QtiRoundTo.prototype, "roundingMode", 2);
|
|
7353
7229
|
__decorateClass([
|
|
7354
|
-
|
|
7230
|
+
property30({ type: Number })
|
|
7355
7231
|
], QtiRoundTo.prototype, "figures", 2);
|
|
7356
7232
|
customElements.define("qti-round-to", QtiRoundTo);
|
|
7357
7233
|
|
|
7358
7234
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-equal/qti-equal.ts
|
|
7359
|
-
import { property as
|
|
7235
|
+
import { property as property31 } from "lit/decorators.js";
|
|
7360
7236
|
var QtiEqual = class extends QtiExpression {
|
|
7361
7237
|
constructor() {
|
|
7362
7238
|
super(...arguments);
|
|
@@ -7382,7 +7258,7 @@ var QtiEqual = class extends QtiExpression {
|
|
|
7382
7258
|
}
|
|
7383
7259
|
};
|
|
7384
7260
|
__decorateClass([
|
|
7385
|
-
|
|
7261
|
+
property31({ type: String })
|
|
7386
7262
|
], QtiEqual.prototype, "toleranceMode", 2);
|
|
7387
7263
|
customElements.define("qti-equal", QtiEqual);
|
|
7388
7264
|
|
|
@@ -7613,7 +7489,7 @@ var QtiLte = class extends QtiConditionExpression {
|
|
|
7613
7489
|
customElements.define("qti-lte", QtiLte);
|
|
7614
7490
|
|
|
7615
7491
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-map-response/qti-map-response.ts
|
|
7616
|
-
import { property as
|
|
7492
|
+
import { property as property32 } from "lit/decorators.js";
|
|
7617
7493
|
var QtiMapResponse = class extends QtiExpression {
|
|
7618
7494
|
getResult() {
|
|
7619
7495
|
const response = this.context.variables.find((r) => r.identifier === this.identifier);
|
|
@@ -7657,12 +7533,12 @@ var QtiMapResponse = class extends QtiExpression {
|
|
|
7657
7533
|
}
|
|
7658
7534
|
};
|
|
7659
7535
|
__decorateClass([
|
|
7660
|
-
|
|
7536
|
+
property32({ type: String })
|
|
7661
7537
|
], QtiMapResponse.prototype, "identifier", 2);
|
|
7662
7538
|
customElements.define("qti-map-response", QtiMapResponse);
|
|
7663
7539
|
|
|
7664
7540
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-map-response-point/qti-map-response-point.ts
|
|
7665
|
-
import { property as
|
|
7541
|
+
import { property as property33 } from "lit/decorators.js";
|
|
7666
7542
|
var QtiMapResponsePoint = class extends QtiExpression {
|
|
7667
7543
|
getResult() {
|
|
7668
7544
|
const response = this.context.variables.find((r) => r.identifier === this.identifier);
|
|
@@ -7711,12 +7587,12 @@ var QtiMapResponsePoint = class extends QtiExpression {
|
|
|
7711
7587
|
}
|
|
7712
7588
|
};
|
|
7713
7589
|
__decorateClass([
|
|
7714
|
-
|
|
7590
|
+
property33({ type: String })
|
|
7715
7591
|
], QtiMapResponsePoint.prototype, "identifier", 2);
|
|
7716
7592
|
customElements.define("qti-map-response-point", QtiMapResponsePoint);
|
|
7717
7593
|
|
|
7718
7594
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-math-operator/qti-math-operator.ts
|
|
7719
|
-
import { property as
|
|
7595
|
+
import { property as property34 } from "lit/decorators.js";
|
|
7720
7596
|
var QtiMathOperator = class extends QtiExpression {
|
|
7721
7597
|
constructor() {
|
|
7722
7598
|
super(...arguments);
|
|
@@ -7871,7 +7747,7 @@ var QtiMathOperator = class extends QtiExpression {
|
|
|
7871
7747
|
}
|
|
7872
7748
|
};
|
|
7873
7749
|
__decorateClass([
|
|
7874
|
-
|
|
7750
|
+
property34({ type: String })
|
|
7875
7751
|
], QtiMathOperator.prototype, "name", 2);
|
|
7876
7752
|
customElements.define("qti-math-operator", QtiMathOperator);
|
|
7877
7753
|
|
|
@@ -8015,10 +7891,10 @@ var QtiMultiple = class extends QtiExpression {
|
|
|
8015
7891
|
customElements.define("qti-multiple", QtiMultiple);
|
|
8016
7892
|
|
|
8017
7893
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-not/qti-not.ts
|
|
8018
|
-
import { html as
|
|
7894
|
+
import { html as html43 } from "lit";
|
|
8019
7895
|
var QtiNot = class extends QtiExpression {
|
|
8020
7896
|
render() {
|
|
8021
|
-
return
|
|
7897
|
+
return html43`${super.render()}`;
|
|
8022
7898
|
}
|
|
8023
7899
|
getResult() {
|
|
8024
7900
|
const expression = this.firstElementChild;
|
|
@@ -8154,13 +8030,13 @@ var QtiPower = class extends QtiExpression {
|
|
|
8154
8030
|
customElements.define("qti-power", QtiPower);
|
|
8155
8031
|
|
|
8156
8032
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-printed-variable/qti-printed-variable.ts
|
|
8157
|
-
import { consume as
|
|
8158
|
-
import { LitElement as
|
|
8159
|
-
import { property as
|
|
8160
|
-
var QtiPrintedVariable = class extends
|
|
8033
|
+
import { consume as consume7 } from "@lit/context";
|
|
8034
|
+
import { LitElement as LitElement23, html as html44, nothing as nothing4 } from "lit";
|
|
8035
|
+
import { property as property35, state as state15 } from "lit/decorators.js";
|
|
8036
|
+
var QtiPrintedVariable = class extends LitElement23 {
|
|
8161
8037
|
render() {
|
|
8162
8038
|
const value = this.context?.variables.find((v) => v.identifier === this.identifier)?.value;
|
|
8163
|
-
return value === null ? nothing4 :
|
|
8039
|
+
return value === null ? nothing4 : html44`${JSON.stringify(value, null, 2)}`;
|
|
8164
8040
|
}
|
|
8165
8041
|
calculate() {
|
|
8166
8042
|
const result = this.context.variables.find((v) => v.identifier === this.identifier) || null;
|
|
@@ -8168,11 +8044,11 @@ var QtiPrintedVariable = class extends LitElement24 {
|
|
|
8168
8044
|
}
|
|
8169
8045
|
};
|
|
8170
8046
|
__decorateClass([
|
|
8171
|
-
|
|
8047
|
+
property35({ type: String })
|
|
8172
8048
|
], QtiPrintedVariable.prototype, "identifier", 2);
|
|
8173
8049
|
__decorateClass([
|
|
8174
|
-
|
|
8175
|
-
|
|
8050
|
+
consume7({ context: itemContext, subscribe: true }),
|
|
8051
|
+
state15()
|
|
8176
8052
|
], QtiPrintedVariable.prototype, "context", 2);
|
|
8177
8053
|
customElements.define("qti-printed-variable", QtiPrintedVariable);
|
|
8178
8054
|
|
|
@@ -8228,11 +8104,8 @@ function qtiSubtractMixin(Base) {
|
|
|
8228
8104
|
};
|
|
8229
8105
|
}
|
|
8230
8106
|
|
|
8231
|
-
// src/lib/qti-components/qti-response-processing/qti-expression/qti-subtract/index.ts
|
|
8232
|
-
customElements.define("qti-subtract", QtiSubtract);
|
|
8233
|
-
|
|
8234
8107
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-string-match/qti-string-match.ts
|
|
8235
|
-
import { property as
|
|
8108
|
+
import { property as property36 } from "lit/decorators.js";
|
|
8236
8109
|
var QtiStringMatch = class extends QtiExpression {
|
|
8237
8110
|
constructor() {
|
|
8238
8111
|
super(...arguments);
|
|
@@ -8256,7 +8129,7 @@ var QtiStringMatch = class extends QtiExpression {
|
|
|
8256
8129
|
}
|
|
8257
8130
|
};
|
|
8258
8131
|
__decorateClass([
|
|
8259
|
-
|
|
8132
|
+
property36({ type: String, attribute: "case-sensitive" })
|
|
8260
8133
|
], QtiStringMatch.prototype, "caseSensitive", 2);
|
|
8261
8134
|
customElements.define("qti-string-match", QtiStringMatch);
|
|
8262
8135
|
|
|
@@ -8304,7 +8177,7 @@ var QtiVariable = class extends QtiExpression {
|
|
|
8304
8177
|
customElements.define("qti-variable", QtiVariable);
|
|
8305
8178
|
|
|
8306
8179
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-random-integer/qti-random-integer.ts
|
|
8307
|
-
import { property as
|
|
8180
|
+
import { property as property37 } from "lit/decorators.js";
|
|
8308
8181
|
var QtiRandomInteger = class extends QtiExpression {
|
|
8309
8182
|
constructor() {
|
|
8310
8183
|
super(...arguments);
|
|
@@ -8363,13 +8236,13 @@ var QtiRandomInteger = class extends QtiExpression {
|
|
|
8363
8236
|
}
|
|
8364
8237
|
};
|
|
8365
8238
|
__decorateClass([
|
|
8366
|
-
|
|
8239
|
+
property37({ type: Number })
|
|
8367
8240
|
], QtiRandomInteger.prototype, "min", 2);
|
|
8368
8241
|
__decorateClass([
|
|
8369
|
-
|
|
8242
|
+
property37({ type: Number })
|
|
8370
8243
|
], QtiRandomInteger.prototype, "max", 2);
|
|
8371
8244
|
__decorateClass([
|
|
8372
|
-
|
|
8245
|
+
property37({ type: Number })
|
|
8373
8246
|
], QtiRandomInteger.prototype, "step", 2);
|
|
8374
8247
|
customElements.define("qti-random-integer", QtiRandomInteger);
|
|
8375
8248
|
|
|
@@ -8414,7 +8287,7 @@ var QtiDelete = class extends QtiExpression {
|
|
|
8414
8287
|
customElements.define("qti-delete", QtiDelete);
|
|
8415
8288
|
|
|
8416
8289
|
// src/lib/qti-components/qti-response-processing/qti-expression/qti-index/qti-index.ts
|
|
8417
|
-
import { customElement as
|
|
8290
|
+
import { customElement as customElement43, property as property38 } from "lit/decorators.js";
|
|
8418
8291
|
var QtiIndex = class extends QtiExpression {
|
|
8419
8292
|
// Required attribute, can be a number or an identifier
|
|
8420
8293
|
getResult() {
|
|
@@ -8468,28 +8341,28 @@ var QtiIndex = class extends QtiExpression {
|
|
|
8468
8341
|
}
|
|
8469
8342
|
};
|
|
8470
8343
|
__decorateClass([
|
|
8471
|
-
|
|
8344
|
+
property38({ type: String })
|
|
8472
8345
|
], QtiIndex.prototype, "n", 2);
|
|
8473
8346
|
QtiIndex = __decorateClass([
|
|
8474
|
-
|
|
8347
|
+
customElement43("qti-index")
|
|
8475
8348
|
], QtiIndex);
|
|
8476
8349
|
|
|
8477
8350
|
// src/lib/qti-components/qti-rubric-block/qti-content-body.ts
|
|
8478
|
-
import { LitElement as
|
|
8479
|
-
import { customElement as
|
|
8480
|
-
var QtiContentBody = class extends
|
|
8351
|
+
import { LitElement as LitElement24, html as html45 } from "lit";
|
|
8352
|
+
import { customElement as customElement44 } from "lit/decorators.js";
|
|
8353
|
+
var QtiContentBody = class extends LitElement24 {
|
|
8481
8354
|
render() {
|
|
8482
|
-
return
|
|
8355
|
+
return html45`<slot></slot>`;
|
|
8483
8356
|
}
|
|
8484
8357
|
};
|
|
8485
8358
|
QtiContentBody = __decorateClass([
|
|
8486
|
-
|
|
8359
|
+
customElement44("qti-content-body")
|
|
8487
8360
|
], QtiContentBody);
|
|
8488
8361
|
|
|
8489
8362
|
// src/lib/qti-components/qti-rubric-block/qti-rubric-block.ts
|
|
8490
|
-
import { LitElement as
|
|
8491
|
-
import { customElement as
|
|
8492
|
-
var QtiRubricBlock = class extends
|
|
8363
|
+
import { LitElement as LitElement25, css as css35, html as html46 } from "lit";
|
|
8364
|
+
import { customElement as customElement45, property as property39 } from "lit/decorators.js";
|
|
8365
|
+
var QtiRubricBlock = class extends LitElement25 {
|
|
8493
8366
|
handleclassNamesChange() {
|
|
8494
8367
|
const classNames = this.classNames.split(" ");
|
|
8495
8368
|
classNames.forEach((className) => {
|
|
@@ -8516,37 +8389,37 @@ var QtiRubricBlock = class extends LitElement26 {
|
|
|
8516
8389
|
});
|
|
8517
8390
|
}
|
|
8518
8391
|
render() {
|
|
8519
|
-
return
|
|
8392
|
+
return html46`<slot></slot>`;
|
|
8520
8393
|
}
|
|
8521
8394
|
};
|
|
8522
|
-
QtiRubricBlock.styles =
|
|
8395
|
+
QtiRubricBlock.styles = css35`
|
|
8523
8396
|
:host {
|
|
8524
8397
|
display: block;
|
|
8525
8398
|
}
|
|
8526
8399
|
`;
|
|
8527
8400
|
__decorateClass([
|
|
8528
|
-
|
|
8401
|
+
property39({ type: String })
|
|
8529
8402
|
], QtiRubricBlock.prototype, "id", 2);
|
|
8530
8403
|
__decorateClass([
|
|
8531
|
-
|
|
8404
|
+
property39({ type: String })
|
|
8532
8405
|
], QtiRubricBlock.prototype, "use", 2);
|
|
8533
8406
|
__decorateClass([
|
|
8534
|
-
|
|
8407
|
+
property39({ type: String })
|
|
8535
8408
|
], QtiRubricBlock.prototype, "view", 2);
|
|
8536
8409
|
__decorateClass([
|
|
8537
|
-
|
|
8410
|
+
property39({ type: String, attribute: "class" })
|
|
8538
8411
|
], QtiRubricBlock.prototype, "classNames", 2);
|
|
8539
8412
|
__decorateClass([
|
|
8540
8413
|
watch("classNames", { waitUntilFirstUpdate: true })
|
|
8541
8414
|
], QtiRubricBlock.prototype, "handleclassNamesChange", 1);
|
|
8542
8415
|
QtiRubricBlock = __decorateClass([
|
|
8543
|
-
|
|
8416
|
+
customElement45("qti-rubric-block")
|
|
8544
8417
|
], QtiRubricBlock);
|
|
8545
8418
|
|
|
8546
8419
|
// src/lib/qti-components/qti-stylesheet/qti-stylesheet.ts
|
|
8547
|
-
import { LitElement as
|
|
8548
|
-
import { customElement as
|
|
8549
|
-
var QtiStylesheet = class extends
|
|
8420
|
+
import { LitElement as LitElement26 } from "lit";
|
|
8421
|
+
import { customElement as customElement46 } from "lit/decorators.js";
|
|
8422
|
+
var QtiStylesheet = class extends LitElement26 {
|
|
8550
8423
|
constructor() {
|
|
8551
8424
|
super(...arguments);
|
|
8552
8425
|
this.styleElement = null;
|
|
@@ -8596,20 +8469,20 @@ var QtiStylesheet = class extends LitElement27 {
|
|
|
8596
8469
|
}
|
|
8597
8470
|
};
|
|
8598
8471
|
QtiStylesheet = __decorateClass([
|
|
8599
|
-
|
|
8472
|
+
customElement46("qti-stylesheet")
|
|
8600
8473
|
], QtiStylesheet);
|
|
8601
8474
|
|
|
8602
8475
|
// src/lib/qti-components/qti-variable-declaration/qti-outcome-declaration/qti-outcome-declaration.ts
|
|
8603
|
-
import { consume as
|
|
8604
|
-
import { css as
|
|
8605
|
-
import { customElement as
|
|
8476
|
+
import { consume as consume8 } from "@lit/context";
|
|
8477
|
+
import { css as css36, html as html48 } from "lit";
|
|
8478
|
+
import { customElement as customElement48, property as property40, state as state16 } from "lit/decorators.js";
|
|
8606
8479
|
|
|
8607
8480
|
// src/lib/qti-components/qti-variable-declaration/qti-variable-declaration.ts
|
|
8608
|
-
import { html as
|
|
8609
|
-
import { customElement as
|
|
8610
|
-
var QtiVariableDeclaration = class extends
|
|
8481
|
+
import { html as html47, LitElement as LitElement27 } from "lit";
|
|
8482
|
+
import { customElement as customElement47 } from "lit/decorators.js";
|
|
8483
|
+
var QtiVariableDeclaration = class extends LitElement27 {
|
|
8611
8484
|
render() {
|
|
8612
|
-
return
|
|
8485
|
+
return html47`<slot></slot>`;
|
|
8613
8486
|
}
|
|
8614
8487
|
defaultValues(cardinality) {
|
|
8615
8488
|
const htmlValues = Array.from(this.querySelectorAll("qti-default-value > qti-value"));
|
|
@@ -8624,7 +8497,7 @@ var QtiVariableDeclaration = class extends LitElement28 {
|
|
|
8624
8497
|
}
|
|
8625
8498
|
};
|
|
8626
8499
|
QtiVariableDeclaration = __decorateClass([
|
|
8627
|
-
|
|
8500
|
+
customElement47("qti-variabledeclaration")
|
|
8628
8501
|
], QtiVariableDeclaration);
|
|
8629
8502
|
|
|
8630
8503
|
// src/lib/qti-components/qti-variable-declaration/qti-outcome-declaration/qti-outcome-declaration.ts
|
|
@@ -8635,7 +8508,7 @@ var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
|
|
|
8635
8508
|
}
|
|
8636
8509
|
render() {
|
|
8637
8510
|
const value = this.itemContext?.variables.find((v) => v.identifier === this.identifier)?.value;
|
|
8638
|
-
return
|
|
8511
|
+
return html48`${JSON.stringify(value, null, 2)}`;
|
|
8639
8512
|
}
|
|
8640
8513
|
get interpolationTable() {
|
|
8641
8514
|
const table = this.querySelector("qti-interpolation-table");
|
|
@@ -8683,40 +8556,40 @@ var QtiOutcomeDeclaration = class extends QtiVariableDeclaration {
|
|
|
8683
8556
|
}
|
|
8684
8557
|
};
|
|
8685
8558
|
QtiOutcomeDeclaration.styles = [
|
|
8686
|
-
|
|
8559
|
+
css36`
|
|
8687
8560
|
:host {
|
|
8688
8561
|
display: none;
|
|
8689
8562
|
}
|
|
8690
8563
|
`
|
|
8691
8564
|
];
|
|
8692
8565
|
__decorateClass([
|
|
8693
|
-
|
|
8566
|
+
property40({ type: String, attribute: "base-type" })
|
|
8694
8567
|
], QtiOutcomeDeclaration.prototype, "baseType", 2);
|
|
8695
8568
|
__decorateClass([
|
|
8696
|
-
|
|
8569
|
+
property40({ type: String, attribute: "external-scored" })
|
|
8697
8570
|
], QtiOutcomeDeclaration.prototype, "externalScored", 2);
|
|
8698
8571
|
__decorateClass([
|
|
8699
|
-
|
|
8572
|
+
property40({ type: String })
|
|
8700
8573
|
], QtiOutcomeDeclaration.prototype, "identifier", 2);
|
|
8701
8574
|
__decorateClass([
|
|
8702
|
-
|
|
8575
|
+
property40({ type: String })
|
|
8703
8576
|
], QtiOutcomeDeclaration.prototype, "cardinality", 2);
|
|
8704
8577
|
__decorateClass([
|
|
8705
|
-
|
|
8706
|
-
|
|
8578
|
+
consume8({ context: itemContext, subscribe: true }),
|
|
8579
|
+
state16()
|
|
8707
8580
|
], QtiOutcomeDeclaration.prototype, "itemContext", 2);
|
|
8708
8581
|
QtiOutcomeDeclaration = __decorateClass([
|
|
8709
|
-
|
|
8582
|
+
customElement48("qti-outcome-declaration")
|
|
8710
8583
|
], QtiOutcomeDeclaration);
|
|
8711
8584
|
|
|
8712
8585
|
// src/lib/qti-components/qti-variable-declaration/qti-response-declaration/qti-response-declaration.ts
|
|
8713
|
-
import { consume as
|
|
8714
|
-
import { css as
|
|
8715
|
-
import { customElement as
|
|
8586
|
+
import { consume as consume9 } from "@lit/context";
|
|
8587
|
+
import { css as css37, html as html49 } from "lit";
|
|
8588
|
+
import { customElement as customElement49, property as property41, state as state17 } from "lit/decorators.js";
|
|
8716
8589
|
var QtiResponseDeclaration = class extends QtiVariableDeclaration {
|
|
8717
8590
|
render() {
|
|
8718
8591
|
const value = this.itemContext?.variables.find((v) => v.identifier === this.identifier)?.value;
|
|
8719
|
-
return
|
|
8592
|
+
return html49`${JSON.stringify(value, null, 2)}`;
|
|
8720
8593
|
}
|
|
8721
8594
|
connectedCallback() {
|
|
8722
8595
|
super.connectedCallback();
|
|
@@ -8798,27 +8671,27 @@ var QtiResponseDeclaration = class extends QtiVariableDeclaration {
|
|
|
8798
8671
|
}
|
|
8799
8672
|
};
|
|
8800
8673
|
QtiResponseDeclaration.styles = [
|
|
8801
|
-
|
|
8674
|
+
css37`
|
|
8802
8675
|
:host {
|
|
8803
8676
|
display: none;
|
|
8804
8677
|
}
|
|
8805
8678
|
`
|
|
8806
8679
|
];
|
|
8807
8680
|
__decorateClass([
|
|
8808
|
-
|
|
8681
|
+
property41({ type: String, attribute: "base-type" })
|
|
8809
8682
|
], QtiResponseDeclaration.prototype, "baseType", 2);
|
|
8810
8683
|
__decorateClass([
|
|
8811
|
-
|
|
8684
|
+
property41({ type: String })
|
|
8812
8685
|
], QtiResponseDeclaration.prototype, "identifier", 2);
|
|
8813
8686
|
__decorateClass([
|
|
8814
|
-
|
|
8687
|
+
property41({ type: String })
|
|
8815
8688
|
], QtiResponseDeclaration.prototype, "cardinality", 2);
|
|
8816
8689
|
__decorateClass([
|
|
8817
|
-
|
|
8818
|
-
|
|
8690
|
+
consume9({ context: itemContext, subscribe: true }),
|
|
8691
|
+
state17()
|
|
8819
8692
|
], QtiResponseDeclaration.prototype, "itemContext", 2);
|
|
8820
8693
|
QtiResponseDeclaration = __decorateClass([
|
|
8821
|
-
|
|
8694
|
+
customElement49("qti-response-declaration")
|
|
8822
8695
|
], QtiResponseDeclaration);
|
|
8823
8696
|
|
|
8824
8697
|
export {
|
|
@@ -8828,7 +8701,6 @@ export {
|
|
|
8828
8701
|
QtiCustomOperator,
|
|
8829
8702
|
QtiFeedbackBlock,
|
|
8830
8703
|
QtiFeedbackInline,
|
|
8831
|
-
QtiModalFeedback,
|
|
8832
8704
|
QtiAssociableHotspot,
|
|
8833
8705
|
QtiAssociateInteraction,
|
|
8834
8706
|
QtiChoiceInteraction,
|
|
@@ -8920,4 +8792,4 @@ export {
|
|
|
8920
8792
|
QtiOutcomeDeclaration,
|
|
8921
8793
|
QtiResponseDeclaration
|
|
8922
8794
|
};
|
|
8923
|
-
//# sourceMappingURL=chunk-
|
|
8795
|
+
//# sourceMappingURL=chunk-7RW7LCEJ.js.map
|