@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.0 → 7.24.3-EPDM-11143.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/.prettierrc +7 -0
- package/package.json +20 -6
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +70 -75
- package/src/assets/svgIcons/copy.svg +10 -0
- package/src/components/addNewButton/index.vue +27 -24
- package/src/components/banner/actionBanner/index.vue +30 -32
- package/src/components/banner/banner/index.vue +80 -88
- package/src/components/banner/infoBanner/index.vue +44 -36
- package/src/components/buttons/buttonIcon/index.vue +78 -83
- package/src/components/buttons/closeButton/index.vue +26 -26
- package/src/components/buttons/mainButton/index.vue +76 -80
- package/src/components/card/index.vue +52 -56
- package/src/components/collapsableInfoText/index.vue +76 -81
- package/src/components/deleteIcon/index.vue +28 -31
- package/src/components/draggableInputHandle/index.vue +17 -20
- package/src/components/dropdown/Dropdown.stories.js +8 -8
- package/src/components/dropdown/index.vue +72 -75
- package/src/components/errorMessage/index.vue +23 -23
- package/src/components/filter/filterSettings.vue +329 -349
- package/src/components/filter/index.vue +130 -130
- package/src/components/filter/parentDropdown.vue +40 -43
- package/src/components/icon/Icons.stories.js +4 -4
- package/src/components/icon/iconCache.js +1 -1
- package/src/components/icon/iconCollection.vue +37 -40
- package/src/components/icon/index.vue +65 -72
- package/src/components/iconWrapper/index.vue +118 -122
- package/src/components/infoCard/index.vue +17 -20
- package/src/components/infoText/index.vue +82 -88
- package/src/components/inputs/checkbox/index.vue +94 -91
- package/src/components/inputs/inputNumber/index.vue +488 -508
- package/src/components/inputs/inputNumberQuestion/index.vue +124 -127
- package/src/components/inputs/inputText/index.vue +252 -265
- package/src/components/inputs/radioButton/index.vue +120 -135
- package/src/components/inputs/searchInput/index.vue +81 -84
- package/src/components/inputs/select/index.vue +631 -644
- 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 +152 -159
- package/src/components/inputs/textAreaInput/index.vue +113 -120
- package/src/components/inputs/toggle/index.vue +127 -137
- package/src/components/label/index.vue +61 -64
- package/src/components/markerItem/index.vue +40 -40
- package/src/components/modals/actionModal/index.vue +29 -32
- package/src/components/modals/infoModal/index.vue +27 -34
- package/src/components/modals/modal/index.vue +80 -88
- package/src/components/navigationTabs/index.vue +47 -50
- package/src/components/pageSubtitle/index.vue +29 -33
- package/src/components/pageTitle/index.vue +39 -47
- package/src/components/pagination/index.vue +62 -64
- package/src/components/progressBar/index.vue +67 -70
- package/src/components/projectMarker/index.vue +163 -172
- package/src/components/rangeSlider/Slider.vue +449 -449
- package/src/components/rangeSlider/index.vue +270 -282
- package/src/components/rangeSlider/utils/dom.js +3 -3
- package/src/components/selectedOptions/index.vue +51 -51
- package/src/components/sideMenu/index.vue +109 -117
- package/src/components/spinner/index.vue +34 -37
- package/src/components/tableDropdown/index.vue +326 -343
- package/src/components/tables/mainTable/index.vue +106 -109
- package/src/components/tables/viewTable/index.vue +92 -105
- package/src/components/threeDots/index.vue +171 -174
- package/src/components/videoThumbnail/index.vue +59 -67
- package/src/components/videoThumbnail/videoThumbnail.stories.js +6 -6
- package/.eslintrc.js +0 -125
@@ -1,18 +1,10 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
:color="color"
|
5
|
-
:font-size="fontSize"
|
6
|
-
:uppercase="uppercase"
|
7
|
-
>
|
2
|
+
<title-wrap :hasInfoText="!!infoText">
|
3
|
+
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
|
8
4
|
{{ text }}
|
9
|
-
</
|
10
|
-
<
|
11
|
-
|
12
|
-
:align-arrow="infoAlign"
|
13
|
-
:text="infoText"
|
14
|
-
/>
|
15
|
-
</TitleWrap>
|
5
|
+
</title-text>
|
6
|
+
<info-text v-if="!!infoText" :text="infoText" :alignArrow="infoAlign" />
|
7
|
+
</title-wrap>
|
16
8
|
</template>
|
17
9
|
|
18
10
|
<script>
|
@@ -22,55 +14,55 @@
|
|
22
14
|
// text="My Page Title"
|
23
15
|
// color="red"
|
24
16
|
// />
|
25
|
-
|
26
|
-
|
17
|
+
import styled from 'vue3-styled-components'
|
18
|
+
import InfoText from '../infoText'
|
27
19
|
|
28
|
-
|
29
|
-
|
20
|
+
const wrapAttrs = { hasInfoText: Boolean }
|
21
|
+
const TitleWrap = styled('div', wrapAttrs)`
|
30
22
|
display: grid;
|
31
23
|
align-items: center;
|
32
24
|
grid-gap: 12px;
|
33
25
|
grid-template-columns: ${(props) =>
|
34
|
-
|
26
|
+
props.hasInfoText ? 'auto auto 1fr' : '1fr'};
|
35
27
|
margin-bottom: 20px;
|
36
28
|
`
|
37
29
|
|
38
|
-
|
39
|
-
|
30
|
+
const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
31
|
+
const TitleText = styled('span', titleAttrs)`
|
40
32
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
41
33
|
font-weight: bold;
|
42
34
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '18px')};
|
43
35
|
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
44
36
|
`
|
45
37
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
38
|
+
export default {
|
39
|
+
name: 'page-title',
|
40
|
+
components: {
|
41
|
+
TitleText,
|
42
|
+
TitleWrap,
|
43
|
+
InfoText
|
44
|
+
},
|
45
|
+
props: {
|
46
|
+
text: {
|
47
|
+
required: true
|
52
48
|
},
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
default: null
|
70
|
-
},
|
71
|
-
infoAlign: {
|
72
|
-
required: false
|
73
|
-
}
|
49
|
+
color: {
|
50
|
+
required: false
|
51
|
+
},
|
52
|
+
fontSize: {
|
53
|
+
required: false
|
54
|
+
},
|
55
|
+
uppercase: {
|
56
|
+
required: false,
|
57
|
+
default: true
|
58
|
+
},
|
59
|
+
infoText: {
|
60
|
+
required: false,
|
61
|
+
default: null
|
62
|
+
},
|
63
|
+
infoAlign: {
|
64
|
+
required: false
|
74
65
|
}
|
75
66
|
}
|
67
|
+
}
|
76
68
|
</script>
|
@@ -1,82 +1,80 @@
|
|
1
1
|
<template>
|
2
2
|
<!-- Check, if pages more than 1 -->
|
3
|
-
<
|
3
|
+
<paginationWrapper v-if="paginationParams.pages > 1">
|
4
4
|
<!-- Back button -->
|
5
|
-
<
|
5
|
+
<paginationLink
|
6
6
|
v-if="paginationParams.previous"
|
7
7
|
@click="fetchPage(paginationParams.previous)"
|
8
8
|
>
|
9
|
-
<
|
10
|
-
<
|
11
|
-
:color="getTheme.colors.brightBlue"
|
9
|
+
<arrowIconContainer>
|
10
|
+
<icon
|
12
11
|
name="arrow_left"
|
12
|
+
:color="getTheme.colors.brightBlue"
|
13
13
|
size="12px"
|
14
14
|
/>
|
15
|
-
</
|
16
|
-
<
|
17
|
-
</
|
15
|
+
</arrowIconContainer>
|
16
|
+
<arrowText>{{ $gettext('back') }}</arrowText>
|
17
|
+
</paginationLink>
|
18
18
|
|
19
19
|
<!-- First page -->
|
20
|
-
<
|
20
|
+
<paginationLink
|
21
21
|
v-if="currentPage > 2 && paginationParams.pages > 3"
|
22
22
|
@click="fetchPage(1)"
|
23
|
+
>1</paginationLink
|
23
24
|
>
|
24
|
-
1
|
25
|
-
</PaginationLink>
|
26
25
|
|
27
26
|
<!-- Back tree dots -->
|
28
27
|
<span v-if="currentPage > 3 && paginationParams.pages > 4">...</span>
|
29
28
|
|
30
29
|
<!-- Current block -->
|
31
|
-
<
|
30
|
+
<paginationLink
|
32
31
|
v-for="number in paginationNumbers()"
|
33
32
|
:key="number"
|
34
33
|
:class="[currentPage === number ? 'active' : '']"
|
35
34
|
@click="fetchPage(number)"
|
35
|
+
>{{ number }}</paginationLink
|
36
36
|
>
|
37
|
-
{{ number }}
|
38
|
-
</PaginationLink>
|
39
37
|
|
40
38
|
<!-- Forward tree dots -->
|
41
39
|
<span
|
42
40
|
v-if="
|
43
41
|
paginationParams.pages - currentPage > 2 && paginationParams.pages > 4
|
44
42
|
"
|
45
|
-
|
43
|
+
>...</span
|
44
|
+
>
|
46
45
|
|
47
46
|
<!-- End page -->
|
48
|
-
<
|
47
|
+
<paginationLink
|
49
48
|
v-if="
|
50
49
|
paginationParams.pages - currentPage > 1 && paginationParams.pages > 3
|
51
50
|
"
|
52
51
|
@click="fetchPage(paginationParams.pages)"
|
52
|
+
>{{ paginationParams.pages }}</paginationLink
|
53
53
|
>
|
54
|
-
{{ paginationParams.pages }}
|
55
|
-
</PaginationLink>
|
56
54
|
|
57
55
|
<!-- Forward button -->
|
58
|
-
<
|
56
|
+
<paginationLink
|
59
57
|
v-if="paginationParams.next"
|
60
58
|
@click="fetchPage(paginationParams.next)"
|
61
59
|
>
|
62
|
-
<
|
63
|
-
<
|
64
|
-
<
|
65
|
-
:color="getTheme.colors.brightBlue"
|
60
|
+
<arrowText>{{ $gettext('forward') }}</arrowText>
|
61
|
+
<arrowIconContainer>
|
62
|
+
<icon
|
66
63
|
name="arrow_right"
|
64
|
+
:color="getTheme.colors.brightBlue"
|
67
65
|
size="12px"
|
68
66
|
/>
|
69
|
-
</
|
70
|
-
</
|
71
|
-
</
|
67
|
+
</arrowIconContainer>
|
68
|
+
</paginationLink>
|
69
|
+
</paginationWrapper>
|
72
70
|
</template>
|
73
71
|
|
74
72
|
<script>
|
75
|
-
|
76
|
-
|
77
|
-
|
73
|
+
import styled from 'vue3-styled-components'
|
74
|
+
import icon from '../icon'
|
75
|
+
import theme from '@/assets/theme.js'
|
78
76
|
|
79
|
-
|
77
|
+
const paginationWrapper = styled.nav`
|
80
78
|
color: ${(props) => props.theme.colors.brightBlue};
|
81
79
|
font-size: 13px;
|
82
80
|
display: flex;
|
@@ -84,7 +82,7 @@
|
|
84
82
|
justify-content: flex-end;
|
85
83
|
align-items: center;
|
86
84
|
`
|
87
|
-
|
85
|
+
const paginationLink = styled.div`
|
88
86
|
display: flex;
|
89
87
|
padding: 0px 5px;
|
90
88
|
margin: 0 2px;
|
@@ -101,47 +99,47 @@
|
|
101
99
|
border-radius: 4px;
|
102
100
|
}
|
103
101
|
`
|
104
|
-
|
102
|
+
const arrowText = styled.div`
|
105
103
|
color: ${(props) => props.theme.colors.brightBlue};
|
106
104
|
`
|
107
|
-
|
105
|
+
const arrowIconContainer = styled.div`
|
108
106
|
margin: 0 10px;
|
109
107
|
display: flex;
|
110
108
|
align-items: center;
|
111
109
|
`
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
110
|
+
export default {
|
111
|
+
name: 'pagination-component',
|
112
|
+
components: {
|
113
|
+
paginationWrapper,
|
114
|
+
paginationLink,
|
115
|
+
icon,
|
116
|
+
arrowText,
|
117
|
+
arrowIconContainer
|
118
|
+
},
|
119
|
+
props: ['fetchPage', 'currentPage', 'paginationParams'],
|
120
|
+
computed: {
|
121
|
+
getTheme() {
|
122
|
+
return theme
|
123
|
+
}
|
124
|
+
},
|
125
|
+
methods: {
|
126
|
+
getNewProjects(num) {
|
127
|
+
this.$emit('on-pagination-change', num)
|
126
128
|
},
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
? next
|
140
|
-
? [n - 1, n, n + 1]
|
141
|
-
: [n - 2, n - 1, n]
|
142
|
-
: [n, n + 1, n + 2]
|
143
|
-
}
|
129
|
+
paginationNumbers() {
|
130
|
+
const prev = this.paginationParams.previous
|
131
|
+
const next = this.paginationParams.next
|
132
|
+
const n = prev + 1 || next - 1
|
133
|
+
if (this.paginationParams.pages === 2) {
|
134
|
+
return prev ? [n - 1, n] : [n, n + 1]
|
135
|
+
} else {
|
136
|
+
return prev
|
137
|
+
? next
|
138
|
+
? [n - 1, n, n + 1]
|
139
|
+
: [n - 2, n - 1, n]
|
140
|
+
: [n, n + 1, n + 2]
|
144
141
|
}
|
145
142
|
}
|
146
143
|
}
|
144
|
+
}
|
147
145
|
</script>
|
@@ -1,25 +1,22 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
:
|
2
|
+
<container>
|
3
|
+
<progress-container
|
4
|
+
:backgroundColor="backgroundColor"
|
5
|
+
:maxWidth="maxWidth"
|
6
|
+
:minWidth="minWidth"
|
5
7
|
class="progress-container"
|
6
|
-
:max-width="maxWidth"
|
7
|
-
:min-width="minWidth"
|
8
8
|
>
|
9
|
-
<
|
9
|
+
<progress-fill
|
10
10
|
class="progress-bar"
|
11
|
-
:
|
12
|
-
:
|
11
|
+
:fillProgress="fillProgress"
|
12
|
+
:fillColor="fillColor"
|
13
13
|
/>
|
14
|
-
</
|
15
|
-
<
|
16
|
-
|
17
|
-
|
14
|
+
</progress-container>
|
15
|
+
<label-text class="progress-text" v-if="stepNumber || labelText"
|
16
|
+
>{{ labelText ? labelText : "" }}
|
17
|
+
{{ stepNumber ? stepNumber : "" }}</label-text
|
18
18
|
>
|
19
|
-
|
20
|
-
{{ stepNumber ? stepNumber : "" }}
|
21
|
-
</LabelText>
|
22
|
-
</Container>
|
19
|
+
</container>
|
23
20
|
</template>
|
24
21
|
|
25
22
|
<script>
|
@@ -34,9 +31,9 @@
|
|
34
31
|
// stepNumber="4"
|
35
32
|
// :labelText="translate('step')"
|
36
33
|
// />
|
37
|
-
|
34
|
+
import styled from "vue3-styled-components"
|
38
35
|
|
39
|
-
|
36
|
+
const Container = styled.div`
|
40
37
|
display: grid;
|
41
38
|
grid-template-columns: 1fr;
|
42
39
|
grid-row-gap: 16px;
|
@@ -46,12 +43,12 @@
|
|
46
43
|
}
|
47
44
|
`
|
48
45
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
const containerProps = {
|
47
|
+
backgroundColor: String,
|
48
|
+
maxWidth: String,
|
49
|
+
minWidth: String,
|
50
|
+
}
|
51
|
+
const ProgressContainer = styled("div", containerProps)`
|
55
52
|
width: 100%;
|
56
53
|
min-width: ${(props) => (props.minWidth ? props.minWidth : "auto")};
|
57
54
|
max-width: ${(props) => (props.maxWidth ? props.maxWidth : "none")};
|
@@ -59,21 +56,21 @@
|
|
59
56
|
background-color: ${(props) =>
|
60
57
|
props.backgroundColor
|
61
58
|
? props.backgroundColor
|
62
|
-
|
59
|
+
: props.theme.colors.lightGray};
|
63
60
|
@media (max-width: ${(props) => props.theme.screen.mobile}) {
|
64
61
|
height: 4px;
|
65
62
|
}
|
66
63
|
`
|
67
64
|
|
68
|
-
|
69
|
-
|
65
|
+
const fillProps = { fillColor: String, fillProgress: String | Number }
|
66
|
+
const ProgressFill = styled("div", fillProps)`
|
70
67
|
height: 100%;
|
71
68
|
width: ${(props) => props.fillProgress + "%"};
|
72
69
|
background-color: ${(props) =>
|
73
|
-
|
70
|
+
props.fillColor ? props.fillColor : props.theme.colors.secondary};
|
74
71
|
`
|
75
72
|
|
76
|
-
|
73
|
+
const labelText = styled.div`
|
77
74
|
color: ${(props) => props.theme.colors.darkGray};
|
78
75
|
font-size: 16px;
|
79
76
|
|
@@ -82,47 +79,47 @@
|
|
82
79
|
}
|
83
80
|
`
|
84
81
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
82
|
+
export default {
|
83
|
+
name: "progress-bar",
|
84
|
+
components: {
|
85
|
+
Container,
|
86
|
+
ProgressContainer,
|
87
|
+
ProgressFill,
|
88
|
+
labelText,
|
89
|
+
},
|
90
|
+
props: {
|
91
|
+
fillColor: {
|
92
|
+
required: false,
|
93
|
+
type: String,
|
94
|
+
default: null,
|
92
95
|
},
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
default: null,
|
98
|
-
},
|
99
|
-
backgroundColor: {
|
100
|
-
required: false,
|
101
|
-
type: String,
|
102
|
-
default: null,
|
103
|
-
},
|
104
|
-
minWidth: {
|
105
|
-
required: false,
|
106
|
-
type: String,
|
107
|
-
default: null,
|
108
|
-
},
|
109
|
-
maxWidth: {
|
110
|
-
required: false,
|
111
|
-
type: String,
|
112
|
-
default: null,
|
113
|
-
},
|
114
|
-
fillProgress: {
|
115
|
-
required: false,
|
116
|
-
default: 0,
|
117
|
-
},
|
118
|
-
labelText: {
|
119
|
-
required: false,
|
120
|
-
default: null,
|
121
|
-
},
|
122
|
-
stepNumber: {
|
123
|
-
required: false,
|
124
|
-
default: null,
|
125
|
-
},
|
96
|
+
backgroundColor: {
|
97
|
+
required: false,
|
98
|
+
type: String,
|
99
|
+
default: null,
|
126
100
|
},
|
127
|
-
|
101
|
+
minWidth: {
|
102
|
+
required: false,
|
103
|
+
type: String,
|
104
|
+
default: null,
|
105
|
+
},
|
106
|
+
maxWidth: {
|
107
|
+
required: false,
|
108
|
+
type: String,
|
109
|
+
default: null,
|
110
|
+
},
|
111
|
+
fillProgress: {
|
112
|
+
required: false,
|
113
|
+
default: 0,
|
114
|
+
},
|
115
|
+
labelText: {
|
116
|
+
required: false,
|
117
|
+
default: null,
|
118
|
+
},
|
119
|
+
stepNumber: {
|
120
|
+
required: false,
|
121
|
+
default: null,
|
122
|
+
},
|
123
|
+
},
|
124
|
+
}
|
128
125
|
</script>
|