@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.2 → 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 -126
  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,41 +1,39 @@
1
1
  <template>
2
2
  <!-- Check, if pages more than 1 -->
3
- <PaginationWrapper v-if="paginationParams.pages > 1">
3
+ <paginationWrapper v-if="paginationParams.pages > 1">
4
4
  <!-- Back button -->
5
- <PaginationLink
5
+ <paginationLink
6
6
  v-if="paginationParams.previous"
7
7
  @click="fetchPage(paginationParams.previous)"
8
8
  >
9
- <ArrowIconContainer>
10
- <RCIcon
11
- :color="getTheme.colors.brightBlue"
9
+ <arrowIconContainer>
10
+ <icon
12
11
  name="arrow_left"
12
+ :color="getTheme.colors.brightBlue"
13
13
  size="12px"
14
14
  />
15
- </ArrowIconContainer>
16
- <ArrowText>{{ $gettext('back') }}</ArrowText>
17
- </PaginationLink>
15
+ </arrowIconContainer>
16
+ <arrowText>{{ $gettext('back') }}</arrowText>
17
+ </paginationLink>
18
18
 
19
19
  <!-- First page -->
20
- <PaginationLink
20
+ <paginationLink
21
21
  v-if="currentPage > 2 && paginationParams.pages > 3"
22
22
  @click="fetchPage(1)"
23
+ >1</paginationLink
23
24
  >
24
- 1
25
- </PaginationLink>
26
25
 
27
26
  <!-- Back tree dots -->
28
27
  <span v-if="currentPage > 3 && paginationParams.pages > 4">...</span>
29
28
 
30
29
  <!-- Current block -->
31
- <PaginationLink
30
+ <paginationLink
32
31
  v-for="number in paginationNumbers()"
33
32
  :key="number"
34
33
  :class="[currentPage === number ? 'active' : '']"
35
34
  @click="fetchPage(number)"
35
+ >{{ number }}</paginationLink
36
36
  >
37
- {{ number }}
38
- </PaginationLink>
39
37
 
40
38
  <!-- Forward tree dots -->
41
39
  <span
@@ -46,103 +44,102 @@
46
44
  >
47
45
 
48
46
  <!-- End page -->
49
- <PaginationLink
47
+ <paginationLink
50
48
  v-if="
51
49
  paginationParams.pages - currentPage > 1 && paginationParams.pages > 3
52
50
  "
53
51
  @click="fetchPage(paginationParams.pages)"
52
+ >{{ paginationParams.pages }}</paginationLink
54
53
  >
55
- {{ paginationParams.pages }}
56
- </PaginationLink>
57
54
 
58
55
  <!-- Forward button -->
59
- <PaginationLink
56
+ <paginationLink
60
57
  v-if="paginationParams.next"
61
58
  @click="fetchPage(paginationParams.next)"
62
59
  >
63
- <ArrowText>{{ $gettext('forward') }}</ArrowText>
64
- <ArrowIconContainer>
65
- <RCIcon
66
- :color="getTheme.colors.brightBlue"
60
+ <arrowText>{{ $gettext('forward') }}</arrowText>
61
+ <arrowIconContainer>
62
+ <icon
67
63
  name="arrow_right"
64
+ :color="getTheme.colors.brightBlue"
68
65
  size="12px"
69
66
  />
70
- </ArrowIconContainer>
71
- </PaginationLink>
72
- </PaginationWrapper>
67
+ </arrowIconContainer>
68
+ </paginationLink>
69
+ </paginationWrapper>
73
70
  </template>
74
71
 
75
72
  <script>
