@mjsz-vbr-elements/core 2.24.1 → 2.25.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/columns.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.24.1 - 13/05/2025, 09:22:12
3
+ * version: v2.25.0 - 01/07/2025, 19:03:26
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 { SORT_STATE_ASCEND as e, SORT_STATE_DESCEND as t } from "./constants.js";
8
+ import { SORT_STATE_DESCEND as t, SORT_STATE_ASCEND as e } from "./constants.js";
9
9
  const a = {
10
10
  gameName: {
11
11
  label: "table.gameName.short",
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.24.1 - 13/05/2025, 09:22:12
3
+ * version: v2.25.0 - 01/07/2025, 19:03:26
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-C580t5lo.js";
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-CRy1AyTX.js";
9
9
  export {
10
10
  s as AdditionalStandingsText,
11
11
  r as BaseSelect,
@@ -1,31 +1,31 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.24.1 - 13/05/2025, 09:22:12
3
+ * version: v2.25.0 - 01/07/2025, 19:03:26
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 { j as S, k as D, l as E, p as b, q as I, n as p, r as T } from "./useSort-Dxgp5PGu.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-Dxgp5PGu.js";
8
+ import { j as S, k as D, l as E, p as b, q as I, n as d, r as T } from "./useSort-D-BBQTSZ.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 ct } from "./useSort-D-BBQTSZ.js";
10
10
  import { unref as u, ref as P, nextTick as B, watch as C } from "vue";
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 O } from "./datetime-Djnl319m.js";
13
- var R = /* @__PURE__ */ function() {
11
+ import { VBR_API_BASE_URL as R } from "./constants.js";
12
+ import { R as l, U as m, E as x, T as y, C as V, G as $, i as g, f as A } from "./datetime-D600LvsU.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"] = m.init, e.prototype["@@transducer/result"] = function(t) {
17
+ return e.prototype["@@transducer/init"] = l.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 = x(this.xf["@@transducer/step"](t, n))), t;
20
+ return this.f(n) && (this.found = !0, t = m(this.xf["@@transducer/step"](t, n))), t;
21
21
  }, e;
22
22
  }();
23
23
  function F(e) {
24
24
  return function(t) {
25
- return new R(e, t);
25
+ return new O(e, t);
26
26
  };
27
27
  }
