@wscsports/blaze-web-sdk 0.2.5 → 0.2.7
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 +101 -66
- 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;
|
|
@@ -357,7 +357,6 @@ export * from './url';
|
|
|
357
357
|
export * from './data-source.class';
|
|
358
358
|
|
|
359
359
|
export declare class BlazeWidgetLabel {
|
|
360
|
-
every(arg0: (item: any) => item is BlazeWidgetLabel): void;
|
|
361
360
|
value: string;
|
|
362
361
|
constructor(value: string);
|
|
363
362
|
static singleLabel(label: string): BlazeWidgetLabel;
|
|
@@ -676,6 +675,9 @@ export declare const DESKTOP_PADDING_BOTTOM = "40px";
|
|
|
676
675
|
export declare const ASPECT_RATIO_16_9: number;
|
|
677
676
|
export declare const ASPECT_RATIO_9_16: number;
|
|
678
677
|
export declare const ASPECT_RATIO_4_3: number;
|
|
678
|
+
export declare const ASPECT_RATIO_16_9_STRING = "16 / 9";
|
|
679
|
+
export declare const ASPECT_RATIO_9_16_STRING = "9 / 16";
|
|
680
|
+
export declare const ASPECT_RATIO_4_3_STRING = "4 / 3";
|
|
679
681
|
|
|
680
682
|
export * from './analytics.constants';
|
|
681
683
|
export * from './device.constants';
|
|
@@ -712,11 +714,13 @@ interface IAdInfoConfiguration {
|
|
|
712
714
|
adsLocationType: 'FixedPages' | 'EveryXStories';
|
|
713
715
|
type: 'Story' | 'Moment';
|
|
714
716
|
}
|
|
717
|
+
export type IAdContext = Record<string, string>;
|
|
715
718
|
export interface IAdInfo {
|
|
716
719
|
path?: string;
|
|
717
720
|
tag?: string;
|
|
718
721
|
type: 'Web' | 'IMA';
|
|
719
722
|
configuration?: IAdInfoConfiguration;
|
|
723
|
+
context?: IAdContext;
|
|
720
724
|
}
|
|
721
725
|
|
|
722
726
|
export interface IContent {
|
|
@@ -818,6 +822,7 @@ export interface IMoment extends IContent {
|
|
|
818
822
|
export type MomentDB = {
|
|
819
823
|
id: string;
|
|
820
824
|
liked: boolean;
|
|
825
|
+
viewed: boolean;
|
|
821
826
|
};
|
|
822
827
|
|
|
823
828
|
export interface IContentPage {
|
|
@@ -834,6 +839,7 @@ export interface IContentPage {
|
|
|
834
839
|
createTime: string;
|
|
835
840
|
shouldShowImaAd?: boolean;
|
|
836
841
|
imaUrl?: string;
|
|
842
|
+
adContext?: IAdContext;
|
|
837
843
|
interaction?: Interaction;
|
|
838
844
|
poster?: IThumbnail;
|
|
839
845
|
}
|
|
@@ -1055,6 +1061,7 @@ export interface IBlazeSDKOptions {
|
|
|
1055
1061
|
shouldDismissPlayer?: boolean;
|
|
1056
1062
|
shouldCreateUser?: boolean;
|
|
1057
1063
|
externalUserId?: string | null;
|
|
1064
|
+
prefetchingPolicy?: PrefetchingPolicyType;
|
|
1058
1065
|
}
|
|
1059
1066
|
|
|
1060
1067
|
export interface IButtonPlayerNavigationConfig {
|
|
@@ -1201,6 +1208,7 @@ export interface IWidgetViewOptionsBase {
|
|
|
1201
1208
|
delegates?: Record<Delegation, EventListenerOrEventListenerObject>;
|
|
1202
1209
|
perItemStyleOverrides?: PerItemStyleOverrides;
|
|
1203
1210
|
shouldOrderWidgetByReadStatus?: boolean;
|
|
1211
|
+
contentIds?: string[];
|
|
1204
1212
|
}
|
|
1205
1213
|
export interface IWidgetViewOptionsWithLabels extends IWidgetViewOptionsBase {
|
|
1206
1214
|
labels: string | string[] | BlazeWidgetLabel;
|
|
@@ -1220,7 +1228,7 @@ export interface IWidgetViewOptionsWithDataSource extends IWidgetViewOptionsBase
|
|
|
1220
1228
|
export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptionsWithStoryIds | IWidgetViewOptionsWithDataSource;
|
|
1221
1229
|
|
|
1222
1230
|
export interface IWidgetView extends HTMLElement {
|
|
1223
|
-
setTheme: (theme: IWidgetTheme) => void;
|
|
1231
|
+
setTheme: (theme: IWidgetTheme | ThemeType) => void;
|
|
1224
1232
|
getTheme: () => IWidgetTheme;
|
|
1225
1233
|
setLabels: (labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions) => void;
|
|
1226
1234
|
setLabelsPriority: (labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions) => void;
|
|
@@ -1275,6 +1283,14 @@ declare abstract class AnalyticsServiceClass extends AnalyticsServiceClass_base
|
|
|
1275
1283
|
}
|
|
1276
1284
|
export declare const AnalyticsService: AnalyticsServiceClass;
|
|
1277
1285
|
|
|
1286
|
+
export interface ApiResponse<T> {
|
|
1287
|
+
assetsExpiryTime: string;
|
|
1288
|
+
totalItems: number;
|
|
1289
|
+
result: T[];
|
|
1290
|
+
defaultAdsInfo?: IAdInfo;
|
|
1291
|
+
}
|
|
1292
|
+
export type MomentsResponse = ApiResponse<IMoment>;
|
|
1293
|
+
export type StoriesResponse = ApiResponse<IStory>;
|
|
1278
1294
|
declare const ApiServiceClass_base: {
|
|
1279
1295
|
new (): {};
|
|
1280
1296
|
_instance: ApiServiceClass;
|
|
@@ -1287,40 +1303,21 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1287
1303
|
getStoriesByIds(storyIds: string[], orderType?: OrderType): Promise<{
|
|
1288
1304
|
result: IStory[];
|
|
1289
1305
|
httpStatus?: number | undefined;
|
|
1290
|
-
data?:
|
|
1291
|
-
assetsExpiryTime: string;
|
|
1292
|
-
totalItems: number;
|
|
1293
|
-
result: IStory[];
|
|
1294
|
-
defaultAdsInfo?: IAdInfo | undefined;
|
|
1295
|
-
} | undefined;
|
|
1306
|
+
data?: StoriesResponse | undefined;
|
|
1296
1307
|
error?: Error | undefined;
|
|
1297
1308
|
}>;
|
|
1298
1309
|
getStories(labels: string, orderType?: OrderType, maxItemsSize?: number, labelsPriority?: string): Promise<{
|
|
1299
1310
|
result: IStory[];
|
|
1300
1311
|
httpStatus?: number | undefined;
|
|
1301
|
-
data?:
|
|
1302
|
-
assetsExpiryTime: string;
|
|
1303
|
-
totalItems: number;
|
|
1304
|
-
result: IStory[];
|
|
1305
|
-
defaultAdsInfo?: IAdInfo | undefined;
|
|
1306
|
-
} | undefined;
|
|
1312
|
+
data?: StoriesResponse | undefined;
|
|
1307
1313
|
error?: Error | undefined;
|
|
1308
1314
|
}>;
|
|
1309
|
-
getMomentByIds(
|
|
1315
|
+
getMomentByIds(ids: string[], orderType?: OrderType): Promise<{
|
|
1310
1316
|
httpStatus?: number | undefined;
|
|
1311
|
-
data?:
|
|
1312
|
-
assetsExpiryTime: string;
|
|
1313
|
-
totalItems: number;
|
|
1314
|
-
result: IMoment[];
|
|
1315
|
-
} | undefined;
|
|
1317
|
+
data?: MomentsResponse | undefined;
|
|
1316
1318
|
error?: Error | undefined;
|
|
1317
1319
|
}>;
|
|
1318
|
-
|
|
1319
|
-
assetsExpiryTime: string;
|
|
1320
|
-
totalItems: number;
|
|
1321
|
-
result: IMoment[];
|
|
1322
|
-
defaultAdsInfo?: IAdInfo | undefined;
|
|
1323
|
-
}>>;
|
|
1320
|
+
getMomentsByLabels(labels: string, orderType: OrderType, maxItemsSize?: number): Promise<import("../interfaces").IHttpResponse<MomentsResponse>>;
|
|
1324
1321
|
updateMomentLikeStatus(options: {
|
|
1325
1322
|
momentId: string;
|
|
1326
1323
|
setLiked: boolean;
|
|
@@ -1365,6 +1362,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1365
1362
|
private _playerStyleCustomization?;
|
|
1366
1363
|
private _shouldCreateUser;
|
|
1367
1364
|
private _externalUserId;
|
|
1365
|
+
private _prefetchingPolicy;
|
|
1368
1366
|
protected constructor();
|
|
1369
1367
|
init(options: IBlazeSDKOptions): Promise<void>;
|
|
1370
1368
|
private _urls;
|
|
@@ -1396,6 +1394,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
1396
1394
|
set googleCustomNativeAdHandler(value: CustomNativeAdHandler | undefined);
|
|
1397
1395
|
get imaAdHandler(): ImaAdHandler | undefined;
|
|
1398
1396
|
set imaAdHandler(value: ImaAdHandler | undefined);
|
|
1397
|
+
get prefetchingPolicy(): PrefetchingPolicyType;
|
|
1398
|
+
set prefetchingPolicy(value: PrefetchingPolicyType);
|
|
1399
1399
|
}
|
|
1400
1400
|
export declare const ConfigService: ConfigServiceClass;
|
|
1401
1401
|
|
|
@@ -1410,8 +1410,6 @@ declare abstract class DatabaseServiceClass extends DatabaseServiceClass_base im
|
|
|
1410
1410
|
onOpen(): Promise<void>;
|
|
1411
1411
|
onError(e: Event): Promise<void>;
|
|
1412
1412
|
onUpgradeNeeded(db: IDBDatabase): Promise<void>;
|
|
1413
|
-
getPageViewed(id: string): Promise<any>;
|
|
1414
|
-
updatePageViewed(id: string, storyId: string): Promise<any>;
|
|
1415
1413
|
getUserId(): Promise<IResponse<{
|
|
1416
1414
|
id: string;
|
|
1417
1415
|
value: string;
|
|
@@ -1420,13 +1418,17 @@ declare abstract class DatabaseServiceClass extends DatabaseServiceClass_base im
|
|
|
1420
1418
|
id: string;
|
|
1421
1419
|
value: string;
|
|
1422
1420
|
}>>;
|
|
1423
|
-
|
|
1424
|
-
|
|
1421
|
+
getPageViewed(id: string): Promise<any>;
|
|
1422
|
+
updatePageViewed(id: string, storyId: string): Promise<any>;
|
|
1425
1423
|
isPageViewed(id: string): Promise<boolean>;
|
|
1424
|
+
enrichStories(stories: IStory[]): Promise<IStory[]>;
|
|
1426
1425
|
updateInteraction(data: InteractionDB): Promise<any>;
|
|
1427
1426
|
getInteraction(id: string): Promise<IResponse<InteractionDB> | null>;
|
|
1428
1427
|
updateLike(momentId: string, isLike: boolean): Promise<IResponse | null>;
|
|
1429
1428
|
getLike(momentId: string): Promise<IResponse<MomentDB> | null>;
|
|
1429
|
+
updateViewedMoment(momentId: string): Promise<any>;
|
|
1430
|
+
getViewedMoment(momentId: string): Promise<boolean>;
|
|
1431
|
+
enrichMoments(moments: IMoment[]): Promise<IMoment[]>;
|
|
1430
1432
|
}
|
|
1431
1433
|
export declare const DatabaseService: DatabaseServiceClass;
|
|
1432
1434
|
|
|
@@ -1502,6 +1504,7 @@ export * from './user.service';
|
|
|
1502
1504
|
export * from './video-cache.service';
|
|
1503
1505
|
export * from './video-player.service';
|
|
1504
1506
|
export * from './widgets.service';
|
|
1507
|
+
export * from './moment.service';
|
|
1505
1508
|
export * from './story.service';
|
|
1506
1509
|
|
|
1507
1510
|
declare const InteractionServiceClass_base: {
|
|
@@ -1560,6 +1563,19 @@ declare class LoggerServiceClass extends LoggerServiceClass_base implements ISer
|
|
|
1560
1563
|
}
|
|
1561
1564
|
export declare const LoggerService: LoggerServiceClass;
|
|
1562
1565
|
|
|
1566
|
+
declare const MomentServiceClass_base: {
|
|
1567
|
+
new (): {};
|
|
1568
|
+
_instance: MomentServiceClass;
|
|
1569
|
+
getInstance(): MomentServiceClass;
|
|
1570
|
+
};
|
|
1571
|
+
declare abstract class MomentServiceClass extends MomentServiceClass_base implements IService {
|
|
1572
|
+
init(): void;
|
|
1573
|
+
updateMomentReadStatusById(momentId: string): Promise<any>;
|
|
1574
|
+
encrichMoment(moment: IMoment[]): Promise<IMoment[]>;
|
|
1575
|
+
getMoments(dataSource: any): Promise<MomentsResponse>;
|
|
1576
|
+
}
|
|
1577
|
+
export declare const MomentService: MomentServiceClass;
|
|
1578
|
+
|
|
1563
1579
|
declare const StartupServiceClass_base: {
|
|
1564
1580
|
new (): {};
|
|
1565
1581
|
_instance: StartupServiceClass;
|
|
@@ -2198,6 +2214,8 @@ export type FontWeightType = 'normal' | 'bold' | 'bolder' | 'lighter' | 'inherit
|
|
|
2198
2214
|
export type TextTransformType = 'capitalize' | 'uppercase' | 'lowercase' | 'none';
|
|
2199
2215
|
|
|
2200
2216
|
export type Direction = 'UP' | 'DOWN' | 'RIGHT' | 'LEFT';
|
|
2217
|
+
export type NavigationType = 'Automatic' | 'Manual' | '';
|
|
2218
|
+
export type NavigationDirectionType = 'Forwards' | 'Backwards' | '';
|
|
2201
2219
|
|
|
2202
2220
|
export type ComponentsElementType = 'blaze-alert' | 'blaze-toast' | 'blaze-chip' | 'blaze-image';
|
|
2203
2221
|
export type WidgetElementType = 'blaze-sdk';
|
|
@@ -2225,12 +2243,14 @@ export * from './thumbnail.type';
|
|
|
2225
2243
|
export * from './user.type';
|
|
2226
2244
|
export * from './widget.type';
|
|
2227
2245
|
export * from './chip-status.type';
|
|
2246
|
+
export * from './prefetch.type';
|
|
2247
|
+
export * from './trigger.type';
|
|
2228
2248
|
|
|
2229
|
-
export type EntitiesType = 'playerId' | 'teamId' | 'gameId';
|
|
2230
|
-
export type PerItemStyleOverrides = Record<EntitiesType, Array<{
|
|
2249
|
+
export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
|
|
2250
|
+
export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
|
|
2231
2251
|
name: string;
|
|
2232
2252
|
theme: IWidgetTheme;
|
|
2233
|
-
}
|
|
2253
|
+
}>>>;
|
|
2234
2254
|
|
|
2235
2255
|
export type LabelsType = string | string[] | BlazeWidgetLabel;
|
|
2236
2256
|
|
|
@@ -2254,6 +2274,8 @@ export interface PositionOffset {
|
|
|
2254
2274
|
export type PartialPositionOffset = Partial<PositionOffset>;
|
|
2255
2275
|
export type IconsPositionType = 'HORIZONTAL' | 'VERTICAL';
|
|
2256
2276
|
|
|
2277
|
+
export type PrefetchingPolicyType = 'low' | 'default';
|
|
2278
|
+
|
|
2257
2279
|
export type SeverityType = 'error' | 'warning' | 'info' | 'success';
|
|
2258
2280
|
|
|
2259
2281
|
export type SizeType = 'small' | 'medium' | 'large';
|
|
@@ -2266,6 +2288,9 @@ export type ThumbnailType = 'SQUARE_ICON' | 'VERTICAL_TWO_BY_THREE' | 'CUSTOM';
|
|
|
2266
2288
|
export type ThumbnailShape = 'Circle' | 'Rectangle';
|
|
2267
2289
|
export declare function thumbnailMapping(thumbnailType: ThumbnailType): ThumbnailApiType;
|
|
2268
2290
|
|
|
2291
|
+
export type ExitTriggerType = 'Swipe' | 'Swipe Left' | 'Swipe Right' | 'Swipe Down' | 'Swipe Up' | 'Skip' | 'Close Button' | 'CTA Click' | 'Escape Button' | 'Stories Completed' | 'Story Completed' | '';
|
|
2292
|
+
export type StartTriggerType = 'Embedded Player in Viewport' | 'UI Button' | 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | 'SingleStory' | 'Share' | '';
|
|
2293
|
+
|
|
2269
2294
|
export type GetUserTokenRequest = {
|
|
2270
2295
|
externalId: string | null;
|
|
2271
2296
|
};
|
|
@@ -2324,6 +2349,11 @@ export declare function flattenObject<T extends Record<string, any>>(obj: T): Re
|
|
|
2324
2349
|
export declare function mergeStyles(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): object;
|
|
2325
2350
|
export declare function getMaxValue(currentMax: string, newValue: string): string;
|
|
2326
2351
|
export declare function isReadByLastUnIgnoredPageStatus(story: IStory): boolean;
|
|
2352
|
+
export declare function sortByHasViewed(a: {
|
|
2353
|
+
hasViewed: boolean;
|
|
2354
|
+
}, b: {
|
|
2355
|
+
hasViewed: boolean;
|
|
2356
|
+
}): number;
|
|
2327
2357
|
export declare function applyPlayerStyleChanges(defaultPlayerStyle: StoryPlayerStyle, mergedPlayerStyle: StoryPlayerStyle, themePlayerStyle: StoryPlayerStyle, playerStyleChanges: any): void;
|
|
2328
2358
|
export declare function getChangedProperties(source: any, target: any, level: string, playerStyleChanges: any, parentKeys?: string): void;
|
|
2329
2359
|
export declare function removeDuplicates(source: string[], checkAgainst: string[]): string[];
|
|
@@ -2385,10 +2415,6 @@ export * from './widget-video';
|
|
|
2385
2415
|
export * from './moment/widget-moment-seek-bar';
|
|
2386
2416
|
export * from './widget-cta-modal';
|
|
2387
2417
|
|
|
2388
|
-
export type ExitTriggerType = 'Swipe' | 'Swipe Down' | 'Swipe Up' | 'Skip' | 'Close Button' | 'CTA Click' | 'Escape Button' | '';
|
|
2389
|
-
export type StartTriggerType = 'Embedded Player in Viewport' | 'UI Button' | 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | 'SingleStory' | 'Share' | '';
|
|
2390
|
-
export type NavigationType = 'Automatic' | 'Manual' | '';
|
|
2391
|
-
export type NavigationDirectionType = 'Forwards' | 'Backwards' | '';
|
|
2392
2418
|
export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
2393
2419
|
container: HTMLElement;
|
|
2394
2420
|
pageIndex: number;
|
|
@@ -2411,6 +2437,7 @@ export declare abstract class BlazeWidgetContent extends HTMLElement {
|
|
|
2411
2437
|
connectedCallback(): void;
|
|
2412
2438
|
disconnectedCallback(): void;
|
|
2413
2439
|
setWidgetItemParent(item: BlazeWidgetItem): void;
|
|
2440
|
+
updateWidgetStatusReadUnread(): void;
|
|
2414
2441
|
getRefferingObject(): ReferringEventInfo;
|
|
2415
2442
|
render(): void;
|
|
2416
2443
|
}
|
|
@@ -2505,6 +2532,7 @@ export declare class BlazeWidgetInteraction extends BaseWidget {
|
|
|
2505
2532
|
private responseHandler;
|
|
2506
2533
|
private focusMainWindowHandler;
|
|
2507
2534
|
private orientationChangeHandler;
|
|
2535
|
+
connectedCallback(): void;
|
|
2508
2536
|
loadInteraction(interactionData: Interaction): void;
|
|
2509
2537
|
showInteraction(interactionData?: Interaction): void;
|
|
2510
2538
|
hideInteraction(): void;
|
|
@@ -2601,27 +2629,29 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2601
2629
|
shouldReloadData: boolean;
|
|
2602
2630
|
get refElement(): ShadowRoot | BlazeWidgetLayout;
|
|
2603
2631
|
constructor();
|
|
2632
|
+
connectedCallback(): void;
|
|
2633
|
+
disconnectedCallback(): void;
|
|
2604
2634
|
onResizeEventDelay(): void;
|
|
2605
2635
|
onResize(): void;
|
|
2606
2636
|
handleHeightChangeMutation(mutationsList: MutationRecord[]): void;
|
|
2607
2637
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
2608
|
-
connectedCallback(): void;
|
|
2609
|
-
disconnectedCallback(): void;
|
|
2610
2638
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
2611
2639
|
onKeyDown(e: KeyboardEvent): void;
|
|
2612
|
-
|
|
2640
|
+
onContentChange(mode: ContentDirection): void;
|
|
2613
2641
|
onPlayerClose(): void;
|
|
2614
2642
|
onPlayerOpen(): void;
|
|
2615
2643
|
getParentHeightWithoutPadding(): number | null;
|
|
2616
2644
|
setId(id: string): void;
|
|
2645
|
+
handlePopState(): void;
|
|
2617
2646
|
private setReloadData;
|
|
2618
2647
|
addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
2619
2648
|
set storyIds(value: string);
|
|
2649
|
+
set contentIds(value: string);
|
|
2620
2650
|
setContentIds(storyIds: string[], options?: ISetWidgetOptions): void;
|
|
2621
2651
|
setLabelsPriority(labelsPriority: string | string[] | BlazeWidgetLabel[], options?: ISetWidgetOptions): void;
|
|
2622
2652
|
setLabels(labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions): void;
|
|
2623
2653
|
getTheme(): IWidgetTheme;
|
|
2624
|
-
setTheme(theme: IWidgetTheme |
|
|
2654
|
+
setTheme(theme: IWidgetTheme | ThemeType): void;
|
|
2625
2655
|
private get theme();
|
|
2626
2656
|
updateOverrideStyles(perItemStyleOverrides: PerItemStyleOverrides): void;
|
|
2627
2657
|
reload(): void;
|
|
@@ -2634,11 +2664,14 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2634
2664
|
setMaxItemsDisplaySize(maxSize: number): void;
|
|
2635
2665
|
setMaxItemsSize(maxItemsSize?: number): void;
|
|
2636
2666
|
private updatePlayerStyle;
|
|
2637
|
-
createModal
|
|
2638
|
-
appendModalToBlazeSDK
|
|
2667
|
+
private createModal;
|
|
2668
|
+
private appendModalToBlazeSDK;
|
|
2639
2669
|
static get observedAttributes(): string[];
|
|
2640
|
-
onItemClick
|
|
2641
|
-
loadContent
|
|
2670
|
+
private onItemClick;
|
|
2671
|
+
private loadContent;
|
|
2672
|
+
handleAssetsExpiry(data: {
|
|
2673
|
+
assetsExpiryTime: string;
|
|
2674
|
+
}): void;
|
|
2642
2675
|
processStoriesInWidget(): void;
|
|
2643
2676
|
calculateChipSizes(theme: IWidgetTheme): {
|
|
2644
2677
|
badge: {
|
|
@@ -2675,10 +2708,11 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
2675
2708
|
labelAdditionalWidth: number;
|
|
2676
2709
|
labelAdditionalHeight: number;
|
|
2677
2710
|
};
|
|
2678
|
-
maxSize(): number;
|
|
2679
2711
|
event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
2712
|
+
private reorderWidgets;
|
|
2680
2713
|
updateWidgetsData(): void;
|
|
2681
|
-
|
|
2714
|
+
private updateWidgetDisplay;
|
|
2715
|
+
private maxSize;
|
|
2682
2716
|
connectWidgets(): void;
|
|
2683
2717
|
get thumbnailShape(): ThumbnailShape;
|
|
2684
2718
|
widgetType(): WidgetType;
|
|
@@ -2693,12 +2727,12 @@ export declare class BlazeWidgetModal extends BaseWidget {
|
|
|
2693
2727
|
hammer: HammerManager | null;
|
|
2694
2728
|
isMultiTouch: boolean;
|
|
2695
2729
|
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
2696
|
-
|
|
2730
|
+
onContentChange?: (mode: ContentDirection) => void;
|
|
2697
2731
|
constructor(type: 'story' | 'moment');
|
|
2698
2732
|
connectedCallback(): void;
|
|
2699
2733
|
disconnectedCallback(): void;
|
|
2700
2734
|
onResize(): void;
|
|
2701
|
-
|
|
2735
|
+
handleOnContentChange(mode: ContentDirection): void;
|
|
2702
2736
|
seek(id: string): void;
|
|
2703
2737
|
setupHammer(): void;
|
|
2704
2738
|
handlePanStart(ev: HammerInput): void;
|
|
@@ -2730,6 +2764,7 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
2730
2764
|
currentNextAnimation?: anime.AnimeInstance;
|
|
2731
2765
|
currentPrevAnimation?: anime.AnimeInstance;
|
|
2732
2766
|
onClose?: () => void;
|
|
2767
|
+
onContentChange?: (mode: ContentDirection) => void;
|
|
2733
2768
|
listeners: EventsListener;
|
|
2734
2769
|
boundHandlePanStart: (ev: HammerInput) => void;
|
|
2735
2770
|
boundHandlePanMove: (ev: HammerInput) => void;
|
|
@@ -2776,18 +2811,17 @@ export declare abstract class WidgetAbstractPlayer extends BaseWidget {
|
|
|
2776
2811
|
|
|
2777
2812
|
export declare class BlazeWidgetScrollable extends BaseWidget {
|
|
2778
2813
|
buttonsState: never[];
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2814
|
+
boundOnMouseMoveEvent: (e: MouseEvent) => void;
|
|
2815
|
+
boundOnClickEvent: (this: HTMLElement, ev: MouseEvent) => void;
|
|
2816
|
+
boundOnMouseWheelEvent: (event: WheelEvent) => void;
|
|
2782
2817
|
totalMovement: number;
|
|
2783
2818
|
constructor();
|
|
2784
|
-
render(): void;
|
|
2785
2819
|
connectedCallback(): void;
|
|
2820
|
+
disconnectedCallback(): void;
|
|
2786
2821
|
onClick(event: MouseEvent): void;
|
|
2787
2822
|
onMouseMove(event: MouseEvent): void;
|
|
2788
2823
|
onMouseWheel(event: WheelEvent): void;
|
|
2789
|
-
|
|
2790
|
-
disconnectedCallback(): void;
|
|
2824
|
+
render(): void;
|
|
2791
2825
|
}
|
|
2792
2826
|
|
|
2793
2827
|
export type playRefType = 'Share' | 'SingleStory';
|
|
@@ -2841,6 +2875,7 @@ export declare class BlazeWidgetShareModal extends BaseWidget {
|
|
|
2841
2875
|
onDrawerClose(): void;
|
|
2842
2876
|
open(shareUrl: string): void;
|
|
2843
2877
|
close(): void;
|
|
2878
|
+
get isOpen(): boolean;
|
|
2844
2879
|
renderButtons(): void;
|
|
2845
2880
|
renderTitle(): void;
|
|
2846
2881
|
render(): void;
|
|
@@ -3044,8 +3079,9 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
3044
3079
|
handleNextDirection(): void;
|
|
3045
3080
|
updateItemData(itemToReplaceWith: BlazeWidgetMoment & BlazeWidgetStory, nextItemToInsert: BlazeWidgetMoment | BlazeWidgetStory): void;
|
|
3046
3081
|
createAnimation(content: BlazeWidgetMoment, direction: ContentDirection, targetIndex: number): AnimeTimelineInstance;
|
|
3047
|
-
|
|
3082
|
+
handleAnimationStart(content: BlazeWidgetMoment, direction: ContentDirection): void;
|
|
3048
3083
|
handleAnimationCompletion(content: BlazeWidgetMoment, mode: ContentDirection): Promise<void>;
|
|
3084
|
+
loadAndPlayContent(): Promise<void>;
|
|
3049
3085
|
setContent(content: BlazeWidgetMoment[]): void;
|
|
3050
3086
|
preloadAdjacentContent(direction: ContentDirection): Promise<void>;
|
|
3051
3087
|
prefetchPosters(): Promise<void>;
|
|
@@ -3150,6 +3186,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
3150
3186
|
isActive: boolean;
|
|
3151
3187
|
shouldShowImaAdOnStart: boolean;
|
|
3152
3188
|
imaUrl: string;
|
|
3189
|
+
adContext?: IAdContext;
|
|
3153
3190
|
elementsToHideOnImaAds: (HTMLElement | undefined)[];
|
|
3154
3191
|
elementsToHideOnCustomAds: (HTMLElement | undefined)[];
|
|
3155
3192
|
constructor();
|
|
@@ -3222,13 +3259,11 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
3222
3259
|
playerLayout: StoryPlayerStyle;
|
|
3223
3260
|
onOpen?: () => void;
|
|
3224
3261
|
onClose?: (options?: ISmoothOpenCloseModal) => void;
|
|
3225
|
-
onStoryChange?: (mode: ContentDirection) => void;
|
|
3226
3262
|
boundOnResizeEventDelay: (this: Window, ev: UIEvent) => void;
|
|
3227
3263
|
boundOnKeyDown: (ev: KeyboardEvent) => void;
|
|
3228
3264
|
constructor(parentWidget: HTMLElement, playerLayout: StoryPlayerStyle);
|
|
3229
3265
|
connectedCallback(): void;
|
|
3230
3266
|
disconnectedCallback(): void;
|
|
3231
|
-
handleOnStoryChange(mode: ContentDirection): void;
|
|
3232
3267
|
setTheme(theme: IWidgetTheme): void;
|
|
3233
3268
|
setModalContent(stories: IStory[], indexOfContentInWidget: number, defaultAdsInfo?: IAdInfo): void;
|
|
3234
3269
|
onKeyDown(ev: KeyboardEvent): void;
|
|
@@ -3244,7 +3279,6 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
3244
3279
|
}
|
|
3245
3280
|
|
|
3246
3281
|
export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
3247
|
-
onStoryChange?: (mode: ContentDirection) => void;
|
|
3248
3282
|
boundOnKeyDown: (event: KeyboardEvent) => Promise<void>;
|
|
3249
3283
|
backgroundAnimation?: Animation;
|
|
3250
3284
|
constructor();
|
|
@@ -3263,7 +3297,7 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
|
3263
3297
|
resetStyles(): void;
|
|
3264
3298
|
play(options?: ISmoothOpenCloseModal): void;
|
|
3265
3299
|
loadAndPlayContent(): Promise<void>;
|
|
3266
|
-
handleAnimationCompletion(content: BlazeWidgetStory,
|
|
3300
|
+
handleAnimationCompletion(content: BlazeWidgetStory, direction: ContentDirection): void;
|
|
3267
3301
|
createAnimation(content: BlazeWidgetStory, direction: ContentDirection, targetIndex: number): anime.AnimeTimelineInstance;
|
|
3268
3302
|
handleAnimationStart(content: BlazeWidgetStory, targetContent: BlazeWidgetStory, direction: ContentDirection): void;
|
|
3269
3303
|
closeWithAnimation(direction: Direction): void;
|
|
@@ -3290,8 +3324,8 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3290
3324
|
type: string;
|
|
3291
3325
|
progressElement: HTMLElement;
|
|
3292
3326
|
onPageStart?: () => void;
|
|
3293
|
-
onPrevStory?: () => void;
|
|
3294
|
-
onNextStory?: () => void;
|
|
3327
|
+
onPrevStory?: (navigation: NavigationType) => void;
|
|
3328
|
+
onNextStory?: (navigation: NavigationType) => void;
|
|
3295
3329
|
onClose?: () => void;
|
|
3296
3330
|
buttonsContainer: BlazeDiv;
|
|
3297
3331
|
playbackParts: HTMLElement[];
|
|
@@ -3326,6 +3360,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3326
3360
|
requestAnimationId: number | null;
|
|
3327
3361
|
shouldShowImaAdOnStart: boolean;
|
|
3328
3362
|
imaUrl: string;
|
|
3363
|
+
adContext?: IAdContext;
|
|
3329
3364
|
constructor(playerStyle: StoryPlayerStyle, mode: ScreenMode);
|
|
3330
3365
|
private isButtonVisible;
|
|
3331
3366
|
private createPlayerButtonsAndAppendToButtonsContainer;
|
|
@@ -3349,7 +3384,7 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3349
3384
|
get currentPage(): BlazeWidgetVideoBase;
|
|
3350
3385
|
get nextPage(): BlazeWidgetVideoBase;
|
|
3351
3386
|
get prevPage(): BlazeWidgetVideoBase;
|
|
3352
|
-
|
|
3387
|
+
prefetchAdjacentPages(): void;
|
|
3353
3388
|
loadStoryPostersByDistance(distance: number): void;
|
|
3354
3389
|
revertNextPageButtonToPreviousAction(): void;
|
|
3355
3390
|
displayRestartStoryButton(): void;
|
|
@@ -3370,13 +3405,13 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
3370
3405
|
onVisibilityChange(): void;
|
|
3371
3406
|
onBlur(): void;
|
|
3372
3407
|
onFocus(): void;
|
|
3373
|
-
close(isDirectCloseCall?: boolean): void
|
|
3408
|
+
close(isDirectCloseCall?: boolean): Promise<void>;
|
|
3374
3409
|
pause(): void;
|
|
3375
3410
|
resume(): void;
|
|
3376
3411
|
resetPosition(): void;
|
|
3377
3412
|
updateWidgetStatusReadUnread(): void;
|
|
3378
3413
|
markAsRead(): Promise<any>;
|
|
3379
|
-
goNextPage(navigationType?:
|
|
3414
|
+
goNextPage(navigationType?: NavigationType): void;
|
|
3380
3415
|
goPrevPage(): void;
|
|
3381
3416
|
disconnectedCallback(): void;
|
|
3382
3417
|
updateCTAButtonPosition(): void;
|