ep-lib-ts 1.0.47 → 1.0.49

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 (154) hide show
  1. package/dist/BgAudio-CYb5KE4e.js +4 -0
  2. package/dist/Details-l0QohhKF.js +4 -0
  3. package/dist/DisplayBox-CvOsk1JY.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-DeqgXnQO.js +4 -0
  7. package/dist/EpAudio-DoISeqN2.js +4 -0
  8. package/dist/EpAvatar-BXRUSwI6.js +4 -0
  9. package/dist/EpBadge-Bddwjyp7.js +4 -0
  10. package/dist/EpBarChart-CKlw78WS.js +4 -0
  11. package/dist/EpBtn-zaFgtcS3.js +4 -0
  12. package/dist/EpCard-BjC1KgGN.js +4 -0
  13. package/dist/EpCardLink-C3jcT4P7.js +4 -0
  14. package/dist/EpChip-XHI5vZ2C.js +4 -0
  15. package/dist/EpCodeblock-C6pJlyC1.js +4 -0
  16. package/dist/EpConclusion-DujmCuG5.js +4 -0
  17. package/dist/EpContentSlider-D6O-G2BS.js +4 -0
  18. package/dist/{EpDarkmode-DKSyFe8_.js → EpDarkmode-BPniecbD.js} +1 -1
  19. package/dist/EpDescription-DLVHr4_W.js +4 -0
  20. package/dist/EpDivider-hbHIHTdr.js +4 -0
  21. package/dist/EpDocument-D5ES1bRu.js +4 -0
  22. package/dist/{EpDraggable-B6I1LZM8.js → EpDraggable-Bz-XSfgs.js} +46 -46
  23. package/dist/EpEdu-CuPLvCe6.js +4 -0
  24. package/dist/EpFlex-Bx_eqlzL.js +4 -0
  25. package/dist/EpFunnelChart-CgsIcyps.js +4 -0
  26. package/dist/EpHeader-C8sYMEC0.js +4 -0
  27. package/dist/EpHover-cnkHN1M-.js +4 -0
  28. package/dist/EpHoverCard-DppNEf64.js +4 -0
  29. package/dist/EpIcon-BCqr5Ot1.js +4 -0
  30. package/dist/EpIframe-DUxN35fn.js +4 -0
  31. package/dist/EpImg-ClNWe5kJ.js +4 -0
  32. package/dist/EpImgCarousel-D-iXPu4z.js +4 -0
  33. package/dist/{EpInput-BLfdye3a.js → EpInput-Bm2JshuU.js} +29 -29
  34. package/dist/EpInstructions-Dc4q_QjZ.js +4 -0
  35. package/dist/EpIntroduction-DM0Q0E0T.js +4 -0
  36. package/dist/EpLineChart-CIvYN1Yp.js +4 -0
  37. package/dist/EpLink-IHkB-w_Q.js +4 -0
  38. package/dist/EpLinkVersion-BqUZONE9.js +4 -0
  39. package/dist/{EpList-snrOZLuu.js → EpList-BnNtdYvW.js} +1 -1
  40. package/dist/EpModal-gQSRYF2n.js +4 -0
  41. package/dist/{EpNothing-ChU4qO5j.js → EpNothing-GmXIbWfZ.js} +1 -1
  42. package/dist/EpObjective-Csros8eb.js +4 -0
  43. package/dist/EpPieChart-BXx3RcRW.js +4 -0
  44. package/dist/EpQuestion-BiJQuKyu.js +4 -0
  45. package/dist/EpQuote-Ch1GZ1ji.js +4 -0
  46. package/dist/EpRadio-BjtStIXT.js +4 -0
  47. package/dist/EpRadioSummative-BVZGSygu.js +4 -0
  48. package/dist/EpReading-x-r9mYNT.js +4 -0
  49. package/dist/EpResource-BMMvkWBG.js +4 -0
  50. package/dist/EpScope-CsBXs1FV.js +4 -0
  51. package/dist/EpSection-CyMCPG5c.js +4 -0
  52. package/dist/EpSectionCols-Du1wc6V4.js +4 -0
  53. package/dist/EpSkeleton-ZkC-P6qW.js +4 -0
  54. package/dist/EpSoftware-TbJthBnR.js +4 -0
  55. package/dist/EpSpecificObjective-gmLoa00z.js +4 -0
  56. package/dist/EpSpinner-PlbKZST4.js +4 -0
  57. package/dist/EpStackedList-CC6NU2sF.js +4 -0
  58. package/dist/EpSummativeTable-DiiLAX4L.js +4 -0
  59. package/dist/EpSvg-CsJKW3j6.js +4 -0
  60. package/dist/EpSvgShow-BM6RFmzm.js +4 -0
  61. package/dist/EpTable-BhrO8hKV.js +4 -0
  62. package/dist/EpTerm-Deo_xUAB.js +4 -0
  63. package/dist/EpText-CkXF6fqe.js +4 -0
  64. package/dist/EpTimeLine-D6xKVMfz.js +4 -0
  65. package/dist/EpVideo-BlTilyoX.js +4 -0
  66. package/dist/EpVideoPanopto-CZjYmJKA.js +4 -0
  67. package/dist/EpWordDef-gjtO1h3X.js +4 -0
  68. package/dist/TextMedia-BEyaaSK_.js +4 -0
  69. package/dist/components/educationals/EpBranchingScenario.vue.d.ts +43 -6
  70. package/dist/components/educationals/EpDocument.vue.d.ts +44 -0
  71. package/dist/components/medias/EpHierarchy.vue.d.ts +51 -0
  72. package/dist/components/medias/EpSoftware.vue.d.ts +0 -1
  73. package/dist/components/tools/Details.vue.d.ts +3 -1
  74. package/dist/components/tools/{TextImg.vue.d.ts → TextMedia.vue.d.ts} +3 -2
  75. package/dist/ep-lib-ts.js +41 -39
  76. package/dist/ep-lib-ts.umd.cjs +212 -212
  77. package/dist/{index-D6RVSyf7.js → index-Cb4ZFiWj.js} +10899 -8250
  78. package/dist/{index-QY-UvpNr.js → index-bqynSyW7.js} +1 -1
  79. package/dist/index.d.ts +3 -1
  80. package/dist/{prism-Cv4D8Rjm.js → prism-CeEvbe3m.js} +1 -1
  81. package/dist/style.css +1 -1
  82. package/dist/{three.module-CWLs6nMo.js → three.module-B-oqC8Xk.js} +1 -1
  83. package/dist/types/Component.d.ts +7 -0
  84. package/dist/types/Hierarchy.d.ts +14 -0
  85. package/package.json +11 -1
  86. package/src/components/basics/EpBtn.vue +1 -1
  87. package/src/components/educationals/EpBranchingScenario.vue +202 -172
  88. package/src/components/educationals/EpDocument.vue +92 -0
  89. package/src/components/interactions/EpContentSlider.vue +1 -1
  90. package/src/components/medias/EpHierarchy.vue +345 -0
  91. package/src/components/medias/EpSoftware.vue +1 -2
  92. package/src/components/tools/Details.vue +8 -10
  93. package/src/components/tools/TextMedia.vue +34 -0
  94. package/dist/BgAudio-CFZeS_dQ.js +0 -4
  95. package/dist/Details-D_yxeUuE.js +0 -4
  96. package/dist/DisplayBox-D8hlc9Gn.js +0 -4
  97. package/dist/EpAlert-RMp39gBY.js +0 -4
  98. package/dist/EpAudio-VXqSaCc0.js +0 -4
  99. package/dist/EpAvatar-CoBsHAyN.js +0 -4
  100. package/dist/EpBadge-Di0ORWOa.js +0 -4
  101. package/dist/EpBarChart-D0FaZPGz.js +0 -4
  102. package/dist/EpBtn-D5wu8yT7.js +0 -4
  103. package/dist/EpCard-Drdckmbx.js +0 -4
  104. package/dist/EpCardLink-DUGjSAGF.js +0 -4
  105. package/dist/EpChip-DDochFMT.js +0 -4
  106. package/dist/EpCodeblock-BjxiWHoc.js +0 -4
  107. package/dist/EpConclusion-CXoGHiG1.js +0 -4
  108. package/dist/EpContentSlider-HBkmUIw5.js +0 -4
  109. package/dist/EpDescription-BmRR6d2p.js +0 -4
  110. package/dist/EpDivider-BALEThPk.js +0 -4
  111. package/dist/EpEdu-D7erj5ED.js +0 -4
  112. package/dist/EpFlex-CdriG_tC.js +0 -4
  113. package/dist/EpFunnelChart-HVjlJWQd.js +0 -4
  114. package/dist/EpHeader-Bl4162yt.js +0 -4
  115. package/dist/EpHover-CVY1squO.js +0 -4
  116. package/dist/EpHoverCard-BIuPau4X.js +0 -4
  117. package/dist/EpIcon-DsCeMM28.js +0 -4
  118. package/dist/EpIframe-Cz5g1BYb.js +0 -4
  119. package/dist/EpImg-Ccr76yR5.js +0 -4
  120. package/dist/EpImgCarousel-Ddz1Ur0L.js +0 -4
  121. package/dist/EpInstructions-B-b52LnB.js +0 -4
  122. package/dist/EpIntroduction-DEaiE8_Q.js +0 -4
  123. package/dist/EpLineChart-CJ28vhHx.js +0 -4
  124. package/dist/EpLink-DRGrCSOs.js +0 -4
  125. package/dist/EpLinkVersion-DJcPV4xm.js +0 -4
  126. package/dist/EpModal-m4szNip0.js +0 -4
  127. package/dist/EpObjective-CAXtephy.js +0 -4
  128. package/dist/EpPieChart-B3l-Y3E9.js +0 -4
  129. package/dist/EpQuestion-CrXTzzzu.js +0 -4
  130. package/dist/EpQuote-Dc-IZjOX.js +0 -4
  131. package/dist/EpRadio-CA0CASuz.js +0 -4
  132. package/dist/EpRadioSummative-Bm2JDs6z.js +0 -4
  133. package/dist/EpReading-BNArWsC2.js +0 -4
  134. package/dist/EpResource-Bx1G7Dlz.js +0 -4
  135. package/dist/EpScope-CB6RuO3X.js +0 -4
  136. package/dist/EpSection-BUBgMeo9.js +0 -4
  137. package/dist/EpSectionCols-rigTAR3l.js +0 -4
  138. package/dist/EpSkeleton-B9HFmS5A.js +0 -4
  139. package/dist/EpSoftware-CK9VPoFF.js +0 -4
  140. package/dist/EpSpecificObjective-Dm-H_StM.js +0 -4
  141. package/dist/EpSpinner-Br8tW9f2.js +0 -4
  142. package/dist/EpStackedList-By0U0h1R.js +0 -4
  143. package/dist/EpSummativeTable-Czo4hRQq.js +0 -4
  144. package/dist/EpSvg-BVV9GJ09.js +0 -4
  145. package/dist/EpSvgShow-DSPDvQlK.js +0 -4
  146. package/dist/EpTable-CNPciiRt.js +0 -4
  147. package/dist/EpTerm-BjD-0L65.js +0 -4
  148. package/dist/EpText-8IGa40sW.js +0 -4
  149. package/dist/EpTimeLine-D5R81tuv.js +0 -4
  150. package/dist/EpVideo-v6GnvLIU.js +0 -4
  151. package/dist/EpVideoPanopto-BWVr3ji1.js +0 -4
  152. package/dist/EpWordDef-QB2ioxjp.js +0 -4
  153. package/dist/TextImg-B_cSkkBi.js +0 -4
  154. package/src/components/tools/TextImg.vue +0 -28
