@farm-investimentos/front-mfe-components 11.11.1 → 11.11.3
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 +16198 -16195
- 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 +16198 -16195
- 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/ContextMenu/ContextMenu.vue +4 -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/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/package.json
CHANGED
|
@@ -86,6 +86,9 @@ export default Vue.extend({
|
|
|
86
86
|
window.addEventListener('resize', resizeWindowHandler);
|
|
87
87
|
calculatePosition();
|
|
88
88
|
} else {
|
|
89
|
+
styles.top = 0;
|
|
90
|
+
styles.left = 0;
|
|
91
|
+
styles.zIndex = 0;
|
|
89
92
|
window.removeEventListener('click', outClick);
|
|
90
93
|
}
|
|
91
94
|
}
|
|
@@ -113,7 +116,7 @@ export default Vue.extend({
|
|
|
113
116
|
? parseInt(activatorBoundingClientRect.width)
|
|
114
117
|
: 96) + 'px';
|
|
115
118
|
|
|
116
|
-
if(activatorBoundingClientRect.width < 96) {
|
|
119
|
+
if (activatorBoundingClientRect.width < 96) {
|
|
117
120
|
const w = popupClientRect.width < 96 ? 96 : popupClientRect.width;
|
|
118
121
|
offsetLeft =
|
|
119
122
|
activatorBoundingClientRect.left +
|
|
@@ -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
|
|
|
@@ -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
|
},
|