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.
- package/dist/components/basics/EpBadge.vue.d.ts +38 -4
- package/dist/components/basics/EpBtn.vue.d.ts +108 -4
- package/dist/components/basics/EpCard.vue.d.ts +95 -4
- package/dist/components/basics/EpChip.vue.d.ts +72 -4
- package/dist/components/basics/EpDivider.vue.d.ts +51 -4
- package/dist/components/basics/EpFlex.vue.d.ts +9 -4
- package/dist/components/basics/EpIcon.vue.d.ts +37 -4
- package/dist/components/basics/EpImg.vue.d.ts +76 -4
- package/dist/components/basics/EpSection.vue.d.ts +84 -4
- package/dist/components/basics/EpSpinner.vue.d.ts +32 -4
- package/dist/components/basics/EpTable.vue.d.ts +24 -4
- package/dist/components/basics/EpText.vue.d.ts +30 -4
- package/dist/components/charts/EpBarChart.vue.d.ts +82 -4
- package/dist/components/charts/EpLineChart.vue.d.ts +82 -4
- package/dist/components/charts/EpPieChart.vue.d.ts +1 -2
- package/dist/components/educationals/EpEdu.vue.d.ts +80 -4
- package/dist/components/educationals/EpReading.vue.d.ts +151 -4
- package/dist/components/educationals/EpScope.vue.d.ts +14 -4
- package/dist/components/interactions/EpAccordeon.vue.d.ts +53 -4
- package/dist/components/interactions/EpContentSlider.vue.d.ts +2 -5
- package/dist/components/interactions/EpModal.vue.d.ts +70 -5
- package/dist/components/interactions/EpQuestion.vue.d.ts +1 -2
- package/dist/components/interactions/EpTabs.vue.d.ts +2 -0
- package/dist/components/medias/EpAudio.vue.d.ts +79 -4
- package/dist/components/medias/EpCarousel.vue.d.ts +31 -4
- package/dist/components/medias/EpIframe.vue.d.ts +58 -4
- package/dist/components/medias/EpKatex.vue.d.ts +51 -4
- package/dist/components/medias/EpLink.vue.d.ts +73 -4
- package/dist/components/medias/EpSoftware.vue.d.ts +88 -4
- package/dist/components/medias/EpSvg.vue.d.ts +1 -2
- package/dist/components/medias/EpTerm.vue.d.ts +80 -4
- package/dist/components/medias/EpTimeLine.vue.d.ts +1 -2
- package/dist/components/medias/EpVideo.vue.d.ts +64 -4
- package/dist/components/medias/EpVideoPanopto.vue.d.ts +64 -4
- package/dist/components/signages/EpAlert.vue.d.ts +63 -4
- package/dist/components/signages/EpHeader.vue.d.ts +101 -4
- package/dist/components/signages/EpQuote.vue.d.ts +39 -4
- package/dist/components/tools/BgAudio.vue.d.ts +14 -4
- package/dist/components/tools/DisplayBox.vue.d.ts +17 -4
- package/dist/ep-lib-ts.js +27411 -0
- package/dist/ep-lib-ts.umd.cjs +1005 -0
- package/dist/index.d.ts +37 -1
- package/dist/{ep-lib-ts.css → style.css} +1 -1
- package/package.json +25 -23
- package/src/components/basics/EpBadge.vue +48 -0
- package/src/components/basics/EpBtn.vue +100 -0
- package/src/components/basics/EpCard.vue +95 -0
- package/src/components/basics/EpChip.vue +81 -0
- package/src/components/basics/EpDivider.vue +40 -0
- package/src/components/basics/EpFlex.vue +42 -0
- package/src/components/basics/EpIcon.vue +25 -0
- package/src/components/basics/EpImg.vue +59 -0
- package/src/components/basics/EpSection.vue +238 -0
- package/src/components/basics/EpSpinner.vue +47 -0
- package/src/components/basics/EpTable.vue +33 -0
- package/src/components/basics/EpText.vue +85 -0
- package/src/components/charts/EpBarChart.vue +82 -0
- package/src/components/charts/EpLineChart.vue +92 -0
- package/src/components/charts/EpPieChart.vue +8 -0
- package/src/components/educationals/EpEdu.vue +93 -0
- package/src/components/educationals/EpReading.vue +234 -0
- package/src/components/educationals/EpScope.vue +25 -0
- package/src/components/forms/EpCheckbox.vue +49 -0
- package/src/components/forms/EpInput.vue +178 -0
- package/src/components/forms/EpRadio.vue +72 -0
- package/src/components/forms/EpSelect.vue +145 -0
- package/src/components/forms/EpSwitch.vue +58 -0
- package/src/components/forms/EpTextarea.vue +79 -0
- package/src/components/forms/EpToggle.vue +97 -0
- package/src/components/interactions/EpAccordeon.vue +88 -0
- package/src/components/interactions/EpContentSlider.vue +12 -0
- package/src/components/interactions/EpModal.vue +117 -0
- package/src/components/interactions/EpQuestion.vue +8 -0
- package/src/components/interactions/EpTabs.vue +10 -0
- package/src/components/medias/EpAudio.vue +83 -0
- package/src/components/medias/EpCarousel.vue +84 -0
- package/src/components/medias/EpIframe.vue +57 -0
- package/src/components/medias/EpKatex.vue +75 -0
- package/src/components/medias/EpLink.vue +62 -0
- package/src/components/medias/EpSoftware.vue +89 -0
- package/src/components/medias/EpSvg.vue +8 -0
- package/src/components/medias/EpTerm.vue +145 -0
- package/src/components/medias/EpTimeLine.vue +8 -0
- package/src/components/medias/EpVideo.vue +77 -0
- package/src/components/medias/EpVideoPanopto.vue +62 -0
- package/src/components/signages/EpAlert.vue +70 -0
- package/src/components/signages/EpHeader.vue +223 -0
- package/src/components/signages/EpQuote.vue +48 -0
- package/src/components/tools/BgAudio.vue +51 -0
- package/src/components/tools/DisplayBox.vue +37 -0
- package/dist/components/basics/EpBadge.vue.d.ts.map +0 -1
- package/dist/components/basics/EpBtn.vue.d.ts.map +0 -1
- package/dist/components/basics/EpCard.vue.d.ts.map +0 -1
- package/dist/components/basics/EpChip.vue.d.ts.map +0 -1
- package/dist/components/basics/EpDivider.vue.d.ts.map +0 -1
- package/dist/components/basics/EpFlex.vue.d.ts.map +0 -1
- package/dist/components/basics/EpIcon.vue.d.ts.map +0 -1
- package/dist/components/basics/EpImg.vue.d.ts.map +0 -1
- package/dist/components/basics/EpSection.vue.d.ts.map +0 -1
- package/dist/components/basics/EpSpinner.vue.d.ts.map +0 -1
- package/dist/components/basics/EpTable.vue.d.ts.map +0 -1
- package/dist/components/basics/EpText.vue.d.ts.map +0 -1
- package/dist/components/charts/EpBarChart.vue.d.ts.map +0 -1
- package/dist/components/charts/EpLineChart.vue.d.ts.map +0 -1
- package/dist/components/charts/EpPieChart.vue.d.ts.map +0 -1
- package/dist/components/educationals/EpEdu.vue.d.ts.map +0 -1
- package/dist/components/educationals/EpReading.vue.d.ts.map +0 -1
- package/dist/components/educationals/EpScope.vue.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -38
- package/dist/components/interactions/EpAccordeon.vue.d.ts.map +0 -1
- package/dist/components/interactions/EpContentSlider.vue.d.ts.map +0 -1
- package/dist/components/interactions/EpModal.vue.d.ts.map +0 -1
- package/dist/components/interactions/EpQuestion.vue.d.ts.map +0 -1
- package/dist/components/main.d.ts +0 -7
- package/dist/components/medias/EpAudio.vue.d.ts.map +0 -1
- package/dist/components/medias/EpCarousel.vue.d.ts.map +0 -1
- package/dist/components/medias/EpIframe.vue.d.ts.map +0 -1
- package/dist/components/medias/EpKatex.vue.d.ts.map +0 -1
- package/dist/components/medias/EpLink.vue.d.ts.map +0 -1
- package/dist/components/medias/EpLinkVersion.vue.d.ts +0 -3
- package/dist/components/medias/EpLinkVersion.vue.d.ts.map +0 -1
- package/dist/components/medias/EpResource.vue.d.ts +0 -3
- package/dist/components/medias/EpResource.vue.d.ts.map +0 -1
- package/dist/components/medias/EpSoftware.vue.d.ts.map +0 -1
- package/dist/components/medias/EpSvg.vue.d.ts.map +0 -1
- package/dist/components/medias/EpTerm.vue.d.ts.map +0 -1
- package/dist/components/medias/EpTimeLine.vue.d.ts.map +0 -1
- package/dist/components/medias/EpVideo.vue.d.ts.map +0 -1
- package/dist/components/medias/EpVideoPanopto.vue.d.ts.map +0 -1
- package/dist/components/signages/EpAlert.vue.d.ts.map +0 -1
- package/dist/components/signages/EpHeader.vue.d.ts.map +0 -1
- package/dist/components/signages/EpQuote.vue.d.ts.map +0 -1
- package/dist/components/tools/BgAudio.vue.d.ts.map +0 -1
- package/dist/components/tools/DisplayBox.vue.d.ts.map +0 -1
- package/dist/ep-lib-ts.cjs.js +0 -984
- package/dist/ep-lib-ts.es.js +0 -22617
- package/dist/ep-lib-ts.umd.js +0 -985
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
//https://github.com/snfas/protheus/commit/50ec10efc3b5537228edf436ee7ba8f540113485#diff-f4418614aaa0b05457cb0a6ffc674273b35a77cd5481113318603f0524467150
|
|
3
|
+
import { computed, toRefs } from 'vue'
|
|
4
|
+
//types with capital letter, object styles in lowercase
|
|
5
|
+
import { MediaVariants } from "../../types/Medias";
|
|
6
|
+
import { isHtml } from '../../composables/isHtml';
|
|
7
|
+
import { useMarkdown } from '../../composables/useMarkdown'
|
|
8
|
+
import { mdiHeadphones } from "@mdi/js";
|
|
9
|
+
import useColors from '../../composables/useColors'
|
|
10
|
+
//import { useMediaControls } from '@vueuse/core'
|
|
11
|
+
import BgAudio from '../tools/BgAudio.vue'
|
|
12
|
+
import EpAlert from '../signages/EpAlert.vue';
|
|
13
|
+
import EpEdu from '../educationals/EpEdu.vue';
|
|
14
|
+
|
|
15
|
+
interface Props {
|
|
16
|
+
src: string;
|
|
17
|
+
title?: string;
|
|
18
|
+
intentions?: string;
|
|
19
|
+
credits?: string;
|
|
20
|
+
madateLevel?: string;
|
|
21
|
+
labelIntentions?: string;
|
|
22
|
+
type?: MediaVariants;
|
|
23
|
+
messageError?: string
|
|
24
|
+
hideIcon?: boolean;
|
|
25
|
+
mandateLevel?:string | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
29
|
+
labelIntentions: "Intentions d'écoute",
|
|
30
|
+
type: 'base',
|
|
31
|
+
messageError: "Mauvais url",
|
|
32
|
+
hideIcon: false
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const isAudioFormat = computed(() => {
|
|
36
|
+
if (props.src.endsWith('.mp3') || props.src.endsWith('.ogg') || props.src.endsWith('.wav')) {
|
|
37
|
+
return true
|
|
38
|
+
}
|
|
39
|
+
return false
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
const bgColor = computed(() => {
|
|
43
|
+
return useColors('fill', props.type)
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
const renderText = computed(() => {
|
|
47
|
+
if (!props.intentions) {
|
|
48
|
+
return null
|
|
49
|
+
}
|
|
50
|
+
if (!isHtml(props.intentions)) {
|
|
51
|
+
return useMarkdown(props.intentions)
|
|
52
|
+
}
|
|
53
|
+
return props.intentions
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
//controls
|
|
57
|
+
//const controls = useMediaControls(video, {src:props.src})
|
|
58
|
+
|
|
59
|
+
const { src, title, hideIcon, mandateLevel } = toRefs(props)
|
|
60
|
+
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<template>
|
|
64
|
+
|
|
65
|
+
<EpEdu :title="title" :type="type" :hideIcon="hideIcon" :icon="mdiHeadphones" :mandateLevel="mandateLevel">
|
|
66
|
+
<template #intentions v-if="renderText">
|
|
67
|
+
<div v-html="renderText"></div>
|
|
68
|
+
</template>
|
|
69
|
+
<template #content>
|
|
70
|
+
<div class="max-w-screen-sm mx-auto">
|
|
71
|
+
<BgAudio :fill="bgColor"></BgAudio>
|
|
72
|
+
<audio v-if="isAudioFormat" ref="video" controls :src="src" controlsList="nodownload"></audio>
|
|
73
|
+
<EpAlert type="error" outlined v-else>
|
|
74
|
+
<p>{{ messageError }}</p>
|
|
75
|
+
</EpAlert>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
<!-- <template #actions>
|
|
79
|
+
<EpBtn :color="type=='base'?'text-gray-700':'text-white'" :type="type">[Repair btn style... to change]</EpBtn>
|
|
80
|
+
</template> -->
|
|
81
|
+
</EpEdu>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { toRefs, ref } from "vue";
|
|
3
|
+
import EpIcon from "../basics/EpIcon.vue";
|
|
4
|
+
import EpBtn from "../basics/EpBtn.vue";
|
|
5
|
+
import EpModal from "../interactions/EpModal.vue";
|
|
6
|
+
import { mdiChevronLeftCircleOutline } from "@mdi/js";
|
|
7
|
+
import { mdiChevronRightCircleOutline } from "@mdi/js";
|
|
8
|
+
import { MediaCarousel } from "../../types/MediaCarousel";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
images: MediaCarousel[];
|
|
13
|
+
labelRef?:string|null;
|
|
14
|
+
labelClose?:string|null
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
18
|
+
labelClose:"Fermer",
|
|
19
|
+
labelRef:"Référence"
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const currentIndex = ref<number>(0);
|
|
23
|
+
const dialog = ref<boolean>(false);
|
|
24
|
+
|
|
25
|
+
const prevSlide = () => {
|
|
26
|
+
const isFirstSlide = currentIndex.value === 0;
|
|
27
|
+
const newIndex = isFirstSlide ? props.images.length - 1 : currentIndex.value - 1;
|
|
28
|
+
currentIndex.value = newIndex;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const nextSlide = () => {
|
|
32
|
+
const isTheLastSlide = currentIndex.value === props.images.length - 1;
|
|
33
|
+
const newIndex = isTheLastSlide ? 0 : currentIndex.value + 1;
|
|
34
|
+
currentIndex.value = newIndex;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const { images, labelClose, labelRef } = toRefs(props);
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<div class="flex items-center justify-center mb-2">
|
|
42
|
+
<button @click="prevSlide">
|
|
43
|
+
<EpIcon :icon-path="mdiChevronLeftCircleOutline"></EpIcon>
|
|
44
|
+
</button>
|
|
45
|
+
{{ currentIndex + 1 }}/{{ images.length }}
|
|
46
|
+
<button @click="nextSlide">
|
|
47
|
+
<EpIcon :icon-path="mdiChevronRightCircleOutline"></EpIcon>
|
|
48
|
+
</button>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="bg-white shadow-xl p-4 max-w-[800px] mx-auto border-solid">
|
|
51
|
+
<div class="max-w-[800px] h-[550px] m-auto relative">
|
|
52
|
+
<div
|
|
53
|
+
class="w-full h-full bg-center bg-cover duration-500"
|
|
54
|
+
:style="`background-image:url('${images[currentIndex].src}')`"
|
|
55
|
+
></div>
|
|
56
|
+
</div>
|
|
57
|
+
<div v-if="images[currentIndex]?.caption" class="mt-2 text-sm text-gray-800">
|
|
58
|
+
{{ images[currentIndex].caption }}
|
|
59
|
+
</div>
|
|
60
|
+
<div v-if="images[currentIndex]?.bib" class="flex justify-end">
|
|
61
|
+
<EpBtn type="primary" @click="dialog = true" dark>{{ labelRef }}</EpBtn>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<EpModal v-model="dialog" title="Référence">
|
|
65
|
+
<div v-html="images[currentIndex].bib"></div>
|
|
66
|
+
<div class="flex justify-end">
|
|
67
|
+
<EpBtn @click="dialog = false" type="primary" dark>{{ labelClose }}</EpBtn>
|
|
68
|
+
</div>
|
|
69
|
+
</EpModal>
|
|
70
|
+
<!--icons-->
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<style scoped>
|
|
74
|
+
/* we will explain what these classes do next! */
|
|
75
|
+
.v-enter-active,
|
|
76
|
+
.v-leave-active {
|
|
77
|
+
transition: opacity 0.5s ease;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.v-enter-from,
|
|
81
|
+
.v-leave-to {
|
|
82
|
+
opacity: 0;
|
|
83
|
+
}
|
|
84
|
+
</style>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { toRefs, computed } from "vue";
|
|
3
|
+
import EpEdu from "../educationals/EpEdu.vue";
|
|
4
|
+
//types with capital letter, object styles in lowercase
|
|
5
|
+
import { MediaVariants } from "../../types/Medias";
|
|
6
|
+
import { isHtml } from '../../composables/isHtml';
|
|
7
|
+
import {useMarkdown} from '../../composables/useMarkdown'
|
|
8
|
+
import { mdiApplicationBrackets } from "@mdi/js";
|
|
9
|
+
interface Props {
|
|
10
|
+
src: string;
|
|
11
|
+
big?: boolean;
|
|
12
|
+
title?: string;
|
|
13
|
+
intentions?: string;
|
|
14
|
+
hideIcon?:boolean;
|
|
15
|
+
type?:MediaVariants;
|
|
16
|
+
mandateLevel?:string|null
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
20
|
+
type:'base',
|
|
21
|
+
big: false,
|
|
22
|
+
hideIcon:false
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const renderText = computed(()=>{
|
|
27
|
+
if(!props.intentions){
|
|
28
|
+
return null
|
|
29
|
+
}
|
|
30
|
+
if(!isHtml(props.intentions)){
|
|
31
|
+
return useMarkdown(props.intentions)
|
|
32
|
+
}
|
|
33
|
+
return props.intentions
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const height = computed(() => {
|
|
37
|
+
return props.big ? "1000" : "520";
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const { src, title, intentions, hideIcon } = toRefs(props);
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<EpEdu :title="title" :type="type" :hideIcon="hideIcon" :icon="mdiApplicationBrackets" :mandateLevel="mandateLevel">
|
|
45
|
+
<template #intentions v-if="renderText">
|
|
46
|
+
<div v-html="renderText" ></div>
|
|
47
|
+
</template>
|
|
48
|
+
<template #content>
|
|
49
|
+
|
|
50
|
+
<iframe :src="src" class="w-full" :height="height"></iframe>
|
|
51
|
+
|
|
52
|
+
</template>
|
|
53
|
+
<!-- <template #actions>
|
|
54
|
+
<EpBtn :color="type=='base'?'text-gray-700':'text-white'" :type="type">[Repair btn style... to change]</EpBtn>
|
|
55
|
+
</template> -->
|
|
56
|
+
</EpEdu>
|
|
57
|
+
</template>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { onMounted, ref, computed, toRefs } from "vue";
|
|
3
|
+
import katex from "katex";
|
|
4
|
+
import EpEdu from "../educationals/EpEdu.vue";
|
|
5
|
+
import { mdiFunctionVariant } from "@mdi/js";
|
|
6
|
+
import { MediaVariants } from "../../types/Medias";
|
|
7
|
+
import { isHtml } from "../../composables/isHtml";
|
|
8
|
+
import { useMarkdown } from "../../composables/useMarkdown";
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
content: string;
|
|
12
|
+
center?: boolean;
|
|
13
|
+
title?: string;
|
|
14
|
+
intentions?: string;
|
|
15
|
+
hideIcon?: boolean;
|
|
16
|
+
type?: MediaVariants;
|
|
17
|
+
mandateLevel?: string | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
21
|
+
center: false,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const renderKatex = ref<HTMLDivElement>();
|
|
25
|
+
|
|
26
|
+
onMounted(() => {
|
|
27
|
+
if(renderKatex.value){
|
|
28
|
+
katex.render(String.raw`${props.content}`, renderKatex.value, {
|
|
29
|
+
throwOnError: false,
|
|
30
|
+
output: "html",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const renderText = computed(() => {
|
|
36
|
+
if (!props.intentions) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
if (!isHtml(props.intentions)) {
|
|
40
|
+
return useMarkdown(props.intentions);
|
|
41
|
+
}
|
|
42
|
+
return props.intentions;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const {center} = toRefs(props)
|
|
46
|
+
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<EpEdu
|
|
51
|
+
:title="title"
|
|
52
|
+
:type="type"
|
|
53
|
+
:hideIcon="hideIcon"
|
|
54
|
+
:icon="mdiFunctionVariant"
|
|
55
|
+
:mandateLevel="mandateLevel"
|
|
56
|
+
>
|
|
57
|
+
<template #intentions v-if="renderText">
|
|
58
|
+
<div v-html="renderText"></div>
|
|
59
|
+
</template>
|
|
60
|
+
<template #content>
|
|
61
|
+
<div :class="`p-4 ${center ? 'flex justify-center' : ''}`">
|
|
62
|
+
<div ref="renderKatex"></div>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
<!-- <template #actions>
|
|
66
|
+
<EpBtn :color="type=='base'?'text-gray-700':'text-white'" :type="type">[Repair btn style... to change]</EpBtn>
|
|
67
|
+
</template> -->
|
|
68
|
+
</EpEdu>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<style scoped>
|
|
72
|
+
.katex {
|
|
73
|
+
font-size: 1.3em;
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, toRefs } from "vue";
|
|
3
|
+
//types with capital letter, object styles in lowercase
|
|
4
|
+
import { MediaVariants } from "../../types/Medias";
|
|
5
|
+
import EpBtn from "../basics/EpBtn.vue";
|
|
6
|
+
import { mdiLinkVariant } from "@mdi/js";
|
|
7
|
+
import EpEdu from "../educationals/EpEdu.vue";
|
|
8
|
+
import useColors from "../../composables/useColors";
|
|
9
|
+
import { useRenderText } from "../../composables/useRenderText";
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
href: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
intentions?: string;
|
|
16
|
+
mandateLevel?: string;
|
|
17
|
+
labelIntentions?: string;
|
|
18
|
+
type?: MediaVariants;
|
|
19
|
+
hideIcon?: boolean;
|
|
20
|
+
labelCard?:string;
|
|
21
|
+
icon?:string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
25
|
+
labelIntentions: "Intentions d'écoute",
|
|
26
|
+
type: "primary",
|
|
27
|
+
hideIcon: false,
|
|
28
|
+
intentions:""
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const renderIcon = computed(()=>{
|
|
32
|
+
if(props.icon){
|
|
33
|
+
return props.icon
|
|
34
|
+
}
|
|
35
|
+
return mdiLinkVariant
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
const hoverColor = computed(()=>{
|
|
39
|
+
return `absolute ${useColors('bg', props.type + 'light')} bottom-0 w-0 left-1/2 h-full -translate-x-1/2 transition-all ease-in-out duration-300 group-hover:w-[105%] -z-[1] group-focus:w-[105%]`
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
const { href, label, intentions, mandateLevel, hideIcon } = toRefs(props);
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<EpEdu :title="labelCard" :icon="renderIcon" flat :type="type" :hideIcon="hideIcon" :mandateLevel="mandateLevel">
|
|
47
|
+
<template #intentions v-if="useRenderText(intentions)">
|
|
48
|
+
<div v-html="useRenderText(intentions)"></div>
|
|
49
|
+
</template>
|
|
50
|
+
<template #content>
|
|
51
|
+
<div class="flex justify-center">
|
|
52
|
+
<div class="w-4/5">
|
|
53
|
+
<EpBtn block color="text-white" rounded :type="type" :prependIcon="renderIcon" :href="href"
|
|
54
|
+
extraClass="group font-medium tracking-wide relative inline-flex justify-center overflow-hidden z-10 transition-all duration-300 ease-in-out ">
|
|
55
|
+
<span class="font-medium tracking-wider ">{{label}}</span>
|
|
56
|
+
<span :class='hoverColor'></span>
|
|
57
|
+
</EpBtn>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
</EpEdu>
|
|
62
|
+
</template>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { toRefs, computed } from "vue";
|
|
3
|
+
import EpIcon from "../basics/EpIcon.vue";
|
|
4
|
+
import EpBtn from "../basics/EpBtn.vue";
|
|
5
|
+
import EpChip from "../basics/EpChip.vue";
|
|
6
|
+
import EpEdu from "../educationals/EpEdu.vue";
|
|
7
|
+
import { MediaVariants } from "../../types/Medias";
|
|
8
|
+
import { useRenderText } from "../../composables/useRenderText";
|
|
9
|
+
|
|
10
|
+
import { mdiLaptop } from "@mdi/js";
|
|
11
|
+
import { mdiOpenInNew } from "@mdi/js";
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
url?: string;
|
|
15
|
+
cover?: string;
|
|
16
|
+
title: string;
|
|
17
|
+
mandateLevel?: string;
|
|
18
|
+
intentions?: string;
|
|
19
|
+
version_link?: null;
|
|
20
|
+
hideCover?: boolean;
|
|
21
|
+
version?: string;
|
|
22
|
+
type?:MediaVariants;
|
|
23
|
+
hideIcon?:boolean;
|
|
24
|
+
labelCard?:string;
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// type, taxonomyLevel, courseCode, courseTitle, title, subtitle, height, src, color, synchrone
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
31
|
+
icon: "mdiLaptop",
|
|
32
|
+
hideCover: false,
|
|
33
|
+
intentions: "",
|
|
34
|
+
cover:"",
|
|
35
|
+
type:"base",
|
|
36
|
+
hideIcon:false,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const old_image = "https://live.staticflickr.com/4868/45940268562_c5f7fdd06b_q.jpg";
|
|
40
|
+
|
|
41
|
+
const hasCover = computed(() => {
|
|
42
|
+
if (props.cover === old_image || props.cover.trim().length === 0) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
const { title, intentions, cover, hideCover, version, labelCard, hideIcon, mandateLevel } = toRefs(props);
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<template>
|
|
53
|
+
<EpEdu :title="labelCard" :icon="mdiLaptop" flat :type="type" :hideIcon="hideIcon" :mandateLevel="mandateLevel">
|
|
54
|
+
<template #intentions v-if="useRenderText(intentions)">
|
|
55
|
+
<div v-html="useRenderText(intentions)"></div>
|
|
56
|
+
</template>
|
|
57
|
+
<template #content>
|
|
58
|
+
<div
|
|
59
|
+
class="flex flex-col items-center border rounded-lg bg-neutral-100 md:flex-row mt-2"
|
|
60
|
+
>
|
|
61
|
+
<template v-if="!hideCover">
|
|
62
|
+
<img
|
|
63
|
+
v-if="hasCover"
|
|
64
|
+
class="object-cover h-24 w-full rounded-t-lg object-cover md:h-auto md:w-24 md:rounded-none md:rounded-l-lg"
|
|
65
|
+
:src="cover"
|
|
66
|
+
:alt="`image de la lecture ${title}`"
|
|
67
|
+
/>
|
|
68
|
+
<div
|
|
69
|
+
v-else
|
|
70
|
+
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"
|
|
71
|
+
>
|
|
72
|
+
<EpIcon :icon-path="mdiLaptop" size="95"></EpIcon>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
<div class="w-full">
|
|
76
|
+
<div class="w-full px-5">
|
|
77
|
+
<div class="flex justify-between items-center rounded-t-md p-2">
|
|
78
|
+
<h4>{{ title }} <EpChip size="small" type="base" v-if="version">{{version}}</EpChip></h4>
|
|
79
|
+
<EpBtn rounded type="base" :prependIcon="mdiOpenInNew"
|
|
80
|
+
>[Accéder au logiciel]</EpBtn
|
|
81
|
+
>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
<template #actions></template>
|
|
88
|
+
</EpEdu>
|
|
89
|
+
</template>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, toRefs, computed } from "vue";
|
|
3
|
+
import EpIcon from "../basics/EpIcon.vue";
|
|
4
|
+
import EpModal from "../interactions/EpModal.vue";
|
|
5
|
+
import EpDivider from "../basics/EpDivider.vue";
|
|
6
|
+
import EpBtn from "../basics/EpBtn.vue";
|
|
7
|
+
import { isHtml } from "../../composables/isHtml";
|
|
8
|
+
import { useMarkdown } from "../../composables/useMarkdown";
|
|
9
|
+
import { mdiBookmarkMultipleOutline } from "@mdi/js";
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
term: string;
|
|
13
|
+
word: string;
|
|
14
|
+
definition: string;
|
|
15
|
+
variations?: string;
|
|
16
|
+
domain?: string;
|
|
17
|
+
graminfo?: string;
|
|
18
|
+
relations?: string;
|
|
19
|
+
idrelation?: string;
|
|
20
|
+
labelClose?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
24
|
+
term: "test",
|
|
25
|
+
variations: "",
|
|
26
|
+
relations: "",
|
|
27
|
+
idrelation: "",
|
|
28
|
+
labelClose: "Fermer",
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const show = ref(false);
|
|
32
|
+
|
|
33
|
+
const renderText = computed(() => {
|
|
34
|
+
if (!isHtml(props.definition)) {
|
|
35
|
+
return useMarkdown(props.definition);
|
|
36
|
+
}
|
|
37
|
+
return props.definition;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const subtitle = computed(() => {
|
|
41
|
+
if (props.term !== props.word) {
|
|
42
|
+
return `(${props.word})`;
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const renderVariations = computed(() => {
|
|
48
|
+
let renderVariations = null;
|
|
49
|
+
let valueprops = props.variations?.trim();
|
|
50
|
+
if (valueprops?.length > 0) {
|
|
51
|
+
renderVariations = valueprops.split(",");
|
|
52
|
+
}
|
|
53
|
+
return renderVariations;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const renderRelations = computed(() => {
|
|
57
|
+
let renderRelations = null;
|
|
58
|
+
let valueprops = props.relations?.trim();
|
|
59
|
+
if (valueprops?.length > 0) {
|
|
60
|
+
renderRelations = valueprops.split(",");
|
|
61
|
+
}
|
|
62
|
+
return renderRelations;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const relationsID = computed(() => {
|
|
66
|
+
let relationsID = null;
|
|
67
|
+
let valueprops = props.idrelation?.trim();
|
|
68
|
+
if (valueprops?.length > 0) {
|
|
69
|
+
relationsID = valueprops.split(",");
|
|
70
|
+
}
|
|
71
|
+
return relationsID;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const renderDomain = computed(() => {
|
|
75
|
+
if (props.domain === "null") {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
return props.domain;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const { term, graminfo, labelClose } = toRefs(props);
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<template>
|
|
85
|
+
<span
|
|
86
|
+
@click="show = true"
|
|
87
|
+
class="cursor-pointer border-primary border text-primary px-2 py-1 rounded group overflow-hidden relative"
|
|
88
|
+
>
|
|
89
|
+
<span
|
|
90
|
+
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"
|
|
91
|
+
></span>
|
|
92
|
+
<span class="relative group-hover:text-primary-light"
|
|
93
|
+
>{{ word }}
|
|
94
|
+
<EpIcon :icon-path="mdiBookmarkMultipleOutline" size="18"></EpIcon>
|
|
95
|
+
</span>
|
|
96
|
+
</span>
|
|
97
|
+
|
|
98
|
+
<EpModal v-model="show" size="compact">
|
|
99
|
+
<div class="mb-2 flex items-center justify-between">
|
|
100
|
+
<div>
|
|
101
|
+
<h3 class="font-bold text-2xl">
|
|
102
|
+
{{ term }}
|
|
103
|
+
<span class="text-sm font-light text-error italic">{{
|
|
104
|
+
graminfo
|
|
105
|
+
}}</span>
|
|
106
|
+
</h3>
|
|
107
|
+
<h4 class="text-xs" v-if="subtitle">{{ subtitle }}</h4>
|
|
108
|
+
</div>
|
|
109
|
+
<div>
|
|
110
|
+
<EpIcon :icon-path="mdiBookmarkMultipleOutline"></EpIcon>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<EpDivider color="primary" margin="mb-2"></EpDivider>
|
|
114
|
+
<div class="mb-4 flex items-center justify-between">
|
|
115
|
+
<h3 class="text-primary font-bold">Définition</h3>
|
|
116
|
+
<span class="text-xs" v-if="renderDomain"
|
|
117
|
+
>Domaine : <span class="font-bold">{{ renderDomain }}</span></span
|
|
118
|
+
>
|
|
119
|
+
</div>
|
|
120
|
+
<div v-html="renderText"></div>
|
|
121
|
+
<EpDivider v-if="renderVariations || renderRelations"></EpDivider>
|
|
122
|
+
<div class="text-sm mt-2" v-if="renderVariations">
|
|
123
|
+
<span class="mr-2 font-bold">Variations :</span>
|
|
124
|
+
<span v-for="(variation, i) in renderVariations" :key="`variation-${i}`">
|
|
125
|
+
{{ variation }}{{ renderVariations.length > i + 1 ? ", " : "." }}
|
|
126
|
+
</span>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="text-sm mt-2" v-if="renderRelations">
|
|
129
|
+
<span class="mr-2 font-bold">Relations :</span>
|
|
130
|
+
<EpBtn
|
|
131
|
+
v-for="(relation, i) in renderRelations"
|
|
132
|
+
:key="`relation-${i}`"
|
|
133
|
+
size="small"
|
|
134
|
+
rounded
|
|
135
|
+
extra-class="mr-2"
|
|
136
|
+
>{{ relation }}</EpBtn
|
|
137
|
+
>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="flex justify-end">
|
|
140
|
+
<EpBtn type="error" outlined @click="show = false" rounded>{{
|
|
141
|
+
labelClose
|
|
142
|
+
}}</EpBtn>
|
|
143
|
+
</div>
|
|
144
|
+
</EpModal>
|
|
145
|
+
</template>
|