@eturnity/eturnity_reusable_components 7.24.3-EPDM-11250.0 → 7.24.3-EPDM-11320.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 (68) hide show
  1. package/.eslintrc.js +125 -0
  2. package/package.json +6 -20
  3. package/src/App.vue +75 -70
  4. package/src/components/addNewButton/index.vue +24 -27
  5. package/src/components/banner/actionBanner/index.vue +32 -30
  6. package/src/components/banner/banner/index.vue +88 -80
  7. package/src/components/banner/infoBanner/index.vue +36 -44
  8. package/src/components/buttons/buttonIcon/index.vue +83 -78
  9. package/src/components/buttons/closeButton/index.vue +26 -26
  10. package/src/components/buttons/mainButton/index.vue +80 -76
  11. package/src/components/card/index.vue +56 -52
  12. package/src/components/collapsableInfoText/index.vue +81 -76
  13. package/src/components/deleteIcon/index.vue +31 -28
  14. package/src/components/draggableInputHandle/index.vue +20 -17
  15. package/src/components/dropdown/Dropdown.stories.js +8 -8
  16. package/src/components/dropdown/index.vue +75 -72
  17. package/src/components/errorMessage/index.vue +23 -23
  18. package/src/components/filter/filterSettings.vue +349 -329
  19. package/src/components/filter/index.vue +130 -130
  20. package/src/components/filter/parentDropdown.vue +43 -40
  21. package/src/components/icon/Icons.stories.js +4 -4
  22. package/src/components/icon/iconCache.js +1 -1
  23. package/src/components/icon/iconCollection.vue +40 -37
  24. package/src/components/icon/index.vue +72 -65
  25. package/src/components/iconWrapper/index.vue +122 -118
  26. package/src/components/infoCard/index.vue +20 -17
  27. package/src/components/infoText/index.vue +88 -82
  28. package/src/components/inputs/checkbox/index.vue +91 -94
  29. package/src/components/inputs/inputNumber/index.vue +508 -488
  30. package/src/components/inputs/inputNumberQuestion/index.vue +127 -124
  31. package/src/components/inputs/inputText/index.vue +265 -252
  32. package/src/components/inputs/radioButton/index.vue +135 -120
  33. package/src/components/inputs/searchInput/index.vue +84 -81
  34. package/src/components/inputs/select/index.vue +644 -631
  35. package/src/components/inputs/select/option/index.vue +91 -91
  36. package/src/components/inputs/select/select.stories.js +7 -7
  37. package/src/components/inputs/slider/index.vue +46 -46
  38. package/src/components/inputs/switchField/index.vue +159 -152
  39. package/src/components/inputs/textAreaInput/index.vue +120 -113
  40. package/src/components/inputs/toggle/index.vue +137 -127
  41. package/src/components/label/index.vue +64 -61
  42. package/src/components/markerItem/index.vue +40 -40
  43. package/src/components/modals/actionModal/index.vue +32 -29
  44. package/src/components/modals/infoModal/index.vue +34 -27
  45. package/src/components/modals/modal/index.vue +88 -80
  46. package/src/components/navigationTabs/index.vue +50 -47
  47. package/src/components/pageSubtitle/index.vue +33 -29
  48. package/src/components/pageTitle/index.vue +47 -39
  49. package/src/components/pagination/index.vue +64 -62
  50. package/src/components/progressBar/index.vue +70 -67
  51. package/src/components/projectMarker/index.vue +172 -163
  52. package/src/components/rangeSlider/Slider.vue +449 -449
  53. package/src/components/rangeSlider/index.vue +282 -270
  54. package/src/components/rangeSlider/utils/dom.js +3 -3
  55. package/src/components/selectedOptions/index.vue +51 -51
  56. package/src/components/sideMenu/index.vue +117 -109
  57. package/src/components/spinner/index.vue +37 -34
  58. package/src/components/tableDropdown/index.vue +343 -326
  59. package/src/components/tables/mainTable/index.vue +109 -106
  60. package/src/components/tables/viewTable/index.vue +105 -92
  61. package/src/components/threeDots/index.vue +174 -171
  62. package/src/components/videoThumbnail/index.vue +67 -59
  63. package/src/components/videoThumbnail/videoThumbnail.stories.js +6 -6
  64. package/src/helpers/numberConverter.js +1 -3
  65. package/src/helpers/translateLang.js +10 -13
  66. package/.prettierrc +0 -7
  67. package/public/favicon.ico +0 -0
  68. package/public/index.html +0 -17
