@farm-investimentos/front-mfe-components 13.0.0 → 13.0.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@farm-investimentos/front-mfe-components",
3
- "version": "13.0.0",
3
+ "version": "13.0.2",
4
4
  "author": "farm investimentos",
5
5
  "private": false,
6
6
  "main": "./dist/front-mfe-components.common.js",
@@ -67,7 +67,7 @@ export const withDismissableShowAgain = () => ({
67
67
  data() {
68
68
  return {
69
69
  v: true,
70
- }
70
+ };
71
71
  },
72
72
  template: `<div>
73
73
  <farm-alertbox v-model="v" dismissable>alert box</farm-alertbox>
@@ -25,7 +25,7 @@ export default {
25
25
  export const Primary = () => ({
26
26
  data() {
27
27
  return {
28
- date: [],
28
+ date: null,
29
29
  };
30
30
  },
31
31
  template: `<div style='max-width: 320px'>
@@ -34,8 +34,16 @@ export const Primary = () => ({
34
34
  </div>`,
35
35
  });
36
36
 
37
- export const Secondary = () => ({
38
- template: `<RangeDatePicker inputId="input-custom-id" :value="['2021-08-01', '2021-08-05']" />`,
37
+ export const InitialValue = () => ({
38
+ data() {
39
+ return {
40
+ date: ['2023-08-01', '2023-08-05'],
41
+ };
42
+ },
43
+ template: `<div style='max-width: 320px'>
44
+ <RangeDatePicker inputId="input-custom-id" :value="date" />
45
+ date: {{ date }}
46
+ </div>`,
39
47
  });
40
48
 
41
49
  export const MinMax = () => ({
@@ -23,11 +23,11 @@
23
23
  Fechar
24
24
  </farm-btn>
25
25
  <farm-btn outlined class="btn-clean" @click="clear"> Limpar </farm-btn>
26
- <farm-btn class="ml-2" title="Confirmar" :disabled="!dateField.length" @click="save()">
26
+ <farm-btn class="ml-2" title="Confirmar" :disabled="dateField.length != 2" @click="save()">
27
27
  Confirmar
28
28
  </farm-btn>
29
29
  </v-date-picker>
30
- <template v-slot:activator="{ }">
30
+ <template v-slot:activator="{}">
31
31
  <farm-textfield-v2
32
32
  v-model="fieldRange"
33
33
  icon="calendar"
@@ -65,9 +65,7 @@ export default Vue.extend({
65
65
  */
66
66
  value: {
67
67
  type: Array,
68
- default: () => {
69
- return [];
70
- },
68
+ default: () => [],
71
69
  },
72
70
  /**
73
71
  * Variável usada para definir a data máxima (yyyy-mm-dd)
@@ -95,7 +93,7 @@ export default Vue.extend({
95
93
  const s = this.formatDateRange(this.value);
96
94
  return {
97
95
  menuField: false,
98
- dateField: this.value,
96
+ dateField: this.value || [],
99
97
  fieldRange: s,
100
98
  requiredRule: value => {
101
99
  return !!value || value != '' || 'Campo obrigatório';