@eturnity/eturnity_reusable_components 8.19.8-EPDM-14690.3 → 8.19.8-EPDM-12618.7
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 +1 -1
- package/src/components/barchart/BottomFields.vue +36 -126
- package/src/components/barchart/composables/useAxisCalculations.js +1 -1
- package/src/components/barchart/composables/useChartData.js +1 -1
- package/src/components/barchart/composables/useTooltip.js +3 -28
- package/src/components/barchart/index.vue +15 -58
- package/src/components/barchart/styles/bottomFields.js +4 -18
- package/src/components/barchart/styles/chart.js +0 -1
- package/src/components/errorMessage/index.vue +1 -1
- package/src/components/infoCard/index.vue +3 -15
- package/src/components/infoCard/infoCard.spec.js +3 -3
- package/src/components/infoText/index.vue +31 -36
- package/src/components/inputs/inputNumber/index.vue +6 -92
- package/src/components/inputs/inputText/index.vue +1 -3
- package/src/components/pageTitle/index.vue +1 -0
- package/src/components/tableDropdown/index.vue +7 -5
- package/src/DemoChart.vue +0 -424
- package/src/TestChart.vue +0 -229
@@ -15,40 +15,37 @@
|
|
15
15
|
:is-disabled="isDisabled"
|
16
16
|
:padding="padding"
|
17
17
|
>
|
18
|
-
<
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
</LabelWrapper>
|
47
|
-
</template>
|
48
|
-
<slot name="trigger"></slot>
|
18
|
+
<LabelWrapper
|
19
|
+
v-if="labelText && labelAlign === 'left'"
|
20
|
+
:color="iconColor || computedIconColor"
|
21
|
+
:size="labelSize"
|
22
|
+
>
|
23
|
+
{{ labelText }}
|
24
|
+
</LabelWrapper>
|
25
|
+
<Dot
|
26
|
+
v-if="type === 'dot'"
|
27
|
+
:color="dotColor"
|
28
|
+
data-test-id="infoText_dot"
|
29
|
+
/>
|
30
|
+
<IconComponent
|
31
|
+
v-else-if="!noIcon"
|
32
|
+
:color="iconColor || computedIconColor"
|
33
|
+
:cursor="isDisabled ? 'not-allowed' : 'pointer'"
|
34
|
+
:disabled="isDisabled"
|
35
|
+
:hovered-color="iconColor || computedIconColor"
|
36
|
+
:name="iconName"
|
37
|
+
:size="size"
|
38
|
+
/>
|
39
|
+
<LabelWrapper
|
40
|
+
v-if="labelText && labelAlign === 'right'"
|
41
|
+
:color="iconColor || computedIconColor"
|
42
|
+
:size="labelSize"
|
43
|
+
>
|
44
|
+
{{ labelText }}
|
45
|
+
</LabelWrapper>
|
49
46
|
</IconWrapper>
|
50
47
|
</div>
|
51
|
-
<Teleport v-if="isVisible
|
48
|
+
<Teleport v-if="isVisible" to="body">
|
52
49
|
<TextWrapper data-test-id="info_text_wrapper" :style="wrapperStyle">
|
53
50
|
<TextOverlay
|
54
51
|
ref="infoBox"
|
@@ -230,7 +227,7 @@
|
|
230
227
|
},
|
231
228
|
infoPosition: {
|
232
229
|
required: false,
|
233
|
-
default:
|
230
|
+
default: 'bottom',
|
234
231
|
type: String,
|
235
232
|
},
|
236
233
|
maxWidth: {
|
@@ -366,9 +363,7 @@
|
|
366
363
|
{ position: 'left', space: spaceLeft },
|
367
364
|
].sort((a, b) => b.space - a.space)
|
368
365
|
|
369
|
-
const bestPosition =
|
370
|
-
? props.infoPosition
|
371
|
-
: positions[0].position
|
366
|
+
const bestPosition = positions[0].position
|
372
367
|
|
373
368
|
let top, left, arrowPosition
|
374
369
|
|
@@ -30,61 +30,7 @@
|
|
30
30
|
/>
|
31
31
|
</LabelWrapper>
|
32
32
|
<InputWrapper>
|
33
|
-
<InputInfoText
|
34
|
-
v-if="!!inputInfoText"
|
35
|
-
info-position="bottom"
|
36
|
-
:text="inputInfoText"
|
37
|
-
>
|
38
|
-
<template #trigger>
|
39
|
-
<InputContainer
|
40
|
-
v-bind="$attrs"
|
41
|
-
ref="inputField1"
|
42
|
-
:align-items="alignItems"
|
43
|
-
:background-color="
|
44
|
-
colorMode === 'transparent' ? 'transparent' : backgroundColor
|
45
|
-
"
|
46
|
-
:border-color="
|
47
|
-
colorMode === 'transparent' && !borderColor
|
48
|
-
? 'white'
|
49
|
-
: borderColor
|
50
|
-
"
|
51
|
-
:color-mode="colorMode"
|
52
|
-
:data-id="inputDataId"
|
53
|
-
:data-qa-id="dataQaId"
|
54
|
-
:disabled="disabled && !isDisabledStyledOnly"
|
55
|
-
:font-color="colorMode === 'transparent' ? 'white' : fontColor"
|
56
|
-
:font-size="fontSize"
|
57
|
-
:has-label-slot="hasLabelSlot"
|
58
|
-
:has-slot="hasSlot"
|
59
|
-
:has-unit="unitName && !!unitName.length"
|
60
|
-
:input-height="inputHeight"
|
61
|
-
:is-border-error-only="isBorderErrorOnly"
|
62
|
-
:is-disabled="disabled"
|
63
|
-
:is-error="isError"
|
64
|
-
:is-info-border="isInfoBorder"
|
65
|
-
:is-interactive="isInteractive"
|
66
|
-
:min-width="minWidth"
|
67
|
-
:no-border="noBorder"
|
68
|
-
:placeholder="displayedPlaceholder"
|
69
|
-
:read-only="isReadOnly"
|
70
|
-
:readonly="isReadOnly"
|
71
|
-
:show-arrow-controls="showArrowControls"
|
72
|
-
:show-linear-unit-name="showLinearUnitName"
|
73
|
-
:slot-size="slotSize"
|
74
|
-
:text-align="textAlign"
|
75
|
-
:value="formatWithCurrency(value)"
|
76
|
-
@blur="onInputBlur($event)"
|
77
|
-
@focus="focusInput()"
|
78
|
-
@input="onInput($event)"
|
79
|
-
@keydown.down="decrementValue"
|
80
|
-
@keydown.up="incrementValue"
|
81
|
-
@keyup.enter="onEnterPress"
|
82
|
-
/>
|
83
|
-
</template>
|
84
|
-
</InputInfoText>
|
85
|
-
|
86
33
|
<InputContainer
|
87
|
-
v-else
|
88
34
|
v-bind="$attrs"
|
89
35
|
ref="inputField1"
|
90
36
|
:align-items="alignItems"
|
@@ -97,23 +43,20 @@
|
|
97
43
|
:color-mode="colorMode"
|
98
44
|
:data-id="inputDataId"
|
99
45
|
:data-qa-id="dataQaId"
|
100
|
-
:disabled="disabled
|
46
|
+
:disabled="disabled"
|
101
47
|
:font-color="colorMode === 'transparent' ? 'white' : fontColor"
|
102
48
|
:font-size="fontSize"
|
103
49
|
:has-label-slot="hasLabelSlot"
|
104
50
|
:has-slot="hasSlot"
|
105
51
|
:has-unit="unitName && !!unitName.length"
|
106
52
|
:input-height="inputHeight"
|
107
|
-
:is-border-error-only="isBorderErrorOnly"
|
108
53
|
:is-disabled="disabled"
|
109
54
|
:is-error="isError"
|
110
|
-
:is-info-border="isInfoBorder"
|
111
55
|
:is-interactive="isInteractive"
|
112
56
|
:min-width="minWidth"
|
113
57
|
:no-border="noBorder"
|
114
58
|
:placeholder="displayedPlaceholder"
|
115
59
|
:read-only="isReadOnly"
|
116
|
-
:readonly="isReadOnly"
|
117
60
|
:show-arrow-controls="showArrowControls"
|
118
61
|
:show-linear-unit-name="showLinearUnitName"
|
119
62
|
:slot-size="slotSize"
|
@@ -126,7 +69,6 @@
|
|
126
69
|
@keydown.up="incrementValue"
|
127
70
|
@keyup.enter="onEnterPress"
|
128
71
|
/>
|
129
|
-
|
130
72
|
<SlotContainer v-if="hasSlot" :is-error="isError" :slot-size="slotSize">
|
131
73
|
<slot></slot>
|
132
74
|
</SlotContainer>
|
@@ -138,7 +80,7 @@
|
|
138
80
|
>{{ unitName }}</UnitContainer
|
139
81
|
>
|
140
82
|
<IconWrapper
|
141
|
-
v-if="isError && !showLinearUnitName
|
83
|
+
v-if="isError && !showLinearUnitName"
|
142
84
|
:margin-right="showSelect ? selectWidth : 0"
|
143
85
|
size="16px"
|
144
86
|
>
|
@@ -192,9 +134,7 @@
|
|
192
134
|
</ArrowButton>
|
193
135
|
</ArrowControls>
|
194
136
|
</InputWrapper>
|
195
|
-
<ErrorMessage v-if="isError
|
196
|
-
errorMessage
|
197
|
-
}}</ErrorMessage>
|
137
|
+
<ErrorMessage v-if="isError">{{ errorMessage }}</ErrorMessage>
|
198
138
|
</Container>
|
199
139
|
</template>
|
200
140
|
|
@@ -265,8 +205,6 @@
|
|
265
205
|
colorMode: String,
|
266
206
|
showArrowControls: Boolean,
|
267
207
|
readOnly: Boolean,
|
268
|
-
isBorderErrorOnly: Boolean,
|
269
|
-
isInfoBorder: Boolean,
|
270
208
|
}
|
271
209
|
|
272
210
|
const Container = styled('div', inputProps)`
|
@@ -279,9 +217,7 @@
|
|
279
217
|
|
280
218
|
const InputContainer = styled('input', inputProps)`
|
281
219
|
border: ${(props) =>
|
282
|
-
props.
|
283
|
-
? '1px solid ' + props.theme.semanticColors.blue[500]
|
284
|
-
: props.isError
|
220
|
+
props.isError
|
285
221
|
? '1px solid ' + props.theme.colors.red
|
286
222
|
: props.noBorder
|
287
223
|
? 'none'
|
@@ -300,17 +236,16 @@
|
|
300
236
|
showLinearUnitName,
|
301
237
|
colorMode,
|
302
238
|
showArrowControls,
|
303
|
-
isBorderErrorOnly,
|
304
239
|
}) =>
|
305
240
|
showArrowControls
|
306
241
|
? '40px'
|
307
242
|
: colorMode === 'transparent'
|
308
243
|
? '0'
|
309
244
|
: slotSize
|
310
|
-
? isError && !showLinearUnitName
|
245
|
+
? isError && !showLinearUnitName
|
311
246
|
? 'calc(' + slotSize + ' + 24px)'
|
312
247
|
: 'calc(' + slotSize + ' + 10px)'
|
313
|
-
: isError && !showLinearUnitName
|
248
|
+
: isError && !showLinearUnitName
|
314
249
|
? '24px'
|
315
250
|
: '5px'};
|
316
251
|
border-radius: ${(props) =>
|
@@ -522,10 +457,6 @@
|
|
522
457
|
background-color: ${({ theme }) => theme.colors.grey4};
|
523
458
|
`
|
524
459
|
|
525
|
-
const InputInfoText = styled(InfoText)`
|
526
|
-
width: 100%;
|
527
|
-
`
|
528
|
-
|
529
460
|
export default {
|
530
461
|
name: 'InputNumber',
|
531
462
|
components: {
|
@@ -549,7 +480,6 @@
|
|
549
480
|
ArrowControls,
|
550
481
|
ArrowButton,
|
551
482
|
ArrowDivider,
|
552
|
-
InputInfoText,
|
553
483
|
},
|
554
484
|
inheritAttrs: false,
|
555
485
|
props: {
|
@@ -769,22 +699,6 @@
|
|
769
699
|
type: Boolean,
|
770
700
|
default: false,
|
771
701
|
},
|
772
|
-
isBorderErrorOnly: {
|
773
|
-
type: Boolean,
|
774
|
-
default: false,
|
775
|
-
},
|
776
|
-
isInfoBorder: {
|
777
|
-
type: Boolean,
|
778
|
-
default: false,
|
779
|
-
},
|
780
|
-
inputInfoText: {
|
781
|
-
type: String,
|
782
|
-
default: '',
|
783
|
-
},
|
784
|
-
isDisabledStyledOnly: {
|
785
|
-
type: Boolean,
|
786
|
-
default: false,
|
787
|
-
},
|
788
702
|
},
|
789
703
|
data() {
|
790
704
|
return {
|
@@ -179,9 +179,7 @@
|
|
179
179
|
position: relative;
|
180
180
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
|
181
181
|
color: ${(props) =>
|
182
|
-
props.
|
183
|
-
? props.theme.colors.grey6
|
184
|
-
: props.isDisabled
|
182
|
+
props.isDisabled
|
185
183
|
? props.theme.colors.grey2
|
186
184
|
: props.fontColor
|
187
185
|
? props.fontColor + ' !important'
|
@@ -46,6 +46,7 @@
|
|
46
46
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
47
47
|
font-weight: 600;
|
48
48
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '20px')};
|
49
|
+
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
49
50
|
`
|
50
51
|
|
51
52
|
export default {
|
@@ -78,10 +78,13 @@
|
|
78
78
|
v-else
|
79
79
|
class="inputField"
|
80
80
|
:disabled="customInputDisabled"
|
81
|
+
:error-message="item.errorMessage"
|
81
82
|
:font-color="showArchived ? theme.colors.red : 'black'"
|
83
|
+
:is-error="item.isError"
|
82
84
|
:min-width="item.value.length + 'ch'"
|
83
|
-
:no-border="
|
85
|
+
:no-border="item.noBorder || item.noBorder === undefined"
|
84
86
|
:value="item.value"
|
87
|
+
@input-blur="onCustomInputChange($event.trim())"
|
85
88
|
@input-change="onCustomInputChange($event)"
|
86
89
|
/>
|
87
90
|
</InputContainer>
|
@@ -162,7 +165,7 @@
|
|
162
165
|
</OptionsItem>
|
163
166
|
</OptionsWrapper>
|
164
167
|
<CustomContainer
|
165
|
-
v-if="
|
168
|
+
v-if="getCustomName.length && allowFreeInputs"
|
166
169
|
@click="onCustomNameClick()"
|
167
170
|
>
|
168
171
|
<CustomName>{{ getCustomName }}</CustomName>
|
@@ -226,7 +229,6 @@
|
|
226
229
|
const ItemAttrs = { isNested: Boolean, showArchived: Boolean }
|
227
230
|
const ComponentItem = styled('td', ItemAttrs)`
|
228
231
|
padding-left: ${(props) => (props.isNested ? '14px !important' : '0')};
|
229
|
-
overflow: hidden;
|
230
232
|
text-overflow: ellipsis;
|
231
233
|
padding-right: 0 !important;
|
232
234
|
color: ${(props) =>
|
@@ -558,7 +560,7 @@
|
|
558
560
|
},
|
559
561
|
computed: {
|
560
562
|
getCustomName() {
|
561
|
-
return this.inputText
|
563
|
+
return this.inputText.trim()
|
562
564
|
},
|
563
565
|
theme() {
|
564
566
|
return theme
|
@@ -652,7 +654,7 @@
|
|
652
654
|
},
|
653
655
|
onCustomNameClick() {
|
654
656
|
this.wasClicked = true
|
655
|
-
this.$emit('on-custom-input-name', this.
|
657
|
+
this.$emit('on-custom-input-name', this.getCustomName)
|
656
658
|
this.$emit('toggle-dropdown-open', { close: true })
|
657
659
|
this.inputText = ''
|
658
660
|
},
|