76
- import styled from 'vue3-styled-components'
77
- import RCIcon from '../icon'
78
- import theme from '@/assets/theme.js'
73
+ import styled from 'vue3-styled-components'
74
+ import icon from '../icon'
75
+ import theme from '@/assets/theme.js'
79
76
 
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};
77
+ const paginationWrapper = styled.nav`
78
+ color: ${(props) => props.theme.colors.brightBlue};
79
+ font-size: 13px;
80
+ display: flex;
81
+ flex-wrap: wrap;
82
+ justify-content: flex-end;
83
+ align-items: center;
84
+ `
85
+ const paginationLink = styled.div`
86
+ display: flex;
87
+ padding: 0px 5px;
88
+ margin: 0 2px;
89
+ text-align: center;
90
+ border-radius: 3px;
91
+ white-space: nowrap;
92
+ cursor: pointer;
93
+ color: ${(props) => props.theme.colors.brightBlue};
97
94
 
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;
95
+ &.active {
96
+ color: ${(props) => props.theme.colors.white};
97
+ background-color: ${(props) => props.theme.colors.brightBlue};
98
+ padding: 7px 12px;
99
+ border-radius: 4px;
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
103
123
  }
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
- },
124
+ },
125
+ methods: {
126
+ getNewProjects(num) {
127
+ this.$emit('on-pagination-change', num)
146
128
  },
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
+ }
147
143
  }
144
+ }
148
145
  </script>
@@ -1,125 +1,125 @@
1
1
  <template>
2
- <Container>
3
- <ProgressContainer
4
- :background-color="backgroundColor"
2
+ <container>
3
+ <progress-container
4
+ :backgroundColor="backgroundColor"
5
+ :maxWidth="maxWidth"
6
+ :minWidth="minWidth"
5
7
  class="progress-container"
6
- :max-width="maxWidth"
7
- :min-width="minWidth"
8
8
  >
9
- <ProgressFill
9
+ <progress-fill
10
10
  class="progress-bar"
11
- :fill-color="fillColor"
12
- :fill-progress="fillProgress"
11
+ :fillProgress="fillProgress"
12
+ :fillColor="fillColor"
13
13
  />
14
- </ProgressContainer>
15
- <LabelText v-if="stepNumber || labelText" class="progress-text">
16
- {{ labelText ? labelText : '' }}
17
- {{ stepNumber ? stepNumber : '' }}
18
- </LabelText>
19
- </Container>
14
+ </progress-container>
15
+ <label-text class="progress-text" v-if="stepNumber || labelText"
16
+ >{{ labelText ? labelText : "" }}
17
+ {{ stepNumber ? stepNumber : "" }}</label-text
18
+ >
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 'vue3-styled-components'
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
- 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
- `
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
- backgroundColor: String,
48
- maxWidth: String,
49
- minWidth: String,
46
+ const containerProps = {
47
+ backgroundColor: String,
48
+ maxWidth: String,
49
+ minWidth: String,
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;
50
62
  }
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
- `
63
+ `
64
64
 
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
- `
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 LabelText = styled.div`
74
- color: ${(props) => props.theme.colors.darkGray};
75
- font-size: 16px;
73
+ const labelText = styled.div`
74
+ color: ${(props) => props.theme.colors.darkGray};
75
+ font-size: 16px;
76
76
 
77
- @media (max-width: ${(props) => props.theme.screen.tablet}) {
78
- padding-left: 16px;
79
- }
80
- `
77
+ @media (max-width: ${(props) => props.theme.screen.tablet}) {
78
+ padding-left: 16px;
79
+ }
80
+ `
81
81
 
82
- export default {
83
- name: 'ProgressBar',
84
- components: {
85
- Container,
86
- ProgressContainer,
87
- ProgressFill,
88
- LabelText,
82
+ export default {
83
+ name: "progress-bar",
84
+ components: {
85
+ Container,
86
+ ProgressContainer,
87
+ ProgressFill,
88
+ labelText,
89
+ },
90
+ props: {
91
+ fillColor: {
92
+ required: false,
93
+ type: String,
94
+ default: null,
89
95
  },
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
- },
96
+ backgroundColor: {
97
+ required: false,
98
+ type: String,
99
+ default: null,
123
100
  },
124
- }
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
+ },
123
+ },
124
+ }
125
125
  </script>