@wscsports/blaze-web-sdk 0.13.5 → 0.14.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 +208 -60
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare function Initialize(apiKey: string, userOptions?: Partial<IBlazeS
|
|
|
11
11
|
export declare function WidgetRowView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
12
12
|
export declare function WidgetGridView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
13
13
|
export declare function WidgetEmbeddedStory(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
14
|
+
export declare function WidgetCustomView(containerId: string, options: ICustomWidgetOptionsWithDataSource): IWidgetView;
|
|
14
15
|
export declare function Theme(theme: ThemeType, contentType: 'moment'): IWidgetTheme<MomentPlayerStyle>;
|
|
15
16
|
export declare function Theme(theme: ThemeType, contentType: 'story'): IWidgetTheme<StoryPlayerStyle>;
|
|
16
17
|
export declare function Theme(theme: ThemeType, contentType: 'video'): IWidgetTheme<VideoPlayerStyle>;
|
|
@@ -35,6 +36,7 @@ declare const _default: {
|
|
|
35
36
|
WidgetGridView: typeof WidgetGridView;
|
|
36
37
|
WidgetRowView: typeof WidgetRowView;
|
|
37
38
|
WidgetEmbeddedStory: typeof WidgetEmbeddedStory;
|
|
39
|
+
WidgetCustomView: typeof WidgetCustomView;
|
|
38
40
|
Theme: typeof Theme;
|
|
39
41
|
addDelegateListener: typeof addDelegateListener;
|
|
40
42
|
setDoNotTrack: typeof setDoNotTrack;
|
|
@@ -360,7 +362,7 @@ export declare abstract class BaseWidget extends HTMLElement {
|
|
|
360
362
|
type BlazeSourceType = 'labels' | 'ids';
|
|
361
363
|
export type AdvancedOrdering = 'LiveFirst';
|
|
362
364
|
export interface BlazeDataSourceType {
|
|
363
|
-
|
|
365
|
+
sourceType: BlazeSourceType;
|
|
364
366
|
labels?: string | string[] | BlazeWidgetLabel;
|
|
365
367
|
labelsPriority?: string | string[] | BlazeWidgetLabel[];
|
|
366
368
|
ids?: string[];
|
|
@@ -383,6 +385,11 @@ export declare class BlazeDataSourceFactory {
|
|
|
383
385
|
}
|
|
384
386
|
export declare class BlazeDataSourceValidations {
|
|
385
387
|
static validateFormat(dataSource: BlazeDataSourceType): void;
|
|
388
|
+
static validateDataSource(containerId: string, legacyProps: {
|
|
389
|
+
labels?: string | string[] | BlazeWidgetLabel;
|
|
390
|
+
storyIds?: string[];
|
|
391
|
+
contentIds?: string[];
|
|
392
|
+
}, dataSource?: BlazeDataSourceType): void;
|
|
386
393
|
}
|
|
387
394
|
|
|
388
395
|
export declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): {
|
|
@@ -1109,9 +1116,20 @@ export interface IContent {
|
|
|
1109
1116
|
isAd: boolean;
|
|
1110
1117
|
entities?: ContentEntities;
|
|
1111
1118
|
bannerAdInfo?: IBannerAdInfo;
|
|
1119
|
+
description?: string;
|
|
1112
1120
|
closedCaptions?: IClosedCaption[];
|
|
1113
1121
|
extraInfo: ExtraInfo;
|
|
1114
1122
|
}
|
|
1123
|
+
export interface IBlazeContent {
|
|
1124
|
+
id: string;
|
|
1125
|
+
title: string;
|
|
1126
|
+
updateTime: string;
|
|
1127
|
+
createTime: string;
|
|
1128
|
+
thumbnails: IThumbnail[];
|
|
1129
|
+
hasViewed: boolean;
|
|
1130
|
+
type?: string;
|
|
1131
|
+
entities?: ContentEntities;
|
|
1132
|
+
}
|
|
1115
1133
|
|
|
1116
1134
|
export interface ICta {
|
|
1117
1135
|
type: 'Deeplink' | 'Web' | null;
|
|
@@ -1254,13 +1272,16 @@ export interface IMoment extends IContent {
|
|
|
1254
1272
|
cta: ICta;
|
|
1255
1273
|
adInfo?: IAdInfo;
|
|
1256
1274
|
subtitle?: string;
|
|
1257
|
-
description?: string;
|
|
1258
1275
|
}
|
|
1259
1276
|
export type MomentDB = {
|
|
1260
1277
|
id: string;
|
|
1261
1278
|
liked: boolean;
|
|
1262
1279
|
viewed: boolean;
|
|
1263
1280
|
};
|
|
1281
|
+
export interface IBlazeMoment extends IBlazeContent {
|
|
1282
|
+
duration: string;
|
|
1283
|
+
likes: number;
|
|
1284
|
+
}
|
|
1264
1285
|
|
|
1265
1286
|
interface IBasePage {
|
|
1266
1287
|
id: string;
|
|
@@ -1288,6 +1309,15 @@ export interface IAdPage extends IBasePage {
|
|
|
1288
1309
|
type: 'Ad';
|
|
1289
1310
|
adInfo?: IWebAdInfo;
|
|
1290
1311
|
}
|
|
1312
|
+
export interface IBlazePage {
|
|
1313
|
+
id: string;
|
|
1314
|
+
duration: number;
|
|
1315
|
+
hasViewed: boolean;
|
|
1316
|
+
createTime: string;
|
|
1317
|
+
index?: number;
|
|
1318
|
+
thumbnail?: IThumbnail;
|
|
1319
|
+
poster?: IThumbnail;
|
|
1320
|
+
}
|
|
1291
1321
|
export type IPage = IAdPage | IContentPage;
|
|
1292
1322
|
|
|
1293
1323
|
export interface IRendition {
|
|
@@ -1298,12 +1328,15 @@ export interface IRendition {
|
|
|
1298
1328
|
}
|
|
1299
1329
|
|
|
1300
1330
|
export interface IStory extends IContent {
|
|
1301
|
-
description: string;
|
|
1302
1331
|
isLive: boolean;
|
|
1303
1332
|
pages: IPage[];
|
|
1304
1333
|
adInfo?: IAdInfo;
|
|
1305
1334
|
compositionType?: string;
|
|
1306
1335
|
}
|
|
1336
|
+
export interface IBlazeStory extends IBlazeContent {
|
|
1337
|
+
pages: IBlazePage[];
|
|
1338
|
+
isLive: boolean;
|
|
1339
|
+
}
|
|
1307
1340
|
|
|
1308
1341
|
export interface IThumbnail {
|
|
1309
1342
|
type: ThumbnailApiType;
|
|
@@ -1312,7 +1345,6 @@ export interface IThumbnail {
|
|
|
1312
1345
|
}
|
|
1313
1346
|
|
|
1314
1347
|
export interface IVideo extends IContent {
|
|
1315
|
-
description: string;
|
|
1316
1348
|
isLive: boolean;
|
|
1317
1349
|
pages: IPage[];
|
|
1318
1350
|
adInfo?: IAdInfo;
|
|
@@ -1329,6 +1361,11 @@ export interface VideoDBData {
|
|
|
1329
1361
|
currentTime: number;
|
|
1330
1362
|
posterCurrentTime: string;
|
|
1331
1363
|
}
|
|
1364
|
+
export interface IBlazeVideo extends IBlazeContent {
|
|
1365
|
+
duration: string;
|
|
1366
|
+
likes: number;
|
|
1367
|
+
isLive: boolean;
|
|
1368
|
+
}
|
|
1332
1369
|
|
|
1333
1370
|
export declare enum ActionHandlerId {
|
|
1334
1371
|
AddCustomActionButton = "addCustomActionButton"
|
|
@@ -1419,6 +1456,7 @@ export interface WidgetsTagNameMap {
|
|
|
1419
1456
|
'blaze-widget-modal': BlazeWidgetModal;
|
|
1420
1457
|
'blaze-widget-item': BlazeWidgetItem;
|
|
1421
1458
|
'blaze-widget-layout': BlazeWidgetLayout;
|
|
1459
|
+
'blaze-widget-custom-layout': BlazeWidgetCustomLayout;
|
|
1422
1460
|
'blaze-widget-story': BlazeWidgetStory;
|
|
1423
1461
|
'blaze-widget-story-player': BlazeWidgetStoryPlayer;
|
|
1424
1462
|
'blaze-widget-story-modal': BlazeWidgetStoryModal;
|
|
@@ -1461,6 +1499,7 @@ interface WidgetsTagNameOptionsMap {
|
|
|
1461
1499
|
'blaze-widget-modal': {};
|
|
1462
1500
|
'blaze-widget-item': {};
|
|
1463
1501
|
'blaze-widget-layout': {};
|
|
1502
|
+
'blaze-widget-custom-layout': {};
|
|
1464
1503
|
'blaze-widget-story': {};
|
|
1465
1504
|
'blaze-widget-story-player': {};
|
|
1466
1505
|
'blaze-widget-story-modal': {};
|
|
@@ -1505,12 +1544,17 @@ export declare abstract class WidgetsFactory {
|
|
|
1505
1544
|
|
|
1506
1545
|
export * from './elements.factory';
|
|
1507
1546
|
|
|
1547
|
+
export declare function isStory(item: ContentItem): item is IStory;
|
|
1548
|
+
export declare function isVideo(item: ContentItem): item is IVideo;
|
|
1549
|
+
export declare function isMoment(item: ContentItem): item is IMoment;
|
|
1550
|
+
|
|
1508
1551
|
export declare function isValidIds(ids: unknown): ids is string[];
|
|
1509
1552
|
export declare function hasValidIds(...sources: Array<string[] | undefined>): boolean;
|
|
1510
1553
|
|
|
1511
1554
|
export * from './widget-theme.guard';
|
|
1512
1555
|
export * from './labels.guard';
|
|
1513
1556
|
export * from './ids.guard';
|
|
1557
|
+
export * from './contents.guard';
|
|
1514
1558
|
|
|
1515
1559
|
export declare function isValidLabels(labels: unknown): labels is string | string[] | IBlazeWidgetLabel;
|
|
1516
1560
|
export declare function hasValidLabels(...sources: Array<string | string[] | IBlazeWidgetLabel | undefined>): boolean;
|
|
@@ -1611,8 +1655,8 @@ export interface IDataSourceBuilder {
|
|
|
1611
1655
|
labels: (params: LabelsDataSourceParams) => BlazeDataSourceType;
|
|
1612
1656
|
ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
|
|
1613
1657
|
}
|
|
1614
|
-
export type LabelsDataSourceParams = Omit<BlazeDataSourceType, '
|
|
1615
|
-
export type IdsDataSourceParams = Omit<BlazeDataSourceType, '
|
|
1658
|
+
export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'ids'>;
|
|
1659
|
+
export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labels' | 'labelsPriority' | 'maxItems'>;
|
|
1616
1660
|
|
|
1617
1661
|
export interface IDatabase {
|
|
1618
1662
|
init: () => Promise<void>;
|
|
@@ -1725,6 +1769,18 @@ export * from './widget-options.interface';
|
|
|
1725
1769
|
export * from './widget-view.interface';
|
|
1726
1770
|
export { default as Observable } from './observable';
|
|
1727
1771
|
|
|
1772
|
+
export interface ILayoutDataSourceOptions {
|
|
1773
|
+
dataSource?: BlazeDataSourceType;
|
|
1774
|
+
labels?: string | string[] | BlazeWidgetLabel;
|
|
1775
|
+
storyIds?: string[];
|
|
1776
|
+
contentIds?: string[];
|
|
1777
|
+
maxItemsCount?: number;
|
|
1778
|
+
maxDisplayItemsCount?: number;
|
|
1779
|
+
orderType?: string;
|
|
1780
|
+
labelsPriority?: string | string[] | BlazeWidgetLabel[];
|
|
1781
|
+
shouldOrderWidgetByReadStatus?: boolean;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1728
1784
|
export default interface IntersectionObservable {
|
|
1729
1785
|
intersectionObserver: IntersectionObserver;
|
|
1730
1786
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
@@ -1776,7 +1832,13 @@ export interface IWidgetViewOptionsWithDataSource extends IWidgetViewOptionsBase
|
|
|
1776
1832
|
storyIds?: never;
|
|
1777
1833
|
labels?: never;
|
|
1778
1834
|
}
|
|
1779
|
-
export
|
|
1835
|
+
export interface IBlazeCustomRenderer {
|
|
1836
|
+
render(contents: BlazeContentItem[], container: HTMLElement, playContent: (contentId: string) => void): void;
|
|
1837
|
+
destroy?(): void;
|
|
1838
|
+
}
|
|
1839
|
+
export interface ICustomWidgetOptionsWithDataSource extends IWidgetViewOptionsWithDataSource {
|
|
1840
|
+
customRenderer: IBlazeCustomRenderer;
|
|
1841
|
+
}
|
|
1780
1842
|
|
|
1781
1843
|
export interface IWidgetView extends HTMLElement {
|
|
1782
1844
|
setTheme: (theme: IWidgetTheme | ThemeType) => void;
|
|
@@ -1797,6 +1859,10 @@ export interface IWidgetView extends HTMLElement {
|
|
|
1797
1859
|
export interface ISetWidgetOptions {
|
|
1798
1860
|
shouldReloadData?: boolean;
|
|
1799
1861
|
}
|
|
1862
|
+
export interface ICustomWidgetView extends IWidgetView {
|
|
1863
|
+
getContainer: () => HTMLElement;
|
|
1864
|
+
getContents: () => IBlazeContent[];
|
|
1865
|
+
}
|
|
1800
1866
|
|
|
1801
1867
|
declare const AdServiceClass_base: {
|
|
1802
1868
|
new (): {};
|
|
@@ -3236,6 +3302,9 @@ export type IClosedCaption = {
|
|
|
3236
3302
|
};
|
|
3237
3303
|
export type ClosedCaptionsState = CcLanguageCode | 'Off' | 'Unknown' | 'Unavailable';
|
|
3238
3304
|
|
|
3305
|
+
export type ContentItem = IStory | IVideo | IMoment | IContent;
|
|
3306
|
+
export type BlazeContentItem = IBlazeStory | IBlazeVideo | IBlazeMoment | IBlazeContent;
|
|
3307
|
+
|
|
3239
3308
|
export type FontWeightType = 'normal' | 'bold' | 'bolder' | 'lighter' | 'inherit' | 'initial' | 'unset' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
3240
3309
|
export type TextTransformType = 'capitalize' | 'uppercase' | 'lowercase' | 'none';
|
|
3241
3310
|
|
|
@@ -3303,6 +3372,8 @@ export * from './animation.type';
|
|
|
3303
3372
|
export * from './screen.type';
|
|
3304
3373
|
export * from './action-handler.type';
|
|
3305
3374
|
export * from './cc-language.type';
|
|
3375
|
+
export * from './widget-view-options.type';
|
|
3376
|
+
export * from './content-item.type';
|
|
3306
3377
|
|
|
3307
3378
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
|
|
3308
3379
|
export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
|
|
@@ -3392,6 +3463,8 @@ export type TokenData = {
|
|
|
3392
3463
|
userId: string;
|
|
3393
3464
|
};
|
|
3394
3465
|
|
|
3466
|
+
export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptionsWithStoryIds | IWidgetViewOptionsWithDataSource | ICustomWidgetOptionsWithDataSource;
|
|
3467
|
+
|
|
3395
3468
|
export type WidgetType = 'Row' | 'Grid';
|
|
3396
3469
|
|
|
3397
3470
|
export declare function isImaAdInfo(ad: IAdInfo): ad is IImaAdInfo;
|
|
@@ -3414,6 +3487,13 @@ export declare function calculateChipSize(type: 'chip' | 'badge', statusIndicato
|
|
|
3414
3487
|
|
|
3415
3488
|
export declare function delay(ms: number): Promise<void>;
|
|
3416
3489
|
|
|
3490
|
+
export declare function transformContent(item: IContent): IBlazeContent;
|
|
3491
|
+
export declare function transformStory(item: IStory): IBlazeStory;
|
|
3492
|
+
export declare function transformVideo(item: IVideo): IBlazeVideo;
|
|
3493
|
+
export declare function transformMoment(item: IMoment): IBlazeMoment;
|
|
3494
|
+
export declare function transformContentItem(item: ContentItem): BlazeContentItem;
|
|
3495
|
+
export declare function transformContentsArray(items: ContentItem[]): BlazeContentItem[];
|
|
3496
|
+
|
|
3417
3497
|
type CountryCode = typeof CountryCodes[number];
|
|
3418
3498
|
export declare function isValidCountryCode(countryCode: string): countryCode is CountryCode;
|
|
3419
3499
|
|
|
@@ -3454,11 +3534,13 @@ export declare function isElementInsideTarget(target: EventTarget | null, select
|
|
|
3454
3534
|
export declare function findParentOfType<T>(target: EventTarget | null, type: {
|
|
3455
3535
|
new (...args: any[]): T;
|
|
3456
3536
|
}, stopAt: Element): T | null;
|
|
3537
|
+
export declare function validateContainer(containerId: string, widgetElementName?: string): HTMLElement;
|
|
3457
3538
|
|
|
3458
3539
|
export * from './ad-info.utils';
|
|
3459
3540
|
export * from './cc-language.utils';
|
|
3460
3541
|
export * from './chip.utils';
|
|
3461
3542
|
export * from './common.utils';
|
|
3543
|
+
export * from './content-mapper.utils';
|
|
3462
3544
|
export * from './country-location.utils';
|
|
3463
3545
|
export * from './guard.utils';
|
|
3464
3546
|
export * from './helper';
|
|
@@ -3861,7 +3943,7 @@ export declare class BlazeVideoNavigationOverlay extends HTMLElement {
|
|
|
3861
3943
|
loader: BlazeLoader;
|
|
3862
3944
|
private _platform;
|
|
3863
3945
|
constructor();
|
|
3864
|
-
static get observedAttributes(): ("
|
|
3946
|
+
static get observedAttributes(): ("hidden" | "layout" | "has-next" | "has-prev")[];
|
|
3865
3947
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
3866
3948
|
private applyAttribute;
|
|
3867
3949
|
connectedCallback(): void;
|
|
@@ -4173,6 +4255,7 @@ export declare class HLSStrategy implements PlaybackStrategy {
|
|
|
4173
4255
|
|
|
4174
4256
|
export * from './widget-video-base';
|
|
4175
4257
|
export * from './widget-player';
|
|
4258
|
+
export * from './widget-custom-layout';
|
|
4176
4259
|
export * from './ad/widget-ad';
|
|
4177
4260
|
export * from './ad/widget-banner-ad';
|
|
4178
4261
|
export * from './ad/widget-vast-ad';
|
|
@@ -4197,6 +4280,83 @@ export * from './widget-captions';
|
|
|
4197
4280
|
export * from '../video/core/video';
|
|
4198
4281
|
export * from './widget-cc-modal';
|
|
4199
4282
|
|
|
4283
|
+
export declare abstract class WidgetBaseLayout extends BlazeWidgetScrollable implements Observable, IWidgetView {
|
|
4284
|
+
isWidgetVisible: boolean;
|
|
4285
|
+
widgetItems: BlazeWidgetItem[];
|
|
4286
|
+
analyticsStack: Record<WidgetAction, boolean>;
|
|
4287
|
+
shouldReloadData: boolean;
|
|
4288
|
+
shouldReloadWhenPlayerIsClosed: boolean;
|
|
4289
|
+
personalized?: BlazePersonalized;
|
|
4290
|
+
preset: IWidgetTheme | undefined;
|
|
4291
|
+
contents: IStory[] | IMoment[] | IVideo[];
|
|
4292
|
+
actionHandlers: ActionHandler[];
|
|
4293
|
+
defaultAdsInfo: IAdInfo | undefined;
|
|
4294
|
+
thumbnailWidth: number | undefined;
|
|
4295
|
+
thumbnailHeight: number | undefined;
|
|
4296
|
+
storysModal: BlazeWidgetStoryModal | undefined;
|
|
4297
|
+
momentsModal: BlazeWidgetMomentModal | undefined;
|
|
4298
|
+
videosModal: BlazeWidgetVideoModal | undefined;
|
|
4299
|
+
perItemStyleOverrides: PerItemStyleOverrides;
|
|
4300
|
+
activeOverridesLayoutThemes: PerItemStyleOverrides;
|
|
4301
|
+
constructor();
|
|
4302
|
+
abstract render(): void;
|
|
4303
|
+
widgetType(): WidgetType;
|
|
4304
|
+
get thumbnailShape(): ThumbnailShape;
|
|
4305
|
+
protected get theme(): IWidgetTheme<StoryPlayerStyle | VideoPlayerStyle | MomentPlayerStyle>;
|
|
4306
|
+
protected updateActiveLayoutThemesPerItemWithEntity(key: EntitiesType, value: string, theme: IWidgetTheme): void;
|
|
4307
|
+
protected setReloadData(options?: ISetWidgetOptions): void;
|
|
4308
|
+
set contentIds(value: string);
|
|
4309
|
+
set storyIds(value: string);
|
|
4310
|
+
addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
4311
|
+
event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
4312
|
+
intersectionObserver: IntersectionObserver;
|
|
4313
|
+
abstract handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
4314
|
+
getTheme(): IWidgetTheme;
|
|
4315
|
+
setTheme(theme: IWidgetTheme | ThemeType): void;
|
|
4316
|
+
reload(): void;
|
|
4317
|
+
abstract updateWidgetUI(): void;
|
|
4318
|
+
setMaxItemsDisplaySize(size: number): void;
|
|
4319
|
+
setDelegations(delegates: Record<Delegation, EventListenerOrEventListenerObject>): void;
|
|
4320
|
+
abstract updateOverrideStyles(perItemStyleOverrides: PerItemStyleOverrides): void;
|
|
4321
|
+
abstract setId(id: string): void;
|
|
4322
|
+
protected setOrderType(orderType?: string): void;
|
|
4323
|
+
updateDataSource(dataSource: BlazeDataSourceType): void;
|
|
4324
|
+
setPersonalized(personalized?: BlazePersonalized): void;
|
|
4325
|
+
setAdvancedOrdering(advancedOrdering?: AdvancedOrdering): void;
|
|
4326
|
+
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
4327
|
+
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
4328
|
+
setContentIds(ids: string[], options?: ISetWidgetOptions): void;
|
|
4329
|
+
setMaxItemsSize(maxItemsSize?: number, options?: ISetWidgetOptions): void;
|
|
4330
|
+
setActionHandlers(actionHandlers: ActionHandler[]): void;
|
|
4331
|
+
protected appendModalToBlazeSDK(modal: BlazeWidgetMomentModal | BlazeWidgetStoryModal | BlazeWidgetVideoModal): void;
|
|
4332
|
+
updateWidgetsData(): void;
|
|
4333
|
+
protected abstract reorderWidgetItems(): void;
|
|
4334
|
+
protected abstract updateWidgetDisplay(): void;
|
|
4335
|
+
protected sortContent(): void;
|
|
4336
|
+
protected reorderWidgets(): void;
|
|
4337
|
+
private getContentType;
|
|
4338
|
+
static get observedAttributes(): string[];
|
|
4339
|
+
protected createModal(type: ContentType): void;
|
|
4340
|
+
protected beforeStoryModalCreation(): void;
|
|
4341
|
+
protected abstract setupVideoModalCallbacks(): void;
|
|
4342
|
+
protected abstract setupMomentModalCallbacks(): void;
|
|
4343
|
+
protected abstract setupStoryModalCallbacks(): void;
|
|
4344
|
+
loadContent(): Promise<void>;
|
|
4345
|
+
protected handleContentLoadError(e: any): Promise<void>;
|
|
4346
|
+
protected handleStoryContent(): void;
|
|
4347
|
+
protected handleVideoContent(): void;
|
|
4348
|
+
protected handleMomentContent(): void;
|
|
4349
|
+
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
4350
|
+
protected playVideo(contentId: string): void;
|
|
4351
|
+
protected playMoment(contentId: string): void;
|
|
4352
|
+
protected playStory(contentId: string): void;
|
|
4353
|
+
protected handleAssetsExpiry(data: {
|
|
4354
|
+
assetsExpiryTime: string;
|
|
4355
|
+
}): void;
|
|
4356
|
+
protected removeSkeletonContainer?(): Promise<void>;
|
|
4357
|
+
protected abstract handlePostContentLoad(isStoryContentType: boolean, isMomentContentType: boolean, isVideoContentType: boolean): Promise<void>;
|
|
4358
|
+
}
|
|
4359
|
+
|
|
4200
4360
|
type Position = {
|
|
4201
4361
|
top?: string;
|
|
4202
4362
|
left?: string;
|
|
@@ -4329,6 +4489,32 @@ export declare class BlazeWidgetCtaModal extends BaseWidget {
|
|
|
4329
4489
|
render(): void;
|
|
4330
4490
|
}
|
|
4331
4491
|
|
|
4492
|
+
export declare class BlazeWidgetCustomLayout extends WidgetBaseLayout implements ICustomWidgetView {
|
|
4493
|
+
private customContainer;
|
|
4494
|
+
private customRenderer;
|
|
4495
|
+
constructor(customRenderer: IBlazeCustomRenderer);
|
|
4496
|
+
getContainer(): HTMLElement;
|
|
4497
|
+
getContents(): IBlazeContent[];
|
|
4498
|
+
connectedCallback(): void;
|
|
4499
|
+
disconnectedCallback(): void;
|
|
4500
|
+
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
4501
|
+
reload(): void;
|
|
4502
|
+
updateWidgetUI(): void;
|
|
4503
|
+
setMaxItemsDisplaySize(size: number): void;
|
|
4504
|
+
setDelegations(delegates: Record<Delegation, EventListenerOrEventListenerObject>): void;
|
|
4505
|
+
updateOverrideStyles(): void;
|
|
4506
|
+
setId(id: string): void;
|
|
4507
|
+
protected handlePostContentLoad(isStoryContentType: boolean, isMomentContentType: boolean, isVideoContentType: boolean): Promise<void>;
|
|
4508
|
+
protected reorderWidgetItems(): void;
|
|
4509
|
+
protected updateWidgetDisplay(): void;
|
|
4510
|
+
private setupModalContent;
|
|
4511
|
+
private playContentById;
|
|
4512
|
+
render(): void;
|
|
4513
|
+
protected setupVideoModalCallbacks(): void;
|
|
4514
|
+
protected setupMomentModalCallbacks(): void;
|
|
4515
|
+
protected setupStoryModalCallbacks(): void;
|
|
4516
|
+
}
|
|
4517
|
+
|
|
4332
4518
|
export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWidgetView, Observable {
|
|
4333
4519
|
preset?: IWidgetTheme;
|
|
4334
4520
|
contents: BlazeWidgetStory[];
|
|
@@ -4484,47 +4670,27 @@ export declare class BlazeWidgetItem extends BaseWidget implements Observable {
|
|
|
4484
4670
|
}
|
|
4485
4671
|
|
|
4486
4672
|
/// <reference types="node" />
|
|
4487
|
-
export declare class BlazeWidgetLayout extends
|
|
4488
|
-
storysModal: BlazeWidgetStoryModal | undefined;
|
|
4489
|
-
momentsModal: BlazeWidgetMomentModal | undefined;
|
|
4490
|
-
videosModal: BlazeWidgetVideoModal | undefined;
|
|
4491
|
-
defaultAdsInfo: IAdInfo | undefined;
|
|
4492
|
-
content: IStory[] | IMoment[] | IVideo[];
|
|
4673
|
+
export declare class BlazeWidgetLayout extends WidgetBaseLayout {
|
|
4493
4674
|
skeletonContainer: BlazeDiv | undefined;
|
|
4494
|
-
widgetItems: BlazeWidgetItem[];
|
|
4495
|
-
preset: IWidgetTheme | undefined;
|
|
4496
|
-
perItemStyleOverrides: PerItemStyleOverrides;
|
|
4497
|
-
activeOverridesLayoutThemes: PerItemStyleOverrides;
|
|
4498
|
-
isWidgetVisible: boolean;
|
|
4499
|
-
thumbnailWidth: number | undefined;
|
|
4500
|
-
thumbnailHeight: number | undefined;
|
|
4501
4675
|
widgetHeight: number;
|
|
4502
4676
|
parentHeight: number | undefined;
|
|
4503
|
-
intersectionObserver: IntersectionObserver;
|
|
4504
4677
|
heightObserver: MutationObserver;
|
|
4505
4678
|
reloadTimeout: NodeJS.Timeout | undefined;
|
|
4506
|
-
analyticsStack: Record<WidgetAction, boolean>;
|
|
4507
|
-
actionHandlers: ActionHandler[];
|
|
4508
4679
|
onResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
4509
4680
|
onMouseMoveEvent: ((e: MouseEvent) => void) & {
|
|
4510
4681
|
cancel: () => void;
|
|
4511
4682
|
};
|
|
4512
4683
|
onMouseLeaveEvent: (e: MouseEvent) => void;
|
|
4513
|
-
shouldReloadWhenPlayerIsClosed: boolean;
|
|
4514
|
-
shouldReloadData: boolean;
|
|
4515
|
-
private personalized?;
|
|
4516
4684
|
currentlyAnimatedItem: BlazeWidgetItem | undefined;
|
|
4517
4685
|
firstVisibleItem: BlazeWidgetItem | undefined;
|
|
4518
4686
|
get refElement(): ShadowRoot | BlazeWidgetLayout;
|
|
4519
4687
|
constructor();
|
|
4520
4688
|
connectedCallback(): void;
|
|
4521
4689
|
disconnectedCallback(): void;
|
|
4522
|
-
private getContentType;
|
|
4523
4690
|
onResizeEventDelay(): void;
|
|
4524
4691
|
onResize(): void;
|
|
4525
4692
|
handleHeightChangeMutation(mutationsList: MutationRecord[]): void;
|
|
4526
4693
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
4527
|
-
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
4528
4694
|
onKeyDown(e: KeyboardEvent): void;
|
|
4529
4695
|
onContentChange(mode: ContentDirection): void;
|
|
4530
4696
|
onPlayerClose(): void;
|
|
@@ -4532,39 +4698,24 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4532
4698
|
setFirstVisibleItem(): void;
|
|
4533
4699
|
getParentHeightWithoutPadding(): number | null;
|
|
4534
4700
|
setId(id: string): void;
|
|
4535
|
-
private setReloadData;
|
|
4536
|
-
addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
4537
4701
|
set storyIds(value: string);
|
|
4538
4702
|
set contentIds(value: string);
|
|
4539
|
-
setContentIds(ids: string[], options?: ISetWidgetOptions): void;
|
|
4540
|
-
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
4541
|
-
setActionHandlers(actionHandlers: ActionHandler[]): void;
|
|
4542
|
-
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
4543
|
-
getTheme(): IWidgetTheme;
|
|
4544
|
-
setTheme(theme: IWidgetTheme | ThemeType): void;
|
|
4545
|
-
private get theme();
|
|
4546
|
-
updateOverrideStyles(perItemStyleOverrides: PerItemStyleOverrides): void;
|
|
4547
|
-
reload(): void;
|
|
4548
|
-
private updateActiveLayoutThemesPerItemWithEntity;
|
|
4549
4703
|
updateWidgetUI(): void;
|
|
4704
|
+
updateOverrideStyles(perItemStyleOverrides: PerItemStyleOverrides): void;
|
|
4705
|
+
private updatePlayerStyle;
|
|
4550
4706
|
setMaxPaddingOnWidgetItems(): void;
|
|
4551
|
-
updateDataSource(dataSource: BlazeDataSourceType): void;
|
|
4552
|
-
setDelegations(delegates: Record<Delegation, EventListenerOrEventListenerObject>): void;
|
|
4553
|
-
private setOrderType;
|
|
4554
4707
|
setMaxItemsDisplaySize(maxSize: number): void;
|
|
4555
4708
|
setMaxItemsSize(maxItemsSize?: number, options?: ISetWidgetOptions): void;
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
private handleVideoContent;
|
|
4564
|
-
private handleMomentContent;
|
|
4565
|
-
handleAssetsExpiry(data: {
|
|
4709
|
+
protected setupVideoModalCallbacks(): void;
|
|
4710
|
+
protected setupMomentModalCallbacks(): void;
|
|
4711
|
+
protected setupStoryModalCallbacks(): void;
|
|
4712
|
+
protected beforeStoryModalCreation(): void;
|
|
4713
|
+
protected removeSkeletonContainer(): Promise<void>;
|
|
4714
|
+
protected handlePostContentLoad(isStoryContentType: boolean, isMomentContentType: boolean, isVideoContentType: boolean): Promise<void>;
|
|
4715
|
+
protected handleAssetsExpiry(data: {
|
|
4566
4716
|
assetsExpiryTime: string;
|
|
4567
4717
|
}): void;
|
|
4718
|
+
private onItemClick;
|
|
4568
4719
|
handleWidgetContent(): void;
|
|
4569
4720
|
calculateChipSizes(theme: IWidgetTheme): {
|
|
4570
4721
|
badge: {
|
|
@@ -4602,16 +4753,12 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4602
4753
|
labelAdditionalWidth: number;
|
|
4603
4754
|
labelAdditionalHeight: number;
|
|
4604
4755
|
};
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
private reorderWidgets;
|
|
4608
|
-
updateWidgetsData(): void;
|
|
4609
|
-
private updateWidgetDisplay;
|
|
4756
|
+
protected reorderWidgetItems(): void;
|
|
4757
|
+
protected updateWidgetDisplay(): void;
|
|
4610
4758
|
private maxSize;
|
|
4611
4759
|
connectWidgets(): void;
|
|
4612
4760
|
get thumbnailShape(): ThumbnailShape;
|
|
4613
4761
|
widgetType(): WidgetType;
|
|
4614
|
-
setPersonalized(personalized?: BlazePersonalized): void;
|
|
4615
4762
|
}
|
|
4616
4763
|
|
|
4617
4764
|
export declare class BlazeWidgetModal extends BaseWidget {
|
|
@@ -4984,6 +5131,7 @@ export declare class BlazeWidgetVastAd extends HTMLElement {
|
|
|
4984
5131
|
constructor(contentType: ContentType, getReferringObject?: (() => ReferringEventInfo) | undefined);
|
|
4985
5132
|
private initializeGoogleIma;
|
|
4986
5133
|
private buildImaUrl;
|
|
5134
|
+
private cleanupAdSession;
|
|
4987
5135
|
startAd(videoElement: HTMLVideoElement, adInfo: IImaAdInfo, contentExtraInfo?: ContentExtraInfo, addCustomParams?: (url: URL) => void, addExtraAnalyticsParams?: AddExtraAnalyticsParams): Promise<Boolean>;
|
|
4988
5136
|
private onAdsManagerLoaded;
|
|
4989
5137
|
private loadAds;
|