@devix-tecnologia/timeline-vue 1.1.1 → 1.2.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.
- package/README.md +39 -36
- package/dist/style.css +1 -1
- package/dist/timeline-vue.es.js +230 -257
- package/dist/types/components/timeline/EventoDetalhado.mock.d.ts +4 -0
- package/dist/types/components/timeline/Templates/AdiantarHorario.vue.d.ts +35 -0
- package/dist/types/components/timeline/Templates/AdicionarObservacao.vue.d.ts +29 -0
- package/dist/types/components/timeline/Templates/EditarStatus.vue.d.ts +36 -0
- package/dist/types/components/timeline/Templates/TemplateEvento.vue.d.ts +24 -0
- package/dist/types/components/timeline/atomos/AvatarTimeline.vue.d.ts +1 -1
- package/dist/types/components/timeline/atomos/Destaque.vue.d.ts +3 -3
- package/dist/types/components/timeline/atomos/Hora.vue.d.ts +70 -1
- package/dist/types/components/timeline/atomos/IconeCategoria.vue.d.ts +1 -0
- package/dist/types/components/timeline/atomos/IconeStatus.vue.d.ts +1 -0
- package/dist/types/components/timeline/atomos/SubtituloEvento.vue.d.ts +1 -1
- package/dist/types/components/timeline/atomos/TituloEvento.vue.d.ts +1 -1
- package/dist/types/components/timeline/index.d.ts +2 -1
- package/dist/types/components/timeline/moleculas/AreaSalvamento.vue.d.ts +15 -0
- package/dist/types/components/timeline/moleculas/Botao.vue.d.ts +43 -0
- package/dist/types/components/timeline/moleculas/BotaoStatus.vue.d.ts +33 -0
- package/dist/types/components/timeline/moleculas/CabecalhoEventoDetalhado.vue.d.ts +32 -0
- package/dist/types/components/timeline/moleculas/DescricaoEvento.vue.d.ts +3 -3
- package/dist/types/components/timeline/moleculas/EventoTimeline.vue.d.ts +9 -12
- package/dist/types/components/timeline/moleculas/HoraEvento.vue.d.ts +1 -1
- package/dist/types/components/timeline/moleculas/Observacoes.vue.d.ts +30 -0
- package/dist/types/components/timeline/moleculas/PerfilTimeline.vue.d.ts +11 -9
- package/dist/types/components/timeline/moleculas/SeparadorPeriodo.vue.d.ts +0 -6
- package/dist/types/components/timeline/moleculas/StatusEvento.vue.d.ts +29 -0
- package/dist/types/components/timeline/moleculas/Topo.vue.d.ts +28 -1
- package/dist/types/components/timeline/organismos/EditarEvento.vue.d.ts +28 -0
- package/dist/types/components/timeline/organismos/EventoDetalhado.vue.d.ts +24 -0
- package/dist/types/components/timeline/organismos/Timeline.vue.d.ts +3 -2
- package/dist/types/components/timeline/type.d.ts +2 -2
- package/dist/types/components/timeline/typeDetalhado.d.ts +15 -0
- package/package.json +3 -2
- package/src/assets/vue.svg +0 -1
- package/src/components/timeline/atomos/AvatarTimeline.stories.ts +0 -32
- package/src/components/timeline/atomos/AvatarTimeline.vue +0 -51
- package/src/components/timeline/atomos/BoxData.stories.ts +0 -41
- package/src/components/timeline/atomos/BoxData.vue +0 -57
- package/src/components/timeline/atomos/Destaque.stories.ts +0 -24
- package/src/components/timeline/atomos/Destaque.vue +0 -39
- package/src/components/timeline/atomos/Hora.stories.ts +0 -36
- package/src/components/timeline/atomos/Hora.vue +0 -50
- package/src/components/timeline/atomos/IconeCategoria.stories.ts +0 -60
- package/src/components/timeline/atomos/IconeCategoria.vue +0 -110
- package/src/components/timeline/atomos/IconeStatus.stories.ts +0 -38
- package/src/components/timeline/atomos/IconeStatus.vue +0 -73
- package/src/components/timeline/atomos/SubtituloEvento.stories.ts +0 -24
- package/src/components/timeline/atomos/SubtituloEvento.vue +0 -33
- package/src/components/timeline/atomos/TituloEvento.stories.ts +0 -24
- package/src/components/timeline/atomos/TituloEvento.vue +0 -32
- package/src/components/timeline/index.ts +0 -7
- package/src/components/timeline/moleculas/DescricaoEvento.stories.ts +0 -31
- package/src/components/timeline/moleculas/DescricaoEvento.vue +0 -59
- package/src/components/timeline/moleculas/EventoTimeline.stories.ts +0 -94
- package/src/components/timeline/moleculas/EventoTimeline.vue +0 -158
- package/src/components/timeline/moleculas/HoraEvento.stories.ts +0 -37
- package/src/components/timeline/moleculas/HoraEvento.vue +0 -74
- package/src/components/timeline/moleculas/PerfilTimeline.stories.ts +0 -40
- package/src/components/timeline/moleculas/PerfilTimeline.vue +0 -76
- package/src/components/timeline/moleculas/SeparadorPeriodo.stories.ts +0 -42
- package/src/components/timeline/moleculas/SeparadorPeriodo.vue +0 -100
- package/src/components/timeline/moleculas/Topo.vue +0 -38
- package/src/components/timeline/organismos/Timeline.mock.ts +0 -311
- package/src/components/timeline/organismos/Timeline.stories.ts +0 -48
- package/src/components/timeline/organismos/Timeline.vue +0 -217
- package/src/components/timeline/type.ts +0 -34
- package/src/global.css +0 -98
- package/src/index.ts +0 -16
- package/src/vite-env.d.ts +0 -1
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section class="perfilTimeline fixed" ref="elementoFixo" :style="style">
|
|
3
|
-
<AvatarTimeline v-if="imagemPerfil" :imagem="imagemPerfil" />
|
|
4
|
-
<AvatarTimeline v-else-if="iconePerfil" :icone="iconePerfil" />
|
|
5
|
-
<h2 class="nome">{{ nomePerfil }}</h2>
|
|
6
|
-
</section>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script lang="ts">
|
|
10
|
-
import {
|
|
11
|
-
defineComponent,
|
|
12
|
-
ref,
|
|
13
|
-
onMounted,
|
|
14
|
-
onUnmounted,
|
|
15
|
-
reactive,
|
|
16
|
-
computed,
|
|
17
|
-
} from "vue";
|
|
18
|
-
import AvatarTimeline from "../atomos/AvatarTimeline.vue";
|
|
19
|
-
|
|
20
|
-
export default defineComponent({
|
|
21
|
-
components: { AvatarTimeline },
|
|
22
|
-
props: {
|
|
23
|
-
imagemPerfil: {
|
|
24
|
-
type: String,
|
|
25
|
-
},
|
|
26
|
-
nomePerfil: {
|
|
27
|
-
type: String,
|
|
28
|
-
},
|
|
29
|
-
iconePerfil: {
|
|
30
|
-
type: String,
|
|
31
|
-
},
|
|
32
|
-
backgroundColor: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "var(--cor-primaria)",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
setup(props) {
|
|
38
|
-
props = reactive(props);
|
|
39
|
-
// passando o background por props no style
|
|
40
|
-
const style = computed(() => ({
|
|
41
|
-
backgroundColor: props.backgroundColor,
|
|
42
|
-
}));
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
style,
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<style scoped>
|
|
52
|
-
.perfilTimeline {
|
|
53
|
-
background: var(--cor-primaria);
|
|
54
|
-
padding: 1.4rem;
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-direction: row;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
align-items: center;
|
|
59
|
-
gap: 1.4rem;
|
|
60
|
-
z-index: 999;
|
|
61
|
-
width: 100%;
|
|
62
|
-
min-height: 8rem;
|
|
63
|
-
transition: all 0.3s;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.nome {
|
|
67
|
-
color: var(--cor-secundaria);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.fixed {
|
|
71
|
-
position: fixed;
|
|
72
|
-
top: 0;
|
|
73
|
-
left: 0;
|
|
74
|
-
transition: all 0.3s;
|
|
75
|
-
}
|
|
76
|
-
</style>
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import SeparadorPeriodo from './SeparadorPeriodo.vue';
|
|
2
|
-
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Devix/Timeline/Moleculas/SeparadorPeriodo',
|
|
6
|
-
component: SeparadorPeriodo,
|
|
7
|
-
argTypes: {
|
|
8
|
-
aparencia: {
|
|
9
|
-
control: { type: 'select' },
|
|
10
|
-
options: ['padrao', 'escuro', 'claro'],
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
} as Meta<typeof SeparadorPeriodo>;
|
|
14
|
-
|
|
15
|
-
const Template: StoryFn<typeof SeparadorPeriodo> = (args) => ({
|
|
16
|
-
components: { SeparadorPeriodo: SeparadorPeriodo },
|
|
17
|
-
setup() {
|
|
18
|
-
return { args };
|
|
19
|
-
},
|
|
20
|
-
template: '<SeparadorPeriodo v-bind="args" />',
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const Padrao = Template.bind({});
|
|
24
|
-
Padrao.args = {
|
|
25
|
-
dataSeparador: '01',
|
|
26
|
-
mesNome: 'Janeiro',
|
|
27
|
-
aparencia: 'padrao',
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const Escuro = Template.bind({});
|
|
31
|
-
Escuro.args = {
|
|
32
|
-
dataSeparador: '01',
|
|
33
|
-
mesNome: 'Janeiro',
|
|
34
|
-
aparencia: 'escuro',
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const Claro = Template.bind({});
|
|
38
|
-
Claro.args = {
|
|
39
|
-
dataSeparador: '01',
|
|
40
|
-
mesNome: 'Janeiro',
|
|
41
|
-
aparencia: 'claro',
|
|
42
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="separadorPeriodo">
|
|
3
|
-
<div class="areaData">
|
|
4
|
-
<BoxData :dataNumero="dataSeparador.getDate()" :aparencia="aparencia" />
|
|
5
|
-
</div>
|
|
6
|
-
<h3 class="titulo" :class="aparencia">
|
|
7
|
-
{{ mesCorrente(dataSeparador.getMonth()) }} de
|
|
8
|
-
{{ dataSeparador.getFullYear() }}
|
|
9
|
-
</h3>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script lang="ts">
|
|
14
|
-
import { defineComponent, ref } from "vue";
|
|
15
|
-
import BoxData from "../atomos/BoxData.vue";
|
|
16
|
-
|
|
17
|
-
export default defineComponent({
|
|
18
|
-
name: "SeparadorPeriodo",
|
|
19
|
-
props: {
|
|
20
|
-
dataSeparador: {
|
|
21
|
-
required: true,
|
|
22
|
-
type: Date,
|
|
23
|
-
},
|
|
24
|
-
aparencia: {
|
|
25
|
-
type: String,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
components: { BoxData },
|
|
29
|
-
setup(props) {
|
|
30
|
-
const arrayMes = new Array(12);
|
|
31
|
-
arrayMes[0] = "Janeiro";
|
|
32
|
-
arrayMes[1] = "Fevereiro";
|
|
33
|
-
arrayMes[2] = "Março";
|
|
34
|
-
arrayMes[3] = "Abril";
|
|
35
|
-
arrayMes[4] = "Maio";
|
|
36
|
-
arrayMes[5] = "Junho";
|
|
37
|
-
arrayMes[6] = "Julho";
|
|
38
|
-
arrayMes[7] = "Agosto";
|
|
39
|
-
arrayMes[8] = "Setembro";
|
|
40
|
-
arrayMes[9] = "Outubro";
|
|
41
|
-
arrayMes[10] = "Novembro";
|
|
42
|
-
arrayMes[11] = "Dezembro";
|
|
43
|
-
|
|
44
|
-
const mesCorrente = (mes: number) => {
|
|
45
|
-
return arrayMes[mes];
|
|
46
|
-
};
|
|
47
|
-
return { mesCorrente };
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
|
-
<style scoped>
|
|
53
|
-
/* SEPARADOR */
|
|
54
|
-
|
|
55
|
-
.separadorPeriodo {
|
|
56
|
-
display: table-row;
|
|
57
|
-
width: 100%;
|
|
58
|
-
position: relative;
|
|
59
|
-
background: #fff;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.areaData {
|
|
63
|
-
display: table-cell;
|
|
64
|
-
padding: 2.8rem 1.4rem;
|
|
65
|
-
padding-left: 10.1rem;
|
|
66
|
-
position: relative;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.areaData:before {
|
|
70
|
-
content: "";
|
|
71
|
-
background: var(--cor-linha);
|
|
72
|
-
display: block;
|
|
73
|
-
position: absolute;
|
|
74
|
-
width: 2px;
|
|
75
|
-
height: 2.5rem;
|
|
76
|
-
top: 0;
|
|
77
|
-
left: 11.9rem;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.areaData:after {
|
|
81
|
-
content: "";
|
|
82
|
-
background: var(--cor-linha);
|
|
83
|
-
display: block;
|
|
84
|
-
position: absolute;
|
|
85
|
-
width: 2px;
|
|
86
|
-
height: 2.5rem;
|
|
87
|
-
bottom: 0;
|
|
88
|
-
left: 11.9rem;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.separadorPeriodo .titulo {
|
|
92
|
-
text-transform: uppercase;
|
|
93
|
-
padding-bottom: 3.45rem;
|
|
94
|
-
color: var(--cor-texto);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.separadorPeriodo .titulo.claro {
|
|
98
|
-
color: var(--cor-apoio);
|
|
99
|
-
}
|
|
100
|
-
</style>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="topo">
|
|
3
|
-
<div class="Topo">
|
|
4
|
-
<!-- iconeSeta -->
|
|
5
|
-
<span class="material-symbols-outlined"> arrow_back </span>
|
|
6
|
-
<!-- titulo -->
|
|
7
|
-
<h2 class="titulo">Linha do tempo</h2>
|
|
8
|
-
<!-- menu -->
|
|
9
|
-
<span class="material-symbols-outlined"> more_vert </span>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script lang="ts">
|
|
15
|
-
import { defineComponent } from 'vue';
|
|
16
|
-
|
|
17
|
-
export default defineComponent({
|
|
18
|
-
setup() {
|
|
19
|
-
return {};
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style scoped>
|
|
25
|
-
/* CABEÇALHO */
|
|
26
|
-
.material-symbols-outlined {
|
|
27
|
-
font-size: 2.6rem;
|
|
28
|
-
}
|
|
29
|
-
.Topo {
|
|
30
|
-
background: var(--cor-secundaria);
|
|
31
|
-
padding: 1.4rem;
|
|
32
|
-
color: var(--cor-terciaria);
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: row;
|
|
35
|
-
justify-content: space-between;
|
|
36
|
-
align-items: center;
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import { Evento, Perfil } from "../type";
|
|
2
|
-
|
|
3
|
-
export const dadosPerfil: Perfil = {
|
|
4
|
-
nome: "Maria do Socorro",
|
|
5
|
-
imagem:
|
|
6
|
-
"https://this-person-does-not-exist.com/img/avatar-gen11071f8e0802a35d66684ee9376722b2.jpg",
|
|
7
|
-
icone: "person",
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const dadosEventos: Evento[] = [
|
|
11
|
-
{
|
|
12
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f1",
|
|
13
|
-
data: new Date("2023-04-26T19:00Z"),
|
|
14
|
-
previsto: new Date("2023-04-26T19:00Z"),
|
|
15
|
-
realizado: new Date("2023-04-26T19:30Z"),
|
|
16
|
-
duracao: null,
|
|
17
|
-
tolerancia: 10,
|
|
18
|
-
titulo: "Vacina da Covid",
|
|
19
|
-
subtitulo: "Posto de saúde do bairro",
|
|
20
|
-
destaque: "",
|
|
21
|
-
categoria: {
|
|
22
|
-
nome: "Vacina",
|
|
23
|
-
icone: "vaccines",
|
|
24
|
-
},
|
|
25
|
-
status: "realizado",
|
|
26
|
-
criticidade: "media",
|
|
27
|
-
|
|
28
|
-
atual: false,
|
|
29
|
-
scroll: false,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f2",
|
|
33
|
-
data: new Date("2023-04-26T18:10Z"),
|
|
34
|
-
previsto: new Date("2023-04-26T18:10Z"),
|
|
35
|
-
realizado: new Date("2023-04-26T18:15Z"),
|
|
36
|
-
duracao: null,
|
|
37
|
-
tolerancia: 10,
|
|
38
|
-
titulo: "Vacina da gripe",
|
|
39
|
-
subtitulo: "Posto de saúde do bairro",
|
|
40
|
-
destaque: "",
|
|
41
|
-
categoria: {
|
|
42
|
-
nome: "Vacina",
|
|
43
|
-
icone: "vaccines",
|
|
44
|
-
},
|
|
45
|
-
status: "cancelado",
|
|
46
|
-
criticidade: "baixa",
|
|
47
|
-
|
|
48
|
-
atual: false,
|
|
49
|
-
scroll: false,
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f3",
|
|
53
|
-
data: new Date("2023-05-03T11:00Z"),
|
|
54
|
-
previsto: new Date("2023-05-03T11:00Z"),
|
|
55
|
-
realizado: null,
|
|
56
|
-
duracao: null,
|
|
57
|
-
tolerancia: 10,
|
|
58
|
-
titulo: "Ligar para médica",
|
|
59
|
-
subtitulo: "",
|
|
60
|
-
destaque: "",
|
|
61
|
-
categoria: {
|
|
62
|
-
nome: "Ligação",
|
|
63
|
-
icone: "call",
|
|
64
|
-
},
|
|
65
|
-
status: "planejado",
|
|
66
|
-
criticidade: "baixa",
|
|
67
|
-
|
|
68
|
-
atual: false,
|
|
69
|
-
scroll: false,
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f4",
|
|
73
|
-
data: new Date("2023-05-03T15:00Z"),
|
|
74
|
-
previsto: new Date("2023-05-03T15:00Z"),
|
|
75
|
-
realizado: null,
|
|
76
|
-
duracao: null,
|
|
77
|
-
tolerancia: 10,
|
|
78
|
-
titulo: "Passeio no parque",
|
|
79
|
-
subtitulo: "",
|
|
80
|
-
destaque: "",
|
|
81
|
-
categoria: {
|
|
82
|
-
nome: "Passeio",
|
|
83
|
-
icone: "tour",
|
|
84
|
-
},
|
|
85
|
-
status: "planejado",
|
|
86
|
-
criticidade: "baixa",
|
|
87
|
-
|
|
88
|
-
atual: false,
|
|
89
|
-
scroll: false,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f5",
|
|
93
|
-
data: new Date("2023-05-03T20:00Z"),
|
|
94
|
-
previsto: new Date("2023-05-03T20:00Z"),
|
|
95
|
-
realizado: null,
|
|
96
|
-
duracao: null,
|
|
97
|
-
tolerancia: 10,
|
|
98
|
-
titulo: "Exames do coração",
|
|
99
|
-
subtitulo: "Hospital do Coração",
|
|
100
|
-
destaque: "",
|
|
101
|
-
categoria: {
|
|
102
|
-
nome: "Cardiologista",
|
|
103
|
-
icone: "cardiology",
|
|
104
|
-
},
|
|
105
|
-
status: "planejado",
|
|
106
|
-
criticidade: "media",
|
|
107
|
-
|
|
108
|
-
atual: false,
|
|
109
|
-
scroll: false,
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f6",
|
|
113
|
-
data: new Date("2023-04-01T12:00Z"),
|
|
114
|
-
previsto: new Date("2023-04-01T12:00Z"),
|
|
115
|
-
realizado: null,
|
|
116
|
-
duracao: null,
|
|
117
|
-
tolerancia: 10,
|
|
118
|
-
titulo: "Consulta",
|
|
119
|
-
subtitulo: "Posto de saúde",
|
|
120
|
-
destaque: "Remarcado",
|
|
121
|
-
categoria: {
|
|
122
|
-
nome: "Tele consulta",
|
|
123
|
-
icone: "call",
|
|
124
|
-
},
|
|
125
|
-
status: "adiado",
|
|
126
|
-
criticidade: "baixa",
|
|
127
|
-
|
|
128
|
-
atual: false,
|
|
129
|
-
scroll: false,
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f7",
|
|
133
|
-
data: new Date("2023-04-01T13:00Z"),
|
|
134
|
-
previsto: new Date("2023-04-01T13:00Z"),
|
|
135
|
-
realizado: null,
|
|
136
|
-
duracao: null,
|
|
137
|
-
tolerancia: 10,
|
|
138
|
-
titulo: "Consulta cardiologista",
|
|
139
|
-
subtitulo: "Posto de saúde do bairro",
|
|
140
|
-
destaque: "",
|
|
141
|
-
categoria: {
|
|
142
|
-
nome: "Cardiologista",
|
|
143
|
-
icone: "cardiology",
|
|
144
|
-
},
|
|
145
|
-
status: "realizado",
|
|
146
|
-
criticidade: "alta",
|
|
147
|
-
|
|
148
|
-
atual: false,
|
|
149
|
-
scroll: false,
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f8",
|
|
153
|
-
data: new Date("2023-05-03T12:00Z"),
|
|
154
|
-
previsto: new Date("2023-05-03T12:00Z"),
|
|
155
|
-
realizado: null,
|
|
156
|
-
duracao: null,
|
|
157
|
-
tolerancia: 10,
|
|
158
|
-
titulo: "Dentista",
|
|
159
|
-
subtitulo: "Reta da Penha",
|
|
160
|
-
destaque: "",
|
|
161
|
-
categoria: {
|
|
162
|
-
nome: "Dentista",
|
|
163
|
-
icone: "dentistry",
|
|
164
|
-
},
|
|
165
|
-
status: "planejado",
|
|
166
|
-
criticidade: "baixa",
|
|
167
|
-
|
|
168
|
-
atual: false,
|
|
169
|
-
scroll: false,
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f9",
|
|
173
|
-
data: new Date("2023-05-03T13:00Z"),
|
|
174
|
-
previsto: new Date("2023-05-03T13:00Z"),
|
|
175
|
-
realizado: null,
|
|
176
|
-
duracao: null,
|
|
177
|
-
tolerancia: 10,
|
|
178
|
-
titulo: "Consulta",
|
|
179
|
-
subtitulo: "Hospital central",
|
|
180
|
-
destaque: "",
|
|
181
|
-
categoria: {
|
|
182
|
-
nome: "Consulta",
|
|
183
|
-
icone: "health_and_safety",
|
|
184
|
-
},
|
|
185
|
-
status: "planejado",
|
|
186
|
-
criticidade: "alta",
|
|
187
|
-
|
|
188
|
-
atual: false,
|
|
189
|
-
scroll: false,
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f10",
|
|
193
|
-
data: new Date("2023-05-03T14:27Z"),
|
|
194
|
-
previsto: new Date("2023-05-03T14:27Z"),
|
|
195
|
-
realizado: null,
|
|
196
|
-
duracao: null,
|
|
197
|
-
tolerancia: 10,
|
|
198
|
-
titulo: "Remédio de pressão",
|
|
199
|
-
subtitulo: "Aferir a pressão",
|
|
200
|
-
destaque: "",
|
|
201
|
-
categoria: {
|
|
202
|
-
nome: "Remédio",
|
|
203
|
-
icone: "pill",
|
|
204
|
-
},
|
|
205
|
-
status: "planejado",
|
|
206
|
-
criticidade: "alta",
|
|
207
|
-
|
|
208
|
-
atual: false,
|
|
209
|
-
scroll: false,
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f11",
|
|
213
|
-
data: new Date("2023-05-03T15:00Z"),
|
|
214
|
-
previsto: new Date("2023-05-03T15:00Z"),
|
|
215
|
-
realizado: null,
|
|
216
|
-
duracao: null,
|
|
217
|
-
tolerancia: 10,
|
|
218
|
-
titulo: "Checar temperatura",
|
|
219
|
-
subtitulo: "",
|
|
220
|
-
destaque: "",
|
|
221
|
-
categoria: {
|
|
222
|
-
nome: "Termometro",
|
|
223
|
-
icone: "thermometer_gain",
|
|
224
|
-
},
|
|
225
|
-
status: "planejado",
|
|
226
|
-
criticidade: "baixa",
|
|
227
|
-
|
|
228
|
-
atual: false,
|
|
229
|
-
scroll: false,
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f12",
|
|
233
|
-
data: new Date("2023-05-08T16:00Z"),
|
|
234
|
-
previsto: new Date("2023-05-08T16:00Z"),
|
|
235
|
-
realizado: null,
|
|
236
|
-
duracao: null,
|
|
237
|
-
tolerancia: 10,
|
|
238
|
-
titulo: "Avaliação Física",
|
|
239
|
-
subtitulo: "",
|
|
240
|
-
destaque: "IMC: 28,4",
|
|
241
|
-
categoria: {
|
|
242
|
-
nome: "Avaliação Física",
|
|
243
|
-
icone: "conditions",
|
|
244
|
-
},
|
|
245
|
-
status: "planejado",
|
|
246
|
-
criticidade: "baixa",
|
|
247
|
-
|
|
248
|
-
atual: false,
|
|
249
|
-
scroll: false,
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f13",
|
|
253
|
-
data: new Date("2023-05-09T19:00Z"),
|
|
254
|
-
previsto: new Date("2023-05-09T19:00Z"),
|
|
255
|
-
realizado: null,
|
|
256
|
-
duracao: null,
|
|
257
|
-
tolerancia: 10,
|
|
258
|
-
titulo: "Vacina da gripe",
|
|
259
|
-
subtitulo: "Posto de saúde do bairro",
|
|
260
|
-
destaque: "",
|
|
261
|
-
categoria: {
|
|
262
|
-
nome: "Vacina",
|
|
263
|
-
icone: "vaccines",
|
|
264
|
-
},
|
|
265
|
-
status: "planejado",
|
|
266
|
-
criticidade: "baixa",
|
|
267
|
-
|
|
268
|
-
atual: false,
|
|
269
|
-
scroll: false,
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f14",
|
|
273
|
-
data: new Date("2023-05-09T17:00Z"),
|
|
274
|
-
previsto: new Date("2023-05-09T17:00Z"),
|
|
275
|
-
realizado: null,
|
|
276
|
-
duracao: null,
|
|
277
|
-
tolerancia: 10,
|
|
278
|
-
titulo: "Vitamina D",
|
|
279
|
-
subtitulo: "2 comprimidos",
|
|
280
|
-
destaque: "",
|
|
281
|
-
categoria: {
|
|
282
|
-
nome: "Remédio",
|
|
283
|
-
icone: "pill",
|
|
284
|
-
},
|
|
285
|
-
status: "planejado",
|
|
286
|
-
criticidade: "baixa",
|
|
287
|
-
aoCLicar: () => alert("Olá, mundo!"),
|
|
288
|
-
atual: false,
|
|
289
|
-
scroll: false,
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
id: "15ea7863-2402-4b84-8a8d-10a00ba07e2f15",
|
|
293
|
-
data: new Date("2023-05-09T18:01Z"),
|
|
294
|
-
previsto: new Date("2023-05-09T18:00Z"),
|
|
295
|
-
realizado: null,
|
|
296
|
-
duracao: null,
|
|
297
|
-
tolerancia: 10,
|
|
298
|
-
titulo: "Fisioterapia",
|
|
299
|
-
subtitulo: "",
|
|
300
|
-
destaque: "",
|
|
301
|
-
categoria: {
|
|
302
|
-
nome: "Fisioterapia",
|
|
303
|
-
icone: "physical_therapy",
|
|
304
|
-
},
|
|
305
|
-
status: "planejado",
|
|
306
|
-
criticidade: "baixa",
|
|
307
|
-
|
|
308
|
-
atual: false,
|
|
309
|
-
scroll: false,
|
|
310
|
-
},
|
|
311
|
-
];
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import Timeline from "./Timeline.vue";
|
|
2
|
-
import { Meta, StoryFn } from "@storybook/vue3";
|
|
3
|
-
import { dadosEventos, dadosPerfil } from "./Timeline.mock";
|
|
4
|
-
import { Evento } from "../type";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: "Devix/Timeline/Organismos/Timeline",
|
|
8
|
-
component: Timeline,
|
|
9
|
-
parameters: {
|
|
10
|
-
componentSubtitle: "Linha do tempo padrão com identidade da Devix",
|
|
11
|
-
},
|
|
12
|
-
argTypes: {},
|
|
13
|
-
} as Meta<typeof Timeline>;
|
|
14
|
-
|
|
15
|
-
const perfilMock = dadosPerfil;
|
|
16
|
-
|
|
17
|
-
const eventosPorDataMock = dadosEventos;
|
|
18
|
-
|
|
19
|
-
function atualizarDatas(eventos: Evento[]) {
|
|
20
|
-
const agora = new Date();
|
|
21
|
-
const mesAtual = agora.getMonth() + 1;
|
|
22
|
-
|
|
23
|
-
for (let i = 0; i < eventos.length; i++) {
|
|
24
|
-
const evento = eventos[i];
|
|
25
|
-
const mesEvento = evento.data.getMonth() + 1;
|
|
26
|
-
|
|
27
|
-
if (mesEvento >= mesAtual) {
|
|
28
|
-
evento.data.setMonth(agora.getMonth(), agora.getDate());
|
|
29
|
-
evento.previsto.setMonth(agora.getMonth(), agora.getDate());
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
atualizarDatas(dadosEventos);
|
|
34
|
-
|
|
35
|
-
const Template: StoryFn<typeof Timeline> = (args) => ({
|
|
36
|
-
components: { Timeline: Timeline },
|
|
37
|
-
setup() {
|
|
38
|
-
return { args };
|
|
39
|
-
},
|
|
40
|
-
template:
|
|
41
|
-
'<Timeline :perfilTimeline="args.perfilTimeline" :eventosTimeline="args.eventosTimeline" style="position: relative" />',
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export const Padrao = Template.bind({});
|
|
45
|
-
Padrao.args = {
|
|
46
|
-
perfilTimeline: perfilMock,
|
|
47
|
-
eventosTimeline: eventosPorDataMock,
|
|
48
|
-
};
|