ep-lib-ts 1.1.14 → 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/EpStackedList.vue.js +1 -1
- package/dist/components/basics/EpText.vue.js +77 -79
- package/dist/components/basics/EpText.vue.js.map +1 -1
- package/dist/components/educationals/EpBranchingScenario.vue2.js +2 -2
- package/dist/components/educationals/EpConclusion.vue.js +1 -1
- package/dist/components/educationals/EpDescription.vue.js +1 -1
- package/dist/components/educationals/EpInstructions.vue.js +1 -1
- package/dist/components/educationals/EpIntroduction.vue.js +1 -1
- package/dist/components/educationals/EpResource.vue.js +1 -1
- package/dist/components/educationals/EpResource.vue.js.map +1 -1
- package/dist/components/educationals/EpSpecificObjective.vue.js +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/interactions/EpAssociation.vue.js +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/EpQuestion.vue.js +1 -1
- package/dist/components/interactions/EpQuestion.vue.js.map +1 -1
- package/dist/components/interactions/EpSummativeTable.vue.js +1 -1
- package/dist/components/medias/EpAudio.vue.js +1 -1
- package/dist/components/medias/EpHierarchy.vue2.js +1 -1
- package/dist/components/medias/EpHierarchy.vue2.js.map +1 -1
- package/dist/components/signages/EpAlert.vue2.js +1 -1
- package/dist/components/signages/EpQuote.vue.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/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 +56 -1
- package/dist/components/tools/Details.vue.js.map +1 -1
- package/dist/components/tools/Details.vue2.js +1 -56
- package/dist/components/tools/Details.vue2.js.map +1 -1
- package/dist/components/tools/RenderTextNode.vue.js +19 -1
- package/dist/components/tools/RenderTextNode.vue.js.map +1 -1
- package/dist/components/tools/RenderTextNode.vue2.js +1 -19
- package/dist/components/tools/RenderTextNode.vue2.js.map +1 -1
- package/dist/components/tools/SegmentedBox.vue2.js +1 -1
- package/dist/components/tools/TextMedia.vue.js +50 -1
- package/dist/components/tools/TextMedia.vue.js.map +1 -1
- package/dist/components/tools/TextMedia.vue2.js +1 -50
- package/dist/components/tools/TextMedia.vue2.js.map +1 -1
- package/dist/components/tools/TimelineItem.vue2.js +1 -1
- package/dist/components/tools/TwoColsMedia.vue2.js +2 -2
- package/dist/components/tools/TwoColsMedia.vue2.js.map +1 -1
- package/dist/style.css +83 -83
- package/package.json +1 -1
|
@@ -1,4 +1,58 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, createCommentVNode, createElementVNode, normalizeClass, toDisplayString } from "vue";
|
|
2
|
+
import { typeAvatar } from "../../types/Avatar.js";
|
|
3
|
+
import useColors from "../../composables/useColors.js";
|
|
4
|
+
const _hoisted_1 = { key: 0 };
|
|
5
|
+
const _hoisted_2 = ["src", "alt"];
|
|
6
|
+
const _hoisted_3 = { key: 1 };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "EpAvatar",
|
|
9
|
+
props: {
|
|
10
|
+
src: { default: "" },
|
|
11
|
+
alt: { default: "" },
|
|
12
|
+
color: { default: "primary" },
|
|
13
|
+
size: { default: "small" },
|
|
14
|
+
variant: { default: "circle" },
|
|
15
|
+
name: { default: "" }
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const style = computed(() => {
|
|
20
|
+
return props.variant;
|
|
21
|
+
});
|
|
22
|
+
const size = computed(() => {
|
|
23
|
+
return props.size;
|
|
24
|
+
});
|
|
25
|
+
const final_style = computed(() => {
|
|
26
|
+
var _a;
|
|
27
|
+
return `${(_a = typeAvatar[style.value]) == null ? void 0 : _a[size.value]}`;
|
|
28
|
+
});
|
|
29
|
+
const bgcolor = computed(() => {
|
|
30
|
+
return useColors(props.color);
|
|
31
|
+
});
|
|
32
|
+
const final_name = computed(() => {
|
|
33
|
+
if (props.name.length > 2) {
|
|
34
|
+
return props.name.slice(0, 2);
|
|
35
|
+
} else {
|
|
36
|
+
return props.name;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return (_ctx, _cache) => {
|
|
40
|
+
return openBlock(), createElementBlock("div", null, [
|
|
41
|
+
props.src != "" ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
42
|
+
createElementVNode("img", {
|
|
43
|
+
src: props.src,
|
|
44
|
+
alt: props.alt,
|
|
45
|
+
class: normalizeClass(`${final_style.value} `)
|
|
46
|
+
}, null, 10, _hoisted_2)
|
|
47
|
+
])) : props.src == "" ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
48
|
+
createElementVNode("div", {
|
|
49
|
+
class: normalizeClass(`${final_style.value} ${bgcolor.value} justify-center font-bold text-white flex items-center`)
|
|
50
|
+
}, toDisplayString(final_name.value), 3)
|
|
51
|
+
])) : createCommentVNode("", true)
|
|
52
|
+
]);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
2
56
|
export {
|
|
3
57
|
_sfc_main as default
|
|
4
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpAvatar.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"EpAvatar.vue.js","sources":["../../../src/components/basics/EpAvatar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { typeAvatar } from \"../../types/Avatar\";\nimport type { EpAvatarProps } from \"../../types/basics/EpAvatar\";\nimport useColors from \"../../composables/useColors\";\n\n// define parameter and default valule\nconst props = withDefaults(defineProps<EpAvatarProps>(), {\n src: \"\",\n alt: \"\",\n color: \"primary\",\n size: \"small\",\n variant: \"circle\",\n name: \"\",\n});\n\nconst style = computed(() => {\n return props.variant;\n});\n\nconst size = computed(() => {\n return props.size;\n});\n\nconst final_style = computed(() => {\n return `${typeAvatar[style.value]?.[size.value]}`;\n});\n\nconst bgcolor = computed(() => {\n return useColors(props.color);\n});\n\nconst final_name = computed(() => {\n if (props.name.length > 2) {\n return props.name.slice(0, 2);\n } else {\n return props.name;\n }\n});\n</script>\n<template>\n <div>\n <div v-if=\"props.src != ''\">\n <img :src=\"props.src\" :alt=\"props.alt\" :class=\"`${final_style} `\" />\n </div>\n <div v-else-if=\"props.src == ''\">\n <div\n :class=\"`${final_style} ${bgcolor} justify-center font-bold text-white flex items-center`\"\n >\n {{ final_name }}\n </div>\n </div>\n </div>\n</template>\n"],"names":["_createElementBlock","_createElementVNode","_normalizeClass"],"mappings":";;;;;;;;;;;;;;;;;AAOA,UAAM,QAAQ;AASd,UAAM,QAAQ,SAAS,MAAM;AACzB,aAAO,MAAM;AAAA,IACjB,CAAC;AAED,UAAM,OAAO,SAAS,MAAM;AACxB,aAAO,MAAM;AAAA,IACjB,CAAC;AAED,UAAM,cAAc,SAAS,MAAM;;AAC/B,aAAO,IAAG,gBAAW,MAAM,KAAK,MAAtB,mBAA0B,KAAK,MAAM;AAAA,IACnD,CAAC;AAED,UAAM,UAAU,SAAS,MAAM;AAC3B,aAAO,UAAU,MAAM,KAAK;AAAA,IAChC,CAAC;AAED,UAAM,aAAa,SAAS,MAAM;AAC9B,UAAI,MAAM,KAAK,SAAS,GAAG;AACvB,eAAO,MAAM,KAAK,MAAM,GAAG,CAAC;AAAA,MAChC,OAAO;AACH,eAAO,MAAM;AAAA,MACjB;AAAA,IACJ,CAAC;;0BAGGA,mBAWM,OAAA,MAAA;AAAA,QAVS,MAAM,OAAG,mBAApBA,mBAEM,OAAA,YAAA;AAAA,UADFC,mBAAoE,OAAA;AAAA,YAA9D,KAAK,MAAM;AAAA,YAAM,KAAK,MAAM;AAAA,YAAM,yBAAU,YAAA,KAAW,GAAA;AAAA,UAAA;cAEjD,MAAM,OAAG,mBAAzBD,mBAMM,OAAA,YAAA;AAAA,UALFC,mBAIM,OAAA;AAAA,YAHD,OAAKC,eAAA,GAAK,YAAA,KAAW,KAAK,QAAA,KAAO,yDAAA;AAAA,UAAA,mBAE/B,WAAA,KAAU,GAAA,CAAA;AAAA,QAAA;;;;;"}
|
|
@@ -1,58 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { typeAvatar } from "../../types/Avatar.js";
|
|
3
|
-
import useColors from "../../composables/useColors.js";
|
|
4
|
-
const _hoisted_1 = { key: 0 };
|
|
5
|
-
const _hoisted_2 = ["src", "alt"];
|
|
6
|
-
const _hoisted_3 = { key: 1 };
|
|
7
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
-
__name: "EpAvatar",
|
|
9
|
-
props: {
|
|
10
|
-
src: { default: "" },
|
|
11
|
-
alt: { default: "" },
|
|
12
|
-
color: { default: "primary" },
|
|
13
|
-
size: { default: "small" },
|
|
14
|
-
variant: { default: "circle" },
|
|
15
|
-
name: { default: "" }
|
|
16
|
-
},
|
|
17
|
-
setup(__props) {
|
|
18
|
-
const props = __props;
|
|
19
|
-
const style = computed(() => {
|
|
20
|
-
return props.variant;
|
|
21
|
-
});
|
|
22
|
-
const size = computed(() => {
|
|
23
|
-
return props.size;
|
|
24
|
-
});
|
|
25
|
-
const final_style = computed(() => {
|
|
26
|
-
var _a;
|
|
27
|
-
return `${(_a = typeAvatar[style.value]) == null ? void 0 : _a[size.value]}`;
|
|
28
|
-
});
|
|
29
|
-
const bgcolor = computed(() => {
|
|
30
|
-
return useColors(props.color);
|
|
31
|
-
});
|
|
32
|
-
const final_name = computed(() => {
|
|
33
|
-
if (props.name.length > 2) {
|
|
34
|
-
return props.name.slice(0, 2);
|
|
35
|
-
} else {
|
|
36
|
-
return props.name;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
return (_ctx, _cache) => {
|
|
40
|
-
return openBlock(), createElementBlock("div", null, [
|
|
41
|
-
props.src != "" ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
42
|
-
createElementVNode("img", {
|
|
43
|
-
src: props.src,
|
|
44
|
-
alt: props.alt,
|
|
45
|
-
class: normalizeClass(`${final_style.value} `)
|
|
46
|
-
}, null, 10, _hoisted_2)
|
|
47
|
-
])) : props.src == "" ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
48
|
-
createElementVNode("div", {
|
|
49
|
-
class: normalizeClass(`${final_style.value} ${bgcolor.value} justify-center font-bold text-white flex items-center`)
|
|
50
|
-
}, toDisplayString(final_name.value), 3)
|
|
51
|
-
])) : createCommentVNode("", true)
|
|
52
|
-
]);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
1
|
+
import _sfc_main from "./EpAvatar.vue.js";
|
|
56
2
|
export {
|
|
57
3
|
_sfc_main as default
|
|
58
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpAvatar.vue2.js","sources":[
|
|
1
|
+
{"version":3,"file":"EpAvatar.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, Fragment, renderList, createElementVNode, createBlock, createCommentVNode, mergeProps, toDisplayString, unref, createVNode } from "vue";
|
|
2
|
-
import _sfc_main$1 from "./EpAvatar.
|
|
2
|
+
import _sfc_main$1 from "./EpAvatar.vue.js";
|
|
3
3
|
import _sfc_main$2 from "./EpIcon.vue.js";
|
|
4
4
|
import { useRenderText } from "../../composables/useRenderText.js";
|
|
5
5
|
import { roundedType } from "../../types/StackedList.js";
|
|
@@ -25,89 +25,87 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
() => import("../tools/AsyncKatexRender.vue.js")
|
|
26
26
|
);
|
|
27
27
|
const renderTitle = computed(() => props.title || "En savoir plus");
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const stringRelations = termsRelation.join(", ");
|
|
67
|
-
const stringVariations = term.variation.join(", ");
|
|
68
|
-
nodes.push(
|
|
69
|
-
h(
|
|
70
|
-
"div",
|
|
71
|
-
{ style: "display:inline" },
|
|
72
|
-
h(
|
|
73
|
-
_sfc_main$1,
|
|
74
|
-
{
|
|
75
|
-
term: term.term,
|
|
76
|
-
word: render_word,
|
|
77
|
-
variations: stringVariations,
|
|
78
|
-
graminfo: term.graminfo,
|
|
79
|
-
src: (_a = term.img) != null ? _a : "",
|
|
80
|
-
domain: term.domain,
|
|
81
|
-
relations: stringRelations,
|
|
82
|
-
labelDefinition: props.labelDefinition,
|
|
83
|
-
labelDomain: props.labelDomain,
|
|
84
|
-
labelVariations: props.labelVariations,
|
|
85
|
-
labelRelations: props.labelRelations,
|
|
86
|
-
labelClose: props.labelClose
|
|
87
|
-
},
|
|
88
|
-
() => {
|
|
89
|
-
const def = useRenderText(term.definition);
|
|
90
|
-
if (!isHtml(def)) {
|
|
91
|
-
return h("div", { innerHTML: def });
|
|
92
|
-
}
|
|
93
|
-
return parseHtmlToVNodes(def);
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
)
|
|
97
|
-
);
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
nodes.push(
|
|
28
|
+
function domNodeToVNode(node) {
|
|
29
|
+
var _a;
|
|
30
|
+
if (node.nodeType === 3) {
|
|
31
|
+
const text = node.textContent;
|
|
32
|
+
if (text && text.replace(/\s/g, "").length > 0) return text;
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
if (node.nodeType !== 1) return null;
|
|
36
|
+
const el = node;
|
|
37
|
+
const tag = el.tagName.toLowerCase();
|
|
38
|
+
if (el.classList.contains("ep-katex-formula")) {
|
|
39
|
+
const formula = el.textContent || "";
|
|
40
|
+
const block = el.classList.contains("katex-display");
|
|
41
|
+
return h(AsyncKatexRenderer, { formula, block });
|
|
42
|
+
}
|
|
43
|
+
if (el.classList.contains("ep_glossary_item")) {
|
|
44
|
+
const id = el.getAttribute("data-id");
|
|
45
|
+
const render_word = el.innerHTML;
|
|
46
|
+
let _glossary = [];
|
|
47
|
+
if (props.glossary) {
|
|
48
|
+
_glossary = props.glossary.map((item) => {
|
|
49
|
+
var _a2;
|
|
50
|
+
return {
|
|
51
|
+
...item,
|
|
52
|
+
id: (_a2 = item.documentId) != null ? _a2 : item.id
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const term = _glossary.find((word) => word.id === id);
|
|
57
|
+
if (term) {
|
|
58
|
+
const foundedRelations = _glossary.filter(
|
|
59
|
+
(x) => x.relation.some((r) => r === id)
|
|
60
|
+
);
|
|
61
|
+
const stringRelations = foundedRelations.map((x) => x.term).join(", ");
|
|
62
|
+
const stringVariations = term.variation.join(", ");
|
|
63
|
+
return h(
|
|
64
|
+
"div",
|
|
65
|
+
{ style: "display:inline" },
|
|
102
66
|
h(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
67
|
+
_sfc_main$1,
|
|
68
|
+
{
|
|
69
|
+
term: term.term,
|
|
70
|
+
word: render_word,
|
|
71
|
+
variations: stringVariations,
|
|
72
|
+
graminfo: term.graminfo,
|
|
73
|
+
src: (_a = term.img) != null ? _a : "",
|
|
74
|
+
domain: term.domain,
|
|
75
|
+
relations: stringRelations,
|
|
76
|
+
labelDefinition: props.labelDefinition,
|
|
77
|
+
labelDomain: props.labelDomain,
|
|
78
|
+
labelVariations: props.labelVariations,
|
|
79
|
+
labelRelations: props.labelRelations,
|
|
80
|
+
labelClose: props.labelClose
|
|
81
|
+
},
|
|
82
|
+
() => {
|
|
83
|
+
const def = useRenderText(term.definition);
|
|
84
|
+
if (!isHtml(def)) return h("div", { innerHTML: def });
|
|
85
|
+
return childNodesToVNodes(parseFragment(def));
|
|
86
|
+
}
|
|
106
87
|
)
|
|
107
88
|
);
|
|
108
89
|
}
|
|
90
|
+
}
|
|
91
|
+
const children = childNodesToVNodes(el.childNodes);
|
|
92
|
+
if (tag === "a") {
|
|
93
|
+
return h(tag, { ...getElementAttrs(el), target: "_blank", rel: "noopener noreferrer" }, children);
|
|
94
|
+
}
|
|
95
|
+
return h(tag, getElementAttrs(el), children);
|
|
96
|
+
}
|
|
97
|
+
function childNodesToVNodes(nodes) {
|
|
98
|
+
const result = [];
|
|
99
|
+
nodes.forEach((node) => {
|
|
100
|
+
const vnode = domNodeToVNode(node);
|
|
101
|
+
if (vnode !== null) result.push(vnode);
|
|
109
102
|
});
|
|
110
|
-
return
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
function parseFragment(html) {
|
|
106
|
+
const template = document.createElement("template");
|
|
107
|
+
template.innerHTML = html;
|
|
108
|
+
return template.content.childNodes;
|
|
111
109
|
}
|
|
112
110
|
const renderText = computed(() => {
|
|
113
111
|
if (!props.content) return [h("div")];
|
|
@@ -115,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
113
|
return [h("div", { innerHTML: useRenderText(props.content) })];
|
|
116
114
|
}
|
|
117
115
|
const formatted = useRenderText(props.content);
|
|
118
|
-
return
|
|
116
|
+
return childNodesToVNodes(parseFragment(formatted));
|
|
119
117
|
});
|
|
120
118
|
function getElementAttrs(el) {
|
|
121
119
|
const attrs = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpText.vue.js","sources":["../../../src/components/basics/EpText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, toRefs, h, type VNode, defineAsyncComponent } from \"vue\";\nimport type { Glossary } from \"~/types/Glossary\"\nimport { isHtml } from \"~/composables/isHtml\";\nimport { useRenderText } from \"~/composables/useRenderText\";\nimport EpAccordeon from \"~/components/interactions/EpAccordeon.vue\";\nimport EpTerm from \"~/components/medias/EpTerm.vue\";\nimport type { EpTextProps } from \"~/types/basics/EpText\";\n\n\nconst props = withDefaults(defineProps<EpTextProps>(), {\n compact: false,\n labelDefinition: \"Définition\",\n labelDomain: \"Domaine\",\n labelVariations: \"Variations\",\n labelRelations: \"Relations\",\n labelClose: \"Fermer\",\n});\n\nconst { compact } = toRefs(props);\n\n//async render katext\nconst AsyncKatexRenderer = defineAsyncComponent(() => \n import(\"~/components/tools/AsyncKatexRender.vue\")\n);\n\nconst renderTitle = computed(() => props.title || \"En savoir plus\");\n\nfunction
|
|
1
|
+
{"version":3,"file":"EpText.vue.js","sources":["../../../src/components/basics/EpText.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, toRefs, h, type VNode, defineAsyncComponent } from \"vue\";\nimport type { Glossary } from \"~/types/Glossary\"\nimport { isHtml } from \"~/composables/isHtml\";\nimport { useRenderText } from \"~/composables/useRenderText\";\nimport { TABLE_WRAPPER } from \"~/composables/tableWrapper\";\nimport EpAccordeon from \"~/components/interactions/EpAccordeon.vue\";\nimport EpTerm from \"~/components/medias/EpTerm.vue\";\nimport type { EpTextProps } from \"~/types/basics/EpText\";\n\n\nconst props = withDefaults(defineProps<EpTextProps>(), {\n compact: false,\n labelDefinition: \"Définition\",\n labelDomain: \"Domaine\",\n labelVariations: \"Variations\",\n labelRelations: \"Relations\",\n labelClose: \"Fermer\",\n});\n\nconst { compact } = toRefs(props);\n\n//async render katext\nconst AsyncKatexRenderer = defineAsyncComponent(() => \n import(\"~/components/tools/AsyncKatexRender.vue\")\n);\n\nconst renderTitle = computed(() => props.title || \"En savoir plus\");\n\nfunction domNodeToVNode(node: Node): VNode | string | null {\n // Nodo de texto\n if (node.nodeType === 3) {\n const text = node.textContent;\n if (text && text.replace(/\\s/g, '').length > 0) return text;\n return null;\n }\n\n if (node.nodeType !== 1) return null;\n\n const el = node as HTMLElement;\n const tag = el.tagName.toLowerCase();\n\n // KaTeX\n if (el.classList.contains(\"ep-katex-formula\")) {\n const formula = el.textContent || \"\";\n const block = el.classList.contains(\"katex-display\");\n return h(AsyncKatexRenderer, { formula, block });\n }\n\n // Glossary\n if (el.classList.contains(\"ep_glossary_item\")) {\n const id = el.getAttribute(\"data-id\");\n const render_word = el.innerHTML;\n let _glossary: Glossary[] = [];\n if (props.glossary) {\n _glossary = props.glossary.map((item) => ({\n ...item,\n id: item.documentId ?? item.id,\n }));\n }\n const term = _glossary.find((word) => word.id === id);\n if (term) {\n const foundedRelations = _glossary.filter((x) =>\n x.relation.some((r: string) => r === id)\n );\n const stringRelations = foundedRelations.map((x) => x.term).join(\", \");\n const stringVariations = term.variation.join(\", \");\n return h(\n \"div\",\n { style: \"display:inline\" },\n h(\n EpTerm,\n {\n term: term.term,\n word: render_word,\n variations: stringVariations,\n graminfo: term.graminfo,\n src: term.img ?? \"\",\n domain: term.domain,\n relations: stringRelations,\n labelDefinition: props.labelDefinition,\n labelDomain: props.labelDomain,\n labelVariations: props.labelVariations,\n labelRelations: props.labelRelations,\n labelClose: props.labelClose,\n },\n () => {\n const def = useRenderText(term.definition);\n if (!isHtml(def)) return h(\"div\", { innerHTML: def });\n return childNodesToVNodes(parseFragment(def));\n }\n )\n );\n }\n }\n\n\nconst children = childNodesToVNodes(el.childNodes);\n\n if (tag === \"a\") {\n return h(tag, { ...getElementAttrs(el), target: \"_blank\", rel: \"noopener noreferrer\" }, children);\n }\n\n return h(tag, getElementAttrs(el), children);\n}\n\nfunction childNodesToVNodes(nodes: NodeList | Node[]): (VNode | string)[] {\n const result: (VNode | string)[] = [];\n nodes.forEach((node) => {\n const vnode = domNodeToVNode(node);\n if (vnode !== null) result.push(vnode);\n });\n return result;\n}\n\nfunction parseFragment(html: string): NodeList {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content.childNodes;\n}\n\n\nconst renderText = computed(() => {\n if (!props.content) return [h(\"div\")];\n if (!isHtml(props.content)) {\n return [h(\"div\", { innerHTML: useRenderText(props.content) })];\n }\n const formatted = useRenderText(props.content);\n return childNodesToVNodes(parseFragment(formatted));\n});\n\n\nfunction getElementAttrs(el: HTMLElement): Record<string, any> {\n const attrs: Record<string, any> = {};\n\n for (const attr of Array.from(el.attributes)) {\n attrs[attr.name] = attr.value;\n }\n\n if (el.tagName.toLowerCase() === \"a\") {\n attrs.target = \"_blank\";\n attrs.rel = \"noopener noreferrer\";\n }\n\n return attrs;\n}\n</script>\n\n<template>\n <div class=\"px-2\">\n <EpAccordeon v-if=\"compact\" outlined :title=\"renderTitle\">\n <div>\n <component :is=\"node\" v-for=\"(node, i) in renderText\" :key=\"i\" />\n </div>\n </EpAccordeon>\n <div v-else>\n <component :is=\"node\" v-for=\"(node, i) in renderText\" :key=\"i\" />\n </div>\n </div>\n</template>\n"],"names":["_a","EpTerm","_openBlock","_createElementBlock","_unref","_createBlock","EpAccordeon","_createElementVNode","_Fragment","_renderList","_resolveDynamicCompon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openBlock, createElementVNode, normalizeStyle, createCommentVNode, toDisplayString, createVNode, withCtx, unref, normalizeClass, createTextVNode, createBlock, Fragment, renderList } from "vue";
|
|
2
2
|
import { useRenderText } from "../../composables/useRenderText.js";
|
|
3
3
|
import _sfc_main$2 from "../basics/EpIcon.vue.js";
|
|
4
|
-
import _sfc_main$4 from "../tools/Details.
|
|
4
|
+
import _sfc_main$4 from "../tools/Details.vue.js";
|
|
5
5
|
import _sfc_main$5 from "../interactions/EpModal.vue.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import Comp from "../medias/EpHierarchy.vue.js";
|
|
8
8
|
import _sfc_main$1 from "../basics/EpBtn.vue.js";
|
|
9
9
|
import { mdiArrowLeft } from "@mdi/js";
|
|
10
|
-
import _sfc_main$3 from "../tools/TextMedia.
|
|
10
|
+
import _sfc_main$3 from "../tools/TextMedia.vue.js";
|
|
11
11
|
const _hoisted_1 = { class: "mb-2" };
|
|
12
12
|
const _hoisted_2 = { class: "font-bold text-3xl text-center" };
|
|
13
13
|
const _hoisted_3 = {
|
|
@@ -3,7 +3,7 @@ import _sfc_main$4 from "../basics/EpIcon.vue.js";
|
|
|
3
3
|
import _sfc_main$2 from "../interactions/EpModal.vue.js";
|
|
4
4
|
/* empty css */
|
|
5
5
|
import _sfc_main$1 from "../basics/EpBtn.vue.js";
|
|
6
|
-
import _sfc_main$3 from "../tools/RenderTextNode.
|
|
6
|
+
import _sfc_main$3 from "../tools/RenderTextNode.vue.js";
|
|
7
7
|
const _hoisted_1 = { class: "lg:col-span-8 lg:mt-0 lg:border-l dark:border-gray-700 lg:pl-4" };
|
|
8
8
|
const _hoisted_2 = { class: "py-2" };
|
|
9
9
|
const _hoisted_3 = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, toRefs, createElementBlock, openBlock, createElementVNode, createBlock, createCommentVNode, createTextVNode, unref, toDisplayString, createVNode } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../basics/EpIcon.vue.js";
|
|
3
|
-
import _sfc_main$2 from "../tools/RenderTextNode.
|
|
3
|
+
import _sfc_main$2 from "../tools/RenderTextNode.vue.js";
|
|
4
4
|
const _hoisted_1 = { class: "lg:grid lg:grid-cols-12 lg:gap-8" };
|
|
5
5
|
const _hoisted_2 = { class: "lg:col-span-2" };
|
|
6
6
|
const _hoisted_3 = { class: "text-pretty text-3xl font-semibold tracking-tight sm:text-xl" };
|
|
@@ -2,7 +2,7 @@ import { defineComponent, toRefs, createElementBlock, openBlock, createElementVN
|
|
|
2
2
|
import _sfc_main$1 from "../basics/EpIcon.vue.js";
|
|
3
3
|
import Comp from "../interactions/EpAccordeon.vue.js";
|
|
4
4
|
import _sfc_main$3 from "../basics/EpImg.vue.js";
|
|
5
|
-
import _sfc_main$2 from "../tools/RenderTextNode.
|
|
5
|
+
import _sfc_main$2 from "../tools/RenderTextNode.vue.js";
|
|
6
6
|
const _hoisted_1 = { class: "lg:grid lg:grid-cols-12 lg:gap-8" };
|
|
7
7
|
const _hoisted_2 = { class: "lg:col-span-2" };
|
|
8
8
|
const _hoisted_3 = { class: "text-pretty text-3xl font-semibold tracking-tight sm:text-xl" };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, createElementVNode, createBlock, createCommentVNode, createTextVNode, toDisplayString, createVNode } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../basics/EpIcon.vue.js";
|
|
3
|
-
import _sfc_main$2 from "../tools/RenderTextNode.
|
|
3
|
+
import _sfc_main$2 from "../tools/RenderTextNode.vue.js";
|
|
4
4
|
const _hoisted_1 = { class: "lg:grid lg:grid-cols-12 lg:gap-8" };
|
|
5
5
|
const _hoisted_2 = { class: "lg:col-span-2" };
|
|
6
6
|
const _hoisted_3 = { class: "text-pretty text-3xl font-semibold tracking-tight sm:text-xl" };
|
|
@@ -43,7 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
43
|
return defineAsyncComponent(() => import("./EpReading.vue2.js"));
|
|
44
44
|
}
|
|
45
45
|
return defineAsyncComponent(
|
|
46
|
-
() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../basics/EpAvatar.vue": () => import("../basics/EpAvatar.
|
|
46
|
+
() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../basics/EpAvatar.vue": () => import("../basics/EpAvatar.vue2.js"), "../basics/EpBadge.vue": () => import("../basics/EpBadge.vue.js"), "../basics/EpBtn.vue": () => import("../basics/EpBtn.vue2.js"), "../basics/EpCard.vue": () => import("../basics/EpCard.vue2.js"), "../basics/EpChip.vue": () => import("../basics/EpChip.vue2.js"), "../basics/EpDivider.vue": () => import("../basics/EpDivider.vue2.js"), "../basics/EpFlex.vue": () => import("../basics/EpFlex.vue2.js"), "../basics/EpHover.vue": () => import("../basics/EpHover.vue2.js"), "../basics/EpHoverCard.vue": () => import("../basics/EpHoverCard.vue2.js"), "../basics/EpIcon.vue": () => import("../basics/EpIcon.vue2.js"), "../basics/EpImg.vue": () => import("../basics/EpImg.vue2.js"), "../basics/EpImgCarousel.vue": () => import("../basics/EpImgCarousel.vue2.js"), "../basics/EpList.vue": () => import("../basics/EpList.vue.js"), "../basics/EpListItem.vue": () => import("../basics/EpListItem.vue2.js"), "../basics/EpSection.vue": () => import("../basics/EpSection.vue2.js"), "../basics/EpSectionCols.vue": () => import("../basics/EpSectionCols.vue2.js"), "../basics/EpSpinner.vue": () => import("../basics/EpSpinner.vue2.js"), "../basics/EpStackedList.vue": () => import("../basics/EpStackedList.vue2.js"), "../basics/EpTable.vue": () => import("../basics/EpTable.vue2.js"), "../basics/EpText.vue": () => import("../basics/EpText.vue2.js"), "../charts/EpBarChart.vue": () => import("../charts/EpBarChart.vue2.js"), "../charts/EpFunnelChart.vue": () => import("../charts/EpFunnelChart.vue2.js"), "../charts/EpLineChart.vue": () => import("../charts/EpLineChart.vue2.js"), "../charts/EpPieChart.vue": () => import("../charts/EpPieChart.vue2.js"), "./EpBranchingScenario.vue": () => import("./EpBranchingScenario.vue.js"), "./EpCodeblock.vue": () => import("./EpCodeblock.vue3.js"), "./EpConclusion.vue": () => import("./EpConclusion.vue2.js"), "./EpDescription.vue": () => import("./EpDescription.vue2.js"), "./EpDocument.vue": () => import("./EpDocument.vue2.js"), "./EpEdu.vue": () => import("./EpEdu.vue2.js"), "./EpFillBlanks.vue": () => import("./EpFillBlanks.vue2.js"), "./EpInstructions.vue": () => import("./EpInstructions.vue2.js"), "./EpIntroduction.vue": () => import("./EpIntroduction.vue2.js"), "./EpObjective.vue": () => import("./EpObjective.vue2.js"), "./EpReading.vue": () => import("./EpReading.vue2.js"), "./EpResource.vue": () => import("./EpResource.vue2.js"), "./EpScope.vue": () => import("./EpScope.vue2.js"), "./EpSegmentedBox.vue": () => import("./EpSegmentedBox.vue2.js"), "./EpSpecificObjective.vue": () => import("./EpSpecificObjective.vue2.js"), "../forms/EpCheckbox.vue": () => import("../forms/EpCheckbox.vue.js"), "../forms/EpInput.vue": () => import("../forms/EpInput.vue.js"), "../forms/EpRadio.vue": () => import("../forms/EpRadio.vue.js"), "../forms/EpRadioSummative.vue": () => import("../forms/EpRadioSummative.vue2.js"), "../forms/EpSelect.vue": () => import("../forms/EpSelect.vue2.js"), "../forms/EpSwitch.vue": () => import("../forms/EpSwitch.vue.js"), "../forms/EpTextarea.vue": () => import("../forms/EpTextarea.vue.js"), "../forms/EpToggle.vue": () => import("../forms/EpToggle.vue.js"), "../interactions/Ep360Image.vue": () => import("../interactions/Ep360Image.vue.js"), "../interactions/Ep360Video.vue": () => import("../interactions/Ep360Video.vue.js"), "../interactions/EpAccordeon.vue": () => import("../interactions/EpAccordeon.vue.js"), "../interactions/EpAssociation.vue": () => import("../interactions/EpAssociation.vue2.js"), "../interactions/EpContentSlider.vue": () => import("../interactions/EpContentSlider.vue2.js"), "../interactions/EpDarkMode.vue": () => import("../interactions/EpDarkMode.vue2.js"), "../interactions/EpDraggable.vue": () => import("../interactions/EpDraggable.vue2.js"), "../interactions/EpFlipCard.vue": () => import("../interactions/EpFlipCard.vue.js"), "../interactions/EpHotSpot.vue": () => import("../interactions/EpHotSpot.vue2.js"), "../interactions/EpImageCompare.vue": () => import("../interactions/EpImageCompare.vue2.js"), "../interactions/EpModal.vue": () => import("../interactions/EpModal.vue3.js"), "../interactions/EpQuestion.vue": () => import("../interactions/EpQuestion.vue2.js"), "../interactions/EpSummativeTable.vue": () => import("../interactions/EpSummativeTable.vue2.js"), "../interactions/EpSvgShow.vue": () => import("../interactions/EpSvgShow.vue2.js"), "../interactions/EpTabs.vue": () => import("../interactions/EpTabs.vue.js"), "../interactions/EpTooltip.vue": () => import("../interactions/EpTooltip.vue2.js"), "../medias/EpAudio.vue": () => import("../medias/EpAudio.vue2.js"), "../medias/EpCardLink.vue": () => import("../medias/EpCardLink.vue2.js"), "../medias/EpCarousel.vue": () => import("../medias/EpCarousel.vue2.js"), "../medias/EpHierarchy.vue": () => import("../medias/EpHierarchy.vue.js"), "../medias/EpIframe.vue": () => import("../medias/EpIframe.vue2.js"), "../medias/EpKatex.vue": () => import("../medias/EpKatex.vue.js"), "../medias/EpLink.vue": () => import("../medias/EpLink.vue2.js"), "../medias/EpLinkVersion.vue": () => import("../medias/EpLinkVersion.vue2.js"), "../medias/EpLottieSvg.vue": () => import("../medias/EpLottieSvg.vue2.js"), "../medias/EpSensibleImage.vue": () => import("../medias/EpSensibleImage.vue.js"), "../medias/EpSoftware.vue": () => import("../medias/EpSoftware.vue2.js"), "../medias/EpSvg.vue": () => import("../medias/EpSvg.vue2.js"), "../medias/EpTerm.vue": () => import("../medias/EpTerm.vue2.js"), "../medias/EpTimeLine.vue": () => import("../medias/EpTimeLine.vue.js"), "../medias/EpVideo.vue": () => import("../medias/EpVideo.vue2.js"), "../medias/EpVideoPanopto.vue": () => import("../medias/EpVideoPanopto.vue2.js"), "../medias/EpWordDef.vue": () => import("../medias/EpWordDef.vue2.js"), "../signages/EpAlert.vue": () => import("../signages/EpAlert.vue.js"), "../signages/EpBadge.vue": () => import("../signages/EpBadge.vue2.js"), "../signages/EpHeader.vue": () => import("../signages/EpHeader.vue2.js"), "../signages/EpNothing.vue": () => import("../signages/EpNothing.vue.js"), "../signages/EpQuote.vue": () => import("../signages/EpQuote.vue2.js"), "../signages/EpSkeleton.vue": () => import("../signages/EpSkeleton.vue.js"), "../tools/AssociationNode.vue": () => import("../tools/AssociationNode.vue2.js"), "../tools/AsyncKatexRender.vue": () => import("../tools/AsyncKatexRender.vue.js"), "../tools/BgAudio.vue": () => import("../tools/BgAudio.vue2.js"), "../tools/Details.vue": () => import("../tools/Details.vue2.js"), "../tools/DisplayBox.vue": () => import("../tools/DisplayBox.vue.js"), "../tools/RenderTextNode.vue": () => import("../tools/RenderTextNode.vue2.js"), "../tools/SegmentedBox.vue": () => import("../tools/SegmentedBox.vue.js"), "../tools/SvgFilter.vue": () => import("../tools/SvgFilter.vue.js"), "../tools/TextMedia.vue": () => import("../tools/TextMedia.vue2.js"), "../tools/TimelineItem.vue": () => import("../tools/TimelineItem.vue.js"), "../tools/TwoColsMedia.vue": () => import("../tools/TwoColsMedia.vue.js") }), `../${componentToLoad.path}/${componentToLoad.name}.vue`, 3)
|
|
47
47
|
);
|
|
48
48
|
};
|
|
49
49
|
const typeRess = computed(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpResource.vue.js","sources":["../../../src/components/educationals/EpResource.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { defineAsyncComponent, computed, toRefs } from \"vue\";\nimport { useComponent } from \"~/composables/useComponent\";\nimport type { EpResourceProps } from \"~/types/educationals/EpResource\";\n\nconst { type = \"neutral\", resource, pages } = defineProps<EpResourceProps>();\n\nconst resourceInfo = computed(() => {\n if (!resource.hasOwnProperty(\"content\")) {\n return \"EpNothing\";\n }\n //console.log(resource)\n const typeRess = Object.keys(resource.content)[0];\n const ress = Object.assign({}, resource.content[typeRess]);\n\n ress.pages = pages;\n ress.type = typeRess;\n ress.intentions = pages;\n if (typeRess === \"clip\") {\n ress.src = ress.url;\n }\n if (typeRess === \"website\") {\n ress.href = ress.url;\n ress.label = ress.title;\n }\n if (typeRess === \"book\" && pages) {\n //ress.intentions = pages\n ress.pages = null;\n }\n if (ress.version_link) {\n ress.url = ress.version_link.url;\n }\n\n return ress;\n});\n\n//get Component asyncComponent\nconst getCompontent = (name: string | undefined) => {\n const componentToLoad = useComponent(name);\n //console.log(componentToLoad)\n if (componentToLoad.name === \"EpNothing\") {\n return defineAsyncComponent(() => import(\"../signages/EpNothing.vue\"));\n }\n if (componentToLoad.name === \"EpReading\") {\n return defineAsyncComponent(() => import(`./EpReading.vue`));\n }\n return defineAsyncComponent(\n () => import(`../${componentToLoad.path}/${componentToLoad.name}.vue`)\n );\n};\n\nconst typeRess = computed(() => {\n if (resourceInfo.value.type && resourceInfo.value.type === \"website\") {\n if (type === \"base\") {\n return \"primary\";\n }\n }\n return type;\n});\n</script>\n\n<template>\n <component\n :is=\"getCompontent(resourceInfo.type)\"\n v-bind=\"{ ...resourceInfo }\"\n :mandateLevel=\"mandateLevel\"\n :intentions=\"pages\"\n :type=\"typeRess\"\n ></component>\n</template>\n"],"names":["typeRess","_createBlock","_resolveDynamicComponent","_mergeProps","mandateLevel","pages"],"mappings":";;;;;;;;;;;;AAOA,UAAM,eAAe,SAAS,MAAM;AAClC,UAAI,CAAC,QAAA,SAAS,eAAe,SAAS,GAAG;AACvC,eAAO;AAAA,MACT;AAEA,YAAMA,YAAW,OAAO,KAAK,QAAA,SAAS,OAAO,EAAE,CAAC;AAChD,YAAM,OAAO,OAAO,OAAO,CAAA,GAAI,iBAAS,QAAQA,SAAQ,CAAC;AAEzD,WAAK,QAAQ,QAAA;AACb,WAAK,OAAOA;AACZ,WAAK,aAAa,QAAA;AAClB,UAAIA,cAAa,QAAQ;AACvB,aAAK,MAAM,KAAK;AAAA,MAClB;AACA,UAAIA,cAAa,WAAW;AAC1B,aAAK,OAAO,KAAK;AACjB,aAAK,QAAQ,KAAK;AAAA,MACpB;AACA,UAAIA,cAAa,UAAU,QAAA,OAAO;AAEhC,aAAK,QAAQ;AAAA,MACf;AACA,UAAI,KAAK,cAAc;AACrB,aAAK,MAAM,KAAK,aAAa;AAAA,MAC/B;AAEA,aAAO;AAAA,IACT,CAAC;AAGD,UAAM,gBAAgB,CAAC,SAA6B;AAClD,YAAM,kBAAkB,aAAa,IAAI;AAEzC,UAAI,gBAAgB,SAAS,aAAa;AACxC,eAAO,qBAAqB,MAAM,OAAO,8BAA2B,CAAC;AAAA,MACvE;AACA,UAAI,gBAAgB,SAAS,aAAa;AACxC,eAAO,qBAAqB,MAAM,OAAO,qBAAiB,CAAC;AAAA,MAC7D;AACA,aAAO;AAAA,QACL,MAAM,qCAAA,uBAAA,OAAA,EAAA,0BAAA,MAAA,OAAA,
|
|
1
|
+
{"version":3,"file":"EpResource.vue.js","sources":["../../../src/components/educationals/EpResource.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { defineAsyncComponent, computed, toRefs } from \"vue\";\nimport { useComponent } from \"~/composables/useComponent\";\nimport type { EpResourceProps } from \"~/types/educationals/EpResource\";\n\nconst { type = \"neutral\", resource, pages } = defineProps<EpResourceProps>();\n\nconst resourceInfo = computed(() => {\n if (!resource.hasOwnProperty(\"content\")) {\n return \"EpNothing\";\n }\n //console.log(resource)\n const typeRess = Object.keys(resource.content)[0];\n const ress = Object.assign({}, resource.content[typeRess]);\n\n ress.pages = pages;\n ress.type = typeRess;\n ress.intentions = pages;\n if (typeRess === \"clip\") {\n ress.src = ress.url;\n }\n if (typeRess === \"website\") {\n ress.href = ress.url;\n ress.label = ress.title;\n }\n if (typeRess === \"book\" && pages) {\n //ress.intentions = pages\n ress.pages = null;\n }\n if (ress.version_link) {\n ress.url = ress.version_link.url;\n }\n\n return ress;\n});\n\n//get Component asyncComponent\nconst getCompontent = (name: string | undefined) => {\n const componentToLoad = useComponent(name);\n //console.log(componentToLoad)\n if (componentToLoad.name === \"EpNothing\") {\n return defineAsyncComponent(() => import(\"../signages/EpNothing.vue\"));\n }\n if (componentToLoad.name === \"EpReading\") {\n return defineAsyncComponent(() => import(`./EpReading.vue`));\n }\n return defineAsyncComponent(\n () => import(`../${componentToLoad.path}/${componentToLoad.name}.vue`)\n );\n};\n\nconst typeRess = computed(() => {\n if (resourceInfo.value.type && resourceInfo.value.type === \"website\") {\n if (type === \"base\") {\n return \"primary\";\n }\n }\n return type;\n});\n</script>\n\n<template>\n <component\n :is=\"getCompontent(resourceInfo.type)\"\n v-bind=\"{ ...resourceInfo }\"\n :mandateLevel=\"mandateLevel\"\n :intentions=\"pages\"\n :type=\"typeRess\"\n ></component>\n</template>\n"],"names":["typeRess","_createBlock","_resolveDynamicComponent","_mergeProps","mandateLevel","pages"],"mappings":";;;;;;;;;;;;AAOA,UAAM,eAAe,SAAS,MAAM;AAClC,UAAI,CAAC,QAAA,SAAS,eAAe,SAAS,GAAG;AACvC,eAAO;AAAA,MACT;AAEA,YAAMA,YAAW,OAAO,KAAK,QAAA,SAAS,OAAO,EAAE,CAAC;AAChD,YAAM,OAAO,OAAO,OAAO,CAAA,GAAI,iBAAS,QAAQA,SAAQ,CAAC;AAEzD,WAAK,QAAQ,QAAA;AACb,WAAK,OAAOA;AACZ,WAAK,aAAa,QAAA;AAClB,UAAIA,cAAa,QAAQ;AACvB,aAAK,MAAM,KAAK;AAAA,MAClB;AACA,UAAIA,cAAa,WAAW;AAC1B,aAAK,OAAO,KAAK;AACjB,aAAK,QAAQ,KAAK;AAAA,MACpB;AACA,UAAIA,cAAa,UAAU,QAAA,OAAO;AAEhC,aAAK,QAAQ;AAAA,MACf;AACA,UAAI,KAAK,cAAc;AACrB,aAAK,MAAM,KAAK,aAAa;AAAA,MAC/B;AAEA,aAAO;AAAA,IACT,CAAC;AAGD,UAAM,gBAAgB,CAAC,SAA6B;AAClD,YAAM,kBAAkB,aAAa,IAAI;AAEzC,UAAI,gBAAgB,SAAS,aAAa;AACxC,eAAO,qBAAqB,MAAM,OAAO,8BAA2B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AAA;AAAAA,QACd,YAAYC,KAAAA;AAAAA,QACZ,MAAM,SAAA;AAAA,MAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, createElementBlock, openBlock, createCommentVNode, createElementVNode, normalizeClass, Fragment, renderList, toDisplayString, createBlock } from "vue";
|
|
2
|
-
import _sfc_main$1 from "../tools/RenderTextNode.
|
|
2
|
+
import _sfc_main$1 from "../tools/RenderTextNode.vue.js";
|
|
3
3
|
const _hoisted_1 = { class: "flex rounded-lg lg:ml-10 ml-0 border border-t-gray-100 border-r-gray-100 border-b-gray-100" };
|
|
4
4
|
const _hoisted_2 = {
|
|
5
5
|
key: 0,
|
|
@@ -1,4 +1,49 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent, computed, toRefs, createElementBlock, openBlock, createElementVNode, unref, toDisplayString } from "vue";
|
|
2
|
+
const _hoisted_1 = { class: "cursor-pointer flex items-center rounded-md py-3 px-3 text-xs font-semibold uppercase sm:flex-1 hover:bg-base" };
|
|
3
|
+
const _hoisted_2 = ["id", "name", "disabled", "readonly", "value", "checked"];
|
|
4
|
+
const _hoisted_3 = { class: "ml-2" };
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "EpRadioSummative",
|
|
7
|
+
props: {
|
|
8
|
+
id: { default: "01" },
|
|
9
|
+
label: {},
|
|
10
|
+
disabled: { type: Boolean, default: false },
|
|
11
|
+
readonly: { type: Boolean, default: false },
|
|
12
|
+
type: { default: "base" },
|
|
13
|
+
value: { default: void 0 },
|
|
14
|
+
modelValue: { default: null }
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(__props, { emit: __emit }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const isChecked = computed(() => {
|
|
20
|
+
return props.modelValue === props.value;
|
|
21
|
+
});
|
|
22
|
+
const { label, disabled, readonly, value, id } = toRefs(props);
|
|
23
|
+
const emit = __emit;
|
|
24
|
+
const onChange = (event) => {
|
|
25
|
+
const target = event.target;
|
|
26
|
+
const value2 = +target.value || 0;
|
|
27
|
+
emit("update:modelValue", value2);
|
|
28
|
+
};
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("label", _hoisted_1, [
|
|
31
|
+
createElementVNode("input", {
|
|
32
|
+
type: "radio",
|
|
33
|
+
id: unref(id),
|
|
34
|
+
name: unref(id),
|
|
35
|
+
disabled: unref(disabled),
|
|
36
|
+
readonly: unref(readonly),
|
|
37
|
+
value: unref(value),
|
|
38
|
+
checked: isChecked.value,
|
|
39
|
+
onChange,
|
|
40
|
+
class: "rounded bg-base-dark border-gray-300 focus:border-transparent focus:bg-base text-primary focus:ring-1 focus:ring-offset-2 focus:ring-primary"
|
|
41
|
+
}, null, 40, _hoisted_2),
|
|
42
|
+
createElementVNode("span", _hoisted_3, toDisplayString(unref(label)), 1)
|
|
43
|
+
]);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
2
47
|
export {
|
|
3
48
|
_sfc_main as default
|
|
4
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpRadioSummative.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"EpRadioSummative.vue.js","sources":["../../../src/components/forms/EpRadioSummative.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { toRefs, computed } from \"vue\";\nimport type { EpRadioSummativeProps } from \"~/types/forms/EpRadioSummative\";\n\nconst props = withDefaults(defineProps<EpRadioSummativeProps>(), {\n id: \"01\",\n disabled: false,\n readonly: false,\n checked: false,\n type: \"base\",\n value: undefined,\n modelValue: null,\n});\n\nconst isChecked = computed(() => {\n return props.modelValue === props.value;\n});\n\nconst { label, disabled, readonly, value, id } = toRefs(props);\n\nconst emit = defineEmits<{\n (e: \"update:modelValue\", modelValue: number): void;\n}>();\n\nconst onChange = (event: Event) => {\n const target = event.target as HTMLInputElement;\n const value = +target.value || 0;\n emit(\"update:modelValue\", value);\n};\n</script>\n\n<template>\n <label\n class=\"cursor-pointer flex items-center rounded-md py-3 px-3 text-xs font-semibold uppercase sm:flex-1 hover:bg-base\"\n >\n <input\n type=\"radio\"\n :id=\"id\"\n :name=\"id\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :value=\"value\"\n :checked=\"isChecked\"\n @change=\"onChange\"\n class=\"rounded bg-base-dark border-gray-300 focus:border-transparent focus:bg-base text-primary focus:ring-1 focus:ring-offset-2 focus:ring-primary\"\n />\n <span class=\"ml-2\">{{ label }}</span>\n </label>\n</template>\n"],"names":["value","_openBlock","_createElementBlock","_createElementVNode","_unref","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;;AAIA,UAAM,QAAQ;AAUd,UAAM,YAAY,SAAS,MAAM;AAC/B,aAAO,MAAM,eAAe,MAAM;AAAA,IACpC,CAAC;AAED,UAAM,EAAE,OAAO,UAAU,UAAU,OAAO,GAAA,IAAO,OAAO,KAAK;AAE7D,UAAM,OAAO;AAIb,UAAM,WAAW,CAAC,UAAiB;AACjC,YAAM,SAAS,MAAM;AACrB,YAAMA,SAAQ,CAAC,OAAO,SAAS;AAC/B,WAAK,qBAAqBA,MAAK;AAAA,IACjC;;AAIE,aAAAC,UAAA,GAAAC,mBAeQ,SAfR,YAeQ;AAAA,QAZNC,mBAUE,SAAA;AAAA,UATA,MAAK;AAAA,UACJ,IAAIC,MAAA,EAAA;AAAA,UACJ,MAAMA,MAAA,EAAA;AAAA,UACN,UAAUA,MAAA,QAAA;AAAA,UACV,UAAUA,MAAA,QAAA;AAAA,UACV,OAAOA,MAAA,KAAA;AAAA,UACP,SAAS,UAAA;AAAA,UACT;AAAA,UACD,OAAM;AAAA,QAAA;QAERD,mBAAqC,QAArC,YAAqCE,gBAAfD,MAAA,KAAA,CAAK,GAAA,CAAA;AAAA,MAAA;;;;"}
|