@eturnity/eturnity_reusable_components 7.24.3-EPDM-10576.1 → 7.24.3-EPDM-11320.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/.eslintrc.js +125 -0
- package/package.json +6 -20
- package/src/App.vue +75 -70
- package/src/components/addNewButton/index.vue +24 -27
- package/src/components/banner/actionBanner/index.vue +32 -30
- package/src/components/banner/banner/index.vue +88 -80
- package/src/components/banner/infoBanner/index.vue +36 -44
- package/src/components/buttons/buttonIcon/index.vue +83 -78
- package/src/components/buttons/closeButton/index.vue +26 -26
- package/src/components/buttons/mainButton/index.vue +80 -76
- package/src/components/card/index.vue +56 -52
- package/src/components/collapsableInfoText/index.vue +81 -76
- package/src/components/deleteIcon/index.vue +31 -28
- package/src/components/draggableInputHandle/index.vue +20 -17
- package/src/components/dropdown/Dropdown.stories.js +8 -8
- package/src/components/dropdown/index.vue +75 -72
- package/src/components/errorMessage/index.vue +23 -23
- package/src/components/filter/filterSettings.vue +349 -333
- package/src/components/filter/index.vue +130 -130
- package/src/components/filter/parentDropdown.vue +43 -40
- package/src/components/icon/Icons.stories.js +4 -4
- package/src/components/icon/iconCache.js +1 -1
- package/src/components/icon/iconCollection.vue +40 -37
- package/src/components/icon/index.vue +72 -65
- package/src/components/iconWrapper/index.vue +122 -118
- package/src/components/infoCard/index.vue +20 -17
- package/src/components/infoText/index.vue +88 -82
- package/src/components/inputs/checkbox/index.vue +91 -94
- package/src/components/inputs/inputNumber/index.vue +508 -488
- package/src/components/inputs/inputNumberQuestion/index.vue +127 -124
- package/src/components/inputs/inputText/index.vue +265 -252
- package/src/components/inputs/radioButton/index.vue +135 -120
- package/src/components/inputs/searchInput/index.vue +84 -81
- package/src/components/inputs/select/index.vue +644 -631
- package/src/components/inputs/select/option/index.vue +91 -91
- package/src/components/inputs/select/select.stories.js +7 -7
- package/src/components/inputs/slider/index.vue +46 -46
- package/src/components/inputs/switchField/index.vue +159 -152
- package/src/components/inputs/textAreaInput/index.vue +120 -113
- package/src/components/inputs/toggle/index.vue +137 -127
- package/src/components/label/index.vue +64 -61
- package/src/components/markerItem/index.vue +40 -40
- package/src/components/modals/actionModal/index.vue +32 -29
- package/src/components/modals/infoModal/index.vue +34 -27
- package/src/components/modals/modal/index.vue +88 -80
- package/src/components/navigationTabs/index.vue +50 -47
- package/src/components/pageSubtitle/index.vue +33 -29
- package/src/components/pageTitle/index.vue +47 -39
- package/src/components/pagination/index.vue +64 -62
- package/src/components/progressBar/index.vue +70 -67
- package/src/components/projectMarker/index.vue +172 -163
- package/src/components/rangeSlider/Slider.vue +449 -449
- package/src/components/rangeSlider/index.vue +282 -270
- package/src/components/rangeSlider/utils/dom.js +3 -3
- package/src/components/selectedOptions/index.vue +51 -51
- package/src/components/sideMenu/index.vue +117 -109
- package/src/components/spinner/index.vue +37 -34
- package/src/components/tableDropdown/index.vue +343 -326
- package/src/components/tables/mainTable/index.vue +109 -106
- package/src/components/tables/viewTable/index.vue +105 -92
- package/src/components/threeDots/index.vue +174 -171
- package/src/components/videoThumbnail/index.vue +67 -59
- package/src/components/videoThumbnail/videoThumbnail.stories.js +6 -6
- package/.prettierrc +0 -7
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
@@ -1,6 +1,6 @@
|
|
1
1
|
import { isFunction } from './fns'
|
2
2
|
|
3
|
-
export function matchesSelectorToParentElements
|
3
|
+
export function matchesSelectorToParentElements(el, selector, baseNode) {
|
4
4
|
let node = el
|
5
5
|
|
6
6
|
const matchesSelectorFunc = [
|
@@ -22,7 +22,7 @@ export function matchesSelectorToParentElements (el, selector, baseNode) {
|
|
22
22
|
return false
|
23
23
|
}
|
24
24
|
|
25
|
-
export function addEvent
|
25
|
+
export function addEvent(el, event, handler) {
|
26
26
|
if (!el) {
|
27
27
|
return
|
28
28
|
}
|
@@ -35,7 +35,7 @@ export function addEvent (el, event, handler) {
|
|
35
35
|
}
|
36
36
|
}
|
37
37
|
|
38
|
-
export function removeEvent
|
38
|
+
export function removeEvent(el, event, handler) {
|
39
39
|
if (!el) {
|
40
40
|
return
|
41
41
|
}
|
@@ -1,32 +1,32 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
>
|
7
|
-
<
|
8
|
-
<
|
2
|
+
<PageContainer>
|
3
|
+
<BoxContainer>
|
4
|
+
<SelectedContainer>
|
5
|
+
{{ numberSelected }} {{ $gettext('selected') }}
|
6
|
+
</SelectedContainer>
|
7
|
+
<ListContainer v-if="optionsList.length">
|
8
|
+
<ListItem
|
9
9
|
v-for="item in optionsList"
|
10
10
|
:key="item.type"
|
11
|
-
:
|
11
|
+
:hover-color="item.hoverColor"
|
12
12
|
@click="$emit('on-' + item.type)"
|
13
13
|
>
|
14
14
|
{{ item.name }}
|
15
|
-
</
|
16
|
-
</
|
17
|
-
<
|
15
|
+
</ListItem>
|
16
|
+
</ListContainer>
|
17
|
+
<EmptyText v-if="!optionsList.length">
|
18
18
|
{{ $gettext('no_batch_actions_available') }}
|
19
|
-
</
|
20
|
-
<
|
21
|
-
<
|
22
|
-
name="close_for_modals,_tool_tips"
|
19
|
+
</EmptyText>
|
20
|
+
<IconContainer @click="$emit('on-close')">
|
21
|
+
<Icon
|
23
22
|
color="white"
|
24
|
-
size="14px"
|
25
23
|
cursor="pointer"
|
24
|
+
name="close_for_modals,_tool_tips"
|
25
|
+
size="14px"
|
26
26
|
/>
|
27
|
-
</
|
28
|
-
</
|
29
|
-
</
|
27
|
+
</IconContainer>
|
28
|
+
</BoxContainer>
|
29
|
+
</PageContainer>
|
30
30
|
</template>
|
31
31
|
|
32
32
|
<script>
|
@@ -49,17 +49,17 @@
|
|
49
49
|
// @on-close="onCloseFunction()"
|
50
50
|
// @on-export="function()" @on-delete="function()"
|
51
51
|
// />
|
52
|
-
import styled from 'vue3-styled-components'
|
53
|
-
import Icon from '../icon'
|
52
|
+
import styled from 'vue3-styled-components'
|
53
|
+
import Icon from '../icon'
|
54
54
|
|
55
|
-
const PageContainer = styled.div`
|
55
|
+
const PageContainer = styled.div`
|
56
56
|
position: fixed;
|
57
57
|
bottom: 30px;
|
58
58
|
left: 50%;
|
59
59
|
transform: translateX(-50%);
|
60
60
|
`
|
61
61
|
|
62
|
-
const SelectedContainer = styled.div`
|
62
|
+
const SelectedContainer = styled.div`
|
63
63
|
display: grid;
|
64
64
|
align-items: center;
|
65
65
|
height: 100%;
|
@@ -67,7 +67,7 @@ const SelectedContainer = styled.div`
|
|
67
67
|
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
68
68
|
`
|
69
69
|
|
70
|
-
const BoxContainer = styled.div`
|
70
|
+
const BoxContainer = styled.div`
|
71
71
|
display: flex;
|
72
72
|
align-items: center;
|
73
73
|
background-color: ${(props) => props.theme.colors.black};
|
@@ -79,27 +79,27 @@ const BoxContainer = styled.div`
|
|
79
79
|
height: 40px;
|
80
80
|
`
|
81
81
|
|
82
|
-
const ListContainer = styled.div`
|
82
|
+
const ListContainer = styled.div`
|
83
83
|
padding: 0 20px;
|
84
84
|
display: flex;
|
85
85
|
gap: 20px;
|
86
86
|
color: ${(props) => props.theme.colors.white};
|
87
87
|
`
|
88
88
|
|
89
|
-
const ListAttrs = {
|
90
|
-
|
91
|
-
}
|
92
|
-
const ListItem = styled('div', ListAttrs)`
|
89
|
+
const ListAttrs = {
|
90
|
+
hoverColor: String
|
91
|
+
}
|
92
|
+
const ListItem = styled('div', ListAttrs)`
|
93
93
|
cursor: pointer;
|
94
94
|
&:hover {
|
95
95
|
color: ${(props) =>
|
96
96
|
props.hoverColor
|
97
97
|
? props.theme.colors[props.hoverColor]
|
98
|
-
|
98
|
+
: props.theme.colors.green};
|
99
99
|
}
|
100
100
|
`
|
101
101
|
|
102
|
-
const IconContainer = styled.div`
|
102
|
+
const IconContainer = styled.div`
|
103
103
|
display: grid;
|
104
104
|
align-items: center;
|
105
105
|
justify-items: center;
|
@@ -114,32 +114,32 @@ const IconContainer = styled.div`
|
|
114
114
|
}
|
115
115
|
`
|
116
116
|
|
117
|
-
const EmptyText = styled.div`
|
117
|
+
const EmptyText = styled.div`
|
118
118
|
color: ${(props) => props.theme.colors.white};
|
119
119
|
font-size: 13px;
|
120
120
|
padding-left: 16px;
|
121
121
|
`
|
122
122
|
|
123
|
-
export default {
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
},
|
135
|
-
props: {
|
136
|
-
optionsList: {
|
137
|
-
required: true
|
123
|
+
export default {
|
124
|
+
name: 'SelectedOptions',
|
125
|
+
components: {
|
126
|
+
PageContainer,
|
127
|
+
BoxContainer,
|
128
|
+
SelectedContainer,
|
129
|
+
ListContainer,
|
130
|
+
ListItem,
|
131
|
+
Icon,
|
132
|
+
IconContainer,
|
133
|
+
EmptyText
|
138
134
|
},
|
139
|
-
|
140
|
-
|
141
|
-
|
135
|
+
props: {
|
136
|
+
optionsList: {
|
137
|
+
required: true
|
138
|
+
},
|
139
|
+
numberSelected: {
|
140
|
+
required: true,
|
141
|
+
default: 0
|
142
|
+
}
|
142
143
|
}
|
143
144
|
}
|
144
|
-
}
|
145
145
|
</script>
|
@@ -1,50 +1,58 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
</
|
6
|
-
<
|
2
|
+
<PageContainer :is-loading="!tabsData.length">
|
3
|
+
<SpinnerContainer v-if="!tabsData.length">
|
4
|
+
<Spinner />
|
5
|
+
</SpinnerContainer>
|
6
|
+
<ListContainer v-else>
|
7
7
|
<template v-for="(item, idx) in tabsData">
|
8
|
-
<
|
8
|
+
<ListItem
|
9
9
|
v-if="!item.children"
|
10
10
|
:key="idx"
|
11
11
|
:data-id="`sub_menu_settings_${item.key}`"
|
12
|
-
:
|
12
|
+
:is-active="activeTab === item.key"
|
13
13
|
@click="$emit('tab-click', { activeKey: item.key })"
|
14
14
|
>
|
15
|
-
<
|
16
|
-
<
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
<IconContainer :is-active="activeTab === item.key">
|
16
|
+
<Icon
|
17
|
+
color="#fff"
|
18
|
+
cursor="pointer"
|
19
|
+
:name="item.icon"
|
20
|
+
size="18px"
|
21
|
+
/>
|
22
|
+
</IconContainer>
|
23
|
+
<ListText>{{ $gettext(item.label) }}</ListText>
|
24
|
+
</ListItem>
|
25
|
+
<CollapseWrapper
|
26
|
+
v-else
|
27
|
+
:key="idx + item.key"
|
28
|
+
>
|
29
|
+
<CollapseContainer
|
22
30
|
:data-id="`sub_menu_settings_${item.key}`"
|
23
31
|
@click="toggleActiveDropdown(item.key)"
|
24
32
|
>
|
25
|
-
<
|
26
|
-
<
|
27
|
-
:name="item.icon"
|
33
|
+
<IconContainer :is-active="activeParentTab === item.key">
|
34
|
+
<Icon
|
28
35
|
color="#fff"
|
29
36
|
cursor="pointer"
|
37
|
+
:name="item.icon"
|
30
38
|
size="18px"
|
31
39
|
/>
|
32
|
-
</
|
33
|
-
<
|
34
|
-
<
|
35
|
-
<
|
36
|
-
:name="activeDropdown === item.key ? 'arrow_up' : 'arrow_down'"
|
40
|
+
</IconContainer>
|
41
|
+
<ListText>{{ $gettext(item.label) }}</ListText>
|
42
|
+
<ArrowContainer>
|
43
|
+
<Icon
|
37
44
|
color="white"
|
45
|
+
:name="activeDropdown === item.key ? 'arrow_up' : 'arrow_down'"
|
38
46
|
size="10px"
|
39
47
|
/>
|
40
|
-
</
|
41
|
-
</
|
48
|
+
</ArrowContainer>
|
49
|
+
</CollapseContainer>
|
42
50
|
<template v-if="activeDropdown === item.key">
|
43
|
-
<
|
51
|
+
<SubRouter
|
44
52
|
v-for="subItem in item.children"
|
45
53
|
:key="subItem.key"
|
46
|
-
:isActive="activeTab === subItem.key"
|
47
54
|
:data-id="`sub_menu_settings_${subItem.key}`"
|
55
|
+
:is-active="activeTab === subItem.key"
|
48
56
|
@click="
|
49
57
|
$emit('tab-click', {
|
50
58
|
activeKey: subItem.key,
|
@@ -53,39 +61,39 @@
|
|
53
61
|
"
|
54
62
|
>
|
55
63
|
{{ $gettext(subItem.label) }}
|
56
|
-
</
|
64
|
+
</SubRouter>
|
57
65
|
</template>
|
58
|
-
</
|
66
|
+
</CollapseWrapper>
|
59
67
|
</template>
|
60
|
-
</
|
61
|
-
<
|
62
|
-
<
|
63
|
-
:isActive="false"
|
64
|
-
:isButton="true"
|
68
|
+
</ListContainer>
|
69
|
+
<BottomSection v-if="hasLogout">
|
70
|
+
<IconContainer
|
65
71
|
data-id="button_settings_logout"
|
72
|
+
:is-active="false"
|
73
|
+
:is-button="true"
|
66
74
|
@click="$emit('on-logout')"
|
67
75
|
>
|
68
|
-
<
|
69
|
-
name="initial_situation"
|
76
|
+
<RotateIcon
|
70
77
|
color="#fff"
|
71
78
|
cursor="pointer"
|
79
|
+
name="initial_situation"
|
72
80
|
size="18px"
|
73
81
|
/>
|
74
|
-
</
|
75
|
-
<
|
76
|
-
</
|
77
|
-
</
|
82
|
+
</IconContainer>
|
83
|
+
<AppVersion>{{ appVersion }}</AppVersion>
|
84
|
+
</BottomSection>
|
85
|
+
</PageContainer>
|
78
86
|
</template>
|
79
87
|
|
80
88
|
<script>
|
81
|
-
import styled from 'vue3-styled-components'
|
82
|
-
import Icon from '../icon'
|
83
|
-
import Spinner from '../spinner'
|
89
|
+
import styled from 'vue3-styled-components'
|
90
|
+
import Icon from '../icon'
|
91
|
+
import Spinner from '../spinner'
|
84
92
|
|
85
|
-
const PageAttrs = { isLoading: Boolean }
|
86
|
-
const PageContainer = styled('div', PageAttrs)`
|
93
|
+
const PageAttrs = { isLoading: Boolean }
|
94
|
+
const PageContainer = styled('div', PageAttrs)`
|
87
95
|
background-color: ${(props) =>
|
88
|
-
|
96
|
+
props.isLoading ? props.theme.colors.white : props.theme.colors.grey6};
|
89
97
|
padding: 14px 12px;
|
90
98
|
min-width: 220px;
|
91
99
|
display: flex;
|
@@ -93,14 +101,14 @@ const PageContainer = styled('div', PageAttrs)`
|
|
93
101
|
justify-content: space-between;
|
94
102
|
`
|
95
103
|
|
96
|
-
const ListContainer = styled.div`
|
104
|
+
const ListContainer = styled.div`
|
97
105
|
display: grid;
|
98
106
|
grid-gap: 6px;
|
99
107
|
`
|
100
108
|
|
101
|
-
const IconAttrs = { isActive: Boolean, isButton: Boolean }
|
109
|
+
const IconAttrs = { isActive: Boolean, isButton: Boolean }
|
102
110
|
|
103
|
-
const ListItem = styled('div', IconAttrs)`
|
111
|
+
const ListItem = styled('div', IconAttrs)`
|
104
112
|
display: grid;
|
105
113
|
align-items: center;
|
106
114
|
grid-template-columns: auto 1fr;
|
@@ -109,27 +117,27 @@ const ListItem = styled('div', IconAttrs)`
|
|
109
117
|
padding: 4px;
|
110
118
|
border-radius: 6px;
|
111
119
|
background-color: ${(props) =>
|
112
|
-
|
120
|
+
props.isActive ? 'rgba(255, 255, 255, 0.1)' : ''};
|
113
121
|
|
114
122
|
:hover {
|
115
123
|
background-color: rgba(255, 255, 255, 0.1);
|
116
124
|
}
|
117
125
|
`
|
118
126
|
|
119
|
-
const ListText = styled.div`
|
127
|
+
const ListText = styled.div`
|
120
128
|
font-size: 16px;
|
121
129
|
font-weight: 700;
|
122
130
|
color: ${(props) => props.theme.colors.white};
|
123
131
|
`
|
124
132
|
|
125
|
-
const IconContainer = styled('div', IconAttrs)`
|
133
|
+
const IconContainer = styled('div', IconAttrs)`
|
126
134
|
display: grid;
|
127
135
|
align-items: center;
|
128
136
|
justify-items: center;
|
129
137
|
width: 32px;
|
130
138
|
height: 32px;
|
131
139
|
background-color: ${(props) =>
|
132
|
-
|
140
|
+
props.isActive ? props.theme.colors.red : 'rgba(255, 255, 255, 0.2)'};
|
133
141
|
border-radius: 6px;
|
134
142
|
|
135
143
|
${({ isButton = false }) =>
|
@@ -142,28 +150,28 @@ const IconContainer = styled('div', IconAttrs)`
|
|
142
150
|
`}
|
143
151
|
`
|
144
152
|
|
145
|
-
const SpinnerContainer = styled.div`
|
153
|
+
const SpinnerContainer = styled.div`
|
146
154
|
margin-top: 30px;
|
147
155
|
`
|
148
156
|
|
149
|
-
const BottomSection = styled.div`
|
157
|
+
const BottomSection = styled.div`
|
150
158
|
display: flex;
|
151
159
|
justify-content: space-between;
|
152
160
|
align-items: center;
|
153
161
|
`
|
154
162
|
|
155
|
-
const RotateIcon = styled(Icon)`
|
163
|
+
const RotateIcon = styled(Icon)`
|
156
164
|
transform: rotate(-90deg);
|
157
165
|
`
|
158
166
|
|
159
|
-
const AppVersion = styled.p`
|
167
|
+
const AppVersion = styled.p`
|
160
168
|
font-size: 11px;
|
161
169
|
line-height: 13px;
|
162
170
|
color: ${(props) => props.theme.colors.white};
|
163
171
|
margin-right: 6px;
|
164
172
|
`
|
165
173
|
|
166
|
-
const SubRouter = styled('div', IconAttrs)`
|
174
|
+
const SubRouter = styled('div', IconAttrs)`
|
167
175
|
display: grid;
|
168
176
|
grid-template-columns: 1fr;
|
169
177
|
grid-gap: 10px;
|
@@ -186,7 +194,7 @@ const SubRouter = styled('div', IconAttrs)`
|
|
186
194
|
}
|
187
195
|
`
|
188
196
|
|
189
|
-
const CollapseContainer = styled.div`
|
197
|
+
const CollapseContainer = styled.div`
|
190
198
|
display: grid;
|
191
199
|
grid-template-columns: auto 1fr auto;
|
192
200
|
grid-gap: 20px;
|
@@ -199,7 +207,7 @@ const CollapseContainer = styled.div`
|
|
199
207
|
}
|
200
208
|
`
|
201
209
|
|
202
|
-
const CollapseWrapper = styled.div`
|
210
|
+
const CollapseWrapper = styled.div`
|
203
211
|
display: grid;
|
204
212
|
grid-template-columns: 1fr;
|
205
213
|
grid-gap: 10px;
|
@@ -207,64 +215,64 @@ const CollapseWrapper = styled.div`
|
|
207
215
|
margin-bottom: 2px;
|
208
216
|
`
|
209
217
|
|
210
|
-
const ArrowContainer = styled.div`
|
218
|
+
const ArrowContainer = styled.div`
|
211
219
|
padding-bottom: 5px;
|
212
220
|
`
|
213
221
|
|
214
|
-
export default {
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
},
|
233
|
-
data() {
|
234
|
-
return {
|
235
|
-
activeDropdown: null
|
236
|
-
}
|
237
|
-
},
|
238
|
-
mounted() {
|
239
|
-
this.activeDropdown = this.activeParentTab
|
240
|
-
},
|
241
|
-
props: {
|
242
|
-
tabsData: {
|
243
|
-
required: true
|
222
|
+
export default {
|
223
|
+
name: 'SideMenu',
|
224
|
+
components: {
|
225
|
+
PageContainer,
|
226
|
+
ListContainer,
|
227
|
+
ListItem,
|
228
|
+
ListText,
|
229
|
+
Icon,
|
230
|
+
IconContainer,
|
231
|
+
Spinner,
|
232
|
+
SpinnerContainer,
|
233
|
+
BottomSection,
|
234
|
+
RotateIcon,
|
235
|
+
AppVersion,
|
236
|
+
CollapseWrapper,
|
237
|
+
CollapseContainer,
|
238
|
+
SubRouter,
|
239
|
+
ArrowContainer
|
244
240
|
},
|
245
|
-
|
246
|
-
|
241
|
+
props: {
|
242
|
+
tabsData: {
|
243
|
+
required: true
|
244
|
+
},
|
245
|
+
activeTab: {
|
246
|
+
required: true
|
247
|
+
},
|
248
|
+
activeParentTab: {
|
249
|
+
required: false
|
250
|
+
},
|
251
|
+
hasLogout: {
|
252
|
+
required: false,
|
253
|
+
default: true
|
254
|
+
},
|
255
|
+
appVersion: {
|
256
|
+
required: false,
|
257
|
+
type: String
|
258
|
+
}
|
247
259
|
},
|
248
|
-
|
249
|
-
|
260
|
+
data() {
|
261
|
+
return {
|
262
|
+
activeDropdown: null
|
263
|
+
}
|
250
264
|
},
|
251
|
-
|
252
|
-
|
253
|
-
default: true
|
265
|
+
mounted() {
|
266
|
+
this.activeDropdown = this.activeParentTab
|
254
267
|
},
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
if (this.activeDropdown === value) {
|
263
|
-
this.activeDropdown = null
|
264
|
-
} else {
|
265
|
-
this.activeDropdown = value
|
268
|
+
methods: {
|
269
|
+
toggleActiveDropdown(value) {
|
270
|
+
if (this.activeDropdown === value) {
|
271
|
+
this.activeDropdown = null
|
272
|
+
} else {
|
273
|
+
this.activeDropdown = value
|
274
|
+
}
|
266
275
|
}
|
267
276
|
}
|
268
277
|
}
|
269
|
-
}
|
270
278
|
</script>
|
@@ -1,21 +1,24 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
</
|
6
|
-
</
|
7
|
-
<
|
8
|
-
|
9
|
-
|
2
|
+
<SpinnerContainer v-if="fullWidth">
|
3
|
+
<Container>
|
4
|
+
<SpinnerWrapper :size="size" />
|
5
|
+
</Container>
|
6
|
+
</SpinnerContainer>
|
7
|
+
<Container
|
8
|
+
v-else
|
9
|
+
:limited-to-modal="limitedToModal"
|
10
|
+
>
|
11
|
+
<SpinnerWrapper :size="size" />
|
12
|
+
</Container>
|
10
13
|
</template>
|
11
14
|
|
12
15
|
<script>
|
13
16
|
// import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
|
14
17
|
// <spinner size="30px" />
|
15
|
-
import styled from 'vue3-styled-components'
|
16
|
-
import SpinnerSvg from '../../assets/icons/black_spinner.svg?component'
|
18
|
+
import styled from 'vue3-styled-components'
|
19
|
+
import SpinnerSvg from '../../assets/icons/black_spinner.svg?component'
|
17
20
|
|
18
|
-
const SpinnerContainer = styled.div`
|
21
|
+
const SpinnerContainer = styled.div`
|
19
22
|
position: fixed;
|
20
23
|
top: 0;
|
21
24
|
left: 0;
|
@@ -27,8 +30,8 @@ const SpinnerContainer = styled.div`
|
|
27
30
|
justify-items: center;
|
28
31
|
z-index: 100;
|
29
32
|
`
|
30
|
-
const containerAttrs = { limitedToModal: Boolean }
|
31
|
-
const Container = styled('div', containerAttrs)`
|
33
|
+
const containerAttrs = { limitedToModal: Boolean }
|
34
|
+
const Container = styled('div', containerAttrs)`
|
32
35
|
display: grid;
|
33
36
|
align-items: center;
|
34
37
|
justify-items: center;
|
@@ -37,32 +40,32 @@ const Container = styled('div', containerAttrs)`
|
|
37
40
|
width: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
|
38
41
|
`
|
39
42
|
|
40
|
-
const spinnerAttrs = { size: String }
|
41
|
-
const SpinnerWrapper = styled(SpinnerSvg, spinnerAttrs)`
|
43
|
+
const spinnerAttrs = { size: String }
|
44
|
+
const SpinnerWrapper = styled(SpinnerSvg, spinnerAttrs)`
|
42
45
|
width: ${(props) => (props.size ? props.size : '60px')};
|
43
46
|
height: auto;
|
44
47
|
`
|
45
48
|
|
46
|
-
export default {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
},
|
53
|
-
props: {
|
54
|
-
fullWidth: {
|
55
|
-
required: false,
|
56
|
-
default: false
|
49
|
+
export default {
|
50
|
+
name: 'Spinner',
|
51
|
+
components: {
|
52
|
+
Container,
|
53
|
+
SpinnerWrapper,
|
54
|
+
SpinnerContainer
|
57
55
|
},
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
56
|
+
props: {
|
57
|
+
fullWidth: {
|
58
|
+
required: false,
|
59
|
+
default: false
|
60
|
+
},
|
61
|
+
limitedToModal: {
|
62
|
+
required: false,
|
63
|
+
default: false
|
64
|
+
},
|
65
|
+
size: {
|
66
|
+
required: false,
|
67
|
+
default: null
|
68
|
+
}
|
65
69
|
}
|
66
70
|
}
|
67
|
-
}
|
68
71
|
</script>
|