ep-lib-ts 1.0.42 → 1.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/BgAudio-ByQMjvpb.js +4 -0
  2. package/dist/DisplayBox-5KOzK-T1.js +4 -0
  3. package/dist/Ep360Image-CQJBPImD.js +241 -0
  4. package/dist/{Ep360Video-b_stvC2Z.js → Ep360Video-CL_7mOiQ.js} +84 -77
  5. package/dist/EpAlert-9n3eGOzn.js +4 -0
  6. package/dist/EpAudio-DN-khrPL.js +4 -0
  7. package/dist/EpAvatar-CXQP2wql.js +4 -0
  8. package/dist/EpBadge-4MOToF_Q.js +4 -0
  9. package/dist/EpBarChart-D7YNa6L1.js +4 -0
  10. package/dist/EpBranchingScenario-vDe8SVyF.js +160 -0
  11. package/dist/EpBtn-CodZ5WkT.js +4 -0
  12. package/dist/EpCard-bxcDoveo.js +4 -0
  13. package/dist/EpCardLink-BpRg37fb.js +4 -0
  14. package/dist/EpChip-DyPsThQ7.js +4 -0
  15. package/dist/EpCodeblock-CTVen6ok.js +4 -0
  16. package/dist/EpConclusion-CZSpnFN3.js +4 -0
  17. package/dist/EpContentSlider-0KrwEp3v.js +4 -0
  18. package/dist/{EpDarkmode-DV9Z9xYJ.js → EpDarkmode-CM5E89Mq.js} +1 -1
  19. package/dist/EpDescription-BqAK-19p.js +4 -0
  20. package/dist/EpDivider-Cz2UczzO.js +4 -0
  21. package/dist/EpDraggable-DihYnwD-.js +1676 -0
  22. package/dist/EpEdu-Cb0syukg.js +4 -0
  23. package/dist/EpFlex-C9FQK2SA.js +4 -0
  24. package/dist/EpFunnelChart-DCiSFsse.js +4 -0
  25. package/dist/EpHeader-CzSF69pa.js +4 -0
  26. package/dist/EpHover-RZmDKnaw.js +4 -0
  27. package/dist/EpHoverCard-D6G0baOv.js +4 -0
  28. package/dist/EpIcon-Av0-zy17.js +4 -0
  29. package/dist/EpIframe-DW9zyLQo.js +4 -0
  30. package/dist/EpImg-CSHuR6qU.js +4 -0
  31. package/dist/EpImgCarousel-cIC103wg.js +4 -0
  32. package/dist/{EpInput-CZghcnDC.js → EpInput-DHrHSXzx.js} +29 -29
  33. package/dist/EpInstructions-K-kkygx5.js +4 -0
  34. package/dist/EpIntroduction-CQlFolxF.js +4 -0
  35. package/dist/EpLineChart-mWEJNhfP.js +4 -0
  36. package/dist/EpLink-ByArsF1O.js +4 -0
  37. package/dist/EpLinkVersion-D0l0gER1.js +4 -0
  38. package/dist/{EpList-ukdKbhdd.js → EpList-c0SMP53E.js} +1 -1
  39. package/dist/EpModal-CnTSNH-6.js +4 -0
  40. package/dist/{EpNothing-nZWACvB0.js → EpNothing-CT8_zyfI.js} +1 -1
  41. package/dist/EpObjective-CFUl1myw.js +4 -0
  42. package/dist/EpPieChart-D4gofeCO.js +4 -0
  43. package/dist/EpQuestion-DpEP1I3J.js +4 -0
  44. package/dist/EpQuote-D_a9FXrQ.js +4 -0
  45. package/dist/EpRadio-BPGeCsln.js +4 -0
  46. package/dist/EpRadioSummative-2GRkKBZC.js +4 -0
  47. package/dist/EpReading-b0gkhYIF.js +4 -0
  48. package/dist/EpResource-B1pFABU5.js +4 -0
  49. package/dist/EpScope-BQWyrqjD.js +4 -0
  50. package/dist/EpSection-CkXDsnuU.js +4 -0
  51. package/dist/EpSectionCols-BwC-XklV.js +4 -0
  52. package/dist/EpSkeleton-CfhwJtyP.js +4 -0
  53. package/dist/EpSoftware-c8ntWUO-.js +4 -0
  54. package/dist/EpSpecificObjective-D3mba6ZZ.js +4 -0
  55. package/dist/EpSpinner-G3e-rq8T.js +4 -0
  56. package/dist/EpStackedList-Bo0PTfJP.js +4 -0
  57. package/dist/EpSummativeTable-BumOFuw9.js +4 -0
  58. package/dist/EpSvg-D1zVHuRF.js +4 -0
  59. package/dist/EpSvgShow-CDYlL1_A.js +54 -0
  60. package/dist/EpTable-gr45PRwp.js +4 -0
  61. package/dist/EpTerm-CNfRoEdY.js +4 -0
  62. package/dist/EpText-DKuz6gcn.js +4 -0
  63. package/dist/EpTimeLine-O-XSTUsa.js +4 -0
  64. package/dist/EpVideo-DB3Kgada.js +4 -0
  65. package/dist/EpVideoPanopto-Vta3OP2y.js +4 -0
  66. package/dist/EpWordDef-CYOQAmor.js +4 -0
  67. package/dist/components/basics/EpImgCarousel.vue.d.ts +77 -0
  68. package/dist/components/educationals/EpBranchingScenario.vue.d.ts +1 -0
  69. package/dist/components/interactions/Ep360Image.vue.d.ts +1 -0
  70. package/dist/components/interactions/EpDraggable.vue.d.ts +26 -0
  71. package/dist/components/interactions/EpSvgShow.vue.d.ts +34 -0
  72. package/dist/components/medias/EpCardLink.vue.d.ts +4 -0
  73. package/dist/components/medias/EpCarousel.vue.d.ts +5 -0
  74. package/dist/ep-lib-ts.js +30 -30
  75. package/dist/ep-lib-ts.umd.cjs +4600 -4766
  76. package/dist/{index-BABRC_Ij.js → index-DtabYqi-.js} +1 -1
  77. package/dist/{index-DDAVtT-Z.js → index-hjRiaRG8.js} +3942 -3779
  78. package/dist/{prism-6uDYLnZo.js → prism-DpfMvZqf.js} +1 -1
  79. package/dist/style.css +1 -1
  80. package/dist/three.module-CWLs6nMo.js +33752 -0
  81. package/dist/types/Draggable.d.ts +15 -0
  82. package/dist/types/Image.d.ts +5 -0
  83. package/package.json +4 -2
  84. package/src/components/basics/EpCard.vue +1 -1
  85. package/src/components/basics/EpImg.vue +1 -1
  86. package/src/components/basics/EpImgCarousel.vue +145 -0
  87. package/src/components/basics/EpText.vue +20 -18
  88. package/src/components/educationals/EpBranchingScenario.vue +15 -6
  89. package/src/components/educationals/EpReading.vue +3 -3
  90. package/src/components/interactions/Ep360Image.vue +32 -11
  91. package/src/components/interactions/Ep360Video.vue +15 -3
  92. package/src/components/interactions/EpDraggable.vue +192 -0
  93. package/src/components/interactions/EpSvgShow.vue +97 -0
  94. package/src/components/medias/EpCardLink.vue +51 -46
  95. package/src/components/medias/EpCarousel.vue +74 -11
  96. package/dist/BgAudio-B8TWhPS4.js +0 -4
  97. package/dist/DisplayBox-CVjM7CIK.js +0 -4
  98. package/dist/Ep360Image-Dmwx7NrY.js +0 -228
  99. package/dist/EpAlert-BL76x1nU.js +0 -4
  100. package/dist/EpAudio-C1oISf9P.js +0 -4
  101. package/dist/EpAvatar-BhbxoN3-.js +0 -4
  102. package/dist/EpBadge-CrFyRMYZ.js +0 -4
  103. package/dist/EpBarChart-BppGcLMQ.js +0 -4
  104. package/dist/EpBranchingScenario-B24j3QCB.js +0 -151
  105. package/dist/EpBtn-fVZ6TDv0.js +0 -4
  106. package/dist/EpCard-jyubSatC.js +0 -4
  107. package/dist/EpCardLink-DZSHjJtM.js +0 -4
  108. package/dist/EpChip-CnIScjK2.js +0 -4
  109. package/dist/EpCodeblock-C3sfk5vm.js +0 -4
  110. package/dist/EpConclusion-BMyRU6is.js +0 -4
  111. package/dist/EpContentSlider-DXuhYYCY.js +0 -4
  112. package/dist/EpDescription-DbyvVHqd.js +0 -4
  113. package/dist/EpDivider-DLNUbygt.js +0 -4
  114. package/dist/EpEdu-D8qKZwo4.js +0 -4
  115. package/dist/EpFlex-DERxMM1-.js +0 -4
  116. package/dist/EpFunnelChart-CaGjSoAy.js +0 -4
  117. package/dist/EpHeader-B0hVPn_n.js +0 -4
  118. package/dist/EpHover-XSJ4bqps.js +0 -4
  119. package/dist/EpHoverCard-EjNFyHQH.js +0 -4
  120. package/dist/EpIcon-D0W1dYE5.js +0 -4
  121. package/dist/EpIframe-BI4RWK0-.js +0 -4
  122. package/dist/EpImg-B4t8oZ4_.js +0 -4
  123. package/dist/EpInstructions-DWBai9-j.js +0 -4
  124. package/dist/EpIntroduction-C_zkEVjU.js +0 -4
  125. package/dist/EpLineChart-DHHtVVVK.js +0 -4
  126. package/dist/EpLink-CtdHaQpr.js +0 -4
  127. package/dist/EpLinkVersion-3WS3UgxY.js +0 -4
  128. package/dist/EpModal-DAzgqs2T.js +0 -4
  129. package/dist/EpObjective-Dwx6_PZV.js +0 -4
  130. package/dist/EpPieChart-B8Pr5W9-.js +0 -4
  131. package/dist/EpQuestion-B62CYUVA.js +0 -4
  132. package/dist/EpQuote-BihyGusM.js +0 -4
  133. package/dist/EpRadio-CpG6pS3s.js +0 -4
  134. package/dist/EpRadioSummative-DLXgKZAu.js +0 -4
  135. package/dist/EpReading-BlSjw_UD.js +0 -4
  136. package/dist/EpResource-ofzOBR4O.js +0 -4
  137. package/dist/EpScope-BIYN9eA2.js +0 -4
  138. package/dist/EpSection-33XioYMg.js +0 -4
  139. package/dist/EpSectionCols-A97bH9ae.js +0 -4
  140. package/dist/EpSkeleton-By3TPHqs.js +0 -4
  141. package/dist/EpSoftware-CUXfVeuT.js +0 -4
  142. package/dist/EpSpecificObjective-C2RasqCs.js +0 -4
  143. package/dist/EpSpinner-ZYvRrAHj.js +0 -4
  144. package/dist/EpStackedList-DHurElck.js +0 -4
  145. package/dist/EpSummativeTable-etwjX91_.js +0 -4
  146. package/dist/EpSvg-DmCV9jTP.js +0 -4
  147. package/dist/EpTable-Biz8ArYF.js +0 -4
  148. package/dist/EpTerm-Cisb50Au.js +0 -4
  149. package/dist/EpText-ibFC4JV7.js +0 -4
  150. package/dist/EpTimeLine-xAkA3Jb1.js +0 -4
  151. package/dist/EpVideo-CsieKBpx.js +0 -4
  152. package/dist/EpVideoPanopto-V584YRQc.js +0 -4
  153. package/dist/EpWordDef-VtpC2ck8.js +0 -4
  154. 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
