@eturnity/eturnity_reusable_components 8.26.4-EPDM-15929.1 → 8.26.4-EPDM-15023.0
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/dist/main.es126.js +8 -3
- package/dist/main.es14.js +1 -1
- package/dist/main.es15.js +226 -60
- package/dist/main.es16.js +15 -150
- package/dist/main.es17.js +192 -209
- package/dist/main.es20.js +1 -1
- package/dist/main.es21.js +1 -1
- package/dist/main.es23.js +2 -2
- package/dist/main.es24.js +1 -1
- package/dist/main.es481.js +1 -1
- package/dist/main.es5.js +3 -3
- package/dist/main.es6.js +2 -2
- package/dist/main.es9.js +1 -1
- package/package.json +1 -1
- package/src/assets/svgIcons/download.svg +1 -0
- package/src/components/barchart/BottomFields.vue +32 -2
- package/src/components/barchart/index.vue +5 -0
- package/src/components/buttons/mainButton/index.vue +18 -1
- package/src/components/infoText/index.vue +4 -1
- package/src/components/inputs/inputNumber/index.vue +45 -4
- package/src/components/inputs/searchInput/index.vue +2 -11
@@ -7,11 +7,13 @@
|
|
7
7
|
:data-id="dataId"
|
8
8
|
:data-qa-id="dataQaId"
|
9
9
|
:height="height"
|
10
|
+
:is-active="isActive"
|
10
11
|
:is-disabled="isDisabled"
|
11
12
|
:min-width="minWidth"
|
12
13
|
:no-wrap="noWrap"
|
13
14
|
:type="type"
|
14
15
|
:variant="variant"
|
16
|
+
:width="width"
|
15
17
|
>
|
16
18
|
<LabelComponent :has-icon="Boolean(icon)">
|
17
19
|
<Icon
|
@@ -50,11 +52,13 @@
|
|
50
52
|
type: String,
|
51
53
|
isDisabled: Boolean,
|
52
54
|
minWidth: String,
|
55
|
+
width: String,
|
53
56
|
noWrap: Boolean,
|
54
57
|
height: String,
|
55
58
|
variant: String,
|
56
59
|
buttonSize: String,
|
57
60
|
appTheme: String,
|
61
|
+
isActive: Boolean,
|
58
62
|
}
|
59
63
|
const ButtonContainer = styled('div', ButtonAttrs)`
|
60
64
|
display: flex;
|
@@ -73,6 +77,9 @@
|
|
73
77
|
props.isDisabled
|
74
78
|
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
75
79
|
.disabled.backgroundColor
|
80
|
+
: props.isActive
|
81
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
82
|
+
.active.backgroundColor
|
76
83
|
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
77
84
|
.default.backgroundColor};
|
78
85
|
border: ${(props) => {
|
@@ -91,7 +98,7 @@
|
|
91
98
|
${(props) => (props.noWrap ? `white-space: nowrap;` : '')};
|
92
99
|
height: ${(props) => props.height};
|
93
100
|
line-height: 1;
|
94
|
-
|
101
|
+
width: ${(props) => props.width};
|
95
102
|
&:hover {
|
96
103
|
background-color: ${(props) =>
|
97
104
|
props.isDisabled
|
@@ -170,6 +177,11 @@
|
|
170
177
|
default: false,
|
171
178
|
type: Boolean,
|
172
179
|
},
|
180
|
+
isActive: {
|
181
|
+
required: false,
|
182
|
+
default: false,
|
183
|
+
type: Boolean,
|
184
|
+
},
|
173
185
|
icon: {
|
174
186
|
required: false,
|
175
187
|
default: null,
|
@@ -204,6 +216,11 @@
|
|
204
216
|
default: null,
|
205
217
|
type: String,
|
206
218
|
},
|
219
|
+
width: {
|
220
|
+
required: false,
|
221
|
+
default: 'auto',
|
222
|
+
type: String,
|
223
|
+
},
|
207
224
|
height: {
|
208
225
|
required: false,
|
209
226
|
default: 'auto',
|
@@ -49,7 +49,10 @@
|
|
49
49
|
<slot name="trigger"></slot>
|
50
50
|
</IconWrapper>
|
51
51
|
</div>
|
52
|
-
<Teleport
|
52
|
+
<Teleport
|
53
|
+
v-if="!hideInfoText && isVisible && (!!text || $slots.default)"
|
54
|
+
to="body"
|
55
|
+
>
|
53
56
|
<TextWrapper data-test-id="info_text_wrapper" :style="wrapperStyle">
|
54
57
|
<TextOverlay
|
55
58
|
ref="infoBox"
|
@@ -799,6 +799,10 @@
|
|
799
799
|
type: Boolean,
|
800
800
|
default: false,
|
801
801
|
},
|
802
|
+
hasSpaceBetweenUnit: {
|
803
|
+
type: Boolean,
|
804
|
+
default: true,
|
805
|
+
},
|
802
806
|
},
|
803
807
|
data() {
|
804
808
|
return {
|
@@ -812,8 +816,12 @@
|
|
812
816
|
displayedPlaceholder() {
|
813
817
|
if (this.placeholder) return this.placeholder
|
814
818
|
if (this.defaultNumber)
|
815
|
-
return `${this.defaultNumber}
|
816
|
-
|
819
|
+
return `${this.defaultNumber}${this.hasSpaceBetweenUnit ? ' ' : ''}${
|
820
|
+
this.unitName ? this.unitName : ''
|
821
|
+
}`
|
822
|
+
return `${this.minNumber || 0}${this.hasSpaceBetweenUnit ? ' ' : ''}${
|
823
|
+
this.unitName ? this.unitName : ''
|
824
|
+
}`
|
817
825
|
},
|
818
826
|
hasSlot() {
|
819
827
|
return !!this.$slots.default
|
@@ -1027,8 +1035,9 @@
|
|
1027
1035
|
return
|
1028
1036
|
}
|
1029
1037
|
this.textInput = this.formatWithCurrency(this.value)
|
1038
|
+
const textInputWithoutUnit = this.formatWithoutUnit(this.value)
|
1030
1039
|
this.enteredValue = stringToNumber({
|
1031
|
-
value:
|
1040
|
+
value: textInputWithoutUnit,
|
1032
1041
|
numberPrecision: this.numberPrecision,
|
1033
1042
|
minDecimals: this.minDecimals,
|
1034
1043
|
})
|
@@ -1049,6 +1058,38 @@
|
|
1049
1058
|
this.$refs.inputField1.$el.blur()
|
1050
1059
|
})
|
1051
1060
|
},
|
1061
|
+
formatWithoutUnit(value) {
|
1062
|
+
let adjustedMinValue =
|
1063
|
+
value || value === 0
|
1064
|
+
? value
|
1065
|
+
: this.defaultNumber
|
1066
|
+
? this.defaultNumber
|
1067
|
+
: this.minNumber || this.minNumber === 0
|
1068
|
+
? this.minNumber
|
1069
|
+
: ''
|
1070
|
+
if (adjustedMinValue || adjustedMinValue === 0) {
|
1071
|
+
let input = this.numberToStringEnabled
|
1072
|
+
? numberToString({
|
1073
|
+
value: adjustedMinValue,
|
1074
|
+
numberPrecision: this.numberPrecision,
|
1075
|
+
minDecimals: this.minDecimals,
|
1076
|
+
})
|
1077
|
+
: adjustedMinValue
|
1078
|
+
return input
|
1079
|
+
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
1080
|
+
return ''
|
1081
|
+
} else if (this.isFocused) {
|
1082
|
+
return value
|
1083
|
+
} else {
|
1084
|
+
return this.numberToStringEnabled
|
1085
|
+
? numberToString({
|
1086
|
+
value: adjustedMinValue,
|
1087
|
+
numberPrecision: this.numberPrecision,
|
1088
|
+
minDecimals: this.minDecimals,
|
1089
|
+
})
|
1090
|
+
: adjustedMinValue
|
1091
|
+
}
|
1092
|
+
},
|
1052
1093
|
formatWithCurrency(value) {
|
1053
1094
|
let adjustedMinValue =
|
1054
1095
|
value || value === 0
|
@@ -1069,7 +1110,7 @@
|
|
1069
1110
|
let unit = this.showLinearUnitName ? '' : this.unitName
|
1070
1111
|
//return input + ' ' + unit
|
1071
1112
|
if (unit) {
|
1072
|
-
return input
|
1113
|
+
return `${input}${this.hasSpaceBetweenUnit ? ' ' : ''}${unit}`
|
1073
1114
|
}
|
1074
1115
|
return input
|
1075
1116
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
@@ -3,7 +3,6 @@
|
|
3
3
|
<InputWrapper
|
4
4
|
:icon-color="iconColor"
|
5
5
|
:icon-position="iconPosition"
|
6
|
-
:input-height="inputHeight"
|
7
6
|
:is-full-height="isFullHeight"
|
8
7
|
>
|
9
8
|
<SearchIconSvg class="search-icn" />
|
@@ -13,7 +12,6 @@
|
|
13
12
|
:data-qa-id="dataQaId"
|
14
13
|
:disabled="disabled"
|
15
14
|
:has-focus="hasFocus"
|
16
|
-
:input-height="inputHeight"
|
17
15
|
:input-width="inputWidth"
|
18
16
|
:is-disabled="disabled"
|
19
17
|
:is-filter="isFilter"
|
@@ -49,7 +47,6 @@
|
|
49
47
|
inputWidth: String,
|
50
48
|
isFilter: Boolean,
|
51
49
|
isFullHeight: Boolean,
|
52
|
-
inputHeight: String,
|
53
50
|
}
|
54
51
|
const Container = styled('div', inputAttrs)`
|
55
52
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
@@ -64,7 +61,7 @@
|
|
64
61
|
font-size: 13px;
|
65
62
|
color: ${(props) => props.theme.colors.black};
|
66
63
|
width: ${(props) => (props.inputWidth ? props.inputWidth : '100%')};
|
67
|
-
height: ${(props) => (props.isFullHeight ? '100%' :
|
64
|
+
height: ${(props) => (props.isFullHeight ? '100%' : 'auto')};
|
68
65
|
box-sizing: border-box;
|
69
66
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'auto')};
|
70
67
|
background: ${(props) => props.theme.colors.white} !important;
|
@@ -81,12 +78,10 @@
|
|
81
78
|
iconColor: String,
|
82
79
|
iconPosition: String,
|
83
80
|
isFullHeight: Boolean,
|
84
|
-
inputHeight: String,
|
85
81
|
}
|
86
82
|
const InputWrapper = styled('div', wrapperAttrs)`
|
87
83
|
position: relative;
|
88
|
-
height: ${(
|
89
|
-
isFullHeight ? '100%' : inputHeight};
|
84
|
+
height: ${(props) => (props.isFullHeight ? '100%' : 'auto')};
|
90
85
|
|
91
86
|
svg {
|
92
87
|
position: absolute;
|
@@ -163,10 +158,6 @@
|
|
163
158
|
type: Boolean,
|
164
159
|
default: false,
|
165
160
|
},
|
166
|
-
inputHeight: {
|
167
|
-
type: String,
|
168
|
-
default: 'auto',
|
169
|
-
},
|
170
161
|
},
|
171
162
|
emits: ['on-change'],
|
172
163
|
watch: {
|