@@ -1,10 +1,18 @@
1
1
  <template>
2
- <title-wrap :hasInfoText="!!infoText">
3
- <title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
2
+ <TitleWrap :has-info-text="!!infoText">
3
+ <TitleText
4
+ :color="color"
5
+ :font-size="fontSize"
6
+ :uppercase="uppercase"
7
+ >
4
8
  {{ text }}
5
- </title-text>
6
- <info-text v-if="!!infoText" :text="infoText" :alignArrow="infoAlign" />
7
- </title-wrap>
9
+ </TitleText>
10
+ <InfoText
11
+ v-if="!!infoText"
12
+ :align-arrow="infoAlign"
13
+ :text="infoText"
14
+ />
15
+ </TitleWrap>
8
16
  </template>
9
17
 
10
18
  <script>
@@ -14,55 +22,55 @@
14
22
  // text="My Page Title"
15
23
  // color="red"
16
24
  // />
17
- import styled from 'vue3-styled-components'
18
- import InfoText from '../infoText'
25
+ import styled from 'vue3-styled-components'
26
+ import InfoText from '../infoText'
19
27
 
20
- const wrapAttrs = { hasInfoText: Boolean }
21
- const TitleWrap = styled('div', wrapAttrs)`
28
+ const wrapAttrs = { hasInfoText: Boolean }
29
+ const TitleWrap = styled('div', wrapAttrs)`
22
30
  display: grid;
23
31
  align-items: center;
24
32
  grid-gap: 12px;
25
33
  grid-template-columns: ${(props) =>
26
- props.hasInfoText ? 'auto auto 1fr' : '1fr'};
34
+ props.hasInfoText ? 'auto auto 1fr' : '1fr'};
27
35
  margin-bottom: 20px;
28
36
  `
29
37
 
30
- const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
31
- const TitleText = styled('span', titleAttrs)`
38
+ const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
39
+ const TitleText = styled('span', titleAttrs)`
32
40
  color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
33
41
  font-weight: bold;
34
42
  font-size: ${(props) => (props.fontSize ? props.fontSize : '18px')};
35
43
  text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
36
44
  `
37
45
 
