@wscsports/blaze-web-sdk 0.0.113 → 0.0.114

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.0.113",
3
+ "version": "0.0.114",
4
4
  "main": "publish/index",
5
5
  "types": "publish/index",
6
6
  "files": [
@@ -17,10 +17,8 @@
17
17
  "@types/hammerjs": "^2.0.41",
18
18
  "@types/lodash": "^4.14.195",
19
19
  "@types/ua-parser-js": "^0.7.36",
20
- "css-loader": "^6.8.1",
21
20
  "html-webpack-plugin": "^5.5.3",
22
21
  "javascript-obfuscator": "^4.0.2",
23
- "style-loader": "^3.3.3",
24
22
  "ts-loader": "^9.4.4",
25
23
  "typescript": "^5.1.6",
26
24
  "typescript-declaration-webpack-plugin": "^0.3.0",
@@ -449,7 +449,7 @@ export declare class API {
449
449
 
450
450
  export * from './api';
451
451
 
452
- export declare abstract class BaseHTMLElement extends HTMLElement {
452
+ export declare class BaseHTMLElement extends HTMLElement {
453
453
  protected _animationDuration: number;
454
454
  constructor();
455
455
  getAttribute<T = any>(qualifiedName: string): T;
@@ -504,18 +504,7 @@ export interface ResizeEvent extends Event {
504
504
  }
505
505
  export declare function throttle<T extends Event>(func: EventHandler<T>, delay: number): (event: T) => void;
506
506
 
507
- export declare class BlazeAlert extends BaseHTMLElement {
508
- titleContainer: HTMLDivElement;
509
- textContainer: HTMLDivElement;
510
- constructor();
511
- static get observedAttributes(): string[];
512
- connectedCallback(): void;
513
- disconnectedCallback(): void;
514
- attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
515
- setAttribute(qualifiedName: 'alert-title' | 'alert-text', value: string): void;
516
- }
517
-
518
- export declare class BlazeChip extends BaseHTMLElement {
507
+ export declare class BlazeChip extends HTMLElement {
519
508
  constructor();
520
509
  }
521
510
 
@@ -523,28 +512,12 @@ export interface BlazeImageOptions {
523
512
  fetchPriority: FetchPriorityType;
524
513
  src: string;
525
514
  }
526
- export declare class BlazeImage extends BaseHTMLElement {
527
- constructor();
515
+ export declare class BlazeImage extends HTMLElement {
516
+ constructor(options: BlazeImageOptions);
528
517
  }
529
518
 
530
- export * from './alert';
531
519
  export * from './chip';
532
520
  export * from './image';
533
- export * from './toast';
534
-
535
- export declare class BlazeToast extends BaseHTMLElement {
536
- constructor();
537
- static get observedAttributes(): string[];
538
- connectedCallback(): void;
539
- disconnectedCallback(): void;
540
- attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
541
- show(options: {
542
- show: boolean;
543
- sevrity: SeverityType;
544
- title?: string;
545
- text: string;
546
- }): void;
547
- }
548
521
 
549
522
  export declare enum StoryAction {
550
523
  Start = "story_start",
@@ -671,12 +644,6 @@ export declare enum Delegation {
671
644
 
672
645
  export * from './event';
673
646
 
674
- export declare abstract class ElementsFactory {
675
- static create<T extends BaseHTMLElement>(e: ElementType): T;
676
- }
677
-
678
- export * from './elements.factory';
679
-
680
647
  export type EnvironmentType = 'prod' | 'uat';
681
648
  export interface IBlazeSDKOptions {
682
649
  apiKey: string;
@@ -738,17 +705,6 @@ export interface IWidgetView {
738
705
  reload: (labels?: string[]) => void;
739
706
  }
740
707
 
741
- declare const AlertServiceClass_base: {
742
- new (): {};
743
- _instance: AlertServiceClass;
744
- getInstance(): AlertServiceClass;
745
- };
746
- declare abstract class AlertServiceClass extends AlertServiceClass_base implements IService {
747
- init(): Promise<void>;
748
- alert(): void;
749
- }
750
- export declare const AlertService: AlertServiceClass;
751
-
752
708
  export declare enum AdAction {
753
709
  Request = "ad_request",
754
710
  Load = "ad_load",
@@ -1047,7 +1003,6 @@ declare abstract class EventServiceClass extends EventServiceClass_base implemen
1047
1003
  }
1048
1004
  export declare const EventService: EventServiceClass;
1049
1005
 
1050
- export * from './alert.ervice';
1051
1006
  export * from './analytics.service';
1052
1007
  export * from './blaze-api.service';
1053
1008
  export * from './blaze-database.service';
@@ -1197,27 +1152,18 @@ export declare function getLabelStyle(el: IAttributeParser): Partial<LabelStyle>
1197
1152
  export declare function setupLayoutStyle(layoutStyle: LayoutStyle): void;
1198
1153
  export declare function getLayoutStyle(el: IAttributeParser): DeepPartial<LayoutStyle>;
1199
1154
 
1200
-
1201
1155
  export type ClientPlatform = 'Web';
1202
1156
 
1203
- export type ComponentsElementType = 'blaze-alert' | 'blaze-toast' | 'blaze-chip' | 'blaze-image';
1204
- export type WidgetElementType = 'blaze-sdk';
1205
- export type ElementType = WidgetElementType | ComponentsElementType;
1206
-
1207
1157
  export type FetchPriorityType = 'low' | 'high' | 'auto';
1208
1158
 
1209
1159
  export * from './client-platform.type';
1210
- export * from './element.type';
1211
1160
  export * from './fetch-priority.type';
1212
1161
  export * from './order.type';
1213
- export * from './severity.type';
1214
1162
  export * from './shape.type';
1215
1163
  export * from './thumbnail.type';
1216
1164
 
1217
1165
  export type OrderType = 'Manual' | 'RecentlyUpdatedFirst' | 'AtoZ' | 'RecentlyUpdatedLast' | 'ZtoA';
1218
1166
 
1219
- export type SeverityType = 'error' | 'warning' | 'info' | 'success';
1220
-
1221
1167
  export type ShapeType = 'rectangle' | 'custom' | 'circle';
1222
1168
 
1223
1169
  export type ThumbnailType = 'SquareIcon' | 'VerticalTwoByThree';
@@ -1230,12 +1176,9 @@ interface ChipSizeOptions {
1230
1176
  }
1231
1177
  export declare function getChipSize(options: ChipSizeOptions): DOMRect;
1232
1178
 
1233
- export declare function delay(ms: number): Promise<void>;
1234
-
1235
1179
  export declare function GuardNullOrEmpty(name: string, value: any): void;
1236
1180
 
1237
1181
  export * from './chip.utils';
1238
- export * from './common.utils';
1239
1182
  export * from './guard.utils';
1240
1183
 
1241
1184
  export { BlazeWidgetItem } from './widget-item';
@@ -1309,7 +1252,7 @@ export declare class BlazeWidgetLayout extends BaseHTMLElement implements Observ
1309
1252
  analyticsStack: Record<WidgetAction, boolean>;
1310
1253
  intersectionObserver: IntersectionObserver;
1311
1254
  onResizeEvent: () => () => void;
1312
- constructor();
1255
+ constructor(options?: IWidgetViewOptions);
1313
1256
  setLabels(labels: string[]): void;
1314
1257
  getTheme(): IWidgetTheme;
1315
1258
  setTheme(theme: IWidgetTheme): void;
@@ -1318,8 +1261,8 @@ export declare class BlazeWidgetLayout extends BaseHTMLElement implements Observ
1318
1261
  disconnectedCallback(): void;
1319
1262
  attributeChangedCallback(name: string, oldValue?: string, newValue?: string): void;
1320
1263
  setLabel(label: string | BlazeWidgetLabel): void;
1321
- setMaxSize(maxSize: number): void;
1322
- setMaxItemsSize(maxItemsSize: number): void;
1264
+ private setMaxSize;
1265
+ private setMaxItemsSize;
1323
1266
  handleIntersection(entries: IntersectionObserverEntry[]): void;
1324
1267
  createModal(): void;
1325
1268
  createMomentsModal(): void;
@@ -1347,7 +1290,6 @@ export declare class BlazeWidgetModal extends HTMLElement {
1347
1290
  open(): void;
1348
1291
  close(): void;
1349
1292
  disconnectedCallback(): void;
1350
- setTheme(theme: IWidgetTheme): void;
1351
1293
  }
1352
1294
 
1353
1295
  export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
@@ -1475,10 +1417,11 @@ export declare class BlazeWidgetMoment extends HTMLElement {
1475
1417
  }
1476
1418
 
1477
1419
  export declare class BlazeWidgetSdk extends BaseHTMLElement {
1420
+ protected readonly apiKey: string;
1478
1421
  static isMuted: boolean;
1479
1422
  static isPlaying: boolean;
1480
1423
  static get observedAttributes(): string[];
1481
- constructor();
1424
+ constructor(apiKey: string, options?: IBlazeSDKOptions);
1482
1425
  connectedCallback(): Promise<void>;
1483
1426
  attributeChangedCallback(name: string, oldValue: string, newValue: string): Promise<void>;
1484
1427
  private getConfigAttributes;
@@ -1543,10 +1486,10 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
1543
1486
  exitPopup: HTMLElement;
1544
1487
  exitButton: HTMLElement;
1545
1488
  onClose: (() => void) | undefined;
1489
+ onResize: (this: Window, ev: UIEvent) => any | undefined;
1546
1490
  hammer: HammerManager | null;
1547
1491
  isMultiTouch: boolean;
1548
1492
  constructor(parentWidget: HTMLElement);
1549
- setTheme(theme: IWidgetTheme): void;
1550
1493
  setStories(stories: IStory[]): void;
1551
1494
  seek(id: string): void;
1552
1495
  onKeyDown(ev: KeyboardEvent): void;
@@ -1578,6 +1521,7 @@ export declare class BlazeWidgetStoryPlayer extends BaseHTMLElement {
1578
1521
  background: HTMLCanvasElement;
1579
1522
  tmpBackground: HTMLCanvasElement;
1580
1523
  onClose: (() => void) | undefined;
1524
+ onResize: (this: Window, ev: UIEvent) => any | undefined;
1581
1525
  listeners: EventsListener;
1582
1526
  backgroundAnimation?: Animation;
1583
1527
  firstTime: boolean;
@@ -1682,7 +1626,6 @@ export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
1682
1626
  loader: HTMLElement | undefined;
1683
1627
  source: HTMLElement | undefined;
1684
1628
  loaderTimeoutRefAppending: NodeJS.Timeout | undefined;
1685
- loaderTimeoutRefCheckingForIssues: NodeJS.Timeout | undefined;
1686
1629
  isPlaying: boolean;
1687
1630
  isError: boolean;
1688
1631
  retryTimes: number;
@@ -1697,8 +1640,8 @@ export declare class BlazeWidgetStoryVideo extends BlazeWidgetStoryBase {
1697
1640
  unload(): Promise<void>;
1698
1641
  removeLoader(): void;
1699
1642
  startPlayVideo(video: HTMLVideoElement, retryTimes: number): Promise<void>;
1700
- reloadVideo(retry: number): Promise<void>;
1701
- play(): Promise<void>;
1643
+ reloadVideo(retry: number): void;
1644
+ play(): void;
1702
1645
  pause(): void;
1703
1646
  set currentTime(value: number);
1704
1647
  get currentTime(): number;