ep-lib-ts 1.0.43 → 1.0.44
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/BgAudio-ByQMjvpb.js +4 -0
- package/dist/DisplayBox-5KOzK-T1.js +4 -0
- package/dist/Ep360Image-CQJBPImD.js +241 -0
- package/dist/{Ep360Video-b_stvC2Z.js → Ep360Video-CL_7mOiQ.js} +84 -77
- package/dist/EpAlert-9n3eGOzn.js +4 -0
- package/dist/EpAudio-DN-khrPL.js +4 -0
- package/dist/EpAvatar-CXQP2wql.js +4 -0
- package/dist/EpBadge-4MOToF_Q.js +4 -0
- package/dist/EpBarChart-D7YNa6L1.js +4 -0
- package/dist/EpBranchingScenario-vDe8SVyF.js +160 -0
- package/dist/EpBtn-CodZ5WkT.js +4 -0
- package/dist/EpCard-bxcDoveo.js +4 -0
- package/dist/EpCardLink-BpRg37fb.js +4 -0
- package/dist/EpChip-DyPsThQ7.js +4 -0
- package/dist/EpCodeblock-CTVen6ok.js +4 -0
- package/dist/EpConclusion-CZSpnFN3.js +4 -0
- package/dist/EpContentSlider-0KrwEp3v.js +4 -0
- package/dist/{EpDarkmode-Bechg1uo.js → EpDarkmode-CM5E89Mq.js} +1 -1
- package/dist/EpDescription-BqAK-19p.js +4 -0
- package/dist/EpDivider-Cz2UczzO.js +4 -0
- package/dist/EpDraggable-DihYnwD-.js +1676 -0
- package/dist/EpEdu-Cb0syukg.js +4 -0
- package/dist/EpFlex-C9FQK2SA.js +4 -0
- package/dist/EpFunnelChart-DCiSFsse.js +4 -0
- package/dist/EpHeader-CzSF69pa.js +4 -0
- package/dist/EpHover-RZmDKnaw.js +4 -0
- package/dist/EpHoverCard-D6G0baOv.js +4 -0
- package/dist/EpIcon-Av0-zy17.js +4 -0
- package/dist/EpIframe-DW9zyLQo.js +4 -0
- package/dist/EpImg-CSHuR6qU.js +4 -0
- package/dist/EpImgCarousel-cIC103wg.js +4 -0
- package/dist/{EpInput-CoSeoa1t.js → EpInput-DHrHSXzx.js} +29 -29
- package/dist/EpInstructions-K-kkygx5.js +4 -0
- package/dist/EpIntroduction-CQlFolxF.js +4 -0
- package/dist/EpLineChart-mWEJNhfP.js +4 -0
- package/dist/EpLink-ByArsF1O.js +4 -0
- package/dist/EpLinkVersion-D0l0gER1.js +4 -0
- package/dist/{EpList-DTN7D9wV.js → EpList-c0SMP53E.js} +1 -1
- package/dist/EpModal-CnTSNH-6.js +4 -0
- package/dist/{EpNothing-ChLi44xn.js → EpNothing-CT8_zyfI.js} +1 -1
- package/dist/EpObjective-CFUl1myw.js +4 -0
- package/dist/EpPieChart-D4gofeCO.js +4 -0
- package/dist/EpQuestion-DpEP1I3J.js +4 -0
- package/dist/EpQuote-D_a9FXrQ.js +4 -0
- package/dist/EpRadio-BPGeCsln.js +4 -0
- package/dist/EpRadioSummative-2GRkKBZC.js +4 -0
- package/dist/EpReading-b0gkhYIF.js +4 -0
- package/dist/EpResource-B1pFABU5.js +4 -0
- package/dist/EpScope-BQWyrqjD.js +4 -0
- package/dist/EpSection-CkXDsnuU.js +4 -0
- package/dist/EpSectionCols-BwC-XklV.js +4 -0
- package/dist/EpSkeleton-CfhwJtyP.js +4 -0
- package/dist/EpSoftware-c8ntWUO-.js +4 -0
- package/dist/EpSpecificObjective-D3mba6ZZ.js +4 -0
- package/dist/EpSpinner-G3e-rq8T.js +4 -0
- package/dist/EpStackedList-Bo0PTfJP.js +4 -0
- package/dist/EpSummativeTable-BumOFuw9.js +4 -0
- package/dist/EpSvg-D1zVHuRF.js +4 -0
- package/dist/EpSvgShow-CDYlL1_A.js +54 -0
- package/dist/EpTable-gr45PRwp.js +4 -0
- package/dist/EpTerm-CNfRoEdY.js +4 -0
- package/dist/EpText-DKuz6gcn.js +4 -0
- package/dist/EpTimeLine-O-XSTUsa.js +4 -0
- package/dist/EpVideo-DB3Kgada.js +4 -0
- package/dist/EpVideoPanopto-Vta3OP2y.js +4 -0
- package/dist/EpWordDef-CYOQAmor.js +4 -0
- package/dist/components/basics/EpImgCarousel.vue.d.ts +77 -0
- package/dist/components/educationals/EpBranchingScenario.vue.d.ts +1 -0
- package/dist/components/interactions/Ep360Image.vue.d.ts +1 -0
- package/dist/components/interactions/EpDraggable.vue.d.ts +26 -0
- package/dist/components/interactions/EpSvgShow.vue.d.ts +33 -1
- package/dist/components/medias/EpCarousel.vue.d.ts +5 -0
- package/dist/ep-lib-ts.js +30 -30
- package/dist/ep-lib-ts.umd.cjs +4600 -4766
- package/dist/{index-D-GKNNDO.js → index-DtabYqi-.js} +1 -1
- package/dist/{index-BFsz449L.js → index-hjRiaRG8.js} +3752 -3589
- package/dist/{prism-iP2cUnBs.js → prism-DpfMvZqf.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/three.module-CWLs6nMo.js +33752 -0
- package/dist/types/Draggable.d.ts +15 -0
- package/dist/types/Image.d.ts +5 -0
- package/package.json +4 -2
- package/src/components/basics/EpImg.vue +1 -1
- package/src/components/basics/EpImgCarousel.vue +145 -0
- package/src/components/basics/EpText.vue +20 -18
- package/src/components/educationals/EpBranchingScenario.vue +15 -6
- package/src/components/educationals/EpReading.vue +3 -3
- package/src/components/interactions/Ep360Image.vue +32 -11
- package/src/components/interactions/Ep360Video.vue +15 -3
- package/src/components/interactions/EpDraggable.vue +192 -0
- package/src/components/interactions/EpSvgShow.vue +91 -38
- package/src/components/medias/EpCarousel.vue +74 -11
- package/dist/BgAudio-BxmV-0cC.js +0 -4
- package/dist/DisplayBox-CUpEsLPU.js +0 -4
- package/dist/Ep360Image-Dmwx7NrY.js +0 -228
- package/dist/EpAlert-DZRwC-hR.js +0 -4
- package/dist/EpAudio-DWUaCLxZ.js +0 -4
- package/dist/EpAvatar-CB_8dpH1.js +0 -4
- package/dist/EpBadge-D2rYlVX2.js +0 -4
- package/dist/EpBarChart-20DIx08w.js +0 -4
- package/dist/EpBranchingScenario-CMBEwqVe.js +0 -151
- package/dist/EpBtn-D4Sib9BE.js +0 -4
- package/dist/EpCard-DJQezxQs.js +0 -4
- package/dist/EpCardLink-CZ10BP3M.js +0 -4
- package/dist/EpChip-BrlNEof-.js +0 -4
- package/dist/EpCodeblock-C-DQR2do.js +0 -4
- package/dist/EpConclusion-Cd2gP1Wh.js +0 -4
- package/dist/EpContentSlider-zQ7TcQlI.js +0 -4
- package/dist/EpDescription-Tbo3BFV2.js +0 -4
- package/dist/EpDivider-DVkzWELv.js +0 -4
- package/dist/EpEdu-B7If0gdy.js +0 -4
- package/dist/EpFlex-e5sNF2bY.js +0 -4
- package/dist/EpFunnelChart-DVJ_6KdY.js +0 -4
- package/dist/EpHeader-DNGWRkmf.js +0 -4
- package/dist/EpHover-_jWsMPY8.js +0 -4
- package/dist/EpHoverCard-C-BojFhi.js +0 -4
- package/dist/EpIcon-8MS-eLaB.js +0 -4
- package/dist/EpIframe-ClKZ7eIe.js +0 -4
- package/dist/EpImg-ZxP-DCOC.js +0 -4
- package/dist/EpInstructions-0UvWFAAP.js +0 -4
- package/dist/EpIntroduction-kwTAl-2S.js +0 -4
- package/dist/EpLineChart-DrqtLuL_.js +0 -4
- package/dist/EpLink-Be86I9U6.js +0 -4
- package/dist/EpLinkVersion-B4pxWTOZ.js +0 -4
- package/dist/EpModal-rL51M47q.js +0 -4
- package/dist/EpObjective-CDmtLCil.js +0 -4
- package/dist/EpPieChart--F20jSnB.js +0 -4
- package/dist/EpQuestion-B3bl3ED0.js +0 -4
- package/dist/EpQuote-WsTNUXP3.js +0 -4
- package/dist/EpRadio-5wRevOhg.js +0 -4
- package/dist/EpRadioSummative-Bhuk0G-D.js +0 -4
- package/dist/EpReading-DqNY4agb.js +0 -4
- package/dist/EpResource-CKx-Sm7H.js +0 -4
- package/dist/EpScope-CAGu6ain.js +0 -4
- package/dist/EpSection-Cs8w0x7y.js +0 -4
- package/dist/EpSectionCols-nBUK8VK3.js +0 -4
- package/dist/EpSkeleton-DBJIz_Yb.js +0 -4
- package/dist/EpSoftware-l7_8diQ_.js +0 -4
- package/dist/EpSpecificObjective-D2Sz35-I.js +0 -4
- package/dist/EpSpinner-BnfTBKN1.js +0 -4
- package/dist/EpStackedList-CtkpLHrV.js +0 -4
- package/dist/EpSummativeTable-CgQiZKos.js +0 -4
- package/dist/EpSvg-DDlhssE7.js +0 -4
- package/dist/EpSvgShow-DNKVoqjv.js +0 -84
- package/dist/EpTable-DriGGo4l.js +0 -4
- package/dist/EpTerm-DNfBy49u.js +0 -4
- package/dist/EpText-CrfoaXl_.js +0 -4
- package/dist/EpTimeLine-CRwBWqNV.js +0 -4
- package/dist/EpVideo-DV8hETkp.js +0 -4
- package/dist/EpVideoPanopto-588sRcMP.js +0 -4
- package/dist/EpWordDef-BuZFiK1M.js +0 -4
- package/dist/three.module-laS36oD-.js +0 -48903
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { defineComponent as I, ref as y, onMounted as T, createElementBlock as l, openBlock as u, createElementVNode as r, createCommentVNode as w, Fragment as _, renderList as b } from "vue";
|
|
2
|
-
import { a as d, V as x, Q as $ } from "./three.module-laS36oD-.js";
|
|
3
|
-
const q = { style: { width: "800px", height: "600px", overflow: "hidden", position: "relative", margin: "auto" } }, V = { embedded: "" }, W = ["id", "src"], H = ["src"], L = ["position"], B = ["color", "material", "onClick", "onMouseenter"], N = ["position"], z = ["value"], G = ["value"], J = ["position"], K = ["value"], U = ["value"], Z = /* @__PURE__ */ I({
|
|
4
|
-
__name: "Ep360Image",
|
|
5
|
-
props: {
|
|
6
|
-
scenes: {}
|
|
7
|
-
},
|
|
8
|
-
setup(j) {
|
|
9
|
-
const m = j, v = y(0), n = y(null), i = y(null);
|
|
10
|
-
d.components["rotation-reader"] || d.registerComponent("rotation-reader", {
|
|
11
|
-
schema: {},
|
|
12
|
-
tick: k()
|
|
13
|
-
});
|
|
14
|
-
function C(e, o) {
|
|
15
|
-
if (e && ((e == null ? void 0 : e.event) === "onClick" || !e.event)) {
|
|
16
|
-
if (e.type == "descriptive")
|
|
17
|
-
i.value = e, o.target.setAttribute("material", "opacity: 0; transparent: true"), console.log("Marker clicked:", e);
|
|
18
|
-
else if (e.type == "action") {
|
|
19
|
-
const t = m.scenes.findIndex(
|
|
20
|
-
(a) => a.id === e.scene
|
|
21
|
-
);
|
|
22
|
-
t !== -1 && (v.value = t), console.log(
|
|
23
|
-
"Action Pin Clicked. Scene switched to:",
|
|
24
|
-
v.value
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function P(e, o) {
|
|
30
|
-
e && ((e == null ? void 0 : e.event) === "onHover" || !(e != null && e.event)) && (n.value = e, o.target.setAttribute("material", "opacity: 0; transparent: true"), console.log("Marker hovered:", e));
|
|
31
|
-
}
|
|
32
|
-
function E(e, o) {
|
|
33
|
-
var a;
|
|
34
|
-
if (!e) return;
|
|
35
|
-
const t = o.relatedTarget;
|
|
36
|
-
if ((e == null ? void 0 : e.event) === "onHover" || !(e != null && e.event)) {
|
|
37
|
-
const f = o.target;
|
|
38
|
-
i.value == e && f.setAttribute("material", "opacity: 1; transparent: true"), !(t != null && t.classList.contains("interactive-area")) && ((a = n.value) == null ? void 0 : a.id) === (e == null ? void 0 : e.id) && (n.value = null, console.log("Hover cleared:", e));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function g(e, o) {
|
|
42
|
-
return `${e / 10} ${o / 10} -5`;
|
|
43
|
-
}
|
|
44
|
-
T(() => {
|
|
45
|
-
(async () => await M("rotation-reader", 2e3))(), (async () => await O(2e3))();
|
|
46
|
-
});
|
|
47
|
-
async function M(e, o = 1e3) {
|
|
48
|
-
d.components[e] && (await p(o), delete d.components[e]);
|
|
49
|
-
}
|
|
50
|
-
function p(e) {
|
|
51
|
-
return new Promise((o) => setTimeout(o, e));
|
|
52
|
-
}
|
|
53
|
-
async function O(e = 1e3) {
|
|
54
|
-
await p(e), d.components["rotation-reader"] && (console.warn(
|
|
55
|
-
"Existing rotation-reader component found. Re-registering..."
|
|
56
|
-
), delete d.components["rotation-reader"]), d.registerComponent("rotation-reader", {
|
|
57
|
-
schema: {},
|
|
58
|
-
tick: k()
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
function k() {
|
|
62
|
-
const e = new $(), o = new x(), t = new x(), a = 5, f = 0.8;
|
|
63
|
-
return function() {
|
|
64
|
-
D(this.el.object3D, e), S(e), this.el.object3D.getWorldPosition(o), document.querySelectorAll(".pin-marker").forEach((h) => {
|
|
65
|
-
const s = h.object3D;
|
|
66
|
-
if (s) {
|
|
67
|
-
s.getWorldPosition(t);
|
|
68
|
-
const c = o.distanceTo(t) * f / a;
|
|
69
|
-
s.scale.set(c, c, c);
|
|
70
|
-
}
|
|
71
|
-
}), document.querySelectorAll(".frame").forEach((h) => {
|
|
72
|
-
const s = h.object3D;
|
|
73
|
-
if (s) {
|
|
74
|
-
s.getWorldPosition(t);
|
|
75
|
-
const c = o.distanceTo(t) * f / a;
|
|
76
|
-
s.scale.set(c, c, c);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function A(e) {
|
|
82
|
-
return n.value && n.value.id === e || i.value && i.value.id === e ? 0 : 1;
|
|
83
|
-
}
|
|
84
|
-
function D(e, o) {
|
|
85
|
-
e.getWorldQuaternion(o);
|
|
86
|
-
}
|
|
87
|
-
function S(e) {
|
|
88
|
-
document.querySelectorAll(".pin-marker").forEach((o) => {
|
|
89
|
-
const t = o.object3D;
|
|
90
|
-
t && t.setRotationFromQuaternion(e);
|
|
91
|
-
}), document.querySelectorAll(".frame").forEach((o) => {
|
|
92
|
-
const t = o.object3D;
|
|
93
|
-
t && t.setRotationFromQuaternion(e);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
function Q() {
|
|
97
|
-
i.value = null;
|
|
98
|
-
}
|
|
99
|
-
function R(e) {
|
|
100
|
-
return e.color || "indigo";
|
|
101
|
-
}
|
|
102
|
-
return (e, o) => (u(), l("div", q, [
|
|
103
|
-
r("a-scene", V, [
|
|
104
|
-
r("a-assets", null, [
|
|
105
|
-
(u(!0), l(_, null, b(m.scenes, (t) => (u(), l("img", {
|
|
106
|
-
key: t.id,
|
|
107
|
-
id: `image${t.id}`,
|
|
108
|
-
src: t.skyImage,
|
|
109
|
-
crossorigin: "anonymous"
|
|
110
|
-
}, null, 8, W))), 128))
|
|
111
|
-
]),
|
|
112
|
-
o[3] || (o[3] = r("a-entity", {
|
|
113
|
-
camera: "",
|
|
114
|
-
"look-controls": "",
|
|
115
|
-
id: "rig",
|
|
116
|
-
"rotation-reader": ""
|
|
117
|
-
}, [
|
|
118
|
-
r("a-cursor", {
|
|
119
|
-
id: "cursor",
|
|
120
|
-
cursor: "rayOrigin: mouse",
|
|
121
|
-
raycaster: "objects: none",
|
|
122
|
-
geometry: "primitive: ring; radiusInner: 0; radiusOuter: 0",
|
|
123
|
-
material: "opacity: 0; transparent: true"
|
|
124
|
-
})
|
|
125
|
-
], -1)),
|
|
126
|
-
r("a-sky", {
|
|
127
|
-
src: `#image${m.scenes[v.value].id}`,
|
|
128
|
-
radius: "100"
|
|
129
|
-
}, null, 8, H),
|
|
130
|
-
(u(!0), l(_, null, b(m.scenes[v.value].pins, (t) => (u(), l("a-entity", {
|
|
131
|
-
key: t.id,
|
|
132
|
-
position: g(t.x, t.y),
|
|
133
|
-
cursor: "rayOrigin: mouse"
|
|
134
|
-
}, [
|
|
135
|
-
r("a-circle", {
|
|
136
|
-
class: "pin-marker",
|
|
137
|
-
color: R(t),
|
|
138
|
-
radius: "0.25",
|
|
139
|
-
shader: "flat",
|
|
140
|
-
material: `opacity: ${A(
|
|
141
|
-
t.id
|
|
142
|
-
)}; transparent: true`,
|
|
143
|
-
onClick: (a) => C(t, a),
|
|
144
|
-
onMouseenter: (a) => P(t, a)
|
|
145
|
-
}, null, 40, B)
|
|
146
|
-
], 8, L))), 128)),
|
|
147
|
-
n.value ? (u(), l("a-entity", {
|
|
148
|
-
key: 0,
|
|
149
|
-
position: g(n.value.x, n.value.y),
|
|
150
|
-
class: "frame interactive-area",
|
|
151
|
-
cursor: "rayOrigin: mouse",
|
|
152
|
-
onMouseleave: o[0] || (o[0] = (t) => E(n.value, t))
|
|
153
|
-
}, [
|
|
154
|
-
o[1] || (o[1] = r("a-plane", {
|
|
155
|
-
color: "white",
|
|
156
|
-
opacity: 1,
|
|
157
|
-
width: "4",
|
|
158
|
-
height: "1.5",
|
|
159
|
-
material: "shader: standard; side: double;",
|
|
160
|
-
position: "0 0 0",
|
|
161
|
-
geometry: "primitive: plane; height: 1.5; width: 4;"
|
|
162
|
-
}, null, -1)),
|
|
163
|
-
r("a-text", {
|
|
164
|
-
value: n.value.title,
|
|
165
|
-
color: "#2c3e50",
|
|
166
|
-
font: "dejavu",
|
|
167
|
-
align: "center",
|
|
168
|
-
width: "3.8",
|
|
169
|
-
position: "0 0.3 0.01"
|
|
170
|
-
}, null, 8, z),
|
|
171
|
-
r("a-text", {
|
|
172
|
-
value: n.value.description,
|
|
173
|
-
color: "#34495e",
|
|
174
|
-
font: "dejavu",
|
|
175
|
-
align: "center",
|
|
176
|
-
width: "3.5",
|
|
177
|
-
position: "0 -0.3 0.01"
|
|
178
|
-
}, null, 8, G)
|
|
179
|
-
], 40, N)) : w("", !0),
|
|
180
|
-
i.value ? (u(), l("a-entity", {
|
|
181
|
-
key: 1,
|
|
182
|
-
position: g(i.value.x, i.value.y),
|
|
183
|
-
class: "frame interactive-area",
|
|
184
|
-
cursor: "rayOrigin: mouse"
|
|
185
|
-
}, [
|
|
186
|
-
o[2] || (o[2] = r("a-plane", {
|
|
187
|
-
color: "white",
|
|
188
|
-
opacity: 1,
|
|
189
|
-
width: "4",
|
|
190
|
-
height: "1.5",
|
|
191
|
-
material: "shader: standard; side: double;",
|
|
192
|
-
position: "0 0 0",
|
|
193
|
-
geometry: "primitive: plane; height: 1.5; width: 4;"
|
|
194
|
-
}, null, -1)),
|
|
195
|
-
r("a-plane", {
|
|
196
|
-
class: "close-frame",
|
|
197
|
-
color: "red",
|
|
198
|
-
width: "0.4",
|
|
199
|
-
height: "0.4",
|
|
200
|
-
position: "1.8 0.55 0.01",
|
|
201
|
-
material: "shader: flat; side: double; transparent: true;",
|
|
202
|
-
geometry: "primitive: plane; height: 0.4; width: 0.4;",
|
|
203
|
-
onClick: Q
|
|
204
|
-
}),
|
|
205
|
-
r("a-text", {
|
|
206
|
-
value: i.value.title,
|
|
207
|
-
color: "#2c3e50",
|
|
208
|
-
font: "dejavu",
|
|
209
|
-
align: "center",
|
|
210
|
-
width: "3.8",
|
|
211
|
-
position: "0 0.3 0.01"
|
|
212
|
-
}, null, 8, K),
|
|
213
|
-
r("a-text", {
|
|
214
|
-
value: i.value.description,
|
|
215
|
-
color: "#34495e",
|
|
216
|
-
font: "dejavu",
|
|
217
|
-
align: "center",
|
|
218
|
-
width: "3.5",
|
|
219
|
-
position: "0 -0.3 0.01"
|
|
220
|
-
}, null, 8, U)
|
|
221
|
-
], 8, J)) : w("", !0)
|
|
222
|
-
])
|
|
223
|
-
]));
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
export {
|
|
227
|
-
Z as default
|
|
228
|
-
};
|
package/dist/EpAlert-DZRwC-hR.js
DELETED
package/dist/EpAudio-DWUaCLxZ.js
DELETED
package/dist/EpBadge-D2rYlVX2.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { defineComponent as H, ref as f, computed as L, createElementBlock as n, openBlock as o, normalizeStyle as k, createElementVNode as r, createCommentVNode as g, toDisplayString as m, unref as v, normalizeClass as u, createVNode as A, Fragment as y, renderList as b } from "vue";
|
|
2
|
-
import { x as w, l as I, y as M, a as j } from "./index-BFsz449L.js";
|
|
3
|
-
const q = { class: "font-bold text-3xl" }, E = ["innerHTML"], V = ["innerHTML"], z = ["src"], B = ["onClick"], N = {
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "flex-grow flex"
|
|
6
|
-
}, F = ["innerHTML"], O = ["src"], P = ["onClick"], Q = { class: "flex-grow flex flex-col items-center" }, R = {
|
|
7
|
-
class: "flex flex-col relative w-full gap-4 px-5 py-5 items-start overflow-auto border-l-4 border-gray-700",
|
|
8
|
-
style: { "max-width": "600px", height: "300px" }
|
|
9
|
-
}, D = /* @__PURE__ */ H({
|
|
10
|
-
__name: "EpBranchingScenario",
|
|
11
|
-
props: {
|
|
12
|
-
scenarioTitle: {},
|
|
13
|
-
initialInstruction: { default: null },
|
|
14
|
-
bgColor: {},
|
|
15
|
-
decisionTree: {},
|
|
16
|
-
transitionAnimation: { default: "fade" }
|
|
17
|
-
},
|
|
18
|
-
setup(T) {
|
|
19
|
-
const d = T, a = f([]), c = f(0), i = f(null), p = f(!0), C = (e) => {
|
|
20
|
-
let s = d.decisionTree;
|
|
21
|
-
if (e.length > 0)
|
|
22
|
-
for (let t = 0; t < e.length; t++)
|
|
23
|
-
s = s.options[e[t]];
|
|
24
|
-
return s !== d.decisionTree ? s : null;
|
|
25
|
-
}, _ = () => {
|
|
26
|
-
h.value && (a.value.length === 0 && (p.value = !0), a.value.pop(), i.value = C(a.value), c.value = a.value.length);
|
|
27
|
-
}, h = L(() => c.value === 0 || i.value && i.value.options && i.value.options.length > 0), $ = () => {
|
|
28
|
-
c.value = 0, i.value = null, a.value = [], p.value = !0;
|
|
29
|
-
}, S = (e) => {
|
|
30
|
-
let s = [{ question: d.decisionTree.rootQuestion, choice: d.decisionTree.options[e[0]].name }], t = d.decisionTree.options[e[0]];
|
|
31
|
-
if (e.length > 1)
|
|
32
|
-
for (let l = 1; l < e.length; l++) {
|
|
33
|
-
let x = t.question;
|
|
34
|
-
t = t.options[e[l]], s.push({ question: x, choice: t.name });
|
|
35
|
-
}
|
|
36
|
-
return s;
|
|
37
|
-
};
|
|
38
|
-
return (e, s) => (o(), n("div", null, [
|
|
39
|
-
p.value ? (o(), n("div", {
|
|
40
|
-
key: 0,
|
|
41
|
-
class: "m-4 mx-auto w-2/3 bg-gray-200 dark:bg-slate-800 rounded-md flex flex-col items-center justify-around p-4 fade",
|
|
42
|
-
style: k({ minHeight: "500px", backgroundColor: e.bgColor })
|
|
43
|
-
}, [
|
|
44
|
-
r("h1", q, m(e.scenarioTitle), 1),
|
|
45
|
-
e.initialInstruction ? (o(), n("div", {
|
|
46
|
-
key: 0,
|
|
47
|
-
class: "text-center min-w-max m-3 flex flex-col items-center gap-3",
|
|
48
|
-
innerHTML: v(w)(e.initialInstruction)
|
|
49
|
-
}, null, 8, E)) : g("", !0),
|
|
50
|
-
r("button", {
|
|
51
|
-
class: "rounded bg-blue-500 text-white py-2 px-4 min-w-28 my-3",
|
|
52
|
-
onClick: s[0] || (s[0] = (t) => p.value = !1)
|
|
53
|
-
}, "Commencer")
|
|
54
|
-
], 4)) : (o(), n("div", {
|
|
55
|
-
key: 1,
|
|
56
|
-
class: "m-4 mx-auto w-2/3 rounded-md flex flex-col p-4 bg-gray-200 dark:bg-slate-800",
|
|
57
|
-
style: k({ minHeight: "500px", backgroundColor: e.bgColor })
|
|
58
|
-
}, [
|
|
59
|
-
r("div", null, [
|
|
60
|
-
h.value ? (o(), n("button", {
|
|
61
|
-
key: 0,
|
|
62
|
-
class: u(`rounded bg-blue-500 text-white py-2 px-4 m-2 ${e.transitionAnimation}`),
|
|
63
|
-
onClick: _
|
|
64
|
-
}, [
|
|
65
|
-
A(I, {
|
|
66
|
-
"icon-path": v(M),
|
|
67
|
-
size: "25"
|
|
68
|
-
}, null, 8, ["icon-path"])
|
|
69
|
-
], 2)) : g("", !0)
|
|
70
|
-
]),
|
|
71
|
-
c.value === 0 ? (o(), n("div", {
|
|
72
|
-
key: 0,
|
|
73
|
-
class: u(`flex-grow flex flex-col items-center justify-around ${e.transitionAnimation}`)
|
|
74
|
-
}, [
|
|
75
|
-
r("div", {
|
|
76
|
-
class: "text-center min-w-max m-3 flex flex-col items-center gap-3",
|
|
77
|
-
innerHTML: v(w)(e.decisionTree.rootQuestion)
|
|
78
|
-
}, null, 8, V),
|
|
79
|
-
e.decisionTree.imgSrc ? (o(), n("img", {
|
|
80
|
-
key: 0,
|
|
81
|
-
src: e.decisionTree.imgSrc,
|
|
82
|
-
class: "rounded",
|
|
83
|
-
width: "200"
|
|
84
|
-
}, null, 8, z)) : g("", !0),
|
|
85
|
-
r("div", {
|
|
86
|
-
class: u(`w-full justify-items-center mx-4 grid ${e.decisionTree.options.length <= 2 ? "grid-cols-2" : "grid-cols-3"}`)
|
|
87
|
-
}, [
|
|
88
|
-
(o(!0), n(y, null, b(e.decisionTree.options, (t, l) => (o(), n("button", {
|
|
89
|
-
class: u(`rounded bg-blue-500 text-white py-2 px-4 min-w-28 max-w-40 my-3 ${l === e.decisionTree.options.length - 1 && l % 3 === 0 ? "col-span-3" : "col-span-1"}`),
|
|
90
|
-
key: l,
|
|
91
|
-
onClick: (x) => {
|
|
92
|
-
a.value.push(l), c.value++, i.value = t;
|
|
93
|
-
}
|
|
94
|
-
}, m(t.name), 11, B))), 128))
|
|
95
|
-
], 2)
|
|
96
|
-
], 2)) : (o(), n("div", N, [
|
|
97
|
-
h.value ? (o(), n("div", {
|
|
98
|
-
key: i.value.question,
|
|
99
|
-
class: u(`flex-grow flex flex-col items-center justify-around ${e.transitionAnimation}`)
|
|
100
|
-
}, [
|
|
101
|
-
r("div", {
|
|
102
|
-
class: "text-center min-w-max m-3 flex flex-col items-center gap-3",
|
|
103
|
-
innerHTML: v(w)(i.value.question)
|
|
104
|
-
}, null, 8, F),
|
|
105
|
-
i.value.imgSrc ? (o(), n("img", {
|
|
106
|
-
key: 0,
|
|
107
|
-
src: i.value.imgSrc,
|
|
108
|
-
class: "rounded",
|
|
109
|
-
width: "200"
|
|
110
|
-
}, null, 8, O)) : g("", !0),
|
|
111
|
-
r("div", {
|
|
112
|
-
class: u(`w-full justify-items-center mx-4 grid ${i.value.options.length <= 2 ? "grid-cols-2" : "grid-cols-3"}`)
|
|
113
|
-
}, [
|
|
114
|
-
(o(!0), n(y, null, b(i.value.options, (t, l) => (o(), n("button", {
|
|
115
|
-
class: u(`rounded bg-blue-500 text-white py-2 px-4 min-w-28 max-w-40 my-3 ${l === i.value.options.length - 1 && l % 3 === 0 ? "col-span-3" : "col-span-1"}`),
|
|
116
|
-
key: l,
|
|
117
|
-
onClick: (x) => {
|
|
118
|
-
a.value.push(l), c.value++, i.value = t;
|
|
119
|
-
}
|
|
120
|
-
}, m(t.name), 11, P))), 128))
|
|
121
|
-
], 2)
|
|
122
|
-
], 2)) : (o(), n("div", {
|
|
123
|
-
key: 1,
|
|
124
|
-
class: u(`flex-grow flex flex-col items-center ${e.transitionAnimation}`)
|
|
125
|
-
}, [
|
|
126
|
-
r("div", Q, [
|
|
127
|
-
s[1] || (s[1] = r("h1", { class: "my-2 font-bold text-3xl" }, "Vous avez terminé le scénario!", -1)),
|
|
128
|
-
s[2] || (s[2] = r("p", null, "Voici votre parcours", -1)),
|
|
129
|
-
r("div", R, [
|
|
130
|
-
(o(!0), n(y, null, b(S(a.value), (t, l) => (o(), n("div", {
|
|
131
|
-
key: l,
|
|
132
|
-
class: "path-item rounded bg-blue-500 text-white py-2 px-4 flex flex-col items-center"
|
|
133
|
-
}, [
|
|
134
|
-
r("u", null, m(t.question), 1),
|
|
135
|
-
r("p", null, m(t.choice), 1)
|
|
136
|
-
]))), 128))
|
|
137
|
-
])
|
|
138
|
-
]),
|
|
139
|
-
r("button", {
|
|
140
|
-
class: "rounded bg-blue-500 text-white py-2 px-4 min-w-28 my-3 col-span-1",
|
|
141
|
-
onClick: $
|
|
142
|
-
}, "Recommencer")
|
|
143
|
-
], 2))
|
|
144
|
-
]))
|
|
145
|
-
], 4))
|
|
146
|
-
]));
|
|
147
|
-
}
|
|
148
|
-
}), K = /* @__PURE__ */ j(D, [["__scopeId", "data-v-07c75699"]]);
|
|
149
|
-
export {
|
|
150
|
-
K as default
|
|
151
|
-
};
|
package/dist/EpBtn-D4Sib9BE.js
DELETED
package/dist/EpCard-DJQezxQs.js
DELETED
package/dist/EpChip-BrlNEof-.js
DELETED
package/dist/EpEdu-B7If0gdy.js
DELETED
package/dist/EpFlex-e5sNF2bY.js
DELETED
package/dist/EpHover-_jWsMPY8.js
DELETED
package/dist/EpIcon-8MS-eLaB.js
DELETED
package/dist/EpImg-ZxP-DCOC.js
DELETED
package/dist/EpLink-Be86I9U6.js
DELETED
package/dist/EpModal-rL51M47q.js
DELETED
package/dist/EpQuote-WsTNUXP3.js
DELETED
package/dist/EpRadio-5wRevOhg.js
DELETED
package/dist/EpScope-CAGu6ain.js
DELETED