@eturnity/eturnity_reusable_components 6.46.5 → 6.48.0-EPDM-9012.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 +3 -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 +14 -9
- package/src/components/iconWrapper/index.vue +5 -4
- package/src/components/infoText/index.vue +1 -12
- package/src/components/inputs/inputNumber/InputNumber.stories.js +1 -3
- package/src/components/inputs/inputNumber/index.vue +10 -9
- package/src/components/inputs/inputText/InputText.stories.js +0 -1
- package/src/components/inputs/inputText/index.vue +18 -9
- package/src/components/inputs/searchInput/index.vue +6 -0
- package/src/components/inputs/select/index.vue +27 -15
- package/src/components/inputs/switchField/index.vue +0 -9
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +0 -8
- package/src/components/inputs/textAreaInput/index.vue +12 -7
- package/src/components/inputs/toggle/index.vue +1 -11
- package/src/components/pageSubtitle/index.vue +1 -8
- package/src/components/pageTitle/index.vue +28 -4
- 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
@@ -4,11 +4,8 @@
|
|
4
4
|
{{ text }}
|
5
5
|
</span>
|
6
6
|
<info-text
|
7
|
-
:text="infoText"
|
8
7
|
v-if="!!infoText"
|
9
|
-
|
10
|
-
borderColor="#ccc"
|
11
|
-
:alignText="alignInfoText"
|
8
|
+
:text="infoText"
|
12
9
|
/>
|
13
10
|
</subtitle-text>
|
14
11
|
</template>
|
@@ -55,10 +52,6 @@ export default {
|
|
55
52
|
required: false,
|
56
53
|
default: null,
|
57
54
|
},
|
58
|
-
alignInfoText: {
|
59
|
-
required: false,
|
60
|
-
default: "left",
|
61
|
-
},
|
62
55
|
marginBottom: {
|
63
56
|
required: false,
|
64
57
|
default: "30px",
|
@@ -1,5 +1,13 @@
|
|
1
1
|
<template>
|
2
|
-
<title-
|
2
|
+
<title-wrap :hasInfoText="!!infoText">
|
3
|
+
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
|
4
|
+
{{ text }}
|
5
|
+
</title-text>
|
6
|
+
<info-text
|
7
|
+
v-if="!!infoText"
|
8
|
+
:text="infoText"
|
9
|
+
/>
|
10
|
+
</title-wrap>
|
3
11
|
</template>
|
4
12
|
|
5
13
|
<script>
|
@@ -10,25 +18,41 @@
|
|
10
18
|
// color="red"
|
11
19
|
// />
|
12
20
|
import styled from "vue-styled-components"
|
21
|
+
import InfoText from "../infoText"
|
13
22
|
|
14
|
-
const
|
15
|
-
const
|
23
|
+
const wrapAttrs = { hasInfoText: Boolean }
|
24
|
+
const TitleWrap = styled("div", wrapAttrs)`
|
25
|
+
display: grid;
|
26
|
+
align-items: center;
|
27
|
+
grid-gap: 12px;
|
28
|
+
grid-template-columns: ${(props) =>
|
29
|
+
props.hasInfoText ? "auto auto 1fr" : "1fr"};
|
30
|
+
margin-bottom: 20px;
|
31
|
+
`
|
32
|
+
|
33
|
+
const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
34
|
+
const TitleText = styled('span', titleAttrs)`
|
16
35
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
17
36
|
font-weight: bold;
|
18
37
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
19
38
|
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
20
|
-
margin-bottom: 20px;
|
21
39
|
`
|
22
40
|
|
23
41
|
export default {
|
24
42
|
name: "page-title",
|
25
43
|
components: {
|
26
44
|
TitleText,
|
45
|
+
TitleWrap,
|
46
|
+
InfoText
|
27
47
|
},
|
28
48
|
props: {
|
29
49
|
text: {
|
30
50
|
required: true,
|
31
51
|
},
|
52
|
+
infoText: {
|
53
|
+
required: false,
|
54
|
+
default: null,
|
55
|
+
},
|
32
56
|
color: {
|
33
57
|
required: false,
|
34
58
|
},
|
@@ -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
|