@wscsports/blaze-web-sdk 0.3.19 → 0.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wscsports/blaze-web-sdk",
3
- "version": "0.3.19",
3
+ "version": "0.4.0",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -26,6 +26,7 @@ export declare function playStory(storyId: string, style?: StoryPlayerStyle, act
26
26
  export declare function playStories(dataSource: BlazeDataSourceType, style?: StoryPlayerStyle, actionHandlers?: ActionHandler[]): Promise<void>;
27
27
  export declare function playContent(contentType: ContentType, options: PlayContentOptions): Promise<void>;
28
28
  export declare function setAbTestParams(abTestParams: BlazeAbTestType): void;
29
+ export declare function getAppContextManager(): Record<string, any>;
29
30
  declare const _default: {
30
31
  Initialize: typeof Initialize;
31
32
  WidgetGridView: typeof WidgetGridView;
@@ -47,6 +48,7 @@ declare const _default: {
47
48
  playStories: typeof playStories;
48
49
  playContent: typeof playContent;
49
50
  setAbTestParams: typeof setAbTestParams;
51
+ getAppContextManager: typeof getAppContextManager;
50
52
  };
51
53
  export default _default;
52
54
 
@@ -198,6 +200,8 @@ export declare class StoryEvent {
198
200
  'cc_state': string;
199
201
  'content_extra_info': string;
200
202
  'custom_action_button_name': string;
203
+ 'enrichment_layer_id': string;
204
+ 'enrichment_layer_url': string;
201
205
  }
202
206
  export declare class MomentEvent {
203
207
  'moments_session_id': string;
@@ -651,7 +655,7 @@ export declare class BlazeButton extends BaseWidget {
651
655
  isAnimationOnDesktopInitialized: boolean;
652
656
  get refElement(): ShadowRoot | this;
653
657
  constructor();
654
- static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-hidden" | "blaze-btn-visible" | "button-desktop-animation")[];
658
+ static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "blaze-btn-visible" | "disabled" | "blaze-btn-hidden" | "button-desktop-animation")[];
655
659
  private onMouseEnter;
656
660
  private onMouseLeave;
657
661
  private onClick;
@@ -822,14 +826,17 @@ export declare enum WidgetAction {
822
826
  Click = "widget_click"
823
827
  }
824
828
  export declare enum AdAction {
829
+ Requested = "ad_requested",
825
830
  View = "ad_view",
826
831
  Exit = "ad_exit",
827
832
  Click = "ad_click",
833
+ BannerRequested = "banner_ad_requested",
828
834
  BannerView = "banner_ad_view",
829
835
  BannerLoad = "banner_ad_load",
830
836
  BannerClick = "banner_ad_click"
831
837
  }
832
838
  export declare enum ImaAdAction {
839
+ REQUESTED = "ima_ad_requested",
833
840
  ALL_ADS_COMPLETED = "ima_all_ads_completed",
834
841
  CLICK = "ima_ad_clicked",
835
842
  COMPLETED = "ima_ad_completed",
@@ -852,16 +859,6 @@ export declare enum InteractionAction {
852
859
  PlaybackPause = "playback_pause",
853
860
  PlaybackPlay = "playback_play"
854
861
  }
855
- export declare const StoryToAdActionMapper: {
856
- story_page_start: AdAction;
857
- story_page_exit: AdAction;
858
- cta_click: AdAction;
859
- };
860
- export declare const MomentToAdActionMapper: {
861
- moment_start: AdAction;
862
- moment_exit: AdAction;
863
- cta_click: AdAction;
864
- };
865
862
  type ExposedFields = {
866
863
  [key in StoryAction | MomentAction | WidgetAction | AdAction | VideoAction]?: string[];
867
864
  };
@@ -1003,7 +1000,28 @@ export * from './video.interface';
1003
1000
  export * from './entity.interface';
1004
1001
  export * from './app-configuration';
1005
1002
 
1006
- export type InteractionType = 'Poll' | 'Quiz';
1003
+ export type InteractionType = 'Poll' | 'Quiz' | 'Enrichment';
1004
+ type InteractionRelative = 'Player' | 'Screen';
1005
+ export type InteractionObjectYPosition = 'BottomToTop' | 'TopToTop' | 'BottomToBottom' | 'TopToBottom' | 'CenterToTop' | 'CenterToBottom' | 'CenterY';
1006
+ export type InteractionObjectXPosition = 'StartToStart' | 'EndToEnd' | 'StartToEnd' | 'EndToStart' | 'CenterToStart' | 'CenterToEnd' | 'CenterX';
1007
+ type PositionType = {
1008
+ xOffset?: number;
1009
+ xPosition?: InteractionObjectXPosition;
1010
+ xRelativeTo?: InteractionRelative;
1011
+ yOffset?: number;
1012
+ yPosition?: InteractionObjectYPosition;
1013
+ yRelativeTo?: InteractionRelative;
1014
+ };
1015
+ type SizeType = {
1016
+ absoluteHeight?: number;
1017
+ absoluteWidth?: number;
1018
+ heightRatio?: number;
1019
+ widthRatio?: number;
1020
+ };
1021
+ export type InteractionBounds = {
1022
+ position?: PositionType;
1023
+ size?: SizeType;
1024
+ };
1007
1025
  export type Interaction = {
1008
1026
  id: string;
1009
1027
  type: InteractionType;
@@ -1014,6 +1032,7 @@ export type Interaction = {
1014
1032
  relativeWidth: number;
1015
1033
  initData: string;
1016
1034
  designOverridesStr: string;
1035
+ bounds?: InteractionBounds;
1017
1036
  };
1018
1037
  export type InteractionDB = Pick<Interaction, 'id' | 'initData'> & {
1019
1038
  userResponse?: string;
@@ -1758,6 +1777,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
1758
1777
  private _excludeContentId;
1759
1778
  private _layoutDirection;
1760
1779
  private _shouldAllowClosedCaptions;
1780
+ private _appContext;
1761
1781
  protected constructor();
1762
1782
  init(options: IBlazeSDKOptions): Promise<void>;
1763
1783
  private _urls;
@@ -1801,6 +1821,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
1801
1821
  get layoutDirection(): LocaleDirectionType;
1802
1822
  set layoutDirection(value: LocaleDirectionType);
1803
1823
  get shouldAllowClosedCaptions(): boolean;
1824
+ get appContext(): Record<string, any>;
1825
+ set appContext(value: Record<string, any>);
1804
1826
  }
1805
1827
  export declare const ConfigService: ConfigServiceClass;
1806
1828
 
@@ -2977,7 +2999,7 @@ export type PrefetchingPolicyType = 'low' | 'default';
2977
2999
 
2978
3000
  export type ContentAspectRatio = 'Vertical' | 'Horizontal';
2979
3001
 
2980
- export type ScreenState = 'out_of_screen' | 'full_screen';
3002
+ export type ScreenState = 'default_view' | 'full_screen';
2981
3003
  export type ScreenChangeState = {
2982
3004
  current_state: ScreenState;
2983
3005
  next_state?: ScreenState;
@@ -3952,6 +3974,8 @@ export declare class BlazeWidgetInteraction extends BaseWidget {
3952
3974
  private focusMainWindow;
3953
3975
  private initInteraction;
3954
3976
  private orientationChange;
3977
+ private hideIframe;
3978
+ private showIframe;
3955
3979
  }
3956
3980
 
3957
3981
  export interface BlazeWidgetItemOptions {
@@ -4371,8 +4395,9 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
4371
4395
  connectedCallback(): void;
4372
4396
  disconnectedCallback(): void;
4373
4397
  setData(data: IPage): void;
4398
+ private isEnableInteractions;
4374
4399
  loadClosedCaptions(): Promise<void>;
4375
- getVideoDuration(): Promise<number>;
4400
+ getVideoDuration(existingVideo?: HTMLVideoElement): Promise<number>;
4376
4401
  loadPoster(): void;
4377
4402
  display(): void;
4378
4403
  hide(): void;
@@ -4397,10 +4422,10 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
4397
4422
  get isAd(): boolean;
4398
4423
  render(): void;
4399
4424
  restartVideo(): void;
4400
- initializeIMA(): void;
4401
- buildImaUrl(iamData: IImaAdInfo, pageIndex?: number): string;
4425
+ initializeIMA(): Promise<void>;
4426
+ buildImaUrl(iamData: IImaAdInfo, pageIndex?: number): Promise<string>;
4402
4427
  buildAndSetCustParams(iamData: IImaAdInfo, newUrl: URL, pageIndex?: number): void;
4403
- setSearchParamIfNotNull(newUrl: URL, key: string, value?: string): void;
4428
+ setSearchParamIfNotNullOrZero(newUrl: URL, key: string, value?: string | number): void;
4404
4429
  addAniviewMacrosToUrl(newUrl: URL): void;
4405
4430
  addGoogleAdsMacrosToUrl(newUrl: URL): void;
4406
4431
  onAdsManagerLoaded(adsManagerLoadedEvent: any): void;
@@ -4458,6 +4483,7 @@ export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
4458
4483
  isAdContainerConnectedToDOM(): Promise<boolean>;
4459
4484
  private destroyAd;
4460
4485
  handleCtaSwipeUp(): void;
4486
+ private event;
4461
4487
  }
4462
4488
 
4463
4489
  export declare class BlazeWidgetBannerAd extends HTMLElement {