@eturnity/eturnity_reusable_components 7.24.3-EPDM-10647.0 → 7.24.3-EPDM-7509.2
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
@@ -14,7 +14,6 @@
|
|
14
14
|
:halfComputedTextInfoWidth="halfComputedTextInfoWidth"
|
15
15
|
:alignArrow="alignArrow"
|
16
16
|
:iconSize="size"
|
17
|
-
:maxWidth="maxWidth"
|
18
17
|
><slot />
|
19
18
|
<span v-html="text"></span>
|
20
19
|
</text-overlay>
|
@@ -53,7 +52,7 @@ const TextOverlay = styled('div', textAttrs)`
|
|
53
52
|
background: ${(props) => props.theme.colors.black};
|
54
53
|
padding: 10px;
|
55
54
|
width: ${(props) => props.width};
|
56
|
-
max-width:
|
55
|
+
max-width: 400px;
|
57
56
|
font-size: 13px;
|
58
57
|
font-weight: 400;
|
59
58
|
line-height: normal;
|
@@ -125,10 +124,6 @@ export default {
|
|
125
124
|
width: {
|
126
125
|
required: false,
|
127
126
|
default: '165px'
|
128
|
-
},
|
129
|
-
maxWidth: {
|
130
|
-
type: String,
|
131
|
-
default: '400px'
|
132
127
|
}
|
133
128
|
},
|
134
129
|
methods: {
|
@@ -63,34 +63,9 @@
|
|
63
63
|
:isError="isError"
|
64
64
|
>{{ unitName }}</unit-container
|
65
65
|
>
|
66
|
-
<icon-wrapper
|
67
|
-
v-if="isError && !showLinearUnitName"
|
68
|
-
size="16px"
|
69
|
-
:marginRight="showSelect ? selectWidth : 0"
|
70
|
-
>
|
66
|
+
<icon-wrapper v-if="isError && !showLinearUnitName" size="16px">
|
71
67
|
<icon name="warning" size="16px" cursor="default" />
|
72
68
|
</icon-wrapper>
|
73
|
-
<select-wrapper v-if="showSelect">
|
74
|
-
<divider />
|
75
|
-
<Select
|
76
|
-
:showBorder="false"
|
77
|
-
:selectWidth="`${selectWidth}px`"
|
78
|
-
@input-change="$emit('select-change', $event)"
|
79
|
-
>
|
80
|
-
<template #selector>
|
81
|
-
<select-text>{{ getSelectValue }}</select-text>
|
82
|
-
</template>
|
83
|
-
<template #dropdown>
|
84
|
-
<Option
|
85
|
-
v-for="item in selectOptions"
|
86
|
-
:key="item.value"
|
87
|
-
:value="item.value"
|
88
|
-
>
|
89
|
-
{{ item.label }}
|
90
|
-
</Option>
|
91
|
-
</template>
|
92
|
-
</Select>
|
93
|
-
</select-wrapper>
|
94
69
|
</input-wrapper>
|
95
70
|
<error-message v-if="isError">{{ errorMessage }}</error-message>
|
96
71
|
</container>
|
@@ -132,8 +107,6 @@ import {
|
|
132
107
|
} from '../../../helpers/numberConverter'
|
133
108
|
import InfoText from '../../infoText'
|
134
109
|
import ErrorMessage from '../../errorMessage'
|
135
|
-
import Select from '../select'
|
136
|
-
import Option from '../select/option'
|
137
110
|
import warningIcon from '../../../assets/icons/error_icon.png'
|
138
111
|
import Icon from '../../icon'
|
139
112
|
|
@@ -309,35 +282,16 @@ const LabelText = styled('div', inputProps)`
|
|
309
282
|
font-weight: 700;
|
310
283
|
`
|
311
284
|
|
312
|
-
const IconAttrs = { size: String
|
285
|
+
const IconAttrs = { size: String }
|
313
286
|
const IconWrapper = styled('div', IconAttrs)`
|
314
287
|
position: absolute;
|
315
288
|
top: 0;
|
316
289
|
bottom: 0;
|
317
290
|
margin: auto;
|
318
|
-
right:
|
291
|
+
right: 5px;
|
319
292
|
height: ${(props) => (props.size ? props.size : 'auto')};
|
320
293
|
`
|
321
294
|
|
322
|
-
const SelectText = styled.div`
|
323
|
-
font-size: 13px;
|
324
|
-
`
|
325
|
-
|
326
|
-
const SelectWrapper = styled.div`
|
327
|
-
position: absolute;
|
328
|
-
top: 2px;
|
329
|
-
right: 2px;
|
330
|
-
display: flex;
|
331
|
-
height: 100%;
|
332
|
-
`
|
333
|
-
|
334
|
-
const Divider = styled.div`
|
335
|
-
margin-top: 6px;
|
336
|
-
height: calc(100% - 16px);
|
337
|
-
width: 1px;
|
338
|
-
background-color: ${({ theme }) => theme.colors.grey4};
|
339
|
-
`
|
340
|
-
|
341
295
|
export default {
|
342
296
|
name: 'input-number',
|
343
297
|
components: {
|
@@ -352,12 +306,7 @@ export default {
|
|
352
306
|
InfoText,
|
353
307
|
Icon,
|
354
308
|
SlotContainer,
|
355
|
-
IconWrapper
|
356
|
-
Select,
|
357
|
-
Option,
|
358
|
-
SelectWrapper,
|
359
|
-
SelectText,
|
360
|
-
Divider
|
309
|
+
IconWrapper
|
361
310
|
},
|
362
311
|
inheritAttrs: false,
|
363
312
|
data() {
|
@@ -501,22 +450,6 @@ export default {
|
|
501
450
|
inputDataId: {
|
502
451
|
required: false,
|
503
452
|
default: ''
|
504
|
-
},
|
505
|
-
showSelect: {
|
506
|
-
type: Boolean,
|
507
|
-
default: false
|
508
|
-
},
|
509
|
-
selectWidth: {
|
510
|
-
type: Number,
|
511
|
-
default: 70
|
512
|
-
},
|
513
|
-
selectOptions: {
|
514
|
-
type: Array,
|
515
|
-
default: () => []
|
516
|
-
},
|
517
|
-
selectValue: {
|
518
|
-
type: [String, Number],
|
519
|
-
default: null
|
520
453
|
}
|
521
454
|
},
|
522
455
|
computed: {
|
@@ -531,13 +464,6 @@ export default {
|
|
531
464
|
},
|
532
465
|
hasLabelSlot() {
|
533
466
|
return !!this.$slots.label
|
534
|
-
},
|
535
|
-
getSelectValue() {
|
536
|
-
const item = this.selectOptions.find(
|
537
|
-
({ value }) => value === this.selectValue
|
538
|
-
)
|
539
|
-
|
540
|
-
return item ? item.label : '-'
|
541
467
|
}
|
542
468
|
},
|
543
469
|
methods: {
|
@@ -22,15 +22,10 @@
|
|
22
22
|
>
|
23
23
|
</input-label>
|
24
24
|
<info-text
|
25
|
-
v-if="infoTextMessage
|
25
|
+
v-if="infoTextMessage"
|
26
26
|
:text="infoTextMessage"
|
27
27
|
:size="infoTextSize"
|
28
|
-
|
29
|
-
:width="infoTextWidth"
|
30
|
-
:max-width="infoTextWidth"
|
31
|
-
>
|
32
|
-
<slot name="infoText" />
|
33
|
-
</info-text>
|
28
|
+
/>
|
34
29
|
</label-wrapper>
|
35
30
|
<select-button-wrapper :disabled="disabled">
|
36
31
|
<selectButton
|
@@ -552,14 +547,6 @@ export default {
|
|
552
547
|
dropdownMenuPosition: {
|
553
548
|
type: String,
|
554
549
|
default: DROPDOWN_MENU_POSITIONS.Automatic // options: ['automatic', bottom]
|
555
|
-
},
|
556
|
-
infoTextWidth: {
|
557
|
-
type: String,
|
558
|
-
required: false
|
559
|
-
},
|
560
|
-
infoTextAlignArrow: {
|
561
|
-
type: String,
|
562
|
-
required: false
|
563
550
|
}
|
564
551
|
},
|
565
552
|
|
@@ -18,6 +18,8 @@
|
|
18
18
|
v-else
|
19
19
|
:cellPaddings="cellPaddings"
|
20
20
|
:tableCursor="tableCursor"
|
21
|
+
@mouseover="setHovers($event)"
|
22
|
+
@mouseleave="setHovers($event)"
|
21
23
|
>
|
22
24
|
<slot />
|
23
25
|
</table-container>
|
@@ -121,8 +123,8 @@ const TableContainer = styled('table', containerAttrs)`
|
|
121
123
|
}
|
122
124
|
|
123
125
|
tbody {
|
124
|
-
tr {
|
125
|
-
&:hover {
|
126
|
+
tr, td {
|
127
|
+
&:hover, &.hover {
|
126
128
|
background-color: ${(props) => props.theme.colors.white};
|
127
129
|
cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'auto')};
|
128
130
|
|
@@ -425,6 +427,31 @@ export default {
|
|
425
427
|
}
|
426
428
|
},
|
427
429
|
methods: {
|
430
|
+
setHovers(event) {
|
431
|
+
if (event.target.tagName !== 'TABLE') {
|
432
|
+
console.log('over', event)
|
433
|
+
let hoveredCell = event.target
|
434
|
+
console.log(hoveredCell.tagName)
|
435
|
+
|
436
|
+
if (hoveredCell.tagName !== 'TD') {
|
437
|
+
let currentParentElement = hoveredCell.parentElement
|
438
|
+
while (currentParentElement.tagName !== 'TR') {
|
439
|
+
console.log(currentParentElement.tagName)
|
440
|
+
if (currentParentElement.tagName === 'TD') hoveredCell = currentParentElement
|
441
|
+
currentParentElement = currentParentElement.parentElement
|
442
|
+
}
|
443
|
+
}
|
444
|
+
|
445
|
+
if (hoveredCell) {
|
446
|
+
const rowChildren = Array.from(hoveredCell.parentElement.children)
|
447
|
+
const rowList = Array.from(document.querySelectorAll('tr'))
|
448
|
+
rowList.forEach((el) => {
|
449
|
+
const cells = Array.from(el.children)
|
450
|
+
cells[rowChildren.indexOf(hoveredCell)].classList.add('hover')
|
451
|
+
})
|
452
|
+
}
|
453
|
+
}
|
454
|
+
},
|
428
455
|
observeTableHeight() {
|
429
456
|
if (!this.$refs.tableRef) return
|
430
457
|
|