@mjsz-vbr-elements/core 2.1.10 → 2.2.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.
Binary file
Binary file
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  /**
2
2
  * name: @mjsz-vbr-elements/core
3
- * version: v2.1.10 - 02/01/2024, 13:37:56
3
+ * version: v2.2.0 - 04/01/2024, 13:03:06
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 { BaseSelect as A, DataTable as p, ErrorNotice as m, ErrorProvider as c, FloatingPanel as N, I18NProvider as f, Image as R, LoadingIndicator as u, Paginator as d, ResponsiveTable as g, ScheduleTable as C, SeasonSelector as I, StatisticsTable as M, TimezoneSelector as y } from "./components.js";
9
- import { c as P, i as U, u as v, b as D, a as F, d as G, e as x, f as B, g as b, v as h } from "./useSort-f443338c.js";
10
- import { fetchVBRData as w, usePage as k, useScrollToGameDate as V, useServices as W, useVisibilityChange as z } from "./composables.js";
8
+ import { c as p, b as m, d as f, e as N, g as u, I as R, _ as d, k as g, a as C, j as I, f as M, h as y, i as O, l as P } from "./SeasonSelector-hqWIAEq6.js";
9
+ import { c as v, i as D, u as x, b as F, a as G, d as b, e as h, f as B, g as Y, v as w } from "./useSort-WcJ_BIws.js";
10
+ import { fetchVBRData as V, usePage as W, useScrollToGameDate as z, useServices as K, useVisibilityChange as X } from "./composables.js";
11
11
  import "vue";
12
- import { I as X, U as Z, W as H, i as J, c as j, e as q, f as Q, h as $, g as ee, a as ae, l as te, p as re, r as se, s as oe, t as ne, b as ie, d as le, u as Se } from "./convert-18c8bb80.js";
13
- import { b as Te, c as Ee, a as Le, f as Ae, g as pe, d as me, e as ce, i as Ne, o as fe, h as Re, t as ue, y as de } from "./datetime-2fb02df2.js";
14
- import { externalGameLinkResolver as Ce, externalPlayerLinkResolver as Ie, externalTeamLinkResolver as Me, flagResolver as ye, scrollToTop as Oe } from "./utils.js";
15
- import { COLUMNS_FIELD_PLAYERS as Ue, COLUMNS_FIELD_PLAYERS_PENALTY as ve, COLUMNS_GOALIES as De, COLUMNS_SCHEDULE as Fe, COLUMNS_SCORING_EFFICIENCY as Ge, COLUMNS_STANDINGS_P_2 as xe, COLUMNS_STANDINGS_P_3 as Be, COLUMNS_TEAMS_FAIRPLAY as be, COLUMNS_TEAMS_PENALTY_KILLING as he, COLUMNS_TEAMS_POWERPLAY as Ye, COLUMNS_TEAM_ATTENDANCE as we } from "./columns.js";
16
- import { AVAILABLE_TIMEZONES_BY_COUNTRY as Ve, DEFAULT_EXTERNAL_GAME_URL as We, DEFAULT_EXTERNAL_PLAYER_URL as ze, DEFAULT_EXTERNAL_TEAM_URL as Ke, DEFAULT_PORTRAIT_IMAGE_URL as Xe, FLAG_BASE_URL as Ze, LAZY_LOADING_STATE_DELAY as He, LOCALE_FOR_LANG as Je, REFRESH_DELAY as je, SORT_STATE_ASCEND as qe, SORT_STATE_DESCEND as Qe, SORT_STATE_ORIGINAL as $e, VBR_API_BASE_URL as ea } from "./constants.js";
17
- const i = {
12
+ import { I as H, U as j, W as J, i as q, c as Q, e as $, f as ee, h as ae, g as te, a as se, l as re, p as oe, r as ne, s as ie, t as le, b as Se, d as _e, u as Te } from "./convert-PMHuZhPy.js";
13
+ import { b as Le, c as Ae, a as ce, f as pe, g as me, d as fe, e as Ne, i as ue, o as Re, h as de, t as ge, y as Ce } from "./datetime-EyEBo0-h.js";
14
+ import { externalGameLinkResolver as Me, externalPlayerLinkResolver as ye, externalTeamLinkResolver as Oe, flagResolver as Pe, scrollToTop as Ue } from "./utils.js";
15
+ import { COLUMNS_FIELD_PLAYERS as De, COLUMNS_FIELD_PLAYERS_PENALTY as xe, COLUMNS_GOALIES as Fe, COLUMNS_SCHEDULE as Ge, COLUMNS_SCORING_EFFICIENCY as be, COLUMNS_STANDINGS_P_2 as he, COLUMNS_STANDINGS_P_3 as Be, COLUMNS_TEAMS_FAIRPLAY as Ye, COLUMNS_TEAMS_PENALTY_KILLING as we, COLUMNS_TEAMS_POWERPLAY as ke, COLUMNS_TEAM_ATTENDANCE as Ve } from "./columns.js";
16
+ import { AVAILABLE_TIMEZONES_BY_COUNTRY as ze, DEFAULT_EXTERNAL_GAME_URL as Ke, DEFAULT_EXTERNAL_PLAYER_URL as Xe, DEFAULT_EXTERNAL_TEAM_URL as Ze, DEFAULT_PORTRAIT_IMAGE_URL as He, FLAG_BASE_URL as je, LAZY_LOADING_STATE_DELAY as Je, LOCALE_FOR_LANG as qe, REFRESH_DELAY as Qe, SORT_STATE_ASCEND as $e, SORT_STATE_DESCEND as ea, SORT_STATE_ORIGINAL as aa, VBR_API_BASE_URL as ta } from "./constants.js";
17
+ const S = {
18
18
  locale: {
19
19
  type: String,
20
20
  default: "hu"
@@ -39,7 +39,7 @@ const i = {
39
39
  type: String,
40
40
  default: ""
41
41
  }
42
- }, l = {
42
+ }, _ = {
43
43
  externalTeamResolver: {
44
44
  type: [String, Function],
45
45
  default: ""
@@ -48,7 +48,7 @@ const i = {
48
48
  type: Boolean,
49
49
  default: !1
50
50
  }
51
- }, S = {
51
+ }, T = {
52
52
  limit: {
53
53
  type: Number,
54
54
  default: 20
@@ -65,7 +65,7 @@ const i = {
65
65
  type: Boolean,
66
66
  default: !1
67
67
  }
68
- }, _ = {
68
+ }, E = {
69
69
  externalGameResolver: {
70
70
  type: [String, Function],
71
71
  default: ""
@@ -74,107 +74,112 @@ const i = {
74
74
  type: Boolean,
75
75
  default: !1
76
76
  }
77
- }, T = ({ modules: a = [], apiKey: t, gameResolver: r, teamResolver: s, playerResolver: o }) => {
78
- if (window.__MJSZ_VBR_WIDGET__ = { apiKey: t, gameResolver: r, teamResolver: s, playerResolver: o }, a.length === 0)
77
+ }, i = ({ app: a = null, modules: t = [], apiKey: s, gameResolver: r, teamResolver: o, playerResolver: n }) => {
78
+ if (window.__MJSZ_VBR_WIDGET__ = { apiKey: s, gameResolver: r, teamResolver: o, playerResolver: n }, t.length === 0)
79
79
  throw new Error("At least one module must be set");
80
- a.forEach((e) => {
80
+ t.forEach((e) => {
81
+ if (a)
82
+ return a.use(e);
81
83
  if (e.register)
82
84
  return e.register();
83
- e == null || e();
85
+ e == null || e.install();
84
86
  });
87
+ }, L = {
88
+ install: (a, t = {}) => i({ app: a, ...t })
85
89
  };
86
90
  export {
87
- Ve as AVAILABLE_TIMEZONES_BY_COUNTRY,
88
- A as BaseSelect,
89
- Ue as COLUMNS_FIELD_PLAYERS,
90
- ve as COLUMNS_FIELD_PLAYERS_PENALTY,
91
- De as COLUMNS_GOALIES,
92
- Fe as COLUMNS_SCHEDULE,
93
- Ge as COLUMNS_SCORING_EFFICIENCY,
94
- xe as COLUMNS_STANDINGS_P_2,
91
+ ze as AVAILABLE_TIMEZONES_BY_COUNTRY,
92
+ p as BaseSelect,
93
+ De as COLUMNS_FIELD_PLAYERS,
94
+ xe as COLUMNS_FIELD_PLAYERS_PENALTY,
95
+ Fe as COLUMNS_GOALIES,
96
+ Ge as COLUMNS_SCHEDULE,
97
+ be as COLUMNS_SCORING_EFFICIENCY,
98
+ he as COLUMNS_STANDINGS_P_2,
95
99
  Be as COLUMNS_STANDINGS_P_3,
96
- be as COLUMNS_TEAMS_FAIRPLAY,
97
- he as COLUMNS_TEAMS_PENALTY_KILLING,
98
- Ye as COLUMNS_TEAMS_POWERPLAY,
99
- we as COLUMNS_TEAM_ATTENDANCE,
100
- We as DEFAULT_EXTERNAL_GAME_URL,
101
- ze as DEFAULT_EXTERNAL_PLAYER_URL,
102
- Ke as DEFAULT_EXTERNAL_TEAM_URL,
103
- Xe as DEFAULT_PORTRAIT_IMAGE_URL,
104
- p as DataTable,
105
- m as ErrorNotice,
106
- c as ErrorProvider,
107
- Ze as FLAG_BASE_URL,
108
- N as FloatingPanel,
109
- f as I18NProvider,
110
- R as Image,
111
- X as InvalidSeasonName,
112
- He as LAZY_LOADING_STATE_DELAY,
113
- Je as LOCALE_FOR_LANG,
114
- u as LoadingIndicator,
115
- d as Paginator,
116
- je as REFRESH_DELAY,
117
- g as ResponsiveTable,
118
- qe as SORT_STATE_ASCEND,
119
- Qe as SORT_STATE_DESCEND,
120
- $e as SORT_STATE_ORIGINAL,
121
- C as ScheduleTable,
122
- I as SeasonSelector,
123
- M as StatisticsTable,
124
- y as TimezoneSelector,
125
- Z as UndefinedColumn,
126
- ea as VBR_API_BASE_URL,
127
- H as WidgetError,
128
- J as appendTo,
129
- i as baseProps,
130
- j as convert,
131
- Te as convertMinToMinSec,
132
- Ee as convertMinToSec,
133
- Le as convertSecToMin,
134
- q as convertTimes,
135
- Q as convertTimesMinToMinSec,
136
- $ as convertTimesSecToMin,
137
- T as createConfig,
138
- P as createI18n,
139
- Ce as externalGameLinkResolver,
140
- Ie as externalPlayerLinkResolver,
141
- Me as externalTeamLinkResolver,
142
- w as fetchVBRData,
143
- ye as flagResolver,
144
- Ae as format,
145
- ee as gameDateTime,
146
- _ as gameProps,
147
- ae as gameResult,
148
- pe as getLocalTimezone,
149
- U as i18n,
150
- me as isBetween,
151
- ce as isSame,
152
- Ne as isSameOrBefore,
153
- te as localeSort,
154
- fe as offsetName,
155
- re as playerName,
156
- S as playerStatsProps,
157
- se as rawConvert,
158
- Oe as scrollToTop,
159
- oe as sortGames,
160
- ne as teamName,
161
- ie as teamOpponent,
162
- le as teamResultType,
163
- l as teamStatsProps,
164
- Re as templateReplacer,
165
- ue as toKebabCase,
166
- Se as upperCase,
167
- v as useColumns,
168
- D as useError,
169
- F as useErrorProvider,
170
- G as useI18n,
171
- x as useLazyLoadingState,
100
+ Ye as COLUMNS_TEAMS_FAIRPLAY,
101
+ we as COLUMNS_TEAMS_PENALTY_KILLING,
102
+ ke as COLUMNS_TEAMS_POWERPLAY,
103
+ Ve as COLUMNS_TEAM_ATTENDANCE,
104
+ Ke as DEFAULT_EXTERNAL_GAME_URL,
105
+ Xe as DEFAULT_EXTERNAL_PLAYER_URL,
106
+ Ze as DEFAULT_EXTERNAL_TEAM_URL,
107
+ He as DEFAULT_PORTRAIT_IMAGE_URL,
108
+ m as DataTable,
109
+ f as ErrorNotice,
110
+ N as ErrorProvider,
111
+ je as FLAG_BASE_URL,
112
+ u as FloatingPanel,
113
+ R as I18NProvider,
114
+ d as Image,
115
+ H as InvalidSeasonName,
116
+ Je as LAZY_LOADING_STATE_DELAY,
117
+ qe as LOCALE_FOR_LANG,
118
+ g as LoadingIndicator,
119
+ C as Paginator,
120
+ Qe as REFRESH_DELAY,
121
+ I as ResponsiveTable,
122
+ $e as SORT_STATE_ASCEND,
123
+ ea as SORT_STATE_DESCEND,
124
+ aa as SORT_STATE_ORIGINAL,
125
+ M as ScheduleTable,
126
+ y as SeasonSelector,
127
+ O as StatisticsTable,
128
+ P as TimezoneSelector,
129
+ j as UndefinedColumn,
130
+ ta as VBR_API_BASE_URL,
131
+ J as WidgetError,
132
+ q as appendTo,
133
+ S as baseProps,
134
+ Q as convert,
135
+ Le as convertMinToMinSec,
136
+ Ae as convertMinToSec,
137
+ ce as convertSecToMin,
138
+ $ as convertTimes,
139
+ ee as convertTimesMinToMinSec,
140
+ ae as convertTimesSecToMin,
141
+ i as createConfig,
142
+ v as createI18n,
143
+ L as default,
144
+ Me as externalGameLinkResolver,
145
+ ye as externalPlayerLinkResolver,
146
+ Oe as externalTeamLinkResolver,
147
+ V as fetchVBRData,
148
+ Pe as flagResolver,
149
+ pe as format,
150
+ te as gameDateTime,
151
+ E as gameProps,
152
+ se as gameResult,
153
+ me as getLocalTimezone,
154
+ D as i18n,
155
+ fe as isBetween,
156
+ Ne as isSame,
157
+ ue as isSameOrBefore,
158
+ re as localeSort,
159
+ Re as offsetName,
160
+ oe as playerName,
161
+ T as playerStatsProps,
162
+ ne as rawConvert,
163
+ Ue as scrollToTop,
164
+ ie as sortGames,
165
+ le as teamName,
166
+ Se as teamOpponent,
167
+ _e as teamResultType,
168
+ _ as teamStatsProps,
169
+ de as templateReplacer,
170
+ ge as toKebabCase,
171
+ Te as upperCase,
172
+ x as useColumns,
173
+ F as useError,
174
+ G as useErrorProvider,
175
+ b as useI18n,
176
+ h as useLazyLoadingState,
172
177
  B as useMainClass,
173
- k as usePage,
174
- V as useScrollToGameDate,
175
- W as useServices,
176
- b as useSort,
177
- z as useVisibilityChange,
178
- h as validateColumnsName,
179
- de as yearToNow
178
+ W as usePage,
179
+ z as useScrollToGameDate,
180
+ K as useServices,
181
+ Y as useSort,
182
+ X as useVisibilityChange,
183
+ w as validateColumnsName,
184
+ Ce as yearToNow
180
185
  };