@eturnity/eturnity_reusable_components 1.2.16-QA03-23092022.0 → 1.2.16-QA03-23092022.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,38 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
|
|
3
3
|
<page-container>
|
|
4
|
-
<br />
|
|
5
4
|
<input-number
|
|
6
|
-
:value="
|
|
7
|
-
@input-change="
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</InputAnnexContainer>
|
|
14
|
-
</input-number>
|
|
15
|
-
<input-number
|
|
16
|
-
:value="inputValue"
|
|
17
|
-
@input-change="inputValue = $event"
|
|
18
|
-
inputWidth="250px"
|
|
19
|
-
slotSize="50%"
|
|
20
|
-
:isError="true"
|
|
21
|
-
><InputAnnexContainer>
|
|
22
|
-
<span>123m2</span>
|
|
23
|
-
<info-text size="15px" text="infoText ceci est le text"></info-text>
|
|
24
|
-
</InputAnnexContainer>
|
|
25
|
-
</input-number>
|
|
26
|
-
<br />
|
|
27
|
-
<br />
|
|
28
|
-
<input-number
|
|
29
|
-
placeholder="Enter distance"
|
|
30
|
-
:numberPrecision="2"
|
|
31
|
-
:value="inputValue"
|
|
32
|
-
@input-change="onInputChange($event)"
|
|
33
|
-
>unit</input-number
|
|
34
|
-
>
|
|
35
|
-
<br />
|
|
5
|
+
:value="num"
|
|
6
|
+
@input-change="num = $event"
|
|
7
|
+
unitName="t"
|
|
8
|
+
id="biebie"
|
|
9
|
+
test="koko"
|
|
10
|
+
@keydown="keydownHandler"
|
|
11
|
+
/>
|
|
36
12
|
</page-container>
|
|
37
13
|
</ThemeProvider>
|
|
38
14
|
</template>
|
|
@@ -42,13 +18,6 @@ import { ThemeProvider } from 'vue-styled-components'
|
|
|
42
18
|
import theme from './assets/theme'
|
|
43
19
|
import styled from 'vue-styled-components'
|
|
44
20
|
import InputNumber from '@/components/inputs/inputNumber'
|
|
45
|
-
import infoText from '@/components/infoText'
|
|
46
|
-
// import TableDropdown from "@/components/tableDropdown"
|
|
47
|
-
const InputAnnexContainer = styled.div`
|
|
48
|
-
display: grid;
|
|
49
|
-
grid-template-columns: auto auto;
|
|
50
|
-
grid-gap: 10px;
|
|
51
|
-
`
|
|
52
21
|
|
|
53
22
|
const PageContainer = styled.div`
|
|
54
23
|
padding: 40px;
|
|
@@ -59,13 +28,12 @@ export default {
|
|
|
59
28
|
components: {
|
|
60
29
|
ThemeProvider,
|
|
61
30
|
PageContainer,
|
|
62
|
-
InputNumber
|
|
63
|
-
infoText,
|
|
64
|
-
InputAnnexContainer
|
|
31
|
+
InputNumber
|
|
65
32
|
// TableDropdown,
|
|
66
33
|
},
|
|
67
34
|
data() {
|
|
68
35
|
return {
|
|
36
|
+
num: 42,
|
|
69
37
|
inputValue: null,
|
|
70
38
|
checkedOption: 'button_1',
|
|
71
39
|
question: {
|
|
@@ -124,6 +92,9 @@ export default {
|
|
|
124
92
|
}
|
|
125
93
|
},
|
|
126
94
|
methods: {
|
|
95
|
+
keydownHandler(e) {
|
|
96
|
+
console.log('test', e)
|
|
97
|
+
},
|
|
127
98
|
getTheme() {
|
|
128
99
|
return theme
|
|
129
100
|
},
|
|
@@ -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"
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
:fontColor="fontColor"
|
|
33
34
|
:hasSlot="hasSlot"
|
|
34
35
|
:slotSize="slotSize"
|
|
36
|
+
v-on="$listeners"
|
|
35
37
|
/>
|
|
36
38
|
<slot-container v-if="hasSlot" :slotSize="slotSize" :isError="isError">
|
|
37
39
|
<slot></slot>
|
|
@@ -220,6 +222,7 @@ export default {
|
|
|
220
222
|
SlotContainer,
|
|
221
223
|
InfoText
|
|
222
224
|
},
|
|
225
|
+
inheritAttrs: false,
|
|
223
226
|
data() {
|
|
224
227
|
return {
|
|
225
228
|
textInput: '',
|
|
@@ -318,7 +321,10 @@ export default {
|
|
|
318
321
|
},
|
|
319
322
|
computedSlotSize() {
|
|
320
323
|
return this.slotSize || this.$slots['default'][0].elm.clientWidth
|
|
321
|
-
}
|
|
324
|
+
},
|
|
325
|
+
displayedPlaceholder() {
|
|
326
|
+
if (this.placeholder) return this.placeholder
|
|
327
|
+
return `${this.minNumber || 0} ${this.unitName ? this.unitName : ''}`
|
|
322
328
|
},
|
|
323
329
|
methods: {
|
|
324
330
|
onChangeHandler(event) {
|
|
@@ -351,7 +357,7 @@ export default {
|
|
|
351
357
|
return num
|
|
352
358
|
}
|
|
353
359
|
})
|
|
354
|
-
let evaluated = eval(formatted.join(''))
|
|
360
|
+
let evaluated = eval(formatted.join('')) || ''
|
|
355
361
|
evaluated = stringToNumber({
|
|
356
362
|
value: evaluated,
|
|
357
363
|
numberPrecision: this.numberPrecision
|