@wscsports/blaze-web-sdk 0.21.0 → 0.22.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.
- package/package.json +1 -4
- package/publish/index.d.ts +23 -9
- 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.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"main": "publish/index",
|
|
5
5
|
"types": "publish/index",
|
|
6
6
|
"files": [
|
|
@@ -15,18 +15,15 @@
|
|
|
15
15
|
"publish:latest": "npm run build:prod && npm publish --access public --tag latest",
|
|
16
16
|
"publish:beta": "npm run build:prod && npm publish --access public --tag beta",
|
|
17
17
|
"version-download": "node ./version-downloader.js",
|
|
18
|
-
|
|
19
18
|
"test": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome'",
|
|
20
19
|
"test:desktop": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome' --project='Desktop Firefox' --project='Desktop Safari'",
|
|
21
20
|
"test:desktop:stories": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome' --project='Desktop Safari' e2e-tests/tests/stories",
|
|
22
21
|
"test:desktop:moments": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome' --project='Desktop Safari' e2e-tests/tests/moments",
|
|
23
22
|
"test:desktop:long-form": "node ./node_modules/@playwright/test/cli.js test --project='Desktop Chrome' --project='Desktop Safari' e2e-tests/tests/video-longform",
|
|
24
|
-
|
|
25
23
|
"test:mobile": "node ./node_modules/@playwright/test/cli.js test --project='iOS Safari 13' --project='Android Chrome'",
|
|
26
24
|
"test:mobile:stories": "node ./node_modules/@playwright/test/cli.js test --project='iOS Safari 13' --project='Android Chrome' e2e-tests/tests/stories",
|
|
27
25
|
"test:mobile:moments": "node ./node_modules/@playwright/test/cli.js test --project='iOS Safari 13' e2e-tests/tests/moments",
|
|
28
26
|
"test:mobile:long-form": "node ./node_modules/@playwright/test/cli.js test --project='iOS Safari 13' e2e-tests/tests/video-longform",
|
|
29
|
-
|
|
30
27
|
"test:android:stories": "export USE_PHYSICAL_DEVICE=true && export $(cat .env.physical-device 2>/dev/null | xargs) && node ./node_modules/@playwright/test/cli.js test --config=playwright.config.physical-device.ts --project='Android Mobile Chrome' e2e-tests/tests/stories",
|
|
31
28
|
"test:android:moments": "export USE_PHYSICAL_DEVICE=true && export $(cat .env.physical-device 2>/dev/null | xargs) && node ./node_modules/@playwright/test/cli.js test --config=playwright.config.physical-device.ts --project='Android Mobile Chrome' e2e-tests/tests/moments"
|
|
32
29
|
},
|
package/publish/index.d.ts
CHANGED
|
@@ -27,6 +27,9 @@ export declare function getAppContextManager(): Record<string, any>;
|
|
|
27
27
|
export declare const pushConsentEvent: (action: string, body: Record<string, any>) => void;
|
|
28
28
|
export declare const isInitialized: () => boolean;
|
|
29
29
|
export declare function setBeforeContentPlayCallback(callback: BeforeContentPlayCallback | undefined): void;
|
|
30
|
+
export declare function appendContentToPlayer(contentType: ContentType, dataSource: BlazeDataSourceType, options?: {
|
|
31
|
+
shouldOrderContentByReadStatus?: boolean;
|
|
32
|
+
}): Promise<void>;
|
|
30
33
|
declare const _default: {
|
|
31
34
|
Initialize: typeof Initialize;
|
|
32
35
|
WidgetGridView: typeof WidgetGridView;
|
|
@@ -54,6 +57,7 @@ declare const _default: {
|
|
|
54
57
|
pushConsentEvent: (action: string, body: Record<string, any>) => void;
|
|
55
58
|
isInitialized: () => boolean;
|
|
56
59
|
setBeforeContentPlayCallback: typeof setBeforeContentPlayCallback;
|
|
60
|
+
appendContentToPlayer: typeof appendContentToPlayer;
|
|
57
61
|
};
|
|
58
62
|
export default _default;
|
|
59
63
|
|
|
@@ -971,7 +975,7 @@ export declare class BlazeButton extends BaseWidget {
|
|
|
971
975
|
get refElement(): ShadowRoot | this;
|
|
972
976
|
constructor();
|
|
973
977
|
private setupFocusDelegation;
|
|
974
|
-
static get observedAttributes(): ("height" | "order" | "width" | "
|
|
978
|
+
static get observedAttributes(): ("height" | "order" | "width" | "blaze-btn-visible" | "icon-color" | "disabled" | "blaze-btn-hidden" | "button-desktop-animation")[];
|
|
975
979
|
private onMouseEnter;
|
|
976
980
|
private onMouseLeave;
|
|
977
981
|
private onClick;
|
|
@@ -1669,6 +1673,7 @@ export declare enum Delegation {
|
|
|
1669
1673
|
onWidgetDataLoadCompleted = "blaze-widget-data-load-completed",
|
|
1670
1674
|
onWidgetPlayerDismissed = "blaze-widget-player-dismissed",
|
|
1671
1675
|
onWidgetTriggerCTA = "blaze-widget-trigger-CTA",
|
|
1676
|
+
onMomentStart = "blaze-moment-start",
|
|
1672
1677
|
onStoryPlayerDidAppear = "blaze-story-player-did-appear",
|
|
1673
1678
|
onStoryPlayerDismissed = "blaze-story-player-dismissed",
|
|
1674
1679
|
onWidgetStoryPlayerDismissed = "blaze-widget-story-player-dismissed"
|
|
@@ -4106,6 +4111,9 @@ export * from './shared-event-target.utils';
|
|
|
4106
4111
|
export * from './tab-index-utils';
|
|
4107
4112
|
export * from './stopwatch';
|
|
4108
4113
|
|
|
4114
|
+
export declare function findOpenModal(): BlazeWidgetModal | undefined;
|
|
4115
|
+
export declare function findOpenMomentModal(): BlazeWidgetMomentModal | undefined;
|
|
4116
|
+
|
|
4109
4117
|
export declare function getPersonalizedParamsForRequest(personalized?: BlazePersonalized): {
|
|
4110
4118
|
PersonalPlayers?: undefined;
|
|
4111
4119
|
PersonalTeams?: undefined;
|
|
@@ -4618,7 +4626,7 @@ export declare class BlazeWidgetVideoModal extends BlazeWidgetModal {
|
|
|
4618
4626
|
}
|
|
4619
4627
|
|
|
4620
4628
|
/// <reference types="hammerjs" />
|
|
4621
|
-
export declare class BlazeWidgetVideoPlayer extends WidgetAbstractPlayer implements IVideoPlayerController {
|
|
4629
|
+
export declare class BlazeWidgetVideoPlayer extends WidgetAbstractPlayer<BlazeVideoElement> implements IVideoPlayerController {
|
|
4622
4630
|
private boundOnNavigationPrev;
|
|
4623
4631
|
private boundOnNavigationNext;
|
|
4624
4632
|
private boundOnResize;
|
|
@@ -5664,12 +5672,12 @@ export declare class BlazeWidgetModal extends BaseWidget {
|
|
|
5664
5672
|
}
|
|
5665
5673
|
|
|
5666
5674
|
export type BlazeWidgetContent = BlazeWidgetStory | BlazeWidgetMoment | BlazeVideoElement;
|
|
5667
|
-
export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
5675
|
+
export declare abstract class WidgetAbstractPlayer<T extends BlazeWidgetContent> extends BaseWidget {
|
|
5668
5676
|
index: number;
|
|
5669
5677
|
container: BlazeDiv;
|
|
5670
5678
|
numberOfContentInList: number;
|
|
5671
|
-
contentList:
|
|
5672
|
-
playerContentList:
|
|
5679
|
+
contentList: T[];
|
|
5680
|
+
playerContentList: T[];
|
|
5673
5681
|
srcBackground: HTMLCanvasElement;
|
|
5674
5682
|
destBackground: HTMLCanvasElement;
|
|
5675
5683
|
backgroundAnimation?: Animation;
|
|
@@ -5690,6 +5698,7 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
5690
5698
|
boundHandlePanEnd: (ev: HammerInput) => void;
|
|
5691
5699
|
constructor();
|
|
5692
5700
|
seekContentById(contentId: string): void;
|
|
5701
|
+
protected cloneMoment(contentListItem: BlazeWidgetMoment): BlazeWidgetMoment & BlazeWidgetStory;
|
|
5693
5702
|
cleanPlayerContentList(): void;
|
|
5694
5703
|
abstract setContent(content: BlazeWidgetStory[] | BlazeWidgetMoment[] | BlazeVideoElement[]): void;
|
|
5695
5704
|
muteVideoOnIOSOrMacTablet(): void;
|
|
@@ -5998,6 +6007,7 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
|
|
|
5998
6007
|
private adContainer;
|
|
5999
6008
|
private adLoaderContainer;
|
|
6000
6009
|
private videoElement?;
|
|
6010
|
+
private videoUrl?;
|
|
6001
6011
|
private currentAdTag;
|
|
6002
6012
|
private currentAdInfo?;
|
|
6003
6013
|
private currentAddExtraAnalyticsParams?;
|
|
@@ -6010,7 +6020,7 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
|
|
|
6010
6020
|
private initializeGoogleIma;
|
|
6011
6021
|
private buildImaUrl;
|
|
6012
6022
|
private cleanupAdSession;
|
|
6013
|
-
startAd(videoElement: HTMLVideoElement, adInfo: IImaAdInfo, contentExtraInfo?: ContentExtraInfo, addCustomParams?: (url: URL) => void, addExtraAnalyticsParams?: AddExtraAnalyticsParams): Promise<Boolean>;
|
|
6023
|
+
startAd(videoElement: HTMLVideoElement, adInfo: IImaAdInfo, contentExtraInfo?: ContentExtraInfo, addCustomParams?: (url: URL) => void, addExtraAnalyticsParams?: AddExtraAnalyticsParams, videoUrl?: string, videoDuration?: number): Promise<Boolean>;
|
|
6014
6024
|
private onAdsManagerLoaded;
|
|
6015
6025
|
private loadAds;
|
|
6016
6026
|
private onAdEvent;
|
|
@@ -6051,7 +6061,10 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
|
6051
6061
|
navigateContent(direction: ContentDirection): void;
|
|
6052
6062
|
createNavigationButton(direction: ContentDirection): BlazeButton;
|
|
6053
6063
|
handleClickNavigation(direction: ContentDirection): void;
|
|
6064
|
+
private generateMomentElement;
|
|
6065
|
+
private generateAdMomentElement;
|
|
6054
6066
|
setModalContent(data: IMoment[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
|
|
6067
|
+
appendContent(newMoments: IMoment[], defaultAdsInfo?: IAdInfo): void;
|
|
6055
6068
|
onKeyDown(ev: KeyboardEvent): void;
|
|
6056
6069
|
close(): void;
|
|
6057
6070
|
open(): Promise<void>;
|
|
@@ -6064,7 +6077,7 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
|
6064
6077
|
|
|
6065
6078
|
export declare const MUTE_UNMUTE_EVENT = "muteButtonClicked";
|
|
6066
6079
|
export declare const UPDATE_NAVIGATION_BUTTONS_EVENT = "updateNavigationButtons";
|
|
6067
|
-
export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
6080
|
+
export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer<BlazeWidgetMoment> {
|
|
6068
6081
|
isWheelEventHandling: boolean;
|
|
6069
6082
|
boundHandleMuteClicked: () => void;
|
|
6070
6083
|
private fetchedPosterUrls;
|
|
@@ -6087,13 +6100,14 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
6087
6100
|
handlePrevDirection(): void;
|
|
6088
6101
|
handleNextDirection(): void;
|
|
6089
6102
|
releaseMomentFromMemory(moment: BlazeWidgetMoment): void;
|
|
6090
|
-
updateItemData(itemToReplaceWith: BlazeWidgetMoment
|
|
6103
|
+
updateItemData(itemToReplaceWith: BlazeWidgetMoment, nextItemToInsert: BlazeWidgetMoment): void;
|
|
6091
6104
|
createAnimation(content: BlazeWidgetMoment, direction: ContentDirection, targetIndex: number): AnimeTimelineInstance;
|
|
6092
6105
|
handleAnimationStart(content: BlazeWidgetMoment, direction: ContentDirection): void;
|
|
6093
6106
|
private calculateTruePosition;
|
|
6094
6107
|
handleAnimationCompletion(content: BlazeWidgetMoment, mode: ContentDirection): Promise<void>;
|
|
6095
6108
|
loadAndPlayContent(): Promise<void>;
|
|
6096
6109
|
setContent(content: BlazeWidgetMoment[]): void;
|
|
6110
|
+
appendToContentList(newMoments: BlazeWidgetMoment[]): void;
|
|
6097
6111
|
preloadAdjacentVideos(): void;
|
|
6098
6112
|
preloadAdjacentPosters(): void;
|
|
6099
6113
|
private getCurrentContentIndex;
|
|
@@ -6359,7 +6373,7 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
6359
6373
|
onResizeEventDelay(): void;
|
|
6360
6374
|
}
|
|
6361
6375
|
|
|
6362
|
-
export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
6376
|
+
export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer<BlazeWidgetStory> {
|
|
6363
6377
|
boundOnKeyDown: (event: KeyboardEvent) => Promise<void>;
|
|
6364
6378
|
backgroundAnimation?: Animation;
|
|
6365
6379
|
dispatchExitStoryEvents: (() => void) | undefined;
|