@nixweb/nixloc-ui 0.0.121 → 0.0.124

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 (135) hide show
  1. package/docs/src/component/template/ModeloRelatorioView.drawio +2 -2
  2. package/docs/src/store/modulos/relatorio.drawio +2 -2
  3. package/package.json +77 -77
  4. package/public/styles/app.css +1 -1
  5. package/src/component/forms/{Botao.vue → Button.vue} +53 -57
  6. package/src/component/forms/CheckboxGroup.vue +63 -0
  7. package/src/component/forms/{CheckboxUnico.vue → CheckboxSimple.vue} +8 -8
  8. package/src/component/forms/{Cor.vue → Color.vue} +9 -9
  9. package/src/component/forms/DateTime.vue +55 -55
  10. package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +58 -58
  11. package/src/component/forms/EditorHtml.vue +123 -0
  12. package/src/component/forms/FileUpload.vue +189 -0
  13. package/src/component/forms/InputDecimal.vue +137 -0
  14. package/src/component/forms/InputNumber.vue +149 -0
  15. package/src/component/forms/InputPassword.vue +135 -0
  16. package/src/component/forms/InputText.vue +157 -0
  17. package/src/component/forms/Modal.vue +15 -15
  18. package/src/component/forms/RadioGroup.vue +50 -0
  19. package/src/component/forms/Select.vue +337 -0
  20. package/src/component/forms/SelectStatic.vue +120 -0
  21. package/src/component/forms/TextArea.vue +126 -0
  22. package/src/component/forms/Toggle.vue +13 -13
  23. package/src/component/layout/{Conta.vue → Account.vue} +28 -28
  24. package/src/component/layout/{Alerta.vue → Alert.vue} +22 -22
  25. package/src/component/layout/Badge.vue +23 -23
  26. package/src/component/layout/{BarraFixa.vue → FixedBar.vue} +16 -16
  27. package/src/component/layout/{Topo.vue → Header.vue} +5 -5
  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 +15 -15
  35. package/src/component/layout/Wizard.vue +3 -3
  36. package/src/component/shared/{CodigoEditor.vue → CodeEditor.vue} +25 -25
  37. package/src/component/shared/Collapse.vue +131 -0
  38. package/src/component/shared/Confirmation.vue +80 -0
  39. package/src/component/shared/{DocumentoEditor.vue → DocumentEditor.vue} +10 -16
  40. package/src/component/shared/{DocumentoPreview.vue → DocumentPreview.vue} +2 -2
  41. package/src/component/shared/ExportExcel.vue +67 -0
  42. package/src/component/shared/{ExportarPDF.vue → ExportPDF.vue} +18 -18
  43. package/src/component/shared/HeaderPrint.vue +36 -0
  44. package/src/component/shared/HorizontalFilter.vue +59 -0
  45. package/src/component/shared/LegendaParametro.vue +22 -22
  46. package/src/component/shared/{Carregando.vue → Loading.vue} +16 -16
  47. package/src/component/shared/LoadingMoreButton.vue +23 -0
  48. package/src/component/shared/Messages.vue +83 -0
  49. package/src/component/shared/{Paginacao.vue → Pagination.vue} +12 -12
  50. package/src/component/shared/ProgressBar.vue +21 -0
  51. package/src/component/shared/{BotaoConsulta.vue → QueryButton.vue} +16 -16
  52. package/src/component/shared/SaveCancel.vue +56 -0
  53. package/src/component/shared/{Pesquisa.vue → Search.vue} +46 -46
  54. package/src/component/shared/Table.vue +243 -0
  55. package/src/component/shared/TableButton.vue +36 -0
  56. package/src/component/shared/{Registro.vue → TableTotalRecords.vue} +7 -7
  57. package/src/component/shared/{ResumoTabela.vue → TableTotalization.vue} +12 -8
  58. package/src/component/shared/Tip.vue +42 -0
  59. package/src/component/shared/Toast.vue +7 -7
  60. package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +24 -24
  61. package/src/component/shared/query-builder/AddRule.vue +187 -0
  62. package/src/component/shared/query-builder/ConvertToOdata.js +80 -0
  63. package/src/component/shared/query-builder/DynamicComponent.vue +107 -0
  64. package/src/component/shared/query-builder/Fields.vue +127 -0
  65. package/src/component/shared/query-builder/ListDynamicComponent.vue +42 -0
  66. package/src/component/shared/query-builder/QueryBuilder.vue +25 -120
  67. package/src/component/shared/query-builder/{Filtro.vue → Rules.vue} +13 -18
  68. package/src/component/shared/query-builder/SelectRule.vue +96 -0
  69. package/src/component/shared/query-builder/Tags.vue +14 -14
  70. package/src/component/shared/query-builder/{Rodape.vue → Totalization.vue} +10 -10
  71. package/src/component/template/AddEditReport.vue +106 -0
  72. package/src/component/template/ListViewWithHandlerData.vue +231 -0
  73. package/src/component/template/ViewTemplateConfiguration.vue +69 -0
  74. package/src/component/template/ViewTemplateDocumentView.vue +227 -0
  75. package/src/component/template/ViewTemplateReportList.vue +230 -0
  76. package/src/component/template/ViewTemplateReportPreview.vue +500 -0
  77. package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
  78. package/src/component/template/ViewTemplateWithTable.vue +49 -0
  79. package/src/component/template/model/Report.js +6 -0
  80. package/src/component/value-objects/DadosContato.vue +34 -35
  81. package/src/component/value-objects/DadosPessoa.vue +58 -58
  82. package/src/component/value-objects/Endereco.vue +96 -97
  83. package/src/config/dicas.js +1 -1
  84. package/src/config/token.js +2 -2
  85. package/src/store/modules/generic.js +489 -0
  86. package/src/store/modules/report.js +246 -0
  87. package/src/store/modules/user.js +38 -0
  88. package/src/store/modules/validation.js +39 -0
  89. package/src/store/store.js +4 -4
  90. package/src/component/forms/ArquivoUpload.vue +0 -199
  91. package/src/component/forms/CheckboxMultiplo.vue +0 -63
  92. package/src/component/forms/Decimal.vue +0 -137
  93. package/src/component/forms/Escolher.vue +0 -335
  94. package/src/component/forms/EscolherEstatico.vue +0 -139
  95. package/src/component/forms/Numero.vue +0 -153
  96. package/src/component/forms/Opcoes.vue +0 -51
  97. package/src/component/forms/Senha.vue +0 -139
  98. package/src/component/forms/Texto.vue +0 -161
  99. package/src/component/forms/TextoArea.vue +0 -126
  100. package/src/component/forms/TextoEditor.vue +0 -123
  101. package/src/component/layout/Painel.vue +0 -142
  102. package/src/component/shared/BotaoCarregarMais.vue +0 -23
  103. package/src/component/shared/CabecalhoImpressao.vue +0 -36
  104. package/src/component/shared/Confirmacao.vue +0 -80
  105. package/src/component/shared/Dica.vue +0 -42
  106. package/src/component/shared/EsconderMostrar.vue +0 -131
  107. package/src/component/shared/ExportarExcel.vue +0 -67
  108. package/src/component/shared/FiltroHorizontal.vue +0 -59
  109. package/src/component/shared/Mensagem.vue +0 -86
  110. package/src/component/shared/Progresso.vue +0 -21
  111. package/src/component/shared/SalvarCancelar.vue +0 -56
  112. package/src/component/shared/Tabela.vue +0 -275
  113. package/src/component/shared/TabelaBotao.vue +0 -36
  114. package/src/component/shared/query-builder/Campo.vue +0 -116
  115. package/src/component/shared/query-builder/ConverteParaOdata.js +0 -77
  116. package/src/component/shared/query-builder/components/CustomSelect.vue +0 -115
  117. package/src/component/shared/query-builder/components/QueryBuilderChildren.vue +0 -46
  118. package/src/component/shared/query-builder/components/QueryBuilderGroup.vue +0 -151
  119. package/src/component/shared/query-builder/components/QueryBuilderRule.vue +0 -81
  120. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapGroup.vue +0 -120
  121. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapRule.vue +0 -187
  122. package/src/component/shared/query-builder/main.js +0 -81
  123. package/src/component/template/ModeloAdicionarModificarView.vue +0 -32
  124. package/src/component/template/ModeloDocumentoView.vue +0 -227
  125. package/src/component/template/ModeloLista.vue +0 -231
  126. package/src/component/template/ModeloRelatorioListaView.vue +0 -227
  127. package/src/component/template/ModeloRelatorioView.vue +0 -489
  128. package/src/component/template/ModeloSubView.vue +0 -69
  129. package/src/component/template/ModeloView.vue +0 -49
  130. package/src/component/template/Relatorio.js +0 -10
  131. package/src/component/template/RelatorioAdicionarModificar.vue +0 -106
  132. package/src/store/modulos/generic.js +0 -494
  133. package/src/store/modulos/relatorio.js +0 -204
  134. package/src/store/modulos/usuario.js +0 -38
  135. package/src/store/modulos/validation.js +0 -39
