@nixweb/nixloc-ui 0.0.63 → 0.0.64

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.63",
3
+ "version": "0.0.64",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -11,20 +11,9 @@
11
11
  class="requerido glyphicon fas fa-exclamation-triangle"
12
12
  ></i>
13
13
  <slot v-else></slot>
14
- <!-- <vue-numeric
15
- class="form-control"
16
- v-on:keyup.enter.native="apertouEnter"
17
- :class="{ 'is-invalid': notificacoes.length > 0 && formSujo }"
18
- :placeholder="placeholder"
19
- :disabled="desabilitado"
20
- separator="."
21
- v-bind:precision="1"
22
- v-model="valor"
23
- ></vue-numeric>-->
24
14
  <input
25
15
  class="form-control"
26
16
  type="number"
27
- v-int
28
17
  v-model="valor"
29
18
  @keyup.enter.prevent="apertouEnter"
30
19
  />
@@ -40,13 +29,12 @@
40
29
 
41
30
  <script>
42
31
  import Dica from "../shared/Dica.vue";
43
- import VueNumeric from "vue-numeric";
44
32
 
45
33
  import { mapState, mapMutations } from "vuex";
46
34
 
47
35
  export default {
48
36
  name: "Numero",
49
- components: { Dica, VueNumeric },
37
+ components: { Dica },
50
38
  props: {
51
39
  titulo: String,
52
40
  campo: String,
@@ -54,6 +42,10 @@ export default {
54
42
  desabilitado: Boolean,
55
43
  formNome: String,
56
44
  requerido: Boolean,
45
+ tipo: {
46
+ type: String,
47
+ default: "float",
48
+ },
57
49
  value: Number,
58
50
  alterou: Function,
59
51
  enter: Function,
@@ -72,7 +64,11 @@ export default {
72
64
  },
73
65
 
74
66
  methods: {
75
- ...mapMutations("validation", ["insereValidacao", "removeValidacao"]),
67
+ ...mapMutations("validation", [
68
+ "insereValidacao",
69
+ "removeValidacao",
70
+ "insereFormSujo",
71
+ ]),
76
72
  valida() {
77
73
  this.notificacoes = [];
78
74
  if (this.value == 0) return;
@@ -96,7 +92,14 @@ export default {
96
92
  valor() {
97
93
  this.valida();
98
94
  this.formSujo = true;
99
- this.$emit("input", this.valor);
95
+ this.insereFormSujo(true);
96
+
97
+ let valor;
98
+ if (this.tipo === "int") valor = parseInt(this.valor);
99
+ if (this.tipo === "float") valor = parseFloat(this.valor);
100
+
101
+ this.valor = valor;
102
+ this.$emit("input", valor);
100
103
  },
101
104
  notificacoes() {
102
105
  let self = this;
@@ -16,6 +16,9 @@
16
16
 
17
17
  <script>
18
18
  import Dica from "../shared/Dica.vue";
19
+
20
+ import { mapState, mapMutations } from "vuex";
21
+
19
22
  export default {
20
23
  components: { Dica },
21
24
  name: "Opcoes",
@@ -25,12 +28,16 @@ export default {
25
28
  selecionado: this.value,
26
29
  };
27
30
  },
31
+ methods: {
32
+ ...mapMutations("validation", ["insereFormSujo"]),
33
+ },
28
34
  watch: {
29
35
  value() {
30
36
  this.selecionado = this.value;
31
37
  },
32
38
  selecionado() {
33
39
  this.$emit("input", this.selecionado);
40
+ this.insereFormSujo(true);
34
41
  if (this.alterou) this.alterou();
35
42
  },
36
43
  },
@@ -41,3 +48,4 @@ export default {
41
48
  margin-top: 5px;
42
49
  }
43
50
  </style>
51
+
@@ -8,7 +8,7 @@
8
8
  :class="sessaoDestaque('home')"
9
9
  >
10
10
  <div class="div-icone lado-a-lado" :style="'background-color:' + corBase">
11
- <i class="fa fa-home icone" aria-hidden="true"></i>
11
+ <i class="fas fa-chart-area icone" aria-hidden="true"></i>
12
12
  </div>
13
13
  <div class="lado-a-lado titulo">Dashboard</div>
14
14
  </a>
@@ -133,7 +133,7 @@ export default {
133
133
  .div-icone {
134
134
  width: 30px;
135
135
  height: 30px;
136
- padding-left: 6px;
136
+ text-align: center;
137
137
  padding-top: 3px;
138
138
  border-radius: 8px;
139
139
  }
@@ -147,6 +147,5 @@ export default {
147
147
  margin-left: 15px;
148
148
  }
149
149
 
150
- .seta {
151
- }
150
+
152
151
  </style>
@@ -102,7 +102,8 @@ export default {
102
102
  });
103
103
  },
104
104
  beforeDestroy() {
105
- this.atualizaCampoPesquisa("");
105
+ let pesquisa = { conteudo: "", filtro: { conteudo: "contem", id: "contem" } };
106
+ this.atualizaCampoPesquisa(pesquisa);
106
107
  },
107
108
  computed: {
108
109
  ...mapState("generic", [