@mjsz-vbr-elements/core 2.31.2 → 2.33.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,12 +1,12 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.31.2 - 28/10/2025, 15:53:30
3
+ * version: v2.33.0 - 25/11/2025, 21:00:09
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 { ref as R, watch as S, unref as C, reactive as Te, defineComponent as De, h as Le, computed as j, provide as we, inject as Ee, onErrorCaptured as _e, nextTick as se, shallowRef as k, shallowReadonly as xe, toRef as We, readonly as Oe, customRef as Fe, isRef as Ie, getCurrentScope as Me, onScopeDispose as je, toValue as x } from "vue";
9
- import { _ as Be, C as $e, D as fe, E as Ge, F as ze, x as de, G as H, H as ee, I as q, w as Ke, u as Ue, v as He, J as qe, A as Je } from "./datetime-bWwGbGlR.js";
8
+ import { ref as R, watch as S, unref as C, reactive as Te, defineComponent as Le, h as De, computed as j, provide as we, inject as Ee, onErrorCaptured as _e, nextTick as se, shallowRef as k, shallowReadonly as xe, toRef as We, readonly as Oe, customRef as Fe, isRef as Ie, getCurrentScope as Me, onScopeDispose as je, toValue as x } from "vue";
9
+ import { _ as Be, E as $e, F as fe, G as Ge, H as ze, z as de, v as H, I as ee, J as q, x as Ke, u as Ue, w as He, K as qe, B as Je } from "./datetime-B_IKGlWy.js";
10
10
  import { SORT_STATE_DESCEND as ne, SORT_STATE_ORIGINAL as X, SORT_STATE_ASCEND as Z } from "./constants.js";
