ep-lib-ts 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/basics/EpAvatar.vue.js +55 -1
- package/dist/components/basics/EpAvatar.vue.js.map +1 -1
- package/dist/components/basics/EpAvatar.vue2.js +1 -55
- package/dist/components/basics/EpAvatar.vue2.js.map +1 -1
- package/dist/components/basics/EpBtn.vue.js +2 -2
- package/dist/components/basics/EpBtn.vue.js.map +1 -1
- package/dist/components/basics/EpChip.vue.js +2 -2
- package/dist/components/basics/EpChip.vue.js.map +1 -1
- package/dist/components/basics/EpHover.vue.js +1 -1
- package/dist/components/basics/EpHover.vue.js.map +1 -1
- package/dist/components/basics/EpHoverCard.vue.js +6 -6
- package/dist/components/basics/EpHoverCard.vue.js.map +1 -1
- package/dist/components/basics/EpImg.vue.js +8 -8
- package/dist/components/basics/EpImg.vue.js.map +1 -1
- package/dist/components/basics/EpImgCarousel.vue.js +8 -8
- package/dist/components/basics/EpImgCarousel.vue.js.map +1 -1
- package/dist/components/basics/EpSection.vue.js +25 -25
- package/dist/components/basics/EpSection.vue.js.map +1 -1
- package/dist/components/basics/EpSectionCols.vue.js +29 -29
- package/dist/components/basics/EpSectionCols.vue.js.map +1 -1
- package/dist/components/basics/EpSpinner.vue.js +5 -5
- package/dist/components/basics/EpSpinner.vue.js.map +1 -1
- package/dist/components/basics/EpStackedList.vue.js +5 -5
- package/dist/components/basics/EpStackedList.vue.js.map +1 -1
- package/dist/components/basics/EpText.vue.js +77 -79
- package/dist/components/basics/EpText.vue.js.map +1 -1
- package/dist/components/charts/EpBarChart.vue.js +3 -3
- package/dist/components/charts/EpBarChart.vue.js.map +1 -1
- package/dist/components/charts/EpFunnelChart.vue.js +4 -4
- package/dist/components/charts/EpFunnelChart.vue.js.map +1 -1
- package/dist/components/charts/EpLineChart.vue.js +3 -3
- package/dist/components/charts/EpLineChart.vue.js.map +1 -1
- package/dist/components/charts/EpPieChart.vue.js +4 -4
- package/dist/components/charts/EpPieChart.vue.js.map +1 -1
- package/dist/components/educationals/EpBranchingScenario.vue2.js +17 -17
- package/dist/components/educationals/EpBranchingScenario.vue2.js.map +1 -1
- package/dist/components/educationals/EpCodeblock.vue.js +1 -1
- package/dist/components/educationals/EpCodeblock.vue.js.map +1 -1
- package/dist/components/educationals/EpConclusion.vue.js +2 -2
- package/dist/components/educationals/EpConclusion.vue.js.map +1 -1
- package/dist/components/educationals/EpDocument.vue.js +4 -4
- package/dist/components/educationals/EpDocument.vue.js.map +1 -1
- package/dist/components/educationals/EpEdu.vue.js +4 -4
- package/dist/components/educationals/EpEdu.vue.js.map +1 -1
- package/dist/components/educationals/EpFillBlanks.vue.js +1 -1
- package/dist/components/educationals/EpFillBlanks.vue.js.map +1 -1
- package/dist/components/educationals/EpIntroduction.vue.js +5 -5
- package/dist/components/educationals/EpIntroduction.vue.js.map +1 -1
- package/dist/components/educationals/EpObjective.vue.js +3 -3
- package/dist/components/educationals/EpObjective.vue.js.map +1 -1
- package/dist/components/educationals/EpReading.vue.js +3 -3
- package/dist/components/educationals/EpReading.vue.js.map +1 -1
- package/dist/components/educationals/EpResource.vue.js +3 -3
- package/dist/components/educationals/EpResource.vue.js.map +1 -1
- package/dist/components/educationals/EpScope.vue.js +2 -2
- package/dist/components/educationals/EpScope.vue.js.map +1 -1
- package/dist/components/educationals/EpSegmentedBox.vue.js +1 -1
- package/dist/components/educationals/EpSegmentedBox.vue.js.map +1 -1
- package/dist/components/educationals/EpSpecificObjective.vue.js +9 -9
- package/dist/components/educationals/EpSpecificObjective.vue.js.map +1 -1
- package/dist/components/forms/EpRadioSummative.vue.js +46 -1
- package/dist/components/forms/EpRadioSummative.vue.js.map +1 -1
- package/dist/components/forms/EpRadioSummative.vue2.js +1 -46
- package/dist/components/forms/EpRadioSummative.vue2.js.map +1 -1
- package/dist/components/forms/EpSelect.vue.js +3 -3
- package/dist/components/forms/EpSelect.vue.js.map +1 -1
- package/dist/components/forms/EpTextarea.vue2.js +1 -1
- package/dist/components/forms/EpTextarea.vue2.js.map +1 -1
- package/dist/components/forms/EpToggle.vue2.js +1 -1
- package/dist/components/forms/EpToggle.vue2.js.map +1 -1
- package/dist/components/interactions/EpAccordeon.vue2.js +1 -1
- package/dist/components/interactions/EpAccordeon.vue2.js.map +1 -1
- package/dist/components/interactions/EpAssociation.vue.js +14 -15
- package/dist/components/interactions/EpAssociation.vue.js.map +1 -1
- package/dist/components/interactions/EpContentSlider.vue.js +3 -3
- package/dist/components/interactions/EpContentSlider.vue.js.map +1 -1
- package/dist/components/interactions/EpFlipCard.vue2.js +17 -17
- package/dist/components/interactions/EpFlipCard.vue2.js.map +1 -1
- package/dist/components/interactions/EpHotSpot.vue.js +1 -1
- package/dist/components/interactions/EpHotSpot.vue.js.map +1 -1
- package/dist/components/interactions/EpImageCompare.vue.js +6 -6
- package/dist/components/interactions/EpImageCompare.vue.js.map +1 -1
- package/dist/components/interactions/EpModal.vue.js +4 -4
- package/dist/components/interactions/EpModal.vue.js.map +1 -1
- package/dist/components/interactions/EpQuestion.vue.js +8 -8
- package/dist/components/interactions/EpQuestion.vue.js.map +1 -1
- package/dist/components/interactions/EpSummativeTable.vue.js +4 -4
- package/dist/components/interactions/EpSummativeTable.vue.js.map +1 -1
- package/dist/components/interactions/EpTooltip.vue.js +1 -1
- package/dist/components/interactions/EpTooltip.vue.js.map +1 -1
- package/dist/components/medias/EpAudio.vue.js +4 -4
- package/dist/components/medias/EpAudio.vue.js.map +1 -1
- package/dist/components/medias/EpCardLink.vue.js +16 -16
- package/dist/components/medias/EpCardLink.vue.js.map +1 -1
- package/dist/components/medias/EpCarousel.vue.js +10 -10
- package/dist/components/medias/EpCarousel.vue.js.map +1 -1
- package/dist/components/medias/EpHierarchy.vue2.js +2 -2
- package/dist/components/medias/EpHierarchy.vue2.js.map +1 -1
- package/dist/components/medias/EpIframe.vue.js +3 -3
- package/dist/components/medias/EpIframe.vue.js.map +1 -1
- package/dist/components/medias/EpKatex.vue2.js +4 -4
- package/dist/components/medias/EpKatex.vue2.js.map +1 -1
- package/dist/components/medias/EpLink.vue.js +2 -2
- package/dist/components/medias/EpLink.vue.js.map +1 -1
- package/dist/components/medias/EpLinkVersion.vue.js +1 -1
- package/dist/components/medias/EpLinkVersion.vue.js.map +1 -1
- package/dist/components/medias/EpLottieSvg.vue.js +8 -8
- package/dist/components/medias/EpLottieSvg.vue.js.map +1 -1
- package/dist/components/medias/EpSensibleImage.vue2.js +18 -18
- package/dist/components/medias/EpSensibleImage.vue2.js.map +1 -1
- package/dist/components/medias/EpSoftware.vue.js +3 -3
- package/dist/components/medias/EpSoftware.vue.js.map +1 -1
- package/dist/components/medias/EpSvg.vue.js +4 -4
- package/dist/components/medias/EpSvg.vue.js.map +1 -1
- package/dist/components/medias/EpTerm.vue.js +6 -6
- package/dist/components/medias/EpTerm.vue.js.map +1 -1
- package/dist/components/medias/EpVideo.vue.js +2 -2
- package/dist/components/medias/EpVideo.vue.js.map +1 -1
- package/dist/components/medias/EpVideoPanopto.vue.js +3 -3
- package/dist/components/medias/EpVideoPanopto.vue.js.map +1 -1
- package/dist/components/medias/EpWordDef.vue.js +39 -39
- package/dist/components/medias/EpWordDef.vue.js.map +1 -1
- package/dist/components/signages/EpHeader.vue.js +22 -22
- package/dist/components/signages/EpHeader.vue.js.map +1 -1
- package/dist/components/signages/EpSkeleton.vue2.js +1 -1
- package/dist/components/tools/AssociationNode.vue.js +82 -1
- package/dist/components/tools/AssociationNode.vue.js.map +1 -1
- package/dist/components/tools/AssociationNode.vue2.js +1 -82
- package/dist/components/tools/AssociationNode.vue2.js.map +1 -1
- package/dist/components/tools/AsyncKatexRender.vue2.js +1 -1
- package/dist/components/tools/AsyncKatexRender.vue2.js.map +1 -1
- package/dist/components/tools/BgAudio.vue.js +52 -1
- package/dist/components/tools/BgAudio.vue.js.map +1 -1
- package/dist/components/tools/BgAudio.vue2.js +1 -52
- package/dist/components/tools/BgAudio.vue2.js.map +1 -1
- package/dist/components/tools/Details.vue.js +5 -5
- package/dist/components/tools/Details.vue.js.map +1 -1
- package/dist/components/tools/SegmentedBox.vue2.js +2 -2
- package/dist/components/tools/SegmentedBox.vue2.js.map +1 -1
- package/dist/components/tools/TextMedia.vue.js +5 -5
- package/dist/components/tools/TextMedia.vue.js.map +1 -1
- package/dist/components/tools/TwoColsMedia.vue2.js +4 -4
- package/dist/components/tools/TwoColsMedia.vue2.js.map +1 -1
- package/dist/style.css +41 -41
- package/package.json +40 -43
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpVideo.vue.js","sources":["../../../src/components/medias/EpVideo.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, computed, toRefs } from \"vue\";\nimport { isHtml } from \"~/composables/isHtml\";\nimport { useMarkdown } from \"~/composables/useMarkdown\";\nimport { mdiVideo } from \"@mdi/js\";\nimport EpEdu from \"~/components/educationals/EpEdu.vue\";\nimport type { EpVideoProps } from \"~/types/medias/EpVideo\";\n\nconst props = withDefaults(defineProps<EpVideoProps>(), {\n type: \"neutral\",\n hideIcon: false,\n labelIntentions: \"Intentions d'écoute\",\n});\n\n//only to make custum video player\nconst video = ref<HTMLVideoElement>();\n\nconst isVideoFormat = computed(() => {\n if (\n props.src.endsWith(\".mp4\") ||\n props.src.endsWith(\".ogg\") ||\n props.src.endsWith(\".webm\")\n ) {\n return true;\n }\n return false;\n});\n\nconst videoURL = computed(() => {\n const url = props.src;\n if (!isVideoFormat.value && url.includes(\"https://vimeo.com/\")) {\n return url.replace(\"https://vimeo.com/\", \"https://player.vimeo.com/video/\");\n }\n if (!isVideoFormat.value && url.includes(\"https://www.youtube.com/watch?\")) {\n return url.replace(\n \"https://www.youtube.com/watch?v=\",\n \"https://www.youtube.com/embed/\"\n );\n }\n //extra to short url youtube\n if (!isVideoFormat.value && url.includes(\"https://youtu.be/\")) {\n const id = getIdYoutube(url);\n if (id) {\n return `https://www.youtube.com/embed/${id}`;\n }\n }\n return url;\n});\n\nconst renderText = computed(() => {\n if (!props.intentions) {\n return null;\n }\n if (!isHtml(props.intentions)) {\n return useMarkdown(props.intentions);\n }\n return props.intentions;\n});\n\nconst getIdYoutube = (url: string): string | null => {\n const match = url.match(/\\/([^\\/]+)$/);\n return match ? match[1] : null;\n};\n\nconst sizeVideo = computed(() => {\n if (props.big) {\n return \"650\";\n }\n return \"360\";\n});\n\n//controls\n//const controls = useMediaControls(video, {src:props.src})\nconst { src, title, hideIcon, type, labelIntentions } = toRefs(props);\n</script>\n\n<template>\n <EpEdu\n :title=\"title\"\n :type=\"type\"\n :hideIcon=\"hideIcon\"\n :icon=\"mdiVideo\"\n :mandateLevel=\"mandateLevel\"\n :labelIntentions=\"labelIntentions\"\n >\n <template #intentions v-if=\"renderText && renderText.length > 0\">\n <div v-html=\"renderText\" />\n </template>\n <template #content>\n <div :class=\"!big ? 'max-w-screen-sm mx-auto' : ''\">\n <video\n v-if=\"isVideoFormat\"\n ref=\"video\"\n controls\n :src=\"src\"\n width=\"100%\"\n controlsList=\"nodownload\"\n ></video>\n\n <iframe\n v-else\n :src=\"videoURL\"\n width=\"100%\"\n :height=\"sizeVideo\"\n frameborder=\"0\"\n allowfullscreen\n ></iframe>\n </div>\n </template>\n <!-- <template #actions>\n <EpBtn :color=\"type=='base'?'text-gray-700':'text-white'\" :type=\"type\">[Repair btn style... to change]</EpBtn>\n </template> -->\n </EpEdu>\n</template>\n"],"names":["_createBlock","EpEdu","_unref","_createElementVNode","_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQA,UAAM,QAAQ;AAOd,UAAM,QAAQ,IAAA;AAEd,UAAM,gBAAgB,SAAS,MAAM;AACnC,UACE,MAAM,IAAI,SAAS,MAAM,KACzB,MAAM,IAAI,SAAS,MAAM,KACzB,MAAM,IAAI,SAAS,OAAO,GAC1B;AACA,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,WAAW,SAAS,MAAM;AAC9B,YAAM,MAAM,MAAM;AAClB,UAAI,CAAC,cAAc,SAAS,IAAI,SAAS,oBAAoB,GAAG;AAC9D,eAAO,IAAI,QAAQ,sBAAsB,iCAAiC;AAAA,MAC5E;AACA,UAAI,CAAC,cAAc,SAAS,IAAI,SAAS,gCAAgC,GAAG;AAC1E,eAAO,IAAI;AAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,MAEJ;AAEA,UAAI,CAAC,cAAc,SAAS,IAAI,SAAS,mBAAmB,GAAG;AAC7D,cAAM,KAAK,aAAa,GAAG;AAC3B,YAAI,IAAI;AACN,iBAAO,iCAAiC,EAAE;AAAA,QAC5C;AAAA,MACF;AACA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,aAAa,SAAS,MAAM;AAChC,UAAI,CAAC,MAAM,YAAY;AACrB,eAAO;AAAA,MACT;AACA,UAAI,CAAC,OAAO,MAAM,UAAU,GAAG;AAC7B,eAAO,YAAY,MAAM,UAAU;AAAA,MACrC;AACA,aAAO,MAAM;AAAA,IACf,CAAC;AAED,UAAM,eAAe,CAAC,QAA+B;AACnD,YAAM,QAAQ,IAAI,MAAM,aAAa;AACrC,aAAO,QAAQ,MAAM,CAAC,IAAI;AAAA,IAC5B;AAEA,UAAM,YAAY,SAAS,MAAM;AAC/B,UAAI,MAAM,KAAK;AACb,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACT,CAAC;AAID,UAAM,EAAE,KAAK,OAAO,UAAU,MAAM,gBAAA,IAAoB,OAAO,KAAK;;0BAIlEA,YAmCQC,aAAA;AAAA,QAlCL,OAAOC,MAAA,KAAA;AAAA,QACP,MAAMA,MAAA,IAAA;AAAA,QACN,UAAUA,MAAA,QAAA;AAAA,QACV,MAAMA,MAAA,QAAA;AAAA,QACN,
|
|
1
|
+
{"version":3,"file":"EpVideo.vue.js","sources":["../../../src/components/medias/EpVideo.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ref, computed, toRefs } from \"vue\";\nimport { isHtml } from \"~/composables/isHtml\";\nimport { useMarkdown } from \"~/composables/useMarkdown\";\nimport { mdiVideo } from \"@mdi/js\";\nimport EpEdu from \"~/components/educationals/EpEdu.vue\";\nimport type { EpVideoProps } from \"~/types/medias/EpVideo\";\n\nconst props = withDefaults(defineProps<EpVideoProps>(), {\n type: \"neutral\",\n hideIcon: false,\n labelIntentions: \"Intentions d'écoute\",\n});\n\n//only to make custum video player\nconst video = ref<HTMLVideoElement>();\n\nconst isVideoFormat = computed(() => {\n if (\n props.src.endsWith(\".mp4\") ||\n props.src.endsWith(\".ogg\") ||\n props.src.endsWith(\".webm\")\n ) {\n return true;\n }\n return false;\n});\n\nconst videoURL = computed(() => {\n const url = props.src;\n if (!isVideoFormat.value && url.includes(\"https://vimeo.com/\")) {\n return url.replace(\"https://vimeo.com/\", \"https://player.vimeo.com/video/\");\n }\n if (!isVideoFormat.value && url.includes(\"https://www.youtube.com/watch?\")) {\n return url.replace(\n \"https://www.youtube.com/watch?v=\",\n \"https://www.youtube.com/embed/\"\n );\n }\n //extra to short url youtube\n if (!isVideoFormat.value && url.includes(\"https://youtu.be/\")) {\n const id = getIdYoutube(url);\n if (id) {\n return `https://www.youtube.com/embed/${id}`;\n }\n }\n return url;\n});\n\nconst renderText = computed(() => {\n if (!props.intentions) {\n return null;\n }\n if (!isHtml(props.intentions)) {\n return useMarkdown(props.intentions);\n }\n return props.intentions;\n});\n\nconst getIdYoutube = (url: string): string | null => {\n const match = url.match(/\\/([^\\/]+)$/);\n return match ? match[1] : null;\n};\n\nconst sizeVideo = computed(() => {\n if (props.big) {\n return \"650\";\n }\n return \"360\";\n});\n\n//controls\n//const controls = useMediaControls(video, {src:props.src})\nconst { src, title, hideIcon, type, labelIntentions } = toRefs(props);\n</script>\n\n<template>\n <EpEdu\n :title=\"title\"\n :type=\"type\"\n :hideIcon=\"hideIcon\"\n :icon=\"mdiVideo\"\n :mandateLevel=\"mandateLevel\"\n :labelIntentions=\"labelIntentions\"\n >\n <template #intentions v-if=\"renderText && renderText.length > 0\">\n <div v-html=\"renderText\" />\n </template>\n <template #content>\n <div :class=\"!big ? 'max-w-screen-sm mx-auto' : ''\">\n <video\n v-if=\"isVideoFormat\"\n ref=\"video\"\n controls\n :src=\"src\"\n width=\"100%\"\n controlsList=\"nodownload\"\n ></video>\n\n <iframe\n v-else\n :src=\"videoURL\"\n width=\"100%\"\n :height=\"sizeVideo\"\n frameborder=\"0\"\n allowfullscreen\n ></iframe>\n </div>\n </template>\n <!-- <template #actions>\n <EpBtn :color=\"type=='base'?'text-gray-700':'text-white'\" :type=\"type\">[Repair btn style... to change]</EpBtn>\n </template> -->\n </EpEdu>\n</template>\n"],"names":["_createBlock","EpEdu","_unref","mandateLevel","_createElementVNode","big","_createElementBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQA,UAAM,QAAQ;AAOd,UAAM,QAAQ,IAAA;AAEd,UAAM,gBAAgB,SAAS,MAAM;AACnC,UACE,MAAM,IAAI,SAAS,MAAM,KACzB,MAAM,IAAI,SAAS,MAAM,KACzB,MAAM,IAAI,SAAS,OAAO,GAC1B;AACA,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,WAAW,SAAS,MAAM;AAC9B,YAAM,MAAM,MAAM;AAClB,UAAI,CAAC,cAAc,SAAS,IAAI,SAAS,oBAAoB,GAAG;AAC9D,eAAO,IAAI,QAAQ,sBAAsB,iCAAiC;AAAA,MAC5E;AACA,UAAI,CAAC,cAAc,SAAS,IAAI,SAAS,gCAAgC,GAAG;AAC1E,eAAO,IAAI;AAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,MAEJ;AAEA,UAAI,CAAC,cAAc,SAAS,IAAI,SAAS,mBAAmB,GAAG;AAC7D,cAAM,KAAK,aAAa,GAAG;AAC3B,YAAI,IAAI;AACN,iBAAO,iCAAiC,EAAE;AAAA,QAC5C;AAAA,MACF;AACA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,aAAa,SAAS,MAAM;AAChC,UAAI,CAAC,MAAM,YAAY;A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,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
type: unref(type),
|
|
43
43
|
hideIcon: unref(hideIcon),
|
|
44
44
|
icon: unref(mdiVideo),
|
|
45
|
-
mandateLevel:
|
|
46
|
-
labelIntentions:
|
|
45
|
+
mandateLevel: _ctx.mandateLevel,
|
|
46
|
+
labelIntentions: _ctx.labelIntentions
|
|
47
47
|
}, createSlots({
|
|
48
48
|
content: withCtx(() => [
|
|
49
49
|
createElementVNode("div", {
|
|
50
|
-
class: normalizeClass(!
|
|
50
|
+
class: normalizeClass(!_ctx.big ? "max-w-screen-sm mx-auto" : "")
|
|
51
51
|
}, [
|
|
52
52
|
createElementVNode("iframe", {
|
|
53
53
|
src: unref(src),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpVideoPanopto.vue.js","sources":["../../../src/components/medias/EpVideoPanopto.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, toRefs } from \"vue\";\nimport { isHtml } from \"~/composables/isHtml\";\nimport { useMarkdown } from \"~/composables/useMarkdown\";\nimport { mdiVideo } from \"@mdi/js\";\nimport EpEdu from \"~/components/educationals/EpEdu.vue\";\nimport type { EpVideoPanoptoProps } from \"~/types/medias/EpVideoPanopto\";\n\nconst props = withDefaults(defineProps<EpVideoPanoptoProps>(), {\n labelIntentions: \"Intentions d'écoute\",\n type: \"neutral\",\n hideIcon: false,\n});\n\nconst renderText = computed(() => {\n if (!props.intentions) {\n return null;\n }\n if (!isHtml(props.intentions)) {\n return useMarkdown(props.intentions);\n }\n return props.intentions;\n});\n\nconst sizeVideo = computed(() => {\n if (props.big) {\n return \"650\";\n }\n return \"360\";\n});\n\nconst { src, title, hideIcon, type } = toRefs(props);\n</script>\n\n<template>\n <EpEdu\n :title=\"title\"\n :type=\"type\"\n :hideIcon=\"hideIcon\"\n :icon=\"mdiVideo\"\n :mandateLevel=\"mandateLevel\"\n :labelIntentions=\"labelIntentions\"\n >\n <template #intentions v-if=\"renderText\">\n <div v-html=\"renderText\" />\n </template>\n <template #content>\n <div :class=\"!big ? 'max-w-screen-sm mx-auto' : ''\">\n <iframe\n :src=\"src\"\n width=\"100%\"\n :height=\"sizeVideo\"\n frameborder=\"0\"\n allowfullscreen\n ></iframe>\n </div>\n </template>\n <!-- <template #actions>\n <EpBtn :color=\"type=='base'?'text-gray-700':'text-white'\" :type=\"type\">[Repair btn style... to change]</EpBtn>\n </template> -->\n </EpEdu>\n</template>\n"],"names":["_createBlock","EpEdu","_unref","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQA,UAAM,QAAQ;AAMd,UAAM,aAAa,SAAS,MAAM;AAChC,UAAI,CAAC,MAAM,YAAY;AACrB,eAAO;AAAA,MACT;AACA,UAAI,CAAC,OAAO,MAAM,UAAU,GAAG;AAC7B,eAAO,YAAY,MAAM,UAAU;AAAA,MACrC;AACA,aAAO,MAAM;AAAA,IACf,CAAC;AAED,UAAM,YAAY,SAAS,MAAM;AAC/B,UAAI,MAAM,KAAK;AACb,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,EAAE,KAAK,OAAO,UAAU,KAAA,IAAS,OAAO,KAAK;;0BAIjDA,YAyBQC,aAAA;AAAA,QAxBL,OAAOC,MAAA,KAAA;AAAA,QACP,MAAMA,MAAA,IAAA;AAAA,QACN,UAAUA,MAAA,QAAA;AAAA,QACV,MAAMA,MAAA,QAAA;AAAA,QACN,
|
|
1
|
+
{"version":3,"file":"EpVideoPanopto.vue.js","sources":["../../../src/components/medias/EpVideoPanopto.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, toRefs } from \"vue\";\nimport { isHtml } from \"~/composables/isHtml\";\nimport { useMarkdown } from \"~/composables/useMarkdown\";\nimport { mdiVideo } from \"@mdi/js\";\nimport EpEdu from \"~/components/educationals/EpEdu.vue\";\nimport type { EpVideoPanoptoProps } from \"~/types/medias/EpVideoPanopto\";\n\nconst props = withDefaults(defineProps<EpVideoPanoptoProps>(), {\n labelIntentions: \"Intentions d'écoute\",\n type: \"neutral\",\n hideIcon: false,\n});\n\nconst renderText = computed(() => {\n if (!props.intentions) {\n return null;\n }\n if (!isHtml(props.intentions)) {\n return useMarkdown(props.intentions);\n }\n return props.intentions;\n});\n\nconst sizeVideo = computed(() => {\n if (props.big) {\n return \"650\";\n }\n return \"360\";\n});\n\nconst { src, title, hideIcon, type } = toRefs(props);\n</script>\n\n<template>\n <EpEdu\n :title=\"title\"\n :type=\"type\"\n :hideIcon=\"hideIcon\"\n :icon=\"mdiVideo\"\n :mandateLevel=\"mandateLevel\"\n :labelIntentions=\"labelIntentions\"\n >\n <template #intentions v-if=\"renderText\">\n <div v-html=\"renderText\" />\n </template>\n <template #content>\n <div :class=\"!big ? 'max-w-screen-sm mx-auto' : ''\">\n <iframe\n :src=\"src\"\n width=\"100%\"\n :height=\"sizeVideo\"\n frameborder=\"0\"\n allowfullscreen\n ></iframe>\n </div>\n </template>\n <!-- <template #actions>\n <EpBtn :color=\"type=='base'?'text-gray-700':'text-white'\" :type=\"type\">[Repair btn style... to change]</EpBtn>\n </template> -->\n </EpEdu>\n</template>\n"],"names":["_createBlock","EpEdu","_unref","mandateLevel","labelIntentions","_createElementVNode","big"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQA,UAAM,QAAQ;AAMd,UAAM,aAAa,SAAS,MAAM;AAChC,UAAI,CAAC,MAAM,YAAY;AACrB,eAAO;AAAA,MACT;AACA,UAAI,CAAC,OAAO,MAAM,UAAU,GAAG;AAC7B,eAAO,YAAY,MAAM,UAAU;AAAA,MACrC;AACA,aAAO,MAAM;AAAA,IACf,CAAC;AAED,UAAM,YAAY,SAAS,MAAM;AAC/B,UAAI,MAAM,KAAK;AACb,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,EAAE,KAAK,OAAO,UAAU,KAAA,IAAS,OAAO,KAAK;;0BAIjDA,YAyBQC,aAAA;AAAA,QAxBL,OAAOC,MAAA,KAAA;AAAA,QACP,MAAMA,MAAA,IAAA;AAAA,QACN,UAAUA,MAAA,QAAA;AAAA,QACV,MAAMA,MAAA,QAAA;AAAA,QACN,cAAcC,KAAAA;AAAAA,QACd,iBAAiBC,KAAAA;AAAAA,MAAAA;QAKP,iBACT,MAQM;AAAA,UARNC,mBAQM,OAAA;AAAA,YARA,uBAAQC,KAAAA,MAAG,4BAAA,EAAA;AAAA,UAAA;YACfD,mBAMU,UAAA;AAAA,cALP,KAAKH,MAAA,GAAA;AAAA,cACN,OAAM;AAAA,cACL,QAAQ,UAAA;AAAA,cACT,aAAY;AAAA,cACZ,iBAAA;AAAA,YAAA;;;;;QAVsB,WAAA;gBAAjB;AAAA,sBACT,MAA2B;AAAA,YAA3BG,mBAA2B,OAAA,EAAtB,WAAQ,WAAA,SAAU,MAAA,GAAA,UAAA;AAAA,UAAA;;;;;;;"}
|
|
@@ -104,10 +104,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104
104
|
const id = ref(props.uid || useCreateUid());
|
|
105
105
|
return (_ctx, _cache) => {
|
|
106
106
|
return openBlock(), createElementBlock("div", { id: id.value }, [
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
_ctx.term && _ctx.description ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
108
|
+
_ctx.collapse ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
109
109
|
createVNode(Comp, {
|
|
110
|
-
title:
|
|
110
|
+
title: _ctx.term,
|
|
111
111
|
open: false,
|
|
112
112
|
outlined: true
|
|
113
113
|
}, {
|
|
@@ -116,50 +116,50 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
116
|
createElementVNode("div", {
|
|
117
117
|
class: normalizeClass(sizeGramIngo.value)
|
|
118
118
|
}, [
|
|
119
|
-
createElementVNode("p", _hoisted_5, toDisplayString(
|
|
120
|
-
|
|
119
|
+
createElementVNode("p", _hoisted_5, toDisplayString(_ctx.labelInformation), 1),
|
|
120
|
+
_ctx.content.gramInfo ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(_ctx.content.gramInfo), 1)) : createCommentVNode("", true)
|
|
121
121
|
], 2),
|
|
122
|
-
|
|
122
|
+
_ctx.content.domain ? (openBlock(), createElementBlock("div", {
|
|
123
123
|
key: 0,
|
|
124
124
|
class: normalizeClass(sizeDomain.value)
|
|
125
125
|
}, [
|
|
126
|
-
createElementVNode("p", _hoisted_7, toDisplayString(
|
|
127
|
-
createElementVNode("div", _hoisted_8, toDisplayString(
|
|
126
|
+
createElementVNode("p", _hoisted_7, toDisplayString(_ctx.labelDomain), 1),
|
|
127
|
+
createElementVNode("div", _hoisted_8, toDisplayString(_ctx.content.domain), 1)
|
|
128
128
|
], 2)) : createCommentVNode("", true),
|
|
129
|
-
|
|
129
|
+
_ctx.variation.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
130
130
|
key: 1,
|
|
131
131
|
class: normalizeClass(sizeVariations.value)
|
|
132
132
|
}, [
|
|
133
|
-
createElementVNode("p", _hoisted_9, toDisplayString(
|
|
133
|
+
createElementVNode("p", _hoisted_9, toDisplayString(_ctx.labelVariations), 1),
|
|
134
134
|
createElementVNode("div", _hoisted_10, [
|
|
135
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
135
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.variation, (_variation, i) => {
|
|
136
136
|
return openBlock(), createElementBlock("span", {
|
|
137
137
|
key: `v-${i}`
|
|
138
|
-
}, toDisplayString(_variation) + toDisplayString(
|
|
138
|
+
}, toDisplayString(_variation) + toDisplayString(_ctx.variation.length > i + 1 ? ", " : "."), 1);
|
|
139
139
|
}), 128))
|
|
140
140
|
])
|
|
141
141
|
], 2)) : createCommentVNode("", true)
|
|
142
142
|
]),
|
|
143
|
-
!
|
|
143
|
+
!_ctx.content.image ? (openBlock(), createElementBlock("div", {
|
|
144
144
|
key: 0,
|
|
145
145
|
class: "px-2 py-6",
|
|
146
|
-
innerHTML: unref(useRenderText)(
|
|
146
|
+
innerHTML: unref(useRenderText)(_ctx.description)
|
|
147
147
|
}, null, 8, _hoisted_11)) : (openBlock(), createElementBlock("div", _hoisted_12, [
|
|
148
148
|
createElementVNode("div", {
|
|
149
149
|
class: "px-2 py-6",
|
|
150
|
-
innerHTML: unref(useRenderText)(
|
|
150
|
+
innerHTML: unref(useRenderText)(_ctx.description)
|
|
151
151
|
}, null, 8, _hoisted_13),
|
|
152
152
|
createElementVNode("div", _hoisted_14, [
|
|
153
153
|
createVNode(_sfc_main$1, {
|
|
154
|
-
src:
|
|
155
|
-
cols:
|
|
154
|
+
src: _ctx.content.image,
|
|
155
|
+
cols: _ctx.cols
|
|
156
156
|
}, null, 8, ["src", "cols"])
|
|
157
157
|
])
|
|
158
158
|
])),
|
|
159
|
-
|
|
160
|
-
createElementVNode("p", _hoisted_16, toDisplayString(
|
|
159
|
+
_ctx.relation.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_15, [
|
|
160
|
+
createElementVNode("p", _hoisted_16, toDisplayString(_ctx.labelRelations), 1),
|
|
161
161
|
createElementVNode("div", _hoisted_17, [
|
|
162
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
162
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.relation, (_relation, i) => {
|
|
163
163
|
return openBlock(), createElementBlock("button", {
|
|
164
164
|
key: `relation-${i}`,
|
|
165
165
|
class: "p-1 border rounded mr-1",
|
|
@@ -172,55 +172,55 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
172
172
|
_: 1
|
|
173
173
|
}, 8, ["title"])
|
|
174
174
|
])) : (openBlock(), createElementBlock("div", _hoisted_19, [
|
|
175
|
-
createElementVNode("h2", _hoisted_20, toDisplayString(
|
|
175
|
+
createElementVNode("h2", _hoisted_20, toDisplayString(_ctx.term), 1),
|
|
176
176
|
createElementVNode("div", _hoisted_21, [
|
|
177
177
|
createElementVNode("div", {
|
|
178
178
|
class: normalizeClass(sizeGramIngo.value)
|
|
179
179
|
}, [
|
|
180
|
-
createElementVNode("p", _hoisted_22, toDisplayString(
|
|
181
|
-
|
|
180
|
+
createElementVNode("p", _hoisted_22, toDisplayString(_ctx.labelInformation), 1),
|
|
181
|
+
_ctx.content.gramInfo ? (openBlock(), createElementBlock("div", _hoisted_23, toDisplayString(_ctx.content.gramInfo), 1)) : createCommentVNode("", true)
|
|
182
182
|
], 2),
|
|
183
|
-
|
|
183
|
+
_ctx.content.domain ? (openBlock(), createElementBlock("div", {
|
|
184
184
|
key: 0,
|
|
185
185
|
class: normalizeClass(sizeDomain.value)
|
|
186
186
|
}, [
|
|
187
|
-
createElementVNode("p", _hoisted_24, toDisplayString(
|
|
188
|
-
createElementVNode("div", _hoisted_25, toDisplayString(
|
|
187
|
+
createElementVNode("p", _hoisted_24, toDisplayString(_ctx.labelDomain), 1),
|
|
188
|
+
createElementVNode("div", _hoisted_25, toDisplayString(_ctx.content.domain), 1)
|
|
189
189
|
], 2)) : createCommentVNode("", true),
|
|
190
|
-
|
|
190
|
+
_ctx.variation.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
191
191
|
key: 1,
|
|
192
192
|
class: normalizeClass(sizeVariations.value)
|
|
193
193
|
}, [
|
|
194
|
-
createElementVNode("p", _hoisted_26, toDisplayString(
|
|
194
|
+
createElementVNode("p", _hoisted_26, toDisplayString(_ctx.labelVariations), 1),
|
|
195
195
|
createElementVNode("div", _hoisted_27, [
|
|
196
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
196
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.variation, (_variation, i) => {
|
|
197
197
|
return openBlock(), createElementBlock("span", {
|
|
198
198
|
key: `v-${i}`
|
|
199
|
-
}, toDisplayString(_variation) + toDisplayString(
|
|
199
|
+
}, toDisplayString(_variation) + toDisplayString(_ctx.variation.length > i + 1 ? ", " : "."), 1);
|
|
200
200
|
}), 128))
|
|
201
201
|
])
|
|
202
202
|
], 2)) : createCommentVNode("", true)
|
|
203
203
|
]),
|
|
204
|
-
!
|
|
204
|
+
!_ctx.content.image ? (openBlock(), createElementBlock("div", {
|
|
205
205
|
key: 0,
|
|
206
206
|
class: "px-2 py-6",
|
|
207
|
-
innerHTML: unref(useRenderText)(
|
|
207
|
+
innerHTML: unref(useRenderText)(_ctx.description)
|
|
208
208
|
}, null, 8, _hoisted_28)) : (openBlock(), createElementBlock("div", _hoisted_29, [
|
|
209
209
|
createElementVNode("div", {
|
|
210
210
|
class: "px-2 py-6",
|
|
211
|
-
innerHTML: unref(useRenderText)(
|
|
211
|
+
innerHTML: unref(useRenderText)(_ctx.description)
|
|
212
212
|
}, null, 8, _hoisted_30),
|
|
213
213
|
createElementVNode("div", _hoisted_31, [
|
|
214
214
|
createVNode(_sfc_main$1, {
|
|
215
|
-
src:
|
|
216
|
-
cols:
|
|
215
|
+
src: _ctx.content.image,
|
|
216
|
+
cols: _ctx.cols
|
|
217
217
|
}, null, 8, ["src", "cols"])
|
|
218
218
|
])
|
|
219
219
|
])),
|
|
220
|
-
|
|
221
|
-
createElementVNode("p", _hoisted_33, toDisplayString(
|
|
220
|
+
_ctx.relation.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_32, [
|
|
221
|
+
createElementVNode("p", _hoisted_33, toDisplayString(_ctx.labelRelations), 1),
|
|
222
222
|
createElementVNode("div", _hoisted_34, [
|
|
223
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
223
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.relation, (_relation, i) => {
|
|
224
224
|
return openBlock(), createElementBlock("button", {
|
|
225
225
|
key: `relation-${i}`,
|
|
226
226
|
class: "p-1 border rounded mr-1",
|
|
@@ -230,7 +230,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
230
230
|
])
|
|
231
231
|
])) : createCommentVNode("", true)
|
|
232
232
|
]))
|
|
233
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_36, toDisplayString(
|
|
233
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_36, toDisplayString(_ctx.labelNoDefinition), 1))
|
|
234
234
|
], 8, _hoisted_1);
|
|
235
235
|
};
|
|
236
236
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpWordDef.vue.js","sources":["../../../src/components/medias/EpWordDef.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport EpImg from \"~/components/basics/EpImg.vue\";\nimport { useCreateUid } from \"~/composables/useCreateUid\";\nimport { useRenderText } from \"~/composables/useRenderText\";\nimport { useRouter } from \"vue-router\";\nimport type { EpWordDefProps } from \"~/types/medias/EpWordDef\";\nimport EpAccordeon from \"~/components/interactions/EpAccordeon.vue\";\n\nconst props = withDefaults(defineProps<EpWordDefProps>(), {\n labelInformation: \"Information grammaticale\",\n labelDomain: \"Domaine\",\n labelRelations: \"Relations\",\n labelNoDefinition: \"La definition n'est pas disponible\",\n labelVariations: \"Variation(s)\",\n cols: \"10\",\n collapse: true,\n});\n\nconst sizeGramIngo = computed(() => {\n if (props.content) {\n return props.content.domain || props.variation.length > 0\n ? \"w-1/3\"\n : \"w-full\";\n }\n return \"\";\n});\n\nconst sizeDomain = computed(() => {\n if (props.variation) {\n return props.variation.length > 0 ? \"w-1/4\" : \"w-3/4\";\n }\n return \"\";\n});\n\nconst sizeVariations = computed(() => {\n if (props.content) {\n return props.content.domain ? \"w-2/4\" : \"w-3/4\";\n }\n return \"\";\n});\n\n/*\nconst findRelations = (relations: string[]): { id: number | string, term: string }[] => {\n let _relations = props.glossary.filter((term) => {\n return relations.some((x) => {\n return term.id === x;\n });\n });\n return _relations.map((x) => ({id:x.id, term:x.term}));\n};*/\n\nconst router = useRouter();\nconst goto = (term: string) => {\n if (router.hasRoute(\"glossary\")) {\n router.push({ path: \"/glossary\", query: { word: term } });\n }\n //console.log(router.hasRoute('signages'))\n //\n};\n\nconst id = ref(props.uid || useCreateUid());\n</script>\n\n<template>\n <div :id=\"id\">\n <div v-if=\"term && description\">\n <div v-if=\"collapse\" class=\"h-min divide-y\">\n <EpAccordeon :title=\"term\" :open=\"false\" :outlined=\"true\">\n <div class=\"flex justify-between\">\n <div :class=\"sizeGramIngo\">\n <p class=\"text-sm font-medium p-2\">\n {{ labelInformation }}\n </p>\n <div class=\"px-2 py-1\" v-if=\"content.gramInfo\">\n {{ content.gramInfo }}\n </div>\n </div>\n <div :class=\"sizeDomain\" v-if=\"content.domain\">\n <p class=\"text-sm font-medium p-2\">\n {{ labelDomain }}\n </p>\n <div class=\"px-2 py-1\">{{ content.domain }}</div>\n </div>\n <div :class=\"sizeVariations\" v-if=\"variation.length > 0\">\n <p class=\"text-sm font-medium p-2\">\n {{ labelVariations }}\n </p>\n <div class=\"px-2 py-1\">\n <span v-for=\"(_variation, i) in variation\" :key=\"`v-${i}`\"\n >{{ _variation\n }}{{ variation.length > i + 1 ? \", \" : \".\" }}</span\n >\n </div>\n </div>\n </div>\n <template v-if=\"!content.image\">\n <div class=\"px-2 py-6\" v-html=\"useRenderText(description)\" />\n </template>\n <template v-else>\n <div class=\"flex flex-row justify-between\">\n <div class=\"px-2 py-6\" v-html=\"useRenderText(description)\" />\n <div class=\"flex w-1/2 justify-center p-2\">\n <EpImg :src=\"content.image\" :cols=\"cols\" />\n </div>\n </div>\n </template>\n\n <div v-if=\"relation.length > 0\">\n <p class=\"text-sm font-medium p-2\">{{ labelRelations }}</p>\n <div class=\"p-2\">\n <template\n v-for=\"(_relation, i) in relation\"\n :key=\"`relation-${i}`\"\n >\n <button\n class=\"p-1 border rounded mr-1\"\n @click=\"goto(_relation.termId)\"\n >\n {{ _relation.term }}\n </button>\n </template>\n </div>\n </div>\n </EpAccordeon>\n </div>\n\n <div v-else class=\"h-min border divide-y bg-surface-2 dark:bg-surface-2-dark rounded\">\n <h2 class=\"text-xl font-semibold p-2\">{{ term }}</h2>\n\n <div class=\"flex justify-between\">\n <div :class=\"sizeGramIngo\">\n <p class=\"text-sm font-medium p-2\">{{ labelInformation }}</p>\n <div class=\"px-2 py-1\" v-if=\"content.gramInfo\">\n {{ content.gramInfo }}\n </div>\n </div>\n\n <div :class=\"sizeDomain\" v-if=\"content.domain\">\n <p class=\"text-sm font-medium p-2\">{{ labelDomain }}</p>\n <div class=\"px-2 py-1\">{{ content.domain }}</div>\n </div>\n\n <div :class=\"sizeVariations\" v-if=\"variation.length > 0\">\n <p class=\"text-sm font-medium p-2\">{{ labelVariations }}</p>\n <div class=\"px-2 py-1\">\n <span v-for=\"(_variation, i) in variation\" :key=\"`v-${i}`\">\n {{ _variation }}{{ variation.length > i + 1 ? \", \" : \".\" }}\n </span>\n </div>\n </div>\n </div>\n\n <template v-if=\"!content.image\">\n <div class=\"px-2 py-6\" v-html=\"useRenderText(description)\" />\n </template>\n <template v-else>\n <div class=\"flex flex-row justify-between\">\n <div class=\"px-2 py-6\" v-html=\"useRenderText(description)\" />\n <div class=\"flex w-1/2 justify-center p-2\">\n <EpImg :src=\"content.image\" :cols=\"cols\" />\n </div>\n </div>\n </template>\n\n <div v-if=\"relation.length > 0\">\n <p class=\"text-sm font-medium p-2\">{{ labelRelations }}</p>\n <div class=\"p-2\">\n <template v-for=\"(_relation, i) in relation\" :key=\"`relation-${i}`\">\n <button\n class=\"p-1 border rounded mr-1\"\n @click=\"goto(_relation.termId)\"\n >\n {{ _relation.term }}\n </button>\n </template>\n </div>\n </div>\n </div>\n </div>\n\n <div v-else>{{ labelNoDefinition }}</div>\n </div>\n</template>\n"],"names":["_createElementBlock","_openBlock","_createVNode","EpAccordeon","_createElementVNode","_toDisplayString","_Fragment","_renderList","_unref","EpImg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,UAAM,QAAQ;AAUd,UAAM,eAAe,SAAS,MAAM;AAClC,UAAI,MAAM,SAAS;AACjB,eAAO,MAAM,QAAQ,UAAU,MAAM,UAAU,SAAS,IACpD,U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IAAC,IAAA,OAAA,GAAA,GAAA,CAAA;AAAA;;;;YAM9B,CAAA,QAAA,QAAQ,sBACvBL,mBAA6D,OAAA;AAAA;cAAxD,OAAM;AAAA,cAAY,WAAQQ,MAAA,aAAA,EAAc,QAAA,WAAW;AAAA,YAAA,6BAGxDP,UAAA,GAAAD,mBAKM,OALN,aAKM;AAAA,cAJJI,mBAA6D,OAAA;AAAA,gBAAxD,OAAM;AAAA,gBAAY,WAAQI,MAAA,aAAA,EAAc,QAAA,WAAW;AAAA,cAAA;cACxDJ,mBAEM,OAFN,aAEM;AAAA,gBADJF,YAA2CO,aAAA;AAAA,kBAAnC,KAAK,QAAA,QAAQ;AAAA,kBAAQ,MAAM,QAAA;AAAA,gBAAA;;;YAK9B,QAAA,SAAS,SAAM,kBAA1BT,mBAYM,OAAA,aAAA;AAAA,cAXJI,mBAA2D,KAA3D,aAA2DC,gBAArB,QAAA,cAAc,GAAA,CAAA;AAAA,cACpDD,mBASM,OATN,aASM;AAAA,iBARJH,UAAA,IAAA,GAAAD,mBAOWM,UAAA,MAAAC,WAPwB,QAAA,UAAQ,CAAzB,WAAW,MAAC;sCAC5BP,mBAKS,UAAA;AAAA,qCANoD,CAAC;AAAA,oBAE5D,OAAM;AAAA,oBACL,SAAK,CAAA,WAAE,KAAK,UAAU,MAAM;AAAA,kBAAA,GAE1BK,gBAAA,UAAU,IAAI,GAAA,GAAA,WAAA;AAAA;;;;eAQ7BJ,aAAAD,mBAAyC,oCAA1B,QAAA,iBAAiB,GAAA,CAAA;AAAA,MAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"EpWordDef.vue.js","sources":["../../../src/components/medias/EpWordDef.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref } from \"vue\";\nimport EpImg from \"~/components/basics/EpImg.vue\";\nimport { useCreateUid } from \"~/composables/useCreateUid\";\nimport { useRenderText } from \"~/composables/useRenderText\";\nimport { useRouter } from \"vue-router\";\nimport type { EpWordDefProps } from \"~/types/medias/EpWordDef\";\nimport EpAccordeon from \"~/components/interactions/EpAccordeon.vue\";\n\nconst props = withDefaults(defineProps<EpWordDefProps>(), {\n labelInformation: \"Information grammaticale\",\n labelDomain: \"Domaine\",\n labelRelations: \"Relations\",\n labelNoDefinition: \"La definition n'est pas disponible\",\n labelVariations: \"Variation(s)\",\n cols: \"10\",\n collapse: true,\n});\n\nconst sizeGramIngo = computed(() => {\n if (props.content) {\n return props.content.domain || props.variation.length > 0\n ? \"w-1/3\"\n : \"w-full\";\n }\n return \"\";\n});\n\nconst sizeDomain = computed(() => {\n if (props.variation) {\n return props.variation.length > 0 ? \"w-1/4\" : \"w-3/4\";\n }\n return \"\";\n});\n\nconst sizeVariations = computed(() => {\n if (props.content) {\n return props.content.domain ? \"w-2/4\" : \"w-3/4\";\n }\n return \"\";\n});\n\n/*\nconst findRelations = (relations: string[]): { id: number | string, term: string }[] => {\n let _relations = props.glossary.filter((term) => {\n return relations.some((x) => {\n return term.id === x;\n });\n });\n return _relations.map((x) => ({id:x.id, term:x.term}));\n};*/\n\nconst router = useRouter();\nconst goto = (term: string) => {\n if (router.hasRoute(\"glossary\")) {\n router.push({ path: \"/glossary\", query: { word: term } });\n }\n //console.log(router.hasRoute('signages'))\n //\n};\n\nconst id = ref(props.uid || useCreateUid());\n</script>\n\n<template>\n <div :id=\"id\">\n <div v-if=\"term && description\">\n <div v-if=\"collapse\" class=\"h-min divide-y\">\n <EpAccordeon :title=\"term\" :open=\"false\" :outlined=\"true\">\n <div class=\"flex justify-between\">\n <div :class=\"sizeGramIngo\">\n <p class=\"text-sm font-medium p-2\">\n {{ labelInformation }}\n </p>\n <div class=\"px-2 py-1\" v-if=\"content.gramInfo\">\n {{ content.gramInfo }}\n </div>\n </div>\n <div :class=\"sizeDomain\" v-if=\"content.domain\">\n <p class=\"text-sm font-medium p-2\">\n {{ labelDomain }}\n </p>\n <div class=\"px-2 py-1\">{{ content.domain }}</div>\n </div>\n <div :class=\"sizeVariations\" v-if=\"variation.length > 0\">\n <p class=\"text-sm font-medium p-2\">\n {{ labelVariations }}\n </p>\n <div class=\"px-2 py-1\">\n <span v-for=\"(_variation, i) in variation\" :key=\"`v-${i}`\"\n >{{ _variation\n }}{{ variation.length > i + 1 ? \", \" : \".\" }}</span\n >\n </div>\n </div>\n </div>\n <template v-if=\"!content.image\">\n <div class=\"px-2 py-6\" v-html=\"useRenderText(description)\" />\n </template>\n <template v-else>\n <div class=\"flex flex-row justify-between\">\n <div class=\"px-2 py-6\" v-html=\"useRenderText(description)\" />\n <div class=\"flex w-1/2 justify-center p-2\">\n <EpImg :src=\"content.image\" :cols=\"cols\" />\n </div>\n </div>\n </template>\n\n <div v-if=\"relation.length > 0\">\n <p class=\"text-sm font-medium p-2\">{{ labelRelations }}</p>\n <div class=\"p-2\">\n <template\n v-for=\"(_relation, i) in relation\"\n :key=\"`relation-${i}`\"\n >\n <button\n class=\"p-1 border rounded mr-1\"\n @click=\"goto(_relation.termId)\"\n >\n {{ _relation.term }}\n </button>\n </template>\n </div>\n </div>\n </EpAccordeon>\n </div>\n\n <div v-else class=\"h-min border divide-y bg-surface-2 dark:bg-surface-2-dark rounded\">\n <h2 class=\"text-xl font-semibold p-2\">{{ term }}</h2>\n\n <div class=\"flex justify-between\">\n <div :class=\"sizeGramIngo\">\n <p class=\"text-sm font-medium p-2\">{{ labelInformation }}</p>\n <div class=\"px-2 py-1\" v-if=\"content.gramInfo\">\n {{ content.gramInfo }}\n </div>\n </div>\n\n <div :class=\"sizeDomain\" v-if=\"content.domain\">\n <p class=\"text-sm font-medium p-2\">{{ labelDomain }}</p>\n <div class=\"px-2 py-1\">{{ content.domain }}</div>\n </div>\n\n <div :class=\"sizeVariations\" v-if=\"variation.length > 0\">\n <p class=\"text-sm font-medium p-2\">{{ labelVariations }}</p>\n <div class=\"px-2 py-1\">\n <span v-for=\"(_variation, i) in variation\" :key=\"`v-${i}`\">\n {{ _variation }}{{ variation.length > i + 1 ? \", \" : \".\" }}\n </span>\n </div>\n </div>\n </div>\n\n <template v-if=\"!content.image\">\n <div class=\"px-2 py-6\" v-html=\"useRenderText(description)\" />\n </template>\n <template v-else>\n <div class=\"flex flex-row justify-between\">\n <div class=\"px-2 py-6\" v-html=\"useRenderText(description)\" />\n <div class=\"flex w-1/2 justify-center p-2\">\n <EpImg :src=\"content.image\" :cols=\"cols\" />\n </div>\n </div>\n </template>\n\n <div v-if=\"relation.length > 0\">\n <p class=\"text-sm font-medium p-2\">{{ labelRelations }}</p>\n <div class=\"p-2\">\n <template v-for=\"(_relation, i) in relation\" :key=\"`relation-${i}`\">\n <button\n class=\"p-1 border rounded mr-1\"\n @click=\"goto(_relation.termId)\"\n >\n {{ _relation.term }}\n </button>\n </template>\n </div>\n </div>\n </div>\n </div>\n\n <div v-else>{{ labelNoDefinition }}</div>\n </div>\n</template>\n"],"names":["_createElementBlock","term","description","collapse","_openBlock","_createVNode","EpAccordeon","_createElementVNode","_toDisplayString","labelInformation","content","labelDomain","variation","labelVariations","_Fragment","_renderList","_unref","EpImg","cols","relation","labelRelations","labelNoDefinition"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,UAAM,QAAQ;AAUd,UAAM,eAAe,SAAS,MAAM;AAClC,UAAI,MAAM,SAAS;AACjB,eAAO,MAAM,QAAQ,UAAU,MAAM,UAAU,SAAS,IACpD,UACA;AAAA,MACN;AACA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,aAAa,SAAS,MAAM;AAChC,UAAI,MAAM,WAAW;AACnB,eAAO,MAAM,UAAU,SAAS,IAAI,UAAU;AAAA,MAChD;AACA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,iBAAiB,SAAS,MAAM;AACpC,UAAI,MAAM,SAAS;AACjB,eAAO,MAAM,QAAQ,SAAS,UAAU;AAAA,MAC1C;AACA,aAAO;AAAA,IACT,CAAC;AAYD,UAAM,SAAS,UAAA;AACf,UAAM,OAA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AA;AAAA,gBAAxD,OAAM;AAAA,gBAAY,WAAQS,MAAA,aAAA,EAAcd,KAAAA,WAAW;AAAA,cAAA;cACxDK,mBAEM,OAFN,aAEM;AAAA,gBADJF,YAA2CY,aAAA;AAAA,kBAAnC,KAAKP,KAAAA,QAAQ;AAAA,kBAAQ,MAAMQ,KAAAA;AAAAA,gBAAAA;;;YAK9BC,KAAAA,SAAS,SAAM,kBAA1BnB,mBAYM,OAAA,aAAA;AAAA,cAXJO,mBAA2D,KAA3D,aAA2DC,gBAArBY,KAAAA,cAAc,GAAA,CAAA;AAAA,cACpDb,mBASM,OATN,aASM;AAAA,iBARJH,UAAA,IAAA,GAAAJ,mBAOWc,UAAA,MAAAC,WAPwBI,KAAAA,UAAQ,CAAzB,WAAW,MAAC;sCAC5BnB,mBAKS,UAAA;AAAA,qCANoD,CAAC;AAAA,oBAE5D,OAAM;AAAA,oBACL,SAAK,CAAA,WAAE,KAAK,UAAU,MAAM;AAAA,kBAAA,GAE1BQ,gBAAA,UAAU,IAAI,GAAA,GAAA,WAAA;AAAA;;;;eAQ7BJ,aAAAJ,mBAAyC,oCAA1BqB,KAAAA,iBAAiB,GAAA,CAAA;AAAA,MAAA;;;;"}
|
|
@@ -95,7 +95,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
95
95
|
});
|
|
96
96
|
const { title, headerImgColor, big } = toRefs(props);
|
|
97
97
|
return (_ctx, _cache) => {
|
|
98
|
-
return
|
|
98
|
+
return _ctx.type === "imgBg" ? (openBlock(), createElementBlock("header", {
|
|
99
99
|
key: 0,
|
|
100
100
|
class: normalizeClass(`${unref(big) ? "h-screen " : "h-96"} items-center overflow-hidden relative `),
|
|
101
101
|
ref: "el"
|
|
@@ -108,56 +108,56 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
108
108
|
class: normalizeClass(`relative ${unref(big) ? "mb-36" : ""} h-full items-end`)
|
|
109
109
|
}, [
|
|
110
110
|
createElementVNode("div", _hoisted_1, [
|
|
111
|
-
|
|
111
|
+
_ctx.synchrone ? (openBlock(), createBlock(_sfc_main$1, {
|
|
112
112
|
key: 0,
|
|
113
113
|
prependIcon: unref(mdiCast),
|
|
114
114
|
size: "small"
|
|
115
115
|
}, {
|
|
116
116
|
default: withCtx(() => [
|
|
117
|
-
createTextVNode(toDisplayString(
|
|
117
|
+
createTextVNode(toDisplayString(_ctx.labels.synchrone), 1)
|
|
118
118
|
]),
|
|
119
119
|
_: 1
|
|
120
120
|
}, 8, ["prependIcon"])) : createCommentVNode("", true),
|
|
121
|
-
|
|
121
|
+
_ctx.duration ? (openBlock(), createBlock(_sfc_main$1, {
|
|
122
122
|
key: 1,
|
|
123
123
|
prependIcon: unref(mdiTimerOutline),
|
|
124
124
|
size: "small"
|
|
125
125
|
}, {
|
|
126
126
|
default: withCtx(() => [
|
|
127
|
-
createTextVNode(toDisplayString(
|
|
127
|
+
createTextVNode(toDisplayString(_ctx.duration), 1)
|
|
128
128
|
]),
|
|
129
129
|
_: 1
|
|
130
130
|
}, 8, ["prependIcon"])) : createCommentVNode("", true),
|
|
131
|
-
|
|
131
|
+
_ctx.assessment ? (openBlock(), createBlock(_sfc_main$1, {
|
|
132
132
|
key: 2,
|
|
133
133
|
prependIcon: unref(mdiChairSchool),
|
|
134
134
|
size: "small"
|
|
135
135
|
}, {
|
|
136
136
|
default: withCtx(() => [
|
|
137
|
-
createTextVNode(toDisplayString(
|
|
137
|
+
createTextVNode(toDisplayString(_ctx.labels.formatif), 1)
|
|
138
138
|
]),
|
|
139
139
|
_: 1
|
|
140
140
|
}, 8, ["prependIcon"])) : createCommentVNode("", true)
|
|
141
141
|
]),
|
|
142
142
|
createElementVNode("div", {
|
|
143
|
-
class: normalizeClass(`${
|
|
143
|
+
class: normalizeClass(`${_ctx.vAlign} ${_ctx.hAlign} flex w-full grow h-96 `)
|
|
144
144
|
}, [
|
|
145
145
|
createElementVNode("div", {
|
|
146
146
|
class: normalizeClass(`${bgTextFit}`)
|
|
147
147
|
}, [
|
|
148
|
-
unref(title) ||
|
|
148
|
+
unref(title) || _ctx.subtitle ? (openBlock(), createElementBlock("div", {
|
|
149
149
|
key: 0,
|
|
150
|
-
class: normalizeClass(`${
|
|
150
|
+
class: normalizeClass(`${_ctx.textBg ? "inline-block backdrop-blur-lg backdrop-brightness-65 backdrop-opacity-95 rounded" : ""} p-4 md:items-center`)
|
|
151
151
|
}, [
|
|
152
152
|
createElementVNode("div", _hoisted_2, [
|
|
153
153
|
unref(title) ? (openBlock(), createElementBlock("h1", {
|
|
154
154
|
key: 0,
|
|
155
155
|
class: normalizeClass(`text-3xl font-medium ${darkText.value} sm:text-3xl`)
|
|
156
156
|
}, toDisplayString(unref(title)), 3)) : createCommentVNode("", true),
|
|
157
|
-
|
|
157
|
+
_ctx.subtitle ? (openBlock(), createElementBlock("h2", {
|
|
158
158
|
key: 1,
|
|
159
159
|
class: normalizeClass(`max-w-xl mt-4 text-2xl ${darkText.value}`)
|
|
160
|
-
}, toDisplayString(
|
|
160
|
+
}, toDisplayString(_ctx.subtitle), 3)) : createCommentVNode("", true)
|
|
161
161
|
])
|
|
162
162
|
], 2)) : createCommentVNode("", true)
|
|
163
163
|
], 2)
|
|
@@ -175,52 +175,52 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
175
|
])
|
|
176
176
|
])) : createCommentVNode("", true),
|
|
177
177
|
createVNode(SvgFilter)
|
|
178
|
-
], 2)) :
|
|
178
|
+
], 2)) : _ctx.type === "simple" ? (openBlock(), createElementBlock("header", _hoisted_4, [
|
|
179
179
|
createElementVNode("div", _hoisted_5, [
|
|
180
180
|
unref(title) ? (openBlock(), createElementBlock("h1", _hoisted_6, toDisplayString(unref(title)), 1)) : createCommentVNode("", true),
|
|
181
|
-
|
|
181
|
+
_ctx.subtitle ? (openBlock(), createElementBlock("h2", _hoisted_7, toDisplayString(_ctx.subtitle), 1)) : createCommentVNode("", true)
|
|
182
182
|
])
|
|
183
183
|
])) : (openBlock(), createElementBlock("header", _hoisted_8, [
|
|
184
184
|
createElementVNode("div", _hoisted_9, [
|
|
185
185
|
createElementVNode("div", _hoisted_10, [
|
|
186
186
|
createElementVNode("div", _hoisted_11, [
|
|
187
|
-
|
|
187
|
+
_ctx.synchrone ? (openBlock(), createBlock(_sfc_main$1, {
|
|
188
188
|
key: 0,
|
|
189
189
|
prependIcon: unref(mdiCast),
|
|
190
190
|
size: "small"
|
|
191
191
|
}, {
|
|
192
192
|
default: withCtx(() => [
|
|
193
|
-
createTextVNode(toDisplayString(
|
|
193
|
+
createTextVNode(toDisplayString(_ctx.labels.synchrone), 1)
|
|
194
194
|
]),
|
|
195
195
|
_: 1
|
|
196
196
|
}, 8, ["prependIcon"])) : createCommentVNode("", true),
|
|
197
|
-
|
|
197
|
+
_ctx.duration ? (openBlock(), createBlock(_sfc_main$1, {
|
|
198
198
|
key: 1,
|
|
199
199
|
prependIcon: unref(mdiTimerOutline),
|
|
200
200
|
size: "small"
|
|
201
201
|
}, {
|
|
202
202
|
default: withCtx(() => [
|
|
203
|
-
createTextVNode(toDisplayString(
|
|
203
|
+
createTextVNode(toDisplayString(_ctx.duration), 1)
|
|
204
204
|
]),
|
|
205
205
|
_: 1
|
|
206
206
|
}, 8, ["prependIcon"])) : createCommentVNode("", true),
|
|
207
|
-
|
|
207
|
+
_ctx.assessment ? (openBlock(), createBlock(_sfc_main$1, {
|
|
208
208
|
key: 2,
|
|
209
209
|
prependIcon: unref(mdiChairSchool),
|
|
210
210
|
size: "small"
|
|
211
211
|
}, {
|
|
212
212
|
default: withCtx(() => [
|
|
213
|
-
createTextVNode(toDisplayString(
|
|
213
|
+
createTextVNode(toDisplayString(_ctx.labels.formatif), 1)
|
|
214
214
|
]),
|
|
215
215
|
_: 1
|
|
216
216
|
}, 8, ["prependIcon"])) : createCommentVNode("", true)
|
|
217
217
|
]),
|
|
218
218
|
createElementVNode("div", {
|
|
219
|
-
class: normalizeClass(`${
|
|
219
|
+
class: normalizeClass(`${_ctx.vAlign} flex h-full pb-8 pl-6 max-w-3xl`)
|
|
220
220
|
}, [
|
|
221
221
|
createElementVNode("div", null, [
|
|
222
222
|
unref(title) ? (openBlock(), createElementBlock("h1", _hoisted_12, toDisplayString(unref(title)), 1)) : createCommentVNode("", true),
|
|
223
|
-
|
|
223
|
+
_ctx.subtitle ? (openBlock(), createElementBlock("p", _hoisted_13, toDisplayString(_ctx.subtitle), 1)) : createCommentVNode("", true),
|
|
224
224
|
createElementVNode("div", _hoisted_14, [
|
|
225
225
|
renderSlot(_ctx.$slots, "default")
|
|
226
226
|
])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpHeader.vue.js","sources":["../../../src/components/signages/EpHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { toRefs, computed } from \"vue\";\nimport { mdiCast } from \"@mdi/js\";\nimport { mdiTimerOutline } from \"@mdi/js\";\nimport { mdiChairSchool } from \"@mdi/js\";\nimport { mdiChevronDown } from \"@mdi/js\";\nimport SvgFilter from \"~/components/tools/SvgFilter.vue\";\nimport EpIcon from \"~/components/basics/EpIcon.vue\";\nimport EpChip from \"~/components/basics/EpChip.vue\";\nimport type { EpHeaderProps } from \"~/types/signages/EpHeader\";\n\nconst props = withDefaults(defineProps<EpHeaderProps>(), {\n title: null,\n icon: null,\n src: null,\n big: false,\n synchrone: false,\n hideImg: false,\n duration: null,\n assessment: null,\n labels: () => {\n return {\n synchrone: \"Synchrone\",\n formatif: \"Formatif\",\n };\n },\n textBg: true,\n type: \"imgBg\",\n titlePosition: \"center\",\n vAlign: \"items-center\",\n hAlign: \"justify-center\",\n});\n\nconst bgTextFit = \"w-8/12\"; // ''\n\nconst styles = computed(() => {\n return ` \n\tflex\n\tflex-col\n\toverflow-hidden \n\tw-full \n\tabsolute\n\t${props.big ? \"min-h-screen\" : \"h-96\"}\n\tbg-cover\n\tbg-center`;\n});\n\nconst bgImg = computed(() => {\n if (props.src) {\n return props.src;\n }\n return `https://live.staticflickr.com/1757/42677241511_a350206ac2_b.jpg`;\n});\n\nconst emit = defineEmits<{\n (e: \"clicked\"): void;\n}>();\n\nconst clickScroll = (): void => {\n emit(\"clicked\");\n};\n\nconst darkText = computed(()=> {\n if(props.darkText){\n return 'text-black'\n }\n return 'text-white'\n})\n\nconst { title, headerImgColor, big } = toRefs(props);\n</script>\n\n<template>\n <header\n v-if=\"type === 'imgBg'\"\n :class=\"`${\n big ? 'h-screen ' : 'h-96'\n } items-center overflow-hidden relative `\"\n ref=\"el\"\n >\n <div\n :class=\"styles\"\n :style=\"`background-image:url('${bgImg}'); filter:url(#${headerImgColor});`\"\n />\n\n <div :class=\"`relative ${big ? 'mb-36' : ''} h-full items-end`\">\n <div class=\"flex md:justify-end justify-center pt-5\">\n <EpChip v-if=\"synchrone\" :prependIcon=\"mdiCast\" size=\"small\">{{\n labels.synchrone\n }}</EpChip>\n <EpChip v-if=\"duration\" :prependIcon=\"mdiTimerOutline\" size=\"small\">\n {{ duration }}</EpChip\n >\n <EpChip v-if=\"assessment\" :prependIcon=\"mdiChairSchool\" size=\"small\">{{\n labels.formatif\n }}</EpChip>\n </div>\n <div :class=\"`${vAlign} ${hAlign} flex w-full grow h-96 `\">\n <div :class=\"`${bgTextFit}`\">\n <div\n v-if=\"title || subtitle\"\n :class=\"`${\n textBg\n ? 'inline-block backdrop-blur-lg backdrop-brightness-65 backdrop-opacity-95 rounded'\n : ''\n } p-4 md:items-center`\"\n >\n <div class=\"text-center md:text-left\">\n <h1\n v-if=\"title\"\n :class=\"`text-3xl font-medium ${darkText} sm:text-3xl`\"\n >\n {{ title }}\n </h1>\n <h2\n v-if=\"subtitle\"\n :class=\"`max-w-xl mt-4 text-2xl ${darkText}`\"\n >\n {{ subtitle }}\n </h2>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div v-if=\"props.big\" class=\"animate-bounce absolute bottom-10 left-1/2\">\n <div\n class=\"mx-auto w-12 rounded-full p-2\"\n @click=\"clickScroll\"\n >\n <EpIcon :iconPath=\"mdiChevronDown\" size=\"32\" />\n </div>\n </div>\n <SvgFilter></SvgFilter>\n </header>\n\n <header v-else-if=\"type === 'simple'\">\n <div class=\"text-center md:text-left mt-16 mb-32\">\n <h1\n v-if=\"title\"\n class=\"text-4xl font-bold tracking-tight\"\n >\n {{ title }}\n </h1>\n <h2 v-if=\"subtitle\" class=\"w-1/2 mt-4\">\n {{ subtitle }}\n </h2>\n </div>\n </header>\n\n <header v-else=\"type === 'sideBy'\">\n <div class=\"flex flex-col-reverse lg:flex-row items-stretch\">\n <div class=\"basis-1/2 bg-surface-2 dark:bg-surface-2-dark lg:min-h-48 p-4\">\n <div class=\"flex justify-start pt-0 mb-4\">\n <EpChip v-if=\"synchrone\" :prependIcon=\"mdiCast\" size=\"small\">{{\n labels.synchrone\n }}</EpChip>\n <EpChip v-if=\"duration\" :prependIcon=\"mdiTimerOutline\" size=\"small\">\n {{ duration }}</EpChip\n >\n <EpChip\n v-if=\"assessment\"\n :prependIcon=\"mdiChairSchool\"\n size=\"small\"\n >{{ labels.formatif }}</EpChip\n >\n </div>\n <div :class=\"`${vAlign} flex h-full pb-8 pl-6 max-w-3xl`\">\n <div>\n <h1\n v-if=\"title\"\n class=\"text-3xl sm:text-4xl xl:text-5xl font-bold tracking-tight\"\n >\n {{ title }}\n </h1>\n <p\n v-if=\"subtitle\"\n class=\"mt-4 text-xl\"\n >\n {{ subtitle }}\n </p>\n <div class=\"mt-4\">\n <slot />\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"basis-1/2\">\n <img\n :src=\"bgImg\"\n alt=\"\"\n class=\"h-32 lg:h-full size-full object-cover\"\n :style=\"`filter:url(#${headerImgColor});`\"\n />\n </div>\n </div>\n </header>\n</template>\n"],"names":["_createElementBlock","_normalizeClass","_unref","_createElementVNode","_normalizeStyle","_createBlock","EpChip","
|
|
1
|
+
{"version":3,"file":"EpHeader.vue.js","sources":["../../../src/components/signages/EpHeader.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { toRefs, computed } from \"vue\";\nimport { mdiCast } from \"@mdi/js\";\nimport { mdiTimerOutline } from \"@mdi/js\";\nimport { mdiChairSchool } from \"@mdi/js\";\nimport { mdiChevronDown } from \"@mdi/js\";\nimport SvgFilter from \"~/components/tools/SvgFilter.vue\";\nimport EpIcon from \"~/components/basics/EpIcon.vue\";\nimport EpChip from \"~/components/basics/EpChip.vue\";\nimport type { EpHeaderProps } from \"~/types/signages/EpHeader\";\n\nconst props = withDefaults(defineProps<EpHeaderProps>(), {\n title: null,\n icon: null,\n src: null,\n big: false,\n synchrone: false,\n hideImg: false,\n duration: null,\n assessment: null,\n labels: () => {\n return {\n synchrone: \"Synchrone\",\n formatif: \"Formatif\",\n };\n },\n textBg: true,\n type: \"imgBg\",\n titlePosition: \"center\",\n vAlign: \"items-center\",\n hAlign: \"justify-center\",\n});\n\nconst bgTextFit = \"w-8/12\"; // ''\n\nconst styles = computed(() => {\n return ` \n\tflex\n\tflex-col\n\toverflow-hidden \n\tw-full \n\tabsolute\n\t${props.big ? \"min-h-screen\" : \"h-96\"}\n\tbg-cover\n\tbg-center`;\n});\n\nconst bgImg = computed(() => {\n if (props.src) {\n return props.src;\n }\n return `https://live.staticflickr.com/1757/42677241511_a350206ac2_b.jpg`;\n});\n\nconst emit = defineEmits<{\n (e: \"clicked\"): void;\n}>();\n\nconst clickScroll = (): void => {\n emit(\"clicked\");\n};\n\nconst darkText = computed(()=> {\n if(props.darkText){\n return 'text-black'\n }\n return 'text-white'\n})\n\nconst { title, headerImgColor, big } = toRefs(props);\n</script>\n\n<template>\n <header\n v-if=\"type === 'imgBg'\"\n :class=\"`${\n big ? 'h-screen ' : 'h-96'\n } items-center overflow-hidden relative `\"\n ref=\"el\"\n >\n <div\n :class=\"styles\"\n :style=\"`background-image:url('${bgImg}'); filter:url(#${headerImgColor});`\"\n />\n\n <div :class=\"`relative ${big ? 'mb-36' : ''} h-full items-end`\">\n <div class=\"flex md:justify-end justify-center pt-5\">\n <EpChip v-if=\"synchrone\" :prependIcon=\"mdiCast\" size=\"small\">{{\n labels.synchrone\n }}</EpChip>\n <EpChip v-if=\"duration\" :prependIcon=\"mdiTimerOutline\" size=\"small\">\n {{ duration }}</EpChip\n >\n <EpChip v-if=\"assessment\" :prependIcon=\"mdiChairSchool\" size=\"small\">{{\n labels.formatif\n }}</EpChip>\n </div>\n <div :class=\"`${vAlign} ${hAlign} flex w-full grow h-96 `\">\n <div :class=\"`${bgTextFit}`\">\n <div\n v-if=\"title || subtitle\"\n :class=\"`${\n textBg\n ? 'inline-block backdrop-blur-lg backdrop-brightness-65 backdrop-opacity-95 rounded'\n : ''\n } p-4 md:items-center`\"\n >\n <div class=\"text-center md:text-left\">\n <h1\n v-if=\"title\"\n :class=\"`text-3xl font-medium ${darkText} sm:text-3xl`\"\n >\n {{ title }}\n </h1>\n <h2\n v-if=\"subtitle\"\n :class=\"`max-w-xl mt-4 text-2xl ${darkText}`\"\n >\n {{ subtitle }}\n </h2>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div v-if=\"props.big\" class=\"animate-bounce absolute bottom-10 left-1/2\">\n <div\n class=\"mx-auto w-12 rounded-full p-2\"\n @click=\"clickScroll\"\n >\n <EpIcon :iconPath=\"mdiChevronDown\" size=\"32\" />\n </div>\n </div>\n <SvgFilter></SvgFilter>\n </header>\n\n <header v-else-if=\"type === 'simple'\">\n <div class=\"text-center md:text-left mt-16 mb-32\">\n <h1\n v-if=\"title\"\n class=\"text-4xl font-bold tracking-tight\"\n >\n {{ title }}\n </h1>\n <h2 v-if=\"subtitle\" class=\"w-1/2 mt-4\">\n {{ subtitle }}\n </h2>\n </div>\n </header>\n\n <header v-else=\"type === 'sideBy'\">\n <div class=\"flex flex-col-reverse lg:flex-row items-stretch\">\n <div class=\"basis-1/2 bg-surface-2 dark:bg-surface-2-dark lg:min-h-48 p-4\">\n <div class=\"flex justify-start pt-0 mb-4\">\n <EpChip v-if=\"synchrone\" :prependIcon=\"mdiCast\" size=\"small\">{{\n labels.synchrone\n }}</EpChip>\n <EpChip v-if=\"duration\" :prependIcon=\"mdiTimerOutline\" size=\"small\">\n {{ duration }}</EpChip\n >\n <EpChip\n v-if=\"assessment\"\n :prependIcon=\"mdiChairSchool\"\n size=\"small\"\n >{{ labels.formatif }}</EpChip\n >\n </div>\n <div :class=\"`${vAlign} flex h-full pb-8 pl-6 max-w-3xl`\">\n <div>\n <h1\n v-if=\"title\"\n class=\"text-3xl sm:text-4xl xl:text-5xl font-bold tracking-tight\"\n >\n {{ title }}\n </h1>\n <p\n v-if=\"subtitle\"\n class=\"mt-4 text-xl\"\n >\n {{ subtitle }}\n </p>\n <div class=\"mt-4\">\n <slot />\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"basis-1/2\">\n <img\n :src=\"bgImg\"\n alt=\"\"\n class=\"h-32 lg:h-full size-full object-cover\"\n :style=\"`filter:url(#${headerImgColor});`\"\n />\n </div>\n </div>\n </header>\n</template>\n"],"names":["type","_createElementBlock","_normalizeClass","_unref","_createElementVNode","_normalizeStyle","synchrone","_createBlock","EpChip","labels","duration","assessment","vAlign","hAlign","subtitle","textBg","_openBlock","_createVNode","EpIcon","_toDisplayString","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAtBlB,UAAM,QAAQ;AAwBd,UAAM,SAAS,SAAS,MAAM;AAC5B,aAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAMN,MAAM,MAAM,iBAAiB,MAAM;AAAA;AAAA;AAAA,IAGtC,CAAC;AAED,UAAM,QAAQ,SAAS,MAAM;AAC3B,UAAI,MAAM,KAAK;AACb,eAAO,MAAM;AAAA,MACf;AACA,aAAO;AAAA,IACT,CAAC;AAED,UAAM,OAAO;AAIb,UAAM,cAAc,MAAY;AAC9B,WAAK,SAAS;AAAA,IAChB;AAEA,UAAM,WAAW,SAAS,MAAK;AAC7B,UAAG,MAAM,UAAS;AAChB,eAAO;A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AAA,yBAAdH,YAECC,aAAA;AAAA;gBAFwB,aAAaL,MAAA,eAAA;AAAA,gBAAiB,MAAK;AAAA,cAAA;iCAC1D,MAAc;AAAA,kDAAXO,KAAAA,QAAQ,GAAA,CAAA;AAAA,gBAAA;;;cAGLC,KAAAA,2BADRJ,YAKCC,aAAA;AAAA;gBAHE,aAAaL,MAAA,cAAA;AAAA,gBACd,MAAK;AAAA,cAAA;iCACJ,MAAqB;AAAA,kBAAlBM,gBAAAA,gBAAAA,KAAAA,OAAO,QAAQ,GAAA,CAAA;AAAA,gBAAA;;;;YAGvBL,mBAkBM,OAAA;AAAA,cAlBA,yBAAUQ,KAAAA,MAAM,kCAAA;AAAA,YAAA;cACpBR,mBAgBM,OAAA,MAAA;AAAA,gBAdID,MAAA,KAAA,kBADRF,mBAKK,MALL,aAKKkB,gBADAhB,MAAA,KAAA,CAAK,GAAA,CAAA;gBAGFW,KAAAA,yBADRb,mBAKI,KALJ,aAKIkB,gBADCL,KAAAA,QAAQ,GAAA,CAAA;gBAEbV,mBAEM,OAFN,aAEM;AAAA,kBADJgB,WAAQ,KAAA,QAAA,SAAA;AAAA,gBAAA;;;;UAMhBhB,mBAOM,OAPN,aAOM;AAAA,YANJA,mBAKE,OAAA;AAAA,cAJC,KAAK,MAAA;AAAA,cACN,KAAI;AAAA,cACJ,OAAM;AAAA,cACL,qCAAsBD,MAAA,cAAA,CAAc,IAAA;AAAA,YAAA;;;;;;;"}
|
|
@@ -1,4 +1,85 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, createVNode, unref, toDisplayString, normalizeStyle } from "vue";
|
|
2
|
+
import { Handle, Position } from "@vue-flow/core";
|
|
3
|
+
import _sfc_main$1 from "../basics/EpIcon.vue.js";
|
|
4
|
+
import { useRenderText } from "../../composables/useRenderText.js";
|
|
5
|
+
const _hoisted_1 = ["innerHTML"];
|
|
6
|
+
const plug = "M17,16H21V14H17V10H21V8H17V8C17,7 16,6 15,6H9.5L6,9.5H3V14.5H6L9.5,18H15C16,18 17,17 17,16Z";
|
|
7
|
+
const socket = "M7,16C7,17 8,18 9,18H14.5L18,14.5H21V9.5H18L14.5,6H9C8,6 7,7 7,8Z M7 19 L7 5";
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "AssociationNode",
|
|
10
|
+
props: {
|
|
11
|
+
id: {},
|
|
12
|
+
type: {},
|
|
13
|
+
selected: { type: Boolean },
|
|
14
|
+
connectable: { type: [Boolean, Number, String, Function] },
|
|
15
|
+
position: {},
|
|
16
|
+
dimensions: {},
|
|
17
|
+
label: {},
|
|
18
|
+
isValidTargetPos: {},
|
|
19
|
+
isValidSourcePos: {},
|
|
20
|
+
parent: {},
|
|
21
|
+
parentNodeId: {},
|
|
22
|
+
dragging: { type: Boolean },
|
|
23
|
+
resizing: { type: Boolean },
|
|
24
|
+
zIndex: {},
|
|
25
|
+
targetPosition: {},
|
|
26
|
+
sourcePosition: {},
|
|
27
|
+
dragHandle: {},
|
|
28
|
+
data: {},
|
|
29
|
+
events: {}
|
|
30
|
+
},
|
|
31
|
+
setup(__props) {
|
|
32
|
+
const props = __props;
|
|
33
|
+
const colorStyle = computed(() => {
|
|
34
|
+
if (!props.data.mode || props.data.mode == "neutral") {
|
|
35
|
+
return "border-2 border-black dark:border-white";
|
|
36
|
+
}
|
|
37
|
+
if (props.data.mode == "correct") {
|
|
38
|
+
return "border-2 border-green-600";
|
|
39
|
+
} else if (props.data.mode == "wrong") {
|
|
40
|
+
return "border-2 border-red-600";
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return (_ctx, _cache) => {
|
|
44
|
+
return openBlock(), createElementBlock("div", {
|
|
45
|
+
class: normalizeClass(`shadow-lg rounded w-96 relative bg-surface-2 dark:bg-surface-2-dark ${colorStyle.value}`)
|
|
46
|
+
}, [
|
|
47
|
+
createElementVNode("div", {
|
|
48
|
+
class: "px-4 py-2 break-words",
|
|
49
|
+
innerHTML: unref(useRenderText)(_ctx.data.label)
|
|
50
|
+
}, null, 8, _hoisted_1),
|
|
51
|
+
createElementVNode("span", {
|
|
52
|
+
class: normalizeClass(`rounded-full w-6 h-6 flex justify-center bg-white dark:bg-neutral-800 items-center absolute bottom-1/3 ${_ctx.data.left ? "-left-3" : "-right-3"} ${colorStyle.value}`)
|
|
53
|
+
}, toDisplayString(_ctx.data.left ? String.fromCharCode(65 + _ctx.data.index) : _ctx.data.index), 3),
|
|
54
|
+
createVNode(unref(Handle), {
|
|
55
|
+
type: _ctx.data.left ? "source" : "target",
|
|
56
|
+
position: _ctx.data.left ? unref(Position).Right : unref(Position).Left,
|
|
57
|
+
style: normalizeStyle({
|
|
58
|
+
width: "20px",
|
|
59
|
+
// handle invisible, pas d’espace
|
|
60
|
+
height: "20px",
|
|
61
|
+
top: "50%",
|
|
62
|
+
zIndex: "100",
|
|
63
|
+
transform: "translateY(-50%)",
|
|
64
|
+
left: _ctx.data.left ? "96%" : "-10px",
|
|
65
|
+
opacity: 0
|
|
66
|
+
})
|
|
67
|
+
}, null, 8, ["type", "position", "style"]),
|
|
68
|
+
createVNode(_sfc_main$1, {
|
|
69
|
+
"icon-path": _ctx.data.left ? plug : socket,
|
|
70
|
+
style: normalizeStyle({
|
|
71
|
+
position: "absolute",
|
|
72
|
+
width: "30px",
|
|
73
|
+
height: "30px",
|
|
74
|
+
top: "50%",
|
|
75
|
+
transform: "translateY(-50%)",
|
|
76
|
+
left: _ctx.data.left ? "97%" : "-20px"
|
|
77
|
+
})
|
|
78
|
+
}, null, 8, ["icon-path", "style"])
|
|
79
|
+
], 2);
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
2
83
|
export {
|
|
3
84
|
_sfc_main as default
|
|
4
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssociationNode.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"AssociationNode.vue.js","sources":["../../../src/components/tools/AssociationNode.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { Position, Handle } from '@vue-flow/core'\nimport type { NodeProps } from '@vue-flow/core'\nimport EpIcon from '../basics/EpIcon.vue'\nimport { useRenderText } from '~/composables/useRenderText';\n\n\nconst plug = 'M17,16H21V14H17V10H21V8H17V8C17,7 16,6 15,6H9.5L6,9.5H3V14.5H6L9.5,18H15C16,18 17,17 17,16Z';\nconst socket = 'M7,16C7,17 8,18 9,18H14.5L18,14.5H21V9.5H18L14.5,6H9C8,6 7,7 7,8Z M7 19 L7 5';\n\ninterface AssociationData {\n mode?: 'neutral' | 'correct' | 'wrong';\n left: boolean;\n index: number;\n label: string;\n}\n\nconst props = withDefaults(defineProps<NodeProps<AssociationData>>(), {});\n\nconst colorStyle = computed(() => {\n if(!props.data.mode || props.data.mode == 'neutral') {\n return 'border-2 border-black dark:border-white'\n }\n if(props.data.mode == 'correct') {\n return 'border-2 border-green-600'\n } else if(props.data.mode == 'wrong') {\n return 'border-2 border-red-600'\n }\n});\n\n</script>\n\n<template>\n <div :class=\"`shadow-lg rounded w-96 relative bg-surface-2 dark:bg-surface-2-dark ${colorStyle}`\">\n <div class=\"px-4 py-2 break-words\" v-html=\"useRenderText(data.label)\"></div>\n <span :class=\"`rounded-full w-6 h-6 flex justify-center bg-white dark:bg-neutral-800 items-center absolute bottom-1/3 ${(data.left)? '-left-3' : '-right-3'} ${colorStyle}`\">{{ (data.left)? String.fromCharCode(65 + data.index) : data.index }}</span>\n\n <Handle\n :type=\"data.left ? 'source' : 'target'\"\n :position=\"data.left ? Position.Right : Position.Left\"\n :style=\"{\n width: '20px', // handle invisible, pas d’espace\n height: '20px',\n top: '50%',\n zIndex: '100',\n transform: 'translateY(-50%)',\n left: data.left ? '96%' : '-10px',\n opacity: 0\n }\"\n />\n <EpIcon \n :icon-path=\"data.left ? plug : socket\"\n :style=\"{\n position: 'absolute',\n width: '30px',\n height: '30px',\n top: '50%',\n transform: 'translateY(-50%)',\n left: data.left ? '97%' : '-20px'\n }\" \n />\n </div>\n</template>\n"],"names":["_createElementBlock","_createElementVNode","_unref","data","_normalizeClass","_createVNode","_normalizeStyle","EpIcon"],"mappings":";;;;;AAQA,MAAM,OAAO;AACb,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;AASf,UAAM,QAAQ;AAEd,UAAM,aAAa,SAAS,MAAM;AAC9B,UAAG,CAAC,MAAM,KAAK,QAAQ,MAAM,KAAK,QAAQ,WAAW;AACjD,eAAO;AAAA,MACX;AACA,UAAG,MAAM,KAAK,QAAQ,WAAW;AAC7B,eAAO;AAAA,MACX,WAAU,MAAM,KAAK,QAAQ,SAAS;AAClC,eAAO;AAAA,MACX;AAAA,IACJ,CAAC;;0BAKGA,mBA4BM,OAAA;AAAA,QA5BA,6FAA8E,WAAA,KAAU,EAAA;AAAA,MAAA;QAC1FC,mBAA4E,OAAA;AAAA,UAAvE,OAAM;AAAA,UAAwB,WAAQC,MAAA,aAAA,EAAcC,KAAAA,KAAK,KAAK;AAAA,QAAA;QACnEF,mBAAwP,QAAA;AAAA,UAAjP,OAAKG,eAAA,0GAA6GD,KAAAA,KAAK,iCAAiC,WAAA,KAAU,EAAA;AAAA,QAAA,GAAQA,gBAAAA,KAAAA,KAAK,OAAO,OAAO,aAAY,KAAMA,KAAAA,KAAK,KAAK,IAAIA,KAAAA,KAAK,KAAK,GAAA,CAAA;AAAA,QAE9OE,YAYEH,MAAA,MAAA,GAAA;AAAA,UAXG,MAAMC,KAAAA,KAAK,OAAI,WAAA;AAAA,UACf,UAAUA,KAAAA,KAAK,OAAOD,MAAA,QAAA,EAAS,QAAQA,MAAA,QAAA,EAAS;AAAA,UAChD,OAAKI,eAAA;AAAA;;;;;;YAAuOH,MAAAA,KAAAA,KAAK,OAAI,QAAA;AAAA;;;QAU1PE,YAUEE,aAAA;AAAA,UATG,aAAWJ,KAAAA,KAAK,OAAO,OAAO;AAAA,UAC9B,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