ep-lib-ts 0.1.7 → 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.
Files changed (85) hide show
  1. package/dist/BgAudio-ca141b0f.js +5 -0
  2. package/dist/DisplayBox-38b3a1bd.js +5 -0
  3. package/dist/EpAlert-d5dcf3f1.js +5 -0
  4. package/dist/EpAudio-09920ab1.js +5 -0
  5. package/dist/EpBadge-d7da4b82.js +5 -0
  6. package/dist/EpBarChart-aa2d3bd3.js +5 -0
  7. package/dist/EpBtn-584a5fcb.js +5 -0
  8. package/dist/EpCard-522528d2.js +5 -0
  9. package/dist/EpCheckbox-fe632df9.js +36 -0
  10. package/dist/EpChip-524340fe.js +5 -0
  11. package/dist/EpDivider-88c6be66.js +5 -0
  12. package/dist/EpEdu-bfd8a980.js +5 -0
  13. package/dist/EpFlex-560567d3.js +5 -0
  14. package/dist/EpHeader-48f9a232.js +5 -0
  15. package/dist/EpIcon-2ba52cd4.js +5 -0
  16. package/dist/EpIframe-6c4453bb.js +5 -0
  17. package/dist/EpImg-99724654.js +5 -0
  18. package/dist/EpInput-f7992e3f.js +1171 -0
  19. package/dist/EpLineChart-655565a3.js +5 -0
  20. package/dist/EpLink-ab36acb1.js +5 -0
  21. package/dist/EpModal-d2df0421.js +5 -0
  22. package/dist/EpNothing-08f5601f.js +10 -0
  23. package/dist/EpQuestion-f9baa3e7.js +5 -0
  24. package/dist/EpQuote-8be6e8eb.js +5 -0
  25. package/dist/EpRadio-4f83a512.js +5 -0
  26. package/dist/EpReading-4b8eb5bf.js +5 -0
  27. package/dist/EpResource-42e0f1e3.js +5 -0
  28. package/dist/EpScope-609f5fbe.js +5 -0
  29. package/dist/EpSection-eaf62d9e.js +5 -0
  30. package/dist/EpSelect-ed79294a.js +31 -0
  31. package/dist/EpSoftware-0ca2b2d9.js +5 -0
  32. package/dist/EpSpinner-b50b86fd.js +5 -0
  33. package/dist/EpSwitch-1eaf9d3f.js +44 -0
  34. package/dist/EpTable-4eaf84c7.js +5 -0
  35. package/dist/EpTerm-dfd79f23.js +5 -0
  36. package/dist/EpText-deac2bec.js +5 -0
  37. package/dist/EpTextarea-67f751e9.js +41 -0
  38. package/dist/EpToggle-9755056a.js +44 -0
  39. package/dist/EpVideo-1d585085.js +5 -0
  40. package/dist/EpVideoPanopto-cb5441d9.js +5 -0
  41. package/dist/components/basics/EpText.vue.d.ts +13 -9
  42. package/dist/components/educationals/EpEdu.vue.d.ts +3 -2
  43. package/dist/components/educationals/EpReading.vue.d.ts +5 -4
  44. package/dist/components/educationals/EpResource.vue.d.ts +34 -1
  45. package/dist/components/educationals/EpScope.vue.d.ts +9 -0
  46. package/dist/components/forms/EpCheckbox.vue.d.ts +72 -0
  47. package/dist/components/forms/EpInput.vue.d.ts +98 -0
  48. package/dist/components/forms/EpRadio.vue.d.ts +69 -0
  49. package/dist/components/forms/EpSelect.vue.d.ts +83 -0
  50. package/dist/components/forms/EpSwitch.vue.d.ts +81 -0
  51. package/dist/components/forms/EpTextarea.vue.d.ts +90 -0
  52. package/dist/components/forms/EpToggle.vue.d.ts +81 -0
  53. package/dist/components/interactions/EpQuestion.vue.d.ts +90 -1
  54. package/dist/components/medias/EpAudio.vue.d.ts +3 -8
  55. package/dist/components/medias/EpLink.vue.d.ts +3 -2
  56. package/dist/components/medias/EpSoftware.vue.d.ts +3 -2
  57. package/dist/components/medias/EpVideo.vue.d.ts +3 -2
  58. package/dist/components/medias/EpVideoPanopto.vue.d.ts +3 -2
  59. package/dist/components/signages/EpAlert.vue.d.ts +10 -12
  60. package/dist/components/signages/EpNothing.vue.d.ts +2 -0
  61. package/dist/components/signages/EpQuote.vue.d.ts +9 -9
  62. package/dist/composables/useComponent.d.ts +6 -0
  63. package/dist/ep-lib-ts.js +41 -18490
  64. package/dist/ep-lib-ts.umd.cjs +42 -38
  65. package/dist/index-41c8e591.js +18790 -0
  66. package/dist/types/Answer.d.ts +15 -0
  67. package/dist/types/MandateLevel.d.ts +5 -0
  68. package/package.json +3 -2
  69. package/src/components/basics/EpCard.vue +1 -1
  70. package/src/components/basics/EpImg.vue +70 -40
  71. package/src/components/basics/EpText.vue +19 -5
  72. package/src/components/educationals/EpEdu.vue +11 -3
  73. package/src/components/educationals/EpReading.vue +10 -7
  74. package/src/components/educationals/EpResource.vue +66 -3
  75. package/src/components/educationals/EpScope.vue +14 -2
  76. package/src/components/forms/EpRadio.vue +2 -1
  77. package/src/components/interactions/EpQuestion.vue +176 -4
  78. package/src/components/medias/EpAudio.vue +2 -2
  79. package/src/components/medias/EpLink.vue +2 -1
  80. package/src/components/medias/EpSoftware.vue +4 -4
  81. package/src/components/medias/EpVideo.vue +7 -3
  82. package/src/components/medias/EpVideoPanopto.vue +2 -1
  83. package/src/components/signages/EpAlert.vue +19 -9
  84. package/src/components/signages/EpNothing.vue +5 -0
  85. 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?: string;
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" ></div>
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,12 +7,18 @@ 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;
15
- icon?:string | null
16
22
  compact?:boolean
