@nixweb/nixloc-ui 0.0.37 → 0.0.41

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.37",
3
+ "version": "0.0.41",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -10,20 +10,22 @@
10
10
  "lint": "vue-cli-service lint"
11
11
  },
12
12
  "dependencies": {
13
- "bootstrap-vue": "^2.0.0-rc.11",
14
13
  "@babel/polyfill": "^7.2.5",
14
+ "bootstrap-vue": "^2.0.0-rc.11",
15
+ "sass-loader": "^12.4.0",
15
16
  "vodal": "^2.4.0",
16
17
  "vue-color": "^2.7.0",
17
- "vue-the-mask": "^0.11.1",
18
- "vue2-datepicker": "^2.13.0",
19
- "vue2-editor": "^2.6.6",
18
+ "vue-js-toggle-button": "^1.3.0",
20
19
  "vue-loading-template": "^1.3.0",
21
20
  "vue-moment": "^4.0.0",
22
- "vue-moment-datepicker": "^1.0.5",
23
21
  "vue-multiselect": "^2.1.0",
24
22
  "vue-numeric": "^2.4.1",
23
+ "vue-the-mask": "^0.11.1",
25
24
  "vue-toasted": "^1.1.28",
26
- "vue-upload-file": "^1.1.0"
25
+ "vue-toggles": "^1.1.4",
26
+ "vue-upload-file": "^1.1.0",
27
+ "vue2-datepicker": "^2.13.0",
28
+ "vue2-editor": "^2.6.6"
27
29
  },
28
30
  "devDependencies": {
29
31
  "@vue/cli-plugin-babel": "~4.5.0",
@@ -61,4 +63,4 @@
61
63
  "type": "git",
62
64
  "url": "git+https://github.com/nixweb-sistemas/nixloc-ui.git"
63
65
  }
64
- }
66
+ }
@@ -17,13 +17,17 @@
17
17
  :disabled="desabilitado"
18
18
  @click="executar()"
19
19
  >
20
- <i :class="classeIcone" v-if="!carregando(this.chave)"></i>
21
- <span class="titulo" v-if="!carregando(this.chave)">{{ titulo }}</span>
20
+ <i
21
+ class="titulo"
22
+ :class="classeIcone"
23
+ v-if="!carregando(this.chave) && classeIcone"
24
+ ></i>
25
+ <span v-if="!carregando(this.chave)">{{ titulo }}</span>
22
26
  <vue-loading
23
27
  v-if="carregando(this.chave)"
24
28
  type="bubbles"
25
29
  color="#fff"
26
- :size="{ width: '20px', height: '20px' }"
30
+ :size="{ width: '26px', height: '26px' }"
27
31
  ></vue-loading>
28
32
  </button>
29
33
  </div>
@@ -69,7 +73,7 @@ export default {
69
73
  }
70
74
 
71
75
  .titulo {
72
- margin-left: 5px;
76
+ margin-right: 5px;
73
77
  }
74
78
 
