@mjsz-vbr-elements/core 2.11.3 → 2.12.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/dist/{TimezoneSelector-CNpTsLPu.js → TimezoneSelector-CZSwXNuA.js} +810 -816
- package/dist/columns.js +1 -1
- package/dist/components.js +2 -2
- package/dist/composables.js +40 -41
- package/dist/constants.js +1 -1
- package/dist/datetime-K_d-hEsO.js +1 -1
- package/dist/errors-DBdI9YRN.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 +80 -81
- package/dist/{useSort-CmtczEGw.js → useSort-D29iq9K6.js} +66 -70
- package/dist/utils.js +1 -1
- package/package.json +3 -5
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.12.0 - 19/01/2025, 23:11:29
|
|
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 { _ 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-
|
|
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-CZSwXNuA.js";
|
|
9
9
|
export {
|
|
10
10
|
s as AdditionalStandingsText,
|
|
11
11
|
r as BaseSelect,
|
package/dist/composables.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.
|
|
3
|
+
* version: v2.12.0 - 19/01/2025, 23:11:29
|
|
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 {
|
|
9
|
-
import { d as tt, i as et, u as nt, a as rt, c as it, b as
|
|
8
|
+
import { j as S, k as D, l as E, p as b, q as I, n as p, r as T } from "./useSort-D29iq9K6.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, v as ft } from "./useSort-D29iq9K6.js";
|
|
10
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 m, T as x, E as y, S as g, C as $, G as A, i as _, f as
|
|
13
|
-
var
|
|
12
|
+
import { Q as m, T as x, E as y, S as g, C as $, G as A, i as _, f as O } from "./datetime-K_d-hEsO.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
|
}
|
|
@@ -20,18 +20,18 @@ var O = /* @__PURE__ */ function() {
|
|
|
20
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 F(e) {
|
|
24
24
|
return function(t) {
|
|
25
|
-
return new
|
|
25
|
+
return new R(e, t);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
var
|
|
28
|
+
var G = /* @__PURE__ */ y(/* @__PURE__ */ g(["find"], F, 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
|
+
})), M = /* @__PURE__ */ function() {
|
|
35
35
|
function e(t, n) {
|
|
36
36
|
this.xf = n, this.f = t, this.idx = -1, this.found = !1;
|
|
37
37
|
}
|
|
@@ -43,7 +43,7 @@ var F = /* @__PURE__ */ y(/* @__PURE__ */ g(["find"], R, function(t, n) {
|
|
|
43
43
|
}();
|
|
44
44
|
function X(e) {
|
|
45
45
|
return function(t) {
|
|
46
|
-
return new
|
|
46
|
+
return new M(e, t);
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
var Y = /* @__PURE__ */ y(/* @__PURE__ */ g([], X, function(t, n) {
|
|
@@ -56,58 +56,58 @@ var Y = /* @__PURE__ */ y(/* @__PURE__ */ g([], X, function(t, n) {
|
|
|
56
56
|
})), v = /* @__PURE__ */ $(function(t, n, r) {
|
|
57
57
|
return t(A(n, r));
|
|
58
58
|
});
|
|
59
|
-
async function
|
|
60
|
-
const r = `${V}${u(e)}${S(n) ? "" : `?${
|
|
59
|
+
async function j(e, t, n) {
|
|
60
|
+
const r = `${V}${u(e)}${S(n) ? "" : `?${K(n)}`}`;
|
|
61
61
|
return new Promise((i, o) => {
|
|
62
62
|
fetch(r, {
|
|
63
63
|
method: "GET",
|
|
64
64
|
cache: "no-cache",
|
|
65
65
|
headers: {
|
|
66
66
|
"Content-Type": "application/json",
|
|
67
|
-
"X-API-KEY":
|
|
67
|
+
"X-API-KEY": L(t)
|
|
68
68
|
}
|
|
69
|
-
}).then((
|
|
70
|
-
if (
|
|
71
|
-
return o(
|
|
72
|
-
i(
|
|
73
|
-
}).catch((
|
|
74
|
-
o(
|
|
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);
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function K(e) {
|
|
79
79
|
return Object.keys(e).map((t) => `${t}=${e[t]}`).join("&");
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function L(e) {
|
|
82
82
|
var t;
|
|
83
83
|
return e || ((t = window.__MJSZ_VBR_WIDGET__) != null && t.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey : "");
|
|
84
84
|
}
|
|
85
85
|
function Q(e = {}) {
|
|
86
|
-
const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o = P(u(t)),
|
|
86
|
+
const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o = P(u(t)), a = (s) => _(s, "day");
|
|
87
87
|
return D(n, () => {
|
|
88
88
|
if (!i)
|
|
89
89
|
return;
|
|
90
|
-
const
|
|
91
|
-
o.value =
|
|
90
|
+
const s = Y(v(a, "gameDate"))(u(n));
|
|
91
|
+
o.value = s === -1 ? 1 : Math.floor(s / r) + 1;
|
|
92
92
|
}), {
|
|
93
93
|
page: o,
|
|
94
|
-
change: (
|
|
95
|
-
o.value =
|
|
94
|
+
change: (s) => {
|
|
95
|
+
o.value = s;
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
function W(e = {}) {
|
|
100
|
-
const { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, o = (f) => _(f, "day"),
|
|
100
|
+
const { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, o = (f) => _(f, "day"), a = () => {
|
|
101
101
|
var d;
|
|
102
102
|
if (!u(i))
|
|
103
103
|
return;
|
|
104
|
-
const f =
|
|
104
|
+
const f = G(v(o, "gameDate"))(u(t));
|
|
105
105
|
if (!f)
|
|
106
106
|
return;
|
|
107
|
-
const c =
|
|
108
|
-
if (!
|
|
107
|
+
const c = O(f.gameDate, "YYYY-MM-DD"), s = b(n).querySelector(`div[data-gamedate="${c}"]`);
|
|
108
|
+
if (!s)
|
|
109
109
|
return;
|
|
110
|
-
const h = getComputedStyle(
|
|
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
111
|
window.scrollTo(0, l);
|
|
112
112
|
};
|
|
113
113
|
E(
|
|
@@ -116,13 +116,13 @@ function W(e = {}) {
|
|
|
116
116
|
element: u(n)
|
|
117
117
|
}),
|
|
118
118
|
async ({ items: f, element: c }) => {
|
|
119
|
-
f.length === 0 || !c || (await B(),
|
|
119
|
+
f.length === 0 || !c || (await B(), a());
|
|
120
120
|
}
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
function Z({ options: e = {}, transform: t = (i) => i, onError: n = p, onSuccess: r = p }) {
|
|
124
|
-
const { path: i, apiKey: o, params:
|
|
125
|
-
() =>
|
|
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
|
+
() => j(i, o, u(a)).then((w) => t(w)),
|
|
126
126
|
[],
|
|
127
127
|
{
|
|
128
128
|
immediate: c,
|
|
@@ -132,7 +132,7 @@ function Z({ options: e = {}, transform: t = (i) => i, onError: n = p, onSuccess
|
|
|
132
132
|
}
|
|
133
133
|
);
|
|
134
134
|
return {
|
|
135
|
-
state:
|
|
135
|
+
state: s,
|
|
136
136
|
error: h,
|
|
137
137
|
isLoading: l,
|
|
138
138
|
execute: d
|
|
@@ -150,19 +150,18 @@ function z(e = !1, t = p, n = p) {
|
|
|
150
150
|
}
|
|
151
151
|
export {
|
|
152
152
|
tt as createI18n,
|
|
153
|
-
|
|
153
|
+
j as fetchVBRData,
|
|
154
154
|
et as i18n,
|
|
155
155
|
nt as useAdditionalText,
|
|
156
156
|
rt as useColumns,
|
|
157
157
|
it as useError,
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
at as useErrorProvider,
|
|
159
|
+
st as useI18n,
|
|
160
160
|
ot as useLazyLoadingState,
|
|
161
|
-
ut as useMainClass,
|
|
162
161
|
Q as usePage,
|
|
163
162
|
W as useScrollToGameDate,
|
|
164
163
|
Z as useServices,
|
|
165
|
-
|
|
164
|
+
ut as useSort,
|
|
166
165
|
z as useVisibilityChange,
|
|
167
|
-
|
|
166
|
+
ft as validateColumnsName
|
|
168
167
|
};
|
package/dist/constants.js
CHANGED
package/dist/errors-DBdI9YRN.js
CHANGED