@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.3 → 7.24.3-qa-elisee-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 (83) hide show
  1. package/.prettierrc +6 -8
  2. package/package.json +21 -9
  3. package/public/favicon.ico +0 -0
  4. package/public/index.html +17 -0
  5. package/src/App.vue +78 -79
  6. package/src/assets/svgIcons/adjust_roof.svg +6 -0
  7. package/src/assets/svgIcons/copy.svg +10 -0
  8. package/src/assets/theme.js +3 -3
  9. package/src/components/addNewButton/AddNewButton.stories.js +2 -2
  10. package/src/components/addNewButton/index.vue +51 -48
  11. package/src/components/banner/actionBanner/index.vue +55 -54
  12. package/src/components/banner/banner/banner.stories.js +5 -5
  13. package/src/components/banner/banner/index.vue +159 -159
  14. package/src/components/banner/infoBanner/index.vue +53 -41
  15. package/src/components/buttons/buttonIcon/index.vue +122 -125
  16. package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
  17. package/src/components/buttons/closeButton/index.vue +49 -49
  18. package/src/components/buttons/mainButton/index.vue +119 -119
  19. package/src/components/card/index.vue +70 -70
  20. package/src/components/collapsableInfoText/index.vue +94 -96
  21. package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
  22. package/src/components/deleteIcon/index.vue +54 -54
  23. package/src/components/draggableInputHandle/index.vue +37 -37
  24. package/src/components/dropdown/Dropdown.stories.js +10 -9
  25. package/src/components/dropdown/index.vue +106 -106
  26. package/src/components/errorMessage/index.vue +52 -52
  27. package/src/components/filter/filterSettings.vue +433 -439
  28. package/src/components/filter/index.vue +135 -135
  29. package/src/components/filter/parentDropdown.vue +73 -73
  30. package/src/components/icon/Icons.stories.js +7 -7
  31. package/src/components/icon/iconCollection.vue +53 -53
  32. package/src/components/icon/index.vue +121 -121
  33. package/src/components/iconWrapper/index.vue +156 -156
  34. package/src/components/infoCard/index.vue +26 -26
  35. package/src/components/infoText/index.vue +132 -133
  36. package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
  37. package/src/components/inputs/checkbox/index.vue +180 -190
  38. package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
  39. package/src/components/inputs/inputNumber/index.vue +644 -647
  40. package/src/components/inputs/inputNumberQuestion/index.vue +182 -185
  41. package/src/components/inputs/inputText/InputText.stories.js +22 -22
  42. package/src/components/inputs/inputText/index.vue +336 -337
  43. package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
  44. package/src/components/inputs/radioButton/index.vue +219 -221
  45. package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
  46. package/src/components/inputs/searchInput/index.vue +126 -127
  47. package/src/components/inputs/select/index.vue +776 -778
  48. package/src/components/inputs/select/option/index.vue +124 -124
  49. package/src/components/inputs/select/select.stories.js +32 -31
  50. package/src/components/inputs/slider/index.vue +99 -99
  51. package/src/components/inputs/switchField/index.vue +222 -220
  52. package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
  53. package/src/components/inputs/textAreaInput/index.vue +173 -171
  54. package/src/components/inputs/toggle/Toggle.stories.js +14 -14
  55. package/src/components/inputs/toggle/index.vue +217 -214
  56. package/src/components/label/index.vue +82 -82
  57. package/src/components/markerItem/index.vue +66 -68
  58. package/src/components/modals/actionModal/index.vue +54 -54
  59. package/src/components/modals/infoModal/index.vue +36 -39
  60. package/src/components/modals/modal/index.vue +134 -134
  61. package/src/components/modals/modal/modal.stories.js +5 -5
  62. package/src/components/navigationTabs/index.vue +94 -96
  63. package/src/components/pageSubtitle/index.vue +49 -55
  64. package/src/components/pageTitle/index.vue +56 -56
  65. package/src/components/pagination/index.vue +89 -92
  66. package/src/components/progressBar/index.vue +107 -107
  67. package/src/components/projectMarker/index.vue +244 -246
  68. package/src/components/rangeSlider/Slider.vue +465 -491
  69. package/src/components/rangeSlider/index.vue +410 -410
  70. package/src/components/rangeSlider/utils/dom.js +5 -5
  71. package/src/components/selectedOptions/index.vue +119 -119
  72. package/src/components/sideMenu/index.vue +199 -199
  73. package/src/components/spinner/index.vue +57 -57
  74. package/src/components/tableDropdown/index.vue +520 -520
  75. package/src/components/tables/mainTable/index.vue +362 -366
  76. package/src/components/tables/viewTable/index.vue +171 -171
  77. package/src/components/threeDots/index.vue +334 -340
  78. package/src/components/videoThumbnail/index.vue +86 -86
  79. package/src/components/videoThumbnail/videoThumbnail.stories.js +16 -14
  80. package/src/helpers/numberConverter.js +2 -2
  81. package/src/helpers/translateLang.js +9 -9
  82. package/src/mixins/inputValidations.js +5 -5
  83. package/.eslintrc.js +0 -184