+ }
@@ -4,4 +4,9 @@ export declare const sizeThumbnailStyle: {
4
4
  large: string;
5
5
  };
6
6
  export declare const cols_img: string[];
7
+ export interface InfoModal {
8
+ src: string;
9
+ caption?: string;
10
+ bib?: string;
11
+ }
7
12
  export type SizeThumbnail = keyof typeof sizeThumbnailStyle;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ep-lib-ts",
3
3
  "private": false,
4
- "version": "1.0.42",
4
+ "version": "1.0.44",
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.8"
60
+ "vue-tsc": "^2.2.10"
59
61
  },
60
62
  "peerDependencies": {
61
63
  "vue": "^3.2.45"
@@ -52,7 +52,7 @@ const borderColor = computed(() => {
52
52
 
53
53
  const isLinkStyle = computed(()=> {
54
54
  if(props.isLink){
55
- return 'dark:hover:border-white hover:border-primary hover:border hover:border-2 rounded-md cursor-pointer'
55
+ return 'dark:hover:border-white hover:border-primary hover:border hover:border rounded-md cursor-pointer'
56
56
  }
57
57
  return ''
58
58
  })
@@ -159,4 +159,4 @@ const { src, alt, title, caption, thumbnail, bib, sizeThumbnail } =
159
159
  </div>
160
160
  </EpModal>
161
161
  </div>
162
- </template>
162
+ </template>
@@ -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,22 +62,24 @@ 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
- // console.log(word)
82
+ // console.log(word)
81
83
  //check if the term has relations
82
84
  const foundedRelations = _glossary.filter((x) =>
83
85
  x.relation.some((item: string) => {
@@ -109,7 +111,7 @@ const renderText = computed(() => {
109
111
  </div>`;
110
112
  //replace output string
111
113
  newStr = newStr.replace(word, replaceWord);
112
-
114
+
113
115
  }
114
116
  });
115
117
  }
@@ -122,7 +124,7 @@ const renderText = computed(() => {
122
124
  const myRenderComponent = () => {
123
125
  const r = {
124
126
  components: {
125
- epterm: defineAsyncComponent(()=>import('../medias/EpTerm.vue')),
127
+ epterm: defineAsyncComponent(() => import('../medias/EpTerm.vue')),
126
128
  },
127
129
  template: `${renderText.value}`,
128
130
  };
@@ -135,10 +137,10 @@ const { compact } = toRefs(props);
135
137
  </script>
136
138
 
137
139
  <template>
138
- <div class="px-2 text-black dark:text-white ">
139
- <myRenderComponent v-if="!compact"></myRenderComponent>
140
+ <div class="px-2 text-black dark:text-white ">
141
+ <myRenderComponent v-if="!compact"></myRenderComponent>
140
142
  <EpAccordeon outlined :title="renderTitle" v-else>
141
143
  <myRenderComponent></myRenderComponent>
142
144
  </EpAccordeon>
143
- </div>
145
+ </div>
144
146
  </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-2 font-bold text-3xl">Vous avez terminé le scénario!</h1>
155
- <p>Voici votre parcours</p>
156
- <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;">
157
- <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">
158
- <u>{{ question.question }}</u>
159
- <p>{{ question.choice }}</p>
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>
@@ -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
- updatePinsRotation(quaternion);
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
- document.querySelectorAll(".pin-marker").forEach((pinElement) => {
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
- document.querySelectorAll(".frame").forEach((frameElement) => {
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
- document.querySelectorAll(".pin-marker").forEach((pinElement) => {
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
- document.querySelectorAll(".frame").forEach((pinElement) => {
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.25"
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
- ></a-circle>
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.25"
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
- ></a-circle>
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 -->