@@ -1,4 +1,4 @@
1
- import { ab as xl } from "./index-D6RVSyf7.js";
1
+ import { ac as xl } from "./index-Cb4ZFiWj.js";
2
2
  function ul(n) {
3
3
  return n instanceof Map ? n.clear = n.delete = n.set = function() {
4
4
  throw new Error("map is read-only");
package/dist/index.d.ts CHANGED
@@ -29,6 +29,7 @@ import { default as EpDescription } from './components/educationals/EpDescriptio
29
29
  import { default as EpConclusion } from './components/educationals/EpConclusion.vue';
30
30
  import { default as EpCodeblock } from './components/educationals/EpCodeblock.vue';
31
31
  import { default as EpBranchingScenario } from './components/educationals/EpBranchingScenario.vue';
32
+ import { default as EpDocument } from './components/educationals/EpDocument.vue';
32
33
  import { default as EpAccordeon } from './components/interactions/EpAccordeon.vue';
33
34
  import { default as EpContentSlider } from './components/interactions/EpContentSlider.vue';
34
35
  import { default as EpModal } from './components/interactions/EpModal.vue';
@@ -50,9 +51,10 @@ import { default as EpVideo } from './components/medias/EpVideo.vue';
50
51
  import { default as EpVideoPanopto } from './components/medias/EpVideoPanopto.vue';
51
52
  import { default as EpWordDef } from './components/medias/EpWordDef.vue';
52
53
  import { default as EpCardLink } from './components/medias/EpCardLink.vue';
54
+ import { default as EpHierarchy } from './components/medias/EpHierarchy.vue';
53
55
  import { default as EpAlert } from './components/signages/EpAlert.vue';
54
56
  import { default as EpHeader } from './components/signages/EpHeader.vue';
55
57
  import { default as EpQuote } from './components/signages/EpQuote.vue';
56
58
  import { default as EpSkeleton } from './components/signages/EpSkeleton.vue';
57
59
 
58
- 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 };
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 { ab as V, ac as W } from "./index-D6RVSyf7.js";
1
+ import { ac as V, ad as W } from "./index-Cb4ZFiWj.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}@keyframes fade-7af6ae43{0%{opacity:0}to{opacity:1}}@keyframes scale-7af6ae43{0%{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}@keyframes slideY-7af6ae43{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}.fade[data-v-7af6ae43]{animation:fade-7af6ae43 1s}.scale[data-v-7af6ae43]{animation:scale-7af6ae43 1s}.slideY[data-v-7af6ae43]{animation:slideY-7af6ae43 1s}.path-item[data-v-7af6ae43]{position:relative}.path-item[data-v-7af6ae43]:after{content:"";position:absolute;top:50%;right:100%;width:60px;height:4px;background-color:#374151}.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}
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.47",
4
+ "version": "1.0.49",
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,10 +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';
6
- import { mdiArrowLeft } from "@mdi/js";
7
- import TextImg from "../tools/TextImg.vue";
8
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";
12
+ import { mdiArrowLeft } from "@mdi/js";
13
+ import TextMedia from "../tools/TextMedia.vue";
9
14
 
10
15
 
11
16
  // Defining the props
@@ -13,220 +18,262 @@ import Details from "../tools/Details.vue";
13
18
  interface Option {
14
19
  name: string;
15
20
  question: string;
16
- imgSrc?: string;
21
+ media?:NestedComponents;
17
22
  options?: Option[];
18
23
  }
19
24
 
20
- interface Choice {
21
- question:string;
22
- choice:string;
23
- img?:string;
24
- }
25
-
26
25
  interface Props {
27
- scenarioTitle: string;
28
- scenarioImg?:string;
26
+ title: string;
27
+ media?:NestedComponents;
29
28
  initialInstruction?: string | null;
30
29
  generalFeedback?: string;
31
30
  bgColor?: string;
31
+
32
32
  decisionTree: {
33
- rootQuestion: string;
34
- imgSrc?: string;
35
- options: Option[];
33
+ name: string;
34
+ question:string;
35
+ media?: NestedComponents;
36
+ options?: Option[];
36
37
  };
37
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
38
48
  }
39
49
 
40
-
41
50
  const props = withDefaults(defineProps<Props>(), {
42
51
  initialInstruction: null,
43
- 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'
44
61
  });
45
62
 
46
63
 
47
- // The necessary references to keep track of the evolution
48
-
49
- const itinerary = ref<number[]>([]);
50
-
51
- const currentSlide = ref(0);
52
- 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);
53
68
 