17
23
  }
18
24
 
@@ -21,7 +27,6 @@ const props = withDefaults(defineProps<Props>(), {
21
27
  title: null,
22
28
  outlined:false,
23
29
  noIcon:false,
24
- icon:null
25
30
  });
26
31
 
27
32
  const isOutlined = computed(()=>{
@@ -31,18 +36,23 @@ const isOutlined = computed(()=>{
31
36
  return 'default'
32
37
  })
33
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
+
34
47
  const styles = computed(()=>{
35
- return `${typeAlert[props.type]?.[isOutlined.value]}`
48
+ return `${typeAlert[finalType.value]?.[isOutlined.value]}`
36
49
  })
37
50
 
38
51
  const icon = computed(()=>{
39
- let icon = useIcons[props.type].icon
52
+ let icon = useIcons[finalType.value].icon
40
53
  if(props.noIcon){
41
54
  return null
42
55
  }
43
- if(props.icon){
44
- return props.icon
45
- }
46
56
  return icon
47
57
  })
48
58
 
@@ -64,7 +74,7 @@ const { title, compact, type, outlined } = toRefs(props);
64
74
  </div>
65
75
  </div>
66
76
  </div>
67
- <EpAccordeon :type="type" :outlined="outlined" :icon="icon" :title="title" v-else>
77
+ <EpAccordeon :type="finalType" :outlined="outlined" :icon="icon" :title="title" v-else>
68
78
  <slot></slot>
69
79
  </EpAccordeon>
70
80
  </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div>
3
+ no data
4
+ </div>
5
+ </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
- import EpIcon from "../basics/EpIcon.vue";
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
- name?:string | null;
12
- src?:string | null;
13
- quotes?:boolean;
8
+ author?:string | null;
9
+ img?:string | null;
10
+ card?:boolean;
14
11
  }
15
12
 
16
13
  const props = withDefaults(defineProps<Props>(), {
17
- name:null,
18
- src:null,
19
- quotes:false
14
+ author:null,
15
+ img:null,
16
+ card:false
20
17
  })
21
18
 
22
- const {name, src, quotes} = toRefs(props)
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-lg bg-white"
33
+ class="flex flex-wrap rounded-md bg-white"
30
34
  >
31
35
  <img
32
- v-if="src"
33
- class="h-96 w-full rounded-t-lg object-cover lg:h-auto lg:w-48 lg:rounded-none lg:rounded-l-lg"
34
- :src="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="name">
43
+ <template v-if="author">
40
44
  <EpDivider size="border"></EpDivider>
41
45
  <p class="text-xs italic text-neutral-500">
42
- {{ name }}
46
+ {{ author }}
43
47
  </p>
44
48
  </template>
45
49
  </div>