@farm-investimentos/front-mfe-components-vue3 0.6.0 → 0.6.5
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 +376 -207
- 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 +376 -207
- 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 +5 -2
- package/src/components/Chip/Chip.vue +1 -2
- package/src/components/Chip/__tests__/Chip.spec.js +3 -1
- package/src/components/ChipInviteStatus/keys.ts +9 -9
- package/src/components/Collapsible/Collapsible.scss +16 -0
- package/src/components/Collapsible/Collapsible.stories.js +239 -9
- package/src/components/Collapsible/Collapsible.vue +103 -15
- package/src/components/Collapsible/__tests__/Collapsible.spec.js +8 -0
- package/src/components/ContextMenu/ContextMenu.stories.js +0 -4
- package/src/components/DatePicker/DatePicker.stories.js +2 -2
- package/src/components/DatePicker/DatePicker.vue +3 -1
- package/src/components/InputDecimalFormatter/__tests__/InputMoney.spec.js +6 -3
- package/src/components/ListItem/ListItem.scss +54 -8
- package/src/components/ListItem/ListItem.vue +2 -2
- package/src/components/MainFilter/MainFilter.stories.js +27 -2
- package/src/components/MainFilter/MainFilter.vue +37 -22
- package/src/components/MainFilter/__tests__/MainFilter.spec.js +2 -2
- package/src/components/Modal/Modal.vue +6 -10
- package/src/components/Modal/__tests__/Modal.spec.js +10 -0
- package/src/components/ModalPromptUser/ModalPromptUser.vue +1 -1
- package/src/components/ModalPromptUser/__tests__/ModalPromptUser.spec.js +1 -1
- package/src/components/RadioGroup/__tests__/RadioGroup.spec.js +1 -1
- package/src/components/Select/Select.scss +5 -5
- package/src/components/Select/Select.stories.js +74 -0
- package/src/components/Select/Select.vue +166 -64
- package/src/components/Select/__tests__/Select.spec.js +62 -1
- package/src/components/Select/__tests__/selectItemHandler.spec.js +93 -0
- package/src/components/Select/composition/buildData.ts +2 -0
- package/src/components/Select/composition/index.ts +3 -1
- package/src/components/Select/composition/selectItemHandler.ts +60 -0
- package/src/components/Select/composition/watchAllChecked.ts +23 -0
- package/src/components/SelectAutoComplete/SelectAutoComplete.vue +1 -1
- package/src/components/SelectAutoComplete/__tests__/SelectAutoComplete.spec.js +1 -1
- package/src/components/Switcher/__tests__/Switcher.spec.js +1 -1
- package/src/components/TextArea/TextArea.scss +7 -0
- package/src/components/TextArea/TextArea.stories.js +8 -6
- package/src/components/TextArea/__tests__/TextArea.spec.js +5 -1
- package/src/components/TextFieldV2/TextFieldV2.stories.js +3 -3
- package/src/interfaces/ISelectItem.ts +5 -0
- package/src/scss/Sticky-table.scss +13 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm-investimentos/front-mfe-components-vue3",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
"build:components": "vue-cli-service build --target lib --name front-mfe-components src/main.ts",
|
|
21
21
|
"lint": "vue-cli-service lint --fix",
|
|
22
22
|
"serve": "vue-cli-service serve",
|
|
23
|
+
"serve:storybook": "http-server ./storybook-static/",
|
|
23
24
|
"storybook": "storybook dev -p 6006",
|
|
24
25
|
"test:coverage": "jest --coverage",
|
|
25
|
-
"test:unit": "jest"
|
|
26
|
+
"test:unit": "jest",
|
|
27
|
+
"prepare": "husky"
|
|
26
28
|
},
|
|
27
29
|
"browserslist": [
|
|
28
30
|
"> 1%",
|
|
@@ -74,6 +76,7 @@
|
|
|
74
76
|
"eslint": "^6.7.2",
|
|
75
77
|
"eslint-plugin-import": "^2.29.0",
|
|
76
78
|
"eslint-plugin-vue": "^7.1.0",
|
|
79
|
+
"husky": "^9.0.11",
|
|
77
80
|
"jest": "29.7.0",
|
|
78
81
|
"jest-environment-jsdom": "^29.0.0",
|
|
79
82
|
"npm-run-all2": "^6.0.6",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
10: { label: 'Convidar', color: '
|
|
3
|
-
11: { label: 'Convidado', color: 'warning',
|
|
4
|
-
12: { label: 'Incompleto', color: '
|
|
5
|
-
13: { label: 'Concluído', color: '
|
|
6
|
-
14: { label: 'Falha/Erro', color: 'error',
|
|
7
|
-
15: { label: 'Em Análise', color: 'info',
|
|
8
|
-
16: { label: 'Em Andamento', color: 'secondary', variation: 'darken' },
|
|
9
|
-
17: { label: 'Em Espera', color: '
|
|
10
|
-
18: { label: 'Declinado', color: '
|
|
2
|
+
10: { label: 'Convidar', color: 'success', variation: 'base' },
|
|
3
|
+
11: { label: 'Convidado', color: 'warning', variation: 'lighten' },
|
|
4
|
+
12: { label: 'Incompleto', color: 'error', variation: 'lighten' },
|
|
5
|
+
13: { label: 'Concluído', color: 'success', variation: 'lighten' },
|
|
6
|
+
14: { label: 'Falha/Erro', color: 'error', variation: 'base' },
|
|
7
|
+
15: { label: 'Em Análise', color: 'info', variation: 'base' },
|
|
8
|
+
16: { label: 'Em Andamento', color: 'secondary-golden', variation: 'darken' },
|
|
9
|
+
17: { label: 'Em Espera', color: 'info', variation: 'lighten' },
|
|
10
|
+
18: { label: 'Declinado', color: 'neutral', variation: 'base' },
|
|
11
11
|
};
|
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
justify-content: space-between;
|
|
9
9
|
cursor: pointer;
|
|
10
|
+
|
|
11
|
+
&--custom {
|
|
12
|
+
position: relative;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&--plain {
|
|
17
|
+
cursor: default;
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
}
|
|
10
20
|
}
|
|
11
21
|
|
|
12
22
|
&__content-title {
|
|
@@ -19,6 +29,12 @@
|
|
|
19
29
|
display: flex;
|
|
20
30
|
align-items: center;
|
|
21
31
|
justify-content: space-between;
|
|
32
|
+
|
|
33
|
+
&--custom {
|
|
34
|
+
position: absolute;
|
|
35
|
+
right: 0;
|
|
36
|
+
top: 3px;
|
|
37
|
+
}
|
|
22
38
|
}
|
|
23
39
|
|
|
24
40
|
&__icon {
|
|
@@ -141,12 +141,242 @@ export const Dense = () => ({
|
|
|
141
141
|
'<farm-collapsible icon="plus" title="With Icon" textChip="chip" dense showChip>collapsible content</farm-collapsible>',
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
144
|
+
export const Disabled = () => ({
|
|
145
|
+
data() {
|
|
146
|
+
return {
|
|
147
|
+
clicked: false,
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
template: `<farm-box>
|
|
151
|
+
clicked: {{clicked}}
|
|
152
|
+
<farm-collapsible
|
|
153
|
+
icon="clipboard"
|
|
154
|
+
title="With Button"
|
|
155
|
+
:disabled-button="true"
|
|
156
|
+
:has-button="true"
|
|
157
|
+
@onClick="value => clicked = !clicked" >collapsible content</farm-collapsible>
|
|
158
|
+
</farm-box>`,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
export const Custom = () => ({
|
|
162
|
+
template: `
|
|
163
|
+
<farm-collapsible title="" custom open>
|
|
164
|
+
<template #custom>
|
|
165
|
+
<farm-row justify="space-between" align="center">
|
|
166
|
+
<farm-col md="6">
|
|
167
|
+
<farm-caption>caption</farm-caption>
|
|
168
|
+
</farm-col>
|
|
169
|
+
<farm-col md="6" justify="end"
|
|
170
|
+
align="end">
|
|
171
|
+
<farm-btn
|
|
172
|
+
|
|
173
|
+
>
|
|
174
|
+
custom
|
|
175
|
+
</farm-btn>
|
|
176
|
+
</farm-col>
|
|
177
|
+
</farm-row>
|
|
178
|
+
</template>
|
|
179
|
+
collapsible content
|
|
180
|
+
</farm-collapsible>
|
|
181
|
+
`,
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
export const CustomHeaderContent = () => ({
|
|
185
|
+
template: `
|
|
186
|
+
<farm-collapsible title="" custom-header>
|
|
187
|
+
<template #header-content>
|
|
188
|
+
<farm-row>
|
|
189
|
+
<farm-col md="12">
|
|
190
|
+
<farm-bodytext color="success">initial text</farm-bodytext>
|
|
191
|
+
</farm-col>
|
|
192
|
+
</farm-row>
|
|
193
|
+
|
|
194
|
+
<farm-row class="pt-4">
|
|
195
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
196
|
+
<farm-caption variation="semiBold"
|
|
197
|
+
>text here</farm-caption
|
|
198
|
+
>
|
|
199
|
+
123455
|
|
200
|
+
</farm-col>
|
|
201
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
202
|
+
<farm-caption variation="semiBold"
|
|
203
|
+
>label here</farm-caption
|
|
204
|
+
>
|
|
205
|
+
|
|
206
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
207
|
+
</farm-col>
|
|
208
|
+
|
|
209
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
210
|
+
<farm-caption variation="semiBold">LABEL HERE</farm-caption>
|
|
211
|
+
|
|
212
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
213
|
+
</farm-col>
|
|
214
|
+
|
|
215
|
+
<farm-col>
|
|
216
|
+
<farm-caption variation="semiBold"
|
|
217
|
+
>Label here (text here)</farm-caption
|
|
218
|
+
>
|
|
219
|
+
<farm-caption variation="medium" class="my-1">value here</farm-caption>
|
|
220
|
+
</farm-col>
|
|
221
|
+
</farm-row>
|
|
222
|
+
</template>
|
|
223
|
+
|
|
224
|
+
<farm-bodytext >collapsible content</farm-bodytext>
|
|
225
|
+
</farm-collapsible>
|
|
226
|
+
`,
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
export const CustomBodyContent = () => ({
|
|
230
|
+
template: `
|
|
231
|
+
<farm-collapsible title="simple title" custom-body>
|
|
232
|
+
<farm-row extraDecrease style="background-color:#f5f5f5;" class="px-4">
|
|
233
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
234
|
+
<farm-caption variation="semiBold"
|
|
235
|
+
>text here</farm-caption
|
|
236
|
+
>
|
|
237
|
+
123455
|
|
238
|
+
</farm-col>
|
|
239
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
240
|
+
<farm-caption variation="semiBold"
|
|
241
|
+
>label here</farm-caption
|
|
242
|
+
>
|
|
243
|
+
|
|
244
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
245
|
+
</farm-col>
|
|
246
|
+
|
|
247
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
248
|
+
<farm-caption variation="semiBold">LABEL HERE</farm-caption>
|
|
249
|
+
|
|
250
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
251
|
+
</farm-col>
|
|
252
|
+
|
|
253
|
+
<farm-col>
|
|
254
|
+
<farm-caption variation="semiBold"
|
|
255
|
+
>Label here (text here)</farm-caption
|
|
256
|
+
>
|
|
257
|
+
<farm-caption variation="medium" class="my-1">value here</farm-caption>
|
|
258
|
+
</farm-col>
|
|
259
|
+
</farm-row>
|
|
260
|
+
</farm-collapsible>
|
|
261
|
+
`,
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
export const CustomHeaderAndBodyContent = () => ({
|
|
265
|
+
template: `
|
|
266
|
+
<farm-collapsible title="" custom-header custom-body>
|
|
267
|
+
|
|
268
|
+
<template #header-content>
|
|
269
|
+
<div class="mb-4">
|
|
270
|
+
<farm-row>
|
|
271
|
+
<farm-col md="12">
|
|
272
|
+
<farm-bodytext color="success">initial text</farm-bodytext>
|
|
273
|
+
</farm-col>
|
|
274
|
+
</farm-row>
|
|
275
|
+
|
|
276
|
+
<farm-row class="pt-4">
|
|
277
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
278
|
+
<farm-caption variation="semiBold"
|
|
279
|
+
>text here</farm-caption
|
|
280
|
+
>
|
|
281
|
+
123455
|
|
282
|
+
</farm-col>
|
|
283
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
284
|
+
<farm-caption variation="semiBold"
|
|
285
|
+
>label here</farm-caption
|
|
286
|
+
>
|
|
287
|
+
|
|
288
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
289
|
+
</farm-col>
|
|
290
|
+
|
|
291
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
292
|
+
<farm-caption variation="semiBold">LABEL HERE</farm-caption>
|
|
293
|
+
|
|
294
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
295
|
+
</farm-col>
|
|
296
|
+
|
|
297
|
+
<farm-col>
|
|
298
|
+
<farm-caption variation="semiBold"
|
|
299
|
+
>Label here (text here)</farm-caption
|
|
300
|
+
>
|
|
301
|
+
<farm-caption variation="medium" class="my-1">value here</farm-caption>
|
|
302
|
+
</farm-col>
|
|
303
|
+
</farm-row>
|
|
304
|
+
</div>
|
|
305
|
+
</template>
|
|
306
|
+
|
|
307
|
+
<farm-row extraDecrease style="background-color:#f5f5f5;" class="mt-5 px-2">
|
|
308
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
309
|
+
<farm-caption variation="semiBold"
|
|
310
|
+
>text here</farm-caption
|
|
311
|
+
>
|
|
312
|
+
123455
|
|
313
|
+
</farm-col>
|
|
314
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
315
|
+
<farm-caption variation="semiBold"
|
|
316
|
+
>label here</farm-caption
|
|
317
|
+
>
|
|
318
|
+
|
|
319
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
320
|
+
</farm-col>
|
|
321
|
+
|
|
322
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
323
|
+
<farm-caption variation="semiBold">LABEL HERE</farm-caption>
|
|
324
|
+
|
|
325
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
326
|
+
</farm-col>
|
|
327
|
+
|
|
328
|
+
<farm-col>
|
|
329
|
+
<farm-caption variation="semiBold"
|
|
330
|
+
>Label here (text here)</farm-caption
|
|
331
|
+
>
|
|
332
|
+
<farm-caption variation="medium" class="my-1">value here</farm-caption>
|
|
333
|
+
</farm-col>
|
|
334
|
+
</farm-row>
|
|
335
|
+
</farm-collapsible>
|
|
336
|
+
`,
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
export const Plain = () => ({
|
|
340
|
+
template: `
|
|
341
|
+
<farm-collapsible title="" custom-header plain>
|
|
342
|
+
<template #header-content>
|
|
343
|
+
<farm-row>
|
|
344
|
+
<farm-col md="12">
|
|
345
|
+
<farm-bodytext color="success">initial text</farm-bodytext>
|
|
346
|
+
</farm-col>
|
|
347
|
+
</farm-row>
|
|
348
|
+
|
|
349
|
+
<farm-row class="pt-4">
|
|
350
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
351
|
+
<farm-caption variation="semiBold"
|
|
352
|
+
>text here</farm-caption
|
|
353
|
+
>
|
|
354
|
+
123455
|
|
355
|
+
</farm-col>
|
|
356
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
357
|
+
<farm-caption variation="semiBold"
|
|
358
|
+
>label here</farm-caption
|
|
359
|
+
>
|
|
360
|
+
|
|
361
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
362
|
+
</farm-col>
|
|
363
|
+
|
|
364
|
+
<farm-col class="collapsible-stories-class-with-line">
|
|
365
|
+
<farm-caption variation="semiBold">LABEL HERE</farm-caption>
|
|
366
|
+
|
|
367
|
+
<farm-caption variation="medium" class="my-1">R$ 1000</farm-caption>
|
|
368
|
+
</farm-col>
|
|
369
|
+
|
|
370
|
+
<farm-col>
|
|
371
|
+
<farm-caption variation="semiBold"
|
|
372
|
+
>Label here (text here)</farm-caption
|
|
373
|
+
>
|
|
374
|
+
<farm-caption variation="medium" class="my-1">value here</farm-caption>
|
|
375
|
+
</farm-col>
|
|
376
|
+
</farm-row>
|
|
377
|
+
</template>
|
|
378
|
+
|
|
379
|
+
<farm-bodytext >collapsible content</farm-bodytext>
|
|
380
|
+
</farm-collapsible>
|
|
381
|
+
`,
|
|
382
|
+
});
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<farm-card class="collapsible">
|
|
3
|
-
<farm-card-content
|
|
3
|
+
<farm-card-content
|
|
4
|
+
gutter="md"
|
|
5
|
+
:class="{ 'pb-0': customBody }"
|
|
6
|
+
>
|
|
4
7
|
<div
|
|
8
|
+
v-if="!customHeader"
|
|
5
9
|
class="collapsible__header"
|
|
6
10
|
@click="onToggleCollapsible(status)"
|
|
7
11
|
>
|
|
8
|
-
<div
|
|
12
|
+
<div
|
|
13
|
+
class="collapsible__content-title"
|
|
14
|
+
:class="{ 'full-width': custom, 'pb-4': customBody }"
|
|
15
|
+
>
|
|
9
16
|
<div
|
|
10
17
|
class="collapsible__icon collapsible__icon--main"
|
|
11
|
-
v-if="icon !== ''"
|
|
18
|
+
v-if="icon !== '' && !custom"
|
|
12
19
|
>
|
|
13
20
|
<farm-icon
|
|
14
21
|
size="md"
|
|
@@ -20,17 +27,23 @@
|
|
|
20
27
|
<farm-heading
|
|
21
28
|
type="6"
|
|
22
29
|
color="black"
|
|
30
|
+
v-if="!custom"
|
|
23
31
|
>
|
|
24
32
|
{{ title }}
|
|
25
33
|
</farm-heading>
|
|
26
34
|
<farm-btn
|
|
27
35
|
outlined
|
|
28
36
|
class="ml-6"
|
|
29
|
-
v-if="hasButton"
|
|
30
|
-
|
|
37
|
+
v-if="hasButton && !custom"
|
|
38
|
+
:disabled="disabledButton"
|
|
39
|
+
@click.stop="onClick()"
|
|
31
40
|
>
|
|
32
41
|
{{ labelButton }}
|
|
33
42
|
</farm-btn>
|
|
43
|
+
<slot
|
|
44
|
+
name="custom"
|
|
45
|
+
v-if="custom"
|
|
46
|
+
></slot>
|
|
34
47
|
</div>
|
|
35
48
|
<div class="collapsible__content-right">
|
|
36
49
|
<div
|
|
@@ -56,7 +69,42 @@
|
|
|
56
69
|
</div>
|
|
57
70
|
</div>
|
|
58
71
|
</div>
|
|
59
|
-
|
|
72
|
+
|
|
73
|
+
<div
|
|
74
|
+
v-if="customHeader"
|
|
75
|
+
class="collapsible__header--custom"
|
|
76
|
+
:class="plain ? 'collapsible__header--plain' : ''"
|
|
77
|
+
@click="onToggleCollapsible(status)"
|
|
78
|
+
>
|
|
79
|
+
<slot name="header-content"></slot>
|
|
80
|
+
<div
|
|
81
|
+
v-if="!plain"
|
|
82
|
+
class="collapsible__content-right--custom"
|
|
83
|
+
>
|
|
84
|
+
<div class="collapsible__icon collapsible__icon--arrow">
|
|
85
|
+
<farm-icon
|
|
86
|
+
size="md"
|
|
87
|
+
color="primary"
|
|
88
|
+
>
|
|
89
|
+
{{ arrowIcon }}
|
|
90
|
+
</farm-icon>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<transition
|
|
96
|
+
v-if="customBody"
|
|
97
|
+
name="fade"
|
|
98
|
+
>
|
|
99
|
+
<div v-show="status">
|
|
100
|
+
<slot></slot>
|
|
101
|
+
</div>
|
|
102
|
+
</transition>
|
|
103
|
+
|
|
104
|
+
<transition
|
|
105
|
+
v-else
|
|
106
|
+
name="fade"
|
|
107
|
+
>
|
|
60
108
|
<div
|
|
61
109
|
class="collapsible__body"
|
|
62
110
|
v-show="status"
|
|
@@ -98,42 +146,56 @@ export default {
|
|
|
98
146
|
default: false,
|
|
99
147
|
},
|
|
100
148
|
/**
|
|
101
|
-
*
|
|
149
|
+
* Show Chip?
|
|
102
150
|
*/
|
|
103
151
|
showChip: {
|
|
104
152
|
type: Boolean,
|
|
105
153
|
default: false,
|
|
106
154
|
},
|
|
107
155
|
/**
|
|
108
|
-
* text
|
|
156
|
+
* Chip text?
|
|
109
157
|
*/
|
|
110
158
|
textChip: {
|
|
111
159
|
type: String,
|
|
112
160
|
default: '',
|
|
113
161
|
},
|
|
114
162
|
/**
|
|
115
|
-
*
|
|
163
|
+
* Has button?
|
|
116
164
|
*/
|
|
117
165
|
hasButton: {
|
|
118
166
|
type: Boolean,
|
|
119
167
|
default: false,
|
|
120
168
|
},
|
|
121
169
|
/**
|
|
122
|
-
*
|
|
170
|
+
* plain layout
|
|
171
|
+
*/
|
|
172
|
+
plain: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: false,
|
|
175
|
+
},
|
|
176
|
+
/**
|
|
177
|
+
* Disabled button
|
|
178
|
+
*/
|
|
179
|
+
disabledButton: {
|
|
180
|
+
type: Boolean,
|
|
181
|
+
default: false,
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* Export button?
|
|
123
185
|
*/
|
|
124
186
|
onExport: {
|
|
125
187
|
type: Boolean,
|
|
126
188
|
default: false,
|
|
127
189
|
},
|
|
128
190
|
/**
|
|
129
|
-
* label
|
|
191
|
+
* Button label
|
|
130
192
|
*/
|
|
131
193
|
labelButton: {
|
|
132
194
|
type: String,
|
|
133
195
|
default: 'Exportar',
|
|
134
196
|
},
|
|
135
197
|
/**
|
|
136
|
-
* color
|
|
198
|
+
* Chip color
|
|
137
199
|
*/
|
|
138
200
|
colorChip: {
|
|
139
201
|
type: String as PropType<
|
|
@@ -168,26 +230,47 @@ export default {
|
|
|
168
230
|
default: 'secondary-green',
|
|
169
231
|
},
|
|
170
232
|
/**
|
|
171
|
-
* Is dense
|
|
233
|
+
* Is dense?
|
|
172
234
|
*/
|
|
173
235
|
dense: {
|
|
174
236
|
type: Boolean,
|
|
175
237
|
default: false,
|
|
176
238
|
},
|
|
177
239
|
/**
|
|
178
|
-
* Is outlined
|
|
240
|
+
* Is outlined?
|
|
179
241
|
*/
|
|
180
242
|
outlined: {
|
|
181
243
|
type: Boolean,
|
|
182
244
|
default: false,
|
|
183
245
|
},
|
|
184
246
|
/**
|
|
185
|
-
* Is variation
|
|
247
|
+
* Is variation?
|
|
186
248
|
*/
|
|
187
249
|
variation: {
|
|
188
250
|
type: String,
|
|
189
251
|
default: 'base',
|
|
190
252
|
},
|
|
253
|
+
/**
|
|
254
|
+
* Is custom?
|
|
255
|
+
*/
|
|
256
|
+
custom: {
|
|
257
|
+
type: Boolean,
|
|
258
|
+
default: false,
|
|
259
|
+
},
|
|
260
|
+
/**
|
|
261
|
+
* Is custom body?
|
|
262
|
+
*/
|
|
263
|
+
customBody: {
|
|
264
|
+
type: Boolean,
|
|
265
|
+
default: false,
|
|
266
|
+
},
|
|
267
|
+
/**
|
|
268
|
+
* Is custom header?
|
|
269
|
+
*/
|
|
270
|
+
customHeader: {
|
|
271
|
+
type: Boolean,
|
|
272
|
+
default: false,
|
|
273
|
+
},
|
|
191
274
|
},
|
|
192
275
|
|
|
193
276
|
setup(props, { emit }) {
|
|
@@ -201,10 +284,15 @@ export default {
|
|
|
201
284
|
emit('open', status.value);
|
|
202
285
|
}
|
|
203
286
|
|
|
287
|
+
function onClick() {
|
|
288
|
+
emit('onClick');
|
|
289
|
+
}
|
|
290
|
+
|
|
204
291
|
return {
|
|
205
292
|
status,
|
|
206
293
|
arrowIcon,
|
|
207
294
|
onToggleCollapsible,
|
|
295
|
+
onClick,
|
|
208
296
|
};
|
|
209
297
|
},
|
|
210
298
|
};
|
|
@@ -28,6 +28,14 @@ describe('Collapsible component', () => {
|
|
|
28
28
|
expect(wrapper.emitted().open).toBeDefined();
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
|
+
|
|
32
|
+
describe('onClick', () => {
|
|
33
|
+
it('should emit event', () => {
|
|
34
|
+
component.onClick();
|
|
35
|
+
expect(wrapper.emitted().onClick).toBeDefined();
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
31
39
|
});
|
|
32
40
|
|
|
33
41
|
describe('Computed properties', () => {
|
|
@@ -25,7 +25,6 @@ export const Primary = () => ({
|
|
|
25
25
|
<template v-slot:activator="{ on, attrs }">
|
|
26
26
|
<farm-btn
|
|
27
27
|
v-bind="attrs"
|
|
28
|
-
v-on="on"
|
|
29
28
|
>
|
|
30
29
|
open
|
|
31
30
|
</farm-btn>
|
|
@@ -41,7 +40,6 @@ export const LongActivator = () => ({
|
|
|
41
40
|
<template v-slot:activator="{ on, attrs }">
|
|
42
41
|
<farm-btn
|
|
43
42
|
v-bind="attrs"
|
|
44
|
-
v-on="on"
|
|
45
43
|
>
|
|
46
44
|
Very long Activator
|
|
47
45
|
</farm-btn>
|
|
@@ -57,7 +55,6 @@ export const IconActivator = () => ({
|
|
|
57
55
|
<template v-slot:activator="{ on, attrs }">
|
|
58
56
|
<farm-btn
|
|
59
57
|
v-bind="attrs"
|
|
60
|
-
v-on="on"
|
|
61
58
|
icon
|
|
62
59
|
>
|
|
63
60
|
<farm-icon>help-circle</farm-icon>
|
|
@@ -209,7 +206,6 @@ export const Right = () => ({
|
|
|
209
206
|
<template v-slot:activator="{ on, attrs }">
|
|
210
207
|
<farm-btn
|
|
211
208
|
v-bind="attrs"
|
|
212
|
-
v-on="on"
|
|
213
209
|
>
|
|
214
210
|
open
|
|
215
211
|
</farm-btn>
|
|
@@ -112,7 +112,7 @@ export const AllowedDates = () => ({
|
|
|
112
112
|
<farm-col cols="12">
|
|
113
113
|
allowed dates: {{ allowedDates }}<br />
|
|
114
114
|
selected date: {{ date }}
|
|
115
|
-
|
|
115
|
+
</farm-col>
|
|
116
116
|
</farm-row>`,
|
|
117
117
|
});
|
|
118
118
|
|
|
@@ -131,7 +131,7 @@ export const DisabledDates = () => ({
|
|
|
131
131
|
<farm-col cols="12">
|
|
132
132
|
disabled dates: {{ disabledDates }}<br />
|
|
133
133
|
selected date: {{ date }}
|
|
134
|
-
|
|
134
|
+
</farm-col>
|
|
135
135
|
</farm-row>`,
|
|
136
136
|
});
|
|
137
137
|
|
|
@@ -233,13 +233,15 @@ export default {
|
|
|
233
233
|
this.dateField = this.modelValue;
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
|
+
pickerDate(newValue) {
|
|
237
|
+
this.internalPickerDate = newValue;
|
|
238
|
+
},
|
|
236
239
|
},
|
|
237
240
|
methods: {
|
|
238
241
|
save() {
|
|
239
242
|
this.inputVal = this.dateField;
|
|
240
243
|
this.menuField = false;
|
|
241
244
|
this.closeDatepicker();
|
|
242
|
-
|
|
243
245
|
},
|
|
244
246
|
clear() {
|
|
245
247
|
this.dateField = this.multiple ? [] : '';
|
|
@@ -8,9 +8,12 @@ describe('InputDecimalFormatter component', () => {
|
|
|
8
8
|
|
|
9
9
|
beforeEach(() => {
|
|
10
10
|
wrapper = shallowMount(InputDecimalFormatter, {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
global: {
|
|
12
|
+
directives: {
|
|
13
|
+
mask: () => { },
|
|
14
|
+
money3: () => { },
|
|
15
|
+
},
|
|
16
|
+
}
|
|
14
17
|
});
|
|
15
18
|
component = wrapper.vm;
|
|
16
19
|
});
|