@wscsports/blaze-web-sdk 0.1.13 → 0.1.15
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 +34 -13
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare abstract class BaseWidget extends HTMLElement {
|
|
|
45
45
|
protected _animationDuration: number;
|
|
46
46
|
constructor();
|
|
47
47
|
getAttribute<T = boolean | string | number>(qualifiedName: string): T;
|
|
48
|
-
setStyle<T extends keyof CSSStyleDeclaration>(styles: Record<T, string | null>): void;
|
|
48
|
+
setStyle<T extends keyof CSSStyleDeclaration | string>(styles: Record<T, string | null>): void;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export declare class EventsListener {
|
|
@@ -65,6 +65,7 @@ export * from './events-listener';
|
|
|
65
65
|
export * from './long-press.handler';
|
|
66
66
|
export * from './singleton.class';
|
|
67
67
|
export * from './throttle';
|
|
68
|
+
export * from './url';
|
|
68
69
|
|
|
69
70
|
export interface ILongPressHandlerOptions {
|
|
70
71
|
onStart: () => void;
|
|
@@ -98,6 +99,13 @@ export interface ResizeEvent extends Event {
|
|
|
98
99
|
}
|
|
99
100
|
export declare function throttle<T extends Event>(func: EventHandler<T>, delay: number): (event: T) => void;
|
|
100
101
|
|
|
102
|
+
export declare class URLManager {
|
|
103
|
+
static isUpdateLocationByScript: boolean;
|
|
104
|
+
static isBackWasCalled: boolean;
|
|
105
|
+
static resetLocation(): void;
|
|
106
|
+
static updateLocationStoryHash(story?: IStory): void;
|
|
107
|
+
}
|
|
108
|
+
|
|
101
109
|
export declare class BlazeAlert extends BaseWidget {
|
|
102
110
|
titleContainer: HTMLDivElement;
|
|
103
111
|
textContainer: HTMLDivElement;
|
|
@@ -342,7 +350,11 @@ export declare enum ErrorCode {
|
|
|
342
350
|
FailedLoadingMoments = 110,
|
|
343
351
|
FailedEnrichMoments = 111,
|
|
344
352
|
VisualViewportScaled = 150,
|
|
345
|
-
VideoError = 200
|
|
353
|
+
VideoError = 200,
|
|
354
|
+
PreviewStoryNotFound = 300,
|
|
355
|
+
PreviewStoryLoadFailed = 301,
|
|
356
|
+
PreviewMomentNotFound = 310,
|
|
357
|
+
PreviewMomentLoadFailed = 311
|
|
346
358
|
}
|
|
347
359
|
|
|
348
360
|
export declare enum Delegation {
|
|
@@ -707,7 +719,11 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
707
719
|
totalItems: number;
|
|
708
720
|
result: IMoment[];
|
|
709
721
|
}>>;
|
|
710
|
-
preview(storyId: string, publishedOnly?: boolean): Promise<IResponse<
|
|
722
|
+
preview(storyId: string, publishedOnly?: boolean): Promise<IResponse<{
|
|
723
|
+
assetsExpiryTime: string;
|
|
724
|
+
totalItems: number;
|
|
725
|
+
result: IStory[];
|
|
726
|
+
}>>;
|
|
711
727
|
preivewMoment(momentId: string, publishedOnly?: boolean): Promise<IResponse<any>>;
|
|
712
728
|
analyticsEvents(body: Partial<AnalyticsEvent>[]): Promise<IResponse<unknown>>;
|
|
713
729
|
}
|
|
@@ -737,7 +753,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
737
753
|
get analyticsApiUrl(): string;
|
|
738
754
|
get apiUrl(): string;
|
|
739
755
|
get apiKey(): string;
|
|
740
|
-
get previewUrl(): string
|
|
756
|
+
get previewUrl(): string;
|
|
741
757
|
get previewMomentsUrl(): string;
|
|
742
758
|
}
|
|
743
759
|
export declare const ConfigService: ConfigServiceClass;
|
|
@@ -875,11 +891,15 @@ declare const VideoCacheServiceClass_base: {
|
|
|
875
891
|
declare abstract class VideoCacheServiceClass extends VideoCacheServiceClass_base implements IService {
|
|
876
892
|
private cache;
|
|
877
893
|
private cacheName;
|
|
894
|
+
private ongoingRequests;
|
|
878
895
|
constructor();
|
|
879
896
|
init(): Promise<void>;
|
|
880
897
|
private fetchAndCache;
|
|
898
|
+
abortRequest(url: string): Promise<void>;
|
|
899
|
+
abortAllRequests(): Promise<void>;
|
|
881
900
|
addCacheVideoByUrl(url: string): Promise<Response>;
|
|
882
901
|
getCacheVideoByUrl(url: string): Promise<string>;
|
|
902
|
+
isFetchingVideo(url: string): boolean;
|
|
883
903
|
isVideoCached(url: string): Promise<boolean>;
|
|
884
904
|
deleteCacheVideoByUrl(url: string): Promise<boolean>;
|
|
885
905
|
clearAllCache(): Promise<void>;
|
|
@@ -1350,6 +1370,8 @@ export declare function AttributeParser<TBase extends GHTMLElement>(Base: TBase)
|
|
|
1350
1370
|
|
|
1351
1371
|
export type ClientPlatform = 'Web';
|
|
1352
1372
|
|
|
1373
|
+
export type Direction = 'UP' | 'DOWN' | 'RIGHT' | 'LEFT';
|
|
1374
|
+
|
|
1353
1375
|
export type ComponentsElementType = 'blaze-alert' | 'blaze-toast' | 'blaze-chip' | 'blaze-image';
|
|
1354
1376
|
export type WidgetElementType = 'blaze-sdk';
|
|
1355
1377
|
export type ElementType = WidgetElementType | ComponentsElementType;
|
|
@@ -1358,6 +1380,7 @@ export type FetchPriorityType = 'low' | 'high' | 'auto';
|
|
|
1358
1380
|
|
|
1359
1381
|
export * from './attribute-parser';
|
|
1360
1382
|
export * from './client-platform.type';
|
|
1383
|
+
export * from './direction.type';
|
|
1361
1384
|
export * from './element.type';
|
|
1362
1385
|
export * from './fetch-priority.type';
|
|
1363
1386
|
export * from './order.type';
|
|
@@ -1517,7 +1540,8 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
1517
1540
|
disconnectedCallback(): void;
|
|
1518
1541
|
set storyIds(value: string);
|
|
1519
1542
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
1520
|
-
onResizeEvent(
|
|
1543
|
+
onResizeEvent(): void;
|
|
1544
|
+
handlePopState(_event: Event): void;
|
|
1521
1545
|
addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
1522
1546
|
setLabels(labels: string[]): void;
|
|
1523
1547
|
getTheme(): IWidgetTheme;
|
|
@@ -1546,7 +1570,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
1546
1570
|
widgetType(): 'row' | 'grid';
|
|
1547
1571
|
}
|
|
1548
1572
|
|
|
1549
|
-
export declare class BlazeWidgetModal extends
|
|
1573
|
+
export declare class BlazeWidgetModal extends BaseWidget {
|
|
1550
1574
|
isOpen: boolean;
|
|
1551
1575
|
constructor();
|
|
1552
1576
|
connectedCallback(): void;
|
|
@@ -1784,7 +1808,6 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
1784
1808
|
exitPopup: HTMLElement;
|
|
1785
1809
|
exitButton: HTMLElement;
|
|
1786
1810
|
onClose: (() => void) | undefined;
|
|
1787
|
-
onResize: (this: Window, ev: UIEvent) => any | undefined;
|
|
1788
1811
|
hammer: HammerManager | null;
|
|
1789
1812
|
isMultiTouch: boolean;
|
|
1790
1813
|
constructor(parentWidget: HTMLElement);
|
|
@@ -1792,7 +1815,7 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
1792
1815
|
setStories(stories: IStory[]): void;
|
|
1793
1816
|
seek(id: string): void;
|
|
1794
1817
|
onKeyDown(ev: KeyboardEvent): void;
|
|
1795
|
-
close(): void
|
|
1818
|
+
close(): Promise<void>;
|
|
1796
1819
|
open(): void;
|
|
1797
1820
|
play(): void;
|
|
1798
1821
|
connectedCallback(): void;
|
|
@@ -1822,7 +1845,6 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
|
|
|
1822
1845
|
background: HTMLCanvasElement;
|
|
1823
1846
|
tmpBackground: HTMLCanvasElement;
|
|
1824
1847
|
onClose: (() => void) | undefined;
|
|
1825
|
-
onResize: (this: Window, ev: UIEvent) => any | undefined;
|
|
1826
1848
|
listeners: EventsListener;
|
|
1827
1849
|
backgroundAnimation?: Animation;
|
|
1828
1850
|
firstTime: boolean;
|
|
@@ -1837,7 +1859,6 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
|
|
|
1837
1859
|
private handlePanStart;
|
|
1838
1860
|
private handlePanMove;
|
|
1839
1861
|
private handlePanEnd;
|
|
1840
|
-
private updateLocationStoryHash;
|
|
1841
1862
|
private reverseAnimation;
|
|
1842
1863
|
private cleanupHammer;
|
|
1843
1864
|
renderBackground(): void;
|
|
@@ -1845,7 +1866,7 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
|
|
|
1845
1866
|
fetch(labels: string, ordering?: OrderType): Promise<void>;
|
|
1846
1867
|
setStories(stories: BlazeWidgetStory[]): void;
|
|
1847
1868
|
close(): Promise<void>;
|
|
1848
|
-
seek(
|
|
1869
|
+
seek(storyId: string): void;
|
|
1849
1870
|
populatePrev(): Promise<void>;
|
|
1850
1871
|
populateNext(): Promise<void>;
|
|
1851
1872
|
resetPosition(): void;
|
|
@@ -1855,7 +1876,7 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
|
|
|
1855
1876
|
prevAnimation(): AnimeTimelineInstance | undefined;
|
|
1856
1877
|
onAnimationEnd(): void;
|
|
1857
1878
|
blockInteractionWithUserInterface(): void;
|
|
1858
|
-
closeWithAnimation(): void;
|
|
1879
|
+
closeWithAnimation(direction: Direction): void;
|
|
1859
1880
|
goPrev(): void;
|
|
1860
1881
|
goNext(): void;
|
|
1861
1882
|
handleAnimation(distance: number, story: BlazeWidgetStory, currentAnimation?: AnimeInstance | null): void;
|
|
@@ -1938,7 +1959,7 @@ export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
|
|
|
1938
1959
|
constructor();
|
|
1939
1960
|
setData(data: IPage): void;
|
|
1940
1961
|
loadPoster(): void;
|
|
1941
|
-
load(): void
|
|
1962
|
+
load(): Promise<void>;
|
|
1942
1963
|
display(): void;
|
|
1943
1964
|
hide(): void;
|
|
1944
1965
|
unload(): Promise<void>;
|