@eturnity/eturnity_reusable_components 7.24.3-EPDM-11320.0 → 7.24.3-EPDM-11143.1

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 (67) hide show
  1. package/.prettierrc +7 -0
  2. package/package.json +20 -6
  3. package/public/favicon.ico +0 -0
  4. package/public/index.html +17 -0
  5. package/src/App.vue +70 -75
  6. package/src/assets/svgIcons/copy.svg +10 -0
  7. package/src/components/addNewButton/index.vue +27 -24
  8. package/src/components/banner/actionBanner/index.vue +30 -32
  9. package/src/components/banner/banner/index.vue +80 -88
  10. package/src/components/banner/infoBanner/index.vue +44 -36
  11. package/src/components/buttons/buttonIcon/index.vue +78 -83
  12. package/src/components/buttons/closeButton/index.vue +26 -26
  13. package/src/components/buttons/mainButton/index.vue +76 -80
  14. package/src/components/card/index.vue +52 -56
  15. package/src/components/collapsableInfoText/index.vue +76 -81
  16. package/src/components/deleteIcon/index.vue +28 -31
  17. package/src/components/draggableInputHandle/index.vue +17 -20
  18. package/src/components/dropdown/Dropdown.stories.js +8 -8
  19. package/src/components/dropdown/index.vue +72 -75
  20. package/src/components/errorMessage/index.vue +23 -23
  21. package/src/components/filter/filterSettings.vue +329 -349
  22. package/src/components/filter/index.vue +130 -130
  23. package/src/components/filter/parentDropdown.vue +40 -43
  24. package/src/components/icon/Icons.stories.js +4 -4
  25. package/src/components/icon/iconCache.js +1 -1
  26. package/src/components/icon/iconCollection.vue +37 -40
  27. package/src/components/icon/index.vue +65 -72
  28. package/src/components/iconWrapper/index.vue +118 -122
  29. package/src/components/infoCard/index.vue +17 -20
  30. package/src/components/infoText/index.vue +82 -88
  31. package/src/components/inputs/checkbox/index.vue +94 -91
  32. package/src/components/inputs/inputNumber/index.vue +488 -508
  33. package/src/components/inputs/inputNumberQuestion/index.vue +124 -127
  34. package/src/components/inputs/inputText/index.vue +252 -265
  35. package/src/components/inputs/radioButton/index.vue +120 -135
  36. package/src/components/inputs/searchInput/index.vue +81 -84
  37. package/src/components/inputs/select/index.vue +631 -644
  38. package/src/components/inputs/select/option/index.vue +91 -91
  39. package/src/components/inputs/select/select.stories.js +7 -7
  40. package/src/components/inputs/slider/index.vue +46 -46
  41. package/src/components/inputs/switchField/index.vue +152 -159
  42. package/src/components/inputs/textAreaInput/index.vue +113 -120
  43. package/src/components/inputs/toggle/index.vue +127 -137
  44. package/src/components/label/index.vue +61 -64
  45. package/src/components/markerItem/index.vue +40 -40
  46. package/src/components/modals/actionModal/index.vue +29 -32
  47. package/src/components/modals/infoModal/index.vue +27 -34
  48. package/src/components/modals/modal/index.vue +80 -88
  49. package/src/components/navigationTabs/index.vue +47 -50
  50. package/src/components/pageSubtitle/index.vue +29 -33
  51. package/src/components/pageTitle/index.vue +39 -47
  52. package/src/components/pagination/index.vue +62 -64
  53. package/src/components/progressBar/index.vue +67 -70
  54. package/src/components/projectMarker/index.vue +163 -172
  55. package/src/components/rangeSlider/Slider.vue +449 -449
  56. package/src/components/rangeSlider/index.vue +270 -282
  57. package/src/components/rangeSlider/utils/dom.js +3 -3
  58. package/src/components/selectedOptions/index.vue +51 -51
  59. package/src/components/sideMenu/index.vue +109 -117
  60. package/src/components/spinner/index.vue +34 -37
  61. package/src/components/tableDropdown/index.vue +326 -343
  62. package/src/components/tables/mainTable/index.vue +106 -109
  63. package/src/components/tables/viewTable/index.vue +92 -105
  64. package/src/components/threeDots/index.vue +171 -174
  65. package/src/components/videoThumbnail/index.vue +59 -67
  66. package/src/components/videoThumbnail/videoThumbnail.stories.js +6 -6
  67. package/.eslintrc.js +0 -125
@@ -1,80 +1,71 @@
1
1
  <template>
2
- <PageContainer>
3
- <MarkerContainer
2
+ <page-container>
3
+ <marker-container
4
4
  v-if="markerData && markerData.translations[activeLanguage]"
