@eturnity/eturnity_reusable_components 1.2.2-EPDM-4730.2 → 1.2.2-QA03.15092022.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/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,63 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
|
|
3
3
|
<page-container>
|
|
4
|
-
<br />
|
|
5
|
-
<modal backdrop="dark" :isLoading="false" :isOpen="true">
|
|
6
|
-
<main-table titleText="My Table">
|
|
7
|
-
<thead>
|
|
8
|
-
<tr>
|
|
9
|
-
<th>Column 1</th>
|
|
10
|
-
<th>Column 2</th>
|
|
11
|
-
<th>Column 3</th>
|
|
12
|
-
<div />
|
|
13
|
-
</tr>
|
|
14
|
-
</thead>
|
|
15
|
-
<tbody>
|
|
16
|
-
<tr>
|
|
17
|
-
<!-- <table-dropdown
|
|
18
|
-
:colSpan="3"
|
|
19
|
-
:tableItems="getDropdownValues()"
|
|
20
|
-
@toggle-dropdown-open="toggleDropdownOpen()"
|
|
21
|
-
@item-selected="onItemSelected({ item: $event, index })"
|
|
22
|
-
:isOpen="isDropdownOpen()"
|
|
23
|
-
:optionItems="itemOptions"
|
|
24
|
-
:optionsDisplay="['display_name', 'company_item_number', 'model']"
|
|
25
|
-
/> -->
|
|
26
|
-
<td>Test</td>
|
|
27
|
-
<div class="icons-container">
|
|
28
|
-
<three-dots :options="listOptions" :isLoading="false" />
|
|
29
|
-
</div>
|
|
30
|
-
</tr>
|
|
31
|
-
</tbody>
|
|
32
|
-
</main-table>
|
|
33
|
-
</modal>
|
|
34
|
-
<br />
|
|
35
|
-
<toggle
|
|
36
|
-
@on-toggle-change="onInputChange($event)"
|
|
37
|
-
:isChecked="inputValue"
|
|
38
|
-
label="My Label Text"
|
|
39
|
-
infoTextMessage="This is my test message"
|
|
40
|
-
infoTextAlign="right"
|
|
41
|
-
labelAlign="right"
|
|
42
|
-
:disabled="false"
|
|
43
|
-
/>
|
|
44
|
-
<br />
|
|
45
4
|
<input-number
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<page-subtitle text="My Subtitle" infoText="My info Text" />
|
|
53
|
-
<spinner size="30px" />
|
|
54
|
-
<checkbox
|
|
55
|
-
label="Do you accept the Terms?"
|
|
56
|
-
:isChecked="true"
|
|
57
|
-
size="small"
|
|
58
|
-
:isDisabled="false"
|
|
5
|
+
:value="num"
|
|
6
|
+
@input-change="num = $event"
|
|
7
|
+
unitName="t"
|
|
8
|
+
id="biebie"
|
|
9
|
+
test="koko"
|
|
10
|
+
@keydown="keydownHandler"
|
|
59
11
|
/>
|
|
60
|
-
<external-button text="Click me!" minWidth="500px" />
|
|
61
12
|
</page-container>
|
|
62
13
|
</ThemeProvider>
|
|
63
14
|
</template>
|
|
@@ -66,16 +17,7 @@
|
|
|
66
17
|
import { ThemeProvider } from 'vue-styled-components'
|
|
67
18
|
import theme from './assets/theme'
|
|
68
19
|
import styled from 'vue-styled-components'
|
|
69
|
-
import MainTable from '@/components/tables/mainTable'
|
|
70
|
-
import ThreeDots from '@/components/threeDots'
|
|
71
|
-
import Toggle from '@/components/inputs/toggle'
|
|
72
20
|
import InputNumber from '@/components/inputs/inputNumber'
|
|
73
|
-
import Checkbox from '@/components/inputs/checkbox'
|
|
74
|
-
import PageSubtitle from '@/components/pageSubtitle'
|
|
75
|
-
import Spinner from '@/components/spinner'
|
|
76
|
-
import ExternalButton from '@/components/buttons/externalButton'
|
|
77
|
-
import Modal from '@/components/modals/modal'
|
|
78
|
-
// import TableDropdown from "@/components/tableDropdown"
|
|
79
21
|
|
|
80
22
|
const PageContainer = styled.div`
|
|
81
23
|
padding: 40px;
|
|
@@ -86,25 +28,19 @@ export default {
|
|
|
86
28
|
components: {
|
|
87
29
|
ThemeProvider,
|
|
88
30
|
PageContainer,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Toggle,
|
|
92
|
-
InputNumber,
|
|
93
|
-
PageSubtitle,
|
|
94
|
-
Spinner,
|
|
95
|
-
Checkbox,
|
|
96
|
-
ExternalButton,
|
|
97
|
-
Modal,
|
|
31
|
+
InputNumber
|
|
32
|
+
// TableDropdown,
|
|
98
33
|
},
|
|
99
34
|
data() {
|
|
100
35
|
return {
|
|
36
|
+
num: 42,
|
|
101
37
|
inputValue: null,
|
|
102
38
|
checkedOption: 'button_1',
|
|
103
39
|
question: {
|
|
104
40
|
number_format_precision: 4,
|
|
105
41
|
number_min_allowed: 0,
|
|
106
42
|
number_max_allowed: 10,
|
|
107
|
-
unit_short_name: 'cm'
|
|
43
|
+
unit_short_name: 'cm'
|
|
108
44
|
},
|
|
109
45
|
dropdownOpen: false,
|
|
110
46
|
isChecked: false,
|
|
@@ -112,50 +48,53 @@ export default {
|
|
|
112
48
|
{
|
|
113
49
|
name: 'Option 1',
|
|
114
50
|
value: 'option_1',
|
|
115
|
-
disabled: true
|
|
51
|
+
disabled: true
|
|
116
52
|
},
|
|
117
53
|
{
|
|
118
54
|
name: 'Option 2',
|
|
119
|
-
value: 'option_2'
|
|
55
|
+
value: 'option_2'
|
|
120
56
|
},
|
|
121
57
|
{
|
|
122
58
|
name: 'Option 3',
|
|
123
|
-
value: 'option_3'
|
|
59
|
+
value: 'option_3'
|
|
124
60
|
},
|
|
125
61
|
{
|
|
126
62
|
name: 'Option 4',
|
|
127
|
-
value: 'option_4'
|
|
128
|
-
}
|
|
63
|
+
value: 'option_4'
|
|
64
|
+
}
|
|
129
65
|
],
|
|
130
66
|
itemOptions: [
|
|
131
67
|
{
|
|
132
68
|
display_name: 'Test 1',
|
|
133
69
|
company_item_number: '123',
|
|
134
70
|
model: 'BTB-2145 Long Text Long Text Long Text Long Text Long Text',
|
|
135
|
-
id: 1
|
|
71
|
+
id: 1
|
|
136
72
|
},
|
|
137
73
|
{
|
|
138
74
|
display_name: 'Test 2',
|
|
139
75
|
company_item_number: '1234',
|
|
140
76
|
model: 'BTB-123',
|
|
141
|
-
id: 2
|
|
77
|
+
id: 2
|
|
142
78
|
},
|
|
143
79
|
{
|
|
144
80
|
display_name: 'Test 3',
|
|
145
81
|
company_item_number: '12345',
|
|
146
82
|
model: 'BTB-543',
|
|
147
|
-
id: 3
|
|
83
|
+
id: 3
|
|
148
84
|
},
|
|
149
85
|
{
|
|
150
86
|
display_name: 'Test 4',
|
|
151
87
|
company_item_number: '123456',
|
|
152
88
|
model: 'BTB-4930',
|
|
153
|
-
id: 4
|
|
154
|
-
}
|
|
155
|
-
]
|
|
89
|
+
id: 4
|
|
90
|
+
}
|
|
91
|
+
]
|
|
156
92
|
}
|
|
157
93
|
},
|
|
158
94
|
methods: {
|
|
95
|
+
keydownHandler(e) {
|
|
96
|
+
console.log('test', e)
|
|
97
|
+
},
|
|
159
98
|
getTheme() {
|
|
160
99
|
return theme
|
|
161
100
|
},
|
|
@@ -177,21 +116,21 @@ export default {
|
|
|
177
116
|
{
|
|
178
117
|
value: this.getComponentInfo({
|
|
179
118
|
row: this.itemOptions[0],
|
|
180
|
-
value: 'display_name'
|
|
181
|
-
})
|
|
119
|
+
value: 'display_name'
|
|
120
|
+
})
|
|
182
121
|
},
|
|
183
122
|
{
|
|
184
123
|
value: this.getComponentInfo({
|
|
185
124
|
row: this.itemOptions[0],
|
|
186
|
-
value: 'company_item_number'
|
|
187
|
-
})
|
|
125
|
+
value: 'company_item_number'
|
|
126
|
+
})
|
|
188
127
|
},
|
|
189
128
|
{
|
|
190
129
|
value: this.getComponentInfo({
|
|
191
130
|
row: this.itemOptions[0],
|
|
192
|
-
value: 'model'
|
|
193
|
-
})
|
|
194
|
-
}
|
|
131
|
+
value: 'model'
|
|
132
|
+
})
|
|
133
|
+
}
|
|
195
134
|
]
|
|
196
135
|
return items
|
|
197
136
|
},
|
|
@@ -205,8 +144,8 @@ export default {
|
|
|
205
144
|
item = '-'
|
|
206
145
|
}
|
|
207
146
|
return item
|
|
208
|
-
}
|
|
209
|
-
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
210
149
|
}
|
|
211
150
|
</script>
|
|
212
151
|
|
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
</label-wrapper>
|
|
15
15
|
<input-wrapper>
|
|
16
16
|
<input-container
|
|
17
|
+
v-bind="$attrs"
|
|
17
18
|
ref="inputField1"
|
|
18
19
|
:hasUnit="unitName && !!unitName.length"
|
|
19
|
-
:placeholder="
|
|
20
|
+
:placeholder="displayedPlaceholder"
|
|
20
21
|
:isError="isError"
|
|
21
22
|
:inputWidth="inputWidth"
|
|
22
23
|
:minWidth="minWidth"
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
:textAlign="textAlign"
|
|
31
32
|
:fontSize="fontSize"
|
|
32
33
|
:fontColor="fontColor"
|
|
34
|
+
v-on="$listeners"
|
|
33
35
|
/>
|
|
34
36
|
<unit-container
|
|
35
37
|
v-if="unitName && showLinearUnitName"
|
|
@@ -68,12 +70,12 @@
|
|
|
68
70
|
// :minNumber="0"
|
|
69
71
|
// fontColor="blue"
|
|
70
72
|
// />
|
|
71
|
-
import styled from
|
|
73
|
+
import styled from 'vue-styled-components'
|
|
72
74
|
import {
|
|
73
75
|
stringToNumber,
|
|
74
|
-
numberToString
|
|
75
|
-
} from
|
|
76
|
-
import InfoText from
|
|
76
|
+
numberToString
|
|
77
|
+
} from '../../../helpers/numberConverter'
|
|
78
|
+
import InfoText from '../../infoText'
|
|
77
79
|
|
|
78
80
|
const Container = styled.div`
|
|
79
81
|
width: 100%;
|
|
@@ -89,31 +91,31 @@ const inputProps = {
|
|
|
89
91
|
noBorder: Boolean,
|
|
90
92
|
textAlign: String,
|
|
91
93
|
fontSize: String,
|
|
92
|
-
fontColor: String
|
|
94
|
+
fontColor: String
|
|
93
95
|
}
|
|
94
|
-
const InputContainer = styled(
|
|
96
|
+
const InputContainer = styled('input', inputProps)`
|
|
95
97
|
border: ${(props) =>
|
|
96
98
|
props.isError
|
|
97
|
-
?
|
|
99
|
+
? '1px solid ' + props.theme.colors.red
|
|
98
100
|
: props.noBorder
|
|
99
|
-
?
|
|
100
|
-
:
|
|
101
|
+
? 'none'
|
|
102
|
+
: '1px solid ' + props.theme.colors.mediumGray};
|
|
101
103
|
padding: ${(props) =>
|
|
102
|
-
props.hasUnit ?
|
|
104
|
+
props.hasUnit ? '11px 40px 11px 10px' : '11px 5px 11px 10px'};
|
|
103
105
|
border-radius: 4px;
|
|
104
106
|
text-align: ${(props) => props.textAlign};
|
|
105
|
-
cursor: ${(props) => (props.isDisabled ?
|
|
106
|
-
font-size: ${(props) => (props.fontSize ? props.fontSize :
|
|
107
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'auto')};
|
|
108
|
+
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
|
107
109
|
color: ${(props) =>
|
|
108
110
|
props.isError
|
|
109
111
|
? props.theme.colors.red
|
|
110
112
|
: props.fontColor
|
|
111
|
-
? props.fontColor +
|
|
113
|
+
? props.fontColor + ' !important'
|
|
112
114
|
: props.theme.colors.black};
|
|
113
|
-
width: ${(props) => (props.inputWidth ? props.inputWidth :
|
|
114
|
-
min-width: ${(props) => (props.minWidth ? props.minWidth :
|
|
115
|
+
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
116
|
+
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
|
115
117
|
background-color: ${(props) =>
|
|
116
|
-
props.isDisabled ? props.theme.colors.grey5 :
|
|
118
|
+
props.isDisabled ? props.theme.colors.grey5 : '#fff'};
|
|
117
119
|
box-sizing: border-box;
|
|
118
120
|
|
|
119
121
|
&::placeholder {
|
|
@@ -130,7 +132,7 @@ const InputWrapper = styled.span`
|
|
|
130
132
|
position: relative;
|
|
131
133
|
`
|
|
132
134
|
|
|
133
|
-
const UnitContainer = styled(
|
|
135
|
+
const UnitContainer = styled('span', inputProps)`
|
|
134
136
|
border-left: 1px solid
|
|
135
137
|
${(props) =>
|
|
136
138
|
props.isError
|
|
@@ -169,7 +171,7 @@ const LabelText = styled.div`
|
|
|
169
171
|
`
|
|
170
172
|
|
|
171
173
|
export default {
|
|
172
|
-
name:
|
|
174
|
+
name: 'input-number',
|
|
173
175
|
components: {
|
|
174
176
|
Container,
|
|
175
177
|
InputContainer,
|
|
@@ -178,131 +180,138 @@ export default {
|
|
|
178
180
|
ErrorMessage,
|
|
179
181
|
LabelWrapper,
|
|
180
182
|
LabelText,
|
|
181
|
-
InfoText
|
|
183
|
+
InfoText
|
|
182
184
|
},
|
|
185
|
+
inheritAttrs: false,
|
|
183
186
|
data() {
|
|
184
187
|
return {
|
|
185
|
-
textInput:
|
|
186
|
-
isFocused: false
|
|
188
|
+
textInput: '',
|
|
189
|
+
isFocused: false
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
computed: {
|
|
193
|
+
displayedPlaceholder() {
|
|
194
|
+
if (this.placeholder) return this.placeholder
|
|
195
|
+
return `${this.minNumber || 0} ${this.unitName ? this.unitName : ''}`
|
|
187
196
|
}
|
|
188
197
|
},
|
|
189
198
|
props: {
|
|
190
199
|
placeholder: {
|
|
191
200
|
required: false,
|
|
192
|
-
default:
|
|
201
|
+
default: ''
|
|
193
202
|
},
|
|
194
203
|
isError: {
|
|
195
204
|
required: false,
|
|
196
|
-
default: false
|
|
205
|
+
default: false
|
|
197
206
|
},
|
|
198
207
|
inputWidth: {
|
|
199
208
|
required: false,
|
|
200
|
-
default: null
|
|
209
|
+
default: null
|
|
201
210
|
},
|
|
202
211
|
minWidth: {
|
|
203
212
|
required: false,
|
|
204
|
-
default: null
|
|
213
|
+
default: null
|
|
205
214
|
},
|
|
206
215
|
value: {
|
|
207
216
|
required: true,
|
|
208
|
-
default: null
|
|
217
|
+
default: null
|
|
209
218
|
},
|
|
210
219
|
clearInput: {
|
|
211
220
|
required: false,
|
|
212
|
-
default: false
|
|
221
|
+
default: false
|
|
213
222
|
},
|
|
214
223
|
errorMessage: {
|
|
215
224
|
required: false,
|
|
216
|
-
default:
|
|
225
|
+
default: 'Please insert a correct number'
|
|
217
226
|
},
|
|
218
227
|
numberPrecision: {
|
|
219
228
|
required: false,
|
|
220
|
-
default: 0
|
|
229
|
+
default: 0
|
|
221
230
|
},
|
|
222
231
|
unitName: {
|
|
223
232
|
required: false,
|
|
224
|
-
default:
|
|
233
|
+
default: ''
|
|
225
234
|
},
|
|
226
235
|
showLinearUnitName: {
|
|
227
236
|
required: false,
|
|
228
|
-
default: false
|
|
237
|
+
default: false
|
|
229
238
|
},
|
|
230
239
|
disabled: {
|
|
231
240
|
required: false,
|
|
232
|
-
default: false
|
|
241
|
+
default: false
|
|
233
242
|
},
|
|
234
243
|
noBorder: {
|
|
235
244
|
required: false,
|
|
236
|
-
default: false
|
|
245
|
+
default: false
|
|
237
246
|
},
|
|
238
247
|
textAlign: {
|
|
239
248
|
required: false,
|
|
240
|
-
default:
|
|
249
|
+
default: 'left'
|
|
241
250
|
},
|
|
242
251
|
fontSize: {
|
|
243
252
|
required: false,
|
|
244
|
-
default:
|
|
253
|
+
default: '13px'
|
|
245
254
|
},
|
|
246
255
|
labelText: {
|
|
247
256
|
required: false,
|
|
248
|
-
default: null
|
|
257
|
+
default: null
|
|
249
258
|
},
|
|
250
259
|
labelInfoText: {
|
|
251
260
|
required: false,
|
|
252
|
-
default: null
|
|
261
|
+
default: null
|
|
253
262
|
},
|
|
254
263
|
labelInfoAlign: {
|
|
255
264
|
required: false,
|
|
256
|
-
default:
|
|
265
|
+
default: 'right'
|
|
257
266
|
},
|
|
258
267
|
minNumber: {
|
|
259
268
|
required: false,
|
|
260
|
-
default: null
|
|
269
|
+
default: null
|
|
261
270
|
},
|
|
262
271
|
fontColor: {
|
|
263
272
|
required: false,
|
|
264
|
-
default: null
|
|
273
|
+
default: null
|
|
265
274
|
},
|
|
266
275
|
numberToStringEnabled: {
|
|
267
276
|
required: false,
|
|
268
|
-
default: true
|
|
269
|
-
}
|
|
277
|
+
default: true
|
|
278
|
+
}
|
|
270
279
|
},
|
|
271
280
|
methods: {
|
|
272
281
|
onChangeHandler(event) {
|
|
273
282
|
if (isNaN(event)) {
|
|
274
283
|
event = this.minNumber || this.minNumber === 0 ? this.minNumber : event
|
|
275
284
|
}
|
|
276
|
-
this.$emit(
|
|
285
|
+
this.$emit('input-change', event)
|
|
277
286
|
},
|
|
278
287
|
onEvaluateCode(val) {
|
|
279
288
|
// function to perform math on the code
|
|
280
289
|
// filter the string in case of any malicious content
|
|
281
|
-
let filtered = val.replace(/[^-()\d/*+.,]/g,
|
|
290
|
+
let filtered = val.replace(/[^-()\d/*+.,]/g, '')
|
|
282
291
|
filtered = filtered.split(/([-+*/()])/)
|
|
283
292
|
let formatted = filtered.map((item) => {
|
|
284
293
|
if (
|
|
285
|
-
item ===
|
|
286
|
-
item ===
|
|
287
|
-
item ===
|
|
288
|
-
item ===
|
|
289
|
-
item ===
|
|
290
|
-
item ===
|
|
291
|
-
item ===
|
|
294
|
+
item === '+' ||
|
|
295
|
+
item === '-' ||
|
|
296
|
+
item === '*' ||
|
|
297
|
+
item === '/' ||
|
|
298
|
+
item === '(' ||
|
|
299
|
+
item === ')' ||
|
|
300
|
+
item === ''
|
|
292
301
|
) {
|
|
293
302
|
return item
|
|
294
303
|
} else {
|
|
295
304
|
let num = stringToNumber({
|
|
296
305
|
value: item,
|
|
297
|
-
numberPrecision: false
|
|
306
|
+
numberPrecision: false
|
|
298
307
|
})
|
|
299
308
|
return num
|
|
300
309
|
}
|
|
301
310
|
})
|
|
302
|
-
let evaluated = eval(formatted.join(
|
|
311
|
+
let evaluated = eval(formatted.join(''))
|
|
303
312
|
evaluated = stringToNumber({
|
|
304
313
|
value: evaluated,
|
|
305
|
-
numberPrecision: this.numberPrecision
|
|
314
|
+
numberPrecision: this.numberPrecision
|
|
306
315
|
})
|
|
307
316
|
return evaluated
|
|
308
317
|
},
|
|
@@ -315,7 +324,7 @@ export default {
|
|
|
315
324
|
this.textInput = numberToString({
|
|
316
325
|
value:
|
|
317
326
|
evaluatedInput && value.length ? evaluatedInput : this.minNumber,
|
|
318
|
-
numberPrecision: this.numberPrecision
|
|
327
|
+
numberPrecision: this.numberPrecision
|
|
319
328
|
})
|
|
320
329
|
}
|
|
321
330
|
let adjustedMinValue =
|
|
@@ -323,8 +332,8 @@ export default {
|
|
|
323
332
|
? value
|
|
324
333
|
: this.minNumber || this.minNumber === 0
|
|
325
334
|
? this.minNumber
|
|
326
|
-
:
|
|
327
|
-
this.$emit(
|
|
335
|
+
: ''
|
|
336
|
+
this.$emit('input-blur', adjustedMinValue)
|
|
328
337
|
},
|
|
329
338
|
focusInput() {
|
|
330
339
|
if (this.disabled) {
|
|
@@ -341,38 +350,38 @@ export default {
|
|
|
341
350
|
? value
|
|
342
351
|
: this.minNumber || this.minNumber === 0
|
|
343
352
|
? this.minNumber
|
|
344
|
-
:
|
|
353
|
+
: ''
|
|
345
354
|
if ((adjustedMinValue || adjustedMinValue === 0) && !this.isFocused) {
|
|
346
355
|
let input = this.numberToStringEnabled
|
|
347
356
|
? numberToString({
|
|
348
357
|
value: adjustedMinValue,
|
|
349
|
-
numberPrecision: this.numberPrecision
|
|
358
|
+
numberPrecision: this.numberPrecision
|
|
350
359
|
})
|
|
351
360
|
: adjustedMinValue
|
|
352
|
-
let unit = this.showLinearUnitName ?
|
|
353
|
-
return input +
|
|
361
|
+
let unit = this.showLinearUnitName ? '' : this.unitName
|
|
362
|
+
return input + ' ' + unit
|
|
354
363
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
|
355
|
-
return
|
|
364
|
+
return ''
|
|
356
365
|
} else {
|
|
357
366
|
return this.numberToStringEnabled
|
|
358
367
|
? numberToString({
|
|
359
368
|
value: adjustedMinValue,
|
|
360
|
-
numberPrecision: this.numberPrecision
|
|
369
|
+
numberPrecision: this.numberPrecision
|
|
361
370
|
})
|
|
362
371
|
: adjustedMinValue
|
|
363
372
|
}
|
|
364
|
-
}
|
|
373
|
+
}
|
|
365
374
|
},
|
|
366
375
|
created() {
|
|
367
376
|
if (this.value) {
|
|
368
377
|
this.textInput = numberToString({
|
|
369
378
|
value: this.value,
|
|
370
|
-
numberPrecision: this.numberPrecision
|
|
379
|
+
numberPrecision: this.numberPrecision
|
|
371
380
|
})
|
|
372
381
|
} else if (this.minNumber !== null) {
|
|
373
382
|
this.textInput = numberToString({
|
|
374
383
|
value: this.minNumber,
|
|
375
|
-
numberPrecision: this.numberPrecision
|
|
384
|
+
numberPrecision: this.numberPrecision
|
|
376
385
|
})
|
|
377
386
|
}
|
|
378
387
|
},
|
|
@@ -380,9 +389,9 @@ export default {
|
|
|
380
389
|
clearInput: function (value) {
|
|
381
390
|
if (value) {
|
|
382
391
|
// If the value is typed, then we should clear the textInput on Continue
|
|
383
|
-
this.textInput =
|
|
392
|
+
this.textInput = ''
|
|
384
393
|
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
387
396
|
}
|
|
388
|
-
</script>
|
|
397
|
+
</script>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:fullwidthSpinner="fullwidthSpinner"
|
|
8
8
|
>
|
|
9
9
|
<modal-container @click.stop>
|
|
10
|
-
<spinner v-if="isLoading" size="50px" :
|
|
10
|
+
<spinner v-if="isLoading" size="50px" :fullWidth="fullwidthSpinner" />
|
|
11
11
|
<content-container :visible="!isLoading">
|
|
12
12
|
<slot />
|
|
13
13
|
</content-container>
|