@wscsports/blaze-web-sdk 0.0.118 → 0.0.119
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/package.json +3 -1
- package/publish/index.d.ts +75 -19
- package/publish/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wscsports/blaze-web-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.119",
|
|
4
4
|
"main": "publish/index",
|
|
5
5
|
"types": "publish/index",
|
|
6
6
|
"files": [
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
"@types/hammerjs": "^2.0.41",
|
|
18
18
|
"@types/lodash": "^4.14.195",
|
|
19
19
|
"@types/ua-parser-js": "^0.7.36",
|
|
20
|
+
"css-loader": "^6.8.1",
|
|
20
21
|
"html-webpack-plugin": "^5.5.3",
|
|
21
22
|
"javascript-obfuscator": "^4.0.2",
|
|
23
|
+
"style-loader": "^3.3.3",
|
|
22
24
|
"ts-loader": "^9.4.4",
|
|
23
25
|
"typescript": "^5.1.6",
|
|
24
26
|
"typescript-declaration-webpack-plugin": "^0.3.0",
|
package/publish/index.d.ts
CHANGED
|
@@ -380,7 +380,7 @@ export type DeepPartial<T> = T extends object ? {
|
|
|
380
380
|
} : T;
|
|
381
381
|
export declare function flattenObject<T extends Record<string, any>>(obj: T): Record<string, any>;
|
|
382
382
|
|
|
383
|
-
export declare function Initialize(apiKey: string, options?: IBlazeSDKOptions): Promise<void>;
|
|
383
|
+
export declare function Initialize(apiKey: string, options?: Omit<IBlazeSDKOptions, "apiKey">): Promise<void>;
|
|
384
384
|
export declare function WidgetRowView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
385
385
|
export declare function WidgetGridView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
386
386
|
export declare function Theme(theme: ThemeType): IWidgetTheme;
|
|
@@ -449,10 +449,10 @@ export declare class API {
|
|
|
449
449
|
|
|
450
450
|
export * from './api';
|
|
451
451
|
|
|
452
|
-
export declare class BaseHTMLElement extends HTMLElement {
|
|
452
|
+
export declare abstract class BaseHTMLElement extends HTMLElement {
|
|
453
453
|
protected _animationDuration: number;
|
|
454
454
|
constructor();
|
|
455
|
-
getAttribute<T =
|
|
455
|
+
getAttribute<T = boolean | string | number>(qualifiedName: string): T;
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
export declare class EventsListener {
|
|
@@ -504,7 +504,18 @@ export interface ResizeEvent extends Event {
|
|
|
504
504
|
}
|
|
505
505
|
export declare function throttle<T extends Event>(func: EventHandler<T>, delay: number): (event: T) => void;
|
|
506
506
|
|
|
507
|
-
export declare class
|
|
507
|
+
export declare class BlazeAlert extends BaseHTMLElement {
|
|
508
|
+
titleContainer: HTMLDivElement;
|
|
509
|
+
textContainer: HTMLDivElement;
|
|
510
|
+
constructor();
|
|
511
|
+
static get observedAttributes(): string[];
|
|
512
|
+
connectedCallback(): void;
|
|
513
|
+
disconnectedCallback(): void;
|
|
514
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
515
|
+
setAttribute(qualifiedName: 'alert-title' | 'alert-text', value: string): void;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export declare class BlazeChip extends BaseHTMLElement {
|
|
508
519
|
constructor();
|
|
509
520
|
}
|
|
510
521
|
|
|
@@ -512,12 +523,28 @@ export interface BlazeImageOptions {
|
|
|
512
523
|
fetchPriority: FetchPriorityType;
|
|
513
524
|
src: string;
|
|
514
525
|
}
|
|
515
|
-
export declare class BlazeImage extends
|
|
516
|
-
constructor(
|
|
526
|
+
export declare class BlazeImage extends BaseHTMLElement {
|
|
527
|
+
constructor();
|
|
517
528
|
}
|
|
518
529
|
|
|
530
|
+
export * from './alert';
|
|
519
531
|
export * from './chip';
|
|
520
532
|
export * from './image';
|
|
533
|
+
export * from './toast';
|
|
534
|
+
|
|
535
|
+
export declare class BlazeToast extends BaseHTMLElement {
|
|
536
|
+
constructor();
|
|
537
|
+
static get observedAttributes(): string[];
|
|
538
|
+
connectedCallback(): void;
|
|
539
|
+
disconnectedCallback(): void;
|
|
540
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
541
|
+
show(options: {
|
|
542
|
+
show: boolean;
|
|
543
|
+
sevrity: SeverityType;
|
|
544
|
+
title?: string;
|
|
545
|
+
text: string;
|
|
546
|
+
}): void;
|
|
547
|
+
}
|
|
521
548
|
|
|
522
549
|
export declare enum StoryAction {
|
|
523
550
|
Start = "story_start",
|
|
@@ -644,13 +671,20 @@ export declare enum Delegation {
|
|
|
644
671
|
|
|
645
672
|
export * from './event';
|
|
646
673
|
|
|
674
|
+
export declare abstract class ElementsFactory {
|
|
675
|
+
static create<T extends BaseHTMLElement>(e: ElementType): T;
|
|
676
|
+
static define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions | undefined): void;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
export * from './elements.factory';
|
|
680
|
+
|
|
647
681
|
export type EnvironmentType = 'prod' | 'uat';
|
|
648
682
|
export interface IBlazeSDKOptions {
|
|
649
683
|
apiKey: string;
|
|
650
|
-
environment
|
|
651
|
-
sendAnalytics
|
|
652
|
-
previewUrl
|
|
653
|
-
previewMomentUrl
|
|
684
|
+
environment?: EnvironmentType;
|
|
685
|
+
sendAnalytics?: boolean | undefined;
|
|
686
|
+
previewUrl?: string;
|
|
687
|
+
previewMomentUrl?: string;
|
|
654
688
|
}
|
|
655
689
|
|
|
656
690
|
export interface IDatabase {
|
|
@@ -705,6 +739,17 @@ export interface IWidgetView {
|
|
|
705
739
|
reload: (labels?: string[]) => void;
|
|
706
740
|
}
|
|
707
741
|
|
|
742
|
+
declare const AlertServiceClass_base: {
|
|
743
|
+
new (): {};
|
|
744
|
+
_instance: AlertServiceClass;
|
|
745
|
+
getInstance(): AlertServiceClass;
|
|
746
|
+
};
|
|
747
|
+
declare abstract class AlertServiceClass extends AlertServiceClass_base implements IService {
|
|
748
|
+
init(): Promise<void>;
|
|
749
|
+
alert(): void;
|
|
750
|
+
}
|
|
751
|
+
export declare const AlertService: AlertServiceClass;
|
|
752
|
+
|
|
708
753
|
export declare enum AdAction {
|
|
709
754
|
Request = "ad_request",
|
|
710
755
|
Load = "ad_load",
|
|
@@ -726,9 +771,7 @@ declare const AnalyticsServiceClass_base: {
|
|
|
726
771
|
};
|
|
727
772
|
declare abstract class AnalyticsServiceClass extends AnalyticsServiceClass_base implements IService {
|
|
728
773
|
events: AnalyticsEvent[];
|
|
729
|
-
|
|
730
|
-
enabled: boolean;
|
|
731
|
-
init(enable: boolean): Promise<void>;
|
|
774
|
+
init(): Promise<void>;
|
|
732
775
|
sendLoop(): Promise<void>;
|
|
733
776
|
bulkEvent(body: Partial<AnalyticsEvent>[]): Promise<any>;
|
|
734
777
|
pushSessionEvent(action: SessionAction, body: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
@@ -1003,6 +1046,7 @@ declare abstract class EventServiceClass extends EventServiceClass_base implemen
|
|
|
1003
1046
|
}
|
|
1004
1047
|
export declare const EventService: EventServiceClass;
|
|
1005
1048
|
|
|
1049
|
+
export * from './alert.ervice';
|
|
1006
1050
|
export * from './analytics.service';
|
|
1007
1051
|
export * from './blaze-api.service';
|
|
1008
1052
|
export * from './blaze-database.service';
|
|
@@ -1152,18 +1196,27 @@ export declare function getLabelStyle(el: IAttributeParser): Partial<LabelStyle>
|
|
|
1152
1196
|
export declare function setupLayoutStyle(layoutStyle: LayoutStyle): void;
|
|
1153
1197
|
export declare function getLayoutStyle(el: IAttributeParser): DeepPartial<LayoutStyle>;
|
|
1154
1198
|
|
|
1199
|
+
|
|
1155
1200
|
export type ClientPlatform = 'Web';
|
|
1156
1201
|
|
|
1202
|
+
export type ComponentsElementType = 'blaze-alert' | 'blaze-toast' | 'blaze-chip' | 'blaze-image';
|
|
1203
|
+
export type WidgetElementType = 'blaze-sdk';
|
|
1204
|
+
export type ElementType = WidgetElementType | ComponentsElementType;
|
|
1205
|
+
|
|
1157
1206
|
export type FetchPriorityType = 'low' | 'high' | 'auto';
|
|
1158
1207
|
|
|
1159
1208
|
export * from './client-platform.type';
|
|
1209
|
+
export * from './element.type';
|
|
1160
1210
|
export * from './fetch-priority.type';
|
|
1161
1211
|
export * from './order.type';
|
|
1212
|
+
export * from './severity.type';
|
|
1162
1213
|
export * from './shape.type';
|
|
1163
1214
|
export * from './thumbnail.type';
|
|
1164
1215
|
|
|
1165
1216
|
export type OrderType = 'Manual' | 'RecentlyUpdatedFirst' | 'AtoZ' | 'RecentlyUpdatedLast' | 'ZtoA';
|
|
1166
1217
|
|
|
1218
|
+
export type SeverityType = 'error' | 'warning' | 'info' | 'success';
|
|
1219
|
+
|
|
1167
1220
|
export type ShapeType = 'rectangle' | 'custom' | 'circle';
|
|
1168
1221
|
|
|
1169
1222
|
export type ThumbnailType = 'SquareIcon' | 'VerticalTwoByThree';
|
|
@@ -1176,9 +1229,12 @@ interface ChipSizeOptions {
|
|
|
1176
1229
|
}
|
|
1177
1230
|
export declare function getChipSize(options: ChipSizeOptions): DOMRect;
|
|
1178
1231
|
|
|
1232
|
+
export declare function delay(ms: number): Promise<void>;
|
|
1233
|
+
|
|
1179
1234
|
export declare function GuardNullOrEmpty(name: string, value: any): void;
|
|
1180
1235
|
|
|
1181
1236
|
export * from './chip.utils';
|
|
1237
|
+
export * from './common.utils';
|
|
1182
1238
|
export * from './guard.utils';
|
|
1183
1239
|
|
|
1184
1240
|
export { BlazeWidgetItem } from './widget-item';
|
|
@@ -1252,7 +1308,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
1252
1308
|
analyticsStack: Record<WidgetAction, boolean>;
|
|
1253
1309
|
intersectionObserver: IntersectionObserver;
|
|
1254
1310
|
onResizeEvent: () => () => void;
|
|
1255
|
-
constructor(
|
|
1311
|
+
constructor();
|
|
1256
1312
|
setLabels(labels: string[]): void;
|
|
1257
1313
|
getTheme(): IWidgetTheme;
|
|
1258
1314
|
setTheme(theme: IWidgetTheme): void;
|
|
@@ -1261,8 +1317,8 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
1261
1317
|
disconnectedCallback(): void;
|
|
1262
1318
|
attributeChangedCallback(name: string, oldValue?: string, newValue?: string): void;
|
|
1263
1319
|
setLabel(label: string | BlazeWidgetLabel): void;
|
|
1264
|
-
|
|
1265
|
-
|
|
1320
|
+
setMaxSize(maxSize: number): void;
|
|
1321
|
+
setMaxItemsSize(maxItemsSize: number): void;
|
|
1266
1322
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
1267
1323
|
createModal(): void;
|
|
1268
1324
|
createMomentsModal(): void;
|
|
@@ -1290,6 +1346,7 @@ export declare class BlazeWidgetModal extends HTMLElement {
|
|
|
1290
1346
|
open(): void;
|
|
1291
1347
|
close(): void;
|
|
1292
1348
|
disconnectedCallback(): void;
|
|
1349
|
+
setTheme(theme: IWidgetTheme): void;
|
|
1293
1350
|
}
|
|
1294
1351
|
|
|
1295
1352
|
export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
@@ -1325,7 +1382,6 @@ export declare class BlazeWidgetMomentPlayer extends HTMLElement {
|
|
|
1325
1382
|
touchStartY: number;
|
|
1326
1383
|
listeners: EventsListener;
|
|
1327
1384
|
constructor();
|
|
1328
|
-
fetchMoments(labels: string, ordering?: OrderType): Promise<void>;
|
|
1329
1385
|
prefetchNeighbours(addIndex?: number): void;
|
|
1330
1386
|
setMoments(moments: BlazeWidgetMoment[]): void;
|
|
1331
1387
|
seekMoment(id: string): void;
|
|
@@ -1432,11 +1488,10 @@ export declare class BlazeWidgetScrollable extends BaseHTMLElement {
|
|
|
1432
1488
|
}
|
|
1433
1489
|
|
|
1434
1490
|
export declare class BlazeWidgetSdk extends BaseHTMLElement {
|
|
1435
|
-
protected readonly apiKey: string;
|
|
1436
1491
|
static isMuted: boolean;
|
|
1437
1492
|
static isPlaying: boolean;
|
|
1438
1493
|
static get observedAttributes(): string[];
|
|
1439
|
-
constructor(
|
|
1494
|
+
constructor();
|
|
1440
1495
|
connectedCallback(): Promise<void>;
|
|
1441
1496
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): Promise<void>;
|
|
1442
1497
|
private getConfigAttributes;
|
|
@@ -1505,6 +1560,7 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
1505
1560
|
hammer: HammerManager | null;
|
|
1506
1561
|
isMultiTouch: boolean;
|
|
1507
1562
|
constructor(parentWidget: HTMLElement);
|
|
1563
|
+
setTheme(theme: IWidgetTheme): void;
|
|
1508
1564
|
setStories(stories: IStory[]): void;
|
|
1509
1565
|
seek(id: string): void;
|
|
1510
1566
|
onKeyDown(ev: KeyboardEvent): void;
|