@nixweb/nixloc-ui 0.0.111 → 0.0.114

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 (87) hide show
  1. package/ckeditor5/LICENSE.md +49 -0
  2. package/ckeditor5/README.md +68 -0
  3. package/ckeditor5/build/ckeditor.js +41694 -0
  4. package/ckeditor5/build/ckeditor.js.map +1 -0
  5. package/ckeditor5/build/translations/af.js +1 -0
  6. package/ckeditor5/build/translations/ar.js +1 -0
  7. package/ckeditor5/build/translations/ast.js +1 -0
  8. package/ckeditor5/build/translations/az.js +1 -0
  9. package/ckeditor5/build/translations/bg.js +1 -0
  10. package/ckeditor5/build/translations/bs.js +1 -0
  11. package/ckeditor5/build/translations/ca.js +1 -0
  12. package/ckeditor5/build/translations/cs.js +1 -0
  13. package/ckeditor5/build/translations/da.js +1 -0
  14. package/ckeditor5/build/translations/de-ch.js +1 -0
  15. package/ckeditor5/build/translations/de.js +1 -0
  16. package/ckeditor5/build/translations/el.js +1 -0
  17. package/ckeditor5/build/translations/en-au.js +1 -0
  18. package/ckeditor5/build/translations/en-gb.js +1 -0
  19. package/ckeditor5/build/translations/en.js +1 -0
  20. package/ckeditor5/build/translations/eo.js +1 -0
  21. package/ckeditor5/build/translations/es.js +1 -0
  22. package/ckeditor5/build/translations/et.js +1 -0
  23. package/ckeditor5/build/translations/eu.js +1 -0
  24. package/ckeditor5/build/translations/fa.js +1 -0
  25. package/ckeditor5/build/translations/fi.js +1 -0
  26. package/ckeditor5/build/translations/fr.js +1 -0
  27. package/ckeditor5/build/translations/gl.js +1 -0
  28. package/ckeditor5/build/translations/gu.js +1 -0
  29. package/ckeditor5/build/translations/he.js +1 -0
  30. package/ckeditor5/build/translations/hi.js +1 -0
  31. package/ckeditor5/build/translations/hr.js +1 -0
  32. package/ckeditor5/build/translations/hu.js +1 -0
  33. package/ckeditor5/build/translations/id.js +1 -0
  34. package/ckeditor5/build/translations/it.js +1 -0
  35. package/ckeditor5/build/translations/ja.js +1 -0
  36. package/ckeditor5/build/translations/jv.js +1 -0
  37. package/ckeditor5/build/translations/kk.js +1 -0
  38. package/ckeditor5/build/translations/km.js +1 -0
  39. package/ckeditor5/build/translations/kn.js +1 -0
  40. package/ckeditor5/build/translations/ko.js +1 -0
  41. package/ckeditor5/build/translations/ku.js +1 -0
  42. package/ckeditor5/build/translations/lt.js +1 -0
  43. package/ckeditor5/build/translations/lv.js +1 -0
  44. package/ckeditor5/build/translations/nb.js +1 -0
  45. package/ckeditor5/build/translations/ne.js +1 -0
  46. package/ckeditor5/build/translations/nl.js +1 -0
  47. package/ckeditor5/build/translations/no.js +1 -0
  48. package/ckeditor5/build/translations/oc.js +1 -0
  49. package/ckeditor5/build/translations/pl.js +1 -0
  50. package/ckeditor5/build/translations/pt.js +1 -0
  51. package/ckeditor5/build/translations/ro.js +1 -0
  52. package/ckeditor5/build/translations/ru.js +1 -0
  53. package/ckeditor5/build/translations/si.js +1 -0
  54. package/ckeditor5/build/translations/sk.js +1 -0
  55. package/ckeditor5/build/translations/sl.js +1 -0
  56. package/ckeditor5/build/translations/sq.js +1 -0
  57. package/ckeditor5/build/translations/sr-latn.js +1 -0
  58. package/ckeditor5/build/translations/sr.js +1 -0
  59. package/ckeditor5/build/translations/sv.js +1 -0
  60. package/ckeditor5/build/translations/th.js +1 -0
  61. package/ckeditor5/build/translations/tk.js +1 -0
  62. package/ckeditor5/build/translations/tr.js +1 -0
  63. package/ckeditor5/build/translations/tt.js +1 -0
  64. package/ckeditor5/build/translations/ug.js +1 -0
  65. package/ckeditor5/build/translations/uk.js +1 -0
  66. package/ckeditor5/build/translations/uz.js +1 -0
  67. package/ckeditor5/build/translations/vi.js +1 -0
  68. package/ckeditor5/build/translations/zh-cn.js +1 -0
  69. package/ckeditor5/build/translations/zh.js +1 -0
  70. package/ckeditor5/package.json +42 -0
  71. package/ckeditor5/sample/index.html +133 -0
  72. package/ckeditor5/sample/styles.css +500 -0
  73. package/ckeditor5/src/ckeditor.js +127 -0
  74. package/ckeditor5/webpack.config.js +96 -0
  75. package/package.json +2 -1
  76. package/src/component/layout/Moldura.vue +1 -1
  77. package/src/component/layout/Wizard.vue +200 -11
  78. package/src/component/shared/CodigoEditor.vue +28 -5
  79. package/src/component/shared/DocumentoPreview.vue +4 -12
  80. package/src/component/shared/LegendaParametro.vue +101 -0
  81. package/src/component/shared/Tabela.vue +1 -1
  82. package/src/component/template/ModeloDocumentoView.vue +12 -14
  83. package/src/component/value-objects/DadosContato.vue +10 -0
  84. package/src/component/value-objects/DadosPessoa.vue +10 -1
  85. package/src/component/value-objects/Endereco.vue +3 -0
  86. package/src/store/modulos/generic.js +12 -1
  87. package/src/component/shared/ConfiguracaoTabela.vue +0 -54
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nixweb/nixloc-ui",
3
- "version": "0.0.111",
3
+ "version": "0.0.114",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -13,6 +13,7 @@
13
13
  "@babel/polyfill": "^7.2.5",