54
69
 
55
70
  // Manage the introductory part
56
71
  const isIntroductoryPart = ref(true);
57
72
 
58
- // Get the option from the itinerary
59
- const getOptionFromItinerary = (itinerary: number[]) => {
60
- let option: any = props.decisionTree;
61
- if (itinerary.length > 0) {
62
- for (let i = 0; i < itinerary.length; i++) {
63
- option = option.options[itinerary[i]];
64
- }
65
- }
66
- return (option !== props.decisionTree)? option : null;
67
- };
73
+ const start = () => {
74
+ isIntroductoryPart.value = false
75
+ currentOption.value = props.decisionTree
76
+ }
68
77
 
69
78
 
70
79
 
71
80
  // Return function
72
-
73
81
  const goToPrevious = () => {
74
- if(notTheEnd.value){
75
- if(itinerary.value.length === 0) {
82
+ //if(notTheEnd.value){
83
+ if(path.value.length === 0) {
76
84
  isIntroductoryPart.value = true;
85
+ currentOption.value = null;
86
+ return
77
87
  }
78
88
 
79
- itinerary.value.pop();
80
- currentOption.value = getOptionFromItinerary(itinerary.value);
81
- currentSlide.value = itinerary.value.length;
82
- }
83
- };
84
-
85
- // Verifying if we are at the end
86
- const notTheEnd = computed(() => {
87
- return currentSlide.value === 0 || (currentOption.value && currentOption.value.options && currentOption.value.options.length > 0);
88
- });
89
-
89
+ path.value.pop();
90
+ // Get the previous option in the path
91
+ const lastOption = path.value[path.value.length - 1];
90
92
 
93
+ if (lastOption) {
94
+ currentOption.value = lastOption;
95
+ } else {
96
+ currentOption.value = props.decisionTree;
97
+ }
98
+ };
91
99
 
