@mjsz-vbr-elements/core 2.2.0 → 2.2.2

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.2.0 - 04/01/2024, 13:03:06
3
+ * version: v2.2.2 - 08/01/2024, 11:28:47
4
4
  * (c) 2024
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
@@ -1,30 +1,31 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.2.0 - 04/01/2024, 13:03:06
3
+ * version: v2.2.2 - 08/01/2024, 11:28:47
4
4
  * (c) 2024
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */
8
- import { c as m, b as c, d as n, e as p, g as d, I as S, _ as b, k as g, a as T, j as I, f as P, h as v, i as f, l as h } from "./SeasonSelector-hqWIAEq6.js";
8
+ import { m as n, c as m, b as d, d as c, e as p, g as S, I as g, _ as T, k as b, a as I, j as P, f as v, h as f, i as h, l as x } from "./AdditionalStandingsText-nuhfGhAD.js";
9
9
  import "vue";
10
- import "./useSort-WcJ_BIws.js";
11
- import "./datetime-EyEBo0-h.js";
10
+ import "./useAdditionalText-hj0kZWr7.js";
11
+ import "./datetime--bMmvxSM.js";
12
12
  import "./constants.js";
13
- import "./convert-PMHuZhPy.js";
13
+ import "./convert-rWfB71vI.js";
14
14
  import "./columns.js";
15
15
  export {
16
+ n as AdditionalStandingsText,
16
17
  m as BaseSelect,
17
- c as DataTable,
18
- n as ErrorNotice,
18
+ d as DataTable,
19
+ c as ErrorNotice,
19
20
  p as ErrorProvider,
20
- d as FloatingPanel,
21
- S as I18NProvider,
22
- b as Image,
23
- g as LoadingIndicator,
24
- T as Paginator,
25
- I as ResponsiveTable,
26
- P as ScheduleTable,
27
- v as SeasonSelector,
28
- f as StatisticsTable,
29
- h as TimezoneSelector
21
+ S as FloatingPanel,
22
+ g as I18NProvider,
23
+ T as Image,
24
+ b as LoadingIndicator,
25
+ I as Paginator,
26
+ P as ResponsiveTable,
27
+ v as ScheduleTable,
28
+ f as SeasonSelector,
29
+ h as StatisticsTable,
30
+ x as TimezoneSelector
30
31
  };
