@wscsports/blaze-web-sdk 0.1.49 → 0.1.53
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 +2 -2
- package/publish/index.d.ts +34 -8
- package/publish/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wscsports/blaze-web-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.53",
|
|
4
4
|
"main": "publish/index",
|
|
5
5
|
"types": "publish/index",
|
|
6
6
|
"files": [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"build:dev": "webpack --config webpack.config.dev.js",
|
|
12
12
|
"build:prod": "webpack --config webpack.config.prod.js",
|
|
13
13
|
"publish:latest": "npm run build:prod && npm publish --access public --tag latest",
|
|
14
|
-
"publish:
|
|
14
|
+
"publish:beta": "npm run build:prod && npm publish --access public --tag beta"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/animejs": "^3.1.7",
|
package/publish/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare function WidgetGridView(containerId: string, options: IWidgetView
|
|
|
5
5
|
export declare function Theme(theme: ThemeType): IWidgetTheme;
|
|
6
6
|
export declare function addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
7
7
|
export declare const Delegations: typeof Delegation;
|
|
8
|
+
export declare function LabelBuilder(): IWidgetLabelBuilder;
|
|
8
9
|
declare const _default: {
|
|
9
10
|
Initialize: typeof Initialize;
|
|
10
11
|
WidgetGridView: typeof WidgetGridView;
|
|
@@ -12,6 +13,7 @@ declare const _default: {
|
|
|
12
13
|
Theme: typeof Theme;
|
|
13
14
|
addDelegateListener: typeof addDelegateListener;
|
|
14
15
|
setDoNotTrack: typeof setDoNotTrack;
|
|
16
|
+
LabelBuilder: typeof LabelBuilder;
|
|
15
17
|
Delegations: typeof Delegation;
|
|
16
18
|
};
|
|
17
19
|
export default _default;
|
|
@@ -103,7 +105,6 @@ export declare class URLManager {
|
|
|
103
105
|
static isBackWasCalled: boolean;
|
|
104
106
|
static resetLocation(): void;
|
|
105
107
|
static updateLocationStoryHash(story?: IStory): void;
|
|
106
|
-
static removePlayerTypeFromUrl(): void;
|
|
107
108
|
static getPlayerTypeFromUrl(): "Widget" | "Share" | "SingleStory" | undefined;
|
|
108
109
|
}
|
|
109
110
|
|
|
@@ -491,11 +492,12 @@ export interface IDrawable {
|
|
|
491
492
|
|
|
492
493
|
export * from './blaze-sdk.interface';
|
|
493
494
|
export * from './database.interface';
|
|
495
|
+
export * from './drawable.interface';
|
|
494
496
|
export * from './response.interface';
|
|
495
497
|
export * from './service.interface';
|
|
498
|
+
export * from './widget-label-builder.interface';
|
|
496
499
|
export * from './widget-options.interface';
|
|
497
500
|
export * from './widget-view.interface';
|
|
498
|
-
export * from './drawable.interface';
|
|
499
501
|
|
|
500
502
|
export default interface IntersectionObservable {
|
|
501
503
|
intersectionObserver: IntersectionObserver;
|
|
@@ -511,17 +513,30 @@ export interface IService {
|
|
|
511
513
|
init: (...args: any[]) => void;
|
|
512
514
|
}
|
|
513
515
|
|
|
516
|
+
export interface IWidgetLabelBuilder {
|
|
517
|
+
singleLabel(label: string): BlazeWidgetLabel;
|
|
518
|
+
mustInclude(...labels: Array<string | BlazeWidgetLabel>): BlazeWidgetLabel;
|
|
519
|
+
atLeastOneOf(...labels: Array<string | BlazeWidgetLabel>): BlazeWidgetLabel;
|
|
520
|
+
}
|
|
521
|
+
|
|
514
522
|
export type ContentType = 'story';
|
|
515
|
-
export interface
|
|
516
|
-
labels: string[];
|
|
523
|
+
export interface IWidgetViewOptionsBase {
|
|
517
524
|
orderType: OrderType;
|
|
518
|
-
storyIds?: string[];
|
|
519
525
|
maxItemsCount?: number;
|
|
520
526
|
maxDisplayItemsCount?: number;
|
|
521
|
-
contentType
|
|
527
|
+
contentType?: ContentType;
|
|
522
528
|
theme?: IWidgetTheme | ThemeType;
|
|
523
529
|
delegates?: Record<Delegation, EventListenerOrEventListenerObject>;
|
|
524
530
|
}
|
|
531
|
+
export interface IWidgetViewOptionsWithLabels extends IWidgetViewOptionsBase {
|
|
532
|
+
labels: string | string[] | BlazeWidgetLabel;
|
|
533
|
+
storyIds?: never;
|
|
534
|
+
}
|
|
535
|
+
export interface IWidgetViewOptionsWithStoryIds extends IWidgetViewOptionsBase {
|
|
536
|
+
storyIds: string[];
|
|
537
|
+
labels?: never;
|
|
538
|
+
}
|
|
539
|
+
export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptionsWithStoryIds;
|
|
525
540
|
|
|
526
541
|
export interface IWidgetView {
|
|
527
542
|
setTheme: (theme: IWidgetTheme) => void;
|
|
@@ -1557,7 +1572,7 @@ export declare class BlazeWidgetLayout extends BlazeWidgetScrollable implements
|
|
|
1557
1572
|
onResize(): void;
|
|
1558
1573
|
handlePopState(_event: Event): void;
|
|
1559
1574
|
addDelegateListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
|
|
1560
|
-
setLabels(labels: string[]): void;
|
|
1575
|
+
setLabels(labels: string | string[] | BlazeWidgetLabel): void;
|
|
1561
1576
|
getTheme(): IWidgetTheme;
|
|
1562
1577
|
setTheme(theme: IWidgetTheme): void;
|
|
1563
1578
|
reload(labels?: string[]): void;
|
|
@@ -1749,11 +1764,16 @@ export declare class BlazeWidgetSDK extends BaseWidget {
|
|
|
1749
1764
|
private injectFontResource;
|
|
1750
1765
|
}
|
|
1751
1766
|
|
|
1767
|
+
export interface IShareButton {
|
|
1768
|
+
type: ShareButtonType;
|
|
1769
|
+
onClick: (e: MouseEvent) => void;
|
|
1770
|
+
}
|
|
1752
1771
|
export declare class BlazeWidgetShareModal extends BaseWidget {
|
|
1753
1772
|
shareContainer: BlazeDiv;
|
|
1754
1773
|
shareDrawer: BlazeDrawer;
|
|
1755
1774
|
onOpen: (() => void) | undefined;
|
|
1756
1775
|
onClose: (() => void) | undefined;
|
|
1776
|
+
onClick?: ((button: BlazeShareButton) => void);
|
|
1757
1777
|
constructor();
|
|
1758
1778
|
connectedCallback(): Promise<void>;
|
|
1759
1779
|
disconnectedCallback(): void;
|
|
@@ -1866,6 +1886,7 @@ export declare class BlazeWidgetStoryPlayer extends BaseWidget {
|
|
|
1866
1886
|
overlay: any;
|
|
1867
1887
|
constructor();
|
|
1868
1888
|
connectedCallback(): void;
|
|
1889
|
+
onFocus(): void;
|
|
1869
1890
|
disconnectedCallback(): void;
|
|
1870
1891
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
1871
1892
|
private setupHammer;
|
|
@@ -2004,6 +2025,8 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2004
2025
|
data: IStory;
|
|
2005
2026
|
shareModal: BlazeWidgetShareModal | undefined;
|
|
2006
2027
|
isStoryLoadCompletedTriggered: boolean;
|
|
2028
|
+
isStoryActive: boolean;
|
|
2029
|
+
isResumeOnFocusExecuted: boolean;
|
|
2007
2030
|
pageIndex: number;
|
|
2008
2031
|
container: HTMLElement;
|
|
2009
2032
|
progress: HTMLElement;
|
|
@@ -2031,7 +2054,7 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2031
2054
|
navigationType: 'Automatic' | 'Manual' | undefined;
|
|
2032
2055
|
navigationDirection: 'Forwards' | 'Backwards' | undefined;
|
|
2033
2056
|
referring: ReferringEventInfo | undefined;
|
|
2034
|
-
|
|
2057
|
+
resumeAfterfocus: boolean;
|
|
2035
2058
|
totalPlayStopwatch: Stopwatch;
|
|
2036
2059
|
playerStyle: StoryPlayerStyle;
|
|
2037
2060
|
listeners: EventsListener;
|
|
@@ -2039,6 +2062,7 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2039
2062
|
shadow: HTMLDivElement;
|
|
2040
2063
|
isNavigationPending: boolean;
|
|
2041
2064
|
navigationTimeout: NodeJS.Timeout | null;
|
|
2065
|
+
lastPageIndexToResume: number;
|
|
2042
2066
|
constructor();
|
|
2043
2067
|
onShareClick(): Promise<void>;
|
|
2044
2068
|
updateChip(): void;
|
|
@@ -2068,6 +2092,7 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2068
2092
|
event(action: StoryAction, data: Partial<StoryEvent>, label?: string | undefined): void;
|
|
2069
2093
|
connectedCallback(): void;
|
|
2070
2094
|
onShareModalClose(): void;
|
|
2095
|
+
onShareModalButtonClick(shareButton: BlazeShareButton): Promise<void>;
|
|
2071
2096
|
onVisibilityChange(): void;
|
|
2072
2097
|
onBlur(): void;
|
|
2073
2098
|
onFocus(): void;
|
|
@@ -2082,6 +2107,7 @@ export declare class BlazeWidgetStory extends HTMLElement {
|
|
|
2082
2107
|
goNextPage(): void;
|
|
2083
2108
|
goPrevPage(): void;
|
|
2084
2109
|
disconnectedCallback(): void;
|
|
2110
|
+
renderCtaButton(pageIndex: number): void;
|
|
2085
2111
|
render(): void;
|
|
2086
2112
|
}
|
|
2087
2113
|
|