@politicalwatch/tipi-uikit 1.6.2 → 1.6.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/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 16">
|
|
2
2
|
<path fill="#2D4252" d="M11.95 1.965C10.628.698 8.87 0 7 0S3.372.698 2.05 1.965C.728 3.232 0 4.916 0 6.708 0 8.5.728 10.184 2.05 11.45l4.604 4.412c.096.091.22.137.346.137.125 0 .25-.046.346-.137l4.604-4.412C13.272 10.184 14 8.5 14 6.708c0-1.792-.728-3.476-2.05-4.743zm-2.752 6.85c-.587.562-1.367.872-2.198.872-.83 0-1.611-.31-2.198-.873-.587-.562-.91-1.31-.91-2.106 0-.796.323-1.544.91-2.107C5.389 4.04 6.17 3.73 7 3.73c.83 0 1.611.31 2.198.872.588.563.911 1.311.911 2.107 0 .796-.323 1.544-.91 2.106z"/>
|
|
3
3
|
</svg>
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
props: {
|
|
15
15
|
party: String,
|
|
16
16
|
},
|
|
17
|
-
data: function() {
|
|
17
|
+
data: function () {
|
|
18
18
|
return {
|
|
19
19
|
parties: {
|
|
20
20
|
Cs: {
|
|
@@ -179,22 +179,26 @@ export default {
|
|
|
179
179
|
svg() {
|
|
180
180
|
let svg = '';
|
|
181
181
|
try {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
if (this.party in this.parties) {
|
|
183
|
+
svg = defineAsyncComponent(() =>
|
|
184
|
+
import(`../../assets/party_logos/icon/${this.parties[this.party].logo}.svg`)
|
|
185
|
+
);
|
|
186
|
+
} else {
|
|
187
|
+
svg = defineAsyncComponent(() => import('../../assets/svg/icon-error.svg'));
|
|
188
|
+
}
|
|
185
189
|
} catch (error) {
|
|
186
190
|
svg = this.icon;
|
|
187
191
|
}
|
|
188
192
|
return svg;
|
|
189
193
|
},
|
|
190
|
-
getBackground: function() {
|
|
191
|
-
const bg = this.parties[this.party]?.color ? this.parties[this.party].color : '';
|
|
194
|
+
getBackground: function () {
|
|
195
|
+
const bg = this.parties[this.party]?.color ? this.parties[this.party].color : '#f4f6f8';
|
|
192
196
|
if (bg.length == 7) {
|
|
193
197
|
return 'background-color:' + bg;
|
|
194
198
|
}
|
|
195
199
|
return 'background-image:' + bg;
|
|
196
200
|
},
|
|
197
|
-
getName: function() {
|
|
201
|
+
getName: function () {
|
|
198
202
|
return this.parties[this.party]?.name ? this.parties[this.party].name : '';
|
|
199
203
|
},
|
|
200
204
|
},
|