@eturnity/eturnity_reusable_components 7.48.1-EPDM-12680.35 → 7.48.1-EPDM-12680.37
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
@@ -19,7 +19,7 @@
|
|
19
19
|
<CheckWrapper :has-label="hasLabel">
|
20
20
|
<span class="checkmark"></span>
|
21
21
|
</CheckWrapper>
|
22
|
-
<LabelText v-if="hasLabel">
|
22
|
+
<LabelText v-if="hasLabel" :is-disabled="isDisabled">
|
23
23
|
{{ label }}
|
24
24
|
</LabelText>
|
25
25
|
</Container>
|
@@ -90,18 +90,20 @@
|
|
90
90
|
? '16px'
|
91
91
|
: '25px'};
|
92
92
|
background-color: ${(props) =>
|
93
|
-
props.
|
93
|
+
props.isDisabled
|
94
|
+
? props.theme.colors.lightGray
|
95
|
+
: props.isChecked
|
94
96
|
? props.backgroundColor
|
95
97
|
? props.backgroundColor
|
96
98
|
: props.theme.colors.green
|
97
|
-
: props.isDisabled
|
98
|
-
? props.theme.colors.lightGray
|
99
99
|
: props.theme.colors.white};
|
100
100
|
border-radius: 4px;
|
101
101
|
border: 1px solid
|
102
102
|
${(props) =>
|
103
103
|
props.isChecked
|
104
|
-
? props.
|
104
|
+
? props.isDisabled
|
105
|
+
? props.theme.colors.lightGray
|
106
|
+
: props.backgroundColor
|
105
107
|
? props.backgroundColor
|
106
108
|
: props.theme.colors.green
|
107
109
|
: props.theme.colors.mediumGray};
|
@@ -140,7 +142,11 @@
|
|
140
142
|
: '10px'};
|
141
143
|
border: solid
|
142
144
|
${(props) =>
|
143
|
-
props.
|
145
|
+
props.isDisabled
|
146
|
+
? props.theme.colors.green
|
147
|
+
: props.checkColor
|
148
|
+
? props.checkColor
|
149
|
+
: props.theme.colors.white};
|
144
150
|
border-width: ${(props) =>
|
145
151
|
props.size === 'medium'
|
146
152
|
? '0 3px 3px 0'
|
@@ -160,11 +166,16 @@
|
|
160
166
|
width: 0;
|
161
167
|
`
|
162
168
|
|
163
|
-
const
|
169
|
+
const LabelTextAttrs = {
|
170
|
+
isDisabled: Boolean,
|
171
|
+
}
|
172
|
+
const LabelText = styled('div', LabelTextAttrs)`
|
164
173
|
font-size: 13px;
|
165
174
|
display: grid;
|
166
175
|
align-items: center;
|
167
176
|
min-height: 18px;
|
177
|
+
color: ${(props) =>
|
178
|
+
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
|
168
179
|
`
|
169
180
|
|
170
181
|
export default {
|
@@ -11,9 +11,7 @@
|
|
11
11
|
/>
|
12
12
|
</PageTitleContainer>
|
13
13
|
<SectionContainer
|
14
|
-
v-for="(item, index) in
|
15
|
-
? dataList
|
16
|
-
: compressedDataList"
|
14
|
+
v-for="(item, index) in dataListToDisplay"
|
17
15
|
:key="item.inverterId"
|
18
16
|
>
|
19
17
|
<TopContainer>
|
@@ -61,7 +59,7 @@
|
|
61
59
|
}}
|
62
60
|
kWp
|
63
61
|
</ContainerValue>
|
64
|
-
<ContainerValue v-else>
|
62
|
+
<ContainerValue v-else-if="item.type !== 'optimizer'">
|
65
63
|
|
|
66
64
|
{{
|
67
65
|
numberToString({
|
@@ -107,7 +105,9 @@
|
|
107
105
|
</MarkerItem>
|
108
106
|
<MarkerItem>
|
109
107
|
<RCIcon color="white" :name="getIconName(item)" size="14px" />
|
110
|
-
<
|
108
|
+
<MarkerText :title="getTypeName(item.type)">
|
109
|
+
{{ getTypeName(item.type) }}
|
110
|
+
</MarkerText>
|
111
111
|
</MarkerItem>
|
112
112
|
<MarkerItem
|
113
113
|
v-if="item.type !== 'optimizer'"
|
@@ -123,7 +123,7 @@
|
|
123
123
|
{{ $gettext('kWAC') }}
|
124
124
|
</MarkerItem>
|
125
125
|
<MarkerItem
|
126
|
-
v-if="!itemHasStrings(item)
|
126
|
+
v-if="!itemHasStrings(item)"
|
127
127
|
:title="$gettext('The DC power is the maximum DC input power.')"
|
128
128
|
>
|
129
129
|
{{
|
@@ -173,11 +173,11 @@
|
|
173
173
|
</IconWrapper>
|
174
174
|
</IconsContainer>
|
175
175
|
</LeftContainer>
|
176
|
-
<SortingContainer v-if="
|
176
|
+
<SortingContainer v-if="dataListToDisplay.length > 1">
|
177
177
|
<SortingIconWrapper
|
178
178
|
:data-test-id="'move_up_' + index"
|
179
179
|
:is-disabled="index === 0"
|
180
|
-
@click="index > 0 && handleMoveClick('up', index)"
|
180
|
+
@click="index > 0 && handleMoveClick('up', index, item)"
|
181
181
|
>
|
182
182
|
<RCIcon
|
183
183
|
:color="index === 0 ? 'grey6' : 'grey3'"
|
@@ -188,17 +188,22 @@
|
|
188
188
|
</SortingIconWrapper>
|
189
189
|
<SortingIconWrapper
|
190
190
|
:data-test-id="'move_down_' + index"
|
191
|
-
:is-disabled="index ===
|
191
|
+
:is-disabled="index === dataListToDisplay.length - 1"
|
192
192
|
@click="
|
193
|
-
index <
|
193
|
+
index < dataListToDisplay.length - 1 &&
|
194
|
+
handleMoveClick('down', index, item)
|
194
195
|
"
|
195
196
|
>
|
196
197
|
<RCIcon
|
197
|
-
:color="
|
198
|
+
:color="
|
199
|
+
index === dataListToDisplay.length - 1 ? 'grey6' : 'grey3'
|
200
|
+
"
|
198
201
|
:cursor="
|
199
|
-
index ===
|
202
|
+
index === dataListToDisplay.length - 1
|
203
|
+
? 'not-allowed'
|
204
|
+
: 'pointer'
|
200
205
|
"
|
201
|
-
:is-disabled="index ===
|
206
|
+
:is-disabled="index === dataListToDisplay.length - 1"
|
202
207
|
name="move_down"
|
203
208
|
size="14px"
|
204
209
|
/>
|
@@ -461,16 +466,21 @@
|
|
461
466
|
: props.theme.colors.grey6};
|
462
467
|
font-size: 11px;
|
463
468
|
color: ${(props) => props.theme.colors.white};
|
464
|
-
max-width: 11ch;
|
465
|
-
white-space: nowrap;
|
466
|
-
overflow: hidden;
|
467
|
-
text-overflow: ellipsis;
|
468
469
|
& > span {
|
469
470
|
overflow: hidden;
|
471
|
+
white-space: nowrap;
|
470
472
|
text-overflow: ellipsis;
|
473
|
+
max-width: 11ch;
|
471
474
|
}
|
472
475
|
`
|
473
476
|
|
477
|
+
const MarkerText = styled.div`
|
478
|
+
max-width: 11ch;
|
479
|
+
white-space: nowrap;
|
480
|
+
overflow: hidden;
|
481
|
+
text-overflow: ellipsis;
|
482
|
+
`
|
483
|
+
|
474
484
|
const ContainerValue = styled.div`
|
475
485
|
font-size: 12px;
|
476
486
|
`
|
@@ -729,6 +739,7 @@
|
|
729
739
|
EmptyStringBox,
|
730
740
|
InfoText,
|
731
741
|
InfoWrapper,
|
742
|
+
MarkerText,
|
732
743
|
},
|
733
744
|
props: {
|
734
745
|
dataList: {
|
@@ -757,6 +768,11 @@
|
|
757
768
|
}
|
758
769
|
},
|
759
770
|
computed: {
|
771
|
+
dataListToDisplay(){
|
772
|
+
return this.hasExpandedSection
|
773
|
+
? this.dataList
|
774
|
+
: this.compressedDataList"
|
775
|
+
},
|
760
776
|
hasExpandedSection() {
|
761
777
|
return this.expandedInverters.length > 0
|
762
778
|
},
|
@@ -933,10 +949,13 @@
|
|
933
949
|
return 'pv'
|
934
950
|
}
|
935
951
|
},
|
936
|
-
handleMoveClick(direction, index) {
|
952
|
+
handleMoveClick(direction, index, item) {
|
953
|
+
console.log('handleMoveClick', item)
|
937
954
|
this.$emit('on-move', {
|
938
955
|
direction: direction,
|
939
956
|
index: index,
|
957
|
+
item: item,
|
958
|
+
isExpanded: this.hasExpandedSection,
|
940
959
|
})
|
941
960
|
},
|
942
961
|
},
|