@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,111 +1,98 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
:
|
5
|
-
:
|
2
|
+
<container>
|
3
|
+
<input-wrapper
|
4
|
+
:hasLabel="!!label && label.length > 0"
|
5
|
+
:alignItems="alignItems"
|
6
6
|
>
|
7
|
-
<
|
8
|
-
<
|
7
|
+
<label-wrapper v-if="label">
|
8
|
+
<input-label
|
9
|
+
:labelFontColor="labelFontColor"
|
10
|
+
:fontSize="fontSize"
|
9
11
|
:data-id="labelDataId"
|
10
|
-
|
11
|
-
|
12
|
+
>{{ label }}
|
13
|
+
<optionalLabel v-if="labelOptional"
|
14
|
+
>({{ $gettext('Optional') }})</optionalLabel
|
15
|
+
></input-label
|
12
16
|
>
|
13
|
-
|
14
|
-
<OptionalLabel v-if="labelOptional">
|
15
|
-
({{ $gettext('Optional') }})
|
16
|
-
</OptionalLabel>
|
17
|
-
</InputLabel>
|
18
|
-
<InfoText
|
17
|
+
<info-text
|
19
18
|
v-if="infoTextMessage"
|
20
|
-
:align-arrow="infoTextAlign"
|
21
|
-
:size="fontSize ? fontSize : '16px'"
|
22
19
|
:text="infoTextMessage"
|
20
|
+
:size="fontSize ? fontSize : '16px'"
|
21
|
+
:alignArrow="infoTextAlign"
|
23
22
|
/>
|
24
|
-
</
|
25
|
-
<
|
26
|
-
<
|
27
|
-
<
|
23
|
+
</label-wrapper>
|
24
|
+
<input-error-wrapper>
|
25
|
+
<icon-container>
|
26
|
+
<input-container
|
28
27
|
ref="inputElement"
|
29
|
-
:background-color="backgroundColor"
|
30
|
-
:data-id="inputDataId"
|
31
|
-
:disabled="disabled"
|
32
|
-
:disabled-background-color="disabledBackgroundColor"
|
33
|
-
:font-color="fontColor"
|
34
|
-
:font-size="fontSize"
|
35
|
-
:has-focus="hasFocus"
|
36
|
-
:input-height="inputHeight"
|
37
|
-
:input-type="inputType"
|
38
|
-
:input-width="inputWidth"
|
39
|
-
:is-disabled="disabled"
|
40
|
-
:is-error="hasError"
|
41
|
-
:min-width="minWidth"
|
42
|
-
:no-border="noBorder"
|
43
28
|
:placeholder="placeholder"
|
44
|
-
:
|
29
|
+
:isError="hasError"
|
30
|
+
:inputWidth="inputWidth"
|
31
|
+
:minWidth="minWidth"
|
32
|
+
:inputHeight="inputHeight"
|
45
33
|
:value="value"
|
46
|
-
@blur="onInputBlur"
|
47
34
|
@input="onChangeHandler"
|
35
|
+
@blur="onInputBlur"
|
48
36
|
@keyup.enter="onEnterPress"
|
37
|
+
:noBorder="noBorder"
|
38
|
+
:disabled="disabled"
|
39
|
+
:isDisabled="disabled"
|
40
|
+
:fontSize="fontSize"
|
41
|
+
:inputType="inputType"
|
42
|
+
:type="inputTypeData"
|
43
|
+
:fontColor="fontColor"
|
44
|
+
:hasFocus="hasFocus"
|
45
|
+
:backgroundColor="backgroundColor"
|
46
|
+
:disabledBackgroundColor="disabledBackgroundColor"
|
47
|
+
:data-id="inputDataId"
|
49
48
|
/>
|
50
|
-
<
|
49
|
+
<icon-wrapper
|
51
50
|
v-if="inputType === 'password' && !isError"
|
52
|
-
size="20px"
|
53
51
|
@click="toggleShowPassword()"
|
52
|
+
size="20px"
|
54
53
|
>
|
55
|
-
<
|
56
|
-
|
57
|
-
|
58
|
-
/>
|
59
|
-
</
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
size="16px"
|
68
|
-
/>
|
69
|
-
</IconWrapper>
|
70
|
-
</IconContainer>
|
71
|
-
<ErrorMessage v-if="hasError && hasErrorMessage">
|
72
|
-
{{
|
73
|
-
dynamicErrorMessage
|
74
|
-
}}
|
75
|
-
</ErrorMessage>
|
76
|
-
</InputErrorWrapper>
|
77
|
-
</InputWrapper>
|
78
|
-
</Container>
|
54
|
+
<icon name="current_variant" size="20px" />
|
55
|
+
</icon-wrapper>
|
56
|
+
<icon-wrapper v-if="hasError" size="16px">
|
57
|
+
<icon name="warning" size="16px" cursor="default" />
|
58
|
+
</icon-wrapper>
|
59
|
+
</icon-container>
|
60
|
+
<error-message v-if="hasError && hasErrorMessage">{{
|
61
|
+
dynamicErrorMessage
|
62
|
+
}}</error-message>
|
63
|
+
</input-error-wrapper>
|
64
|
+
</input-wrapper>
|
65
|
+
</container>
|
79
66
|
</template>
|
80
67
|
|
81
68
|
<script>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
69
|
+
import styled from 'vue3-styled-components'
|
70
|
+
import InfoText from '../../infoText'
|
71
|
+
import Icon from '../../icon'
|
72
|
+
import ErrorMessage from '../../errorMessage'
|
73
|
+
import InputValidations from '../../../mixins/inputValidations.js'
|
87
74
|
|
88
|
-
|
75
|
+
const Container = styled.div`
|
89
76
|
width: 100%;
|
90
77
|
position: relative;
|
91
78
|
`
|
92
79
|
|
93
|
-
|
94
|
-
|
80
|
+
const labelAttrs = { fontSize: String, labelFontColor: String }
|
81
|
+
const InputLabel = styled('div', labelAttrs)`
|
95
82
|
color: ${(props) =>
|
96
83
|
props.theme.colors[props.labelFontColor]
|
97
84
|
? props.theme.colors[props.labelFontColor]
|
98
85
|
: props.labelFontColor
|
99
86
|
? props.labelFontColor
|
100
|
-
|
87
|
+
: props.theme.colors.eturnityGrey};
|
101
88
|
|
102
89
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
103
90
|
font-weight: 700;
|
104
91
|
`
|
105
|
-
|
92
|
+
const optionalLabel = styled.span`
|
106
93
|
font-weight: 300;
|
107
94
|
`
|
108
|
-
|
95
|
+
const LabelWrapper = styled.div`
|
109
96
|
display: inline-grid;
|
110
97
|
grid-template-columns: auto auto;
|
111
98
|
grid-gap: 12px;
|
@@ -113,28 +100,28 @@
|
|
113
100
|
justify-content: start;
|
114
101
|
`
|
115
102
|
|
116
|
-
|
103
|
+
const InputErrorWrapper = styled.div`
|
117
104
|
display: inline-grid;
|
118
105
|
grid-template-row: auto auto;
|
119
106
|
grid-gap: 0px;
|
120
107
|
align-items: center;
|
121
108
|
`
|
122
109
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
110
|
+
const inputProps = {
|
111
|
+
isError: Boolean,
|
112
|
+
inputWidth: String,
|
113
|
+
minWidth: String,
|
114
|
+
noBorder: Boolean,
|
115
|
+
isDisabled: Boolean,
|
116
|
+
fontSize: String,
|
117
|
+
inputType: String,
|
118
|
+
fontColor: String,
|
119
|
+
backgroundColor: String,
|
120
|
+
borderColor: String,
|
121
|
+
inputHeight: String,
|
122
|
+
disabledBackgroundColor: String
|
123
|
+
}
|
124
|
+
const InputContainer = styled('input', inputProps)`
|
138
125
|
border: ${(props) =>
|
139
126
|
props.isError
|
140
127
|
? '1px solid ' + props.theme.colors.red
|
@@ -144,13 +131,13 @@
|
|
144
131
|
? props.theme.colors[props.borderColor]
|
145
132
|
? '1px solid ' + props.theme.colors[props.borderColor]
|
146
133
|
: '1px solid ' + props.borderColor
|
147
|
-
|
134
|
+
: '1px solid ' + props.theme.colors.grey4};
|
148
135
|
padding: ${(props) =>
|
149
136
|
props.isError
|
150
137
|
? '11px 25px 11px 10px'
|
151
138
|
: props.inputType === 'password'
|
152
139
|
? '11px 25px 11px 10px'
|
153
|
-
|
140
|
+
: '11px 5px 11px 10px'};
|
154
141
|
border-radius: 4px;
|
155
142
|
position: relative;
|
156
143
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
@@ -161,7 +148,7 @@
|
|
161
148
|
? props.theme.colors.grey2
|
162
149
|
: props.fontColor
|
163
150
|
? props.fontColor + ' !important'
|
164
|
-
|
151
|
+
: props.theme.colors.black};
|
165
152
|
|
166
153
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
167
154
|
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
@@ -176,7 +163,7 @@
|
|
176
163
|
: props.theme.colors.grey5
|
177
164
|
: props.backgroundColor
|
178
165
|
? props.backgroundColor + ' !important'
|
179
|
-
|
166
|
+
: props.theme.colors.white};
|
180
167
|
&::placeholder {
|
181
168
|
color: ${(props) => props.theme.colors.grey2};
|
182
169
|
}
|
@@ -186,18 +173,18 @@
|
|
186
173
|
}
|
187
174
|
`
|
188
175
|
|
189
|
-
|
190
|
-
|
176
|
+
const inputAttrs = { alignItems: String, hasLabel: Boolean }
|
177
|
+
const InputWrapper = styled('div', inputAttrs)`
|
191
178
|
position: relative;
|
192
179
|
display: grid;
|
193
180
|
align-items: center;
|
194
181
|
gap: 8px;
|
195
182
|
grid-template-columns: ${(props) =>
|
196
|
-
|
183
|
+
props.alignItems === 'vertical' || !props.hasLabel ? '1fr' : 'auto 1fr'};
|
197
184
|
`
|
198
185
|
|
199
|
-
|
200
|
-
|
186
|
+
const IconAttrs = { size: String }
|
187
|
+
const IconWrapper = styled('div', IconAttrs)`
|
201
188
|
position: absolute;
|
202
189
|
top: 0;
|
203
190
|
bottom: 0;
|
@@ -206,183 +193,183 @@
|
|
206
193
|
height: ${(props) => (props.size ? props.size : 'auto')};
|
207
194
|
`
|
208
195
|
|
209
|
-
|
196
|
+
const IconContainer = styled.div`
|
210
197
|
position: relative;
|
211
198
|
`
|
212
199
|
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
200
|
+
export default {
|
201
|
+
// import InputText from "@eturnity/eturnity_reusable_components/src/components/inputs/inputText"
|
202
|
+
// To use:
|
203
|
+
// <input-text
|
204
|
+
// placeholder="Company name"
|
205
|
+
// :value="companyName"
|
206
|
+
// @input-change="onInputChange({ value: $event, type: 'companyName' })"
|
207
|
+
// @input-blur="onInputBlur($event)"
|
208
|
+
// :isError="checkErrors()"
|
209
|
+
// :errorMessage="This is my error message"
|
210
|
+
// infoTextAlign="right" // left by default
|
211
|
+
// infoTextMessage="My info message"
|
212
|
+
// label="Question 5"
|
213
|
+
// alignItems="horizontal" // horizontal, vertical
|
214
|
+
// inputWidth="250px"
|
215
|
+
// minWidth="100px"
|
216
|
+
// fontSize="13px"
|
217
|
+
// />
|
218
|
+
name: 'input-text',
|
219
|
+
components: {
|
220
|
+
Container,
|
221
|
+
InputContainer,
|
222
|
+
InputWrapper,
|
223
|
+
ErrorMessage,
|
224
|
+
InfoText,
|
225
|
+
InputLabel,
|
226
|
+
LabelWrapper,
|
227
|
+
Icon,
|
228
|
+
IconWrapper,
|
229
|
+
IconContainer,
|
230
|
+
InputErrorWrapper,
|
231
|
+
optionalLabel
|
232
|
+
},
|
233
|
+
mixins: [InputValidations],
|
234
|
+
data() {
|
235
|
+
return {
|
236
|
+
inputTypeData: 'text'
|
237
|
+
}
|
238
|
+
},
|
239
|
+
computed: {
|
240
|
+
hasError() {
|
241
|
+
return this.isError || this.error
|
245
242
|
},
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
default: ''
|
251
|
-
},
|
252
|
-
alignItems: {
|
253
|
-
required: false,
|
254
|
-
default: 'horizontal'
|
255
|
-
},
|
256
|
-
isError: {
|
257
|
-
required: false,
|
258
|
-
default: false
|
259
|
-
},
|
260
|
-
inputWidth: {
|
261
|
-
required: false,
|
262
|
-
default: null
|
263
|
-
},
|
264
|
-
inputHeight: {
|
265
|
-
required: false,
|
266
|
-
default: null
|
267
|
-
},
|
268
|
-
minWidth: {
|
269
|
-
required: false,
|
270
|
-
default: null
|
271
|
-
},
|
272
|
-
value: {
|
273
|
-
required: true,
|
274
|
-
default: null
|
275
|
-
},
|
276
|
-
errorMessage: {
|
277
|
-
required: false,
|
278
|
-
default: ''
|
279
|
-
},
|
280
|
-
infoTextMessage: {
|
281
|
-
required: false
|
282
|
-
},
|
283
|
-
infoTextAlign: {
|
284
|
-
required: false
|
285
|
-
},
|
286
|
-
label: {
|
287
|
-
required: false
|
288
|
-
},
|
289
|
-
labelOptional: {
|
290
|
-
required: false,
|
291
|
-
default: false
|
292
|
-
},
|
293
|
-
noBorder: {
|
294
|
-
required: false,
|
295
|
-
default: false
|
296
|
-
},
|
297
|
-
disabled: {
|
298
|
-
required: false,
|
299
|
-
default: false
|
300
|
-
},
|
301
|
-
fontSize: {
|
302
|
-
required: false,
|
303
|
-
default: null
|
304
|
-
},
|
305
|
-
inputType: {
|
306
|
-
required: false,
|
307
|
-
default: 'text'
|
308
|
-
},
|
309
|
-
labelFontColor: {
|
310
|
-
required: false,
|
311
|
-
default: 'black'
|
312
|
-
},
|
313
|
-
backgroundColor: {
|
314
|
-
required: false
|
315
|
-
},
|
316
|
-
disabledBackgroundColor: {
|
317
|
-
required: false,
|
318
|
-
default: null
|
319
|
-
},
|
320
|
-
fontColor: {
|
321
|
-
required: false,
|
322
|
-
default: 'black'
|
323
|
-
},
|
324
|
-
hasFocus: {
|
325
|
-
required: false,
|
326
|
-
default: false
|
327
|
-
},
|
328
|
-
borderColor: {
|
329
|
-
required: false
|
330
|
-
},
|
331
|
-
labelDataId: {
|
332
|
-
required: false,
|
333
|
-
default: ''
|
334
|
-
},
|
335
|
-
inputDataId: {
|
336
|
-
required: false,
|
337
|
-
default: ''
|
338
|
-
}
|
243
|
+
hasErrorMessage() {
|
244
|
+
return (
|
245
|
+
(this.errorMessage && this.errorMessage.length > 0) || this.errMessage
|
246
|
+
)
|
339
247
|
},
|
340
|
-
|
341
|
-
return
|
342
|
-
|
343
|
-
|
248
|
+
dynamicErrorMessage() {
|
249
|
+
return this.errMessage || this.errorMessage
|
250
|
+
}
|
251
|
+
},
|
252
|
+
props: {
|
253
|
+
placeholder: {
|
254
|
+
required: false,
|
255
|
+
default: ''
|
344
256
|
},
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
},
|
349
|
-
hasErrorMessage() {
|
350
|
-
return (
|
351
|
-
(this.errorMessage && this.errorMessage.length > 0) || this.errMessage
|
352
|
-
)
|
353
|
-
},
|
354
|
-
dynamicErrorMessage() {
|
355
|
-
return this.errMessage || this.errorMessage
|
356
|
-
}
|
257
|
+
alignItems: {
|
258
|
+
required: false,
|
259
|
+
default: 'horizontal'
|
357
260
|
},
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
261
|
+
isError: {
|
262
|
+
required: false,
|
263
|
+
default: false
|
264
|
+
},
|
265
|
+
inputWidth: {
|
266
|
+
required: false,
|
267
|
+
default: null
|
268
|
+
},
|
269
|
+
inputHeight: {
|
270
|
+
required: false,
|
271
|
+
default: null
|
366
272
|
},
|
367
|
-
|
368
|
-
|
273
|
+
minWidth: {
|
274
|
+
required: false,
|
275
|
+
default: null
|
369
276
|
},
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
277
|
+
value: {
|
278
|
+
required: true,
|
279
|
+
default: null
|
280
|
+
},
|
281
|
+
errorMessage: {
|
282
|
+
required: false,
|
283
|
+
default: ''
|
284
|
+
},
|
285
|
+
infoTextMessage: {
|
286
|
+
required: false
|
287
|
+
},
|
288
|
+
infoTextAlign: {
|
289
|
+
required: false
|
290
|
+
},
|
291
|
+
label: {
|
292
|
+
required: false
|
293
|
+
},
|
294
|
+
labelOptional: {
|
295
|
+
required: false,
|
296
|
+
default: false
|
297
|
+
},
|
298
|
+
noBorder: {
|
299
|
+
required: false,
|
300
|
+
default: false
|
301
|
+
},
|
302
|
+
disabled: {
|
303
|
+
required: false,
|
304
|
+
default: false
|
305
|
+
},
|
306
|
+
fontSize: {
|
307
|
+
required: false,
|
308
|
+
default: null
|
309
|
+
},
|
310
|
+
inputType: {
|
311
|
+
required: false,
|
312
|
+
default: 'text'
|
313
|
+
},
|
314
|
+
labelFontColor: {
|
315
|
+
required: false,
|
316
|
+
default: 'black'
|
317
|
+
},
|
318
|
+
backgroundColor: {
|
319
|
+
required: false
|
320
|
+
},
|
321
|
+
disabledBackgroundColor: {
|
322
|
+
required: false,
|
323
|
+
default: null
|
324
|
+
},
|
325
|
+
fontColor: {
|
326
|
+
required: false,
|
327
|
+
default: 'black'
|
328
|
+
},
|
329
|
+
hasFocus: {
|
330
|
+
required: false,
|
331
|
+
default: false
|
332
|
+
},
|
333
|
+
borderColor: {
|
334
|
+
required: false
|
335
|
+
},
|
336
|
+
labelDataId: {
|
337
|
+
required: false,
|
338
|
+
default: ''
|
339
|
+
},
|
340
|
+
inputDataId: {
|
341
|
+
required: false,
|
342
|
+
default: ''
|
343
|
+
}
|
344
|
+
},
|
345
|
+
methods: {
|
346
|
+
onEnterPress() {
|
347
|
+
this.$emit('on-enter-click')
|
348
|
+
this.$refs.inputElement.$el.blur()
|
349
|
+
},
|
350
|
+
onChangeHandler(event) {
|
351
|
+
this.$emit('input-change', event.target.value)
|
352
|
+
},
|
353
|
+
onInputBlur($event) {
|
354
|
+
this.validateInput($event.target.value)
|
355
|
+
this.$emit('input-blur', $event.target.value)
|
356
|
+
},
|
357
|
+
toggleShowPassword() {
|
358
|
+
this.inputTypeData =
|
359
|
+
this.inputTypeData === 'password' ? 'text' : 'password'
|
360
|
+
}
|
361
|
+
},
|
362
|
+
created() {
|
363
|
+
this.inputTypeData = this.inputType
|
364
|
+
},
|
365
|
+
watch: {
|
366
|
+
hasFocus(newVal) {
|
367
|
+
if (newVal) {
|
368
|
+
this.$nextTick(() => {
|
369
|
+
this.$refs.inputElement.$el.focus()
|
370
|
+
})
|
385
371
|
}
|
386
372
|
}
|
387
373
|
}
|
374
|
+
}
|
388
375
|
</script>
|