@eturnity/eturnity_reusable_components 7.30.3-EPDM-10647.0 → 7.30.3-EPDM-10576.2

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 (82) 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 +486 -452
  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 -701
  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 -792
  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
  82. package/src/utils/index.js +0 -12
@@ -1,270 +1,270 @@
1
1
  <template>
2
- <page-container :isLoading="!tabsData.length">
3
- <spinner-container v-if="!tabsData.length">
4
- <spinner />
5
- </spinner-container>
6
- <list-container v-else>
2
+ <PageContainer :is-loading="!tabsData.length">
3
+ <SpinnerContainer v-if="!tabsData.length">
4
+ <Spinner />
5
+ </SpinnerContainer>
6
+ <ListContainer v-else>
7
7
  <template v-for="(item, idx) in tabsData">
8
- <list-item
8
+ <ListItem
9
9
  v-if="!item.children"
10
10
  :key="idx"
11
11
  :data-id="`sub_menu_settings_${item.key}`"
12
- :isActive="activeTab === item.key"
12
+ :is-active="activeTab === item.key"
13
13
  @click="$emit('tab-click', { activeKey: item.key })"
14
14
  >
15
- <icon-container :isActive="activeTab === item.key">
16
- <icon :name="item.icon" color="#fff" cursor="pointer" size="18px" />
17
- </icon-container>
18
- <list-text>{{ $gettext(item.label) }}</list-text>
19
- </list-item>
20
- <collapse-wrapper v-else :key="idx + item.key">
21
- <collapse-container
15
+ <IconContainer :is-active="activeTab === item.key">
16
+ <Icon color="#fff" cursor="pointer" :name="item.icon" size="18px" />
17
+ </IconContainer>
18
+ <ListText>{{ $gettext(item.label) }}</ListText>
19
+ </ListItem>
20
+ <CollapseWrapper v-else :key="idx + item.key">
21
+ <CollapseContainer
22
22
  :data-id="`sub_menu_settings_${item.key}`"
23
23
  @click="toggleActiveDropdown(item.key)"
24
24
  >
25
- <icon-container :isActive="activeParentTab === item.key">
26
- <icon
27
- :name="item.icon"
25
+ <IconContainer :is-active="activeParentTab === item.key">
26
+ <Icon
28
27
  color="#fff"
29
28
  cursor="pointer"
29
+ :name="item.icon"
30
30
  size="18px"
31
31
  />
32
- </icon-container>
33
- <list-text>{{ $gettext(item.label) }}</list-text>
34
- <arrow-container>
35
- <icon
36
- :name="activeDropdown === item.key ? 'arrow_up' : 'arrow_down'"
32
+ </IconContainer>
33
+ <ListText>{{ $gettext(item.label) }}</ListText>
34
+ <ArrowContainer>
35
+ <Icon
37
36
  color="white"
37
+ :name="activeDropdown === item.key ? 'arrow_up' : 'arrow_down'"
38
38
  size="10px"
39
39
  />
40
- </arrow-container>
41
- </collapse-container>
40
+ </ArrowContainer>
41
+ </CollapseContainer>
42
42
  <template v-if="activeDropdown === item.key">
43
- <sub-router
43
+ <SubRouter
44
44
  v-for="subItem in item.children"
45
45
  :key="subItem.key"
46
- :isActive="activeTab === subItem.key"
47
46
  :data-id="`sub_menu_settings_${subItem.key}`"
47
+ :is-active="activeTab === subItem.key"
48
48
  @click="
49
49
  $emit('tab-click', {
50
50
  activeKey: subItem.key,
51
- parentKey: item.key
51
+ parentKey: item.key,
52
52
  })
53
53
  "
54
54
  >
55
55
  {{ $gettext(subItem.label) }}
56
- </sub-router>
56
+ </SubRouter>
57
57
  </template>
58
- </collapse-wrapper>
58
+ </CollapseWrapper>
59
59
  </template>
