@devix-tecnologia/timeline-vue 1.2.0 → 1.3.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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as d, reactive as P, computed as g, openBlock as a, createElementBlock as i, createElementVNode as T, normalizeClass as C, normalizeStyle as I, toDisplayString as v, resolveComponent as p, createVNode as h, createBlock as S, createCommentVNode as q, ref as B, Fragment as j, renderList as M } from "vue";
2
- const O = d({
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 O, 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 j, pushScopeId as H, popScopeId as R, withCtx as k, Transition as D } from "vue";
2
+ const U = v({
3
3
  name: "Icone Categoria",
4
4
  props: {
5
5
  iconeCategoria: {
@@ -24,37 +24,37 @@ const O = d({
24
24
  }
25
25
  },
26
26
  setup(e) {
27
- return e = P(e), {
28
- classes: g(() => ({
27
+ return e = S(e), {
28
+ classes: b(() => ({
29
29
  "bg-escuro": e.escuro,
30
30
  "bg-claro": !e.escuro,
31
31
  [`borda-${e.tipo || "padrao"}`]: !0
32
32
  })),
33
- style: g(() => ({
33
+ style: b(() => ({
34
34
  borderColor: e.borderColor,
35
35
  backgroundColor: e.backgroundColor
36
36
  }))
37
37
  };
38
38
  }
39
39
  });
40
- const _ = (e, o) => {
41
- const r = e.__vccOpts || e;
42
- for (const [s, l] of o)
43
- r[s] = l;
44
- return r;
45
- }, R = { class: "areaCategoria" }, N = ["alt"], F = { class: "material-symbols-outlined" };
46
- function w(e, o, r, s, l, c) {
47
- return a(), i("div", R, [
48
- T("div", {
49
- class: C(["iconeCategoria", e.classes]),
50
- style: I(e.style),
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, [
48
+ u("div", {
49
+ class: T(["iconeCategoria", e.classes]),
50
+ style: O(e.style),
51
51
  alt: e.categoria
52
52
  }, [
53
- T("span", F, v(e.iconeCategoria), 1)
54
- ], 14, N)
53
+ u("span", Z, l(e.iconeCategoria), 1)
54
+ ], 14, X)
55
55
  ]);
56
56
  }
57
- const V = /* @__PURE__ */ _(O, [["render", w], ["__scopeId", "data-v-f922d1fe"]]), J = d({
57
+ const w = /* @__PURE__ */ m(U, [["render", x], ["__scopeId", "data-v-f922d1fe"]]), ee = v({
58
58
  name: "Icone Status",
59
59
  props: {
60
60
  status: {
@@ -63,19 +63,19 @@ const V = /* @__PURE__ */ _(O, [["render", w], ["__scopeId", "data-v-f922d1fe"]]
63
63
  }
64
64
  },
65
65
  setup(e) {
66
- return e = P(e), {
67
- classes: g(() => ({
66
+ return e = S(e), {
67
+ classes: b(() => ({
68
68
  [`${e.status || "planejado"}`]: !0
69
69
  }))
70
70
  };
71
71
  }
72
72
  });
73
- function Y(e, o, r, s, l, c) {
74
- return a(), i("div", {
75
- class: C([e.classes, "iconeStatus"])
73
+ function oe(e, t, n, i, c, p) {
74
+ return o(), s("div", {
75
+ class: T([e.classes, "iconeStatus"])
76
76
  }, null, 2);
77
77
  }
78
- const L = /* @__PURE__ */ _(J, [["render", Y], ["__scopeId", "data-v-61335255"]]), G = d({
78
+ const V = /* @__PURE__ */ m(ee, [["render", oe], ["__scopeId", "data-v-61335255"]]), te = v({
79
79
  name: "Subtítulo Evento",
80
80
  props: {
81
81
  subtitulo: {
@@ -84,11 +84,11 @@ const L = /* @__PURE__ */ _(J, [["render", Y], ["__scopeId", "data-v-61335255"]]
84
84
  }
85
85
  }
86
86
  });
87
- const K = { class: "subtitulo" };
88
- function Q(e, o, r, s, l, c) {
89
- return a(), i("h4", K, v(e.subtitulo), 1);
87
+ const ae = { class: "subtitulo" };
88
+ function ne(e, t, n, i, c, p) {
89
+ return o(), s("h4", ae, l(e.subtitulo), 1);
90
90
  }
91
- const U = /* @__PURE__ */ _(G, [["render", Q], ["__scopeId", "data-v-5f7c5673"]]), W = d({
91
+ const se = /* @__PURE__ */ m(te, [["render", ne], ["__scopeId", "data-v-5f7c5673"]]), re = v({
92
92
  name: "Título Evento",
93
93
  props: {
94
94
  titulo: {
@@ -97,11 +97,11 @@ const U = /* @__PURE__ */ _(G, [["render", Q], ["__scopeId", "data-v-5f7c5673"]]
97
97
  }
98
98
  }
99
99
  });
100
- const X = { class: "titulo" };
101
- function Z(e, o, r, s, l, c) {
102
- return a(), i("h3", X, v(e.titulo), 1);
100
+ const ie = { class: "titulo" };
101
+ function ce(e, t, n, i, c, p) {
102
+ return o(), s("h3", ie, l(e.titulo), 1);
103
103
  }
104
- const x = /* @__PURE__ */ _(W, [["render", Z], ["__scopeId", "data-v-7369e837"]]), ee = d({
104
+ const le = /* @__PURE__ */ m(re, [["render", ce], ["__scopeId", "data-v-7369e837"]]), de = v({
105
105
  name: "Descrição Evento",
106
106
  props: {
107
107
  titulo: {
@@ -113,22 +113,22 @@ const x = /* @__PURE__ */ _(W, [["render", Z], ["__scopeId", "data-v-7369e837"]]
113
113
  type: String
114
114
  }
115
115
  },
116
- components: { TituloEvento: x, SubtituloEvento: U }
116
+ components: { TituloEvento: le, SubtituloEvento: se }
117
117
  });
118
- function te(e, o, r, s, l, c) {
119
- const u = p("TituloEvento"), b = p("SubtituloEvento");
120
- return a(), i("div", {
118
+ function ue(e, t, n, i, c, p) {
119
+ const r = d("TituloEvento"), $ = d("SubtituloEvento");
120
+ return o(), s("div", {
121
121
  class: "descricaoEvento",
122
- style: I(`${e.subtitulo ? "" : "padding-top: 3.3rem"}`)
122
+ style: O(`${e.subtitulo ? "" : "padding-top: 3.3rem"}`)
123
123
  }, [
124
- h(u, { titulo: e.titulo }, null, 8, ["titulo"]),
125
- e.subtitulo ? (a(), S(b, {
124
+ _(r, { titulo: e.titulo }, null, 8, ["titulo"]),
125
+ e.subtitulo ? (o(), y($, {
126
126
  key: 0,
127
127
  subtitulo: e.subtitulo
128
- }, null, 8, ["subtitulo"])) : q("", !0)
128
+ }, null, 8, ["subtitulo"])) : E("", !0)
129
129
  ], 4);
130
130
  }
131
- const oe = /* @__PURE__ */ _(ee, [["render", te], ["__scopeId", "data-v-171435d6"]]), ae = d({
131
+ const _e = /* @__PURE__ */ m(de, [["render", ue], ["__scopeId", "data-v-171435d6"]]), pe = v({
132
132
  name: "Hora",
133
133
  props: {
134
134
  hora: {
@@ -146,19 +146,19 @@ const oe = /* @__PURE__ */ _(ee, [["render", te], ["__scopeId", "data-v-171435d6
146
146
  components: {},
147
147
  setup(e) {
148
148
  return {
149
- horas: B(new Date(e.hora)),
150
- classes: g(() => ({
149
+ horas: Q(new Date(e.hora)),
150
+ classes: b(() => ({
151
151
  [`hora-${e.aparencia || ""}`]: !0
152
152
  }))
153
153
  };
154
154
  }
155
155
  });
156
- function re(e, o, r, s, l, c) {
157
- return a(), i("div", {
158
- class: C(["hora", e.classes])
159
- }, v(e.horas.getHours()) + ":" + v(e.horas.getMinutes().toString().padStart(2, "0")), 3);
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);
160
160
  }
161
- const ne = /* @__PURE__ */ _(ae, [["render", re], ["__scopeId", "data-v-dacdabdc"]]), se = d({
161
+ const L = /* @__PURE__ */ m(pe, [["render", ve], ["__scopeId", "data-v-dacdabdc"]]), me = v({
162
162
  name: "Hora Evento",
163
163
  props: {
164
164
  horaPrevista: {
@@ -170,27 +170,27 @@ const ne = /* @__PURE__ */ _(ae, [["render", re], ["__scopeId", "data-v-dacdabdc
170
170
  type: Date
171
171
  }
172
172
  },
173
- components: { Hora: ne }
173
+ components: { Hora: L }
174
174
  });
175
- const ie = { class: "areaHora" }, le = { class: "horaEvento" };
176
- function ce(e, o, r, s, l, c) {
177
- const u = p("Hora");
178
- return a(), i("div", ie, [
179
- T("div", le, [
180
- e.horaRealizada ? (a(), S(u, {
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, {
181
181
  key: 0,
182
182
  hora: e.horaRealizada,
183
183
  style: { "padding-top": "0.3rem" }
184
- }, null, 8, ["hora"])) : q("", !0),
185
- h(u, {
184
+ }, null, 8, ["hora"])) : E("", !0),
185
+ _(r, {
186
186
  hora: e.horaPrevista,
187
187
  aparencia: e.horaRealizada ? "riscada" : "padrao",
188
- style: I(e.horaRealizada ? "" : "padding-top: 1.2rem")
188
+ style: O(e.horaRealizada ? "" : "padding-top: 1.2rem")
189
189
  }, null, 8, ["hora", "aparencia", "style"])
190
190
  ])
191
191
  ]);
192
192
  }
193
- const ue = /* @__PURE__ */ _(se, [["render", ce], ["__scopeId", "data-v-da519ace"]]), de = d({
193
+ const ge = /* @__PURE__ */ m(me, [["render", he], ["__scopeId", "data-v-da519ace"]]), ye = v({
194
194
  name: "Destaque",
195
195
  props: {
196
196
  texto: {
@@ -198,11 +198,11 @@ const ue = /* @__PURE__ */ _(se, [["render", ce], ["__scopeId", "data-v-da519ace
198
198
  }
199
199
  }
200
200
  });
201
- const _e = { class: "destaqueEvento texto-pequeno" };
202
- function pe(e, o, r, s, l, c) {
203
- return a(), i("div", _e, v(e.texto), 1);
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);
204
204
  }
205
- const me = /* @__PURE__ */ _(de, [["render", pe], ["__scopeId", "data-v-c2f02de8"]]), ve = d({
205
+ const Se = /* @__PURE__ */ m(ye, [["render", Ee], ["__scopeId", "data-v-c2f02de8"]]), Ce = v({
206
206
  name: "Evento Timeline",
207
207
  props: {
208
208
  status: {
@@ -247,48 +247,48 @@ const me = /* @__PURE__ */ _(de, [["render", pe], ["__scopeId", "data-v-c2f02de8
247
247
  }
248
248
  },
249
249
  components: {
250
- IconeStatus: L,
251
- IconeCategoria: V,
252
- HoraEvento: ue,
253
- DescricaoEvento: oe,
254
- Destaque: me
250
+ IconeStatus: V,
251
+ IconeCategoria: w,
252
+ HoraEvento: ge,
253
+ DescricaoEvento: _e,
254
+ Destaque: Se
255
255
  },
256
256
  setup(e) {
257
257
  return {
258
- eventoSelecionado: g(() => ({
258
+ eventoSelecionado: b(() => ({
259
259
  atual: e.ehAtual,
260
260
  padrao: e.ehAtual
261
261
  })),
262
- clicavel: g(() => ({
262
+ clicavel: b(() => ({
263
263
  clicavel: e.aoClicar !== void 0
264
264
  }))
265
265
  };
266
266
  }
267
267
  });
268
- const fe = ["onclick"];
269
- function ge(e, o, r, s, l, c) {
270
- const u = p("IconeStatus"), b = p("HoraEvento"), E = p("IconeCategoria"), t = p("DescricaoEvento"), n = p("Destaque");
271
- return a(), i("article", {
272
- class: C(["eventoTimeline", [e.status, "criticidade-" + e.criticidade, e.eventoSelecionado, e.clicavel]]),
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
273
  onclick: e.aoClicar
274
274
  }, [
275
- h(u, { status: e.status }, null, 8, ["status"]),
276
- h(b, {
275
+ _(r, { status: e.status }, null, 8, ["status"]),
276
+ _($, {
277
277
  horaPrevista: e.previsto,
278
278
  horaRealizada: e.realizado
279
279
  }, null, 8, ["horaPrevista", "horaRealizada"]),
280
- h(E, {
280
+ _(h, {
281
281
  iconeCategoria: e.categoria.icone,
282
282
  categoria: e.categoria.nome
283
283
  }, null, 8, ["iconeCategoria", "categoria"]),
284
- h(t, {
284
+ _(a, {
285
285
  titulo: e.titulo,
286
286
  subtitulo: e.subtitulo
287
287
  }, null, 8, ["titulo", "subtitulo"]),
288
- h(n, { texto: e.destaque }, null, 8, ["texto"])
289
- ], 10, fe);
288
+ _(f, { texto: e.destaque }, null, 8, ["texto"])
289
+ ], 10, Te);
290
290
  }
291
- const A = /* @__PURE__ */ _(ve, [["render", ge]]), ye = d({
291
+ const J = /* @__PURE__ */ m(Ce, [["render", qe]]), Pe = v({
292
292
  name: "Box Data",
293
293
  props: {
294
294
  dataNumero: {
@@ -300,19 +300,19 @@ const A = /* @__PURE__ */ _(ve, [["render", ge]]), ye = d({
300
300
  }
301
301
  },
302
302
  setup(e) {
303
- return e = P(e), {
304
- classes: g(() => ({
303
+ return e = S(e), {
304
+ classes: b(() => ({
305
305
  [`${e.aparencia || "padrao"}`]: !0
306
306
  }))
307
307
  };
308
308
  }
309
309
  });
310
- function $e(e, o, r, s, l, c) {
311
- return a(), i("h3", {
312
- class: C(["boxData padrao", e.classes])
313
- }, v(e.dataNumero), 3);
310
+ function ke(e, t, n, i, c, p) {
311
+ return o(), s("h3", {
312
+ class: T(["boxData padrao", e.classes])
313
+ }, l(e.dataNumero), 3);
314
314
  }
315
- const he = /* @__PURE__ */ _(ye, [["render", $e], ["__scopeId", "data-v-385cc692"]]), be = d({
315
+ const De = /* @__PURE__ */ m(Pe, [["render", ke], ["__scopeId", "data-v-385cc692"]]), Ie = v({
316
316
  name: "SeparadorPeriodo",
317
317
  props: {
318
318
  dataSeparador: {
@@ -320,25 +320,25 @@ const he = /* @__PURE__ */ _(ye, [["render", $e], ["__scopeId", "data-v-385cc692
320
320
  type: Date
321
321
  }
322
322
  },
323
- components: { BoxData: he },
323
+ components: { BoxData: De },
324
324
  setup(e) {
325
- const o = new Array(12);
326
- return o[0] = "Janeiro", o[1] = "Fevereiro", o[2] = "Março", o[3] = "Abril", o[4] = "Maio", o[5] = "Junho", o[6] = "Julho", o[7] = "Agosto", o[8] = "Setembro", o[9] = "Outubro", o[10] = "Novembro", o[11] = "Dezembro", { mesCorrente: (s) => o[s] };
325
+ 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] };
327
327
  }
328
328
  });
329
- const Se = { class: "separadorPeriodo" }, Te = { class: "areaData" }, Ee = { class: "titulo" };
330
- function qe(e, o, r, s, l, c) {
331
- const u = p("BoxData");
332
- return a(), i("div", Se, [
333
- T("div", Te, [
334
- h(u, {
329
+ const ze = { class: "separadorPeriodo" }, Be = { class: "areaData" }, Ae = { class: "titulo" };
330
+ function Oe(e, t, n, i, c, p) {
331
+ const r = d("BoxData");
332
+ return o(), s("div", ze, [
333
+ u("div", Be, [
334
+ _(r, {
335
335
  dataNumero: e.dataSeparador.getDate()
336
336
  }, null, 8, ["dataNumero"])
337
337
  ]),
338
- T("h3", Ee, v(e.mesCorrente(e.dataSeparador.getMonth())) + " de " + v(e.dataSeparador.getFullYear()), 1)
338
+ u("h3", Ae, l(e.mesCorrente(e.dataSeparador.getMonth())) + " de " + l(e.dataSeparador.getFullYear()), 1)
339
339
  ]);
340
340
  }
341
- const Pe = /* @__PURE__ */ _(be, [["render", qe]]), Ce = d({
341
+ const je = /* @__PURE__ */ m(Ie, [["render", Oe]]), He = v({
342
342
  name: "Avatar Timeline",
343
343
  props: {
344
344
  imagem: {
@@ -349,23 +349,23 @@ const Pe = /* @__PURE__ */ _(be, [["render", qe]]), Ce = d({
349
349
  }
350
350
  }
351
351
  });
352
- const De = { class: "avatar" }, ke = ["src"], Ie = {
352
+ const Re = { class: "avatar" }, Fe = ["src"], Me = {
353
353
  key: 1,
354
354
  class: "material-symbols-outlined"
355
- }, ze = {
355
+ }, Ne = {
356
356
  key: 2,
357
357
  class: "material-symbols-outlined"
358
358
  };
359
- function Ae(e, o, r, s, l, c) {
360
- return a(), i("div", De, [
361
- e.imagem ? (a(), i("img", {
359
+ function we(e, t, n, i, c, p) {
360
+ return o(), s("div", Re, [
361
+ e.imagem ? (o(), s("img", {
362
362
  key: 0,
363
363
  src: e.imagem
364
- }, null, 8, ke)) : e.icone ? (a(), i("span", Ie, v(e.icone), 1)) : (a(), i("span", ze, " person "))
364
+ }, null, 8, Fe)) : e.icone ? (o(), s("span", Me, l(e.icone), 1)) : (o(), s("span", Ne, " person "))
365
365
  ]);
366
366
  }
367
- const He = /* @__PURE__ */ _(Ce, [["render", Ae], ["__scopeId", "data-v-bd3d61f3"]]), Be = d({
368
- components: { AvatarTimeline: He },
367
+ const Ve = /* @__PURE__ */ m(He, [["render", we], ["__scopeId", "data-v-bd3d61f3"]]), Le = v({
368
+ components: { AvatarTimeline: Ve },
369
369
  props: {
370
370
  imagemPerfil: {
371
371
  type: String
@@ -382,31 +382,31 @@ const He = /* @__PURE__ */ _(Ce, [["render", Ae], ["__scopeId", "data-v-bd3d61f3
382
382
  }
383
383
  },
384
384
  setup(e) {
385
- return e = P(e), {
386
- classes: g(() => ({
385
+ return e = S(e), {
386
+ classes: b(() => ({
387
387
  "formato-reduzido": e.formatoReduzido,
388
388
  "formato-normal": !e.formatoReduzido
389
389
  }))
390
390
  };
391
391
  }
392
392
  });
393
- const je = { class: "nome" };
394
- function Me(e, o, r, s, l, c) {
395
- const u = p("AvatarTimeline");
396
- return a(), i("section", {
397
- class: C(["perfilTimeline", e.classes])
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
398
  }, [
399
- e.imagemPerfil ? (a(), S(u, {
399
+ e.imagemPerfil ? (o(), y(r, {
400
400
  key: 0,
401
401
  imagem: e.imagemPerfil
402
- }, null, 8, ["imagem"])) : e.iconePerfil ? (a(), S(u, {
402
+ }, null, 8, ["imagem"])) : e.iconePerfil ? (o(), y(r, {
403
403
  key: 1,
404
404
  icone: e.iconePerfil
405
- }, null, 8, ["icone"])) : q("", !0),
406
- T("h2", je, v(e.nomePerfil), 1)
405
+ }, null, 8, ["icone"])) : E("", !0),
406
+ u("h2", Je, l(e.nomePerfil), 1)
407
407
  ], 2);
408
408
  }
409
- const Oe = /* @__PURE__ */ _(Be, [["render", Me]]), Re = d({
409
+ const Y = /* @__PURE__ */ m(Le, [["render", Ye]]), Ge = v({
410
410
  props: {
411
411
  perfilTimeline: {
412
412
  required: !1,
@@ -418,79 +418,79 @@ const Oe = /* @__PURE__ */ _(Be, [["render", Me]]), Re = d({
418
418
  }
419
419
  },
420
420
  components: {
421
- PerfilTimeline: Oe,
422
- SeparadorPeriodo: Pe,
423
- EventoTimeline: A
421
+ PerfilTimeline: Y,
422
+ SeparadorPeriodo: je,
423
+ EventoTimeline: J
424
424
  },
425
425
  setup(e) {
426
- const o = P(
426
+ const t = S(
427
427
  e.eventosTimeline
428
428
  );
429
- let r = P(o);
430
- function s() {
431
- r = o;
432
- const t = u(r);
433
- r.map((n) => (t[0] === n ? (n.atual = !0, n.scroll = !0, E()) : (n.atual = !1, n.scroll = !1), {
434
- evento: n
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
435
  }));
436
436
  }
437
- const l = () => {
438
- setInterval(s, 6e4);
439
- }, c = (t, n) => {
440
- const m = t.getDay() === n.getDay(), y = t.getMonth() === n.getMonth(), f = t.getFullYear() === n.getFullYear();
441
- return m && y && f;
442
- }, u = (t) => {
443
- if (t) {
444
- const n = Date.now();
445
- let m = null, y = [];
446
- for (const f of t) {
447
- const $ = f.data.getTime();
448
- if (f.status === "planejado" || f.status === "atrasado") {
449
- const D = Math.abs(n - f.data.getTime());
450
- if (m === null || D < m && $ <= n)
451
- m = D, y.length = 0;
452
- else if (D > m)
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 P = 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 && P <= f)
451
+ g = I, q.length = 0;
452
+ else if (I > g)
453
453
  continue;
454
- y.push(f);
454
+ q.push(C);
455
455
  }
456
456
  }
457
- return y;
457
+ return q;
458
458
  } else
459
459
  return [];
460
- }, b = g(() => {
461
- l();
462
- const t = r.sort(
463
- (n, m) => n.data.getTime() - m.data.getTime()
460
+ }, $ = b(() => {
461
+ c();
462
+ const a = n.sort(
463
+ (f, g) => f.data.getTime() - g.data.getTime()
464
464
  );
465
- if (t) {
466
- let n = [], m = null, y = 0, f;
467
- for (const $ of t) {
468
- const D = /* @__PURE__ */ new Date(), k = $.data;
469
- f = $.status;
470
- const H = $.tolerancia * 60 * 1e3;
471
- f === "planejado" && k.getTime() + H < D.getTime() && ($.status = "atrasado"), (!m || !c(m, k)) && (m = k, n.push({
465
+ if (a) {
466
+ let f = [], g = null, q = 0, C;
467
+ for (const P of a) {
468
+ const I = /* @__PURE__ */ new Date(), A = P.data;
469
+ C = P.status;
470
+ const K = P.tolerancia * 60 * 1e3;
471
+ C === "planejado" && A.getTime() + K < I.getTime() && (P.status = "atrasado"), (!g || !p(g, A)) && (g = A, f.push({
472
472
  tipo: "dia",
473
- valor: $.data,
474
- key: ++y
475
- })), n.push({
473
+ valor: P.data,
474
+ key: ++q
475
+ })), f.push({
476
476
  tipo: "evento",
477
- valor: $,
478
- key: ++y
477
+ valor: P,
478
+ key: ++q
479
479
  });
480
480
  }
481
- return n;
481
+ return f;
482
482
  } else
483
483
  return [];
484
- }), E = () => {
485
- const t = document.querySelector(".atual");
486
- t == null || t.scrollIntoView({
484
+ }), h = () => {
485
+ const a = document.querySelector(".atual");
486
+ a == null || a.scrollIntoView({
487
487
  behavior: "smooth",
488
488
  block: "center"
489
489
  });
490
490
  };
491
- return s(), {
492
- eventosPorTipo: b,
493
- scrollParaItemAtual: E
491
+ return i(), {
492
+ eventosPorTipo: $,
493
+ scrollParaItemAtual: h
494
494
  // clicar,
495
495
  };
496
496
  },
@@ -498,60 +498,484 @@ const Oe = /* @__PURE__ */ _(Be, [["render", Me]]), Re = d({
498
498
  this.scrollParaItemAtual();
499
499
  }
500
500
  });
501
- const Ne = { class: "areaTimeline" }, Fe = { class: "timeline" };
502
- function we(e, o, r, s, l, c) {
503
- const u = p("PerfilTimeline"), b = p("SeparadorPeriodo"), E = p("EventoTimeline");
504
- return a(), i("div", Ne, [
505
- e.perfilTimeline ? (a(), S(u, {
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, {
506
506
  key: 0,
507
507
  nomePerfil: e.perfilTimeline.nome,
508
508
  imagemPerfil: e.perfilTimeline.imagem,
509
509
  iconePerfil: e.perfilTimeline.icone
510
- }, null, 8, ["nomePerfil", "imagemPerfil", "iconePerfil"])) : q("", !0),
511
- T("section", Fe, [
512
- (a(!0), i(j, null, M(e.eventosPorTipo, (t) => (a(), i("div", {
513
- key: t.key
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
514
514
  }, [
515
- t.tipo === "dia" ? (a(), S(b, {
515
+ a.tipo === "dia" ? (o(), y($, {
516
516
  key: 0,
517
- dataSeparador: t.valor
518
- }, null, 8, ["dataSeparador"])) : q("", !0),
519
- t.tipo === "evento" ? (a(), S(E, {
517
+ dataSeparador: a.valor
518
+ }, null, 8, ["dataSeparador"])) : E("", !0),
519
+ a.tipo === "evento" ? (o(), y(h, {
520
520
  key: 1,
521
- status: t.valor.status,
522
- criticidade: t.valor.criticidade,
523
- previsto: t.valor.previsto,
524
- realizado: t.valor.realizado,
525
- categoria: t.valor.categoria,
526
- titulo: t.valor.titulo,
527
- subtitulo: t.valor.subtitulo,
528
- destaque: t.valor.destaque,
529
- ehAtual: t.valor.atual,
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
530
  aoClicar: () => {
531
- t && t.valor && t.valor.aoClicar && t.valor.aoClicar(t.valor);
531
+ a && a.valor && a.valor.aoClicar && a.valor.aoClicar(a.valor);
532
532
  }
533
- }, null, 8, ["status", "criticidade", "previsto", "realizado", "categoria", "titulo", "subtitulo", "destaque", "ehAtual", "aoClicar"])) : q("", !0)
533
+ }, null, 8, ["status", "criticidade", "previsto", "realizado", "categoria", "titulo", "subtitulo", "destaque", "ehAtual", "aoClicar"])) : E("", !0)
534
534
  ]))), 128))
535
535
  ])
536
536
  ]);
537
537
  }
538
- const Ve = /* @__PURE__ */ _(Re, [["render", we]]), Je = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
538
+ const We = /* @__PURE__ */ m(Ge, [["render", Ue]]), Xe = v({
539
+ name: "Botao",
540
+ props: {
541
+ titulo: {
542
+ type: String
543
+ },
544
+ icone: {
545
+ type: String
546
+ },
547
+ aparencia: {
548
+ type: String
549
+ },
550
+ tamanho: {
551
+ type: String
552
+ },
553
+ aoClicar: {
554
+ required: !1,
555
+ type: Function
556
+ }
557
+ },
558
+ setup(e) {
559
+ return e = S(e), {
560
+ classes: b(() => ({
561
+ [`${e.aparencia || "outline"}`]: !0,
562
+ [`${e.tamanho || "medio"}`]: !0
563
+ }))
564
+ };
565
+ }
566
+ });
567
+ const Ze = ["onclick"], xe = {
568
+ key: 0,
569
+ class: "material-symbols-outlined"
570
+ };
571
+ function eo(e, t, n, i, c, p) {
572
+ return o(), s("button", {
573
+ class: T(["btn", e.classes]),
574
+ onclick: e.aoClicar
575
+ }, [
576
+ z(e.$slots, "default", {}, () => [
577
+ e.icone ? (o(), s("span", xe, l(e.icone), 1)) : E("", !0),
578
+ j(" " + l(e.titulo), 1)
579
+ ], !0)
580
+ ], 10, Ze);
581
+ }
582
+ const B = /* @__PURE__ */ m(Xe, [["render", eo], ["__scopeId", "data-v-e91d41fc"]]), oo = v({
583
+ components: { Botao: B, PerfilTimeline: Y, IconeCategoria: w, Hora: L },
584
+ name: "CabecalhoEventoDetalhado",
585
+ props: {
586
+ perfilEvento: {
587
+ required: !0,
588
+ type: Object
589
+ },
590
+ dadosEvento: {
591
+ required: !0,
592
+ type: Object
593
+ },
594
+ aoClicar: {
595
+ required: !1,
596
+ type: Function
597
+ }
598
+ },
599
+ setup(e) {
600
+ return {};
601
+ }
602
+ });
603
+ const G = (e) => (H("data-v-e8d44815"), e = e(), R(), e), to = {
604
+ key: 1,
605
+ 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 = {
607
+ key: 0,
608
+ class: "horaRealizada texto-grande"
609
+ }, lo = {
610
+ key: 1,
611
+ class: "horaPlanejada texto-pequeno"
612
+ }, uo = {
613
+ key: 2,
614
+ 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]])
620
+ }, [
621
+ e.perfilEvento ? (o(), y(r, {
622
+ key: 0,
623
+ nomePerfil: e.perfilEvento.nome,
624
+ imagemPerfil: e.perfilEvento.imagem,
625
+ iconePerfil: e.perfilEvento.icone,
626
+ 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
633
+ }, null, 8, ["iconeCategoria", "categoria"]),
634
+ u("h1", null, l(e.dadosEvento.titulo), 1)
635
+ ]),
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))
645
+ ])
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
+ key: 0,
655
+ class: "horaRealizada texto-grande",
656
+ hora: e.dadosEvento.realizado
657
+ }, null, 8, ["hora"])) : E("", !0),
658
+ e.dadosEvento.realizado ? (o(), y(h, {
659
+ key: 1,
660
+ class: "horaPlanejada texto-pequeno",
661
+ hora: e.dadosEvento.previsto
662
+ }, null, 8, ["hora"])) : (o(), y(h, {
663
+ key: 2,
664
+ class: "horaRealizada texto-grande",
665
+ hora: e.dadosEvento.previsto
666
+ }, null, 8, ["hora"]))
667
+ ])
668
+ ], 8, _o)
669
+ ])
670
+ ], 2);
671
+ }
672
+ const fo = /* @__PURE__ */ m(oo, [["render", mo], ["__scopeId", "data-v-e8d44815"]]), $o = v({
673
+ components: { Botao: B },
674
+ name: "Observacoes",
675
+ props: {
676
+ tituloBotao: {
677
+ type: String
678
+ },
679
+ aoClicar: {
680
+ required: !1,
681
+ type: Function
682
+ },
683
+ observacoes: {
684
+ required: !0,
685
+ type: Object
686
+ }
687
+ },
688
+ setup(e) {
689
+ return e.observacoes.sort(
690
+ (t, n) => n.criadaEm.getTime() - t.criadaEm.getTime()
691
+ ), e = S(e), {};
692
+ }
693
+ });
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,
702
+ class: "lista-item"
703
+ }, [
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))
707
+ ]),
708
+ _(r, {
709
+ titulo: e.tituloBotao,
710
+ aoClicar: e.aoClicar,
711
+ icone: "add",
712
+ aparencia: "preenchido",
713
+ tamanho: "pequeno"
714
+ }, null, 8, ["titulo", "aoClicar"])
715
+ ]);
716
+ }
717
+ const To = /* @__PURE__ */ m($o, [["render", Co], ["__scopeId", "data-v-e90a0cb4"]]), qo = v({
718
+ components: { Botao: B, IconeStatus: V },
719
+ name: "BotaoStatus",
720
+ props: {
721
+ aparencia: {
722
+ type: String
723
+ },
724
+ status: {
725
+ required: !0,
726
+ type: String
727
+ },
728
+ aoClicar: {
729
+ required: !1,
730
+ type: Function
731
+ }
732
+ },
733
+ setup(e) {
734
+ return e = S(e), {
735
+ classes: b(() => ({
736
+ [`${e.status || "planejado"}`]: !0
737
+ }))
738
+ };
739
+ }
740
+ });
741
+ function Po(e, t, n, i, c, p) {
742
+ const r = d("IconeStatus"), $ = d("Botao");
743
+ return o(), y($, {
744
+ aparencia: e.aparencia,
745
+ class: T(e.classes),
746
+ aoClicar: e.aoClicar
747
+ }, {
748
+ default: k(() => [
749
+ _(r, {
750
+ class: "icone",
751
+ status: e.status
752
+ }, null, 8, ["status"]),
753
+ j(" " + l(e.status), 1)
754
+ ]),
755
+ _: 1
756
+ }, 8, ["aparencia", "class", "aoClicar"]);
757
+ }
758
+ const ko = /* @__PURE__ */ m(qo, [["render", Po], ["__scopeId", "data-v-dc6d6557"]]), Do = v({
759
+ components: { BotaoStatus: ko },
760
+ name: "StatusEvento",
761
+ props: {
762
+ aparencia: {
763
+ type: String
764
+ },
765
+ status: {
766
+ required: !0,
767
+ type: String
768
+ },
769
+ aoClicar: {
770
+ required: !1,
771
+ type: Function
772
+ }
773
+ },
774
+ setup(e) {
775
+ return e = S(e), {};
776
+ }
777
+ });
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 Ao(e, t, n, i, c, p) {
780
+ const r = d("BotaoStatus");
781
+ return o(), s("section", zo, [
782
+ Bo,
783
+ _(r, {
784
+ aparencia: e.aparencia,
785
+ aoClicar: e.aoClicar,
786
+ status: e.status
787
+ }, null, 8, ["aparencia", "aoClicar", "status"])
788
+ ]);
789
+ }
790
+ const Oo = /* @__PURE__ */ m(Do, [["render", Ao], ["__scopeId", "data-v-69bc6463"]]), jo = v({
791
+ props: {
792
+ perfilEvento: {
793
+ required: !0,
794
+ type: Object
795
+ },
796
+ dadosEvento: {
797
+ required: !0,
798
+ type: Object
799
+ }
800
+ },
801
+ components: { CabecalhoEventoDetalhado: fo, Observacoes: To, StatusEvento: Oo },
802
+ setup(e) {
803
+ return {};
804
+ }
805
+ });
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
+ _(D, {
811
+ name: "fadeBaixo",
812
+ mode: "out-in",
813
+ appear: ""
814
+ }, {
815
+ default: k(() => [
816
+ _(r, {
817
+ perfilEvento: e.perfilEvento,
818
+ dadosEvento: e.dadosEvento,
819
+ aoClicar: e.dadosEvento.aoClicar
820
+ }, null, 8, ["perfilEvento", "dadosEvento", "aoClicar"])
821
+ ]),
822
+ _: 1
823
+ }),
824
+ _(D, {
825
+ name: "fadeBaixo",
826
+ mode: "out-in",
827
+ appear: ""
828
+ }, {
829
+ default: k(() => [
830
+ u("section", Ro, [
831
+ z(e.$slots, "descricao", {}, () => [
832
+ j(l(e.dadosEvento.subtitulo), 1)
833
+ ])
834
+ ])
835
+ ]),
836
+ _: 3
837
+ }),
838
+ _(D, {
839
+ name: "fadeBaixo",
840
+ mode: "out-in",
841
+ appear: ""
842
+ }, {
843
+ default: k(() => [
844
+ _($, {
845
+ observacoes: e.dadosEvento.observacoes,
846
+ tituloBotao: "Inserir observação",
847
+ aoClicar: e.dadosEvento.aoClicar
848
+ }, null, 8, ["observacoes", "aoClicar"])
849
+ ]),
850
+ _: 1
851
+ }),
852
+ _(D, {
853
+ name: "fadeBaixo",
854
+ mode: "out-in",
855
+ appear: ""
856
+ }, {
857
+ default: k(() => [
858
+ _(h, {
859
+ aparencia: "preenchido",
860
+ aoClicar: e.dadosEvento.aoClicar,
861
+ status: e.dadosEvento.status
862
+ }, null, 8, ["aoClicar", "status"])
863
+ ]),
864
+ _: 1
865
+ })
866
+ ]);
867
+ }
868
+ const Mo = /* @__PURE__ */ m(jo, [["render", Fo]]), No = v({
869
+ components: { Botao: B },
870
+ name: "AreaSalvamento",
871
+ props: {
872
+ aoClicar: {
873
+ required: !1,
874
+ type: Function
875
+ }
876
+ },
877
+ setup(e) {
878
+ return {};
879
+ }
880
+ });
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),
886
+ _(r, {
887
+ aparencia: "preenchido",
888
+ titulo: "Salvar",
889
+ tamanho: "grande",
890
+ aoClicar: e.aoClicar
891
+ }, null, 8, ["aoClicar"]),
892
+ _(r, {
893
+ aparencia: "vazio",
894
+ titulo: "Cancelar",
895
+ tamanho: "pequeno",
896
+ aoClicar: e.aoClicar
897
+ }, null, 8, ["aoClicar"])
898
+ ]);
899
+ }
900
+ const Lo = /* @__PURE__ */ m(No, [["render", Vo], ["__scopeId", "data-v-5dd5054f"]]), Jo = v({
901
+ props: {
902
+ aoClicar: {
903
+ required: !1,
904
+ type: Function
905
+ },
906
+ salvarVisivel: {
907
+ type: Boolean
908
+ }
909
+ },
910
+ components: { AreaSalvamento: Lo },
911
+ setup(e) {
912
+ return e = S(e), {
913
+ classes: b(() => ({
914
+ visivel: e.salvarVisivel,
915
+ invisivel: !e.salvarVisivel
916
+ }))
917
+ };
918
+ }
919
+ });
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
+ _(D, {
925
+ name: "fadeTopo",
926
+ mode: "out-in",
927
+ appear: ""
928
+ }, {
929
+ default: k(() => [
930
+ u("div", Go, [
931
+ z(e.$slots, "conteudo")
932
+ ])
933
+ ]),
934
+ _: 3
935
+ }),
936
+ _(D, {
937
+ name: "fadeBaixo",
938
+ mode: "out-in",
939
+ appear: ""
940
+ }, {
941
+ default: k(() => [
942
+ u("div", Ko, [
943
+ _(r, {
944
+ aoClicar: e.aoClicar,
945
+ class: T(e.classes)
946
+ }, {
947
+ default: k(() => [
948
+ z(e.$slots, "salvamento")
949
+ ]),
950
+ _: 3
951
+ }, 8, ["aoClicar", "class"])
952
+ ])
953
+ ]),
954
+ _: 3
955
+ })
956
+ ]);
957
+ }
958
+ const Uo = /* @__PURE__ */ m(Jo, [["render", Qo]]), Wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
539
959
  __proto__: null
540
- }, Symbol.toStringTag, { value: "Module" })), z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
960
+ }, Symbol.toStringTag, { value: "Module" })), F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
541
961
  __proto__: null,
542
- EventoTimeline: A,
543
- Timeline: Ve,
544
- Tipos: Je
962
+ EditarEvento: Uo,
963
+ EventoDetalhado: Mo,
964
+ EventoTimeline: J,
965
+ Timeline: We,
966
+ Tipos: Wo
545
967
  }, Symbol.toStringTag, { value: "Module" }));
546
- const Le = {
547
- install(e, ...o) {
548
- for (const r in z)
549
- e.component(r, z[r]);
968
+ const Zo = {
969
+ install(e, ...t) {
970
+ for (const n in F)
971
+ e.component(n, F[n]);
550
972
  }
551
973
  };
552
974
  export {
553
- A as EventoTimeline,
554
- Ve as Timeline,
555
- Je as Tipos,
556
- Le as default
975
+ Uo as EditarEvento,
976
+ Mo as EventoDetalhado,
977
+ J as EventoTimeline,
978
+ We as Timeline,
979
+ Wo as Tipos,
980
+ Zo as default
557
981
  };