14
14
  "@ckeditor/ckeditor5-vue2": "^2.0.0",
15
15
  "bootstrap-vue": "^2.0.0-rc.11",
16
+ "ckeditor5-custom-build": "file:ckeditor5",
16
17
  "sass-loader": "^12.4.0",
17
18
  "v-runtime-template": "^1.10.0",
18
19
  "vodal": "^2.4.0",
@@ -10,7 +10,7 @@ export default {
10
10
  props: {
11
11
  bordaArredondada: {
12
12
  type: Number,
13
- default: 3,
13
+ default: 5,
14
14
  },
15
15
  },
16
16
  };
@@ -1,24 +1,213 @@
1
1
  <template>
2
2
  <div>
3
- <ul class="wizard wizard-steps-3">
4
- <li>
5
- <div class="step">
6
- <span>
7
- <i class="fas fa-check"></i>
8
- </span>
3
+ <div class="wrapper-stepper">
4
+ <div class="stepper">
5
+ <div class="stepper-progress" v-if="mostrarPassos">
6
+ <div class="stepper-progress-bar" :style="'width:' + stepperProgress"></div>
9
7
  </div>
10
- <div>
11
- <span>Produto(s)</span>
8
+
9
+ <div
10
+ class="stepper-item"
11
+ v-if="mostrarPassos"
12
+ :class="{ current: step == item, success: step > item }"
13
+ v-for="item in etapa"
14
+ :key="item"
15
+ >
16
+ <div class="stepper-item-counter">
17
+ <img
18
+ class="icon-success"
19
+ src="https://www.seekpng.com/png/full/1-10353_check-mark-green-png-green-check-mark-svg.png"
20
+ alt=""
21
+ />
22
+ <span class="number">
23
+ {{ item }}
24
+ </span>
25
+ </div>
26
+ <div class="stepper-item-title text-center">{{ legenda[item - 1] }}</div>
27
+ </div>
28
+ </div>
29
+
30
+ <div class="stepper-content" v-for="item in etapa" :key="item">
31
+ <div class="stepper-pane" v-if="step == item">
32
+ <slot :name="step"></slot>
12
33
  </div>
