@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,32 +1,32 @@
1
1
  <template>
2
- <div class="filtro-horizontal">
2
+ <div class="filter-horizontal">
3
3
  <EsconderMostrar
4
4
  :botaoMostrar="{
5
- titulo: 'Mais filtros',
6
- icone: 'fas fa-arrow-alt-circle-down',
7
- tipo: 'info',
5
+ title: 'Mais filtros',
6
+ icon: 'fas fa-arrow-alt-circle-down',
7
+ type: 'info',
8
8
  }"
9
9
  :botaoEsconder="{
10
- titulo: 'Menos filtros',
11
- icone: 'fas fa-arrow-alt-circle-up',
12
- tipo: 'alerta',
10
+ title: 'Menos filtros',
11
+ icon: 'fas fa-arrow-alt-circle-up',
12
+ type: 'warning',
13
13
  }"
14
14
  >
15
15
  <b-row>
16
16
  <b-col :sm="mostrarTotalPorPagina ? 10 : 12">
17
- <slot name="conteudo-filtro-horizontal"></slot>
17
+ <slot name="content-filter-horizontal"></slot>
18
18
  </b-col>
19
19
  <b-col xs="12" sm="12" md="12" lg="2" xl="2" v-if="mostrarTotalPorPagina">
20
20
  <EscolherEstatico
21
- titulo="Mostrar"
22
- campoAlvo="totalPorPagina"
23
- :valorInicial="{ conteudo: '10', id: 10 }"
24
- :dados="[
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 },
21
+ title="show"
22
+ fieldTarget="totalPerPage"
23
+ :initialValue="{ content: '10', id: 10 }"
24
+ :data="[
25
+ { content: '10', id: 10 },
26
+ { content: '20', id: 20 },
27
+ { content: '30', id: 30 },
28
+ { content: '50', id: 50 },
29
+ { content: '100', id: 100 },
30
30
  ]"
31
31
  />
32
32
  </b-col>
@@ -37,7 +37,7 @@
37
37
 
38
38
  <script>
39
39
  import EsconderMostrar from "./EsconderMostrar.vue";
40
- import EscolherEstatico from "../forms/EscolherEstatico.vue";
40
+ import EscolherEstatico from "../forms/SelectStatic.vue";
41
41
  import Escolher from "../forms/Escolher";
42
42
 
