@eturnity/eturnity_reusable_components 7.24.3-EPDM-11143.1 → 7.24.3-EPDM-11320.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/.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 +119 -119
- 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 +439 -433
- 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 +121 -121
- package/src/components/iconWrapper/index.vue +156 -156
- package/src/components/infoCard/index.vue +26 -26
- package/src/components/infoText/index.vue +133 -132
- 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 +647 -644
- 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 +221 -219
- package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
- package/src/components/inputs/searchInput/index.vue +126 -126
- package/src/components/inputs/select/index.vue +778 -776
- 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 +366 -362
- 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
- package/src/assets/svgIcons/copy.svg +0 -10
@@ -1,103 +1,103 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<Wrapper :fit="fit" :height="height" :width="width">
|
3
3
|
<img :src="src" />
|
4
|
-
<
|
5
|
-
<
|
6
|
-
</
|
7
|
-
</
|
4
|
+
<IconWrapper>
|
5
|
+
<Icon :color="playIconColor" name="play" :size="playIconSize" />
|
6
|
+
</IconWrapper>
|
7
|
+
</Wrapper>
|
8
8
|
</template>
|
9
9
|
|
10
10
|
<script>
|
11
|
-
// import VideoThumbnail from "@eturnity/eturnity_reusable_components/src/components/videoThumbnail"
|
12
|
-
// How to use:
|
13
|
-
//<videoThumbnail src="https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080"
|
14
|
-
// playIconColor="red"
|
15
|
-
// playIconSize="20px"
|
16
|
-
// width="400px"
|
17
|
-
// height="600px"
|
18
|
-
// />
|
11
|
+
// import VideoThumbnail from "@eturnity/eturnity_reusable_components/src/components/videoThumbnail"
|
12
|
+
// How to use:
|
13
|
+
//<videoThumbnail src="https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080"
|
14
|
+
// playIconColor="red"
|
15
|
+
// playIconSize="20px"
|
16
|
+
// width="400px"
|
17
|
+
// height="600px"
|
18
|
+
// />
|
19
19
|
|
20
|
-
import styled from 'vue3-styled-components'
|
21
|
-
import Icon from '../icon'
|
20
|
+
import styled from 'vue3-styled-components'
|
21
|
+
import Icon from '../icon'
|
22
22
|
|
23
|
-
const wrapperAttrs = { width: String, height: String, fit: String }
|
24
|
-
const Wrapper = styled('div', wrapperAttrs)`
|
25
|
-
|
26
|
-
|
27
|
-
width: ${(props) => props.width};
|
28
|
-
height: ${(props) => props.height};
|
29
|
-
& img {
|
30
|
-
object-fit: ${(props) => props.fit};
|
23
|
+
const wrapperAttrs = { width: String, height: String, fit: String }
|
24
|
+
const Wrapper = styled('div', wrapperAttrs)`
|
25
|
+
display: inline-block;
|
26
|
+
position: relative;
|
31
27
|
width: ${(props) => props.width};
|
32
28
|
height: ${(props) => props.height};
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
29
|
+
& img {
|
30
|
+
object-fit: ${(props) => props.fit};
|
31
|
+
width: ${(props) => props.width};
|
32
|
+
height: ${(props) => props.height};
|
33
|
+
}
|
34
|
+
`
|
35
|
+
const IconWrapper = styled('div')`
|
36
|
+
position: absolute;
|
37
|
+
top: 0;
|
38
|
+
bottom: 0;
|
39
|
+
left: 0;
|
40
|
+
right: 0;
|
41
|
+
display: flex;
|
42
|
+
justify-content: center;
|
43
|
+
align-items: center;
|
44
|
+
`
|
45
45
|
|
46
|
-
export default {
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
},
|
53
|
-
props: {
|
54
|
-
src: {
|
55
|
-
required: true
|
46
|
+
export default {
|
47
|
+
name: 'VideoThumbnail',
|
48
|
+
components: {
|
49
|
+
Wrapper,
|
50
|
+
Icon,
|
51
|
+
IconWrapper,
|
56
52
|
},
|
57
|
-
|
58
|
-
|
59
|
-
|
53
|
+
props: {
|
54
|
+
src: {
|
55
|
+
required: true,
|
56
|
+
},
|
57
|
+
fit: {
|
58
|
+
required: false,
|
59
|
+
default: 'cover',
|
60
|
+
},
|
61
|
+
width: {
|
62
|
+
required: false,
|
63
|
+
default: '300px',
|
64
|
+
},
|
65
|
+
height: {
|
66
|
+
required: false,
|
67
|
+
default: '200px',
|
68
|
+
},
|
69
|
+
playIconSize: {
|
70
|
+
required: false,
|
71
|
+
default: '50px',
|
72
|
+
},
|
73
|
+
playIconColor: {
|
74
|
+
required: false,
|
75
|
+
default: 'blue',
|
76
|
+
},
|
60
77
|
},
|
61
|
-
|
62
|
-
|
63
|
-
|
78
|
+
data() {
|
79
|
+
return {
|
80
|
+
isOpenByClick: false,
|
81
|
+
}
|
64
82
|
},
|
65
|
-
|
66
|
-
|
67
|
-
default: '200px'
|
83
|
+
mounted() {
|
84
|
+
document.addEventListener('click', this.clickOutside)
|
68
85
|
},
|
69
|
-
|
70
|
-
|
71
|
-
|
86
|
+
beforeDestroy() {
|
87
|
+
document.removeEventListener('click', this.clickOutside)
|
88
|
+
},
|
89
|
+
methods: {
|
90
|
+
clickOutside(event) {
|
91
|
+
if (this.openingMode != 'click') return
|
92
|
+
if (
|
93
|
+
this.$refs.dropdown.$el == event.target ||
|
94
|
+
this.$refs.dropdown.$el.contains(event.target)
|
95
|
+
) {
|
96
|
+
return
|
97
|
+
} else {
|
98
|
+
this.isOpenByClick = false
|
99
|
+
}
|
100
|
+
},
|
72
101
|
},
|
73
|
-
playIconColor: {
|
74
|
-
required: false,
|
75
|
-
default: 'blue'
|
76
|
-
}
|
77
|
-
},
|
78
|
-
data() {
|
79
|
-
return {
|
80
|
-
isOpenByClick: false
|
81
|
-
}
|
82
|
-
},
|
83
|
-
methods: {
|
84
|
-
clickOutside(event) {
|
85
|
-
if (this.openingMode != 'click') return
|
86
|
-
if (
|
87
|
-
this.$refs.dropdown.$el == event.target ||
|
88
|
-
this.$refs.dropdown.$el.contains(event.target)
|
89
|
-
) {
|
90
|
-
return
|
91
|
-
} else {
|
92
|
-
this.isOpenByClick = false
|
93
|
-
}
|
94
|
-
}
|
95
|
-
},
|
96
|
-
mounted() {
|
97
|
-
document.addEventListener('click', this.clickOutside)
|
98
|
-
},
|
99
|
-
beforeDestroy() {
|
100
|
-
document.removeEventListener('click', this.clickOutside)
|
101
102
|
}
|
102
|
-
}
|
103
103
|
</script>
|
@@ -2,7 +2,7 @@ import VideoThumbnail from './index.vue'
|
|
2
2
|
|
3
3
|
export default {
|
4
4
|
title: 'VideoThumbnail',
|
5
|
-
component: VideoThumbnail
|
5
|
+
component: VideoThumbnail,
|
6
6
|
// argTypes: {},
|
7
7
|
}
|
8
8
|
|
@@ -13,23 +13,21 @@ const Template = (args, { argTypes }) => ({
|
|
13
13
|
props: Object.keys(argTypes),
|
14
14
|
template: `<VideoThumbnail v-bind="$props"/>`,
|
15
15
|
// import VideoThumbnail from "@eturnity/eturnity_reusable_components/src/components/videoThumbnail"
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
// How to use:
|
17
|
+
//<videoThumbnail src="https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080"
|
18
|
+
// playIconColor="red"
|
19
|
+
// playIconSize="20px"
|
20
|
+
// width="400px"
|
21
|
+
// height="600px"
|
22
|
+
// />
|
23
23
|
})
|
24
24
|
|
25
25
|
export const Default = Template.bind({})
|
26
26
|
Default.args = {
|
27
|
-
src:
|
28
|
-
playIconSize:
|
29
|
-
playIconColor:
|
30
|
-
width:
|
31
|
-
height:
|
32
|
-
fit:
|
27
|
+
src: 'https://musicart.xboxlive.com/6/cfaf1e9d-0000-0000-0000-000000000009/504/image.jpg?w=1920&h=1080',
|
28
|
+
playIconSize: '50px',
|
29
|
+
playIconColor: 'red',
|
30
|
+
width: '400px',
|
31
|
+
height: '300px',
|
32
|
+
fit: 'cover',
|
33
33
|
}
|
34
|
-
|
35
|
-
|
@@ -3,7 +3,7 @@ import { langForLocaleString } from './translateLang'
|
|
3
3
|
export const stringToNumber = ({
|
4
4
|
value = '',
|
5
5
|
numberPrecision = false,
|
6
|
-
allowNegative = false
|
6
|
+
allowNegative = false,
|
7
7
|
}) => {
|
8
8
|
// This is for saving. It converts our input string to a readable number
|
9
9
|
let newVal = value.toString()
|
@@ -98,6 +98,6 @@ export const numberToString = ({ value, numberPrecision, minDecimals }) => {
|
|
98
98
|
return value.toLocaleString(langForLocaleString(), {
|
99
99
|
minimumFractionDigits: minimumRounding, // removing this for now. Why do we need this to be a minimum amount?
|
100
100
|
maximumFractionDigits:
|
101
|
-
numberPrecision < minimumRounding ? minimumRounding : numberPrecision
|
101
|
+
numberPrecision < minimumRounding ? minimumRounding : numberPrecision,
|
102
102
|
})
|
103
103
|
}
|
@@ -116,13 +116,13 @@ export const tinyLanguage = (lang) => {
|
|
116
116
|
|
117
117
|
export const langForLocaleString = () => {
|
118
118
|
const selectedLang = localStorage.getItem('lang')
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
119
|
+
? localStorage.getItem('lang') === 'fr-lu'
|
120
|
+
? 'fr-fr'
|
121
|
+
: localStorage.getItem('lang') === 'fr-ch'
|
122
|
+
? 'de-ch'
|
123
|
+
: localStorage.getItem('lang') === 'ca-es'
|
124
|
+
? 'es-es'
|
125
|
+
: localStorage.getItem('lang')
|
126
|
+
: 'en-US'
|
127
127
|
return selectedLang !== 'null' ? selectedLang : 'en-US'
|
128
|
-
}
|
128
|
+
}
|
@@ -3,13 +3,13 @@ export default {
|
|
3
3
|
rules: {
|
4
4
|
type: Array,
|
5
5
|
required: false,
|
6
|
-
default: () => []
|
7
|
-
}
|
6
|
+
default: () => [],
|
7
|
+
},
|
8
8
|
},
|
9
9
|
data() {
|
10
10
|
return {
|
11
11
|
error: false,
|
12
|
-
errMessage: ''
|
12
|
+
errMessage: '',
|
13
13
|
}
|
14
14
|
},
|
15
15
|
methods: {
|
@@ -92,6 +92,6 @@ export default {
|
|
92
92
|
this.error = true
|
93
93
|
this.errMessage = this.$gettext('invalid_year')
|
94
94
|
}
|
95
|
-
}
|
96
|
-
}
|
95
|
+
},
|
96
|
+
},
|
97
97
|
}
|
package/public/favicon.ico
DELETED
Binary file
|
package/public/index.html
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="">
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
7
|
-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
8
|
-
<title><%= htmlWebpackPlugin.options.title %></title>
|
9
|
-
</head>
|
10
|
-
<body>
|
11
|
-
<noscript>
|
12
|
-
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
13
|
-
</noscript>
|
14
|
-
<div id="app"></div>
|
15
|
-
<!-- built files will be auto injected -->
|
16
|
-
</body>
|
17
|
-
</html>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
3
|
-
<svg width="800px" height="800px" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
4
|
-
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
5
|
-
<g id="copy" fill="none" transform="translate(85.333333, 42.666667)">
|
6
|
-
<path d="M341.333333,85.3333333 L341.333333,405.333333 L85.3333333,405.333333 L85.3333333,85.3333333 L341.333333,85.3333333 Z M298.666667,128 L128,128 L128,362.666667 L298.666667,362.666667 L298.666667,128 Z M234.666667,7.10542736e-15 L234.666667,42.6666667 L42.6666667,42.6666667 L42.6666667,298.666667 L1.42108547e-14,298.666667 L1.42108547e-14,7.10542736e-15 L234.666667,7.10542736e-15 Z">
|
7
|
-
</path>
|
8
|
-
</g>
|
9
|
-
</g>
|
10
|
-
</svg>
|