75
79
  .botao {
@@ -79,6 +83,7 @@ export default {
79
83
  border-radius: 40px !important;
80
84
  font-size: 14px;
81
85
  font-weight: 400;
86
+ letter-spacing: 0.5px !important;
82
87
  -webkit-box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
83
88
  -moz-box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
84
89
  box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
@@ -11,6 +11,7 @@
11
11
  :options="dados"
12
12
  v-model.trim="valorAtual"
13
13
  :custom-label="rotulo"
14
+ :disabled="desabilitado"
14
15
  placeholder
15
16
  :showLabels="true"
16
17
  :noResult="false"
@@ -55,6 +56,10 @@ export default {
55
56
  formNome: String,
56
57
  campoAlvo: String,
57
58
  valorInicial: Object,
59
+ desabilitado: {
60
+ type: Boolean,
61
+ default: false,
62
+ },
58
63
  dados: Array,
59
64
  value: Object,
60
65
  },
@@ -78,20 +83,15 @@ export default {
78
83
  aoAbrir() {},
79
84
  aoSelecionar(value) {
80
85
  this.$emit("input", value);
81
- let obj = { campoAlvo: this.campoAlvo, valor: value.valor };
86
+ let obj = { campoAlvo: this.campoAlvo, valor: value.id };
82
87
  this.insereFiltro(obj);
83
-
84
- // antigo
85
- this.$store.commit("ADICIONA_TOTAL_REGISTRO_POR_PAGINA", obj.valor);
86
- this.$store.commit("CARREGANDO_FULL", true);
87
- eventBus.$emit("aoSelecionarTotalRegistroPorPagina", obj.valor);
88
88
  },
89
89
  aoPesquisar(value) {},
90
90
  rotulo(value) {
91
- return `${value.titulo}`;
91
+ return `${value.conteudo}`;
92
92
  },
93
93
  limpaEscolherEstatico() {
94
- let objLimpo = { titulo: "", valor: "" };
94
+ let objLimpo = { conteudo: "", id: "" };
95
95
  this.valorAtual = objLimpo;
96
96
  this.$emit("input", objLimpo);
97
97
  this.$refs.multiselect.deactivate();
@@ -104,8 +104,11 @@ export default {
104
104
  },
105
105
  },
106
106
  watch: {
107
- "value.valor": function () {
108
- this.valorAtual = { titulo: this.value.titulo, conteudo: this.value.valor };
107
+ "value.id": function () {
108
+ this.valorAtual = { id: this.value.id, conteudo: this.value.conteudo };
109
+ },
110
+ "valorInicial.id": function () {
111
+ this.valorAtual = { id: this.value.id, conteudo: this.value.conteudo };
109
112
  },
110
113
  },
111
114
  };
@@ -4,7 +4,11 @@
4
4
  <Dica :campo="campo" :formNome="formNome" />
5
5
  <div class="opcoes">
6
6
  <b-form-group>
7
- <b-form-radio-group v-model="selecionado" :options="opcoes"></b-form-radio-group>
7
+ <b-form-radio-group
8
+ v-model="selecionado"
9
+ :options="opcoes"
10
+ :disabled="desabilitado"
11
+ ></b-form-radio-group>
8
12
  </b-form-group>
9
13
  </div>
10
14
  </div>
@@ -15,7 +19,7 @@ import Dica from "../shared/Dica.vue";
15
19
  export default {
16
20
  components: { Dica },
17
21
  name: "Opcoes",
18
- props: ["titulo", "opcoes", "value", "alterou", "campo", "formNome"],
22
+ props: ["titulo", "opcoes", "value", "alterou", "campo", "formNome", "desabilitado"],
19
23
  data() {
20
24
  return {
21
25
  selecionado: this.value,
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <div>
3
+ <VueToggles
4
+ height="30"
5
+ width="90"
6
+ checkedText="On"
7
+ uncheckedText="Off"
8
+ checkedBg="#b4d455"
9
+ uncheckedBg="lightgrey"
10
+ :value="value"
11
+ @click="value = !value"
12
+ />
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ export default {
18
+ name: "Toggle",
19
+ };
20
+ </script>
@@ -30,7 +30,6 @@ export default {
30
30
 
31
31
  <style scoped>
32
32
  .barra {
33
- margin-left: 100px;
34
33
  background-color: white;
35
34
  position: fixed;
36
35
  width: 100%;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div id="page">
3
3
  <div id="header" :style="'background-color:' + corTopo">
4
- <a href="#menu"><span></span></a>
4
+ <!-- <a href="#menu"><span></span></a> -->
5
5
  </div>
6
6
  <nav id="menu">
7
7
  <div id="panel-menu">
@@ -32,7 +32,6 @@
32
32
  </li>
33
33
  </ul>
34
34
  </div>
35
-
36
35
  <ul id="panel-account" data-mm-title="Conta">
37
36
  <li v-for="item in conta" :key="item.titulo">
38
37
  <span class="titulo" @click="navegarPara(item.rotaDestino)">{{
@@ -62,27 +61,26 @@ export default {
62
61
  new Mmenu(
63
62
  document.querySelector("#menu"),
64
63
  {
64
+ backButton: {
65
+ close: true,
66
+ },
65
67
  setSelected: {
66
- hover: true,
67
- parent: true,
68
+ hover: false,
69
+ parent: false,
68
70
  },
69
71
  counters: {
70
72
  add: true,
71
73
  },
74
+ iconbar: {
75
+ use: "(min-width: 450px)",
76
+ top: ['<a href="#/"><span class="fas fa-bars"></span></a>'],
77
+ },
72
78
  searchfield: {
73
79
  add: true,
74
80
  placeholder: "Pesquisar",
75
- splash: "<p>O que você está procurando?</p>",
81
+ splash: "<p>Digite sua pesquisa</p>",
76
82
  title: "Pesquisar",
77
- },
78
- iconbar: {
79
- use: "(min-width: 450px)",
80
- top: ['<a href="/dashboard"><span class="fa fa-home"></span></a>'],
81
- /* bottom: [
82
- '<a href="#/"><span class="fa fa-twitter"></span></a>',
83
- '<a href="#/"><span class="fa fa-facebook"></span></a>',
84
- '<a href="#/"><span class="fa fa-youtube"></span></a>',
85
- ],*/
83
+ noResults: "Nenhum resultado",
86
84
  },
87
85
  iconPanels: {
88
86
  add: true,
@@ -93,8 +91,7 @@ export default {
93
91
  use: "(min-width: 450px)",
94
92
  },
95
93
  expanded: {
96
- use: "(min-width: 992px)",
97
- initial: "closed",
94
+ use: "(min-width: 1000px)",
98
95
  },
99
96
  },
100
97
  navbars: [
@@ -104,17 +101,13 @@ export default {
104
101
  {
105
102
  type: "tabs",
106
103
  content: [
107
- '<a href="#panel-menu"><i class="fa fa-bars"></i> <span style="margin-left:5px"> Menu</span></a>',
104
+ '<a href="#panel-menu"><i class="fas fa-ellipsis-h"></i> <span style="margin-left:5px"> Menu</span></a>',
108
105
  '<a href="#panel-account"><i class="fa fa-user"></i> <span style="margin-left:5px"> Conta</span></a>',
109
106
  ],
110
107
  },
111
108
  {
112
109
  content: ["prev", "breadcrumbs", "close"],
113
110
  },
114
- {
115
- position: "bottom",
116
- content: [],
117
- },
118
111
  ],
119
112
  },
120
113
  {
@@ -25,19 +25,19 @@
25
25
  </div>
26
26
  </div>
27
27
  </div>
28
- <br />
28
+ <br v-show="mostrarBotoes"/>
29
29
  <div class="row" v-show="mostrarBotoes">
30
30
  <div class="col-12" v-show="mostrarBotoes">
31
31
  <slot name="conteudo-botoes"></slot>
32
32
  </div>
33
33
  </div>
34
- <br />
34
+ <br v-show="mostrarBotoes || mostrarPesquisa"/>
35
35
  <div class="row" v-show="mostrarBotoes || mostrarPesquisa">
36
36
  <div class="col-8">
37
37
  <div v-show="mostrarPesquisa"><Pesquisa /></div>
38
38
  </div>
39
39
  </div>
40
- <br />
40
+ <br v-show="mostrarPesquisa"/>
41
41
  <div>
42
42
  <slot name="conteudo-principal"></slot>
43
43
  </div>
@@ -96,9 +96,6 @@ export default {
96
96
  self.mostrarCollapse = true;
97
97
  }, 200);
98
98
  this.removeCarregandoBotao();
99
-
100
- // antigo
101
- eventBus.$emit("maisFiltros");
102
99
  },
103
100
  esconder() {
104
101
  let self = this;
@@ -106,9 +103,6 @@ export default {
106
103
  self.mostrarCollapse = false;
107
104
  }, 200);
108
105
  this.removeCarregandoBotao();
109
-
110
- // antigo
111
- eventBus.$emit("esconderFiltros");
112
106
  },
113
107
  removeCarregandoBotao() {
114
108
  this.removeCarregando(["mostrarCollapse", "esconderCollapse"]);
@@ -20,13 +20,13 @@
20
20
  <EscolherEstatico
21
21
  titulo="Mostrar"
22
22
  campoAlvo="totalPorPagina"
23
- :valorInicial="{ titulo: '10', valor: 10 }"
23
+ :valorInicial="{ conteudo: '10', id: 10 }"
24
24
  :dados="[
25
- { titulo: '10', valor: 10 },
26
- { titulo: '20', valor: 20 },
27
- { titulo: '30', valor: 30 },
28
- { titulo: '50', valor: 50 },
29
- { titulo: '100', valor: 100 },
25
+ { conteudo: '10', id: 10 },
26
+ { conteudo: '20', id: 20 },
27
+ { conteudo: '30', id: 30 },
28
+ { conteudo: '50', id: 50 },
29
+ { conteudo: '100', id: 100 },
30
30
  ]"
31
31
  />
32
32
  </b-col>
@@ -36,3 +36,18 @@ export default {
36
36
  },
37
37
  };
38
38
  </script>
39
+
40
+ <style>
41
+
42
+ .page-item {
43
+ font-size: 13px !important;
44
+ }
45
+
46
+ .page-item.active .page-link {
47
+ font-size: 13px !important;
48
+ z-index: 3 !important;
49
+ color: #fff !important;
50
+ background-color: #d98621 !important;
51
+ border-color: #d98621 !important;
52
+ }
53
+ </style>
@@ -6,7 +6,7 @@
6
6
  <b-badge variant="warning">
7
7
  <span class="c-total">{{ totalRegistro }}</span>
8
8
  </b-badge>
9
- <span>registros</span>
9
+ <span class="registros">registros</span>
10
10
  </span>
11
11
  </div>
12
12
  </div>
@@ -37,4 +37,9 @@ export default {
37
37
  color: white;
38
38
  font-size: 14px;
39
39
  }
40
+
41
+ .registros{
42
+ margin-left: 5px;
43
+ }
44
+
40
45
  </style>
@@ -147,7 +147,7 @@ export default {
147
147
  ...mapActions("generic", ["pdfApi"]),
148
148
  selecionar() {
149
149
  this.adicionaSelecao([]);
150
- if (!this.selecionarTodos) {
150
+ if (this.selecionarTodos) {
151
151
  for (let i in this.dados) {
152
152
  this.selecionados.push(this.dados[i].id);
153
153
  }
@@ -196,11 +196,6 @@ export default {
196
196
  </script>
197
197
 
198
198
  <style scoped>
199
-
200
- table {
201
- border-collapse: initial !important;
202
- }
203
-
204
199
  table tbody tr td {
205
200
  max-width: 350px;
206
201
  }
@@ -225,10 +220,6 @@ table tbody tr td {
225
220
  font-weight: bold;
226
221
  }
227
222
 
228
- .titulo-margem {
229
- padding-bottom: 5px;
230
- }
231
-
232
223
  .tabela-numero {
233
224
  font-size: 16px;
234
225
  font-weight: bold;
@@ -18,7 +18,8 @@
18
18
  </template>
19
19
 
20
20
  <script>
21
- import Painel from "@/component/layout/Painel";
21
+ import Painel from "@nixweb/nixloc-ui/src/component/layout/Painel";
22
+
22
23
 
23
24
  export default {
24
25
  name: "InserirEditarModeloView",
@@ -13,11 +13,11 @@
13
13
  </b-row>
14
14
  <b-row>
15
15
  <b-col sm="6">
16
- <ResumoTabela :resumo="result.resumo" />
16
+ <ResumoTabela :resumo="conteudo.resumo" />
17
17
  </b-col>
18
18
 
19
19
  <b-col sm="6">
20
- <Registro :totalRegistro="result.totalRegistros" />
20
+ <Registro :totalRegistro="conteudo.totalRegistros" />
21
21
  </b-col>
22
22
  </b-row>
23
23
  <BarraFixa posicao="topo" v-show="selecionados.length > 0">
@@ -34,7 +34,7 @@
34
34
  ></BarraFixa>
35
35
  <Tabela
36
36
  :cabecalhoTabela="modeloLista.cabecalhoTabela"
37
- :dados="result.dados"
37
+ :dados="conteudo.dados"
38
38
  :mostrarChecks="modeloLista.mostrarChecks"
39
39
  >
40
40
  <div slot="conteudo-botoes-tabela">
@@ -43,7 +43,7 @@
43
43
  </Tabela>
44
44
  </div>
45
45
  <br />
46
- <Paginacao chave="modeloLista" :totalRegistros="result.totalRegistros" />
46
+ <Paginacao chave="modeloLista" :totalRegistros="conteudo.totalRegistros" />
47
47
  </div>
48
48
  </template>
49
49
 
@@ -78,7 +78,7 @@ export default {
78
78
  },
79
79
  data() {
80
80
  return {
81
- result: {
81
+ conteudo: {
82
82
  dados: [],
83
83
  totalRegistros: 0,
84
84
  },
@@ -130,7 +130,7 @@ export default {
130
130
  let obj = { ...this.baseParams, ...this.propsParams };
131
131
  let params = { url: this.modeloLista.urlGetApi, obj: obj };
132
132
  this.getApi(params).then((response) => {
133
- this.result = response;
133
+ this.conteudo = response.conteudo;
134
134
  this.removeCarregando(["painel", "pesquisar", "limpar"]);
135
135
  });
136
136
  },
@@ -151,7 +151,7 @@ export default {
151
151
  watch: {
152
152
  metodoExecutadoApi: function (value) {
153
153
  if (value != "obterTodosApi" && value != "" && value != "escolherApi") {
154
- this.obterTodos();
154
+ // this.obterTodos();
155
155
  }
156
156
  },
157
157
  buscouPesquisa: function () {
@@ -202,7 +202,7 @@ export default {
202
202
  params: params.obj,
203
203
  headers: new Token().tokenHeaders(),
204
204
  })
205
- .then((response) => {
205
+ .then((response) => {
206
206
  if (response.data.sucesso) {
207
207
  context.commit('insereMetodoExecutadoApi', params.MetodoExecutadoApi);
208
208
  context.commit('removeNotificacao');