ep-lib-ts 1.0.46 → 1.0.48

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 (156) hide show
  1. package/dist/BgAudio-kLycvFEF.js +4 -0
  2. package/dist/Details-Op3Zkhcg.js +4 -0
  3. package/dist/DisplayBox-DGsKoxmr.js +4 -0
  4. package/dist/{Ep360Image-CQJBPImD.js → Ep360Image-DHK_IWTi.js} +1 -1
  5. package/dist/{Ep360Video-CL_7mOiQ.js → Ep360Video-C4PekHTc.js} +1 -1
  6. package/dist/EpAlert-aWrJokXa.js +4 -0
  7. package/dist/EpAudio-DGFoC0Go.js +4 -0
  8. package/dist/EpAvatar-1yU-OXsu.js +4 -0
  9. package/dist/EpBadge-BlIhFCIg.js +4 -0
  10. package/dist/EpBarChart-KgYdXvMq.js +4 -0
  11. package/dist/EpBtn-S1mCeeV7.js +4 -0
  12. package/dist/EpCard-COy2GODb.js +4 -0
  13. package/dist/EpCardLink-SBppyTrI.js +4 -0
  14. package/dist/EpChip-CNRaxrjP.js +4 -0
  15. package/dist/EpCodeblock-NyXHH5gD.js +4 -0
  16. package/dist/EpConclusion-CUWiK_nt.js +4 -0
  17. package/dist/EpContentSlider-mpqkd2T2.js +4 -0
  18. package/dist/{EpDarkmode-DyUrMSO5.js → EpDarkmode-C5NMN4h2.js} +1 -1
  19. package/dist/EpDescription-Dewh9Bmr.js +4 -0
  20. package/dist/EpDivider-C_cgaXNK.js +4 -0
  21. package/dist/EpDocument-CmN-KUVt.js +4 -0
  22. package/dist/{EpDraggable-CTWqRQzE.js → EpDraggable-BwpIpRyf.js} +74 -74
  23. package/dist/EpEdu-BRXEfH5H.js +4 -0
  24. package/dist/EpFlex-UUXOmWtZ.js +4 -0
  25. package/dist/EpFunnelChart-DgkcR1ON.js +4 -0
  26. package/dist/EpHeader-DeiRUZRl.js +4 -0
  27. package/dist/EpHover-BKK7j48J.js +4 -0
  28. package/dist/EpHoverCard-6ZKNpNBq.js +4 -0
  29. package/dist/EpIcon-C3jjducH.js +4 -0
  30. package/dist/EpIframe-CoaO5gb_.js +4 -0
  31. package/dist/EpImg-iypQu6WK.js +4 -0
  32. package/dist/EpImgCarousel-vagns6kd.js +4 -0
  33. package/dist/{EpInput-CGnN-piP.js → EpInput-uDeg10dD.js} +30 -30
  34. package/dist/EpInstructions-C2JYulUa.js +4 -0
  35. package/dist/EpIntroduction-BJXDxfYV.js +4 -0
  36. package/dist/EpLineChart-BVlswUIa.js +4 -0
  37. package/dist/EpLink-DPR3gH7f.js +4 -0
  38. package/dist/EpLinkVersion-DqQvfQQT.js +4 -0
  39. package/dist/{EpList-C8uaLum6.js → EpList-BI7oPTHl.js} +1 -1
  40. package/dist/EpModal-DN-QQzrQ.js +4 -0
  41. package/dist/{EpNothing-DxfGfasN.js → EpNothing-z596jG9D.js} +1 -1
  42. package/dist/EpObjective-sNcUzMGj.js +4 -0
  43. package/dist/EpPieChart-CCgGmemH.js +4 -0
  44. package/dist/EpQuestion-DJ-1vSS6.js +4 -0
  45. package/dist/EpQuote-BWRF6A-L.js +4 -0
  46. package/dist/EpRadio-BLbK_ijo.js +4 -0
  47. package/dist/EpRadioSummative-BtiAeyHR.js +4 -0
  48. package/dist/EpReading-C78Icl4m.js +4 -0
  49. package/dist/EpResource-C_JQvg2g.js +4 -0
  50. package/dist/EpScope-D1e7l9RQ.js +4 -0
  51. package/dist/EpSection-C9VobPvp.js +4 -0
  52. package/dist/EpSectionCols-D9DqSfNG.js +4 -0
  53. package/dist/EpSkeleton-Cc3nfQlv.js +4 -0
  54. package/dist/EpSoftware-Bga9b4WM.js +4 -0
  55. package/dist/EpSpecificObjective-C9MHA7ez.js +4 -0
  56. package/dist/EpSpinner-BOpURQEs.js +4 -0
  57. package/dist/EpStackedList-BdIF2Obj.js +4 -0
  58. package/dist/EpSummativeTable-BTLrKIHA.js +4 -0
  59. package/dist/EpSvg-CJfC1DMY.js +4 -0
  60. package/dist/EpSvgShow-SnjMv4b2.js +4 -0
  61. package/dist/EpTable--hx3As1M.js +4 -0
  62. package/dist/EpTerm-l4uolPHU.js +4 -0
  63. package/dist/EpText-Dvi-oAJe.js +4 -0
  64. package/dist/EpTimeLine-BeRMD8rW.js +4 -0
  65. package/dist/EpVideo-D4DR93ep.js +4 -0
  66. package/dist/EpVideoPanopto-CVjjy9Nn.js +4 -0
  67. package/dist/EpWordDef-DRBqhyxR.js +4 -0
  68. package/dist/TextMedia-LKMaVja3.js +4 -0
  69. package/dist/components/educationals/EpBranchingScenario.vue.d.ts +43 -5
  70. package/dist/components/educationals/EpDocument.vue.d.ts +44 -0
  71. package/dist/components/interactions/EpSvgShow.vue.d.ts +0 -1
  72. package/dist/components/medias/EpHierarchy.vue.d.ts +51 -0
  73. package/dist/components/medias/EpSoftware.vue.d.ts +0 -1
  74. package/dist/components/tools/Details.vue.d.ts +36 -0
  75. package/dist/components/tools/TextMedia.vue.d.ts +25 -0
  76. package/dist/ep-lib-ts.js +44 -40
  77. package/dist/ep-lib-ts.umd.cjs +212 -212
  78. package/dist/{index-IdtPmXeP.js → index-CO05CQPt.js} +461 -514
  79. package/dist/{index-D5QYJLNE.js → index-DH1gIdAA.js} +1 -1
  80. package/dist/{index-FmXc2ivj.js → index-DeiLPw0s.js} +10876 -7941
  81. package/dist/index.d.ts +5 -1
  82. package/dist/{prism-D-x8E1YK.js → prism-BvbRGWPO.js} +1 -1
  83. package/dist/style.css +1 -1
  84. package/dist/{three.module-CWLs6nMo.js → three.module-B-oqC8Xk.js} +1 -1
  85. package/dist/types/Component.d.ts +7 -0
  86. package/dist/types/Hierarchy.d.ts +14 -0
  87. package/package.json +11 -1
  88. package/src/components/basics/EpBtn.vue +1 -1
  89. package/src/components/educationals/EpBranchingScenario.vue +202 -124
  90. package/src/components/educationals/EpDocument.vue +92 -0
  91. package/src/components/interactions/EpContentSlider.vue +1 -1
  92. package/src/components/interactions/EpDraggable.vue +4 -4
  93. package/src/components/interactions/EpSvgShow.vue +66 -66
  94. package/src/components/medias/EpHierarchy.vue +345 -0
  95. package/src/components/medias/EpSoftware.vue +1 -2
  96. package/src/components/tools/Details.vue +46 -0
  97. package/src/components/tools/TextMedia.vue +34 -0
  98. package/dist/BgAudio-ryf2FIxF.js +0 -4
  99. package/dist/DisplayBox-ky90shjr.js +0 -4
  100. package/dist/EpAlert-BUiXiWRL.js +0 -4
  101. package/dist/EpAudio-CkZrkt3Z.js +0 -4
  102. package/dist/EpAvatar-2ZL5g8-2.js +0 -4
  103. package/dist/EpBadge-vOdZrc0e.js +0 -4
  104. package/dist/EpBarChart-CUUaOMsS.js +0 -4
  105. package/dist/EpBranchingScenario-DT2VQz7o.js +0 -160
  106. package/dist/EpBtn-DD0ykcYq.js +0 -4
  107. package/dist/EpCard-Qgkskboo.js +0 -4
  108. package/dist/EpCardLink-BfTUOLcA.js +0 -4
  109. package/dist/EpChip-P7j6l0PH.js +0 -4
  110. package/dist/EpCodeblock-DpzMd_h0.js +0 -4
  111. package/dist/EpConclusion-BRBOGFVk.js +0 -4
  112. package/dist/EpContentSlider-KFhPqR1h.js +0 -4
  113. package/dist/EpDescription-CcdsFWCf.js +0 -4
  114. package/dist/EpDivider-C30UAjvv.js +0 -4
  115. package/dist/EpEdu-CApC3SiS.js +0 -4
  116. package/dist/EpFlex-Dgc5dinh.js +0 -4
  117. package/dist/EpFunnelChart-Xm34GDMu.js +0 -4
  118. package/dist/EpHeader-DSKKm621.js +0 -4
  119. package/dist/EpHover-KHdqQJ6y.js +0 -4
  120. package/dist/EpHoverCard-Ccl2Un2s.js +0 -4
  121. package/dist/EpIcon-Eezd-EUx.js +0 -4
  122. package/dist/EpIframe-CmEsIYyW.js +0 -4
  123. package/dist/EpImg-BV_rS7v3.js +0 -4
  124. package/dist/EpImgCarousel-BHade9dP.js +0 -4
  125. package/dist/EpInstructions-A6ajkYEJ.js +0 -4
  126. package/dist/EpIntroduction-BY39wrQW.js +0 -4
  127. package/dist/EpLineChart-DQNIlO9r.js +0 -4
  128. package/dist/EpLink-BdxmUlWG.js +0 -4
  129. package/dist/EpLinkVersion-BAsA6tzp.js +0 -4
  130. package/dist/EpModal-DIEKXVnQ.js +0 -4
  131. package/dist/EpObjective-DwnP_7Zm.js +0 -4
  132. package/dist/EpPieChart-DmcML2d-.js +0 -4
  133. package/dist/EpQuestion-D7-nzMHE.js +0 -4
  134. package/dist/EpQuote-Cb5Ty6Ec.js +0 -4
  135. package/dist/EpRadio-9V6iAh4n.js +0 -4
  136. package/dist/EpRadioSummative-BL2YhCK3.js +0 -4
  137. package/dist/EpReading-DTWjzj6l.js +0 -4
  138. package/dist/EpResource-ZMfXpSqf.js +0 -4
  139. package/dist/EpScope-1aCF0beo.js +0 -4
  140. package/dist/EpSection-C-GaZN4R.js +0 -4
  141. package/dist/EpSectionCols-ap4Z5x7P.js +0 -4
  142. package/dist/EpSkeleton-DQUHmKio.js +0 -4
  143. package/dist/EpSoftware-DdF8BdqQ.js +0 -4
  144. package/dist/EpSpecificObjective-44uQGH3u.js +0 -4
  145. package/dist/EpSpinner-DHU8EZRf.js +0 -4
  146. package/dist/EpStackedList-BBGlTBx6.js +0 -4
  147. package/dist/EpSummativeTable-Cz4gcxHT.js +0 -4
  148. package/dist/EpSvg-Dk_q0cGB.js +0 -4
  149. package/dist/EpSvgShow-Cb_Y5UGq.js +0 -54
  150. package/dist/EpTable-Cg3-lRZY.js +0 -4
  151. package/dist/EpTerm-CRkB0QyE.js +0 -4
  152. package/dist/EpText-Dj93fveo.js +0 -4
  153. package/dist/EpTimeLine-Cit4tc3F.js +0 -4
  154. package/dist/EpVideo-1obD7bUC.js +0 -4
  155. package/dist/EpVideoPanopto-DzkzWyOF.js +0 -4
  156. package/dist/EpWordDef-DIjwoqzN.js +0 -4