@@ -1,103 +1,103 @@
1
1
  <template>
2
- <Wrapper :fit="fit" :height="height" :width="width">
2
+ <wrapper :width="width" :height="height" :fit="fit">
3
3
  <img :src="src" />
4
- <IconWrapper>
5
- <Icon :color="playIconColor" name="play" :size="playIconSize" />
6
- </IconWrapper>
7
- </Wrapper>
4
+ <iconWrapper>
5
+ <icon name="play" :size="playIconSize" :color="playIconColor" />
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;
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};
27
31
  width: ${(props) => props.width};
28
32
  height: ${(props) => props.height};
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
- `
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,
46
+ export default {
47
+ name: 'VideoThumbnail',
48
+ components: {
49
+ Wrapper,
50
+ Icon,
51
+ iconWrapper
52
+ },
53
+ props: {
54
+ src: {
55
+ required: true
52
56
  },
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
- },
77
- },
78
- data() {
79
- return {
80
- isOpenByClick: false,
81
- }
57
+ fit: {
58
+ required: false,
59
+ default: 'cover'
82
60
  },
83
- mounted() {
84
- document.addEventListener('click', this.clickOutside)
61
+ width: {
62
+ required: false,
63
+ default: '300px'
85
64
  },
86
- beforeDestroy() {
87
- document.removeEventListener('click', this.clickOutside)
65
+ height: {
66
+ required: false,
67
+ default: '200px'
88
68
  },
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
- },
69
+ playIconSize: {
70
+ required: false,
71
+ default: '50px'
101
72
  },
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)
102
101
  }
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,21 +13,23 @@ 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
  }
package/.eslintrc.js DELETED
@@ -1,184 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- browser: true,
5
- node: true,
6
- es6: true,
7
- },
8
- extends: [
9
- 'eslint:recommended',
10
- 'eslint:recommended',
11
- 'plugin:vue/vue3-recommended',
12
- 'plugin:prettier/recommended',
13
- ],
14
- plugins: ['vue', 'prettier'],
15
- parserOptions: {
16
- ecmaVersion: 2020,
17
- sourceType: 'module',
18
- },
19
- rules: {
20
- 'vue/component-name-in-template-casing': [
21
- 'warn',
22
- 'PascalCase',
23
- {
24
- registeredComponentsOnly: false,
25
- ignores: [],
26
- },
27
- ],
28
- 'vue/multi-word-component-names': [
29
- 'warn',
30
- {
31
- ignores: [],
32
- },
33
- ],
34
- 'vue/html-closing-bracket-newline': [
35
- 'warn',
36
- {
37
- singleline: 'never',
38
- multiline: 'always',
39
- },
40
- ],
41
- 'vue/html-closing-bracket-spacing': [
42
- 'warn',
43
- {
44
- startTag: 'never',
45
- endTag: 'never',
46
- selfClosingTag: 'always',
47
- },
48
- ],
49
- 'vue/no-multi-spaces': [
50
- 'warn',
51
- {
52
- ignoreProperties: false,
53
- },
54
- ],
55
- 'vue/html-end-tags': 'warn',
56
- 'keyword-spacing': [
57
- 'warn',
58
- {
59
- before: true, // Require a space before keywords
60
- after: true, // Require a space after keywords
61
- },
62
- ],
63
- // Enforce one space after comma
64
- 'comma-spacing': [
65
- 'warn',
66
- {
67
- before: false, // No space before comma
68
- after: true, // Require a space after comma
69
- },
70
- ],
71
- 'func-call-spacing': ['warn', 'never'],
72
- // Enforce one space around binary operators (+, -, *, /, etc.)
73
- 'space-infix-ops': 'warn',
74
- // Enforce no space inside parentheses
75
- 'space-in-parens': ['warn', 'never'],
76
- // Enforce one space before block statements (if, else, for, etc.)
77
- 'space-before-blocks': 'warn',
78
- // Enforce no spaces inside square brackets
79
- 'array-bracket-spacing': ['warn', 'never'],
80
- // Enforce one space before function parentheses
81
- 'space-before-function-paren': ['warn', 'never'],
82
- // Enforce one space inside braces of object literals
83
- 'object-curly-spacing': ['warn', 'always'],
84
- // Enforce one space before and after arrow functions (optional)
85
- 'arrow-spacing': ['warn', { before: true, after: true }],
86
- // Enforce one space after colon in object literals
87
- 'key-spacing': [
88
- 'warn',
89
- {
90
- beforeColon: false, // No space before colon
91
- afterColon: true, // Require one space after colon
92
- mode: 'strict', // Enforce spacing between key and value
93
- },
94
- ],
95
- 'vue/html-indent': 'off',
96
- 'vue/html-quotes': ['warn', 'double'],
97
- 'vue/html-self-closing': [
98
- 'warn',
99
- {
100
- html: {
101
- void: 'always',
102
- normal: 'never',
103
- component: 'always',
104
- },
105
- svg: 'always',
106
- math: 'always',
107
- },
108
- ],
109
- 'vue/require-default-prop': 'warn',
110
- 'vue/require-prop-types': 'warn',
111
- 'vue/v-on-event-hyphenation': [
112
- 'warn',
113
- 'always',
114
- {
115
- autofix: true,
116
- ignore: [],
117
- },
118
- ],
119
- 'vue/prop-name-casing': ['warn', 'camelCase'],
120
- 'vue/order-in-components': 'warn',
121
- 'vue/this-in-template': ['warn', 'never'],
122
- 'vue/attributes-order': [
123
- 'warn',
124
- {
125
- order: [
126
- 'DEFINITION',
127
- 'LIST_RENDERING',
128
- 'CONDITIONALS',
129
- 'RENDER_MODIFIERS',
130
- 'GLOBAL',
131
- ['UNIQUE', 'SLOT'],
132
- 'TWO_WAY_BINDING',
133
- 'OTHER_DIRECTIVES',
134
- 'OTHER_ATTR',
135
- 'EVENTS',
136
- 'CONTENT',
137
- ],
138
- alphabetical: true,
139
- },
140
- ],
141
- 'vue/no-unused-vars': 'warn',
142
- 'vue/no-use-v-if-with-v-for': [
143
- 'warn',
144
- {
145
- allowUsingIterationVar: false,
146
- },
147
- ],
148
- 'no-unused-vars': 'warn',
149
- 'no-undef': 'warn',
150
- 'no-console': 'warn',
151
- 'no-debugger': 'warn',
152
- 'no-multi-spaces': 'warn',
153
- 'no-mixed-spaces-and-tabs': 'warn',
154
- 'no-redeclare': 'warn',
155
- 'no-prototype-builtins': 'warn',
156
- 'no-unsafe-finally': 'warn',
157
- 'max-len': [
158
- 'warn',
159
- {
160
- code: 120,
161
- tabWidth: 2,
162
- ignoreUrls: true,
163
- ignoreComments: true,
164
- ignoreTrailingComments: true,
165
- ignorePattern: '^import\\s.+\\sfrom\\s.+;$',
166
- },
167
- ],
168
- 'prettier/prettier': [
169
- 'warn',
170
- {
171
- semi: false,
172
- singleQuote: true,
173
- trailingComma: 'es5',
174
- printWidth: 80,
175
- tabWidth: 2,
176
- useTabs: false,
177
- endOfLine: 'auto',
178
- },
179
- ],
180
- },
181
- globals: {
182
- _: true,
183
- },
184
- }