@nixweb/nixloc-ui 0.0.119 → 0.0.122

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.
Files changed (122) hide show
  1. package/docs/src/component/template/ModeloRelatorioView.drawio +160 -0
  2. package/docs/src/store/modulos/relatorio.drawio +37 -0
  3. package/package.json +77 -75
  4. package/public/index.html +2 -4
  5. package/public/styles/app.css +1 -2
  6. package/src/component/forms/{Botao.vue → Button.vue} +53 -57
  7. package/src/component/forms/CheckboxGroup.vue +63 -0
  8. package/src/component/forms/{CheckboxUnico.vue → CheckboxSimple.vue} +6 -6
  9. package/src/component/forms/{Cor.vue → Color.vue} +9 -9
  10. package/src/component/forms/DateTime.vue +53 -53
  11. package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +50 -50
  12. package/src/component/forms/EditorHtml.vue +123 -0
  13. package/src/component/forms/FileUpload.vue +189 -0
  14. package/src/component/forms/InputDecimal.vue +137 -0
  15. package/src/component/forms/InputNumber.vue +149 -0
  16. package/src/component/forms/InputPassword.vue +135 -0
  17. package/src/component/forms/InputText.vue +157 -0
  18. package/src/component/forms/Modal.vue +15 -15
  19. package/src/component/forms/RadioGroup.vue +50 -0
  20. package/src/component/forms/Select.vue +337 -0
  21. package/src/component/forms/SelectStatic.vue +120 -0
  22. package/src/component/forms/TextArea.vue +126 -0
  23. package/src/component/forms/Toggle.vue +13 -13
  24. package/src/component/layout/{Conta.vue → Account.vue} +28 -28
  25. package/src/component/layout/{Alerta.vue → Alert.vue} +22 -22
  26. package/src/component/layout/Badge.vue +23 -23
  27. package/src/component/layout/{BarraFixa.vue → FixedBar.vue} +16 -16
  28. package/src/component/layout/{CarregandoTelaInteira.vue → LoadingFullPage.vue} +3 -3
  29. package/src/component/layout/Menu.vue +66 -66
  30. package/src/component/layout/{Moldura.vue → Molded.vue} +4 -4
  31. package/src/component/layout/Panel.vue +142 -0
  32. package/src/component/layout/Popover.vue +1 -1
  33. package/src/component/layout/{BarraRolagem.vue → Scrollbar.vue} +9 -11
  34. package/src/component/layout/Tag.vue +9 -9
  35. package/src/component/layout/Topo.vue +1 -1
  36. package/src/component/layout/Wizard.vue +3 -3
  37. package/src/component/shared/BotaoCarregarMais.vue +9 -9
  38. package/src/component/shared/BotaoConsulta.vue +9 -9
  39. package/src/component/shared/CabecalhoImpressao.vue +6 -6
  40. package/src/component/shared/CodigoEditor.vue +16 -16
  41. package/src/component/shared/Confirmacao.vue +28 -28
  42. package/src/component/shared/Dica.vue +10 -10
  43. package/src/component/shared/DocumentoEditor.vue +3 -3
  44. package/src/component/shared/DocumentoPreview.vue +2 -2
  45. package/src/component/shared/EsconderMostrar.vue +26 -26
  46. package/src/component/shared/ExportarExcel.vue +14 -14
  47. package/src/component/shared/ExportarPDF.vue +10 -10
  48. package/src/component/shared/FiltroHorizontal.vue +19 -19
  49. package/src/component/shared/LegendaParametro.vue +17 -17
  50. package/src/component/shared/{Carregando.vue → Loading.vue} +11 -11
  51. package/src/component/shared/Messages.vue +83 -0
  52. package/src/component/shared/Paginacao.vue +10 -10
  53. package/src/component/shared/Progresso.vue +2 -2
  54. package/src/component/shared/Registro.vue +2 -2
  55. package/src/component/shared/ResumoTabela.vue +6 -6
  56. package/src/component/shared/SalvarCancelar.vue +26 -26
  57. package/src/component/shared/{Pesquisa.vue → Search.vue} +36 -36
  58. package/src/component/shared/Tabela.vue +49 -49
  59. package/src/component/shared/TabelaBotao.vue +13 -13
  60. package/src/component/shared/Toast.vue +7 -7
  61. package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +14 -14
  62. package/src/component/shared/construtor-consulta/AdicionaFiltro.vue +191 -0
  63. package/src/component/shared/construtor-consulta/Campo.vue +127 -0
  64. package/src/component/shared/construtor-consulta/ComponenteDinamico.vue +109 -0
  65. package/src/component/shared/construtor-consulta/ConstrutorConsulta.vue +70 -0
  66. package/src/component/shared/construtor-consulta/ConverteParaOdata.js +80 -0
  67. package/src/component/shared/construtor-consulta/EscolherFiltro.vue +96 -0
  68. package/src/component/shared/{query-builder → construtor-consulta}/Filtro.vue +11 -16
  69. package/src/component/shared/construtor-consulta/ListaComponenteDinamico.vue +41 -0
  70. package/src/component/shared/{query-builder → construtor-consulta}/Rodape.vue +9 -9
  71. package/src/component/shared/{query-builder → construtor-consulta}/Tags.vue +7 -7
  72. package/src/component/shared/{query-builder → construtor-consulta}/utilities.js +0 -0
  73. package/src/component/template/ModeloAdicionarModificarView.vue +11 -11
  74. package/src/component/template/ModeloDocumentoView.vue +79 -79
  75. package/src/component/template/ModeloLista.vue +66 -66
  76. package/src/component/template/ModeloRelatorioListaView.vue +71 -68
  77. package/src/component/template/ModeloRelatorioView.vue +218 -200
  78. package/src/component/template/ModeloSubView.vue +13 -13
  79. package/src/component/template/ModeloView.vue +17 -17
  80. package/src/component/template/Relatorio.js +1 -5
  81. package/src/component/template/RelatorioAdicionarModificar.vue +44 -44
  82. package/src/component/value-objects/DadosContato.vue +27 -27
  83. package/src/component/value-objects/DadosPessoa.js +1 -1
  84. package/src/component/value-objects/DadosPessoa.vue +52 -52
  85. package/src/component/value-objects/Endereco.js +1 -1
  86. package/src/component/value-objects/Endereco.vue +83 -83
  87. package/src/config/dicas.js +1 -1
  88. package/src/config/token.js +2 -2
  89. package/src/store/modules/generic.js +489 -0
  90. package/src/store/modules/report.js +246 -0
  91. package/src/store/modules/user.js +38 -0
  92. package/src/store/modules/validation.js +39 -0
  93. package/src/store/store.js +4 -4
  94. package/public/js/menu.js +0 -11
  95. package/public/styles/menu.css +0 -1399
  96. package/src/component/forms/ArquivoUpload.vue +0 -199
  97. package/src/component/forms/CheckboxMultiplo.vue +0 -63
  98. package/src/component/forms/Decimal.vue +0 -137
  99. package/src/component/forms/Escolher.vue +0 -324
  100. package/src/component/forms/EscolherEstatico.vue +0 -139
  101. package/src/component/forms/Numero.vue +0 -153
  102. package/src/component/forms/Opcoes.vue +0 -51
  103. package/src/component/forms/Senha.vue +0 -139
  104. package/src/component/forms/Texto.vue +0 -161
  105. package/src/component/forms/TextoArea.vue +0 -126
  106. package/src/component/forms/TextoEditor.vue +0 -123
  107. package/src/component/layout/Painel.vue +0 -142
  108. package/src/component/shared/Mensagem.vue +0 -86
  109. package/src/component/shared/query-builder/Campo.vue +0 -116
  110. package/src/component/shared/query-builder/ConverteParaOdata.js +0 -73
  111. package/src/component/shared/query-builder/QueryBuilder.vue +0 -164
  112. package/src/component/shared/query-builder/components/CustomSelect.vue +0 -115
  113. package/src/component/shared/query-builder/components/QueryBuilderChildren.vue +0 -46
  114. package/src/component/shared/query-builder/components/QueryBuilderGroup.vue +0 -151
  115. package/src/component/shared/query-builder/components/QueryBuilderRule.vue +0 -81
  116. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapGroup.vue +0 -120
  117. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapRule.vue +0 -171
  118. package/src/component/shared/query-builder/main.js +0 -81
  119. package/src/store/modulos/generic.js +0 -494
  120. package/src/store/modulos/relatorio.js +0 -201
  121. package/src/store/modulos/usuario.js +0 -38
  122. package/src/store/modulos/validation.js +0 -39