package/dist/index.d.ts CHANGED
@@ -28,12 +28,15 @@ import { default as EpInstructions } from './components/educationals/EpInstructi
28
28
  import { default as EpDescription } from './components/educationals/EpDescription.vue';
29
29
  import { default as EpConclusion } from './components/educationals/EpConclusion.vue';
30
30
  import { default as EpCodeblock } from './components/educationals/EpCodeblock.vue';
31
+ import { default as EpBranchingScenario } from './components/educationals/EpBranchingScenario.vue';
32
+ import { default as EpDocument } from './components/educationals/EpDocument.vue';
31
33
  import { default as EpAccordeon } from './components/interactions/EpAccordeon.vue';
32
34
  import { default as EpContentSlider } from './components/interactions/EpContentSlider.vue';
33
35
  import { default as EpModal } from './components/interactions/EpModal.vue';
34
36
  import { default as EpQuestion } from './components/interactions/EpQuestion.vue';
35
37
  import { default as EpTabs } from './components/interactions/EpTabs.vue';
36
38
  import { default as EpSummativeTable } from './components/interactions/EpSummativeTable.vue';
39
+ import { default as EpSvgShow } from './components/interactions/EpSvgShow.vue';
37
40
  import { default as EpAudio } from './components/medias/EpAudio.vue';
