@mjsz-vbr-elements/core 2.20.1 → 2.21.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.
package/dist/columns.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.20.1 - 11/03/2025, 18:23:01
3
+ * version: v2.21.1 - 12/03/2025, 07:49:08
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.20.1 - 11/03/2025, 18:23:01
3
+ * version: v2.21.1 - 12/03/2025, 07:49:08
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-BKF4HTHI.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-C9LgL7ma.js";
9
9
  export {
10
10
  s as AdditionalStandingsText,
11
11
  r as BaseSelect,
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.20.1 - 11/03/2025, 18:23:01
3
+ * version: v2.21.1 - 12/03/2025, 07:49:08
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-C4-l1qY2.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-C4-l1qY2.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-Day5AwW-.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-Day5AwW-.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
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";
package/dist/constants.js CHANGED
@@ -1,23 +1,24 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.20.1 - 11/03/2025, 18:23:01
3
+ * version: v2.21.1 - 12/03/2025, 07:49:08
4
4
  * (c) 2025
5
5
  * description: Data visualization for MJSZ VBR
6
6
  * author: Ákos Stegner <akos.stegner@gmail.com>
7
7
  */
8
- const e = "https://api.icehockey.hu/vbr", t = "https://www.jegkorongszovetseg.hu/event/game/{gameId}", s = "https://jegkorongszovetseg.hu/assets/images/player_blank.png", a = "https://www.ersteliga.hu/stats/player/?playerId={player.playerId}&championshipId={championshipId}", o = "https://www.ersteliga.hu/stats/team/?teamId={team.id}&championshipId={championshipId}", E = "https://api.icehockey.hu/static/api/flag", n = "original", _ = "descend", p = "ascend", A = (/* @__PURE__ */ new Map()).set("hu", "hu-hu").set("en", "hu-gb"), h = (/* @__PURE__ */ new Map()).set("Europe/Budapest", { countryLabelKey: "hungary", timezone: "Europe/Budapest" }).set("Europe/Bucharest", { countryLabelKey: "romania", timezone: "Europe/Bucharest" }), c = 1e3 * 60 * 5, L = 1e3;
8
+ const e = "https://api.icehockey.hu/vbr", t = "https://www.jegkorongszovetseg.hu/event/game/{gameId}", s = "https://jegkorongszovetseg.hu/assets/images/player_blank.png", a = "https://www.ersteliga.hu/stats/player/?playerId={player.playerId}&championshipId={championshipId}", o = "https://www.ersteliga.hu/stats/team/?teamId={team.id}&championshipId={championshipId}", E = "https://www.ersteliga.hu/stats?report={id}", _ = "https://api.icehockey.hu/static/api/flag", n = "original", p = "descend", A = "ascend", h = (/* @__PURE__ */ new Map()).set("hu", "hu-hu").set("en", "hu-gb"), L = (/* @__PURE__ */ new Map()).set("Europe/Budapest", { countryLabelKey: "hungary", timezone: "Europe/Budapest" }).set("Europe/Bucharest", { countryLabelKey: "romania", timezone: "Europe/Bucharest" }), c = 1e3 * 60 * 5, T = 1e3;
9
9
  export {
10
- h as AVAILABLE_TIMEZONES_BY_COUNTRY,
10
+ L as AVAILABLE_TIMEZONES_BY_COUNTRY,
11
11
  t as DEFAULT_EXTERNAL_GAME_URL,
12
12
  a as DEFAULT_EXTERNAL_PLAYER_URL,
13
+ E as DEFAULT_EXTERNAL_STATISTIC_URL,
13
14
  o as DEFAULT_EXTERNAL_TEAM_URL,
14
15
  s as DEFAULT_PORTRAIT_IMAGE_URL,
15
- E as FLAG_BASE_URL,
16
- L as LAZY_LOADING_STATE_DELAY,
17
- A as LOCALE_FOR_LANG,
16
+ _ as FLAG_BASE_URL,
17
+ T as LAZY_LOADING_STATE_DELAY,
18
+ h as LOCALE_FOR_LANG,
18
19
  c as REFRESH_DELAY,
19
- p as SORT_STATE_ASCEND,
20
- _ as SORT_STATE_DESCEND,
20
+ A as SORT_STATE_ASCEND,
21
+ p as SORT_STATE_DESCEND,
21
22
  n as SORT_STATE_ORIGINAL,
22
23
  e as VBR_API_BASE_URL
23
24
  };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.20.1 - 11/03/2025, 18:23:01
3
+ * version: v2.21.1 - 12/03/2025, 07:49:08
4
4
  * (c) 2025
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.20.1 - 11/03/2025, 18:23:01
3
+ * version: v2.21.1 - 12/03/2025, 07:49:08
4
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 { SORT_STATE_ORIGINAL as F, SORT_STATE_ASCEND as G } from "./constants.js";
9
- import { E as f, L as S, H as v, G as m, _ as p, w as g, x as R, M as b, C as c, N, O as M, D as T, P as U, Q as j, R as k, S as H, T as X, U as q, V as Y, B as D, J as K, F as J, f as h, c as $, b as Q, a as V } from "./datetime-K_d-hEsO.js";
9
+ import { E as f, L as S, H as v, G as m, _ as p, w as g, x as b, M as R, C as c, N, O as $, D as T, P as U, Q as j, R as k, S as H, T as X, U as q, V as Y, B as D, J as K, F as J, f as h, c as M, b as Q, a as V } from "./datetime-K_d-hEsO.js";
10
10
  var Z = /* @__PURE__ */ f(function(e, r) {
11
11
  if (e === r)
12
12
  return r;
@@ -25,7 +25,7 @@ var Z = /* @__PURE__ */ f(function(e, r) {
25
25
  }), z = /* @__PURE__ */ f(function(e, r) {
26
26
  return v(m(e), r);
27
27
  }), w = /* @__PURE__ */ p(function(e) {
28
- return g(e) ? !0 : !e || typeof e != "object" || R(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
28
+ return g(e) ? !0 : !e || typeof e != "object" || b(e) ? !1 : e.length === 0 ? !0 : e.length > 0 ? e.hasOwnProperty(0) && e.hasOwnProperty(e.length - 1) : !1;
29
29
  }), O = typeof Symbol < "u" ? Symbol.iterator : "@@iterator";
30
30
  function ee(t, e, r) {
31
31
  return function(a, u, s) {
@@ -55,7 +55,7 @@ function te(t, e, r) {
55
55
  return t["@@transducer/result"](e);
56
56
  }
57
57
  var re = /* @__PURE__ */ f(function(e, r) {
58
- return b(e.length, function() {
58
+ return R(e.length, function() {
59
59
  return e.apply(r, arguments);
60
60
  });
61
61
  });
@@ -109,7 +109,7 @@ var P = /* @__PURE__ */ c(function(t, e, r) {
109
109
  return N(e.length, e);
110
110
  });
111
111
  function ce(t, e, r) {
112
- if (M(t) && g(r)) {
112
+ if ($(t) && g(r)) {
113
113
  var n = [].concat(r);
114
114
  return n[t] = e, n;
115
115
  }
@@ -125,7 +125,7 @@ var oe = /* @__PURE__ */ p(function(e) {
125
125
  return r;
126
126
  var a = e[0];
127
127
  if (e.length > 1) {
128
- var u = !oe(n) && T(a, n) && typeof n[a] == "object" ? n[a] : M(e[1]) ? [] : {};
128
+ var u = !oe(n) && T(a, n) && typeof n[a] == "object" ? n[a] : $(e[1]) ? [] : {};
129
129
  r = t(Array.prototype.slice.call(e, 1), r, u);
130
130
  }
131
131
  return ce(a, r, n);
@@ -227,10 +227,10 @@ var ye = /* @__PURE__ */ c(/* @__PURE__ */ _("slice", function(e, r, n) {
227
227
  function d() {
228
228
  if (arguments.length === 0)
229
229
  throw new Error("pipe requires at least one argument");
230
- return b(arguments[0].length, P(de, arguments[0], ve(arguments)));
230
+ return R(arguments[0].length, P(de, arguments[0], ve(arguments)));
231
231
  }
232
232
  var ge = /* @__PURE__ */ p(function(e) {
233
- return R(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
233
+ return b(e) ? e.split("").reverse().join("") : Array.prototype.slice.call(e, 0).reverse();
234
234
  });
235
235
  function x() {
236
236
  if (arguments.length === 0)
@@ -282,7 +282,7 @@ var _e = /* @__PURE__ */ k(4, [], /* @__PURE__ */ H([], Te, function(e, r, n, a)
282
282
  }, n(e(a)));
283
283
  };
284
284
  };
285
- }), Re = /* @__PURE__ */ p(function(e) {
285
+ }), be = /* @__PURE__ */ p(function(e) {
286
286
  return Ae(m(e), fe(e));
287
287
  }), B = function(t) {
288
288
  return {
@@ -291,13 +291,13 @@ var _e = /* @__PURE__ */ k(4, [], /* @__PURE__ */ H([], Te, function(e, r, n, a)
291
291
  return B(e(t));
292
292
  }
293
293
  };
294
- }, be = /* @__PURE__ */ c(function(e, r, n) {
294
+ }, Re = /* @__PURE__ */ c(function(e, r, n) {
295
295
  return e(function(a) {
296
296
  return B(r(a));
297
297
  })(n).value;
298
- }), Me = /* @__PURE__ */ c(function(e, r, n) {
298
+ }), $e = /* @__PURE__ */ c(function(e, r, n) {
299
299
  return n.replace(e, r);
300
- }), $e = /* @__PURE__ */ f(function(e, r) {
300
+ }), Me = /* @__PURE__ */ f(function(e, r) {
301
301
  return Array.prototype.slice.call(r, 0).sort(e);
302
302
  }), W = /* @__PURE__ */ f(function(e, r) {
303
303
  return Array.prototype.slice.call(r, 0).sort(function(n, a) {
@@ -306,7 +306,7 @@ var _e = /* @__PURE__ */ k(4, [], /* @__PURE__ */ H([], Te, function(e, r, n, a)
306
306
  return u;
307
307
  });
308
308
  }), A = /* @__PURE__ */ Y(0, "toLowerCase");
309
- function Fe(t, e = "body") {
309
+ function Ge(t, e = "body") {
310
310
  if (!t)
311
311
  return;
312
312
  if (typeof e != "string") {
@@ -316,7 +316,7 @@ function Fe(t, e = "body") {
316
316
  const r = document.querySelector(e);
317
317
  r == null || r.append(t);
318
318
  }
319
- function Ge(t, e = () => ({})) {
319
+ function Ue(t, e = () => ({})) {
320
320
  return t.slice().sort((r, n) => {
321
321
  const a = e(r), u = e(n);
322
322
  if (a === null || u === null)
@@ -325,7 +325,7 @@ function Ge(t, e = () => ({})) {
325
325
  return s & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : s & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
326
326
  });
327
327
  }
328
- function Ue(t = []) {
328
+ function je(t = []) {
329
329
  return {
330
330
  result: [...t],
331
331
  filteredRowsLength: 0,
@@ -341,7 +341,7 @@ function Ue(t = []) {
341
341
  if (e) {
342
342
  const a = r.map(
343
343
  (i) => n ? d(K(i), D(e)) : d(m(i), A, Ie(A(e)))
344
- ), u = ie((i) => i.name ? be(Re("name"), Me(",", ""), i) : i), s = J(d(u, ue([...a])), this.result);
344
+ ), u = ie((i) => i.name ? Re(be("name"), $e(",", ""), i) : i), s = J(d(u, ue([...a])), this.result);
345
345
  this.isFiltered = !0, this.filteredRowsLength = s.length, this.result = s;
346
346
  }
347
347
  return this;
@@ -379,7 +379,7 @@ function Ue(t = []) {
379
379
  playerName() {
380
380
  return this.result = this.result.map((e) => ({
381
381
  ...e,
382
- name: `${e.lastName} ${e.firstName}`
382
+ name: Be(e)
383
383
  })), this;
384
384
  },
385
385
  teamName() {
@@ -400,15 +400,18 @@ function Ue(t = []) {
400
400
  return e === null ? this : (this.result = this.result.filter((r) => new Date(r.gameDate).getMonth() === e), this);
401
401
  },
402
402
  convertTimes(e = []) {
403
- return this.result = this.result.map((r) => (e.map((n) => r[n] ? r[`${n}Sec`] = $(r[n]) : r), r)), this;
403
+ return this.result = this.result.map((r) => (e.map((n) => r[n] ? r[`${n}Sec`] = M(r[n]) : r), r)), this;
404
404
  },
405
405
  groupByDays() {
406
406
  return this.currentItems = this.result.length, this.result = De((e) => h(e.gameDate, "YYYY-MM-DD"))(this.result), this;
407
+ },
408
+ slice(e = 3) {
409
+ return this.result = this.result.slice(0, e), this;
407
410
  }
408
411
  };
409
412
  }
410
- const je = (t, ...e) => v(x(...e))(t);
411
- function ke(t) {
413
+ const ke = (t, ...e) => v(x(...e))(t);
414
+ function He(t) {
412
415
  var e, r, n, a;
413
416
  return {
414
417
  ...t,
@@ -423,45 +426,45 @@ function ke(t) {
423
426
  }
424
427
  };
425
428
  }
426
- function He(t) {
429
+ function Xe(t) {
427
430
  var e;
428
431
  return {
429
432
  ...t,
430
433
  ...((e = t == null ? void 0 : t.team) == null ? void 0 : e.id) && { teamName: t.team.longName }
431
434
  };
432
435
  }
433
- function Xe(t = "", e = "hu") {
436
+ function qe(t = "", e = "hu") {
434
437
  return (r) => ({
435
438
  ...r,
436
439
  gameDateDate: h(r.gameDate, "L dddd", t, e),
437
440
  gameDateTime: h(r.gameDate, "HH:mm", t, e)
438
441
  });
439
442
  }
440
- function qe(t) {
443
+ function Ye(t) {
441
444
  return (e) => ({
442
445
  ...e,
443
446
  gameResult: Le(e)
444
447
  });
445
448
  }
446
- function Ye(t) {
449
+ function Ke(t) {
447
450
  return {
448
451
  ...t,
449
452
  opponent: Pe(t)
450
453
  };
451
454
  }
452
- function Ke(t) {
455
+ function Je(t) {
453
456
  return {
454
457
  ...t,
455
458
  resultType: xe(t)
456
459
  };
457
460
  }
458
- function Je(t) {
461
+ function Qe(t) {
459
462
  return {
460
463
  ...t,
461
464
  rowClasses: t.optional ? "is-optional" : ""
462
465
  };
463
466
  }
464
- function Qe(t = []) {
467
+ function Ve(t = []) {
465
468
  return (e) => {
466
469
  var r;
467
470
  return {
@@ -470,23 +473,23 @@ function Qe(t = []) {
470
473
  };
471
474
  };
472
475
  }
473
- function Ve(t = []) {
474
- return (e) => (t.map((r) => e[r] ? e[`${r}Sec`] = $(e[r]) : e), e);
475
- }
476
476
  function Ze(t = []) {
477
- return (e) => (t.map((r) => e[r] ? e[`${r}Min`] = Q(e[r]) : e), e);
477
+ return (e) => (t.map((r) => e[r] ? e[`${r}Sec`] = M(e[r]) : e), e);
478
478
  }
479
479
  function ze(t = []) {
480
+ return (e) => (t.map((r) => e[r] ? e[`${r}Min`] = Q(e[r]) : e), e);
481
+ }
482
+ function we(t = []) {
480
483
  return (e) => (t.map((r) => e[`${r}Min`] = V(e[r])), e);
481
484
  }
482
- function we(t) {
485
+ function et(t) {
483
486
  var e, r;
484
487
  return {
485
488
  ...t,
486
489
  periodResults: ((r = (e = t.result) == null ? void 0 : e.match(/\(.*?\)/)) == null ? void 0 : r[0]) ?? ""
487
490
  };
488
491
  }
489
- const Ce = (t, e) => new Date(t.gameDate).getTime() - new Date(e.gameDate).getTime(), et = W([Ce, y(m("id")), y(m("gameId"))]), Ee = (t) => (e, r) => e[t].localeCompare(r[t], "hu"), tt = $e(Ee("name"));
492
+ const Ce = (t, e) => new Date(t.gameDate).getTime() - new Date(e.gameDate).getTime(), tt = W([Ce, y(m("id")), y(m("gameId"))]), Ee = (t) => (e, r) => e[t].localeCompare(r[t], "hu"), rt = Me(Ee("name"));
490
493
  function Pe(t) {
491
494
  var e;
492
495
  return [t.isHomeGame ? null : "@", (e = t.opponent) == null ? void 0 : e.shortName].join(" ");
@@ -499,7 +502,7 @@ function xe(t) {
499
502
  const e = t.gameResult.split(":"), r = e[0] > e[1], n = e[0] < e[1];
500
503
  return r && t.isOvertime ? "OTW" : r && t.isShootout ? "SOW" : r ? "W" : n && t.isOvertime ? "OTL" : n && t.isShootout ? "SOL" : n ? "L" : "D";
501
504
  }
502
- function rt(t) {
505
+ function nt(t) {
503
506
  return t.map((e) => {
504
507
  var r, n;
505
508
  return {
@@ -514,19 +517,22 @@ function rt(t) {
514
517
  };
515
518
  });
516
519
  }
517
- class nt extends Error {
520
+ function Be(t) {
521
+ return t.player ? t.player.nationality.includes("hu") ? `${t.player.lastName} ${t.player.firstName}` : `${t.player.lastName}, ${t.player.firstName}` : `${t.lastName} ${t.firstName}`;
522
+ }
523
+ class at extends Error {
518
524
  constructor(e, r = {}) {
519
525
  const { key: n, cause: a } = r;
520
526
  super(e), this.name = "WidgetError", this.key = n, this.cause = a;
521
527
  }
522
528
  }
523
- const at = {
529
+ const st = {
524
530
  message: "Undefined Column name Message",
525
531
  options: {
526
532
  key: "undefined-column",
527
533
  cause: {}
528
534
  }
529
- }, st = {
535
+ }, ut = {
530
536
  message: "Invalid season name",
531
537
  options: {
532
538
  key: "invalid-season-name",
@@ -534,26 +540,26 @@ const at = {
534
540
  }
535
541
  };
536
542
  export {
537
- st as I,
538
- at as U,
539
- nt as W,
540
- qe as a,
541
- Ye as b,
542
- Ue as c,
543
- Ke as d,
544
- Ve as e,
545
- Ze as f,
546
- Xe as g,
547
- ze as h,
548
- we as i,
549
- et as j,
550
- rt as k,
551
- tt as l,
552
- Fe as m,
553
- Ge as n,
554
- ke as p,
555
- je as r,
556
- Je as s,
557
- He as t,
558
- Qe as u
543
+ ut as I,
544
+ st as U,
545
+ at as W,
546
+ Ye as a,
547
+ Ke as b,
548
+ je as c,
549
+ Je as d,
550
+ Ze as e,
551
+ ze as f,
552
+ qe as g,
553
+ we as h,
554
+ et as i,
555
+ tt as j,
556
+ nt as k,
557
+ rt as l,
558
+ Ge as m,
559
+ Ue as n,
560
+ He as p,
561
+ ke as r,
562
+ Qe as s,
563
+ Xe as t,
564
+ Ve as u
559
565
  };