13
- </li>
14
- </ul>
34
+ </div>
35
+ <div class="controls">
36
+ <button class="btn" @click="step--" v-if="step != 1">Anterior</button>
37
+ <button
38
+ v-if="step < etapa"
39
+ class="btn btn--green-1"
40
+ @click="step++"
41
+ :disabled="!formValido(formNome[step - 1])"
42
+ >
43
+ Próximo
44
+ </button>
45
+ <div class="slot-final" v-else>
46
+ <slot name="finalizar"></slot>
47
+ </div>
48
+ </div>
49
+ </div>
15
50
  </div>
16
51
  </template>
17
52
 
18
53
  <script>
54
+ import { mapGetters, mapActions, mapMutations } from "vuex";
55
+
19
56
  export default {
20
57
  name: "Wizard",
58
+ props: {
59
+ etapa: Number,
60
+ legenda: Array,
61
+ formNome: Array,
62
+ mostrarPassos: {
63
+ type: Boolean,
64
+ default: true,
65
+ },
66
+ },
67
+ data() {
68
+ return {
69
+ step: 1,
70
+ };
71
+ },
72
+ computed: {
73
+ ...mapGetters("validation", ["formValido"]),
74
+ stepperProgress() {
75
+ return (100 / this.etapa) * (this.step - 1) + "%";
76
+ },
77
+ },
21
78
  };
22
79
  </script>
23
80
 
24
- <style scoped></style>
81
+ <style scoped>
82
+ .tx-green-1 {
83
+ color: #75cc65;
84
+ }
85
+ .wrapper-stepper {
86
+ background-color: #fff;
87
+ padding: 0px;
88
+ border-radius: 32px;
89
+ box-shadow: rgba(0, 0, 0, 0.09);
90
+ }
91
+ .stepper {
92
+ display: flex;
93
+ align-items: center;
94
+ justify-content: space-between;
95
+ position: relative;
96
+ z-index: 0;
97
+ margin-bottom: 24px;
98
+ margin-left: 80px;
99
+ margin-right: 80px;
100
+ }
101
+ .stepper-progress {
102
+ position: absolute;
103
+ background-color: #dddada;
104
+ height: 1px;
105
+ z-index: -1;
106
+ left: 0;
107
+ right: 0;
108
+ margin: 0 auto;
109
+ }
110
+ .stepper-progress-bar {
111
+ position: absolute;
112
+ left: 0;
113
+ height: 100%;
114
+ width: 0%;
115
+ background-color: #75cc65;
116
+ transition: all 500ms ease;
117
+ }
118
+ .stepper-item {
119
+ display: flex;
120
+ flex-direction: column;
121
+ align-items: center;
122
+ color: #c5c5c5;
123
+ transition: all 500ms ease;
124
+ }
125
+ .stepper-item-counter {
126
+ height: 38px;
127
+ width: 38px;
128
+ display: grid;
129
+ place-items: center;
130
+ background-color: #fff;
131
+ border-radius: 100%;
132
+ border: 1px solid #c5c5c5;
133
+ position: relative;
134
+ }
135
+ .stepper-item-counter .icon-success {
136
+ position: absolute;
137
+ opacity: 0;
138
+ transform: scale(0);
139
+ width: 20px;
140
+ transition: all 500ms ease;
141
+ }
142
+ .stepper-item-counter .number {
143
+ font-size: 15px;
144
+ transition: all 500ms ease;
145
+ }
146
+ .stepper-item-title {
147
+ position: absolute;
148
+ padding-top: 40px;
149
+ width: 40px;
150
+ margin-left: -16px;
151
+ }
152
+ .stepper-item.success .stepper-item-counter {
153
+ border-color: #75cc65;
154
+ background-color: #c8ebc1;
155
+ color: #fff;
156
+ }
157
+ .stepper-item.success .stepper-item-counter .icon-success {
158
+ opacity: 1;
159
+ transform: scale(1);
160
+ }
161
+ .stepper-item.success .stepper-item-counter .number {
162
+ opacity: 0;
163
+ transform: scale(0);
164
+ }
165
+ .stepper-item.success .stepper-item-title {
166
+ color: #75cc65;
167
+ }
168
+ .stepper-item.current .stepper-item-counter {
169
+ border-color: #4ab4e2;
170
+ background-color: #4ab4e2;
171
+ color: #fff;
172
+ }
173
+ .stepper-item.current .stepper-item-title {
174
+ color: #818181;
175
+ }
176
+ .stepper-pane {
177
+ color: #333;
178
+ margin: 40px 0;
179
+ }
180
+ .controls {
181
+ display: flex;
182
+ }
183
+ .btn {
184
+ padding: 8px 12px;
185
+ cursor: pointer;
186
+ border: none;
187
+ border-radius: 40px !important;
188
+ font-size: 13px !important;
189
+ font-weight: normal;
190
+ font-style: normal !important;
191
+ letter-spacing: 1px !important;
192
+ background: #577696;
193
+ border-color: #577696;
194
+ color: #fff;
195
+ -webkit-box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
196
+ -moz-box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
197
+ box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
198
+ }
199
+ .btn:disabled {
200
+ opacity: 0.5;
201
+ pointer-events: none;
202
+ }
203
+ .btn--green-1 {
204
+ background: #577696;
205
+ border-color: #577696;
206
+ color: #fff;
207
+ margin-left: auto;
208
+ }
209
+
210
+ .slot-final {
211
+ margin-left: auto;
212
+ }
213
+ </style>
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <div>
3
- <button @click="aplicar()">Aplicar</button>
4
3
  <AceEditor