38
41
  import { default as EpCarousel } from './components/medias/EpCarousel.vue';
39
42
  import { default as EpIframe } from './components/medias/EpIframe.vue';
@@ -48,9 +51,10 @@ import { default as EpVideo } from './components/medias/EpVideo.vue';
48
51
  import { default as EpVideoPanopto } from './components/medias/EpVideoPanopto.vue';
49
52
  import { default as EpWordDef } from './components/medias/EpWordDef.vue';
50
53
  import { default as EpCardLink } from './components/medias/EpCardLink.vue';
54
+ import { default as EpHierarchy } from './components/medias/EpHierarchy.vue';
51
55
  import { default as EpAlert } from './components/signages/EpAlert.vue';
52
56
  import { default as EpHeader } from './components/signages/EpHeader.vue';
53
57
  import { default as EpQuote } from './components/signages/EpQuote.vue';
54
58
  import { default as EpSkeleton } from './components/signages/EpSkeleton.vue';
55
59
 
56
- export { EpBadge, EpBtn, EpCard, EpChip, EpDivider, EpFlex, EpIcon, EpImg, EpSection, EpSpinner, EpTable, EpBarChart, EpLineChart, EpPieChart, EpFunnelChart, EpText, EpEdu, EpReading, EpResource, EpScope, EpAccordeon, EpContentSlider, EpModal, EpQuestion, EpTabs, EpAudio, EpCarousel, EpIframe, EpKatex, EpLink, EpLinkVersion, EpSoftware, EpSvg, EpTerm, EpTimeLine, EpVideo, EpVideoPanopto, EpAlert, EpHeader, EpQuote, EpSkeleton, EpWordDef, EpSummativeTable, EpObjective, EpSpecificObjective, EpIntroduction, EpInstructions, EpDescription, EpConclusion, EpCodeblock, EpSectionCols, EpCardLink, EpStackedList, EpHoverCard };
60
+ export { EpBadge, EpBtn, EpCard, EpChip, EpDivider, EpFlex, EpIcon, EpImg, EpSection, EpSpinner, EpTable, EpBarChart, EpLineChart, EpPieChart, EpFunnelChart, EpText, EpEdu, EpReading, EpResource, EpScope, EpAccordeon, EpContentSlider, EpModal, EpQuestion, EpTabs, EpAudio, EpCarousel, EpIframe, EpKatex, EpLink, EpLinkVersion, EpSoftware, EpSvg, EpTerm, EpTimeLine, EpVideo, EpVideoPanopto, EpAlert, EpHeader, EpQuote, EpSkeleton, EpWordDef, EpSummativeTable, EpObjective, EpSpecificObjective, EpIntroduction, EpInstructions, EpDescription, EpConclusion, EpCodeblock, EpSectionCols, EpCardLink, EpStackedList, EpHoverCard, EpBranchingScenario, EpSvgShow, EpHierarchy, EpDocument };
@@ -1,4 +1,4 @@
1
- import { aa as V, ab as W } from "./index-FmXc2ivj.js";
1
+ import { ac as V, ad as W } from "./index-DeiLPw0s.js";
2
2
  function ee(S, P) {
3
3
  for (var i = 0; i < P.length; i++) {
4
4
  const g = P[i];
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .content[data-v-3a321611]{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}pre{white-space:break-spaces}.shape{height:var(--57a4c52c);width:var(--32b5e5ba)}.v-enter-active[data-v-7e484601],.v-leave-active[data-v-7e484601]{transition:opacity .5s ease}.v-enter-from[data-v-7e484601],.v-leave-to[data-v-7e484601]{opacity:0}.katex[data-v-a5d595cd]{font-size:1.6em}.content[data-v-1ad88e28]{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)}@keyframes fade-22a86a44{0%{opacity:0}to{opacity:1}}@keyframes scale-22a86a44{0%{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}@keyframes slideY-22a86a44{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}.fade[data-v-22a86a44]{animation:fade-22a86a44 1s}.scale[data-v-22a86a44]{animation:scale-22a86a44 1s}.slideY[data-v-22a86a44]{animation:slideY-22a86a44 1s}.path-item[data-v-22a86a44]{position:relative}.path-item[data-v-22a86a44]:after{content:"";position:absolute;top:50%;right:100%;width:60px;height:4px;background-color:#374151}.arrow-light-top:before{content:" ";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:rgba(0,0,0,.2) transparent transparent transparent}.arrow-dark-top:before{content:" ";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:black transparent transparent transparent}.arrow-light-bottom:before{content:"";position:absolute;display:inline-block;left:50%;bottom:100%;border-right:7px solid transparent;border-bottom:7px solid #eee;border-left:7px solid transparent;border-bottom-color:#0003}.arrow-dark-bottom:before{content:"";position:absolute;display:inline-block;left:50%;bottom:100%;border-right:7px solid transparent;border-bottom:7px solid black;border-left:7px solid transparent;border-bottom-color:black transparent transparent transparent}.arrow-light-left:before{position:absolute;display:inline-block;left:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-left:5px solid #eee;border-bottom:5px solid transparent;border-left-color:#0003}.arrow-dark-left:before{position:absolute;display:inline-block;left:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-left:5px solid black;border-bottom:5px solid transparent;border-left-color:black transparent transparent transparent}.arrow-light-right:before{position:absolute;display:inline-block;right:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-right:5px solid #eee;border-bottom:5px solid transparent;border-right-color:#0003}.arrow-dark-right:before{position:absolute;display:inline-block;right:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-right:5px solid black;border-bottom:5px solid transparent;border-right-color:black transparent transparent transparent}
1
+ .content[data-v-3a321611]{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}pre{white-space:break-spaces}.tree-wrapper[data-v-bc317bc6]{overflow:auto;border:1px solid #ddd}.tree-container[data-v-bc317bc6]{width:100%;overflow-x:auto}@keyframes fade-1e22db06{0%{opacity:0}to{opacity:1}}@keyframes scale-1e22db06{0%{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}@keyframes slideY-1e22db06{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}.fade[data-v-1e22db06]{animation:fade-1e22db06 1s}.scale[data-v-1e22db06]{animation:scale-1e22db06 1s}.slideY[data-v-1e22db06]{animation:slideY-1e22db06 1s}.shape{height:var(--57a4c52c);width:var(--32b5e5ba)}.v-enter-active[data-v-7e484601],.v-leave-active[data-v-7e484601]{transition:opacity .5s ease}.v-enter-from[data-v-7e484601],.v-leave-to[data-v-7e484601]{opacity:0}.katex[data-v-a5d595cd]{font-size:1.6em}.content[data-v-1ad88e28]{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)}.arrow-light-top:before{content:" ";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:rgba(0,0,0,.2) transparent transparent transparent}.arrow-dark-top:before{content:" ";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:black transparent transparent transparent}.arrow-light-bottom:before{content:"";position:absolute;display:inline-block;left:50%;bottom:100%;border-right:7px solid transparent;border-bottom:7px solid #eee;border-left:7px solid transparent;border-bottom-color:#0003}.arrow-dark-bottom:before{content:"";position:absolute;display:inline-block;left:50%;bottom:100%;border-right:7px solid transparent;border-bottom:7px solid black;border-left:7px solid transparent;border-bottom-color:black transparent transparent transparent}.arrow-light-left:before{position:absolute;display:inline-block;left:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-left:5px solid #eee;border-bottom:5px solid transparent;border-left-color:#0003}.arrow-dark-left:before{position:absolute;display:inline-block;left:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-left:5px solid black;border-bottom:5px solid transparent;border-left-color:black transparent transparent transparent}.arrow-light-right:before{position:absolute;display:inline-block;right:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-right:5px solid #eee;border-bottom:5px solid transparent;border-right-color:#0003}.arrow-dark-right:before{position:absolute;display:inline-block;right:100%;top:50%;content:"";margin-right:0;border-top:5px solid transparent;border-right:5px solid black;border-bottom:5px solid transparent;border-right-color:black transparent transparent transparent}
@@ -12145,7 +12145,7 @@ class Mw extends ai {
12145
12145
  const t = this.geometry, e = this.pointMap, i = 1, r = 1;
12146
12146
  Me.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse);
12147
12147
  const s = this.camera.coordinateSystem === Wn ? -1 : 0;
12148
- Be("c", e, t, Me, 0, 0, s), Be("t", e, t, Me, 0, 0, 1), Be("n1", e, t, Me, -1, -1, s), Be("n2", e, t, Me, i, -1, s), Be("n3", e, t, Me, -1, r, s), Be("n4", e, t, Me, i, r, s), Be("f1", e, t, Me, -1, -1, 1), Be("f2", e, t, Me, i, -1, 1), Be("f3", e, t, Me, -1, r, 1), Be("f4", e, t, Me, i, r, 1), Be("u1", e, t, Me, i * 0.7, r * 1.1, s), Be("u2", e, t, Me, -1 * 0.7, r * 1.1, s), Be("u3", e, t, Me, 0, r * 2, s), Be("cf1", e, t, Me, -1, 0, 1), Be("cf2", e, t, Me, i, 0, 1), Be("cf3", e, t, Me, 0, -1, 1), Be("cf4", e, t, Me, 0, r, 1), Be("cn1", e, t, Me, -1, 0, s), Be("cn2", e, t, Me, i, 0, s), Be("cn3", e, t, Me, 0, -1, s), Be("cn4", e, t, Me, 0, r, s), t.getAttribute("position").needsUpdate = !0;
12148
+ Be("c", e, t, Me, 0, 0, s), Be("t", e, t, Me, 0, 0, 1), Be("n1", e, t, Me, -i, -r, s), Be("n2", e, t, Me, i, -r, s), Be("n3", e, t, Me, -i, r, s), Be("n4", e, t, Me, i, r, s), Be("f1", e, t, Me, -i, -r, 1), Be("f2", e, t, Me, i, -r, 1), Be("f3", e, t, Me, -i, r, 1), Be("f4", e, t, Me, i, r, 1), Be("u1", e, t, Me, i * 0.7, r * 1.1, s), Be("u2", e, t, Me, -i * 0.7, r * 1.1, s), Be("u3", e, t, Me, 0, r * 2, s), Be("cf1", e, t, Me, -i, 0, 1), Be("cf2", e, t, Me, i, 0, 1), Be("cf3", e, t, Me, 0, -r, 1), Be("cf4", e, t, Me, 0, r, 1), Be("cn1", e, t, Me, -i, 0, s), Be("cn2", e, t, Me, i, 0, s), Be("cn3", e, t, Me, 0, -r, s), Be("cn4", e, t, Me, 0, r, s), t.getAttribute("position").needsUpdate = !0;
12149
12149
  }
12150
12150
  dispose() {
12151
12151
  this.geometry.dispose(), this.material.dispose();
@@ -8,3 +8,10 @@ export interface ContentComponents {
8
8
  [key: string]: any;
9
9
  };
10
10
  }
11
+ export type NestedComponent = "EpSvg" | "EpImg";
12
+ export interface NestedComponents {
13
+ type: NestedComponent;
14
+ data: {
15
+ [key: string]: any;
16
+ };
17
+ }
@@ -0,0 +1,14 @@
1
+ import { NestedComponents } from './Component';
2
+
3
+ export interface TreeNode {
4
+ name: string;
5
+ children?: TreeNode[];
6
+ active?: boolean;
7
+ text?: string;
8
+ component?: NestedComponents;
9
+ }
10
+ type TailwindShade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
11
+ type TailwindColor = 'main-color' | 'primary' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose';
12
+ export type ColorPath = `stroke-${TailwindColor}-${TailwindShade}`;
13
+ export type ColorRect = `fill-${TailwindColor}-${TailwindShade}`;
14
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ep-lib-ts",
3
3
  "private": false,
4
- "version": "1.0.46",
4
+ "version": "1.0.48",
5
5
  "files": [
6
6
  "dist",
7
7
  "src/components/"
@@ -28,11 +28,21 @@
28
28
  "dependencies": {
29
29
  "@lottiefiles/dotlottie-vue": "^0.5.6",
30
30
  "@mdi/js": "^7.4.47",
31
+ "@types/d3-array": "^3.2.1",
32
+ "@types/d3-hierarchy": "^3.1.7",
33
+ "@types/d3-selection": "^3.0.11",
34
+ "@types/d3-shape": "^3.1.7",
35
+ "@types/d3-zoom": "^3.0.8",
31
36
  "@types/three": "^0.170.0",
32
37
  "@vueuse/core": "^10.9.0",
33
38
  "@wdns/vue-code-block": "^2.3.3",
34
39
  "aframe": "^1.6.0",
35
40
  "apexcharts": "3.53.0",
41
+ "d3-array": "^3.2.4",
42
+ "d3-hierarchy": "^3.1.2",
43
+ "d3-selection": "^3.0.0",
44
+ "d3-shape": "^3.2.0",
45
+ "d3-zoom": "^3.0.0",
36
46
  "katex": "^0.16.11",
37
47
  "markdown-it": "^14.1.0",
38
48
  "postcss-cli": "^11.0.0",
@@ -80,7 +80,7 @@ const { disabled, prependIcon, appendIcon } = toRefs(props);
80
80
  <slot></slot>
81
81
  <EpIcon v-if="appendIcon" :iconPath="appendIcon" :size="sizeIcon" extraClass="ml-2"></EpIcon>
82
82
  </button>
83
- <a :class="`${styles} text-center inline-block`" :disabled="disabled" :href="href" target="_blank" v-else>
83
+ <a :class="`${styles} flex justify-center items-center`" :disabled="disabled" :href="href" target="_blank" v-else>
84
84
  <EpIcon v-if="prependIcon" :iconPath="prependIcon" :size="sizeIcon" extraClass="mr-2"></EpIcon>
85
85
  <slot></slot>
86
86
  <EpIcon v-if="appendIcon" :iconPath="appendIcon" :size="sizeIcon" extraClass="ml-2"></EpIcon>
@@ -2,8 +2,15 @@
2
2
 
3
3
  import { ref, computed } from "vue";
4
4
  import { useRenderText } from '../../composables/useRenderText';
5
+ import type { NestedComponents } from "../../types/Component";
6
+ import type { TreeNode, ColorPath, ColorRect } from "../../types/Hierarchy";
5
7
  import EpIcon from '../../components/basics/EpIcon.vue';
8
+ import Details from "../tools/Details.vue";
9
+ import EpModal from "../interactions/EpModal.vue";
10
+ import EpHierarchy from "../medias/EpHierarchy.vue";
11
+ import EpBtn from "../basics/EpBtn.vue";
6
12
  import { mdiArrowLeft } from "@mdi/js";
13
+ import TextMedia from "../tools/TextMedia.vue";
7
14
 
8
15
 
9
16
  // Defining the props
@@ -11,174 +18,262 @@ import { mdiArrowLeft } from "@mdi/js";
11
18
  interface Option {
12
19
  name: string;
13
20
  question: string;
14
- imgSrc?: string;
21
+ media?:NestedComponents;
15
22
  options?: Option[];
16
23
  }
17
24
 
18
25
  interface Props {
19
- scenarioTitle: string;
26
+ title: string;
27
+ media?:NestedComponents;
20
28
  initialInstruction?: string | null;
21
29
  generalFeedback?: string;
22
30
  bgColor?: string;
31
+
23
32
  decisionTree: {
24
- rootQuestion: string;
25
- imgSrc?: string;
26
- options: Option[];
33
+ name: string;
34
+ question:string;
35
+ media?: NestedComponents;
36
+ options?: Option[];
27
37
  };
28
38
  transitionAnimation?: "fade" | "scale" | "slideY";
39
+ labelStart?:string;
40
+ labelFinish?:string;
41
+ labelYourPath?:string;
42
+ labelShowFullPath?:string;
43
+ labelClose?:string;
44
+ labelRestart?:string;
45
+ colorPath?:ColorPath;
46
+ colorRect?:ColorRect;
47
+ isCluster?:boolean
29
48
  }
30
49
 
31
-
32
50
  const props = withDefaults(defineProps<Props>(), {
33
51
  initialInstruction: null,
34
- transitionAnimation: "fade"
52
+ transitionAnimation: "fade",
53
+ labelFinish:"Vous avez terminé le scénario!",
54
+ labelYourPath:"Votre parcours",
55
+ labelShowFullPath:"Voir le parcours au complet",
56
+ labelClose:"Fermer",
57
+ labelRestart:"Recommencer",
58
+ labelStart:"Commencer",
59
+ colorRect:'fill-main-color-400',
60
+ colorPath:'stroke-yellow-400'
35
61
  });
36
62
 
37
63
 
38
- // The necessary references to keep track of the evolution
39
-
40
- const itinerary = ref<number[]>([]);
41
-
42
- const currentSlide = ref(0);
43
- const currentOption = ref<null | any>(null);
64
+ const showPath = ref(false)
65
+ const path = ref<Option[]>([])
66
+ const userPath = ref<TreeNode|null>(null)
67
+ const currentOption = ref<Option | null>(null);
44
68
 
45
69
 
46
70
  // Manage the introductory part
47
71
  const isIntroductoryPart = ref(true);
48
72
 
49
- // Get the option from the itinerary
50
- const getOptionFromItinerary = (itinerary: number[]) => {
51
- let option: any = props.decisionTree;
52
- if (itinerary.length > 0) {
53
- for (let i = 0; i < itinerary.length; i++) {
54
- option = option.options[itinerary[i]];
55
- }
56
- }
57
-
58
-
59
- return (option !== props.decisionTree)? option : null;
60
- };
73
+ const start = () => {
74
+ isIntroductoryPart.value = false
75
+ currentOption.value = props.decisionTree
76
+ }
61
77
 
62
78
 
63
79
 
64
80
  // Return function
65
-
66
81
  const goToPrevious = () => {
67
- if(notTheEnd.value){
68
- if(itinerary.value.length === 0) {
82
+ //if(notTheEnd.value){
83
+ if(path.value.length === 0) {
69
84
  isIntroductoryPart.value = true;
85
+ currentOption.value = null;
86
+ return
70
87
  }
71
88
 
72
- itinerary.value.pop();
73
- currentOption.value = getOptionFromItinerary(itinerary.value);
74
- currentSlide.value = itinerary.value.length;
75
- }
76
- };
77
-
78
- // Verifying if we are at the end
79
- const notTheEnd = computed(() => {
80
- return currentSlide.value === 0 || (currentOption.value && currentOption.value.options && currentOption.value.options.length > 0);
81
- });
82
-
89
+ path.value.pop();
90
+ // Get the previous option in the path
91
+ const lastOption = path.value[path.value.length - 1];
83
92
 
93
+ if (lastOption) {
94
+ currentOption.value = lastOption;
95
+ } else {
96
+ currentOption.value = props.decisionTree;
97
+ }
98
+ };
84
99
 
85
100
  // Restart function
86
101
  const restart = () => {
87
- currentSlide.value = 0;
102
+ //currentSlide.value = 0;
88
103
  currentOption.value = null;
89
- itinerary.value = [];
90
104
  isIntroductoryPart.value = true;
105
+ path.value = []
91
106
  };
92
107
 
93
108
 
94
109
 
95
- // Function to get the choices made based on the itinerary
96
- const getChoices = (itinerary: number[]) => {
97
- let choices: any[] = [{question: props.decisionTree.rootQuestion, choice: props.decisionTree.options[itinerary[0]].name}];
98
- let option: any = props.decisionTree.options[itinerary[0]];
99
- if (itinerary.length > 1) {
100
- for (let i = 1; i < itinerary.length; i++) {
101
- let question: string = option.question;
102
- option = option.options[itinerary[i]];
103
- choices.push({question, choice: option.name});
104
- }
105
- }
110
+ const nextSlide = (option:Option) => {
111
+ //currentSlide.value++
112
+ path.value.push(option)
113
+ if (option.options && option.options.length > 0) {
114
+ currentOption.value = option; // drill into next level
115
+ } else {
116
+ currentOption.value = null; // reached the end (leaf node)
117
+ userPath.value = convertOptionToTreeNode(props.decisionTree, path.value);
118
+ }
119
+ }
106
120
 
107
- return choices;
108
- };
109
121
 
122
+ //helper function
123
+ function convertOptionToTreeNode(option: Option, path: Option[]): TreeNode {
124
+ const isActive = path.includes(option);
110
125
 
126
+ return {
127
+ name: option.name,
128
+ text: option.question,
129
+ component: option.media,
130
+ active: isActive,
131
+ children: option.options?.map(child => convertOptionToTreeNode(child, path))
132
+ };
133
+ }
111
134
 
112
- </script>
113
135
 
114
- <template>
115
- <div>
136
+ //styles computed
116
137
 
117
- <!-- The introductory part -->
118
- <div v-if="isIntroductoryPart" class="m-4 mx-auto w-2/3 bg-gray-200 dark:bg-slate-800 rounded-md flex flex-col items-center justify-around p-4 fade" :style="{ minHeight: '500px', backgroundColor: bgColor }">
119
- <h1 class="font-bold text-3xl">{{ scenarioTitle }}</h1>
120
- <div class="text-center min-w-max m-3 flex flex-col items-center gap-3" v-if="initialInstruction" v-html="useRenderText(initialInstruction)"></div>
121
- <button class="rounded bg-blue-500 text-white py-2 px-4 min-w-28 my-3" @click="isIntroductoryPart = false">Commencer</button>
122
- </div>
138
+ const gridStyle = computed(()=>{
139
+ if(currentOption.value &&
140
+ currentOption.value.options &&
141
+ currentOption.value.options?.length <= 2) {
142
+ return 'grid-cols-2'
143
+ }
144
+ return 'grid-cols-3'
145
+ })
123
146
 
147
+ const currentLengthOptions = computed(()=> {
148
+ if(currentOption.value && currentOption.value.options){
149
+ return currentOption.value.options.length
150
+ }
151
+ return 0
152
+ })
124
153
 
125
- <div class="m-4 mx-auto w-2/3 rounded-md flex flex-col p-4 bg-gray-200 dark:bg-slate-800" :style="{ minHeight: '500px', backgroundColor: bgColor }" v-else>
126
- <!-- Return button -->
127
- <div><button :class="`rounded bg-blue-500 text-white py-2 px-4 m-2 ${transitionAnimation}`" v-if="notTheEnd" @click="goToPrevious">
128
- <EpIcon :icon-path="mdiArrowLeft" size="25"></EpIcon>
129
- </button></div>
130
154
 
131
- <!-- First question -->
132
- <div :class="`flex-grow flex flex-col items-center justify-around ${transitionAnimation}`" v-if="currentSlide === 0">
133
- <div class="text-center min-w-max m-3 flex flex-col items-center gap-3" v-html="useRenderText(decisionTree.rootQuestion)"></div>
134
- <img v-if="decisionTree.imgSrc" :src="decisionTree.imgSrc" class="rounded" width="200" />
135
- <div :class="`w-full justify-items-center mx-4 grid ${(decisionTree.options.length <= 2)? 'grid-cols-2' : 'grid-cols-3'}`">
136
- <button :class="`rounded bg-blue-500 text-white py-2 px-4 min-w-28 max-w-40 my-3 ${(index === (decisionTree.options.length - 1) && (index % 3) === 0)? `col-span-3`: 'col-span-1'}`" v-for="(option, index) in decisionTree.options" :key="index" @click="itinerary.push(index); currentSlide++; currentOption = option">{{ option.name }}</button>
137
- </div>
138
- </div>
155
+ </script>
139
156
 
140
- <!-- The rest of the scenario including the end-->
141
- <div class="flex-grow flex" v-else>
157
+ <template>
158
+ <div>
159
+ <div
160
+ class="mx-auto w-2/3 bg-gray-200 dark:bg-slate-800 rounded-md p-4 flex flex-col"
161
+ :style="{ minHeight: '500px', backgroundColor: bgColor }"
162
+ >
163
+ <!-- <div v-for="item in path" :key="item.name">
164
+ <span class="text-xs">{{ item.name }}</span>
165
+ </div> -->
166
+ <!-- Header (fixed at top of card) -->
167
+ <div>
168
+ <h1 class="font-bold text-3xl text-center">{{ title }}</h1>
169
+ <div v-if="currentOption" class="mt-2">
170
+ <EpBtn
171
+ type="primary"
172
+ rounded
173
+ size="small"
174
+ :extra-class="`${transitionAnimation}`"
175
+ @click="goToPrevious"
176
+ >
177
+ <EpIcon :icon-path="mdiArrowLeft" size="25" />
178
+ </EpBtn>
179
+ </div>
180
+ </div>
181
+
182
+ <!-- Content Area -->
183
+ <div class="flex-grow flex items-center justify-center">
184
+ <!-- Introductory Part -->
185
+ <div
186
+ v-if="isIntroductoryPart"
187
+ class="flex flex-col items-center justify-center space-y-6"
188
+ >
189
+ <TextMedia
190
+ v-if="initialInstruction && media"
191
+ :text="initialInstruction"
192
+ :media="media"
193
+ />
194
+ <EpBtn type="primary" rounded @click="start">{{labelStart}}</EpBtn>
195
+ </div>
142
196
 
143
- <!-- The current slide -->
144
- <div :key="currentOption.question" :class="`flex-grow flex flex-col items-center justify-around ${transitionAnimation}`" v-if="notTheEnd">
145
- <div class="text-center min-w-max m-3 flex flex-col items-center gap-3" v-html="useRenderText(currentOption.question)"></div>
146
- <img v-if="currentOption.imgSrc" :src="currentOption.imgSrc" class="rounded" width="200" />
147
- <div :class="`w-full justify-items-center mx-4 grid ${(currentOption.options.length <= 2)? 'grid-cols-2' : 'grid-cols-3'}`">
148
- <button :class="`rounded bg-blue-500 text-white py-2 px-4 min-w-28 max-w-40 my-3 ${(index === (currentOption.options.length - 1) && (index % 3) === 0)? `col-span-3`: 'col-span-1'}`" v-for="(option, index) in currentOption.options" :key="index" @click="itinerary.push(index); currentSlide++; currentOption = option">{{ option.name }}</button>
149
- </div>
197
+ <!-- Slides -->
198
+ <template v-else-if="currentOption && !isIntroductoryPart">
199
+ <div class="flex flex-col items-center justify-center w-full">
200
+ <div :class="`flex flex-col items-center justify-center ${transitionAnimation}`">
201
+ <TextMedia
202
+ :text="currentOption.question"
203
+ :media="currentOption.media"
204
+ />
205
+
206
+ <div
207
+ :class="`w-full my-4 mx-4 grid gap-4 ${gridStyle}`"
208
+ :style="{ placeItems: currentLengthOptions <= 4 ? 'center' : 'initial' }"
209
+ >
210
+ <template v-for="(option, index) in currentOption.options" :key="`option-${index}`">
211
+ <EpBtn
212
+ rounded
213
+ type="primary"
214
+ class="w-full max-w-xs text-center"
215
+ @click="nextSlide(option)"
216
+ >
217
+ {{ option.name }}
218
+ </EpBtn>
219
+ </template>
150
220
  </div>
151
-
152
- <!-- End of the scenario -->
153
- <div :class="`flex-grow flex flex-col items-center ${transitionAnimation}`" v-else>
154
- <div class="flex-grow flex flex-col items-center">
155
- <h1 class="my-4 font-bold text-3xl">Vous avez terminé le scénario!</h1>
156
- <div class="grid grid-cols-2 gap-2">
157
- <div class="col-span-1 flex flex-col items-center">
158
- <h3 class="font-bold">Voici votre parcours</h3>
159
- <div class="flex flex-col relative w-full gap-4 px-5 py-5 items-start overflow-auto border-l-4 border-gray-700" style="max-width: 600px; height: 300px;">
160
- <div v-for="(question, index) in getChoices(itinerary)" :key="index" class="path-item rounded bg-blue-500 text-white py-2 px-4 flex flex-col items-center">
161
- <u>{{ question.question }}</u>
162
- <p>{{ question.choice }}</p>
163
- </div>
164
- </div>
165
- </div>
166
- <div class="flex flex-col col-span-1 justify-center items-center px-4 border-l-2 border-gray-700 overflow-auto">
167
- <h3 class="font-bold">Feedback général</h3>
168
- <p class="text-center">{{ generalFeedback }}</p>
221
+ </div>
222
+ </div>
223
+ </template>
224
+
225
+ <!--show path-->
226
+ <div v-else>
227
+
228
+ <!-- <template v-if="userPath">
229
+ <EpHierarchy :nodes="userPath"/>
230
+ </template> -->
231
+ <h3 class="text-xl text-center font-semibold">{{ labelFinish }}</h3>
232
+ <div class="flex gap-6 mt-3">
233
+ <div class="w-full">
234
+ <h3 class="font-semibold mb-3">{{ labelYourPath }}</h3>
235
+ <div class="overflow-auto p-2" :style="{height: '200px'}">
236
+ <template v-for="(item,i) in path" :key="`user-choice-${i}`">
237
+ <div class="mb-2">
238
+ <Details
239
+ :content="item.question"
240
+ :title="item.name"
241
+ :media="item.media"
242
+ />
169
243
  </div>
170
- </div>
244
+ </template>
245
+ </div>
246
+ <div class="flex justify-center mt-2">
247
+ <EpBtn type="info" rounded @click="showPath = true">{{ labelShowFullPath }}</EpBtn>
248
+ </div>
249
+ <EpModal v-if="userPath" v-model="showPath">
250
+ <EpHierarchy
251
+ :nodes="userPath"
252
+ :is-cluster="props.isCluster"
253
+ :color-path="props.colorPath"
254
+ :color-rect="props.colorRect"
255
+ />
256
+ <div class="flex justify-end">
257
+ <EpBtn @click="showPath = false" type="error" outlined rounded>{{labelClose}}</EpBtn>
171
258
  </div>
172
- <button class='rounded bg-blue-500 text-white py-2 px-4 min-w-28 my-3 col-span-1' @click="restart">Recommencer</button>
173
- </div>
174
-
259
+ </EpModal>
260
+ </div>
261
+ <div v-if="generalFeedback" class="flex flex-col col-span-1 items-center px-4 border-l-2 border-gray-700 overflow-auto">
262
+ <div v-html="useRenderText(generalFeedback)"></div>
263
+ </div>
175
264
  </div>
176
265
 
266
+ <div class="flex justify-center mt-2">
267
+ <EpBtn rounded type="warning" @click="restart">{{ labelRestart }}</EpBtn>
268
+ </div>
177
269
  </div>
270
+ </div>
178
271
  </div>
272
+ </div>
179
273
  </template>
180
274
 
181
275
 
276
+
182
277
  <style scoped>
183
278
  @keyframes fade {
184
279
  0% {
@@ -227,22 +322,5 @@ const getChoices = (itinerary: number[]) => {
227
322
 
228
323
 
229
324
 
230
-
231
-
232
- /* Path item styling */
233
- .path-item {
234
- position: relative;
235
- }
236
-
237
- .path-item::after {
238
- content: '';
239
- position: absolute;
240
- top: 50%;
241
- right: 100%;
242
- width: 60px;
243
- height: 4px;
244
- background-color: rgb(55, 65, 81);
245
- }
246
-
247
325
  </style>
248
326
 
@@ -0,0 +1,92 @@
1
+ <script setup lang="ts">
2
+ import { toRefs, computed } from "vue";
3
+ import EpCard from "../basics/EpCard.vue";
4
+ import EpIcon from '../basics/EpIcon.vue'
5
+ import { mdiFile } from '@mdi/js';
6
+ import { mdiArrowCollapseDown } from '@mdi/js';
7
+ import { mdiOpenInNew } from '@mdi/js';
8
+ import EpBtn from "../basics/EpBtn.vue";
9
+ import { useRenderText } from "../../composables/useRenderText";
10
+
11
+ interface Props {
12
+ url:string;
13
+ src?: string | null;
14
+ icon?:string;
15
+ title?:string;
16
+ description?:string;
17
+ hideIcon?:boolean;
18
+ labelOpen?:string;
19
+ labelDownload?:string;
20
+ }
21
+
22
+ const props = withDefaults(defineProps<Props>(), {
23
+ src: null,
24
+ hideIcon:false,
25
+ labelDownload:"Télécharger",
26
+ labelOpen:"Ouvrir"
27
+ });
28
+
29
+
30
+
31
+ const fileDownloadExtensions = [
32
+ 'doc', 'docx',
33
+ 'xls', 'xlsx',
34
+ 'ppt', 'pptx',
35
+ 'rtf',
36
+ 'odt', 'ods', 'odp'
37
+ ];
38
+
39
+ const getExtension = (url: string): string => {
40
+ const queryRemoved = url.split('?')[0];
41
+ const parts = queryRemoved.split('.');
42
+ return parts.length > 1 ? parts.pop()!.toLowerCase() : '';
43
+ };
44
+
45
+
46
+ const shouldDownload = computed(() => {
47
+ const ext = getExtension(props.url);
48
+ return fileDownloadExtensions.includes(ext);
49
+ });
50
+
51
+ const iconBtn = computed(() => {
52
+ return shouldDownload.value ? mdiArrowCollapseDown : mdiOpenInNew;
53
+ });
54
+
55
+ const label = computed(() => {
56
+ return shouldDownload.value ? props.labelDownload : props.labelOpen;
57
+ });
58
+
59
+ const renderIcon = computed(()=> {
60
+ return props.icon ? props.icon : mdiFile
61
+ })
62
+
63
+
64
+ const { src, hideIcon } = toRefs(props);
65
+
66
+
67
+ </script>
68
+
69
+ <template>
70
+ <div class="w-3/6 mx-auto">
71
+ <EpCard>
72
+ <div :class="`md:flex md:flex-wrap rounded-md`">
73
+ <div class="w-1/5 mr-6" v-if="src">
74
+ <img :class="`md:w-full md:h-full md:object-cover rounded-md`" :src="src"
75
+ alt="Image of quote" />
76
+ </div>
77
+ <div class="flex items-center justify-center px-7" v-else-if="!hideIcon">
78
+ <div class="text-base dark:text-white'">
79
+ <EpIcon :size="60" :icon-path="renderIcon"></EpIcon>
80
+ </div>
81
+ </div>
82
+ <div :class="`py-6 flex-1 ${hideIcon?'px-6':'pr-2'}`">
83
+ <h4 class="text-2xl font-semibold mb-4" v-if="title">{{ title }}</h4>
84
+ <div class="mb-3" v-if="description" v-html="useRenderText(description)"></div>
85
+ <EpBtn :href="url" block type="primary" rounded :prepend-icon="iconBtn">
86
+ {{label}}
87
+ </EpBtn>
88
+ </div>
89
+ </div>
90
+ </EpCard>
91
+ </div>
92
+ </template>
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { ref, computed, defineAsyncComponent, watch, onMounted, nextTick, ComponentPublicInstance } from "vue";
2
+ import { ref, computed, defineAsyncComponent, ComponentPublicInstance } from "vue";
3
3
  import { type SlidesType } from "../../types/Slides";
4
4
  import { useComponent } from "../../composables/useComponent";
5
5
  import { useRenderText } from "../../composables/useRenderText";