38
- export default {
39
- name: 'page-title',
40
- components: {
41
- TitleText,
42
- TitleWrap,
43
- InfoText
44
- },
45
- props: {
46
- text: {
47
- required: true
46
+ export default {
47
+ name: 'PageTitle',
48
+ components: {
49
+ TitleText,
50
+ TitleWrap,
51
+ InfoText
48
52
  },
49
- color: {
50
- required: false
51
- },
52
- fontSize: {
53
- required: false
54
- },
55
- uppercase: {
56
- required: false,
57
- default: true
58
- },
59
- infoText: {
60
- required: false,
61
- default: null
62
- },
63
- infoAlign: {
64
- required: false
53
+ props: {
54
+ text: {
55
+ required: true
56
+ },
57
+ color: {
58
+ required: false
59
+ },
60
+ fontSize: {
61
+ required: false
62
+ },
63
+ uppercase: {
64
+ required: false,
65
+ default: true
66
+ },
67
+ infoText: {
68
+ required: false,
69
+ default: null
70
+ },
71
+ infoAlign: {
72
+ required: false
73
+ }
65
74
  }
66
75
  }
67
- }
68
76
  </script>
@@ -1,80 +1,82 @@
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
40
42
  v-if="
41
43
  paginationParams.pages - currentPage > 2 && paginationParams.pages > 4
42
44
  "
43
- >...</span
44
- >
45
+ >...</span>
45
46
 
46
47
  <!-- End page -->
47
- <paginationLink
48
+ <PaginationLink
48
49
  v-if="
49
50
  paginationParams.pages - currentPage > 1 && paginationParams.pages > 3
50
51
  "
51
52
  @click="fetchPage(paginationParams.pages)"
52
- >{{ paginationParams.pages }}</paginationLink
53
53
  >
54
+ {{ paginationParams.pages }}
55
+ </PaginationLink>
54
56
 
55
57
  <!-- Forward button -->
56
- <paginationLink
58
+ <PaginationLink
57
59
  v-if="paginationParams.next"
58
60
  @click="fetchPage(paginationParams.next)"
59
61
  >
60
- <arrowText>{{ $gettext('forward') }}</arrowText>
61
- <arrowIconContainer>
62
- <icon
63
- name="arrow_right"
62
+ <ArrowText>{{ $gettext('forward') }}</ArrowText>
63
+ <ArrowIconContainer>
64
+ <RCIcon
64
65
  :color="getTheme.colors.brightBlue"
66
+ name="arrow_right"
65
67
  size="12px"
66
68
  />
67
- </arrowIconContainer>
68
- </paginationLink>
69
- </paginationWrapper>
69
+ </ArrowIconContainer>
70
+ </PaginationLink>
71
+ </PaginationWrapper>
70
72
  </template>
71
73
 
72
74
  <script>
73
- import styled from 'vue3-styled-components'
74
- import icon from '../icon'
75
- import theme from '@/assets/theme.js'
75
+ import styled from 'vue3-styled-components'
76
+ import RCIcon from '../icon'
77
+ import theme from '@/assets/theme.js'
76
78
 
77
- const paginationWrapper = styled.nav`
79
+ const paginationWrapper = styled.nav`
78
80
  color: ${(props) => props.theme.colors.brightBlue};
79
81
  font-size: 13px;
80
82
  display: flex;
@@ -82,7 +84,7 @@ const paginationWrapper = styled.nav`
82
84
  justify-content: flex-end;
83
85
  align-items: center;
84
86
  `
85
- const paginationLink = styled.div`
87
+ const paginationLink = styled.div`
86
88
  display: flex;
87
89
  padding: 0px 5px;
88
90
  margin: 0 2px;
@@ -99,47 +101,47 @@ const paginationLink = styled.div`
99
101
  border-radius: 4px;
100
102
  }
101
103
  `
102
- const arrowText = styled.div`
104
+ const arrowText = styled.div`
103
105
  color: ${(props) => props.theme.colors.brightBlue};
104
106
  `
105
- const arrowIconContainer = styled.div`
107
+ const arrowIconContainer = styled.div`
106
108
  margin: 0 10px;
107
109
  display: flex;
108
110
  align-items: center;
109
111
  `
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
123
- }
124
- },
125
- methods: {
126
- getNewProjects(num) {
127
- this.$emit('on-pagination-change', num)
112
+ export default {
113
+ name: 'PaginationComponent',
114
+ components: {
115
+ paginationWrapper,
116
+ paginationLink,
117
+ RCIcon,
118
+ arrowText,
119
+ arrowIconContainer
120
+ },
121
+ props: ['fetchPage', 'currentPage', 'paginationParams'],
122
+ computed: {
123
+ getTheme() {
124
+ return theme
125
+ }
128
126
  },
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]
127
+ methods: {
128
+ getNewProjects(num) {
129
+ this.$emit('on-pagination-change', num)
130
+ },
131
+ paginationNumbers() {
132
+ const prev = this.paginationParams.previous
133
+ const next = this.paginationParams.next
134
+ const n = prev + 1 || next - 1
135
+ if (this.paginationParams.pages === 2) {
136
+ return prev ? [n - 1, n] : [n, n + 1]
137
+ } else {
138
+ return prev
139
+ ? next
140
+ ? [n - 1, n, n + 1]
141
+ : [n - 2, n - 1, n]
142
+ : [n, n + 1, n + 2]
143
+ }
141
144
  }
142
145
  }
143
146
  }
144
- }
145
147
  </script>
@@ -1,22 +1,25 @@
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
14
+ </ProgressContainer>
15
+ <LabelText
16
+ v-if="stepNumber || labelText"
17
+ class="progress-text"
18
18
  >
19
- </container>
19
+ {{ labelText ? labelText : "" }}
20
+ {{ stepNumber ? stepNumber : "" }}
21
+ </LabelText>
22
+ </Container>
20
23
  </template>
21
24
 
22
25
  <script>
@@ -31,9 +34,9 @@
31
34
  // stepNumber="4"
32
35
  // :labelText="translate('step')"
33
36
  // />
34
- import styled from "vue3-styled-components"
37
+ import styled from "vue3-styled-components"
35
38
 
36
- const Container = styled.div`
39
+ const Container = styled.div`
37
40
  display: grid;
38
41
  grid-template-columns: 1fr;
39
42
  grid-row-gap: 16px;
@@ -43,12 +46,12 @@ const Container = styled.div`
43
46
  }
44
47
  `
45
48
 
46
- const containerProps = {
47
- backgroundColor: String,
48
- maxWidth: String,
49
- minWidth: String,
50
- }
51
- const ProgressContainer = styled("div", containerProps)`
49
+ const containerProps = {
50
+ backgroundColor: String,
51
+ maxWidth: String,
52
+ minWidth: String,
53
+ }
54
+ const ProgressContainer = styled("div", containerProps)`
52
55
  width: 100%;
53
56
  min-width: ${(props) => (props.minWidth ? props.minWidth : "auto")};
54
57
  max-width: ${(props) => (props.maxWidth ? props.maxWidth : "none")};
@@ -56,21 +59,21 @@ const ProgressContainer = styled("div", containerProps)`
56
59
  background-color: ${(props) =>
57
60
  props.backgroundColor
58
61
  ? props.backgroundColor
59
- : props.theme.colors.lightGray};
62
+ : props.theme.colors.lightGray};
60
63
  @media (max-width: ${(props) => props.theme.screen.mobile}) {
61
64
  height: 4px;
62
65
  }
63
66
  `
64
67
 
65
- const fillProps = { fillColor: String, fillProgress: String | Number }
66
- const ProgressFill = styled("div", fillProps)`
68
+ const fillProps = { fillColor: String, fillProgress: String | Number }
69
+ const ProgressFill = styled("div", fillProps)`
67
70
  height: 100%;
68
71
  width: ${(props) => props.fillProgress + "%"};
69
72
  background-color: ${(props) =>
70
- props.fillColor ? props.fillColor : props.theme.colors.secondary};
73
+ props.fillColor ? props.fillColor : props.theme.colors.secondary};
71
74
  `
72
75
 
73
- const labelText = styled.div`
76
+ const LabelText = styled.div`
74
77
  color: ${(props) => props.theme.colors.darkGray};
75
78
  font-size: 16px;
76
79
 
@@ -79,47 +82,47 @@ const labelText = styled.div`
79
82
  }
