@wscsports/blaze-web-sdk 0.4.1 → 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 +23 -21
- 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;
|
|
@@ -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>;
|
|
@@ -1678,13 +1672,23 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1678
1672
|
api: API;
|
|
1679
1673
|
init(): Promise<void>;
|
|
1680
1674
|
private setAdsOnStories;
|
|
1681
|
-
getStoriesByIds(
|
|
1675
|
+
getStoriesByIds(options: {
|
|
1676
|
+
storyIds: string[];
|
|
1677
|
+
orderType?: OrderType;
|
|
1678
|
+
showLiveFirst?: boolean;
|
|
1679
|
+
}): Promise<{
|
|
1682
1680
|
result: IStory[];
|
|
1683
1681
|
httpStatus?: number | undefined;
|
|
1684
1682
|
data?: StoriesResponse | undefined;
|
|
1685
1683
|
error?: Error | undefined;
|
|
1686
1684
|
}>;
|
|
1687
|
-
getStoriesByLabels(
|
|
1685
|
+
getStoriesByLabels(options: {
|
|
1686
|
+
labels: string;
|
|
1687
|
+
orderType?: OrderType;
|
|
1688
|
+
maxItems?: number;
|
|
1689
|
+
labelsPriority?: string;
|
|
1690
|
+
showLiveFirst?: boolean;
|
|
1691
|
+
}): Promise<{
|
|
1688
1692
|
result: IStory[];
|
|
1689
1693
|
httpStatus?: number | undefined;
|
|
1690
1694
|
data?: StoriesResponse | undefined;
|
|
@@ -3084,11 +3088,7 @@ export declare function flattenObject<T extends Record<string, any>>(obj: T): Re
|
|
|
3084
3088
|
export declare function mergeStyles(element: HTMLElement, styles: Partial<CSSStyleDeclaration>): object;
|
|
3085
3089
|
export declare function getMaxValue(currentMax: string, newValue: string): string;
|
|
3086
3090
|
export declare function isReadByLastUnIgnoredPageStatus(story: IStory): boolean;
|
|
3087
|
-
export declare
|
|
3088
|
-
hasViewed: boolean;
|
|
3089
|
-
}, b: {
|
|
3090
|
-
hasViewed: boolean;
|
|
3091
|
-
}): number;
|
|
3091
|
+
export declare const getContentScore: (content: IContent) => 1 | 2;
|
|
3092
3092
|
export declare function applyPlayerStyleChanges(defaultPlayerStyle: StoryPlayerStyle, mergedPlayerStyle: StoryPlayerStyle, themePlayerStyle: StoryPlayerStyle, playerStyleChanges: any): void;
|
|
3093
3093
|
export declare function getChangedProperties(source: any, target: any, level: string, playerStyleChanges: any, parentKeys?: string): void;
|
|
3094
3094
|
export declare function removeDuplicates(source: string[], checkAgainst: string[]): string[];
|
|
@@ -4066,6 +4066,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4066
4066
|
constructor();
|
|
4067
4067
|
connectedCallback(): void;
|
|
4068
4068
|
disconnectedCallback(): void;
|
|
4069
|
+
private getContentType;
|
|
4069
4070
|
onResizeEventDelay(): void;
|
|
4070
4071
|
onResize(): void;
|
|
4071
4072
|
handleHeightChangeMutation(mutationsList: MutationRecord[]): void;
|
|
@@ -4147,6 +4148,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
4147
4148
|
labelAdditionalHeight: number;
|
|
4148
4149
|
};
|
|
4149
4150
|
event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
4151
|
+
private sortContent;
|
|
4150
4152
|
private reorderWidgets;
|
|
4151
4153
|
updateWidgetsData(): void;
|
|
4152
4154
|
private updateWidgetDisplay;
|