@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
@@ -1,30 +1,26 @@
1
1
  <template>
2
- <div class="c-div-botao">
2
+ <div class="c-div-button">
3
3
  <button
4
- class="botao"
4
+ class="button"
5
5
  :class="{
6
- pequeno: tamanho === 'pequeno',
7
- medio: tamanho === 'medio',
8
- grande: tamanho === 'grande',
9
- primario: tipo === 'primario',
10
- sucesso: tipo === 'sucesso',
11
- alerta: tipo === 'alerta',
12
- info: tipo === 'info',
13
- editar: tipo === 'editar',
14
- perigo: tipo === 'perigo',
15
- desabilitado: desabilitado,
6
+ small: size === 'small',
7
+ medium: size === 'medium',
8
+ large: size === 'large',
9
+ primary: type === 'primary',
10
+ success: type === 'success',
11
+ warning: type === 'warning',
12
+ info: type === 'info',
13
+ edit: type === 'edit',
14
+ danger: type === 'danger',
15
+ disabled: disabled,
16
16
  }"
17
- :disabled="desabilitado"
18
- @click="executar()"
17
+ :disabled="disabled"
18
+ @click="execute()"
19
19
  >
20
- <i
21
- class="titulo"
22
- :class="classeIcone"
23
- v-if="!carregando(this.chave) && classeIcone"
24
- ></i>
25
- <span v-if="!carregando(this.chave)">{{ titulo }}</span>
20
+ <i class="title" :class="classIcon" v-if="!isLoading(this.key) && classIcon"></i>
21
+ <span v-if="!isLoading(this.key)">{{ title }}</span>
26
22
  <vue-loading
27
- v-if="carregando(this.chave)"
23
+ v-if="isLoading(this.key)"
28
24
  type="bubbles"
29
25
  color="#fff"
30
26
  :size="{ width: '26px', height: '26px' }"
@@ -37,46 +33,46 @@
37
33
  import { mapGetters, mapMutations } from "vuex";
38
34
 
