ep-lib-ts 1.0.43 → 1.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BgAudio-Dju9jJiu.js +4 -0
- package/dist/DisplayBox-HvviLWyp.js +4 -0
- package/dist/Ep360Image-CQJBPImD.js +241 -0
- package/dist/{Ep360Video-b_stvC2Z.js → Ep360Video-CL_7mOiQ.js} +84 -77
- package/dist/EpAlert-8x1egKQ1.js +4 -0
- package/dist/EpAudio-DLQ0xWz1.js +4 -0
- package/dist/EpAvatar-DlaagQT-.js +4 -0
- package/dist/EpBadge-hENKUkCt.js +4 -0
- package/dist/EpBarChart-Bw8qKwqp.js +4 -0
- package/dist/EpBranchingScenario-CtCO_8zu.js +160 -0
- package/dist/EpBtn-BH1hWlHT.js +4 -0
- package/dist/EpCard-CqhPrVAv.js +4 -0
- package/dist/EpCardLink-DlP0NsFx.js +4 -0
- package/dist/EpChip-Bi3nop6O.js +4 -0
- package/dist/EpCodeblock-DhkGfhDz.js +4 -0
- package/dist/EpConclusion-DYGJFM9I.js +4 -0
- package/dist/EpContentSlider-BxHaDAWo.js +4 -0
- package/dist/{EpDarkmode-Bechg1uo.js → EpDarkmode-ChgCnqlF.js} +1 -1
- package/dist/EpDescription-CHv8jeTs.js +4 -0
- package/dist/EpDivider-dB-VxNYj.js +4 -0
- package/dist/EpDraggable-hJJjJ6hz.js +1676 -0
- package/dist/EpEdu-CcePBFeF.js +4 -0
- package/dist/EpFlex-BOIofhJe.js +4 -0
- package/dist/EpFunnelChart-B0cp8JDh.js +4 -0
- package/dist/EpHeader-4TIVPsGN.js +4 -0
- package/dist/EpHover-B6dcDLJH.js +4 -0
- package/dist/EpHoverCard-BYLDcALZ.js +4 -0
- package/dist/EpIcon-eQLd8Bef.js +4 -0
- package/dist/EpIframe-DmNysxf-.js +4 -0
- package/dist/EpImg-oLjhJdIS.js +4 -0
- package/dist/EpImgCarousel-DXPylqN5.js +4 -0
- package/dist/{EpInput-CoSeoa1t.js → EpInput-B-bfsw5E.js} +29 -29
- package/dist/EpInstructions-DIAYW894.js +4 -0
- package/dist/EpIntroduction-DNNy0dG3.js +4 -0
- package/dist/EpLineChart-0D56Uh_r.js +4 -0
- package/dist/EpLink-DSTdUEpY.js +4 -0
- package/dist/EpLinkVersion-gKk7KyA_.js +4 -0
- package/dist/{EpList-DTN7D9wV.js → EpList-DeapPqmX.js} +1 -1
- package/dist/EpModal-D16kxfDo.js +4 -0
- package/dist/{EpNothing-ChLi44xn.js → EpNothing-BglmKV-f.js} +1 -1
- package/dist/EpObjective-HxaZ9wp9.js +4 -0
- package/dist/EpPieChart-DgshvJsj.js +4 -0
- package/dist/EpQuestion-Dukzq4EH.js +4 -0
- package/dist/EpQuote-CzHty5N8.js +4 -0
- package/dist/EpRadio-b-7_ookc.js +4 -0
- package/dist/EpRadioSummative-B2rKvUDx.js +4 -0
- package/dist/EpReading-B4cnESfa.js +4 -0
- package/dist/EpResource-Cm_WCcOE.js +4 -0
- package/dist/EpScope-D7uqngTc.js +4 -0
- package/dist/EpSection-D5dy1gIO.js +4 -0
- package/dist/EpSectionCols-Td__J3LQ.js +4 -0
- package/dist/EpSkeleton-Dt9pU2x3.js +4 -0
- package/dist/EpSoftware-ZrDbL3q8.js +4 -0
- package/dist/EpSpecificObjective-BLP9pKHT.js +4 -0
- package/dist/EpSpinner-Bz6bpXEH.js +4 -0
- package/dist/EpStackedList-C-qDZcDO.js +4 -0
- package/dist/EpSummativeTable-D0IxH0wd.js +4 -0
- package/dist/EpSvg-CFAjqJWI.js +4 -0
- package/dist/EpSvgShow-BMQFmzKO.js +54 -0
- package/dist/EpTable-CFfBZzZJ.js +4 -0
- package/dist/EpTerm-C81Atlu_.js +4 -0
- package/dist/EpText-DPADYfER.js +4 -0
- package/dist/EpTimeLine-BaJ78dV9.js +4 -0
- package/dist/EpVideo-m4Cga9WS.js +4 -0
- package/dist/EpVideoPanopto-DrHaE_yl.js +4 -0
- package/dist/EpWordDef-CZw-9z0W.js +4 -0
- package/dist/components/basics/EpImgCarousel.vue.d.ts +77 -0
- package/dist/components/educationals/EpBranchingScenario.vue.d.ts +1 -0
- package/dist/components/educationals/EpInstructions.vue.d.ts +1 -0
- package/dist/components/interactions/Ep360Image.vue.d.ts +1 -0
- package/dist/components/interactions/EpDraggable.vue.d.ts +26 -0
- package/dist/components/interactions/EpSvgShow.vue.d.ts +33 -1
- package/dist/components/medias/EpCarousel.vue.d.ts +5 -0
- package/dist/ep-lib-ts.js +30 -30
- package/dist/ep-lib-ts.umd.cjs +4600 -4766
- package/dist/{index-BFsz449L.js → index-CwfMdRn8.js} +3755 -3591
- package/dist/{index-D-GKNNDO.js → index-DTH65_9T.js} +1 -1
- package/dist/{prism-iP2cUnBs.js → prism-D45WTYqI.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/three.module-CWLs6nMo.js +33752 -0
- package/dist/types/Draggable.d.ts +15 -0
- package/dist/types/Image.d.ts +5 -0
- package/package.json +4 -2
- package/src/components/basics/EpImg.vue +1 -1
- package/src/components/basics/EpImgCarousel.vue +145 -0
- package/src/components/basics/EpText.vue +22 -18
- package/src/components/educationals/EpBranchingScenario.vue +15 -6
- package/src/components/educationals/EpConclusion.vue +1 -1
- package/src/components/educationals/EpDescription.vue +1 -1
- package/src/components/educationals/EpInstructions.vue +3 -2
- package/src/components/educationals/EpIntroduction.vue +1 -1
- package/src/components/educationals/EpReading.vue +3 -3
- package/src/components/interactions/Ep360Image.vue +32 -11
- package/src/components/interactions/Ep360Video.vue +15 -3
- package/src/components/interactions/EpDraggable.vue +192 -0
- package/src/components/interactions/EpSvgShow.vue +91 -38
- package/src/components/medias/EpCarousel.vue +74 -11
- package/src/components/tools/TimelineItem.vue +1 -1
- package/dist/BgAudio-BxmV-0cC.js +0 -4
- package/dist/DisplayBox-CUpEsLPU.js +0 -4
- package/dist/Ep360Image-Dmwx7NrY.js +0 -228
- package/dist/EpAlert-DZRwC-hR.js +0 -4
- package/dist/EpAudio-DWUaCLxZ.js +0 -4
- package/dist/EpAvatar-CB_8dpH1.js +0 -4
- package/dist/EpBadge-D2rYlVX2.js +0 -4
- package/dist/EpBarChart-20DIx08w.js +0 -4
- package/dist/EpBranchingScenario-CMBEwqVe.js +0 -151
- package/dist/EpBtn-D4Sib9BE.js +0 -4
- package/dist/EpCard-DJQezxQs.js +0 -4
- package/dist/EpCardLink-CZ10BP3M.js +0 -4
- package/dist/EpChip-BrlNEof-.js +0 -4
- package/dist/EpCodeblock-C-DQR2do.js +0 -4
- package/dist/EpConclusion-Cd2gP1Wh.js +0 -4
- package/dist/EpContentSlider-zQ7TcQlI.js +0 -4
- package/dist/EpDescription-Tbo3BFV2.js +0 -4
- package/dist/EpDivider-DVkzWELv.js +0 -4
- package/dist/EpEdu-B7If0gdy.js +0 -4
- package/dist/EpFlex-e5sNF2bY.js +0 -4
- package/dist/EpFunnelChart-DVJ_6KdY.js +0 -4
- package/dist/EpHeader-DNGWRkmf.js +0 -4
- package/dist/EpHover-_jWsMPY8.js +0 -4
- package/dist/EpHoverCard-C-BojFhi.js +0 -4
- package/dist/EpIcon-8MS-eLaB.js +0 -4
- package/dist/EpIframe-ClKZ7eIe.js +0 -4
- package/dist/EpImg-ZxP-DCOC.js +0 -4
- package/dist/EpInstructions-0UvWFAAP.js +0 -4
- package/dist/EpIntroduction-kwTAl-2S.js +0 -4
- package/dist/EpLineChart-DrqtLuL_.js +0 -4
- package/dist/EpLink-Be86I9U6.js +0 -4
- package/dist/EpLinkVersion-B4pxWTOZ.js +0 -4
- package/dist/EpModal-rL51M47q.js +0 -4
- package/dist/EpObjective-CDmtLCil.js +0 -4
- package/dist/EpPieChart--F20jSnB.js +0 -4
- package/dist/EpQuestion-B3bl3ED0.js +0 -4
- package/dist/EpQuote-WsTNUXP3.js +0 -4
- package/dist/EpRadio-5wRevOhg.js +0 -4
- package/dist/EpRadioSummative-Bhuk0G-D.js +0 -4
- package/dist/EpReading-DqNY4agb.js +0 -4
- package/dist/EpResource-CKx-Sm7H.js +0 -4
- package/dist/EpScope-CAGu6ain.js +0 -4
- package/dist/EpSection-Cs8w0x7y.js +0 -4
- package/dist/EpSectionCols-nBUK8VK3.js +0 -4
- package/dist/EpSkeleton-DBJIz_Yb.js +0 -4
- package/dist/EpSoftware-l7_8diQ_.js +0 -4
- package/dist/EpSpecificObjective-D2Sz35-I.js +0 -4
- package/dist/EpSpinner-BnfTBKN1.js +0 -4
- package/dist/EpStackedList-CtkpLHrV.js +0 -4
- package/dist/EpSummativeTable-CgQiZKos.js +0 -4
- package/dist/EpSvg-DDlhssE7.js +0 -4
- package/dist/EpSvgShow-DNKVoqjv.js +0 -84
- package/dist/EpTable-DriGGo4l.js +0 -4
- package/dist/EpTerm-DNfBy49u.js +0 -4
- package/dist/EpText-CrfoaXl_.js +0 -4
- package/dist/EpTimeLine-CRwBWqNV.js +0 -4
- package/dist/EpVideo-DV8hETkp.js +0 -4
- package/dist/EpVideoPanopto-588sRcMP.js +0 -4
- package/dist/EpWordDef-BuZFiK1M.js +0 -4
- package/dist/three.module-laS36oD-.js +0 -48903
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface Answer {
|
|
2
|
+
name: string;
|
|
3
|
+
src?: string;
|
|
4
|
+
isImg?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface Sockets {
|
|
7
|
+
xPos: number;
|
|
8
|
+
yPos: number;
|
|
9
|
+
correctAnswer: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Choice {
|
|
12
|
+
choice: Answer[];
|
|
13
|
+
expected: string;
|
|
14
|
+
allowPut: boolean;
|
|
15
|
+
}
|
package/dist/types/Image.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ep-lib-ts",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.45",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"src/components/"
|
|
@@ -39,11 +39,13 @@
|
|
|
39
39
|
"three": "^0.170.0",
|
|
40
40
|
"vee-validate": "^4.13.2",
|
|
41
41
|
"vue": "^3.2.45",
|
|
42
|
+
"vue-draggable-next": "^2.2.1",
|
|
42
43
|
"vue-router": "^4.4.5",
|
|
43
44
|
"vue3-apexcharts": "1.6.0"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@tailwindcss/forms": "^0.5.9",
|
|
48
|
+
"@types/aframe": "^1.2.8",
|
|
47
49
|
"@types/katex": "^0.16.7",
|
|
48
50
|
"@types/markdown-it": "^14.1.2",
|
|
49
51
|
"@types/node": "^20.12.7",
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
"typescript": "^5.6.2",
|
|
56
58
|
"vite": "^5.4.5",
|
|
57
59
|
"vite-plugin-dts": "^3.9.0",
|
|
58
|
-
"vue-tsc": "^2.2.
|
|
60
|
+
"vue-tsc": "^2.2.10"
|
|
59
61
|
},
|
|
60
62
|
"peerDependencies": {
|
|
61
63
|
"vue": "^3.2.45"
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { toRefs, ref, computed } from "vue";
|
|
3
|
+
import { type SizeThumbnail, sizeThumbnailStyle, InfoModal } from "../../types/Image";
|
|
4
|
+
import { useImage } from "@vueuse/core";
|
|
5
|
+
import EpModal from "../interactions/EpModal.vue";
|
|
6
|
+
import EpIcon from "../basics/EpIcon.vue";
|
|
7
|
+
import EpBtn from "./EpBtn.vue";
|
|
8
|
+
import { mdiArrowExpandAll, mdiChevronLeftCircleOutline, mdiChevronRightCircleOutline } from "@mdi/js";
|
|
9
|
+
import { useRenderText } from "../../composables/useRenderText";
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
src: string;
|
|
13
|
+
alt?: string;
|
|
14
|
+
height?: string | number;
|
|
15
|
+
width?: string | number;
|
|
16
|
+
sizeThumbnail?: SizeThumbnail;
|
|
17
|
+
caption?: string;
|
|
18
|
+
bib?: string;
|
|
19
|
+
title?: string;
|
|
20
|
+
noModal?: boolean;
|
|
21
|
+
cols?: string | number; //posible type à venir => basis-1/12... or 1 | "1" | 2 | "2" ...12
|
|
22
|
+
labelClose?:string;
|
|
23
|
+
labelRef?:string;
|
|
24
|
+
labelRefLib?:string;
|
|
25
|
+
|
|
26
|
+
puzzle?: boolean;
|
|
27
|
+
managedModal?: boolean;
|
|
28
|
+
infoModal?: InfoModal;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
32
|
+
alt: "Image snfas",
|
|
33
|
+
cols: "6",
|
|
34
|
+
noModal: false,
|
|
35
|
+
puzzle: false,
|
|
36
|
+
sizeThumbnail: "medium",
|
|
37
|
+
labelClose:"Fermer",
|
|
38
|
+
labelRef:"Référence",
|
|
39
|
+
labelRefLib:"Référence bibliographique",
|
|
40
|
+
|
|
41
|
+
managedModal: false,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
const renderBib = computed(() => {
|
|
46
|
+
if (props.managedModal && props.infoModal) {
|
|
47
|
+
return useRenderText(props.infoModal.bib? props.infoModal.bib : '');
|
|
48
|
+
}
|
|
49
|
+
if (props.bib) {
|
|
50
|
+
return useRenderText(props.bib);
|
|
51
|
+
}
|
|
52
|
+
return "";
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const showModal = ref<boolean>(false);
|
|
56
|
+
|
|
57
|
+
const toggleModal = (): void => {
|
|
58
|
+
if (props.noModal) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
showModal.value = !showModal.value;
|
|
62
|
+
|
|
63
|
+
if(props.managedModal) {
|
|
64
|
+
emits('newFocus');
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const showBib = ref<boolean>(false);
|
|
69
|
+
|
|
70
|
+
const toggleBib = (): void => {
|
|
71
|
+
showBib.value = !showBib.value;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const styleSizeThumbnail = computed(() => {
|
|
75
|
+
return sizeThumbnailStyle[props.sizeThumbnail];
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const { src, alt, title, caption, bib, sizeThumbnail } =
|
|
79
|
+
toRefs(props);
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
const emits = defineEmits<{
|
|
83
|
+
newFocus: [],
|
|
84
|
+
nextSlide: [],
|
|
85
|
+
prevSlide: [],
|
|
86
|
+
}>();
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<template>
|
|
93
|
+
<div class="inline-block" >
|
|
94
|
+
<div :class="`relative group ${!puzzle ? 'inline-block m-2' : 'h-full mb-1'}`">
|
|
95
|
+
<img
|
|
96
|
+
:class="`${!puzzle ? styleSizeThumbnail : 'h-full w-full justify-self-stretch'} object-cover object-center group-hover:opacity-30 `"
|
|
97
|
+
:src="src"
|
|
98
|
+
:alt="alt"
|
|
99
|
+
/>
|
|
100
|
+
<div
|
|
101
|
+
:class="`absolute top-0 left-0 ${!puzzle ? styleSizeThumbnail : 'h-full w-full'} bg-black opacity-0 transition-opacity duration-300 group-hover:opacity-30 cursor-pointer`"
|
|
102
|
+
@click="toggleModal"
|
|
103
|
+
>
|
|
104
|
+
<div
|
|
105
|
+
class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-white text-center"
|
|
106
|
+
>
|
|
107
|
+
<EpIcon :icon-path="mdiArrowExpandAll"></EpIcon>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<EpModal v-model="showModal">
|
|
113
|
+
<div v-if="managedModal" class="flex items-center justify-center mb-2">
|
|
114
|
+
<button class="p-2" @click="emits('prevSlide')">
|
|
115
|
+
<EpIcon :icon-path="mdiChevronLeftCircleOutline"></EpIcon>
|
|
116
|
+
</button>
|
|
117
|
+
<button class="p-2" @click="emits('nextSlide')">
|
|
118
|
+
<EpIcon :icon-path="mdiChevronRightCircleOutline"></EpIcon>
|
|
119
|
+
</button>
|
|
120
|
+
</div>
|
|
121
|
+
<img
|
|
122
|
+
class="object-cover object-center h-5/6 w-5/6 mx-auto dark:bg-white"
|
|
123
|
+
:src="(managedModal && infoModal)? infoModal.src : src"
|
|
124
|
+
:alt="alt"
|
|
125
|
+
@click="toggleModal"
|
|
126
|
+
/>
|
|
127
|
+
<div class="px-4 py-2">
|
|
128
|
+
<h2 class="text-2xl dark:text-white font-bold">{{ title }}</h2>
|
|
129
|
+
<p class="text-gray-500 dark:text-white text-sm mt-4 text-center">{{ (managedModal && infoModal)? infoModal.caption : caption }}</p>
|
|
130
|
+
<div
|
|
131
|
+
class="text-gray-700 dark:text-white mt-4"
|
|
132
|
+
v-html="renderBib"
|
|
133
|
+
></div>
|
|
134
|
+
</div>
|
|
135
|
+
</EpModal>
|
|
136
|
+
<EpModal v-model="showBib" :title="labelRefLib">
|
|
137
|
+
<div class="text-gray-700 dark:text-white mt-4" v-html="renderBib"></div>
|
|
138
|
+
<div class="flex justify-end">
|
|
139
|
+
<EpBtn @click="toggleBib" size="small" type="error" outlined>{{
|
|
140
|
+
labelClose
|
|
141
|
+
}}</EpBtn>
|
|
142
|
+
</div>
|
|
143
|
+
</EpModal>
|
|
144
|
+
</div>
|
|
145
|
+
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, toRefs, h, defineAsyncComponent} from "vue";
|
|
2
|
+
import { computed, toRefs, h, defineAsyncComponent } from "vue";
|
|
3
3
|
import { isHtml } from "../../composables/isHtml";
|
|
4
4
|
import { useMarkdown } from "../../composables/useMarkdown";
|
|
5
5
|
import EpAccordeon from "../interactions/EpAccordeon.vue";
|
|
@@ -9,20 +9,20 @@ interface Props {
|
|
|
9
9
|
content: string;
|
|
10
10
|
title?: string | null;
|
|
11
11
|
compact?: boolean;
|
|
12
|
-
labelDefinition?: string;
|
|
13
|
-
labelDomain?:string;
|
|
14
|
-
labelVariations?: string;
|
|
15
|
-
labelRelations?: string;
|
|
16
|
-
labelClose?:string;
|
|
12
|
+
labelDefinition?: string;
|
|
13
|
+
labelDomain?: string;
|
|
14
|
+
labelVariations?: string;
|
|
15
|
+
labelRelations?: string;
|
|
16
|
+
labelClose?: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const props = withDefaults(defineProps<Props>(), {
|
|
20
20
|
compact: false,
|
|
21
21
|
labelDefinition: "Définition",
|
|
22
|
-
labelDomain:"Domaine",
|
|
22
|
+
labelDomain: "Domaine",
|
|
23
23
|
labelVariations: "Variations",
|
|
24
24
|
labelRelations: "Relations",
|
|
25
|
-
labelClose:"Fermer"
|
|
25
|
+
labelClose: "Fermer"
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
const renderTitle = computed(() => {
|
|
@@ -39,7 +39,7 @@ const renderText = computed(() => {
|
|
|
39
39
|
if (!isHtml(props.content)) {
|
|
40
40
|
return useMarkdown(props.content);
|
|
41
41
|
}
|
|
42
|
-
if(!props.glossary){
|
|
42
|
+
if (!props.glossary) {
|
|
43
43
|
return props.content
|
|
44
44
|
}
|
|
45
45
|
//return props.content
|
|
@@ -62,28 +62,32 @@ const renderText = computed(() => {
|
|
|
62
62
|
///check every term and replace it
|
|
63
63
|
glossaryTerms.forEach((item) => {
|
|
64
64
|
//get id
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
const id = item.getAttribute("data-id");
|
|
67
67
|
//get content text
|
|
68
68
|
const render_word = item.innerHTML;
|
|
69
69
|
//find in the glossary their equivalent
|
|
70
70
|
let _glossary = [];
|
|
71
71
|
if (props.glossary) {
|
|
72
|
-
_glossary = props.glossary
|
|
72
|
+
_glossary = props.glossary.map(item => ({
|
|
73
|
+
...item,
|
|
74
|
+
id: item.documentId ?? item.id, // fallback only if documentId missing
|
|
75
|
+
}))
|
|
73
76
|
}
|
|
74
77
|
const term = _glossary.find((word) => word.id === id);
|
|
75
78
|
//if was found
|
|
76
79
|
if (term) {
|
|
77
80
|
///add the new values to the array
|
|
78
|
-
|
|
79
81
|
const word = item.outerHTML;
|
|
80
|
-
|
|
82
|
+
// console.log(word)
|
|
81
83
|
//check if the term has relations
|
|
84
|
+
|
|
82
85
|
const foundedRelations = _glossary.filter((x) =>
|
|
83
86
|
x.relation.some((item: string) => {
|
|
84
87
|
return item == id;
|
|
85
88
|
})
|
|
86
89
|
);
|
|
90
|
+
|
|
87
91
|
//get relations id and term
|
|
88
92
|
//const idsRelation = foundedRelations.map((x) => x.id);
|
|
89
93
|
const termsRelation = foundedRelations.map((x) => x.term);
|
|
@@ -109,7 +113,7 @@ const renderText = computed(() => {
|
|
|
109
113
|
</div>`;
|
|
110
114
|
//replace output string
|
|
111
115
|
newStr = newStr.replace(word, replaceWord);
|
|
112
|
-
|
|
116
|
+
|
|
113
117
|
}
|
|
114
118
|
});
|
|
115
119
|
}
|
|
@@ -122,7 +126,7 @@ const renderText = computed(() => {
|
|
|
122
126
|
const myRenderComponent = () => {
|
|
123
127
|
const r = {
|
|
124
128
|
components: {
|
|
125
|
-
|
|
129
|
+
epterm: defineAsyncComponent(() => import('../medias/EpTerm.vue')),
|
|
126
130
|
},
|
|
127
131
|
template: `${renderText.value}`,
|
|
128
132
|
};
|
|
@@ -135,10 +139,10 @@ const { compact } = toRefs(props);
|
|
|
135
139
|
</script>
|
|
136
140
|
|
|
137
141
|
<template>
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
<div class="px-2 text-black dark:text-white ">
|
|
143
|
+
<myRenderComponent v-if="!compact"></myRenderComponent>
|
|
140
144
|
<EpAccordeon outlined :title="renderTitle" v-else>
|
|
141
145
|
<myRenderComponent></myRenderComponent>
|
|
142
146
|
</EpAccordeon>
|
|
143
|
-
|
|
147
|
+
</div>
|
|
144
148
|
</template>
|
|
@@ -18,6 +18,7 @@ interface Option {
|
|
|
18
18
|
interface Props {
|
|
19
19
|
scenarioTitle: string;
|
|
20
20
|
initialInstruction?: string | null;
|
|
21
|
+
generalFeedback?: string;
|
|
21
22
|
bgColor?: string;
|
|
22
23
|
decisionTree: {
|
|
23
24
|
rootQuestion: string;
|
|
@@ -151,12 +152,20 @@ const getChoices = (itinerary: number[]) => {
|
|
|
151
152
|
<!-- End of the scenario -->
|
|
152
153
|
<div :class="`flex-grow flex flex-col items-center ${transitionAnimation}`" v-else>
|
|
153
154
|
<div class="flex-grow flex flex-col items-center">
|
|
154
|
-
<h1 class="my-
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<
|
|
159
|
-
|
|
155
|
+
<h1 class="my-4 font-bold text-3xl">Vous avez terminé le scénario!</h1>
|
|
156
|
+
<div class="grid grid-cols-2 gap-2">
|
|
157
|
+
<div class="col-span-1 flex flex-col items-center">
|
|
158
|
+
<h3 class="font-bold">Voici votre parcours</h3>
|
|
159
|
+
<div class="flex flex-col relative w-full gap-4 px-5 py-5 items-start overflow-auto border-l-4 border-gray-700" style="max-width: 600px; height: 300px;">
|
|
160
|
+
<div v-for="(question, index) in getChoices(itinerary)" :key="index" class="path-item rounded bg-blue-500 text-white py-2 px-4 flex flex-col items-center">
|
|
161
|
+
<u>{{ question.question }}</u>
|
|
162
|
+
<p>{{ question.choice }}</p>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="flex flex-col col-span-1 justify-center items-center px-4 border-l-2 border-gray-700 overflow-auto">
|
|
167
|
+
<h3 class="font-bold">Feedback général</h3>
|
|
168
|
+
<p class="text-center">{{ generalFeedback }}</p>
|
|
160
169
|
</div>
|
|
161
170
|
</div>
|
|
162
171
|
</div>
|
|
@@ -23,7 +23,7 @@ const { title, icon, subtitle } = toRefs(props);
|
|
|
23
23
|
{{ title }}
|
|
24
24
|
</h2>
|
|
25
25
|
</div>
|
|
26
|
-
<div class="
|
|
26
|
+
<div class="lg:col-span-8 lg:mt-0 lg:border-l dark:border-gray-700 lg:pl-4">
|
|
27
27
|
<div class="py-2">
|
|
28
28
|
<h3 v-if="subtitle" class="text-base font-semibold leading-7 text-gray-900 dark:text-gray-100">
|
|
29
29
|
{{subtitle}}
|
|
@@ -23,7 +23,7 @@ const { title, icon, subtitle } = toRefs(props);
|
|
|
23
23
|
{{ title }}
|
|
24
24
|
</h2>
|
|
25
25
|
</div>
|
|
26
|
-
<div class="
|
|
26
|
+
<div class="lg:col-span-8 lg:mt-0 lg:border-l dark:border-gray-700 lg:pl-4">
|
|
27
27
|
<div class="py-2">
|
|
28
28
|
<h3 v-if="subtitle" class="text-base font-semibold leading-7 text-gray-900 dark:text-gray-100">
|
|
29
29
|
{{subtitle}}
|
|
@@ -7,6 +7,7 @@ type Instructions = {
|
|
|
7
7
|
uid:string;
|
|
8
8
|
title:string;
|
|
9
9
|
content:string;
|
|
10
|
+
open?:boolean;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
interface Props {
|
|
@@ -33,10 +34,10 @@ const { title, icon, subtitle } = toRefs(props);
|
|
|
33
34
|
{{ title }}
|
|
34
35
|
</h2>
|
|
35
36
|
</div>
|
|
36
|
-
<div class="
|
|
37
|
+
<div class="lg:col-span-8 lg:mt-0 lg:border-l dark:border-gray-700 lg:pl-4">
|
|
37
38
|
<div class="py-2">
|
|
38
39
|
<template v-for="instruction in instructions" :key="`instruction-${instruction.uid}`">
|
|
39
|
-
<EpAccordeon small outlined :title="instruction.title">
|
|
40
|
+
<EpAccordeon small outlined :title="instruction.title" :open="instruction.open">
|
|
40
41
|
<div v-html="instruction.content"></div>
|
|
41
42
|
</EpAccordeon>
|
|
42
43
|
</template>
|
|
@@ -23,7 +23,7 @@ const { title, icon, subtitle } = toRefs(props);
|
|
|
23
23
|
{{ title }}
|
|
24
24
|
</h2>
|
|
25
25
|
</div>
|
|
26
|
-
<div class="
|
|
26
|
+
<div class="lg:col-span-8 lg:mt-0 lg:border-l dark:border-gray-700 lg:pl-4">
|
|
27
27
|
<div class="py-2">
|
|
28
28
|
<h3 v-if="subtitle" class="text-base font-semibold leading-7 text-gray-900 dark:text-gray-100">
|
|
29
29
|
{{subtitle}}
|
|
@@ -102,11 +102,11 @@ const errorImg = (event:Event)=>{
|
|
|
102
102
|
</script>
|
|
103
103
|
|
|
104
104
|
<template>
|
|
105
|
-
<div class="flex rounded-lg overflow-hidden bg-white dark:bg-dark md:flex-row " v-if="!compact">
|
|
105
|
+
<div class="flex shadow-sm rounded-lg overflow-hidden bg-white dark:bg-dark md:flex-row " v-if="!compact">
|
|
106
106
|
<template v-if="!hideCover">
|
|
107
107
|
<div
|
|
108
108
|
v-if="hasCover"
|
|
109
|
-
class="h-96 w-full rounded-t-lg md:h-auto md:w-56 md:rounded-none md:rounded-l-lg flex justify-center items-center text-gray-300"
|
|
109
|
+
class="h-96 mr-2 w-full rounded-t-lg md:h-auto md:w-56 md:rounded-none md:rounded-l-lg flex justify-center items-center text-gray-300"
|
|
110
110
|
>
|
|
111
111
|
<img :src="cover" :alt="`image de la lecture ${title}`" @error="errorImg" />
|
|
112
112
|
</div>
|
|
@@ -118,7 +118,7 @@ const errorImg = (event:Event)=>{
|
|
|
118
118
|
<EpIcon :icon-path="mdiBookOpenPageVariant" size="95"></EpIcon>
|
|
119
119
|
</div>
|
|
120
120
|
</template>
|
|
121
|
-
<div class="flex flex-col w-full">
|
|
121
|
+
<div class="flex py-3 flex-col w-full">
|
|
122
122
|
<EpEdu :title="labelCard" :labelIntentions="labelIntentions" :icon="mdiBookOpenVariant" flat :type="type" :hideIcon="hideIcon" :mandateLevel="mandateLevel">
|
|
123
123
|
<template #intentions v-if="intentions">
|
|
124
124
|
<div v-html="useRenderText(intentions)"></div>
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
// DO NOT DELETE. IMPORTANT FOR VIDEO NAVIGATION : this.el.object3D.getWorldPosition(position);
|
|
3
3
|
import { ref, onMounted } from "vue";
|
|
4
|
-
import * as AFRAME from "aframe";
|
|
4
|
+
//import * as AFRAME from "aframe";
|
|
5
|
+
import "aframe";
|
|
5
6
|
import { Object3D, Quaternion, Vector3 } from "three";
|
|
6
7
|
import type { Pin, Scene } from "../../types/image360";
|
|
7
8
|
|
|
8
9
|
interface Props {
|
|
9
10
|
scenes:Scene[];
|
|
11
|
+
id?: string;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
const props = defineProps<Props>();
|
|
@@ -17,6 +19,9 @@ const currentSceneIndex = ref(0);
|
|
|
17
19
|
const hoveredPin = ref<Pin | null>(null);
|
|
18
20
|
const clickedPin = ref<Pin | null>(null);
|
|
19
21
|
|
|
22
|
+
const AFRAME = window.AFRAME;
|
|
23
|
+
|
|
24
|
+
|
|
20
25
|
if (!AFRAME.components["rotation-reader"]) {
|
|
21
26
|
AFRAME.registerComponent("rotation-reader", {
|
|
22
27
|
schema: {},
|
|
@@ -66,6 +71,9 @@ function handleMouseLeave(pin: Pin | null, event: Event): void {
|
|
|
66
71
|
|
|
67
72
|
if (pin?.event === "onHover" || !pin?.event) {
|
|
68
73
|
const target = event.target as HTMLElement;
|
|
74
|
+
|
|
75
|
+
console.log("children:", target.children);
|
|
76
|
+
|
|
69
77
|
if (clickedPin.value == pin) {
|
|
70
78
|
target.setAttribute("material", "opacity: 1; transparent: true");
|
|
71
79
|
}
|
|
@@ -133,11 +141,14 @@ function createTickFunction() {
|
|
|
133
141
|
el: { object3D: InstanceType<typeof Object3D>; sceneEl: any };
|
|
134
142
|
}) {
|
|
135
143
|
updateCameraQuaternion(this.el.object3D, quaternion);
|
|
136
|
-
|
|
144
|
+
|
|
145
|
+
const sceneEl = this.el.sceneEl;
|
|
146
|
+
//console.log("scene active", sceneEl.getAttribute("id"));
|
|
147
|
+
updatePinsRotation(quaternion, sceneEl);
|
|
137
148
|
|
|
138
149
|
this.el.object3D.getWorldPosition(cameraPosition);
|
|
139
150
|
|
|
140
|
-
|
|
151
|
+
sceneEl.querySelectorAll(".pin-marker").forEach((pinElement: any) => {
|
|
141
152
|
const pinObject = (pinElement as any).object3D;
|
|
142
153
|
if (pinObject) {
|
|
143
154
|
pinObject.getWorldPosition(objectPosition);
|
|
@@ -147,7 +158,7 @@ function createTickFunction() {
|
|
|
147
158
|
}
|
|
148
159
|
});
|
|
149
160
|
|
|
150
|
-
|
|
161
|
+
sceneEl.querySelectorAll(".frame").forEach((frameElement: any) => {
|
|
151
162
|
const frameObject = (frameElement as any).object3D;
|
|
152
163
|
if (frameObject) {
|
|
153
164
|
frameObject.getWorldPosition(objectPosition);
|
|
@@ -173,14 +184,14 @@ function updateCameraQuaternion(
|
|
|
173
184
|
object3D.getWorldQuaternion(quaternion);
|
|
174
185
|
}
|
|
175
186
|
|
|
176
|
-
function updatePinsRotation(quaternion: InstanceType<typeof Quaternion
|
|
177
|
-
|
|
187
|
+
function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>, sceneEl: any) {
|
|
188
|
+
sceneEl.querySelectorAll(".pin-marker").forEach((pinElement: any) => {
|
|
178
189
|
const pinObject = (pinElement as any).object3D;
|
|
179
190
|
if (pinObject) {
|
|
180
191
|
pinObject.setRotationFromQuaternion(quaternion);
|
|
181
192
|
}
|
|
182
193
|
});
|
|
183
|
-
|
|
194
|
+
sceneEl.querySelectorAll(".frame").forEach((pinElement: any) => {
|
|
184
195
|
const pinObject = (pinElement as any).object3D;
|
|
185
196
|
if (pinObject) {
|
|
186
197
|
pinObject.setRotationFromQuaternion(quaternion);
|
|
@@ -207,7 +218,7 @@ function getPinColor(pin: Pin): string {
|
|
|
207
218
|
margin: auto;
|
|
208
219
|
"
|
|
209
220
|
>
|
|
210
|
-
<a-scene embedded>
|
|
221
|
+
<a-scene :id="id" embedded>
|
|
211
222
|
<a-assets>
|
|
212
223
|
<img
|
|
213
224
|
v-for="scene in props.scenes"
|
|
@@ -241,14 +252,24 @@ function getPinColor(pin: Pin): string {
|
|
|
241
252
|
<a-circle
|
|
242
253
|
class="pin-marker"
|
|
243
254
|
:color="getPinColor(pin)"
|
|
244
|
-
radius="0.
|
|
255
|
+
radius="0.15"
|
|
245
256
|
shader="flat"
|
|
246
257
|
:material="`opacity: ${getPinOpacity(
|
|
247
258
|
pin.id
|
|
248
|
-
)}; transparent: true
|
|
259
|
+
)}; transparent: true;`"
|
|
249
260
|
@click="(event: Event) => handleMarkerClick(pin, event)"
|
|
250
261
|
@mouseenter="(event: Event) => handleMouseEnter(pin, event)"
|
|
251
|
-
|
|
262
|
+
>
|
|
263
|
+
|
|
264
|
+
<!-- Cercle intérieur -->
|
|
265
|
+
<a-circle
|
|
266
|
+
position="0 0 0.01"
|
|
267
|
+
color="#FFF"
|
|
268
|
+
radius="0.05"
|
|
269
|
+
material="opacity: 0;"
|
|
270
|
+
></a-circle>
|
|
271
|
+
|
|
272
|
+
</a-circle>
|
|
252
273
|
</a-entity>
|
|
253
274
|
|
|
254
275
|
<a-entity
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref, onMounted } from "vue";
|
|
3
|
-
import * as AFRAME from "aframe";
|
|
3
|
+
// import * as AFRAME from "aframe";
|
|
4
|
+
import "aframe";
|
|
4
5
|
import { Object3D, Quaternion, Vector3 } from "three";
|
|
5
6
|
import type { Pin, Scene } from "../../types/video360";
|
|
6
7
|
|
|
@@ -15,6 +16,8 @@ const hoveredPin = ref<Pin | null>(null);
|
|
|
15
16
|
const clickedPin = ref<Pin | null>(null);
|
|
16
17
|
const isPlaying = ref(false);
|
|
17
18
|
|
|
19
|
+
const AFRAME = window.AFRAME;
|
|
20
|
+
|
|
18
21
|
if (!AFRAME.components["rotation-reader"]) {
|
|
19
22
|
AFRAME.registerComponent("rotation-reader", {
|
|
20
23
|
schema: {},
|
|
@@ -242,7 +245,7 @@ function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>) {
|
|
|
242
245
|
<a-circle
|
|
243
246
|
class="pin-marker"
|
|
244
247
|
:color="getPinColor(pin)"
|
|
245
|
-
radius="0.
|
|
248
|
+
radius="0.15"
|
|
246
249
|
shader="flat"
|
|
247
250
|
:material="`opacity: ${getPinOpacity(
|
|
248
251
|
pin.id
|
|
@@ -250,7 +253,16 @@ function updatePinsRotation(quaternion: InstanceType<typeof Quaternion>) {
|
|
|
250
253
|
@click="(event: Event) => handleMarkerClick(pin, event)"
|
|
251
254
|
@mouseenter="(event: Event) => handleMouseEnter(pin, event)"
|
|
252
255
|
@mouseleave="(event: Event) => handleMouseLeave(pin, event)"
|
|
253
|
-
|
|
256
|
+
>
|
|
257
|
+
<!-- Cercle intérieur -->
|
|
258
|
+
<a-circle
|
|
259
|
+
position="0 0 0.01"
|
|
260
|
+
color="#FFF"
|
|
261
|
+
radius="0.05"
|
|
262
|
+
material="opacity: 0;"
|
|
263
|
+
></a-circle>
|
|
264
|
+
|
|
265
|
+
</a-circle>
|
|
254
266
|
</a-entity>
|
|
255
267
|
|
|
256
268
|
<!-- HOVERED PINS INFO BOX -->
|