@nixweb/nixloc-ui 0.0.84 → 0.0.87

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.84",
3
+ "version": "0.0.87",
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
 
@@ -153,11 +153,11 @@ export default {
153
153
  width: 35px;
154
154
  height: 35px;
155
155
  padding-top: 5px;
156
- margin-left: 25px;
156
+ margin-left: 38px;
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;
@@ -170,6 +170,7 @@ export default {
170
170
  font-weight: 400;
171
171
  margin-top: -6px;
172
172
  text-align: center;
173
+ width: 100%;
173
174
  }
174
175
  .titulo-sub {
175
176
  margin-left: 5px;
@@ -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: {
@@ -23,7 +23,7 @@ import Painel from "@nixweb/nixloc-ui/src/component/layout/Painel";
23
23
  import SalvarCancelar from "@nixweb/nixloc-ui/src/component/shared/SalvarCancelar";
24
24
 
25
25
  export default {
26
- name: "InserirEditarModeloView",
26
+ name: "ModeloAdicionarModificarView",
27
27
  components: { Painel, SalvarCancelar },
28
28
  props: {
29
29
  painel: Object,
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <div>
3
+ <slot name="conteudo-botoes"></slot>
4
+ <Pesquisa />
5
+ <br />
6
+ <ModeloLista :modeloLista="modeloLista" :botaoExcluir="botaoExcluir">
7
+ <div slot="conteudo-botoes-tabela-cabecalho">
8
+ <slot name="conteudo-botoes-tabela-cabecalho"></slot>
9
+ </div>
10
+ <div slot="conteudo-filtro-horizontal">
11
+ <slot name="conteudo-filtro-horizontal"></slot>
12
+ </div>
13
+ <div slot="conteudo-botoes-tabela">
14
+ <slot name="conteudo-botoes-tabela"></slot>
15
+ </div>
16
+ </ModeloLista>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import Pesquisa from "../shared/Pesquisa.vue";
22
+
23
+ import ModeloLista from "@nixweb/nixloc-ui/src/component/template/ModeloLista.vue";
24
+
25
+ export default {
26
+ name: "ModeloView",
27
+ components: { Pesquisa, ModeloLista },
28
+ props: {
29
+ modeloLista: Object,
30
+ botaoExcluir: {
31
+ type: Boolean,
32
+ default: true,
33
+ },
34
+ },
35
+ };
36
+ </script>