@eturnity/eturnity_reusable_components 7.35.1-EPDM-10620.1 → 7.35.2-EPDM-11386.0
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/package.json +1 -1
- package/src/App.vue +1 -4
- package/src/assets/svgIcons/pause.svg +6 -0
- package/src/assets/theme.js +3 -0
- package/src/components/filter/filterSettings.vue +25 -55
- package/src/components/filter/index.vue +1 -1
- package/src/components/roundTabs/index.vue +103 -0
- package/src/components/selectedOptions/index.vue +26 -212
package/package.json
CHANGED
package/src/App.vue
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
<template>
|
2
|
-
<ThemeProvider :style="{ height: '100%' }" :theme="getTheme()"
|
3
|
-
<RouterView />
|
4
|
-
</ThemeProvider>
|
2
|
+
<ThemeProvider :style="{ height: '100%' }" :theme="getTheme()" />
|
5
3
|
</template>
|
6
4
|
|
7
5
|
<script>
|
8
6
|
import { ThemeProvider } from 'vue3-styled-components'
|
9
7
|
import theme from './assets/theme'
|
10
|
-
|
11
8
|
export default {
|
12
9
|
name: 'App',
|
13
10
|
components: {
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<svg fill="#000000" height="800px" width="800px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
2
|
+
viewBox="0 0 512 512" xml:space="preserve">
|
3
|
+
<path d="M256,0C114.617,0,0,114.615,0,256s114.617,256,256,256s256-114.615,256-256S397.383,0,256,0z M224,320
|
4
|
+
c0,8.836-7.164,16-16,16h-32c-8.836,0-16-7.164-16-16V192c0-8.836,7.164-16,16-16h32c8.836,0,16,7.164,16,16V320z M352,320
|
5
|
+
c0,8.836-7.164,16-16,16h-32c-8.836,0-16-7.164-16-16V192c0-8.836,7.164-16,16-16h32c8.836,0,16,7.164,16,16V320z"/>
|
6
|
+
</svg>
|
package/src/assets/theme.js
CHANGED
@@ -87,10 +87,7 @@
|
|
87
87
|
:key="index + '_field'"
|
88
88
|
>
|
89
89
|
<SelectComponent
|
90
|
-
v-if="
|
91
|
-
isMultipleSelector(filter.filter_type) ||
|
92
|
-
isSingleSelector(filter.filter_type)
|
93
|
-
"
|
90
|
+
v-if="isMultipleSelector(filter.filter_type)"
|
94
91
|
align-items="vertical"
|
95
92
|
:disabled="!filter.choices.length"
|
96
93
|
font-size="13px"
|
@@ -105,12 +102,16 @@
|
|
105
102
|
<OptionTitle> {{ filter.selectedText }} </OptionTitle>
|
106
103
|
</template>
|
107
104
|
<template #dropdown>
|
108
|
-
<
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
105
|
+
<DropdownCheckboxContainer
|
106
|
+
v-for="(filterOption, optionIdx) in filter.choices"
|
107
|
+
:key="optionIdx + 'optionIdx'"
|
108
|
+
@click.stop
|
109
|
+
>
|
110
|
+
<Checkbox
|
111
|
+
:is-checked="filterOption.selected"
|
112
|
+
:label="filterOption.text"
|
113
|
+
size="small"
|
114
|
+
@on-event-handler="
|
114
115
|
onChange({
|
115
116
|
dataType: item.type,
|
116
117
|
value: $event,
|
@@ -118,31 +119,8 @@
|
|
118
119
|
field: filter.field,
|
119
120
|
})
|
120
121
|
"
|
121
|
-
|
122
|
-
|
123
|
-
</Option>
|
124
|
-
</template>
|
125
|
-
<template v-else>
|
126
|
-
<DropdownCheckboxContainer
|
127
|
-
v-for="(filterOption, optionIdx) in filter.choices"
|
128
|
-
:key="optionIdx + 'optionIdx'"
|
129
|
-
@click.stop
|
130
|
-
>
|
131
|
-
<Checkbox
|
132
|
-
:is-checked="filterOption.selected"
|
133
|
-
:label="filterOption.text"
|
134
|
-
size="small"
|
135
|
-
@on-event-handler="
|
136
|
-
onChange({
|
137
|
-
dataType: item.type,
|
138
|
-
value: $event,
|
139
|
-
choice: filterOption.choice,
|
140
|
-
field: filter.field,
|
141
|
-
})
|
142
|
-
"
|
143
|
-
/>
|
144
|
-
</DropdownCheckboxContainer>
|
145
|
-
</template>
|
122
|
+
/>
|
123
|
+
</DropdownCheckboxContainer>
|
146
124
|
</template>
|
147
125
|
</SelectComponent>
|
148
126
|
<SectionContainer v-else-if="isRangeSelector(filter.filter_type)">
|
@@ -327,29 +305,25 @@
|
|
327
305
|
const ContainerWrapper = styled.div`
|
328
306
|
position: absolute;
|
329
307
|
margin-top: 4px;
|
330
|
-
max-height: 70vh;
|
331
|
-
overflow-y: auto;
|
332
308
|
background-color: ${(props) => props.theme.colors.white};
|
333
309
|
min-width: 100%;
|
334
310
|
width: max-content;
|
335
311
|
border: 1px solid ${(props) => props.theme.colors.grey4};
|
336
312
|
border-radius: 4px;
|
337
|
-
z-index:
|
313
|
+
z-index: 99999;
|
338
314
|
font-size: 13px;
|
339
315
|
`
|
340
316
|
|
341
317
|
const ColAttrs = { numCols: Number, hasActiveView: Boolean }
|
342
318
|
const ColumnWrapper = styled('div', ColAttrs)`
|
343
319
|
display: grid;
|
344
|
-
max-height: 50vh;
|
345
|
-
overflow-y: auto;
|
346
320
|
grid-template-columns: repeat(${(props) => props.numCols}, auto);
|
347
321
|
|
348
322
|
${({ hasActiveView, theme }) =>
|
349
323
|
hasActiveView &&
|
350
324
|
`
|
351
|
-
|
352
|
-
|
325
|
+
border-top: 1px solid ${theme.colors.grey4};
|
326
|
+
`}
|
353
327
|
`
|
354
328
|
|
355
329
|
const TitleAttrs = { showBorder: Boolean }
|
@@ -361,8 +335,8 @@
|
|
361
335
|
${({ showBorder, theme }) =>
|
362
336
|
showBorder &&
|
363
337
|
`
|
364
|
-
|
365
|
-
|
338
|
+
border-right: 1px solid ${theme.colors.grey4};
|
339
|
+
`}
|
366
340
|
`
|
367
341
|
|
368
342
|
const ButtonContainer = styled.div`
|
@@ -398,8 +372,8 @@
|
|
398
372
|
${({ showBorder, theme }) =>
|
399
373
|
showBorder &&
|
400
374
|
`
|
401
|
-
|
402
|
-
|
375
|
+
border-right: 1px solid ${theme.colors.grey4};
|
376
|
+
`}
|
403
377
|
|
404
378
|
.ghost {
|
405
379
|
opacity: 0.5;
|
@@ -428,7 +402,6 @@
|
|
428
402
|
display: grid;
|
429
403
|
gap: 6px;
|
430
404
|
width: 100%;
|
431
|
-
overflow-wrap: anywhere;
|
432
405
|
padding: 7px 10px;
|
433
406
|
background: ${(props) => props.theme.colors.grey5};
|
434
407
|
`
|
@@ -462,11 +435,11 @@
|
|
462
435
|
`
|
463
436
|
|
464
437
|
const UpperContainer = styled.div`
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
438
|
+
display: grid;
|
439
|
+
grid-gap: 20px
|
440
|
+
grid-template-columns: 1fr 1fr;
|
441
|
+
padding: 10px 14px;
|
442
|
+
`
|
470
443
|
|
471
444
|
const ResetButton = styled.div`
|
472
445
|
display: inline-flex;
|
@@ -649,9 +622,6 @@
|
|
649
622
|
const foundItem = options.find((item) => item.choice === value)
|
650
623
|
return foundItem ? foundItem.text : value ? value : filter.selectedText
|
651
624
|
},
|
652
|
-
isSingleSelector(type) {
|
653
|
-
return type === 'boolean'
|
654
|
-
},
|
655
625
|
isMultipleSelector(type) {
|
656
626
|
return type === 'multi_select_integer' || type === 'multi_select_string'
|
657
627
|
},
|
@@ -0,0 +1,103 @@
|
|
1
|
+
<template>
|
2
|
+
<Container>
|
3
|
+
<RoundedTabLeft
|
4
|
+
:background-color="backgroundColor"
|
5
|
+
:border-radius="borderRadius"
|
6
|
+
/>
|
7
|
+
<Tab
|
8
|
+
:background-color="backgroundColor"
|
9
|
+
:border-radius="borderRadius"
|
10
|
+
:height="height"
|
11
|
+
:width="width"
|
12
|
+
>
|
13
|
+
<slot></slot>
|
14
|
+
</Tab>
|
15
|
+
<RoundedTabRight
|
16
|
+
:background-color="backgroundColor"
|
17
|
+
:border-radius="borderRadius"
|
18
|
+
/>
|
19
|
+
</Container>
|
20
|
+
</template>
|
21
|
+
<script>
|
22
|
+
import styled from 'vue3-styled-components'
|
23
|
+
|
24
|
+
const Container = styled.div`
|
25
|
+
position: relative;
|
26
|
+
display: flex;
|
27
|
+
align-items: center;
|
28
|
+
justify-content: center;
|
29
|
+
`
|
30
|
+
const RoundedTabLeft = styled('div', {
|
31
|
+
backgroundColor: String,
|
32
|
+
borderRadius: String,
|
33
|
+
})`
|
34
|
+
position:absolute;
|
35
|
+
bottom:0;
|
36
|
+
left:-${(prop) => prop.borderRadius}
|
37
|
+
background-color: ${(prop) => prop.backgroundColor};
|
38
|
+
width: ${(prop) => prop.borderRadius};
|
39
|
+
height: ${(prop) => prop.borderRadius};
|
40
|
+
-webkit-mask-image: radial-gradient(
|
41
|
+
circle at top left,
|
42
|
+
transparent 71%,
|
43
|
+
black 71%
|
44
|
+
);
|
45
|
+
`
|
46
|
+
const RoundedTabRight = styled('div', {
|
47
|
+
backgroundColor: String,
|
48
|
+
borderRadius: String,
|
49
|
+
})`
|
50
|
+
position:absolute;
|
51
|
+
bottom:0;
|
52
|
+
right:-${(prop) => prop.borderRadius}
|
53
|
+
background-color: ${(prop) => prop.backgroundColor};
|
54
|
+
width: ${(prop) => prop.borderRadius};
|
55
|
+
height: ${(prop) => prop.borderRadius};
|
56
|
+
-webkit-mask-image: radial-gradient(
|
57
|
+
circle at top right,
|
58
|
+
transparent 71%,
|
59
|
+
black 71%
|
60
|
+
);`
|
61
|
+
const Tab = styled('div', {
|
62
|
+
width: String,
|
63
|
+
height: String,
|
64
|
+
backgroundColor: String,
|
65
|
+
borderRadius: String,
|
66
|
+
})`
|
67
|
+
display: flex;
|
68
|
+
align-items: center;
|
69
|
+
justify-content: center;
|
70
|
+
background-color: ${(prop) => prop.backgroundColor};
|
71
|
+
width: ${(prop) => prop.width};
|
72
|
+
height: ${(prop) => prop.height};
|
73
|
+
border-radius: ${(prop) => prop.borderRadius} ${(prop) => prop.borderRadius}
|
74
|
+
0 0;
|
75
|
+
`
|
76
|
+
export default {
|
77
|
+
name: 'SelectedOptions',
|
78
|
+
components: {
|
79
|
+
Container,
|
80
|
+
Tab,
|
81
|
+
RoundedTabLeft,
|
82
|
+
RoundedTabRight,
|
83
|
+
},
|
84
|
+
props: {
|
85
|
+
height: {
|
86
|
+
required: false,
|
87
|
+
default: '40px',
|
88
|
+
},
|
89
|
+
width: {
|
90
|
+
required: false,
|
91
|
+
default: '200px',
|
92
|
+
},
|
93
|
+
backgroundColor: {
|
94
|
+
required: false,
|
95
|
+
default: 'blue',
|
96
|
+
},
|
97
|
+
borderRadius: {
|
98
|
+
required: false,
|
99
|
+
default: '20px',
|
100
|
+
},
|
101
|
+
},
|
102
|
+
}
|
103
|
+
</script>
|
@@ -1,81 +1,32 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<
|
9
|
-
|
10
|
-
v-for="item in limitedOptions"
|
11
|
-
:key="item.type"
|
12
|
-
:hover-color="item.hoverColor"
|
13
|
-
@click="$emit('on-' + item.type)"
|
14
|
-
>
|
15
|
-
{{ item.name }}
|
16
|
-
</ListItem>
|
17
|
-
<ButtonContainer
|
18
|
-
v-if="optionsList.length > optionLimit || hasComponent"
|
19
|
-
@click="expandOptions"
|
20
|
-
name="more_options,_tool_tips"
|
21
|
-
>
|
22
|
-
<DotItem />
|
23
|
-
<DotItem />
|
24
|
-
<DotItem />
|
25
|
-
</ButtonContainer>
|
26
|
-
</ListContainer>
|
27
|
-
<EmptyText v-if="!optionsList.length">
|
28
|
-
{{ $gettext('no_batch_actions_available') }}
|
29
|
-
</EmptyText>
|
30
|
-
<IconContainer @click="$emit('on-close')">
|
31
|
-
<Icon
|
32
|
-
color="white"
|
33
|
-
cursor="pointer"
|
34
|
-
name="close_for_modals,_tool_tips"
|
35
|
-
size="14px"
|
36
|
-
/>
|
37
|
-
</IconContainer>
|
38
|
-
</BoxContainer>
|
39
|
-
</PageContainer>
|
40
|
-
<CenterPageContainer v-else>
|
41
|
-
<CenterBox>
|
42
|
-
<TitleContainer>
|
43
|
-
<BoxTitle> {{ numberSelected }} {{ $gettext('selected') }} </BoxTitle>
|
44
|
-
<IconContainer @click="$emit('on-close')">
|
45
|
-
<Icon
|
46
|
-
color="white"
|
47
|
-
cursor="pointer"
|
48
|
-
name="close_for_modals,_tool_tips"
|
49
|
-
size="14px"
|
50
|
-
/>
|
51
|
-
</IconContainer>
|
52
|
-
</TitleContainer>
|
53
|
-
<Divider />
|
54
|
-
<ExpandedListItem
|
55
|
-
v-for="item in limitedOptions"
|
2
|
+
<PageContainer>
|
3
|
+
<BoxContainer>
|
4
|
+
<SelectedContainer>
|
5
|
+
{{ numberSelected }} {{ $gettext('selected') }}
|
6
|
+
</SelectedContainer>
|
7
|
+
<ListContainer v-if="optionsList.length">
|
8
|
+
<ListItem
|
9
|
+
v-for="item in optionsList"
|
56
10
|
:key="item.type"
|
57
11
|
:hover-color="item.hoverColor"
|
58
|
-
@click="
|
12
|
+
@click="$emit('on-' + item.type)"
|
59
13
|
>
|
60
14
|
{{ item.name }}
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
</CenterBox>
|
77
|
-
</CenterPageContainer>
|
78
|
-
</PageWrapper>
|
15
|
+
</ListItem>
|
16
|
+
</ListContainer>
|
17
|
+
<EmptyText v-if="!optionsList.length">
|
18
|
+
{{ $gettext('no_batch_actions_available') }}
|
19
|
+
</EmptyText>
|
20
|
+
<IconContainer @click="$emit('on-close')">
|
21
|
+
<Icon
|
22
|
+
color="white"
|
23
|
+
cursor="pointer"
|
24
|
+
name="close_for_modals,_tool_tips"
|
25
|
+
size="14px"
|
26
|
+
/>
|
27
|
+
</IconContainer>
|
28
|
+
</BoxContainer>
|
29
|
+
</PageContainer>
|
79
30
|
</template>
|
80
31
|
|
81
32
|
<script>
|
@@ -86,13 +37,6 @@
|
|
86
37
|
// name: 'Export'
|
87
38
|
// },
|
88
39
|
// {
|
89
|
-
// type: 'export',
|
90
|
-
// name: 'Export'
|
91
|
-
// ...
|
92
|
-
// add component parameter if we were passing a component to the selected options
|
93
|
-
// component: 'set_supplier'
|
94
|
-
// },
|
95
|
-
// {
|
96
40
|
// type: 'delete',
|
97
41
|
// name: 'Delete',
|
98
42
|
// hoverColor: 'red' // default is green
|
@@ -104,25 +48,10 @@
|
|
104
48
|
// :optionsList="optionsList"
|
105
49
|
// @on-close="onCloseFunction()"
|
106
50
|
// @on-export="function()" @on-delete="function()"
|
107
|
-
//
|
108
|
-
// <template v-slot:set_supplier>
|
109
|
-
// <CustomSelectComponent
|
110
|
-
// :option-list="suppliers"
|
111
|
-
// @set-supplier="checkboxBulkActions('setSupplier', $event)"
|
112
|
-
// />
|
113
|
-
// </template>
|
114
|
-
// </SelectedOptions>
|
51
|
+
// />
|
115
52
|
import styled from 'vue3-styled-components'
|
116
|
-
import MainButton from '../buttons/mainButton'
|
117
53
|
import Icon from '../icon'
|
118
54
|
|
119
|
-
const PageWrapper = styled.div``
|
120
|
-
|
121
|
-
const Divider = styled.div`
|
122
|
-
border-bottom: 1px solid ${({ theme }) => theme.colors.white};
|
123
|
-
width: 100%;
|
124
|
-
`
|
125
|
-
|
126
55
|
const PageContainer = styled.div`
|
127
56
|
position: fixed;
|
128
57
|
bottom: 30px;
|
@@ -130,23 +59,6 @@
|
|
130
59
|
transform: translateX(-50%);
|
131
60
|
`
|
132
61
|
|
133
|
-
const CenterPageContainer = styled.div`
|
134
|
-
position: fixed;
|
135
|
-
top: 50%;
|
136
|
-
left: 50%;
|
137
|
-
transform: translate(-50%, -50%);
|
138
|
-
border-radius: 4px;
|
139
|
-
background-color: rgba(0, 0, 0, 0.4);
|
140
|
-
`
|
141
|
-
|
142
|
-
const OptionsContainer = styled.div`
|
143
|
-
position: fixed;
|
144
|
-
right: -300px;
|
145
|
-
background-color: ${(props) => props.theme.colors.black};
|
146
|
-
border-radius: 4px;
|
147
|
-
padding: 20px;
|
148
|
-
`
|
149
|
-
|
150
62
|
const SelectedContainer = styled.div`
|
151
63
|
display: grid;
|
152
64
|
align-items: center;
|
@@ -155,18 +67,6 @@
|
|
155
67
|
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
156
68
|
`
|
157
69
|
|
158
|
-
const TitleContainer = styled.div`
|
159
|
-
display: flex;
|
160
|
-
align-items: center;
|
161
|
-
justify-content: space-between;
|
162
|
-
width: 100%;
|
163
|
-
`
|
164
|
-
|
165
|
-
const BoxTitle = styled.div`
|
166
|
-
font-size: 14px;
|
167
|
-
color: ${(props) => props.theme.colors.white};
|
168
|
-
`
|
169
|
-
|
170
70
|
const BoxContainer = styled.div`
|
171
71
|
display: flex;
|
172
72
|
align-items: center;
|
@@ -179,41 +79,9 @@
|
|
179
79
|
height: 40px;
|
180
80
|
`
|
181
81
|
|
182
|
-
const CenterBox = styled(BoxContainer)`
|
183
|
-
justify-content: center;
|
184
|
-
flex-direction: column;
|
185
|
-
height: auto;
|
186
|
-
gap: 25px;
|
187
|
-
align-items: flex-start;
|
188
|
-
border-radius: 4px;
|
189
|
-
width: 400px;
|
190
|
-
padding: 20px;
|
191
|
-
`
|
192
|
-
|
193
|
-
const ButtonContainer = styled.div`
|
194
|
-
display: flex;
|
195
|
-
flex-direction: row;
|
196
|
-
align-items: center;
|
197
|
-
justify-content: center;
|
198
|
-
padding: 5px;
|
199
|
-
cursor: pointer;
|
200
|
-
|
201
|
-
div {
|
202
|
-
// This is the dot color
|
203
|
-
background: ${(props) => props.theme.colors.white};
|
204
|
-
}
|
205
|
-
`
|
206
|
-
const DotItem = styled.div`
|
207
|
-
width: 4px;
|
208
|
-
height: 4px;
|
209
|
-
margin: 1px;
|
210
|
-
border-radius: 50%;
|
211
|
-
`
|
212
|
-
|
213
82
|
const ListContainer = styled.div`
|
214
83
|
padding: 0 20px;
|
215
84
|
display: flex;
|
216
|
-
align-items: center;
|
217
85
|
gap: 20px;
|
218
86
|
color: ${(props) => props.theme.colors.white};
|
219
87
|
`
|
@@ -231,13 +99,6 @@
|
|
231
99
|
}
|
232
100
|
`
|
233
101
|
|
234
|
-
const ExpandedListItem = styled(ListItem)`
|
235
|
-
display: flex;
|
236
|
-
width: 100%;
|
237
|
-
justify-content: space-between;
|
238
|
-
align-items: center;
|
239
|
-
`
|
240
|
-
|
241
102
|
const IconContainer = styled.div`
|
242
103
|
display: grid;
|
243
104
|
align-items: center;
|
@@ -245,7 +106,7 @@
|
|
245
106
|
height: 30px;
|
246
107
|
width: 30px;
|
247
108
|
cursor: pointer;
|
248
|
-
margin-left:
|
109
|
+
margin-left: 20px;
|
249
110
|
|
250
111
|
&:hover {
|
251
112
|
background: rgba(255, 255, 255, 0.1);
|
@@ -266,41 +127,10 @@
|
|
266
127
|
BoxContainer,
|
267
128
|
SelectedContainer,
|
268
129
|
ListContainer,
|
269
|
-
MainButton,
|
270
|
-
ButtonContainer,
|
271
|
-
DotItem,
|
272
130
|
ListItem,
|
273
|
-
CenterBox,
|
274
131
|
Icon,
|
275
|
-
CenterPageContainer,
|
276
|
-
PageWrapper,
|
277
|
-
OptionsContainer,
|
278
|
-
ExpandedListItem,
|
279
|
-
TitleContainer,
|
280
132
|
IconContainer,
|
281
133
|
EmptyText,
|
282
|
-
BoxTitle,
|
283
|
-
Divider,
|
284
|
-
},
|
285
|
-
computed: {
|
286
|
-
hasComponent() {
|
287
|
-
return this.optionsList.some((item) => item.component)
|
288
|
-
},
|
289
|
-
},
|
290
|
-
methods: {
|
291
|
-
toggleElement(type) {
|
292
|
-
this.limitedOptions = this.optionsList.map((item) => {
|
293
|
-
if (item.type === type) {
|
294
|
-
item.open = !item.open
|
295
|
-
} else item.open = false
|
296
|
-
|
297
|
-
return item
|
298
|
-
})
|
299
|
-
},
|
300
|
-
expandOptions() {
|
301
|
-
this.expanded = !this.expanded
|
302
|
-
this.limitedOptions = this.optionsList
|
303
|
-
},
|
304
134
|
},
|
305
135
|
props: {
|
306
136
|
optionsList: {
|
@@ -311,21 +141,5 @@
|
|
311
141
|
default: 0,
|
312
142
|
},
|
313
143
|
},
|
314
|
-
mounted() {
|
315
|
-
this.limitedOptions = this.optionsList
|
316
|
-
.map((item) => {
|
317
|
-
return { ...item, open: false }
|
318
|
-
})
|
319
|
-
.filter((item) => !item.component)
|
320
|
-
.slice(0, this.optionLimit)
|
321
|
-
},
|
322
|
-
data() {
|
323
|
-
return {
|
324
|
-
//maximum number of options to display, if more than 4, display a 'more' option
|
325
|
-
optionLimit: 4,
|
326
|
-
expanded: false,
|
327
|
-
limitedOptions: [],
|
328
|
-
}
|
329
|
-
},
|
330
144
|
}
|
331
145
|
</script>
|