@@ -1,55 +1,55 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.2.0 - 04/01/2024, 13:03:06
3
+ * version: v2.2.2 - 08/01/2024, 11:28:47
4
4
  * (c) 2024
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, n as p, l as E, m as I, p as P } from "./useSort-WcJ_BIws.js";
9
- import { c as U, i as tt, u as et, b as nt, a as rt, d as it, e as st, f as at, g as ot, v as ut } from "./useSort-WcJ_BIws.js";
10
- import { unref as c, ref as b, watch as T, nextTick as B } from "vue";
8
+ import { k as S, l as D, n as h, m as I, p as b, q as E } from "./useAdditionalText-hj0kZWr7.js";
9
+ import { c as U, 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-hj0kZWr7.js";
10
+ import { unref as u, ref as P, watch as T, nextTick as B } from "vue";
11
11
  import { VBR_API_BASE_URL as C } from "./constants.js";
12
- import { E as m, H as x, p as y, G as g, v as V, z as M, i as v, f as O } from "./datetime-EyEBo0-h.js";
13
- var R = /* @__PURE__ */ function() {
12
+ import { F as x, I as y, p as g, H as _, x as V, w as A, i as v, f as F } from "./datetime--bMmvxSM.js";
13
+ var M = /* @__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"] = x.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 = y(this.xf["@@transducer/step"](t, n))), t;
21
21
  }, e;
22
22
  }();
23
- function A(e) {
23
+ function O(e) {
24
24
  return function(t) {
25
- return new R(e, t);
25
+ return new M(e, t);
26
26
  };
27
27
  }
28
- var F = /* @__PURE__ */ y(
29
- /* @__PURE__ */ g(["find"], A, function(t, n) {
28
+ var R = /* @__PURE__ */ g(
29
+ /* @__PURE__ */ _(["find"], O, function(t, n) {
30
30
  for (var r = 0, i = n.length; r < i; ) {
31
31
  if (t(n[r]))
32
32
  return n[r];
33
33
  r += 1;
34
34
  }
35
35
  })
36
- ), G = /* @__PURE__ */ function() {
36
+ ), X = /* @__PURE__ */ function() {
37
37
  function e(t, n) {
38
38
  this.xf = n, this.f = t, this.idx = -1, this.found = !1;
39
39
  }
40
- return e.prototype["@@transducer/init"] = m.init, e.prototype["@@transducer/result"] = function(t) {
40
+ return e.prototype["@@transducer/init"] = x.init, e.prototype["@@transducer/result"] = function(t) {
41
41
  return this.found || (t = this.xf["@@transducer/step"](t, -1)), this.xf["@@transducer/result"](t);
42
42
  }, e.prototype["@@transducer/step"] = function(t, n) {
43
- return this.idx += 1, this.f(n) && (this.found = !0, t = x(this.xf["@@transducer/step"](t, this.idx))), t;
43
+ return this.idx += 1, this.f(n) && (this.found = !0, t = y(this.xf["@@transducer/step"](t, this.idx))), t;
44
44
  }, e;
45
45
  }();
46
- function X(e) {
46
+ function Y(e) {
47
47
  return function(t) {
48
- return new G(e, t);
48
+ return new X(e, t);
49
49
  };
50
50
  }
51
- var Y = /* @__PURE__ */ y(
52
- /* @__PURE__ */ g([], X, function(t, n) {
51
+ var G = /* @__PURE__ */ g(
52
+ /* @__PURE__ */ _([], Y, function(t, n) {
53
53
  for (var r = 0, i = n.length; r < i; ) {
54
54
  if (t(n[r]))
55
55
  return r;
@@ -57,18 +57,18 @@ var Y = /* @__PURE__ */ y(
57
57
  }
58
58
  return -1;
59
59
  })
60
- ), _ = /* @__PURE__ */ V(function(t, n, r) {
61
- return t(M(n, r));
60
+ ), w = /* @__PURE__ */ V(function(t, n, r) {
61
+ return t(A(n, r));
62
62
  });
63
- const j = async (e, t, n) => {
64
- const r = `${C}${c(e)}?${K(n)}`;
63
+ const K = async (e, t, n) => {
64
+ const r = `${C}${u(e)}?${L(n)}`;
65
65
  return new Promise((i, o) => {
66
66
  fetch(r, {
67
67
  method: "GET",
68
68
  cache: "no-cache",
69
69
  headers: {
70
70
  "Content-Type": "application/json",
71
- "X-API-KEY": L(t)
71
+ "X-API-KEY": $(t)
72
72
  }
73
73
  }).then((s) => s.json()).then((s) => {
74
74
  if (s.error)
@@ -78,15 +78,15 @@ const j = async (e, t, n) => {
78
78
  o(s);
79
79
  });
80
80
  });
81
- }, K = (e) => Object.keys(e).map((t) => t + "=" + e[t]).join("&"), L = (e) => {
81
+ }, L = (e) => Object.keys(e).map((t) => t + "=" + e[t]).join("&"), $ = (e) => {
82
82
  var t;
83
83
  return e || ((t = window.__MJSZ_VBR_WIDGET__) != null && t.apiKey ? window.__MJSZ_VBR_WIDGET__.apiKey : "");
84
84
  }, W = (e = {}) => {
85
- const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o = b(c(t)), s = (a) => v(a, "day");
85
+ const { initial: t = 1, items: n = [], limit: r, auto: i = !1 } = e, o = P(u(t)), s = (a) => v(a, "day");
86
86
  return S(n, () => {
87
87
  if (!i)
88
88
  return;
89
- const a = Y(_(s, "gameDate"))(c(n));
89
+ const a = G(w(s, "gameDate"))(u(n));
90
90
  o.value = a === -1 ? 1 : Math.floor(a / r) + 1;
91
91
  }), {
92
92
  page: o,
@@ -94,29 +94,29 @@ const j = async (e, t, n) => {
94
94
  o.value = a;
95
95
  }
96
96
  };
97
- }, Z = ({ options: e = {}, transform: t = (i) => i, onError: n = p, onSuccess: r = p }) => {
98
- const { path: i, apiKey: o, params: s, resetOnExecute: u = !1, immediate: f = !1 } = e, {
97
+ }, Z = ({ options: e = {}, transform: t = (i) => i, onError: n = h, onSuccess: r = h }) => {
98
+ const { path: i, apiKey: o, params: s, resetOnExecute: d = !1, immediate: c = !1 } = e, {
99
99
  state: a,
100
- error: h,
100
+ error: f,
101
101
  isLoading: l,
102
- execute: d
103
- } = D(() => j(i, o, c(s)).then((w) => t(w)), [], {
104
- immediate: f,
105
- resetOnExecute: u,
102
+ execute: m
103
+ } = D(() => K(i, o, u(s)).then((p) => t(p)), [], {
104
+ immediate: c,
105
+ resetOnExecute: d,
106
106
  onError: n,
107
107
  onSuccess: r
108
108
  });
109
109
  return {
110
110
  state: a,
111
- error: h,
111
+ error: f,
112
112
  isLoading: l,
113
- execute: d
113
+ execute: m
114
114
  };
115
115
  };
116
- function q(e = !1, t = p, n = p) {
117
- const r = E();
116
+ function z(e = !1, t = h, n = h) {
117
+ const r = I();
118
118
  T(r, (i) => {
119
- if (c(e)) {
119
+ if (u(e)) {
120
120
  if (i === "visible")
121
121
  return t();
122
122
  n();
@@ -124,41 +124,43 @@ function q(e = !1, t = p, n = p) {
124
124
  });
125
125
  }
126
126
  const H = (e = {}) => {
127
- const { items: t = [], element: n, offset: r = 0 } = e, i = (u) => v(u, "day"), o = () => {
128
- var d;
129
- s();
130
- const u = F(_(i, "gameDate"))(c(t));
131
- if (!u)
127
+ const { items: t = [], element: n, offset: r = 0, enabled: i = !0 } = e, o = (c) => v(c, "day"), s = () => {
128
+ var p;
129
+ if (d(), !u(i))
132
130
  return;
133
- const f = O(u.gameDate, "YYYY-MM-DD"), a = P(n).querySelector(`div[data-gamedate="${f}"]`);
134
- if (!a)
131
+ const c = R(w(o, "gameDate"))(u(t));
132
+ if (!c)
135
133
  return;
136
- const h = getComputedStyle(a).getPropertyValue("--vbr-widget-sticky-top-offset") || 0, l = (((d = a.getBoundingClientRect()) == null ? void 0 : d.top) ?? 0) - c(r) - parseFloat(h);
137
- window.scrollTo(0, l);
138
- }, { stop: s } = I(
134
+ const a = F(c.gameDate, "YYYY-MM-DD"), f = E(n).querySelector(`div[data-gamedate="${a}"]`);
135
+ if (!f)
136
+ return;
137
+ 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);
138
+ window.scrollTo(0, m);
139
+ }, { stop: d } = b(
139
140
  () => ({
140
- items: c(t),
141
- element: c(n)
141
+ items: u(t),
142
+ element: u(n)
142
143
  }),
143
- async ({ items: u, element: f }) => {
144
- u.length === 0 || !f || (await B(), o());
144
+ async ({ items: c, element: a }) => {
145
+ c.length === 0 || !a || (await B(), s());
145
146
  }
146
147
  );
147
148
  };
148
149
  export {
149
150
  U as createI18n,
150
- j as fetchVBRData,
151
+ K as fetchVBRData,
151
152
  tt as i18n,
152
- et as useColumns,
153
- nt as useError,
154
- rt as useErrorProvider,
155
- it as useI18n,
156
- st as useLazyLoadingState,
157
- at as useMainClass,
153
+ et as useAdditionalText,
154
+ nt as useColumns,
155
+ rt as useError,
156
+ it as useErrorProvider,
157
+ st as useI18n,
158
+ at as useLazyLoadingState,
159
+ ot as useMainClass,
158
160
  W as usePage,
159
161
  H as useScrollToGameDate,
160
162
  Z as useServices,
161
- ot as useSort,
162
- q as useVisibilityChange,
163
- ut as validateColumnsName
163
+ ut as useSort,
164
+ z as useVisibilityChange,
165
+ ct as validateColumnsName
164
166
  };
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.2.0 - 04/01/2024, 13:03:06
3
+ * version: v2.2.2 - 08/01/2024, 11:28:47
4
4
  * (c) 2024
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.2.0 - 04/01/2024, 13:03:06
3
+ * version: v2.2.2 - 08/01/2024, 11:28:47
4
4
  * (c) 2024
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */
8
8
  import { SORT_STATE_ORIGINAL as P, SORT_STATE_ASCEND as j } from "./constants.js";
9
- import { p as f, x as D, q as g, z as h, _ as p, j as v, k as $, A as b, v as c, B as _, C as M, w as T, D as G, E as U, F as H, G as k, H as q, I as X, J as K, n as S, r as Y, K as J, f as m, c as E, b as Q, a as V } from "./datetime-EyEBo0-h.js";
9
+ import { p as f, A as D, q as g, w as h, _ as p, j as v, k as $, B as b, x as c, C as _, D as M, z as T, E as G, F as U, G as H, H as k, I as q, J as X, K, n as S, r as Y, v as J, f as m, c as E, b as Q, a as V } from "./datetime--bMmvxSM.js";
10
10
  var Z = /* @__PURE__ */ f(function(e, r) {
11
11
  if (e === r)
12
12
  return r;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.2.0 - 04/01/2024, 13:03:06
3
+ * version: v2.2.2 - 08/01/2024, 11:28:47
4
4
  * (c) 2024
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
@@ -1102,17 +1102,17 @@ const ze = () => I.tz.guess(), Le = (e = "", t = "", r = "", n = "hu") => (r = r
1102
1102
  return [t.toString().padStart(2, "0"), r.toString().padStart(2, "0")].join(":");
1103
1103
  }, Fe = (e, t = "day") => I().isSameOrBefore(I(e), t), He = (e, t, r) => I(e).isBetween(t, I(r)), Ne = (e, t, r = "month") => I(e).isSame(t, r), Ue = (e, t = "hu") => I(e).locale(t).toNow(!0);
1104
1104
  export {
1105
- gt as A,
1106
- yt as B,
1107
- _t as C,
1108
- dt as D,
1109
- rt as E,
1110
- vt as F,
1111
- $t as G,
1112
- je as H,
1113
- qt as I,
1114
- ue as J,
1115
- Jt as K,
1105
+ Qt as A,
1106
+ gt as B,
1107
+ yt as C,
1108
+ _t as D,
1109
+ dt as E,
1110
+ rt as F,
1111
+ vt as G,
1112
+ $t as H,
1113
+ je as I,
1114
+ qt as J,
1115
+ ue as K,
1116
1116
  E as _,
1117
1117
  Ie as a,
1118
1118
  ke as b,
@@ -1135,9 +1135,9 @@ export {
1135
1135
  se as s,
1136
1136
  xe as t,
1137
1137
  J as u,
1138
- De as v,
1139
- nt as w,
1140
- Qt as x,
1138
+ Jt as v,
1139
+ Te as w,
1140
+ De as x,
1141
1141
  Ue as y,
1142
- Te as z
1142
+ nt as z
1143
1143
  };