@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,39 +1,41 @@
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
- <icon
11
- name="arrow_left"
9
+ <ArrowIconContainer>
10
+ <RCIcon
12
11
  :color="getTheme.colors.brightBlue"
12
+ name="arrow_left"
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
24
23
  >
24
+ 1
25
+ </PaginationLink>
25
26
 
26
27
  <!-- Back tree dots -->
27
28
  <span v-if="currentPage > 3 && paginationParams.pages > 4">...</span>
28
29
 
29
30
  <!-- Current block -->
30
- <paginationLink
31
+ <PaginationLink
31
32
  v-for="number in paginationNumbers()"
32
33
  :key="number"
33
34
  :class="[currentPage === number ? 'active' : '']"
34
35
  @click="fetchPage(number)"
35
- >{{ number }}</paginationLink
36
36
  >
37
+ {{ number }}
38
+ </PaginationLink>
37
39
 
38
40
  <!-- Forward tree dots -->
39
41
  <span
@@ -44,102 +46,103 @@
44
46
  >
45
47
 
46
48
  <!-- End page -->
47
- <paginationLink
49
+ <PaginationLink
48
50
  v-if="
49
51
  paginationParams.pages - currentPage > 1 && paginationParams.pages > 3
50
52
  "
51
53
  @click="fetchPage(paginationParams.pages)"
52
- >{{ paginationParams.pages }}</paginationLink
53
54
  >
55
+ {{ paginationParams.pages }}
56
+ </PaginationLink>
54
57
 
55
58
  <!-- Forward button -->
56
- <paginationLink
59
+ <PaginationLink
57
60
  v-if="paginationParams.next"
58
61
  @click="fetchPage(paginationParams.next)"
59
62
  >
60
- <arrowText>{{ $gettext('forward') }}</arrowText>
61
- <arrowIconContainer>
62
- <icon
63
- name="arrow_right"
63
+ <ArrowText>{{ $gettext('forward') }}</ArrowText>
64
+ <ArrowIconContainer>
65
+ <RCIcon
64
66
  :color="getTheme.colors.brightBlue"
67
+ name="arrow_right"
65
68
  size="12px"
66
69
  />
67
- </arrowIconContainer>
68
- </paginationLink>
69
- </paginationWrapper>
70
+ </ArrowIconContainer>
71
+ </PaginationLink>
72
+ </PaginationWrapper>
70
73
  </template>
71
74
 
72
75
  <script>
73
- import styled from 'vue3-styled-components'
74
- import icon from '../icon'
75
- import theme from '@/assets/theme.js'
76
+ import styled from 'vue3-styled-components'
77
+ import RCIcon from '../icon'
78
+ import theme from '@/assets/theme.js'
76
79
 
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};
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};
94
97
 
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
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;
123
103
  }
124
- },
125
- methods: {
126
- getNewProjects(num) {
127
- this.$emit('on-pagination-change', num)
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
+ },
128
146
  },
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
- }
143
147
  }
144
- }
145
148
  </script>
@@ -1,125 +1,125 @@
1
1
  <template>
2
- <container>
3
- <progress-container
4
- :backgroundColor="backgroundColor"
5
- :maxWidth="maxWidth"
6
- :minWidth="minWidth"
2
+ <Container>
3
+ <ProgressContainer
4
+ :background-color="backgroundColor"
7
5
  class="progress-container"
6
+ :max-width="maxWidth"
7
+ :min-width="minWidth"
8
8
  >
9
- <progress-fill
9
+ <ProgressFill
10
10
  class="progress-bar"
11
- :fillProgress="fillProgress"
12
- :fillColor="fillColor"
11
+ :fill-color="fillColor"
12
+ :fill-progress="fillProgress"
13
13
  />
14
- </progress-container>
15
- <label-text class="progress-text" v-if="stepNumber || labelText"
16
- >{{ labelText ? labelText : "" }}
17
- {{ stepNumber ? stepNumber : "" }}</label-text
18
- >
19
- </container>
14
+ </ProgressContainer>
15
+ <LabelText v-if="stepNumber || labelText" class="progress-text">
16
+ {{ labelText ? labelText : '' }}
17
+ {{ stepNumber ? stepNumber : '' }}
18
+ </LabelText>
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,
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;
46
+ const containerProps = {
47
+ backgroundColor: String,
48
+ maxWidth: String,
49
+ minWidth: String,
62
50
  }
63
- `
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
+ `
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: "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,
95
- },
96
- backgroundColor: {
97
- required: false,
98
- type: String,
99
- default: null,
100
- },
101
- minWidth: {
102
- required: false,
103
- type: String,
104
- default: null,
82
+ export default {
83
+ name: 'ProgressBar',
84
+ components: {
85
+ Container,
86
+ ProgressContainer,
87
+ ProgressFill,
88
+ LabelText,
105
89
  },
106
- maxWidth: {
107
- required: false,
108
- type: String,
109
- default: null,
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
+ },
110
123
  },
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
- }
124
+ }
125
125
  </script>