5
- :background-color="markerData.color"
5
+ :hasBorderRadius="hasBorderRadius"
6
+ :withDate="!!date"
7
+ :backgroundColor="markerData.color"
8
+ :hasIcon="!!iconName"
9
+ :isEditionAllowed="editionAllowed"
10
+ :isActive="activated"
6
11
  :cursor="cursor"
7
- :has-border-radius="hasBorderRadius"
8
- :has-icon="!!iconName"
9
- :is-active="activated"
10
- :is-edition-allowed="editionAllowed"
11
- :with-date="!!date"
12
12
  @click="editionAllowed ? (activated = !activated) : ''"
13
13
  >
14
- <Icon
14
+ <icon
15
15
  v-if="!!iconName"
16
- color="white"
17
- :cursor="cursor"
18
16
  :name="iconName"
17
+ color="white"
19
18
  size="10px"
19
+ :cursor="cursor"
20
20
  />
21
21
  <span>{{
22
22
  markerData.translations[activeLanguage]
23
23
  ? markerData.translations[activeLanguage].name
24
24
  : '-'
25
25
  }}</span>
26
- <DotWrapper
27
- v-if="editionAllowed"
28
- class="dotContainer"
29
- >
30
- <DotIcon />
31
- <DotIcon />
32
- <DotIcon />
33
- </DotWrapper>
34
- <EditContainer
26
+ <dot-wrapper v-if="editionAllowed" class="dotContainer">
27
+ <dot-icon />
28
+ <dot-icon />
29
+ <dot-icon />
30
+ </dot-wrapper>
31
+ <edit-container
35
32
  v-if="activated"
36
33
  v-click-outside="clickOutsideActionHandler"
37
34
  >
38
- <EditItem @click="deleteModalOpened = !deleteModalOpened">
39
- <DeleteIcon />
35
+ <edit-item @click="deleteModalOpened = !deleteModalOpened">
36
+ <delete-icon />
40
37
  <div>{{ $gettext('Delete') }}</div>
41
- </EditItem>
42
- <EditItem @click="onEditClick">
43
- <IconContainer>
44
- <Icon
45
- name="edit_button"
46
- size="14px"
47
- />
48
- </IconContainer>
38
+ </edit-item>
39
+ <edit-item @click="onEditClick">
40
+ <icon-container>
41
+ <icon name="edit_button" size="14px" />
42
+ </icon-container>
49
43
  <div>{{ $gettext('Edit') }}</div>
50
- </EditItem>
51
- </EditContainer>
52
- </MarkerContainer>
53
- <Date v-if="!!date">
44
+ </edit-item>
45
+ </edit-container>
46
+ </marker-container>
47
+ <date v-if="!!date">
54
48
  {{ date }}
55
- </Date>
56
- <Modal
57
- :is-open="deleteModalOpened"
58
- :prevent-outside-close="true"
49
+ </date>
50
+ <modal
51
+ :isOpen="deleteModalOpened"
59
52
  @on-close="closeDeleteModal"
53
+ :preventOutsideClose="true"
60
54
  >
61
- <ModalContainer>
62
- <PageTitle :text="$gettext('delete_confirm_text')" />
63
- <PageSubtitle :text="$gettext('delete_confirm_subtext')" />
64
- <CtaContainer>
65
- <MainButton
66
- :text="$gettext('Delete')"
67
- @click="onDelete"
68
- />
69
- <MainButton
70
- :text="$gettext('Cancel')"
55
+ <modal-container>
56
+ <page-title :text="$gettext('delete_confirm_text')" />
57
+ <page-subtitle :text="$gettext('delete_confirm_subtext')" />
58
+ <cta-container>
59
+ <main-button @click="onDelete" :text="$gettext('Delete')" />
60
+ <main-button
71
61
  type="cancel"
72
62
  @click="closeDeleteModal"
63
+ :text="$gettext('Cancel')"
73
64
  />
74
- </CtaContainer>
75
- </ModalContainer>
76
- </Modal>
77
- </PageContainer>
65
+ </cta-container>
66
+ </modal-container>
67
+ </modal>
68
+ </page-container>
78
69
  </template>
79
70
 
80
71
  <script>
@@ -91,58 +82,58 @@
91
82
  // @deleteHandler="onMarkerDelete($event)"
92
83
  // />
93
84
 
