@eturnity/eturnity_reusable_components 7.30.3 → 7.32.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 +184 -0
- package/.prettierrc +8 -6
- package/package.json +9 -21
- package/src/App.vue +79 -78
- package/src/assets/theme.js +3 -3
- package/src/components/addNewButton/AddNewButton.stories.js +2 -2
- package/src/components/addNewButton/index.vue +48 -51
- package/src/components/banner/actionBanner/index.vue +54 -55
- package/src/components/banner/banner/banner.stories.js +5 -5
- package/src/components/banner/banner/index.vue +159 -159
- package/src/components/banner/infoBanner/index.vue +41 -53
- package/src/components/buttons/buttonIcon/index.vue +125 -122
- package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
- package/src/components/buttons/closeButton/index.vue +49 -49
- package/src/components/buttons/mainButton/index.vue +108 -108
- package/src/components/card/index.vue +70 -70
- package/src/components/collapsableInfoText/index.vue +96 -94
- package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
- package/src/components/deleteIcon/index.vue +54 -54
- package/src/components/draggableInputHandle/index.vue +37 -37
- package/src/components/dropdown/Dropdown.stories.js +9 -10
- package/src/components/dropdown/index.vue +106 -106
- package/src/components/errorMessage/index.vue +52 -52
- package/src/components/filter/filterSettings.vue +428 -422
- package/src/components/filter/index.vue +135 -135
- package/src/components/filter/parentDropdown.vue +73 -73
- package/src/components/icon/Icons.stories.js +7 -7
- package/src/components/icon/iconCollection.vue +53 -53
- package/src/components/icon/index.vue +122 -122
- package/src/components/iconWrapper/index.vue +156 -156
- package/src/components/infoCard/index.vue +30 -32
- package/src/components/infoText/index.vue +142 -137
- package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
- package/src/components/inputs/checkbox/index.vue +190 -180
- package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
- package/src/components/inputs/inputNumber/index.vue +696 -696
- package/src/components/inputs/inputNumberQuestion/index.vue +185 -182
- package/src/components/inputs/inputText/InputText.stories.js +22 -22
- package/src/components/inputs/inputText/index.vue +337 -336
- package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
- package/src/components/inputs/radioButton/index.vue +222 -219
- package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
- package/src/components/inputs/searchInput/index.vue +127 -126
- package/src/components/inputs/select/index.vue +792 -791
- package/src/components/inputs/select/option/index.vue +124 -124
- package/src/components/inputs/select/select.stories.js +31 -32
- package/src/components/inputs/slider/index.vue +99 -99
- package/src/components/inputs/switchField/index.vue +220 -222
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
- package/src/components/inputs/textAreaInput/index.vue +171 -173
- package/src/components/inputs/toggle/Toggle.stories.js +14 -14
- package/src/components/inputs/toggle/index.vue +214 -217
- package/src/components/label/index.vue +82 -82
- package/src/components/markerItem/index.vue +68 -66
- package/src/components/modals/actionModal/index.vue +54 -54
- package/src/components/modals/infoModal/index.vue +39 -36
- package/src/components/modals/modal/index.vue +134 -134
- package/src/components/modals/modal/modal.stories.js +5 -5
- package/src/components/navigationTabs/index.vue +96 -94
- package/src/components/pageSubtitle/index.vue +55 -49
- package/src/components/pageTitle/index.vue +56 -56
- package/src/components/pagination/index.vue +92 -89
- package/src/components/progressBar/index.vue +107 -107
- package/src/components/projectMarker/index.vue +246 -244
- package/src/components/rangeSlider/Slider.vue +491 -465
- package/src/components/rangeSlider/index.vue +410 -410
- package/src/components/rangeSlider/utils/dom.js +5 -5
- package/src/components/selectedOptions/index.vue +119 -119
- package/src/components/sideMenu/index.vue +199 -199
- package/src/components/spinner/index.vue +57 -57
- package/src/components/tableDropdown/index.vue +520 -520
- package/src/components/tables/mainTable/index.vue +417 -400
- package/src/components/tables/viewTable/index.vue +171 -171
- package/src/components/threeDots/index.vue +340 -334
- package/src/components/videoThumbnail/index.vue +86 -86
- package/src/components/videoThumbnail/videoThumbnail.stories.js +14 -16
- package/src/helpers/numberConverter.js +2 -2
- package/src/helpers/translateLang.js +9 -9
- package/src/mixins/inputValidations.js +5 -5
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
@@ -1,39 +1,41 @@
|
|
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
|
-
name="arrow_left"
|
9
|
+
<ArrowIconContainer>
|
10
|
+
<RCIcon
|
12
11
|
:color="getTheme.colors.brightBlue"
|
12
|
+
name="arrow_left"
|
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
|
24
23
|
>
|
24
|
+
1
|
25
|
+
</PaginationLink>
|
25
26
|
|
26
27
|
<!-- Back tree dots -->
|
27
28
|
<span v-if="currentPage > 3 && paginationParams.pages > 4">...</span>
|
28
29
|
|
29
30
|
<!-- Current block -->
|
30
|
-
<
|
31
|
+
<PaginationLink
|
31
32
|
v-for="number in paginationNumbers()"
|
32
33
|
:key="number"
|
33
34
|
:class="[currentPage === number ? 'active' : '']"
|
34
35
|
@click="fetchPage(number)"
|
35
|
-
>{{ number }}</paginationLink
|
36
36
|
>
|
37
|
+
{{ number }}
|
38
|
+
</PaginationLink>
|
37
39
|
|
38
40
|
<!-- Forward tree dots -->
|
39
41
|
<span
|
@@ -44,102 +46,103 @@
|
|
44
46
|
>
|
45
47
|
|
46
48
|
<!-- End page -->
|
47
|
-
<
|
49
|
+
<PaginationLink
|
48
50
|
v-if="
|
49
51
|
paginationParams.pages - currentPage > 1 && paginationParams.pages > 3
|
50
52
|
"
|
51
53
|
@click="fetchPage(paginationParams.pages)"
|
52
|
-
>{{ paginationParams.pages }}</paginationLink
|
53
54
|
>
|
55
|
+
{{ paginationParams.pages }}
|
56
|
+
</PaginationLink>
|
54
57
|
|
55
58
|
<!-- Forward button -->
|
56
|
-
<
|
59
|
+
<PaginationLink
|
57
60
|
v-if="paginationParams.next"
|
58
61
|
@click="fetchPage(paginationParams.next)"
|
59
62
|
>
|
60
|
-
<
|
61
|
-
<
|
62
|
-
<
|
63
|
-
name="arrow_right"
|
63
|
+
<ArrowText>{{ $gettext('forward') }}</ArrowText>
|
64
|
+
<ArrowIconContainer>
|
65
|
+
<RCIcon
|
64
66
|
:color="getTheme.colors.brightBlue"
|
67
|
+
name="arrow_right"
|
65
68
|
size="12px"
|
66
69
|
/>
|
67
|
-
</
|
68
|
-
</
|
69
|
-
</
|
70
|
+
</ArrowIconContainer>
|
71
|
+
</PaginationLink>
|
72
|
+
</PaginationWrapper>
|
70
73
|
</template>
|
71
74
|
|
72
75
|
<script>
|
73
|
-
import styled from 'vue3-styled-components'
|
74
|
-
import
|
75
|
-
import theme from '@/assets/theme.js'
|
76
|
+
import styled from 'vue3-styled-components'
|
77
|
+
import RCIcon from '../icon'
|
78
|
+
import theme from '@/assets/theme.js'
|
76
79
|
|
77
|
-
const paginationWrapper = styled.nav`
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
`
|
85
|
-
const paginationLink = styled.div`
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
80
|
+
const paginationWrapper = styled.nav`
|
81
|
+
color: ${(props) => props.theme.colors.brightBlue};
|
82
|
+
font-size: 13px;
|
83
|
+
display: flex;
|
84
|
+
flex-wrap: wrap;
|
85
|
+
justify-content: flex-end;
|
86
|
+
align-items: center;
|
87
|
+
`
|
88
|
+
const paginationLink = styled.div`
|
89
|
+
display: flex;
|
90
|
+
padding: 0px 5px;
|
91
|
+
margin: 0 2px;
|
92
|
+
text-align: center;
|
93
|
+
border-radius: 3px;
|
94
|
+
white-space: nowrap;
|
95
|
+
cursor: pointer;
|
96
|
+
color: ${(props) => props.theme.colors.brightBlue};
|
94
97
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
}
|
101
|
-
`
|
102
|
-
const arrowText = styled.div`
|
103
|
-
color: ${(props) => props.theme.colors.brightBlue};
|
104
|
-
`
|
105
|
-
const arrowIconContainer = styled.div`
|
106
|
-
margin: 0 10px;
|
107
|
-
display: flex;
|
108
|
-
align-items: center;
|
109
|
-
`
|
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
|
98
|
+
&.active {
|
99
|
+
color: ${(props) => props.theme.colors.white};
|
100
|
+
background-color: ${(props) => props.theme.colors.brightBlue};
|
101
|
+
padding: 7px 12px;
|
102
|
+
border-radius: 4px;
|
123
103
|
}
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
104
|
+
`
|
105
|
+
const arrowText = styled.div`
|
106
|
+
color: ${(props) => props.theme.colors.brightBlue};
|
107
|
+
`
|
108
|
+
const arrowIconContainer = styled.div`
|
109
|
+
margin: 0 10px;
|
110
|
+
display: flex;
|
111
|
+
align-items: center;
|
112
|
+
`
|
113
|
+
export default {
|
114
|
+
name: 'PaginationComponent',
|
115
|
+
components: {
|
116
|
+
paginationWrapper,
|
117
|
+
paginationLink,
|
118
|
+
RCIcon,
|
119
|
+
arrowText,
|
120
|
+
arrowIconContainer,
|
121
|
+
},
|
122
|
+
props: ['fetchPage', 'currentPage', 'paginationParams'],
|
123
|
+
computed: {
|
124
|
+
getTheme() {
|
125
|
+
return theme
|
126
|
+
},
|
127
|
+
},
|
128
|
+
methods: {
|
129
|
+
getNewProjects(num) {
|
130
|
+
this.$emit('on-pagination-change', num)
|
131
|
+
},
|
132
|
+
paginationNumbers() {
|
133
|
+
const prev = this.paginationParams.previous
|
134
|
+
const next = this.paginationParams.next
|
135
|
+
const n = prev + 1 || next - 1
|
136
|
+
if (this.paginationParams.pages === 2) {
|
137
|
+
return prev ? [n - 1, n] : [n, n + 1]
|
138
|
+
} else {
|
139
|
+
return prev
|
140
|
+
? next
|
141
|
+
? [n - 1, n, n + 1]
|
142
|
+
: [n - 2, n - 1, n]
|
143
|
+
: [n, n + 1, n + 2]
|
144
|
+
}
|
145
|
+
},
|
128
146
|
},
|
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]
|
141
|
-
}
|
142
|
-
}
|
143
147
|
}
|
144
|
-
}
|
145
148
|
</script>
|
@@ -1,125 +1,125 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
:
|
5
|
-
:maxWidth="maxWidth"
|
6
|
-
:minWidth="minWidth"
|
2
|
+
<Container>
|
3
|
+
<ProgressContainer
|
4
|
+
:background-color="backgroundColor"
|
7
5
|
class="progress-container"
|
6
|
+
:max-width="maxWidth"
|
7
|
+
:min-width="minWidth"
|
8
8
|
>
|
9
|
-
<
|
9
|
+
<ProgressFill
|
10
10
|
class="progress-bar"
|
11
|
-
:
|
12
|
-
:
|
11
|
+
:fill-color="fillColor"
|
12
|
+
:fill-progress="fillProgress"
|
13
13
|
/>
|
14
|
-
</
|
15
|
-
<
|
16
|
-
|
17
|
-
{{ stepNumber ? stepNumber :
|
18
|
-
>
|
19
|
-
</
|
14
|
+
</ProgressContainer>
|
15
|
+
<LabelText v-if="stepNumber || labelText" class="progress-text">
|
16
|
+
{{ labelText ? labelText : '' }}
|
17
|
+
{{ stepNumber ? stepNumber : '' }}
|
18
|
+
</LabelText>
|
19
|
+
</Container>
|
20
20
|
</template>
|
21
21
|
|
22
22
|
<script>
|
23
|
-
// import ProgressBar from "@eturnity/eturnity_reusable_components/src/components/progressBar"
|
24
|
-
//To Use:
|
25
|
-
// <progress-bar
|
26
|
-
// fillColor="#000"
|
27
|
-
// backgroundColor="#888"
|
28
|
-
// minWidth="150px"
|
29
|
-
// maxWidth="100%"
|
30
|
-
// :fillProgress="50" //should be a number for percent
|
31
|
-
// stepNumber="4"
|
32
|
-
// :labelText="translate('step')"
|
33
|
-
// />
|
34
|
-
import styled from
|
23
|
+
// import ProgressBar from "@eturnity/eturnity_reusable_components/src/components/progressBar"
|
24
|
+
//To Use:
|
25
|
+
// <progress-bar
|
26
|
+
// fillColor="#000"
|
27
|
+
// backgroundColor="#888"
|
28
|
+
// minWidth="150px"
|
29
|
+
// maxWidth="100%"
|
30
|
+
// :fillProgress="50" //should be a number for percent
|
31
|
+
// stepNumber="4"
|
32
|
+
// :labelText="translate('step')"
|
33
|
+
// />
|
34
|
+
import styled from 'vue3-styled-components'
|
35
35
|
|
36
|
-
const Container = styled.div`
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
`
|
36
|
+
const Container = styled.div`
|
37
|
+
display: grid;
|
38
|
+
grid-template-columns: 1fr;
|
39
|
+
grid-row-gap: 16px;
|
40
|
+
@media (max-width: ${(props) => props.theme.screen.tablet}) {
|
41
|
+
grid-row-gap: 20px;
|
42
|
+
grid-template-rows: auto 1fr;
|
43
|
+
}
|
44
|
+
`
|
45
45
|
|
46
|
-
const containerProps = {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
}
|
51
|
-
const ProgressContainer = styled("div", containerProps)`
|
52
|
-
width: 100%;
|
53
|
-
min-width: ${(props) => (props.minWidth ? props.minWidth : "auto")};
|
54
|
-
max-width: ${(props) => (props.maxWidth ? props.maxWidth : "none")};
|
55
|
-
height: 6px;
|
56
|
-
background-color: ${(props) =>
|
57
|
-
props.backgroundColor
|
58
|
-
? props.backgroundColor
|
59
|
-
: props.theme.colors.lightGray};
|
60
|
-
@media (max-width: ${(props) => props.theme.screen.mobile}) {
|
61
|
-
height: 4px;
|
46
|
+
const containerProps = {
|
47
|
+
backgroundColor: String,
|
48
|
+
maxWidth: String,
|
49
|
+
minWidth: String,
|
62
50
|
}
|
63
|
-
`
|
51
|
+
const ProgressContainer = styled('div', containerProps)`
|
52
|
+
width: 100%;
|
53
|
+
min-width: ${(props) => (props.minWidth ? props.minWidth : 'auto')};
|
54
|
+
max-width: ${(props) => (props.maxWidth ? props.maxWidth : 'none')};
|
55
|
+
height: 6px;
|
56
|
+
background-color: ${(props) =>
|
57
|
+
props.backgroundColor
|
58
|
+
? props.backgroundColor
|
59
|
+
: props.theme.colors.lightGray};
|
60
|
+
@media (max-width: ${(props) => props.theme.screen.mobile}) {
|
61
|
+
height: 4px;
|
62
|
+
}
|
63
|
+
`
|
64
64
|
|
65
|
-
const fillProps = { fillColor: String, fillProgress: String | Number }
|
66
|
-
const ProgressFill = styled(
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
`
|
65
|
+
const fillProps = { fillColor: String, fillProgress: String | Number }
|
66
|
+
const ProgressFill = styled('div', fillProps)`
|
67
|
+
height: 100%;
|
68
|
+
width: ${(props) => props.fillProgress + '%'};
|
69
|
+
background-color: ${(props) =>
|
70
|
+
props.fillColor ? props.fillColor : props.theme.colors.secondary};
|
71
|
+
`
|
72
72
|
|
73
|
-
const
|
74
|
-
|
75
|
-
|
73
|
+
const LabelText = styled.div`
|
74
|
+
color: ${(props) => props.theme.colors.darkGray};
|
75
|
+
font-size: 16px;
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
`
|
77
|
+
@media (max-width: ${(props) => props.theme.screen.tablet}) {
|
78
|
+
padding-left: 16px;
|
79
|
+
}
|
80
|
+
`
|
81
81
|
|
82
|
-
export default {
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
},
|
90
|
-
props: {
|
91
|
-
fillColor: {
|
92
|
-
required: false,
|
93
|
-
type: String,
|
94
|
-
default: null,
|
95
|
-
},
|
96
|
-
backgroundColor: {
|
97
|
-
required: false,
|
98
|
-
type: String,
|
99
|
-
default: null,
|
100
|
-
},
|
101
|
-
minWidth: {
|
102
|
-
required: false,
|
103
|
-
type: String,
|
104
|
-
default: null,
|
82
|
+
export default {
|
83
|
+
name: 'ProgressBar',
|
84
|
+
components: {
|
85
|
+
Container,
|
86
|
+
ProgressContainer,
|
87
|
+
ProgressFill,
|
88
|
+
LabelText,
|
105
89
|
},
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
90
|
+
props: {
|
91
|
+
fillColor: {
|
92
|
+
required: false,
|
93
|
+
type: String,
|
94
|
+
default: null,
|
95
|
+
},
|
96
|
+
backgroundColor: {
|
97
|
+
required: false,
|
98
|
+
type: String,
|
99
|
+
default: null,
|
100
|
+
},
|
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
|
+
},
|
110
123
|
},
|
111
|
-
|
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
|
-
}
|
124
|
+
}
|
125
125
|
</script>
|