@wscsports/blaze-web-sdk 0.1.72 → 0.1.76
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 +2 -2
- package/publish/index.d.ts +169 -42
- package/publish/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wscsports/blaze-web-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.76",
|
|
4
4
|
"main": "publish/index",
|
|
5
5
|
"types": "publish/index",
|
|
6
6
|
"files": [
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/animejs": "^3.1.7",
|
|
18
18
|
"@types/hammerjs": "^2.0.41",
|
|
19
|
-
"@types/lodash": "^4.14.195",
|
|
20
19
|
"@types/ua-parser-js": "^0.7.36",
|
|
21
20
|
"css-loader": "^6.8.1",
|
|
22
21
|
"html-webpack-plugin": "^5.5.3",
|
|
@@ -33,6 +32,7 @@
|
|
|
33
32
|
"dependencies": {
|
|
34
33
|
"animejs": "^3.2.1",
|
|
35
34
|
"hammerjs": "^2.0.8",
|
|
35
|
+
"intersection-observer": "^0.12.2",
|
|
36
36
|
"ua-parser-js": "^1.0.36"
|
|
37
37
|
}
|
|
38
38
|
}
|
package/publish/index.d.ts
CHANGED
|
@@ -109,7 +109,6 @@ export declare class URLManager {
|
|
|
109
109
|
static isBackWasCalled: boolean;
|
|
110
110
|
static resetLocation(): void;
|
|
111
111
|
static updateLocationStoryHash(story?: IStory): void;
|
|
112
|
-
static getPlayerTypeFromUrl(): "Widget" | "Share" | "SingleStory" | undefined;
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
export declare class BlazeAlert extends BaseWidget {
|
|
@@ -263,8 +262,18 @@ export declare enum WidgetAction {
|
|
|
263
262
|
Visible = "widget_visible",
|
|
264
263
|
Click = "widget_click"
|
|
265
264
|
}
|
|
265
|
+
export declare enum AdAction {
|
|
266
|
+
View = "ad_view",
|
|
267
|
+
Exit = "ad_exit",
|
|
268
|
+
Click = "ad_click"
|
|
269
|
+
}
|
|
270
|
+
export declare const StoryToAdActionMapper: {
|
|
271
|
+
story_page_start: AdAction;
|
|
272
|
+
story_page_exit: AdAction;
|
|
273
|
+
cta_click: AdAction;
|
|
274
|
+
};
|
|
266
275
|
type ExposedFields = {
|
|
267
|
-
[key in StoryAction | WidgetAction]?: string[];
|
|
276
|
+
[key in StoryAction | WidgetAction | AdAction]?: string[];
|
|
268
277
|
};
|
|
269
278
|
export declare const exposedFieldsByAction: ExposedFields;
|
|
270
279
|
|
|
@@ -286,6 +295,16 @@ export declare class Database implements IDatabase {
|
|
|
286
295
|
|
|
287
296
|
export * from './database';
|
|
288
297
|
|
|
298
|
+
interface IAdInfoConfiguration {
|
|
299
|
+
adLocationsIndexes: Array<number>;
|
|
300
|
+
isActive: boolean;
|
|
301
|
+
}
|
|
302
|
+
export interface IAdInfo {
|
|
303
|
+
path: string;
|
|
304
|
+
type: string;
|
|
305
|
+
configuration: IAdInfoConfiguration;
|
|
306
|
+
}
|
|
307
|
+
|
|
289
308
|
export interface IContent {
|
|
290
309
|
id: string;
|
|
291
310
|
title: string;
|
|
@@ -333,7 +352,7 @@ export interface IMoment extends IContent {
|
|
|
333
352
|
};
|
|
334
353
|
}
|
|
335
354
|
|
|
336
|
-
export interface
|
|
355
|
+
export interface IContentPage {
|
|
337
356
|
id: string;
|
|
338
357
|
type: 'Content';
|
|
339
358
|
index: number;
|
|
@@ -346,6 +365,16 @@ export interface IPage {
|
|
|
346
365
|
ignoreReadStatusForStory: boolean;
|
|
347
366
|
createTime: string;
|
|
348
367
|
}
|
|
368
|
+
export interface IAdPage {
|
|
369
|
+
id: string;
|
|
370
|
+
type: 'Ad';
|
|
371
|
+
duration: number;
|
|
372
|
+
hasViewed: boolean;
|
|
373
|
+
ignoreReadStatusForStory: boolean;
|
|
374
|
+
createTime: string;
|
|
375
|
+
adPath: string;
|
|
376
|
+
}
|
|
377
|
+
export type IPage = IAdPage | IContentPage;
|
|
349
378
|
|
|
350
379
|
export interface IRendition {
|
|
351
380
|
url: string;
|
|
@@ -356,6 +385,7 @@ export interface IStory extends IContent {
|
|
|
356
385
|
isLive: boolean;
|
|
357
386
|
pages: IPage[];
|
|
358
387
|
isAd: boolean;
|
|
388
|
+
adInfo?: IAdInfo;
|
|
359
389
|
}
|
|
360
390
|
|
|
361
391
|
export interface IThumbnail {
|
|
@@ -398,6 +428,7 @@ export * from './event.enum';
|
|
|
398
428
|
|
|
399
429
|
export interface WidgetsTagNameMap {
|
|
400
430
|
'blaze-sdk': BlazeWidgetSDK;
|
|
431
|
+
'blaze-widget-ad': BlazeWidgetStoryAd;
|
|
401
432
|
'blaze-widget-modal': BlazeWidgetModal;
|
|
402
433
|
'blaze-widget-item': BlazeWidgetItem;
|
|
403
434
|
'blaze-widget-layout': BlazeWidgetLayout;
|
|
@@ -425,6 +456,7 @@ export interface WidgetsTagNameMap {
|
|
|
425
456
|
}
|
|
426
457
|
interface WidgetsTagNameOptionsMap {
|
|
427
458
|
'blaze-sdk': {};
|
|
459
|
+
'blaze-widget-ad': {};
|
|
428
460
|
'blaze-widget-modal': {};
|
|
429
461
|
'blaze-widget-item': {};
|
|
430
462
|
'blaze-widget-layout': {};
|
|
@@ -495,6 +527,7 @@ export interface IBlazeSDKOptions {
|
|
|
495
527
|
doNotTrack?: boolean;
|
|
496
528
|
externalUserId?: string;
|
|
497
529
|
geoLocation?: string;
|
|
530
|
+
loadByStaticContent?: boolean;
|
|
498
531
|
}
|
|
499
532
|
|
|
500
533
|
export interface IDatabase {
|
|
@@ -574,6 +607,17 @@ export interface IWidgetView {
|
|
|
574
607
|
setDelegations: (delegates: Record<Delegation, EventListenerOrEventListenerObject>) => void;
|
|
575
608
|
}
|
|
576
609
|
|
|
610
|
+
declare const AdServiceClass_base: {
|
|
611
|
+
new (): {};
|
|
612
|
+
_instance: AdServiceClass;
|
|
613
|
+
getInstance(): AdServiceClass;
|
|
614
|
+
};
|
|
615
|
+
declare abstract class AdServiceClass extends AdServiceClass_base implements IService {
|
|
616
|
+
canRunAds: boolean;
|
|
617
|
+
init(): Promise<void>;
|
|
618
|
+
}
|
|
619
|
+
export declare const AdService: AdServiceClass;
|
|
620
|
+
|
|
577
621
|
declare const AlertServiceClass_base: {
|
|
578
622
|
new (): {};
|
|
579
623
|
_instance: AlertServiceClass;
|
|
@@ -585,16 +629,6 @@ declare abstract class AlertServiceClass extends AlertServiceClass_base implemen
|
|
|
585
629
|
}
|
|
586
630
|
export declare const AlertService: AlertServiceClass;
|
|
587
631
|
|
|
588
|
-
export declare enum AdAction {
|
|
589
|
-
Request = "ad_request",
|
|
590
|
-
Load = "ad_load",
|
|
591
|
-
Insert = "ad_insert",
|
|
592
|
-
View = "ad_view",
|
|
593
|
-
Click = "ad_click",
|
|
594
|
-
Exit = "ad_exit",
|
|
595
|
-
Pause = "ad_playback_pause",
|
|
596
|
-
Play = "ad_playback_play"
|
|
597
|
-
}
|
|
598
632
|
export declare enum SessionAction {
|
|
599
633
|
Start = "start",
|
|
600
634
|
End = "end"
|
|
@@ -611,6 +645,7 @@ declare abstract class AnalyticsServiceClass extends AnalyticsServiceClass_base
|
|
|
611
645
|
bulkEvent(body: Partial<AnalyticsEvent>[]): Promise<any>;
|
|
612
646
|
pushSessionEvent(action: SessionAction, body: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
613
647
|
pushStoryEvent(action: StoryAction, body: Partial<StoryEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
648
|
+
pushAdEvent(action: AdAction, body: Partial<AdEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
614
649
|
pushWidgetEvent(action: WidgetAction, body: Partial<WidgetEvent>, label?: string | undefined, referrer?: ReferringEventInfo | undefined): void;
|
|
615
650
|
setupEvent(category: Category, action: string, body: object, label?: string | undefined, referrer?: ReferringEventInfo | undefined): AnalyticsEvent;
|
|
616
651
|
}
|
|
@@ -618,6 +653,7 @@ export declare const AnalyticsService: AnalyticsServiceClass;
|
|
|
618
653
|
export declare enum Category {
|
|
619
654
|
Story = "story",
|
|
620
655
|
Widget = "widget",
|
|
656
|
+
Ad = "ad",
|
|
621
657
|
Session = "session"
|
|
622
658
|
}
|
|
623
659
|
declare class UserEventInfo {
|
|
@@ -667,6 +703,7 @@ export declare class ReferringEventInfo {
|
|
|
667
703
|
'referrer_page_type': string;
|
|
668
704
|
'referrer_page_url': string;
|
|
669
705
|
'referrer_page_domain': string;
|
|
706
|
+
'labels_expression': string;
|
|
670
707
|
'session_referrer_page_type': string;
|
|
671
708
|
'session_referrer_url': string;
|
|
672
709
|
'session_referrer_domain': string;
|
|
@@ -700,6 +737,7 @@ export declare class AnalyticsEvent {
|
|
|
700
737
|
'referring': ReferringEventInfo;
|
|
701
738
|
story: Partial<StoryEvent> | undefined;
|
|
702
739
|
widget: Partial<WidgetEvent> | undefined;
|
|
740
|
+
ad: Partial<AdEvent> | undefined;
|
|
703
741
|
}
|
|
704
742
|
export declare class StoryEvent {
|
|
705
743
|
'story_start_id': string;
|
|
@@ -718,10 +756,11 @@ export declare class StoryEvent {
|
|
|
718
756
|
'content_duration_viewed': number;
|
|
719
757
|
'story_page_duration': number;
|
|
720
758
|
'story_page_duration_viewed_percent': number;
|
|
759
|
+
'labels_expression': string;
|
|
721
760
|
'story_session_id': string;
|
|
722
761
|
'story_page_index': number;
|
|
723
762
|
'is_last_page': boolean;
|
|
724
|
-
'audio_state':
|
|
763
|
+
'audio_state': string;
|
|
725
764
|
'playback_action_method': 'Press' | 'Release' | 'Click';
|
|
726
765
|
}
|
|
727
766
|
export declare class WidgetEvent {
|
|
@@ -735,6 +774,7 @@ export declare class WidgetEvent {
|
|
|
735
774
|
'widget_size': string;
|
|
736
775
|
'widget_content_count': number;
|
|
737
776
|
'widget_content_list': string;
|
|
777
|
+
'labels_expression': string;
|
|
738
778
|
'content_id': string;
|
|
739
779
|
'content_name': string;
|
|
740
780
|
'content_version_id': string;
|
|
@@ -746,6 +786,26 @@ export declare class WidgetEvent {
|
|
|
746
786
|
'page_type': string;
|
|
747
787
|
'page_size': string;
|
|
748
788
|
}
|
|
789
|
+
export declare class AdEvent {
|
|
790
|
+
'advertiser_id': string;
|
|
791
|
+
'advertiser_name': string;
|
|
792
|
+
'campaign_id': string;
|
|
793
|
+
'campaign_name': string;
|
|
794
|
+
'ad_server': string;
|
|
795
|
+
'story_id': string;
|
|
796
|
+
'story_title': string;
|
|
797
|
+
'ad_insertion_logic': string;
|
|
798
|
+
'ad_index': string;
|
|
799
|
+
'ad_start_trigger': string;
|
|
800
|
+
'ad_exit_trigger': string;
|
|
801
|
+
'ad_duration': string;
|
|
802
|
+
'ad_duration_viewed_percent': string;
|
|
803
|
+
'playback_action_method': string;
|
|
804
|
+
'audio_state': string;
|
|
805
|
+
'skip_config': string;
|
|
806
|
+
'content_type': string;
|
|
807
|
+
'ad_path': string;
|
|
808
|
+
}
|
|
749
809
|
|
|
750
810
|
declare const ApiServiceClass_base: {
|
|
751
811
|
new (): {};
|
|
@@ -755,21 +815,31 @@ declare const ApiServiceClass_base: {
|
|
|
755
815
|
declare abstract class ApiServiceClass extends ApiServiceClass_base implements IService {
|
|
756
816
|
api: API;
|
|
757
817
|
init(): Promise<void>;
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
totalItems: number;
|
|
818
|
+
private setAdsOnStories;
|
|
819
|
+
getStoriesByIds(storyIds: string[], orderType?: OrderType): Promise<{
|
|
761
820
|
result: IStory[];
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
821
|
+
data: {
|
|
822
|
+
assetsExpiryTime: string;
|
|
823
|
+
totalItems: number;
|
|
824
|
+
result: IStory[];
|
|
825
|
+
};
|
|
826
|
+
error?: Error | undefined;
|
|
827
|
+
}>;
|
|
828
|
+
getStories(labels: string, orderType: OrderType, maxItemsSize?: number): Promise<{
|
|
766
829
|
result: IStory[];
|
|
767
|
-
|
|
830
|
+
data: {
|
|
831
|
+
assetsExpiryTime: string;
|
|
832
|
+
totalItems: number;
|
|
833
|
+
result: IStory[];
|
|
834
|
+
};
|
|
835
|
+
error?: Error | undefined;
|
|
836
|
+
}>;
|
|
768
837
|
getShorts(labels: string, orderType: OrderType, maxItemsSize?: number): Promise<IResponse<{
|
|
769
838
|
assetsExpiryTime: string;
|
|
770
839
|
totalItems: number;
|
|
771
840
|
result: IMoment[];
|
|
772
841
|
}>>;
|
|
842
|
+
getStaticStories(): Promise<IStory | null>;
|
|
773
843
|
preview(storyId: string, publishedOnly?: boolean): Promise<IResponse<IStory & {
|
|
774
844
|
status: number;
|
|
775
845
|
}>>;
|
|
@@ -794,6 +864,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
794
864
|
private _doNotTrack;
|
|
795
865
|
private _externalUserId;
|
|
796
866
|
private _geoLocation;
|
|
867
|
+
private _staticContent;
|
|
797
868
|
protected constructor();
|
|
798
869
|
init(options: IBlazeSDKOptions): Promise<void>;
|
|
799
870
|
private _urls;
|
|
@@ -809,6 +880,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
809
880
|
set doNotTrack(value: boolean);
|
|
810
881
|
get geoLocation(): string;
|
|
811
882
|
set geoLocation(value: string);
|
|
883
|
+
get staticContent(): boolean;
|
|
884
|
+
set staticContent(value: boolean);
|
|
812
885
|
get apiUrl(): string;
|
|
813
886
|
get apiKey(): string;
|
|
814
887
|
get previewUrl(): string;
|
|
@@ -1462,12 +1535,9 @@ export type OrderType = 'Manual' | 'AtoZ' | 'ZtoA' | 'RecentlyUpdatedFirst' | 'R
|
|
|
1462
1535
|
export declare const PlayTypeArray: readonly ["Widget", "Share", "SingleStory"];
|
|
1463
1536
|
export type PlayType = typeof PlayTypeArray[number];
|
|
1464
1537
|
|
|
1465
|
-
export type PositionInsideType = 'insideTopLeft' | 'insideTopRight' | 'insideMiddle' | 'insideBottomRight' | 'insideBottomLeft' | 'insideBottomMiddle' | 'insideMiddleLeft' | 'insideMiddleRight';
|
|
1538
|
+
export type PositionInsideType = 'insideTopLeft' | 'insideTopRight' | 'insideMiddleTop' | 'insideMiddle' | 'insideBottomRight' | 'insideBottomLeft' | 'insideBottomMiddle' | 'insideMiddleLeft' | 'insideMiddleRight';
|
|
1466
1539
|
export type PositionOutsideType = 'outsideUnder' | 'outsideBelow' | 'outsideAbove' | 'outsideTop' | 'outsideTopLeft' | 'outsideTopRight' | 'outsideBottomLeft' | 'outsideBottomRight' | 'outsideBottom' | 'outsideRight' | 'outsideLeft';
|
|
1467
1540
|
export type PositionType = PositionInsideType | PositionOutsideType;
|
|
1468
|
-
export type PositionCircleRowLabelType = 'outsideBelow' | 'outsideAbove';
|
|
1469
|
-
export type PositionRectangleRowLabelType = PositionCircleRowLabelType | PositionInsideType;
|
|
1470
|
-
export type PositionRectangleRowHorizontalLabelType = PositionInsideType;
|
|
1471
1541
|
|
|
1472
1542
|
export type SeverityType = 'error' | 'warning' | 'info' | 'success';
|
|
1473
1543
|
|
|
@@ -1475,10 +1545,10 @@ export type SizeType = 'small' | 'medium' | 'large';
|
|
|
1475
1545
|
|
|
1476
1546
|
export type ThumbnailApiType = 'SquareIcon' | 'VerticalTwoByThree' | 'MainThumbnail';
|
|
1477
1547
|
export type ThumbnailType = 'SQUARE_ICON' | 'VERTICAL_TWO_BY_THREE' | 'CUSTOM';
|
|
1478
|
-
export type ThumbnailShape = '
|
|
1548
|
+
export type ThumbnailShape = 'Circle' | 'Rectangle';
|
|
1479
1549
|
export declare function thumbnailMapping(thumbnailType: ThumbnailType): ThumbnailApiType;
|
|
1480
1550
|
|
|
1481
|
-
export type WidgetType = '
|
|
1551
|
+
export type WidgetType = 'Row' | 'Grid';
|
|
1482
1552
|
|
|
1483
1553
|
interface ChipSizeOptions {
|
|
1484
1554
|
statusLiveStyle: IndicatorStyle;
|
|
@@ -1487,6 +1557,11 @@ interface ChipSizeOptions {
|
|
|
1487
1557
|
statusUnreadStyle: IndicatorStyle;
|
|
1488
1558
|
}
|
|
1489
1559
|
export declare function getChipSize(options: ChipSizeOptions): DOMRect;
|
|
1560
|
+
export declare function getMaxChipSize(layout: LayoutStyle): DOMRect;
|
|
1561
|
+
export declare function calculateChipSize(statusIndicatorPosition: PositionType, layoutStyle: LayoutStyle): {
|
|
1562
|
+
chipHeight: number;
|
|
1563
|
+
chipWidth: number;
|
|
1564
|
+
};
|
|
1490
1565
|
|
|
1491
1566
|
export declare function delay(ms: number): Promise<void>;
|
|
1492
1567
|
|
|
@@ -1522,6 +1597,19 @@ export * from './guard.utils';
|
|
|
1522
1597
|
export * from './helper';
|
|
1523
1598
|
export * from './regex.utils';
|
|
1524
1599
|
export * from './stopwatch';
|
|
1600
|
+
export * from './position.utils';
|
|
1601
|
+
|
|
1602
|
+
export declare function calculatePosition(statusIndicatorPosition: PositionType): {
|
|
1603
|
+
isOutside: boolean;
|
|
1604
|
+
isInside: boolean;
|
|
1605
|
+
isTop: boolean;
|
|
1606
|
+
isMiddle: boolean;
|
|
1607
|
+
isBottom: boolean;
|
|
1608
|
+
isBelow: boolean;
|
|
1609
|
+
isAbove: boolean;
|
|
1610
|
+
isLeft: boolean;
|
|
1611
|
+
isRight: boolean;
|
|
1612
|
+
};
|
|
1525
1613
|
|
|
1526
1614
|
export declare const RegexHash: RegExp;
|
|
1527
1615
|
export declare const RegexHashPlayType: RegExp;
|
|
@@ -1555,6 +1643,37 @@ export * from './widget-story-player';
|
|
|
1555
1643
|
export * from './widget-story-preview';
|
|
1556
1644
|
export * from './widget-story-video';
|
|
1557
1645
|
|
|
1646
|
+
export declare class BlazeWidgetStoryAd extends BlazeWidgetStoryBase {
|
|
1647
|
+
data: IPage | undefined;
|
|
1648
|
+
private isCurrectlyDisplay;
|
|
1649
|
+
private adContainer;
|
|
1650
|
+
private placeholderContainer;
|
|
1651
|
+
private googletag;
|
|
1652
|
+
private isMuted;
|
|
1653
|
+
private failToLoadTimeout?;
|
|
1654
|
+
constructor(storyParent: BlazeWidgetStory);
|
|
1655
|
+
connectedCallback(): void;
|
|
1656
|
+
disconnectedCallback(): void;
|
|
1657
|
+
render(): void;
|
|
1658
|
+
get currentTime(): number;
|
|
1659
|
+
set currentTime(value: number);
|
|
1660
|
+
get duration(): number;
|
|
1661
|
+
get progress(): number;
|
|
1662
|
+
set muted(isMuted: boolean);
|
|
1663
|
+
getAdIframeRef(): HTMLIFrameElement | null;
|
|
1664
|
+
changeAdMutedState(isMuted: boolean): void;
|
|
1665
|
+
setData(data: IPage): void;
|
|
1666
|
+
play(): void;
|
|
1667
|
+
get paused(): boolean;
|
|
1668
|
+
pause(): void;
|
|
1669
|
+
removeLoader(): void;
|
|
1670
|
+
loadPoster(): void;
|
|
1671
|
+
hide(): void;
|
|
1672
|
+
display(onFail?: () => void): void;
|
|
1673
|
+
mainElement(): CanvasImageSource;
|
|
1674
|
+
private initStyles;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1558
1677
|
export interface BlazeWidgetItemOptions {
|
|
1559
1678
|
theme: IWidgetTheme;
|
|
1560
1679
|
content: IStory;
|
|
@@ -1598,11 +1717,6 @@ export declare class BlazeWidgetItem extends BaseWidget {
|
|
|
1598
1717
|
private updateInsideLabelStyles;
|
|
1599
1718
|
private updateOutsideLabelStyles;
|
|
1600
1719
|
private updateThumbnailStyles;
|
|
1601
|
-
getMaxChipSize(): DOMRect;
|
|
1602
|
-
get chipDimenssions(): {
|
|
1603
|
-
chipWidth: number;
|
|
1604
|
-
chipHeight: number;
|
|
1605
|
-
};
|
|
1606
1720
|
private updateChipStyles;
|
|
1607
1721
|
setTheme(theme: IWidgetTheme): void;
|
|
1608
1722
|
setChipStyle(): void;
|
|
@@ -1634,14 +1748,17 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
1634
1748
|
preset: IWidgetTheme | undefined;
|
|
1635
1749
|
thumbnailWidth: number | undefined;
|
|
1636
1750
|
thumbnailHeight: number | undefined;
|
|
1751
|
+
widgetHeight: number;
|
|
1752
|
+
parentHeight: number | undefined;
|
|
1753
|
+
intersectionObserver: IntersectionObserver;
|
|
1754
|
+
heightObserver: MutationObserver;
|
|
1637
1755
|
reloadTimeout: NodeJS.Timeout | undefined;
|
|
1638
1756
|
analyticsStack: Record<WidgetAction, boolean>;
|
|
1639
|
-
intersectionObserver: IntersectionObserver;
|
|
1640
1757
|
onResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
1641
|
-
isWidgetReload: boolean | undefined;
|
|
1642
|
-
widgetHeight: number;
|
|
1643
1758
|
constructor();
|
|
1759
|
+
handleHeightChangeMutation(mutationsList: MutationRecord[]): void;
|
|
1644
1760
|
connectedCallback(): void;
|
|
1761
|
+
getParentHeightWithoutPadding(): number | null;
|
|
1645
1762
|
disconnectedCallback(): void;
|
|
1646
1763
|
set storyIds(value: string);
|
|
1647
1764
|
setContentIds(storyIds: string[]): void;
|
|
@@ -1665,6 +1782,11 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
1665
1782
|
loadStories(): Promise<void>;
|
|
1666
1783
|
private get theme();
|
|
1667
1784
|
render(): void;
|
|
1785
|
+
calculateLabelSizes(labelStyle: LabelStyle, lineNumber: number): {
|
|
1786
|
+
labelWidth: number | "auto";
|
|
1787
|
+
labelAdditionalWidth: number;
|
|
1788
|
+
labelAdditionalHeight: number;
|
|
1789
|
+
};
|
|
1668
1790
|
maxSize(): number;
|
|
1669
1791
|
event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
1670
1792
|
isReadByLastUnIgnoredPageStatus(story: IStory): boolean;
|
|
@@ -1672,7 +1794,6 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
1672
1794
|
reorderWidgets(): void;
|
|
1673
1795
|
connectWidgets(): void;
|
|
1674
1796
|
get thumbnailShape(): ThumbnailShape;
|
|
1675
|
-
getMaxChipSize(): DOMRect;
|
|
1676
1797
|
widgetType(): WidgetType;
|
|
1677
1798
|
}
|
|
1678
1799
|
|
|
@@ -1826,7 +1947,7 @@ export declare class BlazeWidgetScrollable extends BaseWidget {
|
|
|
1826
1947
|
}
|
|
1827
1948
|
|
|
1828
1949
|
export declare class BlazeWidgetSDK extends BaseWidget {
|
|
1829
|
-
|
|
1950
|
+
modalStory: BlazeWidgetStoryModal | undefined;
|
|
1830
1951
|
onResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
1831
1952
|
static get observedAttributes(): string[];
|
|
1832
1953
|
constructor();
|
|
@@ -1834,10 +1955,13 @@ export declare class BlazeWidgetSDK extends BaseWidget {
|
|
|
1834
1955
|
disconnectedCallback(): void;
|
|
1835
1956
|
onResize(): void;
|
|
1836
1957
|
loadStoriesByHash(storyIds: string): Promise<void>;
|
|
1958
|
+
loadStoriesByStaticContent(): Promise<void>;
|
|
1837
1959
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): Promise<void>;
|
|
1838
1960
|
private getConfigAttributes;
|
|
1839
1961
|
private initialize;
|
|
1962
|
+
private injectToHead;
|
|
1840
1963
|
private injectFontResource;
|
|
1964
|
+
private injectGoogleTag;
|
|
1841
1965
|
}
|
|
1842
1966
|
|
|
1843
1967
|
export interface IShareButton {
|
|
@@ -1877,7 +2001,7 @@ export declare class BlazeWidgetStoryBase extends HTMLElement {
|
|
|
1877
2001
|
removeLoader(): any;
|
|
1878
2002
|
load(): void;
|
|
1879
2003
|
unload(): void;
|
|
1880
|
-
display(): void;
|
|
2004
|
+
display(onFail?: () => void): void;
|
|
1881
2005
|
hide(): void;
|
|
1882
2006
|
set muted(value: boolean);
|
|
1883
2007
|
get duration(): number;
|
|
@@ -1991,7 +2115,7 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
|
|
|
1991
2115
|
goNext(): void;
|
|
1992
2116
|
handleAnimation(distance: number, story: BlazeWidgetStory, currentAnimation?: AnimeInstance | null): void;
|
|
1993
2117
|
onSmallGestures(currentAnimation: AnimeInstance, currentStory: BlazeWidgetStory): void;
|
|
1994
|
-
onKeyDown(ev: KeyboardEvent):
|
|
2118
|
+
onKeyDown(ev: KeyboardEvent): false | undefined;
|
|
1995
2119
|
render(): void;
|
|
1996
2120
|
}
|
|
1997
2121
|
|
|
@@ -2125,7 +2249,7 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2125
2249
|
widgetParent: BlazeWidgetItem;
|
|
2126
2250
|
playCallback: any;
|
|
2127
2251
|
sessionId: string;
|
|
2128
|
-
startTrigger: 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | '';
|
|
2252
|
+
startTrigger: 'Widget' | 'Deeplink' | 'Swipe' | 'Skip' | 'Static Load' | '';
|
|
2129
2253
|
exitTrigger: 'Swipe' | 'Swipe Down' | 'Skip' | 'Close Button' | 'CTA Click' | 'Escape Button' | '';
|
|
2130
2254
|
navigationType: 'Automatic' | 'Manual' | undefined;
|
|
2131
2255
|
navigationDirection: 'Forwards' | 'Backwards' | undefined;
|
|
@@ -2139,10 +2263,13 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2139
2263
|
isNavigationPending: boolean;
|
|
2140
2264
|
navigationTimeout: NodeJS.Timeout | null;
|
|
2141
2265
|
lastPageIndexToResume: number;
|
|
2266
|
+
elementsToHideOnAds: HTMLElement[];
|
|
2267
|
+
muteStateBeforeAd: 'mute' | 'unmute' | 'no-ad';
|
|
2142
2268
|
constructor();
|
|
2143
2269
|
onShareClick(): Promise<void>;
|
|
2144
2270
|
updateChip(): void;
|
|
2145
2271
|
setTheme(storyPlayerStyle: StoryPlayerStyle): void;
|
|
2272
|
+
adjustAdView(): void;
|
|
2146
2273
|
updatePlayerButtonIcons(): void;
|
|
2147
2274
|
onCtaClick(event: Event): boolean;
|
|
2148
2275
|
playToggle(): void;
|
|
@@ -2164,7 +2291,7 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2164
2291
|
removeFromCache(): void;
|
|
2165
2292
|
load(): void;
|
|
2166
2293
|
play(): void;
|
|
2167
|
-
event(action: StoryAction,
|
|
2294
|
+
event(action: StoryAction, storyData: Partial<StoryEvent>, label?: string | undefined): void;
|
|
2168
2295
|
connectedCallback(): void;
|
|
2169
2296
|
onShareModalClose(): void;
|
|
2170
2297
|
onShareModalButtonClick(shareButton: BlazeShareButton): Promise<void>;
|