@1024pix/epreuves-components 2.4.1 → 2.4.3

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.
@@ -1,22 +1,22 @@
1
- import { d as w, r as g, y as u, c as n, o as i, a as e, t as a, h as r, n as k, H as z, F as p, b as M, B as D, _ as T, f as C } from "../_plugin-vue_export-helper-DOoVeFcJ.js";
2
- import { a as L, i as f, b as S } from "../i18n-ecSMtuba.js";
3
- import { u as F } from "../normalize-props-AlmAfi_u.js";
4
- import { r as $, q as B, t as h } from "../temporal.utils-B23shw3k.js";
5
- const I = {
1
+ import { d as w, r as g, y as u, c as n, o as i, a as e, t as a, h as l, n as k, H as z, F as p, b as M, B as D, _ as T, f as C } from "../_plugin-vue_export-helper-DOoVeFcJ.js";
2
+ import { a as L, i as _, b as S } from "../i18n-ecSMtuba.js";
3
+ import { u as j } from "../normalize-props-AlmAfi_u.js";
4
+ import { r as F, q as $, t as f } from "../temporal.utils-DGOneXL8.js";
5
+ const B = {}, I = {}, N = {}, q = {
6
6
  "select-conversation": { "select-response-title": "Sélectionnez le message que {{username}} devrait envoyer :", "message-date": "{{messageDay, relativetime(numeric: auto)}} · {{messageTime, datetime(timeStyle: short)}}", "incoming-message-sr": "Message de {{username}} reçu {{messageDay, relativetime(numeric: auto)}} à {{messageTime, datetime(timeStyle: short)}}", "outgoing-message-sr": "Message envoyé par {{username}} {{messageDay, relativetime(numeric: auto)}} à {{messageTime, datetime(timeStyle: short)}}", "good-idea": "Bonne idée", "bad-idea": "Mauvaise idée" }
7
- }, N = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20448%20512'%3e%3c!--!Font%20Awesome%20Free%20v7.1.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license/free%20Copyright%202025%20Fonticons,%20Inc.--%3e%3cpath%20d='M434.8%2070.1c14.3%2010.4%2017.5%2030.4%207.1%2044.7l-256%20352c-5.5%207.6-14%2012.3-23.4%2013.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8%200-45.3s32.8-12.5%2045.3%200l101.5%20101.5%20234-321.7c10.4-14.3%2030.4-17.5%2044.7-7.1z'/%3e%3c/svg%3e", q = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3e%3c!--!Font%20Awesome%20Free%20v7.1.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license/free%20Copyright%202025%20Fonticons,%20Inc.--%3e%3cpath%20d='M256%2048a208%20208%200%201%201%200%20416%20208%20208%200%201%201%200-416zm0%20464a256%20256%200%201%200%200-512%20256%20256%200%201%200%200%20512zM167%20167c-9.4%209.4-9.4%2024.6%200%2033.9l55%2055-55%2055c-9.4%209.4-9.4%2024.6%200%2033.9s24.6%209.4%2033.9%200l55-55%2055%2055c9.4%209.4%2024.6%209.4%2033.9%200s9.4-24.6%200-33.9l-55-55%2055-55c9.4-9.4%209.4-24.6%200-33.9s-24.6-9.4-33.9%200l-55%2055-55-55c-9.4-9.4-24.6-9.4-33.9%200z'/%3e%3c/svg%3e", E = { class: "messages" }, R = { class: "message" }, j = {
7
+ }, E = {}, R = {}, A = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20448%20512'%3e%3c!--!Font%20Awesome%20Free%20v7.1.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license/free%20Copyright%202025%20Fonticons,%20Inc.--%3e%3cpath%20d='M434.8%2070.1c14.3%2010.4%2017.5%2030.4%207.1%2044.7l-256%20352c-5.5%207.6-14%2012.3-23.4%2013.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8%200-45.3s32.8-12.5%2045.3%200l101.5%20101.5%20234-321.7c10.4-14.3%2030.4-17.5%2044.7-7.1z'/%3e%3c/svg%3e", H = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3e%3c!--!Font%20Awesome%20Free%20v7.1.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license/free%20Copyright%202025%20Fonticons,%20Inc.--%3e%3cpath%20d='M256%2048a208%20208%200%201%201%200%20416%20208%20208%200%201%201%200-416zm0%20464a256%20256%200%201%200%200-512%20256%20256%200%201%200%200%20512zM167%20167c-9.4%209.4-9.4%2024.6%200%2033.9l55%2055-55%2055c-9.4%209.4-9.4%2024.6%200%2033.9s24.6%209.4%2033.9%200l55-55%2055%2055c9.4%209.4%2024.6%209.4%2033.9%200s9.4-24.6%200-33.9l-55-55%2055-55c9.4-9.4%209.4-24.6%200-33.9s-24.6-9.4-33.9%200l-55%2055-55-55c-9.4-9.4-24.6-9.4-33.9%200z'/%3e%3c/svg%3e", O = { class: "messages" }, V = { class: "message" }, G = {
8
8
  class: "message__username",
