@nixweb/nixloc-ui 0.0.85 → 0.0.88

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nixweb/nixloc-ui",
3
- "version": "0.0.85",
3
+ "version": "0.0.88",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -179,7 +179,6 @@ export default {
179
179
  this.obterTodos();
180
180
  },
181
181
  aoSelecionar(value) {
182
- if (this.marcarFormSujo) this.insereFormSujo(true);
183
182
  this.$emit("input", value);
184
183
  if (this.alterou) this.alterou();
185
184
  if (this.campoAlvo) {
@@ -249,6 +248,7 @@ export default {
249
248
  "value.id": function () {
250
249
  this.valida();
251
250
  this.formSujo = true;
251
+ if (this.marcarFormSujo) this.insereFormSujo(true);
252
252
  this.valorAtual = { id: this.value.id, conteudo: this.value.conteudo };
253
253
  },
254
254
  notificacoes() {
@@ -318,7 +318,7 @@ div.depois-lista {
318
318
  }
319
319
 
320
320
  .cadastrar-novo-titulo {
321
- color: #577696;
321
+ font-size: 18px;
322
322
  margin-bottom: 5px;
323
323
  }
324
324
  </style>
@@ -47,6 +47,10 @@ export default {
47
47
  type: String,
48
48
  default: "float",
49
49
  },
50
+ marcarFormSujo: {
51
+ type: Boolean,
52
+ default: true,
53
+ },
50
54
  value: Number,
51
55
  alterou: Function,
52
56
  enter: Function,
@@ -104,7 +108,7 @@ export default {
104
108
 
105
109
  this.$emit("input", valor);
106
110
  this.formSujo = true;
107
- this.insereFormSujo(true);
111
+ if (this.marcarFormSujo) this.insereFormSujo(true);
108
112
 
109
113
  this.valor = valor;
110
114
  },
@@ -138,7 +142,6 @@ export default {
138
142
  </script>
139
143
 
140
144
  <style scoped>
141
-
142
145
  .sucesso {
143
146
  color: #94aa2a;
144
147
  font-size: 14px;
@@ -41,7 +41,6 @@ import { mapState, mapMutations } from "vuex";
41
41
  export default {
42
42
  components: { Dica },
43
43
  name: "Texto",
44
- mixins: [],
45
44
  props: [
46
45
  "titulo",
47
46
  "campo",
@@ -57,6 +56,7 @@ export default {
57
56
  "enter",
58
57
  "limpou",
59
58
  "saiu",
59
+ "marcarFormSujo",
60
60
  ],
61
61
  data() {
62
62
  return {
@@ -113,7 +113,9 @@ export default {
113
113
  value() {
114
114
  this.valida();
115
115
  this.formSujo = true;
116
- this.insereFormSujo(true);
116
+ // inverti a validação devido não colocar o default como true no props
117
+ var valor = this.marcarFormSujo == undefined ? true : this.marcarFormSujo;
118
+ if (valor) this.insereFormSujo(true);
117
119
  },
118
120
  notificacoes() {
119
121
  let self = this;
@@ -145,7 +147,6 @@ export default {
145
147
  </script>
146
148
 
147
149
  <style scoped>
148
-
149
150
  .sucesso {
150
151
  color: #94aa2a;
151
152
  font-size: 14px;
@@ -45,7 +45,7 @@ export default {
45
45
  overflow: hidden;
46
46
  z-index: 20;
47
47
  padding: 18px;
48
- margin-left: 220px;
48
+ margin-left: 100px;
49
49
  }
50
50
 
51
51
  .tamanho {
@@ -140,7 +140,7 @@ export default {
140
140
 
141
141
  <style scoped>
142
142
  .menu-aberto {
143
- width: 277px;
143
+ width: 350px;
144
144
  z-index: 1000;
145
145
  }
146
146
 
@@ -157,7 +157,7 @@ export default {
157
157
  }
158
158
 
159
159
  .icone-fechar {
160
- margin-right: 20px;
160
+ margin-right: 60px;
161
161
  }
162
162
  .icone {
163
163
  font-size: 20px;
@@ -1,19 +1,26 @@
1
1
  <template>
2
- <div :class="{ 'div-mensagem': !modal.abrir }" v-if="notificacoes.length > 0">
3
- <div v-for="notificacao in notificacoes">
4
- <Alerta tipo="perigo">
5
- {{ notificacao.mensagem }}
6
- </Alerta>
7
- </div>
8
- <b-alert
9
- v-show="false"
10
- :show="contagemRegressiva"
11
- dismissible
12
- variant="danger"
13
- @dismissed="contagemRegressiva = 0"
14
- @dismiss-count-down="contagemRegressivaAlterada"
2
+ <div>
3
+ <div
4
+ :class="{ 'div-mensagem': !modal.abrir }"
5
+ v-if="notificacaoArmazenada.length > 0"
15
6
  >
16
- </b-alert>
7
+ <div>
8
+ <Alerta tipo="perigo">
9
+ <div v-for="notificacao in notificacaoArmazenada">
10
+ {{ notificacao.mensagem }}
11
+ </div>
12
+ </Alerta>
13
+ </div>
14
+ <b-alert
15
+ v-show="false"
16
+ :show="contagemRegressiva"
17
+ dismissible
18
+ variant="danger"
19
+ @dismissed="contagemRegressiva = 0"
20
+ @dismiss-count-down="contagemRegressivaAlterada"
21
+ >
22
+ </b-alert>
23
+ </div>
17
24
  </div>
18
25
  </template>
19
26
 
@@ -28,6 +35,7 @@ export default {
28
35
  return {
29
36
  maximoSegundos: 10,
30
37
  contagemRegressiva: 10,
38
+ notificacaoArmazenada: [],
31
39
  };
32
40
  },
33
41
  computed: {
@@ -35,10 +43,16 @@ export default {
35
43
  },
36
44
  watch: {
37
45
  notificacoes() {
38
- if (this.notificacoes.length > 0) this.contagemRegressiva = 5;
46
+ if (this.notificacoes.length > 0) {
47
+ this.notificacaoArmazenada = this.notificacoes;
48
+ this.contagemRegressiva = 5;
49
+ }
39
50
  },
40
51
  contagemRegressiva() {
41
- if (this.contagemRegressiva === 0) this.removeNotificacao();
52
+ if (this.contagemRegressiva === 0) {
53
+ this.notificacaoArmazenada = [];
54
+ this.removeNotificacao();
55
+ }
42
56
  },
43
57
  },
44
58
  methods: {
@@ -1,9 +1,17 @@
1
1
  <template>
2
2
  <div>
3
3
  <slot name="conteudo-botoes"></slot>
4
- <Pesquisa />
5
- <br />
6
- <ModeloLista :modeloLista="modeloLista" :botaoExcluir="botaoExcluir">
4
+ <div v-if="mostrarPesquisa">
5
+ <Pesquisa />
6
+ <br />
7
+ </div>
8
+
9
+ <ModeloLista
10
+ :modeloLista="modeloLista"
11
+ :mostrarMoldura="false"
12
+ :mostrarFiltroHorizontal="mostrarFiltroHorizontal"
13
+ :botaoExcluir="botaoExcluir"
14
+ >
7
15
  <div slot="conteudo-botoes-tabela-cabecalho">
8
16
  <slot name="conteudo-botoes-tabela-cabecalho"></slot>
9
17
  </div>
@@ -27,6 +35,14 @@ export default {
27
35
  components: { Pesquisa, ModeloLista },
28
36
  props: {
29
37
  modeloLista: Object,
38
+ mostrarPesquisa: {
39
+ type: Boolean,
40
+ default: true,
41
+ },
42
+ mostrarFiltroHorizontal: {
43
+ type: Boolean,
44
+ default: true,
45
+ },
30
46
  botaoExcluir: {
31
47
  type: Boolean,
32
48
  default: true,
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div>
3
- <div class="g-div-moldura">
3
+ <div :class="{ 'g-div-moldura': mostrarMoldura }">
4
4
  <b-row>
5
5
  <b-col sm="12"
6
6
  ><div>
7
- <FiltroHorizontal>
7
+ <FiltroHorizontal v-if="mostrarFiltroHorizontal">
8
8
  <div slot="conteudo-filtro-horizontal">
9
9
  <slot name="conteudo-filtro-horizontal"></slot>
10
10
  </div>
@@ -62,6 +62,14 @@ export default {
62
62
  name: "ModeloLista",
63
63
  props: {
64
64
  modeloLista: Object,
65
+ mostrarMoldura: {
66
+ type: Boolean,
67
+ default: true,
68
+ },
69
+ mostrarFiltroHorizontal: {
70
+ type: Boolean,
71
+ default: true,
72
+ },
65
73
  botaoExcluir: {
66
74
  type: Boolean,
67
75
  default: true,
@@ -8,6 +8,7 @@
8
8
  :formNome="formNome"
9
9
  :mascara="'#####-###'"
10
10
  :tamanhoMaximo="9"
11
+ :requerido="requerido"
11
12
  v-model="endereco.cep"
12
13
  >
13
14
  <div class="glyphicon margem-botao">
@@ -27,6 +28,7 @@
27
28
  campo="logradouro"
28
29
  :formNome="formNome"
29
30
  :tamanhoMaximo="150"
31
+ :requerido="requerido"
30
32
  v-model="endereco.logradouro"
31
33
  />
32
34
  </b-col>
@@ -57,6 +59,7 @@
57
59
  campo="bairro"
58
60
  :formNome="formNome"
59
61
  :tamanhoMaximo="100"
62
+ :requerido="requerido"
60
63
  v-model="endereco.bairro"
61
64
  /> </b-col
62
65
  ><b-col xs="12" sm="12" md="12" lg="5" xl="5">
@@ -65,6 +68,7 @@
65
68
  campo="cidade"
66
69
  :formNome="formNome"
67
70
  :tamanhoMaximo="100"
71
+ :requerido="requerido"
68
72
  v-model="endereco.cidade"
69
73
  />
70
74
  </b-col>
@@ -72,6 +76,7 @@
72
76
  <EscolherEstatico
73
77
  titulo="UF"
74
78
  campoAlvo="uf"
79
+ :requerido="requerido"
75
80
  v-model="endereco.estado"
76
81
  :dados="estados"
77
82
  /> </b-col
@@ -93,6 +98,10 @@ export default {
93
98
  name: "Endereco",
94
99
  props: {
95
100
  formNome: String,
101
+ requerido: {
102
+ type: Boolean,
103
+ default: false,
104
+ },
96
105
  value: Object,
97
106
  },
98
107
  components: { Opcoes, Texto, Botao, EscolherEstatico },
@@ -101,33 +110,33 @@ export default {
101
110
  return {
102
111
  endereco: new Endereco(),
103
112
  estados: [
104
- { titulo: "AC", valor: "AC" },
105
- { titulo: "AL", valor: "AL" },
106
- { titulo: "AP", valor: "AP" },
107
- { titulo: "AM", valor: "AM" },
108
- { titulo: "BA", valor: "BA" },
109
- { titulo: "CE", valor: "CE" },
110
- { titulo: "DF", valor: "DF" },
111
- { titulo: "ES", valor: "ES" },
112
- { titulo: "GO", valor: "GO" },
113
- { titulo: "MA", valor: "MA" },
114
- { titulo: "MT", valor: "MT" },
115
- { titulo: "MS", valor: "MS" },
116
- { titulo: "MG", valor: "MG" },
117
- { titulo: "PA", valor: "PA" },
118
- { titulo: "PB", valor: "PB" },
119
- { titulo: "PR", valor: "PR" },
120
- { titulo: "PE", valor: "PE" },
121
- { titulo: "PI", valor: "PI" },
122
- { titulo: "RJ", valor: "RJ" },
123
- { titulo: "RN", valor: "RN" },
124
- { titulo: "RS", valor: "RS" },
125
- { titulo: "RO", valor: "RO" },
126
- { titulo: "RR", valor: "RR" },
127
- { titulo: "SC", valor: "SC" },
128
- { titulo: "SP", valor: "SP" },
129
- { titulo: "SE", valor: "SE" },
130
- { titulo: "TO", valor: "TO" },
113
+ { conteudo: "AC", id: "AC" },
114
+ { conteudo: "AL", id: "AL" },
115
+ { conteudo: "AP", id: "AP" },
116
+ { conteudo: "AM", id: "AM" },
117
+ { conteudo: "BA", id: "BA" },
118
+ { conteudo: "CE", id: "CE" },
119
+ { conteudo: "DF", id: "DF" },
120
+ { conteudo: "ES", id: "ES" },
121
+ { conteudo: "GO", id: "GO" },
122
+ { conteudo: "MA", id: "MA" },
123
+ { conteudo: "MT", id: "MT" },
124
+ { conteudo: "MS", id: "MS" },
125
+ { conteudo: "MG", id: "MG" },
126
+ { conteudo: "PA", id: "PA" },
127
+ { conteudo: "PB", id: "PB" },
128
+ { conteudo: "PR", id: "PR" },
129
+ { conteudo: "PE", id: "PE" },
130
+ { conteudo: "PI", id: "PI" },
131
+ { conteudo: "RJ", id: "RJ" },
132
+ { conteudo: "RN", id: "RN" },
133
+ { conteudo: "RS", id: "RS" },
134
+ { conteudo: "RO", id: "RO" },
135
+ { conteudo: "RR", id: "RR" },
136
+ { conteudo: "SC", id: "SC" },
137
+ { conteudo: "SP", id: "SP" },
138
+ { conteudo: "SE", id: "SE" },
139
+ { conteudo: "TO", id: "TO" },
131
140
  ],
132
141
  };
133
142
  },