@golstats/gsc-filters 1.0.7 → 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.
@@ -0,0 +1,191 @@
1
+ import { useCssVars as $, computed as c, openBlock as i, createElementBlock as a, normalizeStyle as E, createElementVNode as l, createVNode as y, unref as p, Fragment as u, renderList as _, normalizeClass as v, toDisplayString as b, pushScopeId as H, popScopeId as T } from "vue";
2
+ import { _ as V, L as g } from "./index-2acfab17.js";
3
+ const r = (d) => (H("data-v-80d9c265"), d = d(), T(), d), R = { class: "details__header" }, F = /* @__PURE__ */ r(() => /* @__PURE__ */ l("div", { class: "details__header__title" }, "Jugando como", -1)), I = { class: "details__header__checkbox" }, W = { class: "details__body" }, G = { class: "details__body__playing-as" }, L = ["onClick"], P = { class: "details__header" }, z = /* @__PURE__ */ r(() => /* @__PURE__ */ l("div", { class: "details__header__title" }, "En: (Elige el lapso de tiempo)", -1)), N = { class: "details__header__checkbox" }, U = { class: "details__body" }, w = /* @__PURE__ */ r(() => /* @__PURE__ */ l("div", { class: "details__body__title" }, "1er tiempo", -1)), D = { class: "details__body__game-section" }, J = ["onClick"], j = { class: "details__body" }, q = /* @__PURE__ */ r(() => /* @__PURE__ */ l("div", { class: "details__body__title" }, "2do tiempo", -1)), K = { class: "details__body__game-section" }, M = ["onClick"], O = {
4
+ __name: "FilterConditions",
5
+ props: {
6
+ playingAs: {
7
+ type: Array,
8
+ default: () => [
9
+ {
10
+ name: "Local",
11
+ isSelected: !0
12
+ },
13
+ {
14
+ name: "Visitante",
15
+ isSelected: !0
16
+ }
17
+ ]
18
+ },
19
+ gameSections: {
20
+ type: Array,
21
+ default: () => [
22
+ {
23
+ text: "0-15",
24
+ value: 1,
25
+ isSelected: !0
26
+ },
27
+ {
28
+ text: "16-30",
29
+ value: 2,
30
+ isSelected: !0
31
+ },
32
+ {
33
+ text: "31-45",
34
+ value: 3,
35
+ isSelected: !0
36
+ },
37
+ {
38
+ text: "46-60",
39
+ value: 4,
40
+ isSelected: !0
41
+ },
42
+ {
43
+ text: "61-75",
44
+ value: 5,
45
+ isSelected: !0
46
+ },
47
+ {
48
+ text: "76-90",
49
+ value: 6,
50
+ isSelected: !0
51
+ }
52
+ ]
53
+ },
54
+ buttonsBackgroundColor: {
55
+ type: String,
56
+ default: "rgba(255, 255, 255, 0)"
57
+ },
58
+ buttonsBackgroundColorActive: {
59
+ type: String,
60
+ default: "rgba(203, 238, 107, 0.05)"
61
+ },
62
+ buttonsTextColor: {
63
+ type: String,
64
+ default: "rgba(255, 255, 255, 0.8)"
65
+ },
66
+ buttonsTextColorActive: {
67
+ type: String,
68
+ default: "rgba(255, 255, 255, 1)"
69
+ },
70
+ buttonsBorderColor: {
71
+ type: String,
72
+ default: "#8ea2ab"
73
+ },
74
+ buttonsBorderColorActive: {
75
+ type: String,
76
+ default: "#cbee6b"
77
+ },
78
+ buttonsBorderWidth: {
79
+ type: String,
80
+ default: "0.8px"
81
+ },
82
+ buttonsBorderWidthActive: {
83
+ type: String,
84
+ default: "1px"
85
+ },
86
+ buttonsBorderRadius: {
87
+ type: String,
88
+ default: "4px"
89
+ }
90
+ },
91
+ setup(d) {
92
+ const o = d;
93
+ $((e) => ({
94
+ "49cba245": d.buttonsBackgroundColor,
95
+ "52f02da6": d.buttonsTextColor,
96
+ "7d3f686a": d.buttonsBorderWidth,
97
+ "7c286a07": d.buttonsBorderColor,
98
+ "24a6f4aa": d.buttonsBackgroundColorActive,
99
+ cd8d7768: d.buttonsTextColorActive,
100
+ "35fa5c10": d.buttonsBorderWidthActive,
101
+ "0cde1826": d.buttonsBorderColorActive
102
+ }));
103
+ const m = c(() => o.playingAs.every((e) => e.isSelected)), C = c(() => o.gameSections.every((e) => e.isSelected)), f = c(() => o.gameSections.reduce(
104
+ (e, t) => (t.value <= 3 ? e.firstHalf.push(t) : e.secondHalf.push(t), e),
105
+ {
106
+ firstHalf: [],
107
+ secondHalf: []
108
+ }
109
+ )), x = c(() => ({
110
+ "--border-radius-first-button": `${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,
111
+ "--border-radius-last-button": `0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`
112
+ }));
113
+ function k(e) {
114
+ e ? o.playingAs.forEach((t) => {
115
+ t.isSelected = !0;
116
+ }) : o.playingAs.forEach((t, s) => {
117
+ t.isSelected = s === 0;
118
+ });
119
+ }
120
+ function B(e) {
121
+ o.playingAs.filter((t) => t.isSelected).length === 1 && e.isSelected || (e.isSelected = !e.isSelected);
122
+ }
123
+ function S(e) {
124
+ o.gameSections.filter((t) => t.isSelected).length === 1 && e.isSelected || (e.isSelected = !e.isSelected);
125
+ }
126
+ function A(e) {
127
+ e ? o.gameSections.forEach((t) => {
128
+ t.isSelected = !0;
129
+ }) : o.gameSections.forEach((t, s) => {
130
+ t.isSelected = s === 0;
131
+ });
132
+ }
133
+ return (e, t) => (i(), a("div", {
134
+ class: "details",
135
+ style: E(x.value)
136
+ }, [
137
+ l("div", R, [
138
+ F,
139
+ l("div", I, [
140
+ y(p(g), {
141
+ label: "Todos",
142
+ "model-value": m.value,
143
+ "onUpdate:modelValue": k
144
+ }, null, 8, ["model-value"])
145
+ ])
146
+ ]),
147
+ l("div", W, [
148
+ l("div", G, [
149
+ (i(!0), a(u, null, _(o.playingAs, (s, n) => (i(), a("div", {
150
+ key: `pa${n}`,
151
+ class: v(["details__body__button", { active: s.isSelected }]),
152
+ onClick: (h) => B(s)
153
+ }, b(s.name), 11, L))), 128))
154
+ ])
155
+ ]),
156
+ l("div", P, [
157
+ z,
158
+ l("div", N, [
159
+ y(p(g), {
160
+ label: "Todos",
161
+ "model-value": C.value,
162
+ "onUpdate:modelValue": A
163
+ }, null, 8, ["model-value"])
164
+ ])
165
+ ]),
166
+ l("div", U, [
167
+ w,
168
+ l("div", D, [
169
+ (i(!0), a(u, null, _(f.value.firstHalf, (s, n) => (i(), a("div", {
170
+ key: `pa${n}`,
171
+ class: v(["details__body__button", { active: s.isSelected }]),
172
+ onClick: (h) => S(s)
173
+ }, b(s.text), 11, J))), 128))
174
+ ])
175
+ ]),
176
+ l("div", j, [
177
+ q,
178
+ l("div", K, [
179
+ (i(!0), a(u, null, _(f.value.secondHalf, (s, n) => (i(), a("div", {
180
+ key: `pa${n}`,
181
+ class: v(["details__body__button", { active: s.isSelected }]),
182
+ onClick: (h) => S(s)
183
+ }, b(s.text), 11, M))), 128))
184
+ ])
185
+ ])
186
+ ], 4));
187
+ }
188
+ }, Y = /* @__PURE__ */ V(O, [["__scopeId", "data-v-80d9c265"]]);
189
+ export {
190
+ Y as default
191
+ };
@@ -0,0 +1,21 @@
1
+ import { ref as r, openBlock as _, createElementBlock as a, createVNode as c, unref as n } from "vue";
2
+ import { _ as s, C as d } from "./index-2acfab17.js";
3
+ const i = { class: "filter-field" }, u = {
4
+ __name: "FilterField",
5
+ setup(p) {
6
+ const t = r(Array.from({ length: 16 }, (l, e) => e + 1));
7
+ function o() {
8
+ }
9
+ return (l, e) => (_(), a("div", i, [
10
+ c(n(d), {
11
+ width: "100%",
12
+ "background-color": "#2E3B46",
13
+ value: t.value,
14
+ "onUpdate:modelValue": o
15
+ }, null, 8, ["value"])
16
+ ]));
17
+ }
18
+ }, v = /* @__PURE__ */ s(u, [["__scopeId", "data-v-8103c3e1"]]);
19
+ export {
20
+ v as default
21
+ };
@@ -0,0 +1,43 @@
1
+ import { openBlock as t, createElementBlock as r, Fragment as a, renderList as u, createBlock as n, unref as d, createVNode as p } from "vue";
2
+ import { _ as s, L as i } from "./index-2acfab17.js";
3
+ const g = { class: "subcategory-group" }, y = {
4
+ __name: "SubcategoryGroup",
5
+ props: {
6
+ subcategoryGroup: {
7
+ type: Array,
8
+ default: () => []
9
+ }
10
+ },
11
+ setup(o) {
12
+ return (c, _) => (t(), r("div", g, [
13
+ (t(!0), r(a, null, u(o.subcategoryGroup, (e) => (t(), n(d(i), {
14
+ key: e.id,
15
+ modelValue: e.isSelected,
16
+ "onUpdate:modelValue": (l) => e.isSelected = l,
17
+ label: e.name
18
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label"]))), 128))
19
+ ]));
20
+ }
21
+ }, f = /* @__PURE__ */ s(y, [["__scopeId", "data-v-ae6f3d72"]]);
22
+ const m = { class: "filter-subcategories" }, b = {
23
+ __name: "FilterSubcategories",
24
+ props: {
25
+ subcategoryGroups: {
26
+ type: Array,
27
+ default: () => []
28
+ }
29
+ },
30
+ setup(o) {
31
+ return (c, _) => (t(), r("div", m, [
32
+ (t(!0), r(a, null, u(o.subcategoryGroups, (e) => (t(), r("div", {
33
+ key: e.id,
34
+ class: "filter-subcategories__group"
35
+ }, [
36
+ p(f, { subcategoryGroup: e }, null, 8, ["subcategoryGroup"])
37
+ ]))), 128))
38
+ ]));
39
+ }
40
+ }, S = /* @__PURE__ */ s(b, [["__scopeId", "data-v-5edaefc2"]]);
41
+ export {
42
+ S as default
43
+ };