43
43
  export default {
@@ -53,7 +53,7 @@ export default {
53
53
  </script>
54
54
 
55
55
  <style scoped>
56
- .filtro-horizontal {
56
+ .filter-horizontal {
57
57
  margin-bottom: 5px;
58
58
  }
59
59
  </style>
@@ -2,13 +2,13 @@
2
2
  <div>
3
3
  <Pesquisa />
4
4
  <br />
5
- <BarraRolagem :alturaMinima="400" :alturaMaxima="400">
5
+ <BarraRolagem :minHeight="400" :maxHeight="400">
6
6
  <table class="table table-responsive-xs">
7
7
  <thead>
8
8
  <tr>
9
- <th><span class="titulo-cabecalho">Parâmetro</span></th>
10
- <th><span class="titulo-cabecalho">Descrição</span></th>
11
- <th><span class="titulo-cabecalho">Exemplo</span></th>
9
+ <th><span class="title-cabecalho">Parâmetro</span></th>
10
+ <th><span class="title-cabecalho">Descrição</span></th>
11
+ <th><span class="title-cabecalho">Exemplo</span></th>
12
12
  </tr>
13
13
  </thead>
14
14
  <tbody v-for="(legendaLocal, grupoNome) in agrupado">
@@ -20,7 +20,7 @@
20
20
  <span> {{ item.parametro }}</span>
21
21
  </td>
22
22
  <td>
23
- <span> {{ item.descricao }}</span>
23
+ <span> {{ item.description }}</span>
24
24
  </td>
25
25
  <td>
26
26
  <span class="exemplo"> {{ item.exemplo }}</span>
@@ -55,13 +55,13 @@ export default {
55
55
  this.legendaLocal = this.legenda;
56
56
  },
57
57
  methods: {
58
- ...mapMutations("generic", ["removeCarregando"]),
58
+ ...mapMutations("generic", ["removeLoading"]),
59
59
  },
60
60
  computed: {
61
- ...mapGetters("generic", ["agruparPor"]),
62
- ...mapState("generic", ["pesquisa", "buscouPesquisa", "limpouPesquisa"]),
61
+ ...mapGetters("generic", ["groupBy"]),
62
+ ...mapState("generic", ["search", "buscouPesquisa", "limpouPesquisa"]),
63
63
  agrupado() {
64
- var lista = this.agruparPor({ array: this.legendaLocal, key: "grupoNome" });
64
+ var lista = this.groupBy({ array: this.legendaLocal, key: "grupoNome" });
65
65
  return lista;
66
66
  },
67
67
  },
@@ -72,25 +72,25 @@ export default {
72
72
  let self = this;
73
73
  setTimeout(function () {
74
74
  self.legenda.forEach(function (item) {
75
- if (self.pesquisa.filtro.conteudo == "igual") {
76
- if (item.descricao == self.pesquisa.conteudo) legenda.push(item);
75
+ if (self.search.filter.content == "igual") {
76
+ if (item.description == self.search.content) legenda.push(item);
77
77
  }
78
78
 
79
- if (self.pesquisa.filtro.conteudo == "contem") {
80
- if (item.descricao.includes(self.pesquisa.conteudo)) legenda.push(item);
79
+ if (self.search.filter.content == "contem") {
80
+ if (item.description.includes(self.search.content)) legenda.push(item);
81
81
  }
82
82
  });
83
83
 
84
84
  self.legendaLocal = legenda;
85
85
 
86
- self.removeCarregando(["pesquisar", "limpar"]);
86
+ self.removeLoading(["pesquisar", "limpar"]);
87
87
  }, 300);
88
88
  },
89
89
  limpouPesquisa: function () {
90
90
  let self = this;
91
91
  setTimeout(function () {
92
92
  self.legendaLocal = self.legenda;
93
- self.removeCarregando(["pesquisar", "limpar"]);
93
+ self.removeLoading(["pesquisar", "limpar"]);
94
94
  }, 300);
95
95
  },
96
96
  },
@@ -107,7 +107,7 @@ export default {
107
107
  border-bottom: 0px !important;
108
108
  }
109
109
 
110
- .titulo-cabecalho {
110
+ .title-cabecalho {
111
111
  font-size: 14px;
112
112
  color: #757d8c;
113
113
  font-weight: 400;
@@ -120,7 +120,7 @@ export default {
120
120
  font-weight: 500;
121
121
  }
122
122
 
123
- .div-alerta {
123
+ .div-warning {
124
124
  margin-bottom: 20px;
125
125
  }
126
126
 
@@ -1,20 +1,20 @@
1
1
  <template>
2
2
  <div>
3
- <div v-if="tipo == 'bolhas'" :class="{ carregando: centralizado }">
3
+ <div v-if="type == 'bolhas'" :class="{ carregando: centralizado }">
4
4
  <vue-loading
5
5
  type="bubbles"
6
- :color="cor"
7
- :size="{ width: largura + 'px', height: altura + 'px' }"
6
+ :color="color"
7
+ :size="{ width: width + 'px', height: height + 'px' }"
8
8
  ></vue-loading>
9
9
  </div>
10
- <div v-if="tipo == 'linha'">
10
+ <div v-if="type == 'linha'">
11
11
  <div class="loader">
12
12
  <div class="loader__element"></div>
13
13
  </div>
14
14
  </div>
15
15
  <div :class="{ 'carregando-texto': centralizado }">
16
16
  <div>
17
- <div class="mensagem">{{ mensagem }}</div>
17
+ <div class="message">{{ message }}</div>
18
18
  </div>
19
19
  </div>
20
20
  </div>
@@ -24,11 +24,11 @@
24
24
  export default {
25
25
  name: "Carregando",
26
26
  props: {
27
- altura: {
27
+ height: {
28
28
  type: Number,
29
29
  default: 70,
30
30
  },
31
- largura: {
31
+ width: {
32
32
  type: Number,
33
33
  default: 70,
34
34
  },
@@ -36,15 +36,15 @@ export default {
36
36
  type: Boolean,
37
37
  default: true,
38
38
  },
39
- cor: {
39
+ color: {
40
40
  type: String,
41
41
  default: "#D98621",
42
42
  },
43
- tipo: {
43
+ type: {
44
44
  type: String,
45
45
  default: "bolhas",
46
46
  },
47
- mensagem: String,
47
+ message: String,
48
48
  },
49
49
  };
50
50
  </script>
@@ -66,7 +66,7 @@ export default {
66
66
  transform: translate(-50%, -50%);
67
67
  }
68
68
 
69
- .mensagem {
69
+ .message {
70
70
  font-size: 15px;
71
71
  margin-top: 5px;
72
72
  }
@@ -0,0 +1,83 @@
1
+ <template>
2
+ <div>
3
+ <div :class="{ 'div-message': !modal.open }" v-if="storageNotification.length > 0">
4
+ <div>
5
+ <Alert type="danger">
6
+ <div v-for="notification in storageNotification">
7
+ {{ notification.message }}
8
+ </div>
9
+ </Alert>
10
+ </div>
11
+ <b-alert
12
+ v-show="false"
13
+ :show="countdown"
14
+ dismissible
15
+ variant="danger"
16
+ @dismissed="countdown = 0"
17
+ @dismiss-count-down="countdownChanged"
18
+ >
19
+ </b-alert>
20
+ </div>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ import Alert from "../layout/Alert.vue";
26
+ import { mapState, mapMutations } from "vuex";
27
+
28
+ export default {
29
+ components: { Alert },
30
+ name: "Messages",
31
+ data() {
32
+ return {
33
+ maxSeconds: 10,
34
+ countdown: 10,
35
+ storageNotification: [],
36
+ };
37
+ },
38
+ computed: {
39
+ ...mapState("generic", ["notifications", "modal"]),
40
+ },
41
+ watch: {
42
+ notifications() {
43
+ if (this.notifications.length > 0) {
44
+ this.storageNotification = this.notifications;
45
+ this.countdown = 5;
46
+ }
47
+ },
48
+ countdown() {
49
+ if (this.countdown === 0) {
50
+ this.storageNotification = [];
51
+ this.removeNotificarions();
52
+ }
53
+ },
54
+ },
55
+ methods: {
56
+ ...mapMutations("generic", ["removeNotificarions"]),
57
+ countdownChanged(countdown) {
58
+ this.countdown = countdown;
59
+ },
60
+ messages(notifications) {
61
+ var message = "";
62
+ notifications.forEach(function (notification) {
63
+ message += notification.message + " ";
64
+ });
65
+
66
+ return message;
67
+ },
68
+ },
69
+ };
70
+ </script>
71
+ <style scoped>
72
+ .div-message {
73
+ margin-top: 15px;
74
+ }
75
+
76
+ .div-message-modal {
77
+ margin-bottom: 5px;
78
+ }
79
+
80
+ .invalid {
81
+ color: #f0134d;
82
+ }
83
+ </style>
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <div>
3
3
  <b-pagination
4
- v-model="paginacao(chave).paginaAtual"
4
+ v-model="paginacao(key).currentPage"
5
5
  prev-text="Anterior"
6
6
  next-text="Próximo"
7
7
  align="right"
8
8
  :hide-goto-end-buttons="true"
9
- :per-page="paginacao(chave).totalPorPagina"
10
- :total-rows="totalRegistros"
9
+ :per-page="paginacao(key).totalPerPage"
10
+ :total-rows="totalRecords"
11
11
  ></b-pagination>
12
12
  </div>
13
13
  </template>
@@ -18,21 +18,21 @@ import { mapGetters, mapMutations } from "vuex";
18
18
  export default {
19
19
  name: "Paginacao",
20
20
  props: {
21
- chave: String,
22
- totalRegistros: Number,
21
+ key: String,
22
+ totalRecords: Number,
23
23
  },
24
24
  created() {
25
- this.inserePaginacao({
26
- chave: this.chave,
27
- paginaAtual: 1,
28
- totalPorPagina: 10,
25
+ this.addPagination({
26
+ key: this.key,
27
+ currentPage: 1,
28
+ totalPerPage: 10,
29
29
  });
30
30
  },
31
31
  computed: {
32
32
  ...mapGetters("generic", ["paginacao"]),
33
33
  },
34
34
  methods: {
35
- ...mapMutations("generic", ["inserePaginacao"]),
35
+ ...mapMutations("generic", ["addPagination"]),
36
36
  },
37
37
  };
38
38
  </script>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <progress-bar :size="tamanho" :text="texto" :val="valor" :max="maximo"></progress-bar>
3
+ <progress-bar :size="size" :text="texto" :val="valor" :max="maximo"></progress-bar>
4
4
  </div>
5
5
  </template>
6
6
  <script>
@@ -15,7 +15,7 @@ export default {
15
15
  texto: String,
16
16
  valor: Number,
17
17
  maximo: Number,
18
- tamanho: String,
18
+ size: String,
19
19
  },
20
20
  };
21
21
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="row c-div-total">
3
3
  <div class="col-sm-12 text-right">
4
- <span class="c-titulo">
4
+ <span class="c-title">
5
5
  Total de
6
6
  <b-badge variant="warning">
7
7
  <span class="c-total">{{ totalRegistro }}</span>
@@ -29,7 +29,7 @@ export default {
29
29
  padding-bottom: 10px;
30
30
  }
31
31
 
32
- .c-titulo {
32
+ .c-title {
33
33
  font-size: 14px;
34
34
  }
35
35
 
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div>
3
- <div class="badge-lado-a-lado text-center" v-for="item in resumo" :key="item.titulo">
4
- <div class="badge-resumo" :class="item.classeCss">
5
- <span>{{ item.titulo }}</span>
3
+ <div class="badge-side-by-side text-center" v-for="item in totalization" :key="item.title">
4
+ <div class="badge-totalization" :class="item.classeCss">
5
+ <span>{{ item.title }}</span>
6
6
  <span>{{ item.valor }}</span>
7
7
  </div>
8
8
  </div>
@@ -13,19 +13,19 @@
13
13
  export default {
14
14
  name: "ResumoTabela",
15
15
  props: {
16
- resumo: Array,
16
+ totalization: Array,
17
17
  },
18
18
  };
19
19
  </script>
20
20
 
21
21
  <style scoped>
22
- .badge-lado-a-lado {
22
+ .badge-side-by-side {
23
23
  display: inline-block;
24
24
  margin-right: 3px;
25
25
  margin-bottom: 10px;
26
26
  }
27
27
 
28
- .badge-resumo {
28
+ .badge-totalization {
29
29
  border: 1px solid #dbdee0;
30
30
  padding-left: 5px;
31
31
  padding-right: 5px;
@@ -1,55 +1,55 @@
1
1
  <template>
2
2
  <div>
3
- <BarraFixa posicao="rodape" v-show="formSujo && !modal.abrir">
3
+ <FixedBar posicao="rodape" v-show="formDirty && !modal.open">
4
4
  <div>
5
- <Botao
6
- chave="cancelarSalvarCancelar"
5
+ <Button
6
+ key="cancelarSalvarCancelar"
7
7
  nomeEvento="cancelarSalvarCancelar"
8
- titulo="Cancelar"
9
- tipo="perigo"
10
- tamanho="medio"
11
- :clique="cancelar"
8
+ title="Cancelar"
9
+ type="danger"
10
+ size="medium"
11
+ :clicked="cancelar"
12
12
  />
13
- <Botao
14
- chave="salvarSalvarCancelar"
13
+ <Button
14
+ key="salvarSalvarCancelar"
15
15
  nomeEvento="salvarSalvarCancelar"
16
- titulo="Salvar"
17
- tipo="sucesso"
18
- :desabilitado="!formValido(formNome)"
19
- tamanho="medio"
16
+ title="Salvar"
17
+ type="success"
18
+ :disabled="!isFormValid(formName)"
19
+ size="medium"
20
20
  />
21
21
  </div>
22
- </BarraFixa>
22
+ </FixedBar>
23
23
  </div>
24
24
  </template>
25
25
  <script>
26
- import BarraFixa from "@nixweb/nixloc-ui/src/component/layout/BarraFixa.vue";
27
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
26
+ import FixedBar from "@nixweb/nixloc-ui/src/component/layout/FixedBar.vue";
27
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
28
28
 
29
29
  import { mapState, mapMutations, mapGetters } from "vuex";
30
30
 
31
31
  export default {
32
32
  name: "SalvarCancelar",
33
- components: { BarraFixa, Botao },
33
+ components: { FixedBar, Button },
34
34
  props: {
35
- formNome: String,
35
+ formName: String,
36
36
  },
37
37
  computed: {
38
- ...mapState("validation", ["formSujo"]),
39
- ...mapGetters("validation", ["formValido"]),
38
+ ...mapState("validation", ["formDirty"]),
39
+ ...mapGetters("validation", ["isFormValid"]),
40
40
  ...mapState("generic", ["modal"]),
41
41
  },
42
42
  methods: {
43
- ...mapMutations("validation", ["insereFormSujo"]),
44
- ...mapMutations("generic", ["removeCarregando"]),
43
+ ...mapMutations("validation", ["addFormDirty"]),
44
+ ...mapMutations("generic", ["removeLoading"]),
45
45
  cancelar() {
46
- this.insereFormSujo(false);
47
- this.removeCarregando(["cancelarSalvarCancelar"]);
46
+ this.addFormDirty(false);
47
+ this.removeLoading(["cancelarSalvarCancelar"]);
48
48
  },
49
49
  },
50
50
  watch: {
51
- "modal.abrir": function (valor) {
52
- this.insereFormSujo(false);
51
+ "modal.open": function (valor) {
52
+ this.addFormDirty(false);
53
53
  },
54
54
  },
55
55
  };
@@ -2,7 +2,7 @@
2
2
  <b-row>
3
3
  <b-col xs="12" sm="12" md="12" lg="7" xl="6">
4
4
  <div class="margem">
5
- <div class="moldura">
5
+ <div class="molded">
6
6
  <b-row>
7
7
  <b-col sm="9">
8
8
  <input
@@ -11,19 +11,19 @@
11
11
  placeholder="Pesquisar ..."
12
12
  @keyup="verificaLimpaPesquisa()"
13
13
  @keyup.enter.prevent="buscaPesquisa()"
14
- v-model="pesquisa.conteudo"
14
+ v-model="search.content"
15
15
  /></b-col>
16
16
  <b-col sm="3">
17
17
  <div class="div-escolher">
18
18
  <EscolherEstatico
19
- campoAlvo="filtro"
20
- :somenteConsulta="true"
21
- :valorInicial="{ conteudo: 'Contém', id: 'contem' }"
22
- v-model="pesquisa.filtro"
23
- :mostrarBorda="false"
24
- :dados="[
25
- { conteudo: 'Contém', id: 'contem' },
26
- { conteudo: 'Igual', id: 'igual' },
19
+ fieldTarget="filter"
20
+ :onlyQuery="true"
21
+ :initialValue="{ content: 'Contém', id: 'contem' }"
22
+ v-model="search.filter"
23
+ :showBorder="false"
24
+ :data="[
25
+ { content: 'Contém', id: 'contem' },
26
+ { content: 'Igual', id: 'igual' },
27
27
  ]"
28
28
  />
29
29
  </div>
@@ -34,21 +34,21 @@
34
34
  </b-col>
35
35
  <b-col xs="4" sm="4" md="4" lg="4" xl="4">
36
36
  <div class="div-botao">
37
- <Botao
38
- chave="pesquisar"
39
- tipo="info"
40
- titulo="Buscar"
41
- classeIcone="fas fa-search"
42
- tamanho="pequeno"
43
- :clique="buscaPesquisa"
37
+ <Button
38
+ key="pesquisar"
39
+ type="info"
40
+ title="Buscar"
41
+ classIcon="fas fa-search"
42
+ size="small"
43
+ :clicked="buscaPesquisa"
44
44
  />
45
- <Botao
46
- chave="limpar"
47
- tipo="info"
48
- titulo="Limpar"
49
- classeIcone="fas fa-broom"
50
- tamanho="pequeno"
51
- :clique="limpaPesquisa"
45
+ <Button
46
+ key="limpar"
47
+ type="info"
48
+ title="Limpar"
49
+ classIcon="fas fa-broom"
50
+ size="small"
51
+ :clicked="limpaPesquisa"
52
52
  />
53
53
  </div>
54
54
  </b-col>
@@ -56,27 +56,27 @@
56
56
  </template>
57
57
 
58
58
  <script>
59
- import Botao from "../forms/Botao";
60
- import EscolherEstatico from "../forms/EscolherEstatico.vue";
59
+ import Button from "../forms/Button";
60
+ import EscolherEstatico from "../forms/SelectStatic.vue";
61
61
 
62
62
  import { mapMutations } from "vuex";
63
63
 
64
64
  export default {
65
- components: { Botao, EscolherEstatico },
65
+ components: { Button, EscolherEstatico },
66
66
  name: "Pesquisa",
67
67
  computed: {
68
- pesquisa: {
68
+ search: {
69
69
  get() {
70
- return this.$store.state.generic.pesquisa;
70
+ return this.$store.state.generic.search;
71
71
  },
72
72
  set(value) {
73
- this.atualizaCampoPesquisa(value);
73
+ this.updateSearch(value);
74
74
  },
75
75
  },
76
76
  },
77
77
  methods: {
78
78
  ...mapMutations("generic", [
79
- "atualizaCampoPesquisa",
79
+ "updateSearch",
80
80
  "buscouPesquisa",
81
81
  "limpouPesquisa",
82
82
  ]),
@@ -85,18 +85,18 @@ export default {
85
85
  },
86
86
  limpaPesquisa() {
87
87
  this.limpouPesquisa();
88
- let pesquisa = { conteudo: "", filtro: { conteudo: "contem", id: "contem" } };
89
- this.atualizaCampoPesquisa(pesquisa);
88
+ let search = { content: "", filter: { content: "contem", id: "contem" } };
89
+ this.updateSearch(search);
90
90
  },
91
91
  verificaLimpaPesquisa() {
92
- if (this.pesquisa.conteudo.length == 0) this.limpouPesquisa();
92
+ if (this.search.content.length == 0) this.limpouPesquisa();
93
93
  },
94
94
  },
95
95
  };
96
96
  </script>
97
97
 
98
98
  <style scoped>
99
- .icone-pesquisa {
99
+ .icon-search {
100
100
  font-size: 20px;
101
101
  color: #577696;
102
102
  display: inline-block;
@@ -118,7 +118,7 @@ export default {
118
118
  color: #b8c4d2;
119
119
  }
120
120
 
121
- .moldura {
121
+ .molded {
122
122
  width: 100%;
123
123
  height: 45px;
124
124
  font-size: 14px;