@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.
- package/.prettierrc +7 -0
- package/package.json +20 -6
- package/public/favicon.ico +0 -0
- package/public/index.html +17 -0
- package/src/App.vue +70 -75
- package/src/assets/svgIcons/copy.svg +10 -0
- package/src/components/addNewButton/index.vue +27 -24
- package/src/components/banner/actionBanner/index.vue +30 -32
- package/src/components/banner/banner/index.vue +80 -88
- package/src/components/banner/infoBanner/index.vue +44 -36
- package/src/components/buttons/buttonIcon/index.vue +78 -83
- package/src/components/buttons/closeButton/index.vue +26 -26
- package/src/components/buttons/mainButton/index.vue +76 -80
- package/src/components/card/index.vue +52 -56
- package/src/components/collapsableInfoText/index.vue +76 -81
- package/src/components/deleteIcon/index.vue +28 -31
- package/src/components/draggableInputHandle/index.vue +17 -20
- package/src/components/dropdown/Dropdown.stories.js +8 -8
- package/src/components/dropdown/index.vue +72 -75
- package/src/components/errorMessage/index.vue +23 -23
- package/src/components/filter/filterSettings.vue +329 -349
- package/src/components/filter/index.vue +130 -130
- package/src/components/filter/parentDropdown.vue +40 -43
- package/src/components/icon/Icons.stories.js +4 -4
- package/src/components/icon/iconCache.js +1 -1
- package/src/components/icon/iconCollection.vue +37 -40
- package/src/components/icon/index.vue +65 -72
- package/src/components/iconWrapper/index.vue +118 -122
- package/src/components/infoCard/index.vue +17 -20
- package/src/components/infoText/index.vue +82 -88
- package/src/components/inputs/checkbox/index.vue +94 -91
- package/src/components/inputs/inputNumber/index.vue +488 -508
- package/src/components/inputs/inputNumberQuestion/index.vue +124 -127
- package/src/components/inputs/inputText/index.vue +252 -265
- package/src/components/inputs/radioButton/index.vue +120 -135
- package/src/components/inputs/searchInput/index.vue +81 -84
- package/src/components/inputs/select/index.vue +631 -644
- package/src/components/inputs/select/option/index.vue +91 -91
- package/src/components/inputs/select/select.stories.js +7 -7
- package/src/components/inputs/slider/index.vue +46 -46
- package/src/components/inputs/switchField/index.vue +152 -159
- package/src/components/inputs/textAreaInput/index.vue +113 -120
- package/src/components/inputs/toggle/index.vue +127 -137
- package/src/components/label/index.vue +61 -64
- package/src/components/markerItem/index.vue +40 -40
- package/src/components/modals/actionModal/index.vue +29 -32
- package/src/components/modals/infoModal/index.vue +27 -34
- package/src/components/modals/modal/index.vue +80 -88
- package/src/components/navigationTabs/index.vue +47 -50
- package/src/components/pageSubtitle/index.vue +29 -33
- package/src/components/pageTitle/index.vue +39 -47
- package/src/components/pagination/index.vue +62 -64
- package/src/components/progressBar/index.vue +67 -70
- package/src/components/projectMarker/index.vue +163 -172
- package/src/components/rangeSlider/Slider.vue +449 -449
- package/src/components/rangeSlider/index.vue +270 -282
- package/src/components/rangeSlider/utils/dom.js +3 -3
- package/src/components/selectedOptions/index.vue +51 -51
- package/src/components/sideMenu/index.vue +109 -117
- package/src/components/spinner/index.vue +34 -37
- package/src/components/tableDropdown/index.vue +326 -343
- package/src/components/tables/mainTable/index.vue +106 -109
- package/src/components/tables/viewTable/index.vue +92 -105
- package/src/components/threeDots/index.vue +171 -174
- package/src/components/videoThumbnail/index.vue +59 -67
- package/src/components/videoThumbnail/videoThumbnail.stories.js +6 -6
- package/.eslintrc.js +0 -125
@@ -1,80 +1,71 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
2
|
+
<page-container>
|
3
|
+
<marker-container
|
4
4
|
v-if="markerData && markerData.translations[activeLanguage]"
|
5
|
-
:
|
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
|
-
<
|
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
|
-
<
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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
|
-
<
|
39
|
-
<
|
35
|
+
<edit-item @click="deleteModalOpened = !deleteModalOpened">
|
36
|
+
<delete-icon />
|
40
37
|
<div>{{ $gettext('Delete') }}</div>
|
41
|
-
</
|
42
|
-
<
|
43
|
-
<
|
44
|
-
<
|
45
|
-
|
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
|
-
</
|
51
|
-
</
|
52
|
-
</
|
53
|
-
<
|
44
|
+
</edit-item>
|
45
|
+
</edit-container>
|
46
|
+
</marker-container>
|
47
|
+
<date v-if="!!date">
|
54
48
|
{{ date }}
|
55
|
-
</
|
56
|
-
<
|
57
|
-
:
|
58
|
-
:prevent-outside-close="true"
|
49
|
+
</date>
|
50
|
+
<modal
|
51
|
+
:isOpen="deleteModalOpened"
|
59
52
|
@on-close="closeDeleteModal"
|
53
|
+
:preventOutsideClose="true"
|
60
54
|
>
|
61
|
-
<
|
62
|
-
<
|
63
|
-
<
|
64
|
-
<
|
65
|
-
<
|
66
|
-
|
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
|
-
</
|
75
|
-
</
|
76
|
-
</
|
77
|
-
</
|
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
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
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
|
-
|
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
|
-
|
101
|
+
const ModalContainer = styled.div`
|
111
102
|
padding: 40px;
|
112
103
|
min-width: 500px;
|
113
104
|
`
|
114
105
|
|
115
|
-
|
106
|
+
const CtaContainer = styled.div`
|
116
107
|
display: flex;
|
117
108
|
gap: 20px;
|
118
109
|
margin-top: 30px;
|
119
110
|
`
|
120
111
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
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
|
-
|
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
|
-
|
131
|
+
props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
|
141
132
|
border: 1px solid
|
142
133
|
${(props) =>
|
143
|
-
|
134
|
+
props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
|
144
135
|
border-radius: ${(props) =>
|
145
|
-
|
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
|
-
|
151
|
+
const DotWrapper = styled.div`
|
161
152
|
display: flex;
|
162
153
|
gap: 2px;
|
163
154
|
cursor: pointer;
|
164
155
|
`
|
165
156
|
|
166
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
189
|
+
const IconContainer = styled.div`
|
199
190
|
padding: 8px;
|
200
191
|
line-height: 0;
|
201
192
|
`
|
202
193
|
|
203
|
-
|
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
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
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
|
-
|
216
|
-
|
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
|
-
|
234
|
-
|
235
|
-
|
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
|
-
|
266
|
-
|
267
|
-
|
268
|
-
deleteModalOpened: false
|
269
|
-
}
|
235
|
+
isEditable: {
|
236
|
+
required: false,
|
237
|
+
default: false
|
270
238
|
},
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
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
|
-
|
292
|
-
|
293
|
-
|
294
|
-
}
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
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>
|