ep-lib-ts 0.0.8 → 0.0.9

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 (137) hide show
  1. package/dist/components/basics/EpBadge.vue.d.ts +38 -4
  2. package/dist/components/basics/EpBtn.vue.d.ts +108 -4
  3. package/dist/components/basics/EpCard.vue.d.ts +95 -4
  4. package/dist/components/basics/EpChip.vue.d.ts +72 -4
  5. package/dist/components/basics/EpDivider.vue.d.ts +51 -4
  6. package/dist/components/basics/EpFlex.vue.d.ts +9 -4
  7. package/dist/components/basics/EpIcon.vue.d.ts +37 -4
  8. package/dist/components/basics/EpImg.vue.d.ts +76 -4
  9. package/dist/components/basics/EpSection.vue.d.ts +84 -4
  10. package/dist/components/basics/EpSpinner.vue.d.ts +32 -4
  11. package/dist/components/basics/EpTable.vue.d.ts +24 -4
  12. package/dist/components/basics/EpText.vue.d.ts +30 -4
  13. package/dist/components/charts/EpBarChart.vue.d.ts +82 -4
  14. package/dist/components/charts/EpLineChart.vue.d.ts +82 -4
  15. package/dist/components/charts/EpPieChart.vue.d.ts +1 -2
  16. package/dist/components/educationals/EpEdu.vue.d.ts +80 -4
  17. package/dist/components/educationals/EpReading.vue.d.ts +151 -4
  18. package/dist/components/educationals/EpScope.vue.d.ts +14 -4
  19. package/dist/components/interactions/EpAccordeon.vue.d.ts +53 -4
  20. package/dist/components/interactions/EpContentSlider.vue.d.ts +2 -5
  21. package/dist/components/interactions/EpModal.vue.d.ts +70 -5
  22. package/dist/components/interactions/EpQuestion.vue.d.ts +1 -2
  23. package/dist/components/interactions/EpTabs.vue.d.ts +2 -0
  24. package/dist/components/medias/EpAudio.vue.d.ts +79 -4
  25. package/dist/components/medias/EpCarousel.vue.d.ts +31 -4
  26. package/dist/components/medias/EpIframe.vue.d.ts +58 -4
  27. package/dist/components/medias/EpKatex.vue.d.ts +51 -4
  28. package/dist/components/medias/EpLink.vue.d.ts +73 -4
  29. package/dist/components/medias/EpSoftware.vue.d.ts +88 -4
  30. package/dist/components/medias/EpSvg.vue.d.ts +1 -2
  31. package/dist/components/medias/EpTerm.vue.d.ts +80 -4
  32. package/dist/components/medias/EpTimeLine.vue.d.ts +1 -2
  33. package/dist/components/medias/EpVideo.vue.d.ts +64 -4
  34. package/dist/components/medias/EpVideoPanopto.vue.d.ts +64 -4
  35. package/dist/components/signages/EpAlert.vue.d.ts +63 -4
  36. package/dist/components/signages/EpHeader.vue.d.ts +101 -4
  37. package/dist/components/signages/EpQuote.vue.d.ts +39 -4
  38. package/dist/components/tools/BgAudio.vue.d.ts +14 -4
  39. package/dist/components/tools/DisplayBox.vue.d.ts +17 -4
  40. package/dist/ep-lib-ts.js +27411 -0
  41. package/dist/ep-lib-ts.umd.cjs +1005 -0
  42. package/dist/index.d.ts +37 -1
  43. package/dist/{ep-lib-ts.css → style.css} +1 -1
  44. package/package.json +25 -23
  45. package/src/components/basics/EpBadge.vue +48 -0
  46. package/src/components/basics/EpBtn.vue +100 -0
  47. package/src/components/basics/EpCard.vue +95 -0
  48. package/src/components/basics/EpChip.vue +81 -0
  49. package/src/components/basics/EpDivider.vue +40 -0
  50. package/src/components/basics/EpFlex.vue +42 -0
  51. package/src/components/basics/EpIcon.vue +25 -0
  52. package/src/components/basics/EpImg.vue +59 -0
  53. package/src/components/basics/EpSection.vue +238 -0
  54. package/src/components/basics/EpSpinner.vue +47 -0
  55. package/src/components/basics/EpTable.vue +33 -0
  56. package/src/components/basics/EpText.vue +85 -0
  57. package/src/components/charts/EpBarChart.vue +82 -0
  58. package/src/components/charts/EpLineChart.vue +92 -0
  59. package/src/components/charts/EpPieChart.vue +8 -0
  60. package/src/components/educationals/EpEdu.vue +93 -0
  61. package/src/components/educationals/EpReading.vue +234 -0
  62. package/src/components/educationals/EpScope.vue +25 -0
  63. package/src/components/forms/EpCheckbox.vue +49 -0
  64. package/src/components/forms/EpInput.vue +178 -0
  65. package/src/components/forms/EpRadio.vue +72 -0
  66. package/src/components/forms/EpSelect.vue +145 -0
  67. package/src/components/forms/EpSwitch.vue +58 -0
  68. package/src/components/forms/EpTextarea.vue +79 -0
  69. package/src/components/forms/EpToggle.vue +97 -0
  70. package/src/components/interactions/EpAccordeon.vue +88 -0
  71. package/src/components/interactions/EpContentSlider.vue +12 -0
  72. package/src/components/interactions/EpModal.vue +117 -0
  73. package/src/components/interactions/EpQuestion.vue +8 -0
  74. package/src/components/interactions/EpTabs.vue +10 -0
  75. package/src/components/medias/EpAudio.vue +83 -0
  76. package/src/components/medias/EpCarousel.vue +84 -0
  77. package/src/components/medias/EpIframe.vue +57 -0
  78. package/src/components/medias/EpKatex.vue +75 -0
  79. package/src/components/medias/EpLink.vue +62 -0
  80. package/src/components/medias/EpSoftware.vue +89 -0
  81. package/src/components/medias/EpSvg.vue +8 -0
  82. package/src/components/medias/EpTerm.vue +145 -0
  83. package/src/components/medias/EpTimeLine.vue +8 -0
  84. package/src/components/medias/EpVideo.vue +77 -0
  85. package/src/components/medias/EpVideoPanopto.vue +62 -0
  86. package/src/components/signages/EpAlert.vue +70 -0
  87. package/src/components/signages/EpHeader.vue +223 -0
  88. package/src/components/signages/EpQuote.vue +48 -0
  89. package/src/components/tools/BgAudio.vue +51 -0
  90. package/src/components/tools/DisplayBox.vue +37 -0
  91. package/dist/components/basics/EpBadge.vue.d.ts.map +0 -1
  92. package/dist/components/basics/EpBtn.vue.d.ts.map +0 -1
  93. package/dist/components/basics/EpCard.vue.d.ts.map +0 -1
  94. package/dist/components/basics/EpChip.vue.d.ts.map +0 -1
  95. package/dist/components/basics/EpDivider.vue.d.ts.map +0 -1
  96. package/dist/components/basics/EpFlex.vue.d.ts.map +0 -1
  97. package/dist/components/basics/EpIcon.vue.d.ts.map +0 -1
  98. package/dist/components/basics/EpImg.vue.d.ts.map +0 -1
  99. package/dist/components/basics/EpSection.vue.d.ts.map +0 -1
  100. package/dist/components/basics/EpSpinner.vue.d.ts.map +0 -1
  101. package/dist/components/basics/EpTable.vue.d.ts.map +0 -1
  102. package/dist/components/basics/EpText.vue.d.ts.map +0 -1
  103. package/dist/components/charts/EpBarChart.vue.d.ts.map +0 -1
  104. package/dist/components/charts/EpLineChart.vue.d.ts.map +0 -1
  105. package/dist/components/charts/EpPieChart.vue.d.ts.map +0 -1
  106. package/dist/components/educationals/EpEdu.vue.d.ts.map +0 -1
  107. package/dist/components/educationals/EpReading.vue.d.ts.map +0 -1
  108. package/dist/components/educationals/EpScope.vue.d.ts.map +0 -1
  109. package/dist/components/index.d.ts +0 -38
  110. package/dist/components/interactions/EpAccordeon.vue.d.ts.map +0 -1
  111. package/dist/components/interactions/EpContentSlider.vue.d.ts.map +0 -1
  112. package/dist/components/interactions/EpModal.vue.d.ts.map +0 -1
  113. package/dist/components/interactions/EpQuestion.vue.d.ts.map +0 -1
  114. package/dist/components/main.d.ts +0 -7
  115. package/dist/components/medias/EpAudio.vue.d.ts.map +0 -1
  116. package/dist/components/medias/EpCarousel.vue.d.ts.map +0 -1
  117. package/dist/components/medias/EpIframe.vue.d.ts.map +0 -1
  118. package/dist/components/medias/EpKatex.vue.d.ts.map +0 -1
  119. package/dist/components/medias/EpLink.vue.d.ts.map +0 -1
  120. package/dist/components/medias/EpLinkVersion.vue.d.ts +0 -3
  121. package/dist/components/medias/EpLinkVersion.vue.d.ts.map +0 -1
  122. package/dist/components/medias/EpResource.vue.d.ts +0 -3
  123. package/dist/components/medias/EpResource.vue.d.ts.map +0 -1
  124. package/dist/components/medias/EpSoftware.vue.d.ts.map +0 -1
  125. package/dist/components/medias/EpSvg.vue.d.ts.map +0 -1
  126. package/dist/components/medias/EpTerm.vue.d.ts.map +0 -1
  127. package/dist/components/medias/EpTimeLine.vue.d.ts.map +0 -1
  128. package/dist/components/medias/EpVideo.vue.d.ts.map +0 -1
  129. package/dist/components/medias/EpVideoPanopto.vue.d.ts.map +0 -1
  130. package/dist/components/signages/EpAlert.vue.d.ts.map +0 -1
  131. package/dist/components/signages/EpHeader.vue.d.ts.map +0 -1
  132. package/dist/components/signages/EpQuote.vue.d.ts.map +0 -1
  133. package/dist/components/tools/BgAudio.vue.d.ts.map +0 -1
  134. package/dist/components/tools/DisplayBox.vue.d.ts.map +0 -1
  135. package/dist/ep-lib-ts.cjs.js +0 -984
  136. package/dist/ep-lib-ts.es.js +0 -22617
  137. package/dist/ep-lib-ts.umd.js +0 -985