9
9
  "aria-hidden": "true"
10
- }, A = { class: "sr-only" }, H = { class: "message__content" }, O = {
10
+ }, P = { class: "sr-only" }, X = { class: "message__content" }, J = {
11
11
  class: "message__date",
12
12
  "aria-hidden": "true"
13
- }, V = ["aria-hidden"], G = {
13
+ }, K = ["aria-hidden"], Q = {
14
14
  class: "message__username",
15
15
  "aria-hidden": "true"
16
- }, P = { class: "sr-only" }, X = { class: "message__content-container" }, J = { class: "message__content-title" }, K = ["src"], Q = { class: "message__content" }, U = {
16
+ }, U = { class: "sr-only" }, W = { class: "message__content-container" }, Y = { class: "message__content-title" }, Z = ["src"], ee = { class: "message__content" }, se = {
17
17
  class: "message__date",
18
18
  "aria-hidden": "true"
19
- }, W = { class: "response-select" }, Y = ["aria-level"], Z = { class: "response-select__choices" }, ee = ["aria-disabled", "onClick"], se = { "aria-live": "polite" }, te = ["innerHTML"], ae = /* @__PURE__ */ w({
19
+ }, te = { class: "response-select" }, ae = ["aria-level"], oe = { class: "response-select__choices" }, ne = ["aria-disabled", "onClick"], ie = { "aria-live": "polite" }, le = ["innerHTML"], ce = /* @__PURE__ */ w({
20
20
  __name: "SelectConversation.ce",
21
21
  props: {
22
22
  titleLevel: { default: 2, type: Number },
@@ -25,7 +25,7 @@ const I = {
25
25
  responseChoices: { type: Array }
26
26
  },
27
27
  setup(s, { expose: v }) {
28
- const d = g(s.responseChoices.map((t) => ({ ...t, selected: !1 }))), o = g(), c = u(() => $(s.incomingMessage.time)), m = u(() => c.value.day - B.Now.plainDateTimeISO().day);
28
+ const d = g(s.responseChoices.map((t) => ({ ...t, selected: !1 }))), o = g(), c = u(() => F(s.incomingMessage.time)), m = u(() => c.value.day - $.Now.plainDateTimeISO().day);
29
29
  function b(t) {
30
30
  t.selected || (t.selected = !0, o.value = t);
31
31
  }
@@ -36,69 +36,69 @@ const I = {
36
36
  }
37
37
  return v({
38
38
  reset: x
39
- }), (t, ie) => (i(), n(p, null, [
40
- e("div", E, [
41
- e("div", R, [
42
- e("p", j, a(s.incomingMessage.username), 1),
43
- e("p", A, a(t.$t("select-conversation.incoming-message-sr", { username: s.incomingMessage.username, messageDay: m.value, messageTime: r(h)(c.value) })), 1),
44
- e("p", H, a(s.incomingMessage.content), 1),
45
- e("p", O, a(t.$t("select-conversation.message-date", { messageDay: m.value, messageTime: r(h)(c.value) })), 1)
39
+ }), (t, me) => (i(), n(p, null, [
40
+ e("div", O, [
41
+ e("div", V, [
42
+ e("p", G, a(s.incomingMessage.username), 1),
43
+ e("p", P, a(t.$t("select-conversation.incoming-message-sr", { username: s.incomingMessage.username, messageDay: m.value, messageTime: l(f)(c.value) })), 1),
44
+ e("p", X, a(s.incomingMessage.content), 1),
45
+ e("p", J, a(t.$t("select-conversation.message-date", { messageDay: m.value, messageTime: l(f)(c.value) })), 1)
46
46
  ]),
47
47
  e("div", {
48
48
  class: k(["message message--outgoing", { "message--hidden": !o.value }]),
49
49
  "aria-hidden": !o.value,
50
50
  "aria-live": "polite"
51
51
  }, [
52
- e("p", G, a(s.username), 1),
53
- e("p", P, a(t.$t("select-conversation.outgoing-message-sr", { username: s.username, messageDay: 0, messageTime: /* @__PURE__ */ new Date() })), 1),
54
- e("div", X, [
55
- e("p", J, [
52
+ e("p", Q, a(s.username), 1),
53
+ e("p", U, a(t.$t("select-conversation.outgoing-message-sr", { username: s.username, messageDay: 0, messageTime: /* @__PURE__ */ new Date() })), 1),
54
+ e("div", W, [
55
+ e("p", Y, [
56
56
  e("img", {
57
- src: o.value?.goodIdea ? r(N) : r(q),
57
+ src: o.value?.goodIdea ? l(A) : l(H),
58
58
  alt: "",
59
59
  width: "16"
60
- }, null, 8, K),
60
+ }, null, 8, Z),
61
61
  z(" " + a(t.$t(`select-conversation.${o.value?.goodIdea ? "good-idea" : "bad-idea"}`)), 1)
62
62
  ]),
63
- e("p", Q, a(o.value?.content ?? "no content"), 1)
63
+ e("p", ee, a(o.value?.content ?? "no content"), 1)
64
64
  ]),
65
- e("p", U, a(t.$t("select-conversation.message-date", { messageDay: 0, messageTime: /* @__PURE__ */ new Date() })), 1)
66
- ], 10, V)
65
+ e("p", se, a(t.$t("select-conversation.message-date", { messageDay: 0, messageTime: /* @__PURE__ */ new Date() })), 1)
66
+ ], 10, K)
67
67
  ]),
68
- e("div", W, [
68
+ e("div", te, [
69
69
  e("div", {
70
70
  role: "heading",
71
71
  "aria-level": s.titleLevel,
72
72
  class: "title"
73
- }, a(t.$t("select-conversation.select-response-title", { username: s.username })), 9, Y),
74
- e("div", Z, [
75
- (i(!0), n(p, null, M(d.value, (l, y) => (i(), n("button", {
73
+ }, a(t.$t("select-conversation.select-response-title", { username: s.username })), 9, ae),
74
+ e("div", oe, [
75
+ (i(!0), n(p, null, M(d.value, (r, y) => (i(), n("button", {
76
76
  key: y,
77
77
  type: "button",
78
78
  class: "response-select__choice",
79
- "aria-disabled": l.selected,
80
- onClick: (re) => b(l)
81
- }, a(l.content), 9, ee))), 128))
79
+ "aria-disabled": r.selected,
80
+ onClick: (ge) => b(r)
81
+ }, a(r.content), 9, ne))), 128))
82
82
  ]),
83
- e("div", se, [
83
+ e("div", ie, [
84
84
  o.value ? (i(), n("p", {
85
85
  key: 0,
86
86
  class: "response-select__feedback",
87
87
  innerHTML: o.value.feedback
88
- }, null, 8, te)) : D("", !0)
88
+ }, null, 8, le)) : D("", !0)
89
89
  ])
90
90
  ])
91
91
  ], 64));
92
92
  }
93
- }), oe = "html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}*{font-family:Roboto,sans-serif;color:#122647;line-height:normal}.messages{display:flex;flex-direction:column;gap:8px;padding:16px}.message{display:flex;flex-direction:column;align-items:start;gap:8px;margin-left:0;margin-right:16px}.message__username,.message__date{color:#5e6c84;font-size:.75rem;font-weight:400}.message__content{padding:16px 8px;border-radius:8px;background:#e8e8e8;font-size:.75rem;font-weight:400}.message--hidden{visibility:hidden}.message--outgoing{align-self:end;align-items:end;margin-left:16px;margin-right:0}.message--outgoing .message__content-container{display:flex;flex-direction:column}.message--outgoing .message__content-title{color:#fff;font-size:.75rem;font-weight:700;border-radius:8px 8px 0 0;background:#452d9d;padding:4px 8px;align-self:start;display:flex;gap:4px;align-items:center}.message--outgoing .message__content-title>img{filter:invert(100%);max-height:16px;max-width:16px}.message--outgoing .message__content{border-top-left-radius:0;background:#cec3f4}.response-select{border-radius:16px;border:1px solid #cdd1d9;background-color:#fff;display:flex;padding:24px 16px;flex-direction:column;gap:16px;margin-top:25px}.response-select__choices{display:flex;gap:8px}.response-select__choice{border-style:none;border-radius:8px;background-color:#253858;padding:8px 16px;color:#fff;text-align:center;font-size:.688rem;font-weight:400;line-height:18px;flex:1;cursor:pointer}.response-select__choice[aria-disabled=true]{background-color:#f4f5f7;color:#5e6c84;cursor:not-allowed}.response-select__feedback{border-radius:8px;background:#eaf1ff;padding:8px;color:#122647;font-size:.75rem;font-weight:400;line-height:20px}.title{font-family:Nunito,Roboto,sans-serif;font-size:.875rem;font-weight:700}@media(max-width:640px){.title{font-size:.75rem}.response-select__choices{flex-direction:column}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);border:0}", ne = /* @__PURE__ */ T(ae, [["styles", [oe]]]);
94
- L(/* @__PURE__ */ Object.assign({ "./locales/fr.json": I })).catch((s) => console.error(s));
95
- const _ = C(ne, {
93
+ }), re = "html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}*{font-family:Roboto,sans-serif;color:#122647;line-height:normal}.messages{display:flex;flex-direction:column;gap:8px;padding:16px}.message{display:flex;flex-direction:column;align-items:start;gap:8px;margin-left:0;margin-right:16px}.message__username,.message__date{color:#5e6c84;font-size:.75rem;font-weight:400}.message__content{padding:16px 8px;border-radius:8px;background:#e8e8e8;font-size:.75rem;font-weight:400}.message--hidden{visibility:hidden}.message--outgoing{align-self:end;align-items:end;margin-left:16px;margin-right:0}.message--outgoing .message__content-container{display:flex;flex-direction:column}.message--outgoing .message__content-title{color:#fff;font-size:.75rem;font-weight:700;border-radius:8px 8px 0 0;background:#452d9d;padding:4px 8px;align-self:start;display:flex;gap:4px;align-items:center}.message--outgoing .message__content-title>img{filter:invert(100%);max-height:16px;max-width:16px}.message--outgoing .message__content{border-top-left-radius:0;background:#cec3f4}.response-select{border-radius:16px;border:1px solid #cdd1d9;background-color:#fff;display:flex;padding:24px 16px;flex-direction:column;gap:16px;margin-top:25px}.response-select__choices{display:flex;gap:8px}.response-select__choice{border-style:none;border-radius:8px;background-color:#253858;padding:8px 16px;color:#fff;text-align:center;font-size:.688rem;font-weight:400;line-height:18px;flex:1;cursor:pointer}.response-select__choice[aria-disabled=true]{background-color:#f4f5f7;color:#5e6c84;cursor:not-allowed}.response-select__feedback{border-radius:8px;background:#eaf1ff;padding:8px;color:#122647;font-size:.75rem;font-weight:400;line-height:20px}.title{font-family:Nunito,Roboto,sans-serif;font-size:.875rem;font-weight:700}@media(max-width:640px){.title{font-size:.75rem}.response-select__choices{flex-direction:column}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);border:0}", de = /* @__PURE__ */ T(ce, [["styles", [re]]]);
94
+ L(/* @__PURE__ */ Object.assign({ "./locales/en.json": B, "./locales/es-419.json": I, "./locales/es.json": N, "./locales/fr.json": q, "./locales/it.json": E, "./locales/nl.json": R })).catch((s) => console.error(s));
95
+ const h = C(de, {
96
96
  configureApp(s) {
97
- f.changeLanguage(document?.documentElement?.lang || navigator.language), s.use(S, { i18next: f });
97
+ _.changeLanguage(document?.documentElement?.lang || navigator.language), s.use(S, { i18next: _ });
98
98
  }
99
99
  });
100
- _.prototype.normalizeProps = (s) => ({
100
+ h.prototype.normalizeProps = (s) => ({
101
101
  ...s,
102
- titleLevel: F(s.titleLevel)
102
+ titleLevel: j(s.titleLevel)
103
103
  });
104
- window.customElements.define("select-conversation", _);
104
+ window.customElements.define("select-conversation", h);
package/dist/schema.js CHANGED
@@ -67,7 +67,7 @@ const o = e.object({
67
67
  ).required()
68
68
  }).required(), l = e.object({
69
69
  quizzes: e.array().items(i).required()
70
- }).required(), m = e.object({
70
+ }).required(), g = e.object({
71
71
  title: e.string().required(),
72
72
  messages: e.array().items(
73
73
  e.object({
@@ -80,11 +80,15 @@ const o = e.object({
80
80
  }).unknown(!0).optional()
81
81
  })
82
82
  ).required()
83
- }).required(), g = e.object({
83
+ }).required(), m = e.object({
84
84
  titleLevel: e.number().optional(),
85
- conversations: e.array().items(e.object({
85
+ messages: e.array().items(e.object({
86
86
  senderName: e.string().required(),
87
- message: e.string().required()
87
+ content: e.string().required(),
88
+ title: e.string().required(),
89
+ goodFeelings: e.array().items(e.string().required()).required(),
90
+ victory: e.string().required(),
91
+ loose: e.string().required()
88
92
  })).required()
89
93
  }), q = e.object({
90
94
  notifications: e.array().items(e.object({
@@ -210,7 +214,7 @@ const o = e.object({
210
214
  goodIdea: e.boolean().required(),
211
215
  feedback: e.string().required()
212
216
  })).required()
213
- }), I = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": o, "./capacity-calculation/capacity-calculation.schema.js": a, "./clickable-image/clickable-image.schema.js": c, "./complete-phrase/complete-phrase.schema.js": u, "./flip-cards/flip-cards.schema.js": d, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": l, "./message-conversation/message-conversation.schema.js": m, "./phishing-message/phishing-message.schema.js": g, "./phishing-notification/phishing-notification.schema.js": q, "./pix-article/pix-article.schema.js": b, "./pix-carousel/pix-carousel.schema.js": v, "./pix-cursor/pix-cursor.schema.js": y, "./pix-llm/llm-compare-messages.schema.js": L, "./pix-llm/llm-messages.schema.js": w, "./pix-llm/llm-prompt-select.schema.js": k, "./qcm-deepfake/qcm-deepfake.schema.js": S, "./select-conversation/select-conversation.schema.js": z }), C = Object.fromEntries(Object.entries(I).map(([s, n]) => [
217
+ }), I = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": o, "./capacity-calculation/capacity-calculation.schema.js": a, "./clickable-image/clickable-image.schema.js": c, "./complete-phrase/complete-phrase.schema.js": u, "./flip-cards/flip-cards.schema.js": d, "./image-quiz/image-quiz.schema.js": i, "./image-quiz/image-quizzes.schema.js": l, "./message-conversation/message-conversation.schema.js": g, "./phishing-message/phishing-message.schema.js": m, "./phishing-notification/phishing-notification.schema.js": q, "./pix-article/pix-article.schema.js": b, "./pix-carousel/pix-carousel.schema.js": v, "./pix-cursor/pix-cursor.schema.js": y, "./pix-llm/llm-compare-messages.schema.js": L, "./pix-llm/llm-messages.schema.js": w, "./pix-llm/llm-prompt-select.schema.js": k, "./qcm-deepfake/qcm-deepfake.schema.js": S, "./select-conversation/select-conversation.schema.js": z }), C = Object.fromEntries(Object.entries(I).map(([s, n]) => [
214
218
  s.replace(/^.*\/([^/]+)\.schema\.js$/, "$1"),
215
219
  n
216
220
  ]));