@@ -1,59 +1,59 @@
1
1
  <template>
2
2
  <div>
3
3
  <Painel
4
- :modulo="painel.modulo"
5
- :titulo="painel.titulo"
6
- :mostrarFiltroVertical="painel.mostrarFiltroVertical"
7
- :mostrarPesquisa="painel.mostrarPesquisa"
8
- :mostrarBotoes="painel.mostrarBotoes"
4
+ :module="panel.module"
5
+ :title="panel.title"
6
+ :showVerticalFilter="panel.showVerticalFilter"
7
+ :showSearch="panel.showSearch"
8
+ :showButtons="panel.showButtons"
9
9
  >
10
- <div slot="conteudo-principal">
10
+ <div slot="content-main">
11
11
  <b-row>
12
12
  <b-col xs="12" sm="12" md="12" lg="6" xl="6" v-if="todos.salvo.length > 0">
13
- <div><i class="fas fa-file-alt icone-salvo"></i></i> Personalizado</div>
13
+ <div><i class="fas fa-file-alt icon-salvo"></i></i> Personalizado</div>
14
14
  <hr class="hr" />
15
- <div class="div-moldura" v-for="relatorio in todos.salvo">
15
+ <div class="div-molded" v-for="report in todos.salvo">
16
16
  <div>
