@mjsz-vbr-elements/core 2.9.1 → 2.11.0
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/README.md +1 -0
- package/dist/TimezoneSelector-pJzOJFd2.js +2378 -0
- package/dist/columns.js +1 -1
- package/dist/components.js +2 -2
- package/dist/composables.js +95 -90
- package/dist/constants.js +1 -1
- package/dist/datetime-DTVWbsTz.js +1347 -0
- package/dist/{convert-C_k4-oaF.js → errors-1KEdp4yb.js} +226 -184
- 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 +127 -123
- package/dist/useSort-fVNzrwPD.js +763 -0
- package/dist/utils.js +35 -30
- package/package.json +16 -16
- package/dist/AdditionalStandingsText-BiRMcxjC.js +0 -3256
- package/dist/datetime-BzdN4htO.js +0 -1272
- package/dist/useAdditionalText-BCKSsRDN.js +0 -730
package/dist/columns.js
CHANGED
package/dist/components.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.
|
|
3
|
+
* version: v2.11.0 - 14/01/2025, 16:53:44
|
|
4
4
|
* (c) 2025
|
|
5
5
|
* description: Data visualization for MJSZ VBR
|
|
6
6
|
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { _ as s, a as r, b as o, c as t, d as i, e as l, f as n, I as c, g as d, h as S, i as b, j as g, k as T, l as m, m as v, n as I } from "./TimezoneSelector-pJzOJFd2.js";
|
|
9
9
|
export {
|
|
10
10
|
s as AdditionalStandingsText,
|
|
11
11
|
r as BaseSelect,
|
package/dist/composables.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.
|
|
3
|
+
* version: v2.11.0 - 14/01/2025, 16:53:44
|
|
4
4
|
* (c) 2025
|
|
5
5
|
* description: Data visualization for MJSZ VBR
|
|
6
6
|
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
7
|
*/
|
|
8
|
-
import { k as S, l as
|
|
9
|
-
import {
|
|
10
|
-
import { unref as u, ref as P,
|
|
8
|
+
import { k as S, l as D, m as E, p as b, q as I, n as p, r as T } from "./useSort-fVNzrwPD.js";
|
|
9
|
+
import { d as tt, i as et, u as nt, a as rt, c as it, b as at, e as st, f as ot, g as ut, h as ft, v as ct } from "./useSort-fVNzrwPD.js";
|
|
10
|
+
import { unref as u, ref as P, nextTick as B, watch as C } from "vue";
|
|
11
11
|
import { VBR_API_BASE_URL as V } from "./constants.js";
|
|
12
|
-
import { Q as
|
|
13
|
-
var
|
|
12
|
+
import { Q as m, T as x, C as y, S as g, J as $, E as A, i as _, f as M } from "./datetime-DTVWbsTz.js";
|
|
13
|
+
var O = /* @__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"] = m.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 = x(this.xf["@@transducer/step"](t, n))), t;
|
|
21
21
|
}, e;
|
|
22
22
|
}();
|
|
23
|
-
function
|
|
23
|
+
function R(e) {
|
|
24
24
|
return function(t) {
|
|
25
|
-
return new
|
|
25
|
+
return new O(e, t);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
var
|
|
28
|
+
var F = /* @__PURE__ */ y(/* @__PURE__ */ g(["find"], R, function(t, n) {
|
|
29
29
|
for (var r = 0, i = n.length; r < i; ) {
|
|
30
30
|
if (t(n[r]))
|
|
31
31
|
return n[r];
|
|
32
32
|
r += 1;
|
|
33
33
|
}
|
|
34
|
-
})),
|
|
34
|
+
})), X = /* @__PURE__ */ function() {
|
|
35
35
|
function e(t, n) {
|
|
36
36
|
this.xf = n, this.f = t, this.idx = -1, this.found = !1;
|
|
37
37
|
}
|
|
38
|
-
return e.prototype["@@transducer/init"] =
|
|
38
|
+
return e.prototype["@@transducer/init"] = m.init, e.prototype["@@transducer/result"] = function(t) {
|
|
39
39
|
return this.found || (t = this.xf["@@transducer/step"](t, -1)), this.xf["@@transducer/result"](t);
|
|
40
40
|
}, e.prototype["@@transducer/step"] = function(t, n) {
|
|
41
|
-
return this.idx += 1, this.f(n) && (this.found = !0, t =
|
|
41
|
+
return this.idx += 1, this.f(n) && (this.found = !0, t = x(this.xf["@@transducer/step"](t, this.idx))), t;
|
|
42
42
|
}, e;
|
|
43
43
|
}();
|
|
44
|
-
function
|
|
44
|
+
function Y(e) {
|
|
45
45
|
return function(t) {
|
|
46
|
-
return new
|
|
46
|
+
return new X(e, t);
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
var G = /* @__PURE__ */
|
|
49
|
+
var G = /* @__PURE__ */ y(/* @__PURE__ */ g([], Y, function(t, n) {
|
|
50
50
|
for (var r = 0, i = n.length; r < i; ) {
|
|
51
51
|
if (t(n[r]))
|
|
52
52
|
return r;
|
|
53
53
|
r += 1;
|
|
54
54
|
}
|
|
55
55
|
return -1;
|
|
56
|
-
})),
|
|
57
|
-
return t(
|
|
56
|
+
})), v = /* @__PURE__ */ $(function(t, n, r) {
|
|
57
|
+
return t(A(n, r));
|
|
58
58
|
});
|
|
59
|
-
|
|
59
|
+
async function K(e, t, n) {
|
|
60
60
|
const r = `${V}${u(e)}${S(n) ? "" : `?${L(n)}`}`;
|
|
61
61
|
return new Promise((i, o) => {
|
|
62
62
|
fetch(r, {
|
|
@@ -66,98 +66,103 @@ const K = async (e, t, n) => {
|
|
|
66
66
|
"Content-Type": "application/json",
|
|
67
67
|
"X-API-KEY": j(t)
|
|
68
68
|
}
|
|
69
|
-
}).then((
|
|
70
|
-
if (
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
69
|
+
}).then((a) => a.json()).then((a) => {
|
|
70
|
+
if (a.error)
|
|
71
|
+
return o(a);
|
|
72
|
+
i(a.data);
|
|
73
|
+
}).catch((a) => {
|
|
74
|
+
o(a);
|
|
74
75
|
});
|
|
75
76
|
});
|
|
76
|
-
}
|
|
77
|
+
}
|
|
78
|
+
function L(e) {
|
|
79
|
+
return Object.keys(e).map((t) => `${t}=${e[t]}`).join("&");
|
|
80
|
+
}
|
|
81
|
+
function j(e) {
|
|
77
82
|
var t;
|
|
78
83
|
return e || ((t = window.__MJSZ_VBR_WIDGET__) != null && t.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey : "");
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
}
|
|
85
|
+
function Q(e = {}) {
|
|
86
|
+
const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o = P(u(t)), a = (s) => _(s, "day");
|
|
87
|
+
return D(n, () => {
|
|
88
|
+
if (!i)
|
|
89
|
+
return;
|
|
90
|
+
const s = G(v(a, "gameDate"))(u(n));
|
|
91
|
+
o.value = s === -1 ? 1 : Math.floor(s / r) + 1;
|
|
85
92
|
}), {
|
|
86
93
|
page: o,
|
|
87
|
-
change: (
|
|
88
|
-
o.value =
|
|
94
|
+
change: (s) => {
|
|
95
|
+
o.value = s;
|
|
89
96
|
}
|
|
90
97
|
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
98
|
+
}
|
|
99
|
+
function W(e = {}) {
|
|
100
|
+
const { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, o = (f) => _(f, "day"), a = () => {
|
|
101
|
+
var d;
|
|
102
|
+
if (!u(i))
|
|
103
|
+
return;
|
|
104
|
+
const f = F(v(o, "gameDate"))(u(t));
|
|
105
|
+
if (!f)
|
|
106
|
+
return;
|
|
107
|
+
const c = M(f.gameDate, "YYYY-MM-DD"), s = b(n).querySelector(`div[data-gamedate="${c}"]`);
|
|
108
|
+
if (!s)
|
|
109
|
+
return;
|
|
110
|
+
const h = getComputedStyle(s).getPropertyValue("--vbr-widget-sticky-top-offset") || 0, l = (((d = s.getBoundingClientRect()) == null ? void 0 : d.top) ?? 0) - u(r) - Number.parseFloat(h);
|
|
111
|
+
window.scrollTo(0, l);
|
|
112
|
+
};
|
|
113
|
+
E(
|
|
114
|
+
() => ({
|
|
115
|
+
items: u(t),
|
|
116
|
+
element: u(n)
|
|
117
|
+
}),
|
|
118
|
+
async ({ items: f, element: c }) => {
|
|
119
|
+
f.length === 0 || !c || (await B(), a());
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
function Z({ options: e = {}, transform: t = (i) => i, onError: n = p, onSuccess: r = p }) {
|
|
124
|
+
const { path: i, apiKey: o, params: a, resetOnExecute: f = !1, immediate: c = !1 } = e, { state: s, error: h, isLoading: l, execute: d } = I(
|
|
125
|
+
() => K(i, o, u(a)).then((w) => t(w)),
|
|
94
126
|
[],
|
|
95
127
|
{
|
|
96
128
|
immediate: c,
|
|
97
|
-
resetOnExecute:
|
|
129
|
+
resetOnExecute: f,
|
|
98
130
|
onError: n,
|
|
99
131
|
onSuccess: r
|
|
100
132
|
}
|
|
101
133
|
);
|
|
102
134
|
return {
|
|
103
|
-
state:
|
|
104
|
-
error:
|
|
105
|
-
isLoading:
|
|
106
|
-
execute:
|
|
135
|
+
state: s,
|
|
136
|
+
error: h,
|
|
137
|
+
isLoading: l,
|
|
138
|
+
execute: d
|
|
107
139
|
};
|
|
108
|
-
}
|
|
109
|
-
function
|
|
110
|
-
const r =
|
|
111
|
-
|
|
140
|
+
}
|
|
141
|
+
function z(e = !1, t = p, n = p) {
|
|
142
|
+
const r = T();
|
|
143
|
+
C(r, (i) => {
|
|
112
144
|
if (u(e)) {
|
|
113
|
-
if (i === "visible")
|
|
145
|
+
if (i === "visible")
|
|
146
|
+
return t();
|
|
114
147
|
n();
|
|
115
148
|
}
|
|
116
149
|
});
|
|
117
150
|
}
|
|
118
|
-
const H = (e = {}) => {
|
|
119
|
-
const { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, o = (c) => v(c, "day"), s = () => {
|
|
120
|
-
var p;
|
|
121
|
-
if (d(), !u(i)) return;
|
|
122
|
-
const c = X(w(o, "gameDate"))(u(t));
|
|
123
|
-
if (!c) return;
|
|
124
|
-
const a = O(c.gameDate, "YYYY-MM-DD"), f = b(n).querySelector(`div[data-gamedate="${a}"]`);
|
|
125
|
-
if (!f) return;
|
|
126
|
-
const h = getComputedStyle(f).getPropertyValue("--vbr-widget-sticky-top-offset") || 0, m = (((p = f.getBoundingClientRect()) == null ? void 0 : p.top) ?? 0) - u(r) - parseFloat(h);
|
|
127
|
-
window.scrollTo(0, m);
|
|
128
|
-
}, { stop: d } = T(
|
|
129
|
-
() => ({
|
|
130
|
-
items: u(t),
|
|
131
|
-
element: u(n)
|
|
132
|
-
}),
|
|
133
|
-
async ({ items: c, element: a }) => {
|
|
134
|
-
c.length === 0 || !a || (await C(), s());
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
};
|
|
138
|
-
let k = 0;
|
|
139
|
-
function J() {
|
|
140
|
-
return ++k;
|
|
141
|
-
}
|
|
142
|
-
function tt() {
|
|
143
|
-
return J();
|
|
144
|
-
}
|
|
145
151
|
export {
|
|
146
|
-
|
|
152
|
+
tt as createI18n,
|
|
147
153
|
K as fetchVBRData,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
lt as validateColumnsName
|
|
154
|
+
et as i18n,
|
|
155
|
+
nt as useAdditionalText,
|
|
156
|
+
rt as useColumns,
|
|
157
|
+
it as useError,
|
|
158
|
+
at as useErrorProvider,
|
|
159
|
+
st as useI18n,
|
|
160
|
+
ot as useLazyLoadingState,
|
|
161
|
+
ut as useMainClass,
|
|
162
|
+
Q as usePage,
|
|
163
|
+
W as useScrollToGameDate,
|
|
164
|
+
Z as useServices,
|
|
165
|
+
ft as useSort,
|
|
166
|
+
z as useVisibilityChange,
|
|
167
|
+
ct as validateColumnsName
|
|
163
168
|
};
|
package/dist/constants.js
CHANGED