@wscsports/blaze-web-sdk 0.14.2 → 0.15.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 +24 -6
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ type PlayContentOptions = {
|
|
|
7
7
|
export declare function setDoNotTrack(value: boolean): void;
|
|
8
8
|
export declare function setGeoLocation(value: string): void;
|
|
9
9
|
export declare function setExternalUserId(value: string): Promise<void>;
|
|
10
|
+
export declare function setOnItemClick(callback: ItemClickCallback | undefined): void;
|
|
10
11
|
export declare function Initialize(apiKey: string, userOptions?: Partial<IBlazeSDKOptions>): Promise<void>;
|
|
11
12
|
export declare function WidgetRowView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
12
13
|
export declare function WidgetGridView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
@@ -41,6 +42,7 @@ declare const _default: {
|
|
|
41
42
|
addDelegateListener: typeof addDelegateListener;
|
|
42
43
|
setDoNotTrack: typeof setDoNotTrack;
|
|
43
44
|
setGeoLocation: typeof setGeoLocation;
|
|
45
|
+
setOnItemClick: typeof setOnItemClick;
|
|
44
46
|
LabelBuilder: typeof LabelBuilder;
|
|
45
47
|
DataSourceBuilder: typeof DataSourceBuilder;
|
|
46
48
|
Delegations: typeof Delegation;
|
|
@@ -631,10 +633,9 @@ export declare class BlazeDrawer extends BaseWidget {
|
|
|
631
633
|
export declare class BlazeImage extends BaseWidget {
|
|
632
634
|
thumbnailElement: HTMLImageElement;
|
|
633
635
|
constructor();
|
|
636
|
+
private onError;
|
|
634
637
|
load(src: string): void;
|
|
635
638
|
setHeight(value: string): void;
|
|
636
|
-
setRatio(ratio: string): void;
|
|
637
|
-
setBorderRadius(radius: string): void;
|
|
638
639
|
setAccessibility(text: string): void;
|
|
639
640
|
}
|
|
640
641
|
|
|
@@ -748,7 +749,7 @@ export declare class BlazeButton extends BaseWidget {
|
|
|
748
749
|
isAnimationOnDesktopInitialized: boolean;
|
|
749
750
|
get refElement(): ShadowRoot | this;
|
|
750
751
|
constructor();
|
|
751
|
-
static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-
|
|
752
|
+
static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-hidden" | "blaze-btn-visible" | "button-desktop-animation")[];
|
|
752
753
|
private onMouseEnter;
|
|
753
754
|
private onMouseLeave;
|
|
754
755
|
private onClick;
|
|
@@ -1065,7 +1066,7 @@ interface IAdInfoConfiguration {
|
|
|
1065
1066
|
type: 'Story' | 'Moment';
|
|
1066
1067
|
}
|
|
1067
1068
|
export type IAdContext = Record<string, string>;
|
|
1068
|
-
interface IBaseAdInfo {
|
|
1069
|
+
export interface IBaseAdInfo {
|
|
1069
1070
|
configuration?: IAdInfoConfiguration;
|
|
1070
1071
|
context?: IAdContext;
|
|
1071
1072
|
externalAdServerId?: string;
|
|
@@ -1761,6 +1762,7 @@ export * from './device.interface';
|
|
|
1761
1762
|
export * from './drawable.interface';
|
|
1762
1763
|
export * from './http-response.interface';
|
|
1763
1764
|
export * from './icons.interface';
|
|
1765
|
+
export * from './item-click-callback.interface';
|
|
1764
1766
|
export * from './player.interface';
|
|
1765
1767
|
export * from './response.interface';
|
|
1766
1768
|
export * from './service.interface';
|
|
@@ -1769,6 +1771,17 @@ export * from './widget-options.interface';
|
|
|
1769
1771
|
export * from './widget-view.interface';
|
|
1770
1772
|
export { default as Observable } from './observable';
|
|
1771
1773
|
|
|
1774
|
+
export interface ItemClickContext {
|
|
1775
|
+
containerId: string;
|
|
1776
|
+
item: IContent;
|
|
1777
|
+
itemIndexInContainer: number;
|
|
1778
|
+
contentType: ContentType;
|
|
1779
|
+
}
|
|
1780
|
+
export interface ItemClickCallbackResult {
|
|
1781
|
+
shouldPreventOpen: boolean;
|
|
1782
|
+
}
|
|
1783
|
+
export type ItemClickCallback = (context: ItemClickContext) => ItemClickCallbackResult;
|
|
1784
|
+
|
|
1772
1785
|
export interface ILayoutDataSourceOptions {
|
|
1773
1786
|
dataSource?: BlazeDataSourceType;
|
|
1774
1787
|
labels?: string | string[] | BlazeWidgetLabel;
|
|
@@ -2040,6 +2053,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
2040
2053
|
private _shouldAllowClosedCaptions;
|
|
2041
2054
|
private _appContext;
|
|
2042
2055
|
private _disableAutoLoadingContent;
|
|
2056
|
+
private _onItemClick;
|
|
2043
2057
|
protected constructor();
|
|
2044
2058
|
init(options: IBlazeSDKOptions): Promise<void>;
|
|
2045
2059
|
private readonly _russiaRegionCDN;
|
|
@@ -2097,6 +2111,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
2097
2111
|
set appContext(value: Record<string, any>);
|
|
2098
2112
|
get disableAutoLoadingContent(): boolean;
|
|
2099
2113
|
set disableAutoLoadingContent(value: boolean);
|
|
2114
|
+
get onItemClick(): ItemClickCallback | undefined;
|
|
2115
|
+
set onItemClick(value: ItemClickCallback | undefined);
|
|
2100
2116
|
}
|
|
2101
2117
|
export declare const ConfigService: ConfigServiceClass;
|
|
2102
2118
|
|
|
@@ -3468,6 +3484,7 @@ export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptio
|
|
|
3468
3484
|
export type WidgetType = 'Row' | 'Grid';
|
|
3469
3485
|
|
|
3470
3486
|
export declare function isImaAdInfo(ad: IAdInfo): ad is IImaAdInfo;
|
|
3487
|
+
export declare function addContextToCustomTargeting(adInfo: IBaseAdInfo, customTargeting: Record<string, string | string[]>): void;
|
|
3471
3488
|
|
|
3472
3489
|
export declare const convertCcLanguageToState: (data: IClosedCaption[] | undefined, language?: CcLanguageCode) => ClosedCaptionsState;
|
|
3473
3490
|
|
|
@@ -4501,7 +4518,6 @@ export declare class BlazeWidgetCustomLayout extends WidgetBaseLayout implements
|
|
|
4501
4518
|
reload(): void;
|
|
4502
4519
|
updateWidgetUI(): void;
|
|
4503
4520
|
setMaxItemsDisplaySize(size: number): void;
|
|
4504
|
-
setDelegations(delegates: Record<Delegation, EventListenerOrEventListenerObject>): void;
|
|
4505
4521
|
updateOverrideStyles(): void;
|
|
4506
4522
|
setId(id: string): void;
|
|
4507
4523
|
protected handlePostContentLoad(isStoryContentType: boolean, isMomentContentType: boolean, isVideoContentType: boolean): Promise<void>;
|
|
@@ -4665,12 +4681,14 @@ export declare class BlazeWidgetItem extends BaseWidget implements Observable {
|
|
|
4665
4681
|
getPaddingOnContainer(): PositionOffset;
|
|
4666
4682
|
setPaddingOnContainer(padding: PositionOffset): void;
|
|
4667
4683
|
setChipStyle(): void;
|
|
4684
|
+
private getItemIndex;
|
|
4668
4685
|
event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
4669
4686
|
render(): void;
|
|
4670
4687
|
}
|
|
4671
4688
|
|
|
4672
4689
|
/// <reference types="node" />
|
|
4673
4690
|
export declare class BlazeWidgetLayout extends WidgetBaseLayout {
|
|
4691
|
+
containerId: string | undefined;
|
|
4674
4692
|
skeletonContainer: BlazeDiv | undefined;
|
|
4675
4693
|
widgetHeight: number;
|
|
4676
4694
|
parentHeight: number | undefined;
|
|
@@ -4697,7 +4715,7 @@ export declare class BlazeWidgetLayout extends WidgetBaseLayout {
|
|
|
4697
4715
|
onPlayerOpen(): void;
|
|
4698
4716
|
setFirstVisibleItem(): void;
|
|
4699
4717
|
getParentHeightWithoutPadding(): number | null;
|
|
4700
|
-
setId(
|
|
4718
|
+
setId(containerId: string): void;
|
|
4701
4719
|
set storyIds(value: string);
|
|
4702
4720
|
set contentIds(value: string);
|
|
4703
4721
|
updateWidgetUI(): void;
|