@devix-tecnologia/timeline-vue 1.5.0 → 2.0.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 (37) hide show
  1. package/README.md +32 -13
  2. package/dist/style.css +1 -1
  3. package/dist/timeline-vue.es.js +489 -440
  4. package/dist/types/components/timeline/Templates/AdiantarHorario.test.d.ts +1 -0
  5. package/dist/types/components/timeline/Templates/AdiantarHorario.vue.d.ts +6 -14
  6. package/dist/types/components/timeline/Templates/AdicionarObservacao.vue.d.ts +15 -13
  7. package/dist/types/components/timeline/Templates/EditarStatus.vue.d.ts +18 -18
  8. package/dist/types/components/timeline/Templates/TemplateTimeline.mock.d.ts +4 -0
  9. package/dist/types/components/timeline/Templates/TemplateTimeline.test.d.ts +1 -0
  10. package/dist/types/components/timeline/Templates/TemplateTimeline.vue.d.ts +346 -0
  11. package/dist/types/components/timeline/atomos/IconeStatus.vue.d.ts +5 -3
  12. package/dist/types/components/timeline/moleculas/AreaSalvamento.test.d.ts +1 -0
  13. package/dist/types/components/timeline/moleculas/AreaSalvamento.vue.d.ts +11 -14
  14. package/dist/types/components/timeline/moleculas/Botao.test.d.ts +1 -0
  15. package/dist/types/components/timeline/moleculas/Botao.vue.d.ts +25 -17
  16. package/dist/types/components/timeline/moleculas/BotaoStatus.test.d.ts +1 -0
  17. package/dist/types/components/timeline/moleculas/BotaoStatus.vue.d.ts +19 -19
  18. package/dist/types/components/timeline/moleculas/CabecalhoEventoDetalhado.vue.d.ts +10 -18
  19. package/dist/types/components/timeline/moleculas/EventoTimeline.test.d.ts +1 -0
  20. package/dist/types/components/timeline/moleculas/EventoTimeline.vue.d.ts +34 -25
  21. package/dist/types/components/timeline/moleculas/Observacoes.test.d.ts +1 -0
  22. package/dist/types/components/timeline/moleculas/Observacoes.vue.d.ts +11 -14
  23. package/dist/types/components/timeline/moleculas/StatusEvento.test.d.ts +1 -0
  24. package/dist/types/components/timeline/moleculas/StatusEvento.vue.d.ts +16 -17
  25. package/dist/types/components/timeline/moleculas/Topo.vue.d.ts +10 -6
  26. package/dist/types/components/timeline/organismos/EditarEvento.test.d.ts +1 -0
  27. package/dist/types/components/timeline/organismos/EditarEvento.vue.d.ts +11 -17
  28. package/dist/types/components/timeline/organismos/EventoDetalhado.test.d.ts +1 -0
  29. package/dist/types/components/timeline/organismos/EventoDetalhado.vue.d.ts +19 -10
  30. package/dist/types/components/timeline/organismos/MyComponent.test.d.ts +1 -0
  31. package/dist/types/components/timeline/organismos/MyComponent.vue.d.ts +11 -0
  32. package/dist/types/components/timeline/organismos/Timeline.mock.d.ts +1 -1
  33. package/dist/types/components/timeline/organismos/Timeline.test.d.ts +1 -0
  34. package/dist/types/components/timeline/organismos/Timeline.vue.d.ts +17 -11
  35. package/dist/types/components/timeline/type.d.ts +10 -9
  36. package/dist/types/components/timeline/typeDetalhado.d.ts +0 -3
  37. package/package.json +15 -4
