@nixweb/nixloc-ui 0.0.112 → 0.0.113
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/package.json
CHANGED
|
@@ -1,24 +1,213 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<div class="
|
|
6
|
-
<
|
|
7
|
-
<i class="fas fa-check"></i>
|
|
8
|
-
</span>
|
|
3
|
+
<div class="wrapper-stepper">
|
|
4
|
+
<div class="stepper">
|
|
5
|
+
<div class="stepper-progress" v-if="mostrarPassos">
|
|
6
|
+
<div class="stepper-progress-bar" :style="'width:' + stepperProgress"></div>
|
|
9
7
|
</div>
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
|
|
9
|
+
<div
|
|
10
|
+
class="stepper-item"
|
|
11
|
+
v-if="mostrarPassos"
|
|
12
|
+
:class="{ current: step == item, success: step > item }"
|
|
13
|
+
v-for="item in etapa"
|
|
14
|
+
:key="item"
|
|
15
|
+
>
|
|
16
|
+
<div class="stepper-item-counter">
|
|
17
|
+
<img
|
|
18
|
+
class="icon-success"
|
|
19
|
+
src="https://www.seekpng.com/png/full/1-10353_check-mark-green-png-green-check-mark-svg.png"
|
|
20
|
+
alt=""
|
|
21
|
+
/>
|
|
22
|
+
<span class="number">
|
|
23
|
+
{{ item }}
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="stepper-item-title text-center">{{ legenda[item - 1] }}</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div class="stepper-content" v-for="item in etapa" :key="item">
|
|
31
|
+
<div class="stepper-pane" v-if="step == item">
|
|
32
|
+
<slot :name="step"></slot>
|
|
12
33
|
</div>
|
|
13
|
-
</
|
|
14
|
-
|
|
34
|
+
</div>
|
|
35
|
+
<div class="controls">
|
|
36
|
+
<button class="btn" @click="step--" v-if="step != 1">Anterior</button>
|
|
37
|
+
<button
|
|
38
|
+
v-if="step < etapa"
|
|
39
|
+
class="btn btn--green-1"
|
|
40
|
+
@click="step++"
|
|
41
|
+
:disabled="!formValido(formNome[step - 1])"
|
|
42
|
+
>
|
|
43
|
+
Próximo
|
|
44
|
+
</button>
|
|
45
|
+
<div class="slot-final" v-else>
|
|
46
|
+
<slot name="finalizar"></slot>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
15
50
|
</div>
|
|
16
51
|
</template>
|
|
17
52
|
|
|
18
53
|
<script>
|
|
54
|
+
import { mapGetters, mapActions, mapMutations } from "vuex";
|
|
55
|
+
|
|
19
56
|
export default {
|
|
20
57
|
name: "Wizard",
|
|
58
|
+
props: {
|
|
59
|
+
etapa: Number,
|
|
60
|
+
legenda: Array,
|
|
61
|
+
formNome: Array,
|
|
62
|
+
mostrarPassos: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: true,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
step: 1,
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
computed: {
|
|
73
|
+
...mapGetters("validation", ["formValido"]),
|
|
74
|
+
stepperProgress() {
|
|
75
|
+
return (100 / this.etapa) * (this.step - 1) + "%";
|
|
76
|
+
},
|
|
77
|
+
},
|
|
21
78
|
};
|
|
22
79
|
</script>
|
|
23
80
|
|
|
24
|
-
<style scoped
|
|
81
|
+
<style scoped>
|
|
82
|
+
.tx-green-1 {
|
|
83
|
+
color: #75cc65;
|
|
84
|
+
}
|
|
85
|
+
.wrapper-stepper {
|
|
86
|
+
background-color: #fff;
|
|
87
|
+
padding: 0px;
|
|
88
|
+
border-radius: 32px;
|
|
89
|
+
box-shadow: rgba(0, 0, 0, 0.09);
|
|
90
|
+
}
|
|
91
|
+
.stepper {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: space-between;
|
|
95
|
+
position: relative;
|
|
96
|
+
z-index: 0;
|
|
97
|
+
margin-bottom: 24px;
|
|
98
|
+
margin-left: 80px;
|
|
99
|
+
margin-right: 80px;
|
|
100
|
+
}
|
|
101
|
+
.stepper-progress {
|
|
102
|
+
position: absolute;
|
|
103
|
+
background-color: #dddada;
|
|
104
|
+
height: 1px;
|
|
105
|
+
z-index: -1;
|
|
106
|
+
left: 0;
|
|
107
|
+
right: 0;
|
|
108
|
+
margin: 0 auto;
|
|
109
|
+
}
|
|
110
|
+
.stepper-progress-bar {
|
|
111
|
+
position: absolute;
|
|
112
|
+
left: 0;
|
|
113
|
+
height: 100%;
|
|
114
|
+
width: 0%;
|
|
115
|
+
background-color: #75cc65;
|
|
116
|
+
transition: all 500ms ease;
|
|
117
|
+
}
|
|
118
|
+
.stepper-item {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
align-items: center;
|
|
122
|
+
color: #c5c5c5;
|
|
123
|
+
transition: all 500ms ease;
|
|
124
|
+
}
|
|
125
|
+
.stepper-item-counter {
|
|
126
|
+
height: 38px;
|
|
127
|
+
width: 38px;
|
|
128
|
+
display: grid;
|
|
129
|
+
place-items: center;
|
|
130
|
+
background-color: #fff;
|
|
131
|
+
border-radius: 100%;
|
|
132
|
+
border: 1px solid #c5c5c5;
|
|
133
|
+
position: relative;
|
|
134
|
+
}
|
|
135
|
+
.stepper-item-counter .icon-success {
|
|
136
|
+
position: absolute;
|
|
137
|
+
opacity: 0;
|
|
138
|
+
transform: scale(0);
|
|
139
|
+
width: 20px;
|
|
140
|
+
transition: all 500ms ease;
|
|
141
|
+
}
|
|
142
|
+
.stepper-item-counter .number {
|
|
143
|
+
font-size: 15px;
|
|
144
|
+
transition: all 500ms ease;
|
|
145
|
+
}
|
|
146
|
+
.stepper-item-title {
|
|
147
|
+
position: absolute;
|
|
148
|
+
padding-top: 40px;
|
|
149
|
+
width: 40px;
|
|
150
|
+
margin-left: -16px;
|
|
151
|
+
}
|
|
152
|
+
.stepper-item.success .stepper-item-counter {
|
|
153
|
+
border-color: #75cc65;
|
|
154
|
+
background-color: #c8ebc1;
|
|
155
|
+
color: #fff;
|
|
156
|
+
}
|
|
157
|
+
.stepper-item.success .stepper-item-counter .icon-success {
|
|
158
|
+
opacity: 1;
|
|
159
|
+
transform: scale(1);
|
|
160
|
+
}
|
|
161
|
+
.stepper-item.success .stepper-item-counter .number {
|
|
162
|
+
opacity: 0;
|
|
163
|
+
transform: scale(0);
|
|
164
|
+
}
|
|
165
|
+
.stepper-item.success .stepper-item-title {
|
|
166
|
+
color: #75cc65;
|
|
167
|
+
}
|
|
168
|
+
.stepper-item.current .stepper-item-counter {
|
|
169
|
+
border-color: #4ab4e2;
|
|
170
|
+
background-color: #4ab4e2;
|
|
171
|
+
color: #fff;
|
|
172
|
+
}
|
|
173
|
+
.stepper-item.current .stepper-item-title {
|
|
174
|
+
color: #818181;
|
|
175
|
+
}
|
|
176
|
+
.stepper-pane {
|
|
177
|
+
color: #333;
|
|
178
|
+
margin: 40px 0;
|
|
179
|
+
}
|
|
180
|
+
.controls {
|
|
181
|
+
display: flex;
|
|
182
|
+
}
|
|
183
|
+
.btn {
|
|
184
|
+
padding: 8px 12px;
|
|
185
|
+
cursor: pointer;
|
|
186
|
+
border: none;
|
|
187
|
+
border-radius: 40px !important;
|
|
188
|
+
font-size: 13px !important;
|
|
189
|
+
font-weight: normal;
|
|
190
|
+
font-style: normal !important;
|
|
191
|
+
letter-spacing: 1px !important;
|
|
192
|
+
background: #577696;
|
|
193
|
+
border-color: #577696;
|
|
194
|
+
color: #fff;
|
|
195
|
+
-webkit-box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
196
|
+
-moz-box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
|
|
197
|
+
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
198
|
+
}
|
|
199
|
+
.btn:disabled {
|
|
200
|
+
opacity: 0.5;
|
|
201
|
+
pointer-events: none;
|
|
202
|
+
}
|
|
203
|
+
.btn--green-1 {
|
|
204
|
+
background: #577696;
|
|
205
|
+
border-color: #577696;
|
|
206
|
+
color: #fff;
|
|
207
|
+
margin-left: auto;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.slot-final {
|
|
211
|
+
margin-left: auto;
|
|
212
|
+
}
|
|
213
|
+
</style>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:formNome="formNome"
|
|
9
9
|
:mascara="['(##) ####-####', '(##) #####-####']"
|
|
10
10
|
:tamanhoMaximo="20"
|
|
11
|
+
:requerido="requerido"
|
|
11
12
|
v-model="dadosContato.telefone"
|
|
12
13
|
/>
|
|
13
14
|
</b-col>
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
:formNome="formNome"
|
|
19
20
|
mascara=""
|
|
20
21
|
:tamanhoMaximo="100"
|
|
22
|
+
:requerido="requerido"
|
|
21
23
|
v-model="dadosContato.site"
|
|
22
24
|
/>
|
|
23
25
|
</b-col>
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
:formNome="formNome"
|
|
29
31
|
mascara=""
|
|
30
32
|
:tamanhoMaximo="100"
|
|
33
|
+
:requerido="requerido"
|
|
31
34
|
v-model="dadosContato.email"
|
|
32
35
|
/>
|
|
33
36
|
</b-col>
|
|
@@ -47,6 +50,10 @@ export default {
|
|
|
47
50
|
name: "DadosContato",
|
|
48
51
|
props: {
|
|
49
52
|
formNome: String,
|
|
53
|
+
requerido: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
50
57
|
value: Object,
|
|
51
58
|
},
|
|
52
59
|
components: { Opcoes, Texto, Botao },
|
|
@@ -55,6 +62,9 @@ export default {
|
|
|
55
62
|
dadosContato: new DadosContato(),
|
|
56
63
|
};
|
|
57
64
|
},
|
|
65
|
+
mounted() {
|
|
66
|
+
if (this.value.telefone != undefined) this.dadosContato = this.value;
|
|
67
|
+
},
|
|
58
68
|
methods: {
|
|
59
69
|
carregaDados(dados) {
|
|
60
70
|
this.dadosContato.telefone = dados.telefone;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
:formNome="formNome"
|
|
22
22
|
:mascara="['##.###.###/####-##', '###.###.###-##']"
|
|
23
23
|
:tamanhoMaximo="30"
|
|
24
|
+
:requerido="requerido"
|
|
24
25
|
v-model="dadosPessoa.cnpjCpf"
|
|
25
26
|
><div class="glyphicon margem-botao">
|
|
26
27
|
<Botao
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
campo="inscricaoEstadualRg"
|
|
41
42
|
:formNome="formNome"
|
|
42
43
|
:tamanhoMaximo="50"
|
|
44
|
+
:requerido="requerido"
|
|
43
45
|
v-model="dadosPessoa.inscricaoEstadualRg"
|
|
44
46
|
/>
|
|
45
47
|
</b-col>
|
|
@@ -50,6 +52,7 @@
|
|
|
50
52
|
campo="inscricaoMunicipal"
|
|
51
53
|
:formNome="formNome"
|
|
52
54
|
:tamanhoMaximo="50"
|
|
55
|
+
:requerido="requerido"
|
|
53
56
|
v-model="dadosPessoa.inscricaoMunicipal"
|
|
54
57
|
/>
|
|
55
58
|
</b-col>
|
|
@@ -92,15 +95,21 @@ export default {
|
|
|
92
95
|
name: "DadosPessoa",
|
|
93
96
|
props: {
|
|
94
97
|
formNome: String,
|
|
98
|
+
requerido: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false,
|
|
101
|
+
},
|
|
95
102
|
value: Object,
|
|
96
103
|
},
|
|
97
104
|
components: { Opcoes, Texto, Botao },
|
|
98
|
-
|
|
99
105
|
data() {
|
|
100
106
|
return {
|
|
101
107
|
dadosPessoa: new DadosPessoa(),
|
|
102
108
|
};
|
|
103
109
|
},
|
|
110
|
+
mounted() {
|
|
111
|
+
if (this.value.razaoSocialNome != undefined) this.dadosPessoa = this.value;
|
|
112
|
+
},
|
|
104
113
|
methods: {
|
|
105
114
|
...mapMutations("generic", ["insereEvento", "insereNotificacao", "removeCarregando"]),
|
|
106
115
|
buscarCnpjReceita() {
|