labmaker-plugin 0.0.356 → 0.0.358
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/dist/labmaker-plugin.js +18 -7
- package/dist/labmaker-plugin.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/labmaker-plugin.js
CHANGED
|
@@ -65,7 +65,11 @@ const nf = {
|
|
|
65
65
|
data() {
|
|
66
66
|
return {};
|
|
67
67
|
},
|
|
68
|
-
computed: {
|
|
68
|
+
computed: {
|
|
69
|
+
imageSrc() {
|
|
70
|
+
return this.content.src.slice(-3) === "gif" ? `${this.content.src}?src=${Math.round(Math.random() * Date.now())}` : this.content.src;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
69
73
|
methods: {
|
|
70
74
|
pixelFormat(A) {
|
|
71
75
|
return this.stepperStore.pixelFormat(A);
|
|
@@ -83,7 +87,7 @@ function vf(A, c, e, a, r, t) {
|
|
|
83
87
|
return C(), w("div", of, [
|
|
84
88
|
M("div", lf, [
|
|
85
89
|
M("img", {
|
|
86
|
-
src:
|
|
90
|
+
src: t.imageSrc,
|
|
87
91
|
alt: e.content.alt,
|
|
88
92
|
class: D(e.content.class)
|
|
89
93
|
}, null, 10, ff),
|
|
@@ -105,7 +109,7 @@ function vf(A, c, e, a, r, t) {
|
|
|
105
109
|
])
|
|
106
110
|
]);
|
|
107
111
|
}
|
|
108
|
-
const pf = /* @__PURE__ */ a2(nf, [["render", vf], ["__scopeId", "data-v-
|
|
112
|
+
const pf = /* @__PURE__ */ a2(nf, [["render", vf], ["__scopeId", "data-v-3cf7df18"]]);
|
|
109
113
|
const df = {
|
|
110
114
|
props: ["content"],
|
|
111
115
|
data() {
|
|
@@ -883,7 +887,7 @@ const Fu = {
|
|
|
883
887
|
return this.stepperStore.getShowFeedbackAttempts;
|
|
884
888
|
},
|
|
885
889
|
feedbackHeader() {
|
|
886
|
-
return this.stepperStore.getShowFeedbackAttempts ? "Too
|
|
890
|
+
return this.stepperStore.getShowFeedbackAttempts && !this.content.feedbackHeader ? "Too Many Attempts" : this.content.feedbackHeader;
|
|
887
891
|
},
|
|
888
892
|
feedbackWidth() {
|
|
889
893
|
return this.content.feedbackWidth ? this.content.feedbackWidth : "50%";
|
|
@@ -1683,6 +1687,13 @@ const vh = {
|
|
|
1683
1687
|
},
|
|
1684
1688
|
showFeedback() {
|
|
1685
1689
|
return !!this.stepperStore.getShowFeedback;
|
|
1690
|
+
},
|
|
1691
|
+
renderMath() {
|
|
1692
|
+
this.$mathjax && MathJax.typesetPromise().then(() => {
|
|
1693
|
+
console.log("MathJax typesetting done!");
|
|
1694
|
+
}).catch((A) => {
|
|
1695
|
+
console.error("MathJax typesetting failed:", A);
|
|
1696
|
+
});
|
|
1686
1697
|
}
|
|
1687
1698
|
},
|
|
1688
1699
|
mounted() {
|
|
@@ -1692,7 +1703,7 @@ const vh = {
|
|
|
1692
1703
|
A[0].focus();
|
|
1693
1704
|
});
|
|
1694
1705
|
}
|
|
1695
|
-
this.content.input && (this.input = this.content.input, this.choicesComplete(!0, this.content.input), this.stepperStore.finishSteps());
|
|
1706
|
+
this.content.input && (this.input = this.content.input, this.choicesComplete(!0, this.content.input), this.stepperStore.finishSteps()), this.renderMath();
|
|
1696
1707
|
},
|
|
1697
1708
|
beforeMount() {
|
|
1698
1709
|
this.stepperStore = this.stepperMain(), this.stepperStore = this.stepperMain(), this.stepperStore.resetSteps("el-textarea__inner"), this.content.attempts && (this.totalAttempts = this.content.attempts);
|
|
@@ -1962,7 +1973,7 @@ const Sh = {
|
|
|
1962
1973
|
return !1;
|
|
1963
1974
|
return !0;
|
|
1964
1975
|
}
|
|
1965
|
-
this.getAttempt < Number(this.content.attempts) ? c(this.selected, this.correctChoices) ? (this.stepperStore.showFeedback = !0, this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback, this.choicesComplete(!0)) : (this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback, this.stepperStore.attempts = this.getAttempt + 1) : (c(this.selected, this.correctChoices) || (this.stepperStore.showFeedbackAttempts = !0, this.feedbackObject.feedbackAttempts = this.content.feedbackAttempts, this.selected = this.correctChoices), this.choicesComplete(!1)), this.feedbackIndex = A, this.stepperStore.showFeedback = !0, setTimeout(() => {
|
|
1976
|
+
this.getAttempt < Number(this.content.attempts) ? c(this.selected, this.correctChoices) ? (this.stepperStore.showFeedback = !0, this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback, this.choicesComplete(!0)) : (this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback, this.stepperStore.attempts = this.getAttempt + 1) : (c(this.selected, this.correctChoices) || (this.stepperStore.showFeedbackAttempts = !0, this.feedbackObject.feedbackAttempts = this.content.feedbackAttempts, this.content.failedHeader && (this.feedbackObject.feedbackHeader = this.content.failedHeader), this.selected = this.correctChoices), this.choicesComplete(!1)), this.feedbackIndex = A, this.stepperStore.showFeedback = !0, setTimeout(() => {
|
|
1966
1977
|
document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
|
|
1967
1978
|
});
|
|
1968
1979
|
},
|
|
@@ -2023,7 +2034,7 @@ function Th(A, c, e, a, r, t) {
|
|
|
2023
2034
|
}, null, 8, ["content"])) : y("", !0)
|
|
2024
2035
|
], 2);
|
|
2025
2036
|
}
|
|
2026
|
-
const Dh = /* @__PURE__ */ a2(Sh, [["render", Th], ["__scopeId", "data-v-
|
|
2037
|
+
const Dh = /* @__PURE__ */ a2(Sh, [["render", Th], ["__scopeId", "data-v-958cb42e"]]);
|
|
2027
2038
|
const XA = {
|
|
2028
2039
|
y: {
|
|
2029
2040
|
t: "top",
|