@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,270 +1,270 @@
1
1
  <template>
2
- <PageContainer :is-loading="!tabsData.length">
3
- <SpinnerContainer v-if="!tabsData.length">
4
- <Spinner />
5
- </SpinnerContainer>
6
- <ListContainer v-else>
2
+ <page-container :isLoading="!tabsData.length">
3
+ <spinner-container v-if="!tabsData.length">
4
+ <spinner />
5
+ </spinner-container>
6
+ <list-container v-else>
7
7
  <template v-for="(item, idx) in tabsData">
8
- <ListItem
8
+ <list-item
9
9
  v-if="!item.children"
10
10
  :key="idx"
11
11
  :data-id="`sub_menu_settings_${item.key}`"
12
- :is-active="activeTab === item.key"
12
+ :isActive="activeTab === item.key"
13
13
  @click="$emit('tab-click', { activeKey: item.key })"
14
14
  >
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
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
22
22
  :data-id="`sub_menu_settings_${item.key}`"
23
23
  @click="toggleActiveDropdown(item.key)"
24
24
  >
25
- <IconContainer :is-active="activeParentTab === item.key">
26
- <Icon
25
+ <icon-container :isActive="activeParentTab === item.key">
26
+ <icon
27
+ :name="item.icon"
27
28
  color="#fff"
28
29
  cursor="pointer"
29
- :name="item.icon"
30
30
  size="18px"
31
31
  />
32
- </IconContainer>
33
- <ListText>{{ $gettext(item.label) }}</ListText>
34
- <ArrowContainer>
35
- <Icon
36
- color="white"
32
+ </icon-container>
33
+ <list-text>{{ $gettext(item.label) }}</list-text>
34
+ <arrow-container>
35
+ <icon
37
36
  :name="activeDropdown === item.key ? 'arrow_up' : 'arrow_down'"
37
+ color="white"
38
38
  size="10px"
39
39
  />
40
- </ArrowContainer>
41
- </CollapseContainer>
40
+ </arrow-container>
41
+ </collapse-container>
42
42
  <template v-if="activeDropdown === item.key">
43
- <SubRouter
43
+ <sub-router
44
44
  v-for="subItem in item.children"
45
45
  :key="subItem.key"
46
+ :isActive="activeTab === subItem.key"
46
47
  :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
- </SubRouter>
56
+ </sub-router>
57
57
  </template>
58
- </CollapseWrapper>
58
+ </collapse-wrapper>
59
59
  </template>
60
- </ListContainer>
61
- <BottomSection v-if="hasLogout">
62
- <IconContainer
60
+ </list-container>
61
+ <bottom-section v-if="hasLogout">
62
+ <icon-container
63
+ :isActive="false"
64
+ :isButton="true"
63
65
  data-id="button_settings_logout"
64
- :is-active="false"
65
- :is-button="true"
66
66
  @click="$emit('on-logout')"
67
67
  >
68
- <RotateIcon
68
+ <rotate-icon
69
+ name="initial_situation"
69
70
  color="#fff"
70
71
  cursor="pointer"
71
- name="initial_situation"
72
72
  size="18px"
73
73
  />
74
- </IconContainer>
75
- <AppVersion>{{ appVersion }}</AppVersion>
76
- </BottomSection>
77
- </PageContainer>
74
+ </icon-container>
75
+ <app-version>{{ appVersion }}</app-version>
76
+ </bottom-section>
77
+ </page-container>
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
- 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
- },
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
251
244
  },
252
- data() {
253
- return {
254
- activeDropdown: null,
255
- }
245
+ activeTab: {
246
+ required: true
256
247
  },
257
- mounted() {
258
- this.activeDropdown = this.activeParentTab
248
+ activeParentTab: {
249
+ required: false
259
250
  },
260
- methods: {
261
- toggleActiveDropdown(value) {
262
- if (this.activeDropdown === value) {
263
- this.activeDropdown = null
264
- } else {
265
- this.activeDropdown = value
266
- }
267
- },
251
+ hasLogout: {
252
+ required: false,
253
+ default: true
268
254
  },
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
+ }
269
268
  }
269
+ }
270
270
  </script>
@@ -1,68 +1,68 @@
1
1
  <template>
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>
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>
10
10
  </template>
11
11
 
12
12
  <script>
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'
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,
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
52
57
  },
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
- },
58
+ limitedToModal: {
59
+ required: false,
60
+ default: false
66
61
  },
62
+ size: {
63
+ required: false,
64
+ default: null
65
+ }
67
66
  }
67
+ }
68
68
  </script>