60
- </list-container>
61
- <bottom-section v-if="hasLogout">
62
- <icon-container
63
- :isActive="false"
64
- :isButton="true"
60
+ </ListContainer>
61
+ <BottomSection v-if="hasLogout">
62
+ <IconContainer
65
63
  data-id="button_settings_logout"
64
+ :is-active="false"
65
+ :is-button="true"
66
66
  @click="$emit('on-logout')"
67
67
  >
68
- <rotate-icon
69
- name="initial_situation"
68
+ <RotateIcon
70
69
  color="#fff"
71
70
  cursor="pointer"
71
+ name="initial_situation"
72
72
  size="18px"
73
73
  />
74
- </icon-container>
75
- <app-version>{{ appVersion }}</app-version>
76
- </bottom-section>
77
- </page-container>
74
+ </IconContainer>
75
+ <AppVersion>{{ appVersion }}</AppVersion>
76
+ </BottomSection>
77
+ </PageContainer>
78
78
  </template>
79
79
 
80
80
  <script>
81
- import styled from 'vue3-styled-components'
82
- import Icon from '../icon'
83
- import Spinner from '../spinner'
81
+ import styled from 'vue3-styled-components'
82
+ import Icon from '../icon'
83
+ import Spinner from '../spinner'
84
84
 
85
- const PageAttrs = { isLoading: Boolean }
86
- const PageContainer = styled('div', PageAttrs)`
87
- background-color: ${(props) =>
88
- props.isLoading ? props.theme.colors.white : props.theme.colors.grey6};
89
- padding: 14px 12px;
90
- min-width: 220px;
91
- display: flex;
92
- flex-direction: column;
93
- justify-content: space-between;
94
- `
85
+ const PageAttrs = { isLoading: Boolean }
86
+ const PageContainer = styled('div', PageAttrs)`
87
+ background-color: ${(props) =>
88
+ props.isLoading ? props.theme.colors.white : props.theme.colors.grey6};
89
+ padding: 14px 12px;
90
+ min-width: 220px;
91
+ display: flex;
92
+ flex-direction: column;
93
+ justify-content: space-between;
94
+ `
95
95
 
96
- const ListContainer = styled.div`
97
- display: grid;
98
- grid-gap: 6px;
99
- `
96
+ const ListContainer = styled.div`
97
+ display: grid;
98
+ grid-gap: 6px;
99
+ `
100
100
 
101
- const IconAttrs = { isActive: Boolean, isButton: Boolean }
101
+ const IconAttrs = { isActive: Boolean, isButton: Boolean }
102
102
 
103
- const ListItem = styled('div', IconAttrs)`
104
- display: grid;
105
- align-items: center;
106
- grid-template-columns: auto 1fr;
107
- grid-gap: 20px;
108
- cursor: pointer;
109
- padding: 4px;
110
- border-radius: 6px;
111
- background-color: ${(props) =>
112
- props.isActive ? 'rgba(255, 255, 255, 0.1)' : ''};
103
+ const ListItem = styled('div', IconAttrs)`
104
+ display: grid;
105
+ align-items: center;
106
+ grid-template-columns: auto 1fr;
107
+ grid-gap: 20px;
108
+ cursor: pointer;
109
+ padding: 4px;
110
+ border-radius: 6px;
111
+ background-color: ${(props) =>
112
+ props.isActive ? 'rgba(255, 255, 255, 0.1)' : ''};
113
113
 
114
- :hover {
115
- background-color: rgba(255, 255, 255, 0.1);
116
- }
117
- `
114
+ :hover {
115
+ background-color: rgba(255, 255, 255, 0.1);
116
+ }
117
+ `
118
118
 
119
- const ListText = styled.div`
120
- font-size: 16px;
121
- font-weight: 700;
122
- color: ${(props) => props.theme.colors.white};
123
- `
119
+ const ListText = styled.div`
120
+ font-size: 16px;
121
+ font-weight: 700;
122
+ color: ${(props) => props.theme.colors.white};
123
+ `
124
124
 
