@1024pix/epreuves-components 2.8.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/Button.ce-CkwcReY5.js +18 -0
  2. package/dist/{ButtonTooltip.ce-B-f0Ebfa.js → ButtonTooltip.ce-CIo_7tm0.js} +15 -15
  3. package/dist/Cross.ce.vue_vue_type_script_setup_true_lang-C2TfFGJP.js +73 -0
  4. package/dist/{LLMMessage.ce-DAA_BQYY.js → LLMMessage.ce-y0pOYUCI.js} +2 -2
  5. package/dist/{Loading.ce-BPbyGkTl.js → Loading.ce-Cxcx64IX.js} +1 -1
  6. package/dist/{NavigationButton.ce-D7sjcUuO.js → NavigationButton.ce-DpzmC2Dd.js} +2 -2
  7. package/dist/{Retry-CTdYYKx5.js → Retry-BYnFnneH.js} +1 -1
  8. package/dist/{_plugin-vue_export-helper-CGJjSxi7.js → _plugin-vue_export-helper-BaC4eJh4.js} +1725 -1618
  9. package/dist/components/analyse-mails-phishing.ce.js.js +258 -0
  10. package/dist/components/calcul-impact.ce.js.js +42 -42
  11. package/dist/components/capacity-calculation.ce.js.js +71 -71
  12. package/dist/components/clickable-image.ce.js.js +12 -12
  13. package/dist/components/complete-phrase.ce.js.js +36 -36
  14. package/dist/components/flip-cards.ce.js.js +1 -1
  15. package/dist/components/image-quiz.ce.js.js +3 -3
  16. package/dist/components/image-quizzes.ce.js.js +20 -20
  17. package/dist/components/llm-compare-messages.ce.js.js +3 -3
  18. package/dist/components/llm-messages.ce.js.js +3 -3
  19. package/dist/components/llm-prompt-select.ce.js.js +1 -1
  20. package/dist/components/mdp-classement.ce.js.js +219 -0
  21. package/dist/components/message-conversation.ce.js.js +11 -11
  22. package/dist/components/mobile-shell.ce.js.js +1 -1
  23. package/dist/components/phishing-message.ce.js.js +59 -59
  24. package/dist/components/phishing-notification.ce.js.js +89 -89
  25. package/dist/components/pix-anonymisation.ce.js.js +85 -97
  26. package/dist/components/pix-article.ce.js.js +18 -18
  27. package/dist/components/pix-carousel.ce.js.js +86 -86
  28. package/dist/components/pix-cursor.ce.js.js +51 -51
  29. package/dist/components/qcm-deepfake.ce.js.js +49 -49
  30. package/dist/components/quiz-stepper.ce.js.js +101 -116
  31. package/dist/components/select-conversation.ce.js.js +41 -41
  32. package/dist/components/template-mail.ce.js.js +55 -55
  33. package/dist/components/test-top-mdp.ce.js.js +58 -58
  34. package/dist/components/trouver-mdp-rs.ce.js.js +758 -0
  35. package/dist/{i18n-BkraEFZL.js → i18n-BJ6FRipD.js} +9 -9
  36. package/dist/{i18n-lite-J-aj5pZd.js → i18n-lite-Dn1Iqj1Y.js} +1 -1
  37. package/dist/{image-quiz.ce-BFISPs8m.js → image-quiz.ce-DvpG9mbT.js} +86 -95
  38. package/dist/index-BCutQvmP.js +34 -0
  39. package/dist/index.js +7 -4
  40. package/dist/metadata.js +37 -25
  41. package/dist/schema.js +104 -52
  42. package/dist/{shadow-dom-DN_6ctXp.js → shadow-dom-Db7VMkC0.js} +1 -1
  43. package/dist/shuffled-B8VGTceh.js +19 -0
  44. package/package.json +2 -1
package/dist/schema.js CHANGED
@@ -1,10 +1,40 @@
1
1
  import e from "joi";
