@wscsports/blaze-web-sdk 0.3.11 → 0.3.13
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 -2
- package/publish/index.d.ts +89 -7
- package/publish/index.js +1 -1
- package/publish/292.index.js +0 -1
- package/publish/666.index.js +0 -1
- package/publish/676.index.js +0 -1
- package/publish/index.js.LICENSE.txt +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wscsports/blaze-web-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"main": "publish/index",
|
|
5
5
|
"types": "publish/index",
|
|
6
6
|
"files": [
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"webpack-cli": "^5.1.4",
|
|
39
39
|
"webpack-dev-server": "^4.15.1",
|
|
40
40
|
"webpack-obfuscator": "^3.5.1",
|
|
41
|
-
"
|
|
41
|
+
"@types/videojs-vtt.js": "^0.15.3",
|
|
42
|
+
"videojs-vtt.js": "^0.15.5"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"animejs": "^3.2.1",
|
package/publish/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare function setGoogleCustomNativeAdsHandler(handler: CustomNativeAdH
|
|
|
18
18
|
export declare function setImaHandler(handler: ImaAdHandler): void;
|
|
19
19
|
export declare function playStory(storyId: string, style?: StoryPlayerStyle): Promise<void>;
|
|
20
20
|
export declare function playStories(dataSource: BlazeDataSourceType, style?: StoryPlayerStyle): Promise<void>;
|
|
21
|
+
export declare function setAbTestParams(abTestParams: BlazeAbTestType): void;
|
|
21
22
|
declare const _default: {
|
|
22
23
|
Initialize: typeof Initialize;
|
|
23
24
|
WidgetGridView: typeof WidgetGridView;
|
|
@@ -37,6 +38,7 @@ declare const _default: {
|
|
|
37
38
|
setExternalUserId: typeof setExternalUserId;
|
|
38
39
|
playStory: typeof playStory;
|
|
39
40
|
playStories: typeof playStories;
|
|
41
|
+
setAbTestParams: typeof setAbTestParams;
|
|
40
42
|
};
|
|
41
43
|
export default _default;
|
|
42
44
|
|
|
@@ -81,6 +83,8 @@ declare class UserEventInfo {
|
|
|
81
83
|
'mac_address': string;
|
|
82
84
|
'user_type': string;
|
|
83
85
|
'is_bot': true;
|
|
86
|
+
'ab_test_id': string;
|
|
87
|
+
'ab_test_variant': string;
|
|
84
88
|
}
|
|
85
89
|
declare class TechEventInfo {
|
|
86
90
|
'device_type': string;
|
|
@@ -182,6 +186,7 @@ export declare class StoryEvent {
|
|
|
182
186
|
'player_type': PlayerType;
|
|
183
187
|
'player_orientation': ContentAspectRatio;
|
|
184
188
|
'cc_state': string;
|
|
189
|
+
'content_extra_info': string;
|
|
185
190
|
}
|
|
186
191
|
export declare class MomentEvent {
|
|
187
192
|
'moments_session_id': string;
|
|
@@ -199,6 +204,7 @@ export declare class MomentEvent {
|
|
|
199
204
|
'loop_number': string;
|
|
200
205
|
'gesture_type': MomentGestureType;
|
|
201
206
|
'cc_state': string;
|
|
207
|
+
'content_extra_info': string;
|
|
202
208
|
}
|
|
203
209
|
export declare class WidgetEvent {
|
|
204
210
|
'page_view_id': string;
|
|
@@ -245,6 +251,7 @@ export declare class AdEvent {
|
|
|
245
251
|
'ad_unit_id': string;
|
|
246
252
|
'session_id': string;
|
|
247
253
|
'gesture_type': MomentGestureType | StoryGestureType;
|
|
254
|
+
'content_extra_info': string;
|
|
248
255
|
}
|
|
249
256
|
export declare class ImaAdEvent {
|
|
250
257
|
'story_id': string;
|
|
@@ -261,6 +268,7 @@ export declare class ImaAdEvent {
|
|
|
261
268
|
'ad_type': string;
|
|
262
269
|
'ima_url': string;
|
|
263
270
|
'player_orientation': ContentAspectRatio;
|
|
271
|
+
'content_extra_info': string;
|
|
264
272
|
}
|
|
265
273
|
export declare class InteractionEvent {
|
|
266
274
|
'interaction_id': string;
|
|
@@ -274,6 +282,7 @@ export declare class InteractionEvent {
|
|
|
274
282
|
'content_page_id': string;
|
|
275
283
|
'playback_action_method': string;
|
|
276
284
|
'audio_state': string;
|
|
285
|
+
'content_extra_info': string;
|
|
277
286
|
}
|
|
278
287
|
|
|
279
288
|
export declare abstract class BaseWidget extends HTMLElement {
|
|
@@ -566,19 +575,23 @@ export declare class BlazeCtaButton extends BaseWidget {
|
|
|
566
575
|
iconArrowElement: BlazeButton;
|
|
567
576
|
ctaTextElement: BlazeDiv;
|
|
568
577
|
isButtonCreated: boolean;
|
|
578
|
+
private animationTimeouts;
|
|
569
579
|
constructor();
|
|
570
580
|
static observedAttributes: string[];
|
|
571
581
|
connectedCallback(): void;
|
|
572
582
|
disconnectedCallback(): void;
|
|
573
583
|
attributeChangedCallback(name: AttributeType, oldValue: string, newValue: string): void;
|
|
574
584
|
createButton(): void;
|
|
575
|
-
animateButton(): void;
|
|
585
|
+
animateButton(animationType: AnimationType): void;
|
|
586
|
+
animateIcon(animationType: AnimationType): void;
|
|
587
|
+
animateElement(element: HTMLElement, animationType: AnimationType, duration: number, delay: number, repeat: number): void;
|
|
576
588
|
setCtaText(value: string): void;
|
|
577
589
|
setWidth(value: string): void;
|
|
578
590
|
setMargin(value: string): void;
|
|
579
591
|
setAnchorButtonStyles(styles: Partial<CSSStyleDeclaration>): void;
|
|
580
592
|
setCtaTextStyle(styles: Partial<CSSStyleDeclaration>): void;
|
|
581
593
|
setCtaIconStyles(styles: Partial<CSSStyleDeclaration>): void;
|
|
594
|
+
clearAllAnimations(): void;
|
|
582
595
|
}
|
|
583
596
|
|
|
584
597
|
export * from './share-button';
|
|
@@ -754,6 +767,12 @@ export interface IBannerAdInfo {
|
|
|
754
767
|
type: 'Banner';
|
|
755
768
|
}
|
|
756
769
|
|
|
770
|
+
export interface AppConfiguration {
|
|
771
|
+
configurations: {
|
|
772
|
+
analyticsAddEntitiesInfo?: string;
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
|
|
757
776
|
export interface IContent {
|
|
758
777
|
id: string;
|
|
759
778
|
title: string;
|
|
@@ -778,6 +797,7 @@ export interface ICTA {
|
|
|
778
797
|
url: string;
|
|
779
798
|
backgroundColor: string;
|
|
780
799
|
textColor: string;
|
|
800
|
+
enhancements: EnhancementsType;
|
|
781
801
|
}
|
|
782
802
|
|
|
783
803
|
export * from './ad-info.interface';
|
|
@@ -911,6 +931,7 @@ export interface IThumbnail {
|
|
|
911
931
|
export declare enum ErrorCode {
|
|
912
932
|
FailedToFindContainerId = 1,
|
|
913
933
|
FailedContainerIdHasWidgetAlready = 2,
|
|
934
|
+
FailedLoadingAppConfigurations = 3,
|
|
914
935
|
FailedLoadingStories = 100,
|
|
915
936
|
FailedEnrichStories = 101,
|
|
916
937
|
FailedToHaveLabels = 103,
|
|
@@ -1407,9 +1428,23 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1407
1428
|
}): Promise<void>;
|
|
1408
1429
|
getUserToken(body: GetUserTokenRequest): Promise<import("../interfaces").IHttpResponse<TokenData>>;
|
|
1409
1430
|
refreshUserToken(body: RefreshUserTokenRequest): Promise<import("../interfaces").IHttpResponse<TokenData>>;
|
|
1431
|
+
getAppConfigurations(): Promise<import("../interfaces").IHttpResponse<AppConfiguration>>;
|
|
1410
1432
|
}
|
|
1411
1433
|
export declare const ApiService: ApiServiceClass;
|
|
1412
1434
|
|
|
1435
|
+
declare const AppConfigurationServiceClass_base: {
|
|
1436
|
+
new (): {};
|
|
1437
|
+
_instance: AppConfigurationServiceClass;
|
|
1438
|
+
getInstance(): AppConfigurationServiceClass;
|
|
1439
|
+
};
|
|
1440
|
+
declare abstract class AppConfigurationServiceClass extends AppConfigurationServiceClass_base implements IService {
|
|
1441
|
+
private _appConfigurations?;
|
|
1442
|
+
constructor();
|
|
1443
|
+
get appConfigurations(): AppConfiguration | undefined;
|
|
1444
|
+
init(): Promise<void>;
|
|
1445
|
+
}
|
|
1446
|
+
export declare const AppConfigurationService: AppConfigurationServiceClass;
|
|
1447
|
+
|
|
1413
1448
|
declare const ConfigServiceClass_base: {
|
|
1414
1449
|
new (): {};
|
|
1415
1450
|
_instance: ConfigServiceClass;
|
|
@@ -1456,6 +1491,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1456
1491
|
get doNotTrack(): boolean;
|
|
1457
1492
|
set doNotTrack(value: boolean);
|
|
1458
1493
|
get shouldAllowHorizontalStories(): boolean;
|
|
1494
|
+
set shouldAllowHorizontalStories(value: boolean);
|
|
1459
1495
|
get geoLocation(): string;
|
|
1460
1496
|
set geoLocation(value: string);
|
|
1461
1497
|
get staticContent(): boolean;
|
|
@@ -1577,6 +1613,7 @@ export declare const EventService: EventServiceClass;
|
|
|
1577
1613
|
export * from './ad.service';
|
|
1578
1614
|
export * from './analytics.service';
|
|
1579
1615
|
export * from './api.service';
|
|
1616
|
+
export * from './app-configuration.service';
|
|
1580
1617
|
export * from './config.service';
|
|
1581
1618
|
export * from './database.service';
|
|
1582
1619
|
export * from './error.service';
|
|
@@ -1684,6 +1721,10 @@ declare abstract class StoryServiceClass extends StoryServiceClass_base implemen
|
|
|
1684
1721
|
}
|
|
1685
1722
|
export declare const StoryService: StoryServiceClass;
|
|
1686
1723
|
|
|
1724
|
+
export type BlazeAbTestType = {
|
|
1725
|
+
id: string;
|
|
1726
|
+
variant: string;
|
|
1727
|
+
};
|
|
1687
1728
|
declare const UserServiceClass_base: {
|
|
1688
1729
|
new (): {};
|
|
1689
1730
|
_instance: UserServiceClass;
|
|
@@ -1692,9 +1733,12 @@ declare const UserServiceClass_base: {
|
|
|
1692
1733
|
declare abstract class UserServiceClass extends UserServiceClass_base implements IService {
|
|
1693
1734
|
_userId: string;
|
|
1694
1735
|
_sessionId: string;
|
|
1736
|
+
_abTest: BlazeAbTestType | null;
|
|
1695
1737
|
constructor();
|
|
1696
1738
|
get userId(): string;
|
|
1697
1739
|
get sessionId(): string;
|
|
1740
|
+
get abTest(): BlazeAbTestType | null;
|
|
1741
|
+
set abTest(abTest: BlazeAbTestType);
|
|
1698
1742
|
init(): Promise<void>;
|
|
1699
1743
|
private ensureSessionId;
|
|
1700
1744
|
assignUserId(): Promise<void>;
|
|
@@ -1863,6 +1907,7 @@ export interface LabelStyle {
|
|
|
1863
1907
|
gap: number;
|
|
1864
1908
|
width: number | 'auto';
|
|
1865
1909
|
color: string;
|
|
1910
|
+
backgroundColor?: string;
|
|
1866
1911
|
height: string | number;
|
|
1867
1912
|
padding: string;
|
|
1868
1913
|
font: string;
|
|
@@ -1894,6 +1939,13 @@ export interface StoryPlayerStyle {
|
|
|
1894
1939
|
contentOrder: ContentOrderType[];
|
|
1895
1940
|
icons: BlazeStoryIcons;
|
|
1896
1941
|
}
|
|
1942
|
+
export type BlazeStoryPlayerCtaStyle = {
|
|
1943
|
+
ctaAnimationType?: 'growingAnimation' | null;
|
|
1944
|
+
swipeUpCTA?: BlazeSwipeUpCTA;
|
|
1945
|
+
};
|
|
1946
|
+
export type BlazeSwipeUpCTA = {
|
|
1947
|
+
isEnabled: boolean;
|
|
1948
|
+
};
|
|
1897
1949
|
export type BlazeMomentsPlayerTextStyle = {
|
|
1898
1950
|
font: string;
|
|
1899
1951
|
textSizeMobile: string;
|
|
@@ -1980,15 +2032,14 @@ export interface MomentPlayerStyle {
|
|
|
1980
2032
|
ctaButton: BlazeMomentsPlayerCtaStyle;
|
|
1981
2033
|
}
|
|
1982
2034
|
export interface CtaButtonStyle {
|
|
2035
|
+
isAnimated: boolean;
|
|
2036
|
+
isDisplayCtaModal: boolean;
|
|
1983
2037
|
borderRadius: string;
|
|
1984
2038
|
border: string;
|
|
1985
2039
|
fontSize: string;
|
|
1986
2040
|
font: string;
|
|
1987
2041
|
backgroundColor: string;
|
|
1988
2042
|
color: string;
|
|
1989
|
-
isVisible: boolean;
|
|
1990
|
-
isAnimated: boolean;
|
|
1991
|
-
isDisplayCtaModal: boolean;
|
|
1992
2043
|
fontWeight: FontWeightType;
|
|
1993
2044
|
textTransform: TextTransformType;
|
|
1994
2045
|
padding: string;
|
|
@@ -2020,6 +2071,7 @@ export declare const Colors: {
|
|
|
2020
2071
|
readonly White: "#FFFFFF";
|
|
2021
2072
|
readonly Black: "#000000";
|
|
2022
2073
|
readonly Gray: "#B6B7B8";
|
|
2074
|
+
readonly Yellow: "#FFD325";
|
|
2023
2075
|
};
|
|
2024
2076
|
|
|
2025
2077
|
export type ThemeType = 'grid-2-columns' | 'grid-3-columns' | 'row-circle' | 'row-rectangle' | 'row-rectangle-horizontal' | 'grid-2-columns-horizontal' | 'grid-3-columns-horizontal' | 'default';
|
|
@@ -2032,6 +2084,17 @@ export declare function isStoryPlayerStyle(playerStyle: StoryPlayerStyle | Momen
|
|
|
2032
2084
|
export declare function isMomentPlayerStyle(playerStyle: StoryPlayerStyle | MomentPlayerStyle): playerStyle is MomentPlayerStyle;
|
|
2033
2085
|
|
|
2034
2086
|
|
|
2087
|
+
export type AnimationType = 'Growing' | 'Shrinking' | 'BottomToTop';
|
|
2088
|
+
export declare const animationCssMapper: {
|
|
2089
|
+
Growing: string;
|
|
2090
|
+
Shrinking: string;
|
|
2091
|
+
BottomToTop: string;
|
|
2092
|
+
};
|
|
2093
|
+
export type EnhancementsType = {
|
|
2094
|
+
animationType: AnimationType;
|
|
2095
|
+
hasSwipeUp: boolean;
|
|
2096
|
+
} | null;
|
|
2097
|
+
|
|
2035
2098
|
export interface IAttributeParser {
|
|
2036
2099
|
getIntAttribute(key: string, defaultValue?: number): number | undefined;
|
|
2037
2100
|
getFloatAttribute(key: string, defaultValue?: number): number | undefined;
|
|
@@ -2451,6 +2514,7 @@ export * from './trigger.type';
|
|
|
2451
2514
|
export * from './gesture.type';
|
|
2452
2515
|
export * from './closed-captions.type';
|
|
2453
2516
|
export * from './ratio.type';
|
|
2517
|
+
export * from './animation.type';
|
|
2454
2518
|
|
|
2455
2519
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
|
|
2456
2520
|
export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
|
|
@@ -2626,12 +2690,13 @@ export * from './widget-cta-modal';
|
|
|
2626
2690
|
export * from './widget-captions';
|
|
2627
2691
|
|
|
2628
2692
|
export declare class BlazeWidgetCaptions extends HTMLElement {
|
|
2693
|
+
private parser;
|
|
2629
2694
|
private container;
|
|
2630
|
-
private renderer;
|
|
2631
2695
|
private observer;
|
|
2632
2696
|
private captions;
|
|
2633
2697
|
private video;
|
|
2634
2698
|
private startTime;
|
|
2699
|
+
private cues;
|
|
2635
2700
|
private boundTimeUpdate;
|
|
2636
2701
|
private boundSeekUpdate;
|
|
2637
2702
|
constructor();
|
|
@@ -2649,6 +2714,7 @@ export declare class BlazeWidgetCaptions extends HTMLElement {
|
|
|
2649
2714
|
private setupStyles;
|
|
2650
2715
|
initialize(video: HTMLVideoElement, captions: ICaptionFile[]): Promise<void>;
|
|
2651
2716
|
private setupCaptions;
|
|
2717
|
+
private updateCaptions;
|
|
2652
2718
|
}
|
|
2653
2719
|
|
|
2654
2720
|
export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
@@ -3071,6 +3137,7 @@ export declare class BlazeWidgetSDK extends BaseWidget {
|
|
|
3071
3137
|
modal: BlazeWidgetStoryModal | BlazeWidgetMomentModal;
|
|
3072
3138
|
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
3073
3139
|
boundOnResizeEventDelay: () => void;
|
|
3140
|
+
static get observedAttributes(): string[];
|
|
3074
3141
|
constructor();
|
|
3075
3142
|
connectedCallback(): Promise<void>;
|
|
3076
3143
|
disconnectedCallback(): void;
|
|
@@ -3088,6 +3155,7 @@ export declare class BlazeWidgetSDK extends BaseWidget {
|
|
|
3088
3155
|
handleStaticContentLoad(playReference: playRefType): Promise<void>;
|
|
3089
3156
|
enrichContent(content: IStory[]): Promise<IStory[]>;
|
|
3090
3157
|
setupModalAndLoadContent(contentType: ContentType, playReference: playRefType, content: IStory | IMoment): Promise<void>;
|
|
3158
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
3091
3159
|
private getConfigAttributes;
|
|
3092
3160
|
private initialize;
|
|
3093
3161
|
private injectToHead;
|
|
@@ -3560,11 +3628,13 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
3560
3628
|
boundOnResizeEventDelay: (this: Window, ev: UIEvent) => void;
|
|
3561
3629
|
boundOnKeyDown: (ev: KeyboardEvent) => void;
|
|
3562
3630
|
boundOnBeforeUnload: () => void;
|
|
3631
|
+
private currentState;
|
|
3563
3632
|
constructor(parentWidget: HTMLElement, playerLayout: StoryPlayerStyle);
|
|
3564
3633
|
connectedCallback(): void;
|
|
3565
3634
|
disconnectedCallback(): void;
|
|
3566
3635
|
onBeforeUnload(): null | undefined;
|
|
3567
3636
|
setTheme(playerStyle: StoryPlayerStyle): void;
|
|
3637
|
+
updateModalContent(): void;
|
|
3568
3638
|
setModalContent(stories: IStory[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
|
|
3569
3639
|
onKeyDown(ev: KeyboardEvent): void;
|
|
3570
3640
|
close(): void;
|
|
@@ -3588,6 +3658,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
|
3588
3658
|
disconnectedCallback(): void;
|
|
3589
3659
|
setupEventListeners(): void;
|
|
3590
3660
|
applyStyles(): void;
|
|
3661
|
+
updateContentConfig(stories: IStory[]): void;
|
|
3591
3662
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
3592
3663
|
setContent(content: BlazeWidgetStory[]): void;
|
|
3593
3664
|
navigateContent(direction: ContentDirection): void;
|
|
@@ -3679,7 +3750,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3679
3750
|
private applyIconStyle;
|
|
3680
3751
|
onShareClick(): Promise<void>;
|
|
3681
3752
|
private onClosedCaptionClick;
|
|
3682
|
-
updateCtaButtonLayout
|
|
3753
|
+
private updateCtaButtonLayout;
|
|
3683
3754
|
private updateChip;
|
|
3684
3755
|
setTheme(playerStyle: StoryPlayerStyle): void;
|
|
3685
3756
|
private disableStoriesNavigationButtons;
|
|
@@ -3694,7 +3765,13 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3694
3765
|
}): void;
|
|
3695
3766
|
muteToggle(): boolean;
|
|
3696
3767
|
resetStoryLocationIndexToLastUnseen(): void;
|
|
3697
|
-
|
|
3768
|
+
private determineAspectRatio;
|
|
3769
|
+
private clearExistingContent;
|
|
3770
|
+
private createPageElement;
|
|
3771
|
+
private setupPageEndedHandler;
|
|
3772
|
+
private createProgressElements;
|
|
3773
|
+
private createProgressPart;
|
|
3774
|
+
setData(story: IStory): void;
|
|
3698
3775
|
get currentPage(): BlazeWidgetVideoBase;
|
|
3699
3776
|
get nextPage(): BlazeWidgetVideoBase;
|
|
3700
3777
|
get prevPage(): BlazeWidgetVideoBase;
|
|
@@ -3736,6 +3813,11 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3736
3813
|
disconnectedCallback(): void;
|
|
3737
3814
|
updateCTAButtonPosition(): void;
|
|
3738
3815
|
updateCta(pageIndex: number): void;
|
|
3816
|
+
private updateCtaButtonWidth;
|
|
3817
|
+
private animateCtaButton;
|
|
3818
|
+
private handleCtaButtonAnimation;
|
|
3819
|
+
private setCtaButtonAttributes;
|
|
3820
|
+
private setCtaIconVisibility;
|
|
3739
3821
|
updatePlayerButtonsState(displayPageNavigationButtons?: boolean): void;
|
|
3740
3822
|
updateButtonState(buttonType: ButtonNavigation, button: BlazeButton | undefined): void;
|
|
3741
3823
|
private isSingleStoryWithAutoAdvance;
|