28
- var G = /* @__PURE__ */ y(/* @__PURE__ */ g(["find"], F, function(t, n) {
28
+ var G = /* @__PURE__ */ x(/* @__PURE__ */ y(["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];
@@ -35,10 +35,10 @@ var G = /* @__PURE__ */ y(/* @__PURE__ */ g(["find"], F, function(t, n) {
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"] = m.init, e.prototype["@@transducer/result"] = function(t) {
38
+ return e.prototype["@@transducer/init"] = l.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 = x(this.xf["@@transducer/step"](t, this.idx))), t;
41
+ return this.idx += 1, this.f(n) && (this.found = !0, t = m(this.xf["@@transducer/step"](t, this.idx))), t;
42
42
  }, e;
43
43
  }();
44
44
  function X(e) {
@@ -46,18 +46,18 @@ function X(e) {
46
46
  return new M(e, t);
47
47
  };
48
48
  }
49
- var Y = /* @__PURE__ */ y(/* @__PURE__ */ g([], X, function(t, n) {
49
+ var Y = /* @__PURE__ */ x(/* @__PURE__ */ y([], X, 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
- })), v = /* @__PURE__ */ $(function(t, n, r) {
57
- return t(A(n, r));
56
+ })), _ = /* @__PURE__ */ V(function(t, n, r) {
57
+ return t($(n, r));
58
58
  });
59
59
  async function j(e, t, n) {
60
- const r = `${V}${u(e)}${S(n) ? "" : `?${K(n)}`}`;
60
+ const r = `${R}${u(e)}${S(n) ? "" : `?${K(n)}`}`;
61
61
  return new Promise((i, o) => {
62
62
  fetch(r, {
63
63
  method: "GET",
@@ -79,15 +79,14 @@ function K(e) {
79
79
  return Object.keys(e).map((t) => `${t}=${e[t]}`).join("&");
80
80
  }
81
81
  function L(e) {
82
- var t;
83
- return e || ((t = window.__MJSZ_VBR_WIDGET__) != null && t.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey : "");
82
+ return e || (window.__MJSZ_VBR_WIDGET__?.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey : "");
84
83
  }
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");
84
+ function U(e = {}) {
85
+ const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o = P(u(t)), a = (s) => g(s, "day");
87
86
  return D(n, () => {
88
87
  if (!i)
89
88
  return;
90
- const s = Y(v(a, "gameDate"))(u(n));
89
+ const s = Y(_(a, "gameDate"))(u(n));
91
90
  o.value = s === -1 ? 1 : Math.floor(s / r) + 1;
92
91
  }), {
93
92
  page: o,
@@ -97,48 +96,47 @@ function Q(e = {}) {
97
96
  };
98
97
  }
99
98
  function W(e = {}) {
100
- const { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, o = (f) => _(f, "day"), a = () => {
101
- var d;
99
+ const { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, o = (c) => g(c, "day"), a = () => {
102
100
  if (!u(i))
103
101
  return;
104
- const f = G(v(o, "gameDate"))(u(t));
105
- if (!f)
102
+ const c = G(_(o, "gameDate"))(u(t));
103
+ if (!c)
106
104
  return;
107
- const c = O(f.gameDate, "YYYY-MM-DD"), s = b(n).querySelector(`div[data-gamedate="${c}"]`);
105
+ const f = A(c.gameDate, "YYYY-MM-DD"), s = b(n).querySelector(`div[data-gamedate="${f}"]`);
108
106
  if (!s)
109
107
  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);
108
+ const p = getComputedStyle(s).getPropertyValue("--vbr-widget-sticky-top-offset") || 0, h = (s.getBoundingClientRect()?.top ?? 0) - u(r) - Number.parseFloat(p);
109
+ window.scrollTo(0, h);
112
110
  };
113
111
  E(
114
112
  () => ({
115
113
  items: u(t),
116
114
  element: u(n)
117
115
  }),
118
- async ({ items: f, element: c }) => {
119
- f.length === 0 || !c || (await B(), a());
116
+ async ({ items: c, element: f }) => {
117
+ c.length === 0 || !f || (await B(), a());
120
118
  }
121
119
  );
122
120
  }
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(
121
+ function Z({ options: e = {}, transform: t = (i) => i, onError: n = d, onSuccess: r = d }) {
122
+ const { path: i, apiKey: o, params: a, resetOnExecute: c = !1, immediate: f = !1 } = e, { state: s, error: p, isLoading: h, execute: v } = I(
125
123
  () => j(i, o, u(a)).then((w) => t(w)),
126
124
  [],
127
125
  {
128
- immediate: c,
129
- resetOnExecute: f,
126
+ immediate: f,
127
+ resetOnExecute: c,
130
128
  onError: n,
131
129
  onSuccess: r
132
130
  }
133
131
  );
134
132
  return {
135
133
  state: s,
136
- error: h,
137
- isLoading: l,
138
- execute: d
134
+ error: p,
135
+ isLoading: h,
136
+ execute: v
139
137
  };
140
138
  }
141
- function z(e = !1, t = p, n = p) {
139
+ function z(e = !1, t = d, n = d) {
142
140
  const r = T();
143
141
  C(r, (i) => {
144
142
  if (u(e)) {
@@ -158,10 +156,10 @@ export {
158
156
  at as useErrorProvider,
159
157
  st as useI18n,
160
158
  ot as useLazyLoadingState,
161
- Q as usePage,
159
+ U as usePage,
162
160
  W as useScrollToGameDate,
163
161
  Z as useServices,
164
162
  ut as useSort,
165
163
  z as useVisibilityChange,
166
- ft as validateColumnsName
164
+ ct as validateColumnsName
167
165
  };
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.24.1 - 13/05/2025, 09:22:12
3
+ * version: v2.25.0 - 01/07/2025, 19:03:26
4
4
  * (c) 2025
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>