125
- const IconContainer = styled('div', IconAttrs)`
126
- display: grid;
127
- align-items: center;
128
- justify-items: center;
129
- width: 32px;
130
- height: 32px;
131
- background-color: ${(props) =>
132
- props.isActive ? props.theme.colors.red : 'rgba(255, 255, 255, 0.2)'};
133
- border-radius: 6px;
125
+ const IconContainer = styled('div', IconAttrs)`
126
+ display: grid;
127
+ align-items: center;
128
+ justify-items: center;
129
+ width: 32px;
130
+ height: 32px;
131
+ background-color: ${(props) =>
132
+ props.isActive ? props.theme.colors.red : 'rgba(255, 255, 255, 0.2)'};
133
+ border-radius: 6px;
134
134
 
135
- ${({ isButton = false }) =>
136
- isButton &&
137
- `
135
+ ${({ isButton = false }) =>
136
+ isButton &&
137
+ `
138
138
  cursor: pointer;
139
139
  &:hover {
140
140
  background-color: rgba(255, 255, 255, 0.3);
141
141
  }
142
142
  `}
143
- `
143
+ `
144
144
 
145
- const SpinnerContainer = styled.div`
146
- margin-top: 30px;
147
- `
145
+ const SpinnerContainer = styled.div`
146
+ margin-top: 30px;
147
+ `
148
148
 
149
- const BottomSection = styled.div`
150
- display: flex;
151
- justify-content: space-between;
152
- align-items: center;
153
- `
149
+ const BottomSection = styled.div`
150
+ display: flex;
151
+ justify-content: space-between;
152
+ align-items: center;
153
+ `
154
154
 
155
- const RotateIcon = styled(Icon)`
156
- transform: rotate(-90deg);
157
- `
155
+ const RotateIcon = styled(Icon)`
156
+ transform: rotate(-90deg);
157
+ `
158
158
 
159
- const AppVersion = styled.p`
160
- font-size: 11px;
161
- line-height: 13px;
162
- color: ${(props) => props.theme.colors.white};
163
- margin-right: 6px;
164
- `
159
+ const AppVersion = styled.p`
160
+ font-size: 11px;
161
+ line-height: 13px;
162
+ color: ${(props) => props.theme.colors.white};
163
+ margin-right: 6px;
164
+ `
165
165
 
166
- const SubRouter = styled('div', IconAttrs)`
167
- display: grid;
168
- grid-template-columns: 1fr;
169
- grid-gap: 10px;
170
- align-items: center;
171
- justify-items: flex-start;
172
- cursor: pointer;
173
- margin-left: 65px;
174
- padding: 8px;
175
- border-radius: 6px;
176
- color: ${(props) => props.theme.colors.white};
177
- font-weight: 700;
178
- ${({ isActive }) =>
179
- isActive &&
180
- `
166
+ const SubRouter = styled('div', IconAttrs)`
167
+ display: grid;
168
+ grid-template-columns: 1fr;
169
+ grid-gap: 10px;
170
+ align-items: center;
171
+ justify-items: flex-start;
172
+ cursor: pointer;
173
+ margin-left: 65px;
174
+ padding: 8px;
175
+ border-radius: 6px;
176
+ color: ${(props) => props.theme.colors.white};
177
+ font-weight: 700;
178
+ ${({ isActive }) =>
179
+ isActive &&
180
+ `
181
181
  background: rgba(255, 255, 255, 0.1);
182
182
  `}
183
183
 
184
- &:hover {
185
- background: rgba(255, 255, 255, 0.1);
186
- }
187
- `
184
+ &:hover {
185
+ background: rgba(255, 255, 255, 0.1);
186
+ }
187
+ `
188
188
 
189
- const CollapseContainer = styled.div`
190
- display: grid;
191
- grid-template-columns: auto 1fr auto;
192
- grid-gap: 20px;
193
- padding: 4px;
194
- border-radius: 6px;
195
- align-items: center;
196
- cursor: pointer;
197
- &:hover {
198
- background: rgba(255, 255, 255, 0.1);
199
- }
200
- `
189
+ const CollapseContainer = styled.div`
190
+ display: grid;
191
+ grid-template-columns: auto 1fr auto;
192
+ grid-gap: 20px;
193
+ padding: 4px;
194
+ border-radius: 6px;
195
+ align-items: center;
196
+ cursor: pointer;
197
+ &:hover {
198
+ background: rgba(255, 255, 255, 0.1);
199
+ }
200
+ `
201
201
 
202
- const CollapseWrapper = styled.div`
203
- display: grid;
204
- grid-template-columns: 1fr;
205
- grid-gap: 10px;
206
- user-select: none;
207
- margin-bottom: 2px;
208
- `
202
+ const CollapseWrapper = styled.div`
203
+ display: grid;
204
+ grid-template-columns: 1fr;
205
+ grid-gap: 10px;
206
+ user-select: none;
207
+ margin-bottom: 2px;
208
+ `
209
209
 
210
- const ArrowContainer = styled.div`
211
- padding-bottom: 5px;
212
- `
210
+ const ArrowContainer = styled.div`
211
+ padding-bottom: 5px;
212
+ `
213
213
 
214
- export default {
215
- name: 'SideMenu',
216
- components: {
217
- PageContainer,
218
- ListContainer,
219
- ListItem,
220
- ListText,
221
- Icon,
222
- IconContainer,
223
- Spinner,
224
- SpinnerContainer,
225
- BottomSection,
226
- RotateIcon,
227
- AppVersion,
228
- CollapseWrapper,
229
- CollapseContainer,
230
- SubRouter,
231
- ArrowContainer
232
- },
233
- data() {
234
- return {
235
- activeDropdown: null
236
- }
237
- },
238
- mounted() {
239
- this.activeDropdown = this.activeParentTab
240
- },
241
- props: {
242
- tabsData: {
243
- required: true
214
+ export default {
215
+ name: 'SideMenu',
216
+ components: {
217
+ PageContainer,
218
+ ListContainer,
219
+ ListItem,
220
+ ListText,
221
+ Icon,
222
+ IconContainer,
223
+ Spinner,
224
+ SpinnerContainer,
225
+ BottomSection,
226
+ RotateIcon,
227
+ AppVersion,
228
+ CollapseWrapper,
229
+ CollapseContainer,
230
+ SubRouter,
231
+ ArrowContainer,
244
232
  },
245
- activeTab: {
246
- required: true
233
+ props: {
234
+ tabsData: {
235
+ required: true,
236
+ },
237
+ activeTab: {
238
+ required: true,
239
+ },
240
+ activeParentTab: {
241
+ required: false,
242
+ },
243
+ hasLogout: {
244
+ required: false,
245
+ default: true,
246
+ },
247
+ appVersion: {
248
+ required: false,
249
+ type: String,
250
+ },
247
251
  },
248
- activeParentTab: {
249
- required: false
252
+ data() {
253
+ return {
254
+ activeDropdown: null,
255
+ }
250
256
  },
251
- hasLogout: {
252
- required: false,
253
- default: true
257
+ mounted() {
258
+ this.activeDropdown = this.activeParentTab
259
+ },
260
+ methods: {
261
+ toggleActiveDropdown(value) {
262
+ if (this.activeDropdown === value) {
263
+ this.activeDropdown = null
264
+ } else {
265
+ this.activeDropdown = value
266
+ }
267
+ },
254
268
  },
255
- appVersion: {
256
- required: false,
257
- type: String
258
- }
259
- },
260
- methods: {
261
- toggleActiveDropdown(value) {
262
- if (this.activeDropdown === value) {
263
- this.activeDropdown = null
264
- } else {
265
- this.activeDropdown = value
266
- }
267
- }
268
269
  }
269
- }
270
270
  </script>
@@ -1,68 +1,68 @@
1
1
  <template>
2
- <spinner-container v-if="fullWidth">
3
- <container>
4
- <spinner-wrapper :size="size" />
5
- </container>
6
- </spinner-container>
7
- <container v-else :limitedToModal="limitedToModal">
8
- <spinner-wrapper :size="size" />
9
- </container>
2
+ <SpinnerContainer v-if="fullWidth">
3
+ <Container>
4
+ <SpinnerWrapper :size="size" />
5
+ </Container>
6
+ </SpinnerContainer>
7
+ <Container v-else :limited-to-modal="limitedToModal">
8
+ <SpinnerWrapper :size="size" />
9
+ </Container>
10
10
  </template>
11
11
 
12
12
  <script>
13
- // import RCSpinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
14
- // <spinner size="30px" />
15
- import styled from 'vue3-styled-components'
16
- import SpinnerSvg from '../../assets/icons/black_spinner.svg?component'
13
+ // import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
14
+ // <spinner size="30px" />
15
+ import styled from 'vue3-styled-components'
16
+ import SpinnerSvg from '../../assets/icons/black_spinner.svg?component'
17
17
 
18
- const SpinnerContainer = styled.div`
19
- position: fixed;
20
- top: 0;
21
- left: 0;
22
- width: 100%;
23
- height: 100%;
24
- background: rgba(255, 255, 255, 0.8);
25
- display: grid;
26
- align-items: center;
27
- justify-items: center;
28
- z-index: 100;
29
- `
30
- const containerAttrs = { limitedToModal: Boolean }
31
- const Container = styled('div', containerAttrs)`
32
- display: grid;
33
- align-items: center;
34
- justify-items: center;
35
- position: ${(props) => (props.limitedToModal ? 'absolute' : 'inherit')};
36
- height: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
37
- width: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
38
- `
18
+ const SpinnerContainer = styled.div`
19
+ position: fixed;
20
+ top: 0;
21
+ left: 0;
22
+ width: 100%;
23
+ height: 100%;
24
+ background: rgba(255, 255, 255, 0.8);
25
+ display: grid;
26
+ align-items: center;
27
+ justify-items: center;
28
+ z-index: 100;
29
+ `
30
+ const containerAttrs = { limitedToModal: Boolean }
31
+ const Container = styled('div', containerAttrs)`
32
+ display: grid;
33
+ align-items: center;
34
+ justify-items: center;
35
+ position: ${(props) => (props.limitedToModal ? 'absolute' : 'inherit')};
36
+ height: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
37
+ width: ${(props) => (props.limitedToModal ? '100%' : 'inherit')};
38
+ `
39
39
 
40
- const spinnerAttrs = { size: String }
41
- const SpinnerWrapper = styled(SpinnerSvg, spinnerAttrs)`
42
- width: ${(props) => (props.size ? props.size : '60px')};
43
- height: auto;
44
- `
40
+ const spinnerAttrs = { size: String }
41
+ const SpinnerWrapper = styled(SpinnerSvg, spinnerAttrs)`
42
+ width: ${(props) => (props.size ? props.size : '60px')};
43
+ height: auto;
44
+ `
45
45
 
46
- export default {
47
- name: 'spinner',
48
- components: {
49
- Container,
50
- SpinnerWrapper,
51
- SpinnerContainer
52
- },
53
- props: {
54
- fullWidth: {
55
- required: false,
56
- default: false
46
+ export default {
47
+ name: 'Spinner',
48
+ components: {
49
+ Container,
50
+ SpinnerWrapper,
51
+ SpinnerContainer,
57
52
  },
58
- limitedToModal: {
59
- required: false,
60
- default: false
53
+ props: {
54
+ fullWidth: {
55
+ required: false,
56
+ default: false,
57
+ },
58
+ limitedToModal: {
59
+ required: false,
60
+ default: false,
61
+ },
62
+ size: {
63
+ required: false,
64
+ default: null,
65
+ },
61
66
  },
62
- size: {
63
- required: false,
64
- default: null
65
- }
66
67
  }
67
- }
68
68
  </script>