@@ -2,35 +2,35 @@
2
2
  <div>
3
3
  <b-row>
4
4
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
5
- <Texto
6
- titulo="Telefone"
7
- campo="telefone"
8
- :formNome="formNome"
9
- :mascara="['(##) ####-####', '(##) #####-####']"
10
- :tamanhoMaximo="20"
11
- :requerido="requerido"
5
+ <InputText
6
+ title="Telefone"
7
+ field="telefone"
8
+ :formName="formName"
9
+ :mask="['(##) ####-####', '(##) #####-####']"
10
+ :maxLength="20"
11
+ :required="required"
12
12
  v-model="dadosContato.telefone"
13
13
  />
14
14
  </b-col>
15
15
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
16
- <Texto
17
- titulo="Site"
18
- campo="site"
19
- :formNome="formNome"
20
- mascara=""
21
- :tamanhoMaximo="100"
22
- :requerido="requerido"
16
+ <InputText
17
+ title="Site"
18
+ field="site"
19
+ :formName="formName"
20
+ mask=""
21
+ :maxLength="100"
22
+ :required="required"
23
23
  v-model="dadosContato.site"
24
24
  />
25
25
  </b-col>
26
26
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
27
- <Texto
28
- titulo="E-mail"
29
- campo="email"
30
- :formNome="formNome"
31
- mascara=""
32
- :tamanhoMaximo="100"
33
- :requerido="requerido"
27
+ <InputText
28
+ title="E-mail"
29
+ field="email"
30
+ :formName="formName"
31
+ mask=""
32
+ :maxLength="100"
33
+ :required="required"
34
34
  v-model="dadosContato.email"
