@politicalwatch/tipi-uikit 1.6.12 → 1.6.14

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.12",
3
+ "version": "1.6.14",
4
4
  "main": "src/components/index.js",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -23,7 +23,7 @@
23
23
  "stylelint-config-standard": "^34.0.0",
24
24
  "vite-svg-loader": "^4.0.0",
25
25
  "vue": "^3.3.4",
26
- "vue-inline-svg": "^2.1.3",
26
+ "vue-inline-svg": "^3.1.2",
27
27
  "vue-json-excel3": "^1.0.18"
28
28
  },
29
29
  "devDependencies": {
@@ -1,19 +1,22 @@
1
1
  <template>
2
2
  <div class="c-party_logo_icon" :style="getBackground">
3
3
  <figure class="c-party_logo_icon__image" :alt="'Logo de ' + getName">
4
- <component :is="svg"></component>
4
+ <inline-svg :src="svg" />
5
5
  </figure>
6
6
  </div>
7
7
  </template>
8
8
 
9
9
  <script>
10
- import { defineAsyncComponent } from 'vue';
10
+ import InlineSvg from 'vue-inline-svg';
11
11
 
12
12
  export default {
13
13
  name: 'PartyLogoIcon',
14
14
  props: {
15
15
  party: String,
16
16
  },
17
+ components: {
18
+ InlineSvg,
19
+ },
17
20
  data: function () {
18
21
  return {
19
22
  parties: {
@@ -27,6 +30,11 @@ export default {
27
30
  logo: 'vox',
28
31
  color: '#5ac035',
29
32
  },
33
+ Vox: {
34
+ name: 'VOX',
35
+ logo: 'vox',
36
+ color: '#5ac035',
37
+ },
30
38
  ERC: {
31
39
  name: 'Esquerra Republicana',
32
40
  logo: 'erc',
@@ -162,6 +170,11 @@ export default {
162
170
  logo: 'psoe',
163
171
  color: '#e30613',
164
172
  },
173
+ 'PSIB-PSOE': {
174
+ name: 'Partido Socialista Obrero Español',
175
+ logo: 'psoe',
176
+ color: '#e30613',
177
+ },
165
178
  'EAJ-PNV': {
166
179
  name: 'Partido Nacionalista Vasco',
167
180
  logo: 'pnv',
@@ -180,11 +193,9 @@ export default {
180
193
  let svg = '';
181
194
  try {
182
195
  if (this.party in this.parties) {
183
- svg = defineAsyncComponent(() =>
184
- import(`../../assets/party_logos/icon/${this.parties[this.party].logo}.svg`)
185
- );
196
+ svg = `../../assets/party_logos/icon/${this.parties[this.party].logo}.svg`;
186
197
  } else {
187
- svg = defineAsyncComponent(() => import('../../assets/svg/icon-error.svg'));
198
+ svg = '../../assets/svg/icon-error.svg';
188
199
  }
189
200
  } catch (error) {
190
201
  svg = this.icon;