@wscsports/blaze-web-sdk 0.1.92 → 0.1.94

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.92",
3
+ "version": "0.1.94",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -140,8 +140,12 @@ export declare function throttle<T extends Event>(func: EventHandler<T>, _delay:
140
140
  export declare class URLManager {
141
141
  static isUpdateLocationByScript: boolean;
142
142
  static isBackWasCalled: boolean;
143
+ static resetLocationAfterStoryClose(): void;
143
144
  static resetLocation(): void;
144
145
  static updateLocationStoryHash(story?: IStory): void;
146
+ static getHashMatch(): RegExpMatchArray | null;
147
+ static getHash(): string;
148
+ static updateStoryInHash(story: IStory): void;
145
149
  }
146
150
 
147
151
  export declare class BlazeAlert extends BaseWidget {
@@ -676,6 +680,7 @@ export interface IBlazeSDKOptions {
676
680
  geoLocation?: string;
677
681
  staticContent?: boolean;
678
682
  runInShadowDom?: boolean;
683
+ shouldModifyUrlWithStoryId?: boolean;
679
684
  }
680
685
 
681
686
  export interface IDatabase {
@@ -762,6 +767,7 @@ export interface IWidgetViewOptionsBase {
762
767
  delegates?: Record<Delegation, EventListenerOrEventListenerObject>;
763
768
  labelsPriority?: string;
764
769
  perItemStyleOverrides?: PerItemStyleOverrides;
770
+ shouldOrderWidgetByReadStatus?: boolean;
765
771
  }
766
772
  export interface IWidgetViewOptionsWithLabels extends IWidgetViewOptionsBase {
767
773
  labels: string | string[] | BlazeWidgetLabel;
@@ -776,15 +782,18 @@ export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptio
776
782
  export interface IWidgetView {
777
783
  setTheme: (theme: IWidgetTheme) => void;
778
784
  getTheme: () => IWidgetTheme;
779
- setLabels: (labels: string | string[] | BlazeWidgetLabel) => void;
780
- setLabelsPriority: (labelsPriority: string) => void;
781
- setContentIds: (storyIds: string[]) => void;
785
+ setLabels: (labels: string | string[] | BlazeWidgetLabel, options?: ISetWidgetOptions) => void;
786
+ setLabelsPriority: (labelsPriority: string, options?: ISetWidgetOptions) => void;
787
+ setContentIds: (storyIds: string[], options?: ISetWidgetOptions) => void;
782
788
  reload: () => void;
783
789
  updateWidgetUI: () => void;
784
790
  setMaxItemsDisplaySize: (size: number) => void;
785
791
  setDelegations: (delegates: Record<Delegation, EventListenerOrEventListenerObject>) => void;
786
792
  updateOverrideStyles: (perItemStyleOverrides: PerItemStyleOverrides) => void;
787
793
  }
794
+ export interface ISetWidgetOptions {
795
+ shouldReloadData?: boolean;
796
+ }
788
797
 
789
798
  declare const AdServiceClass_base: {
790
799
  new (): {};
@@ -1045,6 +1054,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
1045
1054
  private _geoLocation;
1046
1055
  private _staticContent;
1047
1056
  private _runInShadowDom;
1057
+ private _shouldModifyUrlWithStoryId;
1048
1058
  private _googleCustomNativeAdHandler?;
1049
1059
  protected constructor();
1050
1060
  init(options: IBlazeSDKOptions): Promise<void>;
@@ -1068,6 +1078,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
1068
1078
  get previewUrl(): string;
1069
1079
  get previewMomentsUrl(): string;
1070
1080
  get runInShadowDom(): boolean;
1081
+ get shouldModifyUrlWithStoryId(): boolean;
1071
1082
  get googleCustomNativeAdHandler(): CustomNativeAdHandler | undefined;
1072
1083
  set googleCustomNativeAdHandler(value: CustomNativeAdHandler | undefined);
1073
1084
  }
@@ -1320,6 +1331,7 @@ export interface IndicatorStyle {
1320
1331
  backgroundImage: string;
1321
1332
  borderRadius: string;
1322
1333
  borderColor: string;
1334
+ thumbnailBorderColor: string;
1323
1335
  borderWidth: number;
1324
1336
  text: string;
1325
1337
  textColor: string;
@@ -1350,8 +1362,8 @@ export interface LayoutStyle {
1350
1362
  statusLiveUnreadStyle: IndicatorStyle;
1351
1363
  statusReadStyle: IndicatorStyle;
1352
1364
  statusUnreadStyle: IndicatorStyle;
1353
- badgeIndicatorStyle: IndicatorStyle;
1354
1365
  statusIndicatorPosition: PositionType;
1366
+ badgeIndicatorStyle: IndicatorStyle;
1355
1367
  badgePosition: PositionType;
1356
1368
  }
1357
1369
  export interface LabelStyle {
@@ -1359,7 +1371,7 @@ export interface LabelStyle {
1359
1371
  gap: number;
1360
1372
  width: number | 'auto';
1361
1373
  color: string;
1362
- height: number;
1374
+ height: string | number;
1363
1375
  padding: string;
1364
1376
  font: string;
1365
1377
  fontSize: string;
@@ -1461,7 +1473,7 @@ export declare function AttributeParser<TBase extends GHTMLElement>(Base: TBase)
1461
1473
  click(): void;
1462
1474
  hidePopover(): void;
1463
1475
  showPopover(): void;
1464
- togglePopover(force?: boolean | undefined): void;
1476
+ togglePopover(force?: boolean | undefined): boolean;
1465
1477
  addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
1466
1478
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
1467
1479
  removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
@@ -1596,6 +1608,7 @@ export declare function AttributeParser<TBase extends GHTMLElement>(Base: TBase)
1596
1608
  ariaColIndex: string | null;
1597
1609
  ariaColSpan: string | null;
1598
1610
  ariaCurrent: string | null;
1611
+ ariaDescription: string | null;
1599
1612
  ariaDisabled: string | null;
1600
1613
  ariaExpanded: string | null;
1601
1614
  ariaHasPopup: string | null;
@@ -1666,6 +1679,7 @@ export declare function AttributeParser<TBase extends GHTMLElement>(Base: TBase)
1666
1679
  onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
1667
1680
  onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
1668
1681
  onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
1682
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
1669
1683
  onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
1670
1684
  oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
1671
1685
  oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
@@ -1817,7 +1831,7 @@ export type OrderType = 'Manual' | 'AtoZ' | 'ZtoA' | 'RecentlyUpdatedFirst' | 'R
1817
1831
  export declare const PlayTypeArray: readonly ["Widget", "Share", "SingleStory"];
1818
1832
  export type PlayType = typeof PlayTypeArray[number];
1819
1833
 
1820
- export type PositionInsideType = 'insideTopLeft' | 'insideTopRight' | 'insideMiddleTop' | 'insideMiddle' | 'insideBottomRight' | 'insideBottomLeft' | 'insideBottomMiddle' | 'insideMiddleLeft' | 'insideMiddleRight';
1834
+ export type PositionInsideType = 'insideTopLeft' | 'insideTopRight' | 'insideTop' | 'insideTopMiddle' | 'insideBottomRight' | 'insideBottomLeft' | 'insideBottom' | 'insideBottomMiddle' | 'insideMiddle' | 'insideMiddleLeft' | 'insideMiddleRight';
1821
1835
  export type PositionOutsideType = 'outsideTop' | 'outsideTopLeft' | 'outsideTopRight' | 'outsideBottomLeft' | 'outsideBottomRight' | 'outsideBottom' | 'outsideRight' | 'outsideLeft';
1822
1836
  export type PositionType = PositionInsideType | PositionOutsideType;
1823
1837
  export interface PositionOffset {
@@ -1865,6 +1879,7 @@ export declare function GuardNullOrEmpty(name: string, value: any): void;
1865
1879
  export declare function formatDuration(startDate: Date): string;
1866
1880
  export declare function isCssPropertySupported(property: string): boolean;
1867
1881
  export declare function pixelsToNumber(pxString: string): number;
1882
+ export declare function convertCssUnitToNumber(cssValue: string | number): number;
1868
1883
  export declare function isObject(item: any): boolean;
1869
1884
  export declare function mergeDeep(target: any, ...sources: any[]): any;
1870
1885
  export declare function cloneDeep<T>(target: T): T;
@@ -2011,6 +2026,7 @@ export declare class BlazeWidgetItem extends BaseWidget {
2011
2026
  private handleWidgetClick;
2012
2027
  private setData;
2013
2028
  getThumbnailUrl(): string;
2029
+ setThumbnailBorderColor(color: string): void;
2014
2030
  private updateLabel;
2015
2031
  private resetWidgetItemStyles;
2016
2032
  private updateContainerStyles;
@@ -2066,6 +2082,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
2066
2082
  analyticsStack: Record<WidgetAction, boolean>;
2067
2083
  onResizeEvent: (this: Window, ev: UIEvent) => void;
2068
2084
  shouldReloadWhenPlayerIsClosed: boolean;
2085
+ shouldReloadData: boolean;
2069
2086
  get refElement(): ShadowRoot | this;
2070
2087
  constructor();
2071
2088
  onResizeEventDelay(): void;
@@ -2081,11 +2098,12 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
2081
2098
  getParentHeightWithoutPadding(): number | null;
2082
2099
  setId(id: string): void;
2083
2100
  handlePopState(): void;
2101
+ private setReloadData;
2084
2102
  addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
2085
2103
  set storyIds(value: string);
2086
- setContentIds(storyIds: string[]): void;
2087
- setLabelsPriority(labelsPriority: string): void;
2088
- setLabels(labels: labelType): void;
2104
+ setContentIds(storyIds: string[], options?: ISetWidgetOptions): void;
2105
+ setLabelsPriority(labelsPriority: string, options?: ISetWidgetOptions): void;
2106
+ setLabels(labels: labelType, options?: ISetWidgetOptions): void;
2089
2107
  getTheme(): IWidgetTheme;
2090
2108
  setTheme(theme: IWidgetTheme | string): void;
2091
2109
  private get theme();
@@ -2365,6 +2383,7 @@ export interface IShareButton {
2365
2383
  export declare class BlazeWidgetShareModal extends BaseWidget {
2366
2384
  shareContainer: BlazeDiv;
2367
2385
  shareDrawer: BlazeDrawer;
2386
+ shareUrl: string;
2368
2387
  onOpen: (() => void) | undefined;
2369
2388
  onClose: (() => void) | undefined;
2370
2389
  onClick?: ((button: BlazeShareButton) => void);
@@ -2374,7 +2393,7 @@ export declare class BlazeWidgetShareModal extends BaseWidget {
2374
2393
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
2375
2394
  onDarwerOpen(): void;
2376
2395
  onDrawerClose(): void;
2377
- open(): void;
2396
+ open(shareUrl: string): void;
2378
2397
  close(): void;
2379
2398
  renderButtons(): void;
2380
2399
  renderTitle(): void;