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