@@ -1,5 +1,5 @@
1
- import { defineComponent as v, reactive as S, computed as b, openBlock as o, createElementBlock as s, createElementVNode as u, normalizeClass as T, normalizeStyle as j, toDisplayString as l, resolveComponent as d, createVNode as _, createBlock as y, createCommentVNode as E, ref as Q, Fragment as M, renderList as N, renderSlot as z, createTextVNode as A, pushScopeId as H, popScopeId as R, withCtx as P, Transition as k } from "vue";
2
- const U = v({
1
+ import { defineComponent as p, reactive as S, computed as E, openBlock as a, createElementBlock as i, createElementVNode as u, normalizeClass as q, normalizeStyle as H, toDisplayString as c, resolveComponent as l, createVNode as _, createBlock as C, createCommentVNode as b, ref as W, Fragment as V, renderList as F, renderSlot as B, createTextVNode as R, pushScopeId as M, popScopeId as w, withCtx as D, Transition as z } from "vue";
2
+ const X = p({
3
3
  name: "Icone Categoria",
4
4
  props: {
5
5
  iconeCategoria: {
@@ -25,12 +25,12 @@ const U = v({
25
25
  },
26
26
  setup(e) {
27
27
  return e = S(e), {
28
- classes: b(() => ({
28
+ classes: E(() => ({
29
29
  "bg-escuro": e.escuro,
30
30
  "bg-claro": !e.escuro,
31
31
  [`borda-${e.tipo || "padrao"}`]: !0
32
32
  })),
33
- style: b(() => ({
33
+ style: E(() => ({
34
34
  borderColor: e.borderColor,
35
35
  backgroundColor: e.backgroundColor
36
36
  }))
@@ -38,23 +38,23 @@ const U = v({
38
38
  }
39
39
  });
40
40
  const m = (e, t) => {
41
- const n = e.__vccOpts || e;
42
- for (const [i, c] of t)
43
- n[i] = c;
44
- return n;
45
- }, W = { class: "areaCategoria" }, X = ["alt"], Z = { class: "material-symbols-outlined" };
46
- function x(e, t, n, i, c, p) {
47
- return o(), s("div", W, [
41
+ const s = e.__vccOpts || e;
42
+ for (const [o, n] of t)
43
+ s[o] = n;
44
+ return s;
45
+ }, Z = { class: "areaCategoria" }, x = ["alt"], ee = { class: "material-symbols-outlined" };
46
+ function te(e, t, s, o, n, d) {
47
+ return a(), i("div", Z, [
48
48
  u("div", {
49
- class: T(["iconeCategoria", e.classes]),
50
- style: j(e.style),
49
+ class: q(["iconeCategoria", e.classes]),
50
+ style: H(e.style),
51
51
  alt: e.categoria
52
52
  }, [
53
- u("span", Z, l(e.iconeCategoria), 1)
54
- ], 14, X)
53
+ u("span", ee, c(e.iconeCategoria), 1)
54
+ ], 14, x)
55
55
  ]);
56
56
  }
57
- const w = /* @__PURE__ */ m(U, [["render", x], ["__scopeId", "data-v-f922d1fe"]]), ee = v({
57
+ const L = /* @__PURE__ */ m(X, [["render", te], ["__scopeId", "data-v-f922d1fe"]]), ae = p({
58
58
  name: "Icone Status",
59
59
  props: {
60
60
  status: {
@@ -64,18 +64,18 @@ const w = /* @__PURE__ */ m(U, [["render", x], ["__scopeId", "data-v-f922d1fe"]]
64
64
  },
65
65
  setup(e) {
66
66
  return e = S(e), {
67
- classes: b(() => ({
67
+ classes: E(() => ({
68
68
  [`${e.status || "planejado"}`]: !0
69
69
  }))
70
70
  };
71
71
  }
72
72
  });
73
- function oe(e, t, n, i, c, p) {
74
- return o(), s("div", {
75
- class: T([e.classes, "iconeStatus"])
73
+ function oe(e, t, s, o, n, d) {
74
+ return a(), i("div", {
75
+ class: q([e.classes, "iconeStatus"])
76
76
  }, null, 2);
77
77
  }
78
- const V = /* @__PURE__ */ m(ee, [["render", oe], ["__scopeId", "data-v-61335255"]]), te = v({
78
+ const J = /* @__PURE__ */ m(ae, [["render", oe], ["__scopeId", "data-v-efe84975"]]), ne = p({
79
79
  name: "Subtítulo Evento",
80
80
  props: {
81
81
  subtitulo: {
@@ -84,11 +84,11 @@ const V = /* @__PURE__ */ m(ee, [["render", oe], ["__scopeId", "data-v-61335255"
84
84
  }
85
85
  }
86
86
  });
87
- const ae = { class: "subtitulo" };
88
- function ne(e, t, n, i, c, p) {
89
- return o(), s("h4", ae, l(e.subtitulo), 1);
87
+ const se = { class: "subtitulo" };
88
+ function ie(e, t, s, o, n, d) {
89
+ return a(), i("h4", se, c(e.subtitulo), 1);
90
90
  }
91
- const se = /* @__PURE__ */ m(te, [["render", ne], ["__scopeId", "data-v-5f7c5673"]]), re = v({
91
+ const re = /* @__PURE__ */ m(ne, [["render", ie], ["__scopeId", "data-v-5f7c5673"]]), ce = p({
92
92
  name: "Título Evento",
93
93
  props: {
94
94
  titulo: {
@@ -97,11 +97,11 @@ const se = /* @__PURE__ */ m(te, [["render", ne], ["__scopeId", "data-v-5f7c5673
97
97
  }
98
98
  }
99
99
  });
100
- const ie = { class: "titulo" };
101
- function ce(e, t, n, i, c, p) {
102
- return o(), s("h3", ie, l(e.titulo), 1);
100
+ const le = { class: "titulo" };
101
+ function de(e, t, s, o, n, d) {
102
+ return a(), i("h3", le, c(e.titulo), 1);
103
103
  }
104
- const le = /* @__PURE__ */ m(re, [["render", ce], ["__scopeId", "data-v-7369e837"]]), de = v({
104
+ const ue = /* @__PURE__ */ m(ce, [["render", de], ["__scopeId", "data-v-7369e837"]]), _e = p({
105
105
  name: "Descrição Evento",
106
106
  props: {
107
107
  titulo: {
@@ -113,22 +113,22 @@ const le = /* @__PURE__ */ m(re, [["render", ce], ["__scopeId", "data-v-7369e837
113
113
  type: String
114
114
  }
115
115
  },
116
- components: { TituloEvento: le, SubtituloEvento: se }
116
+ components: { TituloEvento: ue, SubtituloEvento: re }
117
117
  });
118
- function ue(e, t, n, i, c, p) {
119
- const r = d("TituloEvento"), $ = d("SubtituloEvento");
120
- return o(), s("div", {
118
+ function pe(e, t, s, o, n, d) {
119
+ const r = l("TituloEvento"), f = l("SubtituloEvento");
120
+ return a(), i("div", {
121
121
  class: "descricaoEvento",
122
- style: j(`${e.subtitulo ? "" : "padding-top: 3.3rem"}`)
122
+ style: H(`${e.subtitulo ? "" : "padding-top: 3.3rem"}`)
123
123
  }, [
124
124
  _(r, { titulo: e.titulo }, null, 8, ["titulo"]),
125
- e.subtitulo ? (o(), y($, {
125
+ e.subtitulo ? (a(), C(f, {
126
126
  key: 0,
127
127
  subtitulo: e.subtitulo
128
- }, null, 8, ["subtitulo"])) : E("", !0)
128
+ }, null, 8, ["subtitulo"])) : b("", !0)
129
129
  ], 4);
130
130
  }
131
- const _e = /* @__PURE__ */ m(de, [["render", ue], ["__scopeId", "data-v-171435d6"]]), pe = v({
131
+ const me = /* @__PURE__ */ m(_e, [["render", pe], ["__scopeId", "data-v-793cab8b"]]), ve = p({
132
132
  name: "Hora",
133
133
  props: {
134
134
  hora: {
@@ -146,19 +146,19 @@ const _e = /* @__PURE__ */ m(de, [["render", ue], ["__scopeId", "data-v-171435d6
146
146
  components: {},
147
147
  setup(e) {
148
148
  return {
149
- horas: Q(new Date(e.hora)),
150
- classes: b(() => ({
149
+ horas: W(new Date(e.hora)),
150
+ classes: E(() => ({
151
151
  [`hora-${e.aparencia || ""}`]: !0
152
152
  }))
153
153
  };
154
154
  }
155
155
  });
156
- function ve(e, t, n, i, c, p) {
157
- return o(), s("div", {
158
- class: T(["hora", e.classes])
159
- }, l(e.horas.getHours()) + ":" + l(e.horas.getMinutes().toString().padStart(2, "0")), 3);
156
+ function fe(e, t, s, o, n, d) {
157
+ return a(), i("div", {
158
+ class: q(["hora", e.classes])
159
+ }, c(e.horas.getHours()) + ":" + c(e.horas.getMinutes().toString().padStart(2, "0")), 3);
160
160
  }
161
- const L = /* @__PURE__ */ m(pe, [["render", ve], ["__scopeId", "data-v-dacdabdc"]]), me = v({
161
+ const Y = /* @__PURE__ */ m(ve, [["render", fe], ["__scopeId", "data-v-d3082250"]]), $e = p({
162
162
  name: "Hora Evento",
163
163
  props: {
164
164
  horaPrevista: {
@@ -170,27 +170,27 @@ const L = /* @__PURE__ */ m(pe, [["render", ve], ["__scopeId", "data-v-dacdabdc"
170
170
  type: Date
171
171
  }
172
172
  },
173
- components: { Hora: L }
173
+ components: { Hora: Y }
174
174
  });
175
- const fe = { class: "areaHora" }, $e = { class: "horaEvento" };
176
- function he(e, t, n, i, c, p) {
177
- const r = d("Hora");
178
- return o(), s("div", fe, [
179
- u("div", $e, [
180
- e.horaRealizada ? (o(), y(r, {
175
+ const he = { class: "areaHora" }, ge = { class: "horaEvento" };
176
+ function ye(e, t, s, o, n, d) {
177
+ const r = l("Hora");
178
+ return a(), i("div", he, [
179
+ u("div", ge, [
180
+ e.horaRealizada ? (a(), C(r, {
181
181
  key: 0,
182
182
  hora: e.horaRealizada,
183
183
  style: { "padding-top": "0.3rem" }
184
- }, null, 8, ["hora"])) : E("", !0),
184
+ }, null, 8, ["hora"])) : b("", !0),
185
185
  _(r, {
186
186
  hora: e.horaPrevista,
187
187
  aparencia: e.horaRealizada ? "riscada" : "padrao",
188
- style: j(e.horaRealizada ? "" : "padding-top: 1.2rem")
188
+ style: H(e.horaRealizada ? "" : "padding-top: 1.2rem")
189
189
  }, null, 8, ["hora", "aparencia", "style"])
190
190
  ])
191
191
  ]);
192
192
  }
193
- const ge = /* @__PURE__ */ m(me, [["render", he], ["__scopeId", "data-v-da519ace"]]), ye = v({
193
+ const Ce = /* @__PURE__ */ m($e, [["render", ye], ["__scopeId", "data-v-da519ace"]]), be = p({
194
194
  name: "Destaque",
195
195
  props: {
196
196
  texto: {
@@ -198,11 +198,11 @@ const ge = /* @__PURE__ */ m(me, [["render", he], ["__scopeId", "data-v-da519ace
198
198
  }
199
199
  }
200
200
  });
201
- const be = { class: "destaqueEvento texto-pequeno" };
202
- function Ee(e, t, n, i, c, p) {
203
- return o(), s("div", be, l(e.texto), 1);
201
+ const ke = { class: "destaqueEvento texto-pequeno" };
202
+ function Se(e, t, s, o, n, d) {
203
+ return a(), i("div", ke, c(e.texto), 1);
204
204
  }
205
- const Se = /* @__PURE__ */ m(ye, [["render", Ee], ["__scopeId", "data-v-c2f02de8"]]), Ce = v({
205
+ const Ee = /* @__PURE__ */ m(be, [["render", Se], ["__scopeId", "data-v-c2f02de8"]]), Te = p({
206
206
  name: "Evento Timeline",
207
207
  props: {
208
208
  status: {
@@ -214,14 +214,15 @@ const Se = /* @__PURE__ */ m(ye, [["render", Ee], ["__scopeId", "data-v-c2f02de8
214
214
  type: String
215
215
  },
216
216
  ehAtual: {
217
- required: !0,
218
- type: Boolean
217
+ required: !1,
218
+ type: Boolean,
219
+ default: !1
219
220
  },
220
- previsto: {
221
+ previstoPara: {
221
222
  required: !0,
222
223
  type: Date
223
224
  },
224
- realizado: {
225
+ realizadoEm: {
225
226
  required: !1,
226
227
  type: Date
227
228
  },
@@ -237,58 +238,62 @@ const Se = /* @__PURE__ */ m(ye, [["render", Ee], ["__scopeId", "data-v-c2f02de8
237
238
  required: !1,
238
239
  type: String
239
240
  },
240
- destaque: {
241
+ textoDestaque: {
241
242
  required: !1,
242
243
  type: String
243
244
  },
244
- aoClicar: {
245
+ clicavel: {
245
246
  required: !1,
246
- type: Function
247
+ type: Boolean,
248
+ default: !0
247
249
  }
248
250
  },
249
251
  components: {
250
- IconeStatus: V,
251
- IconeCategoria: w,
252
- HoraEvento: ge,
253
- DescricaoEvento: _e,
254
- Destaque: Se
252
+ IconeStatus: J,
253
+ IconeCategoria: L,
254
+ HoraEvento: Ce,
255
+ DescricaoEvento: me,
256
+ Destaque: Ee
255
257
  },
256
- setup(e) {
258
+ emits: {
259
+ click: (e) => !0
260
+ },
261
+ setup(e, { emit: t }) {
257
262
  return {
258
- eventoSelecionado: b(() => ({
263
+ handleClick: (o) => {
264
+ e.clicavel && t("click", o);
265
+ },
266
+ eventoSelecionado: E(() => ({
259
267
  atual: e.ehAtual,
260
268
  padrao: e.ehAtual
261
- })),
262
- clicavel: b(() => ({
263
- clicavel: e.aoClicar !== void 0
264
269
  }))
265
270
  };
266
271
  }
267
272
  });
268
- const Te = ["onclick"];
269
- function qe(e, t, n, i, c, p) {
270
- const r = d("IconeStatus"), $ = d("HoraEvento"), h = d("IconeCategoria"), a = d("DescricaoEvento"), f = d("Destaque");
271
- return o(), s("article", {
272
- class: T(["eventoTimeline", [e.status, "criticidade-" + e.criticidade, e.eventoSelecionado, e.clicavel]]),
273
- onclick: e.aoClicar
273
+ function Pe(e, t, s, o, n, d) {
274
+ const r = l("IconeStatus"), f = l("HoraEvento"), y = l("IconeCategoria"), $ = l("DescricaoEvento"), I = l("Destaque");
275
+ return a(), i("article", {
276
+ "data-testid": "evento",
277
+ class: q(["eventoTimeline", [e.status, "criticidade-" + e.criticidade, e.eventoSelecionado, e.clicavel]]),
278
+ onClick: t[0] || (t[0] = (...v) => e.handleClick && e.handleClick(...v))
274
279
  }, [
275
280
  _(r, { status: e.status }, null, 8, ["status"]),
276
- _($, {
277
- horaPrevista: e.previsto,
278
- horaRealizada: e.realizado
281
+ _(f, {
282
+ horaPrevista: e.previstoPara,
283
+ horaRealizada: e.realizadoEm
279
284
  }, null, 8, ["horaPrevista", "horaRealizada"]),
280
- _(h, {
285
+ _(y, {
281
286
  iconeCategoria: e.categoria.icone,
282
287
  categoria: e.categoria.nome
283
288
  }, null, 8, ["iconeCategoria", "categoria"]),
284
- _(a, {
289
+ _($, {
285
290
  titulo: e.titulo,
286
291
  subtitulo: e.subtitulo
287
292
  }, null, 8, ["titulo", "subtitulo"]),
288
- _(f, { texto: e.destaque }, null, 8, ["texto"])
289
- ], 10, Te);
293
+ _(I, { texto: e.textoDestaque }, null, 8, ["texto"])
294
+ ], 2);
290
295
  }
291
- const J = /* @__PURE__ */ m(Ce, [["render", qe]]), De = v({
296
+ const G = /* @__PURE__ */ m(Te, [["render", Pe]]), De = p({
292
297
  name: "Box Data",
293
298
  props: {
294
299
  dataNumero: {
@@ -301,18 +306,18 @@ const J = /* @__PURE__ */ m(Ce, [["render", qe]]), De = v({
301
306
  },
302
307
  setup(e) {
303
308
  return e = S(e), {
304
- classes: b(() => ({
309
+ classes: E(() => ({
305
310
  [`${e.aparencia || "padrao"}`]: !0
306
311
  }))
307
312
  };
308
313
  }
309
314
  });
310
- function Pe(e, t, n, i, c, p) {
311
- return o(), s("h3", {
312
- class: T(["boxData padrao", e.classes])
313
- }, l(e.dataNumero), 3);
315
+ function qe(e, t, s, o, n, d) {
316
+ return a(), i("h3", {
317
+ class: q(["boxData padrao", e.classes])
318
+ }, c(e.dataNumero), 3);
314
319
  }
315
- const ke = /* @__PURE__ */ m(De, [["render", Pe], ["__scopeId", "data-v-385cc692"]]), Ie = v({
320
+ const Ie = /* @__PURE__ */ m(De, [["render", qe], ["__scopeId", "data-v-385cc692"]]), ze = p({
316
321
  name: "SeparadorPeriodo",
317
322
  props: {
318
323
  dataSeparador: {
@@ -320,25 +325,25 @@ const ke = /* @__PURE__ */ m(De, [["render", Pe], ["__scopeId", "data-v-385cc692
320
325
  type: Date
321
326
  }
322
327
  },
323
- components: { BoxData: ke },
328
+ components: { BoxData: Ie },
324
329
  setup(e) {
325
330
  const t = new Array(12);
326
- return t[0] = "Janeiro", t[1] = "Fevereiro", t[2] = "Março", t[3] = "Abril", t[4] = "Maio", t[5] = "Junho", t[6] = "Julho", t[7] = "Agosto", t[8] = "Setembro", t[9] = "Outubro", t[10] = "Novembro", t[11] = "Dezembro", { mesCorrente: (i) => t[i] };
331
+ return t[0] = "Janeiro", t[1] = "Fevereiro", t[2] = "Março", t[3] = "Abril", t[4] = "Maio", t[5] = "Junho", t[6] = "Julho", t[7] = "Agosto", t[8] = "Setembro", t[9] = "Outubro", t[10] = "Novembro", t[11] = "Dezembro", { mesCorrente: (o) => t[o] };
327
332
  }
328
333
  });
329
- const ze = { class: "separadorPeriodo" }, Be = { class: "areaData" }, Oe = { class: "titulo" };
330
- function je(e, t, n, i, c, p) {
331
- const r = d("BoxData");
332
- return o(), s("div", ze, [
334
+ const Ae = { class: "separadorPeriodo" }, Be = { class: "areaData" }, Oe = { class: "titulo" };
335
+ function je(e, t, s, o, n, d) {
336
+ const r = l("BoxData");
337
+ return a(), i("div", Ae, [
333
338
  u("div", Be, [
334
339
  _(r, {
335
340
  dataNumero: e.dataSeparador.getDate()
336
341
  }, null, 8, ["dataNumero"])
337
342
  ]),
338
- u("h3", Oe, l(e.mesCorrente(e.dataSeparador.getMonth())) + " de " + l(e.dataSeparador.getFullYear()), 1)
343
+ u("h3", Oe, c(e.mesCorrente(e.dataSeparador.getMonth())) + " de " + c(e.dataSeparador.getFullYear()), 1)
339
344
  ]);
340
345
  }
341
- const Ae = /* @__PURE__ */ m(Ie, [["render", je]]), He = v({
346
+ const He = /* @__PURE__ */ m(ze, [["render", je]]), Re = p({
342
347
  name: "Avatar Timeline",
343
348
  props: {
344
349
  imagem: {
@@ -349,23 +354,23 @@ const Ae = /* @__PURE__ */ m(Ie, [["render", je]]), He = v({
349
354
  }
350
355
  }
351
356
  });
352
- const Re = { class: "avatar" }, Fe = ["src"], Me = {
357
+ const Me = { class: "avatar" }, we = ["src"], Ne = {
353
358
  key: 1,
354
359
  class: "material-symbols-outlined"
355
- }, Ne = {
360
+ }, Ve = {
356
361
  key: 2,
357
362
  class: "material-symbols-outlined"
358
363
  };
359
- function we(e, t, n, i, c, p) {
360
- return o(), s("div", Re, [
361
- e.imagem ? (o(), s("img", {
364
+ function Fe(e, t, s, o, n, d) {
365
+ return a(), i("div", Me, [
366
+ e.imagem ? (a(), i("img", {
362
367
  key: 0,
363
368
  src: e.imagem
364
- }, null, 8, Fe)) : e.icone ? (o(), s("span", Me, l(e.icone), 1)) : (o(), s("span", Ne, " person "))
369
+ }, null, 8, we)) : e.icone ? (a(), i("span", Ne, c(e.icone), 1)) : (a(), i("span", Ve, " person "))
365
370
  ]);
366
371
  }
367
- const Ve = /* @__PURE__ */ m(He, [["render", we], ["__scopeId", "data-v-bd3d61f3"]]), Le = v({
368
- components: { AvatarTimeline: Ve },
372
+ const Le = /* @__PURE__ */ m(Re, [["render", Fe], ["__scopeId", "data-v-bd3d61f3"]]), Je = p({
373
+ components: { AvatarTimeline: Le },
369
374
  props: {
370
375
  imagemPerfil: {
371
376
  type: String
@@ -383,30 +388,30 @@ const Ve = /* @__PURE__ */ m(He, [["render", we], ["__scopeId", "data-v-bd3d61f3
383
388
  },
384
389
  setup(e) {
385
390
  return e = S(e), {
386
- classes: b(() => ({
391
+ classes: E(() => ({
387
392
  "formato-reduzido": e.formatoReduzido,
388
393
  "formato-normal": !e.formatoReduzido
389
394
  }))
390
395
  };
391
396
  }
392
397
  });
393
- const Je = { class: "nome" };
394
- function Ye(e, t, n, i, c, p) {
395
- const r = d("AvatarTimeline");
396
- return o(), s("section", {
397
- class: T(["perfilTimeline", e.classes])
398
+ const Ye = { class: "nome" };
399
+ function Ge(e, t, s, o, n, d) {
400
+ const r = l("AvatarTimeline");
401
+ return a(), i("section", {
402
+ class: q(["perfilTimeline", e.classes])
398
403
  }, [
399
- e.imagemPerfil ? (o(), y(r, {
404
+ e.imagemPerfil ? (a(), C(r, {
400
405
  key: 0,
401
406
  imagem: e.imagemPerfil
402
- }, null, 8, ["imagem"])) : e.iconePerfil ? (o(), y(r, {
407
+ }, null, 8, ["imagem"])) : e.iconePerfil ? (a(), C(r, {
403
408
  key: 1,
404
409
  icone: e.iconePerfil
405
- }, null, 8, ["icone"])) : E("", !0),
406
- u("h2", Je, l(e.nomePerfil), 1)
410
+ }, null, 8, ["icone"])) : b("", !0),
411
+ u("h2", Ye, c(e.nomePerfil), 1)
407
412
  ], 2);
408
413
  }
409
- const Y = /* @__PURE__ */ m(Le, [["render", Ye]]), Ge = v({
414
+ const K = /* @__PURE__ */ m(Je, [["render", Ge]]), Ke = p({
410
415
  props: {
411
416
  perfilTimeline: {
412
417
  required: !1,
@@ -414,349 +419,355 @@ const Y = /* @__PURE__ */ m(Le, [["render", Ye]]), Ge = v({
414
419
  },
415
420
  eventosTimeline: {
416
421
  required: !0,
417
- type: Object
422
+ type: Array
418
423
  }
419
424
  },
420
425
  components: {
421
- PerfilTimeline: Y,
422
- SeparadorPeriodo: Ae,
423
- EventoTimeline: J
426
+ PerfilTimeline: K,
427
+ SeparadorPeriodo: He,
428
+ EventoTimeline: G
424
429
  },
425
- setup(e) {
426
- const t = S(
427
- e.eventosTimeline
428
- );
429
- let n = S(t);
430
- function i() {
431
- n = t;
432
- const a = r(n);
433
- n.map((f) => (a[0] === f ? (f.atual = !0, f.scroll = !0, h()) : (f.atual = !1, f.scroll = !1), {
434
- evento: f
435
- }));
430
+ emits: {
431
+ eventoClick: (e) => !0
432
+ },
433
+ setup(e, { emit: t }) {
434
+ const s = (v) => {
435
+ t("eventoClick", v);
436
+ }, o = S(e.eventosTimeline);
437
+ let n = S(o);
438
+ function d() {
439
+ const v = y(o);
440
+ o.forEach((h) => {
441
+ const g = v.length > 0 && v[0] === h;
442
+ h.atual = g, h.scroll = g;
443
+ }), I();
436
444
  }
437
- const c = () => {
438
- setInterval(i, 6e4);
439
- }, p = (a, f) => {
440
- const g = a.getDay() === f.getDay(), q = a.getMonth() === f.getMonth(), C = a.getFullYear() === f.getFullYear();
441
- return g && q && C;
442
- }, r = (a) => {
443
- if (a) {
444
- const f = Date.now();
445
- let g = null, q = [];
446
- for (const C of a) {
447
- const D = C.data.getTime();
448
- if (C.status === "planejado" || C.status === "atrasado") {
449
- const I = Math.abs(f - C.data.getTime());
450
- if (g === null || I < g && D <= f)
451
- g = I, q.length = 0;
452
- else if (I > g)
445
+ const r = () => {
446
+ setInterval(d, 6e4);
447
+ }, f = (v, h) => {
448
+ const g = v.getDay() === h.getDay(), T = v.getMonth() === h.getMonth(), k = v.getFullYear() === h.getFullYear();
449
+ return g && T && k;
450
+ }, y = (v) => {
451
+ if (v) {
452
+ const h = Date.now();
453
+ let g = null, T = [];
454
+ for (const k of v) {
455
+ const P = k.data.getTime();
456
+ if (k.status === "planejado" || k.status === "atrasado") {
457
+ const A = Math.abs(h - k.data.getTime());
458
+ if (g === null || A < g && P <= h)
459
+ g = A, T.length = 0;
460
+ else if (A > g)
453
461
  continue;
454
- q.push(C);
462
+ T.push(k);
455
463
  }
456
464
  }
457
- return q;
465
+ return T;
458
466
  } else
459
467
  return [];
460
- }, $ = b(() => {
461
- c();
462
- const a = n.sort(
463
- (f, g) => f.data.getTime() - g.data.getTime()
464
- );
465
- if (a) {
466
- let f = [], g = null, q = 0, C;
467
- for (const D of a) {
468
- const I = /* @__PURE__ */ new Date(), O = D.data;
469
- C = D.status;
470
- const K = D.tolerancia * 60 * 1e3;
471
- C === "planejado" && O.getTime() + K < I.getTime() && (D.status = "atrasado"), (!g || !p(g, O)) && (g = O, f.push({
468
+ }, $ = E(() => {
469
+ r();
470
+ const v = n.sort((h, g) => h.data.getTime() - g.data.getTime());
471
+ if (v) {
472
+ let h = [], g = null, T = 0, k;
473
+ for (const P of v) {
474
+ const A = /* @__PURE__ */ new Date(), j = P.data;
475
+ k = P.status;
476
+ const U = P.tolerancia * 60 * 1e3;
477
+ k === "planejado" && j.getTime() + U < A.getTime() && (P.status = "atrasado"), (!g || !f(g, j)) && (g = j, h.push({
472
478
  tipo: "dia",
473
- valor: D.data,
474
- key: ++q
475
- })), f.push({
479
+ valor: P.data,
480
+ key: ++T
481
+ })), h.push({
476
482
  tipo: "evento",
477
- valor: D,
478
- key: ++q
483
+ valor: P,
484
+ key: ++T
479
485
  });
480
486
  }
481
- return f;
487
+ return h;
482
488
  } else
483
489
  return [];
484
- }), h = () => {
485
- const a = document.querySelector(".atual");
486
- a == null || a.scrollIntoView({
490
+ }), I = () => {
491
+ const v = document.querySelector(".atual");
492
+ !v || !v.scrollIntoView || v.scrollIntoView({
487
493
  behavior: "smooth",
488
494
  block: "center"
489
495
  });
490
496
  };
491
- return i(), {
497
+ return d(), {
492
498
  eventosPorTipo: $,
493
- scrollParaItemAtual: h
494
- // clicar,
499
+ scrollParaItemAtual: I,
500
+ emitirEventoClick: s
495
501
  };
496
502
  },
497
503
  mounted() {
498
504
  this.scrollParaItemAtual();
499
505
  }
500
506
  });
501
- const Ke = { class: "areaTimeline" }, Qe = { class: "timeline" };
502
- function Ue(e, t, n, i, c, p) {
503
- const r = d("PerfilTimeline"), $ = d("SeparadorPeriodo"), h = d("EventoTimeline");
504
- return o(), s("div", Ke, [
505
- e.perfilTimeline ? (o(), y(r, {
507
+ const Qe = { class: "areaTimeline" }, Ue = { class: "timeline" };
508
+ function We(e, t, s, o, n, d) {
509
+ const r = l("PerfilTimeline"), f = l("SeparadorPeriodo"), y = l("EventoTimeline");
510
+ return a(), i("div", Qe, [
511
+ e.perfilTimeline ? (a(), C(r, {
506
512
  key: 0,
507
513
  nomePerfil: e.perfilTimeline.nome,
508
514
  imagemPerfil: e.perfilTimeline.imagem,
509
- iconePerfil: e.perfilTimeline.icone
510
- }, null, 8, ["nomePerfil", "imagemPerfil", "iconePerfil"])) : E("", !0),
511
- u("section", Qe, [
512
- (o(!0), s(M, null, N(e.eventosPorTipo, (a) => (o(), s("div", {
513
- key: a.key
515
+ iconePerfil: e.perfilTimeline.icone,
516
+ "data-testid": "perfilTimeline"
517
+ }, null, 8, ["nomePerfil", "imagemPerfil", "iconePerfil"])) : b("", !0),
518
+ u("section", Ue, [
519
+ (a(!0), i(V, null, F(e.eventosPorTipo, ($, I) => (a(), i("div", {
520
+ key: $.key
514
521
  }, [
515
- a.tipo === "dia" ? (o(), y($, {
522
+ $.tipo === "dia" ? (a(), C(f, {
516
523
  key: 0,
517
- dataSeparador: a.valor
518
- }, null, 8, ["dataSeparador"])) : E("", !0),
519
- a.tipo === "evento" ? (o(), y(h, {
524
+ dataSeparador: $.valor,
525
+ "data-testid": `evento-timeline-${I}`
526
+ }, null, 8, ["dataSeparador", "data-testid"])) : b("", !0),
527
+ $.tipo === "evento" ? (a(), C(y, {
520
528
  key: 1,
521
- status: a.valor.status,
522
- criticidade: a.valor.criticidade,
523
- previsto: a.valor.previsto,
524
- realizado: a.valor.realizado,
525
- categoria: a.valor.categoria,
526
- titulo: a.valor.titulo,
527
- subtitulo: a.valor.subtitulo,
528
- destaque: a.valor.destaque,
529
- ehAtual: a.valor.atual,
530
- aoClicar: () => {
531
- a && a.valor && a.valor.aoClicar && a.valor.aoClicar(a.valor);
532
- }
533
- }, null, 8, ["status", "criticidade", "previsto", "realizado", "categoria", "titulo", "subtitulo", "destaque", "ehAtual", "aoClicar"])) : E("", !0)
529
+ status: $.valor.status,
530
+ criticidade: $.valor.criticidade,
531
+ previstoPara: $.valor.previstoPara,
532
+ "realizado-em": $.valor.realizado,
533
+ categoria: $.valor.categoria,
534
+ titulo: $.valor.titulo,
535
+ subtitulo: $.valor.subtitulo,
536
+ "texto-destaque": $.valor.destaque,
537
+ ehAtual: $.valor.atual,
538
+ onClick: (v) => e.emitirEventoClick($.valor),
539
+ "data-testid": `evento-timeline-${I}`
540
+ }, null, 8, ["status", "criticidade", "previstoPara", "realizado-em", "categoria", "titulo", "subtitulo", "texto-destaque", "ehAtual", "onClick", "data-testid"])) : b("", !0)
534
541
  ]))), 128))
535
542
  ])
536
543
  ]);
537
544
  }
538
- const We = /* @__PURE__ */ m(Ge, [["render", Ue]]), Xe = v({
545
+ const Xe = /* @__PURE__ */ m(Ke, [["render", We]]), Ze = p({
539
546
  name: "Botao",
540
547
  props: {
541
548
  titulo: {
542
- type: String
549
+ type: String,
550
+ default: ""
543
551
  },
544
552
  icone: {
545
553
  type: String
546
554
  },
547
555
  aparencia: {
548
- type: String
556
+ type: String,
557
+ default: "outline"
549
558
  },
550
559
  tamanho: {
551
- type: String
552
- },
553
- aoClicar: {
554
- required: !1,
555
- type: Function
560
+ type: String,
561
+ default: "medio"
556
562
  }
557
563
  },
558
- setup(e) {
559
- return e = S(e), {
560
- classes: b(() => ({
561
- [`${e.aparencia || "outline"}`]: !0,
562
- [`${e.tamanho || "medio"}`]: !0
563
- }))
564
+ emits: {
565
+ click: (e) => !0
566
+ },
567
+ setup(e, { emit: t }) {
568
+ e = S(e);
569
+ const s = (n) => {
570
+ t("click", n);
571
+ }, o = E(() => ({
572
+ [`${e.aparencia}`]: !0,
573
+ [`${e.tamanho}`]: !0
574
+ }));
575
+ return {
576
+ handleClick: s,
577
+ classes: o
564
578
  };
565
579
  }
566
580
  });
567
- const Ze = ["onclick"], xe = {
581
+ const xe = {
568
582
  key: 0,
569
583
  class: "material-symbols-outlined"
570
584
  };
571
- function eo(e, t, n, i, c, p) {
572
- return o(), s("button", {
573
- class: T(["btn", e.classes]),
574
- onclick: e.aoClicar
585
+ function et(e, t, s, o, n, d) {
586
+ return a(), i("button", {
587
+ class: "btn",
588
+ "data-testid": "botao",
589
+ onClick: t[0] || (t[0] = (...r) => e.handleClick && e.handleClick(...r))
575
590
  }, [
576
- z(e.$slots, "default", {}, () => [
577
- e.icone ? (o(), s("span", xe, l(e.icone), 1)) : E("", !0),
578
- A(" " + l(e.titulo), 1)
591
+ B(e.$slots, "default", {}, () => [
592
+ e.icone ? (a(), i("span", xe, c(e.icone), 1)) : b("", !0),
593
+ R(" " + c(e.titulo), 1)
579
594
  ], !0)
580
- ], 10, Ze);
595
+ ]);
581
596
  }
582
- const B = /* @__PURE__ */ m(Xe, [["render", eo], ["__scopeId", "data-v-e91d41fc"]]), oo = v({
583
- components: { Botao: B, PerfilTimeline: Y, IconeCategoria: w, Hora: L },
597
+ const O = /* @__PURE__ */ m(Ze, [["render", et], ["__scopeId", "data-v-ce25287c"]]), tt = p({
598
+ components: { Botao: O, PerfilTimeline: K, IconeCategoria: L, Hora: Y },
584
599
  name: "CabecalhoEventoDetalhado",
585
600
  props: {
586
- perfilEvento: {
601
+ perfil: {
587
602
  required: !0,
588
603
  type: Object
589
604
  },
590
- dadosEvento: {
605
+ evento: {
591
606
  required: !0,
592
607
  type: Object
593
- },
594
- aoClicar: {
595
- required: !1,
596
- type: Function
597
608
  }
598
609
  },
599
610
  setup(e) {
600
611
  return {};
601
612
  }
602
613
  });
603
- const G = (e) => (H("data-v-e8d44815"), e = e(), R(), e), to = {
614
+ const Q = (e) => (M("data-v-aa43d357"), e = e(), w(), e), at = {
604
615
  key: 1,
605
616
  class: "criticidade"
606
- }, ao = { class: "titulo" }, no = { class: "dataHora" }, so = ["onclick"], ro = /* @__PURE__ */ G(() => /* @__PURE__ */ u("span", { class: "material-symbols-outlined" }, " calendar_month ", -1)), io = { class: "horaEvento" }, co = {
617
+ }, ot = { class: "titulo" }, nt = { class: "dataHora" }, st = { class: "box" }, it = /* @__PURE__ */ Q(() => /* @__PURE__ */ u("span", { class: "material-symbols-outlined" }, " calendar_month ", -1)), rt = { class: "horaEvento" }, ct = {
607
618
  key: 0,
608
619
  class: "horaRealizada texto-grande"
609
- }, lo = {
620
+ }, lt = {
610
621
  key: 1,
611
622
  class: "horaPlanejada texto-pequeno"
612
- }, uo = {
623
+ }, dt = {
613
624
  key: 2,
614
625
  class: "horaRealizada texto-grande"
615
- }, _o = ["onclick"], po = /* @__PURE__ */ G(() => /* @__PURE__ */ u("span", { class: "material-symbols-outlined" }, " schedule ", -1)), vo = { class: "horaEvento" };
616
- function mo(e, t, n, i, c, p) {
617
- const r = d("PerfilTimeline"), $ = d("IconeCategoria"), h = d("Hora");
618
- return o(), s("section", {
619
- class: T(["cabecalho-evento", ["criticidade-" + e.dadosEvento.criticidade]])
626
+ }, ut = { class: "box" }, _t = /* @__PURE__ */ Q(() => /* @__PURE__ */ u("span", { class: "material-symbols-outlined" }, " schedule ", -1)), pt = { class: "horaEvento" };
627
+ function mt(e, t, s, o, n, d) {
628
+ const r = l("PerfilTimeline"), f = l("IconeCategoria"), y = l("Hora");
629
+ return a(), i("section", {
630
+ class: q(["cabecalho-evento", ["criticidade-" + e.evento.criticidade]])
620
631
  }, [
621
- e.perfilEvento ? (o(), y(r, {
632
+ e.perfil ? (a(), C(r, {
622
633
  key: 0,
623
- nomePerfil: e.perfilEvento.nome,
624
- imagemPerfil: e.perfilEvento.imagem,
625
- iconePerfil: e.perfilEvento.icone,
634
+ nomePerfil: e.perfil.nome,
635
+ imagemPerfil: e.perfil.imagem,
636
+ iconePerfil: e.perfil.icone,
626
637
  formatoReduzido: !0
627
- }, null, 8, ["nomePerfil", "imagemPerfil", "iconePerfil"])) : E("", !0),
628
- e.dadosEvento.criticidade !== "baixa" ? (o(), s("div", to, " Criticidade: " + l(e.dadosEvento.criticidade), 1)) : E("", !0),
629
- u("div", ao, [
630
- _($, {
631
- iconeCategoria: e.dadosEvento.categoria.icone,
632
- categoria: e.dadosEvento.categoria.nome
638
+ }, null, 8, ["nomePerfil", "imagemPerfil", "iconePerfil"])) : b("", !0),
639
+ e.evento.criticidade !== "baixa" ? (a(), i("div", at, " Criticidade: " + c(e.evento.criticidade), 1)) : b("", !0),
640
+ u("div", ot, [
641
+ _(f, {
642
+ iconeCategoria: e.evento.categoria.icone,
643
+ categoria: e.evento.categoria.nome
633
644
  }, null, 8, ["iconeCategoria", "categoria"]),
634
- u("h1", null, l(e.dadosEvento.titulo), 1)
645
+ u("h1", null, c(e.evento.titulo), 1)
635
646
  ]),
636
- u("div", no, [
637
- u("div", {
638
- onclick: e.aoClicar,
639
- class: "box"
640
- }, [
641
- ro,
642
- u("div", io, [
643
- e.dadosEvento.realizado ? (o(), s("div", co, l(e.dadosEvento.realizado.toLocaleDateString()), 1)) : E("", !0),
644
- e.dadosEvento.realizado ? (o(), s("div", lo, l(e.dadosEvento.realizado.toLocaleDateString()), 1)) : (o(), s("div", uo, l(e.dadosEvento.previsto.toLocaleDateString()), 1))
647
+ u("div", nt, [
648
+ u("div", st, [
649
+ it,
650
+ u("div", rt, [
651
+ e.evento.realizado ? (a(), i("div", ct, c(e.evento.realizado.toLocaleDateString()), 1)) : b("", !0),
652
+ e.evento.realizado ? (a(), i("div", lt, c(e.evento.realizado.toLocaleDateString()), 1)) : (a(), i("div", dt, c(e.evento.previstoPara.toLocaleDateString()), 1))
645
653
  ])
646
- ], 8, so),
647
- u("div", {
648
- onclick: e.aoClicar,
649
- class: "box"
650
- }, [
651
- po,
652
- u("div", vo, [
653
- e.dadosEvento.realizado ? (o(), y(h, {
654
+ ]),
655
+ u("div", ut, [
656
+ _t,
657
+ u("div", pt, [
658
+ e.evento.realizado ? (a(), C(y, {
654
659
  key: 0,
655
660
  class: "horaRealizada texto-grande",
656
- hora: e.dadosEvento.realizado
657
- }, null, 8, ["hora"])) : E("", !0),
658
- e.dadosEvento.realizado ? (o(), y(h, {
661
+ hora: e.evento.realizado
662
+ }, null, 8, ["hora"])) : b("", !0),
663
+ e.evento.realizado ? (a(), C(y, {
659
664
  key: 1,
660
665
  class: "horaPlanejada texto-pequeno",
661
- hora: e.dadosEvento.previsto
662
- }, null, 8, ["hora"])) : (o(), y(h, {
666
+ hora: e.evento.previstoPara
667
+ }, null, 8, ["hora"])) : (a(), C(y, {
663
668
  key: 2,
664
669
  class: "horaRealizada texto-grande",
665
- hora: e.dadosEvento.previsto
670
+ hora: e.evento.previstoPara
666
671
  }, null, 8, ["hora"]))
667
672
  ])
668
- ], 8, _o)
673
+ ])
669
674
  ])
670
675
  ], 2);
671
676
  }
672
- const fo = /* @__PURE__ */ m(oo, [["render", mo], ["__scopeId", "data-v-e8d44815"]]), $o = v({
673
- components: { Botao: B },
677
+ const vt = /* @__PURE__ */ m(tt, [["render", mt], ["__scopeId", "data-v-aa43d357"]]), ft = p({
678
+ components: { Botao: O },
674
679
  name: "Observacoes",
675
680
  props: {
676
681
  tituloBotao: {
677
682
  type: String
678
683
  },
679
- aoClicar: {
680
- required: !1,
681
- type: Function
682
- },
683
684
  observacoes: {
684
685
  required: !0,
685
686
  type: Object
686
687
  }
687
688
  },
688
- setup(e) {
689
- return e.observacoes.sort(
690
- (t, n) => n.criadaEm.getTime() - t.criadaEm.getTime()
691
- ), e = S(e), {};
689
+ emits: {
690
+ adicionarClick: (e) => !0
691
+ },
692
+ setup(e, { emit: t }) {
693
+ const s = (o) => {
694
+ t("adicionarClick", o);
695
+ };
696
+ return e.observacoes.sort((o, n) => n.criadaEm.getTime() - o.criadaEm.getTime()), e = S(e), { emitirAdicionarClick: s };
692
697
  }
693
698
  });
694
- const ho = (e) => (H("data-v-e90a0cb4"), e = e(), R(), e), go = { class: "box box-observacoes" }, yo = /* @__PURE__ */ ho(() => /* @__PURE__ */ u("h3", null, "Observações:", -1)), bo = { class: "lista-obs" }, Eo = { class: "texto" }, So = { class: "autor" };
695
- function Co(e, t, n, i, c, p) {
696
- const r = d("Botao");
697
- return o(), s("section", go, [
698
- yo,
699
- u("ul", bo, [
700
- (o(!0), s(M, null, N(e.observacoes, ($, h) => (o(), s("li", {
701
- key: h,
699
+ const $t = (e) => (M("data-v-2fd919a9"), e = e(), w(), e), ht = { class: "box box-observacoes" }, gt = /* @__PURE__ */ $t(() => /* @__PURE__ */ u("h3", null, "Observações:", -1)), yt = { class: "lista-obs" }, Ct = ["data-testid"], bt = { class: "texto" }, kt = { class: "autor" };
700
+ function St(e, t, s, o, n, d) {
701
+ const r = l("Botao");
702
+ return a(), i("section", ht, [
703
+ gt,
704
+ u("ul", yt, [
705
+ (a(!0), i(V, null, F(e.observacoes, (f, y) => (a(), i("li", {
706
+ "data-testid": `observacao-${y}`,
707
+ key: y,
702
708
  class: "lista-item"
703
709
  }, [
704
- u("p", Eo, l($.mensagem), 1),
705
- u("div", So, l($.autor.nome) + " em " + l($.criadaEm.toLocaleDateString()) + " às " + l($.criadaEm.getHours()) + ":" + l($.criadaEm.getMinutes().toString().padStart(2, "0")), 1)
706
- ]))), 128))
710
+ u("p", bt, c(f.mensagem), 1),
711
+ u("div", kt, c(f.autor.nome) + " em " + c(f.criadaEm.toLocaleDateString()) + " às " + c(f.criadaEm.getHours()) + ":" + c(f.criadaEm.getMinutes().toString().padStart(2, "0")), 1)
712
+ ], 8, Ct))), 128))
707
713
  ]),
708
714
  _(r, {
709
715
  titulo: e.tituloBotao,
710
- aoClicar: e.aoClicar,
716
+ "data-testid": "botao-adicionar",
711
717
  icone: "add",
712
718
  aparencia: "preenchido",
713
- tamanho: "pequeno"
714
- }, null, 8, ["titulo", "aoClicar"])
719
+ tamanho: "pequeno",
720
+ onClick: e.emitirAdicionarClick
721
+ }, null, 8, ["titulo", "onClick"])
715
722
  ]);
716
723
  }
717
- const To = /* @__PURE__ */ m($o, [["render", Co], ["__scopeId", "data-v-e90a0cb4"]]), qo = v({
718
- components: { Botao: B, IconeStatus: V },
724
+ const Et = /* @__PURE__ */ m(ft, [["render", St], ["__scopeId", "data-v-2fd919a9"]]), Tt = p({
725
+ components: { Botao: O, IconeStatus: J },
719
726
  name: "BotaoStatus",
720
727
  props: {
721
728
  aparencia: {
722
729
  type: String
723
730
  },
724
731
  status: {
725
- required: !0,
726
- type: String
727
- },
728
- aoClicar: {
729
- required: !1,
730
- type: Function
732
+ type: String,
733
+ default: "planejado"
731
734
  }
732
735
  },
733
- setup(e) {
734
- return e = S(e), {
735
- classes: b(() => ({
736
- [`${e.status || "planejado"}`]: !0
737
- }))
736
+ emits: {
737
+ click: (e) => !0
738
+ },
739
+ setup(e, { emit: t }) {
740
+ e = S(e);
741
+ const s = E(() => ({
742
+ [`${e.status}`]: !0
743
+ }));
744
+ return {
745
+ emitirClick: (n) => {
746
+ t("click", n);
747
+ },
748
+ classes: s
738
749
  };
739
750
  }
740
751
  });
741
- function Do(e, t, n, i, c, p) {
742
- const r = d("IconeStatus"), $ = d("Botao");
743
- return o(), y($, {
752
+ function Pt(e, t, s, o, n, d) {
753
+ const r = l("IconeStatus"), f = l("Botao");
754
+ return a(), C(f, {
744
755
  aparencia: e.aparencia,
745
- class: T(e.classes),
746
- aoClicar: e.aoClicar
756
+ class: q(e.classes),
757
+ onClick: e.emitirClick
747
758
  }, {
748
- default: P(() => [
759
+ default: D(() => [
749
760
  _(r, {
750
761
  class: "icone",
751
762
  status: e.status
752
763
  }, null, 8, ["status"]),
753
- A(" " + l(e.status), 1)
764
+ R(" " + c(e.status), 1)
754
765
  ]),
755
766
  _: 1
756
- }, 8, ["aparencia", "class", "aoClicar"]);
767
+ }, 8, ["aparencia", "class", "onClick"]);
757
768
  }
758
- const Po = /* @__PURE__ */ m(qo, [["render", Do], ["__scopeId", "data-v-dc6d6557"]]), ko = v({
759
- components: { BotaoStatus: Po },
769
+ const Dt = /* @__PURE__ */ m(Tt, [["render", Pt], ["__scopeId", "data-v-3eb00cbd"]]), qt = p({
770
+ components: { BotaoStatus: Dt },
760
771
  name: "StatusEvento",
761
772
  props: {
762
773
  aparencia: {
@@ -765,221 +776,259 @@ const Po = /* @__PURE__ */ m(qo, [["render", Do], ["__scopeId", "data-v-dc6d6557
765
776
  status: {
766
777
  required: !0,
767
778
  type: String
768
- },
769
- aoClicar: {
770
- required: !1,
771
- type: Function
772
779
  }
773
780
  },
774
- setup(e) {
775
- return e = S(e), {};
781
+ emits: {
782
+ editarClick: (e) => !0
783
+ },
784
+ setup(e, { emit: t }) {
785
+ const s = (o) => {
786
+ t("editarClick", o);
787
+ };
788
+ return e = S(e), {
789
+ handleEditarClick: s
790
+ };
776
791
  }
777
792
  });
778
- const Io = (e) => (H("data-v-69bc6463"), e = e(), R(), e), zo = { class: "box box-status" }, Bo = /* @__PURE__ */ Io(() => /* @__PURE__ */ u("h3", null, "Status:", -1));
779
- function Oo(e, t, n, i, c, p) {
780
- const r = d("BotaoStatus");
781
- return o(), s("section", zo, [
782
- Bo,
793
+ const It = (e) => (M("data-v-c7bc7440"), e = e(), w(), e), zt = { class: "box box-status" }, At = /* @__PURE__ */ It(() => /* @__PURE__ */ u("h3", null, "Status:", -1));
794
+ function Bt(e, t, s, o, n, d) {
795
+ const r = l("BotaoStatus");
796
+ return a(), i("section", zt, [
797
+ At,
783
798
  _(r, {
784
799
  aparencia: e.aparencia,
785
- aoClicar: e.aoClicar,
786
- status: e.status
787
- }, null, 8, ["aparencia", "aoClicar", "status"])
800
+ status: e.status,
801
+ "data-testid": "status-evento",
802
+ onClick: e.handleEditarClick
803
+ }, null, 8, ["aparencia", "status", "onClick"])
788
804
  ]);
789
805
  }
790
- const jo = /* @__PURE__ */ m(ko, [["render", Oo], ["__scopeId", "data-v-69bc6463"]]), Ao = v({
806
+ const Ot = /* @__PURE__ */ m(qt, [["render", Bt], ["__scopeId", "data-v-c7bc7440"]]), jt = p({
807
+ name: "EventoDetalhado",
791
808
  props: {
792
- perfilEvento: {
809
+ perfil: {
793
810
  required: !0,
794
811
  type: Object
795
812
  },
796
- dadosEvento: {
813
+ evento: {
797
814
  required: !0,
798
815
  type: Object
799
816
  }
800
817
  },
801
- components: { CabecalhoEventoDetalhado: fo, Observacoes: To, StatusEvento: jo },
802
- setup(e) {
803
- return {};
818
+ components: { CabecalhoEventoDetalhado: vt, Observacoes: Et, StatusEvento: Ot },
819
+ emits: {
820
+ statusEditarClick: (e) => !0,
821
+ observacaoAdicionarClick: (e) => !0
822
+ },
823
+ setup(e, { emit: t }) {
824
+ return {
825
+ handleEditarClick: (n) => {
826
+ t("statusEditarClick", n);
827
+ },
828
+ handleAdicionarObservacaoClick: (n) => {
829
+ t("observacaoAdicionarClick", n);
830
+ }
831
+ };
804
832
  }
805
833
  });
806
- const Ho = { class: "evento" }, Ro = { class: "descricao" };
807
- function Fo(e, t, n, i, c, p) {
808
- const r = d("CabecalhoEventoDetalhado"), $ = d("Observacoes"), h = d("StatusEvento");
809
- return o(), s("div", Ho, [
810
- _(k, {
834
+ const Ht = {
835
+ class: "evento",
836
+ "data-testid": "evento-detalhado"
837
+ }, Rt = { class: "descricao" };
838
+ function Mt(e, t, s, o, n, d) {
839
+ const r = l("CabecalhoEventoDetalhado"), f = l("Observacoes"), y = l("StatusEvento");
840
+ return a(), i("div", Ht, [
841
+ _(z, {
811
842
  name: "fadeBaixo",
812
843
  mode: "out-in",
813
844
  appear: ""
814
845
  }, {
815
- default: P(() => [
846
+ default: D(() => [
816
847
  _(r, {
817
- perfilEvento: e.perfilEvento,
818
- dadosEvento: e.dadosEvento,
819
- aoClicar: e.dadosEvento.aoClicar
820
- }, null, 8, ["perfilEvento", "dadosEvento", "aoClicar"])
848
+ perfil: e.perfil,
849
+ evento: e.evento
850
+ }, null, 8, ["perfil", "evento"])
821
851
  ]),
822
852
  _: 1
823
853
  }),
824
- _(k, {
854
+ _(z, {
825
855
  name: "fadeBaixo",
826
856
  mode: "out-in",
827
857
  appear: ""
828
858
  }, {
829
- default: P(() => [
830
- u("section", Ro, [
831
- z(e.$slots, "descricao", {}, () => [
832
- A(l(e.dadosEvento.subtitulo), 1)
859
+ default: D(() => [
860
+ u("section", Rt, [
861
+ B(e.$slots, "descricao", {}, () => [
862
+ R(c(e.evento.subtitulo), 1)
833
863
  ])
834
864
  ])
835
865
  ]),
836
866
  _: 3
837
867
  }),
838
- _(k, {
868
+ _(z, {
839
869
  name: "fadeBaixo",
840
870
  mode: "out-in",
841
871
  appear: ""
842
872
  }, {
843
- default: P(() => [
844
- _($, {
845
- observacoes: e.dadosEvento.observacoes,
873
+ default: D(() => [
874
+ _(f, {
875
+ observacoes: e.evento.observacoes,
846
876
  tituloBotao: "Inserir observação",
847
- aoClicar: e.dadosEvento.aoClicar
848
- }, null, 8, ["observacoes", "aoClicar"])
877
+ onAdicionarClick: e.handleAdicionarObservacaoClick
878
+ }, null, 8, ["observacoes", "onAdicionarClick"])
849
879
  ]),
850
880
  _: 1
851
881
  }),
852
- _(k, {
882
+ _(z, {
853
883
  name: "fadeBaixo",
854
884
  mode: "out-in",
855
885
  appear: ""
856
886
  }, {
857
- default: P(() => [
858
- _(h, {
887
+ default: D(() => [
888
+ _(y, {
859
889
  aparencia: "preenchido",
860
- aoClicar: e.dadosEvento.aoClicar,
861
- status: e.dadosEvento.status
862
- }, null, 8, ["aoClicar", "status"])
890
+ status: e.evento.status,
891
+ onEditarClick: e.handleEditarClick
892
+ }, null, 8, ["status", "onEditarClick"])
863
893
  ]),
864
894
  _: 1
865
895
  })
866
896
  ]);
867
897
  }
868
- const Mo = /* @__PURE__ */ m(Ao, [["render", Fo]]), No = v({
869
- components: { Botao: B },
898
+ const wt = /* @__PURE__ */ m(jt, [["render", Mt]]), Nt = p({
870
899
  name: "AreaSalvamento",
871
- props: {
872
- aoClicar: {
873
- required: !1,
874
- type: Function
875
- }
900
+ components: { Botao: O },
901
+ emits: {
902
+ salvarClick: (e) => !0,
903
+ cancelarClick: (e) => !0
876
904
  },
877
- setup(e) {
878
- return {};
905
+ setup(e, { emit: t }) {
906
+ return {
907
+ emitirSalvarClick: (n) => {
908
+ t("salvarClick", n);
909
+ },
910
+ emitirCancelarClick: (n) => {
911
+ t("cancelarClick", n);
912
+ }
913
+ };
879
914
  }
880
915
  });
881
- const wo = { class: "area-salvamento" };
882
- function Vo(e, t, n, i, c, p) {
883
- const r = d("Botao");
884
- return o(), s("section", wo, [
885
- z(e.$slots, "default", {}, void 0, !0),
916
+ const Vt = {
917
+ class: "area-salvamento",
918
+ "data-testid": "area-salvamento"
919
+ };
920
+ function Ft(e, t, s, o, n, d) {
921
+ const r = l("Botao");
922
+ return a(), i("section", Vt, [
923
+ B(e.$slots, "default", {}, void 0, !0),
886
924
  _(r, {
925
+ "data-testid": "botao-salvar",
887
926
  aparencia: "preenchido",
888
927
  titulo: "Salvar",
889
928
  tamanho: "grande",
890
- aoClicar: e.aoClicar
891
- }, null, 8, ["aoClicar"]),
929
+ onClick: e.emitirSalvarClick
930
+ }, null, 8, ["onClick"]),
892
931
  _(r, {
932
+ "data-testid": "botao-cancelar",
893
933
  aparencia: "vazio",
894
934
  titulo: "Cancelar",
895
935
  tamanho: "pequeno",
896
- aoClicar: e.aoClicar
897
- }, null, 8, ["aoClicar"])
936
+ onClick: e.emitirCancelarClick
937
+ }, null, 8, ["onClick"])
898
938
  ]);
899
939
  }
900
- const Lo = /* @__PURE__ */ m(No, [["render", Vo], ["__scopeId", "data-v-5dd5054f"]]), Jo = v({
940
+ const Lt = /* @__PURE__ */ m(Nt, [["render", Ft], ["__scopeId", "data-v-a1900faf"]]), Jt = p({
901
941
  props: {
902
- aoClicar: {
903
- required: !1,
904
- type: Function
905
- },
906
942
  salvarVisivel: {
907
943
  type: Boolean
908
944
  }
909
945
  },
910
- components: { AreaSalvamento: Lo },
911
- setup(e) {
912
- return e = S(e), {
913
- classes: b(() => ({
914
- visivel: e.salvarVisivel,
915
- invisivel: !e.salvarVisivel
916
- }))
946
+ components: { AreaSalvamento: Lt },
947
+ emits: {
948
+ salvarClick: (e) => !0,
949
+ cancelarClick: (e) => !0
950
+ },
951
+ setup(e, { emit: t }) {
952
+ return {
953
+ emitirSalvarClick: (n) => {
954
+ t("salvarClick", n);
955
+ },
956
+ emitirCancelarClick: (n) => {
957
+ t("cancelarClick", n);
958
+ }
959
+ // classes: computed(() => ({
960
+ // visivel: props.salvarVisivel,
961
+ // invisivel: !props.salvarVisivel,
962
+ // })),
917
963
  };
918
964
  }
919
965
  });
920
- const Yo = { class: "editar-evento" }, Go = { class: "area-conteudo" }, Ko = { class: "salvar" };
921
- function Qo(e, t, n, i, c, p) {
922
- const r = d("AreaSalvamento");
923
- return o(), s("div", Yo, [
924
- _(k, {
966
+ const Yt = {
967
+ class: "editar-evento",
968
+ "data-testid": "editar-evento"
969
+ }, Gt = { class: "area-conteudo" }, Kt = { class: "salvar" };
970
+ function Qt(e, t, s, o, n, d) {
971
+ const r = l("AreaSalvamento");
972
+ return a(), i("div", Yt, [
973
+ _(z, {
925
974
  name: "fadeTopo",
926
975
  mode: "out-in",
927
976
  appear: ""
928
977
  }, {
929
- default: P(() => [
930
- u("div", Go, [
931
- z(e.$slots, "conteudo")
978
+ default: D(() => [
979
+ u("div", Gt, [
980
+ B(e.$slots, "conteudo")
932
981
  ])
933
982
  ]),
934
983
  _: 3
935
984
  }),
936
- _(k, {
985
+ _(z, {
937
986
  name: "fadeBaixo",
938
987
  mode: "out-in",
939
988
  appear: ""
940
989
  }, {
941
- default: P(() => [
942
- u("div", Ko, [
990
+ default: D(() => [
991
+ u("div", Kt, [
943
992
  _(r, {
944
- aoClicar: e.aoClicar,
945
- class: T(e.classes)
993
+ onSalvarClick: e.emitirSalvarClick,
994
+ onCancelarClick: e.emitirCancelarClick
946
995
  }, {
947
- default: P(() => [
948
- z(e.$slots, "salvamento")
996
+ default: D(() => [
997
+ B(e.$slots, "salvamento")
949
998
  ]),
950
999
  _: 3
951
- }, 8, ["aoClicar", "class"])
1000
+ }, 8, ["onSalvarClick", "onCancelarClick"])
952
1001
  ])
953
1002
  ]),
954
1003
  _: 3
955
1004
  })
956
1005
  ]);
957
1006
  }
958
- const Uo = /* @__PURE__ */ m(Jo, [["render", Qo]]), Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1007
+ const Ut = /* @__PURE__ */ m(Jt, [["render", Qt]]), Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
959
1008
  __proto__: null
960
- }, Symbol.toStringTag, { value: "Module" })), Xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1009
+ }, Symbol.toStringTag, { value: "Module" })), Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
961
1010
  __proto__: null
962
- }, Symbol.toStringTag, { value: "Module" })), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1011
+ }, Symbol.toStringTag, { value: "Module" })), N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
963
1012
  __proto__: null,
964
- EditarEvento: Uo,
965
- EventoDetalhado: Mo,
966
- EventoTimeline: J,
967
- Timeline: We,
968
- Tipos: Wo,
969
- TiposDetalhado: Xo
1013
+ EditarEvento: Ut,
1014
+ EventoDetalhado: wt,
1015
+ EventoTimeline: G,
1016
+ Timeline: Xe,
1017
+ Tipos: Wt,
1018
+ TiposDetalhado: Xt
970
1019
  }, Symbol.toStringTag, { value: "Module" }));
971
- const xo = {
1020
+ const xt = {
972
1021
  install(e, ...t) {
973
- for (const n in F)
974
- e.component(n, F[n]);
1022
+ for (const s in N)
1023
+ e.component(s, N[s]);
975
1024
  }
976
1025
  };
977
1026
  export {
978
- Uo as EditarEvento,
979
- Mo as EventoDetalhado,
980
- J as EventoTimeline,
981
- We as Timeline,
982
- Wo as Tipos,
983
- Xo as TiposDetalhado,
984
- xo as default
1027
+ Ut as EditarEvento,
1028
+ wt as EventoDetalhado,
1029
+ G as EventoTimeline,
1030
+ Xe as Timeline,
1031
+ Wt as Tipos,
1032
+ Xt as TiposDetalhado,
1033
+ xt as default
985
1034
  };