@mjsz-vbr-elements/core 2.8.0 → 2.9.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.
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.8.0 - 11/12/2024, 21:34:58
4
- * (c) 2024
3
+ * version: v2.9.1 - 09/01/2025, 16:02:42
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-D1LaWU-i.js";
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-DeSqjxv8.js";
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.8.0 - 11/12/2024, 21:34:58
4
- * (c) 2024
3
+ * version: v2.9.1 - 09/01/2025, 16:02:42
4
+ * (c) 2025
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.8.0 - 11/12/2024, 21:34:58
4
- * (c) 2024
3
+ * version: v2.9.1 - 09/01/2025, 16:02:42
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-Cyb6wiJD.js";
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,
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.8.0 - 11/12/2024, 21:34:58
4
- * (c) 2024
3
+ * version: v2.9.1 - 09/01/2025, 16:02:42
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 h, m as I, p as T, q as b } from "./useAdditionalText-D1LaWU-i.js";
9
- import { c as H, i as tt, h as et, u as nt, b as rt, a as it, d as st, e as at, f as ot, g as ut, v as ct } from "./useAdditionalText-D1LaWU-i.js";
10
- import { unref as u, ref as E, watch as P, nextTick as B } from "vue";
11
- import { VBR_API_BASE_URL as C } from "./constants.js";
12
- import { Q as x, T as y, C as g, S as _, J as V, I as A, i as v, f as M } from "./datetime-BzdN4htO.js";
13
- var O = /* @__PURE__ */ function() {
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 R(e) {
23
+ function F(e) {
24
24
  return function(t) {
25
- return new O(e, t);
25
+ return new R(e, t);
26
26
  };
27
27
  }
28
- var F = /* @__PURE__ */ g(/* @__PURE__ */ _(["find"], R, function(t, n) {
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
- })), X = /* @__PURE__ */ function() {
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 Y(e) {
44
+ function $(e) {
45
45
  return function(t) {
46
- return new X(e, t);
46
+ return new Y(e, t);
47
47
  };
48
48
  }
49
- var G = /* @__PURE__ */ g(/* @__PURE__ */ _([], Y, function(t, n) {
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__ */ V(function(t, n, r) {
57
- return t(A(n, r));
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 = `${C}${u(e)}?${L(n)}`;
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": $(t)
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("&"), $ = (e) => {
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
- }, Q = (e = {}) => {
80
- const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o = E(u(t)), s = (a) => v(a, "day");
81
- return S(n, () => {
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
- }, W = ({ options: e = {}, transform: t = (i) => i, onError: n = h, onSuccess: r = h }) => {
92
- const { path: i, apiKey: o, params: s, resetOnExecute: d = !1, immediate: c = !1 } = e, {
93
- state: a,
94
- error: f,
95
- isLoading: l,
96
- execute: m
97
- } = D(() => K(i, o, u(s)).then((p) => t(p)), [], {
98
- immediate: c,
99
- resetOnExecute: d,
100
- onError: n,
101
- onSuccess: r
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: l,
105
+ isLoading: h,
107
106
  execute: m
108
107
  };
109
108
  };
110
- function Z(e = !1, t = h, n = h) {
111
- const r = I();
112
- P(r, (i) => {
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 z = (e = {}) => {
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 = F(w(o, "gameDate"))(u(t));
122
+ const c = X(w(o, "gameDate"))(u(t));
124
123
  if (!c) return;
125
- const a = M(c.gameDate, "YYYY-MM-DD"), f = b(n).querySelector(`div[data-gamedate="${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 l = getComputedStyle(f).getPropertyValue("--vbr-widget-sticky-top-offset") || 0, m = (((p = f.getBoundingClientRect()) == null ? void 0 : p.top) ?? 0) - u(r) - parseFloat(l);
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 B(), s());
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
- H as createI18n,
146
+ rt as createI18n,
141
147
  K as fetchVBRData,
142
- tt as i18n,
143
- et as useAdditionalText,
144
- nt as useColumns,
145
- rt as useError,
146
- it as useErrorProvider,
147
- st as useI18n,
148
- at as useLazyLoadingState,
149
- ot as useMainClass,
150
- Q as usePage,
151
- z as useScrollToGameDate,
152
- W as useServices,
153
- ut as useSort,
154
- Z as useVisibilityChange,
155
- ct as validateColumnsName
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
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.8.0 - 11/12/2024, 21:34:58
4
- * (c) 2024
3
+ * version: v2.9.1 - 09/01/2025, 16:02:42
4
+ * (c) 2025
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */