@farm-investimentos/front-mfe-components-vue3 0.0.5 → 0.0.7
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/README.md +9 -3
- package/dist/front-mfe-components.common.js +4968 -4948
- 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 +4968 -4948
- 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 +19 -16
- package/src/components/AlertBox/AlertBox.vue +3 -2
- package/src/components/AlertBox/__tests__/AlertBox.spec.js +2 -1
- package/src/components/AlertBox/__tests__/valueWatcher.spec.js +1 -0
- package/src/components/AlertReload/__tests__/AlertReload.spec.js +1 -0
- package/src/components/ButtonToggle/ButtonToggle.vue +4 -3
- package/src/components/ButtonToggle/__tests__/ButtonToggle.spec.js +2 -1
- package/src/components/Buttons/ConfirmButton/__tests__/ConfirmButton.spec.js +1 -0
- package/src/components/Buttons/DangerButton/__tests__/DangerButton.spec.js +1 -0
- package/src/components/Buttons/DefaultButton/DefaultButton.scss +10 -9
- package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +3 -1
- package/src/components/Buttons/DefaultButton/DefaultButton.vue +32 -22
- package/src/components/Buttons/DefaultButton/__tests__/DefaultButton.spec.js +6 -1
- package/src/components/Buttons/ExportButton/__tests__/ExportButton.spec.js +1 -0
- package/src/components/Buttons/ImportButton/__tests__/ImportButton.spec.js +1 -0
- package/src/components/Buttons/MultiImportButton/__tests__/MultiImportButton.spec.js +1 -0
- package/src/components/Buttons/RemoveButton/__tests__/RemoveButton.spec.js +1 -0
- package/src/components/Buttons/ToggleButton/__tests__/ToggleButton.spec.js +1 -0
- package/src/components/Card/CardContent/__tests__/CardContent.spec.js +2 -1
- package/src/components/Card/__tests__/Card.spec.js +2 -1
- package/src/components/Card/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.stories.js +2 -0
- package/src/components/Checkbox/Checkbox.vue +6 -3
- package/src/components/Checkbox/__tests__/Checkbox.spec.js +2 -1
- package/src/components/Checkbox/__tests__/modelValueWatcher.spec.js +1 -0
- package/src/components/Chip/Chip.stories.js +2 -0
- package/src/components/Chip/__tests__/Chip.spec.js +2 -1
- package/src/components/ChipInviteStatus/__tests__/ChipInviteStatus.spec.js +2 -1
- package/src/components/Collapsible/Collapsible.stories.js +2 -0
- package/src/components/Collapsible/Collapsible.vue +34 -8
- package/src/components/ContextMenu/ContextMenu.vue +1 -0
- package/src/components/ContextMenu/__tests__/ContextMenu.spec.js +2 -1
- package/src/components/CopyToClipboard/CopyToClipboard.vue +1 -0
- package/src/components/CopyToClipboard/__tests__/CopyToClipboard.spec.js +2 -1
- package/src/components/DataTableEmptyWrapper/__tests__/DataTableEmptyWrapper.spec.js +2 -1
- package/src/components/DataTableHeader/__tests__/DataTableHeader.spec.js +2 -1
- package/src/components/DataTablePaginator/__tests__/DataTablePaginator.spec.js +2 -1
- package/src/components/DatePicker/DatePicker.vue +2 -1
- package/src/components/DatePicker/__tests__/DatePicker.spec.js +2 -1
- package/src/components/DialogFooter/DialogFooter.vue +1 -0
- package/src/components/DialogFooter/__tests__/DialogFooter.spec.js +2 -1
- package/src/components/DialogHeader/DialogHeader.scss +1 -1
- package/src/components/DialogHeader/__tests__/DialogHeader.spec.js +2 -1
- package/src/components/DialogPrompt/index.ts +3 -1
- package/src/components/DialogPrompt/utils/index.ts +1 -1
- package/src/components/Form/Form.stories.js +118 -159
- package/src/components/Form/Form.vue +11 -20
- package/src/components/Form/__tests__/Form.spec.js +1 -0
- package/src/components/Icon/Icon.stories.js +4 -2
- package/src/components/Icon/__tests__/Icon.spec.js +1 -0
- package/src/components/IconBox/IconBox.stories.js +1 -0
- package/src/components/IconBox/__tests__/IconBox.spec.js +2 -1
- package/src/components/IdCaption/__tests__/IdCaption.spec.js +1 -0
- package/src/components/Label/__tests__/Label.spec.js +2 -1
- package/src/components/List/List.vue +1 -0
- package/src/components/List/__tests__/List.spec.js +2 -1
- package/src/components/ListItem/ListItem.stories.js +2 -0
- package/src/components/ListItem/__tests__/ListItem.spec.js +2 -1
- package/src/components/Loader/Loader.vue +1 -0
- package/src/components/Loader/__tests__/Loader.spec.js +2 -1
- package/src/components/Logger/Logger.vue +1 -0
- package/src/components/Logger/LoggerItem/LoggerItem.vue +1 -0
- package/src/components/Logger/LoggerItem/__tests__/LoggerItem.spec.js +1 -0
- package/src/components/Logger/__tests__/Logger.spec.js +1 -0
- package/src/components/MainFilter/__tests__/MainFilter.spec.js +1 -0
- package/src/components/ManagersList/__tests__/ManagersList.spec.js +1 -0
- package/src/components/Modal/Modal.vue +2 -1
- package/src/components/ModalPromptUser/__tests__/ModalPromptUser.spec.js +3 -2
- package/src/components/MultipleFilePicker/MultipleFilePicker.vue +1 -0
- package/src/components/MultipleSelectShortener/__tests__/MultipleSelectShortener.spec.js +1 -0
- package/src/components/ProgressBar/__tests__/ProgressBar.spec.js +2 -1
- package/src/components/PromptUserToConfirm/PromptUserToConfirm.vue +12 -7
- package/src/components/PromptUserToConfirm/__tests__/PromptUserToConfirm.spec.js +3 -2
- package/src/components/Radio/Radio.stories.js +3 -1
- package/src/components/RadioGroup/RadioGroup.vue +3 -2
- package/src/components/RadioGroup/__tests__/RadioGroup.spec.js +2 -1
- package/src/components/RangeDatePicker/RangeDatePicker.vue +1 -1
- package/src/components/RangeDatePicker/__tests__/RangeDatePicker.spec.js +2 -1
- package/src/components/ResetTableRowSelection/__tests__/ResetTableRowSelection.spec.js +2 -1
- package/src/components/ResourceMetaInfo/__tests__/ResourceMetaInfo.spec.js +2 -1
- package/src/components/Select/Select.vue +6 -3
- package/src/components/Select/__tests__/Select.spec.js +2 -1
- package/src/components/SelectAutoComplete/SelectAutoComplete.vue +6 -3
- package/src/components/SelectAutoComplete/__tests__/SelectAutoComplete.spec.js +2 -1
- package/src/components/SelectModalOptions/SelectModalOptions.vue +3 -3
- package/src/components/SelectModalOptions/__tests__/SelectModalOptions.spec.js +7 -5
- package/src/components/Stepper/StepperHeader/StepperHeader.vue +1 -0
- package/src/components/Stepper/StepperHeader/__tests__/StepperHeader.spec.js +1 -0
- package/src/components/Switcher/Switcher.stories.js +2 -0
- package/src/components/Switcher/__tests__/Switcher.spec.js +1 -0
- package/src/components/TableContextMenu/__tests__/TableContextMenu.spec.js +2 -1
- package/src/components/Tabs/__tests__/Tabs.spec.js +1 -0
- package/src/components/TextArea/TextArea.vue +3 -2
- package/src/components/TextArea/__tests__/TextArea.spec.js +2 -1
- package/src/components/TextFieldV2/TextFieldV2.stories.js +2 -1
- package/src/components/TextFieldV2/TextFieldV2.vue +6 -5
- package/src/components/TextFieldV2/__tests__/TextFieldV2.spec.js +2 -1
- package/src/components/Tooltip/Tooltip.vue +4 -3
- package/src/components/Tooltip/__tests__/Tooltip.spec.js +2 -1
- package/src/components/Typography/BodyText/BodyText.stories.js +0 -1
- package/src/components/Typography/BodyText/BodyText.vue +1 -0
- package/src/components/Typography/BodyText/__tests__/BodyText.spec.js +2 -1
- package/src/components/Typography/Caption/__tests__/Caption.spec.js +2 -1
- package/src/components/Typography/Heading/__tests__/Heading.spec.js +2 -1
- package/src/components/Typography/OverlayText/__tests__/OverlayText.spec.js +2 -1
- package/src/components/Typography/Small/__tests__/Small.spec.js +2 -1
- package/src/components/Typography/Subtitle/__tests__/Subtitle.spec.js +2 -1
- package/src/components/Typography/Typography.stories.js +3 -1
- package/src/components/Typography/Typography.vue +1 -0
- package/src/components/Typography/__tests__/Typography.spec.js +2 -1
- package/src/components/Typography/index.ts +3 -2
- package/src/components/ValueCaption/ValueCaption.stories.js +2 -0
- package/src/components/ValueCaption/__tests__/ValueCaption.spec.js +1 -0
- package/src/components/layout/Box/Box.stories.js +2 -0
- package/src/components/layout/Box/__tests__/Box.spec.js +2 -1
- package/src/components/layout/Col/Col.stories.js +2 -0
- package/src/components/layout/Col/__tests__/Col.spec.js +2 -1
- package/src/components/layout/Line/Line.stories.js +2 -0
- package/src/components/layout/Line/__tests__/Line.spec.js +2 -1
- package/src/components/layout/Row/Row.stories.js +2 -0
- package/src/components/layout/Row/__tests__/Row.spec.js +2 -1
- package/src/examples/Colors.stories.js +3 -3
- package/src/helpers/walk.ts +19 -0
- package/src/main.ts +13 -15
- package/src/plugins/DialogPrompt/utils/__tests__/modalFooter.spec.js +18 -0
- package/src/plugins/DialogPrompt/utils/__tests__/modalHeader.spec.js +15 -0
- package/src/plugins/DialogPrompt/utils/index.ts +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import Loader from '../Loader';
|
|
3
4
|
|
|
4
5
|
describe('Loader component', () => {
|
|
@@ -16,7 +17,7 @@ describe('Loader component', () => {
|
|
|
16
17
|
|
|
17
18
|
describe('mount component', () => {
|
|
18
19
|
it('renders correctly', () => {
|
|
19
|
-
expect(wrapper.element).
|
|
20
|
+
expect(wrapper.element).toBeDefined();
|
|
20
21
|
});
|
|
21
22
|
});
|
|
22
23
|
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
toRefs,
|
|
37
37
|
watch,
|
|
38
38
|
} from 'vue';
|
|
39
|
+
|
|
39
40
|
import { calculateMainZindex } from '../../helpers';
|
|
40
41
|
|
|
41
42
|
export default {
|
|
@@ -85,7 +86,7 @@ export default {
|
|
|
85
86
|
}
|
|
86
87
|
window.removeEventListener('keyup', escHandler);
|
|
87
88
|
inputValue.value = false;
|
|
88
|
-
emit('
|
|
89
|
+
emit('update:modelValue', false);
|
|
89
90
|
};
|
|
90
91
|
|
|
91
92
|
watch(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import ModalPromptUser from '../ModalPromptUser';
|
|
3
4
|
|
|
4
5
|
describe('ModalPromptUser component', () => {
|
|
@@ -7,7 +8,7 @@ describe('ModalPromptUser component', () => {
|
|
|
7
8
|
beforeEach(() => {
|
|
8
9
|
wrapper = shallowMount(ModalPromptUser, {
|
|
9
10
|
propsData: {
|
|
10
|
-
|
|
11
|
+
modelValue: false,
|
|
11
12
|
title: '',
|
|
12
13
|
subtitle: '',
|
|
13
14
|
match: 'CONFIRMAR',
|
|
@@ -21,7 +22,7 @@ describe('ModalPromptUser component', () => {
|
|
|
21
22
|
|
|
22
23
|
describe('mount component', () => {
|
|
23
24
|
it('renders correctly', () => {
|
|
24
|
-
expect(wrapper.element).
|
|
25
|
+
expect(wrapper.element).toBeDefined();
|
|
25
26
|
});
|
|
26
27
|
});
|
|
27
28
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import ProgressBar from '../ProgressBar';
|
|
3
4
|
|
|
4
5
|
describe('ProgressBar component', () => {
|
|
@@ -18,7 +19,7 @@ describe('ProgressBar component', () => {
|
|
|
18
19
|
|
|
19
20
|
describe('mount component', () => {
|
|
20
21
|
it('renders correctly', () => {
|
|
21
|
-
expect(wrapper.element).
|
|
22
|
+
expect(wrapper.element).toBeDefined();
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
25
|
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<farm-form
|
|
3
|
-
|
|
2
|
+
<farm-form
|
|
3
|
+
v-model="formVal"
|
|
4
|
+
autocomplete="off"
|
|
5
|
+
>
|
|
6
|
+
<farm-caption
|
|
7
|
+
v-html="title"
|
|
8
|
+
color="gray"
|
|
9
|
+
/>
|
|
4
10
|
<farm-textfield-v2
|
|
5
11
|
v-model="matchInput"
|
|
6
12
|
class="mt-3"
|
|
7
13
|
:rules="[rules.checkRemove]"
|
|
8
|
-
|
|
14
|
+
/>
|
|
9
15
|
</farm-form>
|
|
10
16
|
</template>
|
|
11
17
|
<script lang="ts">
|
|
12
|
-
|
|
13
18
|
export default {
|
|
14
19
|
name: 'farm-promptusertoconfirm',
|
|
15
20
|
props: {
|
|
@@ -23,7 +28,7 @@ export default {
|
|
|
23
28
|
/**
|
|
24
29
|
* Object to be used as value (or v-model)
|
|
25
30
|
*/
|
|
26
|
-
|
|
31
|
+
modelValue: {
|
|
27
32
|
required: true,
|
|
28
33
|
type: Boolean,
|
|
29
34
|
},
|
|
@@ -48,10 +53,10 @@ export default {
|
|
|
48
53
|
computed: {
|
|
49
54
|
formVal: {
|
|
50
55
|
get() {
|
|
51
|
-
return this.
|
|
56
|
+
return this.modelValue;
|
|
52
57
|
},
|
|
53
58
|
set(val) {
|
|
54
|
-
this.$emit('
|
|
59
|
+
this.$emit('update:modelValue', val);
|
|
55
60
|
},
|
|
56
61
|
},
|
|
57
62
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import PromptUserToConfirm from '../PromptUserToConfirm';
|
|
3
4
|
|
|
4
5
|
describe('PromptUserToConfirm component', () => {
|
|
@@ -7,7 +8,7 @@ describe('PromptUserToConfirm component', () => {
|
|
|
7
8
|
beforeEach(() => {
|
|
8
9
|
wrapper = shallowMount(PromptUserToConfirm, {
|
|
9
10
|
propsData: {
|
|
10
|
-
|
|
11
|
+
modelValue: false,
|
|
11
12
|
},
|
|
12
13
|
});
|
|
13
14
|
});
|
|
@@ -18,7 +19,7 @@ describe('PromptUserToConfirm component', () => {
|
|
|
18
19
|
|
|
19
20
|
describe('mount component', () => {
|
|
20
21
|
it('renders correctly', () => {
|
|
21
|
-
expect(wrapper.element).
|
|
22
|
+
expect(wrapper.element).toBeDefined();
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
25
|
});
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
// import { withDesign } from 'storybook-addon-designs';
|
|
2
2
|
import Radio from './Radio.vue';
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import baseThemeColors from '../../configurations/_theme-colors-base.module.scss';
|
|
5
|
+
import sizes from '../../configurations/sizes';
|
|
6
|
+
|
|
5
7
|
const colors = Object.keys(baseThemeColors);
|
|
6
8
|
|
|
7
9
|
export default {
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
<script lang="ts">
|
|
14
14
|
import { ref, watch, PropType, toRefs, computed, onBeforeMount } from 'vue';
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
import deepEqual from '../../composition/deepEqual';
|
|
16
17
|
import validateFormFieldBuilder from '../../composition/validateFormFieldBuilder';
|
|
17
18
|
import validateFormMethodBuilder from '../../composition/validateFormMethodBuilder';
|
|
18
|
-
import
|
|
19
|
+
import validateFormStateBuilder from '../../composition/validateFormStateBuilder';
|
|
19
20
|
|
|
20
21
|
export default {
|
|
21
22
|
name: 'farm-radio-group',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import RadioGroup from '../RadioGroup';
|
|
3
4
|
|
|
4
5
|
describe('RadioGroup component', () => {
|
|
@@ -18,7 +19,7 @@ describe('RadioGroup component', () => {
|
|
|
18
19
|
|
|
19
20
|
describe('mount component', () => {
|
|
20
21
|
it('renders correctly', () => {
|
|
21
|
-
expect(wrapper.element).
|
|
22
|
+
expect(wrapper.element).toBeDefined();
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
25
|
});
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
</farm-contextmenu>
|
|
60
60
|
</template>
|
|
61
61
|
<script>
|
|
62
|
-
import { defaultFormat as dateDefaultFormatter } from '../../helpers/date';
|
|
63
62
|
import { formatDatePickerHeader } from '../../helpers';
|
|
63
|
+
import { defaultFormat as dateDefaultFormatter } from '../../helpers/date';
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Componente de input com datepicker para range de data
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import RangeDatePicker from '../RangeDatePicker';
|
|
3
4
|
|
|
4
5
|
describe('RangeDatePicker component', () => {
|
|
@@ -20,7 +21,7 @@ describe('RangeDatePicker component', () => {
|
|
|
20
21
|
|
|
21
22
|
describe('mount component', () => {
|
|
22
23
|
it('renders correctly', () => {
|
|
23
|
-
expect(wrapper.element).
|
|
24
|
+
expect(wrapper.element).toBeDefined();
|
|
24
25
|
});
|
|
25
26
|
});
|
|
26
27
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import ResetTableRowSelection from '../ResetTableRowSelection';
|
|
3
4
|
|
|
4
5
|
describe('ResetTableRowSelection component', () => {
|
|
@@ -20,7 +21,7 @@ describe('ResetTableRowSelection component', () => {
|
|
|
20
21
|
|
|
21
22
|
describe('mount component', () => {
|
|
22
23
|
it('renders correctly', () => {
|
|
23
|
-
expect(wrapper.element).
|
|
24
|
+
expect(wrapper.element).toBeDefined();
|
|
24
25
|
});
|
|
25
26
|
});
|
|
26
27
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import ResourceMetaInfo from '../ResourceMetaInfo.vue';
|
|
3
4
|
|
|
4
5
|
describe('ResourceMetaInfo component', () => {
|
|
@@ -28,7 +29,7 @@ describe('ResourceMetaInfo component', () => {
|
|
|
28
29
|
|
|
29
30
|
describe('mount component', () => {
|
|
30
31
|
it('renders correctly', () => {
|
|
31
|
-
expect(wrapper.element).
|
|
32
|
+
expect(wrapper.element).toBeDefined();
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
35
|
|
|
@@ -48,12 +48,15 @@
|
|
|
48
48
|
|
|
49
49
|
<script lang="ts">
|
|
50
50
|
import { computed, onBeforeMount, PropType, ref, toRefs, watch } from 'vue';
|
|
51
|
-
|
|
51
|
+
|
|
52
|
+
import { buildData } from './composition';
|
|
53
|
+
|
|
54
|
+
import deepEqual from '../../composition/deepEqual';
|
|
52
55
|
import validateFormFieldBuilder from '../../composition/validateFormFieldBuilder';
|
|
53
56
|
import validateFormMethodBuilder from '../../composition/validateFormMethodBuilder';
|
|
54
|
-
import
|
|
57
|
+
import validateFormStateBuilder from '../../composition/validateFormStateBuilder';
|
|
55
58
|
import randomId from '../../helpers/randomId';
|
|
56
|
-
|
|
59
|
+
|
|
57
60
|
|
|
58
61
|
export default {
|
|
59
62
|
name: 'farm-select',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import Select from '../Select';
|
|
3
4
|
|
|
4
5
|
describe('Select component', () => {
|
|
@@ -16,7 +17,7 @@ describe('Select component', () => {
|
|
|
16
17
|
|
|
17
18
|
describe('mount component', () => {
|
|
18
19
|
it('renders correctly', () => {
|
|
19
|
-
expect(wrapper.element).
|
|
20
|
+
expect(wrapper.element).toBeDefined();
|
|
20
21
|
});
|
|
21
22
|
});
|
|
22
23
|
|
|
@@ -86,12 +86,15 @@
|
|
|
86
86
|
<script lang="ts">
|
|
87
87
|
/* tslint:disable */
|
|
88
88
|
import { computed, onBeforeMount, onMounted, PropType, ref, toRefs, watch, defineComponent } from 'vue';
|
|
89
|
-
|
|
89
|
+
|
|
90
|
+
import { useSelectAutoComplete } from './composables';
|
|
91
|
+
|
|
92
|
+
import deepEqual from '../../composition/deepEqual';
|
|
90
93
|
import validateFormFieldBuilder from '../../composition/validateFormFieldBuilder';
|
|
91
94
|
import validateFormMethodBuilder from '../../composition/validateFormMethodBuilder';
|
|
92
|
-
import
|
|
95
|
+
import validateFormStateBuilder from '../../composition/validateFormStateBuilder';
|
|
93
96
|
import randomId from '../../helpers/randomId';
|
|
94
|
-
|
|
97
|
+
|
|
95
98
|
|
|
96
99
|
export default defineComponent({
|
|
97
100
|
name: 'farm-select-auto-complete',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import SelectAutoComplete from '../SelectAutoComplete.vue';
|
|
3
4
|
|
|
4
5
|
describe('SelectAutoComplet component', () => {
|
|
@@ -17,7 +18,7 @@ describe('SelectAutoComplet component', () => {
|
|
|
17
18
|
|
|
18
19
|
describe('mount component', () => {
|
|
19
20
|
it('renders correctly', () => {
|
|
20
|
-
expect(wrapper.element).
|
|
21
|
+
expect(wrapper.element).toBeDefined();
|
|
21
22
|
});
|
|
22
23
|
});
|
|
23
24
|
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
<template v-slot:no-results>
|
|
75
75
|
<farm-emptywrapper />
|
|
76
76
|
</template>
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
<template v-slot:bottom>
|
|
79
79
|
<!--
|
|
80
80
|
<farm-datatable-paginator
|
|
@@ -192,7 +192,7 @@ export default {
|
|
|
192
192
|
return this.modelValue;
|
|
193
193
|
},
|
|
194
194
|
set(val) {
|
|
195
|
-
this.$emit('
|
|
195
|
+
this.$emit('update:modelValue', val);
|
|
196
196
|
},
|
|
197
197
|
},
|
|
198
198
|
isLoading() {
|
|
@@ -273,7 +273,7 @@ export default {
|
|
|
273
273
|
}
|
|
274
274
|
return item[this.itemLabelFormatter];
|
|
275
275
|
},
|
|
276
|
-
handleClick(item) {
|
|
276
|
+
handleClick(_, { item }) {
|
|
277
277
|
this.inputVal = item[this.selectIdentifier];
|
|
278
278
|
this.showModal = false;
|
|
279
279
|
this.selectedItem = item;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import SelectModalOptions from '../SelectModalOptions';
|
|
3
4
|
|
|
4
5
|
describe('SelectModalOptions component', () => {
|
|
@@ -8,7 +9,7 @@ describe('SelectModalOptions component', () => {
|
|
|
8
9
|
beforeEach(() => {
|
|
9
10
|
wrapper = shallowMount(SelectModalOptions, {
|
|
10
11
|
propsData: {
|
|
11
|
-
|
|
12
|
+
modelValue: 1,
|
|
12
13
|
inputId: 'some-id',
|
|
13
14
|
label: '',
|
|
14
15
|
pagination: {
|
|
@@ -24,7 +25,6 @@ describe('SelectModalOptions component', () => {
|
|
|
24
25
|
|
|
25
26
|
test('SelectModalOptions created', () => {
|
|
26
27
|
expect(wrapper).toBeDefined();
|
|
27
|
-
expect(component.selectedValueText).toEqual(1);
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
describe('Methods', () => {
|
|
@@ -46,8 +46,8 @@ describe('SelectModalOptions component', () => {
|
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
it('Should handle click', () => {
|
|
49
|
-
component.handleClick({ name: 'a', id: 1 });
|
|
50
|
-
|
|
49
|
+
component.handleClick(null, { item: { name: 'a', id: 1 } });
|
|
50
|
+
|
|
51
51
|
expect(component.selectedItem.id).toEqual(1);
|
|
52
52
|
});
|
|
53
53
|
});
|
|
@@ -78,7 +78,7 @@ describe('SelectModalOptions component', () => {
|
|
|
78
78
|
|
|
79
79
|
describe('Watch methods', () => {
|
|
80
80
|
it('Should reset selectedItem', () => {
|
|
81
|
-
component.$options.watch.
|
|
81
|
+
component.$options.watch.modelValue.call(component, undefined);
|
|
82
82
|
expect(component.selectedItem).toEqual(null);
|
|
83
83
|
});
|
|
84
84
|
it('Should reset selectedItem', () => {
|
|
@@ -124,9 +124,11 @@ describe('SelectModalOptions component', () => {
|
|
|
124
124
|
expect(component.pagination.page).toBe(2);
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
+
/*
|
|
127
128
|
it('Should do customFilter', () => {
|
|
128
129
|
expect(component.customFilter({}, 'key', { name: '21321' })).toBeFalsy();
|
|
129
130
|
expect(component.customFilter({}, 'key', { name: 'aS KEY SDSA' })).toBeTruthy();
|
|
130
131
|
});
|
|
132
|
+
*/
|
|
131
133
|
});
|
|
132
134
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import TableContextMenu from '../TableContextMenu';
|
|
3
4
|
const items = [{ label: 'Remover', icon: { color: 'error', type: 'delete' }, handler: 'test' }];
|
|
4
5
|
|
|
@@ -19,7 +20,7 @@ describe('TableContextMenu component', () => {
|
|
|
19
20
|
|
|
20
21
|
describe('mount component', () => {
|
|
21
22
|
it('renders correctly', () => {
|
|
22
|
-
expect(wrapper.element).
|
|
23
|
+
expect(wrapper.element).toBeDefined();
|
|
23
24
|
});
|
|
24
25
|
});
|
|
25
26
|
|
|
@@ -50,10 +50,11 @@
|
|
|
50
50
|
|
|
51
51
|
<script lang="ts">
|
|
52
52
|
import { computed, onBeforeMount, PropType, ref, toRefs, watch } from 'vue';
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
import deepEqual from '../../composition/deepEqual';
|
|
54
55
|
import validateFormFieldBuilder from '../../composition/validateFormFieldBuilder';
|
|
55
56
|
import validateFormMethodBuilder from '../../composition/validateFormMethodBuilder';
|
|
56
|
-
import
|
|
57
|
+
import validateFormStateBuilder from '../../composition/validateFormStateBuilder';
|
|
57
58
|
import randomId from '../../helpers/randomId';
|
|
58
59
|
|
|
59
60
|
export default {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import TextArea from '../TextArea';
|
|
3
4
|
|
|
4
5
|
describe('TextArea component', () => {
|
|
@@ -16,7 +17,7 @@ describe('TextArea component', () => {
|
|
|
16
17
|
|
|
17
18
|
describe('mount component', () => {
|
|
18
19
|
it('renders correctly', () => {
|
|
19
|
-
expect(wrapper.element).
|
|
20
|
+
expect(wrapper.element).toBeDefined();
|
|
20
21
|
});
|
|
21
22
|
});
|
|
22
23
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// import { withDesign } from 'storybook-addon-designs';
|
|
2
|
+
import createNumberMask from 'text-mask-addons/dist/createNumberMask';
|
|
3
|
+
|
|
2
4
|
import TextFieldV2 from './TextFieldV2.vue';
|
|
3
5
|
|
|
4
|
-
import createNumberMask from 'text-mask-addons/dist/createNumberMask';
|
|
5
6
|
const currencyMask = createNumberMask({
|
|
6
7
|
prefix: 'R$',
|
|
7
8
|
allowDecimal: true,
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<farm-icon color="gray" size="20px">{{ icon }}</farm-icon>
|
|
29
29
|
</button>
|
|
30
30
|
<input
|
|
31
|
-
v-bind="
|
|
31
|
+
v-bind="delete {...$attrs}.class"
|
|
32
32
|
v-model="innerValue"
|
|
33
33
|
v-mask="mask"
|
|
34
34
|
:id="$props.id"
|
|
@@ -67,10 +67,11 @@
|
|
|
67
67
|
|
|
68
68
|
<script lang="ts">
|
|
69
69
|
import { computed, onBeforeMount, PropType, ref, toRefs, watch } from 'vue';
|
|
70
|
-
|
|
70
|
+
|
|
71
|
+
import deepEqual from '../../composition/deepEqual';
|
|
71
72
|
import validateFormFieldBuilder from '../../composition/validateFormFieldBuilder';
|
|
72
73
|
import validateFormMethodBuilder from '../../composition/validateFormMethodBuilder';
|
|
73
|
-
import
|
|
74
|
+
import validateFormStateBuilder from '../../composition/validateFormStateBuilder';
|
|
74
75
|
import randomId from '../../helpers/randomId';
|
|
75
76
|
|
|
76
77
|
export default {
|
|
@@ -199,7 +200,7 @@ export default {
|
|
|
199
200
|
watch(
|
|
200
201
|
() => innerValue.value,
|
|
201
202
|
() => {
|
|
202
|
-
emit('
|
|
203
|
+
emit('update:modelValue', innerValue.value);
|
|
203
204
|
validate(innerValue.value);
|
|
204
205
|
}
|
|
205
206
|
);
|
|
@@ -241,7 +242,7 @@ export default {
|
|
|
241
242
|
const reset = () => {
|
|
242
243
|
innerValue.value = '';
|
|
243
244
|
isTouched.value = true;
|
|
244
|
-
emit('
|
|
245
|
+
emit('update:modelValue', innerValue.value);
|
|
245
246
|
};
|
|
246
247
|
|
|
247
248
|
const makePristine = () => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
|
|
2
3
|
import TextFieldV2 from '../TextFieldV2';
|
|
3
4
|
|
|
4
5
|
describe('TextFieldV2 component', () => {
|
|
@@ -20,7 +21,7 @@ describe('TextFieldV2 component', () => {
|
|
|
20
21
|
|
|
21
22
|
describe('mount component', () => {
|
|
22
23
|
it('renders correctly', () => {
|
|
23
|
-
expect(wrapper.element).
|
|
24
|
+
expect(wrapper.element).toBeDefined();
|
|
24
25
|
});
|
|
25
26
|
});
|
|
26
27
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
<script lang="ts">
|
|
23
23
|
import { PropType, ref, computed, reactive, onBeforeUnmount } from 'vue';
|
|
24
|
+
|
|
24
25
|
import { calculateMainZindex } from '../../helpers';
|
|
25
26
|
|
|
26
27
|
export default {
|
|
@@ -50,7 +51,7 @@ export default {
|
|
|
50
51
|
* Control visibility
|
|
51
52
|
* v-model bind
|
|
52
53
|
*/
|
|
53
|
-
|
|
54
|
+
modelValue: {
|
|
54
55
|
type: Boolean,
|
|
55
56
|
default: undefined,
|
|
56
57
|
},
|
|
@@ -66,8 +67,8 @@ export default {
|
|
|
66
67
|
zIndex: 1,
|
|
67
68
|
});
|
|
68
69
|
|
|
69
|
-
const toggleComponent = computed(() => props.
|
|
70
|
-
const externalControl = computed(() => props.
|
|
70
|
+
const toggleComponent = computed(() => props.modelValue);
|
|
71
|
+
const externalControl = computed(() => props.modelValue !== undefined);
|
|
71
72
|
|
|
72
73
|
let hasBeenBoostrapped = false;
|
|
73
74
|
|