@spash/frontlib 0.0.6 → 0.0.7

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/main.d.ts ADDED
@@ -0,0 +1,316 @@
1
+ import { App } from 'vue';
2
+ import { AxiosInstance } from 'axios';
3
+ import { Config } from 'tailwindcss/types/config';
4
+ import { DateTime } from 'luxon';
5
+ import { DateTimeUnit } from 'luxon';
6
+ import { MonthNumbers } from 'luxon';
7
+ import { PluginCreator } from 'tailwindcss/types/config';
8
+ import { Ref } from 'vue';
9
+ import { useI18n } from 'vue-i18n';
10
+
11
+ declare interface AppOptions {
12
+ autoImport?: {
13
+ components: boolean;
14
+ };
15
+ i18n?: {
16
+ messages: any;
17
+ };
18
+ }
19
+
20
+ export declare interface CameraConfiguration {
21
+ id: number;
22
+ layer: CameraConfigurationLayer[];
23
+ }
24
+
25
+ export declare interface CameraConfigurationLayer {
26
+ label: string;
27
+ points: {
28
+ x: number;
29
+ y: number;
30
+ }[];
31
+ width: number;
32
+ height: number;
33
+ color: {
34
+ background: string;
35
+ border: string;
36
+ key: string;
37
+ text: string;
38
+ variable: string;
39
+ };
40
+ }
41
+
42
+ export declare interface Competition {
43
+ id: number;
44
+ name: string;
45
+ firstLogoImageUrl: string;
46
+ secondLogoImageUrl: string;
47
+ createdAt: string;
48
+ }
49
+
50
+ declare const _default: (app: App, options?: AppOptions) => void;
51
+ export default _default;
52
+
53
+ export declare interface Field {
54
+ id: number;
55
+ name: string;
56
+ theme: string;
57
+ planningAvailable: boolean;
58
+ sport: Sport;
59
+ subscribedOptions: string[];
60
+ camerasTotal: number;
61
+ camerasConfiguration: CameraConfiguration[];
62
+ }
63
+
64
+ export declare interface Player {
65
+ id: number;
66
+ name: string;
67
+ email: string;
68
+ }
69
+
70
+ declare const Plugin_2: {
71
+ handler: PluginCreator;
72
+ config?: Partial<Config> | undefined;
73
+ };
74
+ export { Plugin_2 as Plugin }
75
+
76
+ export declare interface Session {
77
+ '@id': string;
78
+ id: number;
79
+ name: string;
80
+ plannedStartedAt: string;
81
+ plannedEndedAt: string;
82
+ actualStartedAt: string;
83
+ actualEndedAt: string;
84
+ actualDuration: number;
85
+ plannedDuration: number;
86
+ status: string;
87
+ reference: string;
88
+ bookingProvider: string;
89
+ bookingProviderData?: string;
90
+ gameSheetUrl: string;
91
+ competitionStage: string;
92
+ videoUploadEnabled?: boolean;
93
+ competition: Competition;
94
+ sport: Sport;
95
+ ngtvSessionType?: SessionType;
96
+ ngtvSessionHomeTeam: SessionTeam;
97
+ ngtvSessionAwayTeam: SessionTeam;
98
+ field: Field;
99
+ ngtvSessionEvents: SessionEvent[];
100
+ ngtvSessionPlayers: SessionPlayer[];
101
+ }
102
+
103
+ export declare interface SessionEvent {
104
+ id: number;
105
+ type: string;
106
+ name: string;
107
+ currentSet: number;
108
+ videoTimecode: number;
109
+ currentScoreAway: number[];
110
+ currentScoreHome: number[];
111
+ ngtvSessionTeam: SessionTeam;
112
+ ngtvSessionPlayer: SessionPlayer;
113
+ secondNgtvSessionPlayer: SessionPlayer;
114
+ }
115
+
116
+ export declare interface SessionEventInput {
117
+ type: string;
118
+ ngtvSession: string;
119
+ ngtvSessionTeam?: string | null;
120
+ ngtvSessionPlayer?: string | null;
121
+ secondNgtvSessionPlayer?: string | null;
122
+ matchTimecode: number;
123
+ videoTimecode: number;
124
+ }
125
+
126
+ export declare interface SessionEventTypes {
127
+ id: number;
128
+ type: string;
129
+ name: string;
130
+ color: string;
131
+ }
132
+
133
+ export declare interface SessionInput {
134
+ name?: string;
135
+ status?: string;
136
+ plannedStartedAt?: string | null;
137
+ plannedEndedAt?: string | null;
138
+ field?: string;
139
+ ngtvSessionType?: string;
140
+ bookingProvider?: string;
141
+ bookingProviderData?: string;
142
+ videoUploadEnabled?: boolean;
143
+ }
144
+
145
+ export declare interface SessionPlayer {
146
+ id: number;
147
+ numberOfGoalScored: number;
148
+ numberOfAssists: number;
149
+ player: Player;
150
+ ngtvSessionTeam: SessionTeam;
151
+ }
152
+
153
+ export declare interface SessionTeam {
154
+ id: number;
155
+ home: boolean;
156
+ score: number[];
157
+ team: Team;
158
+ maxConsecutiveGoals?: number;
159
+ maxInvincibilityDuration?: number;
160
+ }
161
+
162
+ export declare interface SessionType {
163
+ id?: number;
164
+ }
165
+
166
+ export declare type SIZES = 'md' | 'lg' | 'xl';
167
+
168
+ export declare enum SpashVideoOptions {
169
+ 'buzz' = "buzz",
170
+ 'layer' = "layer",
171
+ 'draw' = "draw",
172
+ 'field2D' = "field2D"
173
+ }
174
+
175
+ export declare interface SpashVideoPlayer {
176
+ destroyPlayer: () => void;
177
+ onUpdateVideoPlayerBarTimecode: (v: number) => void;
178
+ setControlWidth: (v: string) => void;
179
+ }
180
+
181
+ declare interface SponsoringAttributes {
182
+ fieldId: number;
183
+ sportName: string;
184
+ }
185
+
186
+ declare interface SponsoringOptions {
187
+ attributes: SponsoringAttributes | null;
188
+ siteId: number;
189
+ pageId: number;
190
+ formatIds: string;
191
+ formatId: number;
192
+ classes?: string;
193
+ element?: string;
194
+ }
195
+
196
+ export declare interface Sport {
197
+ id: number;
198
+ name: string;
199
+ racketSport: boolean;
200
+ }
201
+
202
+ export declare interface SportCenter {
203
+ id: number;
204
+ durationChoices: number[];
205
+ language: string;
206
+ }
207
+
208
+ declare interface SseCallback {
209
+ onOpen?: (event: any) => void;
210
+ onMessage?: (event?: any) => void;
211
+ onError?: (event: any) => void;
212
+ }
213
+
214
+ export declare interface Team {
215
+ id: number;
216
+ name: string;
217
+ primaryColor: string;
218
+ secondaryColor: string;
219
+ maxConsecutiveGoals: number;
220
+ }
221
+
222
+ export declare const useAdServer: () => {
223
+ hasAdServerContent: Ref<boolean>;
224
+ initAdServer: () => void;
225
+ callAdServer: (attributes: SponsoringAttributes | null, siteId: number, pageId: number, formats: string) => void;
226
+ addAdvertising: (advertId: number, divClasses?: string, divStyles?: string, target?: string, el?: any) => void;
227
+ resetAdServerAdvertising: () => void;
228
+ addSponsoringContent: ({ attributes, siteId, pageId, formatIds, formatId, classes, element, }: SponsoringOptions) => void;
229
+ };
230
+
231
+ export declare const useAxios: (apiUrl: string) => {
232
+ axiosInstance: () => AxiosInstance;
233
+ };
234
+
235
+ export declare const useCompetition: ({ t }?: {
236
+ t?: any;
237
+ }) => {
238
+ groupsOptions: (groupsTotal?: number) => {
239
+ id: string;
240
+ name: any;
241
+ }[];
242
+ };
243
+
244
+ /**
245
+ * It imports all the components in the `components` and `modules` directories, and registers them with
246
+ * the Vue instance
247
+ * @param {App} app - App - The app object that is passed to the plugin function.
248
+ */
249
+ export declare const useComponent: (app: App, components: any, moduleComponents: any) => void;
250
+
251
+ export declare const useDisplayImage: () => {
252
+ logoInline: Ref<any>;
253
+ logoSmall: Ref<any>;
254
+ homeBackgroundLeft: string;
255
+ homeBackgroundRight: string;
256
+ matchBackground: string;
257
+ reloadImages: (theme: string) => void;
258
+ };
259
+
260
+ export declare const useHelper: ({ t, router }?: {
261
+ t?: any;
262
+ router?: any;
263
+ }) => {
264
+ timeout: Ref<any>;
265
+ getAndParseObjectFromLocalStorage: (key: string) => any;
266
+ timecodeToString: (timecode: any, mode?: string, displayEmpty?: boolean) => string;
267
+ dynamicSort: (property: any, sortType?: string) => (a: any, b: any) => number;
268
+ redirectToUrl: (redirectUrl: string) => void;
269
+ timeoutRedirectToPage: (routeName: string, timeoutMinutes?: number) => void;
270
+ buildQueryParams: (queryParams: any) => string;
271
+ groupBy: (items: any[], key: string) => any[];
272
+ timecodeToTimeObject: (timecode: any) => {
273
+ hours: number;
274
+ minutes: number;
275
+ seconds: number;
276
+ };
277
+ arrayUniqueValue: (array: any[], key: string) => any[];
278
+ };
279
+
280
+ export { useI18n }
281
+
282
+ export declare const useIdle: (time: number) => {
283
+ isIdle: Ref<boolean>;
284
+ };
285
+
286
+ export declare const useLuxon: () => {
287
+ DateTime: typeof DateTime;
288
+ currentDate: DateTime<true>;
289
+ currentMonth: MonthNumbers;
290
+ currentMonthName: string;
291
+ currentMonthFormated: string;
292
+ currentTime: string;
293
+ nextMonth: MonthNumbers;
294
+ nextMonthName: string;
295
+ prevMonth: MonthNumbers;
296
+ prevMonthName: string;
297
+ currentYear: number;
298
+ prevYear: number;
299
+ dateStartOf: (date: Date | string, of?: DateTimeUnit) => string | null;
300
+ dateEndOf: (date: Date | string, of?: DateTimeUnit) => string | null;
301
+ dateEndSession: (date: any, plannedDuration: number) => any;
302
+ formatDateTime: (date: any) => any;
303
+ };
304
+
305
+ export declare const useSse: (apiUrl: string) => {
306
+ eventSource: Ref<EventSource | undefined>;
307
+ addSubscriber: (topic: string, callback?: SseCallback) => EventSource;
308
+ };
309
+
310
+ export declare const useTheme: () => {
311
+ defaultTheme: Ref<string>;
312
+ currentTheme: Ref<string>;
313
+ setTheme: (newTheme: string) => void;
314
+ };
315
+
316
+ export { }