80
83
  `
81
84
 
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,
105
- },
106
- maxWidth: {
107
- required: false,
108
- type: String,
109
- default: null,
85
+ export default {
86
+ name: "ProgressBar",
87
+ components: {
88
+ Container,
89
+ ProgressContainer,
90
+ ProgressFill,
91
+ LabelText,
110
92
  },
111
- fillProgress: {
112
- required: false,
113
- default: 0,
93
+ props: {
94
+ fillColor: {
95
+ required: false,
96
+ type: String,
97
+ default: null,
98
+ },
99
+ backgroundColor: {
100
+ required: false,
101
+ type: String,
102
+ default: null,
103
+ },
104
+ minWidth: {
105
+ required: false,
106
+ type: String,
107
+ default: null,
108
+ },
109
+ maxWidth: {
110
+ required: false,
111
+ type: String,
112
+ default: null,
113
+ },
114
+ fillProgress: {
115
+ required: false,
116
+ default: 0,
117
+ },
118
+ labelText: {
119
+ required: false,
120
+ default: null,
121
+ },
122
+ stepNumber: {
123
+ required: false,
124
+ default: null,
125
+ },
114
126
  },
115
- labelText: {
116
- required: false,
117
- default: null,
118
- },
119
- stepNumber: {
120
- required: false,
121
- default: null,
122
- },
123
- },
124
- }
127
+ }
125
128
  </script>