ep-lib-ts 0.1.19 → 0.1.21

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 (83) hide show
  1. package/dist/BgAudio-7658dbfa.js +5 -0
  2. package/dist/DisplayBox-91e0379e.js +5 -0
  3. package/dist/EpAlert-08bd894e.js +5 -0
  4. package/dist/EpAudio-f3bdfa56.js +5 -0
  5. package/dist/EpBadge-0f23df62.js +5 -0
  6. package/dist/EpBarChart-a8cc9021.js +5 -0
  7. package/dist/EpBtn-1b318d8b.js +5 -0
  8. package/dist/EpCard-f9d185f4.js +5 -0
  9. package/dist/EpChip-9dc924a1.js +5 -0
  10. package/dist/EpContentSlider-06e9ab9d.js +5 -0
  11. package/dist/{EpDivider-451f49c7.js → EpDivider-c8b50802.js} +1 -1
  12. package/dist/EpEdu-eedb5dd2.js +5 -0
  13. package/dist/EpFlex-a5e66290.js +5 -0
  14. package/dist/EpHeader-5a5301d1.js +5 -0
  15. package/dist/EpIcon-a22bca0e.js +5 -0
  16. package/dist/EpIframe-b13e2602.js +5 -0
  17. package/dist/{EpImg-58fe0075.js → EpImg-4b1c1eb0.js} +1 -1
  18. package/dist/{EpInput-40066436.js → EpInput-1abaeac9.js} +1 -1
  19. package/dist/EpLineChart-4294f586.js +5 -0
  20. package/dist/EpLink-8777a63f.js +5 -0
  21. package/dist/EpLinkVersion-5c082afe.js +5 -0
  22. package/dist/EpModal-47b3d6eb.js +5 -0
  23. package/dist/{EpNothing-60a0495b.js → EpNothing-4a436b63.js} +1 -1
  24. package/dist/EpPieChart-c1b6b0c6.js +5 -0
  25. package/dist/EpQuestion-22f494dc.js +5 -0
  26. package/dist/EpQuote-ebc9e1e9.js +5 -0
  27. package/dist/EpRadio-b8ddb3ca.js +5 -0
  28. package/dist/EpReading-f7962a86.js +5 -0
  29. package/dist/EpResource-04f931b8.js +5 -0
  30. package/dist/EpScope-0e3aec65.js +5 -0
  31. package/dist/EpSection-914a8f55.js +5 -0
  32. package/dist/{EpSelect-5eaaa06f.js → EpSelect-bbdf575d.js} +1 -1
  33. package/dist/EpSoftware-a7f455f3.js +5 -0
  34. package/dist/EpSpinner-8a65a879.js +5 -0
  35. package/dist/EpSvg-84333966.js +5 -0
  36. package/dist/EpTable-60100add.js +5 -0
  37. package/dist/EpTerm-5e901cc8.js +5 -0
  38. package/dist/EpText-8041a38c.js +5 -0
  39. package/dist/EpTimeLine-3ba111b3.js +5 -0
  40. package/dist/EpVideo-92d4440e.js +5 -0
  41. package/dist/EpVideoPanopto-ec445448.js +5 -0
  42. package/dist/ep-lib-ts.js +1 -1
  43. package/dist/ep-lib-ts.umd.cjs +16 -16
  44. package/dist/{index-6479cc61.js → index-e28f84f9.js} +3590 -3586
  45. package/dist/style.css +1 -1
  46. package/package.json +1 -1
  47. package/src/components/basics/EpText.vue +85 -84
  48. package/dist/BgAudio-e76b06bd.js +0 -5
  49. package/dist/DisplayBox-94d20004.js +0 -5
  50. package/dist/EpAlert-e5761fbe.js +0 -5
  51. package/dist/EpAudio-7fb55e21.js +0 -5
  52. package/dist/EpBadge-6e1e374b.js +0 -5
  53. package/dist/EpBarChart-940436ae.js +0 -5
  54. package/dist/EpBtn-d87b4bf9.js +0 -5
  55. package/dist/EpCard-2f0c3cf2.js +0 -5
  56. package/dist/EpChip-a1d7e511.js +0 -5
  57. package/dist/EpContentSlider-ea342e98.js +0 -5
  58. package/dist/EpEdu-150e12cd.js +0 -5
  59. package/dist/EpFlex-560db674.js +0 -5
  60. package/dist/EpHeader-532d0627.js +0 -5
  61. package/dist/EpIcon-47a3f19c.js +0 -5
  62. package/dist/EpIframe-8f71f906.js +0 -5
  63. package/dist/EpLineChart-0e5b5b2c.js +0 -5
  64. package/dist/EpLink-2d03f1e3.js +0 -5
  65. package/dist/EpLinkVersion-3bd4d934.js +0 -5
  66. package/dist/EpModal-b7d1789b.js +0 -5
  67. package/dist/EpPieChart-c8a803ad.js +0 -5
  68. package/dist/EpQuestion-1357ab62.js +0 -5
  69. package/dist/EpQuote-a7694dad.js +0 -5
  70. package/dist/EpRadio-c42aa3f5.js +0 -5
  71. package/dist/EpReading-cb2281dc.js +0 -5
  72. package/dist/EpResource-ed07a0f9.js +0 -5
  73. package/dist/EpScope-7a2308ab.js +0 -5
  74. package/dist/EpSection-6fbace66.js +0 -5
  75. package/dist/EpSoftware-03bf7edb.js +0 -5
  76. package/dist/EpSpinner-bbf4e53b.js +0 -5
  77. package/dist/EpSvg-fb389a78.js +0 -5
  78. package/dist/EpTable-90199b35.js +0 -5
  79. package/dist/EpTerm-7fc07a5f.js +0 -5
  80. package/dist/EpText-f5b15542.js +0 -5
  81. package/dist/EpTimeLine-64f3bcd6.js +0 -5
  82. package/dist/EpVideo-9c55fc1d.js +0 -5
  83. package/dist/EpVideoPanopto-2f5be5a0.js +0 -5
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .modal-mask{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;transition:opacity .3s ease}.modal-container{margin:auto;max-height:95%;transition:all .3s ease;z-index:9999}.modal-header h3{margin-top:0;color:#42b983}.modal-body{margin:20px 0}.modal-default-button{float:right}.modal-enter-from,.modal-leave-to{opacity:0}.modal-enter-from .modal-container,.modal-leave-to .modal-container{transform:scale(1.1)}.content[data-v-ab122c9c]{max-height:0;overflow:hidden}.custom_index{z-index:9999;position:absolute;right:12rem}.h-custom{height:30rem}.p-custom p{margin-bottom:1em}.v-enter-active[data-v-049ea2df],.v-leave-active[data-v-049ea2df]{transition:opacity .5s ease}.v-enter-from[data-v-049ea2df],.v-leave-to[data-v-049ea2df]{opacity:0}.katex[data-v-24ff8b28]{font-size:1.3em}.content[data-v-523dedc7]{max-height:0;overflow:hidden}.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}
1
+ .content[data-v-ab122c9c]{max-height:0;overflow:hidden}.modal-mask{position:fixed;z-index:9998;top:0;left:0;width:100%;height:100%;background-color:#00000080;display:flex;transition:opacity .3s ease}.modal-container{margin:auto;max-height:95%;transition:all .3s ease;z-index:9999}.modal-header h3{margin-top:0;color:#42b983}.modal-body{margin:20px 0}.modal-default-button{float:right}.modal-enter-from,.modal-leave-to{opacity:0}.modal-enter-from .modal-container,.modal-leave-to .modal-container{transform:scale(1.1)}.custom_index{z-index:9999;position:absolute;right:12rem}.h-custom{height:30rem}.p-custom p{margin-bottom:1em}.v-enter-active[data-v-049ea2df],.v-leave-active[data-v-049ea2df]{transition:opacity .5s ease}.v-enter-from[data-v-049ea2df],.v-leave-to[data-v-049ea2df]{opacity:0}.katex[data-v-24ff8b28]{font-size:1.3em}.content[data-v-523dedc7]{max-height:0;overflow:hidden}.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ep-lib-ts",
3
3
  "private": false,
4
- "version": "0.1.19",
4
+ "version": "0.1.21",
5
5
  "files": [
6
6
  "dist",
7
7
  "src/components/"
@@ -1,102 +1,103 @@
1
1
  <script setup lang="ts">
2
- import { computed, defineComponent, toRefs } from 'vue';
3
- import { isHtml } from '../../composables/isHtml';
4
- import {useMarkdown} from '../../composables/useMarkdown'
5
- import EpTerm from '../medias/EpTerm.vue'
6
- import EpAccordeon from '../interactions/EpAccordeon.vue';
2
+ import { computed, toRefs, h } from "vue";
3
+ import { isHtml } from "../../composables/isHtml";
4
+ import { useMarkdown } from "../../composables/useMarkdown";
5
+ import EpAccordeon from "../interactions/EpAccordeon.vue";
6
+ import EpTerm from "../medias/EpTerm.vue";
7
7
 
8
8
  interface Props {
9
- glossary?:any[];
10
- content:string;
11
- title?:string|null;
12
- compact?:boolean;
9
+ glossary?: any[];
10
+ content: string;
11
+ title?: string | null;
12
+ compact?: boolean;
13
13
  }
14
14
 
15
- const props = withDefaults(defineProps<Props>(),{
16
- compact:false,
17
- })
15
+ const props = withDefaults(defineProps<Props>(), {
16
+ compact: false,
17
+ });
18
18
 
19
- const renderTitle = computed(()=>{
20
- if(!props.title){
21
- return "En savoir plus"
19
+ const renderTitle = computed(() => {
20
+ if (!props.title) {
21
+ return "En savoir plus";
22
22
  }
23
- return props.title
24
- })
23
+ return props.title;
24
+ });
25
25
 
26
- const renderText = computed(()=>{
27
- if(!props.content){
28
- return `<div></div>`
29
- }
30
- if(!isHtml(props.content)){
31
- return useMarkdown(props.content)
32
- }
33
- //return props.content
34
- //create a div
35
- const div = document.createElement('DIV')
36
- ///add the html input to the div
37
- div.innerHTML = props.content.trim()
38
- ///get strign of html
39
- let newStr = div.outerHTML
40
- //find all span.ep_glossary_item to know the glossary terms in the text
41
- const glossaryTerms = div.querySelectorAll('.ep_glossary_item')
42
- // console.log(glossaryTerms)
43
- //if find glossary terms
44
- if(glossaryTerms.length > 0){
45
- ///check every term and replace it
46
- glossaryTerms.forEach((item)=>{
47
- //get id
48
- const id = item.getAttribute("data-id")
49
- //get content text
50
- const render_word = item.innerHTML
51
- //find in the glossary their equivalent
52
- let _glossary = []
53
- if(props.glossary){
54
- _glossary = props.glossary
55
- }
56
- const term = _glossary.find(word => word.id === id)
57
- //if was found
58
- if(term){
59
- ///add the new values to the array
60
- const word = item.outerHTML
61
- //check if the term has relations
62
- const foundedRelations = _glossary.filter((x) =>
63
- x.relation.some((item:string) => {
64
- return item == id;
65
- })
66
- );
67
- //get relations id and term
68
- const idsRelation = foundedRelations.map((x) => x.id);
69
- const termsRelation = foundedRelations.map((x) => x.term);
70
- const variation = term.variation
71
- const hasImge = term.src ? term.src : ''
72
- //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>`
73
- const replaceWord = ` <EpTerm term="${term.term}" word="${render_word}" variations="${variation}" graminfo="${term.graminfo}" src='${hasImge}' domain="${term.domain}" relations="${termsRelation}" idrelation="${idsRelation}"> ${term.definition} </EpTerm> `
74
- //replace output string
75
- newStr = newStr.replace(word, replaceWord)
76
- }
77
- })
26
+ const renderText = computed(() => {
27
+ if (!props.content) {
28
+ return `<div></div>`;
29
+ }
30
+ if (!isHtml(props.content)) {
31
+ return useMarkdown(props.content);
32
+ }
33
+ //return props.content
34
+ //create a div
35
+ const div = document.createElement("DIV");
36
+ ///add the html input to the div
37
+ div.innerHTML = props.content.trim();
38
+ ///get strign of html
39
+ let newStr = div.outerHTML;
40
+ //find all span.ep_glossary_item to know the glossary terms in the text
41
+ const glossaryTerms = div.querySelectorAll(".ep_glossary_item");
42
+ // console.log(glossaryTerms)
43
+ //if find glossary terms
44
+ if (glossaryTerms.length > 0) {
45
+ ///check every term and replace it
46
+ glossaryTerms.forEach((item) => {
47
+ //get id
48
+ const id = item.getAttribute("data-id");
49
+ //get content text
50
+ const render_word = item.innerHTML;
51
+ //find in the glossary their equivalent
52
+ let _glossary = [];
53
+ if (props.glossary) {
54
+ _glossary = props.glossary;
78
55
  }
79
- div.innerHTML = newStr
80
- // console.log(div.innerHTML)
81
- return div.innerHTML;
82
- })
83
-
56
+ const term = _glossary.find((word) => word.id === id);
57
+ //if was found
58
+ if (term) {
59
+ ///add the new values to the array
60
+ const word = item.outerHTML;
61
+ //check if the term has relations
62
+ const foundedRelations = _glossary.filter((x) =>
63
+ x.relation.some((item: string) => {
64
+ return item == id;
65
+ })
66
+ );
67
+ //get relations id and term
68
+ const idsRelation = foundedRelations.map((x) => x.id);
69
+ const termsRelation = foundedRelations.map((x) => x.term);
70
+ const variation = term.variation;
71
+ const hasImge = term.src ? term.src : "";
72
+ //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>`
73
+ const replaceWord = ` <EpTerm term="${term.term}" word="${render_word}" variations="${variation}" graminfo="${term.graminfo}" src='${hasImge}' domain="${term.domain}" relations="${termsRelation}" idrelation="${idsRelation}"> ${term.definition} </EpTerm> `;
74
+ //replace output string
75
+ newStr = newStr.replace(word, replaceWord);
76
+ }
77
+ });
78
+ }
79
+ div.innerHTML = newStr;
80
+ // console.log(div.innerHTML)
81
+ return div.innerHTML;
82
+ });
84
83
 
85
- const customRenderStringComponents = defineComponent({
86
- components:{
87
- 'epterm':EpTerm
84
+ const render = () => {
85
+ const r = {
86
+ components: {
87
+ epterm: EpTerm,
88
88
  },
89
- template:`<div>${renderText.value}</div>`
90
- })
89
+ template: `<div>${renderText.value}</div>`,
90
+ };
91
91
 
92
- const {compact} = toRefs(props)
92
+ return h(r);
93
+ };
93
94
 
95
+ const { compact } = toRefs(props);
94
96
  </script>
95
97
 
96
98
  <template>
97
- <component v-if="!compact" :is="customRenderStringComponents"></component>
99
+ <render v-if="!compact"></render>
98
100
  <EpAccordeon outlined :title="renderTitle" v-else>
99
- <component :is="customRenderStringComponents"></component>
101
+ <render></render>
100
102
  </EpAccordeon>
101
- <!-- <component v-else :is="renderText"></component> -->
102
- </template>
103
+ </template>
@@ -1,5 +0,0 @@
1
- import { L as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { M as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { I as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { y as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { b as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { n as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { c as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { d as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { e as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { v as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { q as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { g as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { J as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { h as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { z as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { o as a } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- a as default
5
- };
@@ -1,5 +0,0 @@
1
- import { A as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { B as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { w as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { p as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { x as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { K as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { u as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { a as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { r as a } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- a as default
5
- };
@@ -1,5 +0,0 @@
1
- import { s as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { j as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { C as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { k as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { D as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { l as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { E as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { m as a } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- a as default
5
- };
@@ -1,5 +0,0 @@
1
- import { F as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { G as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };
@@ -1,5 +0,0 @@
1
- import { H as m } from "./index-6479cc61.js";
2
- import "vue";
3
- export {
4
- m as default
5
- };