@eturnity/eturnity_reusable_components 8.26.4-EPDM-15023.0 → 8.26.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/dist/main.es12.js +2 -2
- package/dist/main.es13.js +3 -3
- package/dist/main.es14.js +2 -2
- package/dist/main.es15.js +6 -20
- package/dist/main.es16.js +22 -62
- package/dist/main.es17.js +1031 -174
- package/dist/main.es18.js +224 -21
- package/dist/main.es19.js +89 -1046
- package/dist/main.es20.js +2 -227
- package/dist/main.es21.js +510 -68
- package/dist/main.es22.js +199 -2
- package/dist/main.es23.js +59 -536
- package/dist/main.es24.js +2 -2
- package/dist/main.es5.js +3 -3
- package/dist/main.es6.js +4 -4
- package/package.json +1 -1
- package/src/components/barchart/BottomFields.vue +2 -32
- package/src/components/barchart/index.vue +0 -5
- package/src/components/buttons/mainButton/index.vue +1 -18
- package/src/components/infoText/index.vue +1 -4
- package/src/components/inputs/inputNumber/index.vue +4 -45
@@ -22,7 +22,7 @@
|
|
22
22
|
<!-- For stacked bar chart -->
|
23
23
|
<template v-if="seriesData.length">
|
24
24
|
<InputRow
|
25
|
-
v-for="
|
25
|
+
v-for="series in seriesData"
|
26
26
|
:key="series.name"
|
27
27
|
:data-series-name="series.name"
|
28
28
|
>
|
@@ -36,10 +36,8 @@
|
|
36
36
|
:allow-negative="false"
|
37
37
|
:default-number="0"
|
38
38
|
:disabled="isInputsDisabled"
|
39
|
-
:error-message="getInputErrorMessage(series.data, item.label)"
|
40
39
|
input-height="36px"
|
41
40
|
:is-disabled-styled-only="true"
|
42
|
-
:is-error="getIsError(series.data, item.label)"
|
43
41
|
:is-info-border="
|
44
42
|
fieldMode === 'percentage'
|
45
43
|
? calculatePercentageTotal(item.label) !== 100
|
@@ -119,10 +117,8 @@
|
|
119
117
|
<InputNumber
|
120
118
|
:allow-negative="false"
|
121
119
|
:disabled="isInputsDisabled"
|
122
|
-
:error-message="item.errorMessage"
|
123
120
|
input-height="36px"
|
124
121
|
:is-disabled-styled-only="true"
|
125
|
-
:is-error="item.isError"
|
126
122
|
:min-decimals="0"
|
127
123
|
:number-precision="0"
|
128
124
|
text-align="center"
|
@@ -146,11 +142,6 @@
|
|
146
142
|
</InfoCardBody>
|
147
143
|
</InfoCard>
|
148
144
|
</InfoCardContainer>
|
149
|
-
<InfoCardContainer v-if="hasInputErrors" :y-axis-width="yAxisWidth">
|
150
|
-
<InfoCard align-items="center" type="error_minor">
|
151
|
-
<InfoCardBody> {{ inputErrorMessage }} </InfoCardBody>
|
152
|
-
</InfoCard>
|
153
|
-
</InfoCardContainer>
|
154
145
|
</template>
|
155
146
|
|
156
147
|
<script setup>
|
@@ -213,10 +204,6 @@
|
|
213
204
|
type: String,
|
214
205
|
default: '',
|
215
206
|
},
|
216
|
-
inputErrorMessage: {
|
217
|
-
type: String,
|
218
|
-
default: '',
|
219
|
-
},
|
220
207
|
})
|
221
208
|
|
222
209
|
const seriesData = ref([])
|
@@ -242,8 +229,6 @@
|
|
242
229
|
label: d.label,
|
243
230
|
value: d.value,
|
244
231
|
percentage: d.percentage,
|
245
|
-
isError: d.isError,
|
246
|
-
errorMessage: d.errorMessage,
|
247
232
|
originalValue: currentSeriesData.length
|
248
233
|
? currentSeriesData[itemIndex].data[dIndex].originalValue
|
249
234
|
: d.value,
|
@@ -290,7 +275,7 @@
|
|
290
275
|
}
|
291
276
|
}
|
292
277
|
|
293
|
-
const getDisplayValue = (data, label) => {
|
278
|
+
const getDisplayValue = (data, label, shouldRound = true) => {
|
294
279
|
if (props.fieldMode === 'absolute') {
|
295
280
|
return data.find((d) => d.label === label)?.value
|
296
281
|
}
|
@@ -298,13 +283,6 @@
|
|
298
283
|
return data.find((d) => d.label === label)?.percentage
|
299
284
|
}
|
300
285
|
|
301
|
-
const getIsError = (data, label) => {
|
302
|
-
return data.find((d) => d.label === label)?.isError
|
303
|
-
}
|
304
|
-
const getInputErrorMessage = (data, label) => {
|
305
|
-
return data.find((d) => d.label === label)?.errorMessage
|
306
|
-
}
|
307
|
-
|
308
286
|
const calculatePercentageTotal = (label) => {
|
309
287
|
const percentageTotal = seriesData.value.reduce((sum, series) => {
|
310
288
|
const percentage =
|
@@ -358,14 +336,6 @@
|
|
358
336
|
return calculatePercentageTotal(d.label) !== 100
|
359
337
|
})
|
360
338
|
})
|
361
|
-
const hasInputErrors = computed(() => {
|
362
|
-
if (seriesData.value.length) {
|
363
|
-
return seriesData.value.some((serie) =>
|
364
|
-
serie.data.some((item) => item.isError)
|
365
|
-
)
|
366
|
-
}
|
367
|
-
return props.data.some((item) => item.isError)
|
368
|
-
})
|
369
339
|
|
370
340
|
const handleFieldsScroll = (event) => {
|
371
341
|
emit('sync-scroll', event.target.scrollLeft)
|
@@ -166,7 +166,6 @@
|
|
166
166
|
:is-inputs-disabled="isLoading"
|
167
167
|
:is-scrollable="isScrollable"
|
168
168
|
:percentage-error-message="percentageErrorMessage"
|
169
|
-
:input-error-message="inputErrorMessage"
|
170
169
|
:series="series"
|
171
170
|
:y-axis-width="yAxisWidth"
|
172
171
|
@input-blur="handleInputBlur"
|
@@ -308,10 +307,6 @@
|
|
308
307
|
type: String,
|
309
308
|
default: '',
|
310
309
|
},
|
311
|
-
inputErrorMessage: {
|
312
|
-
type: String,
|
313
|
-
default: '',
|
314
|
-
},
|
315
310
|
})
|
316
311
|
|
317
312
|
const generateChartId = () =>
|
@@ -7,13 +7,11 @@
|
|
7
7
|
:data-id="dataId"
|
8
8
|
:data-qa-id="dataQaId"
|
9
9
|
:height="height"
|
10
|
-
:is-active="isActive"
|
11
10
|
:is-disabled="isDisabled"
|
12
11
|
:min-width="minWidth"
|
13
12
|
:no-wrap="noWrap"
|
14
13
|
:type="type"
|
15
14
|
:variant="variant"
|
16
|
-
:width="width"
|
17
15
|
>
|
18
16
|
<LabelComponent :has-icon="Boolean(icon)">
|
19
17
|
<Icon
|
@@ -52,13 +50,11 @@
|
|
52
50
|
type: String,
|
53
51
|
isDisabled: Boolean,
|
54
52
|
minWidth: String,
|
55
|
-
width: String,
|
56
53
|
noWrap: Boolean,
|
57
54
|
height: String,
|
58
55
|
variant: String,
|
59
56
|
buttonSize: String,
|
60
57
|
appTheme: String,
|
61
|
-
isActive: Boolean,
|
62
58
|
}
|
63
59
|
const ButtonContainer = styled('div', ButtonAttrs)`
|
64
60
|
display: flex;
|
@@ -77,9 +73,6 @@
|
|
77
73
|
props.isDisabled
|
78
74
|
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
79
75
|
.disabled.backgroundColor
|
80
|
-
: props.isActive
|
81
|
-
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
82
|
-
.active.backgroundColor
|
83
76
|
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
84
77
|
.default.backgroundColor};
|
85
78
|
border: ${(props) => {
|
@@ -98,7 +91,7 @@
|
|
98
91
|
${(props) => (props.noWrap ? `white-space: nowrap;` : '')};
|
99
92
|
height: ${(props) => props.height};
|
100
93
|
line-height: 1;
|
101
|
-
|
94
|
+
|
102
95
|
&:hover {
|
103
96
|
background-color: ${(props) =>
|
104
97
|
props.isDisabled
|
@@ -177,11 +170,6 @@
|
|
177
170
|
default: false,
|
178
171
|
type: Boolean,
|
179
172
|
},
|
180
|
-
isActive: {
|
181
|
-
required: false,
|
182
|
-
default: false,
|
183
|
-
type: Boolean,
|
184
|
-
},
|
185
173
|
icon: {
|
186
174
|
required: false,
|
187
175
|
default: null,
|
@@ -216,11 +204,6 @@
|
|
216
204
|
default: null,
|
217
205
|
type: String,
|
218
206
|
},
|
219
|
-
width: {
|
220
|
-
required: false,
|
221
|
-
default: 'auto',
|
222
|
-
type: String,
|
223
|
-
},
|
224
207
|
height: {
|
225
208
|
required: false,
|
226
209
|
default: 'auto',
|
@@ -49,10 +49,7 @@
|
|
49
49
|
<slot name="trigger"></slot>
|
50
50
|
</IconWrapper>
|
51
51
|
</div>
|
52
|
-
<Teleport
|
53
|
-
v-if="!hideInfoText && isVisible && (!!text || $slots.default)"
|
54
|
-
to="body"
|
55
|
-
>
|
52
|
+
<Teleport v-if="isVisible && (!!text || $slots.default)" to="body">
|
56
53
|
<TextWrapper data-test-id="info_text_wrapper" :style="wrapperStyle">
|
57
54
|
<TextOverlay
|
58
55
|
ref="infoBox"
|
@@ -799,10 +799,6 @@
|
|
799
799
|
type: Boolean,
|
800
800
|
default: false,
|
801
801
|
},
|
802
|
-
hasSpaceBetweenUnit: {
|
803
|
-
type: Boolean,
|
804
|
-
default: true,
|
805
|
-
},
|
806
802
|
},
|
807
803
|
data() {
|
808
804
|
return {
|
@@ -816,12 +812,8 @@
|
|
816
812
|
displayedPlaceholder() {
|
817
813
|
if (this.placeholder) return this.placeholder
|
818
814
|
if (this.defaultNumber)
|
819
|
-
return `${this.defaultNumber}${this.
|
820
|
-
|
821
|
-
}`
|
822
|
-
return `${this.minNumber || 0}${this.hasSpaceBetweenUnit ? ' ' : ''}${
|
823
|
-
this.unitName ? this.unitName : ''
|
824
|
-
}`
|
815
|
+
return `${this.defaultNumber} ${this.unitName ? this.unitName : ''}`
|
816
|
+
return `${this.minNumber || 0} ${this.unitName ? this.unitName : ''}`
|
825
817
|
},
|
826
818
|
hasSlot() {
|
827
819
|
return !!this.$slots.default
|
@@ -1035,9 +1027,8 @@
|
|
1035
1027
|
return
|
1036
1028
|
}
|
1037
1029
|
this.textInput = this.formatWithCurrency(this.value)
|
1038
|
-
const textInputWithoutUnit = this.formatWithoutUnit(this.value)
|
1039
1030
|
this.enteredValue = stringToNumber({
|
1040
|
-
value:
|
1031
|
+
value: this.textInput,
|
1041
1032
|
numberPrecision: this.numberPrecision,
|
1042
1033
|
minDecimals: this.minDecimals,
|
1043
1034
|
})
|
@@ -1058,38 +1049,6 @@
|
|
1058
1049
|
this.$refs.inputField1.$el.blur()
|
1059
1050
|
})
|
1060
1051
|
},
|
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
|
-
},
|
1093
1052
|
formatWithCurrency(value) {
|
1094
1053
|
let adjustedMinValue =
|
1095
1054
|
value || value === 0
|
@@ -1110,7 +1069,7 @@
|
|
1110
1069
|
let unit = this.showLinearUnitName ? '' : this.unitName
|
1111
1070
|
//return input + ' ' + unit
|
1112
1071
|
if (unit) {
|
1113
|
-
return
|
1072
|
+
return input + ' ' + unit
|
1114
1073
|
}
|
1115
1074
|
return input
|
1116
1075
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|