92
100
  // Restart function
93
101
  const restart = () => {
94
- currentSlide.value = 0;
102
+ //currentSlide.value = 0;
95
103
  currentOption.value = null;
96
- itinerary.value = [];
97
104
  isIntroductoryPart.value = true;
105
+ path.value = []
98
106
  };
99
107
 
100
108
 
101
109
 
102
- // Function to get the choices made based on the itinerary
103
- const getChoices = (itinerary: number[]) => {
104
- let choices: Choice[] = [{
105
- question: props.decisionTree.rootQuestion,
106
- choice: props.decisionTree.options[itinerary[0]].name,
107
- img:props.decisionTree.imgSrc
108
- }];
109
- let option: Option = props.decisionTree.options[itinerary[0]];
110
-
111
- if (itinerary.length > 1) {
112
- for (let i = 1; i < itinerary.length; i++) {
113
- let question: string = option.question;
114
- let img:string|undefined = option.imgSrc
115
- if(option.options){
116
- option = option.options[itinerary[i]];
117
- console.log(option)
118
- }
119
- choices.push({question, choice: option.name, img});
120
- }
121
- }
122
-
123
- return choices;
124
- };
125
-
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
+ }
126
120
 
127
121
 
128
- </script>
122
+ //helper function
123
+ function convertOptionToTreeNode(option: Option, path: Option[]): TreeNode {
124
+ const isActive = path.includes(option);
129
125
 
130
- <template>
131
- <div>
132
- <!-- The introductory part -->
133
- <div v-if="isIntroductoryPart" class="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 }">
134
- <h1 class="font-bold text-3xl">{{ scenarioTitle }}</h1>
135
-
136
- <TextImg v-if="initialInstruction"
137
- :text="initialInstruction"
138
- :src="scenarioImg"
139
- :alt="`image d'introduction ${scenarioTitle}`"
140
- />
141
- <button class="rounded bg-primary text-white py-2 px-4 min-w-28 my-2" @click="isIntroductoryPart = false">Commencer</button>
142
- </div>
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
+ }
143
134
 
