ep-lib-ts 1.0.75 → 1.0.77
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/components/educationals/EpBranchingScenario.vue.js +1 -1
- package/dist/components/educationals/EpBranchingScenario.vue2.js +59 -43
- package/dist/components/educationals/EpBranchingScenario.vue2.js.map +1 -1
- package/dist/components/educationals/EpResource.vue.js +1 -1
- package/dist/components/educationals/EpResource.vue.js.map +1 -1
- package/dist/components/forms/EpRadioSummative.vue.js +1 -46
- package/dist/components/forms/EpRadioSummative.vue.js.map +1 -1
- package/dist/components/forms/EpRadioSummative.vue2.js +46 -1
- package/dist/components/forms/EpRadioSummative.vue2.js.map +1 -1
- package/dist/components/interactions/EpContentSlider.vue.js +2 -1
- package/dist/components/interactions/EpContentSlider.vue.js.map +1 -1
- package/dist/components/interactions/EpFlipCard.vue.js +8 -0
- package/dist/components/interactions/EpFlipCard.vue.js.map +1 -0
- package/dist/components/interactions/EpFlipCard.vue2.js +148 -0
- package/dist/components/interactions/EpFlipCard.vue2.js.map +1 -0
- package/dist/components/interactions/EpQuestion.vue.js +1 -1
- package/dist/components/interactions/EpQuestion.vue.js.map +1 -1
- package/dist/components/interactions/EpSummativeTable.vue.js +1 -1
- package/dist/components/medias/EpHierarchy.vue.js +1 -1
- package/dist/components/medias/EpHierarchy.vue2.js +11 -7
- package/dist/components/medias/EpHierarchy.vue2.js.map +1 -1
- package/dist/components/tools/Details.vue.js +1 -55
- package/dist/components/tools/Details.vue.js.map +1 -1
- package/dist/components/tools/Details.vue2.js +55 -1
- package/dist/components/tools/Details.vue2.js.map +1 -1
- package/dist/components/tools/TextMedia.vue.js +1 -49
- package/dist/components/tools/TextMedia.vue.js.map +1 -1
- package/dist/components/tools/TextMedia.vue2.js +50 -1
- package/dist/components/tools/TextMedia.vue2.js.map +1 -1
- package/dist/components/tools/TwoColsMedia.vue2.js +2 -2
- package/dist/components/tools/TwoColsMedia.vue2.js.map +1 -1
- package/dist/composables/useColors.js +4 -0
- package/dist/composables/useColors.js.map +1 -1
- package/dist/entry/interactions/EpFlipCard.d.ts +6 -0
- package/dist/entry/interactions/EpFlipCard.js +7 -0
- package/dist/entry/interactions/EpFlipCard.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +30 -27
- package/dist/index.js.map +1 -1
- package/dist/style.css +83 -67
- package/dist/types/Hierarchy.d.ts +1 -0
- package/dist/types/interactions/EpFlipCard.d.ts +20 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./EpBranchingScenario.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const Comp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const Comp = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e9edfa2f"]]);
|
|
5
5
|
export {
|
|
6
6
|
Comp as default
|
|
7
7
|
};
|
|
@@ -1,46 +1,54 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, createElementBlock, openBlock, createElementVNode, normalizeStyle, createCommentVNode, toDisplayString, createVNode, withCtx, unref, normalizeClass, createTextVNode, Fragment, renderList, createBlock } from "vue";
|
|
2
2
|
import { useRenderText } from "../../composables/useRenderText.js";
|
|
3
3
|
import _sfc_main$2 from "../basics/EpIcon.vue.js";
|
|
4
|
-
import _sfc_main$4 from "../tools/Details.
|
|
4
|
+
import _sfc_main$4 from "../tools/Details.vue2.js";
|
|
5
5
|
import _sfc_main$5 from "../interactions/EpModal.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import Comp from "../medias/EpHierarchy.vue.js";
|
|
8
8
|
import _sfc_main$1 from "../basics/EpBtn.vue.js";
|
|
9
9
|
import { mdiArrowLeft } from "@mdi/js";
|
|
10
|
-
import _sfc_main$3 from "../tools/TextMedia.
|
|
10
|
+
import _sfc_main$3 from "../tools/TextMedia.vue2.js";
|
|
11
11
|
const _hoisted_1 = { class: "mb-2" };
|
|
12
12
|
const _hoisted_2 = { class: "font-bold text-3xl text-center" };
|
|
13
13
|
const _hoisted_3 = {
|
|
14
14
|
key: 0,
|
|
15
|
-
class: "
|
|
15
|
+
class: "font-semibold text-xl text-center"
|
|
16
16
|
};
|
|
17
17
|
const _hoisted_4 = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "mt-2"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_5 = {
|
|
18
22
|
key: 0,
|
|
19
23
|
class: "w-full flex flex-col space-y-6"
|
|
20
24
|
};
|
|
21
|
-
const
|
|
25
|
+
const _hoisted_6 = {
|
|
22
26
|
key: 1,
|
|
23
27
|
class: "w-full"
|
|
24
28
|
};
|
|
25
|
-
const
|
|
29
|
+
const _hoisted_7 = {
|
|
26
30
|
class: /* @__PURE__ */ normalizeClass(`w-full my-4 mx-4 flex flex-wrap gap-2 justify-center items-center`)
|
|
27
31
|
};
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
32
|
+
const _hoisted_8 = { key: 2 };
|
|
33
|
+
const _hoisted_9 = { class: "text-xl text-center font-semibold" };
|
|
34
|
+
const _hoisted_10 = { class: "w-full" };
|
|
35
|
+
const _hoisted_11 = { class: "font-semibold mb-3" };
|
|
36
|
+
const _hoisted_12 = {
|
|
33
37
|
class: "overflow-auto p-2",
|
|
34
38
|
style: { height: "200px" }
|
|
35
39
|
};
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
const _hoisted_13 = {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: "mb-2"
|
|
43
|
+
};
|
|
44
|
+
const _hoisted_14 = { class: "flex justify-center mt-2" };
|
|
45
|
+
const _hoisted_15 = { class: "flex justify-end mt-4" };
|
|
46
|
+
const _hoisted_16 = {
|
|
39
47
|
key: 0,
|
|
40
48
|
class: "flex w-full flex-col col-span-1 items-center px-4 border-l-2 border-gray-700 overflow-auto"
|
|
41
49
|
};
|
|
42
|
-
const
|
|
43
|
-
const
|
|
50
|
+
const _hoisted_17 = ["innerHTML"];
|
|
51
|
+
const _hoisted_18 = { class: "flex justify-center mt-2" };
|
|
44
52
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
45
53
|
__name: "EpBranchingScenario",
|
|
46
54
|
props: {
|
|
@@ -72,6 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
80
|
const start = () => {
|
|
73
81
|
isIntroductoryPart.value = false;
|
|
74
82
|
currentOption.value = props.decisionTree;
|
|
83
|
+
path.value = [props.decisionTree];
|
|
75
84
|
};
|
|
76
85
|
const styleIntro = computed(() => {
|
|
77
86
|
const noInstruction = !props.initialInstruction;
|
|
@@ -82,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
91
|
return "";
|
|
83
92
|
});
|
|
84
93
|
const goToPrevious = () => {
|
|
85
|
-
if (path.value.length ===
|
|
94
|
+
if (path.value.length === 1) {
|
|
86
95
|
isIntroductoryPart.value = true;
|
|
87
96
|
currentOption.value = null;
|
|
88
97
|
return;
|
|
@@ -106,18 +115,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
106
115
|
currentOption.value = option;
|
|
107
116
|
} else {
|
|
108
117
|
currentOption.value = null;
|
|
118
|
+
console.log(path.value);
|
|
109
119
|
userPath.value = convertOptionToTreeNode(props.decisionTree, path.value);
|
|
110
120
|
}
|
|
111
121
|
};
|
|
112
122
|
function convertOptionToTreeNode(option, path2) {
|
|
113
|
-
var _a;
|
|
123
|
+
var _a, _b;
|
|
114
124
|
const isActive = path2.includes(option);
|
|
115
125
|
return {
|
|
116
126
|
name: option.name,
|
|
127
|
+
label: (_a = option.label) != null ? _a : "",
|
|
117
128
|
text: option.text,
|
|
118
129
|
component: option.component,
|
|
119
130
|
active: isActive,
|
|
120
|
-
children: (
|
|
131
|
+
children: (_b = option.children) == null ? void 0 : _b.map(
|
|
121
132
|
(child) => convertOptionToTreeNode(child, path2)
|
|
122
133
|
)
|
|
123
134
|
};
|
|
@@ -131,7 +142,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
131
142
|
}, [
|
|
132
143
|
createElementVNode("div", _hoisted_1, [
|
|
133
144
|
createElementVNode("h1", _hoisted_2, toDisplayString(_ctx.title), 1),
|
|
134
|
-
currentOption.value ? (openBlock(), createElementBlock("
|
|
145
|
+
currentOption.value ? (openBlock(), createElementBlock("h2", _hoisted_3, toDisplayString(currentOption.value.name), 1)) : createCommentVNode("", true),
|
|
146
|
+
currentOption.value ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
135
147
|
createVNode(_sfc_main$1, {
|
|
136
148
|
type: "primary",
|
|
137
149
|
rounded: "",
|
|
@@ -150,11 +162,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
150
162
|
])) : createCommentVNode("", true)
|
|
151
163
|
]),
|
|
152
164
|
createElementVNode("div", null, [
|
|
153
|
-
isIntroductoryPart.value ? (openBlock(), createElementBlock("div",
|
|
165
|
+
isIntroductoryPart.value ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
154
166
|
createVNode(_sfc_main$3, {
|
|
155
167
|
text: (_a = _ctx.initialInstruction) != null ? _a : "",
|
|
156
168
|
media: _ctx.media,
|
|
157
|
-
cols: _ctx.initialTwoCols
|
|
169
|
+
cols: _ctx.initialTwoCols,
|
|
170
|
+
"flex-col": ""
|
|
158
171
|
}, null, 8, ["text", "media", "cols"]),
|
|
159
172
|
createElementVNode("div", {
|
|
160
173
|
class: normalizeClass(`justify-center flex ${styleIntro.value}`)
|
|
@@ -170,16 +183,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
170
183
|
_: 1
|
|
171
184
|
})
|
|
172
185
|
], 2)
|
|
173
|
-
])) : currentOption.value && !isIntroductoryPart.value ? (openBlock(), createElementBlock("div",
|
|
186
|
+
])) : currentOption.value && !isIntroductoryPart.value ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
174
187
|
createElementVNode("div", {
|
|
175
188
|
class: normalizeClass(`${_ctx.transitionAnimation} my-12`)
|
|
176
189
|
}, [
|
|
177
190
|
createVNode(_sfc_main$3, {
|
|
178
191
|
text: (_b = currentOption.value.text) != null ? _b : "",
|
|
179
192
|
media: currentOption.value.component,
|
|
180
|
-
cols: currentOption.value.cols
|
|
193
|
+
cols: currentOption.value.cols,
|
|
194
|
+
"flex-col": ""
|
|
181
195
|
}, null, 8, ["text", "media", "cols"]),
|
|
182
|
-
createElementVNode("div",
|
|
196
|
+
createElementVNode("div", _hoisted_7, [
|
|
183
197
|
(openBlock(true), createElementBlock(Fragment, null, renderList(currentOption.value.children, (option, index) => {
|
|
184
198
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
185
199
|
key: `option-${index}`,
|
|
@@ -196,29 +210,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
196
210
|
}), 128))
|
|
197
211
|
])
|
|
198
212
|
], 2)
|
|
199
|
-
])) : (openBlock(), createElementBlock("div",
|
|
200
|
-
createElementVNode("h3",
|
|
213
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
214
|
+
createElementVNode("h3", _hoisted_9, toDisplayString(_ctx.labelFinish), 1),
|
|
201
215
|
createElementVNode("div", {
|
|
202
216
|
class: normalizeClass(`flex gap-6 mt-3 ${!_ctx.generalFeedback ? "w-3/6 mx-auto" : ""}`)
|
|
203
217
|
}, [
|
|
204
|
-
createElementVNode("div",
|
|
205
|
-
createElementVNode("h3",
|
|
206
|
-
createElementVNode("div",
|
|
218
|
+
createElementVNode("div", _hoisted_10, [
|
|
219
|
+
createElementVNode("h3", _hoisted_11, toDisplayString(_ctx.labelYourPath), 1),
|
|
220
|
+
createElementVNode("div", _hoisted_12, [
|
|
207
221
|
(openBlock(true), createElementBlock(Fragment, null, renderList(path.value, (item, i) => {
|
|
208
222
|
var _a2;
|
|
209
|
-
return openBlock(), createElementBlock(
|
|
210
|
-
key: `user-choice-${i}
|
|
211
|
-
class: "mb-2"
|
|
223
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
224
|
+
key: `user-choice-${i}`
|
|
212
225
|
}, [
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
226
|
+
i !== 0 ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
|
227
|
+
createVNode(_sfc_main$4, {
|
|
228
|
+
content: (_a2 = path.value[i - 1].text) != null ? _a2 : "",
|
|
229
|
+
title: item.name,
|
|
230
|
+
media: path.value[i - 1].component
|
|
231
|
+
}, null, 8, ["content", "title", "media"])
|
|
232
|
+
])) : createCommentVNode("", true)
|
|
233
|
+
], 64);
|
|
219
234
|
}), 128))
|
|
220
235
|
]),
|
|
221
|
-
createElementVNode("div",
|
|
236
|
+
createElementVNode("div", _hoisted_14, [
|
|
222
237
|
createVNode(_sfc_main$1, {
|
|
223
238
|
type: "info",
|
|
224
239
|
rounded: "",
|
|
@@ -237,12 +252,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
237
252
|
}, {
|
|
238
253
|
default: withCtx(() => [
|
|
239
254
|
createVNode(Comp, {
|
|
255
|
+
"max-width": 2e3,
|
|
240
256
|
nodes: userPath.value,
|
|
241
257
|
"is-cluster": props.isCluster,
|
|
242
258
|
"color-path": props.colorPath,
|
|
243
259
|
"color-rect": props.colorRect
|
|
244
260
|
}, null, 8, ["nodes", "is-cluster", "color-path", "color-rect"]),
|
|
245
|
-
createElementVNode("div",
|
|
261
|
+
createElementVNode("div", _hoisted_15, [
|
|
246
262
|
createVNode(_sfc_main$1, {
|
|
247
263
|
onClick: _cache[1] || (_cache[1] = ($event) => showPath.value = false),
|
|
248
264
|
type: "error",
|
|
@@ -259,13 +275,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
259
275
|
_: 1
|
|
260
276
|
}, 8, ["modelValue"])) : createCommentVNode("", true)
|
|
261
277
|
]),
|
|
262
|
-
_ctx.generalFeedback ? (openBlock(), createElementBlock("div",
|
|
278
|
+
_ctx.generalFeedback ? (openBlock(), createElementBlock("div", _hoisted_16, [
|
|
263
279
|
createElementVNode("div", {
|
|
264
280
|
innerHTML: unref(useRenderText)(_ctx.generalFeedback)
|
|
265
|
-
}, null, 8,
|
|
281
|
+
}, null, 8, _hoisted_17)
|
|
266
282
|
])) : createCommentVNode("", true)
|
|
267
283
|
], 2),
|
|
268
|
-
createElementVNode("div",
|
|
284
|
+
createElementVNode("div", _hoisted_18, [
|
|
269
285
|
createVNode(_sfc_main$1, {
|
|
270
286
|
rounded: "",
|
|
271
287
|
type: "warning",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpBranchingScenario.vue2.js","sources":["../../../src/components/educationals/EpBranchingScenario.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, computed } from \"vue\";\nimport { useRenderText } from \"~/composables/useRenderText\";\nimport type { TreeNode } from \"~/types/Hierarchy\";\nimport EpIcon from \"~/components/basics/EpIcon.vue\";\nimport Details from \"~/components/tools/Details.vue\";\nimport EpModal from \"~/components/interactions/EpModal.vue\";\nimport EpHierarchy from \"~/components/medias/EpHierarchy.vue\";\nimport EpBtn from \"../basics/EpBtn.vue\";\nimport { mdiArrowLeft } from \"@mdi/js\";\nimport TextMedia from \"~/components/tools/TextMedia.vue\";\nimport type { EpBranchingScenarioProps } from \"~/types/educationals/EpBranchingScenario\";\n\nconst props = withDefaults(defineProps<EpBranchingScenarioProps>(), {\n initialInstruction: null,\n transitionAnimation: \"fade\",\n labelFinish: \"Vous avez terminé le scénario!\",\n labelYourPath: \"Votre parcours\",\n labelShowFullPath: \"Voir le parcours au complet\",\n labelClose: \"Fermer\",\n labelRestart: \"Recommencer\",\n labelStart: \"Commencer\",\n colorRect: \"fill-main-color-400\",\n colorPath: \"stroke-yellow-400\",\n});\n\nconst showPath = ref(false);\nconst path = ref<TreeNode[]>([]);\nconst userPath = ref<TreeNode | null>(null);\nconst currentOption = ref<TreeNode | null>(null);\n\n// Manage the introductory part\nconst isIntroductoryPart = ref(true);\n\nconst start = () => {\n isIntroductoryPart.value = false;\n currentOption.value = props.decisionTree;\n};\n\nconst styleIntro = computed(() => {\n const noInstruction = !props.initialInstruction;\n const noMedia = !props.media;\n\n if (noInstruction && noMedia) {\n return \"pt-44\";\n }\n\n return \"\";\n});\n\n// Return function\nconst goToPrevious = () => {\n //if(notTheEnd.value){\n if (path.value.length === 0) {\n isIntroductoryPart.value = true;\n currentOption.value = null;\n return;\n }\n\n path.value.pop();\n // Get the previous option in the path\n const lastOption = path.value[path.value.length - 1];\n\n if (lastOption) {\n currentOption.value = lastOption;\n } else {\n currentOption.value = props.decisionTree;\n }\n};\n\n// Restart function\nconst restart = () => {\n //currentSlide.value = 0;\n currentOption.value = null;\n isIntroductoryPart.value = true;\n path.value = [];\n};\n\nconst nextSlide = (option: TreeNode) => {\n //currentSlide.value++\n path.value.push(option);\n if (option.children && option.children.length > 0) {\n currentOption.value = option; // drill into next level\n } else {\n currentOption.value = null; // reached the end (leaf node)\n userPath.value = convertOptionToTreeNode(props.decisionTree, path.value);\n }\n};\n\n//helper function\nfunction convertOptionToTreeNode(option: TreeNode, path: TreeNode[]): TreeNode {\n const isActive = path.includes(option);\n return {\n name: option.name,\n text: option.text,\n component: option.component,\n active: isActive,\n children: option.children?.map((child) =>\n convertOptionToTreeNode(child, path)\n ),\n };\n}\n</script>\n\n<template>\n <div>\n <div\n class=\"bg-surface-2 dark:bg-surface-2-dark rounded-md p-4 flex flex-col\"\n :style=\"{ minHeight: '500px', backgroundColor: bgColor }\"\n >\n <!-- <div v-for=\"item in path\" :key=\"item.name\">\n <span class=\"text-xs\">{{ item.name }}</span>\n </div> -->\n <!-- Header (fixed at top of card) -->\n <div class=\"mb-2\">\n <h1 class=\"font-bold text-3xl text-center\">{{ title }}</h1>\n <div v-if=\"currentOption\" class=\"mt-2\">\n <EpBtn\n type=\"primary\"\n rounded\n size=\"small\"\n :extra-class=\"`${transitionAnimation}`\"\n @click=\"goToPrevious\"\n >\n <EpIcon :icon-path=\"mdiArrowLeft\" size=\"25\" />\n </EpBtn>\n </div>\n </div>\n\n <!-- Content Area -->\n <div>\n <!-- Introductory Part -->\n <div v-if=\"isIntroductoryPart\" class=\"w-full flex flex-col space-y-6\">\n <TextMedia\n :text=\"initialInstruction ?? ''\"\n :media=\"media\"\n :cols=\"initialTwoCols\"\n />\n <div :class=\"`justify-center flex ${styleIntro}`\">\n <EpBtn type=\"primary\" rounded @click=\"start\">{{\n labelStart\n }}</EpBtn>\n </div>\n </div>\n\n <!-- Slides -->\n <template v-else-if=\"currentOption && !isIntroductoryPart\">\n <div class=\"w-full\">\n <div :class=\"`${transitionAnimation} my-12`\">\n <TextMedia\n :text=\"currentOption.text ?? ''\"\n :media=\"currentOption.component\"\n :cols=\"currentOption.cols\"\n />\n\n <div\n :class=\"`w-full my-4 mx-4 flex flex-wrap gap-2 justify-center items-center`\"\n >\n <template\n v-for=\"(option, index) in currentOption.children\"\n :key=\"`option-${index}`\"\n >\n <EpBtn\n rounded\n type=\"primary\"\n class=\"flex-1 min-w-[120px] sm:min-w-[160px] max-w-xs\"\n @click=\"nextSlide(option)\"\n >\n {{ option.name }}\n </EpBtn>\n </template>\n </div>\n </div>\n </div>\n </template>\n\n <!--show path-->\n <div v-else>\n <!-- <template v-if=\"userPath\">\n <EpHierarchy :nodes=\"userPath\"/>\n </template> -->\n <h3 class=\"text-xl text-center font-semibold\">{{ labelFinish }}</h3>\n <div\n :class=\"`flex gap-6 mt-3 ${\n !generalFeedback ? 'w-3/6 mx-auto' : ''\n }`\"\n >\n <div class=\"w-full\">\n <h3 class=\"font-semibold mb-3\">{{ labelYourPath }}</h3>\n <div class=\"overflow-auto p-2\" :style=\"{ height: '200px' }\">\n <template v-for=\"(item, i) in path\" :key=\"`user-choice-${i}`\">\n <div class=\"mb-2\">\n <Details\n :content=\"item.text ?? ''\"\n :title=\"item.name\"\n :media=\"item.component\"\n />\n </div>\n </template>\n </div>\n <div class=\"flex justify-center mt-2\">\n <EpBtn type=\"info\" rounded @click=\"showPath = true\">{{\n labelShowFullPath\n }}</EpBtn>\n </div>\n <EpModal v-if=\"userPath\" v-model=\"showPath\">\n <EpHierarchy\n :nodes=\"userPath\"\n :is-cluster=\"props.isCluster\"\n :color-path=\"props.colorPath\"\n :color-rect=\"props.colorRect\"\n />\n <div class=\"flex justify-end mt-4\">\n <EpBtn\n @click=\"showPath = false\"\n type=\"error\"\n outlined\n rounded\n >{{ labelClose }}</EpBtn\n >\n </div>\n </EpModal>\n </div>\n <div\n v-if=\"generalFeedback\"\n class=\"flex w-full flex-col col-span-1 items-center px-4 border-l-2 border-gray-700 overflow-auto\"\n >\n <div v-html=\"useRenderText(generalFeedback)\" />\n </div>\n </div>\n\n <div class=\"flex justify-center mt-2\">\n <EpBtn rounded type=\"warning\" @click=\"restart\">{{\n labelRestart\n }}</EpBtn>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n@keyframes fade {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes scale {\n 0% {\n transform: scale(0.5);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n@keyframes slideY {\n 0% {\n transform: translateY(-100%);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n}\n\n/* Transition animation */\n.fade {\n animation: fade 1s;\n}\n\n.scale {\n animation: scale 1s;\n}\n\n.slideY {\n animation: slideY 1s;\n}\n</style>\n"],"names":["path","_createElementBlock","_createElementVNode","bgColor","_toDisplayString","title","_openBlock","_createVNode","EpBtn","transitionAnimation","EpIcon","_unref","TextMedia","initialInstruction","media","initialTwoCols","labelStart","_Fragment","_createBlock","_createTextVNode","labelFinish","_normalizeClass","generalFeedback","labelYourPath","_renderList","Details","_a","labelShowFullPath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ue2.js","sources":["../../../src/components/educationals/EpBranchingScenario.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, computed, watchEffect } from \"vue\";\nimport { useRenderText } from \"~/composables/useRenderText\";\nimport type { TreeNode } from \"~/types/Hierarchy\";\nimport EpIcon from \"~/components/basics/EpIcon.vue\";\nimport Details from \"~/components/tools/Details.vue\";\nimport EpModal from \"~/components/interactions/EpModal.vue\";\nimport EpHierarchy from \"~/components/medias/EpHierarchy.vue\";\nimport EpBtn from \"../basics/EpBtn.vue\";\nimport { mdiArrowLeft } from \"@mdi/js\";\nimport TextMedia from \"~/components/tools/TextMedia.vue\";\nimport type { EpBranchingScenarioProps } from \"~/types/educationals/EpBranchingScenario\";\n\nconst props = withDefaults(defineProps<EpBranchingScenarioProps>(), {\n initialInstruction: null,\n transitionAnimation: \"fade\",\n labelFinish: \"Vous avez terminé le scénario!\",\n labelYourPath: \"Votre parcours\",\n labelShowFullPath: \"Voir le parcours au complet\",\n labelClose: \"Fermer\",\n labelRestart: \"Recommencer\",\n labelStart: \"Commencer\",\n colorRect: \"fill-main-color-400\",\n colorPath: \"stroke-yellow-400\",\n});\n\nconst showPath = ref(false);\nconst path = ref<TreeNode[]>([]);\nconst userPath = ref<TreeNode | null>(null);\nconst currentOption = ref<TreeNode | null>(null);\n\n// Manage the introductory part\nconst isIntroductoryPart = ref(true);\n\nconst start = () => {\n isIntroductoryPart.value = false;\n currentOption.value = props.decisionTree;\n path.value = [props.decisionTree];\n};\n\nconst styleIntro = computed(() => {\n const noInstruction = !props.initialInstruction;\n const noMedia = !props.media;\n\n if (noInstruction && noMedia) {\n return \"pt-44\";\n }\n\n return \"\";\n});\n\n// Return function\nconst goToPrevious = () => {\n //if(notTheEnd.value){\n if (path.value.length === 1) {\n isIntroductoryPart.value = true;\n currentOption.value = null;\n return;\n }\n\n path.value.pop();\n // Get the previous option in the path\n const lastOption = path.value[path.value.length - 1];\n\n if (lastOption) {\n currentOption.value = lastOption;\n } else {\n currentOption.value = props.decisionTree;\n }\n};\n\n// Restart function\nconst restart = () => {\n //currentSlide.value = 0;\n currentOption.value = null;\n isIntroductoryPart.value = true;\n path.value = [];\n};\n\nconst nextSlide = (option: TreeNode) => {\n //currentSlide.value++\n path.value.push(option);\n if (option.children && option.children.length > 0) {\n currentOption.value = option; // drill into next level\n } else {\n currentOption.value = null; // reached the end (leaf node)\n console.log(path.value)\n userPath.value = convertOptionToTreeNode(props.decisionTree, path.value);\n }\n\n};\n\n//helper function\nfunction convertOptionToTreeNode(option: TreeNode, path: TreeNode[]): TreeNode {\n const isActive = path.includes(option);\n return {\n name: option.name,\n label: option.label ?? \"\",\n text: option.text,\n component: option.component,\n active: isActive,\n children: option.children?.map((child) =>\n convertOptionToTreeNode(child, path)\n ),\n };\n}\n\n</script>\n\n<template>\n <div>\n <div\n class=\"bg-surface-2 dark:bg-surface-2-dark rounded-md p-4 flex flex-col\"\n :style=\"{ minHeight: '500px', backgroundColor: bgColor }\"\n >\n <!-- <div v-for=\"item in path\" :key=\"item.name\">\n <span class=\"text-xs\">{{ item.name }}</span>\n </div> -->\n <!-- Header (fixed at top of card) -->\n <div class=\"mb-2\">\n <h1 class=\"font-bold text-3xl text-center\">{{ title }}</h1>\n <h2 class=\"font-semibold text-xl text-center\" v-if=\"currentOption\">{{ currentOption.name }}</h2>\n <div v-if=\"currentOption\" class=\"mt-2\">\n <EpBtn\n type=\"primary\"\n rounded\n size=\"small\"\n :extra-class=\"`${transitionAnimation}`\"\n @click=\"goToPrevious\"\n >\n <EpIcon :icon-path=\"mdiArrowLeft\" size=\"25\" />\n </EpBtn>\n </div>\n </div>\n\n <!-- Content Area -->\n <div>\n <!-- Introductory Part -->\n <div v-if=\"isIntroductoryPart\" class=\"w-full flex flex-col space-y-6\">\n <TextMedia\n :text=\"initialInstruction ?? ''\"\n :media=\"media\"\n :cols=\"initialTwoCols\"\n flex-col\n />\n <div :class=\"`justify-center flex ${styleIntro}`\">\n <EpBtn type=\"primary\" rounded @click=\"start\">{{\n labelStart\n }}</EpBtn>\n </div>\n </div>\n\n <!-- Slides -->\n <template v-else-if=\"currentOption && !isIntroductoryPart\">\n <div class=\"w-full\">\n <div :class=\"`${transitionAnimation} my-12`\">\n <TextMedia\n :text=\"currentOption.text ?? ''\"\n :media=\"currentOption.component\"\n :cols=\"currentOption.cols\"\n flex-col\n />\n\n <div\n :class=\"`w-full my-4 mx-4 flex flex-wrap gap-2 justify-center items-center`\"\n >\n <template\n v-for=\"(option, index) in currentOption.children\"\n :key=\"`option-${index}`\"\n >\n <EpBtn\n rounded\n type=\"primary\"\n class=\"flex-1 min-w-[120px] sm:min-w-[160px] max-w-xs\"\n @click=\"nextSlide(option)\"\n >\n {{ option.name }}\n </EpBtn>\n </template>\n </div>\n </div>\n </div>\n </template>\n\n <!--show path-->\n <div v-else>\n <!-- <template v-if=\"userPath\">\n <EpHierarchy :nodes=\"userPath\"/>\n </template> -->\n <h3 class=\"text-xl text-center font-semibold\">{{ labelFinish }}</h3>\n <div\n :class=\"`flex gap-6 mt-3 ${\n !generalFeedback ? 'w-3/6 mx-auto' : ''\n }`\"\n >\n <div class=\"w-full\">\n <h3 class=\"font-semibold mb-3\">{{ labelYourPath }}</h3>\n <div class=\"overflow-auto p-2\" :style=\"{ height: '200px' }\">\n <template v-for=\"(item, i) in path\" :key=\"`user-choice-${i}`\">\n <template v-if=\"i !== 0\">\n <div class=\"mb-2\">\n <Details\n :content=\"path[i-1].text ?? ''\"\n :title=\"item.name\"\n :media=\"path[i-1].component\"\n />\n </div>\n </template>\n </template>\n </div>\n <div class=\"flex justify-center mt-2\">\n <EpBtn type=\"info\" rounded @click=\"showPath = true\">{{\n labelShowFullPath\n }}</EpBtn>\n </div>\n <EpModal v-if=\"userPath\" v-model=\"showPath\">\n <EpHierarchy\n :max-width=\"2000\"\n :nodes=\"userPath\"\n :is-cluster=\"props.isCluster\"\n :color-path=\"props.colorPath\"\n :color-rect=\"props.colorRect\"\n />\n <div class=\"flex justify-end mt-4\">\n <EpBtn\n @click=\"showPath = false\"\n type=\"error\"\n outlined\n rounded\n >{{ labelClose }}</EpBtn\n >\n </div>\n </EpModal>\n </div>\n <div\n v-if=\"generalFeedback\"\n class=\"flex w-full flex-col col-span-1 items-center px-4 border-l-2 border-gray-700 overflow-auto\"\n >\n <div v-html=\"useRenderText(generalFeedback)\" />\n </div>\n </div>\n\n <div class=\"flex justify-center mt-2\">\n <EpBtn rounded type=\"warning\" @click=\"restart\">{{\n labelRestart\n }}</EpBtn>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n@keyframes fade {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes scale {\n 0% {\n transform: scale(0.5);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n\n@keyframes slideY {\n 0% {\n transform: translateY(-100%);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n}\n\n/* Transition animation */\n.fade {\n animation: fade 1s;\n}\n\n.scale {\n animation: scale 1s;\n}\n\n.slideY {\n animation: slideY 1s;\n}\n</style>\n"],"names":["path","_createElementBlock","_createElementVNode","bgColor","_toDisplayString","title","_openBlock","_createVNode","EpBtn","transitionAnimation","EpIcon","_unref","TextMedia","initialInstruction","media","initialTwoCols","labelStart","_Fragment","_createBlock","_createTextVNode","labelFinish","_normalizeClass","generalFeedback","labelYourPath","_renderList","Details","_a","labelShowFullPath","EpModal","EpHierarchy","labelClose","labelRestart"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,UAAM,QAAQ;AAad,UAAM,WAAW,IAAI,KAAK;AAC1B,UAAM,OAAO,IAAgB,EAAE;AAC/B,UAAM,WAAW,IAAqB,IAAI;AAC1C,UAAM,gBAAgB,IAAqB,IAAI;AAG/C,UAAM,qBAAqB,IAAI,IAAI;AAEnC,UAAM,QAAQ,MAAM;AA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defineAsyncComponent(() => import("./EpReading.vue2.js"));
|
|
44
44
|
}
|
|
45
45
|
return defineAsyncComponent(
|
|
46
|
-
() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../basics/EpAvatar.vue": () => import("../basics/EpAvatar.vue.js"), "../basics/EpBadge.vue": () => import("../basics/EpBadge.vue.js"), "../basics/EpBtn.vue": () => import("../basics/EpBtn.vue2.js"), "../basics/EpCard.vue": () => import("../basics/EpCard.vue2.js"), "../basics/EpChip.vue": () => import("../basics/EpChip.vue2.js"), "../basics/EpDivider.vue": () => import("../basics/EpDivider.vue2.js"), "../basics/EpFlex.vue": () => import("../basics/EpFlex.vue2.js"), "../basics/EpHover.vue": () => import("../basics/EpHover.vue2.js"), "../basics/EpHoverCard.vue": () => import("../basics/EpHoverCard.vue2.js"), "../basics/EpIcon.vue": () => import("../basics/EpIcon.vue2.js"), "../basics/EpImg.vue": () => import("../basics/EpImg.vue2.js"), "../basics/EpImgCarousel.vue": () => import("../basics/EpImgCarousel.vue2.js"), "../basics/EpList.vue": () => import("../basics/EpList.vue.js"), "../basics/EpListItem.vue": () => import("../basics/EpListItem.vue2.js"), "../basics/EpSection.vue": () => import("../basics/EpSection.vue2.js"), "../basics/EpSectionCols.vue": () => import("../basics/EpSectionCols.vue2.js"), "../basics/EpSpinner.vue": () => import("../basics/EpSpinner.vue2.js"), "../basics/EpStackedList.vue": () => import("../basics/EpStackedList.vue2.js"), "../basics/EpTable.vue": () => import("../basics/EpTable.vue2.js"), "../basics/EpText.vue": () => import("../basics/EpText.vue2.js"), "../charts/EpBarChart.vue": () => import("../charts/EpBarChart.vue2.js"), "../charts/EpFunnelChart.vue": () => import("../charts/EpFunnelChart.vue2.js"), "../charts/EpLineChart.vue": () => import("../charts/EpLineChart.vue2.js"), "../charts/EpPieChart.vue": () => import("../charts/EpPieChart.vue2.js"), "./EpBranchingScenario.vue": () => import("./EpBranchingScenario.vue.js"), "./EpCodeblock.vue": () => import("./EpCodeblock.vue3.js"), "./EpConclusion.vue": () => import("./EpConclusion.vue2.js"), "./EpDescription.vue": () => import("./EpDescription.vue2.js"), "./EpDocument.vue": () => import("./EpDocument.vue2.js"), "./EpEdu.vue": () => import("./EpEdu.vue2.js"), "./EpInstructions.vue": () => import("./EpInstructions.vue2.js"), "./EpIntroduction.vue": () => import("./EpIntroduction.vue2.js"), "./EpObjective.vue": () => import("./EpObjective.vue2.js"), "./EpReading.vue": () => import("./EpReading.vue2.js"), "./EpResource.vue": () => import("./EpResource.vue2.js"), "./EpScope.vue": () => import("./EpScope.vue2.js"), "./EpSpecificObjective.vue": () => import("./EpSpecificObjective.vue2.js"), "../forms/EpCheckbox.vue": () => import("../forms/EpCheckbox.vue.js"), "../forms/EpInput.vue": () => import("../forms/EpInput.vue.js"), "../forms/EpRadio.vue": () => import("../forms/EpRadio.vue.js"), "../forms/EpRadioSummative.vue": () => import("../forms/EpRadioSummative.
|
|
46
|
+
() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../basics/EpAvatar.vue": () => import("../basics/EpAvatar.vue.js"), "../basics/EpBadge.vue": () => import("../basics/EpBadge.vue.js"), "../basics/EpBtn.vue": () => import("../basics/EpBtn.vue2.js"), "../basics/EpCard.vue": () => import("../basics/EpCard.vue2.js"), "../basics/EpChip.vue": () => import("../basics/EpChip.vue2.js"), "../basics/EpDivider.vue": () => import("../basics/EpDivider.vue2.js"), "../basics/EpFlex.vue": () => import("../basics/EpFlex.vue2.js"), "../basics/EpHover.vue": () => import("../basics/EpHover.vue2.js"), "../basics/EpHoverCard.vue": () => import("../basics/EpHoverCard.vue2.js"), "../basics/EpIcon.vue": () => import("../basics/EpIcon.vue2.js"), "../basics/EpImg.vue": () => import("../basics/EpImg.vue2.js"), "../basics/EpImgCarousel.vue": () => import("../basics/EpImgCarousel.vue2.js"), "../basics/EpList.vue": () => import("../basics/EpList.vue.js"), "../basics/EpListItem.vue": () => import("../basics/EpListItem.vue2.js"), "../basics/EpSection.vue": () => import("../basics/EpSection.vue2.js"), "../basics/EpSectionCols.vue": () => import("../basics/EpSectionCols.vue2.js"), "../basics/EpSpinner.vue": () => import("../basics/EpSpinner.vue2.js"), "../basics/EpStackedList.vue": () => import("../basics/EpStackedList.vue2.js"), "../basics/EpTable.vue": () => import("../basics/EpTable.vue2.js"), "../basics/EpText.vue": () => import("../basics/EpText.vue2.js"), "../charts/EpBarChart.vue": () => import("../charts/EpBarChart.vue2.js"), "../charts/EpFunnelChart.vue": () => import("../charts/EpFunnelChart.vue2.js"), "../charts/EpLineChart.vue": () => import("../charts/EpLineChart.vue2.js"), "../charts/EpPieChart.vue": () => import("../charts/EpPieChart.vue2.js"), "./EpBranchingScenario.vue": () => import("./EpBranchingScenario.vue.js"), "./EpCodeblock.vue": () => import("./EpCodeblock.vue3.js"), "./EpConclusion.vue": () => import("./EpConclusion.vue2.js"), "./EpDescription.vue": () => import("./EpDescription.vue2.js"), "./EpDocument.vue": () => import("./EpDocument.vue2.js"), "./EpEdu.vue": () => import("./EpEdu.vue2.js"), "./EpInstructions.vue": () => import("./EpInstructions.vue2.js"), "./EpIntroduction.vue": () => import("./EpIntroduction.vue2.js"), "./EpObjective.vue": () => import("./EpObjective.vue2.js"), "./EpReading.vue": () => import("./EpReading.vue2.js"), "./EpResource.vue": () => import("./EpResource.vue2.js"), "./EpScope.vue": () => import("./EpScope.vue2.js"), "./EpSpecificObjective.vue": () => import("./EpSpecificObjective.vue2.js"), "../forms/EpCheckbox.vue": () => import("../forms/EpCheckbox.vue.js"), "../forms/EpInput.vue": () => import("../forms/EpInput.vue.js"), "../forms/EpRadio.vue": () => import("../forms/EpRadio.vue.js"), "../forms/EpRadioSummative.vue": () => import("../forms/EpRadioSummative.vue.js"), "../forms/EpSelect.vue": () => import("../forms/EpSelect.vue.js"), "../forms/EpSwitch.vue": () => import("../forms/EpSwitch.vue.js"), "../forms/EpTextarea.vue": () => import("../forms/EpTextarea.vue.js"), "../forms/EpToggle.vue": () => import("../forms/EpToggle.vue.js"), "../interactions/Ep360Image.vue": () => import("../interactions/Ep360Image.vue.js"), "../interactions/Ep360Video.vue": () => import("../interactions/Ep360Video.vue.js"), "../interactions/EpAccordeon.vue": () => import("../interactions/EpAccordeon.vue.js"), "../interactions/EpContentSlider.vue": () => import("../interactions/EpContentSlider.vue2.js"), "../interactions/EpDarkMode.vue": () => import("../interactions/EpDarkMode.vue2.js"), "../interactions/EpDraggable.vue": () => import("../interactions/EpDraggable.vue2.js"), "../interactions/EpFlipCard.vue": () => import("../interactions/EpFlipCard.vue.js"), "../interactions/EpHotSpot.vue": () => import("../interactions/EpHotSpot.vue2.js"), "../interactions/EpModal.vue": () => import("../interactions/EpModal.vue3.js"), "../interactions/EpQuestion.vue": () => import("../interactions/EpQuestion.vue2.js"), "../interactions/EpSummativeTable.vue": () => import("../interactions/EpSummativeTable.vue2.js"), "../interactions/EpSvgShow.vue": () => import("../interactions/EpSvgShow.vue2.js"), "../interactions/EpTabs.vue": () => import("../interactions/EpTabs.vue.js"), "../interactions/EpTooltip.vue": () => import("../interactions/EpTooltip.vue2.js"), "../medias/EpAudio.vue": () => import("../medias/EpAudio.vue2.js"), "../medias/EpCardLink.vue": () => import("../medias/EpCardLink.vue2.js"), "../medias/EpCarousel.vue": () => import("../medias/EpCarousel.vue2.js"), "../medias/EpHierarchy.vue": () => import("../medias/EpHierarchy.vue.js"), "../medias/EpIframe.vue": () => import("../medias/EpIframe.vue2.js"), "../medias/EpKatex.vue": () => import("../medias/EpKatex.vue.js"), "../medias/EpLink.vue": () => import("../medias/EpLink.vue2.js"), "../medias/EpLinkVersion.vue": () => import("../medias/EpLinkVersion.vue2.js"), "../medias/EpLottieSvg.vue": () => import("../medias/EpLottieSvg.vue2.js"), "../medias/EpSensibleImage.vue": () => import("../medias/EpSensibleImage.vue.js"), "../medias/EpSoftware.vue": () => import("../medias/EpSoftware.vue2.js"), "../medias/EpSvg.vue": () => import("../medias/EpSvg.vue2.js"), "../medias/EpTerm.vue": () => import("../medias/EpTerm.vue2.js"), "../medias/EpTimeLine.vue": () => import("../medias/EpTimeLine.vue.js"), "../medias/EpVideo.vue": () => import("../medias/EpVideo.vue2.js"), "../medias/EpVideoPanopto.vue": () => import("../medias/EpVideoPanopto.vue2.js"), "../medias/EpWordDef.vue": () => import("../medias/EpWordDef.vue2.js"), "../signages/EpAlert.vue": () => import("../signages/EpAlert.vue.js"), "../signages/EpBadge.vue": () => import("../signages/EpBadge.vue2.js"), "../signages/EpHeader.vue": () => import("../signages/EpHeader.vue2.js"), "../signages/EpNothing.vue": () => import("../signages/EpNothing.vue.js"), "../signages/EpQuote.vue": () => import("../signages/EpQuote.vue2.js"), "../signages/EpSkeleton.vue": () => import("../signages/EpSkeleton.vue.js"), "../tools/BgAudio.vue": () => import("../tools/BgAudio.vue.js"), "../tools/Details.vue": () => import("../tools/Details.vue.js"), "../tools/DisplayBox.vue": () => import("../tools/DisplayBox.vue.js"), "../tools/SvgFilter.vue": () => import("../tools/SvgFilter.vue.js"), "../tools/TextMedia.vue": () => import("../tools/TextMedia.vue.js"), "../tools/TimelineItem.vue": () => import("../tools/TimelineItem.vue.js"), "../tools/TwoColsMedia.vue": () => import("../tools/TwoColsMedia.vue.js") }), `../${componentToLoad.path}/${componentToLoad.name}.vue`, 3)
|
|
47
47
|
);
|
|
48
48
|
};
|
|
49
49
|
const typeRess = computed(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpResource.vue.js","sources":["../../../src/components/educationals/EpResource.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { defineAsyncComponent, computed, toRefs } from \"vue\";\nimport { useComponent } from \"~/composables/useComponent\";\nimport type { EpResourceProps } from \"~/types/educationals/EpResource\";\n\nconst { type = \"neutral\", resource, pages } = defineProps<EpResourceProps>();\n\nconst resourceInfo = computed(() => {\n if (!resource.hasOwnProperty(\"content\")) {\n return \"EpNothing\";\n }\n //console.log(resource)\n const typeRess = Object.keys(resource.content)[0];\n const ress = Object.assign({}, resource.content[typeRess]);\n\n ress.pages = pages;\n ress.type = typeRess;\n ress.intentions = pages;\n if (typeRess === \"clip\") {\n ress.src = ress.url;\n }\n if (typeRess === \"website\") {\n ress.href = ress.url;\n ress.label = ress.title;\n }\n if (typeRess === \"book\" && pages) {\n //ress.intentions = pages\n ress.pages = null;\n }\n if (ress.version_link) {\n ress.url = ress.version_link.url;\n }\n\n return ress;\n});\n\n//get Component asyncComponent\nconst getCompontent = (name: string | undefined) => {\n const componentToLoad = useComponent(name);\n //console.log(componentToLoad)\n if (componentToLoad.name === \"EpNothing\") {\n return defineAsyncComponent(() => import(\"../signages/EpNothing.vue\"));\n }\n if (componentToLoad.name === \"EpReading\") {\n return defineAsyncComponent(() => import(`./EpReading.vue`));\n }\n return defineAsyncComponent(\n () => import(`../${componentToLoad.path}/${componentToLoad.name}.vue`)\n );\n};\n\nconst typeRess = computed(() => {\n if (resourceInfo.value.type && resourceInfo.value.type === \"website\") {\n if (type === \"base\") {\n return \"primary\";\n }\n }\n return type;\n});\n</script>\n\n<template>\n <component\n :is=\"getCompontent(resourceInfo.type)\"\n v-bind=\"{ ...resourceInfo }\"\n :mandateLevel=\"mandateLevel\"\n :intentions=\"pages\"\n :type=\"typeRess\"\n ></component>\n</template>\n"],"names":["typeRess","_createBlock","_resolveDynamicComponent","_mergeProps","mandateLevel","pages"],"mappings":";;;;;;;;;;;;AAOA,UAAM,eAAe,SAAS,MAAM;AAClC,UAAI,CAAC,QAAA,SAAS,eAAe,SAAS,GAAG;AACvC,eAAO;AAAA,MACT;AAEA,YAAMA,YAAW,OAAO,KAAK,QAAA,SAAS,OAAO,EAAE,CAAC;AAChD,YAAM,OAAO,OAAO,OAAO,CAAA,GAAI,iBAAS,QAAQA,SAAQ,CAAC;AAEzD,WAAK,QAAQ,QAAA;AACb,WAAK,OAAOA;AACZ,WAAK,aAAa,QAAA;AAClB,UAAIA,cAAa,QAAQ;AACvB,aAAK,MAAM,KAAK;AAAA,MAClB;AACA,UAAIA,cAAa,WAAW;AA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AA,GAAA,6BAAA,MAAA,OAAA,+BAAA,GAAA,4BAAA,MAAA,OAAA,8BAAA,GAAA,6BAAA,MAAA,OAAA,8BAAA,GAAA,qBAAA,MAAA,OAAA,uBAAA,GAAA,sBAAA,MAAA,OAAA,wBAAA,GAAA,uBAAA,MAAA,OAAA,yBAAA,GAAA,oBAAA,MAAA,OAAA,sBAAA,GAAA,eAAA,MAAA,OAAA,iBAAA,GAAA,wBAAA,MAAA,OAAA,0BAAA,GAAA,wBAAA,MAAA,OAAA,0BAAA,GAAA,qBAAA,MAAA,OAAA,uBAAA,GAAA,mBAAA,MAAA,OAAA,qBAAA,GAAA,oBAAA,MAAA,OAAA,sBAAA,GAAA,iBAAA,MAAA,OAAA,mBAAA,GAAA,6BAAA,MAAA,OAAA,+BAAA,GAAA,2BAAA,MAAA,OAAA,4BAAA,GAAA,wBAAA,MAAA,OAAA,yBAAA,GAAA,wBAAA,MAAA,OAAA,yBAAA,GAAA,iCAAA,MAAA,OAAA,
|
|
1
|
+
{"version":3,"file":"EpResource.vue.js","sources":["../../../src/components/educationals/EpResource.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { defineAsyncComponent, computed, toRefs } from \"vue\";\nimport { useComponent } from \"~/composables/useComponent\";\nimport type { EpResourceProps } from \"~/types/educationals/EpResource\";\n\nconst { type = \"neutral\", resource, pages } = defineProps<EpResourceProps>();\n\nconst resourceInfo = computed(() => {\n if (!resource.hasOwnProperty(\"content\")) {\n return \"EpNothing\";\n }\n //console.log(resource)\n const typeRess = Object.keys(resource.content)[0];\n const ress = Object.assign({}, resource.content[typeRess]);\n\n ress.pages = pages;\n ress.type = typeRess;\n ress.intentions = pages;\n if (typeRess === \"clip\") {\n ress.src = ress.url;\n }\n if (typeRess === \"website\") {\n ress.href = ress.url;\n ress.label = ress.title;\n }\n if (typeRess === \"book\" && pages) {\n //ress.intentions = pages\n ress.pages = null;\n }\n if (ress.version_link) {\n ress.url = ress.version_link.url;\n }\n\n return ress;\n});\n\n//get Component asyncComponent\nconst getCompontent = (name: string | undefined) => {\n const componentToLoad = useComponent(name);\n //console.log(componentToLoad)\n if (componentToLoad.name === \"EpNothing\") {\n return defineAsyncComponent(() => import(\"../signages/EpNothing.vue\"));\n }\n if (componentToLoad.name === \"EpReading\") {\n return defineAsyncComponent(() => import(`./EpReading.vue`));\n }\n return defineAsyncComponent(\n () => import(`../${componentToLoad.path}/${componentToLoad.name}.vue`)\n );\n};\n\nconst typeRess = computed(() => {\n if (resourceInfo.value.type && resourceInfo.value.type === \"website\") {\n if (type === \"base\") {\n return \"primary\";\n }\n }\n return type;\n});\n</script>\n\n<template>\n <component\n :is=\"getCompontent(resourceInfo.type)\"\n v-bind=\"{ ...resourceInfo }\"\n :mandateLevel=\"mandateLevel\"\n :intentions=\"pages\"\n :type=\"typeRess\"\n ></component>\n</template>\n"],"names":["typeRess","_createBlock","_resolveDynamicComponent","_mergeProps","mandateLevel","pages"],"mappings":";;;;;;;;;;;;AAOA,UAAM,eAAe,SAAS,MAAM;AAClC,UAAI,CAAC,QAAA,SAAS,eAAe,SAAS,GAAG;AACvC,eAAO;AAAA,MACT;AAEA,YAAMA,YAAW,OAAO,KAAK,QAAA,SAAS,OAAO,EAAE,CAAC;AAChD,YAAM,OAAO,OAAO,OAAO,CAAA,GAAI,iBAAS,QAAQA,SAAQ,CAAC;AAEzD,WAAK,QAAQ,QAAA;AACb,WAAK,OAAOA;AACZ,WAAK,aAAa,QAAA;AAClB,UAAIA,cAAa,QAAQ;AACvB,aAAK,MAAM,KAAK;AAAA,MAClB;AACA,UAAIA,cAAa,WAAW;AAC1B,aAAK,OAAO,KAAK;AACjB,aAAK,QAAQ,KAAK;AAAA,MACpB;AACA,UAAIA,cAAa,UAAU,QAAA,OAAO;AAEhC,aAAK,QAAQ;AAAA,MACf;AACA,UAAI,KAAK,cAAc;AACrB,aAAK,MAAM,KAAK,aAAa;AAAA,MAC/B;AAEA,aAAO;AAAA,IACT,CAAC;AAGD,UAAM,gBAAgB,CA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: "cursor-pointer flex items-center rounded-md py-3 px-3 text-xs font-semibold uppercase sm:flex-1 hover:bg-base" };
|
|
3
|
-
const _hoisted_2 = ["id", "name", "disabled", "readonly", "value", "checked"];
|
|
4
|
-
const _hoisted_3 = { class: "ml-2" };
|
|
5
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
-
__name: "EpRadioSummative",
|
|
7
|
-
props: {
|
|
8
|
-
id: { default: "01" },
|
|
9
|
-
label: {},
|
|
10
|
-
disabled: { type: Boolean, default: false },
|
|
11
|
-
readonly: { type: Boolean, default: false },
|
|
12
|
-
type: { default: "base" },
|
|
13
|
-
value: { default: void 0 },
|
|
14
|
-
modelValue: { default: null }
|
|
15
|
-
},
|
|
16
|
-
emits: ["update:modelValue"],
|
|
17
|
-
setup(__props, { emit: __emit }) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const isChecked = computed(() => {
|
|
20
|
-
return props.modelValue === props.value;
|
|
21
|
-
});
|
|
22
|
-
const { label, disabled, readonly, value, id } = toRefs(props);
|
|
23
|
-
const emit = __emit;
|
|
24
|
-
const onChange = (event) => {
|
|
25
|
-
const target = event.target;
|
|
26
|
-
const value2 = +target.value || 0;
|
|
27
|
-
emit("update:modelValue", value2);
|
|
28
|
-
};
|
|
29
|
-
return (_ctx, _cache) => {
|
|
30
|
-
return openBlock(), createElementBlock("label", _hoisted_1, [
|
|
31
|
-
createElementVNode("input", {
|
|
32
|
-
type: "radio",
|
|
33
|
-
id: unref(id),
|
|
34
|
-
name: unref(id),
|
|
35
|
-
disabled: unref(disabled),
|
|
36
|
-
readonly: unref(readonly),
|
|
37
|
-
value: unref(value),
|
|
38
|
-
checked: isChecked.value,
|
|
39
|
-
onChange,
|
|
40
|
-
class: "rounded bg-base-dark border-gray-300 focus:border-transparent focus:bg-base text-primary focus:ring-1 focus:ring-offset-2 focus:ring-primary"
|
|
41
|
-
}, null, 40, _hoisted_2),
|
|
42
|
-
createElementVNode("span", _hoisted_3, toDisplayString(unref(label)), 1)
|
|
43
|
-
]);
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
});
|
|
1
|
+
import _sfc_main from "./EpRadioSummative.vue2.js";
|
|
47
2
|
export {
|
|
48
3
|
_sfc_main as default
|
|
49
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpRadioSummative.vue.js","sources":[
|
|
1
|
+
{"version":3,"file":"EpRadioSummative.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,4 +1,49 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent, computed, toRefs, createElementBlock, openBlock, createElementVNode, unref, toDisplayString } from "vue";
|
|
2
|
+
const _hoisted_1 = { class: "cursor-pointer flex items-center rounded-md py-3 px-3 text-xs font-semibold uppercase sm:flex-1 hover:bg-base" };
|
|
3
|
+
const _hoisted_2 = ["id", "name", "disabled", "readonly", "value", "checked"];
|
|
4
|
+
const _hoisted_3 = { class: "ml-2" };
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "EpRadioSummative",
|
|
7
|
+
props: {
|
|
8
|
+
id: { default: "01" },
|
|
9
|
+
label: {},
|
|
10
|
+
disabled: { type: Boolean, default: false },
|
|
11
|
+
readonly: { type: Boolean, default: false },
|
|
12
|
+
type: { default: "base" },
|
|
13
|
+
value: { default: void 0 },
|
|
14
|
+
modelValue: { default: null }
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(__props, { emit: __emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const isChecked = computed(() => {
|
|
20
|
+
return props.modelValue === props.value;
|
|
21
|
+
});
|
|
22
|
+
const { label, disabled, readonly, value, id } = toRefs(props);
|
|
23
|
+
const emit = __emit;
|
|
24
|
+
const onChange = (event) => {
|
|
25
|
+
const target = event.target;
|
|
26
|
+
const value2 = +target.value || 0;
|
|
27
|
+
emit("update:modelValue", value2);
|
|
28
|
+
};
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("label", _hoisted_1, [
|
|
31
|
+
createElementVNode("input", {
|
|
32
|
+
type: "radio",
|
|
33
|
+
id: unref(id),
|
|
34
|
+
name: unref(id),
|
|
35
|
+
disabled: unref(disabled),
|
|
36
|
+
readonly: unref(readonly),
|
|
37
|
+
value: unref(value),
|
|
38
|
+
checked: isChecked.value,
|
|
39
|
+
onChange,
|
|
40
|
+
class: "rounded bg-base-dark border-gray-300 focus:border-transparent focus:bg-base text-primary focus:ring-1 focus:ring-offset-2 focus:ring-primary"
|
|
41
|
+
}, null, 40, _hoisted_2),
|
|
42
|
+
createElementVNode("span", _hoisted_3, toDisplayString(unref(label)), 1)
|
|
43
|
+
]);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
2
47
|
export {
|
|
3
48
|
_sfc_main as default
|
|
4
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpRadioSummative.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"EpRadioSummative.vue2.js","sources":["../../../src/components/forms/EpRadioSummative.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { toRefs, computed } from \"vue\";\nimport type { EpRadioSummativeProps } from \"~/types/forms/EpRadioSummative\";\n\nconst props = withDefaults(defineProps<EpRadioSummativeProps>(), {\n id: \"01\",\n disabled: false,\n readonly: false,\n checked: false,\n type: \"base\",\n value: undefined,\n modelValue: null,\n});\n\nconst isChecked = computed(() => {\n return props.modelValue === props.value;\n});\n\nconst { label, disabled, readonly, value, id } = toRefs(props);\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", modelValue: number): void;\n}>();\n\nconst onChange = (event: Event) => {\n const target = event.target as HTMLInputElement;\n const value = +target.value || 0;\n emit(\"update:modelValue\", value);\n};\n</script>\n\n<template>\n <label\n class=\"cursor-pointer flex items-center rounded-md py-3 px-3 text-xs font-semibold uppercase sm:flex-1 hover:bg-base\"\n >\n <input\n type=\"radio\"\n :id=\"id\"\n :name=\"id\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :value=\"value\"\n :checked=\"isChecked\"\n @change=\"onChange\"\n class=\"rounded bg-base-dark border-gray-300 focus:border-transparent focus:bg-base text-primary focus:ring-1 focus:ring-offset-2 focus:ring-primary\"\n />\n <span class=\"ml-2\">{{ label }}</span>\n </label>\n</template>\n"],"names":["value","_openBlock","_createElementBlock","_createElementVNode","_unref","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;;AAIA,UAAM,QAAQ;AAUd,UAAM,YAAY,SAAS,MAAM;AAC/B,aAAO,MAAM,eAAe,MAAM;AAAA,IACpC,CAAC;AAED,UAAM,EAAE,OAAO,UAAU,UAAU,OAAO,GAAA,IAAO,OAAO,KAAK;AAE7D,UAAM,OAAO;AAIb,UAAM,WAAW,CAAC,UAAiB;AACjC,YAAM,SAAS,MAAM;AACrB,YAAMA,SAAQ,CAAC,OAAO,SAAS;AAC/B,WAAK,qBAAqBA,MAAK;AAAA,IACjC;;AAIE,aAAAC,UAAA,GAAAC,mBAeQ,SAfR,YAeQ;AAAA,QAZNC,mBAUE,SAAA;AAAA,UATA,MAAK;AAAA,UACJ,IAAIC,MAAA,EAAA;AAAA,UACJ,MAAMA,MAAA,EAAA;AAAA,UACN,UAAUA,MAAA,QAAA;AAAA,UACV,UAAUA,MAAA,QAAA;AAAA,UACV,OAAOA,MAAA,KAAA;AAAA,UACP,SAAS,UAAA;AAAA,UACT;AAAA,UACD,OAAM;AAAA,QAAA;QAERD,mBAAqC,QAArC,YAAqCE,gBAAfD,MAAA,KAAA,CAAK,GAAA,CAAA;AAAA,MAAA;;;;"}
|
|
@@ -85,7 +85,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
85
85
|
"../forms/EpCheckbox.vue": () => import("../forms/EpCheckbox.vue.js"),
|
|
86
86
|
"../forms/EpInput.vue": () => import("../forms/EpInput.vue.js"),
|
|
87
87
|
"../forms/EpRadio.vue": () => import("../forms/EpRadio.vue.js"),
|
|
88
|
-
"../forms/EpRadioSummative.vue": () => import("../forms/EpRadioSummative.
|
|
88
|
+
"../forms/EpRadioSummative.vue": () => import("../forms/EpRadioSummative.vue.js"),
|
|
89
89
|
"../forms/EpSelect.vue": () => import("../forms/EpSelect.vue.js"),
|
|
90
90
|
"../forms/EpSwitch.vue": () => import("../forms/EpSwitch.vue.js"),
|
|
91
91
|
"../forms/EpTextarea.vue": () => import("../forms/EpTextarea.vue.js"),
|
|
@@ -96,6 +96,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
96
96
|
"./EpContentSlider.vue": () => import("./EpContentSlider.vue2.js"),
|
|
97
97
|
"./EpDarkMode.vue": () => import("./EpDarkMode.vue2.js"),
|
|
98
98
|
"./EpDraggable.vue": () => import("./EpDraggable.vue2.js"),
|
|
99
|
+
"./EpFlipCard.vue": () => import("./EpFlipCard.vue.js"),
|
|
99
100
|
"./EpHotSpot.vue": () => import("./EpHotSpot.vue2.js"),
|
|
100
101
|
"./EpModal.vue": () => import("./EpModal.vue3.js"),
|
|
101
102
|
"./EpQuestion.vue": () => import("./EpQuestion.vue2.js"),
|