@wscsports/blaze-web-sdk 0.2.4 → 0.2.5
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 +127 -38
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -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
|
};
|
|
@@ -665,12 +706,11 @@ export declare class Database implements IDatabase {
|
|
|
665
706
|
|
|
666
707
|
export * from './database';
|
|
667
708
|
|
|
668
|
-
type ContentType = 'Story' | 'Moment';
|
|
669
709
|
interface IAdInfoConfiguration {
|
|
670
710
|
adLocationsIndexes: Array<number>;
|
|
671
711
|
isActive: boolean;
|
|
672
712
|
adsLocationType: 'FixedPages' | 'EveryXStories';
|
|
673
|
-
type:
|
|
713
|
+
type: 'Story' | 'Moment';
|
|
674
714
|
}
|
|
675
715
|
export interface IAdInfo {
|
|
676
716
|
path?: string;
|
|
@@ -760,9 +800,10 @@ export interface ILayer {
|
|
|
760
800
|
content: ILayerContent;
|
|
761
801
|
}
|
|
762
802
|
|
|
803
|
+
type MomentType = 'Content' | 'Ad';
|
|
763
804
|
export interface IMoment extends IContent {
|
|
764
805
|
momentIndexInPlaylist: number;
|
|
765
|
-
type:
|
|
806
|
+
type: MomentType;
|
|
766
807
|
duration: string;
|
|
767
808
|
thumbnails: IThumbnail[];
|
|
768
809
|
likes: number;
|
|
@@ -772,6 +813,7 @@ export interface IMoment extends IContent {
|
|
|
772
813
|
type: string;
|
|
773
814
|
};
|
|
774
815
|
cta: ICTA;
|
|
816
|
+
adPath?: string;
|
|
775
817
|
}
|
|
776
818
|
export type MomentDB = {
|
|
777
819
|
id: string;
|
|
@@ -877,7 +919,7 @@ export * from './http-status.enum';
|
|
|
877
919
|
|
|
878
920
|
export interface WidgetsTagNameMap {
|
|
879
921
|
'blaze-sdk': BlazeWidgetSDK;
|
|
880
|
-
'blaze-widget-ad':
|
|
922
|
+
'blaze-widget-ad': BlazeWidgetAd;
|
|
881
923
|
'blaze-widget-embedded-story': BlazeWidgetEmbeddedStory;
|
|
882
924
|
'blaze-widget-modal': BlazeWidgetModal;
|
|
883
925
|
'blaze-widget-item': BlazeWidgetItem;
|
|
@@ -944,6 +986,11 @@ export declare abstract class WidgetsFactory {
|
|
|
944
986
|
}
|
|
945
987
|
|
|
946
988
|
export * from './elements.factory';
|
|
989
|
+
export * from './player.factory';
|
|
990
|
+
|
|
991
|
+
export declare class PlayerViewFactory {
|
|
992
|
+
static create(dataSource: BlazeDataSourceType, style: StoryPlayerStyle): Promise<void>;
|
|
993
|
+
}
|
|
947
994
|
|
|
948
995
|
export * from './widget-theme.guard';
|
|
949
996
|
|
|
@@ -1024,6 +1071,21 @@ export interface IButtonPlayerConfig {
|
|
|
1024
1071
|
dataTestId?: string;
|
|
1025
1072
|
}
|
|
1026
1073
|
|
|
1074
|
+
export interface IDataSourceBuilder {
|
|
1075
|
+
labels: (params: LabelsDataSourceParams) => BlazeDataSourceType;
|
|
1076
|
+
ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
|
|
1077
|
+
}
|
|
1078
|
+
export interface LabelsDataSourceParams {
|
|
1079
|
+
labels: string | string[] | BlazeWidgetLabel;
|
|
1080
|
+
labelsPriority?: string | string[] | BlazeWidgetLabel[];
|
|
1081
|
+
orderType?: OrderType;
|
|
1082
|
+
maxItems?: number;
|
|
1083
|
+
}
|
|
1084
|
+
export interface IdsDataSourceParams {
|
|
1085
|
+
ids: string[];
|
|
1086
|
+
orderType?: OrderType;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1027
1089
|
export interface IDatabase {
|
|
1028
1090
|
init: (options: IDatabaseInitOptions) => Promise<void>;
|
|
1029
1091
|
get: <T>(tableName: string, key: string) => Promise<IResponse<T>>;
|
|
@@ -1093,6 +1155,7 @@ export * from './ad-handler.interface';
|
|
|
1093
1155
|
export * from './behaviors.interface';
|
|
1094
1156
|
export * from './blaze-sdk.interface';
|
|
1095
1157
|
export * from './button.interface';
|
|
1158
|
+
export * from './data-source.interface';
|
|
1096
1159
|
export * from './database.interface';
|
|
1097
1160
|
export * from './device.interface';
|
|
1098
1161
|
export * from './drawable.interface';
|
|
@@ -1129,31 +1192,38 @@ export interface IWidgetLabelBuilder {
|
|
|
1129
1192
|
|
|
1130
1193
|
export type ContentType = 'story' | 'moment';
|
|
1131
1194
|
export interface IWidgetViewOptionsBase {
|
|
1195
|
+
labelsPriority?: string;
|
|
1132
1196
|
orderType?: OrderType;
|
|
1133
1197
|
maxItemsCount?: number;
|
|
1134
1198
|
maxDisplayItemsCount?: number;
|
|
1135
1199
|
contentType?: ContentType;
|
|
1136
1200
|
theme?: IWidgetTheme | ThemeType;
|
|
1137
1201
|
delegates?: Record<Delegation, EventListenerOrEventListenerObject>;
|
|
1138
|
-
labelsPriority?: string;
|
|
1139
1202
|
perItemStyleOverrides?: PerItemStyleOverrides;
|
|
1140
1203
|
shouldOrderWidgetByReadStatus?: boolean;
|
|
1141
1204
|
}
|
|
1142
1205
|
export interface IWidgetViewOptionsWithLabels extends IWidgetViewOptionsBase {
|
|
1143
|
-
labels:
|
|
1206
|
+
labels: string | string[] | BlazeWidgetLabel;
|
|
1144
1207
|
storyIds?: never;
|
|
1208
|
+
dataSource?: never;
|
|
1145
1209
|
}
|
|
1146
1210
|
export interface IWidgetViewOptionsWithStoryIds extends IWidgetViewOptionsBase {
|
|
1147
1211
|
storyIds: string[];
|
|
1148
1212
|
labels?: never;
|
|
1213
|
+
dataSource?: never;
|
|
1214
|
+
}
|
|
1215
|
+
export interface IWidgetViewOptionsWithDataSource extends IWidgetViewOptionsBase {
|
|
1216
|
+
dataSource: BlazeDataSourceType;
|
|
1217
|
+
storyIds?: never;
|
|
1218
|
+
labels?: never;
|
|
1149
1219
|
}
|
|
1150
|
-
export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptionsWithStoryIds;
|
|
1220
|
+
export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptionsWithStoryIds | IWidgetViewOptionsWithDataSource;
|
|
1151
1221
|
|
|
1152
1222
|
export interface IWidgetView extends HTMLElement {
|
|
1153
1223
|
setTheme: (theme: IWidgetTheme) => void;
|
|
1154
1224
|
getTheme: () => IWidgetTheme;
|
|
1155
|
-
setLabels: (labels:
|
|
1156
|
-
setLabelsPriority: (labelsPriority: string, options?: ISetWidgetOptions) => void;
|
|
1225
|
+
setLabels: (labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions) => void;
|
|
1226
|
+
setLabelsPriority: (labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions) => void;
|
|
1157
1227
|
setContentIds: (storyIds: string[], options?: ISetWidgetOptions) => void;
|
|
1158
1228
|
reload: () => void;
|
|
1159
1229
|
updateWidgetUI: () => void;
|
|
@@ -1162,6 +1232,7 @@ export interface IWidgetView extends HTMLElement {
|
|
|
1162
1232
|
updateOverrideStyles: (perItemStyleOverrides: PerItemStyleOverrides) => void;
|
|
1163
1233
|
setId: (id: string) => void;
|
|
1164
1234
|
setMaxItemsSize: (size: number) => void;
|
|
1235
|
+
updateDataSource: (dataSource: BlazeDataSourceType) => void;
|
|
1165
1236
|
}
|
|
1166
1237
|
export interface ISetWidgetOptions {
|
|
1167
1238
|
shouldReloadData?: boolean;
|
|
@@ -1176,7 +1247,7 @@ declare abstract class AdServiceClass extends AdServiceClass_base implements ISe
|
|
|
1176
1247
|
canRunAds: boolean;
|
|
1177
1248
|
init(): Promise<void>;
|
|
1178
1249
|
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):
|
|
1250
|
+
pushAdsBetweenMoments(defaultAdsInfo: IAdInfo | undefined, widgets: BlazeWidgetMoment[], moments: IMoment[], index: number, indexOfContentInWidget: number): BlazeWidgetMoment | undefined;
|
|
1180
1251
|
}
|
|
1181
1252
|
export declare const AdService: AdServiceClass;
|
|
1182
1253
|
|
|
@@ -1224,7 +1295,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1224
1295
|
} | undefined;
|
|
1225
1296
|
error?: Error | undefined;
|
|
1226
1297
|
}>;
|
|
1227
|
-
getStories(labels: string, orderType
|
|
1298
|
+
getStories(labels: string, orderType?: OrderType, maxItemsSize?: number, labelsPriority?: string): Promise<{
|
|
1228
1299
|
result: IStory[];
|
|
1229
1300
|
httpStatus?: number | undefined;
|
|
1230
1301
|
data?: {
|
|
@@ -1431,6 +1502,7 @@ export * from './user.service';
|
|
|
1431
1502
|
export * from './video-cache.service';
|
|
1432
1503
|
export * from './video-player.service';
|
|
1433
1504
|
export * from './widgets.service';
|
|
1505
|
+
export * from './story.service';
|
|
1434
1506
|
|
|
1435
1507
|
declare const InteractionServiceClass_base: {
|
|
1436
1508
|
new (): {};
|
|
@@ -1498,6 +1570,14 @@ declare abstract class StartupServiceClass extends StartupServiceClass_base impl
|
|
|
1498
1570
|
}
|
|
1499
1571
|
export declare const StartupService: StartupServiceClass;
|
|
1500
1572
|
|
|
1573
|
+
export declare class StoryService {
|
|
1574
|
+
static fetchStories(dataSource: BlazeDataSourceType): Promise<{
|
|
1575
|
+
data: any;
|
|
1576
|
+
error: any;
|
|
1577
|
+
}>;
|
|
1578
|
+
static enrichStories(stories: IStory[]): Promise<IStory[]>;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1501
1581
|
declare const UserServiceClass_base: {
|
|
1502
1582
|
new (): {};
|
|
1503
1583
|
_instance: UserServiceClass;
|
|
@@ -1566,6 +1646,7 @@ declare abstract class VideoPlayerServiceClass extends VideoPlayerServiceClass_b
|
|
|
1566
1646
|
private _isSeekBarDragging;
|
|
1567
1647
|
private _playReference;
|
|
1568
1648
|
muteStateBeforeAd: 'mute' | 'unmute' | 'no-ad';
|
|
1649
|
+
playerLoadingSpinner: HTMLElement | undefined;
|
|
1569
1650
|
constructor();
|
|
1570
1651
|
init(): Promise<void>;
|
|
1571
1652
|
get isMuted(): boolean;
|
|
@@ -2305,7 +2386,7 @@ export * from './moment/widget-moment-seek-bar';
|
|
|
2305
2386
|
export * from './widget-cta-modal';
|
|
2306
2387
|
|
|
2307
2388
|
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' | '';
|
|
2389
|
+
export type StartTriggerType = 'Embedded Player in Viewport' | 'UI Button' | 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | 'SingleStory' | 'Share' | '';
|
|
2309
2390
|
export type NavigationType = 'Automatic' | 'Manual' | '';
|
|
2310
2391
|
export type NavigationDirectionType = 'Forwards' | 'Backwards' | '';
|
|
2311
2392
|
export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
@@ -2323,13 +2404,13 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
|
2323
2404
|
boundOnFocusEvent: () => void;
|
|
2324
2405
|
boundOnBlurEvent: () => void;
|
|
2325
2406
|
boundOnVisibilityChangeEvent: () => void;
|
|
2326
|
-
|
|
2407
|
+
widgetParentItem: BlazeWidgetItem;
|
|
2327
2408
|
sessionId: string;
|
|
2328
2409
|
refContentModal?: BlazeWidgetStoryModal | BlazeWidgetMomentModal;
|
|
2329
2410
|
constructor();
|
|
2330
2411
|
connectedCallback(): void;
|
|
2331
2412
|
disconnectedCallback(): void;
|
|
2332
|
-
|
|
2413
|
+
setWidgetItemParent(item: BlazeWidgetItem): void;
|
|
2333
2414
|
getRefferingObject(): ReferringEventInfo;
|
|
2334
2415
|
render(): void;
|
|
2335
2416
|
}
|
|
@@ -2377,10 +2458,11 @@ export declare class BlazeWidgetEmbeddedStory extends BaseWidget implements IWid
|
|
|
2377
2458
|
connectedCallback(): void;
|
|
2378
2459
|
disconnectedCallback(): void;
|
|
2379
2460
|
attributeChangedCallback(name: string, oldValue: string, _newValue: string): void;
|
|
2461
|
+
updateDataSource(dataSource: BlazeDataSourceType): void;
|
|
2380
2462
|
getTheme(): IWidgetTheme;
|
|
2381
2463
|
setTheme(theme: IWidgetTheme | string): void;
|
|
2382
|
-
setLabels(labels:
|
|
2383
|
-
setLabelsPriority(labelsPriority: string, options?: ISetWidgetOptions): void;
|
|
2464
|
+
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
2465
|
+
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
2384
2466
|
setContentIds(storyIds: string[], options?: ISetWidgetOptions): void;
|
|
2385
2467
|
reload(): void;
|
|
2386
2468
|
private reloadLogic;
|
|
@@ -2532,13 +2614,12 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2532
2614
|
onPlayerOpen(): void;
|
|
2533
2615
|
getParentHeightWithoutPadding(): number | null;
|
|
2534
2616
|
setId(id: string): void;
|
|
2535
|
-
handlePopState(): void;
|
|
2536
2617
|
private setReloadData;
|
|
2537
2618
|
addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
2538
2619
|
set storyIds(value: string);
|
|
2539
2620
|
setContentIds(storyIds: string[], options?: ISetWidgetOptions): void;
|
|
2540
|
-
setLabelsPriority(labelsPriority: string, options?: ISetWidgetOptions): void;
|
|
2541
|
-
setLabels(labels:
|
|
2621
|
+
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
2622
|
+
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
2542
2623
|
getTheme(): IWidgetTheme;
|
|
2543
2624
|
setTheme(theme: IWidgetTheme | string): void;
|
|
2544
2625
|
private get theme();
|
|
@@ -2547,9 +2628,11 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2547
2628
|
private updateActiveLayoutThemesPerItemWithEntity;
|
|
2548
2629
|
updateWidgetUI(): void;
|
|
2549
2630
|
setMaxPaddingOnWidgetItems(): void;
|
|
2631
|
+
updateDataSource(dataSource: BlazeDataSourceType): void;
|
|
2550
2632
|
setDelegations(delegates: Record<Delegation, EventListenerOrEventListenerObject>): void;
|
|
2633
|
+
private setOrderType;
|
|
2551
2634
|
setMaxItemsDisplaySize(maxSize: number): void;
|
|
2552
|
-
setMaxItemsSize(maxItemsSize
|
|
2635
|
+
setMaxItemsSize(maxItemsSize?: number): void;
|
|
2553
2636
|
private updatePlayerStyle;
|
|
2554
2637
|
createModal(type: string): void;
|
|
2555
2638
|
appendModalToBlazeSDK(modal: BlazeWidgetMomentModal | BlazeWidgetStoryModal): void;
|
|
@@ -2610,10 +2693,12 @@ export declare class BlazeWidgetModal extends BaseWidget {
|
|
|
2610
2693
|
hammer: HammerManager | null;
|
|
2611
2694
|
isMultiTouch: boolean;
|
|
2612
2695
|
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
2696
|
+
boundOnPopStateEvent: (this: Window, ev: PopStateEvent) => void;
|
|
2613
2697
|
constructor(type: 'story' | 'moment');
|
|
2614
2698
|
connectedCallback(): void;
|
|
2615
2699
|
disconnectedCallback(): void;
|
|
2616
2700
|
onResize(): void;
|
|
2701
|
+
handlePopState(ev: PopStateEvent): void;
|
|
2617
2702
|
seek(id: string): void;
|
|
2618
2703
|
setupHammer(): void;
|
|
2619
2704
|
handlePanStart(ev: HammerInput): void;
|
|
@@ -2679,7 +2764,6 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
2679
2764
|
unloadFromPlayerList(): void;
|
|
2680
2765
|
handleAnimationEnd(direction: ContentDirection): void;
|
|
2681
2766
|
abstract loadAndPlayContent(): void;
|
|
2682
|
-
navigateContent(direction: ContentDirection): void;
|
|
2683
2767
|
abstract onKeyDown(event: KeyboardEvent): void;
|
|
2684
2768
|
handleSmallGestures(animation: AnimeInstance, content: BlazeWidgetStory | BlazeWidgetMoment): void;
|
|
2685
2769
|
abstract resetStyles(): void;
|
|
@@ -2709,13 +2793,15 @@ export declare class BlazeWidgetScrollable extends BaseWidget {
|
|
|
2709
2793
|
export type playRefType = 'Share' | 'SingleStory';
|
|
2710
2794
|
export declare class BlazeWidgetSDK extends BaseWidget {
|
|
2711
2795
|
modal: BlazeWidgetStoryModal | BlazeWidgetMomentModal;
|
|
2712
|
-
|
|
2796
|
+
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
2797
|
+
boundOnResizeEventDelay: () => void;
|
|
2713
2798
|
static get observedAttributes(): string[];
|
|
2714
2799
|
constructor();
|
|
2715
2800
|
connectedCallback(): Promise<void>;
|
|
2716
2801
|
disconnectedCallback(): void;
|
|
2717
2802
|
onResizeEventDelay(): void;
|
|
2718
2803
|
onResize(): void;
|
|
2804
|
+
handleLoadingContent(): void;
|
|
2719
2805
|
checkUrlForContent(): {
|
|
2720
2806
|
isStoryMatch: boolean;
|
|
2721
2807
|
storyIds: string | null;
|
|
@@ -2723,10 +2809,10 @@ export declare class BlazeWidgetSDK extends BaseWidget {
|
|
|
2723
2809
|
momentIds: string | null;
|
|
2724
2810
|
};
|
|
2725
2811
|
setPlayerStyleCustomization(playerStyleCustomization: Partial<StoryPlayerStyle>): void;
|
|
2726
|
-
handleContentLoad(contentType:
|
|
2812
|
+
handleContentLoad(contentType: ContentType, playReference: playRefType, contentIds: string): Promise<void>;
|
|
2727
2813
|
handleStaticContentLoad(playReference: playRefType): Promise<void>;
|
|
2728
2814
|
enrichContent(content: IStory[]): Promise<IStory[]>;
|
|
2729
|
-
setupModalAndLoadContent(contentType:
|
|
2815
|
+
setupModalAndLoadContent(contentType: ContentType, playReference: playRefType, content: IStory | IMoment): Promise<void>;
|
|
2730
2816
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): Promise<void>;
|
|
2731
2817
|
private getConfigAttributes;
|
|
2732
2818
|
private initialize;
|
|
@@ -2866,8 +2952,8 @@ export declare class BlazeWidgetVideo extends BlazeWidgetVideoBase {
|
|
|
2866
2952
|
handleInteractionEvent(event: CustomEvent<InteractionAnalyticCustomEvent>): void;
|
|
2867
2953
|
}
|
|
2868
2954
|
|
|
2869
|
-
export declare class
|
|
2870
|
-
private
|
|
2955
|
+
export declare class BlazeWidgetAd extends BlazeWidgetVideoBase {
|
|
2956
|
+
private contentParent;
|
|
2871
2957
|
data: IPage | undefined;
|
|
2872
2958
|
private isCurrentlyDisplay;
|
|
2873
2959
|
private adContainer;
|
|
@@ -2877,7 +2963,7 @@ export declare class BlazeWidgetStoryAd extends BlazeWidgetVideoBase {
|
|
|
2877
2963
|
private onFail?;
|
|
2878
2964
|
private isAdFailed;
|
|
2879
2965
|
private isPlaying;
|
|
2880
|
-
constructor(
|
|
2966
|
+
constructor(contentParent: BlazeWidgetStory | BlazeWidgetMoment);
|
|
2881
2967
|
connectedCallback(): void;
|
|
2882
2968
|
disconnectedCallback(): void;
|
|
2883
2969
|
render(): void;
|
|
@@ -2924,6 +3010,7 @@ export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
|
2924
3010
|
onNavigationChange(ev: Event): void;
|
|
2925
3011
|
navigateContent(direction: ContentDirection): void;
|
|
2926
3012
|
createNavigationButton(direction: ContentDirection): BlazeButton;
|
|
3013
|
+
handleClickNavigation(direction: ContentDirection): void;
|
|
2927
3014
|
setModalContent(data: IMoment[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
|
|
2928
3015
|
onKeyDown(ev: KeyboardEvent): void;
|
|
2929
3016
|
close(): void;
|
|
@@ -2941,6 +3028,7 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
2941
3028
|
isWheelEventHandling: boolean;
|
|
2942
3029
|
boundHandleMuteClicked: () => void;
|
|
2943
3030
|
constructor();
|
|
3031
|
+
get currentMoment(): BlazeWidgetMoment;
|
|
2944
3032
|
connectedCallback(): void;
|
|
2945
3033
|
disconnectedCallback(): void;
|
|
2946
3034
|
setupEventListeners(): void;
|
|
@@ -2974,7 +3062,7 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
2974
3062
|
}
|
|
2975
3063
|
|
|
2976
3064
|
export declare class BlazeWidgetMomentSeekBar extends HTMLElement {
|
|
2977
|
-
video: BlazeWidgetVideo;
|
|
3065
|
+
video: BlazeWidgetVideo | BlazeWidgetAd;
|
|
2978
3066
|
private progress;
|
|
2979
3067
|
private playbackParts;
|
|
2980
3068
|
private isEmphasized;
|
|
@@ -2995,7 +3083,7 @@ export declare class BlazeWidgetMomentSeekBar extends HTMLElement {
|
|
|
2995
3083
|
private progressBarFill;
|
|
2996
3084
|
private progressBarKnob;
|
|
2997
3085
|
private isMouseIn;
|
|
2998
|
-
constructor(video: BlazeWidgetVideo);
|
|
3086
|
+
constructor(video: BlazeWidgetVideo | BlazeWidgetAd);
|
|
2999
3087
|
static get observedAttributes(): string[];
|
|
3000
3088
|
attributeChangedCallback(name: string, oldValue: string, _newValue: string): void;
|
|
3001
3089
|
connectedCallback(): void;
|
|
@@ -3003,7 +3091,7 @@ export declare class BlazeWidgetMomentSeekBar extends HTMLElement {
|
|
|
3003
3091
|
onContentResumed(directReset?: boolean): void;
|
|
3004
3092
|
disconnectedCallback(): void;
|
|
3005
3093
|
private initialize;
|
|
3006
|
-
setVideo(video: BlazeWidgetVideo): void;
|
|
3094
|
+
setVideo(video: BlazeWidgetVideo | BlazeWidgetAd): void;
|
|
3007
3095
|
private setupProgressUpdate;
|
|
3008
3096
|
private stopProgressUpdate;
|
|
3009
3097
|
private setupEventListeners;
|
|
@@ -3030,7 +3118,7 @@ interface ButtonElementOptions {
|
|
|
3030
3118
|
backgroundColor?: string;
|
|
3031
3119
|
}
|
|
3032
3120
|
export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
3033
|
-
video
|
|
3121
|
+
video?: BlazeWidgetVideo | BlazeWidgetAd;
|
|
3034
3122
|
modal: BlazeWidgetMomentModal;
|
|
3035
3123
|
seekBar: BlazeWidgetMomentSeekBar;
|
|
3036
3124
|
shareModal: BlazeWidgetShareModal | undefined;
|
|
@@ -3063,6 +3151,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
3063
3151
|
shouldShowImaAdOnStart: boolean;
|
|
3064
3152
|
imaUrl: string;
|
|
3065
3153
|
elementsToHideOnImaAds: (HTMLElement | undefined)[];
|
|
3154
|
+
elementsToHideOnCustomAds: (HTMLElement | undefined)[];
|
|
3066
3155
|
constructor();
|
|
3067
3156
|
connectedCallback(): void;
|
|
3068
3157
|
disconnectedCallback(): void;
|
|
@@ -3144,7 +3233,8 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
3144
3233
|
setModalContent(stories: IStory[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
|
|
3145
3234
|
onKeyDown(ev: KeyboardEvent): void;
|
|
3146
3235
|
close(): void;
|
|
3147
|
-
|
|
3236
|
+
dispatchExitStoryEvents(): void;
|
|
3237
|
+
dispatchPlayerEvents(): void;
|
|
3148
3238
|
open(options?: ISmoothOpenCloseModal): void;
|
|
3149
3239
|
play(): void;
|
|
3150
3240
|
render(): void;
|
|
@@ -3164,6 +3254,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
|
3164
3254
|
applyStyles(): void;
|
|
3165
3255
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
3166
3256
|
setContent(content: BlazeWidgetStory[]): void;
|
|
3257
|
+
navigateContent(direction: ContentDirection): void;
|
|
3167
3258
|
onFocus(): void;
|
|
3168
3259
|
handleMoveSwipe(ev: HammerInput): void;
|
|
3169
3260
|
handleEndSwipe(ev: HammerInput): void;
|
|
@@ -3284,8 +3375,6 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3284
3375
|
resume(): void;
|
|
3285
3376
|
resetPosition(): void;
|
|
3286
3377
|
updateWidgetStatusReadUnread(): void;
|
|
3287
|
-
prevStory(): void;
|
|
3288
|
-
nextStory(): void;
|
|
3289
3378
|
markAsRead(): Promise<any>;
|
|
3290
3379
|
goNextPage(navigationType?: 'Automatic' | 'Manual'): void;
|
|
3291
3380
|
goPrevPage(): void;
|