@eturnity/eturnity_reusable_components 1.2.78 → 1.2.81-EPDM-7194
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
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.81-EPDM-7194",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
@@ -11,7 +11,6 @@
|
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
13
|
"@vueform/slider": "1.0.5",
|
14
|
-
"core-js": "3.6.5",
|
15
14
|
"vue": "2.6.11",
|
16
15
|
"vue-styled-components": "1.6.0",
|
17
16
|
"html-loader": "0.5.5",
|
@@ -60,4 +59,4 @@
|
|
60
59
|
"author": "Aaron Enser",
|
61
60
|
"license": "ISC",
|
62
61
|
"homepage": "https://bitbucket.org/eturnitydevs/eturnity_reusable_components#readme"
|
63
|
-
}
|
62
|
+
}
|
@@ -3,6 +3,10 @@
|
|
3
3
|
<label-slot-wrapper
|
4
4
|
v-if="hasLabelSlot"
|
5
5
|
:isInteractive="isInteractive"
|
6
|
+
:alignItems="alignItems"
|
7
|
+
:noBorder="noBorder"
|
8
|
+
:isError="isError"
|
9
|
+
:borderColor="borderColor"
|
6
10
|
@mousedown="initInteraction"
|
7
11
|
>
|
8
12
|
<slot name="label"></slot>
|
@@ -29,6 +33,7 @@
|
|
29
33
|
:isError="isError"
|
30
34
|
:inputHeight="inputHeight"
|
31
35
|
:minWidth="minWidth"
|
36
|
+
:isInteractive="isInteractive"
|
32
37
|
:value="formatWithCurrency(value)"
|
33
38
|
@blur="onInputBlur($event)"
|
34
39
|
@focus="focusInput()"
|
@@ -154,7 +159,7 @@ const InputContainer = styled('input', inputProps)`
|
|
154
159
|
: isError && !showLinearUnitName
|
155
160
|
? '24px'
|
156
161
|
: '5px'};
|
157
|
-
border-radius: 4px;
|
162
|
+
border-radius: ${props=>props.isInteractive && props.alignItems!="vertical" ? "0 4px 4px 0" : "4px"};
|
158
163
|
text-align: ${(props) => props.textAlign};
|
159
164
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'auto')};
|
160
165
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
@@ -246,6 +251,20 @@ const LabelSlotWrapper = styled('div', inputProps)`
|
|
246
251
|
gap: 10px;
|
247
252
|
align-items: center;
|
248
253
|
cursor: ${(props) => (props.isInteractive ? 'ew-resize' : 'auto')};
|
254
|
+
border: ${(props) =>
|
255
|
+
props.alignItems=="vertical"
|
256
|
+
? "none"
|
257
|
+
: props.isError
|
258
|
+
? '1px solid ' + props.theme.colors.red
|
259
|
+
: props.noBorder
|
260
|
+
? 'none'
|
261
|
+
: props.borderColor
|
262
|
+
? props.theme.colors[props.borderColor]
|
263
|
+
? '1px solid ' + props.theme.colors[props.borderColor]
|
264
|
+
: '1px solid ' + props.borderColor
|
265
|
+
: '1px solid ' + props.theme.colors.grey4};
|
266
|
+
border-radius: 4px 0 0 4px;
|
267
|
+
border-right:none;
|
249
268
|
`
|
250
269
|
|
251
270
|
const LabelText = styled('div', inputProps)`
|
@@ -98,14 +98,17 @@ export default {
|
|
98
98
|
methods: {
|
99
99
|
onChangeHandler(event) {
|
100
100
|
this.$emit('on-change', event)
|
101
|
+
},
|
102
|
+
focusInputElement(){
|
103
|
+
this.$nextTick(() => {
|
104
|
+
this.$refs.inputElement.$el.focus();
|
105
|
+
});
|
101
106
|
}
|
102
107
|
},
|
103
108
|
watch: {
|
104
109
|
hasFocus(newVal) {
|
105
110
|
if (newVal) {
|
106
|
-
this
|
107
|
-
this.$refs.inputElement.$el.focus();
|
108
|
-
});
|
111
|
+
this.focusInputElement()
|
109
112
|
}
|
110
113
|
}
|
111
114
|
}
|
@@ -134,7 +134,7 @@
|
|
134
134
|
:tabindex="0"
|
135
135
|
@keyup.enter.native="onItemClick(item)"
|
136
136
|
>
|
137
|
-
<template v-for="(option, idx) in optionsDisplay"
|
137
|
+
<template v-for="(option, idx) in optionsDisplay">
|
138
138
|
<span v-if="option !== 'template'" :key="idx">
|
139
139
|
{{ !!item[option] ? item[option] : '-' }}
|
140
140
|
</span>
|