@wscsports/blaze-web-sdk 0.1.13 → 0.1.14

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wscsports/blaze-web-sdk",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -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;
@@ -875,11 +883,15 @@ declare const VideoCacheServiceClass_base: {
875
883
  declare abstract class VideoCacheServiceClass extends VideoCacheServiceClass_base implements IService {
876
884
  private cache;
877
885
  private cacheName;
886
+ private ongoingRequests;
878
887
  constructor();
879
888
  init(): Promise<void>;
880
889
  private fetchAndCache;
890
+ abortRequest(url: string): Promise<void>;
891
+ abortAllRequests(): Promise<void>;
881
892
  addCacheVideoByUrl(url: string): Promise<Response>;
882
893
  getCacheVideoByUrl(url: string): Promise<string>;
894
+ isFetchingVideo(url: string): boolean;
883
895
  isVideoCached(url: string): Promise<boolean>;
884
896
  deleteCacheVideoByUrl(url: string): Promise<boolean>;
885
897
  clearAllCache(): Promise<void>;
@@ -1350,6 +1362,8 @@ export declare function AttributeParser<TBase extends GHTMLElement>(Base: TBase)
1350
1362
 
1351
1363
  export type ClientPlatform = 'Web';
1352
1364
 
1365
+ export type Direction = 'UP' | 'DOWN' | 'RIGHT' | 'LEFT';
1366
+
1353
1367
  export type ComponentsElementType = 'blaze-alert' | 'blaze-toast' | 'blaze-chip' | 'blaze-image';
1354
1368
  export type WidgetElementType = 'blaze-sdk';
1355
1369
  export type ElementType = WidgetElementType | ComponentsElementType;
@@ -1358,6 +1372,7 @@ export type FetchPriorityType = 'low' | 'high' | 'auto';
1358
1372
 
1359
1373
  export * from './attribute-parser';
1360
1374
  export * from './client-platform.type';
1375
+ export * from './direction.type';
1361
1376
  export * from './element.type';
1362
1377
  export * from './fetch-priority.type';
1363
1378
  export * from './order.type';
@@ -1517,7 +1532,8 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
1517
1532
  disconnectedCallback(): void;
1518
1533
  set storyIds(value: string);
1519
1534
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
1520
- onResizeEvent(e: UIEvent): void;
1535
+ onResizeEvent(): void;
1536
+ handlePopState(_event: Event): void;
1521
1537
  addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
1522
1538
  setLabels(labels: string[]): void;
1523
1539
  getTheme(): IWidgetTheme;
@@ -1784,7 +1800,6 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
1784
1800
  exitPopup: HTMLElement;
1785
1801
  exitButton: HTMLElement;
1786
1802
  onClose: (() => void) | undefined;
1787
- onResize: (this: Window, ev: UIEvent) => any | undefined;
1788
1803
  hammer: HammerManager | null;
1789
1804
  isMultiTouch: boolean;
1790
1805
  constructor(parentWidget: HTMLElement);
@@ -1792,7 +1807,7 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
1792
1807
  setStories(stories: IStory[]): void;
1793
1808
  seek(id: string): void;
1794
1809
  onKeyDown(ev: KeyboardEvent): void;
1795
- close(): void;
1810
+ close(): Promise<void>;
1796
1811
  open(): void;
1797
1812
  play(): void;
1798
1813
  connectedCallback(): void;
@@ -1822,7 +1837,6 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
1822
1837
  background: HTMLCanvasElement;
1823
1838
  tmpBackground: HTMLCanvasElement;
1824
1839
  onClose: (() => void) | undefined;
1825
- onResize: (this: Window, ev: UIEvent) => any | undefined;
1826
1840
  listeners: EventsListener;
1827
1841
  backgroundAnimation?: Animation;
1828
1842
  firstTime: boolean;
@@ -1837,7 +1851,6 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
1837
1851
  private handlePanStart;
1838
1852
  private handlePanMove;
1839
1853
  private handlePanEnd;
1840
- private updateLocationStoryHash;
1841
1854
  private reverseAnimation;
1842
1855
  private cleanupHammer;
1843
1856
  renderBackground(): void;
@@ -1845,7 +1858,7 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
1845
1858
  fetch(labels: string, ordering?: OrderType): Promise<void>;
1846
1859
  setStories(stories: BlazeWidgetStory[]): void;
1847
1860
  close(): Promise<void>;
1848
- seek(id: string): void;
1861
+ seek(storyId: string): void;
1849
1862
  populatePrev(): Promise<void>;
1850
1863
  populateNext(): Promise<void>;
1851
1864
  resetPosition(): void;
@@ -1855,7 +1868,7 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
1855
1868
  prevAnimation(): AnimeTimelineInstance | undefined;
1856
1869
  onAnimationEnd(): void;
1857
1870
  blockInteractionWithUserInterface(): void;
1858
- closeWithAnimation(): void;
1871
+ closeWithAnimation(direction: Direction): void;
1859
1872
  goPrev(): void;
1860
1873
  goNext(): void;
1861
1874
  handleAnimation(distance: number, story: BlazeWidgetStory, currentAnimation?: AnimeInstance | null): void;
@@ -1938,7 +1951,7 @@ export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
1938
1951
  constructor();
1939
1952
  setData(data: IPage): void;
1940
1953
  loadPoster(): void;
1941
- load(): void;
1954
+ load(): Promise<void>;
1942
1955
  display(): void;
1943
1956
  hide(): void;
1944
1957
  unload(): Promise<void>;