ep-lib-ts 1.0.32 → 1.0.34
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-CA8VSLsc.js +4 -0
- package/dist/DisplayBox-DcIbA6-c.js +4 -0
- package/dist/EpAlert-DmZqxnZD.js +4 -0
- package/dist/EpAudio-CNrSgOA8.js +4 -0
- package/dist/EpBadge-DDIAQCga.js +4 -0
- package/dist/EpBarChart-BD7tXt0V.js +4 -0
- package/dist/EpBtn-niZqYgkt.js +4 -0
- package/dist/EpCard-zoWBsu5Z.js +4 -0
- package/dist/EpChip-C_0AWO5o.js +4 -0
- package/dist/EpCodeblock-Dz861SlI.js +4 -0
- package/dist/EpConclusion-DwlOTrdr.js +4 -0
- package/dist/EpContentSlider-C9PBvtNH.js +4 -0
- package/dist/{EpDarkmode-B13zt5cG.js → EpDarkmode-B2VNFRu8.js} +1 -1
- package/dist/EpDescription-DnjXryDT.js +4 -0
- package/dist/EpDivider-C8T1peku.js +4 -0
- package/dist/EpEdu-Druc_eUR.js +4 -0
- package/dist/EpFlex-ZQz4gN2-.js +4 -0
- package/dist/EpFunnelChart-BKM1i_KX.js +4 -0
- package/dist/EpHeader-CY5QHbDo.js +4 -0
- package/dist/{EpHover-DNdok_NO.js → EpHover-CEbHH1Ot.js} +1 -1
- package/dist/EpIcon-DhX4c8H4.js +4 -0
- package/dist/EpIframe-DrJZNpa1.js +4 -0
- package/dist/EpImg-CYwMBDRB.js +4 -0
- package/dist/{EpInput-ByXT17LP.js → EpInput-_g6MeJfa.js} +1 -1
- package/dist/EpInstructions-BRrl6k3h.js +4 -0
- package/dist/EpIntroduction-BBIaG25r.js +4 -0
- package/dist/EpLineChart-BpFQSKIs.js +4 -0
- package/dist/EpLink-C7szVwiy.js +4 -0
- package/dist/EpLinkVersion-DNUMPzLF.js +4 -0
- package/dist/{EpList-Di14zaez.js → EpList-CA3qvQVS.js} +1 -1
- package/dist/EpModal-DgLvWs3s.js +4 -0
- package/dist/{EpNothing-D70Hh7de.js → EpNothing-DIGtPVpI.js} +1 -1
- package/dist/EpObjective-BIZ56elw.js +4 -0
- package/dist/EpPieChart-CxE3BN2b.js +4 -0
- package/dist/EpQuestion-EQ6_Neor.js +4 -0
- package/dist/EpQuote-DZrcIqYB.js +4 -0
- package/dist/EpRadio-D-hiQH6x.js +4 -0
- package/dist/EpRadioSummative-V31TwtDf.js +4 -0
- package/dist/EpReading-TZ_RGKDL.js +4 -0
- package/dist/EpResource-Bc8yZxE0.js +4 -0
- package/dist/EpScope-DqJ3TXMe.js +4 -0
- package/dist/EpSection-CkKKHjtA.js +4 -0
- package/dist/EpSectionCols-BRklp4aF.js +4 -0
- package/dist/EpSkeleton-B3j9ocu4.js +4 -0
- package/dist/EpSoftware-B3Zi6b3M.js +4 -0
- package/dist/EpSpecificObjective-D7FxkGtF.js +4 -0
- package/dist/EpSpinner-eEhJP_dg.js +4 -0
- package/dist/EpSummativeTable-EQb5YwNZ.js +4 -0
- package/dist/EpSvg-DuBkjS1J.js +4 -0
- package/dist/EpTable-6Wcd9Hvr.js +4 -0
- package/dist/EpTerm-CAo26_rp.js +4 -0
- package/dist/EpText-XAdtrujQ.js +4 -0
- package/dist/EpTimeLine-qGC6PET7.js +4 -0
- package/dist/EpVideo-CppqYkIh.js +4 -0
- package/dist/EpVideoPanopto-Dbrz8xBH.js +4 -0
- package/dist/EpWordDef-CcMynnw9.js +4 -0
- package/dist/components/medias/EpWordDef.vue.d.ts +14 -6
- package/dist/ep-lib-ts.js +1 -1
- package/dist/ep-lib-ts.umd.cjs +30 -30
- package/dist/{index-BYEnMYLJ.js → index-CFCG0okj.js} +1 -1
- package/dist/{index-B9rG41xn.js → index-DROZe3zf.js} +1408 -1398
- package/dist/{prism-DiSexfYq.js → prism-CGkVnT4Z.js} +1 -1
- package/dist/types/GlossaryEntry.d.ts +12 -5
- package/package.json +1 -1
- package/src/components/medias/EpWordDef.vue +46 -37
- package/dist/BgAudio-3P5MwT3x.js +0 -4
- package/dist/DisplayBox-BLrriUVp.js +0 -4
- package/dist/EpAlert-up0-DQ-W.js +0 -4
- package/dist/EpAudio-Dwldy8oC.js +0 -4
- package/dist/EpBadge-C7-sjgKz.js +0 -4
- package/dist/EpBarChart-BkdkSeOT.js +0 -4
- package/dist/EpBtn-DHIyHEQd.js +0 -4
- package/dist/EpCard-Owp_m3nx.js +0 -4
- package/dist/EpChip-CVGfwvmc.js +0 -4
- package/dist/EpCodeblock-Cz8kdlt-.js +0 -4
- package/dist/EpConclusion-nST7hA36.js +0 -4
- package/dist/EpContentSlider-Bq2A2yHU.js +0 -4
- package/dist/EpDescription-ByTqMJo3.js +0 -4
- package/dist/EpDivider-DR4wPrJi.js +0 -4
- package/dist/EpEdu-DAYXNCIr.js +0 -4
- package/dist/EpFlex-Cxk8WZWs.js +0 -4
- package/dist/EpFunnelChart-BrdPF8dA.js +0 -4
- package/dist/EpHeader-BFdV4aU4.js +0 -4
- package/dist/EpIcon-B-5rnqjb.js +0 -4
- package/dist/EpIframe-VwrTos4m.js +0 -4
- package/dist/EpImg-BB8oeVEA.js +0 -4
- package/dist/EpInstructions-D7jxhD6b.js +0 -4
- package/dist/EpIntroduction-CjbIYDjd.js +0 -4
- package/dist/EpLineChart-UfCiLXqN.js +0 -4
- package/dist/EpLink-Bov--TUo.js +0 -4
- package/dist/EpLinkVersion-5IhB-FN5.js +0 -4
- package/dist/EpModal-DzHvTMpb.js +0 -4
- package/dist/EpObjective-ifm7REJV.js +0 -4
- package/dist/EpPieChart-DfRSSrb3.js +0 -4
- package/dist/EpQuestion-BrwVgeVM.js +0 -4
- package/dist/EpQuote-Bp8AvEfY.js +0 -4
- package/dist/EpRadio-Ilq_BZ5S.js +0 -4
- package/dist/EpRadioSummative-D5kgkmxy.js +0 -4
- package/dist/EpReading-D8uaLmEL.js +0 -4
- package/dist/EpResource-E53tjodd.js +0 -4
- package/dist/EpScope-B9SN5Sm0.js +0 -4
- package/dist/EpSection-k7rfm1dx.js +0 -4
- package/dist/EpSectionCols-CKqmrSlV.js +0 -4
- package/dist/EpSkeleton-C9ZDlfu_.js +0 -4
- package/dist/EpSoftware-DoGtceZ2.js +0 -4
- package/dist/EpSpecificObjective-C_F5e7KC.js +0 -4
- package/dist/EpSpinner-Ds3ZJSdK.js +0 -4
- package/dist/EpSummativeTable-DuYAVjqV.js +0 -4
- package/dist/EpSvg-BzYn_UeG.js +0 -4
- package/dist/EpTable-LbFDXAJi.js +0 -4
- package/dist/EpTerm-CIzpRuKw.js +0 -4
- package/dist/EpText-JDXCcD5a.js +0 -4
- package/dist/EpTimeLine-BcEEOE2w.js +0 -4
- package/dist/EpVideo-B4MslcRb.js +0 -4
- package/dist/EpVideoPanopto-BtF0L_Ow.js +0 -4
- package/dist/EpWordDef-hAABsUGE.js +0 -4
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
export interface GlossaryEntry {
|
|
2
|
-
|
|
2
|
+
uid: string;
|
|
3
3
|
term: string;
|
|
4
|
-
|
|
4
|
+
content: {
|
|
5
|
+
gramInfo: string | null;
|
|
6
|
+
domain: string | null;
|
|
7
|
+
definition?: string;
|
|
8
|
+
image?: string;
|
|
9
|
+
};
|
|
5
10
|
relation: string[];
|
|
6
|
-
domain: string | null;
|
|
7
|
-
definition: string;
|
|
8
11
|
variation: string[];
|
|
9
|
-
|
|
12
|
+
labelInformation?: string;
|
|
13
|
+
labelDomain?: string;
|
|
14
|
+
labelVariations?: string;
|
|
15
|
+
labelRelations?: string;
|
|
16
|
+
labelNoDefinition?: string;
|
|
10
17
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue';
|
|
3
|
-
import {
|
|
2
|
+
import { computed, ref } from 'vue';
|
|
3
|
+
import { useCreateUid } from '../../composables/useCreateUid';
|
|
4
4
|
import { useRenderText } from '../../composables/useRenderText';
|
|
5
5
|
import { useRouter } from "vue-router";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
interface Relation {
|
|
9
|
+
termId: string;
|
|
10
|
+
term: string;
|
|
9
11
|
}
|
|
10
12
|
|
|
13
|
+
|
|
11
14
|
interface Props {
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
uid?:string;
|
|
16
|
+
term:string;
|
|
17
|
+
description:string;
|
|
18
|
+
content:{
|
|
19
|
+
gramInfo?: string | null
|
|
20
|
+
domain?: string | null
|
|
21
|
+
definition?: string
|
|
22
|
+
image?: string
|
|
23
|
+
}
|
|
24
|
+
relation:Relation[];
|
|
25
|
+
variation:string[];
|
|
14
26
|
labelInformation?: string;
|
|
15
27
|
labelDomain?:string;
|
|
16
28
|
labelVariations?: string;
|
|
@@ -27,33 +39,28 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
27
39
|
labelVariations:"Variation(s)"
|
|
28
40
|
});
|
|
29
41
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const definition = computed(() => {
|
|
33
|
-
return props.glossary.find(item => item.id === props.term.id)
|
|
34
|
-
})
|
|
35
|
-
|
|
36
42
|
const sizeGramIngo = computed(() => {
|
|
37
|
-
if (
|
|
38
|
-
return
|
|
43
|
+
if (props.content) {
|
|
44
|
+
return props.content.domain || props.variation.length > 0 ? 'w-1/3' : 'w-full'
|
|
39
45
|
}
|
|
40
46
|
return ''
|
|
41
47
|
})
|
|
42
48
|
|
|
43
49
|
const sizeDomain = computed(() => {
|
|
44
|
-
if (
|
|
45
|
-
return
|
|
50
|
+
if (props.variation) {
|
|
51
|
+
return props.variation.length > 0 ? 'w-1/4' : 'w-3/4'
|
|
46
52
|
}
|
|
47
53
|
return ''
|
|
48
54
|
})
|
|
49
55
|
|
|
50
56
|
const sizeVariations = computed(() => {
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
57
|
+
if (props.content) {
|
|
58
|
+
return props.content.domain ? 'w-2/4' : 'w-3/4'
|
|
53
59
|
}
|
|
54
60
|
return ''
|
|
55
61
|
})
|
|
56
62
|
|
|
63
|
+
/*
|
|
57
64
|
const findRelations = (relations: string[]): { id: number | string, term: string }[] => {
|
|
58
65
|
let _relations = props.glossary.filter((term) => {
|
|
59
66
|
return relations.some((x) => {
|
|
@@ -61,7 +68,7 @@ const findRelations = (relations: string[]): { id: number | string, term: string
|
|
|
61
68
|
});
|
|
62
69
|
});
|
|
63
70
|
return _relations.map((x) => ({id:x.id, term:x.term}));
|
|
64
|
-
}
|
|
71
|
+
};*/
|
|
65
72
|
|
|
66
73
|
const router = useRouter()
|
|
67
74
|
const goto = (term:string) =>{
|
|
@@ -72,52 +79,54 @@ const goto = (term:string) =>{
|
|
|
72
79
|
//
|
|
73
80
|
}
|
|
74
81
|
|
|
82
|
+
const id = ref(props.uid || useCreateUid());
|
|
83
|
+
|
|
75
84
|
</script>
|
|
76
85
|
|
|
77
86
|
<template>
|
|
78
|
-
<div class="dark:bg-dark">
|
|
79
|
-
<div v-if="
|
|
87
|
+
<div class="dark:bg-dark" :id="id">
|
|
88
|
+
<div v-if="term && description">
|
|
80
89
|
<div class="h-min border border-base rounded-lg divide-y">
|
|
81
|
-
<h2 class="text-xl font-semibold p-2">{{
|
|
90
|
+
<h2 class="text-xl font-semibold p-2">{{ term }}</h2>
|
|
82
91
|
<div class="flex justify-between">
|
|
83
92
|
<div :class="sizeGramIngo">
|
|
84
93
|
<p class="text-sm font-medium bg-base-light dark:text-dark p-2">
|
|
85
94
|
{{labelInformation}}
|
|
86
95
|
</p>
|
|
87
|
-
<div class="px-2 py-1">{{
|
|
96
|
+
<div class="px-2 py-1" v-if="content.gramInfo">{{ content.gramInfo }}</div>
|
|
88
97
|
</div>
|
|
89
|
-
<div :class="sizeDomain" v-if="
|
|
98
|
+
<div :class="sizeDomain" v-if="content.domain">
|
|
90
99
|
<p class="text-sm font-medium bg-base-light dark:text-dark p-2">{{labelDomain}}</p>
|
|
91
|
-
<div class="px-2 py-1">{{
|
|
100
|
+
<div class="px-2 py-1">{{ content.domain }}</div>
|
|
92
101
|
</div>
|
|
93
|
-
<div :class="sizeVariations" v-if="
|
|
102
|
+
<div :class="sizeVariations" v-if="variation.length > 0">
|
|
94
103
|
<p class="text-sm font-medium bg-base-light dark:text-dark p-2">{{labelVariations}}</p>
|
|
95
104
|
<div class="px-2 py-1">
|
|
96
|
-
<span v-for="(
|
|
97
|
-
|
|
105
|
+
<span v-for="(_variation, i) in variation" :key="`v-${i}`">{{ _variation }}{{
|
|
106
|
+
variation.length > i + 1 ? ", " :
|
|
98
107
|
"." }}</span>
|
|
99
108
|
</div>
|
|
100
109
|
</div>
|
|
101
110
|
</div>
|
|
102
|
-
<template v-if="!
|
|
103
|
-
<div class="px-2 py-6" v-html="useRenderText(
|
|
111
|
+
<template v-if="!content.image">
|
|
112
|
+
<div class="px-2 py-6" v-html="useRenderText(description)"></div>
|
|
104
113
|
</template>
|
|
105
114
|
<template v-else>
|
|
106
115
|
<div class="flex">
|
|
107
|
-
<div class="px-2 py-6" v-html="useRenderText(
|
|
108
|
-
<img class="h-60" :src="
|
|
116
|
+
<div class="px-2 py-6" v-html="useRenderText(description)"></div>
|
|
117
|
+
<img class="h-60" :src="content.image" :alt="`Image du terme ${term}`" />
|
|
109
118
|
</div>
|
|
110
119
|
</template>
|
|
111
120
|
|
|
112
121
|
<div>
|
|
113
|
-
<div v-if="
|
|
122
|
+
<div v-if="relation.length > 0">
|
|
114
123
|
<p class="text-sm font-medium bg-base-light dark:text-dark p-2"> {{labelRelations}}</p>
|
|
115
124
|
<div class="p-2">
|
|
116
|
-
|
|
117
|
-
<button class="p-1 border rounded mr-1" @click="goto(
|
|
118
|
-
{{
|
|
125
|
+
<template v-for="(_relation, i) in relation" :key="`relation-${i}`">
|
|
126
|
+
<button class="p-1 border rounded mr-1" @click="goto(_relation.termId)">
|
|
127
|
+
{{ _relation.term }}
|
|
119
128
|
</button>
|
|
120
|
-
</template>
|
|
129
|
+
</template>
|
|
121
130
|
</div>
|
|
122
131
|
</div>
|
|
123
132
|
</div>
|
package/dist/BgAudio-3P5MwT3x.js
DELETED
package/dist/EpAlert-up0-DQ-W.js
DELETED
package/dist/EpAudio-Dwldy8oC.js
DELETED
package/dist/EpBadge-C7-sjgKz.js
DELETED
package/dist/EpBtn-DHIyHEQd.js
DELETED
package/dist/EpCard-Owp_m3nx.js
DELETED
package/dist/EpChip-CVGfwvmc.js
DELETED
package/dist/EpEdu-DAYXNCIr.js
DELETED
package/dist/EpFlex-Cxk8WZWs.js
DELETED
package/dist/EpIcon-B-5rnqjb.js
DELETED
package/dist/EpImg-BB8oeVEA.js
DELETED
package/dist/EpLink-Bov--TUo.js
DELETED
package/dist/EpModal-DzHvTMpb.js
DELETED
package/dist/EpQuote-Bp8AvEfY.js
DELETED
package/dist/EpRadio-Ilq_BZ5S.js
DELETED
package/dist/EpScope-B9SN5Sm0.js
DELETED
package/dist/EpSvg-BzYn_UeG.js
DELETED
package/dist/EpTable-LbFDXAJi.js
DELETED
package/dist/EpTerm-CIzpRuKw.js
DELETED
package/dist/EpText-JDXCcD5a.js
DELETED
package/dist/EpVideo-B4MslcRb.js
DELETED