@mjsz-vbr-elements/core 2.2.0-beta.0 → 2.2.1
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/dist/{SeasonSelector-DJM6EjtK.js → SeasonSelector-hqWIAEq6.js} +2 -2
- package/dist/columns.js +1 -1
- package/dist/components.js +3 -3
- package/dist/composables.js +85 -84
- package/dist/constants.js +1 -1
- package/dist/convert-PMHuZhPy.js +1 -1
- package/dist/datetime-EyEBo0-h.js +1 -1
- package/dist/index.iife.js +4 -4
- package/dist/index.iife.js.br +0 -0
- package/dist/index.iife.js.gz +0 -0
- package/dist/index.js +25 -24
- package/dist/{useSort-M_AqLbLK.js → useSort-WcJ_BIws.js} +2 -2
- package/dist/utils.js +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.2.
|
|
3
|
+
* version: v2.2.1 - 04/01/2024, 22:10:50
|
|
4
4
|
* (c) 2024
|
|
5
5
|
* description: Data visualization for MJSZ VBR
|
|
6
6
|
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
7
|
*/
|
|
8
8
|
import { computed as A, withDirectives as fe, openBlock as y, createElementBlock as b, normalizeClass as _, unref as p, renderSlot as I, vModelSelect as ge, createElementVNode as w, ref as E, watch as Lt, isRef as ye, Fragment as O, normalizeStyle as It, createVNode as C, Transition as ve, withCtx as T, createTextVNode as K, toDisplayString as x, createCommentVNode as S, toRefs as zt, renderList as tt, createBlock as L, withKeys as Vt, withModifiers as at, defineComponent as we, createSlots as be } from "vue";
|
|
9
|
-
import { f as q, o as xe, e as ke, d as lt, a as Te, c as Pe, h as $e, n as Se, i as _e, b as Jt, u as qt, w as ze } from "./useSort-
|
|
9
|
+
import { f as q, o as xe, e as ke, d as lt, a as Te, c as Pe, h as $e, n as Se, i as _e, b as Jt, u as qt, w as ze } from "./useSort-WcJ_BIws.js";
|
|
10
10
|
import { v as Yt, w as ft, l as Nt, p as Ae, o as gt, g as Ge } from "./datetime-EyEBo0-h.js";
|
|
11
11
|
import { LAZY_LOADING_STATE_DELAY as Ce, SORT_STATE_ORIGINAL as Pt, SORT_STATE_DESCEND as Rt, SORT_STATE_ASCEND as Dt, AVAILABLE_TIMEZONES_BY_COUNTRY as Ee, DEFAULT_PORTRAIT_IMAGE_URL as Le } from "./constants.js";
|
|
12
12
|
import { i as Ie, W as Zt, U as yt } from "./convert-PMHuZhPy.js";
|
package/dist/columns.js
CHANGED
package/dist/components.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.2.
|
|
3
|
+
* version: v2.2.1 - 04/01/2024, 22:10:50
|
|
4
4
|
* (c) 2024
|
|
5
5
|
* description: Data visualization for MJSZ VBR
|
|
6
6
|
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
7
|
*/
|
|
8
|
-
import { c as m, b as c, d as n, e as p, g as d, I as S, _ as b, k as g, a as T, j as I, f as P, h as v, i as f, l as h } from "./SeasonSelector-
|
|
8
|
+
import { c as m, b as c, d as n, e as p, g as d, I as S, _ as b, k as g, a as T, j as I, f as P, h as v, i as f, l as h } from "./SeasonSelector-hqWIAEq6.js";
|
|
9
9
|
import "vue";
|
|
10
|
-
import "./useSort-
|
|
10
|
+
import "./useSort-WcJ_BIws.js";
|
|
11
11
|
import "./datetime-EyEBo0-h.js";
|
|
12
12
|
import "./constants.js";
|
|
13
13
|
import "./convert-PMHuZhPy.js";
|
package/dist/composables.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.2.
|
|
3
|
+
* version: v2.2.1 - 04/01/2024, 22:10:50
|
|
4
4
|
* (c) 2024
|
|
5
5
|
* description: Data visualization for MJSZ VBR
|
|
6
6
|
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
7
|
*/
|
|
8
|
-
import { j as S, k as
|
|
9
|
-
import { c as
|
|
10
|
-
import { unref as
|
|
11
|
-
import { VBR_API_BASE_URL as
|
|
12
|
-
import { E as
|
|
13
|
-
var
|
|
8
|
+
import { j as S, k as D, n as h, l as E, m as I, p as b } from "./useSort-WcJ_BIws.js";
|
|
9
|
+
import { c as U, i as tt, u as et, b as nt, a as rt, d as it, e as st, f as at, g as ot, v as ut } from "./useSort-WcJ_BIws.js";
|
|
10
|
+
import { unref as u, ref as P, watch as T, nextTick as B } from "vue";
|
|
11
|
+
import { VBR_API_BASE_URL as C } from "./constants.js";
|
|
12
|
+
import { E as x, H as y, p as g, G as v, v as V, z as M, i as _, f as O } from "./datetime-EyEBo0-h.js";
|
|
13
|
+
var R = /* @__PURE__ */ function() {
|
|
14
14
|
function e(t, n) {
|
|
15
15
|
this.xf = n, this.f = t, this.found = !1;
|
|
16
16
|
}
|
|
17
|
-
return e.prototype["@@transducer/init"] =
|
|
17
|
+
return e.prototype["@@transducer/init"] = x.init, e.prototype["@@transducer/result"] = function(t) {
|
|
18
18
|
return this.found || (t = this.xf["@@transducer/step"](t, void 0)), this.xf["@@transducer/result"](t);
|
|
19
19
|
}, e.prototype["@@transducer/step"] = function(t, n) {
|
|
20
|
-
return this.f(n) && (this.found = !0, t =
|
|
20
|
+
return this.f(n) && (this.found = !0, t = y(this.xf["@@transducer/step"](t, n))), t;
|
|
21
21
|
}, e;
|
|
22
22
|
}();
|
|
23
|
-
function
|
|
23
|
+
function A(e) {
|
|
24
24
|
return function(t) {
|
|
25
|
-
return new
|
|
25
|
+
return new R(e, t);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
/* @__PURE__ */
|
|
28
|
+
var F = /* @__PURE__ */ g(
|
|
29
|
+
/* @__PURE__ */ v(["find"], A, function(t, n) {
|
|
30
30
|
for (var r = 0, i = n.length; r < i; ) {
|
|
31
31
|
if (t(n[r]))
|
|
32
32
|
return n[r];
|
|
33
33
|
r += 1;
|
|
34
34
|
}
|
|
35
35
|
})
|
|
36
|
-
),
|
|
36
|
+
), G = /* @__PURE__ */ function() {
|
|
37
37
|
function e(t, n) {
|
|
38
38
|
this.xf = n, this.f = t, this.idx = -1, this.found = !1;
|
|
39
39
|
}
|
|
40
|
-
return e.prototype["@@transducer/init"] =
|
|
40
|
+
return e.prototype["@@transducer/init"] = x.init, e.prototype["@@transducer/result"] = function(t) {
|
|
41
41
|
return this.found || (t = this.xf["@@transducer/step"](t, -1)), this.xf["@@transducer/result"](t);
|
|
42
42
|
}, e.prototype["@@transducer/step"] = function(t, n) {
|
|
43
|
-
return this.idx += 1, this.f(n) && (this.found = !0, t =
|
|
43
|
+
return this.idx += 1, this.f(n) && (this.found = !0, t = y(this.xf["@@transducer/step"](t, this.idx))), t;
|
|
44
44
|
}, e;
|
|
45
45
|
}();
|
|
46
|
-
function
|
|
46
|
+
function X(e) {
|
|
47
47
|
return function(t) {
|
|
48
|
-
return new
|
|
48
|
+
return new G(e, t);
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
var
|
|
52
|
-
/* @__PURE__ */
|
|
51
|
+
var Y = /* @__PURE__ */ g(
|
|
52
|
+
/* @__PURE__ */ v([], X, function(t, n) {
|
|
53
53
|
for (var r = 0, i = n.length; r < i; ) {
|
|
54
54
|
if (t(n[r]))
|
|
55
55
|
return r;
|
|
@@ -57,108 +57,109 @@ var G = /* @__PURE__ */ x(
|
|
|
57
57
|
}
|
|
58
58
|
return -1;
|
|
59
59
|
})
|
|
60
|
-
),
|
|
61
|
-
return t(
|
|
62
|
-
})
|
|
63
|
-
const
|
|
64
|
-
const r = `${
|
|
60
|
+
), w = /* @__PURE__ */ V(function(t, n, r) {
|
|
61
|
+
return t(M(n, r));
|
|
62
|
+
});
|
|
63
|
+
const j = async (e, t, n) => {
|
|
64
|
+
const r = `${C}${u(e)}?${K(n)}`;
|
|
65
65
|
return new Promise((i, o) => {
|
|
66
66
|
fetch(r, {
|
|
67
67
|
method: "GET",
|
|
68
68
|
cache: "no-cache",
|
|
69
69
|
headers: {
|
|
70
70
|
"Content-Type": "application/json",
|
|
71
|
-
"X-API-KEY":
|
|
71
|
+
"X-API-KEY": L(t)
|
|
72
72
|
}
|
|
73
|
-
}).then((
|
|
74
|
-
if (
|
|
75
|
-
return o(
|
|
76
|
-
i(
|
|
77
|
-
}).catch((
|
|
78
|
-
o(
|
|
73
|
+
}).then((s) => s.json()).then((s) => {
|
|
74
|
+
if (s.error)
|
|
75
|
+
return o(s);
|
|
76
|
+
i(s.data);
|
|
77
|
+
}).catch((s) => {
|
|
78
|
+
o(s);
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
|
-
},
|
|
81
|
+
}, K = (e) => Object.keys(e).map((t) => t + "=" + e[t]).join("&"), L = (e) => {
|
|
82
82
|
var t;
|
|
83
|
-
return e || ((t = window.__MJSZ_VBR_WIDGET__) != null && t.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey :
|
|
84
|
-
},
|
|
85
|
-
const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o =
|
|
83
|
+
return e || ((t = window.__MJSZ_VBR_WIDGET__) != null && t.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey : "");
|
|
84
|
+
}, W = (e = {}) => {
|
|
85
|
+
const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o = P(u(t)), s = (a) => _(a, "day");
|
|
86
86
|
return S(n, () => {
|
|
87
87
|
if (!i)
|
|
88
88
|
return;
|
|
89
|
-
const
|
|
90
|
-
o.value =
|
|
89
|
+
const a = Y(w(s, "gameDate"))(u(n));
|
|
90
|
+
o.value = a === -1 ? 1 : Math.floor(a / r) + 1;
|
|
91
91
|
}), {
|
|
92
92
|
page: o,
|
|
93
|
-
change: (
|
|
94
|
-
o.value =
|
|
93
|
+
change: (a) => {
|
|
94
|
+
o.value = a;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
},
|
|
98
|
-
const { path: i, apiKey: o, params:
|
|
99
|
-
state:
|
|
100
|
-
error:
|
|
97
|
+
}, Z = ({ options: e = {}, transform: t = (i) => i, onError: n = h, onSuccess: r = h }) => {
|
|
98
|
+
const { path: i, apiKey: o, params: s, resetOnExecute: d = !1, immediate: c = !1 } = e, {
|
|
99
|
+
state: a,
|
|
100
|
+
error: f,
|
|
101
101
|
isLoading: l,
|
|
102
|
-
execute:
|
|
103
|
-
} =
|
|
104
|
-
immediate:
|
|
105
|
-
resetOnExecute:
|
|
102
|
+
execute: m
|
|
103
|
+
} = D(() => j(i, o, u(s)).then((p) => t(p)), [], {
|
|
104
|
+
immediate: c,
|
|
105
|
+
resetOnExecute: d,
|
|
106
106
|
onError: n,
|
|
107
107
|
onSuccess: r
|
|
108
108
|
});
|
|
109
109
|
return {
|
|
110
|
-
state:
|
|
111
|
-
error:
|
|
110
|
+
state: a,
|
|
111
|
+
error: f,
|
|
112
112
|
isLoading: l,
|
|
113
|
-
execute:
|
|
113
|
+
execute: m
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
|
-
function
|
|
117
|
-
const r =
|
|
118
|
-
|
|
119
|
-
if (
|
|
116
|
+
function q(e = !1, t = h, n = h) {
|
|
117
|
+
const r = E();
|
|
118
|
+
T(r, (i) => {
|
|
119
|
+
if (u(e)) {
|
|
120
120
|
if (i === "visible")
|
|
121
121
|
return t();
|
|
122
122
|
n();
|
|
123
123
|
}
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
const { items: t = [], element: n, offset: r = 0 } = e,
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
const u = L(E(i, "gameDate"))(c(t));
|
|
131
|
-
if (!u)
|
|
126
|
+
const H = (e = {}) => {
|
|
127
|
+
const { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, o = (c) => _(c, "day"), s = () => {
|
|
128
|
+
var p;
|
|
129
|
+
if (d(), !u(i))
|
|
132
130
|
return;
|
|
133
|
-
const
|
|
134
|
-
if (!
|
|
131
|
+
const c = F(w(o, "gameDate"))(u(t));
|
|
132
|
+
if (!c)
|
|
135
133
|
return;
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
const a = O(c.gameDate, "YYYY-MM-DD"), f = b(n).querySelector(`div[data-gamedate="${a}"]`);
|
|
135
|
+
if (!f)
|
|
136
|
+
return;
|
|
137
|
+
const l = getComputedStyle(f).getPropertyValue("--vbr-widget-sticky-top-offset") || 0, m = (((p = f.getBoundingClientRect()) == null ? void 0 : p.top) ?? 0) - u(r) - parseFloat(l);
|
|
138
|
+
window.scrollTo(0, m);
|
|
139
|
+
}, { stop: d } = I(
|
|
139
140
|
() => ({
|
|
140
|
-
items:
|
|
141
|
-
element:
|
|
141
|
+
items: u(t),
|
|
142
|
+
element: u(n)
|
|
142
143
|
}),
|
|
143
|
-
async ({ items:
|
|
144
|
-
|
|
144
|
+
async ({ items: c, element: a }) => {
|
|
145
|
+
c.length === 0 || !a || (await B(), s());
|
|
145
146
|
}
|
|
146
147
|
);
|
|
147
148
|
};
|
|
148
149
|
export {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
150
|
+
U as createI18n,
|
|
151
|
+
j as fetchVBRData,
|
|
152
|
+
tt as i18n,
|
|
153
|
+
et as useColumns,
|
|
154
|
+
nt as useError,
|
|
155
|
+
rt as useErrorProvider,
|
|
156
|
+
it as useI18n,
|
|
156
157
|
st as useLazyLoadingState,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
158
|
+
at as useMainClass,
|
|
159
|
+
W as usePage,
|
|
160
|
+
H as useScrollToGameDate,
|
|
161
|
+
Z as useServices,
|
|
162
|
+
ot as useSort,
|
|
163
|
+
q as useVisibilityChange,
|
|
164
|
+
ut as validateColumnsName
|
|
164
165
|
};
|
package/dist/constants.js
CHANGED
package/dist/convert-PMHuZhPy.js
CHANGED