@wscsports/blaze-web-sdk 0.22.0 → 0.24.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 +137 -3
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -238,6 +238,7 @@ export declare class MomentEvent {
|
|
|
238
238
|
'cc_state': string;
|
|
239
239
|
'content_extra_info': string;
|
|
240
240
|
'custom_action_button_name': string;
|
|
241
|
+
'follow_state': string | null;
|
|
241
242
|
}
|
|
242
243
|
export declare class WidgetEvent {
|
|
243
244
|
'page_view_id': string;
|
|
@@ -460,6 +461,14 @@ export declare class EventsListener {
|
|
|
460
461
|
removeAll(): void;
|
|
461
462
|
}
|
|
462
463
|
|
|
464
|
+
export declare class FollowingsManager {
|
|
465
|
+
private static followedEntities;
|
|
466
|
+
static isFollowing(entityId: string): boolean;
|
|
467
|
+
static initialize(followedList: string[]): void;
|
|
468
|
+
static follow(entityId: string): void;
|
|
469
|
+
static unfollow(entityId: string): void;
|
|
470
|
+
}
|
|
471
|
+
|
|
463
472
|
export declare class FullscreenManager {
|
|
464
473
|
private isFullscreen;
|
|
465
474
|
private isProgrammaticChange;
|
|
@@ -485,6 +494,7 @@ export * from './device-detector.class';
|
|
|
485
494
|
export * from './events-listener';
|
|
486
495
|
export * from './fullscreen-manager.class';
|
|
487
496
|
export * from './label-builder.class';
|
|
497
|
+
export * from './url-rotator.class';
|
|
488
498
|
export * from './logger/logger-manager.class';
|
|
489
499
|
export * from './logger/logger-storage.class';
|
|
490
500
|
export * from './logger/logger-transport.class';
|
|
@@ -495,6 +505,7 @@ export * from './throttle';
|
|
|
495
505
|
export * from './url';
|
|
496
506
|
export * from './visiblity-manager.class';
|
|
497
507
|
export * from './accessibility';
|
|
508
|
+
export * from './followings-manager.class';
|
|
498
509
|
|
|
499
510
|
export interface IBlazeWidgetLabel {
|
|
500
511
|
readonly _type: 'BlazeWidgetLabel';
|
|
@@ -543,6 +554,16 @@ export declare function Singleton<T>(): {
|
|
|
543
554
|
export type EventHandler<E extends Event> = (event: E) => void;
|
|
544
555
|
export declare function throttle<F extends (...args: any[]) => void>(func: F, _delay: number): (...args: Parameters<F>) => Promise<void>;
|
|
545
556
|
|
|
557
|
+
export declare class UrlRotator {
|
|
558
|
+
private endpoints;
|
|
559
|
+
private currentIndex;
|
|
560
|
+
private fallbackUrl;
|
|
561
|
+
constructor(fallbackUrl?: string);
|
|
562
|
+
initialize(endpointUrls?: string): void;
|
|
563
|
+
getNext(): string;
|
|
564
|
+
private parseEndpoints;
|
|
565
|
+
}
|
|
566
|
+
|
|
546
567
|
interface UpdateLocationContentHashParams {
|
|
547
568
|
contentType?: ContentType;
|
|
548
569
|
contentId?: string;
|
|
@@ -1062,10 +1083,53 @@ export declare class BlazeCtaButton extends BaseWidget {
|
|
|
1062
1083
|
clearAllAnimations(): void;
|
|
1063
1084
|
}
|
|
1064
1085
|
|
|
1086
|
+
export declare class BlazeFollowButton extends BaseWidget {
|
|
1087
|
+
private playerStyle;
|
|
1088
|
+
private containerEl;
|
|
1089
|
+
private avatarEl;
|
|
1090
|
+
private chipEl;
|
|
1091
|
+
private chipContentWrapperEl;
|
|
1092
|
+
private checkMarkIconEl;
|
|
1093
|
+
private plusIconEl;
|
|
1094
|
+
private textEl;
|
|
1095
|
+
private _isFollowing;
|
|
1096
|
+
private _entityId?;
|
|
1097
|
+
private _entityType?;
|
|
1098
|
+
private _avatarUrl?;
|
|
1099
|
+
private _sourceId?;
|
|
1100
|
+
private _sourceContentType?;
|
|
1101
|
+
onToggle?: (e: Event, data: FollowingSharedContext) => void;
|
|
1102
|
+
constructor(playerStyle: MomentPlayerStyle | undefined);
|
|
1103
|
+
connectedCallback(): void;
|
|
1104
|
+
disconnectedCallback(): void;
|
|
1105
|
+
setEntity(id: string | undefined, type?: BlazeFollowEntityType): void;
|
|
1106
|
+
setAvatar(url: string | undefined): void;
|
|
1107
|
+
setSource(sourceId: string, contentType: ContentType): void;
|
|
1108
|
+
get entityId(): string | undefined;
|
|
1109
|
+
get entityType(): BlazeFollowEntityType | undefined;
|
|
1110
|
+
get isFollowed(): boolean;
|
|
1111
|
+
private handleClick;
|
|
1112
|
+
private handleStateChange;
|
|
1113
|
+
private updateAriaLabel;
|
|
1114
|
+
private onMouseEnter;
|
|
1115
|
+
private onMouseLeave;
|
|
1116
|
+
private setupContainer;
|
|
1117
|
+
private handlePressKeyboard;
|
|
1118
|
+
private setupAvatar;
|
|
1119
|
+
private setupChip;
|
|
1120
|
+
private setupIcons;
|
|
1121
|
+
private updateIconVisibility;
|
|
1122
|
+
private updateIconColors;
|
|
1123
|
+
private applyStateToUi;
|
|
1124
|
+
setAriaLabel(label: string): void;
|
|
1125
|
+
private updateAvatarBackground;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1065
1128
|
export * from './share-button';
|
|
1066
1129
|
export * from './button';
|
|
1067
1130
|
export * from './cta-button';
|
|
1068
1131
|
export * from './call-to-action.button';
|
|
1132
|
+
export * from './follow-button';
|
|
1069
1133
|
|
|
1070
1134
|
export type ShareButtonType = 'copy-link' | 'linked-in';
|
|
1071
1135
|
type AttributeType = 'size' | 'button-type';
|
|
@@ -1140,7 +1204,9 @@ export declare enum MomentAction {
|
|
|
1140
1204
|
PlaybackInitialStart = "playback_initial_start",
|
|
1141
1205
|
ClosedCaptionsOff = "cc_off",
|
|
1142
1206
|
ClosedCaptionsOn = "cc_on",
|
|
1143
|
-
CustomActionButtonClick = "custom_action_button_click"
|
|
1207
|
+
CustomActionButtonClick = "custom_action_button_click",
|
|
1208
|
+
Follow = "follow",
|
|
1209
|
+
Unfollow = "unfollow"
|
|
1144
1210
|
}
|
|
1145
1211
|
export declare enum VideoAction {
|
|
1146
1212
|
VideoStart = "video_start",
|
|
@@ -1225,6 +1291,8 @@ export declare const ASPECT_RATIO_16_9_STRING = "16 / 9";
|
|
|
1225
1291
|
export declare const ASPECT_RATIO_9_16_STRING = "9 / 16";
|
|
1226
1292
|
export declare const ASPECT_RATIO_4_3_STRING = "4 / 3";
|
|
1227
1293
|
|
|
1294
|
+
export declare const FOLLOW_BUTTON_STATE_CHANGE = "follow-button-state-change";
|
|
1295
|
+
|
|
1228
1296
|
export * from './accessibility.constants';
|
|
1229
1297
|
export * from './ads.constants';
|
|
1230
1298
|
export * from './analytics.constants';
|
|
@@ -1341,6 +1409,7 @@ export interface AppConfiguration {
|
|
|
1341
1409
|
analyticsAddEntitiesInfo?: string;
|
|
1342
1410
|
configRefetchIntervalInMinutes?: number;
|
|
1343
1411
|
enableClientPlaybackModification?: 'true' | 'false' | string;
|
|
1412
|
+
analyticsEndpointUrls?: string;
|
|
1344
1413
|
};
|
|
1345
1414
|
recommendationsConfigurations?: IRecommendationsConfigurations;
|
|
1346
1415
|
sdkLoggerConfigurations?: ILoggerConfiguration;
|
|
@@ -1358,6 +1427,14 @@ export type ContentEntities = {
|
|
|
1358
1427
|
teamId: string | null;
|
|
1359
1428
|
playerId: string | null;
|
|
1360
1429
|
};
|
|
1430
|
+
export type BlazeFollowEntity = {
|
|
1431
|
+
storageFile: {
|
|
1432
|
+
url: string;
|
|
1433
|
+
fileSize: number | null;
|
|
1434
|
+
};
|
|
1435
|
+
entityType: BlazeFollowEntityType;
|
|
1436
|
+
entityId: string;
|
|
1437
|
+
};
|
|
1361
1438
|
export interface IContent {
|
|
1362
1439
|
id: string;
|
|
1363
1440
|
title: string;
|
|
@@ -1372,6 +1449,7 @@ export interface IContent {
|
|
|
1372
1449
|
description?: string;
|
|
1373
1450
|
closedCaptions?: IClosedCaption[];
|
|
1374
1451
|
extraInfo: ExtraInfo;
|
|
1452
|
+
followEntities?: BlazeFollowEntity[];
|
|
1375
1453
|
}
|
|
1376
1454
|
export interface IBlazeContent {
|
|
1377
1455
|
id: string;
|
|
@@ -1634,7 +1712,8 @@ export interface IBlazeVideo extends IBlazeContent {
|
|
|
1634
1712
|
}
|
|
1635
1713
|
|
|
1636
1714
|
export declare enum ActionHandlerId {
|
|
1637
|
-
AddCustomActionButton = "addCustomActionButton"
|
|
1715
|
+
AddCustomActionButton = "addCustomActionButton",
|
|
1716
|
+
AddFollowButton = "addFollowButton"
|
|
1638
1717
|
}
|
|
1639
1718
|
|
|
1640
1719
|
export declare enum ButtonState {
|
|
@@ -1764,6 +1843,7 @@ export interface WidgetsTagNameMap {
|
|
|
1764
1843
|
'blaze-button': BlazeButton;
|
|
1765
1844
|
'blaze-button-cta': BlazeCtaButton;
|
|
1766
1845
|
'blaze-call-to-action-button': BlazeCallToActionButton;
|
|
1846
|
+
'blaze-follow-button': BlazeFollowButton;
|
|
1767
1847
|
'blaze-typography': BlazeTypography;
|
|
1768
1848
|
'blaze-timer': BlazeTimer;
|
|
1769
1849
|
}
|
|
@@ -1810,6 +1890,7 @@ interface WidgetsTagNameOptionsMap {
|
|
|
1810
1890
|
'blaze-button': {};
|
|
1811
1891
|
'blaze-button-cta': {};
|
|
1812
1892
|
'blaze-call-to-action-button': {};
|
|
1893
|
+
'blaze-follow-button': {};
|
|
1813
1894
|
'blaze-typography': {};
|
|
1814
1895
|
}
|
|
1815
1896
|
export declare abstract class WidgetsFactory {
|
|
@@ -1869,6 +1950,7 @@ export declare const closedCaptionsOffIconSvg = "data:image/svg+xml;base64,PHN2Z
|
|
|
1869
1950
|
export declare const shareVideosIconSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjNWY2MzY4Ij48cGF0aCBkPSJNNjgwLTgwcS01MCAwLTg1LTM1dC0zNS04NXEwLTYgMy0yOEwyODItMzkycS0xNiAxNS0zNyAyMy41dC00NSA4LjVxLTUwIDAtODUtMzV0LTM1LTg1cTAtNTAgMzUtODV0ODUtMzVxMjQgMCA0NSA4LjV0MzcgMjMuNWwyODEtMTY0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eTI9IjMuOTM0MDNlLTA4IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjgiLz4KICAgICAgICA8bGluZSB5MT0iNS45NTcwNiIgeDI9IjEyIiB5Mj0iNS45NTcwNiIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS44Ii8+CiAgICAgIDwvc3ZnPg==";
|
|
1872
1954
|
|
|
1873
1955
|
export interface AccessibilityContext {
|
|
1874
1956
|
trigger: 'user' | 'auto' | 'navigation' | 'modal';
|
|
@@ -1912,6 +1994,7 @@ export interface IContentWidgetButtons {
|
|
|
1912
1994
|
prevStory?: HTMLElement;
|
|
1913
1995
|
nextMoment?: HTMLElement;
|
|
1914
1996
|
prevMoment?: HTMLElement;
|
|
1997
|
+
follow?: HTMLElement;
|
|
1915
1998
|
}
|
|
1916
1999
|
export interface IContentWidgetData {
|
|
1917
2000
|
id: string;
|
|
@@ -1921,6 +2004,7 @@ export interface IContentWidgetData {
|
|
|
1921
2004
|
isLiked?: boolean;
|
|
1922
2005
|
hasClosedCaptions?: boolean;
|
|
1923
2006
|
ctaText?: string;
|
|
2007
|
+
isFollowed?: boolean;
|
|
1924
2008
|
}
|
|
1925
2009
|
export interface IContentWidgetElements {
|
|
1926
2010
|
widget: HTMLElement;
|
|
@@ -1992,6 +2076,7 @@ export interface IBlazeSDKOptions {
|
|
|
1992
2076
|
layoutDirection?: LocaleDirectionType;
|
|
1993
2077
|
shouldAllowClosedCaptions?: boolean;
|
|
1994
2078
|
disableAutoLoadingContent?: boolean;
|
|
2079
|
+
followedEntities?: string[];
|
|
1995
2080
|
}
|
|
1996
2081
|
|
|
1997
2082
|
export interface IButtonPlayerNavigationConfig {
|
|
@@ -2063,6 +2148,10 @@ export interface IDrawable {
|
|
|
2063
2148
|
render: () => void;
|
|
2064
2149
|
}
|
|
2065
2150
|
|
|
2151
|
+
export interface IFollowingsManager {
|
|
2152
|
+
isFollowing(entityId: string): boolean;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2066
2155
|
export interface IHttpResponse<T = any> extends IResponse<T> {
|
|
2067
2156
|
httpStatus?: number;
|
|
2068
2157
|
}
|
|
@@ -2122,6 +2211,7 @@ export * from './data-source.interface';
|
|
|
2122
2211
|
export * from './database.interface';
|
|
2123
2212
|
export * from './device.interface';
|
|
2124
2213
|
export * from './drawable.interface';
|
|
2214
|
+
export * from './followings-manager.interface';
|
|
2125
2215
|
export * from './http-response.interface';
|
|
2126
2216
|
export * from './icons.interface';
|
|
2127
2217
|
export * from './logger.interface';
|
|
@@ -2404,6 +2494,7 @@ declare const ApiServiceClass_base: {
|
|
|
2404
2494
|
};
|
|
2405
2495
|
declare abstract class ApiServiceClass extends ApiServiceClass_base implements IService {
|
|
2406
2496
|
api: API;
|
|
2497
|
+
private analyticsUrlRotator?;
|
|
2407
2498
|
init(): Promise<void>;
|
|
2408
2499
|
private setAdsOnStories;
|
|
2409
2500
|
getStoriesByIds(options: GetByIdsOptions & {
|
|
@@ -2464,6 +2555,8 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
2464
2555
|
private getContentParamsByLabels;
|
|
2465
2556
|
private getContentParamsByIds;
|
|
2466
2557
|
private getContentParamsByRecommendations;
|
|
2558
|
+
initializeAnalyticsEndpoints(endpointUrls?: string): void;
|
|
2559
|
+
private getAnalyticsEndpoint;
|
|
2467
2560
|
}
|
|
2468
2561
|
export declare const ApiService: ApiServiceClass;
|
|
2469
2562
|
|
|
@@ -3247,6 +3340,24 @@ export type BlazeMomentsPlayerCtaStyle = {
|
|
|
3247
3340
|
fontFamily: string;
|
|
3248
3341
|
backgroundColor?: string;
|
|
3249
3342
|
borderColor?: string;
|
|
3343
|
+
isVisible: boolean;
|
|
3344
|
+
};
|
|
3345
|
+
type BlazeChipFollowStyle = {
|
|
3346
|
+
followedBackgroundColor: string;
|
|
3347
|
+
unfollowedBackgroundColor: string;
|
|
3348
|
+
color: string;
|
|
3349
|
+
};
|
|
3350
|
+
type BlazeAvatarFollowStyle = {
|
|
3351
|
+
borderWidth: string;
|
|
3352
|
+
followedBorderColor: string;
|
|
3353
|
+
unfollowedBorderColor: string;
|
|
3354
|
+
};
|
|
3355
|
+
export type BlazeMomentsPlayerFollowButtonStyle = {
|
|
3356
|
+
isVisible: boolean;
|
|
3357
|
+
variant: BlazeFollowButtonVariant;
|
|
3358
|
+
followEntityTypePriority?: BlazeSelectableEntityType[];
|
|
3359
|
+
avatar: BlazeAvatarFollowStyle;
|
|
3360
|
+
chip: BlazeChipFollowStyle;
|
|
3250
3361
|
};
|
|
3251
3362
|
type BlazeMomentsPlayerCTAPositioning = 'CTA_BELLOW_BOTTOM_BUTTONS_BOX' | 'CTA_NEXT_TO_BOTTOM_BUTTONS_BOX';
|
|
3252
3363
|
type BlazeMomentsPlayerCTAHorizontalAlignment = 'START' | 'CENTER' | 'END' | 'FULL_AVAILABLE_WIDTH';
|
|
@@ -3286,6 +3397,7 @@ export interface MomentPlayerStyle {
|
|
|
3286
3397
|
contentBoxHorizontalSpacing: string;
|
|
3287
3398
|
seekBar: BlazeMomentsPlayerSeekBarStyle;
|
|
3288
3399
|
ctaButton: BlazeMomentsPlayerCtaStyle;
|
|
3400
|
+
followButton: BlazeMomentsPlayerFollowButtonStyle;
|
|
3289
3401
|
}
|
|
3290
3402
|
export interface VideoPlayerStyle {
|
|
3291
3403
|
headingText: BlazeVideosPlayerHeadingTextStyle;
|
|
@@ -3318,6 +3430,7 @@ export interface BlazeVideosPlayerCtaStyle {
|
|
|
3318
3430
|
visibility: BlazeVideoPlayerVisibility;
|
|
3319
3431
|
borderColor: string;
|
|
3320
3432
|
horizontalAlignment: ButtonPositionType;
|
|
3433
|
+
isVisible: boolean;
|
|
3321
3434
|
}
|
|
3322
3435
|
export type BlazeVideosPlayerCtaIconStyle = {
|
|
3323
3436
|
position: 'START';
|
|
@@ -3341,6 +3454,7 @@ export interface CtaButtonStyle {
|
|
|
3341
3454
|
width: string;
|
|
3342
3455
|
height: string;
|
|
3343
3456
|
position: ButtonPositionType;
|
|
3457
|
+
isVisible: boolean;
|
|
3344
3458
|
icon: IconStyle;
|
|
3345
3459
|
}
|
|
3346
3460
|
export interface IconStyle {
|
|
@@ -3385,9 +3499,12 @@ export type CustomActionButtonOptions = {
|
|
|
3385
3499
|
buttonName: string;
|
|
3386
3500
|
onClick: (e: MouseEvent | Event, data: ContentEntities | null) => void;
|
|
3387
3501
|
};
|
|
3502
|
+
export type FollowButtonOptions = {
|
|
3503
|
+
onClick: (e: MouseEvent | Event, data: FollowingSharedContext) => void;
|
|
3504
|
+
};
|
|
3388
3505
|
export type ActionHandler = {
|
|
3389
3506
|
actionId: `${ActionHandlerId}`;
|
|
3390
|
-
options: CustomActionButtonOptions;
|
|
3507
|
+
options: CustomActionButtonOptions | FollowButtonOptions;
|
|
3391
3508
|
};
|
|
3392
3509
|
|
|
3393
3510
|
export type AnimationType = 'Growing' | 'Shrinking' | 'BottomToTop';
|
|
@@ -3840,6 +3957,16 @@ export type ElementType = WidgetElementType | ComponentsElementType;
|
|
|
3840
3957
|
|
|
3841
3958
|
export type EnvironmentType = 'prod' | 'uat' | 'local';
|
|
3842
3959
|
|
|
3960
|
+
export type BlazeFollowButtonVariant = 'icon' | 'text';
|
|
3961
|
+
export type FollowingSharedContext = {
|
|
3962
|
+
sourceId: string;
|
|
3963
|
+
sourceContentType: ContentType;
|
|
3964
|
+
newFollowingState: boolean;
|
|
3965
|
+
followEntity: Omit<BlazeFollowEntity, 'storageFile'>;
|
|
3966
|
+
};
|
|
3967
|
+
export type BlazeSelectableEntityType = 'Player' | 'Team' | 'Property' | 'FirstAvailable';
|
|
3968
|
+
export type BlazeFollowEntityType = Omit<BlazeSelectableEntityType, 'FirstAvailable'>;
|
|
3969
|
+
|
|
3843
3970
|
export type StoryGestureType = 'Swipe Up' | 'CTA Click';
|
|
3844
3971
|
export type MomentGestureType = 'CTA Click';
|
|
3845
3972
|
|
|
@@ -3890,6 +4017,7 @@ export * from './widget-view-options.type';
|
|
|
3890
4017
|
export * from './content-item.type';
|
|
3891
4018
|
export * from './play-content-options.type';
|
|
3892
4019
|
export * from './recommendations.type';
|
|
4020
|
+
export * from './follow-button.type';
|
|
3893
4021
|
|
|
3894
4022
|
export type EntitiesType = 'playerId' | 'teamId' | 'gameId' | 'roundId';
|
|
3895
4023
|
export type PerItemStyleOverrides = Partial<Record<EntitiesType, Array<{
|
|
@@ -4053,6 +4181,9 @@ export declare function transformContentsArray(items: ContentItem[]): BlazeConte
|
|
|
4053
4181
|
type CountryCode = typeof CountryCodes[number];
|
|
4054
4182
|
export declare function isValidCountryCode(countryCode: string): countryCode is CountryCode;
|
|
4055
4183
|
|
|
4184
|
+
export declare const getFollowEntityByPriority: (followEntityTypePriority?: BlazeSelectableEntityType[], followEntities?: BlazeFollowEntity[]) => BlazeFollowEntity | null;
|
|
4185
|
+
export declare const generateFollowStateForAnalytics: (entityId?: string, entityType?: BlazeFollowEntityType, followingsManager?: IFollowingsManager) => string | null;
|
|
4186
|
+
|
|
4056
4187
|
export declare function GuardNullOrEmpty(name: string, value: any): void;
|
|
4057
4188
|
export declare function isStory(content: IContent): content is IStory;
|
|
4058
4189
|
|
|
@@ -6249,6 +6380,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
6249
6380
|
headElement: BlazeDiv;
|
|
6250
6381
|
bodyElement: BlazeDiv;
|
|
6251
6382
|
ctaButtonElement: BlazeCtaButton;
|
|
6383
|
+
followButtonElement?: BlazeFollowButton;
|
|
6252
6384
|
isInit: boolean;
|
|
6253
6385
|
isActive: boolean;
|
|
6254
6386
|
isMomentPausedByPlayPauseButton: boolean;
|
|
@@ -6289,6 +6421,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
6289
6421
|
configureButtons(): Promise<void>;
|
|
6290
6422
|
appendButtonsContainer(): void;
|
|
6291
6423
|
handleMobileSpecificFeatures(): void;
|
|
6424
|
+
configureFollowButton(): void;
|
|
6292
6425
|
configureContentBody(): void;
|
|
6293
6426
|
appendBottomContainer(): void;
|
|
6294
6427
|
private updateLayoutPositioning;
|
|
@@ -6326,6 +6459,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
6326
6459
|
handleOnCustomActionButtonClick(e: MouseEvent, handlerOptions: CustomActionButtonOptions): void;
|
|
6327
6460
|
handleOnClose(): void;
|
|
6328
6461
|
handleOnLikeClick(): void;
|
|
6462
|
+
handleFollowAnalytics(data: FollowingSharedContext): void;
|
|
6329
6463
|
pause(): void;
|
|
6330
6464
|
resume(): void;
|
|
6331
6465
|
removeResumeButtonFromScreen(): void;
|