ep-lib-ts 1.1.12 → 1.1.14
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 +1 -55
- package/dist/components/basics/EpAvatar.vue.js.map +1 -1
- package/dist/components/basics/EpAvatar.vue2.js +55 -1
- package/dist/components/basics/EpAvatar.vue2.js.map +1 -1
- package/dist/components/basics/EpStackedList.vue.js +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/EpFillBlanks.vue.js +116 -0
- package/dist/components/educationals/EpFillBlanks.vue.js.map +1 -0
- package/dist/components/educationals/EpFillBlanks.vue2.js +5 -0
- package/dist/components/educationals/EpFillBlanks.vue2.js.map +1 -0
- 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/EpSegmentedBox.vue.js +1 -1
- package/dist/components/educationals/EpSpecificObjective.vue.js +1 -1
- package/dist/components/forms/EpRadioSummative.vue.js +1 -46
- package/dist/components/forms/EpRadioSummative.vue.js.map +1 -1
- package/dist/components/forms/EpRadioSummative.vue2.js +46 -1
- package/dist/components/forms/EpRadioSummative.vue2.js.map +1 -1
- package/dist/components/forms/EpSelect.vue.js +46 -1
- package/dist/components/forms/EpSelect.vue.js.map +1 -1
- package/dist/components/forms/EpSelect.vue2.js +1 -37
- package/dist/components/forms/EpSelect.vue2.js.map +1 -1
- package/dist/components/interactions/EpContentSlider.vue.js +5 -4
- 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/BgAudio.vue.js +1 -52
- package/dist/components/tools/BgAudio.vue.js.map +1 -1
- package/dist/components/tools/BgAudio.vue2.js +52 -1
- package/dist/components/tools/BgAudio.vue2.js.map +1 -1
- package/dist/components/tools/Details.vue.js +1 -56
- package/dist/components/tools/Details.vue.js.map +1 -1
- package/dist/components/tools/Details.vue2.js +56 -1
- package/dist/components/tools/Details.vue2.js.map +1 -1
- package/dist/components/tools/RenderTextNode.vue.js +1 -19
- package/dist/components/tools/RenderTextNode.vue.js.map +1 -1
- package/dist/components/tools/RenderTextNode.vue2.js +19 -1
- package/dist/components/tools/RenderTextNode.vue2.js.map +1 -1
- package/dist/components/tools/SegmentedBox.vue.js +1 -55
- package/dist/components/tools/SegmentedBox.vue.js.map +1 -1
- package/dist/components/tools/SegmentedBox.vue2.js +55 -1
- package/dist/components/tools/SegmentedBox.vue2.js.map +1 -1
- package/dist/components/tools/TextMedia.vue.js +1 -50
- package/dist/components/tools/TextMedia.vue.js.map +1 -1
- package/dist/components/tools/TextMedia.vue2.js +50 -1
- 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/entry/educationals/EpFillBlanks.d.ts +6 -0
- package/dist/entry/educationals/EpFillBlanks.js +7 -0
- package/dist/entry/educationals/EpFillBlanks.js.map +1 -0
- package/dist/entry/forms/EpSelect.d.ts +6 -0
- package/dist/entry/forms/EpSelect.js +7 -0
- package/dist/entry/forms/EpSelect.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +159 -156
- package/dist/index.js.map +1 -1
- package/dist/style.css +72 -72
- package/dist/types/educationals/EpFillBlanks.d.ts +12 -0
- package/dist/types/forms/EpSelect.d.ts +1 -0
- package/package.json +2 -2
|
@@ -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.vue2.js";
|
|
56
2
|
export {
|
|
57
3
|
_sfc_main as default
|
|
58
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpAvatar.vue.js","sources":[
|
|
1
|
+
{"version":3,"file":"EpAvatar.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -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.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"EpAvatar.vue2.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,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.vue2.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";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, createElementBlock, 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.vue2.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.vue2.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.vue2.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.vue2.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" };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { defineComponent, reactive, computed, h, createElementBlock, openBlock, createCommentVNode, createElementVNode, toDisplayString, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
|
|
2
|
+
import { isHtml } from "../../composables/isHtml.js";
|
|
3
|
+
import { useRenderText } from "../../composables/useRenderText.js";
|
|
4
|
+
import _sfc_main$1 from "../forms/EpSelect.vue.js";
|
|
5
|
+
const _hoisted_1 = { class: "px-2" };
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "font-bold text-center my-2 text-xl"
|
|
9
|
+
};
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
+
__name: "EpFillBlanks",
|
|
12
|
+
props: {
|
|
13
|
+
selects: {},
|
|
14
|
+
content: {},
|
|
15
|
+
title: {}
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const values = reactive({});
|
|
20
|
+
const refsMap = reactive({});
|
|
21
|
+
function parseHtmlToVNodes(html) {
|
|
22
|
+
const container = document.createElement("div");
|
|
23
|
+
container.innerHTML = html;
|
|
24
|
+
const nodes = [];
|
|
25
|
+
container.childNodes.forEach((node) => {
|
|
26
|
+
if (node.nodeType === 3) {
|
|
27
|
+
const text = node.textContent;
|
|
28
|
+
if (text && text.replace(/\s/g, "").length > 0) nodes.push(text);
|
|
29
|
+
} else if (node.nodeType === 1) {
|
|
30
|
+
const el = node;
|
|
31
|
+
if (el.classList.contains("ep-select")) {
|
|
32
|
+
const id = el.getAttribute("data-id");
|
|
33
|
+
if (id !== null) {
|
|
34
|
+
const selectProps = props.selects.filter((item) => item.id == id);
|
|
35
|
+
if (selectProps.length > 0) {
|
|
36
|
+
nodes.push(
|
|
37
|
+
h(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
style: "display:inline-block; border-width: 2px; border-radius: 7px; min-width: 150px; margin: 3px;",
|
|
41
|
+
id,
|
|
42
|
+
ref: (el2) => {
|
|
43
|
+
if (el2) refsMap[id] = el2;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
h(_sfc_main$1, {
|
|
47
|
+
block: false,
|
|
48
|
+
options: selectProps[0].options,
|
|
49
|
+
modelValue: values[id],
|
|
50
|
+
"onUpdate:modelValue": (val) => {
|
|
51
|
+
values[id] = val;
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
nodes.push(
|
|
61
|
+
h(
|
|
62
|
+
el.tagName.toLowerCase(),
|
|
63
|
+
getElementAttrs(el),
|
|
64
|
+
parseHtmlToVNodes(el.innerHTML)
|
|
65
|
+
)
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return nodes;
|
|
70
|
+
}
|
|
71
|
+
const renderText = computed(() => {
|
|
72
|
+
if (!props.content) return [h("div")];
|
|
73
|
+
if (!isHtml(props.content)) {
|
|
74
|
+
return [h("div", { innerHTML: useRenderText(props.content) })];
|
|
75
|
+
}
|
|
76
|
+
const formatted = useRenderText(props.content);
|
|
77
|
+
return parseHtmlToVNodes(`<div> ${formatted} </div>`);
|
|
78
|
+
});
|
|
79
|
+
function getElementAttrs(el) {
|
|
80
|
+
const attrs = {};
|
|
81
|
+
for (const attr of Array.from(el.attributes)) {
|
|
82
|
+
attrs[attr.name] = attr.value;
|
|
83
|
+
}
|
|
84
|
+
if (el.tagName.toLowerCase() === "a") {
|
|
85
|
+
attrs.target = "_blank";
|
|
86
|
+
attrs.rel = "noopener noreferrer";
|
|
87
|
+
}
|
|
88
|
+
return attrs;
|
|
89
|
+
}
|
|
90
|
+
const validate = () => {
|
|
91
|
+
props.selects.forEach((select) => {
|
|
92
|
+
refsMap[select.id].style.borderColor = values[select.id] == select.correctValue ? "green" : "red";
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
return (_ctx, _cache) => {
|
|
96
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
97
|
+
_ctx.title ? (openBlock(), createElementBlock("h3", _hoisted_2, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true),
|
|
98
|
+
createElementVNode("div", null, [
|
|
99
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(renderText.value, (node, i) => {
|
|
100
|
+
return openBlock(), createBlock(resolveDynamicComponent(node), { key: i });
|
|
101
|
+
}), 128))
|
|
102
|
+
]),
|
|
103
|
+
createElementVNode("div", { class: "flex items-center justify-around" }, [
|
|
104
|
+
createElementVNode("button", {
|
|
105
|
+
class: "bg-blue-500 text-white px-3 py-2 m-2 rounded-md text-center",
|
|
106
|
+
onClick: validate
|
|
107
|
+
}, " Valider ")
|
|
108
|
+
])
|
|
109
|
+
]);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
export {
|
|
114
|
+
_sfc_main as default
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=EpFillBlanks.vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EpFillBlanks.vue.js","sources":["../../../src/components/educationals/EpFillBlanks.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, h, type VNode, reactive } from \"vue\";\nimport { isHtml } from \"~/composables/isHtml\";\nimport { useRenderText } from \"~/composables/useRenderText\";\nimport type { EpFillBlanksProps } from \"~/types/educationals/EpFillBlanks\";\nimport EpSelect from \"../forms/EpSelect.vue\";\n\n\nconst props = withDefaults(defineProps<EpFillBlanksProps>(), {});\n\nconst values = reactive<Record<string, any>>({});\nconst refsMap = reactive<Record<string, any>>({});\n\nfunction parseHtmlToVNodes(html: string): (VNode | string)[] {\n const container = document.createElement(\"div\");\n container.innerHTML = html;\n\n const nodes: (VNode | string)[] = [];\n\n container.childNodes.forEach((node) => {\n if (node.nodeType === 3) {\n // Text node\n const text = node.textContent;\n \n if (text && text.replace(/\\s/g, '').length > 0) nodes.push(text);\n } else if (node.nodeType === 1) {\n const el = node as HTMLElement;\n\n // Select part\n if(el.classList.contains(\"ep-select\")){\n const id = el.getAttribute(\"data-id\");\n if(id !== null) {\n const selectProps = props.selects.filter((item) => item.id == id);\n if(selectProps.length > 0) {\n nodes.push(\n h(\n \"div\",\n { \n style: \"display:inline-block; border-width: 2px; border-radius: 7px; min-width: 150px; margin: 3px;\", \n id,\n ref: (el) => {\n if (el) refsMap[id] = el;\n }\n },\n h(EpSelect, {\n block: false,\n options: selectProps[0].options,\n modelValue: values[id],\n 'onUpdate:modelValue': (val) => {\n values[id] = val;\n }\n })\n )\n );\n }\n }\n return;\n }\n\n nodes.push(\n h(\n el.tagName.toLowerCase(),\n getElementAttrs(el),\n parseHtmlToVNodes(el.innerHTML) \n )\n );\n }\n });\n\n return nodes;\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\n const formatted = useRenderText(props.content)\n\n return parseHtmlToVNodes(`<div> ${formatted} </div>`);\n});\n\n\n//get attributes from element html \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\nconst validate = () => {\n props.selects.forEach((select) => {\n refsMap[select.id].style.borderColor = (values[select.id] == select.correctValue) ? 'green' : 'red';\n })\n}\n\n</script>\n\n<template>\n <div class=\"px-2\">\n <h3 v-if=\"title\" class=\"font-bold text-center my-2 text-xl\">{{ title }}</h3>\n <div>\n <component :is=\"node\" v-for=\"(node, i) in renderText\" :key=\"i\" />\n </div>\n <div class=\"flex items-center justify-around\">\n <button\n class=\"bg-blue-500 text-white px-3 py-2 m-2 rounded-md text-center\"\n @click=\"validate\"\n >\n Valider\n </button>\n </div>\n </div>\n</template>\n"],"names":["el","EpSelect","_openBlock","_createElementBlock","title","_toDisplayString","_createElementVNode","_Fragment","_renderList","_createBlock","_resolveDynamicComponent"],"mappings":";;;;;;;;;;;;;;;;;AAQA,UAA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O;AAAA,UAAA,GACX,WAED;AAAA,QAAA;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EpFillBlanks.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -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.vue2.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.vue2.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.vue.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.vue.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.vue.js"), "../tools/AsyncKatexRender.vue": () => import("../tools/AsyncKatexRender.vue.js"), "../tools/BgAudio.vue": () => import("../tools/BgAudio.vue.js"), "../tools/Details.vue": () => import("../tools/Details.vue.js"), "../tools/DisplayBox.vue": () => import("../tools/DisplayBox.vue.js"), "../tools/RenderTextNode.vue": () => import("../tools/RenderTextNode.vue.js"), "../tools/SegmentedBox.vue": () => import("../tools/SegmentedBox.vue.js"), "../tools/SvgFilter.vue": () => import("../tools/SvgFilter.vue.js"), "../tools/TextMedia.vue": () => import("../tools/TextMedia.vue.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,CAAC;AAAA,MACvE;AACA,UAAI,gBAAgB,SAAS,aAAa;AACxC,eAAO,qBAAqB,MAAM,OAAO,qBAAiB,CAAC;AAAA,MAC7D;AACA,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{ defineComponent, createElementBlock, openBlock, Fragment, renderList, createBlock, mergeProps } from "vue";
|
|
2
|
-
import _sfc_main$1 from "../tools/SegmentedBox.
|
|
2
|
+
import _sfc_main$1 from "../tools/SegmentedBox.vue2.js";
|
|
3
3
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
4
|
__name: "EpSegmentedBox",
|
|
5
5
|
props: {
|
|
@@ -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.vue2.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,49 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
-
});
|
|
1
|
+
import _sfc_main from "./EpRadioSummative.vue2.js";
|
|
47
2
|
export {
|
|
48
3
|
_sfc_main as default
|
|
49
4
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EpRadioSummative.vue.js","sources":[
|
|
1
|
+
{"version":3,"file":"EpRadioSummative.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -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.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"EpRadioSummative.vue2.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;;;;"}
|
|
@@ -1,4 +1,49 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent, mergeModels, useModel, createElementBlock, openBlock, createCommentVNode, withDirectives, toDisplayString, createElementVNode, normalizeClass, Fragment, renderList, vModelSelect } from "vue";
|
|
2
|
+
const _hoisted_1 = { class: "w-full max-w-xs" };
|
|
3
|
+
const _hoisted_2 = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "block text-sm font-medium text-gray-700 mb-1"
|
|
6
|
+
};
|
|
7
|
+
const _hoisted_3 = ["value"];
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "EpSelect",
|
|
10
|
+
props: /* @__PURE__ */ mergeModels({
|
|
11
|
+
options: {},
|
|
12
|
+
modelValue: {},
|
|
13
|
+
label: { default: "" },
|
|
14
|
+
block: { type: Boolean, default: true }
|
|
15
|
+
}, {
|
|
16
|
+
"modelValue": {},
|
|
17
|
+
"modelModifiers": {}
|
|
18
|
+
}),
|
|
19
|
+
emits: /* @__PURE__ */ mergeModels(["update:modelValue"], ["update:modelValue"]),
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
21
|
+
const model = useModel(__props, "modelValue");
|
|
22
|
+
const emit = __emit;
|
|
23
|
+
function onChange(event) {
|
|
24
|
+
emit("update:modelValue", event.target.value);
|
|
25
|
+
}
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
28
|
+
_ctx.label ? (openBlock(), createElementBlock("label", _hoisted_2, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true),
|
|
29
|
+
withDirectives(createElementVNode("select", {
|
|
30
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
31
|
+
onChange,
|
|
32
|
+
class: normalizeClass(`${_ctx.block ? "block" : "inline"} w-full bg-white border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm`)
|
|
33
|
+
}, [
|
|
34
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option) => {
|
|
35
|
+
return openBlock(), createElementBlock("option", {
|
|
36
|
+
key: option.value,
|
|
37
|
+
value: option.value
|
|
38
|
+
}, toDisplayString(option.text), 9, _hoisted_3);
|
|
39
|
+
}), 128))
|
|
40
|
+
], 34), [
|
|
41
|
+
[vModelSelect, model.value]
|
|
42
|
+
])
|
|
43
|
+
]);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
2
47
|
export {
|
|
3
48
|
_sfc_main as default
|
|
4
49
|
};
|