39
35
  export default {
40
- name: "Botao",
36
+ name: "Button",
41
37
  props: {
42
- chave: String,
43
- titulo: String,
44
- tipo: String,
45
- tamanho: String,
46
- nomeEvento: String,
47
- dadosEvento: Object,
48
- classeIcone: String,
49
- desabilitado: Boolean,
50
- clique: Function,
38
+ key: String,
39
+ title: String,
40
+ type: String,
41
+ size: String,
42
+ eventName: String,
43
+ eventData: Object,
44
+ classIcon: String,
45
+ disabled: Boolean,
46
+ clicked: Function,
51
47
  },
52
48
  computed: {
53
- ...mapGetters("generic", ["carregando"]),
49
+ ...mapGetters("generic", ["isLoading"]),
54
50
  },
55
51
  methods: {
56
- ...mapMutations("generic", ["insereCarregando", "insereEvento"]),
57
- executar() {
58
- if (this.nomeEvento)
59
- this.insereEvento({
60
- nome: this.nomeEvento,
61
- dados: this.dadosEvento,
52
+ ...mapMutations("generic", ["addLoading", "addEvent"]),
53
+ execute() {
54
+ if (this.eventName)
55
+ this.addEvent({
56
+ name: this.eventName,
57
+ data: this.eventData,
62
58
  });
63
- this.insereCarregando(this.chave);
64
- if (this.clique) this.clique();
59
+ this.addLoading(this.key);
60
+ if (this.clicked) this.clicked();
65
61
  },
66
62
  },
67
63
  };
68
64
  </script>
69
65
  <style scoped>
70
- .c-div-botao {
66
+ .c-div-button {
71
67
  display: inline-block;
72
68
  margin-left: 5px;
73
69
  }
74
70
 
75
- .titulo {
71
+ .title {
76
72
  margin: 2px;
77
73
  }
78
74
 
79
- .botao {
75
+ .button {
80
76
  padding: 8px 12px;
81
77
  cursor: pointer;
82
78
  border: none;
@@ -90,44 +86,44 @@ export default {
90
86
  box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
91
87
  }
92
88
 
93
- .pequeno {
89
+ .small {
94
90
  padding: 4px 8px;
95
91
  font-size: 13px;
96
92
  }
97
93
 
98
- .medio {
94
+ .medium {
99
95
  padding: 7px 12px;
100
96
  font-size: 13px;
101
97
  }
102
98
 
103
- .grande {
99
+ .large {
104
100
  padding: 10px 15px;
105
101
  font-size: 14px;
106
102
  }
107
103
 
108
- .desabilitado {
104
+ .disabled {
109
105
  background: #bbbbbb !important;
110
106
  border-color: #bbbbbb !important;
111
107
  color: #fff;
112
108
  }
113
109
 
114
- .primario {
110
+ .primary {
115
111
  background: #577696;
116
112
  border-color: #577696;
117
113
  color: #fff;
118
114
  }
119
115
 
120
- .primario:hover {
116
+ .primary:hover {
121
117
  background: #355472;
122
118
  }
123
119
 
124
- .sucesso {
120
+ .success {
125
121
  color: #fff;
126
122
  background: #94aa2a;
127
123
  border-color: #94aa2a;
128
124
  }
129
125
 
130
- .sucesso:hover {
126
+ .success:hover {
131
127
  background: #6d7e1c;
132
128
  }
133
129
 
@@ -141,33 +137,33 @@ export default {
141
137
  background: #3e90b3;
142
138
  }
143
139
 
144
- .editar {
140
+ .edit {
145
141
  color: #fff;
146
142
  border-color: #7b7f83;
147
143
  background: #7b7f83;
148
144
  }
149
145
 
150
- .editar:hover {
146
+ .edit:hover {
151
147
  background: #595c5f;
152
148
  }
153
149
 
154
- .alerta {
150
+ .warning {
155
151
  color: #fff;
156
152
  border-color: #f1bc31;
157
153
  background: #f1bc31;
158
154
  }
159
155
 
160
- .alerta:hover {
156
+ .warning:hover {
161
157
  background: #a37d1b;
162
158
  }
163
159
 
164
- .perigo {
160
+ .danger {
165
161
  color: #fff;
166
162
  border-color: #f0134d;
167
163
  background: #f0134d;
168
164
  }
169
165
 
170
- .perigo:hover {
166
+ .danger:hover {
171
167
  background: #c70f40;
172
168
  }
173
169
  </style>
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <div>
3
+ <b-form-group :label="title">
4
+ <b-form-checkbox-group
5
+ v-model="selected"
6
+ :options="options"
7
+ :stacked="stacked"
8
+ @click.native="execute"
9
+ ></b-form-checkbox-group>
10
+ </b-form-group>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import { mapMutations } from "vuex";
16
+
17
+ export default {
18
+ name: "CheckboxGroup",
19
+ props: {
20
+ title: String,
21
+ options: Array,
22
+ params: Object,
23
+ changed: Function,
24
+ clicked: Function,
25
+ initialValue: Array,
26
+ value: Array,
27
+ stacked: {
28
+ type: Boolean,
29
+ default: false,
30
+ },
31
+ markFormDirty: {
32
+ type: Boolean,
33
+ default: true,
34
+ },
35
+ },
36
+ data() {
37
+ return {
38
+ selected: [],
39
+ };
40
+ },
41
+ mounted() {
42
+ this.selected = this.initialValue;
43
+ },
44
+ methods: {
45
+ ...mapMutations("validation", ["updateFormDirty"]),
46
+ execute(event) {
47
+ if (this.markFormDirty) this.updateFormDirty(true);
48
+ this.$emit("input", this.selected);
49
+ let self = this;
50
+ setTimeout(function () {
51
+ // adicionado o pointerId para prevenir que não seja executado em duplicidade
52
+ if (self.clicked && event.pointerId === 1) self.clicked(self.params);
53
+ }, 100);
54
+ },
55
+ },
56
+ watch: {
57
+ selected() {
58
+ this.$emit("input", this.selected);
59
+ if (this.changed) this.changed(this.params);
60
+ },
61
+ },
62
+ };
63
+ </script>
@@ -1,21 +1,21 @@
1
1
  <template>
2
2
  <div>
3
3
  <b-form-checkbox v-model="value" :value="true" :unchecked-value="false">
4
- {{ titulo }}
5
- <Dica :campo="campo" :formNome="formNome" />
4
+ {{ title }}
5
+ <Tip :field="field" :formName="formName" />
6
6
  </b-form-checkbox>
7
7
  </div>
8
8
  </template>
9
9
 
10
10
  <script>
11
- import Dica from "../shared/Dica.vue";
11
+ import Tip from "../shared/Tip.vue";
12
12
  export default {
13
- components: { Dica },
14
- name: "CheckboxUnico",
13
+ components: { Tip },
14
+ name: "CheckboxSimple",
15
15
  props: {
16
- titulo: String,
17
- formNome: String,
18
- campo: String,
16
+ title: String,
17
+ formName: String,
18
+ field: String,
19
19
  value: Boolean,
20
20
  },
21
21
  watch: {
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div class="form-group">
3
3
  <div>
4
- <span class="titulo">{{ titulo }} </span>
5
- <compact-picker v-model.trim="cor.hex" />
4
+ <span class="title">{{ title }} </span>
5
+ <compact-picker v-model.trim="color.hex" />
6
6
  </div>
7
7
  </div>
8
8
  </template>
@@ -11,26 +11,26 @@
11
11
  import { Chrome } from "vue-color";
12
12
 
13
13
  export default {
14
- name: "Cor",
14
+ name: "Color",
15
15
  components: {
16
16
  "compact-picker": Chrome,
17
17
  },
18
18
  props: {
19
- titulo: String,
20
- campo: String,
21
- formNome: String,
19
+ title: String,
20
+ field: String,
21
+ formName: String,
22
22
  value: String,
23
23
  },
24
24
  data() {
25
25
  return {
26
- cor: { hex: "#40BF84" },
26
+ color: { hex: "#40BF84" },
27
27
  };
28
28
  },
29
29
  watch: {
30
30
  value() {
31
- this.cor.hex = this.value;
31
+ this.color.hex = this.value;
32
32
  },
33
- "cor.hex": function (value) {
33
+ "color.hex": function (value) {
34
34
  if (value.hex) this.$emit("input", value.hex);
35
35
  },
36
36
  },
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <div class="form-group">
3
3
  <label>
4
- <span class="titulo">{{ titulo }} </span>
5
- <span class="requerido" v-if="requerido">*</span>
6
- <Dica :campo="campo" :formNome="formNome" />
4
+ <span class="title">{{ title }} </span>
5
+ <span class="required" v-if="required">*</span>
6
+ <Tip :field="field" :formName="formName" />
7
7
  </label>
8
8
  <div class="inner-addon right-addon">
9
9
  <i
10
- v-if="notificacoes.length > 0 && formSujo"
11
- class="requerido glyphicon fas fa-exclamation-triangle"
10
+ v-if="notifications.length > 0 && formDirty"
11
+ class="required glyphicon fas fa-exclamation-triangle"
12
12
  ></i>
13
13
  <date-picker
14
14
  lang="pt-br"
@@ -30,35 +30,35 @@
30
30
  :placeholder="placeholder"
31
31
  :type="type"
32
32
  v-model="valor"
33
- :class="{ 'is-invalid': notificacoes.length > 0 && formSujo }"
33
+ :class="{ 'is-invalid': notifications.length > 0 && formDirty }"
34
34
  ></date-picker>
35
35
  </div>
36
36
 
37
- <div v-if="formSujo">
38
- <div v-for="mensagem in notificacoes" :key="mensagem">
39
- <span class="invalido">{{ mensagem }}</span>
37
+ <div v-if="formDirty">
38
+ <div v-for="message in notifications" :key="message">
39
+ <span class="invalid">{{ message }}</span>
40
40
  </div>
41
41
  </div>
42
42
  </div>
43
43
  </template>
44
44
 
45
45
  <script>
46
- import Dica from "../shared/Dica";
46
+ import Tip from "../shared/Tip";
47
47
  import DatePicker from "vue2-datepicker";
48
48
 
49
49
  import { mapState, mapMutations } from "vuex";
50
50
 
51
51
  export default {
52
- components: { Dica, DatePicker },
52
+ components: { Tip, DatePicker },
53
53
  name: "Data",
54
54
  mixins: [],
55
55
  props: [
56
- "titulo",
57
- "campo",
58
- "campoAlvo",
56
+ "title",
57
+ "field",
58
+ "fieldTarget",
59
59
  "placeholder",
60
- "formNome",
61
- "requerido",
60
+ "formName",
61
+ "required",
62
62
  "format",
63
63
  "type",
64
64
  "value",
@@ -67,12 +67,12 @@ export default {
67
67
  "confirmText",
68
68
  ],
69
69
  /* props: {
70
- titulo: String,
71
- campo: String,
72
- campoAlvo: String,
70
+ title: String,
71
+ field: String,
72
+ fieldTarget: String,
73
73
  placeholder: String,
74
- formNome: String,
75
- requerido: Boolean,
74
+ formName: String,
75
+ required: Boolean,
76
76
  format: String,
77
77
  type: String,
78
78
  value: String,
@@ -82,82 +82,82 @@ export default {
82
82
  },*/
83
83
  data() {
84
84
  return {
85
- notificacoes: [],
86
- formSujo: false,
85
+ notifications: [],
86
+ formDirty: false,
87
87
  valor: "",
88
88
  };
89
89
  },
90
90
  created() {
91
- this.valida();
91
+ this.validate();
92
92
  this.valor = this.value;
93
93
  },
94
94
  methods: {
95
95
  ...mapMutations("validation", [
96
- "insereValidacao",
97
- "removeValidacao",
98
- "insereFormSujo",
96
+ "addValidation",
97
+ "removeValidation",
98
+ "updateFormDirty",
99
99
  ]),
100
- ...mapMutations("generic", ["insereFiltro"]),
101
- valida() {
102
- this.notificacoes = [];
100
+ ...mapMutations("generic", ["addFilter"]),
101
+ validate() {
102
+ this.notifications = [];
103
103
 
104
- if (this.requerido && this.valor.length == 0) {
105
- var mensagem = `${this.titulo} não pode ser vazio!`;
106
- this.notificacoes.push(mensagem);
104
+ if (this.required && this.valor.length == 0) {
105
+ var message = `${this.title} não pode ser vazio!`;
106
+ this.notifications.push(message);
107
107
  }
108
108
  },
109
109
  confirma() {
110
110
  if (this.range) {
111
111
  let obj = {
112
- campoAlvo: this.campoAlvo,
112
+ fieldTarget: this.fieldTarget,
113
113
  valor: { inicio: this.valor[0], fim: this.valor[1] },
114
114
  };
115
- this.insereFiltro(obj);
115
+ this.addFilter(obj);
116
116
  }
117
117
  },
118
118
  fechar() {
119
119
  let obj = {
120
- campoAlvo: this.campoAlvo,
120
+ fieldTarget: this.fieldTarget,
121
121
  valor: { inicio: "", fim: "" },
122
122
  };
123
- this.insereFiltro(obj);
123
+ this.addFilter(obj);
124
124
  },
125
125
  },
126
126
  computed: {
127
- ...mapState("validation", ["reiniciaForm", "validacao"]),
127
+ ...mapState("validation", ["resetForm", "validations"]),
128
128
  },
129
129
  watch: {
130
130
  valor() {
131
- this.valida();
132
- this.formSujo = true;
133
- this.insereFormSujo(true);
131
+ this.validate();
132
+ this.formDirty = true;
133
+ this.updateFormDirty(true);
134
134
  this.$emit("input", this.valor);
135
135
  },
136
136
  value() {
137
137
  this.valor = this.value;
138
138
  },
139
- notificacoes() {
139
+ notifications() {
140
140
  let self = this;
141
- this.notificacoes.forEach(function (notificacao) {
141
+ this.notifications.forEach(function (notification) {
142
142
  let obj = {
143
- chave: self.campo + "&" + self.formNome,
144
- formNome: self.formNome,
145
- notificacao: notificacao,
143
+ key: self.field + "&" + self.formName,
144
+ formName: self.formName,
145
+ notification: notification,
146
146
  };
147
- self.insereValidacao(obj);
147
+ self.addValidation(obj);
148
148
  });
149
149
 
150
- if (this.notificacoes.length == 0) {
150
+ if (this.notifications.length == 0) {
151
151
  let obj = {
152
- chave: self.campo + "&" + self.formNome,
153
- formNome: self.formNome,
152
+ key: self.field + "&" + self.formName,
153
+ formName: self.formName,
154
154
  };
155
- self.removeValidacao(obj);
155
+ self.removeValidation(obj);
156
156
  }
157
157
  },
158
- reiniciaForm: {
158
+ resetForm: {
159
159
  handler(form) {
160
- if (form.nome == this.formNome) this.formSujo = false;
160
+ if (form.nome == this.formName) this.formDirty = false;
161
161
  },
162
162
  deep: true,
163
163
  },
@@ -166,11 +166,11 @@ export default {
166
166
  </script>
167
167
 
168
168
  <style scoped>
169
- .sucesso {
169
+ .success {
170
170
  color: #94aa2a;
171
171
  font-size: 14px;
172
172
  }
173
- .invalido {
173
+ .invalid {
174
174
  color: #f0134d;
175
175
  font-size: 14px;
176
176
  }