2
- const l = e.object({
2
+ const u = e.object({
3
+ titleLevel: e.number().optional(),
4
+ mails: e.array().items(e.object({
5
+ subject: e.string().required(),
6
+ from: e.object({
7
+ name: e.string().required(),
8
+ address: e.string().required()
9
+ }).required(),
10
+ body: e.array().items(e.alternatives().conditional(".type", {
11
+ switch: [
12
+ {
13
+ is: "paragraph",
14
+ then: e.object({
15
+ type: e.string().valid("paragraph").required(),
16
+ content: e.array().items(e.string().required()).required()
17
+ })
18
+ },
19
+ {
20
+ is: "button",
21
+ then: e.object({
22
+ type: e.string().valid("button").required(),
23
+ name: e.string().required()
24
+ })
25
+ }
26
+ ]
27
+ })).required(),
28
+ answers: e.array().items(e.string().required()).required(),
29
+ correctFeedback: e.string().required(),
30
+ incorrectFeedback: e.string().required()
31
+ }).required()).required()
32
+ }), d = e.object({
3
33
  titleLevel: e.number().optional()
4
- }), u = e.object({
34
+ }), l = e.object({
5
35
  titleLevel: e.number().optional(),
6
36
  capacityImage: e.string().required()
7
- }), d = e.object({
37
+ }), m = e.object({
8
38
  image: e.object({
9
39
  src: e.string().required(),
10
40
  alt: e.string().required(),
@@ -25,7 +55,7 @@ const l = e.object({
25
55
  info: e.string().required(),
26
56
  tooltipPosition: e.string().empty("").valid("bottom").optional()
27
57
  }).required()).required().min(1)
28
- }), m = e.object({
58
+ }), g = e.object({
29
59
  titleLevel: e.number().optional(),
30
60
  listOfProbabilityBarsLists: e.array().items(
31
61
  e.array().items(
@@ -38,7 +68,7 @@ const l = e.object({
38
68
  userMessage: e.string().required(),
39
69
  llmMessage: e.string().required(),
40
70
  wordsToAdd: e.array().items(e.string()).required()
41
- }), g = e.object({
71
+ }), q = e.object({
42
72
  titleLevel: e.number().optional(),
43
73
  name: e.string().required(),
44
74
  cardList: e.array().items(
@@ -49,7 +79,7 @@ const l = e.object({
49
79
  image: e.string().required()
50
80
  })
51
81
  ).required()
52
- }), o = e.object({
82
+ }), n = e.object({
53
83
  name: e.string().required(),
54
84
  multiple: e.boolean().optional(),
55
85
  context: e.string().optional(),
@@ -67,21 +97,23 @@ const l = e.object({
67
97
  }).required()
68
98
  ).required()
69
99
  }).required(), b = e.object({
70
- quizzes: e.array().items(o).required()
71
- }).required(), i = {
100
+ quizzes: e.array().items(n).required()
101
+ }).required(), p = e.object({
102
+ passwords: e.array().items(e.string()).required()
103
+ }), r = {
72
104
  userName: e.string().required(),
73
105
  direction: e.string().valid("incoming", "outgoing").required()
74
- }, r = e.object({
106
+ }, i = e.object({
75
107
  src: e.string().required(),
76
108
  alt: e.string().required()
77
- }).unknown(!0), q = e.object({
109
+ }).unknown(!0), _ = e.object({
78
110
  title: e.string().required(),
79
111
  messages: e.array().items(e.alternatives().conditional(".type", {
80
112
  switch: [
81
113
  {
82
114
  is: "Texte",
83
115
  then: e.object({
84
- ...i,
116
+ ...r,
85
117
  type: e.string().valid("Texte").required(),
86
118
  content: e.string().required()
87
119
  })
@@ -89,26 +121,26 @@ const l = e.object({
89
121
  {
90
122
  is: "Texte + Image",
91
123
  then: e.object({
92
- ...i,
124
+ ...r,
93
125
  type: e.string().valid("Texte + Image").required(),
94
126
  content: e.string().required(),
95
- image: r.required()
127
+ image: i.required()
96
128
  })
97
129
  },
98
130
  {
99
131
  is: "Image seule",
100
132
  then: e.object({
101
- ...i,
133
+ ...r,
102
134
  type: e.string().valid("Image seule").required(),
103
- image: r.required()
135
+ image: i.required()
104
136
  })
105
137
  }
106
138
  ]
107
139
  })).required(),
108
140
  animationSpeed: e.number().optional()
109
- }).required(), p = e.object({
141
+ }).required(), j = e.object({
110
142
  titleLevel: e.number().optional()
111
- }), _ = e.object({
143
+ }), h = e.object({
112
144
  notifications: e.array().items(e.object({
113
145
  icon: e.string().required(),
114
146
  sender: e.string().required(),
@@ -125,17 +157,17 @@ const l = e.object({
125
157
  }).required(),
126
158
  informationMessage: e.string().required(),
127
159
  titleLevel: e.number().optional()
128
- }), j = e.object({
160
+ }), v = e.object({
129
161
  content: e.string().required(),
130
162
  isAnonymizable: e.boolean().optional()
131
- }), h = e.object({
132
- fullSentence: e.array().items(j),
163
+ }), y = e.object({
164
+ fullSentence: e.array().items(v),
133
165
  rephrase: e.string().required(),
134
166
  feedback: e.string().required()
135
- }), v = e.object({
167
+ }), x = e.object({
136
168
  titleLevel: e.number().optional(),
137
- steps: e.array().items(h)
138
- }), y = e.object({
169
+ steps: e.array().items(y)
170
+ }), f = e.object({
139
171
  titleLevel: e.number().optional(),
140
172
  title: e.string().required(),
141
173
  author: e.string().required(),
@@ -143,11 +175,11 @@ const l = e.object({
143
175
  paragraphs: e.array().items(e.string().required()),
144
176
  highlightedSentence: e.string().empty("").optional(),
145
177
  colorOfHighlightSentence: e.string().empty("").optional()
146
- }), x = e.object({
178
+ }), w = e.object({
147
179
  name: e.string().allow("").required(),
148
180
  attribution: e.string().allow("").required(),
149
181
  url: e.string().allow("").required()
150
- }), f = e.object({
182
+ }), L = e.object({
151
183
  title: e.string().required(),
152
184
  description: e.string().allow("").required(),
153
185
  displayWidth: e.number().min(0).optional(),
@@ -155,12 +187,12 @@ const l = e.object({
155
187
  src: e.string().required(),
156
188
  alt: e.string().allow("").required()
157
189
  }).required(),
158
- license: x.optional()
159
- }), w = e.object({
190
+ license: w.optional()
191
+ }), k = e.object({
160
192
  title: e.string().required(),
161
193
  description: e.string().allow("").required(),
162
194
  text: e.string().required()
163
- }), L = e.object({
195
+ }), S = e.object({
164
196
  title: e.string().required(),
165
197
  description: e.string().allow("").required(),
166
198
  text: e.string().required(),
@@ -168,13 +200,13 @@ const l = e.object({
168
200
  src: e.string().required(),
169
201
  alt: e.string().allow("").required()
170
202
  }).required()
171
- }), S = e.object({
203
+ }), I = e.object({
172
204
  type: e.string().valid("image", "image-text", "text").required(),
173
205
  slides: e.alternatives().conditional("type", {
174
206
  switch: [
175
- { is: "image", then: e.array().items(f) },
176
- { is: "image-text", then: e.array().items(L) },
177
- { is: "text", then: e.array().items(w) }
207
+ { is: "image", then: e.array().items(L) },
208
+ { is: "image-text", then: e.array().items(S) },
209
+ { is: "text", then: e.array().items(k) }
178
210
  ]
179
211
  }).required(),
180
212
  randomSlides: e.boolean().optional(),
@@ -183,7 +215,7 @@ const l = e.object({
183
215
  disableStyleAroundImage: e.boolean().optional(),
184
216
  enableLoop: e.boolean().optional(),
185
217
  imageTextDisplay: e.string().empty("").optional()
186
- }).meta({ title: "pix-carousel" }).required(), I = e.object({
218
+ }).meta({ title: "pix-carousel" }).required(), z = e.object({
187
219
  options: e.array().items(e.object({
188
220
  label: e.string().required(),
189
221
  feedback: e.object({
@@ -194,34 +226,34 @@ const l = e.object({
194
226
  }), t = e.object({
195
227
  title: e.string().required(),
196
228
  llmName: e.string().required()
197
- }).required(), k = e.object({
229
+ }).required(), M = e.object({
198
230
  direction: e.string().valid("inbound").required(),
199
231
  content: e.string().required()
200
- }).required(), z = e.object({
232
+ }).required(), T = e.object({
201
233
  direction: e.string().valid("outbound").required(),
202
234
  content: e.string().required()
203
- }).required(), M = e.object({
235
+ }).required(), C = e.object({
204
236
  conversation1: t,
205
237
  conversation2: t,
206
238
  userName: e.string().required(),
207
239
  messages: e.array().items(
208
- e.alternatives(z, e.array().items(k).min(2).max(2).required())
240
+ e.alternatives(T, e.array().items(M).min(2).max(2).required())
209
241
  ).required()
210
- }).required(), s = e.object({
242
+ }).required(), o = e.object({
211
243
  direction: e.string().valid("inbound", "outbound").required(),
212
244
  content: e.string().required()
213
- }), T = e.object({
214
- messages: e.array().items(s.required()).required()
215
- }).required(), C = e.object({
245
+ }), P = e.object({
246
+ messages: e.array().items(o.required()).required()
247
+ }).required(), A = e.object({
216
248
  speed: e.number().default(20).min(0).optional(),
217
- messages: e.array().items(s).required(),
249
+ messages: e.array().items(o).required(),
218
250
  prompts: e.array().items(
219
251
  e.object({
220
252
  prompt: e.string().required(),
221
253
  response: e.string().required()
222
254
  }).required()
223
255
  ).required()
224
- }).required(), A = e.object({
256
+ }).required(), N = e.object({
225
257
  titleLevel: e.number().optional(),
226
258
  successImage: e.string().required(),
227
259
  failImage: e.string().required(),
@@ -230,18 +262,18 @@ const l = e.object({
230
262
  }), O = e.object({
231
263
  success: e.string().required(),
232
264
  failed: e.string().required()
233
- }), n = e.object({
265
+ }), s = e.object({
234
266
  title: e.string().optional(),
235
267
  content: e.string().optional(),
236
268
  isGoodAnswer: e.boolean().optional()
237
- }), P = e.object({
269
+ }), F = e.object({
238
270
  question: e.string().required(),
239
271
  feedback: O.required(),
240
- choice1: n.required(),
241
- choice2: n.required()
242
- }), N = e.object({
272
+ choice1: s.required(),
273
+ choice2: s.required()
274
+ }), D = e.object({
243
275
  titleLevel: e.number().optional(),
244
- steps: e.array().items(P)
276
+ steps: e.array().items(F)
245
277
  }), $ = e.object({
246
278
  titleLevel: e.number().optional(),
247
279
  incomingMessage: e.object({
@@ -277,14 +309,34 @@ const l = e.object({
277
309
  minutes: e.number().negative().optional()
278
310
  }).required()
279
311
  }).optional()
280
- }), D = e.object({
312
+ }), E = e.object({
281
313
  titleLevel: e.number().optional(),
282
314
  passwords: e.array().items(e.string().required()).required(),
283
315
  expectedPassword: e.string().required()
284
- }), E = /* @__PURE__ */ Object.assign({ "./calcul-impact/calcul-impact.schema.js": l, "./capacity-calculation/capacity-calculation.schema.js": u, "./clickable-image/clickable-image.schema.js": d, "./complete-phrase/complete-phrase.schema.js": m, "./flip-cards/flip-cards.schema.js": g, "./image-quiz/image-quiz.schema.js": o, "./image-quiz/image-quizzes.schema.js": b, "./message-conversation/message-conversation.schema.js": q, "./phishing-message/phishing-message.schema.js": p, "./phishing-notification/phishing-notification.schema.js": _, "./pix-anonymisation/pix-anonymisation.schema.js": v, "./pix-article/pix-article.schema.js": y, "./pix-carousel/pix-carousel.schema.js": S, "./pix-cursor/pix-cursor.schema.js": I, "./pix-llm/llm-compare-messages.schema.js": M, "./pix-llm/llm-messages.schema.js": T, "./pix-llm/llm-prompt-select.schema.js": C, "./qcm-deepfake/qcm-deepfake.schema.js": A, "./quiz-stepper/quiz-stepper.schema.js": N, "./select-conversation/select-conversation.schema.js": $, "./template-mail/template-mail.schema.js": B, "./test-top-mdp/test-top-mdp.schema.js": D }), G = Object.fromEntries(Object.entries(E).map(([a, c]) => [
316
+ }), G = e.object({
317
+ date: e.string().isoDate().required(),
318
+ content: e.string().required()
319
+ }), H = e.object({
320
+ userName: e.string().required(),
321
+ tag: e.string().required(),
322
+ bio: e.string().required(),
323
+ location: e.string().required(),
324
+ publications: e.array().items(G).required()
325
+ }), J = e.object({
326
+ success: e.string().required(),
327
+ failed: e.string().required()
328
+ }), W = e.object({
329
+ password: e.string().required(),
330
+ user: e.string().required()
331
+ }), K = e.object({
332
+ titleLevel: e.number().optional(),
333
+ validations: W.required(),
334
+ feedback: J.required(),
335
+ userProfile: H.required()
336
+ }), Q = /* @__PURE__ */ Object.assign({ "./analyse-mails-phishing/analyse-mails-phishing.schema.js": u, "./calcul-impact/calcul-impact.schema.js": d, "./capacity-calculation/capacity-calculation.schema.js": l, "./clickable-image/clickable-image.schema.js": m, "./complete-phrase/complete-phrase.schema.js": g, "./flip-cards/flip-cards.schema.js": q, "./image-quiz/image-quiz.schema.js": n, "./image-quiz/image-quizzes.schema.js": b, "./mdp-classement/mdp-classement.schema.js": p, "./message-conversation/message-conversation.schema.js": _, "./phishing-message/phishing-message.schema.js": j, "./phishing-notification/phishing-notification.schema.js": h, "./pix-anonymisation/pix-anonymisation.schema.js": x, "./pix-article/pix-article.schema.js": f, "./pix-carousel/pix-carousel.schema.js": I, "./pix-cursor/pix-cursor.schema.js": z, "./pix-llm/llm-compare-messages.schema.js": C, "./pix-llm/llm-messages.schema.js": P, "./pix-llm/llm-prompt-select.schema.js": A, "./qcm-deepfake/qcm-deepfake.schema.js": N, "./quiz-stepper/quiz-stepper.schema.js": D, "./select-conversation/select-conversation.schema.js": $, "./template-mail/template-mail.schema.js": B, "./test-top-mdp/test-top-mdp.schema.js": E, "./trouver-mdp-rs/trouver-mdp-rs.schema.js": K }), U = Object.fromEntries(Object.entries(Q).map(([a, c]) => [
285
337
  a.replace(/^.*\/([^/]+)\.schema\.js$/, "$1"),
286
338
  c
287
339
  ]));
288
340
  export {
289
- G as schema
341
+ U as schema
290
342
  };
@@ -1,4 +1,4 @@
1
- import { u as t, p as s } from "./_plugin-vue_export-helper-CGJjSxi7.js";
1
+ import { u as t, p as s } from "./_plugin-vue_export-helper-BaC4eJh4.js";
2
2
  const a = /* @__PURE__ */ Symbol("shadowRoot");
3
3
  function r() {
4
4
  const o = t();
@@ -0,0 +1,19 @@
1
+ function d(e, { random: f = u, ensureIsShuffled: n = !1 } = {}) {
2
+ const o = Array.from(e, (t, l) => l);
3
+ do
4
+ s(o, f);
5
+ while (n && o.every((t, l) => t === l));
6
+ return o.map((t) => e[t]);
7
+ }
8
+ function s(e, f) {
9
+ for (let n = e.length - 1; n > 0; n--) {
10
+ const o = f() % (n + 1);
11
+ [e[n], e[o]] = [e[o], e[n]];
12
+ }
13
+ }
14
+ function u() {
15
+ return Math.floor(Math.random() * 2 ** 32);
16
+ }
17
+ export {
18
+ d as s
19
+ };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@1024pix/epreuves-components",
3
- "version": "2.8.0",
3
+ "version": "2.9.0",
4
+ "type": "module",
4
5
  "description": "A collection of interactive components to be used in Pix challenges or modules",
5
6
  "exports": {
6
7
  ".": "./dist/index.js",