@eturnity/eturnity_reusable_components 8.10.1-EPDM-13568.0 → 8.10.2
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 +6 -6
- package/src/assets/theme.js +2 -2
- package/src/components/buttons/buttonIcon/index.vue +32 -103
- package/src/components/buttons/mainButton/index.vue +18 -55
- package/src/components/filter/filterSettings.vue +3 -4
- package/src/components/icon/index.vue +0 -1
- package/src/components/infoText/index.vue +4 -7
- package/src/components/inputs/inputNumber/index.vue +0 -5
- package/src/components/inputs/inputText/index.vue +0 -6
- package/src/components/modals/modal/index.vue +11 -2
- package/src/components/projectMarker/index.vue +1 -2
- package/src/components/sideMenu/index.vue +41 -70
- package/src/components/spinner/index.vue +33 -58
- package/src/components/tableDropdown/index.vue +22 -14
- package/src/components/tables/mainTable/index.vue +2 -2
- package/src/assets/svgIcons/heat_pump.svg +0 -5
package/package.json
CHANGED
package/src/App.vue
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
<template>
|
2
|
-
<ThemeProvider :style="{ height: '100%' }" :theme="
|
2
|
+
<ThemeProvider :style="{ height: '100%' }" :theme="getTheme()">
|
3
3
|
<RouterView />
|
4
4
|
</ThemeProvider>
|
5
5
|
</template>
|
6
6
|
|
7
7
|
<script>
|
8
8
|
import { ThemeProvider } from 'vue3-styled-components'
|
9
|
-
import theme from '
|
9
|
+
import theme from './assets/theme'
|
10
10
|
|
11
11
|
export default {
|
12
12
|
name: 'App',
|
13
13
|
components: {
|
14
14
|
ThemeProvider,
|
15
15
|
},
|
16
|
-
|
17
|
-
|
18
|
-
theme
|
19
|
-
}
|
16
|
+
methods: {
|
17
|
+
getTheme() {
|
18
|
+
return theme
|
19
|
+
},
|
20
20
|
},
|
21
21
|
}
|
22
22
|
</script>
|
package/src/assets/theme.js
CHANGED
@@ -2,33 +2,19 @@
|
|
2
2
|
<PageContainer>
|
3
3
|
<ButtonWrapper
|
4
4
|
:app-theme="appTheme"
|
5
|
-
:button-size="buttonSize"
|
6
|
-
:custom-color="customColor"
|
7
5
|
:custom-color="customColor"
|
8
6
|
:is-active="isActive"
|
9
7
|
:is-disabled="isDisabled"
|
10
8
|
:min-width="minWidth"
|
11
|
-
:theme-type="themeType"
|
12
|
-
:type="type"
|
13
|
-
:variant="variant"
|
14
9
|
>
|
15
|
-
<IconContainer
|
16
|
-
:button-size="buttonSize"
|
17
|
-
:theme-type="themeType"
|
18
|
-
:type="type"
|
19
|
-
:variant="variant"
|
20
|
-
>
|
10
|
+
<IconContainer :width="height">
|
21
11
|
<Icon
|
22
|
-
:color="
|
23
|
-
iconColor ||
|
24
|
-
theme.mainButton[themeType][type][variant].textColor ||
|
25
|
-
theme.colors.white
|
26
|
-
"
|
12
|
+
:color="fontColor ? fontColor : theme.colors.white"
|
27
13
|
:name="iconName"
|
28
14
|
size="14px"
|
29
15
|
/>
|
30
16
|
</IconContainer>
|
31
|
-
<ButtonContainer :
|
17
|
+
<ButtonContainer :font-color="fontColor" :font-size="fontSize">
|
32
18
|
{{ text }}
|
33
19
|
</ButtonContainer>
|
34
20
|
</ButtonWrapper>
|
@@ -45,6 +31,7 @@
|
|
45
31
|
// iconName="external_icon"
|
46
32
|
// fontColor="white"
|
47
33
|
// fontSize="12px"
|
34
|
+
// height="24px"
|
48
35
|
// />
|
49
36
|
|
50
37
|
import Icon from '../../icon'
|
@@ -54,101 +41,67 @@
|
|
54
41
|
const PageContainer = styled.div``
|
55
42
|
|
56
43
|
const ButtonAttrs = {
|
57
|
-
type: String,
|
58
44
|
isDisabled: Boolean,
|
59
45
|
minWidth: String,
|
60
46
|
customColor: String,
|
61
|
-
buttonSize: String,
|
62
|
-
variant: String,
|
63
47
|
appTheme: String,
|
64
48
|
isActive: Boolean,
|
65
49
|
}
|
66
50
|
const ButtonWrapper = styled('div', ButtonAttrs)`
|
67
51
|
display: grid;
|
68
52
|
grid-template-columns: auto 1fr;
|
69
|
-
font-size: ${(props) =>
|
70
|
-
props.theme?.mainButton?.size?.[props.buttonSize]?.fontSize};
|
71
|
-
color: ${(props) =>
|
72
|
-
props.isDisabled
|
73
|
-
? props.theme.mainButton[props.themeType][props.type][props.variant]
|
74
|
-
.disabled.textColor
|
75
|
-
: props.theme.mainButton[props.themeType][props.type][props.variant]
|
76
|
-
.textColor};
|
77
53
|
background-color: ${(props) =>
|
78
54
|
props.isDisabled
|
79
|
-
? props.theme.
|
80
|
-
.disabled.backgroundColor
|
55
|
+
? props.theme.colors.disabled
|
81
56
|
: props.customColor
|
82
|
-
? props.customColor
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
? props.theme.mainButton[props.themeType][props.type][props.variant]
|
91
|
-
.disabled.borderColor
|
92
|
-
: props.theme.mainButton[props.themeType][props.type][props.variant]
|
93
|
-
.borderColor
|
94
|
-
return borderValue ? '1px solid ' + borderValue : 'none'
|
95
|
-
}};
|
57
|
+
? props.theme.colors[props.customColor]
|
58
|
+
? props.theme.colors[props.customColor]
|
59
|
+
: props.customColor
|
60
|
+
: props.appTheme === 'dark'
|
61
|
+
? props.isActive
|
62
|
+
? 'rgba(255, 255, 255, 0.2)'
|
63
|
+
: props.theme.colors.black
|
64
|
+
: props.theme.colors.yellow};
|
96
65
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
97
66
|
user-select: none;
|
98
67
|
border-radius: 4px;
|
99
68
|
overflow: hidden;
|
100
|
-
min-width: ${(props) => props.minWidth
|
69
|
+
min-width: ${(props) => (props.minWidth ? props.minWidth : 'initial')};
|
101
70
|
|
102
71
|
&:hover {
|
103
|
-
|
104
|
-
props.isDisabled
|
105
|
-
? props.theme.mainButton[props.themeType][props.type][props.variant]
|
106
|
-
.disabled.backgroundColor
|
107
|
-
: props.theme.mainButton[props.themeType][props.type][props.variant]
|
108
|
-
.hover};
|
72
|
+
opacity: ${(props) => (props.isDisabled ? '1' : '0.8')};
|
109
73
|
}
|
110
74
|
|
111
75
|
&:active {
|
112
|
-
|
113
|
-
props.isDisabled
|
114
|
-
? props.theme.mainButton[props.themeType][props.type][props.variant]
|
115
|
-
.disabled.backgroundColor
|
116
|
-
: props.theme.mainButton[props.themeType][props.type][props.variant]
|
117
|
-
.active};
|
76
|
+
opacity: 1;
|
118
77
|
}
|
119
78
|
`
|
120
79
|
|
121
80
|
const ButtonContainerAttrs = {
|
122
|
-
|
81
|
+
fontSize: String,
|
82
|
+
fontColor: String,
|
123
83
|
}
|
124
84
|
const ButtonContainer = styled('div', ButtonContainerAttrs)`
|
85
|
+
font-size: ${(props) => props.fontSize};
|
86
|
+
color: ${(props) =>
|
87
|
+
props.fontColor ? props.fontColor : props.theme.colors.white};
|
125
88
|
display: flex;
|
126
89
|
align-items: center;
|
127
90
|
justify-content: center;
|
128
|
-
padding:
|
129
|
-
props.theme?.mainButton?.size?.[props.buttonSize]?.padding};
|
91
|
+
padding: 5px 10px;
|
130
92
|
white-space: nowrap;
|
131
93
|
`
|
132
94
|
|
133
95
|
const IconContainerAttrs = {
|
134
|
-
|
135
|
-
themeType: String,
|
136
|
-
type: String,
|
137
|
-
variant: String,
|
96
|
+
width: String,
|
138
97
|
}
|
139
98
|
const IconContainer = styled('div', IconContainerAttrs)`
|
140
99
|
display: grid;
|
141
100
|
align-items: center;
|
142
101
|
justify-items: center;
|
143
|
-
width: ${(props) =>
|
144
|
-
|
145
|
-
|
146
|
-
border-right: ${(props) => {
|
147
|
-
const borderColor =
|
148
|
-
props.theme.mainButton[props.themeType][props.type][props.variant]
|
149
|
-
.borderColor
|
150
|
-
return borderColor ? `1px solid ${borderColor}` : 'none'
|
151
|
-
}};
|
102
|
+
width: ${(props) => props.width};
|
103
|
+
background: ${(props) => props.theme.colors.white + '1a'};
|
104
|
+
padding: 5px;
|
152
105
|
`
|
153
106
|
|
154
107
|
export default {
|
@@ -161,26 +114,6 @@
|
|
161
114
|
Icon,
|
162
115
|
},
|
163
116
|
props: {
|
164
|
-
type: {
|
165
|
-
required: false,
|
166
|
-
default: 'primary',
|
167
|
-
type: String,
|
168
|
-
},
|
169
|
-
variant: {
|
170
|
-
required: false,
|
171
|
-
default: 'main',
|
172
|
-
type: String,
|
173
|
-
},
|
174
|
-
themeType: {
|
175
|
-
type: String,
|
176
|
-
default: 'light',
|
177
|
-
required: false,
|
178
|
-
},
|
179
|
-
buttonSize: {
|
180
|
-
type: String,
|
181
|
-
default: 'medium',
|
182
|
-
required: false,
|
183
|
-
},
|
184
117
|
isDisabled: {
|
185
118
|
required: false,
|
186
119
|
default: false,
|
@@ -204,7 +137,7 @@
|
|
204
137
|
required: true,
|
205
138
|
type: String,
|
206
139
|
},
|
207
|
-
|
140
|
+
fontColor: {
|
208
141
|
required: false,
|
209
142
|
default: null,
|
210
143
|
type: String,
|
@@ -224,20 +157,16 @@
|
|
224
157
|
default: false,
|
225
158
|
type: Boolean,
|
226
159
|
},
|
160
|
+
height: {
|
161
|
+
required: false,
|
162
|
+
type: String,
|
163
|
+
default: '',
|
164
|
+
},
|
227
165
|
},
|
228
166
|
data() {
|
229
167
|
return {
|
230
168
|
theme: Theme,
|
231
169
|
}
|
232
170
|
},
|
233
|
-
// computed: {
|
234
|
-
// getIconColor() {
|
235
|
-
// console.log(this.theme[this.themeType][this.type][this.variant])
|
236
|
-
// return (
|
237
|
-
// this.iconColor ||
|
238
|
-
// this.theme[this.themeType][this.type][this.variant].textColor
|
239
|
-
// )
|
240
|
-
// },
|
241
|
-
// },
|
242
171
|
}
|
243
172
|
</script>
|
@@ -2,8 +2,6 @@
|
|
2
2
|
<PageContainer>
|
3
3
|
<ButtonContainer
|
4
4
|
:id="id"
|
5
|
-
:app-theme="appTheme"
|
6
|
-
:button-size="buttonSize"
|
7
5
|
:custom-color="customColor"
|
8
6
|
:data-id="dataId"
|
9
7
|
:data-qa-id="dataQaId"
|
@@ -13,10 +11,9 @@
|
|
13
11
|
:min-width="minWidth"
|
14
12
|
:no-wrap="noWrap"
|
15
13
|
:type="type"
|
16
|
-
:variant="variant"
|
17
14
|
>
|
18
15
|
<LabelComponent :has-icon="Boolean(icon)">
|
19
|
-
<Icon v-if="icon" :
|
16
|
+
<Icon v-if="icon" :name="icon" :color="iconColor" size="14px" />
|
20
17
|
{{ text }}
|
21
18
|
</LabelComponent>
|
22
19
|
</ButtonContainer>
|
@@ -49,40 +46,30 @@
|
|
49
46
|
fontColor: String,
|
50
47
|
noWrap: Boolean,
|
51
48
|
height: String,
|
52
|
-
variant: String,
|
53
|
-
buttonSize: String,
|
54
|
-
appTheme: String,
|
55
49
|
}
|
56
50
|
const ButtonContainer = styled('div', ButtonAttrs)`
|
57
51
|
display: flex;
|
58
52
|
justify-content: center;
|
59
|
-
padding:
|
60
|
-
|
61
|
-
font-size: ${(props) =>
|
62
|
-
props.theme?.mainButton?.size?.[props.buttonSize]?.fontSize};
|
53
|
+
padding: 7px 15px;
|
54
|
+
font-size: 14px;
|
63
55
|
color: ${(props) =>
|
64
56
|
props.isDisabled
|
65
|
-
? props.theme.
|
66
|
-
|
67
|
-
|
68
|
-
|
57
|
+
? props.theme.colors.white
|
58
|
+
: props.fontColor
|
59
|
+
? props.fontColor
|
60
|
+
: props.theme.colors.white};
|
69
61
|
background-color: ${(props) =>
|
70
62
|
props.isDisabled
|
71
|
-
? props.theme.
|
72
|
-
.disabled.backgroundColor
|
63
|
+
? props.theme.colors.disabled
|
73
64
|
: props.customColor
|
74
65
|
? props.customColor
|
75
|
-
: props.
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
? props.theme.
|
81
|
-
|
82
|
-
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
83
|
-
.borderColor
|
84
|
-
return borderValue ? '1px solid ' + borderValue : 'none'
|
85
|
-
}};
|
66
|
+
: props.type === 'primary'
|
67
|
+
? props.theme.colors.black
|
68
|
+
: props.type === 'secondary'
|
69
|
+
? props.theme.colors.grey3
|
70
|
+
: props.type === 'cancel'
|
71
|
+
? props.theme.colors.red
|
72
|
+
: props.theme.colors.black};
|
86
73
|
border-radius: 4px;
|
87
74
|
text-align: center;
|
88
75
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
@@ -92,21 +79,11 @@
|
|
92
79
|
height: ${(props) => props.height};
|
93
80
|
|
94
81
|
&:hover {
|
95
|
-
|
96
|
-
props.isDisabled
|
97
|
-
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
98
|
-
.disabled.backgroundColor
|
99
|
-
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
100
|
-
.hover};
|
82
|
+
opacity: ${(props) => (props.isDisabled ? '1' : '0.8')};
|
101
83
|
}
|
102
84
|
|
103
85
|
&:active {
|
104
|
-
|
105
|
-
props.isDisabled
|
106
|
-
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
107
|
-
.disabled.backgroundColor
|
108
|
-
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
109
|
-
.active};
|
86
|
+
opacity: 1;
|
110
87
|
}
|
111
88
|
`
|
112
89
|
|
@@ -132,12 +109,7 @@
|
|
132
109
|
props: {
|
133
110
|
type: {
|
134
111
|
required: false,
|
135
|
-
default: 'primary',
|
136
|
-
type: String,
|
137
|
-
},
|
138
|
-
variant: {
|
139
|
-
required: false,
|
140
|
-
default: 'main', // main, cancel
|
112
|
+
default: 'primary',
|
141
113
|
type: String,
|
142
114
|
},
|
143
115
|
isDisabled: {
|
@@ -197,15 +169,6 @@
|
|
197
169
|
type: String,
|
198
170
|
default: '',
|
199
171
|
},
|
200
|
-
appTheme: {
|
201
|
-
type: String,
|
202
|
-
default: 'light',
|
203
|
-
},
|
204
|
-
buttonSize: {
|
205
|
-
type: String,
|
206
|
-
default: 'medium',
|
207
|
-
required: false,
|
208
|
-
},
|
209
172
|
},
|
210
173
|
}
|
211
174
|
</script>
|
@@ -297,13 +297,12 @@
|
|
297
297
|
<MainButton
|
298
298
|
v-if="buttonText.cancel"
|
299
299
|
:text="buttonText.cancel"
|
300
|
-
type="
|
301
|
-
variant="cancel"
|
300
|
+
type="cancel"
|
302
301
|
@click="$emit('on-cancel-view')"
|
303
302
|
/>
|
304
303
|
<ResetContainer v-if="!filterViews || !filterViews.length">
|
305
304
|
<ResetButton @click="$emit('on-reset-filters')">
|
306
|
-
<Icon :color="theme.colors.
|
305
|
+
<Icon :color="theme.colors.blue" :name="'update'" size="14px" />
|
307
306
|
<div>{{ $gettext('reset_filters') }}</div>
|
308
307
|
</ResetButton>
|
309
308
|
</ResetContainer>
|
@@ -476,7 +475,7 @@
|
|
476
475
|
margin-top: 20px;
|
477
476
|
align-self: center;
|
478
477
|
font-size: 13px;
|
479
|
-
color: ${(props) => props.theme.colors.
|
478
|
+
color: ${(props) => props.theme.colors.blue};
|
480
479
|
cursor: pointer;
|
481
480
|
`
|
482
481
|
|
@@ -143,7 +143,6 @@
|
|
143
143
|
background-color: ${(props) =>
|
144
144
|
props.backgroundColor ? props.backgroundColor : 'transparent'};
|
145
145
|
padding: ${(props) => (props.backgroundColor ? '3px' : '0')};
|
146
|
-
border-radius: 4px;
|
147
146
|
}
|
148
147
|
svg path:not(.fix) {
|
149
148
|
${({ theme, color }) => color && `fill: ${theme.colors[color] || color};`}
|
@@ -48,7 +48,6 @@
|
|
48
48
|
<TextWrapper :style="wrapperStyle">
|
49
49
|
<TextOverlay
|
50
50
|
ref="infoBox"
|
51
|
-
:app-theme="appTheme"
|
52
51
|
:image="image"
|
53
52
|
:style="boxStyle"
|
54
53
|
:width="infoBoxWidth"
|
@@ -93,8 +92,10 @@
|
|
93
92
|
width: Number,
|
94
93
|
}
|
95
94
|
const TextOverlay = styled('div', TextOverlayAttrs)`
|
95
|
+
background-color: ${(props) =>
|
96
|
+
props.image ? props.theme.colors.white : props.theme.colors.black};
|
96
97
|
color: ${(props) =>
|
97
|
-
props.image ? props.theme.colors.grey1 : props.theme.colors.
|
98
|
+
props.image ? props.theme.colors.grey1 : props.theme.colors.white};
|
98
99
|
font-size: ${(props) => (props.image ? '12px' : '13px')};
|
99
100
|
border-radius: 4px;
|
100
101
|
padding: 10px;
|
@@ -121,11 +122,7 @@
|
|
121
122
|
// height: 0;
|
122
123
|
// border: 8px solid transparent;
|
123
124
|
// border-top-color: ${(props) =>
|
124
|
-
// props.image
|
125
|
-
// ? props.theme.colors.white
|
126
|
-
// : props.appTheme === 'dark'
|
127
|
-
// ? props.theme.colors.grey5
|
128
|
-
// : props.theme.colors.black};
|
125
|
+
// props.image ? props.theme.colors.white : props.theme.colors.black};
|
129
126
|
// filter: ${(props) =>
|
130
127
|
// props.image ? 'drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1))' : 'none'};
|
131
128
|
// `
|
@@ -25,7 +25,6 @@
|
|
25
25
|
<InfoText
|
26
26
|
v-if="labelInfoText"
|
27
27
|
:align-arrow="labelInfoAlign"
|
28
|
-
:app-theme="appTheme"
|
29
28
|
:text="labelInfoText"
|
30
29
|
/>
|
31
30
|
</LabelWrapper>
|
@@ -475,10 +474,6 @@
|
|
475
474
|
},
|
476
475
|
inheritAttrs: false,
|
477
476
|
props: {
|
478
|
-
appTheme: {
|
479
|
-
type: String,
|
480
|
-
required: false,
|
481
|
-
},
|
482
477
|
placeholder: {
|
483
478
|
type: String,
|
484
479
|
required: false,
|
@@ -21,7 +21,6 @@
|
|
21
21
|
<InfoText
|
22
22
|
v-if="infoTextMessage != ''"
|
23
23
|
:align-arrow="infoTextAlign"
|
24
|
-
:app-theme="appTheme"
|
25
24
|
data-test-id="info_text_message"
|
26
25
|
:size="fontSize ? fontSize : '16px'"
|
27
26
|
:text="infoTextMessage"
|
@@ -264,11 +263,6 @@
|
|
264
263
|
default: '',
|
265
264
|
type: String,
|
266
265
|
},
|
267
|
-
appTheme: {
|
268
|
-
type: String,
|
269
|
-
required: false,
|
270
|
-
default: 'light',
|
271
|
-
},
|
272
266
|
alignItems: {
|
273
267
|
required: false,
|
274
268
|
default: 'horizontal',
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<PageWrapper
|
3
3
|
v-if="isOpen"
|
4
|
+
:add-padding-top="addPaddingTop"
|
4
5
|
:backdrop="backdrop"
|
5
6
|
:is-open="isOpen"
|
6
7
|
:position="position"
|
@@ -36,7 +37,11 @@
|
|
36
37
|
|
37
38
|
const ContentContainer = styled.div``
|
38
39
|
|
39
|
-
const pageAttrs = {
|
40
|
+
const pageAttrs = {
|
41
|
+
backdrop: String,
|
42
|
+
position: String,
|
43
|
+
addPaddingTop: Boolean,
|
44
|
+
}
|
40
45
|
const PageWrapper = styled('div', pageAttrs)`
|
41
46
|
position: ${(props) => props.position}
|
42
47
|
display: grid;
|
@@ -50,7 +55,7 @@
|
|
50
55
|
: 'rgba(255, 255, 255, 0.9)'};
|
51
56
|
z-index: 99999;
|
52
57
|
overflow: auto;
|
53
|
-
padding-top: 80px;
|
58
|
+
padding-top: ${(props) => (props.addPaddingTop ? '80px' : '0')};
|
54
59
|
|
55
60
|
@media (max-width: 425px) {
|
56
61
|
background: white;
|
@@ -148,6 +153,10 @@
|
|
148
153
|
type: String,
|
149
154
|
default: 'auto',
|
150
155
|
},
|
156
|
+
addPaddingTop: {
|
157
|
+
type: Boolean,
|
158
|
+
default: false,
|
159
|
+
},
|
151
160
|
},
|
152
161
|
watch: {
|
153
162
|
isOpen: {
|
@@ -12,50 +12,30 @@
|
|
12
12
|
:is-active="activeTab === item.key || activeParentTab === item.key"
|
13
13
|
@click="$emit('tab-click', { activeKey: item.key })"
|
14
14
|
>
|
15
|
-
<IconContainer
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
? theme.colors.white
|
20
|
-
: theme.colors.primary
|
21
|
-
"
|
22
|
-
cursor="pointer"
|
23
|
-
:name="item.icon"
|
24
|
-
size="18px"
|
25
|
-
/>
|
15
|
+
<IconContainer
|
16
|
+
:is-active="activeTab === item.key || activeParentTab === item.key"
|
17
|
+
>
|
18
|
+
<Icon color="#fff" cursor="pointer" :name="item.icon" size="18px" />
|
26
19
|
</IconContainer>
|
27
|
-
<ListText
|
28
|
-
$gettext(item.label)
|
29
|
-
}}</ListText>
|
20
|
+
<ListText>{{ $gettext(item.label) }}</ListText>
|
30
21
|
</ListItem>
|
31
22
|
<CollapseWrapper v-else :key="idx + item.key">
|
32
23
|
<CollapseContainer
|
33
24
|
:data-id="`sub_menu_settings_${item.key}`"
|
34
|
-
:is-active="activeParentTab === item.key"
|
35
25
|
@click="toggleActiveDropdown(item.key)"
|
36
26
|
>
|
37
27
|
<IconContainer :is-active="activeParentTab === item.key">
|
38
28
|
<Icon
|
39
|
-
|
40
|
-
activeParentTab === item.key
|
41
|
-
? theme.colors.white
|
42
|
-
: theme.colors.primary
|
43
|
-
"
|
29
|
+
color="#fff"
|
44
30
|
cursor="pointer"
|
45
31
|
:name="item.icon"
|
46
32
|
size="18px"
|
47
33
|
/>
|
48
34
|
</IconContainer>
|
49
|
-
<ListText
|
50
|
-
$gettext(item.label)
|
51
|
-
}}</ListText>
|
35
|
+
<ListText>{{ $gettext(item.label) }}</ListText>
|
52
36
|
<ArrowContainer>
|
53
37
|
<Icon
|
54
|
-
|
55
|
-
activeDropdown === item.key
|
56
|
-
? theme.colors.white
|
57
|
-
: theme.colors.primary
|
58
|
-
"
|
38
|
+
color="white"
|
59
39
|
:name="activeDropdown === item.key ? 'arrow_up' : 'arrow_down'"
|
60
40
|
size="10px"
|
61
41
|
/>
|
@@ -88,7 +68,7 @@
|
|
88
68
|
@click="$emit('on-logout')"
|
89
69
|
>
|
90
70
|
<RotateIcon
|
91
|
-
|
71
|
+
color="#fff"
|
92
72
|
cursor="pointer"
|
93
73
|
name="initial_situation"
|
94
74
|
size="18px"
|
@@ -103,17 +83,16 @@
|
|
103
83
|
import styled from 'vue3-styled-components'
|
104
84
|
import Icon from '../icon'
|
105
85
|
import Spinner from '../spinner'
|
106
|
-
import theme from '@/assets/theme.js'
|
107
86
|
|
108
87
|
const PageAttrs = { isLoading: Boolean }
|
109
88
|
const PageContainer = styled('div', PageAttrs)`
|
110
|
-
background-color: ${(props) =>
|
89
|
+
background-color: ${(props) =>
|
90
|
+
props.isLoading ? props.theme.colors.white : props.theme.colors.grey6};
|
111
91
|
padding: 14px 12px;
|
112
92
|
min-width: 220px;
|
113
93
|
display: flex;
|
114
94
|
flex-direction: column;
|
115
95
|
justify-content: space-between;
|
116
|
-
border-right: 1px solid rgba(89, 0, 204, 0.2);
|
117
96
|
`
|
118
97
|
|
119
98
|
const ListContainer = styled.div`
|
@@ -132,19 +111,17 @@
|
|
132
111
|
padding: 4px;
|
133
112
|
border-radius: 6px;
|
134
113
|
background-color: ${(props) =>
|
135
|
-
props.isActive ?
|
114
|
+
props.isActive ? 'rgba(255, 255, 255, 0.1)' : ''};
|
136
115
|
|
137
116
|
:hover {
|
138
|
-
background-color: rgba(
|
117
|
+
background-color: rgba(255, 255, 255, 0.1);
|
139
118
|
}
|
140
119
|
`
|
141
120
|
|
142
|
-
const
|
143
|
-
const ListText = styled('div', ListTextAttrs)`
|
121
|
+
const ListText = styled.div`
|
144
122
|
font-size: 16px;
|
145
123
|
font-weight: 700;
|
146
|
-
color: ${(props) =>
|
147
|
-
props.isActive ? props.theme.colors.white : props.theme.colors.primary};
|
124
|
+
color: ${(props) => props.theme.colors.white};
|
148
125
|
`
|
149
126
|
|
150
127
|
const IconContainer = styled('div', IconAttrs)`
|
@@ -153,16 +130,18 @@
|
|
153
130
|
justify-items: center;
|
154
131
|
width: 32px;
|
155
132
|
height: 32px;
|
133
|
+
background-color: ${(props) =>
|
134
|
+
props.isActive ? props.theme.colors.red : 'rgba(255, 255, 255, 0.2)'};
|
156
135
|
border-radius: 6px;
|
157
136
|
|
158
137
|
${({ isButton = false }) =>
|
159
138
|
isButton &&
|
160
139
|
`
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
140
|
+
cursor: pointer;
|
141
|
+
&:hover {
|
142
|
+
background-color: rgba(255, 255, 255, 0.3);
|
143
|
+
}
|
144
|
+
`}
|
166
145
|
`
|
167
146
|
|
168
147
|
const SpinnerContainer = styled.div`
|
@@ -182,7 +161,7 @@
|
|
182
161
|
const AppVersion = styled.p`
|
183
162
|
font-size: 11px;
|
184
163
|
line-height: 13px;
|
185
|
-
color: ${(props) => props.theme.colors.
|
164
|
+
color: ${(props) => props.theme.colors.white};
|
186
165
|
margin-right: 6px;
|
187
166
|
`
|
188
167
|
|
@@ -196,19 +175,20 @@
|
|
196
175
|
margin-left: 65px;
|
197
176
|
padding: 8px;
|
198
177
|
border-radius: 6px;
|
199
|
-
color: ${(props) =>
|
200
|
-
props.isActive ? props.theme.colors.white : props.theme.colors.primary};
|
178
|
+
color: ${(props) => props.theme.colors.white};
|
201
179
|
font-weight: 700;
|
202
|
-
|
203
|
-
|
180
|
+
${({ isActive }) =>
|
181
|
+
isActive &&
|
182
|
+
`
|
183
|
+
background: rgba(255, 255, 255, 0.1);
|
184
|
+
`}
|
204
185
|
|
205
186
|
&:hover {
|
206
|
-
background: rgba(
|
187
|
+
background: rgba(255, 255, 255, 0.1);
|
207
188
|
}
|
208
189
|
`
|
209
190
|
|
210
|
-
const
|
211
|
-
const CollapseContainer = styled('div', CollapseContainerAttrs)`
|
191
|
+
const CollapseContainer = styled.div`
|
212
192
|
display: grid;
|
213
193
|
grid-template-columns: auto 1fr auto;
|
214
194
|
grid-gap: 20px;
|
@@ -216,16 +196,8 @@
|
|
216
196
|
border-radius: 6px;
|
217
197
|
align-items: center;
|
218
198
|
cursor: pointer;
|
219
|
-
background: ${(props) =>
|
220
|
-
props.isActive ? props.theme.colors.primary : ''};
|
221
|
-
|
222
199
|
&:hover {
|
223
|
-
background: rgba(
|
224
|
-
}
|
225
|
-
|
226
|
-
div {
|
227
|
-
color: ${(props) =>
|
228
|
-
props.isActive ? props.theme.colors.white : props.theme.colors.primary};
|
200
|
+
background: rgba(255, 255, 255, 0.1);
|
229
201
|
}
|
230
202
|
`
|
231
203
|
|
@@ -282,9 +254,17 @@
|
|
282
254
|
data() {
|
283
255
|
return {
|
284
256
|
activeDropdown: null,
|
285
|
-
theme,
|
286
257
|
}
|
287
258
|
},
|
259
|
+
methods: {
|
260
|
+
toggleActiveDropdown(value) {
|
261
|
+
if (this.activeDropdown === value) {
|
262
|
+
this.activeDropdown = null
|
263
|
+
} else {
|
264
|
+
this.activeDropdown = value
|
265
|
+
}
|
266
|
+
},
|
267
|
+
},
|
288
268
|
watch: {
|
289
269
|
activeTab: {
|
290
270
|
// once active tab is received, check if any parent
|
@@ -297,14 +277,5 @@
|
|
297
277
|
once: true,
|
298
278
|
},
|
299
279
|
},
|
300
|
-
methods: {
|
301
|
-
toggleActiveDropdown(value) {
|
302
|
-
if (this.activeDropdown === value) {
|
303
|
-
this.activeDropdown = null
|
304
|
-
} else {
|
305
|
-
this.activeDropdown = value
|
306
|
-
}
|
307
|
-
},
|
308
|
-
},
|
309
280
|
}
|
310
281
|
</script>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<template>
|
2
|
-
<SpinnerContainer
|
3
|
-
v-if="fullWidth"
|
4
|
-
data-test-id="spinner_full_container"
|
5
|
-
:size="size"
|
6
|
-
>
|
2
|
+
<SpinnerContainer v-if="fullWidth" data-test-id="spinner_full_container">
|
7
3
|
<Container>
|
8
|
-
<SpinnerWrapper data-test-id="spinner_full_wrapper"
|
9
|
-
<
|
4
|
+
<SpinnerWrapper data-test-id="spinner_full_wrapper">
|
5
|
+
<SpinnerSvg
|
6
|
+
:class="{ white: isWhite }"
|
7
|
+
data-test-id="spinner_full_icon"
|
8
|
+
:style="{ width: size, height: size }"
|
9
|
+
/>
|
10
10
|
</SpinnerWrapper>
|
11
11
|
</Container>
|
12
12
|
</SpinnerContainer>
|
@@ -15,14 +15,21 @@
|
|
15
15
|
data-test-id="spinner_container"
|
16
16
|
:limited-to-modal="limitedToModal"
|
17
17
|
>
|
18
|
-
<SpinnerWrapper data-test-id="spinner_wrapper"
|
19
|
-
<
|
18
|
+
<SpinnerWrapper data-test-id="spinner_wrapper">
|
19
|
+
<SpinnerSvg
|
20
|
+
:class="{ white: isWhite }"
|
21
|
+
data-test-id="spinner_icon"
|
22
|
+
:style="{ width: size, height: size }"
|
23
|
+
/>
|
20
24
|
</SpinnerWrapper>
|
21
25
|
</Container>
|
22
26
|
</template>
|
23
27
|
|
24
28
|
<script>
|
29
|
+
// import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
|
30
|
+
// <spinner size="30px" />
|
25
31
|
import styled from 'vue3-styled-components'
|
32
|
+
import SpinnerSvg from '../../assets/icons/black_spinner.svg'
|
26
33
|
|
27
34
|
const SpinnerContainer = styled.div`
|
28
35
|
position: fixed;
|
@@ -36,72 +43,35 @@
|
|
36
43
|
justify-items: center;
|
37
44
|
z-index: 100;
|
38
45
|
`
|
39
|
-
|
40
46
|
const containerAttrs = { limitedToModal: Boolean }
|
41
47
|
const Container = styled('div', containerAttrs)`
|
42
48
|
display: grid;
|
43
49
|
align-items: center;
|
44
50
|
justify-items: center;
|
45
51
|
position: ${(props) => (props.limitedToModal ? 'absolute' : 'inherit')};
|
46
|
-
height: ${(props) => (props.limitedToModal ? '100%' : '
|
47
|
-
width: ${(props) => (props.limitedToModal ? '100%' : '
|
52
|
+
height: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
|
53
|
+
width: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
|
48
54
|
`
|
49
55
|
|
50
|
-
const
|
51
|
-
|
52
|
-
|
53
|
-
props.size === 'large'
|
54
|
-
? '56px'
|
55
|
-
: props.size === 'medium'
|
56
|
-
? '40px'
|
57
|
-
: '24px'};
|
58
|
-
height: ${(props) =>
|
59
|
-
props.size === 'large'
|
60
|
-
? '56px'
|
61
|
-
: props.size === 'medium'
|
62
|
-
? '40px'
|
63
|
-
: '24px'};
|
64
|
-
`
|
65
|
-
|
66
|
-
const circleAttrs = { size: String, isWhite: Boolean }
|
67
|
-
const SpinnerCircle = styled('div', circleAttrs)`
|
68
|
-
width: 100%;
|
69
|
-
height: 100%;
|
70
|
-
border-radius: 100%;
|
71
|
-
border: ${(props) => (props.size === 'large' ? '4px' : '2px')} solid
|
72
|
-
${(props) =>
|
73
|
-
props.isWhite ? props.theme.colors.grey5 : props.theme.colors.white};
|
74
|
-
border-top-color: ${(props) =>
|
75
|
-
props.isWhite ? props.theme.colors.white : props.theme.colors.primary};
|
76
|
-
border-right-color: ${(props) =>
|
77
|
-
props.isWhite ? props.theme.colors.white : props.theme.colors.primary};
|
78
|
-
border-bottom-color: ${(props) =>
|
79
|
-
props.isWhite ? props.theme.colors.white : props.theme.colors.primary};
|
80
|
-
animation: spin 1s linear infinite;
|
81
|
-
transform: rotate(90deg);
|
56
|
+
const SpinnerWrapper = styled.div`
|
57
|
+
width: ${(props) => (props.size ? props.size : '60px')};
|
58
|
+
height: auto;
|
82
59
|
|
83
|
-
|
84
|
-
|
85
|
-
transform: rotate(450deg);
|
86
|
-
}
|
60
|
+
.white {
|
61
|
+
filter: brightness(0) invert(1);
|
87
62
|
}
|
88
63
|
`
|
89
64
|
|
90
65
|
export default {
|
91
|
-
name: '
|
66
|
+
name: 'SpinnerComponent',
|
92
67
|
components: {
|
93
|
-
SpinnerContainer,
|
94
|
-
SpinnerCircle,
|
95
68
|
Container,
|
96
69
|
SpinnerWrapper,
|
70
|
+
SpinnerContainer,
|
71
|
+
SpinnerSvg,
|
97
72
|
},
|
98
73
|
props: {
|
99
|
-
|
100
|
-
type: String,
|
101
|
-
default: 'medium',
|
102
|
-
validator: (value) => ['small', 'medium', 'large'].includes(value),
|
103
|
-
},
|
104
|
-
isWhite: {
|
74
|
+
fullWidth: {
|
105
75
|
required: false,
|
106
76
|
default: false,
|
107
77
|
type: Boolean,
|
@@ -111,7 +81,12 @@
|
|
111
81
|
default: false,
|
112
82
|
type: Boolean,
|
113
83
|
},
|
114
|
-
|
84
|
+
size: {
|
85
|
+
required: false,
|
86
|
+
default: '60px',
|
87
|
+
type: String,
|
88
|
+
},
|
89
|
+
isWhite: {
|
115
90
|
required: false,
|
116
91
|
default: false,
|
117
92
|
type: Boolean,
|
@@ -25,19 +25,18 @@
|
|
25
25
|
item.type === 'template')
|
26
26
|
"
|
27
27
|
/>
|
28
|
-
<
|
28
|
+
<TemplateButton
|
29
29
|
v-if="
|
30
30
|
item.type &&
|
31
31
|
item.type === 'template' &&
|
32
32
|
(item.value === '' || item.value === '-')
|
33
33
|
"
|
34
34
|
:key="index + '_button'"
|
35
|
-
|
36
|
-
:text="$gettext('Use template...')"
|
37
|
-
:type="primary"
|
38
|
-
:variant="showArchived ? 'cancel' : 'main'"
|
35
|
+
:show-archived="showArchived"
|
39
36
|
@click.stop="onTemplateClick(item.row)"
|
40
|
-
|
37
|
+
>
|
38
|
+
{{ $gettext('Use template...') }}
|
39
|
+
</TemplateButton>
|
41
40
|
<TemplateLink
|
42
41
|
v-else-if="
|
43
42
|
item.type && item.type === 'template' && item.value !== ''
|
@@ -122,7 +121,7 @@
|
|
122
121
|
@on-change="onSearch($event)"
|
123
122
|
/>
|
124
123
|
</SearchContainer>
|
125
|
-
<Spinner v-if="optionsLoading"
|
124
|
+
<Spinner v-if="optionsLoading" />
|
126
125
|
<EmptyText v-else-if="!optionsLoading && !optionItems.length">
|
127
126
|
{{ emptyText ? emptyText : $gettext('No components found.') }}
|
128
127
|
</EmptyText>
|
@@ -140,13 +139,12 @@
|
|
140
139
|
<span v-if="option !== 'template'">
|
141
140
|
{{ !!item[option] ? item[option] : '-' }}
|
142
141
|
</span>
|
143
|
-
<
|
142
|
+
<TemplateButton
|
144
143
|
v-else-if="option === 'template' && item.has_template"
|
145
|
-
button-size="small"
|
146
|
-
:text="$gettext('Use template...')"
|
147
|
-
:type="primary"
|
148
144
|
@click.stop="onTemplateClick(item)"
|
149
|
-
|
145
|
+
>
|
146
|
+
{{ $gettext('Use template...') }}
|
147
|
+
</TemplateButton>
|
150
148
|
<NoTemplate
|
151
149
|
v-else-if="option === 'template' && !item.has_template"
|
152
150
|
>
|
@@ -200,7 +198,6 @@
|
|
200
198
|
import Icon from '../icon'
|
201
199
|
import theme from '@/assets/theme.js'
|
202
200
|
import InfoText from '../infoText'
|
203
|
-
import MainButton from '../buttons/mainButton'
|
204
201
|
|
205
202
|
const rowAttrs = { disabled: Boolean, isOpen: Boolean }
|
206
203
|
const DropdownRow = styled('div', rowAttrs)`
|
@@ -359,6 +356,17 @@
|
|
359
356
|
`
|
360
357
|
|
361
358
|
const templateAttrs = { showArchived: Boolean }
|
359
|
+
const TemplateButton = styled('div', templateAttrs)`
|
360
|
+
cursor: pointer;
|
361
|
+
background-color: #263238;
|
362
|
+
color: ${(props) =>
|
363
|
+
props.showArchived ? props.theme.colors.red : props.theme.colors.white};
|
364
|
+
padding: 4px 10px;
|
365
|
+
display: inline-block;
|
366
|
+
border-radius: 4px;
|
367
|
+
text-align: center;
|
368
|
+
margin-left: 15px;
|
369
|
+
`
|
362
370
|
|
363
371
|
const NoTemplate = styled('div', templateAttrs)`
|
364
372
|
color: ${(props) =>
|
@@ -458,7 +466,7 @@
|
|
458
466
|
OptionsWrapper,
|
459
467
|
OptionsItem,
|
460
468
|
SearchContainer,
|
461
|
-
|
469
|
+
TemplateButton,
|
462
470
|
NoTemplate,
|
463
471
|
TemplateLink,
|
464
472
|
InputText,
|
@@ -91,7 +91,7 @@
|
|
91
91
|
}
|
92
92
|
|
93
93
|
::-webkit-scrollbar-thumb {
|
94
|
-
border-bottom: 10px solid ${(props) => props.theme.colors.
|
94
|
+
border-bottom: 10px solid ${(props) => props.theme.colors.brightBlue}; // width of the actual scrollbar
|
95
95
|
border-radius: 4px;
|
96
96
|
}
|
97
97
|
`
|
@@ -154,7 +154,7 @@
|
|
154
154
|
|
155
155
|
th {
|
156
156
|
padding: 11px 15px;
|
157
|
-
background-color: ${(props) => props.theme.colors.
|
157
|
+
background-color: ${(props) => props.theme.colors.blue1};
|
158
158
|
cursor: auto;
|
159
159
|
height: 40px;
|
160
160
|
|
@@ -1,5 +0,0 @@
|
|
1
|
-
<svg width="12" height="11" viewBox="0 0 12 11" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.48791 8.60607C2.0063 8.2283 2.71145 7.71445 3.97197 7.71445C4.5703 7.71445 5.04544 7.82349 5.45393 7.99996C5.84112 8.16724 6.14723 8.38769 6.39326 8.56488L6.4106 8.57737C6.67117 8.76496 6.86936 8.90486 7.10995 9.00878C7.33842 9.10745 7.62765 9.18186 8.04848 9.18186C8.83404 9.18186 9.16094 8.94855 9.63985 8.60676C9.77269 8.51195 9.91723 8.4088 10.0865 8.29996C10.405 8.09514 10.8293 8.18732 11.0341 8.50586C11.2389 8.82439 11.1467 9.24866 10.8282 9.45348C10.7333 9.5145 10.6339 9.58693 10.5267 9.66506C10.0086 10.0426 9.3078 10.5533 8.04848 10.5533C7.45001 10.5533 6.97476 10.4442 6.56619 10.2678C6.17879 10.1005 5.87258 9.87993 5.62647 9.70269L5.60933 9.69035C5.34871 9.50272 5.15058 9.36282 4.91005 9.25891C4.68167 9.16025 4.39259 9.08586 3.97197 9.08586C3.18671 9.08586 2.8624 9.31732 2.38624 9.65715C2.24614 9.75714 2.09289 9.86651 1.91089 9.98213C1.59124 10.1852 1.16749 10.0907 0.964421 9.77102C0.761356 9.45136 0.855873 9.02761 1.17553 8.82455C1.27346 8.76234 1.37636 8.68735 1.48791 8.60607Z" fill="#5900CC"/>
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.48791 5.17755C2.0063 4.79979 2.71145 4.28594 3.97197 4.28594C4.5703 4.28594 5.04544 4.39497 5.45393 4.57145C5.84112 4.73872 6.14723 4.95918 6.39326 5.13636L6.4106 5.14885C6.67117 5.33645 6.86936 5.47635 7.10995 5.58026C7.33842 5.67894 7.62765 5.75334 8.04848 5.75334C8.83404 5.75334 9.16094 5.52004 9.63985 5.17824C9.77269 5.08344 9.91723 4.98028 10.0865 4.87144C10.405 4.66662 10.8293 4.75881 11.0341 5.07734C11.2389 5.39588 11.1467 5.82014 10.8282 6.02496C10.7333 6.08599 10.6339 6.15842 10.5267 6.23654C10.0086 6.61409 9.3078 7.12475 8.04848 7.12475C7.45001 7.12475 6.97476 7.01572 6.56619 6.83926C6.17879 6.67194 5.87258 6.45142 5.62647 6.27417L5.60933 6.26183C5.34871 6.0742 5.15058 5.93431 4.91005 5.83039C4.68167 5.73173 4.39259 5.65734 3.97197 5.65734C3.18671 5.65734 2.8624 5.88881 2.38624 6.22864C2.24614 6.32863 2.09289 6.438 1.91089 6.55361C1.59124 6.75668 1.16749 6.66216 0.964421 6.3425C0.761356 6.02285 0.855873 5.5991 1.17553 5.39603C1.27346 5.33382 1.37636 5.25884 1.48791 5.17755Z" fill="#5900CC"/>
|
4
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.48791 1.74904C2.0063 1.37127 2.71145 0.857422 3.97197 0.857422C4.5703 0.857422 5.04544 0.966459 5.45393 1.14293C5.84112 1.31021 6.14723 1.53066 6.39326 1.70785L6.4106 1.72034C6.67117 1.90793 6.86936 2.04783 7.10995 2.15175C7.33842 2.25042 7.62765 2.32483 8.04848 2.32483C8.83404 2.32483 9.16094 2.09152 9.63985 1.74973C9.77269 1.65492 9.91723 1.55177 10.0865 1.44293C10.405 1.23811 10.8293 1.33029 11.0341 1.64883C11.2389 1.96736 11.1467 2.39163 10.8282 2.59645C10.7333 2.65747 10.6339 2.7299 10.5267 2.80803C10.0086 3.18557 9.3078 3.69623 8.04848 3.69623C7.45001 3.69623 6.97476 3.58721 6.56619 3.41075C6.17879 3.24343 5.87258 3.0229 5.62647 2.84566L5.60933 2.83332C5.34871 2.64569 5.15058 2.50579 4.91005 2.40188C4.68167 2.30322 4.39259 2.22883 3.97197 2.22883C3.18671 2.22883 2.8624 2.46029 2.38624 2.80012C2.24614 2.90011 2.09289 3.00948 1.91089 3.1251C1.59124 3.32816 1.16749 3.23365 0.964421 2.91399C0.761356 2.59433 0.855873 2.17058 1.17553 1.96752C1.27346 1.90531 1.37636 1.83032 1.48791 1.74904Z" fill="#5900CC"/>
|
5
|
-
</svg>
|