@bildvitta/quasar-ui-asteroid 3.11.0-beta.11 → 3.11.0-beta.12

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-ui-asteroid",
3
3
  "description": "Asteroid",
4
- "version": "3.11.0-beta.11",
4
+ "version": "3.11.0-beta.12",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -74,6 +74,7 @@ export default {
74
74
  filled = readonly,
75
75
  suffix,
76
76
  prefix,
77
+ places,
77
78
  type,
78
79
  mask,
79
80
  maxFiles,
@@ -104,7 +105,7 @@ export default {
104
105
  useIso
105
106
  }
106
107
 
107
- const numericInput = { is: 'qas-numeric-input', ...input }
108
+ const numericInput = { is: 'qas-numeric-input', places, ...input }
108
109
  const datetimeInput = { is: 'qas-date-time-input', useIso, ...input }
109
110
 
110
111
  // It'll generate a list of acceptable files extensions.
@@ -4,7 +4,7 @@
4
4
  <slot name="header" />
5
5
  </header>
6
6
 
7
- <q-form ref="form" @submit="submitHandler">
7
+ <q-form ref="form" v-bind="defaultFormProps">
8
8
  <slot />
9
9
 
10
10
  <slot v-if="useActions" name="actions">
@@ -76,6 +76,11 @@ export default {
76
76
  type: Boolean
77
77
  },
78
78
 
79
+ formProps: {
80
+ type: Object,
81
+ default: () => ({})
82
+ },
83
+
79
84
  mode: {
80
85
  default: 'create',
81
86
  type: String
@@ -191,6 +196,17 @@ export default {
191
196
  error: 'Não conseguimos salvar as informações. Por favor, tente novamente em alguns minutos.',
192
197
  success: 'Informações salvas com sucesso.'
193
198
  }
199
+ },
200
+
201
+ defaultFormProps () {
202
+ return {
203
+ ...this.formProps,
204
+
205
+ onSubmit: event => {
206
+ this.submitHandler(event)
207
+ this.formProps?.onSubmit?.(event)
208
+ }
209
+ }
194
210
  }
195
211
  },
196
212
 
@@ -66,6 +66,12 @@ props:
66
66
  examples: [v-model:fields="fields"]
67
67
  model: true
68
68
 
69
+ form-props:
70
+ desc: Repassa todas as props/eventos para o `QForm`.
71
+ default: {}
72
+ type: Object
73
+ examples: ['{ onValidationError: ref => validationErrorHandler(ref) }']
74
+
69
75
  ignore-keys-in-unsaved-changes:
70
76
  desc: Vamos imaginar um cenário onde você precisa alterar valores do v-model por qualquer motivo que seja, mas quando o usuário sair da tela, não pode aparecer o modal perguntando se ele quer sair ou continuar editando, por que o usuário de fato não fez nenhuma alteração nos dados, esta prop serve para você dizer quais keys dentro do v-model você quer ignorar.
71
77
  default: []
@@ -25,7 +25,7 @@ export default {
25
25
  type: Object
26
26
  },
27
27
 
28
- decimalPlaces: {
28
+ places: {
29
29
  default: 2,
30
30
  type: Number
31
31
  },
@@ -113,7 +113,7 @@ export default {
113
113
  }
114
114
 
115
115
  if (this.mode !== 'integer') {
116
- options.decimalPlaces = this.decimalPlaces
116
+ options.decimalPlaces = this.places
117
117
  }
118
118
 
119
119
  if (this.mode === 'money') {
@@ -12,7 +12,7 @@ props:
12
12
  default: {}
13
13
  type: Object
14
14
 
15
- decimal-places:
15
+ places:
16
16
  desc: Quantidade de casas decimais.
17
17
  default: 2
18
18
  type: Number
@@ -39,7 +39,7 @@
39
39
  position: relative;
40
40
 
41
41
  &:disabled {
42
- color: $grey-8 !important;
42
+ color: $grey-6 !important;
43
43
  }
44
44
  }
45
45
 
@@ -58,7 +58,7 @@
58
58
  padding: 0 !important;
59
59
 
60
60
  &:disabled {
61
- color: $grey-8 !important;
61
+ color: $grey-6 !important;
62
62
  }
63
63
 
64
64
  &-grey-9 {