@mjsz-vbr-elements/core 2.8.0 → 2.9.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/{AdditionalStandingsText-Cyb6wiJD.js → AdditionalStandingsText-BiRMcxjC.js} +4 -4
- package/dist/columns.js +2 -2
- package/dist/components.js +3 -3
- package/dist/composables.js +66 -59
- package/dist/constants.js +2 -2
- package/dist/{convert-DeSqjxv8.js → convert-C_k4-oaF.js} +93 -84
- package/dist/datetime-BzdN4htO.js +2 -2
- package/dist/index.iife.js +5 -5
- package/dist/index.iife.js.br +0 -0
- package/dist/index.iife.js.gz +0 -0
- package/dist/index.js +96 -94
- package/dist/{useAdditionalText-D1LaWU-i.js → useAdditionalText-BCKSsRDN.js} +8 -7
- package/dist/utils.js +53 -52
- package/package.json +2 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @mjsz-vbr-elements/core
|
|
3
|
-
* version: v2.
|
|
4
|
-
* (c)
|
|
3
|
+
* version: v2.9.0 - 09/01/2025, 14:35:52
|
|
4
|
+
* (c) 2025
|
|
5
5
|
* description: Data visualization for MJSZ VBR
|
|
6
6
|
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
7
|
*/
|
|
8
8
|
import { computed as $, ref as O, watch as Ct, getCurrentScope as we, onScopeDispose as Te, unref as u, getCurrentInstance as xe, onMounted as Pe, defineComponent as Qt, onUnmounted as ke, h as Se, withDirectives as Ae, openBlock as v, createElementBlock as w, normalizeClass as z, renderSlot as R, vModelSelect as _e, createElementVNode as b, isRef as ze, Fragment as M, normalizeStyle as Bt, createVNode as C, Transition as $e, withCtx as P, createTextVNode as D, toDisplayString as x, createCommentVNode as A, toRefs as Nt, renderList as tt, createBlock as E, withKeys as Ft, withModifiers as it, createSlots as Oe, toRef as Ie } from "vue";
|
|
9
|
-
import { f as U, o as Ce, e as Ge, d as Z, a as Ee, c as Re, j as Ne, n as Ve, i as Le, b as te, u as ee, w as De, h as Me } from "./useAdditionalText-
|
|
9
|
+
import { f as U, o as Ce, e as Ge, d as Z, a as Ee, c as Re, j as Ne, n as Ve, i as Le, b as te, u as ee, w as De, h as Me } from "./useAdditionalText-BCKSsRDN.js";
|
|
10
10
|
import { J as oe, K as vt, z as jt, C as He, o as bt, g as Be } from "./datetime-BzdN4htO.js";
|
|
11
11
|
import { LAZY_LOADING_STATE_DELAY as Fe, SORT_STATE_ORIGINAL as zt, SORT_STATE_DESCEND as Wt, SORT_STATE_ASCEND as Kt, AVAILABLE_TIMEZONES_BY_COUNTRY as je, DEFAULT_PORTRAIT_IMAGE_URL as We } from "./constants.js";
|
|
12
|
-
import { m as Ke, W as ne, U as Tt } from "./convert-
|
|
12
|
+
import { m as Ke, W as ne, U as Tt } from "./convert-C_k4-oaF.js";
|
|
13
13
|
import { COLUMNS_SCHEDULE as Je } from "./columns.js";
|
|
14
14
|
function qe(t) {
|
|
15
15
|
return we() ? (Te(t), !0) : !1;
|
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.
|
|
4
|
-
* (c)
|
|
3
|
+
* version: v2.9.0 - 09/01/2025, 14:35:52
|
|
4
|
+
* (c) 2025
|
|
5
5
|
* description: Data visualization for MJSZ VBR
|
|
6
6
|
* author: Ákos Stegner <akos.stegner@gmail.com>
|
|
7
7
|
*/
|
|
8
|
-
import { n as s, c as r, b as o, d as t, e as i, m as l, g as n, I as c, _ as d, k as S, a as b, j as g, f as T, h as m, i as v, l as I } from "./AdditionalStandingsText-
|
|
8
|
+
import { n as s, c as r, b as o, d as t, e as i, m as l, g as n, I as c, _ as d, k as S, a as b, j as g, f as T, h as m, i as v, l as I } from "./AdditionalStandingsText-BiRMcxjC.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.
|
|
4
|
-
* (c)
|
|
3
|
+
* version: v2.9.0 - 09/01/2025, 14:35:52
|
|
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 D, n as
|
|
9
|
-
import { c as
|
|
10
|
-
import { unref as u, ref as
|
|
11
|
-
import { VBR_API_BASE_URL as
|
|
12
|
-
import { Q as x, T as y, C as g, S as _, J as
|
|
13
|
-
var
|
|
8
|
+
import { k as S, l as I, m as D, n as l, p as E, q as T, r as b } from "./useAdditionalText-BCKSsRDN.js";
|
|
9
|
+
import { c as rt, i as it, h as st, u as at, b as ot, a as ut, d as ct, e as ft, f as dt, g as pt, v as lt } from "./useAdditionalText-BCKSsRDN.js";
|
|
10
|
+
import { unref as u, ref as P, watch as B, nextTick as C } from "vue";
|
|
11
|
+
import { VBR_API_BASE_URL as V } from "./constants.js";
|
|
12
|
+
import { Q as x, T as y, C as g, S as _, J as A, I as M, i as v, f as O } from "./datetime-BzdN4htO.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 = y(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 X = /* @__PURE__ */ g(/* @__PURE__ */ _(["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
|
+
})), Y = /* @__PURE__ */ function() {
|
|
35
35
|
function e(t, n) {
|
|
36
36
|
this.xf = n, this.f = t, this.idx = -1, this.found = !1;
|
|
37
37
|
}
|
|
@@ -41,30 +41,30 @@ var F = /* @__PURE__ */ g(/* @__PURE__ */ _(["find"], R, function(t, n) {
|
|
|
41
41
|
return this.idx += 1, this.f(n) && (this.found = !0, t = y(this.xf["@@transducer/step"](t, this.idx))), t;
|
|
42
42
|
}, e;
|
|
43
43
|
}();
|
|
44
|
-
function
|
|
44
|
+
function $(e) {
|
|
45
45
|
return function(t) {
|
|
46
|
-
return new
|
|
46
|
+
return new Y(e, t);
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
var G = /* @__PURE__ */ g(/* @__PURE__ */ _([],
|
|
49
|
+
var G = /* @__PURE__ */ g(/* @__PURE__ */ _([], $, 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
|
-
})), w = /* @__PURE__ */
|
|
57
|
-
return t(
|
|
56
|
+
})), w = /* @__PURE__ */ A(function(t, n, r) {
|
|
57
|
+
return t(M(n, r));
|
|
58
58
|
});
|
|
59
59
|
const K = async (e, t, n) => {
|
|
60
|
-
const r = `${
|
|
60
|
+
const r = `${V}${u(e)}${S(n) ? "" : `?${L(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": j(t)
|
|
68
68
|
}
|
|
69
69
|
}).then((s) => s.json()).then((s) => {
|
|
70
70
|
if (s.error) return o(s);
|
|
@@ -73,12 +73,12 @@ const K = async (e, t, n) => {
|
|
|
73
73
|
o(s);
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
|
-
}, L = (e) => Object.keys(e).map((t) => t + "=" + e[t]).join("&"),
|
|
76
|
+
}, L = (e) => Object.keys(e).map((t) => t + "=" + e[t]).join("&"), j = (e) => {
|
|
77
77
|
var t;
|
|
78
78
|
return e || ((t = window.__MJSZ_VBR_WIDGET__) != null && t.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey : "");
|
|
79
|
-
},
|
|
80
|
-
const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o =
|
|
81
|
-
return
|
|
79
|
+
}, z = (e = {}) => {
|
|
80
|
+
const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o = P(u(t)), s = (a) => v(a, "day");
|
|
81
|
+
return I(n, () => {
|
|
82
82
|
if (!i) return;
|
|
83
83
|
const a = G(w(s, "gameDate"))(u(n));
|
|
84
84
|
o.value = a === -1 ? 1 : Math.floor(a / r) + 1;
|
|
@@ -88,43 +88,42 @@ const K = async (e, t, n) => {
|
|
|
88
88
|
o.value = a;
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
-
},
|
|
92
|
-
const { path: i, apiKey: o, params: s, resetOnExecute: d = !1, immediate: c = !1 } = e, {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
});
|
|
91
|
+
}, N = ({ options: e = {}, transform: t = (i) => i, onError: n = l, onSuccess: r = l }) => {
|
|
92
|
+
const { path: i, apiKey: o, params: s, resetOnExecute: d = !1, immediate: c = !1 } = e, { state: a, error: f, isLoading: h, execute: m } = D(
|
|
93
|
+
() => K(i, o, u(s)).then((p) => t(p)),
|
|
94
|
+
[],
|
|
95
|
+
{
|
|
96
|
+
immediate: c,
|
|
97
|
+
resetOnExecute: d,
|
|
98
|
+
onError: n,
|
|
99
|
+
onSuccess: r
|
|
100
|
+
}
|
|
101
|
+
);
|
|
103
102
|
return {
|
|
104
103
|
state: a,
|
|
105
104
|
error: f,
|
|
106
|
-
isLoading:
|
|
105
|
+
isLoading: h,
|
|
107
106
|
execute: m
|
|
108
107
|
};
|
|
109
108
|
};
|
|
110
|
-
function
|
|
111
|
-
const r =
|
|
112
|
-
|
|
109
|
+
function U(e = !1, t = l, n = l) {
|
|
110
|
+
const r = E();
|
|
111
|
+
B(r, (i) => {
|
|
113
112
|
if (u(e)) {
|
|
114
113
|
if (i === "visible") return t();
|
|
115
114
|
n();
|
|
116
115
|
}
|
|
117
116
|
});
|
|
118
117
|
}
|
|
119
|
-
const
|
|
118
|
+
const H = (e = {}) => {
|
|
120
119
|
const { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, o = (c) => v(c, "day"), s = () => {
|
|
121
120
|
var p;
|
|
122
121
|
if (d(), !u(i)) return;
|
|
123
|
-
const c =
|
|
122
|
+
const c = X(w(o, "gameDate"))(u(t));
|
|
124
123
|
if (!c) return;
|
|
125
|
-
const a =
|
|
124
|
+
const a = O(c.gameDate, "YYYY-MM-DD"), f = b(n).querySelector(`div[data-gamedate="${a}"]`);
|
|
126
125
|
if (!f) return;
|
|
127
|
-
const
|
|
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);
|
|
128
127
|
window.scrollTo(0, m);
|
|
129
128
|
}, { stop: d } = T(
|
|
130
129
|
() => ({
|
|
@@ -132,25 +131,33 @@ const z = (e = {}) => {
|
|
|
132
131
|
element: u(n)
|
|
133
132
|
}),
|
|
134
133
|
async ({ items: c, element: a }) => {
|
|
135
|
-
c.length === 0 || !a || (await
|
|
134
|
+
c.length === 0 || !a || (await C(), s());
|
|
136
135
|
}
|
|
137
136
|
);
|
|
138
137
|
};
|
|
138
|
+
let k = 0;
|
|
139
|
+
function J() {
|
|
140
|
+
return ++k;
|
|
141
|
+
}
|
|
142
|
+
function tt() {
|
|
143
|
+
return J();
|
|
144
|
+
}
|
|
139
145
|
export {
|
|
140
|
-
|
|
146
|
+
rt as createI18n,
|
|
141
147
|
K as fetchVBRData,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
z as
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
148
|
+
it as i18n,
|
|
149
|
+
st as useAdditionalText,
|
|
150
|
+
at as useColumns,
|
|
151
|
+
ot as useError,
|
|
152
|
+
ut as useErrorProvider,
|
|
153
|
+
ct as useI18n,
|
|
154
|
+
tt as useId,
|
|
155
|
+
ft as useLazyLoadingState,
|
|
156
|
+
dt as useMainClass,
|
|
157
|
+
z as usePage,
|
|
158
|
+
H as useScrollToGameDate,
|
|
159
|
+
N as useServices,
|
|
160
|
+
pt as useSort,
|
|
161
|
+
U as useVisibilityChange,
|
|
162
|
+
lt as validateColumnsName
|
|
156
163
|
};
|
package/dist/constants.js
CHANGED