@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/columns.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.11.3 - 15/01/2025, 13:04:28
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>
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.11.3 - 15/01/2025, 13:04:28
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-CNpTsLPu.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-CZSwXNuA.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.11.3 - 15/01/2025, 13:04:28
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 { k as S, l as D, p as E, q as b, r as I, n as p, s as T } from "./useSort-CmtczEGw.js";
9
- import { d as tt, i as et, u as nt, a as rt, c as it, b as st, e as at, f as ot, g as ut, h as ft, v as ct } from "./useSort-CmtczEGw.js";
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 M } from "./datetime-K_d-hEsO.js";
13
- var O = /* @__PURE__ */ function() {
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 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__ */ y(/* @__PURE__ */ g(["find"], R, function(t, n) {
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
- })), G = /* @__PURE__ */ function() {
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 G(e, t);
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 K(e, t, n) {
60
- const r = `${V}${u(e)}${S(n) ? "" : `?${L(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": j(t)
67
+ "X-API-KEY": L(t)
68
68
  }
69
- }).then((s) => s.json()).then((s) => {
70
- if (s.error)
71
- return o(s);
72
- i(s.data);
73
- }).catch((s) => {
74
- o(s);
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 L(e) {
78
+ function K(e) {
79
79
  return Object.keys(e).map((t) => `${t}=${e[t]}`).join("&");
80
80
  }
81
- function j(e) {
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)), s = (a) => _(a, "day");
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 a = Y(v(s, "gameDate"))(u(n));
91
- o.value = a === -1 ? 1 : Math.floor(a / r) + 1;
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: (a) => {
95
- o.value = a;
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"), s = () => {
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 = F(v(o, "gameDate"))(u(t));
104
+ const f = G(v(o, "gameDate"))(u(t));
105
105
  if (!f)
106
106
  return;
107
- const c = M(f.gameDate, "YYYY-MM-DD"), a = b(n).querySelector(`div[data-gamedate="${c}"]`);
108
- if (!a)
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(a).getPropertyValue("--vbr-widget-sticky-top-offset") || 0, l = (((d = a.getBoundingClientRect()) == null ? void 0 : d.top) ?? 0) - u(r) - Number.parseFloat(h);
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(), s());
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: s, resetOnExecute: f = !1, immediate: c = !1 } = e, { state: a, error: h, isLoading: l, execute: d } = I(
125
- () => K(i, o, u(s)).then((w) => t(w)),
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: a,
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
- K as fetchVBRData,
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
- st as useErrorProvider,
159
- at as useI18n,
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
- ft as useSort,
164
+ ut as useSort,
166
165
  z as useVisibilityChange,
167
- ct as validateColumnsName
166
+ ft as validateColumnsName
168
167
  };
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.11.3 - 15/01/2025, 13:04:28
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>
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.11.3 - 15/01/2025, 13:04:28
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>
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.11.3 - 15/01/2025, 13:04:28
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>