@eturnity/eturnity_reusable_components 6.46.5 → 6.48.0-EPDM-7260.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 +14 -9
- package/src/components/iconWrapper/index.vue +5 -4
- package/src/components/inputs/inputNumber/index.vue +10 -1
- package/src/components/inputs/inputText/index.vue +18 -3
- package/src/components/inputs/searchInput/index.vue +6 -0
- package/src/components/inputs/select/index.vue +27 -10
- package/src/components/inputs/textAreaInput/index.vue +12 -1
- package/src/components/pagination/index.vue +122 -130
- package/src/components/projectMarker/index.vue +22 -8
- package/src/components/selectedOptions/index.vue +130 -0
- 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>
|
@@ -40,7 +40,10 @@
|
|
40
40
|
v-for="(item, idx) in filterData"
|
41
41
|
:key="idx + '_filterdata'"
|
42
42
|
>
|
43
|
-
<column-title
|
43
|
+
<column-title
|
44
|
+
:showBorder="idx + 1 !== filterData.length"
|
45
|
+
:data-id="`filter_label_project_view_file_manager_${item.type}`"
|
46
|
+
>
|
44
47
|
{{ item.columnName }}
|
45
48
|
</column-title>
|
46
49
|
<row-container v-if="item.type === 'columns'">
|
@@ -88,13 +91,12 @@
|
|
88
91
|
selectHeight="36px"
|
89
92
|
fontSize="13px"
|
90
93
|
:label="filter.label"
|
94
|
+
:labelDataId="filter.dataId"
|
91
95
|
alignItems="vertical"
|
92
96
|
:disabled="!filter.choices.length"
|
93
97
|
>
|
94
98
|
<template #selector>
|
95
|
-
<option-title>
|
96
|
-
{{ filter.selectedText }}
|
97
|
-
</option-title>
|
99
|
+
<option-title> {{ filter.selectedText }} </option-title>
|
98
100
|
</template>
|
99
101
|
<template #dropdown>
|
100
102
|
<dropdown-checkbox-container @click.stop>
|
@@ -117,7 +119,7 @@
|
|
117
119
|
</template>
|
118
120
|
</select-component>
|
119
121
|
<section-container v-else-if="isRangeSelector(filter.filter_type)">
|
120
|
-
<row-label>{{ filter.label }}</row-label>
|
122
|
+
<row-label :data-id="filter.dataId">{{ filter.label }}</row-label>
|
121
123
|
<grid-container>
|
122
124
|
<input-number
|
123
125
|
:placeholder="
|
@@ -125,7 +127,7 @@
|
|
125
127
|
? $gettext('min') + ' (' + filter.unit + ')'
|
126
128
|
: $gettext('min')
|
127
129
|
"
|
128
|
-
:numberPrecision="2"
|
130
|
+
:numberPrecision="isIntegerRange(filter.filter_type) ? 0 : 2"
|
129
131
|
:value="filter.range.start"
|
130
132
|
@input-change="
|
131
133
|
onChange({
|
@@ -145,7 +147,7 @@
|
|
145
147
|
? $gettext('max') + ' (' + filter.unit + ')'
|
146
148
|
: $gettext('max')
|
147
149
|
"
|
148
|
-
:numberPrecision="2"
|
150
|
+
:numberPrecision="isIntegerRange(filter.filter_type) ? 0 : 2"
|
149
151
|
:value="filter.range.end"
|
150
152
|
@input-change="
|
151
153
|
onChange({
|
@@ -165,7 +167,7 @@
|
|
165
167
|
v-else-if="isDateSelector(filter.filter_type)"
|
166
168
|
@click.stop
|
167
169
|
>
|
168
|
-
<row-label>{{ filter.label }}</row-label>
|
170
|
+
<row-label :data-id="filter.dataId">{{ filter.label }}</row-label>
|
169
171
|
<grid-container>
|
170
172
|
<date-picker-input
|
171
173
|
:placeholder="$gettext('Date from')"
|
@@ -338,7 +340,7 @@ const DragContainer = styled.div`
|
|
338
340
|
|
339
341
|
const RowContainer = styled('div', TitleAttrs)`
|
340
342
|
padding: 10px 14px;
|
341
|
-
width: 300px;
|
343
|
+
min-width: 300px;
|
342
344
|
|
343
345
|
${({ showBorder, theme }) =>
|
344
346
|
showBorder &&
|
@@ -613,6 +615,9 @@ export default {
|
|
613
615
|
return type === 'multi_select_integer' || type === 'multi_select_string'
|
614
616
|
},
|
615
617
|
isRangeSelector(type) {
|
618
|
+
return type === 'integer_range' || type === 'number_range'
|
619
|
+
},
|
620
|
+
isIntegerRange(type) {
|
616
621
|
return type === 'integer_range'
|
617
622
|
},
|
618
623
|
isDateSelector(type) {
|
@@ -13,7 +13,7 @@
|
|
13
13
|
</label-slot-wrapper>
|
14
14
|
|
15
15
|
<label-wrapper v-if="labelText">
|
16
|
-
<label-text :labelFontColor="labelFontColor">
|
16
|
+
<label-text :labelFontColor="labelFontColor" :data-id="labelDataId">
|
17
17
|
{{ labelText }}
|
18
18
|
</label-text>
|
19
19
|
<info-text
|
@@ -53,6 +53,7 @@
|
|
53
53
|
:hasLabelSlot="hasLabelSlot"
|
54
54
|
:slotSize="slotSize"
|
55
55
|
:showLinearUnitName="showLinearUnitName"
|
56
|
+
:data-id="inputDataId"
|
56
57
|
/>
|
57
58
|
<slot-container v-if="hasSlot" :slotSize="slotSize" :isError="isError">
|
58
59
|
<slot></slot>
|
@@ -437,6 +438,14 @@ export default {
|
|
437
438
|
focus: {
|
438
439
|
required: false,
|
439
440
|
default: false
|
441
|
+
},
|
442
|
+
labelDataId: {
|
443
|
+
required: false,
|
444
|
+
default: ''
|
445
|
+
},
|
446
|
+
inputDataId: {
|
447
|
+
required: false,
|
448
|
+
default: ''
|
440
449
|
}
|
441
450
|
},
|
442
451
|
computed: {
|
@@ -5,9 +5,15 @@
|
|
5
5
|
:alignItems="alignItems"
|
6
6
|
>
|
7
7
|
<label-wrapper v-if="label">
|
8
|
-
<input-label
|
9
|
-
|
10
|
-
|
8
|
+
<input-label
|
9
|
+
:labelFontColor="labelFontColor"
|
10
|
+
:fontSize="fontSize"
|
11
|
+
:dataId="labelDataId"
|
12
|
+
>{{ label }}
|
13
|
+
<optionalLabel v-if="labelOptional"
|
14
|
+
>({{ $gettext('Optional') }})</optionalLabel
|
15
|
+
></input-label
|
16
|
+
>
|
11
17
|
<info-text
|
12
18
|
v-if="infoTextMessage"
|
13
19
|
:text="infoTextMessage"
|
@@ -38,6 +44,7 @@
|
|
38
44
|
:hasFocus="hasFocus"
|
39
45
|
:backgroundColor="backgroundColor"
|
40
46
|
:disabledBackgroundColor="disabledBackgroundColor"
|
47
|
+
:dataId="inputDataId"
|
41
48
|
/>
|
42
49
|
<icon-wrapper
|
43
50
|
v-if="inputType === 'password' && !isError"
|
@@ -310,6 +317,14 @@ export default {
|
|
310
317
|
},
|
311
318
|
borderColor: {
|
312
319
|
required: false
|
320
|
+
},
|
321
|
+
labelDataId: {
|
322
|
+
required: false,
|
323
|
+
default: ''
|
324
|
+
},
|
325
|
+
inputDataId: {
|
326
|
+
required: false,
|
327
|
+
default: ''
|
313
328
|
}
|
314
329
|
},
|
315
330
|
methods: {
|
@@ -11,6 +11,7 @@
|
|
11
11
|
:inputWidth="inputWidth"
|
12
12
|
:isFilter="isFilter"
|
13
13
|
:hasFocus="hasFocus"
|
14
|
+
:dataId="dataId"
|
14
15
|
/>
|
15
16
|
<img
|
16
17
|
class="search-icn"
|
@@ -30,6 +31,7 @@
|
|
30
31
|
// inputWidth="250px"
|
31
32
|
// @on-change="function($event)"
|
32
33
|
// :isFilter="true" // to set the height at 30px
|
34
|
+
// dataId="test-data-id"
|
33
35
|
// />
|
34
36
|
import styled from 'vue-styled-components'
|
35
37
|
|
@@ -104,6 +106,10 @@ export default {
|
|
104
106
|
hasFocus: {
|
105
107
|
required: false,
|
106
108
|
default: false
|
109
|
+
},
|
110
|
+
dataId: {
|
111
|
+
required: false,
|
112
|
+
default: ''
|
107
113
|
}
|
108
114
|
},
|
109
115
|
methods: {
|
@@ -8,7 +8,7 @@
|
|
8
8
|
:hasLabel="!!label && label.length > 0"
|
9
9
|
:alignItems="alignItems"
|
10
10
|
>
|
11
|
-
<label-wrapper v-if="label">
|
11
|
+
<label-wrapper v-if="label" :data-id="labelDataId">
|
12
12
|
<input-label
|
13
13
|
:fontColor="
|
14
14
|
labelFontColor || colorMode == 'dark' ? 'white' : 'eturnityGrey'
|
@@ -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>
|
@@ -121,6 +122,7 @@
|
|
121
122
|
// optionWidth="50%"
|
122
123
|
// label="that is a label"
|
123
124
|
// alignItems="vertical"
|
125
|
+
// label-data-id="test-data-id"
|
124
126
|
// >
|
125
127
|
// <template #selector="{selectedValue}">
|
126
128
|
// value selected: {{selectedValue}}
|
@@ -304,6 +306,10 @@ export default {
|
|
304
306
|
required: false,
|
305
307
|
default: false
|
306
308
|
},
|
309
|
+
labelDataId: {
|
310
|
+
required: false,
|
311
|
+
default: ''
|
312
|
+
},
|
307
313
|
infoTextMessage: {
|
308
314
|
required: false
|
309
315
|
},
|
@@ -335,6 +341,10 @@ export default {
|
|
335
341
|
required: false,
|
336
342
|
default: false
|
337
343
|
},
|
344
|
+
dropdownAutoClose: {
|
345
|
+
required: false,
|
346
|
+
default: false
|
347
|
+
},
|
338
348
|
alignItems: {
|
339
349
|
required: false,
|
340
350
|
default: 'horizontal'
|
@@ -408,7 +418,7 @@ export default {
|
|
408
418
|
isActive: false,
|
409
419
|
textSearch: '',
|
410
420
|
hoveredIndex: 0,
|
411
|
-
hoveredValue:null,
|
421
|
+
hoveredValue: null,
|
412
422
|
isClickOutsideActive: false
|
413
423
|
}
|
414
424
|
},
|
@@ -447,7 +457,7 @@ export default {
|
|
447
457
|
this.$emit('input-change', e)
|
448
458
|
},
|
449
459
|
optionHovered(e) {
|
450
|
-
this.hoveredValue=e
|
460
|
+
this.hoveredValue = e
|
451
461
|
},
|
452
462
|
mouseEnterHandler() {
|
453
463
|
if (this.hoverDropdown) {
|
@@ -460,6 +470,11 @@ export default {
|
|
460
470
|
this.blur()
|
461
471
|
}
|
462
472
|
},
|
473
|
+
optionLeave() {
|
474
|
+
if(this.dropdownAutoClose) {
|
475
|
+
this.isDropdownOpen = false
|
476
|
+
}
|
477
|
+
},
|
463
478
|
searchChange(value) {
|
464
479
|
this.textSearch = value
|
465
480
|
this.$emit('search-change', value)
|
@@ -502,14 +517,16 @@ export default {
|
|
502
517
|
},
|
503
518
|
onArrowPress(dir) {
|
504
519
|
let newHoveredElem
|
505
|
-
const currentHoveredElem=this.$refs.dropdown.$el.querySelector(
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
newHoveredElem=currentHoveredElem.
|
520
|
+
const currentHoveredElem = this.$refs.dropdown.$el.querySelector(
|
521
|
+
`[data-value="${this.hoveredValue}"]`
|
522
|
+
)
|
523
|
+
if (currentHoveredElem) {
|
524
|
+
if (dir > 0) {
|
525
|
+
newHoveredElem = currentHoveredElem.nextElementSibling
|
526
|
+
} else {
|
527
|
+
newHoveredElem = currentHoveredElem.previousElementSibling
|
511
528
|
}
|
512
|
-
if(newHoveredElem){
|
529
|
+
if (newHoveredElem) {
|
513
530
|
this.hoveredValue = newHoveredElem.getAttribute('data-value')
|
514
531
|
const topPos = newHoveredElem.offsetTop
|
515
532
|
this.$refs.dropdown.$el.scrollTop = topPos
|
@@ -5,7 +5,9 @@
|
|
5
5
|
:hasLabel="label && label.length > 0"
|
6
6
|
>
|
7
7
|
<label-wrapper v-if="label">
|
8
|
-
<input-label :fontSize="fontSize">{{
|
8
|
+
<input-label :fontSize="fontSize" :data-id="labelDataId">{{
|
9
|
+
label
|
10
|
+
}}</input-label>
|
9
11
|
<info-text
|
10
12
|
v-if="infoTextMessage"
|
11
13
|
:text="infoTextMessage"
|
@@ -27,6 +29,7 @@
|
|
27
29
|
:disabled="isDisabled"
|
28
30
|
@input="onChangeHandler"
|
29
31
|
:resize="resize"
|
32
|
+
:data-id="inputDataId"
|
30
33
|
/>
|
31
34
|
</input-container>
|
32
35
|
</input-wrapper>
|
@@ -181,6 +184,14 @@ export default {
|
|
181
184
|
resize: {
|
182
185
|
required: false,
|
183
186
|
default: 'none'
|
187
|
+
},
|
188
|
+
labelDataId: {
|
189
|
+
required: false,
|
190
|
+
default: ''
|
191
|
+
},
|
192
|
+
inputDataId: {
|
193
|
+
required: false,
|
194
|
+
default: ''
|
184
195
|
}
|
185
196
|
},
|
186
197
|
methods: {
|
@@ -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,130 @@
|
|
1
|
+
<template>
|
2
|
+
<page-container>
|
3
|
+
<box-container>
|
4
|
+
<selected-container
|
5
|
+
>{{ numberSelected }} {{ $gettext('selected') }}</selected-container
|
6
|
+
>
|
7
|
+
<list-container>
|
8
|
+
<list-item
|
9
|
+
v-for="item in optionsList"
|
10
|
+
:key="item.type"
|
11
|
+
:hoverColor="item.hoverColor"
|
12
|
+
@click="$emit('on-' + item.type)"
|
13
|
+
>
|
14
|
+
{{ item.name }}
|
15
|
+
</list-item>
|
16
|
+
</list-container>
|
17
|
+
<icon-container @click="$emit('on-close')">
|
18
|
+
<icon
|
19
|
+
name="close_for_modals,_tool_tips"
|
20
|
+
color="white"
|
21
|
+
size="14px"
|
22
|
+
cursor="pointer"
|
23
|
+
/>
|
24
|
+
</icon-container>
|
25
|
+
</box-container>
|
26
|
+
</page-container>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<script>
|
30
|
+
// import SelectedOptions from "@eturnity/eturnity_reusable_components/src/components/selectedOptions"
|
31
|
+
// optionsList = [
|
32
|
+
// {
|
33
|
+
// type: 'export',
|
34
|
+
// name: 'Export'
|
35
|
+
// },
|
36
|
+
// {
|
37
|
+
// type: 'delete',
|
38
|
+
// name: 'Delete',
|
39
|
+
// hoverColor: 'red' // default is green
|
40
|
+
// }
|
41
|
+
// ]
|
42
|
+
// @on-${type}="function" should $emit the callback for the 'type' in the optionsList
|
43
|
+
// <selected-options :optionsList="optionsList" @on-close="onCloseFunction()" @on-export="function()" @on-delete="function()" />
|
44
|
+
import styled from 'vue-styled-components'
|
45
|
+
import Icon from '../icon'
|
46
|
+
|
47
|
+
const PageContainer = styled.div`
|
48
|
+
position: fixed;
|
49
|
+
bottom: 30px;
|
50
|
+
left: 50%;
|
51
|
+
transform: translateX(-50%);
|
52
|
+
`
|
53
|
+
|
54
|
+
const SelectedContainer = styled.div`
|
55
|
+
display: grid;
|
56
|
+
align-items: center;
|
57
|
+
height: 100%;
|
58
|
+
padding-right: 20px;
|
59
|
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
60
|
+
`
|
61
|
+
|
62
|
+
const BoxContainer = styled.div`
|
63
|
+
display: flex;
|
64
|
+
align-items: center;
|
65
|
+
background-color: ${(props) => props.theme.colors.black};
|
66
|
+
opacity: 90%;
|
67
|
+
color: ${(props) => props.theme.colors.white};
|
68
|
+
border-radius: 4px;
|
69
|
+
padding: 8px 10px 8px 20px;
|
70
|
+
font-size: 14px;
|
71
|
+
height: 40px;
|
72
|
+
`
|
73
|
+
|
74
|
+
const ListContainer = styled.div`
|
75
|
+
padding: 0 20px;
|
76
|
+
display: flex;
|
77
|
+
gap: 20px;
|
78
|
+
color: ${(props) => props.theme.colors.white};
|
79
|
+
`
|
80
|
+
|
81
|
+
const ListAttrs = {
|
82
|
+
hoverColor: String
|
83
|
+
}
|
84
|
+
const ListItem = styled('div', ListAttrs)`
|
85
|
+
cursor: pointer;
|
86
|
+
&:hover {
|
87
|
+
color: ${(props) =>
|
88
|
+
props.hoverColor
|
89
|
+
? props.theme.colors[props.hoverColor]
|
90
|
+
: props.theme.colors.green};
|
91
|
+
}
|
92
|
+
`
|
93
|
+
|
94
|
+
const IconContainer = styled.div`
|
95
|
+
display: grid;
|
96
|
+
align-items: center;
|
97
|
+
justify-items: center;
|
98
|
+
height: 30px;
|
99
|
+
width: 30px;
|
100
|
+
cursor: pointer;
|
101
|
+
margin-left: 20px;
|
102
|
+
|
103
|
+
&:hover {
|
104
|
+
background: rgba(255, 255, 255, 0.1);
|
105
|
+
border-radius: 4px;
|
106
|
+
}
|
107
|
+
`
|
108
|
+
|
109
|
+
export default {
|
110
|
+
name: 'selected-options',
|
111
|
+
components: {
|
112
|
+
PageContainer,
|
113
|
+
BoxContainer,
|
114
|
+
SelectedContainer,
|
115
|
+
ListContainer,
|
116
|
+
ListItem,
|
117
|
+
Icon,
|
118
|
+
IconContainer
|
119
|
+
},
|
120
|
+
props: {
|
121
|
+
optionsList: {
|
122
|
+
required: true
|
123
|
+
},
|
124
|
+
numberSelected: {
|
125
|
+
required: true,
|
126
|
+
default: 0
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
</script>
|
@@ -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
|