144
135
 
145
- <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>
146
- <!-- Return button -->
147
- <div><button :class="`rounded bg-primary text-white py-2 px-4 m-2 ${transitionAnimation}`" v-if="notTheEnd" @click="goToPrevious">
148
- <EpIcon :icon-path="mdiArrowLeft" size="25"></EpIcon>
149
- </button></div>
136
+ //styles computed
150
137
 
151
- <!-- First question -->
152
- <div :class="`flex-grow flex flex-col items-center justify-around ${transitionAnimation}`" v-if="currentSlide === 0">
153
-
154
- <TextImg
155
- :text="decisionTree.rootQuestion"
156
- :src="decisionTree.imgSrc"
157
- :alt="`image de la question ${decisionTree.rootQuestion}`"
158
- />
159
-
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
+ })
160
146
 
161
- <div :class="`w-full justify-items-center mx-4 grid ${(decisionTree.options.length <= 2)? 'grid-cols-2' : 'grid-cols-3'}`">
147
+ const currentLengthOptions = computed(()=> {
148
+ if(currentOption.value && currentOption.value.options){
149
+ return currentOption.value.options.length
150
+ }
151
+ return 0
152
+ })
162
153
 
163
- <button :class="`rounded bg-primary 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>
164
- </div>
165
- </div>
166
154
 
