@eturnity/eturnity_reusable_components 1.2.22-EPDM-5202.1 → 1.2.22
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/package.json +1 -1
- package/src/App.vue +127 -60
- package/src/components/inputs/inputText/index.vue +74 -34
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
|
|
3
3
|
<page-container>
|
|
4
4
|
<br />
|
|
5
|
-
<modal backdrop="dark" :isLoading="false" :isOpen="false">
|
|
6
|
-
|
|
5
|
+
<!-- <modal backdrop="dark" :isLoading="false" :isOpen="false"> -->
|
|
6
|
+
<!-- <main-table titleText="My Table">
|
|
7
7
|
<thead>
|
|
8
8
|
<tr>
|
|
9
9
|
<th>Column 1</th>
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
</tr>
|
|
14
14
|
</thead>
|
|
15
15
|
<tbody>
|
|
16
|
-
<tr>
|
|
17
|
-
|
|
16
|
+
<tr> -->
|
|
17
|
+
<!-- <table-dropdown
|
|
18
18
|
:colSpan="3"
|
|
19
19
|
:tableItems="getDropdownValues()"
|
|
20
20
|
@toggle-dropdown-open="toggleDropdownOpen()"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
:optionItems="itemOptions"
|
|
24
24
|
:optionsDisplay="['display_name', 'company_item_number', 'model']"
|
|
25
25
|
/> -->
|
|
26
|
-
|
|
26
|
+
<!-- <td>Test</td>
|
|
27
27
|
<div class="icons-container">
|
|
28
28
|
<three-dots :options="listOptions" :isLoading="false" />
|
|
29
29
|
</div>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</main-table>
|
|
33
33
|
</modal>
|
|
34
34
|
<row-container>
|
|
35
|
-
<div v-for=
|
|
35
|
+
<div v-for="(item, index) in markersArray" :key="item.index">
|
|
36
36
|
<project-marker
|
|
37
37
|
:activeLanguage="'en-us'"
|
|
38
38
|
:markerData="item"
|
|
@@ -58,23 +58,24 @@
|
|
|
58
58
|
labelAlign="right"
|
|
59
59
|
:disabled="false"
|
|
60
60
|
/>
|
|
61
|
-
<br />
|
|
62
|
-
<
|
|
61
|
+
<br /> -->
|
|
62
|
+
<iconCollection />
|
|
63
|
+
<input-text
|
|
63
64
|
placeholder="Enter distance"
|
|
64
|
-
:numberPrecision="2"
|
|
65
65
|
:value="inputValue"
|
|
66
66
|
@input-change="onInputChange($event)"
|
|
67
|
+
type="password"
|
|
67
68
|
/>
|
|
68
69
|
<br />
|
|
69
|
-
<page-subtitle text="My Subtitle" infoText="My info Text" />
|
|
70
|
+
<!-- <page-subtitle text="My Subtitle" infoText="My info Text" />
|
|
70
71
|
<spinner size="30px" />
|
|
71
72
|
<checkbox
|
|
72
73
|
label="Do you accept the Terms?"
|
|
73
74
|
:isChecked="true"
|
|
74
75
|
size="small"
|
|
75
76
|
:isDisabled="false"
|
|
76
|
-
/>
|
|
77
|
-
<external-button text="Click me!" minWidth="500px" />
|
|
77
|
+
/> -->
|
|
78
|
+
<!-- <external-button text="Click me!" minWidth="500px" /> -->
|
|
78
79
|
</page-container>
|
|
79
80
|
</ThemeProvider>
|
|
80
81
|
</template>
|
|
@@ -83,46 +84,46 @@
|
|
|
83
84
|
import { ThemeProvider } from 'vue-styled-components'
|
|
84
85
|
import theme from './assets/theme'
|
|
85
86
|
import styled from 'vue-styled-components'
|
|
86
|
-
import MainTable from '@/components/tables/mainTable'
|
|
87
|
-
import ThreeDots from '@/components/threeDots'
|
|
88
|
-
import Toggle from '@/components/inputs/toggle'
|
|
89
|
-
import
|
|
90
|
-
import Checkbox from '@/components/inputs/checkbox'
|
|
91
|
-
import PageSubtitle from '@/components/pageSubtitle'
|
|
92
|
-
import Spinner from '@/components/spinner'
|
|
93
|
-
import ExternalButton from '@/components/buttons/externalButton'
|
|
94
|
-
import ProjectMarker from '@/components/projectMarker'
|
|
87
|
+
// import MainTable from '@/components/tables/mainTable'
|
|
88
|
+
// import ThreeDots from '@/components/threeDots'
|
|
89
|
+
// import Toggle from '@/components/inputs/toggle'
|
|
90
|
+
import InputText from '@/components/inputs/inputText'
|
|
91
|
+
// import Checkbox from '@/components/inputs/checkbox'
|
|
92
|
+
// import PageSubtitle from '@/components/pageSubtitle'
|
|
93
|
+
// import Spinner from '@/components/spinner'
|
|
94
|
+
// import ExternalButton from '@/components/buttons/externalButton'
|
|
95
|
+
// import ProjectMarker from '@/components/projectMarker'
|
|
95
96
|
import iconCollection from '@/components/icon/iconCollection'
|
|
96
|
-
import Modal from '@/components/modals/modal'
|
|
97
|
+
// import Modal from '@/components/modals/modal'
|
|
97
98
|
// import TableDropdown from "@/components/tableDropdown"
|
|
98
99
|
|
|
99
100
|
const PageContainer = styled.div`
|
|
100
101
|
padding: 40px;
|
|
101
102
|
`
|
|
102
103
|
|
|
103
|
-
const RowContainer = styled.div`
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`
|
|
104
|
+
// const RowContainer = styled.div`
|
|
105
|
+
// display: inline-flex;
|
|
106
|
+
// gap: 10px;
|
|
107
|
+
// flex-wrap: wrap;
|
|
108
|
+
// `
|
|
108
109
|
|
|
109
110
|
export default {
|
|
110
111
|
name: 'App',
|
|
111
112
|
components: {
|
|
112
113
|
ThemeProvider,
|
|
113
114
|
PageContainer,
|
|
114
|
-
MainTable,
|
|
115
|
-
ThreeDots,
|
|
116
|
-
Toggle,
|
|
117
|
-
|
|
118
|
-
PageSubtitle,
|
|
119
|
-
Spinner,
|
|
120
|
-
Checkbox,
|
|
121
|
-
ExternalButton,
|
|
122
|
-
Modal,
|
|
123
|
-
ProjectMarker,
|
|
124
|
-
iconCollection
|
|
125
|
-
RowContainer
|
|
115
|
+
// MainTable,
|
|
116
|
+
// ThreeDots,
|
|
117
|
+
// Toggle,
|
|
118
|
+
InputText,
|
|
119
|
+
// PageSubtitle,
|
|
120
|
+
// Spinner,
|
|
121
|
+
// Checkbox,
|
|
122
|
+
// ExternalButton,
|
|
123
|
+
// Modal,
|
|
124
|
+
// ProjectMarker,
|
|
125
|
+
iconCollection
|
|
126
|
+
// RowContainer
|
|
126
127
|
},
|
|
127
128
|
data() {
|
|
128
129
|
return {
|
|
@@ -132,7 +133,7 @@ export default {
|
|
|
132
133
|
number_format_precision: 4,
|
|
133
134
|
number_min_allowed: 0,
|
|
134
135
|
number_max_allowed: 10,
|
|
135
|
-
unit_short_name: 'cm'
|
|
136
|
+
unit_short_name: 'cm'
|
|
136
137
|
},
|
|
137
138
|
dropdownOpen: false,
|
|
138
139
|
isChecked: false,
|
|
@@ -140,48 +141,114 @@ export default {
|
|
|
140
141
|
{
|
|
141
142
|
name: 'Option 1',
|
|
142
143
|
value: 'option_1',
|
|
143
|
-
disabled: true
|
|
144
|
+
disabled: true
|
|
144
145
|
},
|
|
145
146
|
{
|
|
146
147
|
name: 'Option 2',
|
|
147
|
-
value: 'option_2'
|
|
148
|
+
value: 'option_2'
|
|
148
149
|
},
|
|
149
150
|
{
|
|
150
151
|
name: 'Option 3',
|
|
151
|
-
value: 'option_3'
|
|
152
|
+
value: 'option_3'
|
|
152
153
|
},
|
|
153
154
|
{
|
|
154
155
|
name: 'Option 4',
|
|
155
|
-
value: 'option_4'
|
|
156
|
-
}
|
|
156
|
+
value: 'option_4'
|
|
157
|
+
}
|
|
157
158
|
],
|
|
158
159
|
itemOptions: [
|
|
159
160
|
{
|
|
160
161
|
display_name: 'Test 1',
|
|
161
162
|
company_item_number: '123',
|
|
162
163
|
model: 'BTB-2145 Long Text Long Text Long Text Long Text Long Text',
|
|
163
|
-
id: 1
|
|
164
|
+
id: 1
|
|
164
165
|
},
|
|
165
166
|
{
|
|
166
167
|
display_name: 'Test 2',
|
|
167
168
|
company_item_number: '1234',
|
|
168
169
|
model: 'BTB-123',
|
|
169
|
-
id: 2
|
|
170
|
+
id: 2
|
|
170
171
|
},
|
|
171
172
|
{
|
|
172
173
|
display_name: 'Test 3',
|
|
173
174
|
company_item_number: '12345',
|
|
174
175
|
model: 'BTB-543',
|
|
175
|
-
id: 3
|
|
176
|
+
id: 3
|
|
176
177
|
},
|
|
177
178
|
{
|
|
178
179
|
display_name: 'Test 4',
|
|
179
180
|
company_item_number: '123456',
|
|
180
181
|
model: 'BTB-4930',
|
|
181
|
-
id: 4
|
|
182
|
-
}
|
|
182
|
+
id: 4
|
|
183
|
+
}
|
|
183
184
|
],
|
|
184
|
-
markersArray: [
|
|
185
|
+
markersArray: [
|
|
186
|
+
{
|
|
187
|
+
id: 1180,
|
|
188
|
+
choice: 'project-on-hold',
|
|
189
|
+
translations: {
|
|
190
|
+
fr: { name: 'fr - Project on hold' },
|
|
191
|
+
'en-us': { name: 'Project on hold' },
|
|
192
|
+
'it-ch': { name: 'it-ch - Project on hold' },
|
|
193
|
+
'de-ch': { name: 'de-ch - Project on hold' },
|
|
194
|
+
'fr-be': { name: 'fr-be - Project on hold' }
|
|
195
|
+
},
|
|
196
|
+
color: '#D27CCA',
|
|
197
|
+
can_be_deleted: true
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: 266,
|
|
201
|
+
choice: 'transferred',
|
|
202
|
+
translations: {
|
|
203
|
+
'en-us': { name: 'Transferred' },
|
|
204
|
+
fr: { name: 'fr - Transferred' },
|
|
205
|
+
'de-ch': { name: 'de-ch - Transferred' },
|
|
206
|
+
'it-ch': { name: 'it-ch - Transferred' },
|
|
207
|
+
'fr-be': { name: 'fr-be - Transferred' }
|
|
208
|
+
},
|
|
209
|
+
color: '#20A4CA',
|
|
210
|
+
can_be_deleted: false
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
id: 267,
|
|
214
|
+
choice: 'sold',
|
|
215
|
+
translations: {
|
|
216
|
+
'en-us': { name: 'Sold' },
|
|
217
|
+
fr: { name: 'Vendu' },
|
|
218
|
+
'de-ch': { name: 'Verkauft' },
|
|
219
|
+
'it-ch': { name: 'Venduto' },
|
|
220
|
+
'fr-be': { name: 'Vendu' }
|
|
221
|
+
},
|
|
222
|
+
color: '#008351',
|
|
223
|
+
can_be_deleted: false
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: 268,
|
|
227
|
+
choice: 'lost',
|
|
228
|
+
translations: {
|
|
229
|
+
'en-us': { name: 'Lost' },
|
|
230
|
+
fr: { name: 'Perdu' },
|
|
231
|
+
'de-ch': { name: 'Verloren' },
|
|
232
|
+
'it-ch': { name: 'Perso' },
|
|
233
|
+
'fr-be': { name: 'Perdu' }
|
|
234
|
+
},
|
|
235
|
+
color: '#A52019',
|
|
236
|
+
can_be_deleted: false
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
id: 1181,
|
|
240
|
+
choice: 'project-created',
|
|
241
|
+
translations: {
|
|
242
|
+
fr: { name: 'Project created' },
|
|
243
|
+
'en-us': { name: 'Project created' },
|
|
244
|
+
'it-ch': { name: 'Project created' },
|
|
245
|
+
'de-ch': { name: 'Project created' },
|
|
246
|
+
'fr-be': { name: 'Project created' }
|
|
247
|
+
},
|
|
248
|
+
color: '#FDB813',
|
|
249
|
+
can_be_deleted: true
|
|
250
|
+
}
|
|
251
|
+
]
|
|
185
252
|
}
|
|
186
253
|
},
|
|
187
254
|
methods: {
|
|
@@ -212,21 +279,21 @@ export default {
|
|
|
212
279
|
{
|
|
213
280
|
value: this.getComponentInfo({
|
|
214
281
|
row: this.itemOptions[0],
|
|
215
|
-
value: 'display_name'
|
|
216
|
-
})
|
|
282
|
+
value: 'display_name'
|
|
283
|
+
})
|
|
217
284
|
},
|
|
218
285
|
{
|
|
219
286
|
value: this.getComponentInfo({
|
|
220
287
|
row: this.itemOptions[0],
|
|
221
|
-
value: 'company_item_number'
|
|
222
|
-
})
|
|
288
|
+
value: 'company_item_number'
|
|
289
|
+
})
|
|
223
290
|
},
|
|
224
291
|
{
|
|
225
292
|
value: this.getComponentInfo({
|
|
226
293
|
row: this.itemOptions[0],
|
|
227
|
-
value: 'model'
|
|
228
|
-
})
|
|
229
|
-
}
|
|
294
|
+
value: 'model'
|
|
295
|
+
})
|
|
296
|
+
}
|
|
230
297
|
]
|
|
231
298
|
return items
|
|
232
299
|
},
|
|
@@ -240,8 +307,8 @@ export default {
|
|
|
240
307
|
item = '-'
|
|
241
308
|
}
|
|
242
309
|
return item
|
|
243
|
-
}
|
|
244
|
-
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
245
312
|
}
|
|
246
313
|
</script>
|
|
247
314
|
|
|
@@ -25,15 +25,27 @@
|
|
|
25
25
|
:disabled="disabled"
|
|
26
26
|
:isDisabled="disabled"
|
|
27
27
|
:fontSize="fontSize"
|
|
28
|
+
:inputType="inputType"
|
|
29
|
+
:type="inputTypeData"
|
|
28
30
|
/>
|
|
31
|
+
<icon-wrapper
|
|
32
|
+
v-if="inputType === 'password' && !isError"
|
|
33
|
+
@click="toggleShowPassword()"
|
|
34
|
+
>
|
|
35
|
+
<icon name="current_variant" size="20px" />
|
|
36
|
+
</icon-wrapper>
|
|
37
|
+
<icon-wrapper v-if="isError">
|
|
38
|
+
<icon name="warning" size="16px" />
|
|
39
|
+
</icon-wrapper>
|
|
29
40
|
</input-wrapper>
|
|
30
41
|
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
|
31
42
|
</container>
|
|
32
43
|
</template>
|
|
33
44
|
|
|
34
45
|
<script>
|
|
35
|
-
import styled from
|
|
36
|
-
import InfoText from
|
|
46
|
+
import styled from 'vue-styled-components'
|
|
47
|
+
import InfoText from '../../infoText'
|
|
48
|
+
import Icon from '../../icon'
|
|
37
49
|
|
|
38
50
|
const Container = styled.div`
|
|
39
51
|
width: 100%;
|
|
@@ -41,17 +53,16 @@ const Container = styled.div`
|
|
|
41
53
|
`
|
|
42
54
|
|
|
43
55
|
const labelAttrs = { fontSize: String }
|
|
44
|
-
const InputLabel = styled(
|
|
56
|
+
const InputLabel = styled('div', labelAttrs)`
|
|
45
57
|
font-weight: bold;
|
|
46
|
-
font-size: ${(props) => (props.fontSize ? props.fontSize :
|
|
58
|
+
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
|
47
59
|
`
|
|
48
60
|
|
|
49
61
|
const LabelWrapper = styled.div`
|
|
50
62
|
display: inline-grid;
|
|
51
|
-
grid-template-columns: auto
|
|
63
|
+
grid-template-columns: auto 1fr;
|
|
52
64
|
grid-gap: 12px;
|
|
53
65
|
align-items: center;
|
|
54
|
-
justify-content: start;
|
|
55
66
|
`
|
|
56
67
|
|
|
57
68
|
const inputProps = {
|
|
@@ -61,29 +72,34 @@ const inputProps = {
|
|
|
61
72
|
noBorder: Boolean,
|
|
62
73
|
isDisabled: Boolean,
|
|
63
74
|
fontSize: String,
|
|
75
|
+
inputType: String
|
|
64
76
|
}
|
|
65
|
-
const InputContainer = styled(
|
|
77
|
+
const InputContainer = styled('input', inputProps)`
|
|
66
78
|
border: ${(props) =>
|
|
67
79
|
props.isError
|
|
68
|
-
?
|
|
80
|
+
? '1px solid ' + props.theme.colors.red
|
|
69
81
|
: props.noBorder
|
|
70
|
-
?
|
|
82
|
+
? 'none'
|
|
71
83
|
: props.hasLength
|
|
72
|
-
?
|
|
73
|
-
:
|
|
84
|
+
? '1px solid ' + props.theme.colors.black
|
|
85
|
+
: '1px solid ' + props.theme.colors.mediumGray};
|
|
74
86
|
padding: ${(props) =>
|
|
75
|
-
props.
|
|
87
|
+
props.isError
|
|
88
|
+
? '11px 25px 11px 10px'
|
|
89
|
+
: props.inputType === 'password'
|
|
90
|
+
? '11px 25px 11px 10px'
|
|
91
|
+
: '11px 5px 11px 10px'};
|
|
76
92
|
border-radius: 4px;
|
|
77
|
-
font-size: ${(props) => (props.fontSize ? props.fontSize :
|
|
93
|
+
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
|
78
94
|
color: ${(props) =>
|
|
79
95
|
props.isError ? props.theme.colors.red : props.theme.colors.black};
|
|
80
|
-
width: ${(props) => (props.inputWidth ? props.inputWidth :
|
|
81
|
-
min-width: ${(props) => (props.minWidth ? props.minWidth :
|
|
96
|
+
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
97
|
+
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
|
82
98
|
box-sizing: border-box; // to allow width of 100% with padding
|
|
83
99
|
font-weight: 500;
|
|
84
|
-
cursor: ${(props) => (props.isDisabled ?
|
|
100
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'auto')};
|
|
85
101
|
background-color: ${(props) =>
|
|
86
|
-
props.isDisabled ? props.theme.colors.grey5 :
|
|
102
|
+
props.isDisabled ? props.theme.colors.grey5 : '#fff'};
|
|
87
103
|
|
|
88
104
|
&::placeholder {
|
|
89
105
|
color: ${(props) =>
|
|
@@ -96,13 +112,13 @@ const InputContainer = styled("input", inputProps)`
|
|
|
96
112
|
`
|
|
97
113
|
|
|
98
114
|
const inputAttrs = { alignItems: String, hasLabel: Boolean }
|
|
99
|
-
const InputWrapper = styled(
|
|
115
|
+
const InputWrapper = styled('div', inputAttrs)`
|
|
100
116
|
position: relative;
|
|
101
117
|
display: grid;
|
|
102
118
|
align-items: center;
|
|
103
119
|
gap: 8px;
|
|
104
120
|
grid-template-columns: ${(props) =>
|
|
105
|
-
props.alignItems ===
|
|
121
|
+
props.alignItems === 'vertical' || !props.hasLabel ? '1fr' : 'auto 1fr'};
|
|
106
122
|
`
|
|
107
123
|
|
|
108
124
|
const ErrorMessage = styled.div`
|
|
@@ -112,6 +128,12 @@ const ErrorMessage = styled.div`
|
|
|
112
128
|
top: calc(100% + 1px);
|
|
113
129
|
`
|
|
114
130
|
|
|
131
|
+
const IconWrapper = styled.div`
|
|
132
|
+
position: absolute;
|
|
133
|
+
top: 55%;
|
|
134
|
+
right: 5px;
|
|
135
|
+
`
|
|
136
|
+
|
|
115
137
|
export default {
|
|
116
138
|
// import InputText from "@eturnity/eturnity_reusable_components/src/components/inputs/inputText"
|
|
117
139
|
// To use:
|
|
@@ -129,7 +151,7 @@ export default {
|
|
|
129
151
|
// minWidth="100px"
|
|
130
152
|
// fontSize="13px"
|
|
131
153
|
// />
|
|
132
|
-
name:
|
|
154
|
+
name: 'input-text',
|
|
133
155
|
components: {
|
|
134
156
|
Container,
|
|
135
157
|
InputContainer,
|
|
@@ -138,62 +160,80 @@ export default {
|
|
|
138
160
|
InfoText,
|
|
139
161
|
InputLabel,
|
|
140
162
|
LabelWrapper,
|
|
163
|
+
Icon,
|
|
164
|
+
IconWrapper
|
|
165
|
+
},
|
|
166
|
+
data() {
|
|
167
|
+
return {
|
|
168
|
+
inputTypeData: 'text'
|
|
169
|
+
}
|
|
141
170
|
},
|
|
142
171
|
props: {
|
|
143
172
|
placeholder: {
|
|
144
173
|
required: false,
|
|
145
|
-
default:
|
|
174
|
+
default: ''
|
|
146
175
|
},
|
|
147
176
|
alignItems: {
|
|
148
177
|
required: false,
|
|
149
|
-
default:
|
|
178
|
+
default: 'horizontal'
|
|
150
179
|
},
|
|
151
180
|
isError: {
|
|
152
181
|
required: false,
|
|
153
|
-
default: false
|
|
182
|
+
default: false
|
|
154
183
|
},
|
|
155
184
|
inputWidth: {
|
|
156
185
|
required: false,
|
|
157
|
-
default: null
|
|
186
|
+
default: null
|
|
158
187
|
},
|
|
159
188
|
minWidth: {
|
|
160
189
|
required: false,
|
|
161
|
-
default: null
|
|
190
|
+
default: null
|
|
162
191
|
},
|
|
163
192
|
value: {
|
|
164
193
|
required: true,
|
|
165
|
-
default: null
|
|
194
|
+
default: null
|
|
166
195
|
},
|
|
167
196
|
errorMessage: {
|
|
168
197
|
required: false,
|
|
169
|
-
default:
|
|
198
|
+
default: ''
|
|
170
199
|
},
|
|
171
200
|
infoTextMessage: {
|
|
172
|
-
required: false
|
|
201
|
+
required: false
|
|
173
202
|
},
|
|
174
203
|
infoTextAlign: {
|
|
175
|
-
required: false
|
|
204
|
+
required: false
|
|
176
205
|
},
|
|
177
206
|
label: {
|
|
178
|
-
required: false
|
|
207
|
+
required: false
|
|
179
208
|
},
|
|
180
209
|
noBorder: {
|
|
181
210
|
required: false,
|
|
182
|
-
default: false
|
|
211
|
+
default: false
|
|
183
212
|
},
|
|
184
213
|
disabled: {
|
|
185
214
|
required: false,
|
|
186
|
-
default: false
|
|
215
|
+
default: false
|
|
187
216
|
},
|
|
188
217
|
fontSize: {
|
|
189
218
|
required: false,
|
|
190
|
-
default: null
|
|
219
|
+
default: null
|
|
191
220
|
},
|
|
221
|
+
inputType: {
|
|
222
|
+
required: false,
|
|
223
|
+
default: 'text'
|
|
224
|
+
}
|
|
192
225
|
},
|
|
193
226
|
methods: {
|
|
194
227
|
onChangeHandler($event) {
|
|
195
|
-
this.$emit(
|
|
228
|
+
this.$emit('input-change', $event)
|
|
196
229
|
},
|
|
230
|
+
toggleShowPassword() {
|
|
231
|
+
this.inputTypeData =
|
|
232
|
+
this.inputTypeData === 'password' ? 'text' : 'password'
|
|
233
|
+
}
|
|
197
234
|
},
|
|
235
|
+
created() {
|
|
236
|
+
this.inputTypeData = this.inputType
|
|
237
|
+
}
|
|
198
238
|
}
|
|
199
239
|
</script>
|