17
- <Moldura :bordaArredondada="12">
17
+ <Molded :borderRadius="12">
18
18
  <b-row>
19
19
  <b-col sm="1">
20
- <i class="fas fa-file-alt icone-report"></i>
20
+ <i class="fas fa-file-alt icon-report"></i>
21
21
  </b-col>
22
- <b-col sm="10" @click="navegarPara(relatorio)">
23
- <div>{{ relatorio.nome }}</div>
22
+ <b-col sm="10" @click="navegateTo(report)">
23
+ <div>{{ report.nome }}</div>
24
24
  </b-col>
25
25
  <b-col sm="1">
26
26
  <Confirmacao
27
- titulo="Deseja excluir?"
28
- tipo="perigo"
29
- :dados="relatorio"
27
+ title="Deseja excluir?"
28
+ type="danger"
29
+ :data="report"
30
30
  :confirmado="excluir"
31
31
  >
32
32
  <div class="text-right">
33
- <i class="fas fa-times-circle icone-remover"></i>
33
+ <i class="fas fa-times-circle icon-remover"></i>
34
34
  </div>
35
35
  </Confirmacao>
36
36
  </b-col>
37
37
  </b-row>
38
- </Moldura>
38
+ </Molded>
39
39
  </div>
40
40
  </div>
41
41
  </b-col>
42
42
  <b-col xs="12" sm="12" md="12" lg="6" xl="6">
43
43
  <div><i class="fas fa-file-chart-line"></i> Padrão</div>
44
44
  <hr class="hr" />
45
- <div class="div-moldura" v-for="relatorio in todos.padrao">
45
+ <div class="div-molded" v-for="report in todos.padrao">
46
46
  <div>
47
- <Moldura :bordaArredondada="12">
47
+ <Molded :borderRadius="12">
48
48
  <b-row>
49
49
  <b-col sm="1">
50
- <i class="fas fa-file-alt icone-report"></i>
50
+ <i class="fas fa-file-alt icon-report"></i>
51
51
  </b-col>
52
- <b-col sm="11" @click="navegarPara(relatorio)">
53
- <div class="lado-a-lado">{{ relatorio.nome }}</div>
52
+ <b-col sm="11" @click="navegateTo(report)">
53
+ <div class="side-by-side">{{ report.nome }}</div>
54
54
  </b-col>
55
55
  </b-row>
56
- </Moldura>
56
+ </Molded>
57
57
  </div>
58
58
  </div>
