@wscsports/blaze-web-sdk 0.21.1 → 0.23.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 -1
- package/publish/index.d.ts +36 -8
- package/publish/index.js +1 -1
package/package.json
CHANGED
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
|
|
|
@@ -481,6 +485,7 @@ export * from './device-detector.class';
|
|
|
481
485
|
export * from './events-listener';
|
|
482
486
|
export * from './fullscreen-manager.class';
|
|
483
487
|
export * from './label-builder.class';
|
|
488
|
+
export * from './url-rotator.class';
|
|
484
489
|
export * from './logger/logger-manager.class';
|
|
485
490
|
export * from './logger/logger-storage.class';
|
|
486
491
|
export * from './logger/logger-transport.class';
|
|
@@ -539,6 +544,16 @@ export declare function Singleton<T>(): {
|
|
|
539
544
|
export type EventHandler<E extends Event> = (event: E) => void;
|
|
540
545
|
export declare function throttle<F extends (...args: any[]) => void>(func: F, _delay: number): (...args: Parameters<F>) => Promise<void>;
|
|
541
546
|
|
|
547
|
+
export declare class UrlRotator {
|
|
548
|
+
private endpoints;
|
|
549
|
+
private currentIndex;
|
|
550
|
+
private fallbackUrl;
|
|
551
|
+
constructor(fallbackUrl?: string);
|
|
552
|
+
initialize(endpointUrls?: string): void;
|
|
553
|
+
getNext(): string;
|
|
554
|
+
private parseEndpoints;
|
|
555
|
+
}
|
|
556
|
+
|
|
542
557
|
interface UpdateLocationContentHashParams {
|
|
543
558
|
contentType?: ContentType;
|
|
544
559
|
contentId?: string;
|
|
@@ -971,7 +986,7 @@ export declare class BlazeButton extends BaseWidget {
|
|
|
971
986
|
get refElement(): ShadowRoot | this;
|
|
972
987
|
constructor();
|
|
973
988
|
private setupFocusDelegation;
|
|
974
|
-
static get observedAttributes(): ("height" | "order" | "width" | "
|
|
989
|
+
static get observedAttributes(): ("height" | "order" | "width" | "blaze-btn-visible" | "icon-color" | "disabled" | "blaze-btn-hidden" | "button-desktop-animation")[];
|
|
975
990
|
private onMouseEnter;
|
|
976
991
|
private onMouseLeave;
|
|
977
992
|
private onClick;
|
|
@@ -1337,6 +1352,7 @@ export interface AppConfiguration {
|
|
|
1337
1352
|
analyticsAddEntitiesInfo?: string;
|
|
1338
1353
|
configRefetchIntervalInMinutes?: number;
|
|
1339
1354
|
enableClientPlaybackModification?: 'true' | 'false' | string;
|
|
1355
|
+
analyticsEndpointUrls?: string;
|
|
1340
1356
|
};
|
|
1341
1357
|
recommendationsConfigurations?: IRecommendationsConfigurations;
|
|
1342
1358
|
sdkLoggerConfigurations?: ILoggerConfiguration;
|
|
@@ -1669,6 +1685,7 @@ export declare enum Delegation {
|
|
|
1669
1685
|
onWidgetDataLoadCompleted = "blaze-widget-data-load-completed",
|
|
1670
1686
|
onWidgetPlayerDismissed = "blaze-widget-player-dismissed",
|
|
1671
1687
|
onWidgetTriggerCTA = "blaze-widget-trigger-CTA",
|
|
1688
|
+
onMomentStart = "blaze-moment-start",
|
|
1672
1689
|
onStoryPlayerDidAppear = "blaze-story-player-did-appear",
|
|
1673
1690
|
onStoryPlayerDismissed = "blaze-story-player-dismissed",
|
|
1674
1691
|
onWidgetStoryPlayerDismissed = "blaze-widget-story-player-dismissed"
|
|
@@ -2399,6 +2416,7 @@ declare const ApiServiceClass_base: {
|
|
|
2399
2416
|
};
|
|
2400
2417
|
declare abstract class ApiServiceClass extends ApiServiceClass_base implements IService {
|
|
2401
2418
|
api: API;
|
|
2419
|
+
private analyticsUrlRotator?;
|
|
2402
2420
|
init(): Promise<void>;
|
|
2403
2421
|
private setAdsOnStories;
|
|
2404
2422
|
getStoriesByIds(options: GetByIdsOptions & {
|
|
@@ -2459,6 +2477,8 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
2459
2477
|
private getContentParamsByLabels;
|
|
2460
2478
|
private getContentParamsByIds;
|
|
2461
2479
|
private getContentParamsByRecommendations;
|
|
2480
|
+
initializeAnalyticsEndpoints(endpointUrls?: string): void;
|
|
2481
|
+
private getAnalyticsEndpoint;
|
|
2462
2482
|
}
|
|
2463
2483
|
export declare const ApiService: ApiServiceClass;
|
|
2464
2484
|
|
|
@@ -4106,6 +4126,9 @@ export * from './shared-event-target.utils';
|
|
|
4106
4126
|
export * from './tab-index-utils';
|
|
4107
4127
|
export * from './stopwatch';
|
|
4108
4128
|
|
|
4129
|
+
export declare function findOpenModal(): BlazeWidgetModal | undefined;
|
|
4130
|
+
export declare function findOpenMomentModal(): BlazeWidgetMomentModal | undefined;
|
|
4131
|
+
|
|
4109
4132
|
export declare function getPersonalizedParamsForRequest(personalized?: BlazePersonalized): {
|
|
4110
4133
|
PersonalPlayers?: undefined;
|
|
4111
4134
|
PersonalTeams?: undefined;
|
|
@@ -4618,7 +4641,7 @@ export declare class BlazeWidgetVideoModal extends BlazeWidgetModal {
|
|
|
4618
4641
|
}
|
|
4619
4642
|
|
|
4620
4643
|
/// <reference types="hammerjs" />
|
|
4621
|
-
export declare class BlazeWidgetVideoPlayer extends WidgetAbstractPlayer implements IVideoPlayerController {
|
|
4644
|
+
export declare class BlazeWidgetVideoPlayer extends WidgetAbstractPlayer<BlazeVideoElement> implements IVideoPlayerController {
|
|
4622
4645
|
private boundOnNavigationPrev;
|
|
4623
4646
|
private boundOnNavigationNext;
|
|
4624
4647
|
private boundOnResize;
|
|
@@ -5664,12 +5687,12 @@ export declare class BlazeWidgetModal extends BaseWidget {
|
|
|
5664
5687
|
}
|
|
5665
5688
|
|
|
5666
5689
|
export type BlazeWidgetContent = BlazeWidgetStory | BlazeWidgetMoment | BlazeVideoElement;
|
|
5667
|
-
export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
5690
|
+
export declare abstract class WidgetAbstractPlayer<T extends BlazeWidgetContent> extends BaseWidget {
|
|
5668
5691
|
index: number;
|
|
5669
5692
|
container: BlazeDiv;
|
|
5670
5693
|
numberOfContentInList: number;
|
|
5671
|
-
contentList:
|
|
5672
|
-
playerContentList:
|
|
5694
|
+
contentList: T[];
|
|
5695
|
+
playerContentList: T[];
|
|
5673
5696
|
srcBackground: HTMLCanvasElement;
|
|
5674
5697
|
destBackground: HTMLCanvasElement;
|
|
5675
5698
|
backgroundAnimation?: Animation;
|
|
@@ -5690,6 +5713,7 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
5690
5713
|
boundHandlePanEnd: (ev: HammerInput) => void;
|
|
5691
5714
|
constructor();
|
|
5692
5715
|
seekContentById(contentId: string): void;
|
|
5716
|
+
protected cloneMoment(contentListItem: BlazeWidgetMoment): BlazeWidgetMoment & BlazeWidgetStory;
|
|
5693
5717
|
cleanPlayerContentList(): void;
|
|
5694
5718
|
abstract setContent(content: BlazeWidgetStory[] | BlazeWidgetMoment[] | BlazeVideoElement[]): void;
|
|
5695
5719
|
muteVideoOnIOSOrMacTablet(): void;
|
|
@@ -6052,7 +6076,10 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
|
6052
6076
|
navigateContent(direction: ContentDirection): void;
|
|
6053
6077
|
createNavigationButton(direction: ContentDirection): BlazeButton;
|
|
6054
6078
|
handleClickNavigation(direction: ContentDirection): void;
|
|
6079
|
+
private generateMomentElement;
|
|
6080
|
+
private generateAdMomentElement;
|
|
6055
6081
|
setModalContent(data: IMoment[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
|
|
6082
|
+
appendContent(newMoments: IMoment[], defaultAdsInfo?: IAdInfo): void;
|
|
6056
6083
|
onKeyDown(ev: KeyboardEvent): void;
|
|
6057
6084
|
close(): void;
|
|
6058
6085
|
open(): Promise<void>;
|
|
@@ -6065,7 +6092,7 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
|
6065
6092
|
|
|
6066
6093
|
export declare const MUTE_UNMUTE_EVENT = "muteButtonClicked";
|
|
6067
6094
|
export declare const UPDATE_NAVIGATION_BUTTONS_EVENT = "updateNavigationButtons";
|
|
6068
|
-
export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
6095
|
+
export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer<BlazeWidgetMoment> {
|
|
6069
6096
|
isWheelEventHandling: boolean;
|
|
6070
6097
|
boundHandleMuteClicked: () => void;
|
|
6071
6098
|
private fetchedPosterUrls;
|
|
@@ -6088,13 +6115,14 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
6088
6115
|
handlePrevDirection(): void;
|
|
6089
6116
|
handleNextDirection(): void;
|
|
6090
6117
|
releaseMomentFromMemory(moment: BlazeWidgetMoment): void;
|
|
6091
|
-
updateItemData(itemToReplaceWith: BlazeWidgetMoment
|
|
6118
|
+
updateItemData(itemToReplaceWith: BlazeWidgetMoment, nextItemToInsert: BlazeWidgetMoment): void;
|
|
6092
6119
|
createAnimation(content: BlazeWidgetMoment, direction: ContentDirection, targetIndex: number): AnimeTimelineInstance;
|
|
6093
6120
|
handleAnimationStart(content: BlazeWidgetMoment, direction: ContentDirection): void;
|
|
6094
6121
|
private calculateTruePosition;
|
|
6095
6122
|
handleAnimationCompletion(content: BlazeWidgetMoment, mode: ContentDirection): Promise<void>;
|
|
6096
6123
|
loadAndPlayContent(): Promise<void>;
|
|
6097
6124
|
setContent(content: BlazeWidgetMoment[]): void;
|
|
6125
|
+
appendToContentList(newMoments: BlazeWidgetMoment[]): void;
|
|
6098
6126
|
preloadAdjacentVideos(): void;
|
|
6099
6127
|
preloadAdjacentPosters(): void;
|
|
6100
6128
|
private getCurrentContentIndex;
|
|
@@ -6360,7 +6388,7 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
6360
6388
|
onResizeEventDelay(): void;
|
|
6361
6389
|
}
|
|
6362
6390
|
|
|
6363
|
-
export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
6391
|
+
export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer<BlazeWidgetStory> {
|
|
6364
6392
|
boundOnKeyDown: (event: KeyboardEvent) => Promise<void>;
|
|
6365
6393
|
backgroundAnimation?: Animation;
|
|
6366
6394
|
dispatchExitStoryEvents: (() => void) | undefined;
|