@@ -0,0 +1,238 @@
1
+ <script setup lang="ts">
2
+ import { toRefs } from "vue";
3
+ // import EpCard from "../basics/EpCard.vue";
4
+ // import EpDivider from "../basics/EpDivider.vue";
5
+ // import EpIcon from "../basics/EpIcon.vue";
6
+
7
+ // import EpChip from "../basics/EpChip.vue";
8
+ // import useColors from "../../composables/useColors";
9
+ // import { mdiHome } from "@mdi/js";
10
+ // import { mdiCast } from "@mdi/js";
11
+ // import { mdiTimerOutline } from "@mdi/js";
12
+ // import { mdiChairSchool } from "@mdi/js";
13
+
14
+ interface Props {
15
+ title?: string | null;
16
+ subtitle?: string | null;
17
+ prependIcon?: string | null;
18
+ iconSize?: string | number;
19
+ color?: string | null;
20
+ taxonomyLevel?: string | null;
21
+ courseCode?: string | null;
22
+ courseTitle?: string | null;
23
+ height?: string | null;
24
+ src?: string | null;
25
+ synchrone?: boolean;
26
+ }
27
+
28
+ // type, taxonomyLevel, courseCode, courseTitle, title, subtitle, height, src, color, synchrone
29
+
30
+ const props = withDefaults(defineProps<Props>(), {
31
+ title: null,
32
+ icon: null,
33
+ color: null,
34
+ });
35
+
36
+ const { title, icon, color, src } = toRefs(props);
37
+ </script>
38
+
39
+ <template>
40
+ <!-- <EpChip color="secondary" :prependIcon="mdiChairSchool">Formatif</EpChip> -->
41
+
42
+ <section class="EpSection">
43
+ <div class="relative items-center w-full">
44
+ <div class="w-full mx-auto text-left">
45
+ <div class="relative flex-col items-center m-auto align-middle">
46
+ <div class="gap-12 text-left lg:gap-24">
47
+ <div class="order-first block w-full mt-12 lg:mt-0">
48
+ <img class="object-cover object-center w-full mx-auto bg-gray-300 border lg:ml-auto" alt="hero" :src="src"
49
+ v-if="src" />
50
+ </div>
51
+ <div class="flex flex-col space-y-20 lg:mt-0">
52
+ <div class="border-b">
53
+ <div>
54
+ <p class="text-2xl font-medium tracking-tight text-black sm:text-4xl">
55
+ {{ title }}
56
+ </p>
57
+ <p class="">
58
+ {{ subtitle }}
59
+ </p>
60
+ </div>
61
+ </div>
62
+ <div class="lg:max-w-7xl">
63
+ <slot></slot>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </section>
71
+
72
+ <!-- <section class="h-screen flex flex-col justify-end">
73
+ <div
74
+ class="w-full h-full bg-cover bg-center"
75
+ :style="{ backgroundImage: 'url(' + src + ')' }"
76
+ >
77
+ <div class="flex flex-col max-w-1/2 absolute bottom-0 bg-neutral-50 opacity-95 left-0 p-6">
78
+ <div class="flex flex-row">
79
+ <EpIcon
80
+ v-if="prependIcon"
81
+ :iconPath="prependIcon"
82
+ :size="iconSize"
83
+ extraClass="mr-2"
84
+ ></EpIcon>
85
+ <h2 class="text-4xl font-bold ml-2">{{ title }}</h2>
86
+ </div>
87
+ <p class="text-base tracking-tight">{{ subtitle }}</p>
88
+ <slot></slot>
89
+ </div>
90
+ <div class="flex justify-end absolute bottom-0 right-0 p-2">
91
+ <div class="bg-white text-gray-700 rounded-full py-1 px-2">
92
+ <span>chip</span>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </section> -->
97
+
98
+ <!-- <section class="h-screen flex flex-col">
99
+ <div
100
+ class="w-full h-full bg-cover bg-center justify-end"
101
+ :style="{ backgroundImage: 'url(' + src + ')' }"
102
+ >
103
+ <div class="flex flex-col container justify-end" >
104
+ <div class="flex flex-row">
105
+ <EpIcon
106
+ v-if="prependIcon"
107
+ :iconPath="prependIcon"
108
+ :size="iconSize"
109
+ extraClass="mr-2"
110
+ ></EpIcon>
111
+ <h2 class="text-4xl font-bold ml-2">{{ title }}</h2>
112
+ </div>
113
+ <p class="text-base tracking-tight">{{ subtitle }}</p>
114
+ </div>
115
+ <div class="flex justify-end p-2">
116
+ <div class="bg-white text-gray-700 rounded-full py-1 px-2">
117
+ <span>bla</span>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </section> -->
122
+ <!-- <section>
123
+ <div
124
+ class="flex flex-col justify-center flex-1 px-8 py-8 lg:py-36 md:px-12 lg:flex-none lg:px-24"
125
+ >
126
+ <div>
127
+ <div class="items-center gap-12">
128
+ <div class="">
129
+ <div>
130
+ <p class="text-5xl tracking-tighter text-black">
131
+ Titre
132
+ </p>
133
+ </div>
134
+ <div
135
+ class="flex items-center justify-center w-full pt-8 mx-auto md:pt-6"
136
+ >
137
+ <slot></slot>
138
+ </div>
139
+ </div>
140
+ </div>
141
+ </div>
142
+ </div>
143
+ </section> -->
144
+
145
+ <!-- model 1 -->
146
+ <!-- <section class="object-top overflow-hidden bg-gray-100 bg-cover">
147
+ <div>
148
+ <div class="px-4 py-12 sm:px-6 lg:py-16 lg:px-8">
149
+ <div class="px-6 py-6 bg-white rounded-3xl md:py-12 md:px-12 lg:px-16">
150
+ <div class="">
151
+ <p class="text-5xl tracking-tighter text-black">
152
+ I am a short heading, not so short
153
+ </p>
154
+ <p class="max-w-3xl mt-3 text-lg leading-6 text-gray-500">
155
+ Sign up for our newsletter to stay up to date.
156
+ </p>
157
+ </div>
158
+ <slot></slot>
159
+ </div>
160
+ </div>
161
+ </div>
162
+ </section> -->
163
+
164
+ <!-- model 2 -->
165
+ <!-- <div class="flex min-h-screen bg-white">
166
+ <div
167
+ class="flex flex-col justify-center flex-1 px-4 py-8 sm:px-6 lg:flex-none lg:px-24"
168
+ >
169
+ <div class="w-full mx-auto lg:max-w-6xl">
170
+ <div class="max-w-xl lg:p-10">
171
+ <div>
172
+ <p
173
+ class="text-2xl font-medium tracking-tight text-black sm:text-4xl"
174
+ >
175
+ I am a short heading
176
+ </p>
177
+ <p class="max-w-xl mt-4 text-base tracking-tight text-gray-600">
178
+ Use this paragraph to share information about your company or
179
+ products. Make it engaging and interesting, and showcase your
180
+ brand's personality. Thanks for visiting our website!
181
+ </p>
182
+ </div>
183
+ <div class="flex gap-3 mt-10">
184
+ <a
185
+ class="inline-flex items-center justify-center w-full px-6 py-2.5 text-center text-white duration-200 bg-black border-2 border-black rounded-full hover:bg-transparent hover:border-black hover:text-black focus:outline-none lg:w-auto"
186
+ href="#"
187
+ >
188
+ <svg
189
+ xmlns="http://www.w3.org/2000/svg"
190
+ fill="currentColor"
191
+ class="w-6 h-6"
192
+ viewBox="0 0 512 512"
193
+ >
194
+ <path
195
+ d="M99.617 8.057a50.191 50.191 0 00-38.815-6.713l230.932 230.933 74.846-74.846L99.617 8.057zM32.139 20.116c-6.441 8.563-10.148 19.077-10.148 30.199v411.358c0 11.123 3.708 21.636 10.148 30.199l235.877-235.877L32.139 20.116zM464.261 212.087l-67.266-37.637-81.544 81.544 81.548 81.548 67.273-37.64c16.117-9.03 25.738-25.442 25.738-43.908s-9.621-34.877-25.749-43.907zM291.733 279.711L60.815 510.629c3.786.891 7.639 1.371 11.492 1.371a50.275 50.275 0 0027.31-8.07l266.965-149.372-74.849-74.847z"
196
+ ></path>
197
+ </svg>
198
+ <span class="flex flex-col items-start ml-4 leading-none">
199
+ <span class="mb-1 text-xs">GET IT ON</span>
200
+ <span class="font-medium title-font">Google Play</span>
201
+ </span></a
202
+ ><a
203
+ class="inline-flex items-center justify-center w-full px-6 py-2.5 text-center text-white duration-200 bg-black border-2 border-black rounded-full hover:bg-transparent hover:border-black hover:text-black focus:outline-none lg:w-auto"
204
+ href="#"
205
+ >
206
+ <svg
207
+ xmlns="http://www.w3.org/2000/svg"
208
+ fill="currentColor"
209
+ class="w-6 h-6"
210
+ viewBox="0 0 305 305"
211
+ >
212
+ <path
213
+ d="M40.74 112.12c-25.79 44.74-9.4 112.65 19.12 153.82C74.09 286.52 88.5 305 108.24 305c.37 0 .74 0 1.13-.02 9.27-.37 15.97-3.23 22.45-5.99 7.27-3.1 14.8-6.3 26.6-6.3 11.22 0 18.39 3.1 25.31 6.1 6.83 2.95 13.87 6 24.26 5.81 22.23-.41 35.88-20.35 47.92-37.94a168.18 168.18 0 0021-43l.09-.28a2.5 2.5 0 00-1.33-3.06l-.18-.08c-3.92-1.6-38.26-16.84-38.62-58.36-.34-33.74 25.76-51.6 31-54.84l.24-.15a2.5 2.5 0 00.7-3.51c-18-26.37-45.62-30.34-56.73-30.82a50.04 50.04 0 00-4.95-.24c-13.06 0-25.56 4.93-35.61 8.9-6.94 2.73-12.93 5.09-17.06 5.09-4.64 0-10.67-2.4-17.65-5.16-9.33-3.7-19.9-7.9-31.1-7.9l-.79.01c-26.03.38-50.62 15.27-64.18 38.86z"
214
+ ></path>
215
+ <path
216
+ d="M212.1 0c-15.76.64-34.67 10.35-45.97 23.58-9.6 11.13-19 29.68-16.52 48.38a2.5 2.5 0 002.29 2.17c1.06.08 2.15.12 3.23.12 15.41 0 32.04-8.52 43.4-22.25 11.94-14.5 17.99-33.1 16.16-49.77A2.52 2.52 0 00212.1 0z"
217
+ ></path>
218
+ </svg>
219
+ <span class="flex flex-col items-start ml-4 leading-none">
220
+ <span class="mb-1 text-xs">Download on the</span>
221
+ <span class="font-medium title-font">App Store</span>
222
+ </span>
223
+ </a>
224
+ </div>
225
+ </div>
226
+ </div>
227
+ </div>
228
+ <div class="relative flex-1 hidden w-0 lg:block">
229
+ <div>
230
+ <img
231
+ class="absolute inset-0 object-cover w-full h-full overflow-hidden bg-gray-200"
232
+ src="https://d33wubrfki0l68.cloudfront.net/41cf01e1154fd7ef6121a544cedd9ba7be6b63ba/e0ab4/images/placeholders/rectangle1.svg"
233
+ alt=""
234
+ />
235
+ </div>
236
+ </div>
237
+ </div> -->
238
+ </template>
@@ -0,0 +1,47 @@
1
+ <script lang="ts" setup>
2
+ import { computed } from 'vue';
3
+ import useColors from '../../composables/useColors';
4
+ interface Props {
5
+ color?: string;
6
+ dots?: boolean;
7
+ size?:number
8
+ }
9
+
10
+ const props = withDefaults(defineProps<Props>(), {
11
+ color: 'primary',
12
+ dots: false,
13
+ size:46
14
+ })
15
+
16
+ const currentColor = computed(() => {
17
+ return useColors('fill', props.color)
18
+ })
19
+
20
+ </script>
21
+
22
+ <template>
23
+ <svg v-if="!dots" xmlns="http://www.w3.org/2000/svg" :width="size" :height="size" class="inline" viewBox="0 0 32 32" >
24
+ <path :class="currentColor" fill="currentColor"
25
+ d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"></path>
26
+ <path :class="currentColor" fill="currentColor"
27
+ d="M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z">
28
+ <animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate"
29
+ values="0 12 12;360 12 12">
30
+ </animateTransform>
31
+ </path>
32
+ </svg>
33
+ <svg v-else xmlns="http://www.w3.org/2000/svg" :width="size" :height="size" class="inline" viewBox="0 0 32 32" >
34
+ <g>
35
+ <circle cx="12" cy="2.5" r="1.5" :class="currentColor" fill="currentColor" opacity=".14" />
36
+ <circle cx="16.75" cy="3.77" r="1.5" :class="currentColor" fill="currentColor" opacity=".29" />
37
+ <circle cx="20.23" cy="7.25" r="1.5" :class="currentColor" fill="currentColor" opacity=".43" />
38
+ <circle cx="21.5" cy="12" r="1.5" :class="currentColor" fill="currentColor" opacity=".57" />
39
+ <circle cx="20.23" cy="16.75" r="1.5" :class="currentColor" fill="currentColor" opacity=".71" />
40
+ <circle cx="16.75" cy="20.23" r="1.5" :class="currentColor" fill="currentColor" opacity=".86" />
41
+ <circle cx="12" cy="21.5" r="1.5" :class="currentColor" fill="currentColor" />
42
+ <animateTransform attributeName="transform" calcMode="discrete" dur="0.75s" repeatCount="indefinite" type="rotate"
43
+ values="0 12 12;30 12 12;60 12 12;90 12 12;120 12 12;150 12 12;180 12 12;210 12 12;240 12 12;270 12 12;300 12 12;330 12 12;360 12 12" />
44
+ </g>
45
+ </svg></template>
46
+
47
+
@@ -0,0 +1,33 @@
1
+ <script setup lang="ts">
2
+ import {toRefs} from 'vue'
3
+ import EpCard from '../basics/EpCard.vue'
4
+ interface Props {
5
+ arrayContent:string[][];
6
+ headers?:string[]|null;
7
+ title?:string;
8
+ }
9
+
10
+ const props = withDefaults(defineProps<Props>(),{
11
+ //defaults ? ...
12
+ })
13
+
14
+ const {headers, arrayContent, title} = toRefs(props)
15
+
16
+ const styleTh ="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider";
17
+ </script>
18
+ <template>
19
+ <EpCard flat :title="title">
20
+ <table class="min-w-full divide-y divide-gray-200 shadow">
21
+ <thead class="bg-gray-50" v-if="headers">
22
+ <tr>
23
+ <th v-for="(title, i) in headers" :key="`th-${i}`" scope="col" :class="styleTh">{{title}}</th>
24
+ </tr>
25
+ </thead>
26
+ <tbody class="bg-white divide-y divide-gray-200">
27
+ <tr v-for="(tr, i) in arrayContent" :key="`tr-${i}`" class="hover:bg-gray-50">
28
+ <td v-for="(value, j) in tr" :key="`td-${i}-${j}`" class="px-6 py-4 whitespace-nowrap">{{value}}</td>
29
+ </tr>
30
+ </tbody>
31
+ </table>
32
+ </EpCard>
33
+ </template>
@@ -0,0 +1,85 @@
1
+ <script setup lang="ts">
2
+ import { computed, defineComponent } from 'vue';
3
+ import { isHtml } from '../../composables/isHtml';
4
+ import {useMarkdown} from '../../composables/useMarkdown'
5
+ import EpTerm from '../medias/EpTerm.vue'
6
+ interface Props {
7
+ glossary?:any[];
8
+ content:string;
9
+ title?:string;
10
+ compact?:boolean;
11
+ }
12
+
13
+ const props = withDefaults(defineProps<Props>(),{})
14
+
15
+ const renderText = computed(()=>{
16
+ if(!isHtml(props.content)){
17
+ return useMarkdown(props.content)
18
+ }
19
+ //return props.content
20
+ //create a div
21
+ const div = document.createElement('DIV')
22
+ ///add the html input to the div
23
+ div.innerHTML = props.content.trim()
24
+ ///get strign of html
25
+ let newStr = div.outerHTML
26
+ //find all span.ep_glossary_item to know the glossary terms in the text
27
+ const glossaryTerms = div.querySelectorAll('.ep_glossary_item')
28
+ console.log(glossaryTerms)
29
+ //if find glossary terms
30
+ if(glossaryTerms.length > 0){
31
+ ///check every term and replace it
32
+ glossaryTerms.forEach((item)=>{
33
+ //get id
34
+ const id = item.getAttribute("data-id")
35
+ //get content text
36
+ const render_word = item.innerHTML
37
+ //find in the glossary their equivalent
38
+ let _glossary = []
39
+ if(props.glossary){
40
+ _glossary = props.glossary
41
+ }
42
+ const term = _glossary.find(word => word.id === id)
43
+ //if was found
44
+ if(term){
45
+ ///add the new values to the array
46
+ const word = item.outerHTML
47
+ //check if the term has relations
48
+ const foundedRelations = _glossary.filter((x) =>
49
+ x.relation.some((item:string) => {
50
+ return item == id;
51
+ })
52
+ );
53
+ //get relations id and term
54
+ const idsRelation = foundedRelations.map((x) => x.id);
55
+ const termsRelation = foundedRelations.map((x) => x.term);
56
+ const variation = term.variation
57
+
58
+ //const replaceWord = `<EpBtn :pts-data="{term:'${term.term}', definition:'${term.definition}', renderword:'${render_word}', graminfo:'${term.graminfo}', domain:'${term.domain}',variation:'${variation}', relations_names:'${termsRelation}', relations_ids:'${idsRelation}'}"></EpBtn>`
59
+ const replaceWord = ` <EpTerm term="${term.term}" definition="${term.definition}" word="${render_word}" variations="${variation}" graminfo='${term.graminfo}' domain='${term.domain}' relations='${termsRelation}' idrelation="${idsRelation}"></EpTerm> `
60
+ //replace output string
61
+ newStr = newStr.replace(word, replaceWord)
62
+ }
63
+ })
64
+ }
65
+ div.innerHTML = newStr
66
+ // console.log(div.innerHTML)
67
+ return div.innerHTML;
68
+ })
69
+
70
+
71
+ const customRenderStringComponents = defineComponent({
72
+ components:{
73
+ 'epterm':EpTerm
74
+ },
75
+ template:renderText.value
76
+ })
77
+
78
+ //const {content} = toRefs(props)
79
+
80
+ </script>
81
+
82
+ <template>
83
+ <component :is="customRenderStringComponents"></component>
84
+ <!-- <component v-else :is="renderText"></component> -->
85
+ </template>
@@ -0,0 +1,82 @@
1
+ <script setup lang="ts">
2
+ import { computed, toRefs } from "vue";
3
+ import VueApexCharts from "vue3-apexcharts";
4
+ import EpEdu from "../educationals/EpEdu.vue";
5
+ import { mdiChartBar } from "@mdi/js";
6
+ import { MediaVariants } from "../../types/Medias";
7
+ import { isHtml } from "../../composables/isHtml";
8
+ import { useMarkdown } from "../../composables/useMarkdown";
9
+
10
+ interface Serie {
11
+ name: string;
12
+ data: (string | number)[];
13
+ }
14
+
15
+ interface Options {
16
+ xaxis: {
17
+ categories: (number | string)[];
18
+ convertedCatToNumeric?: boolean;
19
+ }
20
+
21
+ }
22
+
23
+ interface Props {
24
+ series: Serie[];
25
+ options: Options;
26
+ id?: string;
27
+ center?: boolean;
28
+ title?: string;
29
+ intentions?: string;
30
+ hideIcon?: boolean;
31
+ type?: MediaVariants;
32
+ mandateLevel?: string | null;
33
+ source?:string;
34
+ }
35
+
36
+ const props = withDefaults(defineProps<Props>(), {
37
+ center: false,
38
+ });
39
+
40
+ const renderText = computed(() => {
41
+ if (!props.intentions) {
42
+ return null;
43
+ }
44
+ if (!isHtml(props.intentions)) {
45
+ return useMarkdown(props.intentions);
46
+ }
47
+ return props.intentions;
48
+ });
49
+
50
+ const globalOptions = computed(() => {
51
+ return {
52
+ ...props.options,
53
+ dataLabels: {
54
+ enabled: false
55
+ }
56
+ }
57
+ })
58
+
59
+ const { center, series, source } = toRefs(props)
60
+
61
+ </script>
62
+
63
+ <template>
64
+ <EpEdu :title="title" :type="type" :hideIcon="hideIcon" :icon="mdiChartBar" :mandateLevel="mandateLevel">
65
+ <template #intentions v-if="renderText">
66
+ <div v-html="renderText"></div>
67
+ </template>
68
+ <template #content>
69
+ <div :class="`p-4 ${center ? 'flex justify-center' : ''}`" v-if="globalOptions && series">
70
+ <VueApexCharts width="500" type="bar" :options="globalOptions" :series="series"></VueApexCharts>
71
+ </div>
72
+ <div v-else>
73
+ <p>Data no disponible</p>
74
+ </div>
75
+ </template>
76
+ <template #actions v-if="source">
77
+ <p>{{source}}</p>
78
+ </template>
79
+ </EpEdu>
80
+ </template>
81
+
82
+
@@ -0,0 +1,92 @@
1
+ <script setup lang="ts">
2
+ import { computed, toRefs } from "vue";
3
+ import VueApexCharts from "vue3-apexcharts";
4
+ import EpEdu from "../educationals/EpEdu.vue";
5
+ import { mdiChartLine } from "@mdi/js";
6
+ import { MediaVariants } from "../../types/Medias";
7
+ import { isHtml } from "../../composables/isHtml";
8
+ import { useMarkdown } from "../../composables/useMarkdown";
9
+
10
+ interface Serie {
11
+ name: string;
12
+ data: (string | number)[];
13
+ }
14
+
15
+ interface Options {
16
+ xaxis: {
17
+ categories: (number | string)[];
18
+ convertedCatToNumeric?: boolean;
19
+ }
20
+
21
+ }
22
+
23
+ interface Props {
24
+ series: Serie[];
25
+ options: Options;
26
+ id?: string;
27
+ center?: boolean;
28
+ title?: string;
29
+ intentions?: string;
30
+ hideIcon?: boolean;
31
+ type?: MediaVariants;
32
+ mandateLevel?: string | null;
33
+ source?: string;
34
+ }
35
+
36
+ const props = withDefaults(defineProps<Props>(), {
37
+ center: false,
38
+ });
39
+
40
+ const renderText = computed(() => {
41
+ if (!props.intentions) {
42
+ return null;
43
+ }
44
+ if (!isHtml(props.intentions)) {
45
+ return useMarkdown(props.intentions);
46
+ }
47
+ return props.intentions;
48
+ });
49
+
50
+ const globalOptions = computed(() => {
51
+ return {
52
+ ...props.options,
53
+ dataLabels: {
54
+ enabled: false
55
+ },
56
+ stroke: {
57
+ curve: "straight"
58
+ },
59
+ chart: {
60
+ width: 550,
61
+ type: "line",
62
+ zoom: {
63
+ enabled: false,
64
+ },
65
+ },
66
+ }
67
+ })
68
+
69
+ const { center, series, source } = toRefs(props)
70
+
71
+ </script>
72
+
73
+ <template>
74
+ <EpEdu :title="title" :type="type" :hideIcon="hideIcon" :icon="mdiChartLine" :mandateLevel="mandateLevel">
75
+ <template #intentions v-if="renderText">
76
+ <div v-html="renderText"></div>
77
+ </template>
78
+ <template #content>
79
+ <div :class="`p-4 ${center ? 'flex justify-center' : ''}`" v-if="globalOptions && series">
80
+ <VueApexCharts width="500" type="line" :options="globalOptions" :series="series"></VueApexCharts>
81
+ </div>
82
+ <div v-else>
83
+ <p>Data no disponible</p>
84
+ </div>
85
+ </template>
86
+ <template #actions v-if="source">
87
+ <p>{{ source }}</p>
88
+ </template>
89
+ </EpEdu>
90
+ </template>
91
+
92
+
@@ -0,0 +1,8 @@
1
+ <script setup lang="ts">
2
+ </script>
3
+
4
+ <template>
5
+ <div class="p-12 bg-warning-light w-[50%] mx-auto border-2 border-warning">
6
+ <p class="text-center text-error font-bold uppercase">In progress</p>
7
+ </div>
8
+ </template>
@@ -0,0 +1,93 @@
1
+ <script setup lang="ts">
2
+ import { toRefs, computed, useSlots } from "vue";
3
+ //types with capital letter, object styles in lowercase
4
+ import { MediaVariants, mediaVariants } from "../../types/Medias";
5
+ import EpIcon from "../basics/EpIcon.vue";
6
+ import EpDivider from "../basics/EpDivider.vue";
7
+ import EpChip from "../basics/EpChip.vue";
8
+ import EpScope from "./EpScope.vue";
9
+ import { mdiLeadPencil } from "@mdi/js";
10
+
11
+
12
+ interface Props {
13
+ title?: string | null;
14
+ subtitle?: string | null;
15
+ icon?: string;
16
+ mandateLevel?:string|null;
17
+ synchrone?: boolean;
18
+ type?: MediaVariants;
19
+ intentions?: string;
20
+ hideIcon?:boolean;
21
+ flat?:boolean
22
+ }
23
+
24
+ const props = withDefaults(defineProps<Props>(), {
25
+ title: null,
26
+ type: "base",
27
+ hideIcon:false,
28
+ flat:false,
29
+ });
30
+
31
+ //get slots
32
+ const slots = useSlots();
33
+
34
+ const hasIntentions = computed(() => {
35
+ return slots.intentions?true:false
36
+ });
37
+
38
+ const hasActions = computed(() => {
39
+ return slots.actions?true:false
40
+ });
41
+
42
+ const renderIcon = computed(()=> {
43
+ if(props.icon){
44
+ return props.icon
45
+ }
46
+ return mdiLeadPencil
47
+ })
48
+
49
+ const topBarStyle = computed(() => {
50
+ return `${mediaVariants[props.type]} text-left px-5 py-2 ${props.flat?'':'rounded-t-md'} flex justify-between items-center `;
51
+ });
52
+
53
+ const bottomBarStyle = computed(() => {
54
+ return `${mediaVariants[props.type]} text-right pr-5`;
55
+ });
56
+
57
+ const containerStyle = computed(()=>{
58
+ if(hasActions.value || hasIntentions.value || props.title){
59
+ return `rounded-lg overflow-hidden ${props.flat?'':'shadow-md'} flex flex-col justify-between h-full`
60
+ }
61
+ return `flex flex-col justify-between h-full`
62
+ })
63
+
64
+ // type, taxonomyLevel, courseCode, courseTitle, title, subtitle, height, src, color, synchrone
65
+
66
+ const { title, hideIcon } = toRefs(props);
67
+ </script>
68
+
69
+ <template>
70
+ <div :class="containerStyle">
71
+ <div :class="`${topBarStyle}`" v-if="title || mandateLevel">
72
+ <!-- <EpIcon :size="24" :icon-path="mdiBookOpenVariant"></EpIcon> -->
73
+ <h3><EpIcon v-if="!hideIcon" :iconPath="renderIcon" size="24"></EpIcon> <span class="font-bold align-middle">{{ title }}</span></h3>
74
+ <EpScope v-if="mandateLevel" :title="mandateLevel"></EpScope>
75
+ </div>
76
+ <div class="px-5">
77
+ <div class="py-2 grow" v-if="hasIntentions">
78
+ <!-- <EpIcon :size="24" :icon-path="mdiInformationOutline"></EpIcon> -->
79
+ <h4 class="font-semibold mb-2 text-sm uppercase tracking-wide text-gray-500">
80
+ [Intentions]
81
+ </h4>
82
+ <slot name="intentions"></slot>
83
+ <EpDivider/>
84
+ </div>
85
+ <div class="grow">
86
+ <slot name="content"></slot>
87
+ </div>
88
+ </div>
89
+ <div :class="bottomBarStyle" v-if="hasActions">
90
+ <slot name="actions"></slot>
91
+ </div>
92
+ </div>
93
+ </template>