@wscsports/blaze-web-sdk 0.9.0 → 0.11.0
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/README.md +1 -8
- package/package.json +1 -1
- package/publish/index.d.ts +33 -6
- package/publish/index.js +1 -1
package/README.md
CHANGED
|
@@ -3,11 +3,4 @@ Welcome to WSC Sports Web SDK.
|
|
|
3
3
|
|
|
4
4
|
# Getting Started
|
|
5
5
|
Please visit out documentation website for installation guides:<br/>
|
|
6
|
-
https://dev.wsc-sports.com/docs/sdk-integration
|
|
7
|
-
|
|
8
|
-
# Local Development
|
|
9
|
-
To run the project locally, follow these steps:
|
|
10
|
-
1. Install Docker on your local machine
|
|
11
|
-
2. run `npm run start:dev-docker` in the root directory of the project
|
|
12
|
-
3. Open your browser and navigate to `http://localhost:3005`
|
|
13
|
-
|
|
6
|
+
https://dev.wsc-sports.com/docs/sdk-integration
|
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare function playContent(contentType: ContentType, options: PlayConte
|
|
|
29
29
|
export declare function setAbTestParams(abTestParams: BlazeAbTestType): void;
|
|
30
30
|
export declare function getAppContextManager(): Record<string, any>;
|
|
31
31
|
export declare const pushConsentEvent: (action: string, body: Record<string, any>) => void;
|
|
32
|
+
export declare const isInitialized: () => boolean;
|
|
32
33
|
declare const _default: {
|
|
33
34
|
Initialize: typeof Initialize;
|
|
34
35
|
WidgetGridView: typeof WidgetGridView;
|
|
@@ -52,6 +53,7 @@ declare const _default: {
|
|
|
52
53
|
setAbTestParams: typeof setAbTestParams;
|
|
53
54
|
getAppContextManager: typeof getAppContextManager;
|
|
54
55
|
pushConsentEvent: (action: string, body: Record<string, any>) => void;
|
|
56
|
+
isInitialized: () => boolean;
|
|
55
57
|
};
|
|
56
58
|
export default _default;
|
|
57
59
|
|
|
@@ -376,7 +378,12 @@ export declare class BlazeDataSourceValidations {
|
|
|
376
378
|
static validateFormat(dataSource: BlazeDataSourceType): void;
|
|
377
379
|
}
|
|
378
380
|
|
|
379
|
-
export declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number):
|
|
381
|
+
export declare function debounce<T extends (...args: any[]) => any>(func: T, delay: number): {
|
|
382
|
+
(...args: Parameters<T>): void;
|
|
383
|
+
cancel(): void;
|
|
384
|
+
} & {
|
|
385
|
+
cancel: () => void;
|
|
386
|
+
};
|
|
380
387
|
|
|
381
388
|
export declare const Platform: {
|
|
382
389
|
readonly Console: "console";
|
|
@@ -1238,7 +1245,7 @@ export interface IStory extends IContent {
|
|
|
1238
1245
|
}
|
|
1239
1246
|
|
|
1240
1247
|
export interface IThumbnail {
|
|
1241
|
-
type:
|
|
1248
|
+
type: ThumbnailApiType;
|
|
1242
1249
|
rendition: IRendition;
|
|
1243
1250
|
renditions?: IRendition[];
|
|
1244
1251
|
}
|
|
@@ -1647,6 +1654,7 @@ export * from './service.interface';
|
|
|
1647
1654
|
export * from './widget-label-builder.interface';
|
|
1648
1655
|
export * from './widget-options.interface';
|
|
1649
1656
|
export * from './widget-view.interface';
|
|
1657
|
+
export { default as Observable } from './observable';
|
|
1650
1658
|
|
|
1651
1659
|
export default interface IntersectionObservable {
|
|
1652
1660
|
intersectionObserver: IntersectionObserver;
|
|
@@ -2398,7 +2406,9 @@ export declare class Presets {
|
|
|
2398
2406
|
static Grid3ColumnHorizontal: LayoutStyle;
|
|
2399
2407
|
static RowCircle: LayoutStyle;
|
|
2400
2408
|
static RowRectangle: LayoutStyle;
|
|
2409
|
+
static RowRectangleAnimated: LayoutStyle;
|
|
2401
2410
|
static RowHorizontalRectangle: LayoutStyle;
|
|
2411
|
+
static RowHorizontalRectangleAnimated: LayoutStyle;
|
|
2402
2412
|
static Default: LayoutStyle;
|
|
2403
2413
|
static DefaultStoryStyle: StoryPlayerStyle;
|
|
2404
2414
|
static DefaultMomentStyle: MomentPlayerStyle;
|
|
@@ -2701,7 +2711,7 @@ export declare const Colors: {
|
|
|
2701
2711
|
readonly Yellow: "#FFD325";
|
|
2702
2712
|
};
|
|
2703
2713
|
|
|
2704
|
-
export type ThemeType = 'grid-2-columns' | 'grid-3-columns' | 'row-circle' | 'row-rectangle' | 'row-rectangle-horizontal' | 'grid-2-columns-horizontal' | 'grid-3-columns-horizontal' | 'default';
|
|
2714
|
+
export type ThemeType = 'grid-2-columns' | 'grid-3-columns' | 'row-circle' | 'row-rectangle' | 'row-rectangle-animated' | 'row-rectangle-horizontal' | 'grid-2-columns-horizontal' | 'grid-3-columns-horizontal' | 'default';
|
|
2705
2715
|
export declare class ThemeFactory {
|
|
2706
2716
|
static create(name: ThemeType, contentType: 'moment'): IWidgetTheme<MomentPlayerStyle>;
|
|
2707
2717
|
static create(name: ThemeType, contentType: 'story'): IWidgetTheme<StoryPlayerStyle>;
|
|
@@ -3255,8 +3265,8 @@ export type SizeType = 'small' | 'medium' | 'large';
|
|
|
3255
3265
|
export type StoryDirectionType = 'PREV_STORY' | 'NEXT_STORY' | 'PREV_PAGE' | 'NEXT_PAGE';
|
|
3256
3266
|
export type ContentDirection = 'PREV' | 'NEXT';
|
|
3257
3267
|
|
|
3258
|
-
export type ThumbnailApiType = 'SquareIcon' | 'VerticalTwoByThree' | 'MainThumbnail';
|
|
3259
|
-
export type ThumbnailType = 'SQUARE_ICON' | 'VERTICAL_TWO_BY_THREE' | 'CUSTOM';
|
|
3268
|
+
export type ThumbnailApiType = 'SquareIcon' | 'VerticalTwoByThree' | 'Gif' | 'AnimatedThumbnailPoster' | 'MainThumbnail';
|
|
3269
|
+
export type ThumbnailType = 'SQUARE_ICON' | 'VERTICAL_TWO_BY_THREE' | 'GIF' | 'ANIMATED_THUMBNAIL_POSTER' | 'CUSTOM';
|
|
3260
3270
|
export type ThumbnailShape = 'Circle' | 'Rectangle';
|
|
3261
3271
|
export declare function thumbnailMapping(thumbnailType: ThumbnailType): ThumbnailApiType;
|
|
3262
3272
|
|
|
@@ -3334,6 +3344,9 @@ export declare function updateStyle(styleToUpdate: any, path: string[], newValue
|
|
|
3334
3344
|
export declare function getNestedValue(obj: any, path: string[]): any;
|
|
3335
3345
|
export declare function formatLikes(count: number): string;
|
|
3336
3346
|
export declare function isElementInsideTarget(target: EventTarget | null, selectors: string[]): boolean;
|
|
3347
|
+
export declare function findParentOfType<T>(target: EventTarget | null, type: {
|
|
3348
|
+
new (...args: any[]): T;
|
|
3349
|
+
}, stopAt: Element): T | null;
|
|
3337
3350
|
|
|
3338
3351
|
export * from './chip.utils';
|
|
3339
3352
|
export * from './common.utils';
|
|
@@ -4286,7 +4299,7 @@ export interface BlazeWidgetItemOptions {
|
|
|
4286
4299
|
layout: LayoutStyle;
|
|
4287
4300
|
content: IStory | IMoment | IVideo;
|
|
4288
4301
|
}
|
|
4289
|
-
export declare class BlazeWidgetItem extends BaseWidget {
|
|
4302
|
+
export declare class BlazeWidgetItem extends BaseWidget implements Observable {
|
|
4290
4303
|
protected options: BlazeWidgetItemOptions;
|
|
4291
4304
|
private wrapper;
|
|
4292
4305
|
private container;
|
|
@@ -4303,6 +4316,7 @@ export declare class BlazeWidgetItem extends BaseWidget {
|
|
|
4303
4316
|
private analyticsCalls;
|
|
4304
4317
|
contentType: ContentType | undefined;
|
|
4305
4318
|
chipType: ChipStatusType;
|
|
4319
|
+
intersectionObserver: IntersectionObserver;
|
|
4306
4320
|
get parentRef(): BlazeWidgetLayout;
|
|
4307
4321
|
statusIndicatorSettings: IndicatorStyle;
|
|
4308
4322
|
paddingItem: PositionOffset;
|
|
@@ -4319,7 +4333,10 @@ export declare class BlazeWidgetItem extends BaseWidget {
|
|
|
4319
4333
|
private setupEventListeners;
|
|
4320
4334
|
private handleWidgetClick;
|
|
4321
4335
|
disconnectedCallback(): void;
|
|
4336
|
+
handleIntersection(): void;
|
|
4322
4337
|
private setData;
|
|
4338
|
+
isFullyVisibleInParent(): boolean;
|
|
4339
|
+
loadNewThumbnail(): void;
|
|
4323
4340
|
getThumbnailUrl(): string;
|
|
4324
4341
|
setThumbnailBorderColor(color: string): void;
|
|
4325
4342
|
private updateLabel;
|
|
@@ -4365,9 +4382,15 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4365
4382
|
analyticsStack: Record<WidgetAction, boolean>;
|
|
4366
4383
|
actionHandlers: ActionHandler[];
|
|
4367
4384
|
onResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
4385
|
+
onMouseMoveEvent: ((e: MouseEvent) => void) & {
|
|
4386
|
+
cancel: () => void;
|
|
4387
|
+
};
|
|
4388
|
+
onMouseLeaveEvent: (e: MouseEvent) => void;
|
|
4368
4389
|
shouldReloadWhenPlayerIsClosed: boolean;
|
|
4369
4390
|
shouldReloadData: boolean;
|
|
4370
4391
|
private personalized?;
|
|
4392
|
+
currentlyAnimatedItem: BlazeWidgetItem | undefined;
|
|
4393
|
+
firstVisibleItem: BlazeWidgetItem | undefined;
|
|
4371
4394
|
get refElement(): ShadowRoot | BlazeWidgetLayout;
|
|
4372
4395
|
constructor();
|
|
4373
4396
|
connectedCallback(): void;
|
|
@@ -4382,6 +4405,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4382
4405
|
onContentChange(mode: ContentDirection): void;
|
|
4383
4406
|
onPlayerClose(): void;
|
|
4384
4407
|
onPlayerOpen(): void;
|
|
4408
|
+
setFirstVisibleItem(): void;
|
|
4385
4409
|
getParentHeightWithoutPadding(): number | null;
|
|
4386
4410
|
setId(id: string): void;
|
|
4387
4411
|
private setReloadData;
|
|
@@ -4434,6 +4458,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4434
4458
|
maxChipHeight: number;
|
|
4435
4459
|
maxChipWidth: number;
|
|
4436
4460
|
};
|
|
4461
|
+
isAnimatedThumbnail(): boolean;
|
|
4437
4462
|
getMaxSizes(badge: {
|
|
4438
4463
|
height: number;
|
|
4439
4464
|
width: number;
|
|
@@ -4587,9 +4612,11 @@ export declare class BlazeWidgetScrollable extends BaseWidget {
|
|
|
4587
4612
|
|
|
4588
4613
|
export type playRefType = 'Share' | 'SingleContent' | 'AutoAdvance';
|
|
4589
4614
|
export declare class BlazeWidgetSDK extends BaseWidget {
|
|
4615
|
+
private static _isSdkConnected;
|
|
4590
4616
|
modal: BlazeWidgetStoryModal | BlazeWidgetMomentModal | BlazeWidgetVideoModal;
|
|
4591
4617
|
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
4592
4618
|
boundOnResizeEventDelay: () => void;
|
|
4619
|
+
static isSdkConnected(): boolean;
|
|
4593
4620
|
static get observedAttributes(): string[];
|
|
4594
4621
|
constructor();
|
|
4595
4622
|
connectedCallback(): Promise<void>;
|