167
- <!-- The rest of the scenario including the end-->
168
- <div class="flex-grow flex" v-else>
155
+ </script>
169
156
 
170
- <!-- The current slide -->
171
- <div :key="currentOption.question" :class="`flex-grow flex flex-col items-center justify-around ${transitionAnimation}`" v-if="notTheEnd">
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>
172
196
 
173
- <TextImg
174
- :text="currentOption.question"
175
- :src="currentOption.imgSrc"
176
- :alt="`image de la question ${currentOption.question}`"
177
- />
178
-
179
- <div :class="`w-full justify-items-center mx-4 grid ${(currentOption.options.length <= 2)? 'grid-cols-2' : 'grid-cols-3'}`">
180
- <button :class="`rounded bg-primary 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>
181
- </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>
182
220
  </div>
183
-
184
- <!-- End of the scenario -->
185
- <div :class="`flex-grow flex flex-col items-center ${transitionAnimation}`" v-else>
186
- <div class="flex-grow flex flex-col items-center">
187
- <h1 class="my-4 font-bold text-3xl">Vous avez terminé le scénario!</h1>
188
-
189
- <div class="grid grid-cols-2 gap-2">
190
- <div :class="[
191
- 'flex flex-col items-center',
192
- generalFeedback ? 'col-span-1' : 'col-span-2'
193
- ]">
194
- <h3 class="font-bold">Voici votre parcours</h3>
195
- <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;">
196
- <!-- <div class="path-item rounded bg-primary text-white py-2 px-4 flex flex-col items-center">
197
- <u>{{ question.question }}</u>
198
- <p>{{ question.choice }}</p>
199
- </div> -->
200
- <template v-for="(question, index) in getChoices(itinerary)" :key="`question-${index}`">
201
- <div class="path-item">
202
- <Details
203
- :content="question.question"
204
- :title="question.choice"
205
- :img="question.img"
206
- />
207
- </div>
208
- </template>
209
-
210
-
211
- </div>
212
- </div>
213
- <div v-if="generalFeedback" class="flex flex-col col-span-1 items-center px-4 border-l-2 border-gray-700 overflow-auto">
214
- <h3 class="font-bold mb-3">Feedback général</h3>
215
- <div v-html="useRenderText(generalFeedback)"></div>
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
+ />
216
243
  </div>
217
- </div>
218
-
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>
219
258
  </div>
220
- <button class='rounded bg-primary text-white py-2 px-4 min-w-28 my-3 col-span-1' @click="restart">Recommencer</button>
221
- </div>
222
-
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>
223
264
  </div>
224
265
 
266
+ <div class="flex justify-center mt-2">
267
+ <EpBtn rounded type="warning" @click="restart">{{ labelRestart }}</EpBtn>
268
+ </div>
225
269
  </div>
270
+ </div>
226
271
  </div>
272
+ </div>
227
273
  </template>
228
274
 
229
275
 
276
+
230
277
  <style scoped>
231
278
  @keyframes fade {
232
279
  0% {
@@ -275,22 +322,5 @@ const getChoices = (itinerary: number[]) => {
275
322
 
276
323
 
277
324
 
278
-
279
-
280
- /* Path item styling */
281
- .path-item {
282
- position: relative;
283
- }
284
-
285
- .path-item::after {
286
- content: '';
287
- position: absolute;
288
- top: 50%;
289
- right: 100%;
290
- width: 60px;
291
- height: 4px;
292
- background-color: rgb(55, 65, 81);
293
- }
294
-
295
325
  </style>
296
326