@politicalwatch/tipi-uikit 1.6.13 → 1.6.15
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.
|
|
3
|
+
"version": "1.6.15",
|
|
4
4
|
"main": "src/components/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
@@ -15,28 +15,28 @@
|
|
|
15
15
|
"core-js": "^3.32.2",
|
|
16
16
|
"d3": "^5.14.2",
|
|
17
17
|
"d3-cloud": "^1.2.5",
|
|
18
|
-
"date-fns": "^
|
|
18
|
+
"date-fns": "^3.0.0",
|
|
19
19
|
"masonry-layout": "^4.2.2",
|
|
20
20
|
"pluralize": "^8.0.0",
|
|
21
21
|
"qs": "^6.11.2",
|
|
22
22
|
"save-svg-as-png": "^1.4.17",
|
|
23
|
-
"stylelint-config-standard": "^
|
|
24
|
-
"vite-svg-loader": "^
|
|
23
|
+
"stylelint-config-standard": "^36.0.0",
|
|
24
|
+
"vite-svg-loader": "^5.1.0",
|
|
25
25
|
"vue": "^3.3.4",
|
|
26
|
-
"vue-inline-svg": "^
|
|
26
|
+
"vue-inline-svg": "^3.1.2",
|
|
27
27
|
"vue-json-excel3": "^1.0.18"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@rushstack/eslint-patch": "^1.1.0",
|
|
31
|
-
"@storybook/addon-essentials": "^7.
|
|
32
|
-
"@storybook/addon-interactions": "^7.
|
|
33
|
-
"@storybook/addon-links": "^7.
|
|
34
|
-
"@storybook/blocks": "^7.
|
|
31
|
+
"@storybook/addon-essentials": "^7.6.6",
|
|
32
|
+
"@storybook/addon-interactions": "^7.6.6",
|
|
33
|
+
"@storybook/addon-links": "^7.6.6",
|
|
34
|
+
"@storybook/blocks": "^7.6.6",
|
|
35
35
|
"@storybook/testing-library": "^0.2.2",
|
|
36
|
-
"@storybook/vue3": "^7.
|
|
37
|
-
"@storybook/vue3-vite": "^7.
|
|
38
|
-
"@vitejs/plugin-vue": "^
|
|
39
|
-
"@vue/eslint-config-prettier": "^
|
|
36
|
+
"@storybook/vue3": "^7.6.6",
|
|
37
|
+
"@storybook/vue3-vite": "^7.6.6",
|
|
38
|
+
"@vitejs/plugin-vue": "^5.0.0",
|
|
39
|
+
"@vue/eslint-config-prettier": "^8.0.0",
|
|
40
40
|
"@vue/test-utils": "^2.4.1",
|
|
41
41
|
"autoprefixer": "^10.4.16",
|
|
42
42
|
"eslint": "^8.5.0",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"react-dom": "^18.2.0",
|
|
49
49
|
"sass": "^1.67.0",
|
|
50
|
-
"storybook": "^7.
|
|
51
|
-
"stylelint": "^
|
|
50
|
+
"storybook": "^7.6.6",
|
|
51
|
+
"stylelint": "^16.1.0",
|
|
52
52
|
"terser": "^5.14.2",
|
|
53
|
-
"vite": "^
|
|
54
|
-
"vitest": "^0.
|
|
53
|
+
"vite": "^5.0.0",
|
|
54
|
+
"vitest": "^1.0.0"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="c-initiative-meta">
|
|
3
3
|
<div
|
|
4
|
-
:class="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
)}`
|
|
8
|
-
"
|
|
4
|
+
:class="`c-initiative-meta__status c-initiative-meta__status--${getColorByStatus(
|
|
5
|
+
initiative.status
|
|
6
|
+
)}`"
|
|
9
7
|
>
|
|
10
8
|
<strong>
|
|
11
9
|
<tipi-icon :icon="getIcon(initiative)"></tipi-icon>
|
|
@@ -16,8 +14,8 @@
|
|
|
16
14
|
</template>
|
|
17
15
|
|
|
18
16
|
<script>
|
|
19
|
-
import formatDistanceToNow from 'date-fns/formatDistanceToNow';
|
|
20
|
-
import es from 'date-fns/locale/es';
|
|
17
|
+
import { formatDistanceToNow } from 'date-fns/formatDistanceToNow';
|
|
18
|
+
import { es } from 'date-fns/locale/es';
|
|
21
19
|
import TipiIcon from '../Icon/Icon.vue';
|
|
22
20
|
|
|
23
21
|
export default {
|
|
@@ -29,7 +27,7 @@ export default {
|
|
|
29
27
|
initiative: Object,
|
|
30
28
|
metaColors: {
|
|
31
29
|
type: Object,
|
|
32
|
-
default: function() {
|
|
30
|
+
default: function () {
|
|
33
31
|
return {
|
|
34
32
|
completed: [
|
|
35
33
|
'Aprobada',
|
|
@@ -53,18 +51,18 @@ export default {
|
|
|
53
51
|
},
|
|
54
52
|
},
|
|
55
53
|
methods: {
|
|
56
|
-
getColorByStatus: function(status) {
|
|
54
|
+
getColorByStatus: function (status) {
|
|
57
55
|
for (let color in this.metaColors) {
|
|
58
56
|
if (this.metaColors[color].indexOf(status) != -1) return color;
|
|
59
57
|
}
|
|
60
58
|
return 'neutral';
|
|
61
59
|
},
|
|
62
|
-
getIcon: function(initiative) {
|
|
60
|
+
getIcon: function (initiative) {
|
|
63
61
|
const color = this.getColorByStatus(initiative['status']);
|
|
64
62
|
const map = { completed: 'success', neutral: 'clock', error: 'denied' };
|
|
65
63
|
return map[color];
|
|
66
64
|
},
|
|
67
|
-
getStateMessage: function(initiative) {
|
|
65
|
+
getStateMessage: function (initiative) {
|
|
68
66
|
if (initiative['status'] == 'Desconocida') {
|
|
69
67
|
return `${initiative['status']}`;
|
|
70
68
|
}
|
|
@@ -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
|
-
<
|
|
4
|
+
<inline-svg :src="svg" />
|
|
5
5
|
</figure>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
|
-
import
|
|
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: {
|
|
@@ -190,11 +193,9 @@ export default {
|
|
|
190
193
|
let svg = '';
|
|
191
194
|
try {
|
|
192
195
|
if (this.party in this.parties) {
|
|
193
|
-
svg =
|
|
194
|
-
import(`../../assets/party_logos/icon/${this.parties[this.party].logo}.svg`)
|
|
195
|
-
);
|
|
196
|
+
svg = `../../assets/party_logos/icon/${this.parties[this.party].logo}.svg`;
|
|
196
197
|
} else {
|
|
197
|
-
svg =
|
|
198
|
+
svg = '../../assets/svg/icon-error.svg';
|
|
198
199
|
}
|
|
199
200
|
} catch (error) {
|
|
200
201
|
svg = this.icon;
|