@politicalwatch/tipi-uikit 1.6.7 → 1.6.8

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@politicalwatch/tipi-uikit",
3
- "version": "1.6.7",
3
+ "version": "1.6.8",
4
4
  "main": "src/components/index.js",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -16,7 +16,10 @@ export default {
16
16
  },
17
17
  data: function () {
18
18
  return {
19
- icons: import.meta.glob(`../../assets/party_logos/icon/*.svg`),
19
+ icons: import.meta.glob('../../assets/party_logos/icon/*.svg', {
20
+ as: 'raw',
21
+ eager: true,
22
+ }),
20
23
  parties: {
21
24
  Cs: {
22
25
  name: 'Ciudadanos',
@@ -178,13 +181,13 @@ export default {
178
181
  },
179
182
  computed: {
180
183
  svg() {
181
- let svg;
182
- if (this.party in this.parties) {
183
- svg = defineAsyncComponent(() => this.icons[`${this.parties[this.party].logo}.svg`]());
184
- } else {
185
- svg = defineAsyncComponent(() => import('../../assets/svg/icon-error.svg'));
186
- }
187
- return svg;
184
+ // let svg;
185
+ // if (this.party in this.parties) {
186
+ // svg = defineAsyncComponent(() => this.icons[`${this.parties[this.party].logo}.svg`]());
187
+ // } else {
188
+ // svg = defineAsyncComponent(() => import('../../assets/svg/icon-error.svg'));
189
+ // }
190
+ return (this.party in this.parties) ? this.icons[`${this.parties[this.party].logo}.svg`] : defineAsyncComponent(() => import('../../assets/svg/icon-error.svg')):
188
191
  },
189
192
  getBackground: function () {
190
193
  const bg = this.parties[this.party]?.color ? this.parties[this.party].color : '#f4f6f8';