ep-lib-ts 1.0.1 → 1.0.4

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 (223) hide show
  1. package/dist/BgAudio-C9b05zDe.js +4 -0
  2. package/dist/DisplayBox-DwV5vdf4.js +4 -0
  3. package/dist/EpAlert-DEERqegj.js +4 -0
  4. package/dist/EpAudio-D1Pergv3.js +4 -0
  5. package/dist/EpBadge-CXG9CCs-.js +4 -0
  6. package/dist/EpBarChart-DqcfpObW.js +4 -0
  7. package/dist/EpBtn-CjpUqmnk.js +4 -0
  8. package/dist/EpCard-D2Yuf56Q.js +4 -0
  9. package/dist/EpChip-1BDl9148.js +4 -0
  10. package/dist/{EpCodeblock-DVX2XFFj.js → EpCodeblock-DX7H-PE3.js} +2 -2
  11. package/dist/EpContentSlider-G24sedKV.js +4 -0
  12. package/dist/EpDarkmode-CVX7I7Oh.js +22 -0
  13. package/dist/EpDivider-By54laP-.js +4 -0
  14. package/dist/EpEdu-D_vwhqgL.js +4 -0
  15. package/dist/EpFlex-C8FUteog.js +4 -0
  16. package/dist/EpFunnelChart-vUi3II3g.js +4 -0
  17. package/dist/EpHeader-IOUvF-no.js +4 -0
  18. package/dist/EpHotsPot-DFz_Du9o.js +59 -0
  19. package/dist/{EpHover-BL7JsbVZ.js → EpHover-D3o7-8F6.js} +1 -1
  20. package/dist/EpIcon-C5N1EmKo.js +4 -0
  21. package/dist/EpIframe-DlYnZzA2.js +4 -0
  22. package/dist/EpImg-DBdJTFxB.js +4 -0
  23. package/dist/{EpInput-DMIxjwBM.js → EpInput-DtqEfGYC.js} +429 -438
  24. package/dist/EpLineChart-DHRVciuH.js +4 -0
  25. package/dist/EpLink-BA65sB5T.js +4 -0
  26. package/dist/EpLinkVersion-DJWO90l3.js +4 -0
  27. package/dist/{EpList-BkH08ROd.js → EpList-gjrvWauh.js} +1 -1
  28. package/dist/EpModal-Bkn0UYrU.js +4 -0
  29. package/dist/{EpNothing-IEAPsIPI.js → EpNothing-Di7BP_gj.js} +1 -1
  30. package/dist/EpPieChart-ep1v3gNm.js +4 -0
  31. package/dist/EpQuestion-BIz290OE.js +4 -0
  32. package/dist/EpQuote-C7vFc3nU.js +4 -0
  33. package/dist/EpRadio-DZTarnBT.js +4 -0
  34. package/dist/EpRadioSummative-CorOWGOQ.js +4 -0
  35. package/dist/EpReading-DMtuDG_x.js +4 -0
  36. package/dist/EpResource-BYf45kWh.js +4 -0
  37. package/dist/EpScope-Ba2Q1Ff_.js +4 -0
  38. package/dist/EpSection-DscmvV47.js +4 -0
  39. package/dist/EpSelect-DRPIgo_k.js +43 -0
  40. package/dist/EpSkeleton-CI5AEDN9.js +4 -0
  41. package/dist/EpSoftware-DqR9_72s.js +4 -0
  42. package/dist/EpSpinner-BYYDdBAv.js +4 -0
  43. package/dist/EpSummativeTable-DYj6fOso.js +4 -0
  44. package/dist/EpSvg-qV8Jv7hA.js +4 -0
  45. package/dist/EpTable-CIXtqslP.js +4 -0
  46. package/dist/EpTerm-zVklM1Ty.js +4 -0
  47. package/dist/EpText-DlG9XQYl.js +4 -0
  48. package/dist/EpTextarea-D8UCQuga.js +44 -0
  49. package/dist/EpTimeLine-8okBy26f.js +4 -0
  50. package/dist/{EpToggle-CfXYpI1b.js → EpToggle-BDp54LpY.js} +26 -23
  51. package/dist/EpVideo-CMhul8b_.js +4 -0
  52. package/dist/EpVideoPanopto-CB7xf6qs.js +4 -0
  53. package/dist/EpWordDef-Ctx-w2Ll.js +4 -0
  54. package/dist/components/basics/EpAvatar.vue.d.ts +4 -4
  55. package/dist/components/basics/EpBadge.vue.d.ts +16 -4
  56. package/dist/components/basics/EpBtn.vue.d.ts +4 -11
  57. package/dist/components/basics/EpCard.vue.d.ts +4 -4
  58. package/dist/components/basics/EpChip.vue.d.ts +4 -4
  59. package/dist/components/basics/EpDivider.vue.d.ts +4 -4
  60. package/dist/components/basics/EpFlex.vue.d.ts +1 -1
  61. package/dist/components/basics/EpHover.vue.d.ts +4 -4
  62. package/dist/components/basics/EpIcon.vue.d.ts +4 -4
  63. package/dist/components/basics/EpImg.vue.d.ts +24 -4
  64. package/dist/components/basics/EpList.vue.d.ts +1 -1
  65. package/dist/components/basics/EpListitem.vue.d.ts +4 -4
  66. package/dist/components/basics/EpSection.vue.d.ts +4 -4
  67. package/dist/components/basics/EpSpinner.vue.d.ts +4 -4
  68. package/dist/components/basics/EpTable.vue.d.ts +3 -3
  69. package/dist/components/basics/EpText.vue.d.ts +16 -4
  70. package/dist/components/charts/EpBarChart.vue.d.ts +16 -4
  71. package/dist/components/charts/EpFunnelChart.vue.d.ts +62 -0
  72. package/dist/components/charts/EpLineChart.vue.d.ts +16 -4
  73. package/dist/components/charts/EpPieChart.vue.d.ts +16 -4
  74. package/dist/components/educationals/EpCodeblock.vue.d.ts +5 -5
  75. package/dist/components/educationals/EpEdu.vue.d.ts +17 -5
  76. package/dist/components/educationals/EpReading.vue.d.ts +49 -17
  77. package/dist/components/educationals/EpResource.vue.d.ts +5 -5
  78. package/dist/components/educationals/EpScope.vue.d.ts +4 -4
  79. package/dist/components/forms/EpCheckbox.vue.d.ts +5 -5
  80. package/dist/components/forms/EpInput.vue.d.ts +5 -5
  81. package/dist/components/forms/EpRadio.vue.d.ts +5 -5
  82. package/dist/components/forms/EpRadioSummative.vue.d.ts +5 -5
  83. package/dist/components/forms/EpSelect.vue.d.ts +36 -4
  84. package/dist/components/forms/EpSwitch.vue.d.ts +5 -5
  85. package/dist/components/forms/EpTextarea.vue.d.ts +17 -5
  86. package/dist/components/forms/EpToggle.vue.d.ts +17 -5
  87. package/dist/components/interactions/EpAccordeon.vue.d.ts +16 -8
  88. package/dist/components/interactions/EpContentSlider.vue.d.ts +22 -3
  89. package/dist/components/interactions/EpDarkmode.vue.d.ts +6 -2
  90. package/dist/components/interactions/EpHotsPot.vue.d.ts +18 -3
  91. package/dist/components/interactions/EpModal.vue.d.ts +5 -5
  92. package/dist/components/interactions/EpQuestion.vue.d.ts +25 -5
  93. package/dist/components/interactions/EpSummativeTable.vue.d.ts +3 -3
  94. package/dist/components/interactions/EpTabs.vue.d.ts +1 -1
  95. package/dist/components/interactions/EpTooltip.vue.d.ts +4 -4
  96. package/dist/components/medias/EpAudio.vue.d.ts +21 -13
  97. package/dist/components/medias/EpCarousel.vue.d.ts +6 -6
  98. package/dist/components/medias/EpIframe.vue.d.ts +5 -4
  99. package/dist/components/medias/EpKatex.vue.d.ts +4 -4
  100. package/dist/components/medias/EpLink.vue.d.ts +5 -5
  101. package/dist/components/medias/EpLinkVersion.vue.d.ts +16 -4
  102. package/dist/components/medias/EpSoftware.vue.d.ts +17 -5
  103. package/dist/components/medias/EpSvg.vue.d.ts +5 -5
  104. package/dist/components/medias/EpTerm.vue.d.ts +32 -8
  105. package/dist/components/medias/EpTimeLine.vue.d.ts +3 -3
  106. package/dist/components/medias/EpVideo.vue.d.ts +17 -9
  107. package/dist/components/medias/EpVideoPanopto.vue.d.ts +5 -5
  108. package/dist/components/medias/EpWordDef.vue.d.ts +38 -3
  109. package/dist/components/signages/EpAlert.vue.d.ts +4 -4
  110. package/dist/components/signages/EpBadge.vue.d.ts +5 -5
  111. package/dist/components/signages/EpHeader.vue.d.ts +21 -5
  112. package/dist/components/signages/EpNothing.vue.d.ts +1 -1
  113. package/dist/components/signages/EpQuote.vue.d.ts +4 -4
  114. package/dist/components/signages/EpSkeleton.vue.d.ts +4 -4
  115. package/dist/components/tools/BgAudio.vue.d.ts +4 -4
  116. package/dist/components/tools/DisplayBox.vue.d.ts +1 -1
  117. package/dist/components/tools/SvgFilter.vue.d.ts +1 -1
  118. package/dist/components/tools/TimelineItem.vue.d.ts +4 -4
  119. package/dist/ep-lib-ts.js +18 -17
  120. package/dist/ep-lib-ts.umd.cjs +55 -48
  121. package/dist/{index-Dl6z_ITi.js → index-BPsMiFm1.js} +3985 -3789
  122. package/dist/{index-M54_P8uC.js → index-DNwUz3uD.js} +2 -2
  123. package/dist/index.d.ts +84 -42
  124. package/dist/{prism-B0q7vMaL.js → prism-DENTMpmV.js} +1 -1
  125. package/dist/style.css +1 -1
  126. package/dist/types/Btn.d.ts +8 -0
  127. package/package.json +2 -2
  128. package/src/components/basics/EpAvatar.vue +1 -1
  129. package/src/components/basics/EpBadge.vue +11 -2
  130. package/src/components/basics/EpBtn.vue +3 -15
  131. package/src/components/basics/EpCard.vue +21 -11
  132. package/src/components/basics/EpChip.vue +1 -2
  133. package/src/components/basics/EpImg.vue +18 -6
  134. package/src/components/basics/EpSection.vue +1 -1
  135. package/src/components/basics/EpTable.vue +5 -5
  136. package/src/components/basics/EpText.vue +10 -2
  137. package/src/components/charts/EpBarChart.vue +11 -3
  138. package/src/components/charts/EpFunnelChart.vue +129 -0
  139. package/src/components/charts/EpLineChart.vue +11 -3
  140. package/src/components/charts/EpPieChart.vue +12 -4
  141. package/src/components/educationals/EpCodeblock.vue +1 -1
  142. package/src/components/educationals/EpEdu.vue +17 -10
  143. package/src/components/educationals/EpReading.vue +45 -27
  144. package/src/components/educationals/EpResource.vue +2 -2
  145. package/src/components/educationals/EpScope.vue +1 -1
  146. package/src/components/forms/EpRadio.vue +1 -1
  147. package/src/components/forms/EpRadioSummative.vue +1 -1
  148. package/src/components/forms/EpSelect.vue +24 -6
  149. package/src/components/forms/EpSwitch.vue +1 -1
  150. package/src/components/forms/EpTextarea.vue +9 -1
  151. package/src/components/forms/EpToggle.vue +9 -1
  152. package/src/components/interactions/EpAccordeon.vue +13 -7
  153. package/src/components/interactions/EpContentSlider.vue +17 -6
  154. package/src/components/interactions/EpDarkmode.vue +25 -14
  155. package/src/components/interactions/EpHotsPot.vue +11 -2
  156. package/src/components/interactions/EpQuestion.vue +17 -5
  157. package/src/components/interactions/EpSummativeTable.vue +1 -1
  158. package/src/components/interactions/EpTabs.vue +1 -1
  159. package/src/components/interactions/EpTooltip.vue +1 -1
  160. package/src/components/medias/EpAudio.vue +17 -11
  161. package/src/components/medias/EpCarousel.vue +2 -2
  162. package/src/components/medias/EpIframe.vue +6 -2
  163. package/src/components/medias/EpKatex.vue +1 -1
  164. package/src/components/medias/EpLink.vue +2 -2
  165. package/src/components/medias/EpLinkVersion.vue +11 -3
  166. package/src/components/medias/EpSoftware.vue +12 -4
  167. package/src/components/medias/EpSvg.vue +2 -2
  168. package/src/components/medias/EpTerm.vue +24 -11
  169. package/src/components/medias/EpTimeLine.vue +2 -2
  170. package/src/components/medias/EpVideo.vue +13 -7
  171. package/src/components/medias/EpVideoPanopto.vue +2 -3
  172. package/src/components/medias/EpWordDef.vue +33 -11
  173. package/src/components/signages/EpAlert.vue +1 -1
  174. package/src/components/signages/EpBadge.vue +1 -1
  175. package/src/components/signages/EpHeader.vue +13 -3
  176. package/src/components/signages/EpSkeleton.vue +2 -2
  177. package/src/components/tools/TimelineItem.vue +1 -1
  178. package/dist/BgAudio-C8bS54bl.js +0 -4
  179. package/dist/DisplayBox-BTPVW9_v.js +0 -4
  180. package/dist/EpAlert-Daji8LsR.js +0 -4
  181. package/dist/EpAudio-Dq7twl4x.js +0 -4
  182. package/dist/EpBadge-DBfMe1r_.js +0 -4
  183. package/dist/EpBarChart-cAlm0rKf.js +0 -4
  184. package/dist/EpBtn-S2VJnt--.js +0 -4
  185. package/dist/EpCard-SvaBmdDK.js +0 -4
  186. package/dist/EpChip-Chn_9bRP.js +0 -4
  187. package/dist/EpContentSlider-Ds2GlrkO.js +0 -4
  188. package/dist/EpDarkmode--_9Qi6HH.js +0 -19
  189. package/dist/EpDivider-Bj4Zya_F.js +0 -4
  190. package/dist/EpEdu-Y7Lkf3Ew.js +0 -4
  191. package/dist/EpFlex-5yWhvYX7.js +0 -4
  192. package/dist/EpHeader-CEQBk1ah.js +0 -4
  193. package/dist/EpHotsPot-NGjKJCc8.js +0 -56
  194. package/dist/EpIcon-CuhZ90Zx.js +0 -4
  195. package/dist/EpIframe-DbPnkezB.js +0 -4
  196. package/dist/EpImg-DJ9gNwhJ.js +0 -4
  197. package/dist/EpLineChart-ALvSFQ-w.js +0 -4
  198. package/dist/EpLink-CQSfQHRj.js +0 -4
  199. package/dist/EpLinkVersion-VIxCHjDt.js +0 -4
  200. package/dist/EpModal-CYy1Iu1T.js +0 -4
  201. package/dist/EpPieChart-Cpxylmzw.js +0 -4
  202. package/dist/EpQuestion-gFjB_YVU.js +0 -4
  203. package/dist/EpQuote-C2WMKC8z.js +0 -4
  204. package/dist/EpRadio-CZu2BYd-.js +0 -4
  205. package/dist/EpRadioSummative-POEEv1YI.js +0 -4
  206. package/dist/EpReading-6LKvPJl5.js +0 -4
  207. package/dist/EpResource-Bqu38I44.js +0 -4
  208. package/dist/EpScope-B04S9t4O.js +0 -4
  209. package/dist/EpSection-B9obOS7v.js +0 -4
  210. package/dist/EpSelect-DLGx5g-U.js +0 -31
  211. package/dist/EpSkeleton-rkvPpE2y.js +0 -4
  212. package/dist/EpSoftware-DmH-rUDN.js +0 -4
  213. package/dist/EpSpinner-7XiNy9LV.js +0 -4
  214. package/dist/EpSummativeTable-JWOA25gE.js +0 -4
  215. package/dist/EpSvg-Dfvodejy.js +0 -4
  216. package/dist/EpTable-C0lD6aED.js +0 -4
  217. package/dist/EpTerm-XGV0Zf2w.js +0 -4
  218. package/dist/EpText-DhHXfEHv.js +0 -4
  219. package/dist/EpTextarea-DyMM95ER.js +0 -41
  220. package/dist/EpTimeLine-CDL7liGh.js +0 -4
  221. package/dist/EpVideo-em0qb_rk.js +0 -4
  222. package/dist/EpVideoPanopto-DAMRV6HD.js +0 -4
  223. package/dist/EpWordDef-bLyQzqx8.js +0 -4
