ep-lib-ts 0.1.8 → 0.1.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/BgAudio-ca141b0f.js +5 -0
- package/dist/DisplayBox-38b3a1bd.js +5 -0
- package/dist/EpAlert-d5dcf3f1.js +5 -0
- package/dist/EpAudio-09920ab1.js +5 -0
- package/dist/EpBadge-d7da4b82.js +5 -0
- package/dist/EpBarChart-aa2d3bd3.js +5 -0
- package/dist/EpBtn-584a5fcb.js +5 -0
- package/dist/EpCard-522528d2.js +5 -0
- package/dist/EpCheckbox-fe632df9.js +36 -0
- package/dist/EpChip-524340fe.js +5 -0
- package/dist/EpDivider-88c6be66.js +5 -0
- package/dist/EpEdu-bfd8a980.js +5 -0
- package/dist/EpFlex-560567d3.js +5 -0
- package/dist/EpHeader-48f9a232.js +5 -0
- package/dist/EpIcon-2ba52cd4.js +5 -0
- package/dist/EpIframe-6c4453bb.js +5 -0
- package/dist/EpImg-99724654.js +5 -0
- package/dist/EpInput-f7992e3f.js +1171 -0
- package/dist/EpLineChart-655565a3.js +5 -0
- package/dist/EpLink-ab36acb1.js +5 -0
- package/dist/EpModal-d2df0421.js +5 -0
- package/dist/EpNothing-08f5601f.js +10 -0
- package/dist/EpQuestion-f9baa3e7.js +5 -0
- package/dist/EpQuote-8be6e8eb.js +5 -0
- package/dist/EpRadio-4f83a512.js +5 -0
- package/dist/EpReading-4b8eb5bf.js +5 -0
- package/dist/EpResource-42e0f1e3.js +5 -0
- package/dist/EpScope-609f5fbe.js +5 -0
- package/dist/EpSection-eaf62d9e.js +5 -0
- package/dist/EpSelect-ed79294a.js +31 -0
- package/dist/EpSoftware-0ca2b2d9.js +5 -0
- package/dist/EpSpinner-b50b86fd.js +5 -0
- package/dist/EpSwitch-1eaf9d3f.js +44 -0
- package/dist/EpTable-4eaf84c7.js +5 -0
- package/dist/EpTerm-dfd79f23.js +5 -0
- package/dist/EpText-deac2bec.js +5 -0
- package/dist/EpTextarea-67f751e9.js +41 -0
- package/dist/EpToggle-9755056a.js +44 -0
- package/dist/EpVideo-1d585085.js +5 -0
- package/dist/EpVideoPanopto-cb5441d9.js +5 -0
- package/dist/components/basics/EpText.vue.d.ts +13 -9
- package/dist/components/educationals/EpEdu.vue.d.ts +3 -2
- package/dist/components/educationals/EpReading.vue.d.ts +5 -4
- package/dist/components/educationals/EpResource.vue.d.ts +34 -1
- package/dist/components/educationals/EpScope.vue.d.ts +9 -0
- package/dist/components/forms/EpCheckbox.vue.d.ts +72 -0
- package/dist/components/forms/EpInput.vue.d.ts +98 -0
- package/dist/components/forms/EpRadio.vue.d.ts +69 -0
- package/dist/components/forms/EpSelect.vue.d.ts +83 -0
- package/dist/components/forms/EpSwitch.vue.d.ts +81 -0
- package/dist/components/forms/EpTextarea.vue.d.ts +90 -0
- package/dist/components/forms/EpToggle.vue.d.ts +81 -0
- package/dist/components/interactions/EpQuestion.vue.d.ts +90 -1
- package/dist/components/medias/EpAudio.vue.d.ts +3 -8
- package/dist/components/medias/EpLink.vue.d.ts +3 -2
- package/dist/components/medias/EpSoftware.vue.d.ts +3 -2
- package/dist/components/medias/EpVideo.vue.d.ts +3 -2
- package/dist/components/medias/EpVideoPanopto.vue.d.ts +3 -2
- package/dist/components/signages/EpAlert.vue.d.ts +10 -3
- package/dist/components/signages/EpNothing.vue.d.ts +2 -0
- package/dist/components/signages/EpQuote.vue.d.ts +9 -9
- package/dist/composables/useComponent.d.ts +6 -0
- package/dist/ep-lib-ts.js +41 -18489
- package/dist/ep-lib-ts.umd.cjs +42 -38
- package/dist/index-41c8e591.js +18790 -0
- package/dist/types/Answer.d.ts +15 -0
- package/dist/types/MandateLevel.d.ts +5 -0
- package/package.json +3 -2
- package/src/components/basics/EpCard.vue +1 -1
- package/src/components/basics/EpImg.vue +70 -40
- package/src/components/basics/EpText.vue +19 -5
- package/src/components/educationals/EpEdu.vue +11 -3
- package/src/components/educationals/EpReading.vue +10 -7
- package/src/components/educationals/EpResource.vue +66 -3
- package/src/components/educationals/EpScope.vue +14 -2
- package/src/components/forms/EpRadio.vue +2 -1
- package/src/components/interactions/EpQuestion.vue +176 -4
- package/src/components/medias/EpAudio.vue +2 -2
- package/src/components/medias/EpLink.vue +2 -1
- package/src/components/medias/EpSoftware.vue +4 -4
- package/src/components/medias/EpVideo.vue +7 -3
- package/src/components/medias/EpVideoPanopto.vue +2 -1
- package/src/components/signages/EpAlert.vue +19 -4
- package/src/components/signages/EpNothing.vue +5 -0
- package/src/components/signages/EpQuote.vue +23 -19
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { computed, toRefs } from 'vue'
|
|
4
4
|
//types with capital letter, object styles in lowercase
|
|
5
5
|
import { MediaVariants } from "../../types/Medias";
|
|
6
|
+
import { MandateLevel } from '../../types/MandateLevel';
|
|
6
7
|
import { isHtml } from '../../composables/isHtml';
|
|
7
8
|
import { useMarkdown } from '../../composables/useMarkdown'
|
|
8
9
|
import { mdiHeadphones } from "@mdi/js";
|
|
@@ -17,12 +18,11 @@ interface Props {
|
|
|
17
18
|
title?: string;
|
|
18
19
|
intentions?: string;
|
|
19
20
|
credits?: string;
|
|
20
|
-
madateLevel?: string;
|
|
21
21
|
labelIntentions?: string;
|
|
22
22
|
type?: MediaVariants;
|
|
23
23
|
messageError?: string
|
|
24
24
|
hideIcon?: boolean;
|
|
25
|
-
mandateLevel?:string | null;
|
|
25
|
+
mandateLevel?:string | MandateLevel | null;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { computed, toRefs } from "vue";
|
|
3
3
|
//types with capital letter, object styles in lowercase
|
|
4
4
|
import { MediaVariants } from "../../types/Medias";
|
|
5
|
+
import { MandateLevel } from '../../types/MandateLevel';
|
|
5
6
|
import EpBtn from "../basics/EpBtn.vue";
|
|
6
7
|
import { mdiLinkVariant } from "@mdi/js";
|
|
7
8
|
import EpEdu from "../educationals/EpEdu.vue";
|
|
@@ -13,7 +14,7 @@ interface Props {
|
|
|
13
14
|
href: string;
|
|
14
15
|
label?: string;
|
|
15
16
|
intentions?: string;
|
|
16
|
-
mandateLevel?: string;
|
|
17
|
+
mandateLevel?: string | MandateLevel | null;
|
|
17
18
|
labelIntentions?: string;
|
|
18
19
|
type?: MediaVariants;
|
|
19
20
|
hideIcon?: boolean;
|
|
@@ -5,6 +5,7 @@ import EpBtn from "../basics/EpBtn.vue";
|
|
|
5
5
|
import EpChip from "../basics/EpChip.vue";
|
|
6
6
|
import EpEdu from "../educationals/EpEdu.vue";
|
|
7
7
|
import { MediaVariants } from "../../types/Medias";
|
|
8
|
+
import { MandateLevel } from '../../types/MandateLevel';
|
|
8
9
|
import { useRenderText } from "../../composables/useRenderText";
|
|
9
10
|
|
|
10
11
|
import { mdiLaptop } from "@mdi/js";
|
|
@@ -14,7 +15,7 @@ interface Props {
|
|
|
14
15
|
url?: string;
|
|
15
16
|
cover?: string;
|
|
16
17
|
title: string;
|
|
17
|
-
mandateLevel?:
|
|
18
|
+
mandateLevel?:string | MandateLevel | null;
|
|
18
19
|
intentions?: string;
|
|
19
20
|
version_link?: null;
|
|
20
21
|
hideCover?: boolean;
|
|
@@ -22,7 +23,6 @@ interface Props {
|
|
|
22
23
|
type?:MediaVariants;
|
|
23
24
|
hideIcon?:boolean;
|
|
24
25
|
labelCard?:string;
|
|
25
|
-
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// type, taxonomyLevel, courseCode, courseTitle, title, subtitle, height, src, color, synchrone
|
|
@@ -46,7 +46,7 @@ const hasCover = computed(() => {
|
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
const { title, intentions, cover, hideCover, version, labelCard, hideIcon, mandateLevel } = toRefs(props);
|
|
49
|
+
const { title, intentions, cover, hideCover, version, labelCard, hideIcon, mandateLevel, url } = toRefs(props);
|
|
50
50
|
</script>
|
|
51
51
|
|
|
52
52
|
<template>
|
|
@@ -76,7 +76,7 @@ const { title, intentions, cover, hideCover, version, labelCard, hideIcon, manda
|
|
|
76
76
|
<div class="w-full px-5">
|
|
77
77
|
<div class="flex justify-between items-center rounded-t-md p-2">
|
|
78
78
|
<h4>{{ title }} <EpChip size="small" type="base" v-if="version">{{version}}</EpChip></h4>
|
|
79
|
-
<EpBtn rounded type="base" :prependIcon="mdiOpenInNew"
|
|
79
|
+
<EpBtn v-if="url" rounded type="base" :prependIcon="mdiOpenInNew" :href="url"
|
|
80
80
|
>[Accéder au logiciel]</EpBtn
|
|
81
81
|
>
|
|
82
82
|
</div>
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
import {ref, computed, toRefs} from 'vue'
|
|
3
3
|
//types with capital letter, object styles in lowercase
|
|
4
4
|
import { MediaVariants } from "../../types/Medias";
|
|
5
|
+
import { MandateLevel } from '../../types/MandateLevel';
|
|
5
6
|
import { isHtml } from '../../composables/isHtml';
|
|
6
7
|
import {useMarkdown} from '../../composables/useMarkdown'
|
|
7
8
|
import { mdiVideo } from "@mdi/js";
|
|
9
|
+
|
|
8
10
|
//import { useMediaControls } from '@vueuse/core'
|
|
9
11
|
import EpEdu from '../educationals/EpEdu.vue'
|
|
10
12
|
|
|
@@ -13,7 +15,7 @@ interface Props{
|
|
|
13
15
|
title?:string;
|
|
14
16
|
intentions?:string;
|
|
15
17
|
credits?:string;
|
|
16
|
-
mandateLevel?:string | null;
|
|
18
|
+
mandateLevel?:string | MandateLevel | null;
|
|
17
19
|
labelIntentions?:string;
|
|
18
20
|
type?:MediaVariants;
|
|
19
21
|
hideIcon?:boolean;
|
|
@@ -40,6 +42,9 @@ const vimeoUrl = computed(()=> {
|
|
|
40
42
|
if(!isVideoFormat.value && url.includes("https://vimeo.com/")){
|
|
41
43
|
return url.replace("https://vimeo.com/", "https://player.vimeo.com/video/")
|
|
42
44
|
}
|
|
45
|
+
if(!isVideoFormat.value && url.includes('https://www.youtube.com/watch?')){
|
|
46
|
+
return url.replace("https://www.youtube.com/watch?v=","https://www.youtube.com/embed/")
|
|
47
|
+
}
|
|
43
48
|
return url
|
|
44
49
|
})
|
|
45
50
|
|
|
@@ -59,10 +64,9 @@ const {src, title, hideIcon, type} = toRefs(props)
|
|
|
59
64
|
</script>
|
|
60
65
|
|
|
61
66
|
<template>
|
|
62
|
-
|
|
63
67
|
<EpEdu :title="title" :type="type" :hideIcon="hideIcon" :icon="mdiVideo" :mandateLevel="mandateLevel">
|
|
64
68
|
<template #intentions v-if="renderText">
|
|
65
|
-
<div v-html="renderText"
|
|
69
|
+
<div v-html="renderText"></div>
|
|
66
70
|
</template>
|
|
67
71
|
<template #content>
|
|
68
72
|
<div class="max-w-screen-sm mx-auto">
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { computed, toRefs} from 'vue'
|
|
3
3
|
//types with capital letter, object styles in lowercase
|
|
4
4
|
import { MediaVariants } from "../../types/Medias";
|
|
5
|
+
import { MandateLevel } from '../../types/MandateLevel';
|
|
5
6
|
import { isHtml } from '../../composables/isHtml';
|
|
6
7
|
import {useMarkdown} from '../../composables/useMarkdown'
|
|
7
8
|
import { mdiVideo } from "@mdi/js";
|
|
@@ -13,7 +14,7 @@ interface Props{
|
|
|
13
14
|
title?:string;
|
|
14
15
|
intentions?:string;
|
|
15
16
|
credits?:string;
|
|
16
|
-
mandateLevel?:string | null;
|
|
17
|
+
mandateLevel?:string | MandateLevel | null;
|
|
17
18
|
labelIntentions?:string;
|
|
18
19
|
type?:MediaVariants;
|
|
19
20
|
hideIcon?:boolean;
|
|
@@ -7,8 +7,15 @@ import EpAccordeon from "../interactions/EpAccordeon.vue";
|
|
|
7
7
|
import { TypeAlert, typeAlert } from "../../types/Alert";
|
|
8
8
|
import {useIcons} from '../../composables/useIcons'
|
|
9
9
|
|
|
10
|
+
interface OldType {
|
|
11
|
+
icon: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: TypeAlert;
|
|
14
|
+
color: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
10
17
|
interface Props {
|
|
11
|
-
type?:TypeAlert;
|
|
18
|
+
type?:TypeAlert|OldType;
|
|
12
19
|
title?: string | null;
|
|
13
20
|
outlined?:boolean;
|
|
14
21
|
noIcon?:boolean;
|
|
@@ -29,12 +36,20 @@ const isOutlined = computed(()=>{
|
|
|
29
36
|
return 'default'
|
|
30
37
|
})
|
|
31
38
|
|
|
39
|
+
// to change after change bd strapi v4
|
|
40
|
+
const finalType = computed(()=>{
|
|
41
|
+
if(typeof props.type === 'object'){
|
|
42
|
+
return props.type.type
|
|
43
|
+
}
|
|
44
|
+
return props.type
|
|
45
|
+
})
|
|
46
|
+
|
|
32
47
|
const styles = computed(()=>{
|
|
33
|
-
return `${typeAlert[
|
|
48
|
+
return `${typeAlert[finalType.value]?.[isOutlined.value]}`
|
|
34
49
|
})
|
|
35
50
|
|
|
36
51
|
const icon = computed(()=>{
|
|
37
|
-
let icon = useIcons[
|
|
52
|
+
let icon = useIcons[finalType.value].icon
|
|
38
53
|
if(props.noIcon){
|
|
39
54
|
return null
|
|
40
55
|
}
|
|
@@ -59,7 +74,7 @@ const { title, compact, type, outlined } = toRefs(props);
|
|
|
59
74
|
</div>
|
|
60
75
|
</div>
|
|
61
76
|
</div>
|
|
62
|
-
<EpAccordeon :type="
|
|
77
|
+
<EpAccordeon :type="finalType" :outlined="outlined" :icon="icon" :title="title" v-else>
|
|
63
78
|
<slot></slot>
|
|
64
79
|
</EpAccordeon>
|
|
65
80
|
</template>
|
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {toRefs} from 'vue'
|
|
2
|
+
import {toRefs, computed} from 'vue'
|
|
3
3
|
import EpCard from "../basics/EpCard.vue";
|
|
4
4
|
import EpDivider from "../basics/EpDivider.vue";
|
|
5
|
-
|
|
6
|
-
import useColors from "../../composables/useColors";
|
|
7
|
-
import { mdiFormatQuoteOpen } from "@mdi/js";
|
|
8
|
-
import { mdiFormatQuoteClose } from '@mdi/js';
|
|
5
|
+
|
|
9
6
|
|
|
10
7
|
interface Props {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
author?:string | null;
|
|
9
|
+
img?:string | null;
|
|
10
|
+
card?:boolean;
|
|
14
11
|
}
|
|
15
12
|
|
|
16
13
|
const props = withDefaults(defineProps<Props>(), {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
author:null,
|
|
15
|
+
img:null,
|
|
16
|
+
card:false
|
|
20
17
|
})
|
|
21
18
|
|
|
22
|
-
const {
|
|
19
|
+
const {author, img} = toRefs(props)
|
|
20
|
+
|
|
21
|
+
const styleQuote = computed(()=> {
|
|
22
|
+
if(props.card) {
|
|
23
|
+
return `primary`
|
|
24
|
+
}
|
|
25
|
+
return ``
|
|
26
|
+
})
|
|
23
27
|
|
|
24
28
|
</script>
|
|
25
29
|
|
|
26
30
|
<template>
|
|
27
|
-
<EpCard density="compact">
|
|
31
|
+
<EpCard density="compact" :color="styleQuote" outlined>
|
|
28
32
|
<div
|
|
29
|
-
class="flex flex-wrap rounded-
|
|
33
|
+
class="flex flex-wrap rounded-md bg-white"
|
|
30
34
|
>
|
|
31
35
|
<img
|
|
32
|
-
v-if="
|
|
33
|
-
class="h-96 w-full rounded-t-
|
|
34
|
-
:src="
|
|
36
|
+
v-if="img"
|
|
37
|
+
class="h-96 w-full rounded-t-md object-cover lg:h-auto lg:w-48 lg:rounded-none lg:rounded-l-md"
|
|
38
|
+
:src="img"
|
|
35
39
|
alt="Image of quote"
|
|
36
40
|
/>
|
|
37
41
|
<div class="p-6 flex-1">
|
|
38
42
|
<slot></slot>
|
|
39
|
-
<template v-if="
|
|
43
|
+
<template v-if="author">
|
|
40
44
|
<EpDivider size="border"></EpDivider>
|
|
41
45
|
<p class="text-xs italic text-neutral-500">
|
|
42
|
-
{{
|
|
46
|
+
{{ author }}
|
|
43
47
|
</p>
|
|
44
48
|
</template>
|
|
45
49
|
</div>
|