@nixweb/nixloc-ui 0.0.67 → 0.0.70

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.67",
3
+ "version": "0.0.70",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -43,10 +43,11 @@
43
43
  ></vue-loading>
44
44
  </button>
45
45
  </div>
46
- <br />
47
- <Alerta tipo="info" v-if="value">
48
- <span>{{ mensagem }}</span>
49
- </Alerta>
46
+ <div class="div-alerta">
47
+ <Alerta tipo="info" v-if="value">
48
+ <span>{{ mensagem }}</span>
49
+ </Alerta>
50
+ </div>
50
51
  </div>
51
52
  </div>
52
53
  </template>
@@ -80,7 +81,7 @@ export default {
80
81
  };
81
82
  },
82
83
  methods: {
83
- ...mapActions("generic", ["adicionarArquivoApi", "removerArquivoApi"]),
84
+ ...mapActions("generic", ["postFileApi", "deleteFileApi"]),
84
85
  carregar() {
85
86
  this.arquivo = this.$refs.arquivo.files[0];
86
87
  let params = {
@@ -91,10 +92,10 @@ export default {
91
92
  aceitos: this.aceitos,
92
93
  };
93
94
  this.carregandoAdicionar = true;
94
- this.adicionarArquivoApi(params).then((response) => {
95
+ this.postFileApi(params).then((response) => {
95
96
  if (response.sucesso) {
96
97
  if (this.aoCarregar) this.aoCarregar();
97
- this.$emit("input", response.dados);
98
+ this.$emit("input", response.conteudo);
98
99
  } else {
99
100
  this.limpar();
100
101
  }
@@ -109,7 +110,7 @@ export default {
109
110
  };
110
111
  this.carregandoRemover = true;
111
112
  let params = { url: this.urlRemover, obj: props };
112
- this.removerArquivoApi(params).then((response) => {
113
+ this.deleteFileApi(params).then((response) => {
113
114
  if (response.sucesso) {
114
115
  if (this.aoCarregar) this.aoCarregar();
115
116
  this.limpar();
@@ -170,6 +171,7 @@ export default {
170
171
  color: #fff;
171
172
  border-color: #f0134d;
172
173
  background: #f0134d;
174
+ margin-left: 5px;
173
175
  }
174
176
 
175
177
  .perigo:hover {
@@ -188,4 +190,10 @@ export default {
188
190
  top: 0;
189
191
  opacity: 0;
190
192
  }
193
+
194
+ .div-alerta{
195
+ margin-top:15px;
196
+ }
197
+
198
+
191
199
  </style>
@@ -91,7 +91,7 @@ export default {
91
91
  }
92
92
 
93
93
  .pequeno {
94
- padding: 5px 10px;
94
+ padding: 4px 8px;
95
95
  font-size: 13px;
96
96
  }
97
97
 
@@ -5,6 +5,7 @@
5
5
  v-model="selecionado"
6
6
  :options="opcoes"
7
7
  :stacked="empilhado"
8
+ @click.native="executar"
8
9
  ></b-form-checkbox-group>
9
10
  </b-form-group>
10
11
  </div>
@@ -16,6 +17,10 @@ export default {
16
17
  props: {
17
18
  titulo: String,
18
19
  opcoes: Array,
20
+ params: Object,
21
+ alterou: Function,
22
+ clicou: Function,
23
+ valorInicial: Array,
19
24
  value: Array,
20
25
  empilhado: {
21
26
  type: Boolean,
@@ -28,11 +33,22 @@ export default {
28
33
  };
29
34
  },
30
35
  mounted() {
31
- this.selecionado = this.value;
36
+ this.selecionado = this.valorInicial;
37
+ },
38
+ methods: {
39
+ executar(event) {
40
+ this.$emit("input", this.selecionado);
41
+ let self = this;
42
+ setTimeout(function () {
43
+ // adicionado o pointerId para previnir que não seja executado em duplicidade
44
+ if (self.clicou && event.pointerId === 1) self.clicou(self.params);
45
+ }, 100);
46
+ },
32
47
  },
33
48
  watch: {
34
49
  selecionado() {
35
50
  this.$emit("input", this.selecionado);
51
+ if (this.alterou) this.alterou(this.params);
36
52
  },
37
53
  },
38
54
  };
@@ -152,6 +152,9 @@ export default {
152
152
  </script>
153
153
 
154
154
  <style scoped>
155
+ .titulo {
156
+ color: #5f7587;
157
+ }
155
158
  .sucesso {
156
159
  color: #94aa2a;
157
160
  font-size: 14px;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <label>
4
- <span>{{ titulo }}</span>
4
+ <span class="titulo">{{ titulo }}</span>
5
5
  <span class="requerido" v-if="requerido">*</span>
6
6
  <Dica :campo="campo" :formNome="formNome" />
7
7
  </label>
@@ -282,6 +282,9 @@ export default {
282
282
  </script>
283
283
 
284
284
  <style scoped>
285
+ .titulo {
286
+ color: #5f7587;
287
+ }
285
288
  div.antes-lista {
286
289
  padding: 8px;
287
290
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <label>
4
- <span>{{ titulo }}</span>
4
+ <span class="titulo">{{ titulo }}</span>
5
5
  </label>
6
6
  <div class="selecione">
7
7
  <multiselect
@@ -119,6 +119,9 @@ export default {
119
119
  </script>
120
120
 
121
121
  <style scoped>
122
+ .titulo {
123
+ color: #5f7587;
124
+ }
122
125
  div.antes-lista {
123
126
  padding: 8px;
124
127
  }
@@ -22,7 +22,7 @@
22
22
  </template>
23
23
 
24
24
  <script>
25
- import Mensagem from "@/component/shared/Mensagem";
25
+ import Mensagem from "@nixweb/nixloc-ui/src/component/shared/Mensagem";
26
26
  import Vodal from "vodal";
27
27
 
28
28
  import { mapState, mapMutations } from "vuex";
@@ -138,6 +138,9 @@ export default {
138
138
  </script>
139
139
 
140
140
  <style scoped>
141
+ .titulo {
142
+ color: #5f7587;
143
+ }
141
144
  .sucesso {
142
145
  color: #94aa2a;
143
146
  font-size: 14px;
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <span>{{ titulo }}</span>
3
+ <span class="titulo">{{ titulo }}</span>
4
4
  <Dica :campo="campo" :formNome="formNome" />
5
5
  <div class="opcoes">
6
6
  <b-form-group>
@@ -47,5 +47,7 @@ export default {
47
47
  .opcoes {
48
48
  margin-top: 5px;
49
49
  }
50
+ .titulo {
51
+ color: #5f7587;
52
+ }
50
53
  </style>
51
-
@@ -145,6 +145,9 @@ export default {
145
145
  </script>
146
146
 
147
147
  <style scoped>
148
+ .titulo{
149
+ color: #5F7587;
150
+ }
148
151
  .sucesso {
149
152
  color: #94aa2a;
150
153
  font-size: 14px;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="principal">
3
3
  <b-row>
4
- <b-col xs="6" sm="6" md="6" lg="4" xl="4">
4
+ <b-col xs="6" sm="6" md="6" lg="6" xl="6">
5
5
  <div class="lado-a-lado titulo">{{ titulo }}</div>
6
6
  </b-col>
7
7
  <b-col xs="6" sm="6" md="6" lg="4" xl="4">
@@ -353,7 +353,12 @@ export default {
353
353
  },
354
354
  deleteFileApi: async function (context, params) {
355
355
  context.commit('limpaMetodoExecutadoApi');
356
- return axios.post(params.url, params.obj, {
356
+
357
+ let url = params.url;
358
+ let nome = params.obj.nome;
359
+ let container = params.obj.container;
360
+
361
+ return axios.delete(`${url}?nome=${nome}?container=${container}`, {
357
362
  headers: new Token().tokenHeaders(),
358
363
  })
359
364
  .then((response) => {