@farm-investimentos/front-mfe-components 3.4.1 → 3.4.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 +80 -68
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +1 -1
- package/dist/front-mfe-components.umd.js +80 -68
- 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 +2 -2
- package/src/components/AlertReload/AlertReload.stories.js +1 -1
- package/src/components/Buttons/ConfirmButton/ConfirmButton.stories.js +1 -1
- package/src/components/Buttons/DangerButton/DangerButton.stories.js +1 -1
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +1 -1
- package/src/components/Buttons/ExportButton/ExportButton.stories.js +1 -1
- package/src/components/Buttons/ImportButton/ImportButton.stories.js +1 -1
- package/src/components/Buttons/MultiImportButton/MultiImportButton.stories.js +1 -1
- package/src/components/Buttons/RemoveButton/RemoveButton.stories.js +1 -1
- package/src/components/Buttons/ToggleButton/ToggleButton.stories.js +1 -1
- package/src/components/CardContext/CardContext.stories.js +1 -1
- package/src/components/ChipInviteStatus/ChipInviteStatus.stories.js +8 -6
- package/src/components/ChipInviteStatus/ChipInviteStatus.vue +21 -9
- package/src/components/ChipInviteStatus/__tests__/ChipInviteStatus.spec.js +1 -1
- package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.stories.js +1 -1
- package/src/components/DataTableHeader/DataTableHeader.stories.js +1 -1
- package/src/components/DataTablePaginator/DataTablePaginator.stories.js +25 -5
- package/src/components/DatePicker/DatePicker.stories.js +1 -1
- package/src/components/DefaultTextField/DefaultTextField.stories.js +1 -1
- package/src/components/DialogFooter/DialogFooter.stories.js +1 -1
- package/src/components/DialogHeader/DialogHeader.stories.js +1 -1
- package/src/components/FilePicker/FilePicker.stories.js +1 -1
- package/src/components/IconBox/IconBox.stories.js +1 -1
- package/src/components/Loader/Loader.stories.js +1 -1
- package/src/components/Logos/OriginatorLogo/OriginatorLogo.stories.js +1 -1
- package/src/components/Logos/ProductLogo/ProductLogo.stories.js +1 -1
- package/src/components/MainFilter/MainFilter.stories.js +1 -1
- package/src/components/ManagersList/ManagersList.stories.js +1 -1
- package/src/components/ModalPromptUser/ModalPromptUser.stories.js +1 -1
- package/src/components/MultipleSelectShortener/MultipleSelectShortener.stories.js +1 -1
- package/src/components/PromptUserToConfirm/PromptUserToConfirm.stories.js +1 -1
- package/src/components/RangeDatePicker/RangeDatePicker.stories.js +23 -4
- package/src/components/ResetTableRowSelection/ResetTableRowSelection.stories.js +1 -1
- package/src/components/SelectModalOptions/SelectModalOptions.stories.js +1 -1
- package/src/components/TableContextMenu/TableContextMenu.stories.js +1 -1
- package/src/components/Tabs/Tabs.stories.js +1 -1
- package/src/examples/Modal.stories.js +47 -0
- package/src/examples/Table.stories.js +84 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm-investimentos/front-mfe-components",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"author": "farm investimentos",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./dist/front-mfe-components.common.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"eslint": "^6.7.2",
|
|
46
46
|
"eslint-plugin-vue": "^6.2.2",
|
|
47
47
|
"jest": "^25.5.4",
|
|
48
|
-
"
|
|
48
|
+
"storybook-addon-designs": "^6.2.1",
|
|
49
49
|
"vue-template-compiler": "^2.6.11",
|
|
50
50
|
"webpack-cli": "^4.9.0"
|
|
51
51
|
},
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import ChipInviteStatus from './ChipInviteStatus.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
4
|
+
title: 'API/Onboarding/ChipInviteStatus',
|
|
5
5
|
component: ChipInviteStatus,
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export const Primary = () => ({
|
|
9
9
|
components: { ChipInviteStatus },
|
|
10
10
|
template: `<div style="width: 120px;">
|
|
11
|
-
<ChipInviteStatus status="
|
|
12
|
-
<ChipInviteStatus status="
|
|
13
|
-
<ChipInviteStatus status="
|
|
14
|
-
<ChipInviteStatus status="
|
|
15
|
-
<ChipInviteStatus status="
|
|
11
|
+
<ChipInviteStatus :status="10" />
|
|
12
|
+
<ChipInviteStatus :status="11" />
|
|
13
|
+
<ChipInviteStatus :status="12" />
|
|
14
|
+
<ChipInviteStatus :status="13" />
|
|
15
|
+
<ChipInviteStatus :status="14" />
|
|
16
|
+
<ChipInviteStatus :status="15" />
|
|
17
|
+
<ChipInviteStatus :status="16" />
|
|
16
18
|
</div>`,
|
|
17
19
|
});
|
|
18
20
|
|
|
@@ -14,12 +14,24 @@
|
|
|
14
14
|
</template>
|
|
15
15
|
<script>
|
|
16
16
|
import Vue from 'vue';
|
|
17
|
+
const StatusLabel = {
|
|
18
|
+
10: 'CONVIDAR',
|
|
19
|
+
11: 'CONVIDADO',
|
|
20
|
+
12: 'INCOMPLETO',
|
|
21
|
+
13: 'CONCLUÍDO',
|
|
22
|
+
14: 'FALHA/ERRO',
|
|
23
|
+
15: 'EM ANÁLISE',
|
|
24
|
+
16: 'EM ANDAMENTO',
|
|
25
|
+
};
|
|
26
|
+
|
|
17
27
|
const StatusColor = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
10: 'secondary',
|
|
29
|
+
11: 'yellow',
|
|
30
|
+
12: 'yellow',
|
|
31
|
+
13: 'success',
|
|
32
|
+
14: 'error',
|
|
33
|
+
15: 'accent',
|
|
34
|
+
16: 'primary',
|
|
23
35
|
};
|
|
24
36
|
|
|
25
37
|
import VChip from 'vuetify/lib/components/VChip/';
|
|
@@ -34,8 +46,8 @@ export default Vue.extend({
|
|
|
34
46
|
* Invite status
|
|
35
47
|
*/
|
|
36
48
|
status: {
|
|
37
|
-
type:
|
|
38
|
-
default:
|
|
49
|
+
type: Number,
|
|
50
|
+
default: 10,
|
|
39
51
|
},
|
|
40
52
|
/**
|
|
41
53
|
* Full width (from parent)
|
|
@@ -47,13 +59,13 @@ export default Vue.extend({
|
|
|
47
59
|
},
|
|
48
60
|
computed: {
|
|
49
61
|
textColor() {
|
|
50
|
-
return this.status ===
|
|
62
|
+
return this.status === 10 || this.status === 16 ? '' : StatusColor[this.status];
|
|
51
63
|
},
|
|
52
64
|
color() {
|
|
53
65
|
return !this.status ? '' : StatusColor[this.status];
|
|
54
66
|
},
|
|
55
67
|
label() {
|
|
56
|
-
return this.status;
|
|
68
|
+
return StatusLabel[this.status];
|
|
57
69
|
},
|
|
58
70
|
},
|
|
59
71
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DataTablePaginator from './DataTablePaginator.vue';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
title: '
|
|
4
|
+
title: 'API/Table/DataTablePaginator',
|
|
5
5
|
component: DataTablePaginator,
|
|
6
6
|
};
|
|
7
7
|
|
|
@@ -26,7 +26,27 @@ export const CustomPerPage = () => ({
|
|
|
26
26
|
'<DataTablePaginator :perPageOptions="[1, 2, 4, 12, 27]" :totalPages="19" :page="1" />',
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const parameters = {
|
|
30
|
+
design: {
|
|
31
|
+
type: 'figma',
|
|
32
|
+
url:
|
|
33
|
+
'https://www.figma.com/file/1f84J4m1IBghWhozQvdyyt/%E2%9C%8D---Design-System?node-id=1503%3A921',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
Primary.story = {
|
|
38
|
+
name: 'Básico',
|
|
39
|
+
parameters,
|
|
40
|
+
};
|
|
41
|
+
Secondary.story = {
|
|
42
|
+
name: 'Sem limite por páginas',
|
|
43
|
+
parameters,
|
|
44
|
+
};
|
|
45
|
+
Disabled.story = {
|
|
46
|
+
name: 'Desabilitado',
|
|
47
|
+
parameters,
|
|
48
|
+
};
|
|
49
|
+
CustomPerPage.story = {
|
|
50
|
+
name: 'Lista de registros por página customizada',
|
|
51
|
+
parameters,
|
|
52
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { withDesign } from 'storybook-addon-designs';
|
|
1
2
|
import RangeDatePicker from './RangeDatePicker';
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
|
-
title: '
|
|
5
|
+
title: 'API/Form/RangeDatePicker',
|
|
5
6
|
component: RangeDatePicker,
|
|
7
|
+
decorators: [withDesign],
|
|
6
8
|
};
|
|
7
9
|
|
|
8
10
|
export const Primary = () => ({
|
|
@@ -20,6 +22,23 @@ export const MinMax = () => ({
|
|
|
20
22
|
template: `<RangeDatePicker inputId="input-custom-id" min="2022-01-17" max="2022-02-15" />`,
|
|
21
23
|
});
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
const parameters = {
|
|
26
|
+
design: {
|
|
27
|
+
type: 'figma',
|
|
28
|
+
url:
|
|
29
|
+
'https://www.figma.com/file/1f84J4m1IBghWhozQvdyyt/%E2%9C%8D---Design-System?node-id=1503%3A810',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
Primary.story = {
|
|
34
|
+
name: 'Básico',
|
|
35
|
+
parameters
|
|
36
|
+
};
|
|
37
|
+
Secondary.story = {
|
|
38
|
+
name: 'Data Inicial',
|
|
39
|
+
parameters
|
|
40
|
+
};
|
|
41
|
+
MinMax.story = {
|
|
42
|
+
name: 'Data Mínima e Máxima',
|
|
43
|
+
parameters
|
|
44
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
import { DialogHeader, DialogFooter } from '../main';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Examples/Modal',
|
|
6
|
+
decorators: [withDesign],
|
|
7
|
+
component: Modal,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const Modal = () => ({
|
|
11
|
+
/*
|
|
12
|
+
* How to create the default modal following FARM's Design System guideline
|
|
13
|
+
*/
|
|
14
|
+
components: {
|
|
15
|
+
DialogHeader,
|
|
16
|
+
DialogFooter,
|
|
17
|
+
},
|
|
18
|
+
data() {
|
|
19
|
+
return {
|
|
20
|
+
inputVal: false,
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
template: `<div>
|
|
24
|
+
<v-dialog content-class="modal-default" v-model="inputVal">
|
|
25
|
+
<DialogHeader title="Exemplo" @onClose="inputVal = false;" />
|
|
26
|
+
<v-main class="pa-6 pt-12">
|
|
27
|
+
Place dialog content here!
|
|
28
|
+
</v-main>
|
|
29
|
+
<DialogFooter :hasConfirm="false" @onClose="inputVal = false;" />
|
|
30
|
+
</v-dialog>
|
|
31
|
+
<v-btn @click="inputVal = true;" color="secondary">
|
|
32
|
+
Clique para abrir
|
|
33
|
+
</v-btn>
|
|
34
|
+
</div>`,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// Modal.storyName = 'Básico';
|
|
38
|
+
Modal.story = {
|
|
39
|
+
name: 'Básico',
|
|
40
|
+
parameters: {
|
|
41
|
+
design: {
|
|
42
|
+
type: 'figma',
|
|
43
|
+
url:
|
|
44
|
+
'https://www.figma.com/file/rkkAsX4IP0tzv1udIDXlqe/%E2%9C%8D---Onboarding---PJ?node-id=2867%3A10594',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
import { DataTableEmptyWrapper } from '../main';
|
|
3
|
+
|
|
4
|
+
const headers = [
|
|
5
|
+
{
|
|
6
|
+
text: 'ID',
|
|
7
|
+
sortable: false,
|
|
8
|
+
value: 'id',
|
|
9
|
+
width: 80,
|
|
10
|
+
align: 'left',
|
|
11
|
+
},
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
title: 'Examples/Table',
|
|
16
|
+
decorators: [withDesign],
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const TableNoData = () => ({
|
|
20
|
+
components: {
|
|
21
|
+
DataTableEmptyWrapper,
|
|
22
|
+
},
|
|
23
|
+
data() {
|
|
24
|
+
return {
|
|
25
|
+
headers,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
template: `<div>
|
|
29
|
+
<v-data-table
|
|
30
|
+
hide-default-footer
|
|
31
|
+
:headers="headers"
|
|
32
|
+
>
|
|
33
|
+
<template slot="no-data">
|
|
34
|
+
<DataTableEmptyWrapper
|
|
35
|
+
subtitle="Tente filtrar novamente sua pesquisa"
|
|
36
|
+
/>
|
|
37
|
+
</template>
|
|
38
|
+
</v-data-table>
|
|
39
|
+
</div>`,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export const TableSampleData = () => ({
|
|
43
|
+
components: {
|
|
44
|
+
DataTableEmptyWrapper,
|
|
45
|
+
},
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
headers,
|
|
49
|
+
items: [{ id: 1 }, { id: 2 }, { id: 3 }],
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
template: `<div>
|
|
53
|
+
<v-data-table
|
|
54
|
+
hide-default-footer
|
|
55
|
+
:headers="headers"
|
|
56
|
+
:items="items"
|
|
57
|
+
>
|
|
58
|
+
|
|
59
|
+
</v-data-table>
|
|
60
|
+
</div>`,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
TableNoData.story = {
|
|
64
|
+
name: 'No data',
|
|
65
|
+
parameters: {
|
|
66
|
+
design: {
|
|
67
|
+
type: 'figma',
|
|
68
|
+
url:
|
|
69
|
+
'https://www.figma.com/file/rkkAsX4IP0tzv1udIDXlqe/%E2%9C%8D---Onboarding---PJ?node-id=2867%3A10594',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
TableSampleData.story = {
|
|
75
|
+
name: 'With data',
|
|
76
|
+
parameters: {
|
|
77
|
+
design: {
|
|
78
|
+
type: 'figma',
|
|
79
|
+
url:
|
|
80
|
+
'https://www.figma.com/file/rkkAsX4IP0tzv1udIDXlqe/%E2%9C%8D---Onboarding---PJ?node-id=2867%3A10594',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
|