94
- import styled from 'vue3-styled-components'
95
- import vClickOutside from 'click-outside-vue3'
96
- import Icon from '../icon'
97
- import Modal from '../modals/modal'
98
- import PageTitle from '../pageTitle'
99
- import DeleteIcon from '../deleteIcon'
100
- import PageSubtitle from '../pageSubtitle'
101
- import MainButton from '../buttons/mainButton'
85
+ import styled from 'vue3-styled-components'
86
+ import vClickOutside from 'click-outside-vue3'
87
+ import Icon from '../icon'
88
+ import Modal from '../modals/modal'
89
+ import PageTitle from '../pageTitle'
90
+ import DeleteIcon from '../deleteIcon'
91
+ import PageSubtitle from '../pageSubtitle'
92
+ import MainButton from '../buttons/mainButton'
102
93
 
103
- const PageContainer = styled.div`
94
+ const PageContainer = styled.div`
104
95
  display: flex;
105
96
  align-items: center;
106
97
  font-size: 12px;
107
98
  line-height: 14px;
108
99
  `
109
100
 
110
- const ModalContainer = styled.div`
101
+ const ModalContainer = styled.div`
111
102
  padding: 40px;
112
103
  min-width: 500px;
113
104
  `
114
105
 
115
- const CtaContainer = styled.div`
106
+ const CtaContainer = styled.div`
116
107
  display: flex;
117
108
  gap: 20px;
118
109
  margin-top: 30px;
119
110
  `
120
111
 
121
- const MarkerAttrs = {
122
- hasBorderRadius: Boolean,
123
- backgroundColor: String,
124
- withDate: Boolean,
125
- hasIcon: Boolean,
126
- isEditionAllowed: Boolean,
127
- isActive: Boolean,
128
- cursor: String
129
- }
130
- const MarkerContainer = styled('div', MarkerAttrs)`
112
+ const MarkerAttrs = {
113
+ hasBorderRadius: Boolean,
114
+ backgroundColor: String,
115
+ withDate: Boolean,
116
+ hasIcon: Boolean,
117
+ isEditionAllowed: Boolean,
118
+ isActive: Boolean,
119
+ cursor: String
120
+ }
121
+ const MarkerContainer = styled('div', MarkerAttrs)`
131
122
  display: grid;
132
123
  grid-template-columns: ${(props) =>
133
- props.hasIcon || props.isEditionAllowed ? 'auto 1fr' : '1fr'};
124
+ props.hasIcon || props.isEditionAllowed ? 'auto 1fr' : '1fr'};
134
125
  grid-gap: 5px;
135
126
  position: relative;
136
127
  align-items: center;
137
128
  padding: 2px 7px;
138
129
  color: ${(props) => props.theme.colors.white};
139
130
  background-color: ${(props) =>
140
- props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
131
+ props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
141
132
  border: 1px solid
142
133
  ${(props) =>
143
- props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
134
+ props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
144
135
  border-radius: ${(props) =>
145
- props.hasBorderRadius ? (props.withDate ? '4px 0 0 4px' : '4px') : '0'};
136
+ props.hasBorderRadius ? (props.withDate ? '4px 0 0 4px' : '4px') : '0'};
146
137
  white-space: nowrap;
147
138
  cursor: ${(props) => (props.isEditionAllowed ? 'pointer' : props.cursor)};
148
139
 
@@ -157,20 +148,20 @@
157
148
  }
158
149
  `
159
150
 
160
- const DotWrapper = styled.div`
151
+ const DotWrapper = styled.div`
161
152
  display: flex;
162
153
  gap: 2px;
163
154
  cursor: pointer;
164
155
  `
165
156
 
166
- const DotIcon = styled.div`
157
+ const DotIcon = styled.div`
167
158
  width: 4px;
168
159
  height: 4px;
169
160
  border-radius: 100%;
170
161
  background-color: ${(props) => props.theme.colors.white};
171
162
  `
172
163
 
173
- const EditContainer = styled.div`
164
+ const EditContainer = styled.div`
174
165
  position: absolute;
175
166
  z-index: 99;
176
167
  top: 22px;
@@ -182,7 +173,7 @@
182
173
  overflow: hidden;
183
174
  `
184
175
 
185
- const EditItem = styled.div`
176
+ const EditItem = styled.div`
186
177
  display: flex;
187
178
  align-items: center;
188
179
  gap: 12px;
@@ -195,113 +186,113 @@
195
186
  }
196
187
  `
197
188
 
198
- const IconContainer = styled.div`
189
+ const IconContainer = styled.div`
199
190
  padding: 8px;
200
191
  line-height: 0;
201
192
  `
202
193
 
203
- const Date = styled.div`
194
+ const Date = styled.div`
204
195
  padding: 2px 5px;
205
196
  border: 1px solid ${(props) => props.theme.colors.grey4};
206
197
  border-left: none;
207
198
  border-radius: 0 4px 4px 0;
208
199
  `
209
200
 
