@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
@@ -2,21 +2,17 @@
|
|
2
2
|
<Wrapper
|
3
3
|
v-show="!isLoading"
|
4
4
|
:class="viewCardClass"
|
5
|
-
:min-width="minWidth"
|
6
5
|
:width="width"
|
6
|
+
:minWidth="minWidth"
|
7
7
|
>
|
8
|
-
<Spinner
|
9
|
-
v-if="isLoading"
|
10
|
-
:limited-to-modal="true"
|
11
|
-
size="50px"
|
12
|
-
/>
|
8
|
+
<Spinner v-if="isLoading" size="50px" :limitedToModal="true" />
|
13
9
|
<CardWrapper v-else>
|
14
10
|
<CardTitle :class="titleClass">
|
15
11
|
{{ $gettext(title) }}
|
16
|
-
<
|
12
|
+
<et-popover
|
17
13
|
v-if="showPopover && popoverText !== ''"
|
18
14
|
:text="popoverText"
|
19
|
-
|
15
|
+
></et-popover>
|
20
16
|
</CardTitle>
|
21
17
|
<slot></slot>
|
22
18
|
</CardWrapper>
|
@@ -24,11 +20,11 @@
|
|
24
20
|
</template>
|
25
21
|
|
26
22
|
<script>
|
27
|
-
|
28
|
-
|
23
|
+
import styled from 'vue3-styled-components'
|
24
|
+
import Spinner from '../spinner'
|
29
25
|
|
30
|
-
|
31
|
-
|
26
|
+
const WrapperProps = { width: [Number, String], minWidth: [Number, String] }
|
27
|
+
const Wrapper = styled('div', WrapperProps)`
|
32
28
|
max-width: ${(props) => props.width};
|
33
29
|
min-width: ${(props) => props.minWidth};
|
34
30
|
padding: 20px;
|
@@ -39,12 +35,12 @@
|
|
39
35
|
height: 100%;
|
40
36
|
`
|
41
37
|
|
42
|
-
|
38
|
+
const CardWrapper = styled('div')`
|
43
39
|
height: 100%;
|
44
40
|
width: auto;
|
45
41
|
`
|
46
42
|
|
47
|
-
|
43
|
+
const CardTitle = styled('p')`
|
48
44
|
font-size: 14px;
|
49
45
|
line-height: 1;
|
50
46
|
color: ${(props) => props.theme.colors.black};
|
@@ -52,49 +48,49 @@
|
|
52
48
|
margin-bottom: 10px;
|
53
49
|
`
|
54
50
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
CardWrapper
|
51
|
+
export default {
|
52
|
+
name: 'Card',
|
53
|
+
props: {
|
54
|
+
title: {
|
55
|
+
type: String,
|
56
|
+
default: ''
|
62
57
|
},
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
default: ''
|
93
|
-
},
|
94
|
-
isLoading: {
|
95
|
-
type: Boolean,
|
96
|
-
default: false
|
97
|
-
}
|
58
|
+
width: {
|
59
|
+
type: [Number, String],
|
60
|
+
required: false,
|
61
|
+
default: '400px'
|
62
|
+
},
|
63
|
+
minWidth: {
|
64
|
+
type: [Number, String],
|
65
|
+
required: false,
|
66
|
+
default: null
|
67
|
+
},
|
68
|
+
titleClass: {
|
69
|
+
type: String,
|
70
|
+
default: ''
|
71
|
+
},
|
72
|
+
showPopover: {
|
73
|
+
type: Boolean,
|
74
|
+
default: false
|
75
|
+
},
|
76
|
+
viewCardClass: {
|
77
|
+
type: String,
|
78
|
+
default: ''
|
79
|
+
},
|
80
|
+
popoverText: {
|
81
|
+
type: String,
|
82
|
+
default: ''
|
83
|
+
},
|
84
|
+
isLoading: {
|
85
|
+
type: Boolean,
|
86
|
+
default: false
|
98
87
|
}
|
88
|
+
},
|
89
|
+
components: {
|
90
|
+
Spinner,
|
91
|
+
Wrapper,
|
92
|
+
CardTitle,
|
93
|
+
CardWrapper
|
99
94
|
}
|
95
|
+
}
|
100
96
|
</script>
|
@@ -1,23 +1,18 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
<Text
|
4
|
-
:expand="showButton && showAll"
|
5
|
-
:font-size="fontSize"
|
6
|
-
>
|
7
|
-
{{ text }}
|
8
|
-
</Text>
|
3
|
+
<Text :expand="showButton && showAll" :fontSize="fontSize">{{ text }}</Text>
|
9
4
|
<ToggleContainer>
|
10
5
|
<ToggleButton
|
11
|
-
v-if="showButton && !showAll"
|
12
|
-
:font-size="fontSize"
|
13
6
|
@click="toggleHandler"
|
7
|
+
v-if="showButton && !showAll"
|
8
|
+
:fontSize="fontSize"
|
14
9
|
>
|
15
10
|
{{ $gettext('Show more') }}
|
16
11
|
</ToggleButton>
|
17
12
|
<ToggleButton
|
18
|
-
v-if="showButton && showAll"
|
19
|
-
:font-size="fontSize"
|
20
13
|
@click="toggleHandler"
|
14
|
+
v-if="showButton && showAll"
|
15
|
+
:fontSize="fontSize"
|
21
16
|
>
|
22
17
|
{{ $gettext('Show less') }}
|
23
18
|
</ToggleButton>
|
@@ -26,14 +21,14 @@
|
|
26
21
|
</template>
|
27
22
|
|
28
23
|
<script>
|
29
|
-
|
30
|
-
|
24
|
+
import styled from 'vue3-styled-components'
|
25
|
+
import theme from '@/assets/theme.js'
|
31
26
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
const TextAttrs = {
|
28
|
+
expand: Boolean,
|
29
|
+
fontSize: String
|
30
|
+
}
|
31
|
+
const Text = styled('p', TextAttrs)`
|
37
32
|
display: block;
|
38
33
|
display: -webkit-box;
|
39
34
|
line-height: 1.3em;
|
@@ -44,87 +39,87 @@
|
|
44
39
|
text-overflow: ellipsis;
|
45
40
|
`
|
46
41
|
|
47
|
-
|
42
|
+
const ToggleContainer = styled.div`
|
48
43
|
display: flex;
|
49
44
|
width: 100%;
|
50
45
|
`
|
51
46
|
|
52
|
-
|
47
|
+
const ToggleButton = styled('p', TextAttrs)`
|
53
48
|
font-size: ${(props) => props.fontSize}px;
|
54
49
|
cursor: pointer;
|
55
50
|
color: ${(props) => props.theme.colors.blue};
|
56
51
|
`
|
57
52
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
53
|
+
export default {
|
54
|
+
name: 'collapsable-info-text',
|
55
|
+
props: {
|
56
|
+
text: {
|
57
|
+
type: String,
|
58
|
+
required: true
|
64
59
|
},
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
required: true
|
69
|
-
},
|
70
|
-
fontSize: {
|
71
|
-
type: String,
|
72
|
-
default: '16px'
|
73
|
-
},
|
74
|
-
lineCount: {
|
75
|
-
type: Number,
|
76
|
-
default: 3
|
77
|
-
},
|
78
|
-
minWidth: {
|
79
|
-
type: String,
|
80
|
-
default: '100%'
|
81
|
-
}
|
60
|
+
fontSize: {
|
61
|
+
type: String,
|
62
|
+
default: '16px'
|
82
63
|
},
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
showAll: false,
|
87
|
-
lineBreaks: []
|
88
|
-
}
|
64
|
+
lineCount: {
|
65
|
+
type: Number,
|
66
|
+
default: 3
|
89
67
|
},
|
90
|
-
|
91
|
-
|
92
|
-
|
68
|
+
minWidth: {
|
69
|
+
type: String,
|
70
|
+
default: '100%'
|
71
|
+
}
|
72
|
+
},
|
73
|
+
components: {
|
74
|
+
Text,
|
75
|
+
ToggleButton,
|
76
|
+
ToggleContainer
|
77
|
+
},
|
78
|
+
data() {
|
79
|
+
return {
|
80
|
+
showButton: true,
|
81
|
+
showAll: false,
|
82
|
+
lineBreaks: []
|
83
|
+
}
|
84
|
+
},
|
85
|
+
computed: {
|
86
|
+
theme() {
|
87
|
+
return theme
|
88
|
+
}
|
89
|
+
},
|
90
|
+
methods: {
|
91
|
+
displayText() {
|
92
|
+
if (!this.showButton) {
|
93
|
+
return this.text
|
93
94
|
}
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
// }
|
95
|
+
if (!this.showAll) {
|
96
|
+
let countIndex = 0
|
97
|
+
this.lineBreaks.forEach((el, index) => {
|
98
|
+
if (index < this.lineCount) {
|
99
|
+
countIndex += el.length
|
100
|
+
}
|
101
|
+
})
|
102
102
|
|
103
|
-
|
104
|
-
|
103
|
+
return this.text.slice(0, countIndex + 2) + '...'
|
104
|
+
} else {
|
105
|
+
return this.text
|
105
106
|
}
|
106
107
|
},
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
this.lineBreaks.forEach((el, index) => {
|
115
|
-
if (index < this.lineCount) {
|
116
|
-
countIndex += el.length
|
117
|
-
}
|
118
|
-
})
|
108
|
+
toggleHandler() {
|
109
|
+
this.showAll = !this.showAll
|
110
|
+
}
|
111
|
+
},
|
112
|
+
created() {
|
113
|
+
// TODO: this should divide the text into lines based on with. Currently it's just splitting by line breaks
|
114
|
+
// this.lineBreaks = this.text.split('\n')
|
119
115
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
this.showAll = !this.showAll
|
127
|
-
}
|
116
|
+
// if (this.lineBreaks.length <= this.lineCount) {
|
117
|
+
// this.showButton = false
|
118
|
+
// }
|
119
|
+
|
120
|
+
if (this.text.length <= 170) {
|
121
|
+
this.showButton = false
|
128
122
|
}
|
129
123
|
}
|
124
|
+
}
|
130
125
|
</script>
|
@@ -1,22 +1,19 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
/>
|
7
|
-
<DeleteIconGray class="icon-gray" />
|
8
|
-
</Wrapper>
|
2
|
+
<wrapper :isDisabled="isDisabled">
|
3
|
+
<delete-icon-red class="icon-red" :hoverBg="hoverBg" />
|
4
|
+
<delete-icon-gray class="icon-gray" />
|
5
|
+
</wrapper>
|
9
6
|
</template>
|
10
7
|
|
11
8
|
<script>
|
12
9
|
// To use:
|
13
10
|
// <delete-icon @click="onDeleteItem(item)" :isDisabled="true" />
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
import styled from 'vue3-styled-components'
|
12
|
+
import SvgDelete from '../../assets/icons/delete_icon.svg'
|
13
|
+
import SvgDeleteGray from '../../assets/icons/delete_icon_gray.svg'
|
17
14
|
|
18
|
-
|
19
|
-
|
15
|
+
const wrapperAttrs = { isDisabled: Boolean }
|
16
|
+
const Wrapper = styled('div', wrapperAttrs)`
|
20
17
|
width: 30px;
|
21
18
|
height: 30px;
|
22
19
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
@@ -44,38 +41,38 @@
|
|
44
41
|
`}
|
45
42
|
`
|
46
43
|
|
47
|
-
|
48
|
-
|
44
|
+
const IconImageAttrs = { hoverBg: String }
|
45
|
+
const DeleteIconRed = styled(SvgDelete, IconImageAttrs)`
|
49
46
|
&:hover {
|
50
47
|
background-color: ${(props) =>
|
51
|
-
|
48
|
+
props.hoverBg ? props.hoverBg : props.theme.colors.grey5};
|
52
49
|
border-radius: 4px;
|
53
50
|
}
|
54
51
|
`
|
55
52
|
|
56
|
-
|
53
|
+
const DeleteIconGray = styled(SvgDeleteGray, IconImageAttrs)`
|
57
54
|
&:hover {
|
58
55
|
background-color: ${(props) => props.theme.colors.grey5};
|
59
56
|
border-radius: 4px;
|
60
57
|
}
|
61
58
|
`
|
62
59
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
60
|
+
export default {
|
61
|
+
name: 'delete-icon',
|
62
|
+
components: {
|
63
|
+
Wrapper,
|
64
|
+
DeleteIconRed,
|
65
|
+
DeleteIconGray
|
66
|
+
},
|
67
|
+
props: {
|
68
|
+
isDisabled: {
|
69
|
+
required: false,
|
70
|
+
default: false
|
69
71
|
},
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
default: false
|
74
|
-
},
|
75
|
-
hoverBg: {
|
76
|
-
required: false,
|
77
|
-
default: ''
|
78
|
-
}
|
72
|
+
hoverBg: {
|
73
|
+
required: false,
|
74
|
+
default: ''
|
79
75
|
}
|
80
76
|
}
|
77
|
+
}
|
81
78
|
</script>
|
@@ -1,18 +1,15 @@
|
|
1
1
|
<template>
|
2
|
-
<Handle
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<Dot />
|
7
|
-
<Dot />
|
8
|
-
<Dot />
|
2
|
+
<Handle :height="height" class="handle">
|
3
|
+
<Dot></Dot>
|
4
|
+
<Dot></Dot>
|
5
|
+
<Dot></Dot>
|
9
6
|
</Handle>
|
10
7
|
</template>
|
11
8
|
|
12
9
|
<script>
|
13
|
-
|
10
|
+
import styled from 'vue3-styled-components'
|
14
11
|
|
15
|
-
|
12
|
+
const Handle = styled('div', { height: String })`
|
16
13
|
position: absolute;
|
17
14
|
left: 0;
|
18
15
|
margin-right: 10px;
|
@@ -27,7 +24,7 @@
|
|
27
24
|
cursor: pointer;
|
28
25
|
align-items: center;
|
29
26
|
`
|
30
|
-
|
27
|
+
const Dot = styled.div`
|
31
28
|
display: inline-block;
|
32
29
|
width: 4px;
|
33
30
|
height: 4px;
|
@@ -35,15 +32,15 @@
|
|
35
32
|
background-color: #0068de;
|
36
33
|
`
|
37
34
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
}
|
35
|
+
export default {
|
36
|
+
name: 'draggableInputHandle',
|
37
|
+
props: ['height'],
|
38
|
+
components: {
|
39
|
+
Handle,
|
40
|
+
Dot
|
41
|
+
},
|
42
|
+
data() {
|
43
|
+
return {}
|
48
44
|
}
|
45
|
+
}
|
49
46
|
</script>
|
@@ -38,17 +38,17 @@ const Template = (args, { argTypes }) => ({
|
|
38
38
|
|
39
39
|
export const Default = Template.bind({})
|
40
40
|
Default.args = {
|
41
|
-
openingMode:
|
42
|
-
gap:
|
43
|
-
justify:
|
44
|
-
width:
|
41
|
+
openingMode:"click",
|
42
|
+
gap:"0px",
|
43
|
+
justify:"left",
|
44
|
+
width:"150px"
|
45
45
|
}
|
46
46
|
|
47
47
|
export const withHover = Template.bind({})
|
48
48
|
withHover.args = {
|
49
|
-
openingMode:
|
50
|
-
gap:
|
51
|
-
justify:
|
52
|
-
width:
|
49
|
+
openingMode:"hover",
|
50
|
+
gap:"20px",
|
51
|
+
justify:"right",
|
52
|
+
width:"250px"
|
53
53
|
}
|
54
54
|
|