@wscsports/blaze-web-sdk 0.0.111 → 0.0.113
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.
|
|
3
|
+
"version": "0.0.113",
|
|
4
4
|
"main": "publish/index",
|
|
5
5
|
"types": "publish/index",
|
|
6
6
|
"files": [
|
|
@@ -17,8 +17,10 @@
|
|
|
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",
|
|
20
21
|
"html-webpack-plugin": "^5.5.3",
|
|
21
22
|
"javascript-obfuscator": "^4.0.2",
|
|
23
|
+
"style-loader": "^3.3.3",
|
|
22
24
|
"ts-loader": "^9.4.4",
|
|
23
25
|
"typescript": "^5.1.6",
|
|
24
26
|
"typescript-declaration-webpack-plugin": "^0.3.0",
|
package/publish/index.d.ts
CHANGED
|
@@ -449,7 +449,7 @@ export declare class API {
|
|
|
449
449
|
|
|
450
450
|
export * from './api';
|
|
451
451
|
|
|
452
|
-
export declare class BaseHTMLElement extends HTMLElement {
|
|
452
|
+
export declare abstract class BaseHTMLElement extends HTMLElement {
|
|
453
453
|
protected _animationDuration: number;
|
|
454
454
|
constructor();
|
|
455
455
|
getAttribute<T = any>(qualifiedName: string): T;
|
|
@@ -504,7 +504,18 @@ 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
|
|
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 {
|
|
508
519
|
constructor();
|
|
509
520
|
}
|
|
510
521
|
|
|
@@ -512,12 +523,28 @@ export interface BlazeImageOptions {
|
|
|
512
523
|
fetchPriority: FetchPriorityType;
|
|
513
524
|
src: string;
|
|
514
525
|
}
|
|
515
|
-
export declare class BlazeImage extends
|
|
516
|
-
constructor(
|
|
526
|
+
export declare class BlazeImage extends BaseHTMLElement {
|
|
527
|
+
constructor();
|
|
517
528
|
}
|
|
518
529
|
|
|
530
|
+
export * from './alert';
|
|
519
531
|
export * from './chip';
|
|
520
532
|
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
|
+
}
|
|
521
548
|
|
|
522
549
|
export declare enum StoryAction {
|
|
523
550
|
Start = "story_start",
|
|
@@ -644,6 +671,12 @@ export declare enum Delegation {
|
|
|
644
671
|
|
|
645
672
|
export * from './event';
|
|
646
673
|
|
|
674
|
+
export declare abstract class ElementsFactory {
|
|
675
|
+
static create<T extends BaseHTMLElement>(e: ElementType): T;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export * from './elements.factory';
|
|
679
|
+
|
|
647
680
|
export type EnvironmentType = 'prod' | 'uat';
|
|
648
681
|
export interface IBlazeSDKOptions {
|
|
649
682
|
apiKey: string;
|
|
@@ -705,6 +738,17 @@ export interface IWidgetView {
|
|
|
705
738
|
reload: (labels?: string[]) => void;
|
|
706
739
|
}
|
|
707
740
|
|
|
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
|
+
|
|
708
752
|
export declare enum AdAction {
|
|
709
753
|
Request = "ad_request",
|
|
710
754
|
Load = "ad_load",
|
|
@@ -1003,6 +1047,7 @@ declare abstract class EventServiceClass extends EventServiceClass_base implemen
|
|
|
1003
1047
|
}
|
|
1004
1048
|
export declare const EventService: EventServiceClass;
|
|
1005
1049
|
|
|
1050
|
+
export * from './alert.ervice';
|
|
1006
1051
|
export * from './analytics.service';
|
|
1007
1052
|
export * from './blaze-api.service';
|
|
1008
1053
|
export * from './blaze-database.service';
|
|
@@ -1152,18 +1197,27 @@ export declare function getLabelStyle(el: IAttributeParser): Partial<LabelStyle>
|
|
|
1152
1197
|
export declare function setupLayoutStyle(layoutStyle: LayoutStyle): void;
|
|
1153
1198
|
export declare function getLayoutStyle(el: IAttributeParser): DeepPartial<LayoutStyle>;
|
|
1154
1199
|
|
|
1200
|
+
|
|
1155
1201
|
export type ClientPlatform = 'Web';
|
|
1156
1202
|
|
|
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
|
+
|
|
1157
1207
|
export type FetchPriorityType = 'low' | 'high' | 'auto';
|
|
1158
1208
|
|
|
1159
1209
|
export * from './client-platform.type';
|
|
1210
|
+
export * from './element.type';
|
|
1160
1211
|
export * from './fetch-priority.type';
|
|
1161
1212
|
export * from './order.type';
|
|
1213
|
+
export * from './severity.type';
|
|
1162
1214
|
export * from './shape.type';
|
|
1163
1215
|
export * from './thumbnail.type';
|
|
1164
1216
|
|
|
1165
1217
|
export type OrderType = 'Manual' | 'RecentlyUpdatedFirst' | 'AtoZ' | 'RecentlyUpdatedLast' | 'ZtoA';
|
|
1166
1218
|
|
|
1219
|
+
export type SeverityType = 'error' | 'warning' | 'info' | 'success';
|
|
1220
|
+
|
|
1167
1221
|
export type ShapeType = 'rectangle' | 'custom' | 'circle';
|
|
1168
1222
|
|
|
1169
1223
|
export type ThumbnailType = 'SquareIcon' | 'VerticalTwoByThree';
|
|
@@ -1176,9 +1230,12 @@ interface ChipSizeOptions {
|
|
|
1176
1230
|
}
|
|
1177
1231
|
export declare function getChipSize(options: ChipSizeOptions): DOMRect;
|
|
1178
1232
|
|
|
1233
|
+
export declare function delay(ms: number): Promise<void>;
|
|
1234
|
+
|
|
1179
1235
|
export declare function GuardNullOrEmpty(name: string, value: any): void;
|
|
1180
1236
|
|
|
1181
1237
|
export * from './chip.utils';
|
|
1238
|
+
export * from './common.utils';
|
|
1182
1239
|
export * from './guard.utils';
|
|
1183
1240
|
|
|
1184
1241
|
export { BlazeWidgetItem } from './widget-item';
|
|
@@ -1252,7 +1309,7 @@ export declare class BlazeWidgetLayout extends BaseHTMLElement implements Observ
|
|
|
1252
1309
|
analyticsStack: Record<WidgetAction, boolean>;
|
|
1253
1310
|
intersectionObserver: IntersectionObserver;
|
|
1254
1311
|
onResizeEvent: () => () => void;
|
|
1255
|
-
constructor(
|
|
1312
|
+
constructor();
|
|
1256
1313
|
setLabels(labels: string[]): void;
|
|
1257
1314
|
getTheme(): IWidgetTheme;
|
|
1258
1315
|
setTheme(theme: IWidgetTheme): void;
|
|
@@ -1261,8 +1318,8 @@ export declare class BlazeWidgetLayout extends BaseHTMLElement implements Observ
|
|
|
1261
1318
|
disconnectedCallback(): void;
|
|
1262
1319
|
attributeChangedCallback(name: string, oldValue?: string, newValue?: string): void;
|
|
1263
1320
|
setLabel(label: string | BlazeWidgetLabel): void;
|
|
1264
|
-
|
|
1265
|
-
|
|
1321
|
+
setMaxSize(maxSize: number): void;
|
|
1322
|
+
setMaxItemsSize(maxItemsSize: number): void;
|
|
1266
1323
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
1267
1324
|
createModal(): void;
|
|
1268
1325
|
createMomentsModal(): void;
|
|
@@ -1290,6 +1347,7 @@ export declare class BlazeWidgetModal extends HTMLElement {
|
|
|
1290
1347
|
open(): void;
|
|
1291
1348
|
close(): void;
|
|
1292
1349
|
disconnectedCallback(): void;
|
|
1350
|
+
setTheme(theme: IWidgetTheme): void;
|
|
1293
1351
|
}
|
|
1294
1352
|
|
|
1295
1353
|
export declare class BlazeWidgetMomentModal extends BlazeWidgetModal {
|
|
@@ -1417,11 +1475,10 @@ export declare class BlazeWidgetMoment extends HTMLElement {
|
|
|
1417
1475
|
}
|
|
1418
1476
|
|
|
1419
1477
|
export declare class BlazeWidgetSdk extends BaseHTMLElement {
|
|
1420
|
-
protected readonly apiKey: string;
|
|
1421
1478
|
static isMuted: boolean;
|
|
1422
1479
|
static isPlaying: boolean;
|
|
1423
1480
|
static get observedAttributes(): string[];
|
|
1424
|
-
constructor(
|
|
1481
|
+
constructor();
|
|
1425
1482
|
connectedCallback(): Promise<void>;
|
|
1426
1483
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): Promise<void>;
|
|
1427
1484
|
private getConfigAttributes;
|
|
@@ -1489,6 +1546,7 @@ export declare class BlazeWidgetStoryModal extends BlazeWidgetModal {
|
|
|
1489
1546
|
hammer: HammerManager | null;
|
|
1490
1547
|
isMultiTouch: boolean;
|
|
1491
1548
|
constructor(parentWidget: HTMLElement);
|
|
1549
|
+
setTheme(theme: IWidgetTheme): void;
|
|
1492
1550
|
setStories(stories: IStory[]): void;
|
|
1493
1551
|
seek(id: string): void;
|
|
1494
1552
|
onKeyDown(ev: KeyboardEvent): void;
|