59
59
  </b-col>
@@ -65,77 +65,80 @@
65
65
 
66
66
  <script>
67
67
  import Painel from "@nixweb/nixloc-ui/src/component/layout/Painel.vue";
68
- import Moldura from "@nixweb/nixloc-ui/src/component/layout/Moldura";
68
+ import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
69
69
  import Confirmacao from "@nixweb/nixloc-ui/src/component/shared/Confirmacao";
70
70
 
71
71
  import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
72
72
 
73
73
  export default {
74
74
  name: "ModeloRelatorioListaView",
75
- components: { Painel, Moldura, Confirmacao },
75
+ components: { Painel, Molded, Confirmacao },
76
76
  props: {
77
- painel: Object,
77
+ panel: Object,
78
78
  relatorios: Object,
79
79
  },
80
80
  data() {
81
81
  return {
82
- todos: {},
83
- urlObterTodos: "/api/v1/shared/relatorio/obter-todos",
84
- urlRemover: "/api/v1/shared/relatorio/remover",
82
+ todos: { salvo: [] },
83
+ urlObterTodos: "/api/v1/shared/report/obter-todos",
84
+ urlRemover: "/api/v1/shared/report/remover",
85
85
  };
86
86
  },
87
87
  computed: {
88
- ...mapState("generic", ["pesquisa", "buscouPesquisa", "limpouPesquisa"]),
88
+ ...mapState("generic", ["search", "buscouPesquisa", "limpouPesquisa"]),
89
89
  },
90
90
  mounted() {
91
- this.obterTodos();
91
+ this.getAll();
92
92
  this.todos = JSON.parse(JSON.stringify(this.relatorios)); // remove observable
93
93
  },
94
94
  methods: {
95
- ...mapMutations("generic", ["removeCarregando"]),
96
- ...mapMutations("relatorio", [
95
+ ...mapMutations("generic", ["removeLoading"]),
96
+ ...mapMutations("report", [
97
97
  "atualizaFiltroSelecionado",
98
98
  "atualizaCampoOrdenado",
99
- "atualizaOpcoesValorInicial",
99
+ "updateOptionsInitValue",
100
+ "atualizaConsultaFiltro"
100
101
  ]),
101
102
  ...mapActions("generic", ["getApi", "deleteAllApi"]),
102
- obterTodos() {
103
- let obj = { modulo: this.painel.modulo };
103
+ getAll() {
104
+ let obj = { module: this.panel.module };
104
105
  let params = { url: this.urlObterTodos, obj: obj };
105
106
  this.getApi(params).then((response) => {
106
107
  this.todos.salvo = [];
107
108
  let self = this;
108
- response.conteudo.dados.forEach((item) => {
109
+ response.content.data.forEach((item) => {
109
110
  const consulta = JSON.parse(item.consulta);
110
111
  let obj = {
111
112
  id: item.id,
112
113
  nome: item.nome,
113
- nomeRota: consulta.nomeRota,
114
- filtro: consulta.filtro,
115
- campo: consulta.campo,
114
+ routeName: consulta.routeName,
115
+ filter: consulta.filter,
116
+ field: consulta.field,
116
117
  ordenacao: consulta.ordenacao,
117
118
  };
118
119
  self.todos.salvo.push(obj);
119
120
  });
120
- this.removeCarregando(["painel"]);
121
+ this.removeLoading(["panel"]);
121
122
  });
122
123
  },
123
- navegarPara(relatorio) {
124
- if (relatorio.filtro) {
125
- let filtroSelecionado = { logicalOperator: "all", children: relatorio.filtro };
126
- this.atualizaOpcoesValorInicial(relatorio.campo);
127
- this.atualizaCampoOrdenado(relatorio.ordenacao);
124
+ navegateTo(report) {
125
+ if (report.filter) {
126
+ let filtroSelecionado = { logicalOperator: "all", children: report.filter };
127
+ this.updateOptionsInitValue(report.field);
128
+ this.atualizaCampoOrdenado(report.ordenacao);
128
129
  this.atualizaFiltroSelecionado(filtroSelecionado);
130
+ this.atualizaConsultaFiltro(filtroSelecionado);
129
131
  } else {
130
- this.atualizaOpcoesValorInicial([]);
132
+ this.updateOptionsInitValue([]);
131
133
  }
132
134
  this.$router.push({
133
- name: relatorio.nomeRota,
135
+ name: report.routeName,
136
+ params: { id: report.id, nome: report.nome },
134
137
  });
135
138
  },
136
- excluir(dados) {
139
+ excluir(data) {
137
140
  let selecionados = [];
138
- selecionados.push(dados.id);
141
+ selecionados.push(data.id);
139
142
 
140
143
  let params = {
141
144
  url: this.urlRemover,
@@ -143,7 +146,7 @@ export default {
143
146
  };
144
147
 
145
148
  this.deleteAllApi(params).then((reponse) => {
146
- if (reponse.sucesso) this.obterTodos();
149
+ if (reponse.success) this.getAll();
147
150
  });
148
151
  },
149
152
  },
@@ -154,37 +157,37 @@ export default {
154
157
  let self = this;
155
158
  setTimeout(function () {
156
159
  self.todos.padrao.forEach(function (item) {
157
- if (self.pesquisa.filtro.conteudo == "igual") {
158
- if (item.nome == self.pesquisa.conteudo) padrao.push(item);
160
+ if (self.search.filter.content == "igual") {
161
+ if (item.nome == self.search.content) padrao.push(item);
159
162
  }
160
163
 
161
- if (self.pesquisa.filtro.conteudo == "contem") {
162
- if (item.nome.includes(self.pesquisa.conteudo)) padrao.push(item);
164
+ if (self.search.filter.content == "contem") {
165
+ if (item.nome.includes(self.search.content)) padrao.push(item);
163
166
  }
164
167
  });
165
168
 
166
169
  self.todos.salvo.forEach(function (item) {
167
- if (self.pesquisa.filtro.conteudo == "igual") {
168
- if (item.nome == self.pesquisa.conteudo) salvo.push(item);
170
+ if (self.search.filter.content == "igual") {
171
+ if (item.nome == self.search.content) salvo.push(item);
169
172
  }
170
173
 
171
- if (self.pesquisa.filtro.conteudo == "contem") {
172
- if (item.nome.includes(self.pesquisa.conteudo)) salvo.push(item);
174
+ if (self.search.filter.content == "contem") {
175
+ if (item.nome.includes(self.search.content)) salvo.push(item);
173
176
  }
174
177
  });
175
178
 
176
179
  self.todos.salvo = salvo;
177
180
  self.todos.padrao = padrao;
178
181
 
179
- self.removeCarregando(["pesquisar", "limpar"]);
182
+ self.removeLoading(["pesquisar", "limpar"]);
180
183
  }, 300);
181
184
  },
182
185
  limpouPesquisa: function () {
183
186
  let self = this;
184
187
  setTimeout(function () {
185
188
  self.todos = self.relatorios;
186
- self.obterTodos();
187
- self.removeCarregando(["pesquisar", "limpar"]);
189
+ self.getAll();
190
+ self.removeLoading(["pesquisar", "limpar"]);
188
191
  }, 300);
189
192
  },
190
193
  },
@@ -192,30 +195,30 @@ export default {
192
195
  </script>
193
196
 
194
197
  <style scoped>
195
- .icone-salvo {
198
+ .icon-salvo {
196
199
  color: #94aa2a;
197
200
  }
198
201
 
199
- .icone-remover {
202
+ .icon-remover {
200
203
  color: red;
201
204
  }
202
205
 
203
- .icone-report {
206
+ .icon-report {
204
207
  font-size: 25px;
205
208
  opacity: 0.2;
206
209
  color: #577696;
207
210
  }
208
211
 
209
- .div-moldura {
212
+ .div-molded {
210
213
  margin-bottom: 10px;
211
214
  cursor: pointer;
212
215
  }
213
216
 
214
- .div-moldura:hover {
217
+ .div-molded:hover {
215
218
  background-color: #fafafc;
216
219
  }
217
220
 
218
- .descricao {
221
+ .description {
219
222
  font-size: 13.5px;
220
223
  color: rgb(117, 117, 117);
221
224
  }