@wscsports/blaze-web-sdk 0.1.71 → 0.1.737

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.71",
3
+ "version": "0.1.737",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -1,4 +1,5 @@
1
1
  export declare function setDoNotTrack(value: boolean): void;
2
+ export declare function setGeoLocation(value: string): void;
2
3
  export declare function setExternalUserId(value: string): void;
3
4
  export declare function Initialize(apiKey: string, options?: Omit<IBlazeSDKOptions, "apiKey">): Promise<void>;
4
5
  export declare function WidgetRowView(containerId: string, options: IWidgetViewOptions): IWidgetView;
@@ -14,6 +15,7 @@ declare const _default: {
14
15
  Theme: typeof Theme;
15
16
  addDelegateListener: typeof addDelegateListener;
16
17
  setDoNotTrack: typeof setDoNotTrack;
18
+ setGeoLocation: typeof setGeoLocation;
17
19
  LabelBuilder: typeof LabelBuilder;
18
20
  Delegations: typeof Delegation;
19
21
  };
@@ -267,6 +269,9 @@ type ExposedFields = {
267
269
  export declare const exposedFieldsByAction: ExposedFields;
268
270
 
269
271
  export * from './analytics.constants';
272
+ export * from './iso-country-codes.constants';
273
+
274
+ export declare const CountryCodes: readonly ["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"];
270
275
 
271
276
  export declare class Database implements IDatabase {
272
277
  private readonly options;
@@ -339,6 +344,7 @@ export interface IPage {
339
344
  cta: ICTA;
340
345
  hasViewed: boolean;
341
346
  ignoreReadStatusForStory: boolean;
347
+ createTime: string;
342
348
  }
343
349
 
344
350
  export interface IRendition {
@@ -488,6 +494,7 @@ export interface IBlazeSDKOptions {
488
494
  previewMomentUrl?: string;
489
495
  doNotTrack?: boolean;
490
496
  externalUserId?: string;
497
+ geoLocation?: string;
491
498
  }
492
499
 
493
500
  export interface IDatabase {
@@ -714,7 +721,7 @@ export declare class StoryEvent {
714
721
  'story_session_id': string;
715
722
  'story_page_index': number;
716
723
  'is_last_page': boolean;
717
- 'audio_state': boolean;
724
+ 'audio_state': string;
718
725
  'playback_action_method': 'Press' | 'Release' | 'Click';
719
726
  }
720
727
  export declare class WidgetEvent {
@@ -786,6 +793,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
786
793
  private _sendAnaltyics;
787
794
  private _doNotTrack;
788
795
  private _externalUserId;
796
+ private _geoLocation;
789
797
  protected constructor();
790
798
  init(options: IBlazeSDKOptions): Promise<void>;
791
799
  private _urls;
@@ -799,6 +807,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
799
807
  set externalUserId(value: string);
800
808
  get doNotTrack(): boolean;
801
809
  set doNotTrack(value: boolean);
810
+ get geoLocation(): string;
811
+ set geoLocation(value: string);
802
812
  get apiUrl(): string;
803
813
  get apiKey(): string;
804
814
  get previewUrl(): string;
@@ -1452,12 +1462,9 @@ export type OrderType = 'Manual' | 'AtoZ' | 'ZtoA' | 'RecentlyUpdatedFirst' | 'R
1452
1462
  export declare const PlayTypeArray: readonly ["Widget", "Share", "SingleStory"];
1453
1463
  export type PlayType = typeof PlayTypeArray[number];
1454
1464
 
1455
- export type PositionInsideType = 'insideTopLeft' | 'insideTopRight' | 'insideMiddle' | 'insideBottomRight' | 'insideBottomLeft' | 'insideBottomMiddle' | 'insideMiddleLeft' | 'insideMiddleRight';
1465
+ export type PositionInsideType = 'insideTopLeft' | 'insideTopRight' | 'insideMiddleTop' | 'insideMiddle' | 'insideBottomRight' | 'insideBottomLeft' | 'insideBottomMiddle' | 'insideMiddleLeft' | 'insideMiddleRight';
1456
1466
  export type PositionOutsideType = 'outsideUnder' | 'outsideBelow' | 'outsideAbove' | 'outsideTop' | 'outsideTopLeft' | 'outsideTopRight' | 'outsideBottomLeft' | 'outsideBottomRight' | 'outsideBottom' | 'outsideRight' | 'outsideLeft';
1457
1467
  export type PositionType = PositionInsideType | PositionOutsideType;
1458
- export type PositionCircleRowLabelType = 'outsideBelow' | 'outsideAbove';
1459
- export type PositionRectangleRowLabelType = PositionCircleRowLabelType | PositionInsideType;
1460
- export type PositionRectangleRowHorizontalLabelType = PositionInsideType;
1461
1468
 
1462
1469
  export type SeverityType = 'error' | 'warning' | 'info' | 'success';
1463
1470
 
@@ -1465,10 +1472,10 @@ export type SizeType = 'small' | 'medium' | 'large';
1465
1472
 
1466
1473
  export type ThumbnailApiType = 'SquareIcon' | 'VerticalTwoByThree' | 'MainThumbnail';
1467
1474
  export type ThumbnailType = 'SQUARE_ICON' | 'VERTICAL_TWO_BY_THREE' | 'CUSTOM';
1468
- export type ThumbnailShape = 'circle' | 'rectangle';
1475
+ export type ThumbnailShape = 'Circle' | 'Rectangle';
1469
1476
  export declare function thumbnailMapping(thumbnailType: ThumbnailType): ThumbnailApiType;
1470
1477
 
1471
- export type WidgetType = 'row' | 'grid';
1478
+ export type WidgetType = 'Row' | 'Grid';
1472
1479
 
1473
1480
  interface ChipSizeOptions {
1474
1481
  statusLiveStyle: IndicatorStyle;
@@ -1477,9 +1484,17 @@ interface ChipSizeOptions {
1477
1484
  statusUnreadStyle: IndicatorStyle;
1478
1485
  }
1479
1486
  export declare function getChipSize(options: ChipSizeOptions): DOMRect;
1487
+ export declare function getMaxChipSize(layout: LayoutStyle): DOMRect;
1488
+ export declare function calculateChipSize(statusIndicatorPosition: PositionType, layoutStyle: LayoutStyle): {
1489
+ chipHeight: number;
1490
+ chipWidth: number;
1491
+ };
1480
1492
 
1481
1493
  export declare function delay(ms: number): Promise<void>;
1482
1494
 
1495
+ type CountryCode = typeof CountryCodes[number];
1496
+ export declare function isValidCountryCode(countryCode: string): countryCode is CountryCode;
1497
+
1483
1498
  export declare function GuardNullOrEmpty(name: string, value: any): void;
1484
1499
 
1485
1500
  export declare function formatDuration(startDate: Date): string;
@@ -1504,10 +1519,24 @@ export declare function flattenObject<T extends Record<string, any>>(obj: T): Re
1504
1519
 
1505
1520
  export * from './chip.utils';
1506
1521
  export * from './common.utils';
1522
+ export * from './country-location.utils';
1507
1523
  export * from './guard.utils';
1508
1524
  export * from './helper';
1509
1525
  export * from './regex.utils';
1510
1526
  export * from './stopwatch';
1527
+ export * from './position.utils';
1528
+
1529
+ export declare function calculatePosition(statusIndicatorPosition: PositionType): {
1530
+ isOutside: boolean;
1531
+ isInside: boolean;
1532
+ isTop: boolean;
1533
+ isMiddle: boolean;
1534
+ isBottom: boolean;
1535
+ isBelow: boolean;
1536
+ isAbove: boolean;
1537
+ isLeft: boolean;
1538
+ isRight: boolean;
1539
+ };
1511
1540
 
1512
1541
  export declare const RegexHash: RegExp;
1513
1542
  export declare const RegexHashPlayType: RegExp;
@@ -1584,11 +1613,6 @@ export declare class BlazeWidgetItem extends BaseWidget {
1584
1613
  private updateInsideLabelStyles;
1585
1614
  private updateOutsideLabelStyles;
1586
1615
  private updateThumbnailStyles;
1587
- getMaxChipSize(): DOMRect;
1588
- get chipDimenssions(): {
1589
- chipWidth: number;
1590
- chipHeight: number;
1591
- };
1592
1616
  private updateChipStyles;
1593
1617
  setTheme(theme: IWidgetTheme): void;
1594
1618
  setChipStyle(): void;
@@ -1620,14 +1644,17 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
1620
1644
  preset: IWidgetTheme | undefined;
1621
1645
  thumbnailWidth: number | undefined;
1622
1646
  thumbnailHeight: number | undefined;
1647
+ widgetHeight: number;
1648
+ parentHeight: number | undefined;
1649
+ intersectionObserver: IntersectionObserver;
1650
+ heightObserver: MutationObserver;
1623
1651
  reloadTimeout: NodeJS.Timeout | undefined;
1624
1652
  analyticsStack: Record<WidgetAction, boolean>;
1625
- intersectionObserver: IntersectionObserver;
1626
1653
  onResizeEvent: (this: Window, ev: UIEvent) => void;
1627
- isWidgetReload: boolean | undefined;
1628
- widgetHeight: number;
1629
1654
  constructor();
1655
+ handleHeightChangeMutation(mutationsList: MutationRecord[]): void;
1630
1656
  connectedCallback(): void;
1657
+ getParentHeightWithoutPadding(): number | null;
1631
1658
  disconnectedCallback(): void;
1632
1659
  set storyIds(value: string);
1633
1660
  setContentIds(storyIds: string[]): void;
@@ -1651,6 +1678,11 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
1651
1678
  loadStories(): Promise<void>;
1652
1679
  private get theme();
1653
1680
  render(): void;
1681
+ calculateLabelSizes(labelStyle: LabelStyle, lineNumber: number): {
1682
+ labelWidth: number | "auto";
1683
+ labelAdditionalWidth: number;
1684
+ labelAdditionalHeight: number;
1685
+ };
1654
1686
  maxSize(): number;
1655
1687
  event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
1656
1688
  isReadByLastUnIgnoredPageStatus(story: IStory): boolean;
@@ -1658,7 +1690,6 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
1658
1690
  reorderWidgets(): void;
1659
1691
  connectWidgets(): void;
1660
1692
  get thumbnailShape(): ThumbnailShape;
1661
- getMaxChipSize(): DOMRect;
1662
1693
  widgetType(): WidgetType;
1663
1694
  }
1664
1695