210
- export default {
211
- name: 'ProjectMarker',
212
- directives: {
213
- clickOutside: vClickOutside.directive
201
+ export default {
202
+ name: 'project-marker',
203
+ directives: {
204
+ clickOutside: vClickOutside.directive
205
+ },
206
+ components: {
207
+ PageContainer,
208
+ MarkerContainer,
209
+ DotWrapper,
210
+ DotIcon,
211
+ EditContainer,
212
+ EditItem,
213
+ DeleteIcon,
214
+ IconContainer,
215
+ Icon,
216
+ Modal,
217
+ ModalContainer,
218
+ CtaContainer,
219
+ PageTitle,
220
+ PageSubtitle,
221
+ MainButton,
222
+ Date
223
+ },
224
+ props: {
225
+ markerData: {
226
+ required: true
214
227
  },
215
- components: {
216
- PageContainer,
217
- MarkerContainer,
218
- DotWrapper,
219
- DotIcon,
220
- EditContainer,
221
- EditItem,
222
- DeleteIcon,
223
- IconContainer,
224
- Icon,
225
- Modal,
226
- ModalContainer,
227
- CtaContainer,
228
- PageTitle,
229
- PageSubtitle,
230
- MainButton,
231
- Date
228
+ activeLanguage: {
229
+ required: true
232
230
  },
233
- props: {
234
- markerData: {
235
- required: true
236
- },
237
- activeLanguage: {
238
- required: true
239
- },
240
- date: {
241
- required: false,
242
- default: null
243
- },
244
- isEditable: {
245
- required: false,
246
- default: false
247
- },
248
- isGroupSupport: {
249
- required: false,
250
- default: false
251
- },
252
- isLimitedPartner: {
253
- required: false,
254
- default: false
255
- },
256
- cursor: {
257
- required: false,
258
- default: 'default'
259
- },
260
- hasBorderRadius: {
261
- required: false,
262
- default: true
263
- }
231
+ date: {
232
+ required: false,
233
+ default: null
264
234
  },
265
- data() {
266
- return {
267
- activated: false,
268
- deleteModalOpened: false
269
- }
235
+ isEditable: {
236
+ required: false,
237
+ default: false
270
238
  },
271
- computed: {
272
- editionAllowed() {
273
- return (
274
- this.markerData.can_be_deleted &&
275
- (!this.isLimitedPartner || this.isGroupSupport) &&
276
- this.isEditable
277
- )
278
- },
279
- iconName() {
280
- if (this.markerData.choice === 'sold') {
281
- return 'all_good'
282
- } else if (this.markerData.choice === 'lost') {
283
- return 'cross'
284
- } else if (this.markerData.choice === 'transferred') {
285
- return 'transfer'
286
- } else {
287
- return ''
288
- }
289
- }
239
+ isGroupSupport: {
240
+ required: false,
241
+ default: false
242
+ },
243
+ isLimitedPartner: {
244
+ required: false,
245
+ default: false
246
+ },
247
+ cursor: {
248
+ required: false,
249
+ default: 'default'
250
+ },
251
+ hasBorderRadius: {
252
+ required: false,
253
+ default: true
254
+ }
255
+ },
256
+ data() {
257
+ return {
258
+ activated: false,
259
+ deleteModalOpened: false
260
+ }
261
+ },
262
+ computed: {
263
+ editionAllowed() {
264
+ return (
265
+ this.markerData.can_be_deleted &&
266
+ (!this.isLimitedPartner || this.isGroupSupport) &&
267
+ this.isEditable
268
+ )
290
269
  },
291
- methods: {
292
- clickOutsideActionHandler() {
293
- this.activated = false
294
- },
295
- closeDeleteModal() {
296
- this.deleteModalOpened = false
297
- },
298
- onEditClick() {
299
- this.$emit('editHandler')
300
- },
301
- onDelete() {
302
- this.closeDeleteModal()
303
- this.$emit('deleteHandler')
270
+ iconName() {
271
+ if (this.markerData.choice === 'sold') {
272
+ return 'all_good'
273
+ } else if (this.markerData.choice === 'lost') {
274
+ return 'cross'
275
+ } else if (this.markerData.choice === 'transferred') {
276
+ return 'transfer'
277
+ } else {
278
+ return ''
304
279
  }
305
280
  }
281
+ },
282
+ methods: {
283
+ clickOutsideActionHandler() {
284
+ this.activated = false
285
+ },
286
+ closeDeleteModal() {
287
+ this.deleteModalOpened = false
288
+ },
289
+ onEditClick() {
290
+ this.$emit('editHandler')
291
+ },
292
+ onDelete() {
293
+ this.closeDeleteModal()
294
+ this.$emit('deleteHandler')
295
+ }
306
296
  }
297
+ }
307
298
  </script>