@eturnity/eturnity_reusable_components 6.46.5-qa-16-11.27 → 6.48.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/assets/svgIcons/collections.svg +3 -0
- package/src/assets/svgIcons/dashboard.svg +3 -0
- package/src/assets/svgIcons/subscriptions.svg +3 -0
- package/src/components/filter/filterSettings.vue +6 -3
- package/src/components/iconWrapper/index.vue +5 -4
- package/src/components/inputs/select/index.vue +10 -0
- package/src/components/pagination/index.vue +122 -130
- package/src/components/projectMarker/index.vue +22 -8
- package/src/components/sideMenu/index.vue +264 -0
- package/src/components/threeDots/index.vue +1 -1
package/package.json
CHANGED
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M17 10H1C0.45 10 0 10.45 0 11V17C0 17.55 0.45 18 1 18H17C17.55 18 18 17.55 18 17V11C18 10.45 17.55 10 17 10ZM4 16C2.9 16 2 15.1 2 14C2 12.9 2.9 12 4 12C5.1 12 6 12.9 6 14C6 15.1 5.1 16 4 16ZM17 0H1C0.45 0 0 0.45 0 1V7C0 7.55 0.45 8 1 8H17C17.55 8 18 7.55 18 7V1C18 0.45 17.55 0 17 0ZM4 6C2.9 6 2 5.1 2 4C2 2.9 2.9 2 4 2C5.1 2 6 2.9 6 4C6 5.1 5.1 6 4 6Z" fill="white"/>
|
3
|
+
</svg>
|
@@ -127,7 +127,7 @@
|
|
127
127
|
? $gettext('min') + ' (' + filter.unit + ')'
|
128
128
|
: $gettext('min')
|
129
129
|
"
|
130
|
-
:numberPrecision="2"
|
130
|
+
:numberPrecision="isIntegerRange(filter.filter_type) ? 0 : 2"
|
131
131
|
:value="filter.range.start"
|
132
132
|
@input-change="
|
133
133
|
onChange({
|
@@ -147,7 +147,7 @@
|
|
147
147
|
? $gettext('max') + ' (' + filter.unit + ')'
|
148
148
|
: $gettext('max')
|
149
149
|
"
|
150
|
-
:numberPrecision="2"
|
150
|
+
:numberPrecision="isIntegerRange(filter.filter_type) ? 0 : 2"
|
151
151
|
:value="filter.range.end"
|
152
152
|
@input-change="
|
153
153
|
onChange({
|
@@ -340,7 +340,7 @@ const DragContainer = styled.div`
|
|
340
340
|
|
341
341
|
const RowContainer = styled('div', TitleAttrs)`
|
342
342
|
padding: 10px 14px;
|
343
|
-
width: 300px;
|
343
|
+
min-width: 300px;
|
344
344
|
|
345
345
|
${({ showBorder, theme }) =>
|
346
346
|
showBorder &&
|
@@ -615,6 +615,9 @@ export default {
|
|
615
615
|
return type === 'multi_select_integer' || type === 'multi_select_string'
|
616
616
|
},
|
617
617
|
isRangeSelector(type) {
|
618
|
+
return type === 'integer_range' || type === 'number_range'
|
619
|
+
},
|
620
|
+
isIntegerRange(type) {
|
618
621
|
return type === 'integer_range'
|
619
622
|
},
|
620
623
|
isDateSelector(type) {
|
@@ -104,6 +104,7 @@
|
|
104
104
|
:selectedValue="selectedValue"
|
105
105
|
@option-selected="optionSelected"
|
106
106
|
@option-hovered="optionHovered"
|
107
|
+
@mouseleave="optionLeave"
|
107
108
|
>
|
108
109
|
<slot name="dropdown"></slot>
|
109
110
|
</selectDropdown>
|
@@ -340,6 +341,10 @@ export default {
|
|
340
341
|
required: false,
|
341
342
|
default: false
|
342
343
|
},
|
344
|
+
dropdownAutoClose: {
|
345
|
+
required: false,
|
346
|
+
default: false
|
347
|
+
},
|
343
348
|
alignItems: {
|
344
349
|
required: false,
|
345
350
|
default: 'horizontal'
|
@@ -465,6 +470,11 @@ export default {
|
|
465
470
|
this.blur()
|
466
471
|
}
|
467
472
|
},
|
473
|
+
optionLeave() {
|
474
|
+
if(this.dropdownAutoClose) {
|
475
|
+
this.isDropdownOpen = false
|
476
|
+
}
|
477
|
+
},
|
468
478
|
searchChange(value) {
|
469
479
|
this.textSearch = value
|
470
480
|
this.$emit('search-change', value)
|
@@ -1,137 +1,129 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
import styled from
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
-ms-flex-pack: end;
|
77
|
-
justify-content: flex-end;
|
78
|
-
-webkit-box-align: center;
|
79
|
-
-ms-flex-align: center;
|
80
|
-
align-items: center;
|
81
|
-
margin-bottom: 2px;
|
82
|
-
margin-top: 10px;
|
2
|
+
<!-- Check, if pages more than 1 -->
|
3
|
+
<paginationWrapper v-if="paginationParams.pages > 1">
|
4
|
+
<!-- Back button -->
|
5
|
+
<paginationLink
|
6
|
+
v-if="paginationParams.previous"
|
7
|
+
@click="fetchPage(paginationParams.previous)"
|
8
|
+
>
|
9
|
+
<arrowIconContainer>
|
10
|
+
<icon name="arrow_left" color="#0068de" size="12px" />
|
11
|
+
</arrowIconContainer>
|
12
|
+
<arrowText>{{ $gettext('back') }}</arrowText>
|
13
|
+
</paginationLink>
|
14
|
+
|
15
|
+
<!-- First page -->
|
16
|
+
<paginationLink
|
17
|
+
v-if="currentPage > 2 && paginationParams.pages > 3"
|
18
|
+
@click="fetchPage(1)"
|
19
|
+
>1</paginationLink
|
20
|
+
>
|
21
|
+
|
22
|
+
<!-- Back tree dots -->
|
23
|
+
<span v-if="currentPage > 3 && paginationParams.pages > 4">...</span>
|
24
|
+
|
25
|
+
<!-- Current block -->
|
26
|
+
<paginationLink
|
27
|
+
v-for="number in paginationNumbers()"
|
28
|
+
:key="number"
|
29
|
+
:class="[currentPage === number ? 'active' : '']"
|
30
|
+
@click="fetchPage(number)"
|
31
|
+
>{{ number }}</paginationLink
|
32
|
+
>
|
33
|
+
|
34
|
+
<!-- Forward tree dots -->
|
35
|
+
<span
|
36
|
+
v-if="
|
37
|
+
paginationParams.pages - currentPage > 2 && paginationParams.pages > 4
|
38
|
+
"
|
39
|
+
>...</span
|
40
|
+
>
|
41
|
+
|
42
|
+
<!-- End page -->
|
43
|
+
<paginationLink
|
44
|
+
v-if="
|
45
|
+
paginationParams.pages - currentPage > 1 && paginationParams.pages > 3
|
46
|
+
"
|
47
|
+
@click="fetchPage(paginationParams.pages)"
|
48
|
+
>{{ paginationParams.pages }}</paginationLink
|
49
|
+
>
|
50
|
+
|
51
|
+
<!-- Forward button -->
|
52
|
+
<paginationLink
|
53
|
+
v-if="paginationParams.next"
|
54
|
+
@click="fetchPage(paginationParams.next)"
|
55
|
+
>
|
56
|
+
<arrowText>{{ $gettext('forward') }}</arrowText>
|
57
|
+
<arrowIconContainer>
|
58
|
+
<icon name="arrow_right" color="#0068de" size="12px" />
|
59
|
+
</arrowIconContainer>
|
60
|
+
</paginationLink>
|
61
|
+
</paginationWrapper>
|
62
|
+
</template>
|
63
|
+
|
64
|
+
<script>
|
65
|
+
import styled from 'vue-styled-components'
|
66
|
+
import icon from '../icon'
|
67
|
+
const paginationWrapper = styled.nav`
|
68
|
+
color: #0068de;
|
69
|
+
font-size: 13px;
|
70
|
+
display: flex;
|
71
|
+
flex-wrap: wrap;
|
72
|
+
justify-content: flex-end;
|
73
|
+
align-items: center;
|
74
|
+
margin-bottom: 2px;
|
75
|
+
margin-top: 10px;
|
83
76
|
`
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
77
|
+
const paginationLink = styled.div`
|
78
|
+
display: flex;
|
79
|
+
padding: 0px 5px;
|
80
|
+
margin: 0 2px;
|
81
|
+
text-align: center;
|
82
|
+
border-radius: 3px;
|
83
|
+
white-space: nowrap;
|
84
|
+
cursor: pointer;
|
92
85
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
86
|
+
&.active {
|
87
|
+
color: #fff;
|
88
|
+
background-color: #0068de;
|
89
|
+
padding: 7px 12px;
|
90
|
+
border-radius: 4px;
|
91
|
+
}
|
92
|
+
`
|
93
|
+
const arrowText = styled.div``
|
94
|
+
const arrowIconContainer = styled.div`
|
95
|
+
margin: 0 10px;
|
96
|
+
display: flex;
|
97
|
+
align-items: center;
|
98
|
+
`
|
99
|
+
export default {
|
100
|
+
name: 'pagination-component',
|
101
|
+
components: {
|
102
|
+
paginationWrapper,
|
103
|
+
paginationLink,
|
104
|
+
icon,
|
105
|
+
arrowText,
|
106
|
+
arrowIconContainer
|
107
|
+
},
|
108
|
+
props: ['fetchPage', 'currentPage', 'paginationParams'],
|
109
|
+
methods: {
|
110
|
+
getNewProjects(num) {
|
111
|
+
this.$emit('on-pagination-change', num)
|
114
112
|
},
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
return prev
|
128
|
-
? next
|
129
|
-
? [n - 1, n, n + 1]
|
130
|
-
: [n - 2, n - 1, n]
|
131
|
-
: [n, n + 1, n + 2]
|
132
|
-
}
|
113
|
+
paginationNumbers() {
|
114
|
+
const prev = this.paginationParams.previous
|
115
|
+
const next = this.paginationParams.next
|
116
|
+
const n = prev + 1 || next - 1
|
117
|
+
if (this.paginationParams.pages === 2) {
|
118
|
+
return prev ? [n - 1, n] : [n, n + 1]
|
119
|
+
} else {
|
120
|
+
return prev
|
121
|
+
? next
|
122
|
+
? [n - 1, n, n + 1]
|
123
|
+
: [n - 2, n - 1, n]
|
124
|
+
: [n, n + 1, n + 2]
|
133
125
|
}
|
134
126
|
}
|
135
127
|
}
|
136
|
-
|
137
|
-
|
128
|
+
}
|
129
|
+
</script>
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<template>
|
2
|
-
<page-container
|
2
|
+
<page-container>
|
3
3
|
<marker-container
|
4
4
|
v-if="markerData"
|
5
|
+
:hasBorderRadius="hasBorderRadius"
|
6
|
+
:withDate="!!date"
|
5
7
|
:backgroundColor="markerData.color"
|
6
8
|
:hasIcon="!!iconName"
|
7
9
|
:isEditionAllowed="editionAllowed"
|
@@ -96,13 +98,9 @@ import DeleteIcon from '../deleteIcon'
|
|
96
98
|
import PageSubtitle from '../pageSubtitle'
|
97
99
|
import MainButton from '../buttons/mainButton'
|
98
100
|
|
99
|
-
const
|
100
|
-
withDate: Boolean
|
101
|
-
}
|
102
|
-
const PageContainer = styled('div', PageContainerAttrs)`
|
101
|
+
const PageContainer = styled.div`
|
103
102
|
display: flex;
|
104
103
|
align-items: center;
|
105
|
-
gap: 10px;
|
106
104
|
font-size: 12px;
|
107
105
|
line-height: 14px;
|
108
106
|
`
|
@@ -119,7 +117,9 @@ const CtaContainer = styled.div`
|
|
119
117
|
`
|
120
118
|
|
121
119
|
const MarkerAttrs = {
|
120
|
+
hasBorderRadius: Boolean,
|
122
121
|
backgroundColor: String,
|
122
|
+
withDate: Boolean,
|
123
123
|
hasIcon: Boolean,
|
124
124
|
isEditionAllowed: Boolean,
|
125
125
|
isActive: Boolean,
|
@@ -136,7 +136,12 @@ const MarkerContainer = styled('div', MarkerAttrs)`
|
|
136
136
|
color: ${(props) => props.theme.colors.white};
|
137
137
|
background-color: ${(props) =>
|
138
138
|
props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
|
139
|
-
|
139
|
+
<<<<<<< HEAD
|
140
|
+
border-radius: ${(props) => (props.hasBorderRadius ? '4px' : '0')};
|
141
|
+
=======
|
142
|
+
border: 1px solid ${(props) => props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
|
143
|
+
border-radius: ${(props) => props.withDate ? '4px 0 0 4px' : '4px'};
|
144
|
+
>>>>>>> origin/EPDM-9185
|
140
145
|
white-space: nowrap;
|
141
146
|
cursor: ${(props) => props.isEditionAllowed ? 'pointer' : props.cursor};
|
142
147
|
|
@@ -194,7 +199,12 @@ const IconContainer = styled.div`
|
|
194
199
|
line-height: 0;
|
195
200
|
`
|
196
201
|
|
197
|
-
const Date = styled.div
|
202
|
+
const Date = styled.div`
|
203
|
+
padding: 2px 5px;
|
204
|
+
border: 1px solid ${(props) => props.theme.colors.grey4};
|
205
|
+
border-left: none;
|
206
|
+
border-radius: 0 4px 4px 0;
|
207
|
+
`
|
198
208
|
|
199
209
|
export default {
|
200
210
|
name: "project-marker",
|
@@ -242,6 +252,10 @@ export default {
|
|
242
252
|
cursor: {
|
243
253
|
required: false,
|
244
254
|
default: 'default'
|
255
|
+
},
|
256
|
+
hasBorderRadius: {
|
257
|
+
required: false,
|
258
|
+
default: true
|
245
259
|
}
|
246
260
|
},
|
247
261
|
data() {
|
@@ -0,0 +1,264 @@
|
|
1
|
+
<template>
|
2
|
+
<page-container :isLoading="!tabsData.length">
|
3
|
+
<spinner-container v-if="!tabsData.length">
|
4
|
+
<spinner />
|
5
|
+
</spinner-container>
|
6
|
+
<list-container v-else>
|
7
|
+
<template v-for="(item, idx) in tabsData">
|
8
|
+
<list-item
|
9
|
+
v-if="!item.children"
|
10
|
+
:key="idx"
|
11
|
+
:isActive="activeTab === item.key"
|
12
|
+
@click="$emit('tab-click', { activeKey: item.key })"
|
13
|
+
>
|
14
|
+
<icon-container :isActive="activeTab === item.key">
|
15
|
+
<icon :name="item.icon" color="#fff" cursor="pointer" size="18px" />
|
16
|
+
</icon-container>
|
17
|
+
<list-text>{{ $gettext(item.label) }}</list-text>
|
18
|
+
</list-item>
|
19
|
+
<collapse-wrapper v-else :key="idx + item.key">
|
20
|
+
<collapse-container @click="toggleActiveDropdown(item.key)">
|
21
|
+
<icon-container :isActive="activeParentTab === item.key">
|
22
|
+
<icon
|
23
|
+
:name="item.icon"
|
24
|
+
color="#fff"
|
25
|
+
cursor="pointer"
|
26
|
+
size="18px"
|
27
|
+
/>
|
28
|
+
</icon-container>
|
29
|
+
<list-text>{{ $gettext(item.label) }}</list-text>
|
30
|
+
<arrow-container>
|
31
|
+
<icon
|
32
|
+
:name="activeDropdown === item.key ? 'arrow_up' : 'arrow_down'"
|
33
|
+
color="white"
|
34
|
+
size="10px"
|
35
|
+
/>
|
36
|
+
</arrow-container>
|
37
|
+
</collapse-container>
|
38
|
+
<template v-if="activeDropdown === item.key">
|
39
|
+
<sub-router
|
40
|
+
v-for="subItem in item.children"
|
41
|
+
:key="subItem.key"
|
42
|
+
:isActive="activeTab === subItem.key"
|
43
|
+
@click="
|
44
|
+
$emit('tab-click', {
|
45
|
+
activeKey: subItem.key,
|
46
|
+
parentKey: item.key
|
47
|
+
})
|
48
|
+
"
|
49
|
+
>
|
50
|
+
{{ $gettext(subItem.label) }}
|
51
|
+
</sub-router>
|
52
|
+
</template>
|
53
|
+
</collapse-wrapper>
|
54
|
+
</template>
|
55
|
+
</list-container>
|
56
|
+
<bottom-section v-if="hasLogout">
|
57
|
+
<icon-container
|
58
|
+
:isActive="false"
|
59
|
+
:isButton="true"
|
60
|
+
@click="$emit('on-logout')"
|
61
|
+
>
|
62
|
+
<rotate-icon
|
63
|
+
name="initial_situation"
|
64
|
+
color="#fff"
|
65
|
+
cursor="pointer"
|
66
|
+
size="18px"
|
67
|
+
/>
|
68
|
+
</icon-container>
|
69
|
+
<app-version>{{ appVersion }}</app-version>
|
70
|
+
</bottom-section>
|
71
|
+
</page-container>
|
72
|
+
</template>
|
73
|
+
|
74
|
+
<script>
|
75
|
+
import styled from 'vue-styled-components'
|
76
|
+
import Icon from '../icon'
|
77
|
+
import Spinner from '../spinner'
|
78
|
+
|
79
|
+
const PageAttrs = { isLoading: Boolean }
|
80
|
+
const PageContainer = styled('div', PageAttrs)`
|
81
|
+
background-color: ${(props) =>
|
82
|
+
props.isLoading ? props.theme.colors.white : props.theme.colors.grey6};
|
83
|
+
padding: 14px 12px;
|
84
|
+
min-width: 220px;
|
85
|
+
display: flex;
|
86
|
+
flex-direction: column;
|
87
|
+
justify-content: space-between;
|
88
|
+
`
|
89
|
+
|
90
|
+
const ListContainer = styled.div`
|
91
|
+
display: grid;
|
92
|
+
grid-gap: 6px;
|
93
|
+
`
|
94
|
+
|
95
|
+
const IconAttrs = { isActive: Boolean, isButton: Boolean }
|
96
|
+
|
97
|
+
const ListItem = styled('div', IconAttrs)`
|
98
|
+
display: grid;
|
99
|
+
align-items: center;
|
100
|
+
grid-template-columns: auto 1fr;
|
101
|
+
grid-gap: 20px;
|
102
|
+
cursor: pointer;
|
103
|
+
padding: 4px;
|
104
|
+
border-radius: 6px;
|
105
|
+
background-color: ${(props) =>
|
106
|
+
props.isActive ? 'rgba(255, 255, 255, 0.1)' : ''};
|
107
|
+
|
108
|
+
:hover {
|
109
|
+
background-color: rgba(255, 255, 255, 0.1);
|
110
|
+
}
|
111
|
+
`
|
112
|
+
|
113
|
+
const ListText = styled.div`
|
114
|
+
font-size: 16px;
|
115
|
+
font-weight: 700;
|
116
|
+
color: ${(props) => props.theme.colors.white};
|
117
|
+
`
|
118
|
+
|
119
|
+
const IconContainer = styled('div', IconAttrs)`
|
120
|
+
display: grid;
|
121
|
+
align-items: center;
|
122
|
+
justify-items: center;
|
123
|
+
width: 32px;
|
124
|
+
height: 32px;
|
125
|
+
background-color: ${(props) =>
|
126
|
+
props.isActive ? props.theme.colors.red : 'rgba(255, 255, 255, 0.2)'};
|
127
|
+
border-radius: 6px;
|
128
|
+
|
129
|
+
${({ isButton = false }) =>
|
130
|
+
isButton &&
|
131
|
+
`
|
132
|
+
cursor: pointer;
|
133
|
+
&:hover {
|
134
|
+
background-color: rgba(255, 255, 255, 0.3);
|
135
|
+
}
|
136
|
+
`}
|
137
|
+
`
|
138
|
+
|
139
|
+
const SpinnerContainer = styled.div`
|
140
|
+
margin-top: 30px;
|
141
|
+
`
|
142
|
+
|
143
|
+
const BottomSection = styled.div`
|
144
|
+
display: flex;
|
145
|
+
justify-content: space-between;
|
146
|
+
align-items: center;
|
147
|
+
`
|
148
|
+
|
149
|
+
const RotateIcon = styled(Icon)`
|
150
|
+
transform: rotate(-90deg);
|
151
|
+
`
|
152
|
+
|
153
|
+
const AppVersion = styled.p`
|
154
|
+
font-size: 11px;
|
155
|
+
line-height: 13px;
|
156
|
+
color: ${(props) => props.theme.colors.white};
|
157
|
+
margin-right: 6px;
|
158
|
+
`
|
159
|
+
|
160
|
+
const SubRouter = styled('div', IconAttrs)`
|
161
|
+
display: grid;
|
162
|
+
grid-template-columns: 1fr;
|
163
|
+
grid-gap: 10px;
|
164
|
+
align-items: center;
|
165
|
+
justify-items: flex-start;
|
166
|
+
cursor: pointer;
|
167
|
+
margin-left: 65px;
|
168
|
+
padding: 8px;
|
169
|
+
border-radius: 6px;
|
170
|
+
color: ${(props) => props.theme.colors.white};
|
171
|
+
font-weight: 700;
|
172
|
+
${({ isActive }) =>
|
173
|
+
isActive &&
|
174
|
+
`
|
175
|
+
background: rgba(255, 255, 255, 0.1);
|
176
|
+
`}
|
177
|
+
|
178
|
+
&:hover {
|
179
|
+
background: rgba(255, 255, 255, 0.1);
|
180
|
+
}
|
181
|
+
`
|
182
|
+
|
183
|
+
const CollapseContainer = styled.div`
|
184
|
+
display: grid;
|
185
|
+
grid-template-columns: auto 1fr auto;
|
186
|
+
grid-gap: 20px;
|
187
|
+
padding: 4px;
|
188
|
+
border-radius: 6px;
|
189
|
+
align-items: center;
|
190
|
+
cursor: pointer;
|
191
|
+
&:hover {
|
192
|
+
background: rgba(255, 255, 255, 0.1);
|
193
|
+
}
|
194
|
+
`
|
195
|
+
|
196
|
+
const CollapseWrapper = styled.div`
|
197
|
+
display: grid;
|
198
|
+
grid-template-columns: 1fr;
|
199
|
+
grid-gap: 10px;
|
200
|
+
user-select: none;
|
201
|
+
margin-bottom: 2px;
|
202
|
+
`
|
203
|
+
|
204
|
+
const ArrowContainer = styled.div`
|
205
|
+
padding-bottom: 5px;
|
206
|
+
`
|
207
|
+
|
208
|
+
export default {
|
209
|
+
name: 'SideMenu',
|
210
|
+
components: {
|
211
|
+
PageContainer,
|
212
|
+
ListContainer,
|
213
|
+
ListItem,
|
214
|
+
ListText,
|
215
|
+
Icon,
|
216
|
+
IconContainer,
|
217
|
+
Spinner,
|
218
|
+
SpinnerContainer,
|
219
|
+
BottomSection,
|
220
|
+
RotateIcon,
|
221
|
+
AppVersion,
|
222
|
+
CollapseWrapper,
|
223
|
+
CollapseContainer,
|
224
|
+
SubRouter,
|
225
|
+
ArrowContainer
|
226
|
+
},
|
227
|
+
data() {
|
228
|
+
return {
|
229
|
+
activeDropdown: null
|
230
|
+
}
|
231
|
+
},
|
232
|
+
mounted() {
|
233
|
+
this.activeDropdown = this.activeParentTab
|
234
|
+
},
|
235
|
+
props: {
|
236
|
+
tabsData: {
|
237
|
+
required: true
|
238
|
+
},
|
239
|
+
activeTab: {
|
240
|
+
required: true
|
241
|
+
},
|
242
|
+
activeParentTab: {
|
243
|
+
required: false
|
244
|
+
},
|
245
|
+
hasLogout: {
|
246
|
+
required: false,
|
247
|
+
default: true
|
248
|
+
},
|
249
|
+
appVersion: {
|
250
|
+
required: false,
|
251
|
+
type: String
|
252
|
+
}
|
253
|
+
},
|
254
|
+
methods: {
|
255
|
+
toggleActiveDropdown(value) {
|
256
|
+
if (this.activeDropdown === value) {
|
257
|
+
this.activeDropdown = null
|
258
|
+
} else {
|
259
|
+
this.activeDropdown = value
|
260
|
+
}
|
261
|
+
}
|
262
|
+
}
|
263
|
+
}
|
264
|
+
</script>
|
@@ -331,7 +331,7 @@ export default {
|
|
331
331
|
},
|
332
332
|
findRelativeParent(element) {
|
333
333
|
while (element.parentElement) {
|
334
|
-
if (window.getComputedStyle(element.parentElement).position === 'relative') {
|
334
|
+
if (window.getComputedStyle(element.parentElement).position === 'relative' || window.getComputedStyle(element.parentElement).position === 'absolute') {
|
335
335
|
return element.parentElement
|
336
336
|
}
|
337
337
|
element = element.parentElement
|