11
11
  var Ve = /* @__PURE__ */ Be(function e(t, r, n) {
12
12
  return $e(function(s, o, a) {
@@ -101,7 +101,7 @@ function ae(e, t, r) {
101
101
  function Ze(e, t) {
102
102
  return e.replace(/\{(\w+)\}/g, (r, n) => t[n]);
103
103
  }
104
- const St = De({
104
+ const St = Le({
105
105
  props: {
106
106
  tag: {
107
107
  type: String,
@@ -117,7 +117,7 @@ const St = De({
117
117
  const u = s.indexOf(a);
118
118
  return u > -1 && (s[u] = t[a]()[0]), s;
119
119
  });
120
- return () => Le(e.tag, o);
120
+ return () => De(e.tag, o);
121
121
  }
122
122
  });
123
123
  function At(e, t = "", r = {}) {
@@ -191,11 +191,11 @@ function tt() {
191
191
  function J(e) {
192
192
  return Me() ? (je(e), !0) : !1;
193
193
  }
194
- const D = typeof window < "u" && typeof document < "u", me = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope, nt = Object.prototype.toString, rt = (e) => nt.call(e) === "[object Object]", N = () => {
194
+ const L = typeof window < "u" && typeof document < "u", me = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope, nt = Object.prototype.toString, rt = (e) => nt.call(e) === "[object Object]", N = () => {
195
195
  }, ot = /* @__PURE__ */ it();
196
196
  function it() {
197
197
  var e, t;
198
- return D && ((e = window?.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window?.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
198
+ return L && ((e = window?.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window?.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
199
199
  }
200
200
  function Re(...e) {
201
201
  if (e.length !== 1)
@@ -292,8 +292,8 @@ function le(e, t = !1) {
292
292
  const w = [new Promise((g) => {
293
293
  c = S(
294
294
  [e, f],
295
- ([L, B]) => {
296
- t !== (L === B) && (c ? c() : se(() => c?.()), g(L));
295
+ ([D, B]) => {
296
+ t !== (D === B) && (c ? c() : se(() => c?.()), g(D));
297
297
  },
298
298
  {
299
299
  flush: p,
@@ -373,9 +373,9 @@ function ct(e, t = 1e3, r = {}) {
373
373
  const v = x(t);
374
374
  v <= 0 || (a.value = !0, s && e(), u(), a.value && (o = setInterval(e, v)));
375
375
  }
376
- if (n && D && m(), Ie(t) || typeof t == "function") {
376
+ if (n && L && m(), Ie(t) || typeof t == "function") {
377
377
  const v = S(t, () => {
378
- a.value && D && m();
378
+ a.value && L && m();
379
379
  });
380
380
  J(v);
381
381
  }
@@ -402,7 +402,7 @@ function ft(e, t, r = {}) {
402
402
  o.value = !1, a = void 0, e(...v);
403
403
  }, x(t));
404
404
  }
405
- return n && (o.value = !0, D && m()), J(i), {
405
+ return n && (o.value = !0, L && m()), J(i), {
406
406
  isPending: xe(o),
407
407
  start: m,
408
408
  stop: i
@@ -441,7 +441,7 @@ function kt(e, t, r) {
441
441
  );
442
442
  return n;
443
443
  }
444
- const Ne = D ? window : void 0, mt = D ? window.document : void 0;
444
+ const Ne = L ? window : void 0, mt = L ? window.document : void 0;
445
445
  function K(e) {
446
446
  var t;
447
447
  const r = x(e);
@@ -483,7 +483,7 @@ function U(...e) {
483
483
  return J(r), a;
484
484
  }
485
485
  let ve = !1;
486
- function Dt(e, t, r = {}) {
486
+ function Lt(e, t, r = {}) {
487
487
  const { window: n = Ne, ignore: s = [], capture: o = !0, detectIframe: a = !1, controls: u = !1 } = r;
488
488
  if (!n)
489
489
  return u ? { stop: N, cancel: N, trigger: N } : N;
@@ -593,7 +593,7 @@ function vt(e, t, r) {
593
593
  }
594
594
  };
595
595
  }
596
- function Lt(e = {}) {
596
+ function Dt(e = {}) {
597
597
  const { document: t = mt } = e;
598
598
  if (!t)
599
599
  return k("visible");
@@ -639,7 +639,7 @@ function Wt(e, t = {}) {
639
639
  protocols: m = []
640
640
  } = t, v = R(null), f = k("CLOSED"), d = R(), p = Re(e);
641
641
  let y, T, l = !1, c = 0, h = [], w, g;
642
- const L = () => {
642
+ const D = () => {
643
643
  if (h.length && d.value && f.value === "OPEN") {
644
644
  for (const b of h)
645
645
  d.value.send(b);
@@ -650,13 +650,13 @@ function Wt(e, t = {}) {
650
650
  }, $ = () => {
651
651
  clearTimeout(g), g = void 0;
652
652
  }, W = (b = 1e3, I) => {
653
- B(), !(!D && !me || !d.value) && (l = !0, $(), y?.(), d.value.close(b, I), d.value = void 0);
654
- }, V = (b, I = !0) => !d.value || f.value !== "OPEN" ? (I && h.push(b), !1) : (L(), d.value.send(b), !0), Q = () => {
653
+ B(), !(!L && !me || !d.value) && (l = !0, $(), y?.(), d.value.close(b, I), d.value = void 0);
654
+ }, V = (b, I = !0) => !d.value || f.value !== "OPEN" ? (I && h.push(b), !1) : (D(), d.value.send(b), !0), Q = () => {
655
655
  if (l || typeof p.value > "u")
656
656
  return;
657
657
  const b = new WebSocket(p.value, m);
658
658
  d.value = b, f.value = "CONNECTING", b.onopen = () => {
659
- f.value = "OPEN", c = 0, r?.(b), T?.(), L();
659
+ f.value = "OPEN", c = 0, r?.(b), T?.(), D();
660
660
  }, b.onclose = (I) => {
661
661
  if (f.value = "CLOSED", $(), y?.(), n?.(b, I), !l && t.autoReconnect && (d.value == null || b === d.value)) {
662
662
  const {
@@ -697,9 +697,9 @@ function Wt(e, t = {}) {
697
697
  );
698
698
  y = F, T = M;
699
699
  }
700
- i && (D && U("beforeunload", () => W(), { passive: !0 }), J(W));
700
+ i && (L && U("beforeunload", () => W(), { passive: !0 }), J(W));
701
701
  const z = () => {
702
- !D && !me || (W(), l = !1, c = 0, Q());
702
+ !L && !me || (W(), l = !1, c = 0, Q());
703
703
  };
704
704
  return a && z(), u && S(p, z), {
705
705
  data: v,
@@ -816,7 +816,7 @@ function gt(e, t) {
816
816
  }(T), c = l.next(); !c.done; c = l.next()) {
817
817
  var h = c.value;
818
818
  if (h === void 0) return ge(f, d);
819
- var w = typeof h == "string" ? { target: h } : h, g = w.target, L = w.actions, B = L === void 0 ? [] : L, $ = w.cond, W = $ === void 0 ? function() {
819
+ var w = typeof h == "string" ? { target: h } : h, g = w.target, D = w.actions, B = D === void 0 ? [] : D, $ = w.cond, W = $ === void 0 ? function() {
820
820
  return !0;
821
821
  } : $, V = g === void 0, Q = g ?? f, z = e.states[Q];
822
822
  if (W(d, p)) {
@@ -895,17 +895,17 @@ export {
895
895
  Xe as e,
896
896
  Ft as f,
897
897
  Mt as g,
898
- _t as h,
898
+ K as h,
899
899
  St as i,
900
- Wt as j,
901
- Nt as k,
902
- Pt as l,
900
+ _t as j,
901
+ Wt as k,
902
+ Nt as l,
903
903
  Qe as m,
904
904
  N as n,
905
- Dt as o,
906
- K as p,
905
+ Lt as o,
906
+ Pt as p,
907
907
  vt as q,
908
- Lt as r,
908
+ Dt as r,
909
909
  Ot as u,
910
910
  et as v,
911
911
  kt as w
package/dist/utils.js CHANGED
@@ -1,27 +1,27 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.31.2 - 28/10/2025, 15:53:30
3
+ * version: v2.33.0 - 25/11/2025, 21:00:09
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 { a4 as n, a5 as i } from "./errors-DHx3LQ6t.js";
9
- import { X as F, V as G, W as M, T as b, c as k, S as C, E as D, K as O, i as W, z as $, A as X, B as j, k as K, m as V, n as q, e as z, f as J, h as Y, o as Z, G as H, g as Q, a as ee, F as se, Y as ae, D as te, Z as re, l as oe, _ as ne, Q as ie, $ as ce, H as le, a0 as fe, p as me, a1 as ue, r as de, M as ve, O as Re, a2 as Te, s as pe, v as Se, q as ye, y as Ee, a3 as Le, U as _e, J as Ue, w as Ae, C as ge, j as Ne, L as Pe, t as Ie, b as Be, d as he, N as we, I as xe, R as Fe, x as Ge, P as Me, u as be } from "./errors-DHx3LQ6t.js";
10
- import { E as c, L as o, u as l, B as t } from "./datetime-bWwGbGlR.js";
11
- import { n as Ce, b as De, c as Oe, a as We, l as $e, m as Xe, q as je, f as Ke, g as Ve, j as qe, h as ze, d as Je, e as Ye, i as Ze, k as He, t as Qe, r as es, o as ss, v as as, w as ts, x as rs, z as os, p as ns, s as is, A as cs, y as ls } from "./datetime-bWwGbGlR.js";
8
+ import { a4 as n, a5 as i } from "./errors-C61Kgyqj.js";
9
+ import { X as h, V as x, W as C, T as F, c as b, S as k, E as D, K as O, i as W, z as $, A as X, B as j, k as K, m as V, n as q, e as z, f as J, h as Y, o as Z, G as H, g as Q, a as ee, F as se, Y as ae, D as te, Z as re, l as oe, _ as ne, Q as ie, $ as ce, H as le, a0 as fe, p as me, a1 as ue, r as de, M as ve, O as Re, a2 as Te, s as pe, v as Se, q as ye, y as Ee, a3 as _e, U as Le, J as Ae, w as Ue, C as ge, j as Ne, L as Pe, t as Ie, b as we, d as Be, N as Ge, I as Me, R as he, x as xe, P as Ce, u as Fe } from "./errors-C61Kgyqj.js";
10
+ import { G as c, M as o, u as l, C as t } from "./datetime-B_IKGlWy.js";
11
+ import { n as ke, b as De, c as Oe, a as We, l as $e, m as Xe, q as je, D as Ke, f as Ve, g as qe, j as ze, h as Je, d as Ye, e as Ze, i as He, k as Qe, v as es, t as ss, r as as, o as ts, w as rs, x as os, z as ns, A as is, p as cs, s as ls, B as fs, y as ms } from "./datetime-B_IKGlWy.js";
12
12
  import { VBR_API_BASE_URL as f, FLAG_BASE_URL as m, DEFAULT_EXTERNAL_GAME_URL as u, DEFAULT_EXTERNAL_TEAM_URL as d, DEFAULT_EXTERNAL_PLAYER_URL as v, DEFAULT_EXTERNAL_STATISTIC_URL as R } from "./constants.js";
13
13
  var T = /* @__PURE__ */ c(function(e, a) {
14
14
  return Number(e) + Number(a);
15
15
  }), E = /* @__PURE__ */ o(function(e) {
16
16
  return e != null && typeof e.clone == "function" ? e.clone() : n(e, !0);
17
- }), L = /* @__PURE__ */ o(function(e) {
17
+ }), _ = /* @__PURE__ */ o(function(e) {
18
18
  return !l(e);
19
- }), _ = /* @__PURE__ */ i(T, 0);
20
- function U(s) {
19
+ }), L = /* @__PURE__ */ i(T, 0);
20
+ function A(s) {
21
21
  return `${f.replace(/^https?/, "wss").replace("/vbr", "/socket/vbr")}${s}`;
22
22
  }
23
23
  const r = (s = "") => window?.__MJSZ_VBR_WIDGET__?.[s];
24
- function A(s, e = {}) {
24
+ function U(s, e = {}) {
25
25
  if (e.externalGameUrl)
26
26
  return e.externalGameUrl;
27
27
  const a = r("gameResolver") || s;
@@ -39,21 +39,21 @@ function P(s, e = {}) {
39
39
  return typeof s == "function" ? s(e) : encodeURI(s ? t(s, e) : t(R, e));
40
40
  }
41
41
  const I = (s, e = "1x1") => `${m}/flag:${s}-${e}.svg`;
42
- function B(s) {
42
+ function w(s) {
43
43
  return s || (r("apiKey") ? r("apiKey") : "");
44
44
  }
45
- function h() {
45
+ function B() {
46
46
  window.scrollTo(0, 0);
47
47
  }
48
48
  export {
49
- F as InvalidSeasonName,
50
- G as UndefinedColumn,
51
- M as WidgetError,
52
- Ce as addDays,
53
- b as appendTo,
49
+ h as InvalidSeasonName,
50
+ x as UndefinedColumn,
51
+ C as WidgetError,
52
+ ke as addDays,
53
+ F as appendTo,
54
54
  E as clone,
55
- k as convert,
56
- C as convertAddress,
55
+ b as convert,
56
+ k as convertAddress,
57
57
  D as convertGameEvents,
58
58
  O as convertGameOfficials,
59
59
  W as convertGamePeriodResults,
@@ -72,75 +72,77 @@ export {
72
72
  $e as currentWeek,
73
73
  Xe as currentWeekStartEnd,
74
74
  je as endOfMonth,
75
- A as externalGameLinkResolver,
75
+ U as externalGameLinkResolver,
76
76
  N as externalPlayerLinkResolver,
77
77
  P as externalStatisticLinkResolver,
78
78
  g as externalTeamLinkResolver,
79
+ Ke as filterAllowedClasses,
79
80
  Z as filterAndSortSections,
80
81
  H as filterGoalScorersFromEvents,
81
82
  I as flagResolver,
82
- Ke as format,
83
+ Ve as format,
83
84
  Q as gameDateTime,
84
85
  ee as gameResult,
85
- Ve as getLocalTimezone,
86
- U as getWebsocketURL,
86
+ qe as getLocalTimezone,
87
+ A as getWebsocketURL,
87
88
  se as groupLines,
88
89
  ae as head,
89
- qe as isAfter,
90
- ze as isBefore,
91
- Je as isBetween,
90
+ ze as isAfter,
91
+ Je as isBefore,
92
+ Ye as isBetween,
92
93
  l as isEmpty,
93
- L as isNotEmpty,
94
- Ye as isSame,
95
- Ze as isSameOrBefore,
96
- He as isToday,
94
+ _ as isNotEmpty,
95
+ Ze as isSame,
96
+ He as isSameOrBefore,
97
+ Qe as isToday,
97
98
  te as joinOfficals,
98
99
  re as last,
99
100
  oe as localeSort,
100
- Qe as max,
101
+ es as map,
102
+ ss as max,
101
103
  ne as mergeLeft,
102
104
  ie as mergePlayerStats,
103
- es as min,
104
- ss as offsetName,
105
- as as omit,
106
- ts as path,
105
+ as as min,
106
+ ts as offsetName,
107
+ rs as omit,
108
+ os as path,
107
109
  ce as pick,
108
110
  le as pickCoaches,
109
111
  fe as pipe,
110
112
  me as playerName,
111
- rs as prop,
113
+ ns as prop,
112
114
  ue as propEq,
113
115
  de as rawConvert,
114
- os as reject,
116
+ is as reject,
115
117
  ve as removeCurrentFromSeasonStats,
116
118
  Re as removeUnneededPhases,
117
- B as resolveApiKey,
119
+ w as resolveApiKey,
118
120
  Te as reverse,
119
121
  pe as scheduleOptionalRowClass,
120
- h as scrollToTop,
122
+ B as scrollToTop,
121
123
  Se as selectFirstPhaseName,
122
124
  ye as selectFirstSectionId,
123
125
  Ee as selectLastSections,
124
- Le as sortBy,
125
- _e as sortByDomNode,
126
- Ue as sortByEventTimeSec,
127
- Ae as sortByPhaseId,
126
+ _e as sortBy,
127
+ Le as sortByDomNode,
128
+ Ae as sortByEventTimeSec,
129
+ Ue as sortByPhaseId,
128
130
  ge as sortByStartingFive,
129
131
  Ne as sortGames,
130
132
  Pe as standingTableSort,
131
- ns as startOfMonth,
132
- is as subtractDays,
133
- _ as sum,
133
+ cs as startOfMonth,
134
+ ls as subtractDays,
135
+ L as sum,
134
136
  Ie as teamName,
135
- Be as teamOpponent,
136
- he as teamResultType,
137
+ we as teamOpponent,
138
+ Be as teamResultType,
137
139
  t as templateReplacer,
138
- cs as toKebabCase,
139
- we as transformCurrentSeasonStats,
140
- xe as transformEventsForGameTimeline,
141
- Fe as transformFieledPlayersStats,
142
- Ge as transformPlayers,
143
- Me as transformRosters,
144
- be as upperCase,
145
- ls as yearToNow
140
+ fs as toKebabCase,
141
+ Ge as transformCurrentSeasonStats,
142
+ Me as transformEventsForGameTimeline,
143
+ he as transformFieledPlayersStats,
144
+ xe as transformPlayers,
145
+ Ce as transformRosters,
146
+ Fe as upperCase,
147
+ ms as yearToNow
146
148
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mjsz-vbr-elements/core",
3
3
  "type": "module",
4
- "version": "2.31.2",
4
+ "version": "2.33.0",
5
5
  "private": false,
6
6
  "description": "Data visualization for MJSZ VBR",
7
7
  "author": "Ákos Stegner <akos.stegner@gmail.com>",
@@ -24,6 +24,9 @@
24
24
  },
25
25
  "./columns": {
26
26
  "import": "./dist/columns.js"
27
+ },
28
+ "./props": {
29
+ "import": "./dist/props.js"
27
30
  }
28
31
  },
29
32
  "module": "./dist/index.js",
@@ -40,7 +43,7 @@
40
43
  "dayjs": "^1.11.13",
41
44
  "ramda": "^0.31.3",
42
45
  "vue": "^3.5.22",
43
- "@mjsz-vbr-elements/shared": "^2.31.2"
46
+ "@mjsz-vbr-elements/shared": "^2.33.0"
44
47
  },
45
48
  "devDependencies": {
46
49
  "@vitejs/plugin-vue": "^6.0.0",