ep-lib-ts 1.0.74 → 1.0.76
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/basics/EpAvatar.vue.js +1 -55
- package/dist/components/basics/EpAvatar.vue.js.map +1 -1
- package/dist/components/basics/EpAvatar.vue2.js +55 -1
- package/dist/components/basics/EpAvatar.vue2.js.map +1 -1
- package/dist/components/basics/EpStackedList.vue.js +1 -1
- 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/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 +160 -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/medias/EpHierarchy.vue.js +1 -1
- package/dist/components/medias/EpHierarchy.vue2.js +12 -8
- package/dist/components/medias/EpHierarchy.vue2.js.map +1 -1
- package/dist/components/medias/EpSensibleImage.vue.js +2 -2
- package/dist/components/tools/Details.vue.js +55 -1
- package/dist/components/tools/Details.vue.js.map +1 -1
- package/dist/components/tools/Details.vue2.js +1 -55
- package/dist/components/tools/Details.vue2.js.map +1 -1
- package/dist/components/tools/TextMedia.vue.js +50 -1
- package/dist/components/tools/TextMedia.vue.js.map +1 -1
- package/dist/components/tools/TextMedia.vue2.js +1 -49
- 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/entry/medias/EpSensibleImage.d.ts +6 -0
- package/dist/entry/medias/EpSensibleImage.js +7 -0
- package/dist/entry/medias/EpSensibleImage.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 +64 -48
- package/dist/types/Hierarchy.d.ts +1 -0
- package/dist/types/interactions/EpFlipCard.d.ts +18 -0
- package/package.json +1 -1
|
@@ -1,58 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { typeAvatar } from "../../types/Avatar.js";
|
|
3
|
-
import useColors from "../../composables/useColors.js";
|
|
4
|
-
const _hoisted_1 = { key: 0 };
|
|
5
|
-
const _hoisted_2 = ["src", "alt"];
|
|
6
|
-
const _hoisted_3 = { key: 1 };
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "EpAvatar",
|
|
9
|
-
props: {
|
|
10
|
-
src: { default: "" },
|
|
11
|
-
alt: { default: "" },
|
|
12
|
-
color: { default: "primary" },
|
|
13
|
-
size: { default: "small" },
|
|
14
|
-
variant: { default: "circle" },
|
|
15
|
-
name: { default: "" }
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const style = computed(() => {
|
|
20
|
-
return props.variant;
|
|
21
|
-
});
|
|
22
|
-
const size = computed(() => {
|
|
23
|
-
return props.size;
|
|
24
|
-
});
|
|
25
|
-
const final_style = computed(() => {
|
|
26
|
-
var _a;
|
|
27
|
-
return `${(_a = typeAvatar[style.value]) == null ? void 0 : _a[size.value]}`;
|
|
28
|
-
});
|
|
29
|
-
const bgcolor = computed(() => {
|
|
30
|
-
return useColors(props.color);
|
|
31
|
-
});
|
|
32
|
-
const final_name = computed(() => {
|
|
33
|
-
if (props.name.length > 2) {
|
|
34
|
-
return props.name.slice(0, 2);
|
|
35
|
-
} else {
|
|
36
|
-
return props.name;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
return (_ctx, _cache) => {
|
|
40
|
-
return openBlock(), createElementBlock("div", null, [
|
|
41
|
-
props.src != "" ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
42
|
-
createElementVNode("img", {
|
|
43
|
-
src: props.src,
|
|
44
|
-
alt: props.alt,
|
|
45
|
-
class: normalizeClass(`${final_style.value} `)
|
|
46
|
-
}, null, 10, _hoisted_2)
|
|
47
|
-
])) : props.src == "" ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
48
|
-
createElementVNode("div", {
|
|
49
|
-
class: normalizeClass(`${final_style.value} ${bgcolor.value} justify-center font-bold text-white flex items-center`)
|
|
50
|
-
}, toDisplayString(final_name.value), 3)
|
|
51
|
-
])) : createCommentVNode("", true)
|
|
52
|
-
]);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
1
|
+
import _sfc_main from "./EpAvatar.vue2.js";
|
|
56
2
|
export {
|
|
57
3
|
_sfc_main as default
|
|
58
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpAvatar.vue.js","sources":[
|
|
1
|
+
{"version":3,"file":"EpAvatar.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,4 +1,58 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, createCommentVNode, createElementVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
|
+
import { typeAvatar } from "../../types/Avatar.js";
|
|
3
|
+
import useColors from "../../composables/useColors.js";
|
|
4
|
+
const _hoisted_1 = { key: 0 };
|
|
5
|
+
const _hoisted_2 = ["src", "alt"];
|
|
6
|
+
const _hoisted_3 = { key: 1 };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "EpAvatar",
|
|
9
|
+
props: {
|
|
10
|
+
src: { default: "" },
|
|
11
|
+
alt: { default: "" },
|
|
12
|
+
color: { default: "primary" },
|
|
13
|
+
size: { default: "small" },
|
|
14
|
+
variant: { default: "circle" },
|
|
15
|
+
name: { default: "" }
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const style = computed(() => {
|
|
20
|
+
return props.variant;
|
|
21
|
+
});
|
|
22
|
+
const size = computed(() => {
|
|
23
|
+
return props.size;
|
|
24
|
+
});
|
|
25
|
+
const final_style = computed(() => {
|
|
26
|
+
var _a;
|
|
27
|
+
return `${(_a = typeAvatar[style.value]) == null ? void 0 : _a[size.value]}`;
|
|
28
|
+
});
|
|
29
|
+
const bgcolor = computed(() => {
|
|
30
|
+
return useColors(props.color);
|
|
31
|
+
});
|
|
32
|
+
const final_name = computed(() => {
|
|
33
|
+
if (props.name.length > 2) {
|
|
34
|
+
return props.name.slice(0, 2);
|
|
35
|
+
} else {
|
|
36
|
+
return props.name;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return (_ctx, _cache) => {
|
|
40
|
+
return openBlock(), createElementBlock("div", null, [
|
|
41
|
+
props.src != "" ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
42
|
+
createElementVNode("img", {
|
|
43
|
+
src: props.src,
|
|
44
|
+
alt: props.alt,
|
|
45
|
+
class: normalizeClass(`${final_style.value} `)
|
|
46
|
+
}, null, 10, _hoisted_2)
|
|
47
|
+
])) : props.src == "" ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
48
|
+
createElementVNode("div", {
|
|
49
|
+
class: normalizeClass(`${final_style.value} ${bgcolor.value} justify-center font-bold text-white flex items-center`)
|
|
50
|
+
}, toDisplayString(final_name.value), 3)
|
|
51
|
+
])) : createCommentVNode("", true)
|
|
52
|
+
]);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
2
56
|
export {
|
|
3
57
|
_sfc_main as default
|
|
4
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpAvatar.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"EpAvatar.vue2.js","sources":["../../../src/components/basics/EpAvatar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { typeAvatar } from \"~/types/Avatar\";\nimport type { EpAvatarProps } from \"~/types/basics/EpAvatar\";\nimport useColors from \"~/composables/useColors\";\n\n// define parameter and default valule\nconst props = withDefaults(defineProps<EpAvatarProps>(), {\n src: \"\",\n alt: \"\",\n color: \"primary\",\n size: \"small\",\n variant: \"circle\",\n name: \"\",\n});\n\nconst style = computed(() => {\n return props.variant;\n});\n\nconst size = computed(() => {\n return props.size;\n});\n\nconst final_style = computed(() => {\n return `${typeAvatar[style.value]?.[size.value]}`;\n});\n\nconst bgcolor = computed(() => {\n return useColors(props.color);\n});\n\nconst final_name = computed(() => {\n if (props.name.length > 2) {\n return props.name.slice(0, 2);\n } else {\n return props.name;\n }\n});\n</script>\n<template>\n <div>\n <div v-if=\"props.src != ''\">\n <img :src=\"props.src\" :alt=\"props.alt\" :class=\"`${final_style} `\" />\n </div>\n <div v-else-if=\"props.src == ''\">\n <div\n :class=\"`${final_style} ${bgcolor} justify-center font-bold text-white flex items-center`\"\n >\n {{ final_name }}\n </div>\n </div>\n </div>\n</template>\n"],"names":["_createElementBlock","_createElementVNode","_normalizeClass"],"mappings":";;;;;;;;;;;;;;;;;AAOA,UAAM,QAAQ;AASd,UAAM,QAAQ,SAAS,MAAM;AAC3B,aAAO,MAAM;AAAA,IACf,CAAC;AAED,UAAM,OAAO,SAAS,MAAM;AAC1B,aAAO,MAAM;AAAA,IACf,CAAC;AAED,UAAM,cAAc,SAAS,MAAM;;AACjC,aAAO,IAAG,gBAAW,MAAM,KAAK,MAAtB,mBAA0B,KAAK,MAAM;AAAA,IACjD,CAAC;AAED,UAAM,UAAU,SAAS,MAAM;AAC7B,aAAO,UAAU,MAAM,KAAK;AAAA,IAC9B,CAAC;AAED,UAAM,aAAa,SAAS,MAAM;AAChC,UAAI,MAAM,KAAK,SAAS,GAAG;AACzB,eAAO,MAAM,KAAK,MAAM,GAAG,CAAC;AAAA,MAC9B,OAAO;AACL,eAAO,MAAM;AAAA,MACf;AAAA,IACF,CAAC;;0BAGCA,mBAWM,OAAA,MAAA;AAAA,QAVO,MAAM,OAAG,mBAApBA,mBAEM,OAAA,YAAA;AAAA,UADJC,mBAAoE,OAAA;AAAA,YAA9D,KAAK,MAAM;AAAA,YAAM,KAAK,MAAM;AAAA,YAAM,yBAAU,YAAA,KAAW,GAAA;AAAA,UAAA;cAE/C,MAAM,OAAG,mBAAzBD,mBAMM,OAAA,YAAA;AAAA,UALJC,mBAIM,OAAA;AAAA,YAHH,OAAKC,eAAA,GAAK,YAAA,KAAW,KAAK,QAAA,KAAO,yDAAA;AAAA,UAAA,mBAE/B,WAAA,KAAU,GAAA,CAAA;AAAA,QAAA;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, withCtx, createElementVNode, createCommentVNode, toDisplayString, unref, createVNode } from "vue";
|
|
2
|
-
import _sfc_main$1 from "./EpAvatar.
|
|
2
|
+
import _sfc_main$1 from "./EpAvatar.vue2.js";
|
|
3
3
|
import _sfc_main$2 from "./EpIcon.vue.js";
|
|
4
4
|
import { useRenderText } from "../../composables/useRenderText.js";
|
|
5
5
|
import { roundedType } from "../../types/StackedList.js";
|
|
@@ -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.vue.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.vue.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","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;AAClB,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ,MAAM;AAAA,IAC9B;AAEA,UAAM,aAAa,SAAS,MAAM;AAChC,YAAM,gBAAgB,CAAC,MAAM;AAC7B,YAAM,UAAU,CAAC,MAA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,MAAA;AAAA,wBAJC,OAAO,SAAA;AAAA,wBACP,cAAY,MAAM;AAAA,wBAClB,cAAY,MAAM;AAAA,wBAClB,cAAY,MAAM;AAAA,sBAAA;sBAErB3B,mBAQM,OARN,aAQM;AAAA,wBAPJK,YAMCC,aAAA;AAAA,0BALE,+CAAO,SAAA,QAAQ;AAAA,0BAChB,MAAK;AAAA,0BACL,UAAA;AAAA,0BACA,SAAA;AAAA,wBAAA;2CACC,MAAgB;AAAA,4DAAbsB,KAAAA,UAAU,GAAA,CAAA;AAAA,0BAAA;;;;;;;;gBAMdR,KAAAA,mBADRhB,UAAA,GAAAL,mBAKM,OALN,aAKM;AAAA,kBADJC,mBAA+C,OAAA;AAAA,oBAA1C,WAAQS,MAAA,aAAA,EAAcW,KAAAA,eAAe;AAAA,kBAAA;;;cAI9CpB,mBAIM,OAJN,aAIM;AAAA,gBAHJK,YAEUC,aAAA;AAAA,kBAFH,SAAA;AAAA,kBAAQ,MAAK;AAAA,kBAAW,SAAO;AAAA,gBAAA;mCAAS,MAE7C;AAAA,oDADAuB,KAAAA,YAAY,GAAA,CAAA;AAAA,kBAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"EpBranchingScenario.vue2.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;AAClB,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ,MAAM;AAC5B,WAAK,QAAQ,CAAC,MAAM,YAAY;AAAA,IAClC;AAEA,UAAM,aAAa,SAAS,MAAM;AAChC,YAAM,gBAAgB,CAAC,MAAM;AAC7B,YAAM,UAAU,CAAC,MAAM;AAEvB,UAAI,iBAAiB,SAAS;AAC5B,eAAO;AAAA,MACT;AAEA,aAAO;AAAA,IACT,CAAC;AAGD,UAAM,eAAe,MAAM;AAEzB,UAAI,KAAK,MAAM,WAAW,GAAG;AAC3B,2BAAmB,QAAQ;AAC3B,sBAAc,QAAQ;AACtB;AAAA,MACF;AAEA,WAAK,MAAM,IAAA;AAEX,YAAM,aAAa,KAAK,MAAM,KAAK,MAAM,SAAS,CAAC;AAEn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AAA,wBACP,cAAY,MAAM;AAAA,wBAClB,cAAY,MAAM;AAAA,wBAClB,cAAY,MAAM;AAAA,sBAAA;sBAErB3B,mBAQM,OARN,aAQM;AAAA,wBAPJK,YAMCC,aAAA;AAAA,0BALE,+CAAO,SAAA,QAAQ;AAAA,0BAChB,MAAK;AAAA,0BACL,UAAA;AAAA,0BACA,SAAA;AAAA,wBAAA;2CACC,MAAgB;AAAA,4DAAbsB,KAAAA,UAAU,GAAA,CAAA;AAAA,0BAAA;;;;;;;;gBAMdR,KAAAA,mBADRhB,UAAA,GAAAL,mBAKM,OALN,aAKM;AAAA,kBADJC,mBAA+C,OAAA;AAAA,oBAA1C,WAAQS,MAAA,aAAA,EAAcW,KAAAA,eAAe;AAAA,kBAAA;;;cAI9CpB,mBAIM,OAJN,aAIM;AAAA,gBAHJK,YAEUC,aAAA;AAAA,kBAFH,SAAA;AAAA,kBAAQ,MAAK;AAAA,kBAAW,SAAO;AAAA,gBAAA;mCAAS,MAE7C;AAAA,oDADAuB,KAAAA,YAAY,GAAA,CAAA;AAAA,kBAAA;;;;;;;;;;;"}
|
|
@@ -43,7 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
43
|
return defineAsyncComponent(() => import("./EpReading.vue2.js"));
|
|
44
44
|
}
|
|
45
45
|
return defineAsyncComponent(
|
|
46
|
-
() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../basics/EpAvatar.vue": () => import("../basics/EpAvatar.
|
|
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.vue2.js"), "../tools/DisplayBox.vue": () => import("../tools/DisplayBox.vue.js"), "../tools/SvgFilter.vue": () => import("../tools/SvgFilter.vue.js"), "../tools/TextMedia.vue": () => import("../tools/TextMedia.vue2.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;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,CAAC,SAA6B;AAClD,YAAM,kBAAkB,aAAa,IAAI;AAEzC,UAAI,gBAAgB,SAAS,aAAa;AACxC,eAAO,qBAAqB,MAAM,OAAO,8BAA2B,CAAC;AAAA,MACvE;AACA,UAAI,gBAAgB,SAAS,aAAa;AACxC,eAAO,qBAAqB,MAAM,OAAO,qBAAiB,CAAC;AAAA,MAC7D;AACA,aAAO;AAAA,QACL,MAAM,qCAAA,uBAAA,OAAA,EAAA,0BAAA,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,MAA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MACF;AACA,aAAO,QAAA;AAAA,IACT,CAAC;;0BAICC,YAMaC,wBALN,cAAc,aAAA,MAAa,IAAI,CAAA,GADtCC,WAMa,EAAA,GAJE,aAAA,SAAY;AAAA,QACxB,cAAcC,KAAAA;AAAAA,QACd,YAAYC,KAAAA;AAAAA,QACZ,MAAM,SAAA;AAAA,MAAA;;;;"}
|
|
@@ -49,7 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
setup(__props) {
|
|
50
50
|
const props = __props;
|
|
51
51
|
const dynamicComponents = /* @__PURE__ */ Object.assign({
|
|
52
|
-
"../basics/EpAvatar.vue": () => import("../basics/EpAvatar.
|
|
52
|
+
"../basics/EpAvatar.vue": () => import("../basics/EpAvatar.vue.js"),
|
|
53
53
|
"../basics/EpBadge.vue": () => import("../basics/EpBadge.vue.js"),
|
|
54
54
|
"../basics/EpBtn.vue": () => import("../basics/EpBtn.vue2.js"),
|
|
55
55
|
"../basics/EpCard.vue": () => import("../basics/EpCard.vue2.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"),
|