@farm-investimentos/front-mfe-components 11.11.0 → 11.11.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/dist/front-mfe-components.common.js +16333 -16320
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +2 -2
- package/dist/front-mfe-components.umd.js +16333 -16320
- package/dist/front-mfe-components.umd.js.map +1 -1
- package/dist/front-mfe-components.umd.min.js +1 -1
- package/dist/front-mfe-components.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DataTablePaginator/DataTablePaginator.scss +1 -1
- package/src/components/DataTablePaginator/DataTablePaginator.stories.js +13 -14
- package/src/components/DataTablePaginator/DataTablePaginator.vue +13 -17
- package/src/components/IdCaption/IdCaption.scss +1 -1
- package/src/components/IdCaption/IdCaption.vue +1 -1
- package/src/components/Logger/LoggerItem/ILoggerItem.ts +1 -0
- package/src/components/Logger/LoggerItem/LoggerItem.scss +2 -1
- package/src/components/Logger/LoggerItem/LoggerItem.stories.js +14 -0
- package/src/components/Logger/LoggerItem/LoggerItem.vue +8 -2
- package/src/components/Logger/LoggerItem/mappingIconKeys.ts +5 -0
- package/src/components/MainFilter/MainFilter.stories.js +4 -0
- package/src/components/MainFilter/MainFilter.vue +5 -1
- package/src/components/Typography/BodyText/BodyText.scss +1 -1
- package/src/components/Typography/BodyText/BodyText.vue +1 -1
- package/src/components/layout/Basic.stories.js +23 -1
package/package.json
CHANGED
|
@@ -23,28 +23,27 @@ export default {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export const Primary = () => ({
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
totalPages: 8,
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
template: '<farm-datatable-paginator :totalPages="totalPages" :page="1" />',
|
|
32
|
-
mounted() {
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
this.totalPages = 2;
|
|
35
|
-
}, 1000);
|
|
36
|
-
},
|
|
26
|
+
template: '<farm-datatable-paginator :totalPages="190000" :page="1" />',
|
|
37
27
|
});
|
|
38
28
|
|
|
39
|
-
export const
|
|
29
|
+
export const HidePerPageOptions = () => ({
|
|
40
30
|
template: '<farm-datatable-paginator :hidePerPageOptions="true" :totalPages="190000" :page="1" />',
|
|
41
31
|
});
|
|
42
32
|
|
|
43
33
|
export const Disabled = () => ({
|
|
44
|
-
template: '<farm-datatable-paginator :disabled="true":totalPages="19" :page="1" />',
|
|
34
|
+
template: '<farm-datatable-paginator :disabled="true" :totalPages="19" :page="1" />',
|
|
45
35
|
});
|
|
46
36
|
|
|
47
37
|
export const CustomPerPage = () => ({
|
|
48
38
|
template:
|
|
49
|
-
'<farm-datatable-paginator :perPageOptions="[1, 2, 4, 12, 27]" :totalPages="19" :page="1" />',
|
|
39
|
+
'<farm-datatable-paginator :perPageOptions="[1, 2, 4, 12, 27]" :initialLimitPerPage="2" :totalPages="19" :page="1" />',
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export const OnChangeLimitPerPage = () => ({
|
|
43
|
+
methods: {
|
|
44
|
+
onChangeLimitPerPage: (newValue) => {
|
|
45
|
+
alert(newValue);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
template: '<farm-datatable-paginator :totalPages="19" :page="1" @onChangeLimitPerPage="onChangeLimitPerPage" />',
|
|
50
49
|
});
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section
|
|
3
3
|
:class="{
|
|
4
|
-
'
|
|
4
|
+
'farm-paginator-footer': true,
|
|
5
5
|
'hidden-perpageoptions': hidePerPageOptions,
|
|
6
6
|
'farm-paginator--gutter': hasGutter,
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
9
|
<div v-if="!hidePerPageOptions">
|
|
10
|
-
<
|
|
11
|
-
outlined
|
|
10
|
+
<farm-select
|
|
12
11
|
v-model="selectedLimit"
|
|
13
|
-
:disabled="!totalPages || totalPages < 1"
|
|
12
|
+
:disabled="disabled || !totalPages || totalPages < 1"
|
|
14
13
|
:items="perPageBuiltItems"
|
|
15
|
-
|
|
16
|
-
></v-select>
|
|
14
|
+
/>
|
|
17
15
|
</div>
|
|
18
16
|
|
|
19
17
|
<ul
|
|
@@ -61,7 +59,6 @@
|
|
|
61
59
|
</template>
|
|
62
60
|
<script lang="ts">
|
|
63
61
|
import Vue from 'vue';
|
|
64
|
-
import { VSelect } from 'vuetify/lib/components/VSelect';
|
|
65
62
|
|
|
66
63
|
/**
|
|
67
64
|
* Componente de paginação usado em tabelas e listas
|
|
@@ -69,49 +66,49 @@ import { VSelect } from 'vuetify/lib/components/VSelect';
|
|
|
69
66
|
*/
|
|
70
67
|
export default Vue.extend({
|
|
71
68
|
name: 'farm-datatable-paginator',
|
|
72
|
-
components: {
|
|
73
|
-
VSelect,
|
|
74
|
-
},
|
|
75
69
|
props: {
|
|
76
70
|
/**
|
|
77
|
-
*
|
|
71
|
+
* Ietms per page list
|
|
78
72
|
*/
|
|
79
73
|
perPageOptions: {
|
|
80
74
|
type: Array,
|
|
81
75
|
default: () => [5, 10, 20, 50, 100],
|
|
82
76
|
},
|
|
83
77
|
/**
|
|
84
|
-
*
|
|
78
|
+
* Current page
|
|
85
79
|
*/
|
|
86
80
|
page: null,
|
|
87
81
|
/**
|
|
88
|
-
* Total
|
|
82
|
+
* Total pages
|
|
89
83
|
*/
|
|
90
84
|
totalPages: {
|
|
91
85
|
type: Number,
|
|
92
86
|
default: null,
|
|
93
87
|
},
|
|
94
88
|
/**
|
|
95
|
-
*
|
|
89
|
+
* DDisable controls
|
|
96
90
|
*/
|
|
97
91
|
disabled: {
|
|
98
92
|
type: Boolean,
|
|
99
93
|
default: false,
|
|
100
94
|
},
|
|
101
95
|
/**
|
|
102
|
-
*
|
|
96
|
+
* Hide items per page select
|
|
103
97
|
*/
|
|
104
98
|
hidePerPageOptions: {
|
|
105
99
|
type: Boolean,
|
|
106
100
|
default: false,
|
|
107
101
|
},
|
|
108
102
|
/**
|
|
109
|
-
*
|
|
103
|
+
* Items per page initial value
|
|
110
104
|
*/
|
|
111
105
|
initialLimitPerPage: {
|
|
112
106
|
type: Number,
|
|
113
107
|
default: 10,
|
|
114
108
|
},
|
|
109
|
+
/**
|
|
110
|
+
* Toggle gutters
|
|
111
|
+
*/
|
|
115
112
|
hasGutter: {
|
|
116
113
|
type: Boolean,
|
|
117
114
|
default: true,
|
|
@@ -213,7 +210,6 @@ export default Vue.extend({
|
|
|
213
210
|
this.selectedLimit = newValue;
|
|
214
211
|
},
|
|
215
212
|
},
|
|
216
|
-
|
|
217
213
|
});
|
|
218
214
|
</script>
|
|
219
215
|
|
|
@@ -74,6 +74,20 @@ export const Info = () => ({
|
|
|
74
74
|
template: `<farm-logger-item :item="item" />`,
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
+
export const ExtraMessage = () => ({
|
|
78
|
+
data() {
|
|
79
|
+
return {
|
|
80
|
+
item: {
|
|
81
|
+
message: 'Recusado entre as pré elegíveis',
|
|
82
|
+
extraMessage: 'More text',
|
|
83
|
+
formattedDate: '13/06/2022 20:40',
|
|
84
|
+
status: 'info',
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
template: `<farm-logger-item :item="item" />`,
|
|
89
|
+
});
|
|
90
|
+
|
|
77
91
|
export const CustomIcon = () => ({
|
|
78
92
|
data() {
|
|
79
93
|
return {
|
|
@@ -13,10 +13,13 @@
|
|
|
13
13
|
<span class="logger__message">
|
|
14
14
|
{{ item.message }}
|
|
15
15
|
</span>
|
|
16
|
-
<span class="logger__username">
|
|
16
|
+
<span v-if="item.userName" class="logger__username">
|
|
17
17
|
<i class="mdi mdi-account-circle" />
|
|
18
18
|
{{ item.userName }}
|
|
19
19
|
</span>
|
|
20
|
+
<span class="logger__extramessage">
|
|
21
|
+
{{ item.extraMessage }}
|
|
22
|
+
</span>
|
|
20
23
|
</div>
|
|
21
24
|
<farm-btn
|
|
22
25
|
v-if="hasDetails"
|
|
@@ -32,6 +35,7 @@
|
|
|
32
35
|
<script lang="ts">
|
|
33
36
|
import Vue, { PropType } from 'vue';
|
|
34
37
|
import ILoggerItem from './ILoggerItem';
|
|
38
|
+
import mappingIconKeys from './mappingIconKeys';
|
|
35
39
|
|
|
36
40
|
export default Vue.extend({
|
|
37
41
|
name: 'farm-logger-item',
|
|
@@ -40,6 +44,7 @@ export default Vue.extend({
|
|
|
40
44
|
* Logger item
|
|
41
45
|
*/
|
|
42
46
|
item: { required: true, type: Object as PropType<ILoggerItem> },
|
|
47
|
+
customIcon: { type: String, required: false },
|
|
43
48
|
},
|
|
44
49
|
methods: {
|
|
45
50
|
callDetails(): void {
|
|
@@ -54,7 +59,8 @@ export default Vue.extend({
|
|
|
54
59
|
if (!this.item.status) {
|
|
55
60
|
return '';
|
|
56
61
|
}
|
|
57
|
-
|
|
62
|
+
|
|
63
|
+
return this.item.status ? mappingIconKeys[this.item.status] : 'error';
|
|
58
64
|
},
|
|
59
65
|
buttonColor(): string {
|
|
60
66
|
if (this.item.status === 'success') {
|
|
@@ -28,6 +28,10 @@ export const CustomLabel = () => ({
|
|
|
28
28
|
template: '<farm-form-mainfilter label="Custom" />',
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
+
export const WithSlot = () => ({
|
|
32
|
+
template: '<farm-form-mainfilter>With Slot</farm-form-mainfilter>',
|
|
33
|
+
});
|
|
34
|
+
|
|
31
35
|
export const MainFilters = () => ({
|
|
32
36
|
data() {
|
|
33
37
|
return {
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
<section :class="{ 'justify-end': justifyEnd === true }">
|
|
3
3
|
<fieldset v-if="hasInitialInput">
|
|
4
4
|
<farm-label :for="elementId">
|
|
5
|
-
{{ label }}
|
|
5
|
+
{{ !hasSlotData ? label : '' }}
|
|
6
|
+
<slot v-if="hasSlotData"></slot>
|
|
6
7
|
<farm-tooltip v-if="tooltip">
|
|
7
8
|
<farm-caption color="white">
|
|
8
9
|
{{ tooltip }}
|
|
@@ -86,6 +87,9 @@ export default Vue.extend({
|
|
|
86
87
|
},
|
|
87
88
|
},
|
|
88
89
|
computed: {
|
|
90
|
+
hasSlotData() {
|
|
91
|
+
return this.$slots.default;
|
|
92
|
+
},
|
|
89
93
|
extraFiltersBtnLabel() {
|
|
90
94
|
return `${this.showFilters ? 'Esconder' : 'Ver'} Filtros`;
|
|
91
95
|
},
|
|
@@ -35,7 +35,7 @@ export const Structure = () => ({
|
|
|
35
35
|
<farm-row>
|
|
36
36
|
<farm-col md="6" lg="3">
|
|
37
37
|
coluna 1
|
|
38
|
-
</farm-col
|
|
38
|
+
</farm-col>
|
|
39
39
|
<farm-col md="6" lg="3">
|
|
40
40
|
coluna 2
|
|
41
41
|
</farm-col>
|
|
@@ -46,6 +46,28 @@ export const Structure = () => ({
|
|
|
46
46
|
coluna 4
|
|
47
47
|
</farm-col>
|
|
48
48
|
</farm-row>
|
|
49
|
+
|
|
50
|
+
<farm-row>
|
|
51
|
+
<farm-col lg="2">
|
|
52
|
+
coluna 1
|
|
53
|
+
</farm-col>
|
|
54
|
+
<farm-col lg="2">
|
|
55
|
+
coluna 2
|
|
56
|
+
</farm-col>
|
|
57
|
+
<farm-col lg="2">
|
|
58
|
+
coluna 3
|
|
59
|
+
</farm-col>
|
|
60
|
+
<farm-col lg="2">
|
|
61
|
+
coluna 4
|
|
62
|
+
</farm-col>
|
|
63
|
+
<farm-col lg="2">
|
|
64
|
+
coluna 5
|
|
65
|
+
</farm-col>
|
|
66
|
+
<farm-col lg="2">
|
|
67
|
+
coluna 6
|
|
68
|
+
</farm-col>
|
|
69
|
+
</farm-row>
|
|
70
|
+
|
|
49
71
|
<farm-row :extra-decrease="true">
|
|
50
72
|
<farm-container-footer>
|
|
51
73
|
Footer content
|