@eturnity/eturnity_reusable_components 8.26.11-EPDM-15023.0 → 8.26.11-EPDM-11600.15
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.es15.js +5 -19
- package/dist/main.es199.js +7 -13
- package/dist/main.es21.js +1 -1
- package/dist/main.es555.js +1 -1
- package/dist/main.es8.js +1 -1
- package/package.json +1 -1
- package/src/assets/svgIcons/erase.svg +2 -3
- package/src/assets/theme.js +1 -1
- package/src/components/barchart/BottomFields.vue +2 -32
- package/src/components/barchart/composables/useAxisCalculations.js +4 -1
- package/src/components/barchart/index.vue +17 -7
- package/src/components/barchart/styles/chart.js +31 -20
- package/src/components/buttons/mainButton/index.vue +1 -18
- package/src/components/infoText/index.vue +1 -4
- package/src/components/inputs/inputNumber/InputNumber.stories.js +5 -5
- package/src/components/inputs/inputNumber/index.vue +7 -49
- package/src/components/pageSubtitle/index.vue +7 -1
package/dist/main.es15.js
CHANGED
@@ -10,13 +10,11 @@ const ButtonAttrs = {
|
|
10
10
|
type: String,
|
11
11
|
isDisabled: Boolean,
|
12
12
|
minWidth: String,
|
13
|
-
width: String,
|
14
13
|
noWrap: Boolean,
|
15
14
|
height: String,
|
16
15
|
variant: String,
|
17
16
|
buttonSize: String,
|
18
|
-
appTheme: String
|
19
|
-
isActive: Boolean
|
17
|
+
appTheme: String
|
20
18
|
};
|
21
19
|
const ButtonContainer = styled("div", ButtonAttrs)`
|
22
20
|
display: flex;
|
@@ -30,7 +28,7 @@ const ButtonContainer = styled("div", ButtonAttrs)`
|
|
30
28
|
return (_d = (_c = (_b = (_a = props.theme) == null ? void 0 : _a.mainButton) == null ? void 0 : _b.size) == null ? void 0 : _c[props.buttonSize]) == null ? void 0 : _d.fontSize;
|
31
29
|
}};
|
32
30
|
color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.textColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.textColor};
|
33
|
-
background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.
|
31
|
+
background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.backgroundColor};
|
34
32
|
border: ${(props) => {
|
35
33
|
const borderValue = props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.borderColor : props.theme.mainButton[props.appTheme][props.type][props.variant].default.borderColor;
|
36
34
|
return borderValue ? "1px solid " + borderValue : "none";
|
@@ -43,7 +41,7 @@ const ButtonContainer = styled("div", ButtonAttrs)`
|
|
43
41
|
${(props) => props.noWrap ? `white-space: nowrap;` : ""};
|
44
42
|
height: ${(props) => props.height};
|
45
43
|
line-height: 1;
|
46
|
-
|
44
|
+
|
47
45
|
&:hover {
|
48
46
|
background-color: ${(props) => props.isDisabled ? props.theme.mainButton[props.appTheme][props.type][props.variant].disabled.backgroundColor : props.theme.mainButton[props.appTheme][props.type][props.variant].hover.backgroundColor};
|
49
47
|
}
|
@@ -107,11 +105,6 @@ const _sfc_main = {
|
|
107
105
|
default: false,
|
108
106
|
type: Boolean
|
109
107
|
},
|
110
|
-
isActive: {
|
111
|
-
required: false,
|
112
|
-
default: false,
|
113
|
-
type: Boolean
|
114
|
-
},
|
115
108
|
icon: {
|
116
109
|
required: false,
|
117
110
|
default: null,
|
@@ -146,11 +139,6 @@ const _sfc_main = {
|
|
146
139
|
default: null,
|
147
140
|
type: String
|
148
141
|
},
|
149
|
-
width: {
|
150
|
-
required: false,
|
151
|
-
default: "auto",
|
152
|
-
type: String
|
153
|
-
},
|
154
142
|
height: {
|
155
143
|
required: false,
|
156
144
|
default: "auto",
|
@@ -201,13 +189,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
201
189
|
"data-id": $props.dataId,
|
202
190
|
"data-qa-id": $props.dataQaId,
|
203
191
|
height: $props.height,
|
204
|
-
"is-active": $props.isActive,
|
205
192
|
"is-disabled": $props.isDisabled,
|
206
193
|
"min-width": $props.minWidth,
|
207
194
|
"no-wrap": $props.noWrap,
|
208
195
|
type: $props.type,
|
209
|
-
variant: $props.variant
|
210
|
-
width: $props.width
|
196
|
+
variant: $props.variant
|
211
197
|
}, {
|
212
198
|
default: withCtx(() => [createVNode(_component_LabelComponent, {
|
213
199
|
"has-icon": Boolean($props.icon)
|
@@ -222,7 +208,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
222
208
|
_: 1
|
223
209
|
}, 8, ["has-icon"])]),
|
224
210
|
_: 1
|
225
|
-
}, 8, ["id", "app-theme", "button-size", "data-id", "data-qa-id", "height", "is-
|
211
|
+
}, 8, ["id", "app-theme", "button-size", "data-id", "data-qa-id", "height", "is-disabled", "min-width", "no-wrap", "type", "variant"])]),
|
226
212
|
_: 1
|
227
213
|
});
|
228
214
|
}
|
package/dist/main.es199.js
CHANGED
@@ -2,25 +2,19 @@ import "./main.es3.js";
|
|
2
2
|
import { openBlock, createElementBlock, createElementVNode as createBaseVNode } from "./main.es6.js";
|
3
3
|
const _hoisted_1 = {
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
5
|
-
width: "
|
6
|
-
height: "
|
5
|
+
width: "22",
|
6
|
+
height: "21",
|
7
7
|
fill: "none"
|
8
8
|
};
|
9
|
-
const _hoisted_2 = /* @__PURE__ */ createBaseVNode("
|
10
|
-
cx: "20",
|
11
|
-
cy: "20",
|
12
|
-
r: "7"
|
13
|
-
}, null, -1);
|
14
|
-
const _hoisted_3 = /* @__PURE__ */ createBaseVNode("path", {
|
9
|
+
const _hoisted_2 = /* @__PURE__ */ createBaseVNode("path", {
|
15
10
|
fill: "#FF5656",
|
16
|
-
d: "
|
11
|
+
d: "M18.439 3.061C14.357-1.02 7.643-1.02 3.56 3.061-.52 7.143-.52 13.857 3.561 17.94c4.082 4.081 10.796 4.081 14.878 0 4.081-4.082 4.081-10.665 0-14.878m-1.975 11.191-1.843 1.844-3.687-3.687-3.686 3.687-1.844-1.844 3.687-3.686-3.687-3.687 1.844-1.843 3.686 3.687 3.687-3.687 1.843 1.843-3.687 3.687z"
|
17
12
|
}, null, -1);
|
18
|
-
const
|
19
|
-
_hoisted_2
|
20
|
-
_hoisted_3
|
13
|
+
const _hoisted_3 = [
|
14
|
+
_hoisted_2
|
21
15
|
];
|
22
16
|
function render(_ctx, _cache) {
|
23
|
-
return openBlock(), createElementBlock("svg", _hoisted_1,
|
17
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3);
|
24
18
|
}
|
25
19
|
const erase = { render };
|
26
20
|
export {
|
package/dist/main.es21.js
CHANGED
@@ -503,7 +503,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
503
503
|
_: 1
|
504
504
|
}, 8, ["color", "size"])) : createCommentVNode("", true)], 64)) : createCommentVNode("", true), createTextVNode(), renderSlot(_ctx.$slots, "trigger")]),
|
505
505
|
_: 3
|
506
|
-
}, 8, ["background-color", "border-radius", "hovered-icon", "is-active", "is-disabled", "padding"])], 512), createTextVNode(),
|
506
|
+
}, 8, ["background-color", "border-radius", "hovered-icon", "is-active", "is-disabled", "padding"])], 512), createTextVNode(), $setup.isVisible && (!!$props.text || _ctx.$slots.default) ? (openBlock(), createBlock(Teleport, {
|
507
507
|
key: 0,
|
508
508
|
to: "body"
|
509
509
|
}, [createVNode(_component_TextWrapper, {
|
package/dist/main.es555.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const __vite_glob_0_174 = "data:image/svg+xml;base64,
|
1
|
+
const __vite_glob_0_174 = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMiAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xOC40Mzg5IDMuMDYxMTNDMTQuMzU3NCAtMS4wMjAzOCA3LjY0MjYzIC0xLjAyMDM4IDMuNTYxMTMgMy4wNjExM0MtMC41MjAzNzYgNy4xNDI2MyAtMC41MjAzNzYgMTMuODU3NCAzLjU2MTEzIDE3LjkzODlDNy42NDI2MyAyMi4wMjA0IDE0LjM1NzQgMjIuMDIwNCAxOC40Mzg5IDE3LjkzODlDMjIuNTIwNCAxMy44NTc0IDIyLjUyMDQgNy4yNzQzIDE4LjQzODkgMy4wNjExM1pNMTYuNDY0IDE0LjI1MjRMMTQuNjIwNyAxNi4wOTU2TDEwLjkzNDIgMTIuNDA5MUw3LjI0NzY1IDE2LjA5NTZMNS40MDQzOSAxNC4yNTI0TDkuMDkwOTEgMTAuNTY1OEw1LjQwNDM5IDYuODc5MzFMNy4yNDc2NSA1LjAzNjA1TDEwLjkzNDIgOC43MjI1N0wxNC42MjA3IDUuMDM2MDVMMTYuNDY0IDYuODc5MzFMMTIuNzc3NCAxMC41NjU4TDE2LjQ2NCAxNC4yNTI0WiIgZmlsbD0iI0ZGNTY1NiIvPgo8L3N2Zz4K";
|
2
2
|
export {
|
3
3
|
__vite_glob_0_174 as default
|
4
4
|
};
|
package/dist/main.es8.js
CHANGED
@@ -342,7 +342,7 @@ const theme = (() => {
|
|
342
342
|
borderColor: semanticColors.grey[300]
|
343
343
|
},
|
344
344
|
active: {
|
345
|
-
backgroundColor: semanticColors.purple[
|
345
|
+
backgroundColor: semanticColors.purple[50],
|
346
346
|
textColor: semanticColors.purple[600],
|
347
347
|
borderColor: semanticColors.grey[600]
|
348
348
|
},
|
package/package.json
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
<svg
|
2
|
-
<
|
3
|
-
<path d="M24.9592 15.0408C22.2382 12.3197 17.7618 12.3197 15.0408 15.0408C12.3197 17.7618 12.3197 22.2382 15.0408 24.9592C17.7618 27.6803 22.2382 27.6803 24.9592 24.9592C27.6803 22.2382 27.6803 17.8495 24.9592 15.0408ZM23.6426 22.5016L22.4138 23.7304L19.9561 21.2727L17.4984 23.7304L16.2696 22.5016L18.7273 20.0439L16.2696 17.5862L17.4984 16.3574L19.9561 18.815L22.4138 16.3574L23.6426 17.5862L21.185 20.0439L23.6426 22.5016Z" fill="#FF5656"></path>
|
1
|
+
<svg width="22" height="21" viewBox="0 0 22 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M18.4389 3.06113C14.3574 -1.02038 7.64263 -1.02038 3.56113 3.06113C-0.520376 7.14263 -0.520376 13.8574 3.56113 17.9389C7.64263 22.0204 14.3574 22.0204 18.4389 17.9389C22.5204 13.8574 22.5204 7.2743 18.4389 3.06113ZM16.464 14.2524L14.6207 16.0956L10.9342 12.4091L7.24765 16.0956L5.40439 14.2524L9.09091 10.5658L5.40439 6.87931L7.24765 5.03605L10.9342 8.72257L14.6207 5.03605L16.464 6.87931L12.7774 10.5658L16.464 14.2524Z" fill="#FF5656"/>
|
4
3
|
</svg>
|
package/src/assets/theme.js
CHANGED
@@ -333,7 +333,7 @@ const theme = (() => {
|
|
333
333
|
borderColor: semanticColors.grey[300],
|
334
334
|
},
|
335
335
|
active: {
|
336
|
-
backgroundColor: semanticColors.purple[
|
336
|
+
backgroundColor: semanticColors.purple[50],
|
337
337
|
textColor: semanticColors.purple[600],
|
338
338
|
borderColor: semanticColors.grey[600],
|
339
339
|
},
|
@@ -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)
|
@@ -68,7 +68,10 @@ export function useAxisCalculations(props, maxValue) {
|
|
68
68
|
// Generate labels including 0 up to numSteps
|
69
69
|
const numSteps = Math.floor(max / stepSize)
|
70
70
|
for (let i = 0; i <= numSteps; i++) {
|
71
|
-
|
71
|
+
const stepValue = i * stepSize
|
72
|
+
const roundedStepValueString = stepValue.toFixed(2)
|
73
|
+
const roundedStepValueNumber = parseFloat(roundedStepValueString)
|
74
|
+
labels.push(roundedStepValueNumber)
|
72
75
|
}
|
73
76
|
|
74
77
|
// Ensure we always have at least 2 labels (0 and max)
|
@@ -17,8 +17,8 @@
|
|
17
17
|
/>
|
18
18
|
</ChartControlsWrapper>
|
19
19
|
<GraphSection :height="height" :width="width">
|
20
|
-
<YAxis :
|
21
|
-
<YAxisTitleWrapper v-if="yAxisTitle"
|
20
|
+
<YAxis :width="yAxisWidth">
|
21
|
+
<YAxisTitleWrapper v-if="yAxisTitle">
|
22
22
|
{{ yAxisTitle }}
|
23
23
|
</YAxisTitleWrapper>
|
24
24
|
<YAxisRow
|
@@ -51,6 +51,11 @@
|
|
51
51
|
<LoadingOverlay v-if="isLoading">
|
52
52
|
<Spinner size="medium" />
|
53
53
|
</LoadingOverlay>
|
54
|
+
<InfoCardContainer v-else-if="isDataIssueMessageDisplayed">
|
55
|
+
<RCInfoCard align-items="center">
|
56
|
+
{{ dataIssueMessage }}
|
57
|
+
</RCInfoCard>
|
58
|
+
</InfoCardContainer>
|
54
59
|
<SelectionBox
|
55
60
|
v-if="selectionSize && isSelectionEnabled"
|
56
61
|
:bar-width="barWidth"
|
@@ -166,7 +171,6 @@
|
|
166
171
|
:is-inputs-disabled="isLoading"
|
167
172
|
:is-scrollable="isScrollable"
|
168
173
|
:percentage-error-message="percentageErrorMessage"
|
169
|
-
:input-error-message="inputErrorMessage"
|
170
174
|
:series="series"
|
171
175
|
:y-axis-width="yAxisWidth"
|
172
176
|
@input-blur="handleInputBlur"
|
@@ -183,6 +187,7 @@
|
|
183
187
|
import ChartControls from './ChartControls'
|
184
188
|
import BottomFields from './BottomFields'
|
185
189
|
import SelectionBox from './SelectionBox'
|
190
|
+
import RCInfoCard from '../infoCard'
|
186
191
|
import Spinner from '../spinner'
|
187
192
|
import { numberToString } from '../../helpers/numberConverter'
|
188
193
|
|
@@ -218,6 +223,7 @@
|
|
218
223
|
TooltipGradientBox,
|
219
224
|
ChartControlsWrapper,
|
220
225
|
LoadingOverlay,
|
226
|
+
InfoCardContainer,
|
221
227
|
} from './styles/chart'
|
222
228
|
|
223
229
|
const props = defineProps({
|
@@ -300,6 +306,14 @@
|
|
300
306
|
type: Boolean,
|
301
307
|
default: false,
|
302
308
|
},
|
309
|
+
dataIssueMessage: {
|
310
|
+
type: String,
|
311
|
+
default: '',
|
312
|
+
},
|
313
|
+
isDataIssueMessageDisplayed: {
|
314
|
+
type: Boolean,
|
315
|
+
default: false,
|
316
|
+
},
|
303
317
|
showPercentageOnTooltip: {
|
304
318
|
type: Boolean,
|
305
319
|
default: false,
|
@@ -308,10 +322,6 @@
|
|
308
322
|
type: String,
|
309
323
|
default: '',
|
310
324
|
},
|
311
|
-
inputErrorMessage: {
|
312
|
-
type: String,
|
313
|
-
default: '',
|
314
|
-
},
|
315
325
|
})
|
316
326
|
|
317
327
|
const generateChartId = () =>
|
@@ -16,12 +16,9 @@ export const GraphSection = styled('div', { width: String, height: String })`
|
|
16
16
|
display: flex;
|
17
17
|
`
|
18
18
|
|
19
|
-
export const YAxis = styled('div', { width: String
|
19
|
+
export const YAxis = styled('div', { width: String })`
|
20
20
|
width: ${(props) => props.width};
|
21
|
-
display: flex;
|
22
|
-
flex-direction: column;
|
23
21
|
position: relative;
|
24
|
-
height: ${(props) => props.height};
|
25
22
|
`
|
26
23
|
|
27
24
|
export const YAxisRow = styled('div', { percentage: Number })`
|
@@ -29,10 +26,13 @@ export const YAxisRow = styled('div', { percentage: Number })`
|
|
29
26
|
align-items: center;
|
30
27
|
width: 100%;
|
31
28
|
position: absolute;
|
32
|
-
height:
|
29
|
+
height: 1px;
|
33
30
|
bottom: ${(props) =>
|
34
31
|
Number.isFinite(props.percentage) ? `${props.percentage}%` : '0'};
|
35
|
-
|
32
|
+
${(props) =>
|
33
|
+
Number.isFinite(props.percentage) && props.percentage === 100
|
34
|
+
? 'transform: translateY(1px)'
|
35
|
+
: ''};
|
36
36
|
`
|
37
37
|
|
38
38
|
export const YAxisLabel = styled.div`
|
@@ -50,25 +50,24 @@ export const YAxisLine = styled('div', { yAxisWidth: String })`
|
|
50
50
|
right: -10px;
|
51
51
|
left: calc(${(props) => props.yAxisWidth} - 10px);
|
52
52
|
height: 1px;
|
53
|
-
background-color:
|
53
|
+
background-color: ${(props) => props.theme.semanticColors.grey[400]};
|
54
54
|
width: 12px;
|
55
55
|
z-index: 0;
|
56
|
-
top: 50%;
|
57
|
-
transform: translateY(-50%);
|
58
56
|
`
|
59
57
|
|
60
|
-
export const YAxisTitleWrapper = styled('div'
|
61
|
-
position: absolute;
|
62
|
-
left: -66px;
|
63
|
-
top: ${(props) => props.height};
|
64
|
-
transform: rotate(-90deg) translateX(50%);
|
65
|
-
transform-origin: right;
|
58
|
+
export const YAxisTitleWrapper = styled('div')`
|
66
59
|
font-size: 12px;
|
67
|
-
|
68
|
-
|
69
|
-
align-items: center;
|
60
|
+
font-weight: 500;
|
61
|
+
color: ${(props) => props.theme.semanticColors.grey[700]};
|
70
62
|
white-space: nowrap;
|
71
|
-
|
63
|
+
height: 0;
|
64
|
+
width: 0;
|
65
|
+
display: flex;
|
66
|
+
align-items: flex-start;
|
67
|
+
justify-content: center;
|
68
|
+
position: absolute;
|
69
|
+
top: 50%;
|
70
|
+
transform: rotate(-90deg);
|
72
71
|
`
|
73
72
|
|
74
73
|
export const ScrollContainer = styled('div', {
|
@@ -90,6 +89,8 @@ export const ChartContent = styled('div', {
|
|
90
89
|
height: ${(props) => props.height};
|
91
90
|
position: relative;
|
92
91
|
background: ${(props) => props.theme.semanticColors.grey[100]};
|
92
|
+
border-bottom: ${(props) =>
|
93
|
+
`1px solid ${props.theme.semanticColors.grey[400]}`};
|
93
94
|
${(props) =>
|
94
95
|
props.isScrollable
|
95
96
|
? ` min-width: ${props.totalBars * (props.barWidth + 8) + 24}px;`
|
@@ -179,7 +180,7 @@ export const XAxisLabelHighlight = styled.div`
|
|
179
180
|
export const XAxisLine = styled.div`
|
180
181
|
width: 1px;
|
181
182
|
height: 6px;
|
182
|
-
background-color:
|
183
|
+
background-color: ${(props) => props.theme.semanticColors.grey[400]};
|
183
184
|
position: absolute;
|
184
185
|
bottom: -6px;
|
185
186
|
left: 50%;
|
@@ -271,3 +272,13 @@ export const LoadingOverlay = styled('div')`
|
|
271
272
|
align-items: center;
|
272
273
|
z-index: 2;
|
273
274
|
`
|
275
|
+
|
276
|
+
export const InfoCardContainer = styled('div')`
|
277
|
+
position: absolute;
|
278
|
+
top: 50%;
|
279
|
+
left: 50%;
|
280
|
+
transform: translate(-50%, -50%);
|
281
|
+
width: 500px;
|
282
|
+
max-width: 500px;
|
283
|
+
z-index: 2;
|
284
|
+
`
|
@@ -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"
|
@@ -3,15 +3,15 @@ import InputNumber from './index.vue'
|
|
3
3
|
export default {
|
4
4
|
title: 'InputNumber',
|
5
5
|
component: InputNumber,
|
6
|
-
// argTypes: {},
|
7
6
|
}
|
8
7
|
|
9
|
-
const Template = (args
|
8
|
+
const Template = (args) => ({
|
10
9
|
// Components used in your story `template` are defined in the `components` object
|
11
10
|
components: { InputNumber },
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
setup() {
|
12
|
+
return { args: args }
|
13
|
+
},
|
14
|
+
template: `<InputNumber v-bind="args" />`,
|
15
15
|
|
16
16
|
// import InputNumber from "@eturnity/eturnity_reusable_components/src/components/inputs/inputNumber"
|
17
17
|
// How to use:
|
@@ -50,7 +50,6 @@
|
|
50
50
|
:color-mode="colorMode"
|
51
51
|
:data-id="inputDataId"
|
52
52
|
:data-qa-id="dataQaId"
|
53
|
-
:disabled="disabled && !isDisabledStyledOnly"
|
54
53
|
:font-color="colorMode === 'transparent' ? 'white' : fontColor"
|
55
54
|
:font-size="fontSize"
|
56
55
|
:has-label-slot="hasLabelSlot"
|
@@ -58,7 +57,7 @@
|
|
58
57
|
:has-unit="unitName && !!unitName.length"
|
59
58
|
:input-height="inputHeight"
|
60
59
|
:is-border-error-only="isBorderErrorOnly"
|
61
|
-
:is-disabled="disabled"
|
60
|
+
:is-disabled="disabled && !isDisabledStyledOnly"
|
62
61
|
:is-error="isError"
|
63
62
|
:is-info-border="isInfoBorder"
|
64
63
|
:is-interactive="isInteractive"
|
@@ -96,7 +95,6 @@
|
|
96
95
|
:color-mode="colorMode"
|
97
96
|
:data-id="inputDataId"
|
98
97
|
:data-qa-id="dataQaId"
|
99
|
-
:disabled="disabled && !isDisabledStyledOnly"
|
100
98
|
:font-color="colorMode === 'transparent' ? 'white' : fontColor"
|
101
99
|
:font-size="fontSize"
|
102
100
|
:has-label-slot="hasLabelSlot"
|
@@ -104,7 +102,7 @@
|
|
104
102
|
:has-unit="unitName && !!unitName.length"
|
105
103
|
:input-height="inputHeight"
|
106
104
|
:is-border-error-only="isBorderErrorOnly"
|
107
|
-
:is-disabled="disabled"
|
105
|
+
:is-disabled="disabled && !isDisabledStyledOnly"
|
108
106
|
:is-error="isError"
|
109
107
|
:is-info-border="isInfoBorder"
|
110
108
|
:is-interactive="isInteractive"
|
@@ -748,6 +746,7 @@
|
|
748
746
|
default: '',
|
749
747
|
},
|
750
748
|
dataQaId: {
|
749
|
+
type: String,
|
751
750
|
required: false,
|
752
751
|
default: '',
|
753
752
|
},
|
@@ -799,10 +798,6 @@
|
|
799
798
|
type: Boolean,
|
800
799
|
default: false,
|
801
800
|
},
|
802
|
-
hasSpaceBetweenUnit: {
|
803
|
-
type: Boolean,
|
804
|
-
default: true,
|
805
|
-
},
|
806
801
|
},
|
807
802
|
data() {
|
808
803
|
return {
|
@@ -816,12 +811,8 @@
|
|
816
811
|
displayedPlaceholder() {
|
817
812
|
if (this.placeholder) return this.placeholder
|
818
813
|
if (this.defaultNumber)
|
819
|
-
return `${this.defaultNumber}${this.
|
820
|
-
|
821
|
-
}`
|
822
|
-
return `${this.minNumber || 0}${this.hasSpaceBetweenUnit ? ' ' : ''}${
|
823
|
-
this.unitName ? this.unitName : ''
|
824
|
-
}`
|
814
|
+
return `${this.defaultNumber} ${this.unitName ? this.unitName : ''}`
|
815
|
+
return `${this.minNumber || 0} ${this.unitName ? this.unitName : ''}`
|
825
816
|
},
|
826
817
|
hasSlot() {
|
827
818
|
return !!this.$slots.default
|
@@ -1035,9 +1026,8 @@
|
|
1035
1026
|
return
|
1036
1027
|
}
|
1037
1028
|
this.textInput = this.formatWithCurrency(this.value)
|
1038
|
-
const textInputWithoutUnit = this.formatWithoutUnit(this.value)
|
1039
1029
|
this.enteredValue = stringToNumber({
|
1040
|
-
value:
|
1030
|
+
value: this.textInput,
|
1041
1031
|
numberPrecision: this.numberPrecision,
|
1042
1032
|
minDecimals: this.minDecimals,
|
1043
1033
|
})
|
@@ -1058,38 +1048,6 @@
|
|
1058
1048
|
this.$refs.inputField1.$el.blur()
|
1059
1049
|
})
|
1060
1050
|
},
|
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
1051
|
formatWithCurrency(value) {
|
1094
1052
|
let adjustedMinValue =
|
1095
1053
|
value || value === 0
|
@@ -1110,7 +1068,7 @@
|
|
1110
1068
|
let unit = this.showLinearUnitName ? '' : this.unitName
|
1111
1069
|
//return input + ' ' + unit
|
1112
1070
|
if (unit) {
|
1113
|
-
return
|
1071
|
+
return input + ' ' + unit
|
1114
1072
|
}
|
1115
1073
|
return input
|
1116
1074
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
@@ -5,7 +5,8 @@
|
|
5
5
|
:has-info-text="!!infoText"
|
6
6
|
:margin-bottom="marginBottom"
|
7
7
|
>
|
8
|
-
<span data-test-id="page_subtitle_text">
|
8
|
+
<span v-if="containsHtml" data-test-id="page_subtitle_text" v-html="text"></span>
|
9
|
+
<span v-else data-test-id="page_subtitle_text">
|
9
10
|
{{ text }}
|
10
11
|
</span>
|
11
12
|
<InfoText
|
@@ -58,6 +59,11 @@
|
|
58
59
|
required: true,
|
59
60
|
type: String,
|
60
61
|
},
|
62
|
+
containsHtml: {
|
63
|
+
required: false,
|
64
|
+
type: Boolean,
|
65
|
+
default: false,
|
66
|
+
},
|
61
67
|
color: {
|
62
68
|
required: false,
|
63
69
|
type: String,
|