@wscsports/blaze-web-sdk 0.4.0 → 0.4.2
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 +1 -1
- package/publish/index.d.ts +54 -53
- package/publish/index.js +1 -1
package/package.json
CHANGED
package/publish/index.d.ts
CHANGED
|
@@ -337,6 +337,7 @@ export declare abstract class BaseWidget extends HTMLElement {
|
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
type BlazeSourceType = 'labels' | 'ids';
|
|
340
|
+
export type AdvancedOrdering = 'LiveFirst';
|
|
340
341
|
export interface BlazeDataSourceType {
|
|
341
342
|
type: BlazeSourceType;
|
|
342
343
|
labels?: string | string[] | BlazeWidgetLabel;
|
|
@@ -344,6 +345,7 @@ export interface BlazeDataSourceType {
|
|
|
344
345
|
ids?: string[];
|
|
345
346
|
orderType?: OrderType;
|
|
346
347
|
maxItems?: number;
|
|
348
|
+
advancedOrdering?: AdvancedOrdering;
|
|
347
349
|
}
|
|
348
350
|
export declare const BlazeInternalError: {
|
|
349
351
|
LabelExpressionMustNotBeEmpty: string;
|
|
@@ -655,7 +657,7 @@ export declare class BlazeButton extends BaseWidget {
|
|
|
655
657
|
isAnimationOnDesktopInitialized: boolean;
|
|
656
658
|
get refElement(): ShadowRoot | this;
|
|
657
659
|
constructor();
|
|
658
|
-
static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "blaze-btn-visible" | "
|
|
660
|
+
static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-visible" | "blaze-btn-hidden" | "button-desktop-animation")[];
|
|
659
661
|
private onMouseEnter;
|
|
660
662
|
private onMouseLeave;
|
|
661
663
|
private onClick;
|
|
@@ -1004,7 +1006,7 @@ export type InteractionType = 'Poll' | 'Quiz' | 'Enrichment';
|
|
|
1004
1006
|
type InteractionRelative = 'Player' | 'Screen';
|
|
1005
1007
|
export type InteractionObjectYPosition = 'BottomToTop' | 'TopToTop' | 'BottomToBottom' | 'TopToBottom' | 'CenterToTop' | 'CenterToBottom' | 'CenterY';
|
|
1006
1008
|
export type InteractionObjectXPosition = 'StartToStart' | 'EndToEnd' | 'StartToEnd' | 'EndToStart' | 'CenterToStart' | 'CenterToEnd' | 'CenterX';
|
|
1007
|
-
type
|
|
1009
|
+
type InteractionPositionType = {
|
|
1008
1010
|
xOffset?: number;
|
|
1009
1011
|
xPosition?: InteractionObjectXPosition;
|
|
1010
1012
|
xRelativeTo?: InteractionRelative;
|
|
@@ -1012,15 +1014,15 @@ type PositionType = {
|
|
|
1012
1014
|
yPosition?: InteractionObjectYPosition;
|
|
1013
1015
|
yRelativeTo?: InteractionRelative;
|
|
1014
1016
|
};
|
|
1015
|
-
type
|
|
1017
|
+
type InteractionSizeType = {
|
|
1016
1018
|
absoluteHeight?: number;
|
|
1017
1019
|
absoluteWidth?: number;
|
|
1018
1020
|
heightRatio?: number;
|
|
1019
1021
|
widthRatio?: number;
|
|
1020
1022
|
};
|
|
1021
1023
|
export type InteractionBounds = {
|
|
1022
|
-
position?:
|
|
1023
|
-
size?:
|
|
1024
|
+
position?: InteractionPositionType;
|
|
1025
|
+
size?: InteractionSizeType;
|
|
1024
1026
|
};
|
|
1025
1027
|
export type Interaction = {
|
|
1026
1028
|
id: string;
|
|
@@ -1429,16 +1431,8 @@ export interface IDataSourceBuilder {
|
|
|
1429
1431
|
labels: (params: LabelsDataSourceParams) => BlazeDataSourceType;
|
|
1430
1432
|
ids: (params: IdsDataSourceParams) => BlazeDataSourceType;
|
|
1431
1433
|
}
|
|
1432
|
-
export
|
|
1433
|
-
|
|
1434
|
-
labelsPriority?: string | string[] | BlazeWidgetLabel[];
|
|
1435
|
-
orderType?: OrderType;
|
|
1436
|
-
maxItems?: number;
|
|
1437
|
-
}
|
|
1438
|
-
export interface IdsDataSourceParams {
|
|
1439
|
-
ids: string[];
|
|
1440
|
-
orderType?: OrderType;
|
|
1441
|
-
}
|
|
1434
|
+
export type LabelsDataSourceParams = Omit<BlazeDataSourceType, 'type' | 'ids'>;
|
|
1435
|
+
export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'type' | 'labels' | 'labelsPriority' | 'maxItems'>;
|
|
1442
1436
|
|
|
1443
1437
|
export interface IDatabase {
|
|
1444
1438
|
init: () => Promise<void>;
|
|
@@ -1488,49 +1482,48 @@ export interface IHttpResponse<T = any> extends IResponse<T> {
|
|
|
1488
1482
|
httpStatus?: number;
|
|
1489
1483
|
}
|
|
1490
1484
|
|
|
1491
|
-
export type SvgIconData = `data:image/svg+xml;base64,${string}`;
|
|
1492
1485
|
export type BaseBlazeIcons = {
|
|
1493
|
-
play:
|
|
1494
|
-
pause:
|
|
1495
|
-
mute:
|
|
1496
|
-
unmute:
|
|
1497
|
-
share:
|
|
1498
|
-
closedCaptionsOn:
|
|
1499
|
-
closedCaptionsOff:
|
|
1486
|
+
play: string;
|
|
1487
|
+
pause: string;
|
|
1488
|
+
mute: string;
|
|
1489
|
+
unmute: string;
|
|
1490
|
+
share: string;
|
|
1491
|
+
closedCaptionsOn: string;
|
|
1492
|
+
closedCaptionsOff: string;
|
|
1500
1493
|
};
|
|
1501
1494
|
export type BlazeStoryIcons = BaseBlazeIcons & {
|
|
1502
|
-
fullscreen:
|
|
1503
|
-
exitMobileTablet:
|
|
1504
|
-
exitDesktop:
|
|
1505
|
-
customActionButtonOne?:
|
|
1506
|
-
customActionButtonTwo?:
|
|
1495
|
+
fullscreen: string;
|
|
1496
|
+
exitMobileTablet: string;
|
|
1497
|
+
exitDesktop: string;
|
|
1498
|
+
customActionButtonOne?: string;
|
|
1499
|
+
customActionButtonTwo?: string;
|
|
1507
1500
|
navigation: {
|
|
1508
|
-
nextPage:
|
|
1509
|
-
prevPage:
|
|
1510
|
-
nextStory:
|
|
1511
|
-
prevStory:
|
|
1501
|
+
nextPage: string;
|
|
1502
|
+
prevPage: string;
|
|
1503
|
+
nextStory: string;
|
|
1504
|
+
prevStory: string;
|
|
1512
1505
|
};
|
|
1513
1506
|
};
|
|
1514
1507
|
export type BlazeMomentIconsStyle = BaseBlazeIcons & {
|
|
1515
|
-
exit:
|
|
1516
|
-
like:
|
|
1517
|
-
unlike:
|
|
1518
|
-
customActionButtonOne?:
|
|
1519
|
-
customActionButtonTwo?:
|
|
1508
|
+
exit: string;
|
|
1509
|
+
like: string;
|
|
1510
|
+
unlike: string;
|
|
1511
|
+
customActionButtonOne?: string;
|
|
1512
|
+
customActionButtonTwo?: string;
|
|
1520
1513
|
navigation: {
|
|
1521
|
-
nextMoment:
|
|
1522
|
-
prevMoment:
|
|
1514
|
+
nextMoment: string;
|
|
1515
|
+
prevMoment: string;
|
|
1523
1516
|
};
|
|
1524
1517
|
};
|
|
1525
1518
|
export type BlazeVideoIconsStyle = BaseBlazeIcons & {
|
|
1526
|
-
exit:
|
|
1527
|
-
like:
|
|
1528
|
-
unlike:
|
|
1529
|
-
fullscreenEnter:
|
|
1530
|
-
fullscreenExit:
|
|
1519
|
+
exit: string;
|
|
1520
|
+
like: string;
|
|
1521
|
+
unlike: string;
|
|
1522
|
+
fullscreenEnter: string;
|
|
1523
|
+
fullscreenExit: string;
|
|
1531
1524
|
navigation: {
|
|
1532
|
-
prevVideo:
|
|
1533
|
-
nextVideo:
|
|
1525
|
+
prevVideo: string;
|
|
1526
|
+
nextVideo: string;
|
|
1534
1527
|
};
|
|
1535
1528
|
};
|
|
1536
1529
|
|
|
@@ -1679,13 +1672,23 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1679
1672
|
api: API;
|
|
1680
1673
|
init(): Promise<void>;
|
|
1681
1674
|
private setAdsOnStories;
|
|
1682
|
-
getStoriesByIds(
|
|
1675
|
+
getStoriesByIds(options: {
|
|
1676
|
+
storyIds: string[];
|
|
1677
|
+
orderType?: OrderType;
|
|
1678
|
+
showLiveFirst?: boolean;
|
|
1679
|
+
}): Promise<{
|
|
1683
1680
|
result: IStory[];
|
|
1684
1681
|
httpStatus?: number | undefined;
|
|
1685
1682
|
data?: StoriesResponse | undefined;
|
|
1686
1683
|
error?: Error | undefined;
|
|
1687
1684
|
}>;
|
|
1688
|
-
getStoriesByLabels(
|
|
1685
|
+
getStoriesByLabels(options: {
|
|
1686
|
+
labels: string;
|
|
1687
|
+
orderType?: OrderType;
|
|
1688
|
+
maxItems?: number;
|
|
1689
|
+
labelsPriority?: string;
|
|
1690
|
+
showLiveFirst?: boolean;
|
|
1691
|
+
}): Promise<{
|
|
1689
1692
|
result: IStory[];
|
|
1690
1693
|
httpStatus?: number | undefined;
|
|
1691
1694
|
data?: StoriesResponse | undefined;
|
|
@@ -3085,11 +3088,7 @@ export declare function flattenObject<T extends Record<string, any>>(obj: T): Re
|
|
|
3085
3088
|
export declare function mergeStyles(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): object;
|
|
3086
3089
|
export declare function getMaxValue(currentMax: string, newValue: string): string;
|
|
3087
3090
|
export declare function isReadByLastUnIgnoredPageStatus(story: IStory): boolean;
|
|
3088
|
-
export declare
|
|
3089
|
-
hasViewed: boolean;
|
|
3090
|
-
}, b: {
|
|
3091
|
-
hasViewed: boolean;
|
|
3092
|
-
}): number;
|
|
3091
|
+
export declare const getContentScore: (content: IContent) => 1 | 2;
|
|
3093
3092
|
export declare function applyPlayerStyleChanges(defaultPlayerStyle: StoryPlayerStyle, mergedPlayerStyle: StoryPlayerStyle, themePlayerStyle: StoryPlayerStyle, playerStyleChanges: any): void;
|
|
3094
3093
|
export declare function getChangedProperties(source: any, target: any, level: string, playerStyleChanges: any, parentKeys?: string): void;
|
|
3095
3094
|
export declare function removeDuplicates(source: string[], checkAgainst: string[]): string[];
|
|
@@ -4067,6 +4066,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4067
4066
|
constructor();
|
|
4068
4067
|
connectedCallback(): void;
|
|
4069
4068
|
disconnectedCallback(): void;
|
|
4069
|
+
private getContentType;
|
|
4070
4070
|
onResizeEventDelay(): void;
|
|
4071
4071
|
onResize(): void;
|
|
4072
4072
|
handleHeightChangeMutation(mutationsList: MutationRecord[]): void;
|
|
@@ -4148,6 +4148,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4148
4148
|
labelAdditionalHeight: number;
|
|
4149
4149
|
};
|
|
4150
4150
|
event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
4151
|
+
private sortContent;
|
|
4151
4152
|
private reorderWidgets;
|
|
4152
4153
|
updateWidgetsData(): void;
|
|
4153
4154
|
private updateWidgetDisplay;
|