@eturnity/eturnity_reusable_components 1.2.21 → 1.2.22-3d-master.4
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/babel.config.js +1 -1
- package/package.json +2 -3
- package/src/App.vue +75 -53
- package/src/assets/icons/error_icon copy.png +0 -0
- package/src/assets/svgIcons/base_layer.svg +3 -0
- package/src/assets/svgIcons/{bookmaker.svg → duplicate-3.svg} +0 -0
- package/src/assets/svgIcons/map_icon.svg +1 -1
- package/src/assets/svgIcons/margin_tool.svg +6 -0
- package/src/assets/svgIcons/obstacle_tool.svg +7 -11
- package/src/assets/svgIcons/redo.svg +6 -0
- package/src/assets/svgIcons/roof_layer.svg +3 -0
- package/src/assets/svgIcons/undo.svg +6 -0
- package/src/assets/theme.js +2 -0
- package/src/components/errorMessage/index.vue +62 -0
- package/src/components/icon/index.vue +13 -21
- package/src/components/iconWrapper/index.vue +116 -0
- package/src/components/infoText/index.vue +68 -53
- package/src/components/inputs/inputNumber/index.vue +120 -25
- package/src/components/inputs/inputText/index.vue +12 -10
- package/src/components/inputs/radioButton/index.vue +39 -32
- package/src/components/inputs/searchInput/index.vue +1 -2
- package/src/components/inputs/textAreaInput/index.vue +7 -2
- package/src/components/inputs/toggle/index.vue +2 -2
- package/src/components/pageSubtitle/index.vue +4 -8
- package/src/components/pageTitle/index.vue +4 -12
- package/src/components/tables/mainTable/index.vue +3 -8
- package/src/components/threeDots/index.vue +27 -36
- package/src/helpers/numberConverter.js +5 -0
- package/src/main.js +0 -2
- package/src/assets/svgIcons/cross.svg +0 -4
- package/src/assets/svgIcons/transfer.svg +0 -4
- package/src/components/projectMarker/index.vue +0 -285
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component-wrapper :layout="layout">
|
|
3
3
|
<radio-wrapper v-for="(item, index) in options" :key="item.value">
|
|
4
|
-
<label-container :size="size" :isDisabled="item.disabled"
|
|
4
|
+
<label-container :size="size" :isDisabled="item.disabled">
|
|
5
5
|
<radio
|
|
6
6
|
type="radio"
|
|
7
7
|
:value="selectedOption"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
/>
|
|
13
13
|
<span class="checkmark"></span>
|
|
14
14
|
<label-text :isDisabled="item.disabled">{{ item.label }}</label-text>
|
|
15
|
-
<info-text v-if="item.infoText" :text="item.infoText" size="
|
|
15
|
+
<info-text v-if="item.infoText" :text="item.infoText" size="16px" />
|
|
16
16
|
</label-container>
|
|
17
17
|
<image-container v-if="item.img">
|
|
18
18
|
<radio-image :src="item.img" />
|
|
@@ -76,6 +76,14 @@ const Radio = styled.input`
|
|
|
76
76
|
cursor: pointer;
|
|
77
77
|
height: 0;
|
|
78
78
|
width: 0;
|
|
79
|
+
|
|
80
|
+
&:checked ~ .checkmark {
|
|
81
|
+
background-color: white;
|
|
82
|
+
|
|
83
|
+
&:after {
|
|
84
|
+
display: block;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
79
87
|
`
|
|
80
88
|
|
|
81
89
|
const RadioWrapper = styled.div`
|
|
@@ -83,22 +91,22 @@ const RadioWrapper = styled.div`
|
|
|
83
91
|
grid-gap: 10px;
|
|
84
92
|
`
|
|
85
93
|
|
|
86
|
-
const containerProps = { size: String, isDisabled: Boolean
|
|
94
|
+
const containerProps = { size: String, isDisabled: Boolean }
|
|
87
95
|
const LabelContainer = styled("label", containerProps)`
|
|
88
96
|
display: grid;
|
|
89
97
|
grid-template-columns: auto 1fr auto;
|
|
90
98
|
grid-gap: 15px;
|
|
91
99
|
align-items: center;
|
|
92
100
|
color: ${(props) =>
|
|
93
|
-
props.isDisabled ? props.theme.colors.
|
|
101
|
+
props.isDisabled ? props.theme.colors.disabled : props.theme.colors.black};
|
|
94
102
|
position: relative;
|
|
95
103
|
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
|
96
104
|
font-size: ${(props) =>
|
|
97
105
|
props.size === "large"
|
|
98
106
|
? "16px"
|
|
99
107
|
: props.size === "medium"
|
|
100
|
-
|
|
101
|
-
|
|
108
|
+
? "13px"
|
|
109
|
+
: "10px"};
|
|
102
110
|
user-select: none;
|
|
103
111
|
flex: auto;
|
|
104
112
|
align-self: baseline;
|
|
@@ -108,14 +116,14 @@ const LabelContainer = styled("label", containerProps)`
|
|
|
108
116
|
props.size === "large"
|
|
109
117
|
? "23px"
|
|
110
118
|
: props.size === "medium"
|
|
111
|
-
|
|
112
|
-
|
|
119
|
+
? "16px"
|
|
120
|
+
: "12px"};
|
|
113
121
|
width: ${(props) =>
|
|
114
122
|
props.size === "large"
|
|
115
123
|
? "23px"
|
|
116
124
|
: props.size === "medium"
|
|
117
|
-
|
|
118
|
-
|
|
125
|
+
? "16px"
|
|
126
|
+
: "12px"};
|
|
119
127
|
background-color: #fff;
|
|
120
128
|
border-radius: 100%;
|
|
121
129
|
border: 1px solid ${(props) => props.theme.colors.mediumGray};
|
|
@@ -125,29 +133,32 @@ const LabelContainer = styled("label", containerProps)`
|
|
|
125
133
|
|
|
126
134
|
&:after {
|
|
127
135
|
content: "";
|
|
128
|
-
display:
|
|
129
|
-
width: ${(props) =>
|
|
130
|
-
props.size === "large"
|
|
131
|
-
? "10px"
|
|
132
|
-
: props.size === "medium"
|
|
133
|
-
? "8px"
|
|
134
|
-
: "6px"};
|
|
135
|
-
height: ${(props) =>
|
|
136
|
-
props.size === "large"
|
|
137
|
-
? "10px"
|
|
138
|
-
: props.size === "medium"
|
|
139
|
-
? "8px"
|
|
140
|
-
: "6px"};
|
|
141
|
-
border-radius: 100%;
|
|
142
|
-
background: ${(props) => props.theme.colors.primary};
|
|
136
|
+
display: none;
|
|
143
137
|
}
|
|
144
138
|
}
|
|
139
|
+
|
|
140
|
+
.checkmark:after {
|
|
141
|
+
width: ${(props) =>
|
|
142
|
+
props.size === "large"
|
|
143
|
+
? "10px"
|
|
144
|
+
: props.size === "medium"
|
|
145
|
+
? "8px"
|
|
146
|
+
: "6px"};
|
|
147
|
+
height: ${(props) =>
|
|
148
|
+
props.size === "large"
|
|
149
|
+
? "10px"
|
|
150
|
+
: props.size === "medium"
|
|
151
|
+
? "8px"
|
|
152
|
+
: "6px"};
|
|
153
|
+
border-radius: 100%;
|
|
154
|
+
background: ${(props) => props.theme.colors.primary};
|
|
155
|
+
}
|
|
145
156
|
`
|
|
146
157
|
|
|
147
158
|
const textAttrs = { isDisabled: Boolean }
|
|
148
159
|
const LabelText = styled("div", textAttrs)`
|
|
149
160
|
color: ${(props) =>
|
|
150
|
-
props.isDisabled ? props.theme.colors.
|
|
161
|
+
props.isDisabled ? props.theme.colors.disabled : props.theme.colors.black};
|
|
151
162
|
`
|
|
152
163
|
|
|
153
164
|
const RadioImage = styled.img`
|
|
@@ -217,15 +228,11 @@ export default {
|
|
|
217
228
|
required: false,
|
|
218
229
|
default: "medium", // small, medium, large
|
|
219
230
|
},
|
|
220
|
-
name: {
|
|
221
|
-
required: false,
|
|
222
|
-
default: ''
|
|
223
|
-
}
|
|
224
231
|
},
|
|
225
232
|
data() {
|
|
226
233
|
return {
|
|
234
|
+
radioName: "",
|
|
227
235
|
selectedImage: null,
|
|
228
|
-
radioName: ''
|
|
229
236
|
}
|
|
230
237
|
},
|
|
231
238
|
methods: {
|
|
@@ -240,7 +247,7 @@ export default {
|
|
|
240
247
|
},
|
|
241
248
|
},
|
|
242
249
|
created() {
|
|
243
|
-
this.radioName =
|
|
250
|
+
this.radioName = Math.round(Math.random() * 10000)
|
|
244
251
|
},
|
|
245
252
|
}
|
|
246
253
|
</script>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-if="infoTextMessage"
|
|
11
11
|
:text="infoTextMessage"
|
|
12
12
|
borderColor="#ccc"
|
|
13
|
-
size="
|
|
13
|
+
size="16px"
|
|
14
14
|
:alignText="infoTextAlign"
|
|
15
15
|
/>
|
|
16
16
|
</label-wrapper>
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
:disabled="isDisabled"
|
|
24
24
|
:fontSize="fontSize"
|
|
25
25
|
@input="onChangeHandler"
|
|
26
|
+
:resize="resize"
|
|
26
27
|
/>
|
|
27
28
|
</input-wrapper>
|
|
28
29
|
<error-message v-if="isError && errorText">{{ errorText }}</error-message>
|
|
@@ -174,7 +175,11 @@ export default {
|
|
|
174
175
|
},
|
|
175
176
|
inputWidth: {
|
|
176
177
|
required: false,
|
|
177
|
-
default: null
|
|
178
|
+
default: null,
|
|
179
|
+
},
|
|
180
|
+
resize:{
|
|
181
|
+
required:false,
|
|
182
|
+
default: "none"
|
|
178
183
|
}
|
|
179
184
|
},
|
|
180
185
|
methods: {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-if="infoTextMessage"
|
|
11
11
|
:text="infoTextMessage"
|
|
12
12
|
borderColor="#ccc"
|
|
13
|
-
size="
|
|
13
|
+
size="14px"
|
|
14
14
|
:alignText="infoTextAlign"
|
|
15
15
|
/>
|
|
16
16
|
</label-container>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
v-if="infoTextMessage"
|
|
47
47
|
:text="infoTextMessage"
|
|
48
48
|
borderColor="#ccc"
|
|
49
|
-
size="
|
|
49
|
+
size="14px"
|
|
50
50
|
:alignText="infoTextAlign"
|
|
51
51
|
/>
|
|
52
52
|
</label-container>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<subtitle-text :color="color" :
|
|
2
|
+
<subtitle-text :color="color" :hasInfoText="!!infoText">
|
|
3
3
|
<span>
|
|
4
4
|
{{ text }}
|
|
5
5
|
</span>
|
|
6
6
|
<info-text
|
|
7
7
|
:text="infoText"
|
|
8
8
|
v-if="!!infoText"
|
|
9
|
-
size="
|
|
9
|
+
size="14px"
|
|
10
10
|
borderColor="#ccc"
|
|
11
11
|
:alignText="alignInfoText"
|
|
12
12
|
/>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import styled from "vue-styled-components"
|
|
25
25
|
import InfoText from "../infoText"
|
|
26
26
|
|
|
27
|
-
const textAttrs = { color: String, hasInfoText: Boolean
|
|
27
|
+
const textAttrs = { color: String, hasInfoText: Boolean }
|
|
28
28
|
const SubtitleText = styled("div", textAttrs)`
|
|
29
29
|
display: grid;
|
|
30
30
|
align-items: center;
|
|
@@ -33,7 +33,7 @@ const SubtitleText = styled("div", textAttrs)`
|
|
|
33
33
|
props.hasInfoText ? "auto auto 1fr" : "1fr"};
|
|
34
34
|
color: ${(props) => (props.color ? props.color : props.theme.colors.gray1)};
|
|
35
35
|
font-size: 13px;
|
|
36
|
-
margin-bottom:
|
|
36
|
+
margin-bottom: 30px;
|
|
37
37
|
line-height: 1.5;
|
|
38
38
|
position: relative;
|
|
39
39
|
`
|
|
@@ -59,10 +59,6 @@ export default {
|
|
|
59
59
|
required: false,
|
|
60
60
|
default: "left",
|
|
61
61
|
},
|
|
62
|
-
marginBottom: {
|
|
63
|
-
required: false,
|
|
64
|
-
default: "30px",
|
|
65
|
-
}
|
|
66
62
|
},
|
|
67
63
|
}
|
|
68
64
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<title-text :color="color"
|
|
2
|
+
<title-text :color="color">{{ text }}</title-text>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
// />
|
|
12
12
|
import styled from "vue-styled-components"
|
|
13
13
|
|
|
14
|
-
const textAttrs = { color: String
|
|
14
|
+
const textAttrs = { color: String }
|
|
15
15
|
const TitleText = styled("div", textAttrs)`
|
|
16
16
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
|
17
17
|
font-weight: bold;
|
|
18
|
-
font-size:
|
|
19
|
-
text-transform:
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
text-transform: uppercase;
|
|
20
20
|
margin-bottom: 20px;
|
|
21
21
|
`
|
|
22
22
|
|
|
@@ -32,14 +32,6 @@ export default {
|
|
|
32
32
|
color: {
|
|
33
33
|
required: false,
|
|
34
34
|
},
|
|
35
|
-
fontSize: {
|
|
36
|
-
required: false,
|
|
37
|
-
default: '16px'
|
|
38
|
-
},
|
|
39
|
-
uppercase: {
|
|
40
|
-
required: false,
|
|
41
|
-
default: true
|
|
42
|
-
}
|
|
43
35
|
},
|
|
44
36
|
}
|
|
45
37
|
</script>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<spinner-wrapper v-if="isLoading">
|
|
9
9
|
<spinner />
|
|
10
10
|
</spinner-wrapper>
|
|
11
|
-
<table-container v-else
|
|
11
|
+
<table-container v-else>
|
|
12
12
|
<slot />
|
|
13
13
|
</table-container>
|
|
14
14
|
</table-wrapper>
|
|
@@ -63,8 +63,7 @@ const SpinnerWrapper = styled.div`
|
|
|
63
63
|
justify-items: center;
|
|
64
64
|
`
|
|
65
65
|
|
|
66
|
-
const
|
|
67
|
-
const TableContainer = styled("table", containerAttrs)`
|
|
66
|
+
const TableContainer = styled.table`
|
|
68
67
|
width: 100%;
|
|
69
68
|
border-collapse: collapse;
|
|
70
69
|
border: none;
|
|
@@ -115,7 +114,7 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
td {
|
|
118
|
-
padding:
|
|
117
|
+
padding: 6px 6px 7px 4px;
|
|
119
118
|
border-bottom: 1px solid ${(props) => props.theme.colors.grey4};
|
|
120
119
|
|
|
121
120
|
&.empty {
|
|
@@ -353,10 +352,6 @@ export default {
|
|
|
353
352
|
required: false,
|
|
354
353
|
default: true,
|
|
355
354
|
},
|
|
356
|
-
cellPaddings: {
|
|
357
|
-
required: false,
|
|
358
|
-
default: '',
|
|
359
|
-
},
|
|
360
355
|
isLoading: {
|
|
361
356
|
required: false,
|
|
362
357
|
default: false,
|
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
@click.stop
|
|
11
11
|
:top="getItemLocation('top')"
|
|
12
12
|
:right="getItemLocation('right')"
|
|
13
|
-
:containerWidth="childOpen ?
|
|
14
|
-
ref="dropdownContainer"
|
|
13
|
+
:containerWidth="childOpen ? 420 : 220"
|
|
15
14
|
>
|
|
16
15
|
<loading-container v-if="isLoading">
|
|
17
16
|
<spinner />
|
|
@@ -27,13 +26,13 @@
|
|
|
27
26
|
@click.stop="
|
|
28
27
|
onSelect({
|
|
29
28
|
item: child,
|
|
30
|
-
hasChildren: hasChildren(child)
|
|
29
|
+
hasChildren: hasChildren(child),
|
|
31
30
|
})
|
|
32
31
|
"
|
|
33
32
|
@keyup.enter.stop="
|
|
34
33
|
onSelect({
|
|
35
34
|
item: child,
|
|
36
|
-
hasChildren: hasChildren(child)
|
|
35
|
+
hasChildren: hasChildren(child),
|
|
37
36
|
})
|
|
38
37
|
"
|
|
39
38
|
>
|
|
@@ -52,10 +51,7 @@
|
|
|
52
51
|
@mouseover="onItemHover({ index, item })"
|
|
53
52
|
:isDisabled="item.disabled"
|
|
54
53
|
>
|
|
55
|
-
<arrow-left
|
|
56
|
-
:hasChildren="hasChildren(item)"
|
|
57
|
-
v-if="hasChildren(item)"
|
|
58
|
-
/>
|
|
54
|
+
<arrow-left :hasChildren="hasChildren(item)" />
|
|
59
55
|
<span>
|
|
60
56
|
{{ item.name }}
|
|
61
57
|
</span>
|
|
@@ -121,8 +117,8 @@
|
|
|
121
117
|
// },
|
|
122
118
|
// ],
|
|
123
119
|
|
|
124
|
-
import styled from
|
|
125
|
-
import Spinner from
|
|
120
|
+
import styled from "vue-styled-components"
|
|
121
|
+
import Spinner from "../spinner"
|
|
126
122
|
|
|
127
123
|
const PageContainer = styled.div`
|
|
128
124
|
display: grid;
|
|
@@ -159,11 +155,11 @@ const DotItem = styled.div`
|
|
|
159
155
|
`
|
|
160
156
|
|
|
161
157
|
const dropdownAttrs = { top: Number, right: Number, containerWidth: Number }
|
|
162
|
-
const DropdownContainer = styled(
|
|
158
|
+
const DropdownContainer = styled("div", dropdownAttrs)`
|
|
163
159
|
z-index: 99;
|
|
164
160
|
height: 200px;
|
|
165
|
-
top: ${(props) => props.top +
|
|
166
|
-
left: ${(props) => props.right - props.containerWidth +
|
|
161
|
+
top: ${(props) => props.top + "px"};
|
|
162
|
+
left: ${(props) => props.right - props.containerWidth + "px"};
|
|
167
163
|
position: absolute;
|
|
168
164
|
display: grid;
|
|
169
165
|
grid-template-columns: auto auto;
|
|
@@ -184,21 +180,19 @@ const OptionsContainer = styled.div`
|
|
|
184
180
|
border: 1px solid ${(props) => props.theme.colors.grey3};
|
|
185
181
|
display: grid;
|
|
186
182
|
grid-template-columns: 1fr;
|
|
187
|
-
min-width:
|
|
188
|
-
max-width: 220px;
|
|
183
|
+
min-width: 200px;
|
|
189
184
|
width: max-content;
|
|
190
185
|
border-radius: 4px;
|
|
191
186
|
background-color: #fff;
|
|
192
187
|
max-height: 220px;
|
|
193
188
|
overflow: auto;
|
|
194
189
|
height: max-content;
|
|
195
|
-
white-space: normal;
|
|
196
190
|
`
|
|
197
191
|
|
|
198
192
|
const optionAttrs = { isDisabled: Boolean }
|
|
199
|
-
const OptionItem = styled(
|
|
193
|
+
const OptionItem = styled("div", optionAttrs)`
|
|
200
194
|
padding: 12px;
|
|
201
|
-
cursor: ${(props) => (props.isDisabled ?
|
|
195
|
+
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
|
202
196
|
font-size: 13px;
|
|
203
197
|
position: relative;
|
|
204
198
|
|
|
@@ -228,7 +222,7 @@ const OptionChild = styled.div`
|
|
|
228
222
|
`
|
|
229
223
|
|
|
230
224
|
const arrowAttrs = { hasChildren: Boolean }
|
|
231
|
-
const ArrowLeft = styled(
|
|
225
|
+
const ArrowLeft = styled("span", arrowAttrs)`
|
|
232
226
|
border: solid #9f9f9f;
|
|
233
227
|
border-width: 0 1.5px 1.5px 0;
|
|
234
228
|
display: inline-block;
|
|
@@ -236,18 +230,16 @@ const ArrowLeft = styled('span', arrowAttrs)`
|
|
|
236
230
|
margin-bottom: 1px;
|
|
237
231
|
transform: rotate(135deg);
|
|
238
232
|
margin-right: 3px;
|
|
239
|
-
visibility: ${(props) => (props.hasChildren ?
|
|
233
|
+
visibility: ${(props) => (props.hasChildren ? "visible" : "hidden")};
|
|
240
234
|
`
|
|
241
235
|
|
|
242
236
|
const childAttrs = { isOpen: Boolean }
|
|
243
|
-
const ChildrenContainer = styled(
|
|
237
|
+
const ChildrenContainer = styled("div", childAttrs)`
|
|
244
238
|
border: ${(props) =>
|
|
245
|
-
props.isOpen ?
|
|
239
|
+
props.isOpen ? "1px solid" + props.theme.colors.grey3 : "none"};
|
|
246
240
|
display: grid;
|
|
247
241
|
grid-template-columns: 1fr;
|
|
248
242
|
min-width: 200px;
|
|
249
|
-
max-width: 200px;
|
|
250
|
-
white-space: normal;
|
|
251
243
|
width: max-content;
|
|
252
244
|
border-radius: 4px;
|
|
253
245
|
background-color: #fff;
|
|
@@ -258,7 +250,7 @@ const ChildrenContainer = styled('div', childAttrs)`
|
|
|
258
250
|
`
|
|
259
251
|
|
|
260
252
|
export default {
|
|
261
|
-
name:
|
|
253
|
+
name: "three-dots",
|
|
262
254
|
components: {
|
|
263
255
|
PageContainer,
|
|
264
256
|
ButtonContainer,
|
|
@@ -270,23 +262,22 @@ export default {
|
|
|
270
262
|
ArrowLeft,
|
|
271
263
|
DropdownContainer,
|
|
272
264
|
Spinner,
|
|
273
|
-
LoadingContainer
|
|
265
|
+
LoadingContainer,
|
|
274
266
|
},
|
|
275
267
|
props: {
|
|
276
268
|
options: {
|
|
277
|
-
required: true
|
|
269
|
+
required: true,
|
|
278
270
|
},
|
|
279
271
|
isLoading: {
|
|
280
272
|
required: false,
|
|
281
|
-
default: false
|
|
282
|
-
}
|
|
273
|
+
default: false,
|
|
274
|
+
},
|
|
283
275
|
},
|
|
284
276
|
data() {
|
|
285
277
|
return {
|
|
286
278
|
isOpen: false,
|
|
287
279
|
hoverItem: null,
|
|
288
280
|
childOpen: null,
|
|
289
|
-
containerWidth: 16
|
|
290
281
|
}
|
|
291
282
|
},
|
|
292
283
|
methods: {
|
|
@@ -294,15 +285,15 @@ export default {
|
|
|
294
285
|
this.isOpen = !this.isOpen
|
|
295
286
|
|
|
296
287
|
if (this.isOpen) {
|
|
297
|
-
document.addEventListener(
|
|
288
|
+
document.addEventListener("click", this.clickOutside)
|
|
298
289
|
} else {
|
|
299
|
-
document.removeEventListener(
|
|
290
|
+
document.removeEventListener("click", this.clickOutside)
|
|
300
291
|
}
|
|
301
292
|
},
|
|
302
293
|
getItemLocation(value) {
|
|
303
294
|
let ref = this.$refs.dropdownItem
|
|
304
295
|
let location = ref.$el.getBoundingClientRect()[value]
|
|
305
|
-
if (value ===
|
|
296
|
+
if (value === "top") {
|
|
306
297
|
location = location + window.scrollY
|
|
307
298
|
}
|
|
308
299
|
return location
|
|
@@ -319,7 +310,7 @@ export default {
|
|
|
319
310
|
if (hasChildren || item.disabled) {
|
|
320
311
|
return
|
|
321
312
|
}
|
|
322
|
-
this.$emit(
|
|
313
|
+
this.$emit("on-select", item)
|
|
323
314
|
this.isOpen = false
|
|
324
315
|
},
|
|
325
316
|
clickOutside(event) {
|
|
@@ -327,7 +318,7 @@ export default {
|
|
|
327
318
|
return
|
|
328
319
|
}
|
|
329
320
|
this.toggleButton()
|
|
330
|
-
}
|
|
331
|
-
}
|
|
321
|
+
},
|
|
322
|
+
},
|
|
332
323
|
}
|
|
333
324
|
</script>
|
|
@@ -4,6 +4,9 @@ export const stringToNumber = ({
|
|
|
4
4
|
allowNegative
|
|
5
5
|
}) => {
|
|
6
6
|
// This is for saving. It converts our input string to a readable number
|
|
7
|
+
if (value === undefined) {
|
|
8
|
+
value = ''
|
|
9
|
+
}
|
|
7
10
|
let newVal = value.toString()
|
|
8
11
|
const selectedLang = localStorage.getItem('lang')
|
|
9
12
|
// The first replace will replace not allowed characters with a blank
|
|
@@ -91,6 +94,8 @@ export const numberToString = ({ value, numberPrecision }) => {
|
|
|
91
94
|
? 'fr-fr'
|
|
92
95
|
: localStorage.getItem('lang')
|
|
93
96
|
: 'en-US'
|
|
97
|
+
if(selectedLang=="null"){selectedLang='en-US'}
|
|
98
|
+
value=parseFloat(value)
|
|
94
99
|
return value.toLocaleString(selectedLang, {
|
|
95
100
|
minimumFractionDigits: numberPrecision,
|
|
96
101
|
maximumFractionDigits: numberPrecision
|
package/src/main.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import Vue from "vue"
|
|
2
2
|
import App from "./App.vue"
|
|
3
3
|
import VueCompositionAPI from "@vue/composition-api"
|
|
4
|
-
import vClickOutside from 'v-click-outside'
|
|
5
4
|
|
|
6
5
|
Vue.config.productionTip = false
|
|
7
6
|
|
|
8
7
|
Vue.use(VueCompositionAPI)
|
|
9
|
-
Vue.use(vClickOutside)
|
|
10
8
|
|
|
11
9
|
new Vue({
|
|
12
10
|
render: (h) => h(App),
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg fill="none" height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M9.87865 8.47868L8.47865 9.87868L0.121287 1.52132L1.52129 0.121318L5.69997 4.3L9.87865 8.47868Z" fill="black"/>
|
|
3
|
-
<path d="M1.5213 9.87868L0.121302 8.47868L8.47866 0.12132L9.87866 1.52132L1.5213 9.87868Z" fill="black"/>
|
|
4
|
-
</svg>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg fill="none" height="10" viewBox="0 0 10 10" width="10" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M3 9.98993L3.47934e-07 6.01003L10 6.01003V7.98993L3 7.98993L3 9.98993Z" fill="black"/>
|
|
3
|
-
<path d="M7 0.0100708L10 3.98997H0L1.19209e-07 2.01007L7 2.01007V0.0100708Z" fill="black"/>
|
|
4
|
-
</svg>
|