@eturnity/eturnity_reusable_components 1.2.30 → 1.2.31-3d-master.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 +1 -1
- package/src/App.vue +128 -53
- package/src/assets/svgIcons/areas_tool.svg +14 -0
- package/src/assets/svgIcons/base_layer.svg +3 -0
- package/src/assets/svgIcons/bug.svg +6 -0
- package/src/assets/svgIcons/direction_arrow.svg +4 -0
- package/src/assets/svgIcons/distance_tool.svg +8 -0
- package/src/assets/svgIcons/distort_tool.svg +10 -0
- package/src/assets/svgIcons/distort_tool2.svg +16 -0
- package/src/assets/svgIcons/draggable_corner.svg +5 -0
- package/src/assets/svgIcons/draw_tool.svg +3 -0
- package/src/assets/svgIcons/magic_tool.svg +6 -0
- package/src/assets/svgIcons/map_icon.svg +4 -2
- package/src/assets/svgIcons/map_settings.svg +3 -0
- package/src/assets/svgIcons/margin_tool.svg +4 -0
- package/src/assets/svgIcons/obstacle_tool.svg +7 -11
- package/src/assets/svgIcons/obstacle_tool_origin.svg +3 -0
- package/src/assets/svgIcons/opacity.svg +1 -0
- package/src/assets/svgIcons/outline_tool.svg +11 -0
- package/src/assets/svgIcons/redo.svg +6 -0
- package/src/assets/svgIcons/resizer.svg +5 -0
- package/src/assets/svgIcons/roof_layer.svg +3 -0
- package/src/assets/svgIcons/rotate_tool.svg +3 -0
- package/src/assets/svgIcons/ruler_tool.svg +3 -0
- package/src/assets/svgIcons/trim_tool.svg +4 -0
- package/src/assets/svgIcons/undo.svg +6 -0
- package/src/assets/svgIcons/vertical_tool.svg +3 -0
- package/src/assets/theme.js +3 -3
- package/src/components/errorMessage/index.vue +4 -4
- package/src/components/icon/index.vue +11 -10
- package/src/components/iconWrapper/index.vue +116 -0
- package/src/components/infoText/index.vue +25 -40
- package/src/components/inputs/inputNumber/index.vue +95 -36
- package/src/components/inputs/inputText/index.vue +49 -52
- package/src/components/inputs/searchInput/index.vue +15 -16
- package/src/components/inputs/textAreaInput/index.vue +14 -8
- package/src/components/modals/modal/index.vue +7 -2
- package/src/helpers/numberConverter.js +1 -0
|
@@ -14,38 +14,33 @@
|
|
|
14
14
|
:alignText="infoTextAlign"
|
|
15
15
|
/>
|
|
16
16
|
</label-wrapper>
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<icon
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</icon-container>
|
|
45
|
-
<error-message v-if="isError && errorMessage">{{
|
|
46
|
-
errorMessage
|
|
47
|
-
}}</error-message>
|
|
48
|
-
</input-error-wrapper>
|
|
17
|
+
<icon-container>
|
|
18
|
+
<input-container
|
|
19
|
+
:placeholder="placeholder"
|
|
20
|
+
:isError="isError"
|
|
21
|
+
:inputWidth="inputWidth"
|
|
22
|
+
:minWidth="minWidth"
|
|
23
|
+
:value="value"
|
|
24
|
+
@input="onChangeHandler"
|
|
25
|
+
@blur="onInputBlur"
|
|
26
|
+
:noBorder="noBorder"
|
|
27
|
+
:disabled="disabled"
|
|
28
|
+
:isDisabled="disabled"
|
|
29
|
+
:fontSize="fontSize"
|
|
30
|
+
:inputType="inputType"
|
|
31
|
+
:type="inputTypeData"
|
|
32
|
+
/>
|
|
33
|
+
<icon-wrapper
|
|
34
|
+
v-if="inputType === 'password' && !isError"
|
|
35
|
+
@click="toggleShowPassword()"
|
|
36
|
+
size="20px"
|
|
37
|
+
>
|
|
38
|
+
<icon name="current_variant" size="20px" />
|
|
39
|
+
</icon-wrapper>
|
|
40
|
+
<icon-wrapper v-if="isError" size="16px">
|
|
41
|
+
<icon name="warning" size="16px" cursor="default" />
|
|
42
|
+
</icon-wrapper>
|
|
43
|
+
</icon-container>
|
|
49
44
|
</input-wrapper>
|
|
50
45
|
</container>
|
|
51
46
|
</template>
|
|
@@ -54,18 +49,21 @@
|
|
|
54
49
|
import styled from 'vue-styled-components'
|
|
55
50
|
import InfoText from '../../infoText'
|
|
56
51
|
import Icon from '../../icon'
|
|
57
|
-
import ErrorMessage from '../../errorMessage'
|
|
58
52
|
|
|
59
53
|
const Container = styled.div`
|
|
60
54
|
width: 100%;
|
|
61
55
|
position: relative;
|
|
62
56
|
`
|
|
63
|
-
|
|
57
|
+
const InputErrorWrapper = styled.div`
|
|
58
|
+
display: inline-grid;
|
|
59
|
+
grid-template-row: auto auto;
|
|
60
|
+
grid-gap: 0px;
|
|
61
|
+
align-items: center;
|
|
62
|
+
`
|
|
64
63
|
const labelAttrs = { fontSize: String }
|
|
65
64
|
const InputLabel = styled('div', labelAttrs)`
|
|
66
|
-
|
|
65
|
+
font-weight: bold;
|
|
67
66
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
|
68
|
-
font-weight: 700;
|
|
69
67
|
`
|
|
70
68
|
|
|
71
69
|
const LabelWrapper = styled.div`
|
|
@@ -76,13 +74,6 @@ const LabelWrapper = styled.div`
|
|
|
76
74
|
justify-content: start;
|
|
77
75
|
`
|
|
78
76
|
|
|
79
|
-
const InputErrorWrapper = styled.div`
|
|
80
|
-
display: inline-grid;
|
|
81
|
-
grid-template-row: auto auto;
|
|
82
|
-
grid-gap: 0px;
|
|
83
|
-
align-items: center;
|
|
84
|
-
`
|
|
85
|
-
|
|
86
77
|
const inputProps = {
|
|
87
78
|
isError: Boolean,
|
|
88
79
|
inputWidth: String,
|
|
@@ -98,7 +89,9 @@ const InputContainer = styled('input', inputProps)`
|
|
|
98
89
|
? '1px solid ' + props.theme.colors.red
|
|
99
90
|
: props.noBorder
|
|
100
91
|
? 'none'
|
|
101
|
-
:
|
|
92
|
+
: props.hasLength
|
|
93
|
+
? '1px solid ' + props.theme.colors.black
|
|
94
|
+
: '1px solid ' + props.theme.colors.mediumGray};
|
|
102
95
|
padding: ${(props) =>
|
|
103
96
|
props.isError
|
|
104
97
|
? '11px 25px 11px 10px'
|
|
@@ -109,11 +102,7 @@ const InputContainer = styled('input', inputProps)`
|
|
|
109
102
|
position: relative;
|
|
110
103
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
|
111
104
|
color: ${(props) =>
|
|
112
|
-
props.isError
|
|
113
|
-
? props.theme.colors.grey6
|
|
114
|
-
: props.isDisabled
|
|
115
|
-
? props.theme.colors.grey2
|
|
116
|
-
: props.theme.colors.black};
|
|
105
|
+
props.isError ? props.theme.colors.red : props.theme.colors.black};
|
|
117
106
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
|
118
107
|
min-width: ${(props) => (props.minWidth ? props.minWidth : 'unset')};
|
|
119
108
|
box-sizing: border-box; // to allow width of 100% with padding
|
|
@@ -123,7 +112,8 @@ const InputContainer = styled('input', inputProps)`
|
|
|
123
112
|
props.isDisabled ? props.theme.colors.grey5 : '#fff'};
|
|
124
113
|
|
|
125
114
|
&::placeholder {
|
|
126
|
-
color: ${(props) =>
|
|
115
|
+
color: ${(props) =>
|
|
116
|
+
props.isError ? props.theme.colors.red : props.theme.colors.darkGray};
|
|
127
117
|
}
|
|
128
118
|
|
|
129
119
|
&:focus {
|
|
@@ -141,6 +131,13 @@ const InputWrapper = styled('div', inputAttrs)`
|
|
|
141
131
|
props.alignItems === 'vertical' || !props.hasLabel ? '1fr' : 'auto 1fr'};
|
|
142
132
|
`
|
|
143
133
|
|
|
134
|
+
const ErrorMessage = styled.div`
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
color: ${(props) => props.theme.colors.red};
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: calc(100% + 1px);
|
|
139
|
+
`
|
|
140
|
+
|
|
144
141
|
const IconAttrs = { size: String }
|
|
145
142
|
const IconWrapper = styled('div', IconAttrs)`
|
|
146
143
|
position: absolute;
|
|
@@ -181,11 +178,11 @@ export default {
|
|
|
181
178
|
ErrorMessage,
|
|
182
179
|
InfoText,
|
|
183
180
|
InputLabel,
|
|
181
|
+
InputErrorWrapper,
|
|
184
182
|
LabelWrapper,
|
|
185
183
|
Icon,
|
|
186
184
|
IconWrapper,
|
|
187
|
-
IconContainer
|
|
188
|
-
InputErrorWrapper
|
|
185
|
+
IconContainer
|
|
189
186
|
},
|
|
190
187
|
data() {
|
|
191
188
|
return {
|
|
@@ -25,9 +25,8 @@
|
|
|
25
25
|
// :value="companyName"
|
|
26
26
|
// :disabled="true"
|
|
27
27
|
// inputWidth="250px"
|
|
28
|
-
// @on-change="function($event)"
|
|
29
28
|
// />
|
|
30
|
-
import styled from
|
|
29
|
+
import styled from "vue-styled-components"
|
|
31
30
|
|
|
32
31
|
const Container = styled.div`
|
|
33
32
|
width: 100%;
|
|
@@ -35,15 +34,15 @@ const Container = styled.div`
|
|
|
35
34
|
`
|
|
36
35
|
|
|
37
36
|
const inputAttrs = { isDisabled: Boolean, inputWidth: String }
|
|
38
|
-
const InputContainer = styled(
|
|
37
|
+
const InputContainer = styled("input", inputAttrs)`
|
|
39
38
|
border: 1px solid ${(props) => props.theme.colors.mediumGray};
|
|
40
39
|
padding: 11px 30px 11px 10px;
|
|
41
40
|
border-radius: 4px;
|
|
42
|
-
font-size:
|
|
41
|
+
font-size: 16px;
|
|
43
42
|
color: ${(props) => props.theme.colors.black};
|
|
44
|
-
width: ${(props) => (props.inputWidth ? props.inputWidth :
|
|
43
|
+
width: ${(props) => (props.inputWidth ? props.inputWidth : "100%")};
|
|
45
44
|
box-sizing: border-box;
|
|
46
|
-
cursor: ${(props) => (props.isDisabled ?
|
|
45
|
+
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "auto")};
|
|
47
46
|
background: ${(props) => props.theme.colors.white} !important;
|
|
48
47
|
&::placeholder {
|
|
49
48
|
color: ${(props) => props.theme.colors.darkGray};
|
|
@@ -66,33 +65,33 @@ const InputWrapper = styled.span`
|
|
|
66
65
|
`
|
|
67
66
|
|
|
68
67
|
export default {
|
|
69
|
-
name:
|
|
68
|
+
name: "search-input",
|
|
70
69
|
components: {
|
|
71
70
|
InputContainer,
|
|
72
71
|
InputWrapper,
|
|
73
|
-
Container
|
|
72
|
+
Container,
|
|
74
73
|
},
|
|
75
74
|
props: {
|
|
76
75
|
value: {
|
|
77
|
-
required: true
|
|
76
|
+
required: true,
|
|
78
77
|
},
|
|
79
78
|
disabled: {
|
|
80
79
|
required: false,
|
|
81
|
-
default: false
|
|
80
|
+
default: false,
|
|
82
81
|
},
|
|
83
82
|
placeholder: {
|
|
84
83
|
required: false,
|
|
85
|
-
default:
|
|
84
|
+
default: "",
|
|
86
85
|
},
|
|
87
86
|
inputWidth: {
|
|
88
87
|
required: false,
|
|
89
|
-
default: null
|
|
90
|
-
}
|
|
88
|
+
default: null,
|
|
89
|
+
},
|
|
91
90
|
},
|
|
92
91
|
methods: {
|
|
93
92
|
onChangeHandler(event) {
|
|
94
|
-
this.$emit(
|
|
95
|
-
}
|
|
96
|
-
}
|
|
93
|
+
this.$emit("on-change", event)
|
|
94
|
+
},
|
|
95
|
+
},
|
|
97
96
|
}
|
|
98
97
|
</script>
|
|
@@ -45,11 +45,9 @@
|
|
|
45
45
|
// label="Question 5"
|
|
46
46
|
// alignItems="horizontal" // horizontal, vertical
|
|
47
47
|
// :isDisabled="true"
|
|
48
|
-
// . fontSize="13px"
|
|
49
48
|
// />
|
|
50
49
|
import styled from 'vue-styled-components'
|
|
51
50
|
import InfoText from '../../infoText'
|
|
52
|
-
import ErrorMessage from '../../errorMessage'
|
|
53
51
|
|
|
54
52
|
const containerProps = { inputWidth: String }
|
|
55
53
|
const Container = styled('div', containerProps)`
|
|
@@ -75,7 +73,7 @@ const InputContainer = styled('textarea', inputProps)`
|
|
|
75
73
|
border: ${(props) =>
|
|
76
74
|
props.isError
|
|
77
75
|
? '1px solid ' + props.theme.colors.red
|
|
78
|
-
: '1px solid ' + props.theme.colors.
|
|
76
|
+
: '1px solid ' + props.theme.colors.mediumGray};
|
|
79
77
|
padding: ${(props) =>
|
|
80
78
|
props.hasUnit ? '11px 40px 11px 10px' : '11px 5px 11px 10px'};
|
|
81
79
|
border-radius: 4px;
|
|
@@ -87,7 +85,8 @@ const InputContainer = styled('textarea', inputProps)`
|
|
|
87
85
|
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'inherit')};
|
|
88
86
|
|
|
89
87
|
&::placeholder {
|
|
90
|
-
color: ${(props) =>
|
|
88
|
+
color: ${(props) =>
|
|
89
|
+
props.isError ? props.theme.colors.red : props.theme.colors.darkGray};
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
&:focus {
|
|
@@ -109,6 +108,13 @@ const InputWrapper = styled('div', inputAttrs)`
|
|
|
109
108
|
: 'auto 1fr'};
|
|
110
109
|
`
|
|
111
110
|
|
|
111
|
+
const ErrorMessage = styled.div`
|
|
112
|
+
font-size: 14px;
|
|
113
|
+
color: ${(props) => props.theme.colors.red};
|
|
114
|
+
position: absolute;
|
|
115
|
+
top: calc(100% + 1px);
|
|
116
|
+
`
|
|
117
|
+
|
|
112
118
|
const labelAttrs = { fontSize: String }
|
|
113
119
|
const InputLabel = styled('div', labelAttrs)`
|
|
114
120
|
font-weight: bold;
|
|
@@ -169,11 +175,11 @@ export default {
|
|
|
169
175
|
},
|
|
170
176
|
inputWidth: {
|
|
171
177
|
required: false,
|
|
172
|
-
default: null
|
|
178
|
+
default: null,
|
|
173
179
|
},
|
|
174
|
-
resize:
|
|
175
|
-
required:
|
|
176
|
-
default:
|
|
180
|
+
resize:{
|
|
181
|
+
required:false,
|
|
182
|
+
default: "none"
|
|
177
183
|
}
|
|
178
184
|
},
|
|
179
185
|
methods: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<page-wrapper
|
|
3
|
+
:position="position"
|
|
3
4
|
:isOpen="isOpen"
|
|
4
5
|
:class="{ visible: isOpen, hidden: !isOpen }"
|
|
5
6
|
@click.native="onOutsideClose()"
|
|
@@ -36,9 +37,9 @@ const ContentContainer = styled('div', contentAttrs)`
|
|
|
36
37
|
visibility: ${(props) => (props.visible ? 'inherit' : 'hidden')};
|
|
37
38
|
`
|
|
38
39
|
|
|
39
|
-
const pageAttrs = { isOpen: Boolean, backdrop: String }
|
|
40
|
+
const pageAttrs = { isOpen: Boolean, backdrop: String,position:String }
|
|
40
41
|
const PageWrapper = styled('div', pageAttrs)`
|
|
41
|
-
position:
|
|
42
|
+
position: ${(props) => props.position}
|
|
42
43
|
display: grid;
|
|
43
44
|
top: 0;
|
|
44
45
|
left: 0;
|
|
@@ -132,6 +133,10 @@ export default {
|
|
|
132
133
|
backdrop: {
|
|
133
134
|
required: false,
|
|
134
135
|
default: 'white'
|
|
136
|
+
},
|
|
137
|
+
position: {
|
|
138
|
+
required: false,
|
|
139
|
+
default: 'fixed'
|
|
135
140
|
}
|
|
136
141
|
},
|
|
137
142
|
methods: {
|
|
@@ -94,6 +94,7 @@ export const numberToString = ({ value, numberPrecision }) => {
|
|
|
94
94
|
? 'fr-fr'
|
|
95
95
|
: localStorage.getItem('lang')
|
|
96
96
|
: 'en-US'
|
|
97
|
+
if(selectedLang=="null"){selectedLang='en-US'}
|
|
97
98
|
value=parseFloat(value)
|
|
98
99
|
return value.toLocaleString(selectedLang, {
|
|
99
100
|
minimumFractionDigits: numberPrecision,
|