5
4
  v-model="codigo"
6
5
  lang="html"
@@ -20,11 +19,26 @@
20
19
  showGutter: true,
21
20
  }"
22
21
  />
22
+ <div class="aplicar">
23
+ <b-row>
24
+ <b-col class="text-right">
25
+ <Botao
26
+ chave="aplicarCodigo"
27
+ tipo="primario"
28
+ titulo="Aplicar"
29
+ classeIcone="far fa-code"
30
+ tamanho="pequeno"
31
+ :clique="aplicar"
32
+ />
33
+ </b-col>
34
+ </b-row>
35
+ </div>
23
36
  </div>
24
37
  </template>
25
38
 
26
39
  <script>
27
40
  import AceEditor from "vuejs-ace-editor";
41
+ import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
28
42
 
29
43
  import { mapMutations } from "vuex";
30
44
 
@@ -32,6 +46,7 @@ export default {
32
46
  name: "CodigoEditor",
33
47
  components: {
34
48
  AceEditor,
49
+ Botao,
35
50
  },
36
51
  data() {
37
52
  return {
@@ -52,12 +67,15 @@ export default {
52
67
  this.codigo = this.documentoHtml;
53
68
  },
54
69
  methods: {
55
- ...mapMutations("generic", ["atualizaDocumentoHtml"]),
70
+ ...mapMutations("generic", [
71
+ "atualizaDocumentoHtml",
72
+ "fecharModal",
73
+ "removeCarregando",
74
+ ]),
56
75
  aplicar() {
57
76
  this.atualizaDocumentoHtml(this.codigo);
58
- },
59
- dataSumit() {
60
- //code here
77
+ this.fecharModal("codigo");
78
+ this.removeCarregando(["aplicarCodigo"]);
61
79
  },
62
80
  editorInit: function () {
63
81
  require("brace/ext/language_tools"); //language extension prerequsite...
@@ -70,3 +88,8 @@ export default {
70
88
  },
71
89
  };
72
90
  </script>
91
+ <style scoped>
92
+ .aplicar {
93
+ margin-top: 10px;
94
+ }
95
+ </style>
@@ -5,6 +5,8 @@
5
5
  <script>
6
6
  import VRuntimeTemplate from "v-runtime-template";
7
7
 
8
+ import { mapGetters } from "vuex";
9
+
8
10
  export default {
9
11
  name: "HtmlPreview",
10
12
  components: {
@@ -15,16 +17,6 @@ export default {
15
17
  dados: Object,
16
18
  },
17
19
  methods: {
18
- agruparPor(array, key) {
19
- const result = {};
20
- array.forEach((item) => {
21
- if (!result[item[key]]) {
22
- result[item[key]] = [];
23
- }
24
- result[item[key]].push(item);
25
- });
26
- return result;
27
- },
28
20
  somaGrupo(grupoNome) {
29
21
  let total = "";
30
22
  this.dados.produto.forEach((x) => {
@@ -34,10 +26,10 @@ export default {
34
26
  },
35
27
  },
36
28
  computed: {
29
+ ...mapGetters("generic", ["agruparPor"]),
37
30
  produtoAgrupado() {
38
- return this.agruparPor(this.dados.produto, "grupoNome");
31
+ return this.agruparPor({ array: this.dados.produto, key: "grupoNome" });
39
32
  },
40
33
  },
41
34
  };
42
35
  </script>
43
-
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <div>
3
+ <div class="div-alerta">
4
+ <Alerta tipo="info">
5
+ <span>
6
+ Utilize os parâmetros para que as informações sejam carregadas de forma
7
+ dinâmicas!</span
8
+ >
9
+ </Alerta>
10
+ </div>
11
+ <table class="table table-responsive-xs">
12
+ <thead>
13
+ <tr>
14
+ <th><span class="titulo-cabecalho">Parâmetro</span></th>
15
+ <th><span class="titulo-cabecalho">Descrição</span></th>
16
+ <th><span class="titulo-cabecalho">Exemplo</span></th>
17
+ </tr>
18
+ </thead>
19
+ <tbody v-for="(legenda, grupoNome) in agrupado">
20
+ <td class="grupo" colspan="8">
21
+ <div>{{ grupoNome }}</div>
22
+ </td>
23
+ <tr v-for="item in legenda">
24
+ <td>
25
+ <span> {{ item.parametro }}</span>
26
+ </td>
27
+ <td>
28
+ <span> {{ item.descricao }}</span>
29
+ </td>
30
+ <td>
31
+ <span> {{ item.exemplo }}</span>
32
+ </td>
33
+ </tr>
34
+ </tbody>
35
+ </table>
36
+ </div>
37
+ </template>
38
+ <script>
39
+ import Alerta from "@nixweb/nixloc-ui/src/component/layout/Alerta";
40
+
41
+ import { mapGetters } from "vuex";
42
+
43
+ export default {
44
+ name: "LegendaParametro",
45
+ components: {
46
+ Alerta,
47
+ },
48
+ data() {
49
+ return {
50
+ legenda: [
51
+ {
52
+ grupoNome: "Locação",
53
+ parametro: "{{d.l.n}}",
54
+ descricao: "Número da Locação",
55
+ exemplo: "200",
56
+ },
57
+ {
58
+ grupoNome: "Locação",
59
+ parametro: "{{d.l.dA}}",
60
+ descricao: "Número da Locação",
61
+ exemplo: "200",
62
+ },
63
+ ],
64
+ };
65
+ },
66
+ computed: {
67
+ ...mapGetters("generic", ["agruparPor"]),
68
+ agrupado() {
69
+ var teste = this.agruparPor({ array: this.legenda, key: "grupoNome" });
70
+ console.log(teste);
71
+ return teste;
72
+ },
73
+ },
74
+ };
75
+ </script>
76
+ <style scoped>
77
+ .table th,
78
+ .table td {
79
+ height: 10px !important;
80
+ padding-left: 5px !important;
81
+ padding-top: 7px !important;
82
+ padding-bottom: 5px !important;
83
+ padding-right: 5px !important;
84
+ border-bottom: 0px !important;
85
+ }
86
+
87
+ .titulo-cabecalho {
88
+ font-size: 14px;
89
+ color: #757d8c;
90
+ font-weight: 400;
91
+ text-transform: uppercase;
92
+ }
93
+
94
+ .grupo {
95
+ background-color: #fafafc;
96
+ }
97
+
98
+ .div-alerta {
99
+ margin-bottom: 20px;
100
+ }
101
+ </style>
@@ -258,7 +258,7 @@ tr:hover {
258
258
  }
259
259
 
260
260
  .link {
261
- color: darkblue;
261
+ color: #3F529B;
262
262
  font-size: 15px;
263
263
  font-weight: 400;
264
264
  cursor: pointer;
@@ -39,11 +39,11 @@
39
39
  <b-col class="text-right" sm="6">
40
40
  <div class="lado-a-lado">
41
41
  <Botao
42
- chave="abrirConfiguracao"
42
+ chave="abrirLegenda"
43
43
  tipo="info"
44
- classeIcone="fas fa-tools"
44
+ classeIcone="fas fa-book-reader"
45
45
  tamanho="pequeno"
46
- :clique="abrirConfiguracao"
46
+ :clique="abrirLegenda"
47
47
  />
48
48
  </div>
49
49
  <div class="lado-a-lado">
@@ -72,15 +72,13 @@
72
72
  <Modal titulo="Salvar" :largura="500" v-show="mostrarModal('salvarDocumento')">
73
73
  <slot></slot>
74
74
  </Modal>
75
- <Modal titulo="Configuração" :largura="700" v-if="mostrarModal('configuracao')">
76
- <BarraRolagem :alturaMinima="200" :alturaMaxima="400">
77
- <ConfiguracaoTabela />
75
+ <Modal titulo="Parâmetros" :largura="900" v-if="mostrarModal('legenda')">
76
+ <BarraRolagem :alturaMinima="400" :alturaMaxima="400">
77
+ <LegendaParametro />
78
78
  </BarraRolagem>
79
79
  </Modal>
80
80
  <Modal titulo="Editor de Código" :largura="900" v-if="mostrarModal('codigo')">
81
- <BarraRolagem :alturaMinima="200" :alturaMaxima="400">
82
- <CodigoEditor v-if="modal.abrir" />
83
- </BarraRolagem>
81
+ <CodigoEditor v-if="modal.abrir" />
84
82
  </Modal>
85
83
  <Modal titulo="Visualizar" :largura="1100" v-if="mostrarModal('visualizar')">
86
84
  <div v-if="modal.abrir">
@@ -122,7 +120,7 @@ import Painel from "@nixweb/nixloc-ui/src/component/layout/Painel";
122
120
  import DocumentoEditor from "@nixweb/nixloc-ui/src/component/shared/DocumentoEditor.vue";
123
121
  import DocumentoPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentoPreview.vue";
124
122
  import CodigoEditor from "@nixweb/nixloc-ui/src/component/shared/CodigoEditor.vue";
125
- import ConfiguracaoTabela from "@nixweb/nixloc-ui/src/component/shared/ConfiguracaoTabela.vue";
123
+ import LegendaParametro from "@nixweb/nixloc-ui/src/component/shared/LegendaParametro.vue";
126
124
  import Moldura from "@nixweb/nixloc-ui/src/component/layout/Moldura";
127
125
  import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
128
126
  import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
@@ -142,7 +140,7 @@ export default {
142
140
  DocumentoEditor,
143
141
  DocumentoPreview,
144
142
  CodigoEditor,
145
- ConfiguracaoTabela,
143
+ LegendaParametro,
146
144
  Moldura,
147
145
  Botao,
148
146
  Modal,
@@ -180,9 +178,9 @@ export default {
180
178
  fazerCopia() {
181
179
  this.insereEvento({ nome: "fazerCopia" });
182
180
  },
183
- abrirConfiguracao() {
184
- this.abrirModal("configuracao");
185
- this.removeCarregando(["abrirConfiguracao"]);
181
+ abrirLegenda() {
182
+ this.abrirModal("legenda");
183
+ this.removeCarregando(["abrirLegenda"]);
186
184
  },
187
185
  abrirCodigo() {
188
186
  this.abrirModal("codigo");
@@ -8,6 +8,7 @@
8
8
  :formNome="formNome"
9
9
  :mascara="['(##) ####-####', '(##) #####-####']"
10
10
  :tamanhoMaximo="20"
11
+ :requerido="requerido"
11
12
  v-model="dadosContato.telefone"
12
13
  />
13
14
  </b-col>
@@ -18,6 +19,7 @@
18
19
  :formNome="formNome"
19
20
  mascara=""
20
21
  :tamanhoMaximo="100"
22
+ :requerido="requerido"
21
23
  v-model="dadosContato.site"
22
24
  />
23
25
  </b-col>
@@ -28,6 +30,7 @@
28
30
  :formNome="formNome"
29
31
  mascara=""
30
32
  :tamanhoMaximo="100"
33
+ :requerido="requerido"
31
34
  v-model="dadosContato.email"
32
35
  />
33
36
  </b-col>
@@ -47,6 +50,10 @@ export default {
47
50
  name: "DadosContato",
48
51
  props: {
49
52
  formNome: String,
53
+ requerido: {
54
+ type: Boolean,
55
+ default: false,
56
+ },
50
57
  value: Object,
51
58
  },
52
59
  components: { Opcoes, Texto, Botao },
@@ -55,6 +62,9 @@ export default {
55
62
  dadosContato: new DadosContato(),
56
63
  };
57
64
  },
65
+ mounted() {
66
+ if (this.value.telefone != undefined) this.dadosContato = this.value;
67
+ },
58
68
  methods: {
59
69
  carregaDados(dados) {
60
70
  this.dadosContato.telefone = dados.telefone;
@@ -21,6 +21,7 @@
21
21
  :formNome="formNome"
22
22
  :mascara="['##.###.###/####-##', '###.###.###-##']"
23
23
  :tamanhoMaximo="30"
24
+ :requerido="requerido"
24
25
  v-model="dadosPessoa.cnpjCpf"
25
26
  ><div class="glyphicon margem-botao">
26
27
  <Botao
@@ -40,6 +41,7 @@
40
41
  campo="inscricaoEstadualRg"
41
42
  :formNome="formNome"
42
43
  :tamanhoMaximo="50"
44
+ :requerido="requerido"
43
45
  v-model="dadosPessoa.inscricaoEstadualRg"
44
46
  />
45
47
  </b-col>
@@ -50,6 +52,7 @@
50
52
  campo="inscricaoMunicipal"
51
53
  :formNome="formNome"
52
54
  :tamanhoMaximo="50"
55
+ :requerido="requerido"
53
56
  v-model="dadosPessoa.inscricaoMunicipal"
54
57
  />
55
58
  </b-col>
@@ -92,15 +95,21 @@ export default {
92
95
  name: "DadosPessoa",
93
96
  props: {
94
97
  formNome: String,
98
+ requerido: {
99
+ type: Boolean,
100
+ default: false,
101
+ },
95
102
  value: Object,
96
103
  },
97
104
  components: { Opcoes, Texto, Botao },
98
-
99
105
  data() {
100
106
  return {
101
107
  dadosPessoa: new DadosPessoa(),
102
108
  };
103
109
  },
110
+ mounted() {
111
+ if (this.value.razaoSocialNome != undefined) this.dadosPessoa = this.value;
112
+ },
104
113
  methods: {
105
114
  ...mapMutations("generic", ["insereEvento", "insereNotificacao", "removeCarregando"]),
106
115
  buscarCnpjReceita() {
@@ -140,6 +140,9 @@ export default {
140
140
  ],
141
141
  };
142
142
  },
143
+ mounted() {
144
+ if (this.value.cep != undefined) this.endereco = this.value;
145
+ },
143
146
  computed: {
144
147
  ...mapGetters("generic", ["evento"]),
145
148
  },
@@ -144,7 +144,17 @@ export default {
144
144
  .replaceAll("<p>&nbsp!important;</p>", "<p>&nbsp</p>");
145
145
 
146
146
  return classeImportant;
147
- }
147
+ },
148
+ agruparPor: () => (obj) => {
149
+ const result = {};
150
+ obj.array.forEach((item) => {
151
+ if (!result[item[obj.key]]) {
152
+ result[item[obj.key]] = [];
153
+ }
154
+ result[item[obj.key]].push(item);
155
+ });
156
+ return result;
157
+ },
148
158
  },
149
159
  mutations: {
150
160
  abrirModal: (state, nome) => {
@@ -236,6 +246,7 @@ export default {
236
246
  state.EscolherEstatico.campoAlvo = obj.campoAlvo;
237
247
  state.EscolherEstatico.valor = obj.valor;
238
248
  },
249
+
239
250
  },
240
251
  actions: {
241
252
  postApi: async function (context, params) {