labmaker-plugin 0.0.15 → 0.0.16
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 +1165 -499
- package/dist/labmaker-plugin.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
package/dist/labmaker-plugin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
1
|
+
import { openBlock as a, createElementBlock as u, Fragment as y, createElementVNode as f, toDisplayString as S, resolveComponent as g, createBlock as v, withCtx as _, createVNode as x, withModifiers as A, createTextVNode as T, normalizeClass as w, createCommentVNode as b, normalizeStyle as B, renderList as M, renderSlot as j } from "vue";
|
|
2
|
+
const C = (t, e) => {
|
|
3
|
+
const i = t.__vccOpts || t;
|
|
4
|
+
for (const [r, n] of e)
|
|
5
|
+
i[r] = n;
|
|
6
|
+
return i;
|
|
7
|
+
}, O = {
|
|
8
8
|
props: ["custom-img"],
|
|
9
9
|
data() {
|
|
10
10
|
return {
|
|
@@ -13,32 +13,32 @@ const S = (e, t) => {
|
|
|
13
13
|
},
|
|
14
14
|
computed: {},
|
|
15
15
|
methods: {
|
|
16
|
-
fileUpload(
|
|
17
|
-
const
|
|
18
|
-
this.fileProcess(
|
|
16
|
+
fileUpload(t) {
|
|
17
|
+
const i = t.target.files[0];
|
|
18
|
+
this.fileProcess(i);
|
|
19
19
|
},
|
|
20
|
-
fileProcess(
|
|
21
|
-
this.imgSRC = URL.createObjectURL(
|
|
20
|
+
fileProcess(t) {
|
|
21
|
+
this.imgSRC = URL.createObjectURL(t);
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
mounted() {
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
function
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onChange:
|
|
26
|
+
}, R = /* @__PURE__ */ f("h1", null, "File Uploader", -1), W = { class: "image-uploader" }, q = /* @__PURE__ */ f("h1", null, "File Uploader", -1), P = { class: "your-file" }, V = ["src"];
|
|
27
|
+
function N(t, e, i, r, n, s) {
|
|
28
|
+
return a(), u(y, null, [
|
|
29
|
+
R,
|
|
30
|
+
f("div", W, [
|
|
31
|
+
q,
|
|
32
|
+
f("input", {
|
|
33
|
+
onChange: e[0] || (e[0] = (...l) => s.fileUpload && s.fileUpload(...l)),
|
|
34
34
|
type: "file",
|
|
35
35
|
id: "file-upload",
|
|
36
36
|
name: "fileUpload",
|
|
37
37
|
accept: "image/*"
|
|
38
38
|
}, null, 32),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
src:
|
|
39
|
+
f("div", P, [
|
|
40
|
+
f("img", {
|
|
41
|
+
src: n.imgSRC,
|
|
42
42
|
alt: "",
|
|
43
43
|
scrset: ""
|
|
44
44
|
}, null, 8, V)
|
|
@@ -46,21 +46,21 @@ function E(e, t, s, l, i, n) {
|
|
|
46
46
|
])
|
|
47
47
|
], 64);
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
const
|
|
49
|
+
const X = /* @__PURE__ */ C(O, [["render", N]]);
|
|
50
|
+
const Y = {
|
|
51
51
|
props: ["title"],
|
|
52
52
|
data() {
|
|
53
53
|
return {};
|
|
54
54
|
},
|
|
55
55
|
computed: {}
|
|
56
56
|
};
|
|
57
|
-
function
|
|
58
|
-
return
|
|
59
|
-
|
|
57
|
+
function U(t, e, i, r, n, s) {
|
|
58
|
+
return a(), u("header", null, [
|
|
59
|
+
f("h1", null, S(i.title), 1)
|
|
60
60
|
]);
|
|
61
61
|
}
|
|
62
|
-
const
|
|
63
|
-
const
|
|
62
|
+
const K = /* @__PURE__ */ C(Y, [["render", U]]);
|
|
63
|
+
const G = {
|
|
64
64
|
data() {
|
|
65
65
|
return {};
|
|
66
66
|
},
|
|
@@ -76,31 +76,31 @@ const N = {
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
methods: {
|
|
79
|
-
handleCurrentChange(
|
|
80
|
-
this.$store.commit("setCurrentPage",
|
|
79
|
+
handleCurrentChange(t) {
|
|
80
|
+
this.$store.commit("setCurrentPage", t - 1);
|
|
81
81
|
},
|
|
82
|
-
changePage(
|
|
83
|
-
console.log("headed to: ",
|
|
82
|
+
changePage(t) {
|
|
83
|
+
console.log("headed to: ", t), this.$store.commit("setCurrentPage", t);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
return
|
|
90
|
-
default:
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
function Q(t, e, i, r, n, s) {
|
|
88
|
+
const l = g("el-col"), o = g("el-button"), c = g("el-row");
|
|
89
|
+
return a(), v(c, { gutter: 20 }, {
|
|
90
|
+
default: _(() => [
|
|
91
|
+
x(l, { span: 18 }),
|
|
92
|
+
x(l, {
|
|
93
93
|
span: 6,
|
|
94
94
|
class: "homeButtonContainer"
|
|
95
95
|
}, {
|
|
96
|
-
default:
|
|
97
|
-
|
|
96
|
+
default: _(() => [
|
|
97
|
+
x(o, {
|
|
98
98
|
type: "primary ",
|
|
99
|
-
onClick:
|
|
99
|
+
onClick: e[0] || (e[0] = A((m) => s.changePage(0), ["stop"])),
|
|
100
100
|
class: "homeButton"
|
|
101
101
|
}, {
|
|
102
|
-
default:
|
|
103
|
-
|
|
102
|
+
default: _(() => [
|
|
103
|
+
T("Return to Crime Screen")
|
|
104
104
|
]),
|
|
105
105
|
_: 1
|
|
106
106
|
})
|
|
@@ -111,8 +111,8 @@ function K(e, t, s, l, i, n) {
|
|
|
111
111
|
_: 1
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
const
|
|
115
|
-
const
|
|
114
|
+
const L = /* @__PURE__ */ C(G, [["render", Q]]);
|
|
115
|
+
const J = {
|
|
116
116
|
props: ["content"],
|
|
117
117
|
data() {
|
|
118
118
|
return {};
|
|
@@ -123,8 +123,8 @@ const R = {
|
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
methods: {
|
|
126
|
-
pixelFormat(
|
|
127
|
-
return typeof
|
|
126
|
+
pixelFormat(t) {
|
|
127
|
+
return typeof t == "number" ? t + "px" : t;
|
|
128
128
|
},
|
|
129
129
|
checkStepper() {
|
|
130
130
|
this.$store.dispatch("lastPageFocus", {});
|
|
@@ -133,35 +133,35 @@ const R = {
|
|
|
133
133
|
mounted() {
|
|
134
134
|
this.checkStepper();
|
|
135
135
|
}
|
|
136
|
-
},
|
|
137
|
-
function
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
src:
|
|
142
|
-
alt:
|
|
143
|
-
class:
|
|
144
|
-
}, null, 10,
|
|
145
|
-
|
|
136
|
+
}, Z = { class: "image-container" }, tt = { class: "image" }, et = ["src", "alt"], it = ["innerHTML"], st = ["innerHTML"], nt = ["innerHTML"];
|
|
137
|
+
function ot(t, e, i, r, n, s) {
|
|
138
|
+
return a(), u("div", Z, [
|
|
139
|
+
f("div", tt, [
|
|
140
|
+
f("img", {
|
|
141
|
+
src: i.content.src,
|
|
142
|
+
alt: i.content.alt,
|
|
143
|
+
class: w(i.content.class)
|
|
144
|
+
}, null, 10, et),
|
|
145
|
+
i.content.captionHeader ? (a(), u("span", {
|
|
146
146
|
key: 0,
|
|
147
147
|
class: "captionHeader",
|
|
148
|
-
innerHTML:
|
|
149
|
-
}, null, 8,
|
|
150
|
-
|
|
148
|
+
innerHTML: i.content.captionHeader
|
|
149
|
+
}, null, 8, it)) : b("", !0),
|
|
150
|
+
i.content.caption ? (a(), u("span", {
|
|
151
151
|
key: 1,
|
|
152
152
|
class: "caption",
|
|
153
|
-
innerHTML:
|
|
154
|
-
}, null, 8,
|
|
155
|
-
|
|
153
|
+
innerHTML: i.content.caption
|
|
154
|
+
}, null, 8, st)) : b("", !0),
|
|
155
|
+
i.content.copyright ? (a(), u("span", {
|
|
156
156
|
key: 2,
|
|
157
|
-
innerHTML:
|
|
157
|
+
innerHTML: i.content.copyright,
|
|
158
158
|
class: "copyright"
|
|
159
|
-
}, null, 8,
|
|
159
|
+
}, null, 8, nt)) : b("", !0)
|
|
160
160
|
])
|
|
161
161
|
]);
|
|
162
162
|
}
|
|
163
|
-
const
|
|
164
|
-
const
|
|
163
|
+
const rt = /* @__PURE__ */ C(J, [["render", ot], ["__scopeId", "data-v-6d545532"]]);
|
|
164
|
+
const at = {
|
|
165
165
|
props: ["content"],
|
|
166
166
|
//moduleLessonPage
|
|
167
167
|
data() {
|
|
@@ -185,14 +185,14 @@ const se = {
|
|
|
185
185
|
kHeight() {
|
|
186
186
|
if (this.content.kalturaType === "video")
|
|
187
187
|
if (this.content.height && this.content.height != "") {
|
|
188
|
-
let
|
|
189
|
-
return
|
|
188
|
+
let t = this.content.height;
|
|
189
|
+
return t.slice(-2) === "px" ? t.slice(0, -2) : this.content.height;
|
|
190
190
|
} else
|
|
191
191
|
return this.video.height;
|
|
192
192
|
else if (this.content.kalturaType === "audio")
|
|
193
193
|
if (this.content.height && this.content.height != "") {
|
|
194
|
-
let
|
|
195
|
-
return
|
|
194
|
+
let t = this.content.height;
|
|
195
|
+
return t.slice(-2) === "px" ? t.slice(0, -2) : this.content.height;
|
|
196
196
|
} else
|
|
197
197
|
return this.audio.height;
|
|
198
198
|
else if (this.content.kalturaType === "audiobtn")
|
|
@@ -201,8 +201,8 @@ const se = {
|
|
|
201
201
|
kWidth() {
|
|
202
202
|
if (this.content.kalturaType === "video")
|
|
203
203
|
if (this.content.width && this.content.width != "") {
|
|
204
|
-
let
|
|
205
|
-
return
|
|
204
|
+
let t = this.content.width;
|
|
205
|
+
return t.slice(-2) === "px" ? t.slice(0, -2) : this.content.width;
|
|
206
206
|
} else
|
|
207
207
|
return this.video.width;
|
|
208
208
|
else {
|
|
@@ -214,8 +214,8 @@ const se = {
|
|
|
214
214
|
}
|
|
215
215
|
},
|
|
216
216
|
methods: {
|
|
217
|
-
getButtonText(
|
|
218
|
-
return
|
|
217
|
+
getButtonText(t) {
|
|
218
|
+
return t === "video" ? this.showingText ? "Show Video" : "Show Text Version" : this.showingText ? "Show Audio" : "Show Text Version";
|
|
219
219
|
},
|
|
220
220
|
textVersionCheck() {
|
|
221
221
|
this.content.textVersion && this.content.textVersion.length > 1 && (this.hasText = !0);
|
|
@@ -223,8 +223,8 @@ const se = {
|
|
|
223
223
|
kalturaLoad() {
|
|
224
224
|
this.textVersionCheck();
|
|
225
225
|
},
|
|
226
|
-
kalturaMedia(
|
|
227
|
-
let
|
|
226
|
+
kalturaMedia(t) {
|
|
227
|
+
let e = {
|
|
228
228
|
uiconf_id: "35766781",
|
|
229
229
|
partner_id: "2061901",
|
|
230
230
|
entry_id: "",
|
|
@@ -232,7 +232,7 @@ const se = {
|
|
|
232
232
|
width: "640",
|
|
233
233
|
type: "video"
|
|
234
234
|
};
|
|
235
|
-
return
|
|
235
|
+
return e.entry_id = this.content.kalturaEntryId, this.content.kalturaType && (e.type = this.content.kalturaType), e.type === "audio" ? e.uiconf_id = "36511471" : e.type === "audiobtn" ? e.uiconf_id = "36582731" : e.type === "videocc" && (e.uiconf_id = "35766781"), this.content.standalone && this.$store.commit("setStepHold", !1), "https://cdnapisec.kaltura.com/p/" + e.partner_id + "/sp/" + e.partner_id + "00/embedIframeJs/uiconf_id/" + e.uiconf_id + "/partner_id/" + e.partner_id + "?iframeembed=true&playerId=Kaltura&entry_id=" + e.entry_id;
|
|
236
236
|
},
|
|
237
237
|
showKaltura() {
|
|
238
238
|
this.showingKaltura = !0;
|
|
@@ -241,23 +241,23 @@ const se = {
|
|
|
241
241
|
this.showingText = !this.showingText, this.buttonText = !this.buttonText;
|
|
242
242
|
},
|
|
243
243
|
tvCleaner() {
|
|
244
|
-
let
|
|
245
|
-
|
|
246
|
-
for (let
|
|
247
|
-
let
|
|
248
|
-
if (
|
|
249
|
-
for (let
|
|
250
|
-
let
|
|
251
|
-
if (
|
|
252
|
-
let
|
|
253
|
-
heading:
|
|
254
|
-
body:
|
|
244
|
+
let t = document.createElement("div");
|
|
245
|
+
t.innerHTML = this.content.textVersion;
|
|
246
|
+
for (let e = 0; e < t.children.length; e++) {
|
|
247
|
+
let i = t.children[e];
|
|
248
|
+
if (i.tagName == "DIV" && i.className == "panel-default" && i.children[0].dataset.toggle)
|
|
249
|
+
for (let r = 0; r < i.children.length; r++) {
|
|
250
|
+
let n = i.children[r];
|
|
251
|
+
if (n.dataset.toggle == "collapse") {
|
|
252
|
+
let s = {
|
|
253
|
+
heading: n.innerHTML,
|
|
254
|
+
body: i.children[r + 1].innerHTML
|
|
255
255
|
};
|
|
256
|
-
this.textversionArray[
|
|
256
|
+
this.textversionArray[e] = s;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
else
|
|
260
|
-
this.textversionArray[
|
|
260
|
+
this.textversionArray[e] = i.outerHTML;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
},
|
|
@@ -266,96 +266,96 @@ const se = {
|
|
|
266
266
|
},
|
|
267
267
|
mounted() {
|
|
268
268
|
}
|
|
269
|
-
},
|
|
269
|
+
}, ct = {
|
|
270
270
|
key: 0,
|
|
271
271
|
class: "textVersion"
|
|
272
|
-
},
|
|
272
|
+
}, lt = /* @__PURE__ */ f("h1", null, "Text Version", -1), ht = ["innerHTML"], ut = ["src", "width", "height"], dt = ["src", "width", "height"], mt = ["src", "width", "height"], ft = {
|
|
273
273
|
key: 2,
|
|
274
274
|
class: "alert alert-danger"
|
|
275
275
|
};
|
|
276
|
-
function
|
|
277
|
-
const
|
|
278
|
-
return
|
|
279
|
-
class:
|
|
276
|
+
function pt(t, e, i, r, n, s) {
|
|
277
|
+
const l = g("el-button");
|
|
278
|
+
return a(), u("div", {
|
|
279
|
+
class: w(["kContainer", i.content.class])
|
|
280
280
|
}, [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
innerHTML:
|
|
285
|
-
}, null, 8,
|
|
286
|
-
])) :
|
|
287
|
-
!
|
|
281
|
+
i.content.textVersion && n.showingText ? (a(), u("div", ct, [
|
|
282
|
+
lt,
|
|
283
|
+
f("div", {
|
|
284
|
+
innerHTML: i.content.textVersion
|
|
285
|
+
}, null, 8, ht)
|
|
286
|
+
])) : b("", !0),
|
|
287
|
+
!n.showingText && i.content.kalturaEntryId ? (a(), u("div", {
|
|
288
288
|
key: 1,
|
|
289
289
|
class: "mainVersion",
|
|
290
|
-
style:
|
|
290
|
+
style: B({ width: s.kWidth + "px", height: s.kHeight + "px" })
|
|
291
291
|
}, [
|
|
292
|
-
|
|
292
|
+
i.content.kalturaType == "video" && !n.showingKaltura ? (a(), u("div", {
|
|
293
293
|
key: 0,
|
|
294
|
-
class:
|
|
295
|
-
style:
|
|
294
|
+
class: w(["kPoster", { active: n.showingKaltura == !0 }]),
|
|
295
|
+
style: B({ width: s.kWidth + "px", height: s.kHeight + "px" })
|
|
296
296
|
}, [
|
|
297
|
-
|
|
298
|
-
onClick:
|
|
297
|
+
f("iframe", {
|
|
298
|
+
onClick: e[0] || (e[0] = (...o) => s.showKaltura && s.showKaltura(...o)),
|
|
299
299
|
class: "videoIframe",
|
|
300
|
-
src:
|
|
301
|
-
width:
|
|
302
|
-
height:
|
|
300
|
+
src: s.kalturaMedia(i.content),
|
|
301
|
+
width: s.kWidth + "px",
|
|
302
|
+
height: s.kHeight + "px",
|
|
303
303
|
allowfullscreen: "",
|
|
304
304
|
webkitallowfullscreen: "",
|
|
305
305
|
mozAllowFullScreen: "",
|
|
306
306
|
frameborder: "0"
|
|
307
|
-
}, null, 8,
|
|
308
|
-
], 6)) :
|
|
309
|
-
|
|
307
|
+
}, null, 8, ut)
|
|
308
|
+
], 6)) : b("", !0),
|
|
309
|
+
i.content.kalturaType == "audio" ? (a(), u("div", {
|
|
310
310
|
key: 1,
|
|
311
|
-
class:
|
|
312
|
-
onClick:
|
|
311
|
+
class: w(["kAudio", { active: n.showingKaltura == !0 }]),
|
|
312
|
+
onClick: e[1] || (e[1] = (...o) => s.showKaltura && s.showKaltura(...o))
|
|
313
313
|
}, [
|
|
314
|
-
|
|
314
|
+
f("iframe", {
|
|
315
315
|
id: "my_iframe",
|
|
316
|
-
src:
|
|
317
|
-
width:
|
|
318
|
-
height:
|
|
316
|
+
src: s.kalturaMedia(i.content),
|
|
317
|
+
width: s.kWidth + "px",
|
|
318
|
+
height: s.kHeight + "px",
|
|
319
319
|
allowfullscreen: "",
|
|
320
320
|
webkitallowfullscreen: "",
|
|
321
321
|
mozAllowFullScreen: "",
|
|
322
322
|
frameborder: "0"
|
|
323
|
-
}, null, 8,
|
|
324
|
-
], 2)) :
|
|
325
|
-
|
|
323
|
+
}, null, 8, dt)
|
|
324
|
+
], 2)) : b("", !0),
|
|
325
|
+
i.content.kalturaType == "audiobtn" ? (a(), u("div", {
|
|
326
326
|
key: 2,
|
|
327
|
-
class:
|
|
328
|
-
onClick:
|
|
327
|
+
class: w(["kAudiobtn", { active: n.showingKaltura == !0 }]),
|
|
328
|
+
onClick: e[2] || (e[2] = (...o) => s.showKaltura && s.showKaltura(...o))
|
|
329
329
|
}, [
|
|
330
|
-
|
|
331
|
-
src:
|
|
332
|
-
width:
|
|
333
|
-
height:
|
|
330
|
+
f("iframe", {
|
|
331
|
+
src: s.kalturaMedia(i.content),
|
|
332
|
+
width: n.audioBtn.width + "px",
|
|
333
|
+
height: n.audioBtn.height + "px",
|
|
334
334
|
allowfullscreen: "",
|
|
335
335
|
webkitallowfullscreen: "",
|
|
336
336
|
mozAllowFullScreen: "",
|
|
337
337
|
frameborder: "0"
|
|
338
|
-
}, null, 8,
|
|
339
|
-
], 2)) :
|
|
340
|
-
], 4)) :
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
}, null, 8, mt)
|
|
339
|
+
], 2)) : b("", !0)
|
|
340
|
+
], 4)) : b("", !0),
|
|
341
|
+
i.content.kalturaEntryId == "" ? (a(), u("div", ft, "There is no Kaltura Entry ID")) : b("", !0),
|
|
342
|
+
i.content.textVersion ? (a(), v(l, {
|
|
343
343
|
key: 3,
|
|
344
344
|
size: "medium",
|
|
345
345
|
type: "primary",
|
|
346
346
|
"aria-label": "text version",
|
|
347
347
|
class: "toggleSwitch ftSwitch btn btn-primary vidText",
|
|
348
|
-
onClick:
|
|
348
|
+
onClick: e[3] || (e[3] = A((o) => s.showText(i.content.kalturaType), ["stop"]))
|
|
349
349
|
}, {
|
|
350
|
-
default:
|
|
351
|
-
|
|
350
|
+
default: _(() => [
|
|
351
|
+
T(S(s.getButtonText(i.content.kalturaType)), 1)
|
|
352
352
|
]),
|
|
353
353
|
_: 1
|
|
354
|
-
})) :
|
|
354
|
+
})) : b("", !0)
|
|
355
355
|
], 2);
|
|
356
356
|
}
|
|
357
|
-
const
|
|
358
|
-
const
|
|
357
|
+
const gt = /* @__PURE__ */ C(at, [["render", pt]]);
|
|
358
|
+
const bt = {
|
|
359
359
|
props: ["content"],
|
|
360
360
|
data() {
|
|
361
361
|
return {
|
|
@@ -380,64 +380,64 @@ const de = {
|
|
|
380
380
|
},
|
|
381
381
|
mounted() {
|
|
382
382
|
}
|
|
383
|
-
},
|
|
384
|
-
function
|
|
385
|
-
const
|
|
386
|
-
return
|
|
387
|
-
width:
|
|
388
|
-
modelValue:
|
|
389
|
-
"onUpdate:modelValue":
|
|
390
|
-
"before-close":
|
|
383
|
+
}, _t = { class: "my-header" }, kt = ["id", "innerHTML"], yt = ["innerHTML"], wt = { key: 1 }, vt = ["src"], xt = ["innerHTML"], Ct = { class: "dialog-footer" };
|
|
384
|
+
function St(t, e, i, r, n, s) {
|
|
385
|
+
const l = g("el-button"), o = g("el-dialog");
|
|
386
|
+
return a(), v(o, {
|
|
387
|
+
width: s.feedbackWidth,
|
|
388
|
+
modelValue: n.show,
|
|
389
|
+
"onUpdate:modelValue": e[1] || (e[1] = (c) => n.show = c),
|
|
390
|
+
"before-close": s.feedbackClose
|
|
391
391
|
}, {
|
|
392
|
-
header:
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
id:
|
|
396
|
-
class:
|
|
397
|
-
innerHTML:
|
|
398
|
-
}, null, 10,
|
|
392
|
+
header: _(({ close: c, titleId: m, titleClass: h }) => [
|
|
393
|
+
f("div", _t, [
|
|
394
|
+
f("h4", {
|
|
395
|
+
id: m,
|
|
396
|
+
class: w(h),
|
|
397
|
+
innerHTML: s.feedbackHeader
|
|
398
|
+
}, null, 10, kt)
|
|
399
399
|
])
|
|
400
400
|
]),
|
|
401
|
-
footer:
|
|
402
|
-
|
|
403
|
-
|
|
401
|
+
footer: _(() => [
|
|
402
|
+
f("span", Ct, [
|
|
403
|
+
x(l, {
|
|
404
404
|
size: "small",
|
|
405
405
|
id: "feedbackClose",
|
|
406
406
|
type: "primary",
|
|
407
|
-
onClick:
|
|
407
|
+
onClick: e[0] || (e[0] = A((c) => s.feedbackClose(), ["stop"]))
|
|
408
408
|
}, {
|
|
409
|
-
default:
|
|
410
|
-
|
|
409
|
+
default: _(() => [
|
|
410
|
+
T("Close")
|
|
411
411
|
]),
|
|
412
412
|
_: 1
|
|
413
413
|
})
|
|
414
414
|
])
|
|
415
415
|
]),
|
|
416
|
-
default:
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
default: _(() => [
|
|
417
|
+
s.getShowFeedbackAttempts ? (a(), u(y, { key: 0 }, [
|
|
418
|
+
i.content.feedbackAttempts ? (a(), u("p", {
|
|
419
419
|
key: 0,
|
|
420
|
-
innerHTML:
|
|
421
|
-
}, null, 8,
|
|
422
|
-
], 64)) : (
|
|
423
|
-
|
|
420
|
+
innerHTML: i.content.feedbackAttempts
|
|
421
|
+
}, null, 8, yt)) : (a(), u("p", wt, "You have tried too many times, the correct answer has been provided for you."))
|
|
422
|
+
], 64)) : (a(), u(y, { key: 1 }, [
|
|
423
|
+
i.content.feedbackImage ? (a(), u("img", {
|
|
424
424
|
key: 0,
|
|
425
425
|
class: "im-ButtonImage",
|
|
426
|
-
src:
|
|
426
|
+
src: i.content.feedbackImage,
|
|
427
427
|
alt: "button image"
|
|
428
|
-
}, null, 8,
|
|
429
|
-
|
|
430
|
-
innerHTML:
|
|
431
|
-
}, null, 8,
|
|
428
|
+
}, null, 8, vt)) : b("", !0),
|
|
429
|
+
f("p", {
|
|
430
|
+
innerHTML: i.content.feedback
|
|
431
|
+
}, null, 8, xt)
|
|
432
432
|
], 64))
|
|
433
433
|
]),
|
|
434
434
|
_: 1
|
|
435
435
|
}, 8, ["width", "modelValue", "before-close"]);
|
|
436
436
|
}
|
|
437
|
-
const
|
|
438
|
-
const
|
|
437
|
+
const I = /* @__PURE__ */ C(bt, [["render", St]]);
|
|
438
|
+
const At = {
|
|
439
439
|
components: {
|
|
440
|
-
Feedback:
|
|
440
|
+
Feedback: I
|
|
441
441
|
},
|
|
442
442
|
inject: ["message"],
|
|
443
443
|
props: ["content"],
|
|
@@ -454,60 +454,60 @@ const we = {
|
|
|
454
454
|
}
|
|
455
455
|
},
|
|
456
456
|
methods: {
|
|
457
|
-
pixelFormat(
|
|
458
|
-
return typeof
|
|
457
|
+
pixelFormat(t) {
|
|
458
|
+
return typeof t == "number" ? t + "px" : t;
|
|
459
459
|
},
|
|
460
|
-
changePage(
|
|
461
|
-
|
|
460
|
+
changePage(t, e) {
|
|
461
|
+
t.pageLink ? this.$store.commit("setCurrentPage", t.pageLink) : t.feedback && (this.feedbackIndex = e, this.feedbackVisibility.indexOf(e) === -1 && this.feedbackVisibility.push(e), this.$store.commit("setShowFeedback", !0), this.content.hotspots.length - 1 === this.feedbackVisibility.length - 1 && (this.$store.commit("setStepHold", !1), this.$store.commit("setStepDone", !0)), setTimeout(() => {
|
|
462
462
|
document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
|
|
463
463
|
}));
|
|
464
464
|
},
|
|
465
|
-
showFeedback(
|
|
466
|
-
return !!(this.$store.getters.getShowFeedback && this.feedbackIndex ===
|
|
465
|
+
showFeedback(t) {
|
|
466
|
+
return !!(this.$store.getters.getShowFeedback && this.feedbackIndex === t);
|
|
467
467
|
}
|
|
468
468
|
},
|
|
469
469
|
beforeMount() {
|
|
470
470
|
this.$store.commit("setStepDone", !1), this.$store.commit("setStepHold", !0);
|
|
471
471
|
}
|
|
472
|
-
},
|
|
473
|
-
function
|
|
474
|
-
const
|
|
475
|
-
return
|
|
476
|
-
|
|
477
|
-
src:
|
|
478
|
-
alt:
|
|
479
|
-
}, null, 8,
|
|
480
|
-
|
|
481
|
-
(
|
|
482
|
-
|
|
483
|
-
type:
|
|
484
|
-
onClick:
|
|
485
|
-
id: "hotspot_" +
|
|
486
|
-
class:
|
|
487
|
-
style:
|
|
488
|
-
icon:
|
|
472
|
+
}, Mt = { class: "imageMarker" }, Tt = ["src", "alt"], Ht = { class: "hotspotArea" }, Bt = ["src", "alt"], zt = { class: "im-buttonText" };
|
|
473
|
+
function $t(t, e, i, r, n, s) {
|
|
474
|
+
const l = g("el-button"), o = g("Feedback");
|
|
475
|
+
return a(), u("div", Mt, [
|
|
476
|
+
f("img", {
|
|
477
|
+
src: i.content.image,
|
|
478
|
+
alt: i.content.imageAlt
|
|
479
|
+
}, null, 8, Tt),
|
|
480
|
+
f("div", Ht, [
|
|
481
|
+
(a(!0), u(y, null, M(i.content.hotspots, (c, m) => (a(), u(y, null, [
|
|
482
|
+
x(l, {
|
|
483
|
+
type: c.buttonType,
|
|
484
|
+
onClick: A((h) => s.changePage(c, m), ["stop"]),
|
|
485
|
+
id: "hotspot_" + m,
|
|
486
|
+
class: w([["is-" + c.buttonShape, { noBG: c.buttonImage }, c.class], "hotspot"]),
|
|
487
|
+
style: B({ top: s.pixelFormat(c.cordinatesX), left: s.pixelFormat(c.cordinatesY), width: s.pixelFormat(c.dimensionsW), height: s.pixelFormat(c.dimensionsH) }),
|
|
488
|
+
icon: c.buttonIcon
|
|
489
489
|
}, {
|
|
490
|
-
default:
|
|
491
|
-
|
|
490
|
+
default: _(() => [
|
|
491
|
+
c.buttonImage ? (a(), u("img", {
|
|
492
492
|
key: 0,
|
|
493
493
|
class: "im-ButtonImage",
|
|
494
|
-
src:
|
|
495
|
-
alt: "image marker " + Number(
|
|
496
|
-
}, null, 8,
|
|
497
|
-
|
|
494
|
+
src: c.buttonImage,
|
|
495
|
+
alt: "image marker " + Number(m + 1)
|
|
496
|
+
}, null, 8, Bt)) : b("", !0),
|
|
497
|
+
f("span", zt, S(c.name), 1)
|
|
498
498
|
]),
|
|
499
499
|
_: 2
|
|
500
500
|
}, 1032, ["type", "onClick", "id", "class", "style", "icon"]),
|
|
501
|
-
|
|
501
|
+
s.showFeedback(m) ? (a(), v(o, {
|
|
502
502
|
key: 0,
|
|
503
|
-
content:
|
|
504
|
-
}, null, 8, ["content"])) :
|
|
503
|
+
content: c
|
|
504
|
+
}, null, 8, ["content"])) : b("", !0)
|
|
505
505
|
], 64))), 256))
|
|
506
506
|
])
|
|
507
507
|
]);
|
|
508
508
|
}
|
|
509
|
-
const
|
|
510
|
-
const
|
|
509
|
+
const Ft = /* @__PURE__ */ C(At, [["render", $t], ["__scopeId", "data-v-3897bfb2"]]);
|
|
510
|
+
const Lt = {
|
|
511
511
|
props: ["content"],
|
|
512
512
|
data() {
|
|
513
513
|
return {
|
|
@@ -522,41 +522,41 @@ const He = {
|
|
|
522
522
|
}
|
|
523
523
|
},
|
|
524
524
|
methods: {
|
|
525
|
-
pixelFormat(
|
|
526
|
-
return typeof
|
|
525
|
+
pixelFormat(t) {
|
|
526
|
+
return typeof t == "number" ? t + "px" : t;
|
|
527
527
|
},
|
|
528
|
-
changeImage(
|
|
529
|
-
this.imageReplaced = !0, this.imageSrc = this.content.hotspots[
|
|
528
|
+
changeImage(t) {
|
|
529
|
+
this.imageReplaced = !0, this.imageSrc = this.content.hotspots[t].imageOverlay, this.imageAlt = this.content.hotspots[t].imageOverlayAlt, this.$store.commit("setStepHold", !1), this.$store.dispatch("lastPageFocus", {});
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
},
|
|
533
|
-
function
|
|
534
|
-
const
|
|
535
|
-
return
|
|
536
|
-
default:
|
|
537
|
-
|
|
538
|
-
default:
|
|
539
|
-
|
|
532
|
+
}, Dt = ["innerHTML"], It = ["src", "alt"], Et = { class: "hotspotArea" };
|
|
533
|
+
function jt(t, e, i, r, n, s) {
|
|
534
|
+
const l = g("el-col"), o = g("el-button"), c = g("el-row");
|
|
535
|
+
return a(), v(c, { class: "imageReplacer" }, {
|
|
536
|
+
default: _(() => [
|
|
537
|
+
x(l, { span: 12 }, {
|
|
538
|
+
default: _(() => [
|
|
539
|
+
f("p", {
|
|
540
540
|
class: "imageReplacerDescription",
|
|
541
|
-
innerHTML:
|
|
542
|
-
}, null, 8,
|
|
541
|
+
innerHTML: i.content.description
|
|
542
|
+
}, null, 8, Dt)
|
|
543
543
|
]),
|
|
544
544
|
_: 1
|
|
545
545
|
}),
|
|
546
|
-
|
|
547
|
-
default:
|
|
548
|
-
|
|
546
|
+
x(l, { span: 12 }, {
|
|
547
|
+
default: _(() => [
|
|
548
|
+
f("img", {
|
|
549
549
|
class: "im-ButtonImage",
|
|
550
|
-
src:
|
|
551
|
-
alt:
|
|
552
|
-
}, null, 8,
|
|
553
|
-
|
|
554
|
-
(
|
|
555
|
-
type:
|
|
556
|
-
onClick:
|
|
550
|
+
src: n.imageSrc,
|
|
551
|
+
alt: n.imageAlt
|
|
552
|
+
}, null, 8, It),
|
|
553
|
+
f("div", Et, [
|
|
554
|
+
(a(!0), u(y, null, M(i.content.hotspots, (m, h) => (a(), v(o, {
|
|
555
|
+
type: m.buttonType,
|
|
556
|
+
onClick: A((d) => s.changeImage(h), ["stop"]),
|
|
557
557
|
class: "hotspot",
|
|
558
|
-
style:
|
|
559
|
-
icon:
|
|
558
|
+
style: B({ top: s.pixelFormat(m.cordinatesX), left: s.pixelFormat(m.cordinatesY), width: s.pixelFormat(m.dimensionsW), height: s.pixelFormat(m.dimensionsH) }),
|
|
559
|
+
icon: m.buttonIcon
|
|
560
560
|
}, null, 8, ["type", "onClick", "style", "icon"]))), 256))
|
|
561
561
|
])
|
|
562
562
|
]),
|
|
@@ -566,8 +566,8 @@ function ze(e, t, s, l, i, n) {
|
|
|
566
566
|
_: 1
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
|
-
const
|
|
570
|
-
const
|
|
569
|
+
const Ot = /* @__PURE__ */ C(Lt, [["render", jt], ["__scopeId", "data-v-02e047cd"]]);
|
|
570
|
+
const Rt = {
|
|
571
571
|
components: {},
|
|
572
572
|
props: ["content"],
|
|
573
573
|
data() {
|
|
@@ -597,38 +597,38 @@ const Be = {
|
|
|
597
597
|
}
|
|
598
598
|
},
|
|
599
599
|
methods: {
|
|
600
|
-
quizArrayCompleted(
|
|
601
|
-
return !(this.quizItemCompleted.includes(
|
|
600
|
+
quizArrayCompleted(t) {
|
|
601
|
+
return !(this.quizItemCompleted.includes(t) || t === 0);
|
|
602
602
|
},
|
|
603
603
|
prepareQuiz() {
|
|
604
|
-
this.quizArray = this.content.quiz.split("*_").filter((
|
|
605
|
-
|
|
604
|
+
this.quizArray = this.content.quiz.split("*_").filter((t) => t), this.content.options.forEach((t, e) => {
|
|
605
|
+
t.options ? t.random ? this.quizOptions.push(this.shuffle(t.options)) : this.quizOptions.push(t.options) : this.quizOptions.push(!1);
|
|
606
606
|
});
|
|
607
607
|
},
|
|
608
|
-
quizType(
|
|
609
|
-
return this.content.options[
|
|
608
|
+
quizType(t) {
|
|
609
|
+
return this.content.options[t] && this.content.options[t].type ? this.content.options[t].type : !1;
|
|
610
610
|
},
|
|
611
|
-
quizDisplay(
|
|
612
|
-
return this.content.options[
|
|
611
|
+
quizDisplay(t) {
|
|
612
|
+
return this.content.options[t] && this.content.options[t].display ? this.content.options[t].display : "Select";
|
|
613
613
|
},
|
|
614
|
-
quizClass(
|
|
615
|
-
return this.content.options[
|
|
614
|
+
quizClass(t) {
|
|
615
|
+
return this.content.options[t] && this.content.options[t].class ? this.content.options[t].class : "";
|
|
616
616
|
},
|
|
617
|
-
shuffle(
|
|
618
|
-
let
|
|
619
|
-
for (;
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
e
|
|
617
|
+
shuffle(t) {
|
|
618
|
+
let e = t.length, i;
|
|
619
|
+
for (; e != 0; )
|
|
620
|
+
i = Math.floor(Math.random() * e), e--, [t[e], t[i]] = [
|
|
621
|
+
t[i],
|
|
622
|
+
t[e]
|
|
623
623
|
];
|
|
624
|
-
return
|
|
624
|
+
return t;
|
|
625
625
|
},
|
|
626
626
|
choicesCheck() {
|
|
627
627
|
if (this.getAttempt < this.content.attempts) {
|
|
628
|
-
let
|
|
629
|
-
this.input.length === 0 ? this.content.options[0].stopFlow && (
|
|
630
|
-
this.input[
|
|
631
|
-
}), this.$store.commit("setAttempts", this.getAttempt + 1),
|
|
628
|
+
let t = !0, e = !1;
|
|
629
|
+
this.input.length === 0 ? this.content.options[0].stopFlow && (e = !0, this.feedbackObject.feedbackHeader = this.content.options[0].notSelectedHeader, this.feedbackObject.feedback = this.content.options[0].notSelectedBody) : this.content.options.forEach((i, r) => {
|
|
630
|
+
this.input[r] ? this.input[r] !== this.content.options[r].answer && (t = !1) : this.content.options[this.input.length].stopFlow && (e = !0, this.feedbackObject.feedbackHeader = this.content.options[this.input.length].notSelectedHeader, this.feedbackObject.feedback = this.content.options[this.input.length].notSelectedBody);
|
|
631
|
+
}), this.$store.commit("setAttempts", this.getAttempt + 1), t === !0 && this.input.length === this.quizArray.length ? (this.choicesComplete(), this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback) : (e || (this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback), this.$store.commit("setAttempts", this.getAttempt + 1));
|
|
632
632
|
} else
|
|
633
633
|
this.feedbackObject.feedbackAttempts = this.content.feedbackAttempts, this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete();
|
|
634
634
|
this.$store.commit("setShowFeedback", !0), setTimeout(() => {
|
|
@@ -636,12 +636,12 @@ const Be = {
|
|
|
636
636
|
});
|
|
637
637
|
},
|
|
638
638
|
choicesComplete() {
|
|
639
|
-
this.quizArray.forEach((
|
|
640
|
-
this.input[
|
|
639
|
+
this.quizArray.forEach((t, e) => {
|
|
640
|
+
this.input[e] ? this.input[e] = this.content.options[e].answer : this.input.push(this.content.options[e].answer), this.quizItemCompleted.push(e + 1);
|
|
641
641
|
}), this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1);
|
|
642
642
|
},
|
|
643
|
-
choicesMade(
|
|
644
|
-
this.quizItemCompleted.includes(
|
|
643
|
+
choicesMade(t) {
|
|
644
|
+
this.quizItemCompleted.includes(t + 1) === !1 && this.quizItemCompleted.push(t + 1);
|
|
645
645
|
},
|
|
646
646
|
showFeedback() {
|
|
647
647
|
return !!this.$store.getters.getShowFeedback;
|
|
@@ -649,9 +649,9 @@ const Be = {
|
|
|
649
649
|
},
|
|
650
650
|
mounted() {
|
|
651
651
|
if (this.prepareQuiz(), this.$store.getters.getDirections.display === !1) {
|
|
652
|
-
let
|
|
652
|
+
let t = document.getElementsByClassName("selectableButton");
|
|
653
653
|
setTimeout(() => {
|
|
654
|
-
|
|
654
|
+
t[0].focus();
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
657
|
},
|
|
@@ -659,69 +659,69 @@ const Be = {
|
|
|
659
659
|
this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.content.attempts && (this.totalAttempts = this.content.attempts);
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
|
-
function
|
|
663
|
-
const
|
|
664
|
-
return
|
|
665
|
-
class:
|
|
662
|
+
function Wt(t, e, i, r, n, s) {
|
|
663
|
+
const l = g("el-option"), o = g("el-select"), c = g("el-date-picker"), m = g("el-button"), h = g("lab-feedback");
|
|
664
|
+
return a(), u("div", {
|
|
665
|
+
class: w(["drop-down", i.content.class])
|
|
666
666
|
}, [
|
|
667
|
-
|
|
668
|
-
(
|
|
669
|
-
|
|
670
|
-
class:
|
|
667
|
+
f("p", null, [
|
|
668
|
+
(a(!0), u(y, null, M(n.quizArray, (d, p) => (a(), u(y, null, [
|
|
669
|
+
f("span", {
|
|
670
|
+
class: w(s.quizClass(p))
|
|
671
671
|
}, [
|
|
672
|
-
|
|
673
|
-
class:
|
|
674
|
-
},
|
|
675
|
-
|
|
672
|
+
f("span", {
|
|
673
|
+
class: w("quizText quizSection_" + p)
|
|
674
|
+
}, S(d) + " ", 3),
|
|
675
|
+
s.quizType(p) === "choose" ? (a(), v(o, {
|
|
676
676
|
key: 0,
|
|
677
|
-
onChange: (k) =>
|
|
678
|
-
modelValue:
|
|
679
|
-
"onUpdate:modelValue": (k) =>
|
|
680
|
-
placeholder:
|
|
677
|
+
onChange: (k) => s.choicesMade(p),
|
|
678
|
+
modelValue: n.input[p],
|
|
679
|
+
"onUpdate:modelValue": (k) => n.input[p] = k,
|
|
680
|
+
placeholder: s.quizDisplay(p)
|
|
681
681
|
}, {
|
|
682
|
-
default:
|
|
683
|
-
|
|
682
|
+
default: _(() => [
|
|
683
|
+
s.quizArrayCompleted(p) ? b("", !0) : (a(!0), u(y, { key: 0 }, M(n.quizOptions[p], (k) => (a(), v(l, {
|
|
684
684
|
key: k,
|
|
685
685
|
label: k,
|
|
686
686
|
value: k
|
|
687
687
|
}, null, 8, ["label", "value"]))), 128))
|
|
688
688
|
]),
|
|
689
689
|
_: 2
|
|
690
|
-
}, 1032, ["onChange", "modelValue", "onUpdate:modelValue", "placeholder"])) :
|
|
691
|
-
|
|
690
|
+
}, 1032, ["onChange", "modelValue", "onUpdate:modelValue", "placeholder"])) : b("", !0),
|
|
691
|
+
s.quizType(p) === "date" ? (a(), v(c, {
|
|
692
692
|
key: 1,
|
|
693
|
-
onChange: (k) =>
|
|
694
|
-
modelValue:
|
|
695
|
-
"onUpdate:modelValue": (k) =>
|
|
693
|
+
onChange: (k) => s.choicesMade(p),
|
|
694
|
+
modelValue: n.input[p],
|
|
695
|
+
"onUpdate:modelValue": (k) => n.input[p] = k,
|
|
696
696
|
type: "date",
|
|
697
|
-
placeholder:
|
|
698
|
-
format:
|
|
699
|
-
"value-format":
|
|
700
|
-
disabled:
|
|
701
|
-
}, null, 8, ["onChange", "modelValue", "onUpdate:modelValue", "placeholder", "format", "value-format", "disabled"])) :
|
|
697
|
+
placeholder: s.quizDisplay(p),
|
|
698
|
+
format: i.content.options[p].format,
|
|
699
|
+
"value-format": i.content.options[p].format,
|
|
700
|
+
disabled: s.quizArrayCompleted(p)
|
|
701
|
+
}, null, 8, ["onChange", "modelValue", "onUpdate:modelValue", "placeholder", "format", "value-format", "disabled"])) : b("", !0)
|
|
702
702
|
], 2),
|
|
703
|
-
|
|
703
|
+
T(" ")
|
|
704
704
|
], 64))), 256))
|
|
705
705
|
]),
|
|
706
|
-
|
|
706
|
+
x(m, {
|
|
707
707
|
size: "small",
|
|
708
708
|
type: "primary",
|
|
709
709
|
class: "drop-down-submit",
|
|
710
|
-
onClick:
|
|
710
|
+
onClick: e[0] || (e[0] = (d) => s.choicesCheck())
|
|
711
711
|
}, {
|
|
712
|
-
default:
|
|
713
|
-
|
|
712
|
+
default: _(() => [
|
|
713
|
+
T("Submit")
|
|
714
714
|
]),
|
|
715
715
|
_: 1
|
|
716
716
|
}),
|
|
717
|
-
|
|
717
|
+
s.showFeedback() ? (a(), v(h, {
|
|
718
718
|
key: 0,
|
|
719
|
-
content:
|
|
720
|
-
}, null, 8, ["content"])) :
|
|
719
|
+
content: n.feedbackObject
|
|
720
|
+
}, null, 8, ["content"])) : b("", !0)
|
|
721
721
|
], 2);
|
|
722
722
|
}
|
|
723
|
-
const
|
|
724
|
-
const
|
|
723
|
+
const qt = /* @__PURE__ */ C(Rt, [["render", Wt]]);
|
|
724
|
+
const Pt = {
|
|
725
725
|
components: {},
|
|
726
726
|
props: ["content"],
|
|
727
727
|
data() {
|
|
@@ -752,20 +752,20 @@ const qe = {
|
|
|
752
752
|
this.quizArray = this.content.quiz.split("*_");
|
|
753
753
|
},
|
|
754
754
|
choicesCheck() {
|
|
755
|
-
this.getAttempt < this.content.attempts ? (this.input.forEach((
|
|
756
|
-
if (this.content.answers[
|
|
757
|
-
this.correctChoices.includes(
|
|
758
|
-
else if (this.correctChoices.includes(
|
|
759
|
-
let
|
|
760
|
-
this.correctChoices.splice(
|
|
755
|
+
this.getAttempt < this.content.attempts ? (this.input.forEach((t, e) => {
|
|
756
|
+
if (this.content.answers[e] === t)
|
|
757
|
+
this.correctChoices.includes(e) === !1 && this.correctChoices.push(e);
|
|
758
|
+
else if (this.correctChoices.includes(e) === !0) {
|
|
759
|
+
let i = this.correctChoices.indexOf(e);
|
|
760
|
+
this.correctChoices.splice(i, 1);
|
|
761
761
|
}
|
|
762
762
|
}), this.input.length === 0 ? (this.feedbackObject.feedbackHeader = "You did not enter an answer", this.feedbackObject.feedback = "Please enter your choice in the input field") : this.correctChoices.length === this.content.answers.length ? (this.choicesComplete(), this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback) : (this.$store.commit("setAttempts", this.getAttempt + 1), this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback)) : (this.feedbackObject.feedbackAttempts = this.content.feedbackAttempts, this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete()), this.$store.commit("setShowFeedback", !0), setTimeout(() => {
|
|
763
763
|
document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
|
|
764
764
|
});
|
|
765
765
|
},
|
|
766
766
|
choicesComplete() {
|
|
767
|
-
this.input.forEach((
|
|
768
|
-
this.input[
|
|
767
|
+
this.input.forEach((t, e) => {
|
|
768
|
+
this.input[e] = this.content.answers[e];
|
|
769
769
|
}), this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1);
|
|
770
770
|
},
|
|
771
771
|
showFeedback() {
|
|
@@ -774,9 +774,9 @@ const qe = {
|
|
|
774
774
|
},
|
|
775
775
|
mounted() {
|
|
776
776
|
if (this.prepareQuiz(), this.$store.getters.getDirections.display === !1) {
|
|
777
|
-
let
|
|
777
|
+
let t = document.getElementsByClassName("selectableButton");
|
|
778
778
|
setTimeout(() => {
|
|
779
|
-
|
|
779
|
+
t[0].focus();
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
782
|
},
|
|
@@ -784,42 +784,42 @@ const qe = {
|
|
|
784
784
|
this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.content.attempts && (this.totalAttempts = this.content.attempts);
|
|
785
785
|
}
|
|
786
786
|
};
|
|
787
|
-
function
|
|
788
|
-
const
|
|
789
|
-
return
|
|
790
|
-
class:
|
|
787
|
+
function Vt(t, e, i, r, n, s) {
|
|
788
|
+
const l = g("el-input"), o = g("el-button"), c = g("lab-feedback");
|
|
789
|
+
return a(), u("div", {
|
|
790
|
+
class: w(["fill-blank", i.content.class])
|
|
791
791
|
}, [
|
|
792
|
-
|
|
793
|
-
(
|
|
794
|
-
|
|
795
|
-
|
|
792
|
+
f("p", null, [
|
|
793
|
+
(a(!0), u(y, null, M(n.quizArray, (m, h) => (a(), u(y, null, [
|
|
794
|
+
T(S(m), 1),
|
|
795
|
+
h < s.quizArrayCount ? (a(), v(l, {
|
|
796
796
|
key: 0,
|
|
797
|
-
modelValue:
|
|
798
|
-
"onUpdate:modelValue": (
|
|
797
|
+
modelValue: n.input[h],
|
|
798
|
+
"onUpdate:modelValue": (d) => n.input[h] = d,
|
|
799
799
|
placeholder: "Please input",
|
|
800
800
|
size: "small"
|
|
801
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])) :
|
|
801
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : b("", !0)
|
|
802
802
|
], 64))), 256))
|
|
803
803
|
]),
|
|
804
|
-
|
|
804
|
+
x(o, {
|
|
805
805
|
size: "small",
|
|
806
806
|
type: "primary",
|
|
807
807
|
class: "fill-blank-submit",
|
|
808
|
-
onClick:
|
|
808
|
+
onClick: e[0] || (e[0] = (m) => s.choicesCheck())
|
|
809
809
|
}, {
|
|
810
|
-
default:
|
|
811
|
-
|
|
810
|
+
default: _(() => [
|
|
811
|
+
T("Submit")
|
|
812
812
|
]),
|
|
813
813
|
_: 1
|
|
814
814
|
}),
|
|
815
|
-
|
|
815
|
+
s.showFeedback() ? (a(), v(c, {
|
|
816
816
|
key: 0,
|
|
817
|
-
content:
|
|
818
|
-
}, null, 8, ["content"])) :
|
|
817
|
+
content: n.feedbackObject
|
|
818
|
+
}, null, 8, ["content"])) : b("", !0)
|
|
819
819
|
], 2);
|
|
820
820
|
}
|
|
821
|
-
const
|
|
822
|
-
const
|
|
821
|
+
const Nt = /* @__PURE__ */ C(Pt, [["render", Vt]]);
|
|
822
|
+
const Xt = {
|
|
823
823
|
components: {},
|
|
824
824
|
props: ["content"],
|
|
825
825
|
data() {
|
|
@@ -847,97 +847,97 @@ const Pe = {
|
|
|
847
847
|
rightColWidth() {
|
|
848
848
|
return this.content.leftColWidth ? this.content.leftColWidth < 24 ? 24 - this.content.leftColWidth : 24 : 12;
|
|
849
849
|
},
|
|
850
|
-
pixelFormat(
|
|
851
|
-
return typeof
|
|
850
|
+
pixelFormat(t) {
|
|
851
|
+
return typeof t == "number" ? t + "px" : t;
|
|
852
852
|
},
|
|
853
853
|
choicesComplete() {
|
|
854
|
-
let
|
|
855
|
-
for (let
|
|
856
|
-
e
|
|
854
|
+
let t = document.querySelectorAll(".selectableButton");
|
|
855
|
+
for (let e = 0; e < t.length; e++)
|
|
856
|
+
t[e].classList.add("is-failure"), t[e].setAttribute("disabled", !0), this.content.choices[e].correct && t[e].classList.add("is-success");
|
|
857
857
|
this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1);
|
|
858
858
|
},
|
|
859
|
-
choicesCheck(
|
|
860
|
-
this.getAttempt < Number(this.content.attempts) ? this.content.choices[
|
|
859
|
+
choicesCheck(t) {
|
|
860
|
+
this.getAttempt < Number(this.content.attempts) ? this.content.choices[t].correct === !0 ? (console.log(" it was true"), this.choicesComplete()) : this.$store.commit("setAttempts", this.getAttempt + 1) : (this.content.choices[t].correct !== !0 && this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete()), this.feedbackIndex = t, this.$store.commit("setShowFeedback", !0), setTimeout(() => {
|
|
861
861
|
document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
|
|
862
862
|
});
|
|
863
863
|
},
|
|
864
864
|
shuffledChoices() {
|
|
865
|
-
let
|
|
866
|
-
for (let
|
|
867
|
-
const
|
|
868
|
-
[e
|
|
865
|
+
let t = this.content.choices;
|
|
866
|
+
for (let e = t.length - 1; e > 0; e--) {
|
|
867
|
+
const i = Math.floor(Math.random() * (e + 1));
|
|
868
|
+
[t[e], t[i]] = [t[i], t[e]];
|
|
869
869
|
}
|
|
870
|
-
this.content.choices =
|
|
870
|
+
this.content.choices = t;
|
|
871
871
|
},
|
|
872
|
-
showFeedback(
|
|
873
|
-
return this.$store.getters.getShowFeedback && this.feedbackIndex ===
|
|
872
|
+
showFeedback(t) {
|
|
873
|
+
return this.$store.getters.getShowFeedback && this.feedbackIndex === t ? (this.content.choices[t].correct && this.choicesComplete(), !0) : !1;
|
|
874
874
|
}
|
|
875
875
|
},
|
|
876
876
|
mounted() {
|
|
877
877
|
if (this.$store.getters.getDirections.display === !1) {
|
|
878
|
-
let
|
|
878
|
+
let t = document.getElementsByClassName("selectableButton");
|
|
879
879
|
setTimeout(() => {
|
|
880
|
-
|
|
880
|
+
t[0].focus();
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
883
|
},
|
|
884
884
|
beforeMount() {
|
|
885
885
|
this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.shuffledChoices(), this.content.attempts && (this.totalAttempts = this.content.attempts);
|
|
886
886
|
}
|
|
887
|
-
},
|
|
888
|
-
function
|
|
889
|
-
const
|
|
890
|
-
return
|
|
891
|
-
id:
|
|
892
|
-
class:
|
|
887
|
+
}, Yt = ["innerHTML"], Ut = { class: "buttonSpan" }, Kt = ["src", "alt"], Gt = { class: "selectable-buttonText" };
|
|
888
|
+
function Qt(t, e, i, r, n, s) {
|
|
889
|
+
const l = g("lab-image"), o = g("el-col"), c = g("el-divider"), m = g("el-button"), h = g("lab-feedback"), d = g("el-row");
|
|
890
|
+
return a(), v(d, {
|
|
891
|
+
id: i.content.id,
|
|
892
|
+
class: w(["selectable", i.content.classes])
|
|
893
893
|
}, {
|
|
894
|
-
default:
|
|
895
|
-
|
|
896
|
-
span:
|
|
894
|
+
default: _(() => [
|
|
895
|
+
x(o, {
|
|
896
|
+
span: s.leftColWidth(t.index)
|
|
897
897
|
}, {
|
|
898
|
-
default:
|
|
899
|
-
|
|
898
|
+
default: _(() => [
|
|
899
|
+
i.content.directions ? (a(), u("p", {
|
|
900
900
|
key: 0,
|
|
901
|
-
innerHTML:
|
|
902
|
-
}, null, 8,
|
|
903
|
-
|
|
901
|
+
innerHTML: i.content.directions
|
|
902
|
+
}, null, 8, Yt)) : b("", !0),
|
|
903
|
+
i.content.image ? (a(), v(l, {
|
|
904
904
|
key: 1,
|
|
905
|
-
content:
|
|
906
|
-
}, null, 8, ["content"])) :
|
|
905
|
+
content: i.content.image
|
|
906
|
+
}, null, 8, ["content"])) : b("", !0)
|
|
907
907
|
]),
|
|
908
908
|
_: 1
|
|
909
909
|
}, 8, ["span"]),
|
|
910
|
-
|
|
911
|
-
span:
|
|
910
|
+
x(o, {
|
|
911
|
+
span: s.rightColWidth(t.index),
|
|
912
912
|
class: "selectArea"
|
|
913
913
|
}, {
|
|
914
|
-
default:
|
|
915
|
-
(
|
|
916
|
-
!
|
|
917
|
-
|
|
914
|
+
default: _(() => [
|
|
915
|
+
(a(!0), u(y, null, M(i.content.choices, (p, k) => (a(), u(y, null, [
|
|
916
|
+
!i.content.noDivider && k > 0 ? (a(), v(c, { key: 0 })) : b("", !0),
|
|
917
|
+
x(m, {
|
|
918
918
|
size: "small",
|
|
919
919
|
type: "primary",
|
|
920
920
|
class: "selectableButton",
|
|
921
|
-
style:
|
|
922
|
-
onClick: (
|
|
921
|
+
style: B({ width: s.pixelFormat(i.content.choiceWidth), height: s.pixelFormat(i.content.choiceHeight) }),
|
|
922
|
+
onClick: (H) => s.choicesCheck(k)
|
|
923
923
|
}, {
|
|
924
|
-
default:
|
|
925
|
-
|
|
926
|
-
|
|
924
|
+
default: _(() => [
|
|
925
|
+
f("div", Ut, [
|
|
926
|
+
p.image ? (a(), u("img", {
|
|
927
927
|
key: 0,
|
|
928
928
|
class: "im-ButtonImage",
|
|
929
|
-
src:
|
|
930
|
-
alt:
|
|
931
|
-
}, null, 8,
|
|
932
|
-
|
|
929
|
+
src: p.image,
|
|
930
|
+
alt: p.alt ? p.alt : "button image"
|
|
931
|
+
}, null, 8, Kt)) : b("", !0),
|
|
932
|
+
f("span", Gt, S(p.text), 1)
|
|
933
933
|
])
|
|
934
934
|
]),
|
|
935
935
|
_: 2
|
|
936
936
|
}, 1032, ["style", "onClick"]),
|
|
937
|
-
|
|
937
|
+
s.showFeedback(k) ? (a(), v(h, {
|
|
938
938
|
key: 1,
|
|
939
|
-
content:
|
|
940
|
-
}, null, 8, ["content"])) :
|
|
939
|
+
content: p
|
|
940
|
+
}, null, 8, ["content"])) : b("", !0)
|
|
941
941
|
], 64))), 256))
|
|
942
942
|
]),
|
|
943
943
|
_: 1
|
|
@@ -946,8 +946,8 @@ function Ke(e, t, s, l, i, n) {
|
|
|
946
946
|
_: 1
|
|
947
947
|
}, 8, ["id", "class"]);
|
|
948
948
|
}
|
|
949
|
-
const
|
|
950
|
-
const
|
|
949
|
+
const Jt = /* @__PURE__ */ C(Xt, [["render", Qt], ["__scopeId", "data-v-bc83f1c6"]]);
|
|
950
|
+
const Zt = {
|
|
951
951
|
components: {},
|
|
952
952
|
props: ["content"],
|
|
953
953
|
data() {
|
|
@@ -972,11 +972,11 @@ const Qe = {
|
|
|
972
972
|
methods: {
|
|
973
973
|
choicesCheck() {
|
|
974
974
|
if (this.getAttempt < this.content.attempts) {
|
|
975
|
-
let
|
|
976
|
-
this.content.answers.forEach((
|
|
977
|
-
let
|
|
978
|
-
this.input.toLowerCase().includes(
|
|
979
|
-
}),
|
|
975
|
+
let t = !1;
|
|
976
|
+
this.content.answers.forEach((e, i) => {
|
|
977
|
+
let r = e.toLowerCase();
|
|
978
|
+
this.input.toLowerCase().includes(r) || (t = !0);
|
|
979
|
+
}), t ? (this.$store.commit("setAttempts", this.getAttempt + 1), this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback) : (this.choicesComplete(), this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback);
|
|
980
980
|
} else
|
|
981
981
|
this.feedbackObject.feedbackAttempts = this.content.feedbackAttempts, this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete();
|
|
982
982
|
this.$store.commit("setShowFeedback", !0), setTimeout(() => {
|
|
@@ -992,9 +992,9 @@ const Qe = {
|
|
|
992
992
|
},
|
|
993
993
|
mounted() {
|
|
994
994
|
if (this.$store.getters.getDirections.display === !1) {
|
|
995
|
-
let
|
|
995
|
+
let t = document.getElementsByClassName("selectableButton");
|
|
996
996
|
setTimeout(() => {
|
|
997
|
-
|
|
997
|
+
t[0].focus();
|
|
998
998
|
});
|
|
999
999
|
}
|
|
1000
1000
|
},
|
|
@@ -1002,38 +1002,38 @@ const Qe = {
|
|
|
1002
1002
|
this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.content.attempts && (this.totalAttempts = this.content.attempts);
|
|
1003
1003
|
}
|
|
1004
1004
|
};
|
|
1005
|
-
function
|
|
1006
|
-
const
|
|
1007
|
-
return
|
|
1008
|
-
class:
|
|
1005
|
+
function te(t, e, i, r, n, s) {
|
|
1006
|
+
const l = g("el-input"), o = g("el-button"), c = g("lab-feedback");
|
|
1007
|
+
return a(), u("div", {
|
|
1008
|
+
class: w(["textbox", i.content.class])
|
|
1009
1009
|
}, [
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
modelValue:
|
|
1013
|
-
"onUpdate:modelValue":
|
|
1010
|
+
f("p", null, S(i.content.quiz), 1),
|
|
1011
|
+
x(l, {
|
|
1012
|
+
modelValue: n.input,
|
|
1013
|
+
"onUpdate:modelValue": e[0] || (e[0] = (m) => n.input = m),
|
|
1014
1014
|
autosize: { minRows: 4, maxRows: 8 },
|
|
1015
1015
|
type: "textarea",
|
|
1016
1016
|
placeholder: "Please input"
|
|
1017
1017
|
}, null, 8, ["modelValue"]),
|
|
1018
|
-
|
|
1018
|
+
x(o, {
|
|
1019
1019
|
size: "small",
|
|
1020
1020
|
type: "primary",
|
|
1021
1021
|
class: "fill-blank-submit",
|
|
1022
|
-
onClick:
|
|
1022
|
+
onClick: e[1] || (e[1] = (m) => s.choicesCheck())
|
|
1023
1023
|
}, {
|
|
1024
|
-
default:
|
|
1025
|
-
|
|
1024
|
+
default: _(() => [
|
|
1025
|
+
T("Submit")
|
|
1026
1026
|
]),
|
|
1027
1027
|
_: 1
|
|
1028
1028
|
}),
|
|
1029
|
-
|
|
1029
|
+
s.showFeedback() ? (a(), v(c, {
|
|
1030
1030
|
key: 0,
|
|
1031
|
-
content:
|
|
1032
|
-
}, null, 8, ["content"])) :
|
|
1031
|
+
content: n.feedbackObject
|
|
1032
|
+
}, null, 8, ["content"])) : b("", !0)
|
|
1033
1033
|
], 2);
|
|
1034
1034
|
}
|
|
1035
|
-
const
|
|
1036
|
-
const
|
|
1035
|
+
const ee = /* @__PURE__ */ C(Zt, [["render", te]]);
|
|
1036
|
+
const ie = {
|
|
1037
1037
|
components: {},
|
|
1038
1038
|
props: ["content"],
|
|
1039
1039
|
data() {
|
|
@@ -1060,43 +1060,43 @@ const Ge = {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
},
|
|
1062
1062
|
methods: {
|
|
1063
|
-
showSub(
|
|
1064
|
-
let
|
|
1065
|
-
|
|
1063
|
+
showSub(t) {
|
|
1064
|
+
let e = document.getElementById(t);
|
|
1065
|
+
e.classList.contains("jl-menu-sub_show") ? (this.showMenuOverlay = !1, this.hideSubs()) : (this.showMenuOverlay = !0, e.classList.add("jl-menu-sub_show"));
|
|
1066
1066
|
},
|
|
1067
|
-
showSubSub(
|
|
1068
|
-
let
|
|
1069
|
-
|
|
1067
|
+
showSubSub(t) {
|
|
1068
|
+
let e = document.getElementById(t);
|
|
1069
|
+
e.classList.contains("jl-menu-sub-sub_show") ? (this.showMenuOverlay = !1, this.hideSubs()) : (this.showMenuOverlay = !0, e.classList.add("jl-menu-sub-sub_show"));
|
|
1070
1070
|
},
|
|
1071
1071
|
hideSubs() {
|
|
1072
1072
|
this.showMenuOverlay = !1;
|
|
1073
|
-
let
|
|
1074
|
-
for (; e.length > 0; )
|
|
1075
|
-
e[0].classList.remove("jl-menu-sub_show");
|
|
1076
|
-
let t = document.getElementsByClassName("jl-menu-sub-sub_show");
|
|
1073
|
+
let t = document.getElementsByClassName("jl-menu-sub_show");
|
|
1077
1074
|
for (; t.length > 0; )
|
|
1078
|
-
t[0].classList.remove("jl-menu-
|
|
1075
|
+
t[0].classList.remove("jl-menu-sub_show");
|
|
1076
|
+
let e = document.getElementsByClassName("jl-menu-sub-sub_show");
|
|
1077
|
+
for (; e.length > 0; )
|
|
1078
|
+
e[0].classList.remove("jl-menu-sub-sub_show");
|
|
1079
1079
|
},
|
|
1080
|
-
choicesCheck(
|
|
1080
|
+
choicesCheck(t) {
|
|
1081
1081
|
this.hideSubs();
|
|
1082
|
-
let
|
|
1082
|
+
let e = !1, i = "";
|
|
1083
1083
|
if (this.getAttempt < this.content.attempts) {
|
|
1084
|
-
if (typeof
|
|
1085
|
-
let
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
}),
|
|
1084
|
+
if (typeof t == "string") {
|
|
1085
|
+
let r = t.split("-");
|
|
1086
|
+
r.forEach((n, s) => {
|
|
1087
|
+
r[s] = Number(n);
|
|
1088
|
+
}), r.length === 2 ? this.content.menu[r[0]].subMenu[r[1]].correct && (this.content.menu[r[0]].subMenu[r[1]].page && (i = this.content.menu[r[0]].subMenu[r[1]].page), e = !0) : r.length === 3 && this.content.menu[r[0]].subMenu[r[1]].subMenu[r[2]].correct && (this.content.menu[r[0]].subMenu[r[1]].subMenu[r[2]].page && (i = this.content.menu[r[0]].subMenu[r[1]].subMenu[r[2]].page), e = !0);
|
|
1089
1089
|
} else
|
|
1090
|
-
this.content.menu[
|
|
1091
|
-
|
|
1090
|
+
this.content.menu[t].correct && (this.content.menu[t].page && (i = this.content.menu[t].page), e = !0);
|
|
1091
|
+
e ? (this.choicesComplete(i), this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback) : (this.$store.commit("setAttempts", this.getAttempt + 1), this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback);
|
|
1092
1092
|
} else
|
|
1093
1093
|
this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete();
|
|
1094
|
-
|
|
1094
|
+
i === "" && this.$store.commit("setShowFeedback", !0), setTimeout(() => {
|
|
1095
1095
|
document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
|
|
1096
1096
|
});
|
|
1097
1097
|
},
|
|
1098
|
-
choicesComplete(
|
|
1099
|
-
this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1),
|
|
1098
|
+
choicesComplete(t) {
|
|
1099
|
+
this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1), t !== "" && this.$store.commit("setCurrentPage", t);
|
|
1100
1100
|
},
|
|
1101
1101
|
showFeedback() {
|
|
1102
1102
|
return !!this.$store.getters.getShowFeedback;
|
|
@@ -1109,114 +1109,780 @@ const Ge = {
|
|
|
1109
1109
|
beforeMount() {
|
|
1110
1110
|
this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.content.attempts && (this.totalAttempts = this.content.attempts);
|
|
1111
1111
|
}
|
|
1112
|
-
},
|
|
1112
|
+
}, se = { key: 0 }, ne = ["index", "onClick"], oe = { class: "jl-menu-sub__title" }, re = ["id"], ae = ["index", "onClick"], ce = { class: "jl-menu-sub-sub__title" }, le = ["id"], he = ["index", "onClick"], ue = ["onClick"], de = {
|
|
1113
1113
|
key: 1,
|
|
1114
1114
|
class: "jl-menu-item"
|
|
1115
|
-
},
|
|
1116
|
-
function
|
|
1117
|
-
const
|
|
1118
|
-
return
|
|
1119
|
-
class:
|
|
1115
|
+
}, me = ["index", "onClick"];
|
|
1116
|
+
function fe(t, e, i, r, n, s) {
|
|
1117
|
+
const l = g("CaretBottom"), o = g("el-icon"), c = g("CaretRight"), m = g("lab-feedback");
|
|
1118
|
+
return a(), u("div", {
|
|
1119
|
+
class: w(["menu-chooser", i.content.class])
|
|
1120
1120
|
}, [
|
|
1121
|
-
|
|
1121
|
+
n.showMenuOverlay ? (a(), u("div", {
|
|
1122
1122
|
key: 0,
|
|
1123
1123
|
class: "nav-mask",
|
|
1124
|
-
onClick:
|
|
1125
|
-
})) :
|
|
1126
|
-
|
|
1127
|
-
|
|
1124
|
+
onClick: e[0] || (e[0] = (...h) => s.hideSubs && s.hideSubs(...h))
|
|
1125
|
+
})) : b("", !0),
|
|
1126
|
+
f("p", null, S(i.content.quiz), 1),
|
|
1127
|
+
f("div", {
|
|
1128
1128
|
class: "jl-menu",
|
|
1129
|
-
onSelect:
|
|
1129
|
+
onSelect: e[1] || (e[1] = (...h) => s.choicesCheck && s.choicesCheck(...h))
|
|
1130
1130
|
}, [
|
|
1131
|
-
(
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
class:
|
|
1135
|
-
index:
|
|
1131
|
+
(a(!0), u(y, null, M(i.content.menu, (h, d) => (a(), u(y, null, [
|
|
1132
|
+
h.subMenu ? (a(), u("div", se, [
|
|
1133
|
+
f("button", {
|
|
1134
|
+
class: w("jl-menu-sub sub-" + d),
|
|
1135
|
+
index: d,
|
|
1136
1136
|
tabindex: "0",
|
|
1137
1137
|
role: "menuitem",
|
|
1138
|
-
onClick:
|
|
1138
|
+
onClick: A((p) => s.showSub("sub-" + d), ["stop"])
|
|
1139
1139
|
}, [
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
default:
|
|
1144
|
-
|
|
1140
|
+
f("div", oe, [
|
|
1141
|
+
T(S(h.name) + " ", 1),
|
|
1142
|
+
x(o, null, {
|
|
1143
|
+
default: _(() => [
|
|
1144
|
+
x(l)
|
|
1145
1145
|
]),
|
|
1146
1146
|
_: 1
|
|
1147
1147
|
})
|
|
1148
1148
|
])
|
|
1149
|
-
], 10,
|
|
1150
|
-
|
|
1149
|
+
], 10, ne),
|
|
1150
|
+
f("div", {
|
|
1151
1151
|
class: "jl-menu-sub-menu",
|
|
1152
|
-
id: "sub-" +
|
|
1152
|
+
id: "sub-" + d
|
|
1153
1153
|
}, [
|
|
1154
|
-
(
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
class:
|
|
1158
|
-
index:
|
|
1154
|
+
(a(!0), u(y, null, M(h.subMenu, (p, k) => (a(), u(y, null, [
|
|
1155
|
+
p.subMenu ? (a(), u(y, { key: 0 }, [
|
|
1156
|
+
f("button", {
|
|
1157
|
+
class: w("jl-menu-sub-sub sub-sub-" + k),
|
|
1158
|
+
index: d + "-" + k,
|
|
1159
1159
|
tabindex: "0",
|
|
1160
1160
|
role: "menuitem",
|
|
1161
|
-
onClick:
|
|
1161
|
+
onClick: A((H) => s.showSubSub("sub-sub-" + d), ["stop"])
|
|
1162
1162
|
}, [
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
default:
|
|
1167
|
-
|
|
1163
|
+
f("div", ce, [
|
|
1164
|
+
T(S(p.name), 1),
|
|
1165
|
+
x(o, null, {
|
|
1166
|
+
default: _(() => [
|
|
1167
|
+
x(c)
|
|
1168
1168
|
]),
|
|
1169
1169
|
_: 1
|
|
1170
1170
|
})
|
|
1171
1171
|
])
|
|
1172
|
-
], 10,
|
|
1173
|
-
|
|
1172
|
+
], 10, ae),
|
|
1173
|
+
f("div", {
|
|
1174
1174
|
class: "jl-menu-sub-sub-menu",
|
|
1175
|
-
id: "sub-sub-" +
|
|
1175
|
+
id: "sub-sub-" + d
|
|
1176
1176
|
}, [
|
|
1177
|
-
(
|
|
1177
|
+
(a(!0), u(y, null, M(p.subMenu, (H, z) => (a(), u("button", {
|
|
1178
1178
|
class: "jl-menu-sub-sub-item",
|
|
1179
|
-
index:
|
|
1179
|
+
index: d + "-" + k + "-" + z,
|
|
1180
1180
|
tabindex: "0",
|
|
1181
1181
|
role: "menuitem",
|
|
1182
|
-
onClick:
|
|
1182
|
+
onClick: A(($) => s.choicesCheck(d + "-" + k + "-" + z), ["stop"])
|
|
1183
1183
|
}, [
|
|
1184
|
-
|
|
1185
|
-
], 8,
|
|
1186
|
-
], 8,
|
|
1187
|
-
], 64)) : (
|
|
1184
|
+
f("div", null, S(H.name), 1)
|
|
1185
|
+
], 8, he))), 256))
|
|
1186
|
+
], 8, le)
|
|
1187
|
+
], 64)) : (a(), u("button", {
|
|
1188
1188
|
key: 1,
|
|
1189
1189
|
class: "jl-menu-sub-item",
|
|
1190
1190
|
tabindex: "0",
|
|
1191
1191
|
role: "menuitem",
|
|
1192
|
-
onClick:
|
|
1192
|
+
onClick: A((H) => s.choicesCheck(d + "-" + k), ["stop"])
|
|
1193
1193
|
}, [
|
|
1194
|
-
|
|
1195
|
-
], 8,
|
|
1194
|
+
f("div", null, S(p.name), 1)
|
|
1195
|
+
], 8, ue))
|
|
1196
1196
|
], 64))), 256))
|
|
1197
|
-
], 8,
|
|
1198
|
-
])) : (
|
|
1199
|
-
|
|
1197
|
+
], 8, re)
|
|
1198
|
+
])) : (a(), u("div", de, [
|
|
1199
|
+
f("button", {
|
|
1200
1200
|
class: "jl-menu-item",
|
|
1201
|
-
index:
|
|
1201
|
+
index: d,
|
|
1202
1202
|
tabindex: "0",
|
|
1203
1203
|
role: "menuitem",
|
|
1204
|
-
onClick:
|
|
1205
|
-
},
|
|
1204
|
+
onClick: A((p) => s.choicesCheck(d), ["stop"])
|
|
1205
|
+
}, S(h.name), 9, me)
|
|
1206
1206
|
]))
|
|
1207
1207
|
], 64))), 256))
|
|
1208
1208
|
], 32),
|
|
1209
|
-
|
|
1209
|
+
s.showFeedback() ? (a(), v(m, {
|
|
1210
1210
|
key: 1,
|
|
1211
|
-
content:
|
|
1212
|
-
}, null, 8, ["content"])) :
|
|
1211
|
+
content: n.feedbackObject
|
|
1212
|
+
}, null, 8, ["content"])) : b("", !0)
|
|
1213
1213
|
], 2);
|
|
1214
1214
|
}
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1217
|
-
|
|
1215
|
+
const pe = /* @__PURE__ */ C(ie, [["render", fe]]);
|
|
1216
|
+
const D = {
|
|
1217
|
+
y: {
|
|
1218
|
+
t: "top",
|
|
1219
|
+
m: "marginTop",
|
|
1220
|
+
b: "bottom"
|
|
1221
|
+
},
|
|
1222
|
+
x: {
|
|
1223
|
+
l: "left",
|
|
1224
|
+
m: "marginLeft",
|
|
1225
|
+
r: "right"
|
|
1226
|
+
}
|
|
1227
|
+
};
|
|
1228
|
+
function ge(t) {
|
|
1229
|
+
t.forEach((e, i) => {
|
|
1230
|
+
document.documentElement.addEventListener(i, e);
|
|
1231
|
+
});
|
|
1232
|
+
}
|
|
1233
|
+
function be(t) {
|
|
1234
|
+
t.forEach((e, i) => {
|
|
1235
|
+
document.documentElement.removeEventListener(i, e);
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
const _e = {
|
|
1239
|
+
name: "vue-drag-resize",
|
|
1240
|
+
emits: ["clicked", "dragging", "dragstop", "resizing", "resizestop", "activated", "deactivated"],
|
|
1241
|
+
props: {
|
|
1242
|
+
stickSize: {
|
|
1243
|
+
type: Number,
|
|
1244
|
+
default: 8
|
|
1245
|
+
},
|
|
1246
|
+
parentScaleX: {
|
|
1247
|
+
type: Number,
|
|
1248
|
+
default: 1
|
|
1249
|
+
},
|
|
1250
|
+
parentScaleY: {
|
|
1251
|
+
type: Number,
|
|
1252
|
+
default: 1
|
|
1253
|
+
},
|
|
1254
|
+
isActive: {
|
|
1255
|
+
type: Boolean,
|
|
1256
|
+
default: !1
|
|
1257
|
+
},
|
|
1258
|
+
preventActiveBehavior: {
|
|
1259
|
+
type: Boolean,
|
|
1260
|
+
default: !1
|
|
1261
|
+
},
|
|
1262
|
+
isDraggable: {
|
|
1263
|
+
type: Boolean,
|
|
1264
|
+
default: !0
|
|
1265
|
+
},
|
|
1266
|
+
isResizable: {
|
|
1267
|
+
type: Boolean,
|
|
1268
|
+
default: !0
|
|
1269
|
+
},
|
|
1270
|
+
aspectRatio: {
|
|
1271
|
+
type: Boolean,
|
|
1272
|
+
default: !1
|
|
1273
|
+
},
|
|
1274
|
+
parentLimitation: {
|
|
1275
|
+
type: Boolean,
|
|
1276
|
+
default: !1
|
|
1277
|
+
},
|
|
1278
|
+
snapToGrid: {
|
|
1279
|
+
type: Boolean,
|
|
1280
|
+
default: !1
|
|
1281
|
+
},
|
|
1282
|
+
gridX: {
|
|
1283
|
+
type: Number,
|
|
1284
|
+
default: 50,
|
|
1285
|
+
validator(t) {
|
|
1286
|
+
return t >= 0;
|
|
1287
|
+
}
|
|
1288
|
+
},
|
|
1289
|
+
gridY: {
|
|
1290
|
+
type: Number,
|
|
1291
|
+
default: 50,
|
|
1292
|
+
validator(t) {
|
|
1293
|
+
return t >= 0;
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
parentW: {
|
|
1297
|
+
type: Number,
|
|
1298
|
+
default: 0,
|
|
1299
|
+
validator(t) {
|
|
1300
|
+
return t >= 0;
|
|
1301
|
+
}
|
|
1302
|
+
},
|
|
1303
|
+
parentH: {
|
|
1304
|
+
type: Number,
|
|
1305
|
+
default: 0,
|
|
1306
|
+
validator(t) {
|
|
1307
|
+
return t >= 0;
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
w: {
|
|
1311
|
+
type: [String, Number],
|
|
1312
|
+
default: 200,
|
|
1313
|
+
validator(t) {
|
|
1314
|
+
return typeof t == "string" ? t === "auto" : t >= 0;
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
h: {
|
|
1318
|
+
type: [String, Number],
|
|
1319
|
+
default: 200,
|
|
1320
|
+
validator(t) {
|
|
1321
|
+
return typeof t == "string" ? t === "auto" : t >= 0;
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
minw: {
|
|
1325
|
+
type: Number,
|
|
1326
|
+
default: 50,
|
|
1327
|
+
validator(t) {
|
|
1328
|
+
return t >= 0;
|
|
1329
|
+
}
|
|
1330
|
+
},
|
|
1331
|
+
minh: {
|
|
1332
|
+
type: Number,
|
|
1333
|
+
default: 50,
|
|
1334
|
+
validator(t) {
|
|
1335
|
+
return t >= 0;
|
|
1336
|
+
}
|
|
1337
|
+
},
|
|
1338
|
+
x: {
|
|
1339
|
+
type: Number,
|
|
1340
|
+
default: 0,
|
|
1341
|
+
validator(t) {
|
|
1342
|
+
return typeof t == "number";
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1345
|
+
y: {
|
|
1346
|
+
type: Number,
|
|
1347
|
+
default: 0,
|
|
1348
|
+
validator(t) {
|
|
1349
|
+
return typeof t == "number";
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
z: {
|
|
1353
|
+
type: [String, Number],
|
|
1354
|
+
default: "auto",
|
|
1355
|
+
validator(t) {
|
|
1356
|
+
return typeof t == "string" ? t === "auto" : t >= 0;
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
dragHandle: {
|
|
1360
|
+
type: String,
|
|
1361
|
+
default: null
|
|
1362
|
+
},
|
|
1363
|
+
dragCancel: {
|
|
1364
|
+
type: String,
|
|
1365
|
+
default: null
|
|
1366
|
+
},
|
|
1367
|
+
sticks: {
|
|
1368
|
+
type: Array,
|
|
1369
|
+
default() {
|
|
1370
|
+
return ["tl", "tm", "tr", "mr", "br", "bm", "bl", "ml"];
|
|
1371
|
+
}
|
|
1372
|
+
},
|
|
1373
|
+
axis: {
|
|
1374
|
+
type: String,
|
|
1375
|
+
default: "both",
|
|
1376
|
+
validator(t) {
|
|
1377
|
+
return ["x", "y", "both", "none"].indexOf(t) !== -1;
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
contentClass: {
|
|
1381
|
+
type: String,
|
|
1382
|
+
required: !1,
|
|
1383
|
+
default: ""
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
data() {
|
|
1387
|
+
return {
|
|
1388
|
+
fixAspectRatio: null,
|
|
1389
|
+
active: null,
|
|
1390
|
+
zIndex: null,
|
|
1391
|
+
parentWidth: null,
|
|
1392
|
+
parentHeight: null,
|
|
1393
|
+
left: null,
|
|
1394
|
+
top: null,
|
|
1395
|
+
right: null,
|
|
1396
|
+
bottom: null,
|
|
1397
|
+
minHeight: null
|
|
1398
|
+
};
|
|
1399
|
+
},
|
|
1400
|
+
beforeCreate() {
|
|
1401
|
+
this.stickDrag = !1, this.bodyDrag = !1, this.dimensionsBeforeMove = { pointerX: 0, pointerY: 0, x: 0, y: 0, w: 0, h: 0 }, this.limits = {
|
|
1402
|
+
left: { min: null, max: null },
|
|
1403
|
+
right: { min: null, max: null },
|
|
1404
|
+
top: { min: null, max: null },
|
|
1405
|
+
bottom: { min: null, max: null }
|
|
1406
|
+
}, this.currentStick = null;
|
|
1407
|
+
},
|
|
1408
|
+
mounted() {
|
|
1409
|
+
this.parentElement = this.$el.parentNode, this.parentWidth = this.parentW ? this.parentW : this.parentElement.clientWidth, this.parentHeight = this.parentH ? this.parentH : this.parentElement.clientHeight, this.left = this.x, this.top = this.y, this.right = this.parentWidth - (this.w === "auto" ? this.$refs.container.scrollWidth : this.w) - this.left, this.bottom = this.parentHeight - (this.h === "auto" ? this.$refs.container.scrollHeight : this.h) - this.top, this.domEvents = /* @__PURE__ */ new Map([
|
|
1410
|
+
["mousemove", this.move],
|
|
1411
|
+
["mouseup", this.up],
|
|
1412
|
+
["mouseleave", this.up],
|
|
1413
|
+
["mousedown", this.deselect],
|
|
1414
|
+
["touchmove", this.move],
|
|
1415
|
+
["touchend", this.up],
|
|
1416
|
+
["touchcancel", this.up],
|
|
1417
|
+
["touchstart", this.up]
|
|
1418
|
+
]), ge(this.domEvents), this.dragHandle && [...this.$el.querySelectorAll(this.dragHandle)].forEach((t) => {
|
|
1419
|
+
t.setAttribute("data-drag-handle", this._uid);
|
|
1420
|
+
}), this.dragCancel && [...this.$el.querySelectorAll(this.dragCancel)].forEach((t) => {
|
|
1421
|
+
t.setAttribute("data-drag-cancel", this._uid);
|
|
1422
|
+
});
|
|
1423
|
+
},
|
|
1424
|
+
beforeUnmount() {
|
|
1425
|
+
be(this.domEvents);
|
|
1426
|
+
},
|
|
1427
|
+
methods: {
|
|
1428
|
+
deselect() {
|
|
1429
|
+
this.preventActiveBehavior || (this.active = !1);
|
|
1430
|
+
},
|
|
1431
|
+
move(t) {
|
|
1432
|
+
if (!this.stickDrag && !this.bodyDrag)
|
|
1433
|
+
return;
|
|
1434
|
+
t.stopPropagation();
|
|
1435
|
+
const e = typeof t.pageX < "u" ? t.pageX : t.touches[0].pageX, i = typeof t.pageY < "u" ? t.pageY : t.touches[0].pageY, { dimensionsBeforeMove: r } = this, n = {
|
|
1436
|
+
x: (r.pointerX - e) / this.parentScaleX,
|
|
1437
|
+
y: (r.pointerY - i) / this.parentScaleY
|
|
1438
|
+
};
|
|
1439
|
+
if (this.stickDrag && this.stickMove(n), this.bodyDrag) {
|
|
1440
|
+
if (this.axis === "x")
|
|
1441
|
+
n.y = 0;
|
|
1442
|
+
else if (this.axis === "y")
|
|
1443
|
+
n.x = 0;
|
|
1444
|
+
else if (this.axis === "none")
|
|
1445
|
+
return;
|
|
1446
|
+
this.bodyMove(n);
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
up(t) {
|
|
1450
|
+
this.stickDrag ? this.stickUp(t) : this.bodyDrag && this.bodyUp(t);
|
|
1451
|
+
},
|
|
1452
|
+
bodyDown(t) {
|
|
1453
|
+
const { target: e, button: i } = t;
|
|
1454
|
+
if (this.preventActiveBehavior || (this.active = !0), i && i !== 0 || (this.$emit("clicked", t), !this.active) || this.dragHandle && e.getAttribute("data-drag-handle") !== this._uid.toString() || this.dragCancel && e.getAttribute("data-drag-cancel") === this._uid.toString())
|
|
1455
|
+
return;
|
|
1456
|
+
typeof t.stopPropagation < "u" && t.stopPropagation(), typeof t.preventDefault < "u" && t.preventDefault(), this.isDraggable && (this.bodyDrag = !0);
|
|
1457
|
+
const r = typeof t.pageX < "u" ? t.pageX : t.touches[0].pageX, n = typeof t.pageY < "u" ? t.pageY : t.touches[0].pageY;
|
|
1458
|
+
this.saveDimensionsBeforeMove({ pointerX: r, pointerY: n }), this.parentLimitation && (this.limits = this.calcDragLimitation());
|
|
1459
|
+
},
|
|
1460
|
+
bodyMove(t) {
|
|
1461
|
+
const { dimensionsBeforeMove: e, parentWidth: i, parentHeight: r, gridX: n, gridY: s, width: l, height: o } = this;
|
|
1462
|
+
let c = e.top - t.y, m = e.bottom + t.y, h = e.left - t.x, d = e.right + t.x;
|
|
1463
|
+
if (this.snapToGrid) {
|
|
1464
|
+
let p = !0, k = !0, H = c - Math.floor(c / s) * s, z = r - m - Math.floor((r - m) / s) * s, $ = h - Math.floor(h / n) * n, F = i - d - Math.floor((i - d) / n) * n;
|
|
1465
|
+
H > s / 2 && (H -= s), z > s / 2 && (z -= s), $ > n / 2 && ($ -= n), F > n / 2 && (F -= n), Math.abs(z) < Math.abs(H) && (p = !1), Math.abs(F) < Math.abs($) && (k = !1), c -= p ? H : z, m = r - o - c, h -= k ? $ : F, d = i - l - h;
|
|
1466
|
+
}
|
|
1467
|
+
({
|
|
1468
|
+
newLeft: this.left,
|
|
1469
|
+
newRight: this.right,
|
|
1470
|
+
newTop: this.top,
|
|
1471
|
+
newBottom: this.bottom
|
|
1472
|
+
} = this.rectCorrectionByLimit({ newLeft: h, newRight: d, newTop: c, newBottom: m })), this.$emit("dragging", this.rect);
|
|
1473
|
+
},
|
|
1474
|
+
bodyUp() {
|
|
1475
|
+
this.bodyDrag = !1, this.$emit("dragging", this.rect), this.$emit("dragstop", this.rect), this.dimensionsBeforeMove = { pointerX: 0, pointerY: 0, x: 0, y: 0, w: 0, h: 0 }, this.limits = {
|
|
1476
|
+
left: { min: null, max: null },
|
|
1477
|
+
right: { min: null, max: null },
|
|
1478
|
+
top: { min: null, max: null },
|
|
1479
|
+
bottom: { min: null, max: null }
|
|
1480
|
+
};
|
|
1481
|
+
},
|
|
1482
|
+
stickDown(t, e, i = !1) {
|
|
1483
|
+
if ((!this.isResizable || !this.active) && !i)
|
|
1484
|
+
return;
|
|
1485
|
+
this.stickDrag = !0;
|
|
1486
|
+
const r = typeof e.pageX < "u" ? e.pageX : e.touches[0].pageX, n = typeof e.pageY < "u" ? e.pageY : e.touches[0].pageY;
|
|
1487
|
+
this.saveDimensionsBeforeMove({ pointerX: r, pointerY: n }), this.currentStick = t, this.limits = this.calcResizeLimits();
|
|
1488
|
+
},
|
|
1489
|
+
saveDimensionsBeforeMove({ pointerX: t, pointerY: e }) {
|
|
1490
|
+
this.dimensionsBeforeMove.pointerX = t, this.dimensionsBeforeMove.pointerY = e, this.dimensionsBeforeMove.left = this.left, this.dimensionsBeforeMove.right = this.right, this.dimensionsBeforeMove.top = this.top, this.dimensionsBeforeMove.bottom = this.bottom, this.dimensionsBeforeMove.width = this.width, this.dimensionsBeforeMove.height = this.height, this.aspectFactor = this.width / this.height;
|
|
1491
|
+
},
|
|
1492
|
+
stickMove(t) {
|
|
1493
|
+
const {
|
|
1494
|
+
currentStick: e,
|
|
1495
|
+
dimensionsBeforeMove: i,
|
|
1496
|
+
gridY: r,
|
|
1497
|
+
gridX: n,
|
|
1498
|
+
snapToGrid: s,
|
|
1499
|
+
parentHeight: l,
|
|
1500
|
+
parentWidth: o
|
|
1501
|
+
} = this;
|
|
1502
|
+
let c = i.top, m = i.bottom, h = i.left, d = i.right;
|
|
1503
|
+
switch (e[0]) {
|
|
1504
|
+
case "b":
|
|
1505
|
+
m = i.bottom + t.y, s && (m = l - Math.round((l - m) / r) * r);
|
|
1506
|
+
break;
|
|
1507
|
+
case "t":
|
|
1508
|
+
c = i.top - t.y, s && (c = Math.round(c / r) * r);
|
|
1509
|
+
break;
|
|
1510
|
+
}
|
|
1511
|
+
switch (e[1]) {
|
|
1512
|
+
case "r":
|
|
1513
|
+
d = i.right + t.x, s && (d = o - Math.round((o - d) / n) * n);
|
|
1514
|
+
break;
|
|
1515
|
+
case "l":
|
|
1516
|
+
h = i.left - t.x, s && (h = Math.round(h / n) * n);
|
|
1517
|
+
break;
|
|
1518
|
+
}
|
|
1519
|
+
({
|
|
1520
|
+
newLeft: h,
|
|
1521
|
+
newRight: d,
|
|
1522
|
+
newTop: c,
|
|
1523
|
+
newBottom: m
|
|
1524
|
+
} = this.rectCorrectionByLimit({ newLeft: h, newRight: d, newTop: c, newBottom: m })), this.aspectRatio && ({
|
|
1525
|
+
newLeft: h,
|
|
1526
|
+
newRight: d,
|
|
1527
|
+
newTop: c,
|
|
1528
|
+
newBottom: m
|
|
1529
|
+
} = this.rectCorrectionByAspectRatio({ newLeft: h, newRight: d, newTop: c, newBottom: m })), this.left = h, this.right = d, this.top = c, this.bottom = m, this.$emit("resizing", this.rect);
|
|
1530
|
+
},
|
|
1531
|
+
stickUp() {
|
|
1532
|
+
this.stickDrag = !1, this.dimensionsBeforeMove = {
|
|
1533
|
+
pointerX: 0,
|
|
1534
|
+
pointerY: 0,
|
|
1535
|
+
x: 0,
|
|
1536
|
+
y: 0,
|
|
1537
|
+
w: 0,
|
|
1538
|
+
h: 0
|
|
1539
|
+
}, this.limits = {
|
|
1540
|
+
left: { min: null, max: null },
|
|
1541
|
+
right: { min: null, max: null },
|
|
1542
|
+
top: { min: null, max: null },
|
|
1543
|
+
bottom: { min: null, max: null }
|
|
1544
|
+
}, this.$emit("resizing", this.rect), this.$emit("resizestop", this.rect);
|
|
1545
|
+
},
|
|
1546
|
+
calcDragLimitation() {
|
|
1547
|
+
const { parentWidth: t, parentHeight: e } = this;
|
|
1548
|
+
return {
|
|
1549
|
+
left: { min: 0, max: t - this.width },
|
|
1550
|
+
right: { min: 0, max: t - this.width },
|
|
1551
|
+
top: { min: 0, max: e - this.height },
|
|
1552
|
+
bottom: { min: 0, max: e - this.height }
|
|
1553
|
+
};
|
|
1554
|
+
},
|
|
1555
|
+
calcResizeLimits() {
|
|
1556
|
+
const { aspectFactor: t, width: e, height: i, bottom: r, top: n, left: s, right: l } = this;
|
|
1557
|
+
let { minh: o, minw: c } = this;
|
|
1558
|
+
const m = this.parentLimitation ? 0 : null;
|
|
1559
|
+
this.aspectRatio && (c / o > t ? o = c / t : c = t * o);
|
|
1560
|
+
const h = {
|
|
1561
|
+
left: { min: m, max: s + (e - c) },
|
|
1562
|
+
right: { min: m, max: l + (e - c) },
|
|
1563
|
+
top: { min: m, max: n + (i - o) },
|
|
1564
|
+
bottom: { min: m, max: r + (i - o) }
|
|
1565
|
+
};
|
|
1566
|
+
if (this.aspectRatio) {
|
|
1567
|
+
const d = {
|
|
1568
|
+
left: {
|
|
1569
|
+
min: s - Math.min(n, r) * t * 2,
|
|
1570
|
+
max: s + (i - o) / 2 * t * 2
|
|
1571
|
+
},
|
|
1572
|
+
right: {
|
|
1573
|
+
min: l - Math.min(n, r) * t * 2,
|
|
1574
|
+
max: l + (i - o) / 2 * t * 2
|
|
1575
|
+
},
|
|
1576
|
+
top: {
|
|
1577
|
+
min: n - Math.min(s, l) / t * 2,
|
|
1578
|
+
max: n + (e - c) / 2 / t * 2
|
|
1579
|
+
},
|
|
1580
|
+
bottom: {
|
|
1581
|
+
min: r - Math.min(s, l) / t * 2,
|
|
1582
|
+
max: r + (e - c) / 2 / t * 2
|
|
1583
|
+
}
|
|
1584
|
+
};
|
|
1585
|
+
this.currentStick[0] === "m" ? (h.left = {
|
|
1586
|
+
min: Math.max(h.left.min, d.left.min),
|
|
1587
|
+
max: Math.min(h.left.max, d.left.max)
|
|
1588
|
+
}, h.right = {
|
|
1589
|
+
min: Math.max(h.right.min, d.right.min),
|
|
1590
|
+
max: Math.min(h.right.max, d.right.max)
|
|
1591
|
+
}) : this.currentStick[1] === "m" && (h.top = {
|
|
1592
|
+
min: Math.max(h.top.min, d.top.min),
|
|
1593
|
+
max: Math.min(h.top.max, d.top.max)
|
|
1594
|
+
}, h.bottom = {
|
|
1595
|
+
min: Math.max(h.bottom.min, d.bottom.min),
|
|
1596
|
+
max: Math.min(h.bottom.max, d.bottom.max)
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
return h;
|
|
1600
|
+
},
|
|
1601
|
+
sideCorrectionByLimit(t, e) {
|
|
1602
|
+
let i = e;
|
|
1603
|
+
return t.min !== null && e < t.min ? i = t.min : t.max !== null && t.max < e && (i = t.max), i;
|
|
1604
|
+
},
|
|
1605
|
+
rectCorrectionByLimit(t) {
|
|
1606
|
+
const { limits: e } = this;
|
|
1607
|
+
let { newRight: i, newLeft: r, newBottom: n, newTop: s } = t;
|
|
1608
|
+
return r = this.sideCorrectionByLimit(e.left, r), i = this.sideCorrectionByLimit(e.right, i), s = this.sideCorrectionByLimit(e.top, s), n = this.sideCorrectionByLimit(e.bottom, n), {
|
|
1609
|
+
newLeft: r,
|
|
1610
|
+
newRight: i,
|
|
1611
|
+
newTop: s,
|
|
1612
|
+
newBottom: n
|
|
1613
|
+
};
|
|
1614
|
+
},
|
|
1615
|
+
rectCorrectionByAspectRatio(t) {
|
|
1616
|
+
let { newLeft: e, newRight: i, newTop: r, newBottom: n } = t;
|
|
1617
|
+
const { parentWidth: s, parentHeight: l, currentStick: o, aspectFactor: c, dimensionsBeforeMove: m } = this;
|
|
1618
|
+
let h = s - e - i, d = l - r - n;
|
|
1619
|
+
if (o[1] === "m") {
|
|
1620
|
+
const p = d - m.height;
|
|
1621
|
+
e -= p * c / 2, i -= p * c / 2;
|
|
1622
|
+
} else if (o[0] === "m") {
|
|
1623
|
+
const p = h - m.width;
|
|
1624
|
+
r -= p / c / 2, n -= p / c / 2;
|
|
1625
|
+
} else
|
|
1626
|
+
h / d > c ? (h = c * d, o[1] === "l" ? e = s - i - h : i = s - e - h) : (d = h / c, o[0] === "t" ? r = l - n - d : n = l - r - d);
|
|
1627
|
+
return { newLeft: e, newRight: i, newTop: r, newBottom: n };
|
|
1628
|
+
}
|
|
1629
|
+
},
|
|
1630
|
+
computed: {
|
|
1631
|
+
positionStyle() {
|
|
1632
|
+
return {
|
|
1633
|
+
top: this.top + "px",
|
|
1634
|
+
left: this.left + "px",
|
|
1635
|
+
zIndex: this.zIndex
|
|
1636
|
+
};
|
|
1637
|
+
},
|
|
1638
|
+
sizeStyle() {
|
|
1639
|
+
return {
|
|
1640
|
+
width: this.width + "px",
|
|
1641
|
+
height: this.height + "px"
|
|
1642
|
+
};
|
|
1643
|
+
},
|
|
1644
|
+
vdrStick() {
|
|
1645
|
+
return (t) => {
|
|
1646
|
+
const e = {
|
|
1647
|
+
width: `${this.stickSize / this.parentScaleX}px`,
|
|
1648
|
+
height: `${this.stickSize / this.parentScaleY}px`
|
|
1649
|
+
};
|
|
1650
|
+
return e[D.y[t[0]]] = `${this.stickSize / this.parentScaleX / -2}px`, e[D.x[t[1]]] = `${this.stickSize / this.parentScaleX / -2}px`, e;
|
|
1651
|
+
};
|
|
1652
|
+
},
|
|
1653
|
+
width() {
|
|
1654
|
+
return this.parentWidth - this.left - this.right;
|
|
1655
|
+
},
|
|
1656
|
+
height() {
|
|
1657
|
+
return this.parentHeight - this.top - this.bottom;
|
|
1658
|
+
},
|
|
1659
|
+
rect() {
|
|
1660
|
+
return {
|
|
1661
|
+
left: Math.round(this.left),
|
|
1662
|
+
top: Math.round(this.top),
|
|
1663
|
+
width: Math.round(this.width),
|
|
1664
|
+
height: Math.round(this.height)
|
|
1665
|
+
};
|
|
1666
|
+
}
|
|
1667
|
+
},
|
|
1668
|
+
watch: {
|
|
1669
|
+
active(t) {
|
|
1670
|
+
t ? this.$emit("activated") : this.$emit("deactivated");
|
|
1671
|
+
},
|
|
1672
|
+
isActive: {
|
|
1673
|
+
immediate: !0,
|
|
1674
|
+
handler(t) {
|
|
1675
|
+
this.active = t;
|
|
1676
|
+
}
|
|
1677
|
+
},
|
|
1678
|
+
z: {
|
|
1679
|
+
immediate: !0,
|
|
1680
|
+
handler(t) {
|
|
1681
|
+
(t >= 0 || t === "auto") && (this.zIndex = t);
|
|
1682
|
+
}
|
|
1683
|
+
},
|
|
1684
|
+
x: {
|
|
1685
|
+
handler(t, e) {
|
|
1686
|
+
if (this.stickDrag || this.bodyDrag || t === this.left)
|
|
1687
|
+
return;
|
|
1688
|
+
const i = e - t;
|
|
1689
|
+
this.bodyDown({ pageX: this.left, pageY: this.top }), this.bodyMove({ x: i, y: 0 }), this.$nextTick(() => {
|
|
1690
|
+
this.bodyUp();
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
y: {
|
|
1695
|
+
handler(t, e) {
|
|
1696
|
+
if (this.stickDrag || this.bodyDrag || t === this.top)
|
|
1697
|
+
return;
|
|
1698
|
+
const i = e - t;
|
|
1699
|
+
this.bodyDown({ pageX: this.left, pageY: this.top }), this.bodyMove({ x: 0, y: i }), this.$nextTick(() => {
|
|
1700
|
+
this.bodyUp();
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
},
|
|
1704
|
+
w: {
|
|
1705
|
+
handler(t, e) {
|
|
1706
|
+
if (this.stickDrag || this.bodyDrag || t === this.width)
|
|
1707
|
+
return;
|
|
1708
|
+
const i = "mr", r = e - t;
|
|
1709
|
+
this.stickDown(i, { pageX: this.right, pageY: this.top + this.height / 2 }, !0), this.stickMove({ x: r, y: 0 }), this.$nextTick(() => {
|
|
1710
|
+
this.stickUp();
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
h: {
|
|
1715
|
+
handler(t, e) {
|
|
1716
|
+
if (this.stickDrag || this.bodyDrag || t === this.height)
|
|
1717
|
+
return;
|
|
1718
|
+
const i = "bm", r = e - t;
|
|
1719
|
+
this.stickDown(i, { pageX: this.left + this.width / 2, pageY: this.bottom }, !0), this.stickMove({ x: 0, y: r }), this.$nextTick(() => {
|
|
1720
|
+
this.stickUp();
|
|
1721
|
+
});
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
parentW(t) {
|
|
1725
|
+
this.right = t - this.width - this.left, this.parentWidth = t;
|
|
1726
|
+
},
|
|
1727
|
+
parentH(t) {
|
|
1728
|
+
this.bottom = t - this.height - this.top, this.parentHeight = t;
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
}, ke = ["onMousedown", "onTouchstart"];
|
|
1732
|
+
function ye(t, e, i, r, n, s) {
|
|
1733
|
+
return a(), u("div", {
|
|
1734
|
+
class: w(["vdr", `${n.active || i.isActive ? "active" : "inactive"} ${i.contentClass ? i.contentClass : ""}`]),
|
|
1735
|
+
style: B(s.positionStyle),
|
|
1736
|
+
onMousedown: e[0] || (e[0] = (l) => s.bodyDown(l)),
|
|
1737
|
+
onTouchstart: e[1] || (e[1] = (l) => s.bodyDown(l)),
|
|
1738
|
+
onTouchend: e[2] || (e[2] = (l) => s.up(l)),
|
|
1739
|
+
ref: "container",
|
|
1740
|
+
tabindex: "0"
|
|
1741
|
+
}, [
|
|
1742
|
+
f("div", {
|
|
1743
|
+
style: B(s.sizeStyle),
|
|
1744
|
+
class: "content-container",
|
|
1745
|
+
ref: "container2"
|
|
1746
|
+
}, [
|
|
1747
|
+
j(t.$slots, "default")
|
|
1748
|
+
], 4),
|
|
1749
|
+
(a(!0), u(y, null, M(i.sticks, (l) => (a(), u("div", {
|
|
1750
|
+
class: w(["vdr-stick", ["vdr-stick-" + l, i.isResizable ? "" : "not-resizable"]]),
|
|
1751
|
+
onMousedown: A((o) => s.stickDown(l, o), ["stop", "prevent"]),
|
|
1752
|
+
onTouchstart: A((o) => s.stickDown(l, o), ["stop", "prevent"]),
|
|
1753
|
+
style: B(s.vdrStick(l))
|
|
1754
|
+
}, null, 46, ke))), 256))
|
|
1755
|
+
], 38);
|
|
1756
|
+
}
|
|
1757
|
+
const E = /* @__PURE__ */ C(_e, [["render", ye]]);
|
|
1758
|
+
const we = {
|
|
1759
|
+
components: {
|
|
1760
|
+
VueDragResize: E
|
|
1761
|
+
},
|
|
1762
|
+
props: ["content"],
|
|
1763
|
+
data() {
|
|
1764
|
+
return {};
|
|
1765
|
+
},
|
|
1766
|
+
watch: {},
|
|
1767
|
+
computed: {
|
|
1768
|
+
getLastPage() {
|
|
1769
|
+
return !!this.$store.getters.getLastPage;
|
|
1770
|
+
}
|
|
1771
|
+
},
|
|
1772
|
+
methods: {
|
|
1773
|
+
onResizstop(t) {
|
|
1774
|
+
console.log("i have stopped resizing", t);
|
|
1775
|
+
},
|
|
1776
|
+
onDragstop(t) {
|
|
1777
|
+
},
|
|
1778
|
+
reset() {
|
|
1779
|
+
this.listOne = [];
|
|
1780
|
+
},
|
|
1781
|
+
getParentWidth() {
|
|
1782
|
+
let t = document.getElementsByClassName("fridgemagnet");
|
|
1783
|
+
setTimeout(() => t[0].offsetWidth);
|
|
1784
|
+
},
|
|
1785
|
+
getParentHeight() {
|
|
1786
|
+
let t = document.getElementsByClassName("fridgemagnet");
|
|
1787
|
+
setTimeout(() => t[0].offsetHeight);
|
|
1788
|
+
},
|
|
1789
|
+
keyboardMove(t) {
|
|
1790
|
+
for (let e of t)
|
|
1791
|
+
document.getElementById(e.id).addEventListener("focusin", (r) => {
|
|
1792
|
+
let n = document.getElementsByClassName("fridgemagnet");
|
|
1793
|
+
addEventListener("keydown", function(s) {
|
|
1794
|
+
let l = document.getElementById(s.target.id);
|
|
1795
|
+
if (s.altKey && s.key === "ArrowLeft") {
|
|
1796
|
+
let o = Number(l.style.left.slice(0, -2));
|
|
1797
|
+
o - 10 < 0 ? l.style.left = `${o}px` : l.style.left = `${o - 10}px`;
|
|
1798
|
+
}
|
|
1799
|
+
if (s.altKey && s.key === "ArrowRight") {
|
|
1800
|
+
let o = Number(l.style.left.slice(0, -2));
|
|
1801
|
+
o + 10 > n[0].offsetWidth - 50 ? l.style.left = `${o}px` : l.style.left = `${o + 10}px`;
|
|
1802
|
+
}
|
|
1803
|
+
if (s.altKey && s.key === "ArrowUp") {
|
|
1804
|
+
let o = Number(l.style.top.slice(0, -2));
|
|
1805
|
+
o + 10 < 0 ? l.style.top = `${o}px` : l.style.top = `${o - 10}px`;
|
|
1806
|
+
}
|
|
1807
|
+
if (s.altKey && s.key === "ArrowDown") {
|
|
1808
|
+
let o = Number(l.style.top.slice(0, -2));
|
|
1809
|
+
o + 10 > n[0].offsetHeight - 80 ? l.style.top = `${o}px` : l.style.top = `${o + 10}px`;
|
|
1810
|
+
}
|
|
1811
|
+
});
|
|
1812
|
+
});
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
mounted() {
|
|
1816
|
+
let t = document.getElementsByClassName("vdr");
|
|
1817
|
+
setTimeout(() => {
|
|
1818
|
+
t[0].focus();
|
|
1819
|
+
}), this.keyboardMove(t);
|
|
1820
|
+
},
|
|
1821
|
+
beforeMount() {
|
|
1822
|
+
}
|
|
1823
|
+
}, ve = { class: "fridgemagnet" }, xe = ["innerHTML"], Ce = ["src", "alt"], Se = ["id", "src", "alt"], Ae = ["innerHTML"];
|
|
1824
|
+
function Me(t, e, i, r, n, s) {
|
|
1825
|
+
const l = g("VueDragResize");
|
|
1826
|
+
return a(), u("div", ve, [
|
|
1827
|
+
i.content.directions ? (a(), u("p", {
|
|
1828
|
+
key: 0,
|
|
1829
|
+
innerHTML: i.content.directions
|
|
1830
|
+
}, null, 8, xe)) : b("", !0),
|
|
1831
|
+
f("img", {
|
|
1832
|
+
src: i.content.image,
|
|
1833
|
+
alt: i.content.imageAlt
|
|
1834
|
+
}, null, 8, Ce),
|
|
1835
|
+
f("div", {
|
|
1836
|
+
class: w(["fridge", i.content.class, i.content.noOutline ? "no_outline" : ""])
|
|
1837
|
+
}, [
|
|
1838
|
+
(a(!0), u(y, null, M(i.content.magnets, (o, c) => (a(), v(l, {
|
|
1839
|
+
id: "vdr_" + c,
|
|
1840
|
+
isActive: !0,
|
|
1841
|
+
w: o.width ? o.width : 50,
|
|
1842
|
+
minw: o.minWidth ? o.minWidth : 50,
|
|
1843
|
+
h: o.height ? o.height : 50,
|
|
1844
|
+
minh: o.minHeight ? o.minHeight : 50,
|
|
1845
|
+
x: o.x ? o.x : 0,
|
|
1846
|
+
y: o.y ? o.y : 60 * c,
|
|
1847
|
+
class: w(o.class),
|
|
1848
|
+
parentLimitation: !0,
|
|
1849
|
+
parentW: o.parentwidth ? o.parentwidth : s.getParentWidth(),
|
|
1850
|
+
parentH: o.parentheight ? o.parentheight : s.getParentHeight(),
|
|
1851
|
+
isResizable: o.resizable,
|
|
1852
|
+
isDraggable: o.draggable,
|
|
1853
|
+
snapToGrid: o.snap,
|
|
1854
|
+
gridX: o.snapX,
|
|
1855
|
+
gridY: o.snapY,
|
|
1856
|
+
dragHandle: o.handle,
|
|
1857
|
+
onResizing: t.resize,
|
|
1858
|
+
onDragging: t.resize,
|
|
1859
|
+
aspectRatio: !0,
|
|
1860
|
+
onResizestop: s.onResizstop,
|
|
1861
|
+
onDragstop: s.onDragstop,
|
|
1862
|
+
sticks: ["tl", "bl", "tr", "br"]
|
|
1863
|
+
}, {
|
|
1864
|
+
default: _(() => [
|
|
1865
|
+
o.image ? (a(), u("img", {
|
|
1866
|
+
key: 0,
|
|
1867
|
+
id: o.index,
|
|
1868
|
+
src: o.image,
|
|
1869
|
+
alt: o.imageAlt
|
|
1870
|
+
}, null, 8, Se)) : b("", !0),
|
|
1871
|
+
o.text ? (a(), u("p", {
|
|
1872
|
+
key: 1,
|
|
1873
|
+
innerHTML: o.text
|
|
1874
|
+
}, null, 8, Ae)) : b("", !0)
|
|
1875
|
+
]),
|
|
1876
|
+
_: 2
|
|
1877
|
+
}, 1032, ["id", "w", "minw", "h", "minh", "x", "y", "class", "parentW", "parentH", "isResizable", "isDraggable", "snapToGrid", "gridX", "gridY", "dragHandle", "onResizing", "onDragging", "onResizestop", "onDragstop"]))), 256))
|
|
1878
|
+
], 2)
|
|
1879
|
+
]);
|
|
1880
|
+
}
|
|
1881
|
+
const Te = /* @__PURE__ */ C(we, [["render", Me]]), Be = {
|
|
1882
|
+
install: (t, e) => {
|
|
1883
|
+
t.component("special-uploader", X), t.component("lab-header", K), t.component("lab-footer", L), t.component("lab-drawer", L), t.component("lab-image", rt), t.component("lab-kaltura", gt), t.component("lab-image-marker", Ft), t.component("lab-image-replacer", Ot), t.component("lab-feedback", I), t.component("lab-drop-down", qt), t.component("lab-fill-blank", Nt), t.component("lab-selectable", Jt), t.component("lab-textbox", ee), t.component("lab-menu_chooser", pe), t.component("lab-drag-resize", E), t.component("lab-fridgemagnet", Te);
|
|
1218
1884
|
}
|
|
1219
1885
|
};
|
|
1220
1886
|
export {
|
|
1221
|
-
|
|
1887
|
+
Be as default
|
|
1222
1888
|
};
|