@eturnity/eturnity_reusable_components 6.43.9-EPDM-6226.0 → 6.43.9-EPDM-6751.1
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 +2 -2
- 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 +2 -2
- package/src/components/iconWrapper/index.vue +5 -4
- package/src/components/projectMarker/index.vue +7 -1
- package/src/components/sideMenu/index.vue +262 -0
- package/src/components/tableDropdown/index.vue +2 -7
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "6.43.9-EPDM-
|
3
|
+
"version": "6.43.9-EPDM-6751.1",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
@@ -63,4 +63,4 @@
|
|
63
63
|
"author": "Aaron Enser",
|
64
64
|
"license": "ISC",
|
65
65
|
"homepage": "https://bitbucket.org/eturnitydevs/eturnity_reusable_components#readme"
|
66
|
-
}
|
66
|
+
}
|
@@ -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>
|
@@ -338,7 +338,7 @@ const DragContainer = styled.div`
|
|
338
338
|
|
339
339
|
const RowContainer = styled('div', TitleAttrs)`
|
340
340
|
padding: 10px 14px;
|
341
|
-
width: 300px;
|
341
|
+
min-width: 300px;
|
342
342
|
|
343
343
|
${({ showBorder, theme }) =>
|
344
344
|
showBorder &&
|
@@ -613,7 +613,7 @@ export default {
|
|
613
613
|
return type === 'multi_select_integer' || type === 'multi_select_string'
|
614
614
|
},
|
615
615
|
isRangeSelector(type) {
|
616
|
-
return type === 'integer_range'
|
616
|
+
return type === 'integer_range' || type === 'number_range'
|
617
617
|
},
|
618
618
|
isDateSelector(type) {
|
619
619
|
return type === 'datetime'
|
@@ -2,6 +2,7 @@
|
|
2
2
|
<page-container :withDate="!!date">
|
3
3
|
<marker-container
|
4
4
|
v-if="markerData"
|
5
|
+
:hasBorderRadius="hasBorderRadius"
|
5
6
|
:backgroundColor="markerData.color"
|
6
7
|
:hasIcon="!!iconName"
|
7
8
|
:isEditionAllowed="editionAllowed"
|
@@ -119,6 +120,7 @@ const CtaContainer = styled.div`
|
|
119
120
|
`
|
120
121
|
|
121
122
|
const MarkerAttrs = {
|
123
|
+
hasBorderRadius: Boolean,
|
122
124
|
backgroundColor: String,
|
123
125
|
hasIcon: Boolean,
|
124
126
|
isEditionAllowed: Boolean,
|
@@ -136,7 +138,7 @@ const MarkerContainer = styled('div', MarkerAttrs)`
|
|
136
138
|
color: ${(props) => props.theme.colors.white};
|
137
139
|
background-color: ${(props) =>
|
138
140
|
props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
|
139
|
-
border-radius: 4px;
|
141
|
+
border-radius: ${(props) => (props.hasBorderRadius ? '4px' : '0')};
|
140
142
|
white-space: nowrap;
|
141
143
|
cursor: ${(props) => props.isEditionAllowed ? 'pointer' : props.cursor};
|
142
144
|
|
@@ -242,6 +244,10 @@ export default {
|
|
242
244
|
cursor: {
|
243
245
|
required: false,
|
244
246
|
default: 'default'
|
247
|
+
},
|
248
|
+
hasBorderRadius: {
|
249
|
+
required: false,
|
250
|
+
default: true
|
245
251
|
}
|
246
252
|
},
|
247
253
|
data() {
|
@@ -0,0 +1,262 @@
|
|
1
|
+
<template>
|
2
|
+
<page-container>
|
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 PageContainer = styled.div`
|
80
|
+
background-color: ${(props) => props.theme.colors.grey6};
|
81
|
+
padding: 14px 12px;
|
82
|
+
min-width: 220px;
|
83
|
+
display: flex;
|
84
|
+
flex-direction: column;
|
85
|
+
justify-content: space-between;
|
86
|
+
`
|
87
|
+
|
88
|
+
const ListContainer = styled.div`
|
89
|
+
display: grid;
|
90
|
+
grid-gap: 6px;
|
91
|
+
`
|
92
|
+
|
93
|
+
const IconAttrs = { isActive: Boolean, isButton: Boolean }
|
94
|
+
|
95
|
+
const ListItem = styled('div', IconAttrs)`
|
96
|
+
display: grid;
|
97
|
+
align-items: center;
|
98
|
+
grid-template-columns: auto 1fr;
|
99
|
+
grid-gap: 20px;
|
100
|
+
cursor: pointer;
|
101
|
+
padding: 4px;
|
102
|
+
border-radius: 6px;
|
103
|
+
background-color: ${(props) =>
|
104
|
+
props.isActive ? 'rgba(255, 255, 255, 0.1)' : ''};
|
105
|
+
|
106
|
+
:hover {
|
107
|
+
background-color: rgba(255, 255, 255, 0.1);
|
108
|
+
}
|
109
|
+
`
|
110
|
+
|
111
|
+
const ListText = styled.div`
|
112
|
+
font-size: 16px;
|
113
|
+
font-weight: 700;
|
114
|
+
color: ${(props) => props.theme.colors.white};
|
115
|
+
`
|
116
|
+
|
117
|
+
const IconContainer = styled('div', IconAttrs)`
|
118
|
+
display: grid;
|
119
|
+
align-items: center;
|
120
|
+
justify-items: center;
|
121
|
+
width: 32px;
|
122
|
+
height: 32px;
|
123
|
+
background-color: ${(props) =>
|
124
|
+
props.isActive ? props.theme.colors.red : 'rgba(255, 255, 255, 0.2)'};
|
125
|
+
border-radius: 6px;
|
126
|
+
|
127
|
+
${({ isButton = false }) =>
|
128
|
+
isButton &&
|
129
|
+
`
|
130
|
+
cursor: pointer;
|
131
|
+
&:hover {
|
132
|
+
background-color: rgba(255, 255, 255, 0.3);
|
133
|
+
}
|
134
|
+
`}
|
135
|
+
`
|
136
|
+
|
137
|
+
const SpinnerContainer = styled.div`
|
138
|
+
margin-top: 30px;
|
139
|
+
`
|
140
|
+
|
141
|
+
const BottomSection = styled.div`
|
142
|
+
display: flex;
|
143
|
+
justify-content: space-between;
|
144
|
+
align-items: center;
|
145
|
+
`
|
146
|
+
|
147
|
+
const RotateIcon = styled(Icon)`
|
148
|
+
transform: rotate(-90deg);
|
149
|
+
`
|
150
|
+
|
151
|
+
const AppVersion = styled.p`
|
152
|
+
font-size: 11px;
|
153
|
+
line-height: 13px;
|
154
|
+
color: ${(props) => props.theme.colors.white};
|
155
|
+
margin-right: 6px;
|
156
|
+
`
|
157
|
+
|
158
|
+
const SubRouter = styled('div', IconAttrs)`
|
159
|
+
display: grid;
|
160
|
+
grid-template-columns: 1fr;
|
161
|
+
grid-gap: 10px;
|
162
|
+
align-items: center;
|
163
|
+
justify-items: flex-start;
|
164
|
+
cursor: pointer;
|
165
|
+
margin-left: 65px;
|
166
|
+
padding: 8px;
|
167
|
+
border-radius: 6px;
|
168
|
+
color: ${(props) => props.theme.colors.white};
|
169
|
+
font-weight: 700;
|
170
|
+
${({ isActive }) =>
|
171
|
+
isActive &&
|
172
|
+
`
|
173
|
+
background: rgba(255, 255, 255, 0.1);
|
174
|
+
`}
|
175
|
+
|
176
|
+
&:hover {
|
177
|
+
background: rgba(255, 255, 255, 0.1);
|
178
|
+
}
|
179
|
+
`
|
180
|
+
|
181
|
+
const CollapseContainer = styled.div`
|
182
|
+
display: grid;
|
183
|
+
grid-template-columns: auto 1fr auto;
|
184
|
+
grid-gap: 20px;
|
185
|
+
padding: 4px;
|
186
|
+
border-radius: 6px;
|
187
|
+
align-items: center;
|
188
|
+
cursor: pointer;
|
189
|
+
&:hover {
|
190
|
+
background: rgba(255, 255, 255, 0.1);
|
191
|
+
}
|
192
|
+
`
|
193
|
+
|
194
|
+
const CollapseWrapper = styled.div`
|
195
|
+
display: grid;
|
196
|
+
grid-template-columns: 1fr;
|
197
|
+
grid-gap: 10px;
|
198
|
+
user-select: none;
|
199
|
+
margin-bottom: 2px;
|
200
|
+
`
|
201
|
+
|
202
|
+
const ArrowContainer = styled.div`
|
203
|
+
padding-bottom: 5px;
|
204
|
+
`
|
205
|
+
|
206
|
+
export default {
|
207
|
+
name: 'SideMenu',
|
208
|
+
components: {
|
209
|
+
PageContainer,
|
210
|
+
ListContainer,
|
211
|
+
ListItem,
|
212
|
+
ListText,
|
213
|
+
Icon,
|
214
|
+
IconContainer,
|
215
|
+
Spinner,
|
216
|
+
SpinnerContainer,
|
217
|
+
BottomSection,
|
218
|
+
RotateIcon,
|
219
|
+
AppVersion,
|
220
|
+
CollapseWrapper,
|
221
|
+
CollapseContainer,
|
222
|
+
SubRouter,
|
223
|
+
ArrowContainer
|
224
|
+
},
|
225
|
+
data() {
|
226
|
+
return {
|
227
|
+
activeDropdown: null
|
228
|
+
}
|
229
|
+
},
|
230
|
+
mounted() {
|
231
|
+
this.activeDropdown = this.activeParentTab
|
232
|
+
},
|
233
|
+
props: {
|
234
|
+
tabsData: {
|
235
|
+
required: true
|
236
|
+
},
|
237
|
+
activeTab: {
|
238
|
+
required: true
|
239
|
+
},
|
240
|
+
activeParentTab: {
|
241
|
+
required: false
|
242
|
+
},
|
243
|
+
hasLogout: {
|
244
|
+
required: false,
|
245
|
+
default: true
|
246
|
+
},
|
247
|
+
appVersion: {
|
248
|
+
required: false,
|
249
|
+
type: String
|
250
|
+
}
|
251
|
+
},
|
252
|
+
methods: {
|
253
|
+
toggleActiveDropdown(value) {
|
254
|
+
if (this.activeDropdown === value) {
|
255
|
+
this.activeDropdown = null
|
256
|
+
} else {
|
257
|
+
this.activeDropdown = value
|
258
|
+
}
|
259
|
+
}
|
260
|
+
}
|
261
|
+
}
|
262
|
+
</script>
|
@@ -510,13 +510,8 @@ export default {
|
|
510
510
|
}
|
511
511
|
},
|
512
512
|
methods: {
|
513
|
-
toggleOpen(
|
514
|
-
if (
|
515
|
-
this.isDisabled ||
|
516
|
-
(event &&
|
517
|
-
!(event.target === this.$el) &&
|
518
|
-
!this.$el.contains(event.target))
|
519
|
-
) {
|
513
|
+
toggleOpen() {
|
514
|
+
if (this.disabled) {
|
520
515
|
return
|
521
516
|
}
|
522
517
|
this.wasClicked = false
|