@wscsports/blaze-web-sdk 0.2.4 → 0.2.6
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 +140 -40
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function setDoNotTrack(value: boolean): void;
|
|
2
2
|
export declare function setGeoLocation(value: string): void;
|
|
3
3
|
export declare function setExternalUserId(value: string): Promise<void>;
|
|
4
|
-
export declare function Initialize(apiKey: string,
|
|
4
|
+
export declare function Initialize(apiKey: string, userOptions?: Partial<IBlazeSDKOptions>): Promise<void>;
|
|
5
5
|
export declare function WidgetRowView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
6
6
|
export declare function WidgetGridView(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
7
7
|
export declare function WidgetEmbeddedStory(containerId: string, options: IWidgetViewOptions): IWidgetView;
|
|
@@ -9,10 +9,13 @@ export declare function Theme(theme: ThemeType): IWidgetTheme;
|
|
|
9
9
|
export declare function addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
10
10
|
export declare const Delegations: typeof Delegation;
|
|
11
11
|
export declare function LabelBuilder(): IWidgetLabelBuilder;
|
|
12
|
+
export declare function DataSourceBuilder(): IDataSourceBuilder;
|
|
12
13
|
export declare function pauseCurrentPlayer(): void;
|
|
13
14
|
export declare function resumeCurrentPlayer(): void;
|
|
14
15
|
export declare function setGoogleCustomNativeAdsHandler(handler: CustomNativeAdHandler): void;
|
|
15
16
|
export declare function setImaHandler(handler: ImaAdHandler): void;
|
|
17
|
+
export declare function playStory(storyId: string, style?: StoryPlayerStyle): Promise<void>;
|
|
18
|
+
export declare function playStories(dataSource: BlazeDataSourceType, style?: StoryPlayerStyle): Promise<void>;
|
|
16
19
|
declare const _default: {
|
|
17
20
|
Initialize: typeof Initialize;
|
|
18
21
|
WidgetGridView: typeof WidgetGridView;
|
|
@@ -23,12 +26,15 @@ declare const _default: {
|
|
|
23
26
|
setDoNotTrack: typeof setDoNotTrack;
|
|
24
27
|
setGeoLocation: typeof setGeoLocation;
|
|
25
28
|
LabelBuilder: typeof LabelBuilder;
|
|
29
|
+
DataSourceBuilder: typeof DataSourceBuilder;
|
|
26
30
|
Delegations: typeof Delegation;
|
|
27
31
|
setGoogleCustomNativeAdsHandler: typeof setGoogleCustomNativeAdsHandler;
|
|
28
32
|
setImaHandler: typeof setImaHandler;
|
|
29
33
|
pauseCurrentPlayer: typeof pauseCurrentPlayer;
|
|
30
34
|
resumeCurrentPlayer: typeof resumeCurrentPlayer;
|
|
31
35
|
setExternalUserId: typeof setExternalUserId;
|
|
36
|
+
playStory: typeof playStory;
|
|
37
|
+
playStories: typeof playStories;
|
|
32
38
|
};
|
|
33
39
|
export default _default;
|
|
34
40
|
|
|
@@ -269,6 +275,29 @@ export declare abstract class BaseWidget extends HTMLElement {
|
|
|
269
275
|
removeElement(): void;
|
|
270
276
|
}
|
|
271
277
|
|
|
278
|
+
export interface BlazeDataSourceType {
|
|
279
|
+
type: 'labels' | 'ids';
|
|
280
|
+
labels?: string | string[] | BlazeWidgetLabel;
|
|
281
|
+
labelsPriority?: string | string[] | BlazeWidgetLabel[];
|
|
282
|
+
ids?: string[];
|
|
283
|
+
orderType?: OrderType;
|
|
284
|
+
maxItems?: number;
|
|
285
|
+
}
|
|
286
|
+
export declare const BlazeInternalError: {
|
|
287
|
+
LabelExpressionMustNotBeEmpty: string;
|
|
288
|
+
InvalidNumberOfMaxItems: string;
|
|
289
|
+
IdsMustNotBeEmpty: string;
|
|
290
|
+
MissingLabelsProperty: string;
|
|
291
|
+
IdsMustNotHaveSpaces: string;
|
|
292
|
+
};
|
|
293
|
+
export declare class BlazeDataSourceFactory {
|
|
294
|
+
static createLabelsDataSource(params: LabelsDataSourceParams): BlazeDataSourceType;
|
|
295
|
+
static createIdsDataSource(params: IdsDataSourceParams): BlazeDataSourceType;
|
|
296
|
+
}
|
|
297
|
+
export declare class BlazeDataSourceValidations {
|
|
298
|
+
static validateFormat(dataSource: BlazeDataSourceType): void;
|
|
299
|
+
}
|
|
300
|
+
|
|
272
301
|
export declare function debounce<T extends Event>(func: EventHandler<T>, _delay: number): (event: T) => Promise<void>;
|
|
273
302
|
|
|
274
303
|
export declare const Platform: {
|
|
@@ -325,8 +354,10 @@ export * from './long-press.handler';
|
|
|
325
354
|
export * from './singleton.class';
|
|
326
355
|
export * from './throttle';
|
|
327
356
|
export * from './url';
|
|
357
|
+
export * from './data-source.class';
|
|
328
358
|
|
|
329
359
|
export declare class BlazeWidgetLabel {
|
|
360
|
+
every(arg0: (item: any) => item is BlazeWidgetLabel): void;
|
|
330
361
|
value: string;
|
|
331
362
|
constructor(value: string);
|
|
332
363
|
static singleLabel(label: string): BlazeWidgetLabel;
|
|
@@ -365,15 +396,20 @@ export declare function Singleton<T>(): {
|
|
|
365
396
|
export type EventHandler<E extends Event> = (event: E) => void;
|
|
366
397
|
export declare function throttle<T extends Event>(func: EventHandler<T>, _delay: number): (event: T) => Promise<void>;
|
|
367
398
|
|
|
399
|
+
interface UpdateLocationContentHashParams {
|
|
400
|
+
contentType?: ContentType;
|
|
401
|
+
contentId?: string;
|
|
402
|
+
isAd?: boolean;
|
|
403
|
+
}
|
|
368
404
|
export declare class URLManager {
|
|
369
405
|
static isUpdateLocationByScript: boolean;
|
|
370
406
|
static isBackWasCalled: boolean;
|
|
371
|
-
static
|
|
407
|
+
static resetLocationAfterContentClose(): void;
|
|
372
408
|
static resetLocation(): void;
|
|
373
|
-
static updateLocationContentHash(
|
|
374
|
-
static getHashMatch():
|
|
409
|
+
static updateLocationContentHash(params: UpdateLocationContentHashParams): void;
|
|
410
|
+
static getHashMatch(): boolean;
|
|
375
411
|
static getHash(): string;
|
|
376
|
-
static
|
|
412
|
+
static updateContentInHash(contentId: string, contentType: ContentType): void;
|
|
377
413
|
}
|
|
378
414
|
|
|
379
415
|
export declare class BlazeAlert extends BaseWidget {
|
|
@@ -623,6 +659,11 @@ export declare const StoryToAdActionMapper: {
|
|
|
623
659
|
story_page_exit: AdAction;
|
|
624
660
|
cta_click: AdAction;
|
|
625
661
|
};
|
|
662
|
+
export declare const MomentToAdActionMapper: {
|
|
663
|
+
moment_start: AdAction;
|
|
664
|
+
moment_exit: AdAction;
|
|
665
|
+
cta_click: AdAction;
|
|
666
|
+
};
|
|
626
667
|
type ExposedFields = {
|
|
627
668
|
[key in StoryAction | MomentAction | WidgetAction | AdAction]?: string[];
|
|
628
669
|
};
|
|
@@ -635,6 +676,9 @@ export declare const DESKTOP_PADDING_BOTTOM = "40px";
|
|
|
635
676
|
export declare const ASPECT_RATIO_16_9: number;
|
|
636
677
|
export declare const ASPECT_RATIO_9_16: number;
|
|
637
678
|
export declare const ASPECT_RATIO_4_3: number;
|
|
679
|
+
export declare const ASPECT_RATIO_16_9_STRING = "16 / 9";
|
|
680
|
+
export declare const ASPECT_RATIO_9_16_STRING = "9 / 16";
|
|
681
|
+
export declare const ASPECT_RATIO_4_3_STRING = "4 / 3";
|
|
638
682
|
|
|
639
683
|
export * from './analytics.constants';
|
|
640
684
|
export * from './device.constants';
|
|
@@ -665,12 +709,11 @@ export declare class Database implements IDatabase {
|
|
|
665
709
|
|
|
666
710
|
export * from './database';
|
|
667
711
|
|
|
668
|
-
type ContentType = 'Story' | 'Moment';
|
|
669
712
|
interface IAdInfoConfiguration {
|
|
670
713
|
adLocationsIndexes: Array<number>;
|
|
671
714
|
isActive: boolean;
|
|
672
715
|
adsLocationType: 'FixedPages' | 'EveryXStories';
|
|
673
|
-
type:
|
|
716
|
+
type: 'Story' | 'Moment';
|
|
674
717
|
}
|
|
675
718
|
export interface IAdInfo {
|
|
676
719
|
path?: string;
|
|
@@ -760,9 +803,10 @@ export interface ILayer {
|
|
|
760
803
|
content: ILayerContent;
|
|
761
804
|
}
|
|
762
805
|
|
|
806
|
+
type MomentType = 'Content' | 'Ad';
|
|
763
807
|
export interface IMoment extends IContent {
|
|
764
808
|
momentIndexInPlaylist: number;
|
|
765
|
-
type:
|
|
809
|
+
type: MomentType;
|
|
766
810
|
duration: string;
|
|
767
811
|
thumbnails: IThumbnail[];
|
|
768
812
|
likes: number;
|
|
@@ -772,6 +816,7 @@ export interface IMoment extends IContent {
|
|
|
772
816
|
type: string;
|
|
773
817
|
};
|
|
774
818
|
cta: ICTA;
|
|
819
|
+
adPath?: string;
|
|
775
820
|
}
|
|
776
821
|
export type MomentDB = {
|
|
777
822
|
id: string;
|
|
@@ -877,7 +922,7 @@ export * from './http-status.enum';
|
|
|
877
922
|
|
|
878
923
|
export interface WidgetsTagNameMap {
|
|
879
924
|
'blaze-sdk': BlazeWidgetSDK;
|
|
880
|
-
'blaze-widget-ad':
|
|
925
|
+
'blaze-widget-ad': BlazeWidgetAd;
|
|
881
926
|
'blaze-widget-embedded-story': BlazeWidgetEmbeddedStory;
|
|
882
927
|
'blaze-widget-modal': BlazeWidgetModal;
|
|
883
928
|
'blaze-widget-item': BlazeWidgetItem;
|
|
@@ -944,6 +989,11 @@ export declare abstract class WidgetsFactory {
|
|
|
944
989
|
}
|
|
945
990
|
|
|
946
991
|
export * from './elements.factory';
|
|
992
|
+
export * from './player.factory';
|
|
993
|
+
|
|
994
|
+
export declare class PlayerViewFactory {
|
|
995
|
+
static create(dataSource: BlazeDataSourceType, style: StoryPlayerStyle): Promise<void>;
|
|
996
|
+
}
|
|
947
997
|
|
|
948
998
|
export * from './widget-theme.guard';
|
|
949
999
|
|
|
@@ -1008,6 +1058,7 @@ export interface IBlazeSDKOptions {
|
|
|
1008
1058
|
shouldDismissPlayer?: boolean;
|
|
1009
1059
|
shouldCreateUser?: boolean;
|
|
1010
1060
|
externalUserId?: string | null;
|
|
1061
|
+
prefetchingPolicy?: PrefetchingPolicyType;
|
|
1011
1062
|
}
|
|
1012
1063
|
|
|
1013
1064
|
export interface IButtonPlayerNavigationConfig {
|
|
@@ -1024,6 +1075,21 @@ export interface IButtonPlayerConfig {
|
|
|
1024
1075
|
dataTestId?: string;
|
|
1025
1076
|
}
|
|
1026
1077
|
|
|
1078
|
+
export interface IDataSourceBuilder {
|
|
1079
|
+
labels: (params: LabelsDataSourceParams) => BlazeDataSourceType;
|
|
1080
|
+
ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
|
|
1081
|
+
}
|
|
1082
|
+
export interface LabelsDataSourceParams {
|
|
1083
|
+
labels: string | string[] | BlazeWidgetLabel;
|
|
1084
|
+
labelsPriority?: string | string[] | BlazeWidgetLabel[];
|
|
1085
|
+
orderType?: OrderType;
|
|
1086
|
+
maxItems?: number;
|
|
1087
|
+
}
|
|
1088
|
+
export interface IdsDataSourceParams {
|
|
1089
|
+
ids: string[];
|
|
1090
|
+
orderType?: OrderType;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1027
1093
|
export interface IDatabase {
|
|
1028
1094
|
init: (options: IDatabaseInitOptions) => Promise<void>;
|
|
1029
1095
|
get: <T>(tableName: string, key: string) => Promise<IResponse<T>>;
|
|
@@ -1093,6 +1159,7 @@ export * from './ad-handler.interface';
|
|
|
1093
1159
|
export * from './behaviors.interface';
|
|
1094
1160
|
export * from './blaze-sdk.interface';
|
|
1095
1161
|
export * from './button.interface';
|
|
1162
|
+
export * from './data-source.interface';
|
|
1096
1163
|
export * from './database.interface';
|
|
1097
1164
|
export * from './device.interface';
|
|
1098
1165
|
export * from './drawable.interface';
|
|
@@ -1129,31 +1196,38 @@ export interface IWidgetLabelBuilder {
|
|
|
1129
1196
|
|
|
1130
1197
|
export type ContentType = 'story' | 'moment';
|
|
1131
1198
|
export interface IWidgetViewOptionsBase {
|
|
1199
|
+
labelsPriority?: string;
|
|
1132
1200
|
orderType?: OrderType;
|
|
1133
1201
|
maxItemsCount?: number;
|
|
1134
1202
|
maxDisplayItemsCount?: number;
|
|
1135
1203
|
contentType?: ContentType;
|
|
1136
1204
|
theme?: IWidgetTheme | ThemeType;
|
|
1137
1205
|
delegates?: Record<Delegation, EventListenerOrEventListenerObject>;
|
|
1138
|
-
labelsPriority?: string;
|
|
1139
1206
|
perItemStyleOverrides?: PerItemStyleOverrides;
|
|
1140
1207
|
shouldOrderWidgetByReadStatus?: boolean;
|
|
1141
1208
|
}
|
|
1142
1209
|
export interface IWidgetViewOptionsWithLabels extends IWidgetViewOptionsBase {
|
|
1143
|
-
labels:
|
|
1210
|
+
labels: string | string[] | BlazeWidgetLabel;
|
|
1144
1211
|
storyIds?: never;
|
|
1212
|
+
dataSource?: never;
|
|
1145
1213
|
}
|
|
1146
1214
|
export interface IWidgetViewOptionsWithStoryIds extends IWidgetViewOptionsBase {
|
|
1147
1215
|
storyIds: string[];
|
|
1148
1216
|
labels?: never;
|
|
1217
|
+
dataSource?: never;
|
|
1218
|
+
}
|
|
1219
|
+
export interface IWidgetViewOptionsWithDataSource extends IWidgetViewOptionsBase {
|
|
1220
|
+
dataSource: BlazeDataSourceType;
|
|
1221
|
+
storyIds?: never;
|
|
1222
|
+
labels?: never;
|
|
1149
1223
|
}
|
|
1150
|
-
export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptionsWithStoryIds;
|
|
1224
|
+
export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptionsWithStoryIds | IWidgetViewOptionsWithDataSource;
|
|
1151
1225
|
|
|
1152
1226
|
export interface IWidgetView extends HTMLElement {
|
|
1153
1227
|
setTheme: (theme: IWidgetTheme) => void;
|
|
1154
1228
|
getTheme: () => IWidgetTheme;
|
|
1155
|
-
setLabels: (labels:
|
|
1156
|
-
setLabelsPriority: (labelsPriority: string, options?: ISetWidgetOptions) => void;
|
|
1229
|
+
setLabels: (labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions) => void;
|
|
1230
|
+
setLabelsPriority: (labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions) => void;
|
|
1157
1231
|
setContentIds: (storyIds: string[], options?: ISetWidgetOptions) => void;
|
|
1158
1232
|
reload: () => void;
|
|
1159
1233
|
updateWidgetUI: () => void;
|
|
@@ -1162,6 +1236,7 @@ export interface IWidgetView extends HTMLElement {
|
|
|
1162
1236
|
updateOverrideStyles: (perItemStyleOverrides: PerItemStyleOverrides) => void;
|
|
1163
1237
|
setId: (id: string) => void;
|
|
1164
1238
|
setMaxItemsSize: (size: number) => void;
|
|
1239
|
+
updateDataSource: (dataSource: BlazeDataSourceType) => void;
|
|
1165
1240
|
}
|
|
1166
1241
|
export interface ISetWidgetOptions {
|
|
1167
1242
|
shouldReloadData?: boolean;
|
|
@@ -1176,7 +1251,7 @@ declare abstract class AdServiceClass extends AdServiceClass_base implements ISe
|
|
|
1176
1251
|
canRunAds: boolean;
|
|
1177
1252
|
init(): Promise<void>;
|
|
1178
1253
|
pushAdsBetweenStories(defaultAdsInfo: IAdInfo | undefined, widgets: BlazeWidgetStory[], stories: IStory[], index: number, indexOfContentInWidget: number, playerLayout: StoryPlayerStyle, mode?: ScreenMode): void;
|
|
1179
|
-
pushAdsBetweenMoments(defaultAdsInfo: IAdInfo | undefined, widgets: BlazeWidgetMoment[], index: number, indexOfContentInWidget: number):
|
|
1254
|
+
pushAdsBetweenMoments(defaultAdsInfo: IAdInfo | undefined, widgets: BlazeWidgetMoment[], moments: IMoment[], index: number, indexOfContentInWidget: number): BlazeWidgetMoment | undefined;
|
|
1180
1255
|
}
|
|
1181
1256
|
export declare const AdService: AdServiceClass;
|
|
1182
1257
|
|
|
@@ -1224,7 +1299,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1224
1299
|
} | undefined;
|
|
1225
1300
|
error?: Error | undefined;
|
|
1226
1301
|
}>;
|
|
1227
|
-
getStories(labels: string, orderType
|
|
1302
|
+
getStories(labels: string, orderType?: OrderType, maxItemsSize?: number, labelsPriority?: string): Promise<{
|
|
1228
1303
|
result: IStory[];
|
|
1229
1304
|
httpStatus?: number | undefined;
|
|
1230
1305
|
data?: {
|
|
@@ -1294,6 +1369,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1294
1369
|
private _playerStyleCustomization?;
|
|
1295
1370
|
private _shouldCreateUser;
|
|
1296
1371
|
private _externalUserId;
|
|
1372
|
+
private _prefetchingPolicy;
|
|
1297
1373
|
protected constructor();
|
|
1298
1374
|
init(options: IBlazeSDKOptions): Promise<void>;
|
|
1299
1375
|
private _urls;
|
|
@@ -1325,6 +1401,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1325
1401
|
set googleCustomNativeAdHandler(value: CustomNativeAdHandler | undefined);
|
|
1326
1402
|
get imaAdHandler(): ImaAdHandler | undefined;
|
|
1327
1403
|
set imaAdHandler(value: ImaAdHandler | undefined);
|
|
1404
|
+
get prefetchingPolicy(): PrefetchingPolicyType;
|
|
1405
|
+
set prefetchingPolicy(value: PrefetchingPolicyType);
|
|
1328
1406
|
}
|
|
1329
1407
|
export declare const ConfigService: ConfigServiceClass;
|
|
1330
1408
|
|
|
@@ -1431,6 +1509,7 @@ export * from './user.service';
|
|
|
1431
1509
|
export * from './video-cache.service';
|
|
1432
1510
|
export * from './video-player.service';
|
|
1433
1511
|
export * from './widgets.service';
|
|
1512
|
+
export * from './story.service';
|
|
1434
1513
|
|
|
1435
1514
|
declare const InteractionServiceClass_base: {
|
|
1436
1515
|
new (): {};
|
|
@@ -1498,6 +1577,14 @@ declare abstract class StartupServiceClass extends StartupServiceClass_base impl
|
|
|
1498
1577
|
}
|
|
1499
1578
|
export declare const StartupService: StartupServiceClass;
|
|
1500
1579
|
|
|
1580
|
+
export declare class StoryService {
|
|
1581
|
+
static fetchStories(dataSource: BlazeDataSourceType): Promise<{
|
|
1582
|
+
data: any;
|
|
1583
|
+
error: any;
|
|
1584
|
+
}>;
|
|
1585
|
+
static enrichStories(stories: IStory[]): Promise<IStory[]>;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1501
1588
|
declare const UserServiceClass_base: {
|
|
1502
1589
|
new (): {};
|
|
1503
1590
|
_instance: UserServiceClass;
|
|
@@ -1566,6 +1653,7 @@ declare abstract class VideoPlayerServiceClass extends VideoPlayerServiceClass_b
|
|
|
1566
1653
|
private _isSeekBarDragging;
|
|
1567
1654
|
private _playReference;
|
|
1568
1655
|
muteStateBeforeAd: 'mute' | 'unmute' | 'no-ad';
|
|
1656
|
+
playerLoadingSpinner: HTMLElement | undefined;
|
|
1569
1657
|
constructor();
|
|
1570
1658
|
init(): Promise<void>;
|
|
1571
1659
|
get isMuted(): boolean;
|
|
@@ -2144,6 +2232,7 @@ export * from './thumbnail.type';
|
|
|
2144
2232
|
export * from './user.type';
|
|
2145
2233
|
export * from './widget.type';
|
|
2146
2234
|
export * from './chip-status.type';
|
|
2235
|
+
export * from './prefetch.type';
|
|
2147
2236
|
|
|
2148
2237
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId';
|
|
2149
2238
|
export type PerItemStyleOverrides = Record<EntitiesType, Array<{
|
|
@@ -2173,6 +2262,8 @@ export interface PositionOffset {
|
|
|
2173
2262
|
export type PartialPositionOffset = Partial<PositionOffset>;
|
|
2174
2263
|
export type IconsPositionType = 'HORIZONTAL' | 'VERTICAL';
|
|
2175
2264
|
|
|
2265
|
+
export type PrefetchingPolicyType = 'low' | 'default';
|
|
2266
|
+
|
|
2176
2267
|
export type SeverityType = 'error' | 'warning' | 'info' | 'success';
|
|
2177
2268
|
|
|
2178
2269
|
export type SizeType = 'small' | 'medium' | 'large';
|
|
@@ -2305,7 +2396,7 @@ export * from './moment/widget-moment-seek-bar';
|
|
|
2305
2396
|
export * from './widget-cta-modal';
|
|
2306
2397
|
|
|
2307
2398
|
export type ExitTriggerType = 'Swipe' | 'Swipe Down' | 'Swipe Up' | 'Skip' | 'Close Button' | 'CTA Click' | 'Escape Button' | '';
|
|
2308
|
-
export type StartTriggerType = 'Embedded Player in Viewport' | 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | 'SingleStory' | 'Share' | '';
|
|
2399
|
+
export type StartTriggerType = 'Embedded Player in Viewport' | 'UI Button' | 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | 'SingleStory' | 'Share' | '';
|
|
2309
2400
|
export type NavigationType = 'Automatic' | 'Manual' | '';
|
|
2310
2401
|
export type NavigationDirectionType = 'Forwards' | 'Backwards' | '';
|
|
2311
2402
|
export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
@@ -2323,13 +2414,13 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
|
2323
2414
|
boundOnFocusEvent: () => void;
|
|
2324
2415
|
boundOnBlurEvent: () => void;
|
|
2325
2416
|
boundOnVisibilityChangeEvent: () => void;
|
|
2326
|
-
|
|
2417
|
+
widgetParentItem: BlazeWidgetItem;
|
|
2327
2418
|
sessionId: string;
|
|
2328
2419
|
refContentModal?: BlazeWidgetStoryModal | BlazeWidgetMomentModal;
|
|
2329
2420
|
constructor();
|
|
2330
2421
|
connectedCallback(): void;
|
|
2331
2422
|
disconnectedCallback(): void;
|
|
2332
|
-
|
|
2423
|
+
setWidgetItemParent(item: BlazeWidgetItem): void;
|
|
2333
2424
|
getRefferingObject(): ReferringEventInfo;
|
|
2334
2425
|
render(): void;
|
|
2335
2426
|
}
|
|
@@ -2377,10 +2468,11 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2377
2468
|
connectedCallback(): void;
|
|
2378
2469
|
disconnectedCallback(): void;
|
|
2379
2470
|
attributeChangedCallback(name: string, oldValue: string, _newValue: string): void;
|
|
2471
|
+
updateDataSource(dataSource: BlazeDataSourceType): void;
|
|
2380
2472
|
getTheme(): IWidgetTheme;
|
|
2381
2473
|
setTheme(theme: IWidgetTheme | string): void;
|
|
2382
|
-
setLabels(labels:
|
|
2383
|
-
setLabelsPriority(labelsPriority: string, options?: ISetWidgetOptions): void;
|
|
2474
|
+
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
2475
|
+
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
2384
2476
|
setContentIds(storyIds: string[], options?: ISetWidgetOptions): void;
|
|
2385
2477
|
reload(): void;
|
|
2386
2478
|
private reloadLogic;
|
|
@@ -2423,6 +2515,7 @@ export declare class BlazeWidgetInteraction extends BaseWidget {
|
|
|
2423
2515
|
private responseHandler;
|
|
2424
2516
|
private focusMainWindowHandler;
|
|
2425
2517
|
private orientationChangeHandler;
|
|
2518
|
+
connectedCallback(): void;
|
|
2426
2519
|
loadInteraction(interactionData: Interaction): void;
|
|
2427
2520
|
showInteraction(interactionData?: Interaction): void;
|
|
2428
2521
|
hideInteraction(): void;
|
|
@@ -2532,13 +2625,12 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2532
2625
|
onPlayerOpen(): void;
|
|
2533
2626
|
getParentHeightWithoutPadding(): number | null;
|
|
2534
2627
|
setId(id: string): void;
|
|
2535
|
-
handlePopState(): void;
|
|
2536
2628
|
private setReloadData;
|
|
2537
2629
|
addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
2538
2630
|
set storyIds(value: string);
|
|
2539
2631
|
setContentIds(storyIds: string[], options?: ISetWidgetOptions): void;
|
|
2540
|
-
setLabelsPriority(labelsPriority: string, options?: ISetWidgetOptions): void;
|
|
2541
|
-
setLabels(labels:
|
|
2632
|
+
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
2633
|
+
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
2542
2634
|
getTheme(): IWidgetTheme;
|
|
2543
2635
|
setTheme(theme: IWidgetTheme | string): void;
|
|
2544
2636
|
private get theme();
|
|
@@ -2547,9 +2639,11 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2547
2639
|
private updateActiveLayoutThemesPerItemWithEntity;
|
|
2548
2640
|
updateWidgetUI(): void;
|
|
2549
2641
|
setMaxPaddingOnWidgetItems(): void;
|
|
2642
|
+
updateDataSource(dataSource: BlazeDataSourceType): void;
|
|
2550
2643
|
setDelegations(delegates: Record<Delegation, EventListenerOrEventListenerObject>): void;
|
|
2644
|
+
private setOrderType;
|
|
2551
2645
|
setMaxItemsDisplaySize(maxSize: number): void;
|
|
2552
|
-
setMaxItemsSize(maxItemsSize
|
|
2646
|
+
setMaxItemsSize(maxItemsSize?: number): void;
|
|
2553
2647
|
private updatePlayerStyle;
|
|
2554
2648
|
createModal(type: string): void;
|
|
2555
2649
|
appendModalToBlazeSDK(modal: BlazeWidgetMomentModal | BlazeWidgetStoryModal): void;
|
|
@@ -2610,10 +2704,12 @@ export declare class BlazeWidgetModal extends BaseWidget {
|
|
|
2610
2704
|
hammer: HammerManager | null;
|
|
2611
2705
|
isMultiTouch: boolean;
|
|
2612
2706
|
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
2707
|
+
boundOnPopStateEvent: (this: Window, ev: PopStateEvent) => void;
|
|
2613
2708
|
constructor(type: 'story' | 'moment');
|
|
2614
2709
|
connectedCallback(): void;
|
|
2615
2710
|
disconnectedCallback(): void;
|
|
2616
2711
|
onResize(): void;
|
|
2712
|
+
handlePopState(ev: PopStateEvent): void;
|
|
2617
2713
|
seek(id: string): void;
|
|
2618
2714
|
setupHammer(): void;
|
|
2619
2715
|
handlePanStart(ev: HammerInput): void;
|
|
@@ -2679,7 +2775,6 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
2679
2775
|
unloadFromPlayerList(): void;
|
|
2680
2776
|
handleAnimationEnd(direction: ContentDirection): void;
|
|
2681
2777
|
abstract loadAndPlayContent(): void;
|
|
2682
|
-
navigateContent(direction: ContentDirection): void;
|
|
2683
2778
|
abstract onKeyDown(event: KeyboardEvent): void;
|
|
2684
2779
|
handleSmallGestures(animation: AnimeInstance, content: BlazeWidgetStory | BlazeWidgetMoment): void;
|
|
2685
2780
|
abstract resetStyles(): void;
|
|
@@ -2709,13 +2804,15 @@ export declare class BlazeWidgetScrollable extends BaseWidget {
|
|
|
2709
2804
|
export type playRefType = 'Share' | 'SingleStory';
|
|
2710
2805
|
export declare class BlazeWidgetSDK extends BaseWidget {
|
|
2711
2806
|
modal: BlazeWidgetStoryModal | BlazeWidgetMomentModal;
|
|
2712
|
-
|
|
2807
|
+
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
2808
|
+
boundOnResizeEventDelay: () => void;
|
|
2713
2809
|
static get observedAttributes(): string[];
|
|
2714
2810
|
constructor();
|
|
2715
2811
|
connectedCallback(): Promise<void>;
|
|
2716
2812
|
disconnectedCallback(): void;
|
|
2717
2813
|
onResizeEventDelay(): void;
|
|
2718
2814
|
onResize(): void;
|
|
2815
|
+
handleLoadingContent(): void;
|
|
2719
2816
|
checkUrlForContent(): {
|
|
2720
2817
|
isStoryMatch: boolean;
|
|
2721
2818
|
storyIds: string | null;
|
|
@@ -2723,10 +2820,10 @@ export declare class BlazeWidgetSDK extends BaseWidget {
|
|
|
2723
2820
|
momentIds: string | null;
|
|
2724
2821
|
};
|
|
2725
2822
|
setPlayerStyleCustomization(playerStyleCustomization: Partial<StoryPlayerStyle>): void;
|
|
2726
|
-
handleContentLoad(contentType:
|
|
2823
|
+
handleContentLoad(contentType: ContentType, playReference: playRefType, contentIds: string): Promise<void>;
|
|
2727
2824
|
handleStaticContentLoad(playReference: playRefType): Promise<void>;
|
|
2728
2825
|
enrichContent(content: IStory[]): Promise<IStory[]>;
|
|
2729
|
-
setupModalAndLoadContent(contentType:
|
|
2826
|
+
setupModalAndLoadContent(contentType: ContentType, playReference: playRefType, content: IStory | IMoment): Promise<void>;
|
|
2730
2827
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): Promise<void>;
|
|
2731
2828
|
private getConfigAttributes;
|
|
2732
2829
|
private initialize;
|
|
@@ -2866,8 +2963,8 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
|
|
|
2866
2963
|
handleInteractionEvent(event: CustomEvent<InteractionAnalyticCustomEvent>): void;
|
|
2867
2964
|
}
|
|
2868
2965
|
|
|
2869
|
-
export declare class
|
|
2870
|
-
private
|
|
2966
|
+
export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
|
|
2967
|
+
private contentParent;
|
|
2871
2968
|
data: IPage | undefined;
|
|
2872
2969
|
private isCurrentlyDisplay;
|
|
2873
2970
|
private adContainer;
|
|
@@ -2877,7 +2974,7 @@ export declare class BlazeWidgetStoryAd extends BlazeWidgetVideoBase {
|
|
|
2877
2974
|
private onFail?;
|
|
2878
2975
|
private isAdFailed;
|
|
2879
2976
|
private isPlaying;
|
|
2880
|
-
constructor(
|
|
2977
|
+
constructor(contentParent: BlazeWidgetStory | BlazeWidgetMoment);
|
|
2881
2978
|
connectedCallback(): void;
|
|
2882
2979
|
disconnectedCallback(): void;
|
|
2883
2980
|
render(): void;
|
|
@@ -2924,6 +3021,7 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
|
2924
3021
|
onNavigationChange(ev: Event): void;
|
|
2925
3022
|
navigateContent(direction: ContentDirection): void;
|
|
2926
3023
|
createNavigationButton(direction: ContentDirection): BlazeButton;
|
|
3024
|
+
handleClickNavigation(direction: ContentDirection): void;
|
|
2927
3025
|
setModalContent(data: IMoment[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
|
|
2928
3026
|
onKeyDown(ev: KeyboardEvent): void;
|
|
2929
3027
|
close(): void;
|
|
@@ -2941,6 +3039,7 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
2941
3039
|
isWheelEventHandling: boolean;
|
|
2942
3040
|
boundHandleMuteClicked: () => void;
|
|
2943
3041
|
constructor();
|
|
3042
|
+
get currentMoment(): BlazeWidgetMoment;
|
|
2944
3043
|
connectedCallback(): void;
|
|
2945
3044
|
disconnectedCallback(): void;
|
|
2946
3045
|
setupEventListeners(): void;
|
|
@@ -2974,7 +3073,7 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
2974
3073
|
}
|
|
2975
3074
|
|
|
2976
3075
|
export declare class BlazeWidgetMomentSeekBar extends HTMLElement {
|
|
2977
|
-
video: BlazeWidgetVideo;
|
|
3076
|
+
video: BlazeWidgetVideo | BlazeWidgetAd;
|
|
2978
3077
|
private progress;
|
|
2979
3078
|
private playbackParts;
|
|
2980
3079
|
private isEmphasized;
|
|
@@ -2995,7 +3094,7 @@ export declare class BlazeWidgetMomentSeekBar extends HTMLElement {
|
|
|
2995
3094
|
private progressBarFill;
|
|
2996
3095
|
private progressBarKnob;
|
|
2997
3096
|
private isMouseIn;
|
|
2998
|
-
constructor(video: BlazeWidgetVideo);
|
|
3097
|
+
constructor(video: BlazeWidgetVideo | BlazeWidgetAd);
|
|
2999
3098
|
static get observedAttributes(): string[];
|
|
3000
3099
|
attributeChangedCallback(name: string, oldValue: string, _newValue: string): void;
|
|
3001
3100
|
connectedCallback(): void;
|
|
@@ -3003,7 +3102,7 @@ export declare class BlazeWidgetMomentSeekBar extends HTMLElement {
|
|
|
3003
3102
|
onContentResumed(directReset?: boolean): void;
|
|
3004
3103
|
disconnectedCallback(): void;
|
|
3005
3104
|
private initialize;
|
|
3006
|
-
setVideo(video: BlazeWidgetVideo): void;
|
|
3105
|
+
setVideo(video: BlazeWidgetVideo | BlazeWidgetAd): void;
|
|
3007
3106
|
private setupProgressUpdate;
|
|
3008
3107
|
private stopProgressUpdate;
|
|
3009
3108
|
private setupEventListeners;
|
|
@@ -3030,7 +3129,7 @@ interface ButtonElementOptions {
|
|
|
3030
3129
|
backgroundColor?: string;
|
|
3031
3130
|
}
|
|
3032
3131
|
export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
3033
|
-
video
|
|
3132
|
+
video?: BlazeWidgetVideo | BlazeWidgetAd;
|
|
3034
3133
|
modal: BlazeWidgetMomentModal;
|
|
3035
3134
|
seekBar: BlazeWidgetMomentSeekBar;
|
|
3036
3135
|
shareModal: BlazeWidgetShareModal | undefined;
|
|
@@ -3063,6 +3162,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
3063
3162
|
shouldShowImaAdOnStart: boolean;
|
|
3064
3163
|
imaUrl: string;
|
|
3065
3164
|
elementsToHideOnImaAds: (HTMLElement | undefined)[];
|
|
3165
|
+
elementsToHideOnCustomAds: (HTMLElement | undefined)[];
|
|
3066
3166
|
constructor();
|
|
3067
3167
|
connectedCallback(): void;
|
|
3068
3168
|
disconnectedCallback(): void;
|
|
@@ -3144,7 +3244,8 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
3144
3244
|
setModalContent(stories: IStory[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
|
|
3145
3245
|
onKeyDown(ev: KeyboardEvent): void;
|
|
3146
3246
|
close(): void;
|
|
3147
|
-
|
|
3247
|
+
dispatchExitStoryEvents(): void;
|
|
3248
|
+
dispatchPlayerEvents(): void;
|
|
3148
3249
|
open(options?: ISmoothOpenCloseModal): void;
|
|
3149
3250
|
play(): void;
|
|
3150
3251
|
render(): void;
|
|
@@ -3164,6 +3265,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
|
3164
3265
|
applyStyles(): void;
|
|
3165
3266
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
3166
3267
|
setContent(content: BlazeWidgetStory[]): void;
|
|
3268
|
+
navigateContent(direction: ContentDirection): void;
|
|
3167
3269
|
onFocus(): void;
|
|
3168
3270
|
handleMoveSwipe(ev: HammerInput): void;
|
|
3169
3271
|
handleEndSwipe(ev: HammerInput): void;
|
|
@@ -3258,7 +3360,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3258
3360
|
get currentPage(): BlazeWidgetVideoBase;
|
|
3259
3361
|
get nextPage(): BlazeWidgetVideoBase;
|
|
3260
3362
|
get prevPage(): BlazeWidgetVideoBase;
|
|
3261
|
-
|
|
3363
|
+
prefetchAdjacentPages(): void;
|
|
3262
3364
|
loadStoryPostersByDistance(distance: number): void;
|
|
3263
3365
|
revertNextPageButtonToPreviousAction(): void;
|
|
3264
3366
|
displayRestartStoryButton(): void;
|
|
@@ -3284,8 +3386,6 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3284
3386
|
resume(): void;
|
|
3285
3387
|
resetPosition(): void;
|
|
3286
3388
|
updateWidgetStatusReadUnread(): void;
|
|
3287
|
-
prevStory(): void;
|
|
3288
|
-
nextStory(): void;
|
|
3289
3389
|
markAsRead(): Promise<any>;
|
|
3290
3390
|
goNextPage(navigationType?: 'Automatic' | 'Manual'): void;
|
|
3291
3391
|
goPrevPage(): void;
|