@mjsz-vbr-elements/core 2.3.8 → 2.4.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.
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.3.8 - 21/05/2024, 10:10:53
3
+ * version: v2.4.0 - 06/06/2024, 12:35:57
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 { ref as E, readonly as ut, watch as _, nextTick as lt, getCurrentScope as _t, onScopeDispose as xt, unref as I, isRef as Pt, shallowRef as nt, computed as C, reactive as ft, defineComponent as Rt, h as Ct, provide as dt, inject as pt, onErrorCaptured as Lt } from "vue";
9
- import { _ as M, j as jt, k as Nt, l as Dt, m as kt, n as Ft, p as Bt, q as D, s as k, r as Ut, t as Vt, u as Wt, v as Mt, w as rt } from "./datetime-C3O51pdW.js";
10
- import { SORT_STATE_ORIGINAL as B, SORT_STATE_DESCEND as K, SORT_STATE_ASCEND as V } from "./constants.js";
8
+ import { ref as b, readonly as ut, watch as _, nextTick as lt, getCurrentScope as _t, onScopeDispose as xt, unref as I, isRef as Ct, shallowRef as nt, computed as R, reactive as ft, defineComponent as Pt, h as Rt, provide as dt, inject as pt, onErrorCaptured as Lt } from "vue";
9
+ import { _ as M, w as jt, x as Nt, z as Dt, A as Ft, B as kt, C as Bt, D, E as F, F as Ut, u as Vt, G as Wt, H as Mt, I as rt } from "./datetime-Df9jKQTx.js";
10
+ import { SORT_STATE_ORIGINAL as B, SORT_STATE_DESCEND as H, SORT_STATE_ASCEND as V } from "./constants.js";
11
11
  var zt = { VITE_VBR_API_URL: "https://api.icehockey.hu/vbr", VITE_VBR_API_KEY: "", VITE_USER_NODE_ENV: "production", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
12
- const Te = (t) => (zt.VITE_CSS_CLASS_PREFIX || "mjsz-vbr-") + t;
12
+ const Ae = (t) => (zt.VITE_CSS_CLASS_PREFIX || "mjsz-vbr-") + t;
13
13
  function mt(t) {
14
14
  return _t() ? (xt(t), !0) : !1;
15
15
  }
@@ -18,13 +18,13 @@ function O(t) {
18
18
  }
19
19
  const $ = typeof window < "u" && typeof document < "u";
20
20
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
21
- const $t = Object.prototype.toString, qt = (t) => $t.call(t) === "[object Object]", R = () => {
22
- }, Gt = /* @__PURE__ */ Kt();
23
- function Kt() {
21
+ const $t = Object.prototype.toString, Gt = (t) => $t.call(t) === "[object Object]", P = () => {
22
+ }, qt = /* @__PURE__ */ Ht();
23
+ function Ht() {
24
24
  var t, e;
25
25
  return $ && ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
26
26
  }
27
- function Ht(t, e) {
27
+ function Kt(t, e) {
28
28
  function r(...n) {
29
29
  return new Promise((i, o) => {
30
30
  Promise.resolve(t(() => e.apply(this, n), { fn: e, thisArg: this, args: n })).then(i).catch(o);
@@ -34,7 +34,7 @@ function Ht(t, e) {
34
34
  }
35
35
  const vt = (t) => t();
36
36
  function Xt(t = vt) {
37
- const e = E(!0);
37
+ const e = b(!0);
38
38
  function r() {
39
39
  e.value = !1;
40
40
  }
@@ -58,14 +58,14 @@ function Yt(t, e, r = {}) {
58
58
  } = r;
59
59
  return _(
60
60
  t,
61
- Ht(
61
+ Kt(
62
62
  n,
63
63
  e
64
64
  ),
65
65
  i
66
66
  );
67
67
  }
68
- function Ae(t, e, r = {}) {
68
+ function Te(t, e, r = {}) {
69
69
  const {
70
70
  eventFilter: n,
71
71
  ...i
@@ -80,13 +80,13 @@ function Ae(t, e, r = {}) {
80
80
  ), pause: s, resume: c, isActive: u };
81
81
  }
82
82
  function Y(t, e = !1) {
83
- function r(l, { flush: a = "sync", deep: f = !1, timeout: d, throwOnTimeout: T } = {}) {
83
+ function r(l, { flush: a = "sync", deep: f = !1, timeout: d, throwOnTimeout: A } = {}) {
84
84
  let w = null;
85
- const b = [new Promise((A) => {
85
+ const E = [new Promise((T) => {
86
86
  w = _(
87
87
  t,
88
88
  (v) => {
89
- l(v) !== e && (w == null || w(), A(v));
89
+ l(v) !== e && (w == null || w(), T(v));
90
90
  },
91
91
  {
92
92
  flush: a,
@@ -95,20 +95,20 @@ function Y(t, e = !1) {
95
95
  }
96
96
  );
97
97
  })];
98
- return d != null && b.push(
99
- X(d, T).then(() => O(t)).finally(() => w == null ? void 0 : w())
100
- ), Promise.race(b);
98
+ return d != null && E.push(
99
+ X(d, A).then(() => O(t)).finally(() => w == null ? void 0 : w())
100
+ ), Promise.race(E);
101
101
  }
102
102
  function n(l, a) {
103
- if (!Pt(l))
103
+ if (!Ct(l))
104
104
  return r((v) => v === l, a);
105
- const { flush: f = "sync", deep: d = !1, timeout: T, throwOnTimeout: w } = a ?? {};
105
+ const { flush: f = "sync", deep: d = !1, timeout: A, throwOnTimeout: w } = a ?? {};
106
106
  let y = null;
107
- const A = [new Promise((v) => {
107
+ const T = [new Promise((v) => {
108
108
  y = _(
109
109
  [t, l],
110
- ([L, F]) => {
111
- e !== (L === F) && (y == null || y(), v(L));
110
+ ([L, k]) => {
111
+ e !== (L === k) && (y == null || y(), v(L));
112
112
  },
113
113
  {
114
114
  flush: f,
@@ -117,9 +117,9 @@ function Y(t, e = !1) {
117
117
  }
118
118
  );
119
119
  })];
120
- return T != null && A.push(
121
- X(T, w).then(() => O(t)).finally(() => (y == null || y(), O(t)))
122
- ), Promise.race(A);
120
+ return A != null && T.push(
121
+ X(A, w).then(() => O(t)).finally(() => (y == null || y(), O(t)))
122
+ ), Promise.race(T);
123
123
  }
124
124
  function i(l) {
125
125
  return r((a) => !!a, l);
@@ -174,7 +174,7 @@ function Jt(t) {
174
174
  function Qt(t, e, r = {}) {
175
175
  const {
176
176
  immediate: n = !0
177
- } = r, i = E(!1);
177
+ } = r, i = b(!1);
178
178
  let o = null;
179
179
  function s() {
180
180
  o && (clearTimeout(o), o = null);
@@ -219,7 +219,7 @@ const yt = $ ? window : void 0, te = $ ? window.document : void 0;
219
219
  function W(...t) {
220
220
  let e, r, n, i;
221
221
  if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([r, n, i] = t, e = yt) : [e, r, n, i] = t, !e)
222
- return R;
222
+ return P;
223
223
  Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
224
224
  const o = [], s = () => {
225
225
  o.forEach((m) => m()), o.length = 0;
@@ -228,7 +228,7 @@ function W(...t) {
228
228
  ([m, l]) => {
229
229
  if (s(), !m)
230
230
  return;
231
- const a = qt(l) ? { ...l } : l;
231
+ const a = Gt(l) ? { ...l } : l;
232
232
  o.push(
233
233
  ...r.flatMap((f) => n.map((d) => c(m, f, d, a)))
234
234
  );
@@ -243,8 +243,8 @@ let ot = !1;
243
243
  function Oe(t, e, r = {}) {
244
244
  const { window: n = yt, ignore: i = [], capture: o = !0, detectIframe: s = !1 } = r;
245
245
  if (!n)
246
- return R;
247
- Gt && !ot && (ot = !0, Array.from(n.document.body.children).forEach((a) => a.addEventListener("click", R)), n.document.documentElement.addEventListener("click", R));
246
+ return P;
247
+ qt && !ot && (ot = !0, Array.from(n.document.body.children).forEach((a) => a.addEventListener("click", P)), n.document.documentElement.addEventListener("click", P));
248
248
  let c = !0;
249
249
  const u = (a) => i.some((f) => {
250
250
  if (typeof f == "string")
@@ -282,17 +282,17 @@ function ee(t, e, r) {
282
282
  const {
283
283
  immediate: n = !0,
284
284
  delay: i = 0,
285
- onError: o = R,
286
- onSuccess: s = R,
285
+ onError: o = P,
286
+ onSuccess: s = P,
287
287
  resetOnExecute: c = !0,
288
288
  shallow: u = !0,
289
289
  throwError: p
290
- } = r ?? {}, m = u ? nt(e) : E(e), l = E(!1), a = E(!1), f = nt(void 0);
291
- async function d(y = 0, ...b) {
290
+ } = r ?? {}, m = u ? nt(e) : b(e), l = b(!1), a = b(!1), f = nt(void 0);
291
+ async function d(y = 0, ...E) {
292
292
  c && (m.value = e), f.value = void 0, l.value = !1, a.value = !0, y > 0 && await X(y);
293
- const A = typeof t == "function" ? t(...b) : t;
293
+ const T = typeof t == "function" ? t(...E) : t;
294
294
  try {
295
- const v = await A;
295
+ const v = await T;
296
296
  m.value = v, l.value = !0, s(v);
297
297
  } catch (v) {
298
298
  if (f.value = v, o(v), p)
@@ -303,7 +303,7 @@ function ee(t, e, r) {
303
303
  return m.value;
304
304
  }
305
305
  n && d(i);
306
- const T = {
306
+ const A = {
307
307
  state: m,
308
308
  isReady: l,
309
309
  isLoading: a,
@@ -311,22 +311,22 @@ function ee(t, e, r) {
311
311
  execute: d
312
312
  };
313
313
  function w() {
314
- return new Promise((y, b) => {
315
- Jt(a).toBe(!1).then(() => y(T)).catch(b);
314
+ return new Promise((y, E) => {
315
+ Jt(a).toBe(!1).then(() => y(A)).catch(E);
316
316
  });
317
317
  }
318
318
  return {
319
- ...T,
320
- then(y, b) {
321
- return w().then(y, b);
319
+ ...A,
320
+ then(y, E) {
321
+ return w().then(y, E);
322
322
  }
323
323
  };
324
324
  }
325
325
  function Se(t = {}) {
326
326
  const { document: e = te } = t;
327
327
  if (!e)
328
- return E("visible");
329
- const r = E(e.visibilityState);
328
+ return b("visible");
329
+ const r = b(e.visibilityState);
330
330
  return W(e, "visibilitychange", () => {
331
331
  r.value = e.visibilityState;
332
332
  }), r;
@@ -353,7 +353,7 @@ function _e(t, e = {}) {
353
353
  ), r;
354
354
  }
355
355
  function xe(t = [], e = {}) {
356
- const { delay: r = 0 } = e, n = E(!1), i = C(() => {
356
+ const { delay: r = 0 } = e, n = b(!1), i = R(() => {
357
357
  const c = I(t);
358
358
  return Array.isArray(c) ? c.map((u) => I(u)).some(Boolean) : c;
359
359
  }), { start: o, stop: s } = Qt(() => {
@@ -374,11 +374,11 @@ function re(t) {
374
374
  return e === "[object Uint8ClampedArray]" || e === "[object Int8Array]" || e === "[object Uint8Array]" || e === "[object Int16Array]" || e === "[object Uint16Array]" || e === "[object Int32Array]" || e === "[object Uint32Array]" || e === "[object Float32Array]" || e === "[object Float64Array]" || e === "[object BigInt64Array]" || e === "[object BigUint64Array]";
375
375
  }
376
376
  var oe = /* @__PURE__ */ M(function(e) {
377
- return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() : jt(e) ? [] : Nt(e) ? "" : Dt(e) ? {} : kt(e) ? /* @__PURE__ */ function() {
377
+ return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() : jt(e) ? [] : Nt(e) ? "" : Dt(e) ? {} : Ft(e) ? /* @__PURE__ */ function() {
378
378
  return arguments;
379
379
  }() : re(e) ? e.constructor.from("") : void 0;
380
380
  }), ie = /* @__PURE__ */ M(function(e) {
381
- return e != null && Ft(e, oe(e));
381
+ return e != null && kt(e, oe(e));
382
382
  }), ae = /* @__PURE__ */ Bt(function(e, r) {
383
383
  for (var n = {}, i = {}, o = 0, s = e.length; o < s; )
384
384
  i[e[o]] = 1, o += 1;
@@ -396,21 +396,21 @@ const ht = Symbol("I18nContext"), g = ft({
396
396
  messages: {},
397
397
  locale: "",
398
398
  fallbackLocale: ""
399
- }), Pe = ({ messages: t = {}, locale: e = "", fallbackLocale: r = "" }) => {
399
+ }), Ce = ({ messages: t = {}, locale: e = "", fallbackLocale: r = "" }) => {
400
400
  g.messages = t, g.locale = e, g.fallbackLocale = r;
401
401
  const n = (u, p = {}) => {
402
- const m = !ie(p), l = D(z, k(".", u));
403
- return C(() => {
402
+ const m = !ie(p), l = D(z, F(".", u));
403
+ return R(() => {
404
404
  const f = gt(l);
405
405
  return m ? fe(f, p) : f;
406
406
  }).value;
407
407
  }, i = (u) => {
408
- const p = D(z, k(".", u));
408
+ const p = D(z, F(".", u));
409
409
  return !!J(g.locale, p, g.messages);
410
410
  }, o = (u) => {
411
411
  g.locale = u;
412
412
  }, c = {
413
- locale: C({
413
+ locale: R({
414
414
  get() {
415
415
  return g.locale;
416
416
  },
@@ -450,7 +450,7 @@ const fe = function(t, e) {
450
450
  return t.replace(/\{(\w+)\}/g, function(r, n) {
451
451
  return e[n];
452
452
  });
453
- }, Re = Rt({
453
+ }, Pe = Pt({
454
454
  props: {
455
455
  tag: {
456
456
  type: String,
@@ -462,14 +462,14 @@ const fe = function(t, e) {
462
462
  }
463
463
  },
464
464
  setup(t, { slots: e }) {
465
- const r = D(z, k(".", t.path)), n = gt(r), i = k(/{|}/, n), o = Object.keys(e).map((s) => {
465
+ const r = D(z, F(".", t.path)), n = gt(r), i = F(/{|}/, n), o = Object.keys(e).map((s) => {
466
466
  const c = i.indexOf(s);
467
467
  return c > -1 && (i[c] = e[s]()[0]), i;
468
468
  });
469
- return () => Ct(t.tag, o);
469
+ return () => Rt(t.tag, o);
470
470
  }
471
- }), wt = Symbol("ErrorProviderContext"), Ce = () => {
472
- const t = E(""), e = E({}), r = (o) => {
471
+ }), wt = Symbol("ErrorProviderContext"), Re = () => {
472
+ const t = b(""), e = b({}), r = (o) => {
473
473
  console.error({ error: o }), t.value = o.message || o.error.message, e.value = {
474
474
  message: o.message,
475
475
  key: o.key || Vt(o.message),
@@ -486,7 +486,7 @@ const fe = function(t, e) {
486
486
  }, Lt((o, s, c) => {
487
487
  console.error("onErrorCaptured:", o, s, c);
488
488
  }), {
489
- hasError: C(() => t.value.length > 0),
489
+ hasError: R(() => t.value.length > 0),
490
490
  message: t,
491
491
  error: e,
492
492
  onError: r
@@ -503,7 +503,7 @@ const fe = function(t, e) {
503
503
  throw new Error("Privider is missing a parent component.");
504
504
  return t;
505
505
  }, je = (t, e = "", r = {}) => {
506
- const n = E(""), { t: i } = ue(), o = C(() => {
506
+ const n = b(""), { t: i } = ue(), o = R(() => {
507
507
  if (I(e))
508
508
  try {
509
509
  const u = pe(I(t), I(e));
@@ -518,11 +518,11 @@ const fe = function(t, e) {
518
518
  ...u.tooltip && { tooltip: i(u.tooltip ?? "") }
519
519
  });
520
520
  return {
521
- columns: C(() => D(s, o.value)),
521
+ columns: R(() => D(s, o.value)),
522
522
  error: n
523
523
  };
524
524
  }, pe = (t, e = "") => {
525
- const r = D(z, k(",", e)), n = Wt(t);
525
+ const r = D(z, F(",", e)), n = Wt(t);
526
526
  if (r[0] === "")
527
527
  return resolve([]);
528
528
  const i = r.findIndex((o) => !n.includes(o));
@@ -544,7 +544,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
544
544
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
545
545
  PERFORMANCE OF THIS SOFTWARE.
546
546
  ***************************************************************************** */
547
- function H(t, e) {
547
+ function K(t, e) {
548
548
  var r = typeof Symbol == "function" && t[Symbol.iterator];
549
549
  if (!r)
550
550
  return t;
@@ -601,41 +601,41 @@ function ct(t, e, r) {
601
601
  }
602
602
  function ye(t, e) {
603
603
  e === void 0 && (e = {});
604
- var r = H(ct(U(t.states[t.initial].entry).map(function(s) {
604
+ var r = K(ct(U(t.states[t.initial].entry).map(function(s) {
605
605
  return at(s, e.actions);
606
606
  }), t.context, me), 2), n = r[0], i = r[1], o = { config: t, _options: e, initialState: { value: t.initial, actions: n, context: i, matches: Q(t.initial) }, transition: function(s, c) {
607
607
  var u, p, m = typeof s == "string" ? { value: s, context: t.context } : s, l = m.value, a = m.context, f = ve(c), d = t.states[l];
608
608
  if (d.on) {
609
- var T = U(d.on[f.type]);
610
- "*" in d.on && T.push.apply(T, function(h, S, G) {
609
+ var A = U(d.on[f.type]);
610
+ "*" in d.on && A.push.apply(A, function(h, S, q) {
611
611
  if (arguments.length === 2)
612
- for (var x, P = 0, St = S.length; P < St; P++)
613
- !x && P in S || (x || (x = Array.prototype.slice.call(S, 0, P)), x[P] = S[P]);
612
+ for (var x, C = 0, St = S.length; C < St; C++)
613
+ !x && C in S || (x || (x = Array.prototype.slice.call(S, 0, C)), x[C] = S[C]);
614
614
  return h.concat(x || Array.prototype.slice.call(S));
615
- }([], H(U(d.on["*"])), !1));
615
+ }([], K(U(d.on["*"])), !1));
616
616
  try {
617
617
  for (var w = function(h) {
618
- var S = typeof Symbol == "function" && Symbol.iterator, G = S && h[S], x = 0;
619
- if (G)
620
- return G.call(h);
618
+ var S = typeof Symbol == "function" && Symbol.iterator, q = S && h[S], x = 0;
619
+ if (q)
620
+ return q.call(h);
621
621
  if (h && typeof h.length == "number")
622
622
  return { next: function() {
623
623
  return h && x >= h.length && (h = void 0), { value: h && h[x++], done: !h };
624
624
  } };
625
625
  throw new TypeError(S ? "Object is not iterable." : "Symbol.iterator is not defined.");
626
- }(T), y = w.next(); !y.done; y = w.next()) {
627
- var b = y.value;
628
- if (b === void 0)
626
+ }(A), y = w.next(); !y.done; y = w.next()) {
627
+ var E = y.value;
628
+ if (E === void 0)
629
629
  return st(l, a);
630
- var A = typeof b == "string" ? { target: b } : b, v = A.target, L = A.actions, F = L === void 0 ? [] : L, Z = A.cond, bt = Z === void 0 ? function() {
630
+ var T = typeof E == "string" ? { target: E } : E, v = T.target, L = T.actions, k = L === void 0 ? [] : L, Z = T.cond, Et = Z === void 0 ? function() {
631
631
  return !0;
632
- } : Z, Et = v === void 0, Tt = v ?? l, At = t.states[Tt];
633
- if (bt(a, f)) {
634
- var q = H(ct((Et ? U(F) : [].concat(d.exit, F, At.entry).filter(function(h) {
632
+ } : Z, bt = v === void 0, At = v ?? l, Tt = t.states[At];
633
+ if (Et(a, f)) {
634
+ var G = K(ct((bt ? U(k) : [].concat(d.exit, k, Tt.entry).filter(function(h) {
635
635
  return h;
636
636
  })).map(function(h) {
637
637
  return at(h, o._options.actions);
638
- }), a, f), 3), tt = q[0], It = q[1], Ot = q[2], et = v ?? l;
638
+ }), a, f), 3), tt = G[0], It = G[1], Ot = G[2], et = v ?? l;
639
639
  return { value: et, context: It, actions: tt, changed: v !== l || tt.length > 0 || Ot, matches: Q(et) };
640
640
  }
641
641
  }
@@ -660,11 +660,11 @@ const he = ye({
660
660
  states: {
661
661
  [B]: {
662
662
  on: {
663
- DIRECTION1: K,
663
+ DIRECTION1: H,
664
664
  DIRECTION2: V
665
665
  }
666
666
  },
667
- [K]: {
667
+ [H]: {
668
668
  on: {
669
669
  DIRECTION1: V,
670
670
  DIRECTION2: B
@@ -673,7 +673,7 @@ const he = ye({
673
673
  [V]: {
674
674
  on: {
675
675
  DIRECTION1: B,
676
- DIRECTION2: K
676
+ DIRECTION2: H
677
677
  }
678
678
  }
679
679
  }
@@ -699,7 +699,7 @@ function Ne(t = {}) {
699
699
  };
700
700
  }
701
701
  function De(t, e, r, n) {
702
- const i = E(""), o = E(!1), s = (c) => {
702
+ const i = b(""), o = b(!1), s = (c) => {
703
703
  const u = Mt(rt(e), c), p = u.length > 0;
704
704
  if (o.value = p, !p)
705
705
  return i.value = "";
@@ -719,22 +719,22 @@ function De(t, e, r, n) {
719
719
  };
720
720
  }
721
721
  export {
722
- Ce as a,
722
+ Re as a,
723
723
  Le as b,
724
- Pe as c,
724
+ Ce as c,
725
725
  ue as d,
726
726
  xe as e,
727
- Te as f,
727
+ Ae as f,
728
728
  Ne as g,
729
729
  De as h,
730
- Re as i,
730
+ Pe as i,
731
731
  _e as j,
732
732
  Zt as k,
733
733
  ee as l,
734
734
  Se as m,
735
- R as n,
735
+ P as n,
736
736
  Oe as o,
737
- Ae as p,
737
+ Te as p,
738
738
  N as q,
739
739
  je as u,
740
740
  pe as v,
package/dist/utils.js CHANGED
@@ -1,65 +1,77 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.3.8 - 21/05/2024, 10:10:53
3
+ * version: v2.4.0 - 06/06/2024, 12:35:57
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 { I as p, U as L, W as E, k as U, c as g, j as S, e as A, f as M, h as y, g as I, a as N, l as w, p as x, r as b, s as C, i as D, t as G, b as h, d as k, u as B } from "./convert-BEp1U263.js";
9
- import { h as a } from "./datetime-C3O51pdW.js";
10
- import { b as O, c as P, a as W, f as X, g as $, d as V, e as j, i as z, o as J, t as K, y as Y } from "./datetime-C3O51pdW.js";
11
- import { DEFAULT_EXTERNAL_GAME_URL as r, DEFAULT_EXTERNAL_TEAM_URL as t, DEFAULT_EXTERNAL_PLAYER_URL as c, FLAG_BASE_URL as i } from "./constants.js";
12
- const f = (s, e = {}) => {
13
- const o = n("gameResolver") || s;
14
- return typeof o == "function" ? o(e) : encodeURI(o ? a(o, e) : a(r, e));
15
- }, m = (s, e = {}) => {
16
- const o = n("teamResolver") || s;
17
- return typeof o == "function" ? o(e) : encodeURI(o ? a(o, e) : a(t, e));
18
- }, T = (s, e = {}) => {
19
- const o = n("playerResolver") || s;
20
- return typeof o == "function" ? o(e) : encodeURI(o ? a(o, e) : a(c, e));
21
- }, v = (s, e = "1x1") => `${i}/flag:${s}-${e}.svg`, n = (s = "") => {
8
+ import { I as _, U as E, W as L, m as U, c as S, i as g, k as y, e as A, f as M, h as I, g as N, a as w, l as x, p as k, r as D, s as b, j as h, t as G, b as B, d as C, u as O } from "./convert-BUiKPu9l.js";
9
+ import { v as o } from "./datetime-Df9jKQTx.js";
10
+ import { n as F, b as P, c as X, a as $, l as j, m as V, q, f as z, g as J, j as K, h as Y, d as Z, e as H, i as Q, k as ee, t as se, r as ae, o as oe, p as te, s as re, u as ne, y as ie } from "./datetime-Df9jKQTx.js";
11
+ import { DEFAULT_EXTERNAL_GAME_URL as r, DEFAULT_EXTERNAL_TEAM_URL as n, DEFAULT_EXTERNAL_PLAYER_URL as i, FLAG_BASE_URL as c } from "./constants.js";
12
+ const f = (a, e = {}) => {
13
+ const s = t("gameResolver") || a;
14
+ return typeof s == "function" ? s(e) : encodeURI(s ? o(s, e) : o(r, e));
15
+ }, R = (a, e = {}) => {
16
+ const s = t("teamResolver") || a;
17
+ return typeof s == "function" ? s(e) : encodeURI(s ? o(s, e) : o(n, e));
18
+ }, T = (a, e = {}) => {
19
+ const s = t("playerResolver") || a;
20
+ return typeof s == "function" ? s(e) : encodeURI(s ? o(s, e) : o(i, e));
21
+ }, u = (a, e = "1x1") => `${c}/flag:${a}-${e}.svg`, t = (a = "") => {
22
22
  var e;
23
- return (e = window == null ? void 0 : window.__MJSZ_VBR_WIDGET__) == null ? void 0 : e[s];
24
- }, u = () => {
23
+ return (e = window == null ? void 0 : window.__MJSZ_VBR_WIDGET__) == null ? void 0 : e[a];
24
+ }, v = () => {
25
25
  window.scrollTo(0, 0);
26
26
  };
27
27
  export {
28
- p as InvalidSeasonName,
29
- L as UndefinedColumn,
30
- E as WidgetError,
28
+ _ as InvalidSeasonName,
29
+ E as UndefinedColumn,
30
+ L as WidgetError,
31
+ F as addDays,
31
32
  U as appendTo,
32
- g as convert,
33
- O as convertMinToMinSec,
34
- P as convertMinToSec,
35
- S as convertPhaseName,
36
- W as convertSecToMin,
33
+ S as convert,
34
+ g as convertGamePeriodResults,
35
+ P as convertMinToMinSec,
36
+ X as convertMinToSec,
37
+ y as convertPhaseName,
38
+ $ as convertSecToMin,
37
39
  A as convertTimes,
38
40
  M as convertTimesMinToMinSec,
39
- y as convertTimesSecToMin,
41
+ I as convertTimesSecToMin,
42
+ j as currentWeek,
43
+ V as currentWeekStartEnd,
44
+ q as endOfMonth,
40
45
  f as externalGameLinkResolver,
41
46
  T as externalPlayerLinkResolver,
42
- m as externalTeamLinkResolver,
43
- v as flagResolver,
44
- X as format,
45
- I as gameDateTime,
46
- N as gameResult,
47
- $ as getLocalTimezone,
48
- V as isBetween,
49
- j as isSame,
50
- z as isSameOrBefore,
51
- w as localeSort,
52
- J as offsetName,
53
- x as playerName,
54
- b as rawConvert,
55
- C as scheduleOptionalRowClass,
56
- u as scrollToTop,
57
- D as sortGames,
47
+ R as externalTeamLinkResolver,
48
+ u as flagResolver,
49
+ z as format,
50
+ N as gameDateTime,
51
+ w as gameResult,
52
+ J as getLocalTimezone,
53
+ K as isAfter,
54
+ Y as isBefore,
55
+ Z as isBetween,
56
+ H as isSame,
57
+ Q as isSameOrBefore,
58
+ ee as isToday,
59
+ x as localeSort,
60
+ se as max,
61
+ ae as min,
62
+ oe as offsetName,
63
+ k as playerName,
64
+ D as rawConvert,
65
+ b as scheduleOptionalRowClass,
66
+ v as scrollToTop,
67
+ h as sortGames,
68
+ te as startOfMonth,
69
+ re as subtractDays,
58
70
  G as teamName,
59
- h as teamOpponent,
60
- k as teamResultType,
61
- a as templateReplacer,
62
- K as toKebabCase,
63
- B as upperCase,
64
- Y as yearToNow
71
+ B as teamOpponent,
72
+ C as teamResultType,
73
+ o as templateReplacer,
74
+ ne as toKebabCase,
75
+ O as upperCase,
76
+ ie as yearToNow
65
77
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Data visualization for MJSZ VBR",
4
4
  "author": "Ákos Stegner <akos.stegner@gmail.com>",
5
5
  "private": false,
6
- "version": "2.3.8",
6
+ "version": "2.4.0",
7
7
  "homepage": "https://api.icehockey.hu/widgets/docs/v2/",
8
8
  "type": "module",
9
9
  "files": [
@@ -33,12 +33,13 @@
33
33
  "unpkg": "./dist/index.iife.js",
34
34
  "dependencies": {
35
35
  "@floating-ui/dom": "^1.6.5",
36
+ "@lostui/utils": "^0.0.3",
36
37
  "@vueuse/core": "^10.9.0",
37
38
  "@xstate/fsm": "^2.1.0",
38
39
  "dayjs": "^1.11.11",
39
40
  "ramda": "^0.30.0",
40
41
  "vue": "^3.4.27",
41
- "@mjsz-vbr-elements/shared": "^2.3.8"
42
+ "@mjsz-vbr-elements/shared": "^2.4.0"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@vitejs/plugin-vue": "^5.0.4",