@golstats/gsc-relevant-data 1.0.8 → 1.0.9

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": "@golstats/gsc-relevant-data",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -21,7 +21,7 @@
21
21
  "format": "prettier --write src/"
22
22
  },
23
23
  "dependencies": {
24
- "@golstats/gsc-data-cards": "^1.0.5",
24
+ "@golstats/gsc-data-cards": "^1.0.6",
25
25
  "@golstats/gsc-season-select": "^1.0.8",
26
26
  "@golstats/gsc-slider": "^1.0.5",
27
27
  "@golstats/gsc-switch-component": "^1.0.14",
@@ -1,126 +0,0 @@
1
- import { computed as u, openBlock as e, createElementBlock as o, normalizeStyle as y, createBlock as k, mergeProps as S, withCtx as x, renderSlot as w, createCommentVNode as i, createElementVNode as l, toDisplayString as m, Fragment as I, renderList as C, pushScopeId as L, popScopeId as T } from "vue";
2
- import { h as O, E as g, I as A, O as E, T as N } from "./misc-BbzSgyER-2p2XKW1m.js";
3
- const F = (a) => (L("data-v-4e37e48c"), a = a(), T(), a), $ = {
4
- key: 0,
5
- class: "card-general__content__player-img"
6
- }, B = ["src"], H = {
7
- key: 1,
8
- class: "card-general__content__team-img"
9
- }, M = ["src"], V = /* @__PURE__ */ F(() => /* @__PURE__ */ l("div", { class: "card-general__content__body" }, null, -1)), j = { class: "card-general__content__footer" }, z = { class: "card-general__content__footer__header" }, G = { class: "card-general__content__footer__header__team-logo" }, P = ["src"], q = { class: "card-general__content__footer__header__title" }, D = {
10
- key: 0,
11
- class: "card-general__content__footer__header__total"
12
- }, J = { class: "card-general__content__footer__body" }, K = ["innerHTML"], Q = {
13
- key: 0,
14
- class: "card-general__content__footer__body__sections"
15
- }, R = { class: "section__total" }, U = /* @__PURE__ */ F(() => /* @__PURE__ */ l("div", { class: "section__text" }, "PASES", -1)), W = {
16
- __name: "CardGeneral",
17
- props: {
18
- height: {
19
- type: String,
20
- default: "500px"
21
- },
22
- width: {
23
- type: String,
24
- default: "319px"
25
- },
26
- data: {
27
- type: Object,
28
- default: () => null
29
- },
30
- descriptionType: {
31
- type: Number,
32
- default: 4
33
- }
34
- },
35
- setup(a) {
36
- const t = a, p = u(() => ({
37
- "--height": t.height,
38
- "--width": t.width,
39
- "--player-in-action-height": "410px",
40
- "--footer-background-color": (t.data.thumbnails.colors.background_color || "#000000").trim(),
41
- "--text-color": (t.data.thumbnails.colors.font_color_description || "#FFFFFF").trim(),
42
- "--title-color": (t.data.thumbnails.colors.font_color_header || "#FFFFFF").trim(),
43
- "--total-color": (t.data.thumbnails.colors.font_color_stats || "#FFFFFF").trim(),
44
- "--border": `1px dashed ${t.data.thumbnails.colors.graphic_color || "#000000"}`
45
- })), h = u(() => !t.data || !t.data.thumbnails ? null : {
46
- backgroundOverlayColor: (t.data.thumbnails.colors.background_color || "#000000").trim(),
47
- backgroundImageSrc: t.data.is_player && t.data.thumbnails.images.background_player_in_action[0] ? g(t.data.thumbnails.images.background_player_in_action[0]) : g(t.data.thumbnails.images.background_team),
48
- titleColor: (t.data.thumbnails.colors.font_color_header || "#FFFFFF").trim(),
49
- textColor: (t.data.thumbnails.colors.font_color_description || "#FFFFFF").trim(),
50
- totalColor: (t.data.thumbnails.colors.font_color_stats || "#FFFFFF").trim()
51
- }), v = u(() => t.data ? A(E({ data: t.data, descriptionType: t.descriptionType })) : ""), n = u(() => {
52
- if (!t.data) return null;
53
- let s = t.data.team_logo, c = t.data.sections;
54
- s && (s = s.replace("-80", "-150")), c && (c = c.sort((r, d) => r[0] - d[0]));
55
- let _ = 0;
56
- return c = c.reduce((r, [d, b], f) => (f % 4 === 0 && (r.push([]), _++), r[_ - 1].push([d, b]), r), []).reverse().reduce((r, d) => (r.push(...d), r), []), {
57
- playerInAction: t.data.thumbnails.images && t.data.thumbnails.images.player_in_action ? g(t.data.thumbnails.images.player_in_action[0]) : "",
58
- teamLogoSrc: s || "",
59
- sections: c || []
60
- };
61
- });
62
- return (s, c) => (e(), o("div", {
63
- class: "card-general",
64
- style: y(p.value)
65
- }, [
66
- h.value ? (e(), k(N, S({ key: 0 }, h.value, { width: a.width }), {
67
- default: x(() => [
68
- w(s.$slots, "default", {}, () => [
69
- n.value ? (e(), o("div", {
70
- key: 0,
71
- style: y(p.value),
72
- class: "card-general__content"
73
- }, [
74
- a.data.is_player ? (e(), o("div", $, [
75
- n.value.playerInAction ? (e(), o("img", {
76
- key: 0,
77
- src: n.value.playerInAction,
78
- alt: "player"
79
- }, null, 8, B)) : i("", !0)
80
- ])) : (e(), o("div", H, [
81
- n.value.teamLogoSrc ? (e(), o("img", {
82
- key: 0,
83
- src: n.value.teamLogoSrc,
84
- alt: "team"
85
- }, null, 8, M)) : i("", !0)
86
- ])),
87
- V,
88
- l("div", j, [
89
- l("div", z, [
90
- l("div", G, [
91
- a.data.team_logo ? (e(), o("img", {
92
- key: 0,
93
- src: a.data.team_logo,
94
- alt: ""
95
- }, null, 8, P)) : i("", !0)
96
- ]),
97
- l("div", q, m(a.data.title), 1),
98
- a.data.footer && a.data.footer.show_total ? (e(), o("div", D, m(a.data.total), 1)) : i("", !0)
99
- ]),
100
- l("div", J, [
101
- l("div", {
102
- class: "card-general__content__footer__body__description",
103
- innerHTML: v.value
104
- }, null, 8, K),
105
- n.value.sections && n.value.sections.length ? (e(), o("div", Q, [
106
- (e(!0), o(I, null, C(n.value.sections, ([_, r]) => (e(), o("div", {
107
- key: _,
108
- class: "section"
109
- }, [
110
- l("div", R, m(r), 1),
111
- U
112
- ]))), 128))
113
- ])) : i("", !0)
114
- ])
115
- ])
116
- ], 4)) : i("", !0)
117
- ], !0)
118
- ]),
119
- _: 3
120
- }, 16, ["width"])) : i("", !0)
121
- ], 4));
122
- }
123
- }, Z = /* @__PURE__ */ O(W, [["__scopeId", "data-v-4e37e48c"]]);
124
- export {
125
- Z as default
126
- };