@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.
Files changed (81) hide show
  1. package/.eslintrc.js +184 -0
  2. package/.prettierrc +8 -6
  3. package/package.json +9 -21
  4. package/src/App.vue +79 -78
  5. package/src/assets/theme.js +3 -3
  6. package/src/components/addNewButton/AddNewButton.stories.js +2 -2
  7. package/src/components/addNewButton/index.vue +48 -51
  8. package/src/components/banner/actionBanner/index.vue +54 -55
  9. package/src/components/banner/banner/banner.stories.js +5 -5
  10. package/src/components/banner/banner/index.vue +159 -159
  11. package/src/components/banner/infoBanner/index.vue +41 -53
  12. package/src/components/buttons/buttonIcon/index.vue +125 -122
  13. package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
  14. package/src/components/buttons/closeButton/index.vue +49 -49
  15. package/src/components/buttons/mainButton/index.vue +108 -108
  16. package/src/components/card/index.vue +70 -70
  17. package/src/components/collapsableInfoText/index.vue +96 -94
  18. package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
  19. package/src/components/deleteIcon/index.vue +54 -54
  20. package/src/components/draggableInputHandle/index.vue +37 -37
  21. package/src/components/dropdown/Dropdown.stories.js +9 -10
  22. package/src/components/dropdown/index.vue +106 -106
  23. package/src/components/errorMessage/index.vue +52 -52
  24. package/src/components/filter/filterSettings.vue +428 -422
  25. package/src/components/filter/index.vue +135 -135
  26. package/src/components/filter/parentDropdown.vue +73 -73
  27. package/src/components/icon/Icons.stories.js +7 -7
  28. package/src/components/icon/iconCollection.vue +53 -53
  29. package/src/components/icon/index.vue +122 -122
  30. package/src/components/iconWrapper/index.vue +156 -156
  31. package/src/components/infoCard/index.vue +30 -32
  32. package/src/components/infoText/index.vue +142 -137
  33. package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
  34. package/src/components/inputs/checkbox/index.vue +190 -180
  35. package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
  36. package/src/components/inputs/inputNumber/index.vue +696 -696
  37. package/src/components/inputs/inputNumberQuestion/index.vue +185 -182
  38. package/src/components/inputs/inputText/InputText.stories.js +22 -22
  39. package/src/components/inputs/inputText/index.vue +337 -336
  40. package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
  41. package/src/components/inputs/radioButton/index.vue +222 -219
  42. package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
  43. package/src/components/inputs/searchInput/index.vue +127 -126
  44. package/src/components/inputs/select/index.vue +792 -791
  45. package/src/components/inputs/select/option/index.vue +124 -124
  46. package/src/components/inputs/select/select.stories.js +31 -32
  47. package/src/components/inputs/slider/index.vue +99 -99
  48. package/src/components/inputs/switchField/index.vue +220 -222
  49. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
  50. package/src/components/inputs/textAreaInput/index.vue +171 -173
  51. package/src/components/inputs/toggle/Toggle.stories.js +14 -14
  52. package/src/components/inputs/toggle/index.vue +214 -217
  53. package/src/components/label/index.vue +82 -82
  54. package/src/components/markerItem/index.vue +68 -66
  55. package/src/components/modals/actionModal/index.vue +54 -54
  56. package/src/components/modals/infoModal/index.vue +39 -36
  57. package/src/components/modals/modal/index.vue +134 -134
  58. package/src/components/modals/modal/modal.stories.js +5 -5
  59. package/src/components/navigationTabs/index.vue +96 -94
  60. package/src/components/pageSubtitle/index.vue +55 -49
  61. package/src/components/pageTitle/index.vue +56 -56
  62. package/src/components/pagination/index.vue +92 -89
  63. package/src/components/progressBar/index.vue +107 -107
  64. package/src/components/projectMarker/index.vue +246 -244
  65. package/src/components/rangeSlider/Slider.vue +491 -465
  66. package/src/components/rangeSlider/index.vue +410 -410
  67. package/src/components/rangeSlider/utils/dom.js +5 -5
  68. package/src/components/selectedOptions/index.vue +119 -119
  69. package/src/components/sideMenu/index.vue +199 -199
  70. package/src/components/spinner/index.vue +57 -57
  71. package/src/components/tableDropdown/index.vue +520 -520
  72. package/src/components/tables/mainTable/index.vue +417 -400
  73. package/src/components/tables/viewTable/index.vue +171 -171
  74. package/src/components/threeDots/index.vue +340 -334
  75. package/src/components/videoThumbnail/index.vue +86 -86
  76. package/src/components/videoThumbnail/videoThumbnail.stories.js +14 -16
  77. package/src/helpers/numberConverter.js +2 -2
  78. package/src/helpers/translateLang.js +9 -9
  79. package/src/mixins/inputValidations.js +5 -5
  80. package/public/favicon.ico +0 -0
  81. package/public/index.html +0 -17
@@ -1,103 +1,103 @@
1
1
  <template>
2
- <wrapper :width="width" :height="height" :fit="fit">
2
+ <Wrapper :fit="fit" :height="height" :width="width">
3
3
  <img :src="src" />
4
- <iconWrapper>
5
- <icon name="play" :size="playIconSize" :color="playIconColor" />
6
- </iconWrapper>
7
- </wrapper>
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
- display: inline-block;
26
- position: relative;
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
- 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
- `
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
- name: 'VideoThumbnail',
48
- components: {
49
- Wrapper,
50
- Icon,
51
- iconWrapper
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
- fit: {
58
- required: false,
59
- default: 'cover'
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
- width: {
62
- required: false,
63
- default: '300px'
78
+ data() {
79
+ return {
80
+ isOpenByClick: false,
81
+ }
64
82
  },
65
- height: {
66
- required: false,
67
- default: '200px'
83
+ mounted() {
84
+ document.addEventListener('click', this.clickOutside)
68
85
  },
69
- playIconSize: {
70
- required: false,
71
- default: '50px'
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
- // 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
- // />
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:"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"
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
- ? 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'
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
  }
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>