35
35
  />
36
36
  </b-col>
@@ -39,9 +39,8 @@
39
39
  </template>
40
40
 
41
41
  <script>
42
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
43
- import Texto from "@nixweb/nixloc-ui/src/component/forms/Texto";
44
- import Opcoes from "@nixweb/nixloc-ui/src/component/forms/Opcoes";
42
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
43
+ import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
45
44
  import DadosContato from "@nixweb/nixloc-ui/src/component/value-objects/DadosContato.js";
46
45
 
47
46
  import { mapGetters } from "vuex";
@@ -49,14 +48,14 @@ import { mapGetters } from "vuex";
49
48
  export default {
50
49
  name: "DadosContato",
51
50
  props: {
52
- formNome: String,
53
- requerido: {
51
+ formName: String,
52
+ required: {
54
53
  type: Boolean,
55
54
  default: false,
56
55
  },
57
56
  value: Object,
58
57
  },
59
- components: { Opcoes, Texto, Botao },
58
+ components: { InputText, Button },
60
59
  data() {
61
60
  return {
62
61
  dadosContato: new DadosContato(),
@@ -66,13 +65,13 @@ export default {
66
65
  if (this.value.telefone != undefined) this.dadosContato = this.value;
67
66
  },
68
67
  methods: {
69
- carregaDados(dados) {
70
- this.dadosContato.telefone = dados.telefone;
71
- this.dadosContato.email = dados.email;
68
+ carregaDados(data) {
69
+ this.dadosContato.telefone = data.telefone;
70
+ this.dadosContato.email = data.email;
72
71
  },
73
72
  },
74
73
  computed: {
75
- ...mapGetters("generic", ["evento"]),
74
+ ...mapGetters("generic", ["event"]),
76
75
  },
77
76
  watch: {
78
77
  value: {
@@ -87,10 +86,10 @@ export default {
87
86
  },
88
87
  deep: true,
89
88
  },
90
- evento: {
91
- handler(evento) {
92
- if (evento.nome == "buscarCnpjReceita") {
93
- this.carregaDados(evento.dados);
89
+ event: {
90
+ handler(event) {
91
+ if (event.nome == "buscarCnpjReceita") {
92
+ this.carregaDados(event.data);
94
93
  }
95
94
  },
96
95
  deep: true,
@@ -2,10 +2,10 @@
2
2
  <div>
3
3
  <b-row>
4
4
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
5
- <Opcoes
6
- campo="tipoPessoa"
7
- :formNome="formNome"
8
- :opcoes="[
5
+ <RadioGroup
6
+ field="tipoPessoa"
7
+ :formName="formName"
8
+ :options="[
9
9
  { text: 'Física', value: 1 },
10
10
  { text: 'Jurídica', value: 2 },
11
11
  ]"
@@ -15,67 +15,67 @@
15
15
  </b-row>
16
16
  <b-row>
17
17
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
18
- <Texto
19
- :titulo="dadosPessoa.tipoPessoa == 2 ? 'CNPJ' : 'CPF'"
20
- campo="cnpjCpf"
21
- :formNome="formNome"
22
- :mascara="['##.###.###/####-##', '###.###.###-##']"
23
- :tamanhoMaximo="30"
24
- :requerido="requerido"
18
+ <InputText
19
+ :title="dadosPessoa.tipoPessoa == 2 ? 'CNPJ' : 'CPF'"
20
+ field="cnpjCpf"
21
+ :formName="formName"
22
+ :mask="['##.###.###/####-##', '###.###.###-##']"
23
+ :maxLength="30"
24
+ :required="required"
25
25
  v-model="dadosPessoa.cnpjCpf"
26
- ><div class="glyphicon margem-botao">
27
- <Botao
28
- v-if="dadosPessoa.tipoPessoa == 2"
29
- chave="buscarCnpjReceita"
30
- tipo="sucesso"
31
- classeIcone="fas fa-search"
32
- :desabilitado="dadosPessoa.cnpjCpf.length < 18"
33
- tamanho="pequeno"
34
- :clique="buscarCnpjReceita"
26
+ ><div class="glyphicon margin-button">
27
+ <Button
28
+ v-if="dadosPessoa.typePessoa == 2"
29
+ key="buscarCnpjReceita"
30
+ type="success"
31
+ classIcon="fas fa-search"
32
+ :disabled="dadosPessoa.cnpjCpf.length < 18"
33
+ size="small"
34
+ :clicked="buscarCnpjReceita"
35
35
  /></div
36
- ></Texto>
36
+ ></InputText>
37
37
  </b-col>
38
38
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
39
- <Texto
40
- :titulo="dadosPessoa.tipoPessoa == 2 ? 'Inscrição Estadual' : 'RG'"
41
- campo="inscricaoEstadualRg"
42
- :formNome="formNome"
43
- :tamanhoMaximo="50"
44
- :requerido="requerido"
39
+ <InputText
40
+ :title="dadosPessoa.typePessoa == 2 ? 'Inscrição Estadual' : 'RG'"
41
+ field="inscricaoEstadualRg"
42
+ :formName="formName"
43
+ :maxLength="50"
44
+ :required="required"
45
45
  v-model="dadosPessoa.inscricaoEstadualRg"
46
46
  />
47
47
  </b-col>
48
48
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
49
- <Texto
50
- v-if="dadosPessoa.tipoPessoa == 2"
51
- titulo="Inscrição Municipal"
52
- campo="inscricaoMunicipal"
53
- :formNome="formNome"
54
- :tamanhoMaximo="50"
55
- :requerido="requerido"
49
+ <InputText
50
+ v-if="dadosPessoa.typePessoa == 2"
51
+ title="Inscrição Municipal"
52
+ field="inscricaoMunicipal"
53
+ :formName="formName"
54
+ :maxLength="50"
55
+ :required="required"
56
56
  v-model="dadosPessoa.inscricaoMunicipal"
57
57
  />
58
58
  </b-col>
59
59
  </b-row>
60
- <br v-if="dadosPessoa.tipoPessoa == 2" />
60
+ <br v-if="dadosPessoa.typePessoa == 2" />
61
61
  <b-row>
62
62
  <b-col xs="12" sm="12" md="12" lg="8" xl="8">
63
- <Texto
64
- :titulo="dadosPessoa.tipoPessoa == 2 ? 'Razão Social' : 'Nome'"
65
- campo="razaoSocialNome"
66
- :formNome="formNome"
67
- :requerido="true"
68
- :tamanhoMaximo="100"
63
+ <InputText
64
+ :title="dadosPessoa.typePessoa == 2 ? 'Razão Social' : 'Nome'"
65
+ field="razaoSocialNome"
66
+ :formName="formName"
67
+ :required="true"
68
+ :maxLength="100"
69
69
  v-model="dadosPessoa.razaoSocialNome"
70
70
  />
71
71
  </b-col>
72
72
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
73
- <Texto
74
- :titulo="dadosPessoa.tipoPessoa == 2 ? 'Fantasia' : 'Apelido'"
75
- campo="fantasiaApelido"
76
- :formNome="formNome"
77
- :requerido="true"
78
- :tamanhoMaximo="100"
73
+ <InputText
74
+ :title="dadosPessoa.typePessoa == 2 ? 'Fantasia' : 'Apelido'"
75
+ field="fantasiaApelido"
76
+ :formName="formName"
77
+ :required="true"
78
+ :maxLength="100"
79
79
  v-model="dadosPessoa.fantasiaApelido"
80
80
  />
81
81
  </b-col>
@@ -84,9 +84,9 @@
84
84
  </template>
85
85
 
86
86
  <script>
87
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
88
- import Texto from "@nixweb/nixloc-ui/src/component/forms/Texto";
89
- import Opcoes from "@nixweb/nixloc-ui/src/component/forms/Opcoes";
87
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
88
+ import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
89
+ import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
90
90
  import DadosPessoa from "@nixweb/nixloc-ui/src/component/value-objects/DadosPessoa.js";
91
91
 
92
92
  import { mapMutations } from "vuex";
@@ -94,14 +94,14 @@ import { mapMutations } from "vuex";
94
94
  export default {
95
95
  name: "DadosPessoa",
96
96
  props: {
97
- formNome: String,
98
- requerido: {
97
+ formName: String,
98
+ required: {
99
99
  type: Boolean,
100
100
  default: false,
101
101
  },
102
102
  value: Object,
103
103
  },
104
- components: { Opcoes, Texto, Botao },
104
+ components: { RadioGroup, InputText, Button },
105
105
  data() {
106
106
  return {
107
107
  dadosPessoa: new DadosPessoa(),
@@ -111,21 +111,21 @@ export default {
111
111
  if (this.value.razaoSocialNome != undefined) this.dadosPessoa = this.value;
112
112
  },
113
113
  methods: {
114
- ...mapMutations("generic", ["insereEvento", "insereNotificacao", "removeCarregando"]),
114
+ ...mapMutations("generic", ["addEvent", "addNotifications", "removeLoading"]),
115
115
  buscarCnpjReceita() {
116
116
  let url = `https://ws.hubdodesenvolvedor.com.br/v2/cnpj/?cnpj=${this.dadosPessoa.cnpjCpf}&token=94473735FzLqpNKajP170569464`;
117
117
  this.$http.post(url, {}, {}).then((response) => {
118
118
  if (response.data.return == "OK") {
119
- this.insereEvento({
119
+ this.addEvent({
120
120
  nome: "buscarCnpjReceita",
121
- dados: response.data.result,
121
+ data: response.data.result,
122
122
  });
123
123
  this.dadosPessoa.razaoSocialNome = response.data.result.nome;
124
124
  this.dadosPessoa.fantasiaApelido = response.data.result.fantasia;
125
125
  } else {
126
- this.insereNotificacao([{ mensagem: "CNPJ inválido ou não encontrado." }]);
126
+ this.addNotifications([{ message: "CNPJ inválido ou não encontrado." }]);
127
127
  }
128
- this.removeCarregando(["buscarCnpjReceita"]);
128
+ this.removeLoading(["buscarCnpjReceita"]);
129
129
  });
130
130
  },
131
131
  },
@@ -2,51 +2,51 @@
2
2
  <div>
3
3
  <b-row>
4
4
  <b-col xs="12" sm="12" md="12" lg="3" xl="3">
5
- <Texto
6
- titulo="CEP"
7
- campo="cep"
8
- :formNome="formNome"
9
- :mascara="'#####-###'"
10
- :tamanhoMaximo="9"
11
- :requerido="requerido"
5
+ <InputText
6
+ title="CEP"
7
+ field="cep"
8
+ :formName="formName"
9
+ :mask="'#####-###'"
10
+ :maxLength="9"
11
+ :required="required"
12
12
  v-model="endereco.cep"
13
13
  >
14
- <div class="glyphicon margem-botao">
15
- <Botao
16
- chave="buscarCep"
17
- tipo="sucesso"
18
- classeIcone="fas fa-search"
19
- tamanho="pequeno"
20
- :desabilitado="endereco.cep.length < 9"
21
- :clique="buscarCep"
14
+ <div class="glyphicon margin-button">
15
+ <Button
16
+ key="buscarCep"
17
+ type="success"
18
+ classIcon="fas fa-search"
19
+ size="small"
20
+ :disabled="endereco.cep.length < 9"
21
+ :clicked="buscarCep"
22
22
  /></div
23
- ></Texto>
23
+ ></InputText>
24
24
  </b-col>
25
25
  <b-col xs="12" sm="12" md="12" lg="5" xl="5">
26
- <Texto
27
- titulo="Endereço"
28
- campo="logradouro"
29
- :formNome="formNome"
30
- :tamanhoMaximo="150"
31
- :requerido="requerido"
26
+ <InputText
27
+ title="Endereço"
28
+ field="logradouro"
29
+ :formName="formName"
30
+ :maxLength="150"
31
+ :required="required"
32
32
  v-model="endereco.logradouro"
33
33
  />
34
34
  </b-col>
35
35
  <b-col xs="12" sm="12" md="12" lg="2" xl="2">
36
- <Texto
37
- titulo="Número"
38
- campo="numero"
39
- :formNome="formNome"
40
- :tamanhoMaximo="20"
36
+ <InputText
37
+ title="Número"
38
+ field="numero"
39
+ :formName="formName"
40
+ :maxLength="20"
41
41
  v-model="endereco.numero"
42
42
  />
43
43
  </b-col>
44
44
  <b-col xs="12" sm="12" md="12" lg="2" xl="2">
45
- <Texto
46
- titulo="Complemento"
47
- campo="complemento"
48
- :formNome="formNome"
49
- :tamanhoMaximo="50"
45
+ <InputText
46
+ title="Complemento"
47
+ field="complemento"
48
+ :formName="formName"
49
+ :maxLength="50"
50
50
  v-model="endereco.complemento"
51
51
  />
52
52
  </b-col>
@@ -54,41 +54,40 @@
54
54
  </b-row>
55
55
  <b-row>
56
56
  <b-col xs="12" sm="12" md="12" lg="5" xl="5">
57
- <Texto
58
- titulo="Bairro"
59
- campo="bairro"
60
- :formNome="formNome"
61
- :tamanhoMaximo="100"
62
- :requerido="requerido"
57
+ <InputText
58
+ title="Bairro"
59
+ field="bairro"
60
+ :formName="formName"
61
+ :maxLength="100"
62
+ :required="required"
63
63
  v-model="endereco.bairro"
64
64
  /> </b-col
65
65
  ><b-col xs="12" sm="12" md="12" lg="5" xl="5">
66
- <Texto
67
- titulo="Cidade"
68
- campo="cidade"
69
- :formNome="formNome"
70
- :tamanhoMaximo="100"
71
- :requerido="requerido"
66
+ <InputText
67
+ title="Cidade"
68
+ field="cidade"
69
+ :formName="formName"
70
+ :maxLength="100"
71
+ :required="required"
72
72
  v-model="endereco.cidade"
73
73
  />
74
74
  </b-col>
75
75
  <b-col xs="12" sm="12" md="12" lg="2" xl="2">
76
- <EscolherEstatico
77
- titulo="UF"
78
- campoAlvo="uf"
79
- :requerido="requerido"
76
+ <SelectStatic
77
+ title="UF"
78
+ fieldTarget="uf"
79
+ :required="required"
80
80
  v-model="endereco.estado"
81
- :dados="estados"
81
+ :data="estados"
82
82
  /> </b-col
83
83
  ></b-row>
84
84
  </div>
85
85
  </template>
86
86
 
87
87
  <script>
88
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
89
- import Texto from "@nixweb/nixloc-ui/src/component/forms/Texto";
90
- import Opcoes from "@nixweb/nixloc-ui/src/component/forms/Opcoes";
91
- import EscolherEstatico from "@nixweb/nixloc-ui/src/component/forms/EscolherEstatico";
88
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
89
+ import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
90
+ import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
92
91
 
93
92
  import Endereco from "@nixweb/nixloc-ui/src/component/value-objects/Endereco.js";
94
93
 
@@ -97,46 +96,46 @@ import { mapGetters, mapMutations } from "vuex";
97
96
  export default {
98
97
  name: "Endereco",
99
98
  props: {
100
- formNome: String,
101
- requerido: {
99
+ formName: String,
100
+ required: {
102
101
  type: Boolean,
103
102
  default: false,
104
103
  },
105
104
  value: Object,
106
105
  },
107
- components: { Opcoes, Texto, Botao, EscolherEstatico },
106
+ components: { InputText, Button, SelectStatic },
108
107
 
109
108
  data() {
110
109
  return {
111
110
  endereco: new Endereco(),
112
111
  estados: [
113
- { conteudo: "AC", id: "AC" },
114
- { conteudo: "AL", id: "AL" },
115
- { conteudo: "AP", id: "AP" },
116
- { conteudo: "AM", id: "AM" },
117
- { conteudo: "BA", id: "BA" },
118
- { conteudo: "CE", id: "CE" },
119
- { conteudo: "DF", id: "DF" },
120
- { conteudo: "ES", id: "ES" },
121
- { conteudo: "GO", id: "GO" },
122
- { conteudo: "MA", id: "MA" },
123
- { conteudo: "MT", id: "MT" },
124
- { conteudo: "MS", id: "MS" },
125
- { conteudo: "MG", id: "MG" },
126
- { conteudo: "PA", id: "PA" },
127
- { conteudo: "PB", id: "PB" },
128
- { conteudo: "PR", id: "PR" },
129
- { conteudo: "PE", id: "PE" },
130
- { conteudo: "PI", id: "PI" },
131
- { conteudo: "RJ", id: "RJ" },
132
- { conteudo: "RN", id: "RN" },
133
- { conteudo: "RS", id: "RS" },
134
- { conteudo: "RO", id: "RO" },
135
- { conteudo: "RR", id: "RR" },
136
- { conteudo: "SC", id: "SC" },
137
- { conteudo: "SP", id: "SP" },
138
- { conteudo: "SE", id: "SE" },
139
- { conteudo: "TO", id: "TO" },
112
+ { content: "AC", id: "AC" },
113
+ { content: "AL", id: "AL" },
114
+ { content: "AP", id: "AP" },
115
+ { content: "AM", id: "AM" },
116
+ { content: "BA", id: "BA" },
117
+ { content: "CE", id: "CE" },
118
+ { content: "DF", id: "DF" },
119
+ { content: "ES", id: "ES" },
120
+ { content: "GO", id: "GO" },
121
+ { content: "MA", id: "MA" },
122
+ { content: "MT", id: "MT" },
123
+ { content: "MS", id: "MS" },
124
+ { content: "MG", id: "MG" },
125
+ { content: "PA", id: "PA" },
126
+ { content: "PB", id: "PB" },
127
+ { content: "PR", id: "PR" },
128
+ { content: "PE", id: "PE" },
129
+ { content: "PI", id: "PI" },
130
+ { content: "RJ", id: "RJ" },
131
+ { content: "RN", id: "RN" },
132
+ { content: "RS", id: "RS" },
133
+ { content: "RO", id: "RO" },
134
+ { content: "RR", id: "RR" },
135
+ { content: "SC", id: "SC" },
136
+ { content: "SP", id: "SP" },
137
+ { content: "SE", id: "SE" },
138
+ { content: "TO", id: "TO" },
140
139
  ],
141
140
  };
142
141
  },
@@ -144,10 +143,10 @@ export default {
144
143
  if (this.value.cep != undefined) this.endereco = this.value;
145
144
  },
146
145
  computed: {
147
- ...mapGetters("generic", ["evento"]),
146
+ ...mapGetters("generic", ["event"]),
148
147
  },
149
148
  methods: {
150
- ...mapMutations("generic", ["insereEvento", "insereNotificacao", "removeCarregando"]),
149
+ ...mapMutations("generic", ["addEvent", "addNotifications", "removeLoading"]),
151
150
  buscarCep() {
152
151
  let cep = this.endereco.cep.replace(/\.|\-/g, "");
153
152
  let url = `https://viacep.com.br/ws/${cep}/json/`;
@@ -155,18 +154,18 @@ export default {
155
154
  let self = this;
156
155
  setTimeout(function () {
157
156
  self.carregaDados(response.data);
158
- self.removeCarregando(["buscarCep"]);
157
+ self.removeLoading(["buscarCep"]);
159
158
  }, 300);
160
159
  });
161
160
  },
162
- carregaDados(dados) {
163
- this.endereco.cep = dados.cep;
164
- this.endereco.logradouro = dados.logradouro;
165
- this.endereco.numero = dados.complemento;
166
- this.endereco.bairro = dados.bairro;
161
+ carregaDados(data) {
162
+ this.endereco.cep = data.cep;
163
+ this.endereco.logradouro = data.logradouro;
164
+ this.endereco.numero = data.complemento;
165
+ this.endereco.bairro = data.bairro;
167
166
  this.endereco.cidade =
168
- dados.localidade == undefined ? dados.municipio : dados.localidade;
169
- this.endereco.estado = { id: dados.uf, conteudo: dados.uf };
167
+ data.localidade == undefined ? data.municipio : data.localidade;
168
+ this.endereco.estado = { id: data.uf, content: data.uf };
170
169
  },
171
170
  },
172
171
  watch: {
@@ -182,10 +181,10 @@ export default {
182
181
  },
183
182
  deep: true,
184
183
  },
185
- evento: {
186
- handler(evento) {
187
- if (evento.nome == "buscarCnpjReceita") {
188
- this.carregaDados(evento.dados);
184
+ event: {
185
+ handler(event) {
186
+ if (event.nome == "buscarCnpjReceita") {
187
+ this.carregaDados(event.data);
189
188
  }
190
189
  },
191
190
  deep: true,
@@ -1,7 +1,7 @@
1
1
  const dicas = [];
2
2
 
3
3
  const manutencao = [
4
- // { formNome: "opcoesFaturamento", campo: "unificar", titulo: "Unificar Cliente", descricao: "Ao marcar essa opção" },
4
+ // { formName: "opcoesFaturamento", field: "unificar", title: "Unificar Cliente", description: "Ao marcar essa opção" },
5
5
 
6
6
  ];
7
7
 
@@ -3,13 +3,13 @@ export default class Token {
3
3
  tokenHeaders() {
4
4
  return {
5
5
  "Content-Type": "application/json",
6
- Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).usuario.usuarioLogado.token
6
+ Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).user.userLogged.token
7
7
  };
8
8
  }
9
9
  tokenHeadersFormData() {
10
10
  return {
11
11
  "Content-Type": "multipart/form-data",
12
- Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).usuario.usuarioLogado.token
12
+ Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).user.userLogged.token
13
13
  };
14
14
  }
15
15
  }