@@ -3,20 +3,26 @@ import { ref, toRefs, onMounted, computed } from "vue";
3
3
  import EpIcon from "../basics/EpIcon.vue";
4
4
  import useColors from "../../composables/useColors";
5
5
  ///types with Capital letters... object with styles same name in lowercase
6
- import { TypeAccordeon, typeAccordeon } from "../../types/Accordeon";
6
+ import { type TypeAccordeon, typeAccordeon } from "../../types/Accordeon";
7
7
  interface Props {
8
- title?: string|null;
9
8
  type?: TypeAccordeon;
10
9
  icon?: string|null;
11
10
  open?: boolean;
12
11
  outlined?:boolean;
12
+ labels?:{
13
+ title?:string|null;
14
+ }
13
15
  }
14
16
 
15
- const props = withDefaults(defineProps<Props>(), {
16
- title: 'En savoir plus',
17
+ const props = withDefaults(defineProps<Props>(), {
17
18
  open: false,
18
19
  type:'base',
19
20
  outlined:false,
21
+ labels:()=>{
22
+ return {
23
+ title:'En savoir plus'
24
+ }
25
+ }
20
26
  });
21
27
 
22
28
 
@@ -35,7 +41,7 @@ const stylesHeader = computed(()=>{
35
41
  })
36
42
 
37
43
  const contentStyles = computed(()=>{
38
- return `px-4 ${useColors('bg', props.type + 'light')}`
44
+ return `px-4 ${useColors('bg', props.type + 'light')} dark:${useColors('bg', props.type + 'dark')}`
39
45
  })
40
46
 
41
47
  onMounted(() => {
@@ -60,13 +66,13 @@ function toggleDivVisibility() {
60
66
  }
61
67
 
62
68
 
63
- const { title, icon } = toRefs(props)
69
+ const {labels, icon } = toRefs(props)
64
70
  </script>
65
71
 
66
72
  <template>
67
73
  <div>
68
74
  <div :class="stylesHeader" @click="toggleDivVisibility">
69
- <h3 class="text-lg flex items-center"><EpIcon v-if="icon" :icon-path="icon" size="28" extraClass="mr-2"></EpIcon>{{ title }}</h3>
75
+ <h3 class="text-lg flex items-center"><EpIcon v-if="icon" :icon-path="icon" size="28" extraClass="mr-2"></EpIcon>{{ labels.title }}</h3>
70
76
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
71
77
  :class="`mx-4 my-3 h-6 w-6 transition-all duration-200 ${showDiv ? 'rotate-45' : ''}`">
72
78
  <path stroke-linecap="round" stroke-linejoin="round" d="M12 6v12m6-6H6" />
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, computed, defineAsyncComponent, toRefs, Suspense } from "vue";
3
- import { SlidesType } from "../../types/Slides"
3
+ import { type SlidesType } from "../../types/Slides"
4
4
  import { useComponent } from "../../composables/useComponent";
5
5
  import { useRenderText } from "../../composables/useRenderText";
6
6
  import { mdiArrowLeft } from "@mdi/js";
@@ -10,19 +10,30 @@ import EpIcon from "../basics/EpIcon.vue";
10
10
 
11
11
  interface Props {
12
12
  slides: SlidesType[];
13
+ labels?:{
14
+ loading?:string,
15
+ noData?:string
16
+ }
13
17
  }
14
18
 
15
- const props = withDefaults(defineProps<Props>(), {})
19
+ const props = withDefaults(defineProps<Props>(), {
20
+ labels:()=>{
21
+ return {
22
+ loading:"...loading",
23
+ noData:"no data"
24
+ }
25
+ }
26
+ })
16
27
 
17
28
 
18
29
  const currentIndex = ref<number>(0)
19
30
 
20
31
  const currentSlide = computed(() => {
21
32
  if (!props.slides) {
22
- return { title: 'no data', img: '', uid: 2, content: "" }
33
+ return { title: props.labels.noData, img: '', uid: 2, content: "", component:null }
23
34
  }
24
35
  if (props.slides.length === 0) {
25
- return { title: 'no data', img: '', uid: 2, content: "" }
36
+ return { title: props.labels.noData, img: '', uid: 2, content: "", component:null }
26
37
  }
27
38
  return props.slides[currentIndex.value]
28
39
  })
@@ -65,7 +76,7 @@ const { slides } = toRefs(props)
65
76
  </script>
66
77
 
67
78
  <template>
68
- <div class="bg-stone-100 p-5 w-full md:h-custom overflow-hidden">
79
+ <div class="bg-stone-100 p-5 w-full md:h-custom overflow-hidden dark:bg-stone-300">
69
80
  <div class="flex justify-between border-b border-black w-auto">
70
81
  <h5 class="text-lg border-b-4 border-black">
71
82
  {{ currentSlide.title }}
@@ -98,7 +109,7 @@ const { slides } = toRefs(props)
98
109
  <component :is="currentSlideMediaContent" v-bind="{ ...currentSlide.component.data }">
99
110
  </component>
100
111
  <template #fallback>
101
- ...loading
112
+ {{ labels.loading }}
102
113
  </template>
103
114
  </Suspense>
104
115
 
@@ -1,18 +1,12 @@
1
- <template>
2
- <button @click="toggleTheme">
3
- <span v-if="userTheme === 'dark'">
4
- ☀️
5
- </span>
6
- <span v-if="userTheme === 'light'">
7
- 🌙
8
- </span>
9
- </button>
10
- </template>
11
-
12
1
  <script setup lang="ts">
13
2
  import { ref, onMounted } from 'vue';
14
3
 
15
- export type UserTheme = 'light' | 'dark';
4
+ type UserTheme = 'light' | 'dark';
5
+
6
+ const emit = defineEmits<{
7
+ (e: "update:userMode", userMode:UserTheme): void;
8
+ }>();
9
+
16
10
 
17
11
  const setTheme = (theme: UserTheme) => {
18
12
  localStorage.setItem('user-theme', theme);
@@ -31,6 +25,7 @@
31
25
  } else {
32
26
  setTheme('light');
33
27
  }
28
+ emit('update:userMode', userTheme.value)
34
29
  };
35
30
 
36
31
  const getMediaPreference = (): UserTheme => {
@@ -42,7 +37,23 @@
42
37
  }
43
38
  };
44
39
 
40
+
41
+
45
42
  const userTheme = ref<UserTheme>(getTheme() || getMediaPreference());
46
43
 
47
- onMounted(() => setTheme(userTheme.value));
48
- </script>
44
+ onMounted(() => {
45
+ setTheme(userTheme.value)
46
+ emit("update:userMode", userTheme.value)
47
+ });
48
+ </script>
49
+
50
+ <template>
51
+ <button @click="toggleTheme">
52
+ <span v-if="userTheme === 'dark'">
53
+ ☀️
54
+ </span>
55
+ <span v-if="userTheme === 'light'">
56
+ 🌙
57
+ </span>
58
+ </button>
59
+ </template>
@@ -14,9 +14,18 @@ interface Props {
14
14
  imageURL:string;
15
15
  title?:string;
16
16
  infoButtons:InfoButton[];
17
+ labels?:{
18
+ fermer?:string;
19
+ }
17
20
  }
18
21
 
19
- const props = withDefaults(defineProps<Props>(), {});
22
+ const props = withDefaults(defineProps<Props>(), {
23
+ labels:()=>{
24
+ return {
25
+ fermer:"Fermer"
26
+ }
27
+ }
28
+ });
20
29
 
21
30
  const { title, imageURL } = toRefs(props)
22
31
 
@@ -67,7 +76,7 @@ const closeModal = () => {
67
76
  <h4>{{ titleDisplay }}</h4>
68
77
  <div v-html="displayContent" class="text-sm"></div>
69
78
  <button @click="closeModal" class="mt-4 bg-primary text-white px-2 py-1 text-sm">
70
- Fermer
79
+ {{labels.fermer}}
71
80
  </button>
72
81
  </div>
73
82
  </div>
@@ -2,8 +2,8 @@
2
2
  import { watch, ref, toRefs, computed, defineAsyncComponent} from "vue";
3
3
  import EpEdu from "../educationals/EpEdu.vue";
4
4
  //types with capital letter, object styles in lowercase
5
- import { MediaVariants } from "../../types/Medias";
6
- import { Answer } from "../../types/Answer";
5
+ import { type MediaVariants } from "../../types/Medias";
6
+ import { type Answer } from "../../types/Answer";
7
7
  import { useRenderText } from "../../composables/useRenderText";
8
8
  import { useComponent } from "../../composables/useComponent"
9
9
  import { mdiHelpCircle } from "@mdi/js";
@@ -26,6 +26,11 @@ interface Props {
26
26
  before?: boolean;
27
27
  numeration?: boolean;
28
28
  src?: string | null;
29
+ labels?:{
30
+ veuillez?:string;
31
+ valider?:string;
32
+ reessayer?:string;
33
+ }
29
34
  }
30
35
 
31
36
  const props = withDefaults(defineProps<Props>(), {
@@ -34,6 +39,13 @@ const props = withDefaults(defineProps<Props>(), {
34
39
  shuffle: false,
35
40
  before: false,
36
41
  numeration: false,
42
+ labels:()=>{
43
+ return {
44
+ veuillez:"Veuillez choisir une réponse",
45
+ valider : "Valider",
46
+ reessayer: "Réessayer"
47
+ }
48
+ }
37
49
  });
38
50
 
39
51
  const renderText = computed(() => {
@@ -148,7 +160,7 @@ const { title, intentions, hideIcon, question, src } = toRefs(props);
148
160
  </li>
149
161
  </ol>
150
162
  <EpAlert type="error" outlined noIcon v-if="!valid">
151
- Veuillez choisir une réponse
163
+ {{labels.veuillez}}
152
164
  </EpAlert>
153
165
  </div>
154
166
 
@@ -168,9 +180,9 @@ const { title, intentions, hideIcon, question, src } = toRefs(props);
168
180
  :disabled="answered"
169
181
  outlined
170
182
  extraClass="mr-2"
171
- >Valider</EpBtn
183
+ >{{labels.valider}}</EpBtn
172
184
  >
173
- <EpBtn :type="type" v-if="answered" @click="reset" outlined>Réessayer</EpBtn>
185
+ <EpBtn :type="type" v-if="answered" @click="reset" outlined>{{labels.reessayer}}</EpBtn>
174
186
  </div>
175
187
  </template>
176
188
  <!-- <template #actions>
@@ -32,7 +32,7 @@ const transformNumber = (value:string|number) => {
32
32
  </script>
33
33
 
34
34
  <template>
35
- <div class="mt-4 bg-gray-50 p-4">
35
+ <div class="mt-4 bg-gray-50 p-4 dark:bg-gray-300">
36
36
  <h4 v-if="title" class="text-xl font-semibold mb-6">{{ title }}</h4>
37
37
  <template v-for="(question,i) in questions" :key="`item-question-${i}`">
38
38
  <p class=" text-gray-600 py-2 rounded">{{question.label}}</p>
@@ -4,7 +4,7 @@
4
4
  </script>
5
5
 
6
6
  <template>
7
- <div class="p-12 bg-warning-light w-[50%] mx-auto border-2 border-warning">
7
+ <div class="p-12 bg-warning-light w-[50%] mx-auto border-2 border-warning dark:bg-warning">
8
8
  <p class="text-center text-error font-bold uppercase">In progress</p>
9
9
  </div>
10
10
  </template>
@@ -2,7 +2,7 @@
2
2
  <script setup lang="ts">
3
3
 
4
4
  import { computed } from "vue";
5
- import { TypeTooltip, typeTooltip } from "../../types/Tooltip"; //"../../types/Tooltip";
5
+ import { type TypeTooltip, typeTooltip } from "../../types/Tooltip"; //"../../types/Tooltip";
6
6
 
7
7
  type Place = "top_start"|"top"|"top_end"|"bottom_start"|"bottom"|"bottom_end"|"left_start"|"left"|"left_end"|"right_start" | "right"|"right_end";
8
8
  type Mode = "light"|"dark";
@@ -2,8 +2,8 @@
2
2
  //https://github.com/snfas/protheus/commit/50ec10efc3b5537228edf436ee7ba8f540113485#diff-f4418614aaa0b05457cb0a6ffc674273b35a77cd5481113318603f0524467150
3
3
  import { computed, toRefs } from 'vue'
4
4
  //types with capital letter, object styles in lowercase
5
- import { MediaVariants } from "../../types/Medias";
6
- import { MandateLevel } from '../../types/MandateLevel';
5
+ import { type MediaVariants } from "../../types/Medias";
6
+ import { type MandateLevel } from '../../types/MandateLevel';
7
7
  import { isHtml } from '../../composables/isHtml';
8
8
  import { useMarkdown } from '../../composables/useMarkdown'
9
9
  import { mdiHeadphones } from "@mdi/js";
@@ -17,19 +17,25 @@ interface Props {
17
17
  src: string;
18
18
  title?: string;
19
19
  intentions?: string;
20
- credits?: string;
21
- labelIntentions?: string;
22
- type?: MediaVariants;
23
- messageError?: string
20
+ credits?: string;
21
+ type?: MediaVariants;
24
22
  hideIcon?: boolean;
25
23
  mandateLevel?:string | MandateLevel | null;
24
+ labels?:{
25
+ intentions?: string;
26
+ messageError?:string;
27
+ }
26
28
  }
27
29
 
28
- const props = withDefaults(defineProps<Props>(), {
29
- labelIntentions: "Intentions d'écoute",
30
+ const props = withDefaults(defineProps<Props>(), {
30
31
  type: 'base',
31
- messageError: "Mauvais url",
32
- hideIcon: false
32
+ hideIcon: false,
33
+ labels:()=>{
34
+ return {
35
+ intentions: "Intentions d'écoute",
36
+ messageError:"Mauvais url"
37
+ }
38
+ }
33
39
  })
34
40
 
35
41
  //regex url panopto udem
@@ -84,7 +90,7 @@ const { src, title, hideIcon, mandateLevel } = toRefs(props)
84
90
  <BgAudio :fill="bgColor"></BgAudio>
85
91
  <audio v-if="isAudioFormat" ref="video" controls :src="cleanSrc" controlsList="nodownload"></audio>
86
92
  <EpAlert type="error" outlined v-else>
87
- <p>{{ messageError }}</p>
93
+ <p>{{ labels.messageError }}</p>
88
94
  </EpAlert>
89
95
  </div>
90
96
  </template>
@@ -2,8 +2,8 @@
2
2
  import { toRefs, ref } from "vue";
3
3
  import { mdiChevronLeftCircleOutline } from "@mdi/js";
4
4
  import { mdiChevronRightCircleOutline } from "@mdi/js";
5
- import { MediaCarousel } from "../../types/MediaCarousel";
6
- import { SizeThumbnail } from "../../types/Image";
5
+ import { type MediaCarousel } from "../../types/MediaCarousel";
6
+ import { type SizeThumbnail } from "../../types/Image";
7
7
  import EpIcon from "../basics/EpIcon.vue";
8
8
  import EpBtn from "../basics/EpBtn.vue";
9
9
  import EpModal from "../interactions/EpModal.vue";
@@ -2,7 +2,7 @@
2
2
  import { toRefs, computed } from "vue";
3
3
  import EpEdu from "../educationals/EpEdu.vue";
4
4
  //types with capital letter, object styles in lowercase
5
- import { MediaVariants } from "../../types/Medias";
5
+ import { type MediaVariants } from "../../types/Medias";
6
6
  import { isHtml } from '../../composables/isHtml';
7
7
  import {useMarkdown} from '../../composables/useMarkdown'
8
8
  import { mdiApplicationBrackets } from "@mdi/js";
@@ -13,7 +13,8 @@ interface Props {
13
13
  intentions?: string;
14
14
  hideIcon?:boolean;
15
15
  type?:MediaVariants;
16
- mandateLevel?:string|null
16
+ mandateLevel?:string|null;
17
+ customHeight?:number;
17
18
  }
18
19
 
19
20
  const props = withDefaults(defineProps<Props>(), {
@@ -34,6 +35,9 @@ const renderText = computed(()=>{
34
35
  })
35
36
 
36
37
  const height = computed(() => {
38
+ if(props.customHeight){
39
+ return props.customHeight
40
+ }
37
41
  return props.big ? "1000" : "520";
38
42
  });
39
43
 
@@ -3,7 +3,7 @@ import { onMounted, ref, computed, toRefs } from "vue";
3
3
  import katex from "katex";
4
4
  import EpEdu from "../educationals/EpEdu.vue";
5
5
  import { mdiFunctionVariant } from "@mdi/js";
6
- import { MediaVariants } from "../../types/Medias";
6
+ import { type MediaVariants } from "../../types/Medias";
7
7
  import { isHtml } from "../../composables/isHtml";
8
8
  import { useMarkdown } from "../../composables/useMarkdown";
9
9
 
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, toRefs } from "vue";
3
3
  //types with capital letter, object styles in lowercase
4
- import { MediaVariants } from "../../types/Medias";
5
- import { MandateLevel } from "../../types/MandateLevel";
4
+ import { type MediaVariants } from "../../types/Medias";
5
+ import { type MandateLevel } from "../../types/MandateLevel";
6
6
  import EpBtn from "../basics/EpBtn.vue";
7
7
  import { mdiLinkVariant } from "@mdi/js";
8
8
  import EpEdu from "../educationals/EpEdu.vue";
@@ -15,11 +15,19 @@ interface Link {
15
15
  interface Props{
16
16
  type:TypeLink;
17
17
  link:Link;
18
- big?:boolean
18
+ big?:boolean;
19
+ labels?:{
20
+ noData?:string;
21
+ }
19
22
  }
20
23
 
21
24
  const props = withDefaults(defineProps<Props>(),{
22
- big:false
25
+ big:false,
26
+ labels:()=>{
27
+ return {
28
+ noData:"no data"
29
+ }
30
+ }
23
31
  })
24
32
 
25
33
  const {type, link, big} = toRefs(props)
@@ -34,6 +42,6 @@ const {type, link, big} = toRefs(props)
34
42
  <EpIframe :title="link.title" :src="link.url" :big="big"></EpIframe>
35
43
  </div>
36
44
  <div v-else>
37
- no data
45
+ {{labels.noData}}
38
46
  </div>
39
47
  </template>
@@ -4,8 +4,8 @@ import EpIcon from "../basics/EpIcon.vue";
4
4
  import EpBtn from "../basics/EpBtn.vue";
5
5
  import EpChip from "../basics/EpChip.vue";
6
6
  import EpEdu from "../educationals/EpEdu.vue";
7
- import { MediaVariants } from "../../types/Medias";
8
- import { MandateLevel } from '../../types/MandateLevel';
7
+ import { type MediaVariants } from "../../types/Medias";
8
+ import { type MandateLevel } from '../../types/MandateLevel';
9
9
  import { useRenderText } from "../../composables/useRenderText";
10
10
 
11
11
  import { mdiLaptop } from "@mdi/js";
@@ -23,6 +23,9 @@ interface Props {
23
23
  type?:MediaVariants;
24
24
  hideIcon?:boolean;
25
25
  labelCard?:string;
26
+ labels?:{
27
+ acceder?:string;
28
+ }
26
29
  }
27
30
 
28
31
  // type, taxonomyLevel, courseCode, courseTitle, title, subtitle, height, src, color, synchrone
@@ -34,6 +37,11 @@ const props = withDefaults(defineProps<Props>(), {
34
37
  cover:"",
35
38
  type:"base",
36
39
  hideIcon:false,
40
+ labels:()=>{
41
+ return {
42
+ acceder:"[Accéder au logiciel]"
43
+ }
44
+ }
37
45
  });
38
46
 
39
47
  const old_image = "https://live.staticflickr.com/4868/45940268562_c5f7fdd06b_q.jpg";
@@ -56,7 +64,7 @@ const { title, intentions, cover, hideCover, version, labelCard, hideIcon, manda
56
64
  </template>
57
65
  <template #content>
58
66
  <div
59
- class="flex flex-col items-center border rounded-lg bg-neutral-100 md:flex-row mt-2"
67
+ class="flex flex-col items-center border rounded-lg bg-neutral-100 md:flex-row mt-2 dark:bg-neutral-200"
60
68
  >
61
69
  <template v-if="!hideCover">
62
70
  <img
@@ -77,7 +85,7 @@ const { title, intentions, cover, hideCover, version, labelCard, hideIcon, manda
77
85
  <div class="flex justify-between items-center rounded-t-md p-2">
78
86
  <h4>{{ title }} <EpChip size="small" type="base" v-if="version">{{version}}</EpChip></h4>
79
87
  <EpBtn v-if="url" rounded type="base" :prependIcon="mdiOpenInNew" :href="url"
80
- >[Accéder au logiciel]</EpBtn
88
+ >{{labels.acceder}}</EpBtn
81
89
  >
82
90
  </div>
83
91
  </div>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { toRefs, computed } from 'vue';
3
- import { MediaVariants } from "../../types/Medias";
4
- import { MandateLevel } from '../../types/MandateLevel';
3
+ import { type MediaVariants } from "../../types/Medias";
4
+ import { type MandateLevel } from '../../types/MandateLevel';
5
5
  import { useRenderText } from "../../composables/useRenderText";
6
6
  import { mdiImage } from '@mdi/js';
7
7
  import EpEdu from '../educationals/EpEdu.vue';
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, toRefs, computed} from "vue";
3
- import { useRenderText } from "../../composables/useRenderText";
4
3
  import { useRouter } from "vue-router";
5
4
  import { mdiBookmarkMultipleOutline } from "@mdi/js";
6
5
  import EpImg from "../basics/EpImg.vue";
@@ -19,8 +18,14 @@ interface Props {
19
18
  graminfo?: string;
20
19
  relations?: string;
21
20
  //idrelation?: string;
22
- labelClose?: string;
23
21
  src?:string;
22
+ labels?:{
23
+ definition?: string;
24
+ domaine?:string;
25
+ variations?: string;
26
+ relations?: string;
27
+ close?:string;
28
+ }
24
29
  }
25
30
 
26
31
  const props = withDefaults(defineProps<Props>(), {
@@ -28,7 +33,15 @@ const props = withDefaults(defineProps<Props>(), {
28
33
  variations: "",
29
34
  relations: "",
30
35
  idrelation: "",
31
- labelClose: "Fermer",
36
+ labels:()=>{
37
+ return {
38
+ definition: "Définition",
39
+ domaine:"Domaine",
40
+ variations: "Variations",
41
+ relations: "Relations",
42
+ close:"Fermer"
43
+ }
44
+ }
32
45
  });
33
46
 
34
47
  const show = ref(false);
@@ -94,16 +107,16 @@ const el = (contentref:any) => {
94
107
  contentref.innerHTML = renderHtml
95
108
  }*/
96
109
 
97
- const { term, graminfo, labelClose, src } = toRefs(props);
110
+ const { term, graminfo,labels,src } = toRefs(props);
98
111
  </script>
99
112
 
100
113
  <template>
101
114
  <span
102
115
  @click="toggleModal"
103
- class="cursor-pointer border-primary border text-primary px-2 py-1 rounded group overflow-hidden relative"
116
+ class="cursor-pointer border-primary dark:border-primary-light border dark:text-primary-light text-primary px-2 py-1 rounded group overflow-hidden relative"
104
117
  >
105
118
  <span
106
- class="absolute top-0 left-0 flex w-full h-0 mb-0 transition-all duration-300 ease-out transform translate-y-0 bg-primary group-hover:h-full opacity-90"
119
+ class="absolute top-0 left-0 flex w-full h-0 mb-0 transition-all duration-300 ease-out transform translate-y-0 bg-primary dark:bg-primary-ligth group-hover:h-full opacity-90"
107
120
  ></span>
108
121
  <span class="relative group-hover:text-primary-light"
109
122
  >{{ word }}
@@ -128,9 +141,9 @@ const { term, graminfo, labelClose, src } = toRefs(props);
128
141
  </div>
129
142
  <EpDivider color="primary" margin="mb-2"></EpDivider>
130
143
  <div class="mb-4 flex items-center justify-between">
131
- <h3 class="text-primary font-bold">Définition</h3>
144
+ <h3 class="text-primary font-bold">{{labels.definition}}</h3>
132
145
  <span class="text-xs" v-if="renderDomain"
133
- >Domaine : <span class="font-bold">{{ renderDomain }}</span></span
146
+ >{{labels.domaine}} : <span class="font-bold">{{ renderDomain }}</span></span
134
147
  >
135
148
  </div>
136
149
  <!-- <div v-html="renderText"></div> -->
@@ -141,13 +154,13 @@ const { term, graminfo, labelClose, src } = toRefs(props);
141
154
 
142
155
  <EpDivider v-if="renderVariations || renderRelations"></EpDivider>
143
156
  <div class="text-sm mt-2" v-if="renderVariations">
144
- <span class="mr-2 font-bold">Variations :</span>
157
+ <span class="mr-2 font-bold">{{labels.variations}} :</span>
145
158
  <span v-for="(variation, i) in renderVariations" :key="`variation-${i}`">
146
159
  {{ variation }}{{ renderVariations.length > i + 1 ? ", " : "." }}
147
160
  </span>
148
161
  </div>
149
162
  <div class="text-sm mt-2" v-if="renderRelations">
150
- <span class="mr-2 font-bold">Relations :</span>
163
+ <span class="mr-2 font-bold">{{labels.relations}} :</span>
151
164
  <template v-for="(relation, i) in renderRelations"
152
165
  :key="`relation-${i}`">
153
166
  <EpBtn
@@ -161,7 +174,7 @@ const { term, graminfo, labelClose, src } = toRefs(props);
161
174
  </div>
162
175
  <div class="flex justify-end">
163
176
  <EpBtn type="error" outlined @click="show = false" rounded>{{
164
- labelClose
177
+ labels.close
165
178
  }}</EpBtn>
166
179
  </div>
167
180
  </EpModal>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, toRefs, onMounted, computed } from 'vue';
3
3
  //types in capital letter
4
- import { TagTimeLine, HeadTimeLine, EventTimeLine, ColorsTags, colorsTimeLine } from '../../types/TimeLine'
4
+ import { type TagTimeLine, type HeadTimeLine, type EventTimeLine, type ColorsTags, colorsTimeLine } from '../../types/TimeLine'
5
5
  import TimeLineItem from '../tools/TimelineItem.vue'
6
6
  import EpIcon from '../basics/EpIcon.vue';
7
7
  import { mdiCheckboxBlankCircleOutline } from '@mdi/js';
@@ -72,7 +72,7 @@ const { title } = toRefs(props)
72
72
  <template>
73
73
  <!-- component -->
74
74
  <div>
75
- <div class="w-10/12 mx-auto relative">
75
+ <div class="w-10/12 mx-auto relative dark:bg-gray-300">
76
76
  <h3 class="text-2xl mb-2">{{ title?.text.headline }}</h3>
77
77
  <p>{{ title?.text.text}}</p>
78
78
  <div class="my-4 px-2">
@@ -15,16 +15,22 @@ interface Props{
15
15
  title?:string;
16
16
  intentions?:string;
17
17
  credits?:string;
18
- mandateLevel?:string | MandateLevel | null;
19
- labelIntentions?:string;
18
+ mandateLevel?:string | MandateLevel | null;
20
19
  type?:MediaVariants;
21
20
  hideIcon?:boolean;
21
+ labels?:{
22
+ intentions?:string;
23
+ }
22
24
  }
23
25
 
24
26
  const props = withDefaults(defineProps<Props>(),{
25
- labelIntentions:"Intentions d'écoute",
26
27
  type:'base',
27
28
  hideIcon:false,
29
+ labels:()=>{
30
+ return {
31
+ intentions:"Intentions d'écoute",
32
+ }
33
+ }
28
34
  })
29
35
 
30
36
  //only to make custum video player
@@ -56,13 +62,13 @@ const videoURL = computed(()=> {
56
62
  })
57
63
 
58
64
  const renderText = computed(()=>{
59
- if(!props.intentions){
65
+ if(!props.labels.intentions){
60
66
  return null
61
67
  }
62
- if(!isHtml(props.intentions)){
63
- return useMarkdown(props.intentions)
68
+ if(!isHtml(props.labels.intentions)){
69
+ return useMarkdown(props.labels.intentions)
64
70
  }
65
- return props.intentions
71
+ return props.labels.intentions
66
72
  })
67
73
 
68
74
  const getIdYoutube = (url:string):string|null => {