@wscsports/blaze-web-sdk 0.15.0 → 0.17.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/package.json +1 -1
- package/publish/index.d.ts +635 -31
- package/publish/index.js +1 -1
package/publish/index.d.ts
CHANGED
|
@@ -429,6 +429,7 @@ declare class DeviceDetector {
|
|
|
429
429
|
static getInstance(): DeviceDetector;
|
|
430
430
|
private detectOS;
|
|
431
431
|
private detectBrowser;
|
|
432
|
+
get getPlatform(): Platform;
|
|
432
433
|
get isDesktop(): boolean;
|
|
433
434
|
get isMobile(): boolean;
|
|
434
435
|
get isTablet(): boolean;
|
|
@@ -437,6 +438,8 @@ declare class DeviceDetector {
|
|
|
437
438
|
private handleResize;
|
|
438
439
|
isIOSMobileTabletSafari(): boolean;
|
|
439
440
|
get isFullscreenSupported(): boolean;
|
|
441
|
+
getDeviceInfo(): UAParser.IDevice;
|
|
442
|
+
getOSInfo(): UAParser.IOS;
|
|
440
443
|
}
|
|
441
444
|
export declare const deviceDetector: DeviceDetector;
|
|
442
445
|
|
|
@@ -470,17 +473,22 @@ export declare class FullscreenManager {
|
|
|
470
473
|
|
|
471
474
|
export * from './analytics.class';
|
|
472
475
|
export * from './base-element.class';
|
|
476
|
+
export * from './data-source.class';
|
|
473
477
|
export * from './debounce';
|
|
474
478
|
export * from './device-detector.class';
|
|
475
479
|
export * from './events-listener';
|
|
480
|
+
export * from './fullscreen-manager.class';
|
|
476
481
|
export * from './label-builder.class';
|
|
482
|
+
export * from './logger/logger-manager.class';
|
|
483
|
+
export * from './logger/logger-storage.class';
|
|
484
|
+
export * from './logger/logger-transport.class';
|
|
485
|
+
export * from './logger/logger-throttle.class';
|
|
477
486
|
export * from './long-press.handler';
|
|
478
487
|
export * from './singleton.class';
|
|
479
488
|
export * from './throttle';
|
|
480
489
|
export * from './url';
|
|
481
|
-
export * from './data-source.class';
|
|
482
|
-
export * from './fullscreen-manager.class';
|
|
483
490
|
export * from './visiblity-manager.class';
|
|
491
|
+
export * from './accessibility';
|
|
484
492
|
|
|
485
493
|
export interface IBlazeWidgetLabel {
|
|
486
494
|
readonly _type: 'BlazeWidgetLabel';
|
|
@@ -579,6 +587,217 @@ export declare class VisibilityManager {
|
|
|
579
587
|
detach(): void;
|
|
580
588
|
}
|
|
581
589
|
|
|
590
|
+
export declare const DEFAULT_ACCESSIBILITY_CONFIG: AccessibilityConfig;
|
|
591
|
+
export declare const DEFAULT_CONTENT_ACCESSIBILITY_CONFIG: ContentAccessibilityConfig;
|
|
592
|
+
|
|
593
|
+
export interface ModalLabelConfig {
|
|
594
|
+
contentType: ContentType;
|
|
595
|
+
position: number;
|
|
596
|
+
total: number;
|
|
597
|
+
title?: string;
|
|
598
|
+
currentContent?: any;
|
|
599
|
+
includeNavigationContext?: boolean;
|
|
600
|
+
}
|
|
601
|
+
export declare function generateModalAriaLabel(config: ModalLabelConfig): string;
|
|
602
|
+
|
|
603
|
+
declare class AccessibilityManager implements IAccessibilityManager {
|
|
604
|
+
private announcementService;
|
|
605
|
+
private contentButtons;
|
|
606
|
+
private modalFocusReturnTarget;
|
|
607
|
+
constructor(config?: AccessibilityConfig);
|
|
608
|
+
setupLiveRegions(container: HTMLElement): void;
|
|
609
|
+
announce(announcement: AccessibilityAnnouncement): void;
|
|
610
|
+
private getContentTypeLabel;
|
|
611
|
+
manageFocus(element: HTMLElement): void;
|
|
612
|
+
storeModalFocusReturnTarget(element: HTMLElement): void;
|
|
613
|
+
private returnFocusFromModal;
|
|
614
|
+
setupModalAccessibility(modal: HTMLElement, contentType: ContentType): void;
|
|
615
|
+
announceModalStatus(action: string, contentType: ContentType, context?: any): void;
|
|
616
|
+
closeModal(contentType: ContentType): void;
|
|
617
|
+
private clearModalFocusReturnTarget;
|
|
618
|
+
cleanup(): void;
|
|
619
|
+
clearAnnouncementQueue(): void;
|
|
620
|
+
}
|
|
621
|
+
export { AccessibilityManager };
|
|
622
|
+
export declare const accessibilityManager: AccessibilityManager;
|
|
623
|
+
|
|
624
|
+
export declare class ButtonLabelManager {
|
|
625
|
+
static setButtonLabel(button: BlazeButton | BlazeCtaButton, label: string): void;
|
|
626
|
+
static buildPlayPauseLabel(isPlaying: boolean, contentType: ContentType): string;
|
|
627
|
+
static buildMuteLabel(isMuted: boolean, contentType: ContentType): string;
|
|
628
|
+
static buildLikeLabel(isLiked: boolean): string;
|
|
629
|
+
static buildCtaLabel(ctaText?: string): string;
|
|
630
|
+
static buildNavigationLabel(direction: 'next' | 'prev', contentType: ContentType, target?: 'page' | 'content'): string;
|
|
631
|
+
static setBatchLabels(buttonLabelPairs: Array<[BlazeButton | BlazeCtaButton | undefined, string]>): void;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
declare class ContentAccessibilityManager implements IContentAccessibilityManager {
|
|
635
|
+
private config;
|
|
636
|
+
private contentStrategies;
|
|
637
|
+
private registeredWidgets;
|
|
638
|
+
private lastUserActionTime;
|
|
639
|
+
private readonly userActionThrottleMs;
|
|
640
|
+
constructor(config?: ContentAccessibilityConfig);
|
|
641
|
+
private initializeStrategies;
|
|
642
|
+
registerContentWidget(contentId: string, elements: IContentWidgetElements, contentType: ContentType): void;
|
|
643
|
+
updateButtonLabels(contentId: string, dynamicState: Partial<IContentWidgetData>): void;
|
|
644
|
+
private getContentTypeLabel;
|
|
645
|
+
unregisterContentWidget(contentId: string): void;
|
|
646
|
+
announceUserAction(contentType: ContentType, action: string, context: UserActionContext): void;
|
|
647
|
+
announceModalOpening(contentType: ContentType, context: ModalContext): void;
|
|
648
|
+
announceNavigation(position: number, total: number, type: string, title?: string, context?: AccessibilityContext): void;
|
|
649
|
+
private generateMeaningfulAnnouncement;
|
|
650
|
+
private buildPageNavigationAnnouncement;
|
|
651
|
+
private buildStoryNavigationAnnouncement;
|
|
652
|
+
private buildMomentNavigationAnnouncement;
|
|
653
|
+
private buildGenericNavigationAnnouncement;
|
|
654
|
+
private formatAnnouncementMessage;
|
|
655
|
+
cleanup(): void;
|
|
656
|
+
}
|
|
657
|
+
export { ContentAccessibilityManager };
|
|
658
|
+
export declare const contentAccessibilityManager: ContentAccessibilityManager;
|
|
659
|
+
|
|
660
|
+
declare abstract class BaseContentAccessibilityStrategy implements IContentAccessibilityStrategy {
|
|
661
|
+
protected contentType: ContentType;
|
|
662
|
+
protected buttonLabels: BaseButtonLabelConfig;
|
|
663
|
+
protected registeredWidgets: Map<string, IContentWidgetElements>;
|
|
664
|
+
constructor(contentType: ContentType, buttonLabels: BaseButtonLabelConfig);
|
|
665
|
+
setupAccessibility(contentId: string, elements: IContentWidgetElements): void;
|
|
666
|
+
updateLabels(contentId: string, data: IContentWidgetData): void;
|
|
667
|
+
cleanup(contentId: string): void;
|
|
668
|
+
}
|
|
669
|
+
export declare class StoryAccessibilityStrategy extends BaseContentAccessibilityStrategy {
|
|
670
|
+
private storyButtonLabels;
|
|
671
|
+
constructor(buttonLabels: StoryButtonLabelConfig);
|
|
672
|
+
updateLabels(contentId: string, data: IContentWidgetData): void;
|
|
673
|
+
}
|
|
674
|
+
export declare class MomentAccessibilityStrategy extends BaseContentAccessibilityStrategy {
|
|
675
|
+
private momentButtonLabels;
|
|
676
|
+
constructor(buttonLabels: MomentButtonLabelConfig);
|
|
677
|
+
updateLabels(contentId: string, data: IContentWidgetData): void;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export * from './accessibility.class';
|
|
681
|
+
export * from './accessibility-configs';
|
|
682
|
+
export * from './content-accessibility-manager.class';
|
|
683
|
+
export * from './content-accessibility-strategies';
|
|
684
|
+
export * from './accessibility-utils';
|
|
685
|
+
export * from './button-label-manager';
|
|
686
|
+
|
|
687
|
+
export * from './logger-manager.class';
|
|
688
|
+
export * from './logger-storage.class';
|
|
689
|
+
export * from './logger-transport.class';
|
|
690
|
+
export * from './logger-throttle.class';
|
|
691
|
+
export * from './logger-database-adapter';
|
|
692
|
+
|
|
693
|
+
export declare class LoggerDatabaseAdapter implements ILoggerDatabase {
|
|
694
|
+
storeLog(entry: LogEntryDB): Promise<void>;
|
|
695
|
+
getLogBatch(maxSize: number): Promise<LogEntryDB[]>;
|
|
696
|
+
removeLogs(ids: string[]): Promise<void>;
|
|
697
|
+
clearLogs(): Promise<void>;
|
|
698
|
+
getLogCount(): Promise<number>;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export declare class LoggerManager implements ILogger {
|
|
702
|
+
private static readonly LOG_IDENTIFIER_PREFIX;
|
|
703
|
+
private readonly storage;
|
|
704
|
+
private readonly transport;
|
|
705
|
+
private readonly throttle;
|
|
706
|
+
private configuration;
|
|
707
|
+
private pendingConfigUpdate;
|
|
708
|
+
private isInitialized;
|
|
709
|
+
private isDestroyed;
|
|
710
|
+
private isSending;
|
|
711
|
+
private immediateLogs;
|
|
712
|
+
private offlineQueue;
|
|
713
|
+
private immediateTimer;
|
|
714
|
+
private configUpdateTimer;
|
|
715
|
+
private isOnline;
|
|
716
|
+
private onlineStatusListener;
|
|
717
|
+
constructor(database: ILoggerDatabase);
|
|
718
|
+
init(configuration?: ILoggerConfiguration): Promise<void>;
|
|
719
|
+
destroy(): Promise<void>;
|
|
720
|
+
updateConfiguration(configuration: ILoggerConfiguration): void;
|
|
721
|
+
log(level: LogLevel, customLogIdentifier: string, message: string, metadata: ILogMetadata): Promise<void>;
|
|
722
|
+
private shouldLog;
|
|
723
|
+
private shouldSendImmediately;
|
|
724
|
+
private addToImmediateBatch;
|
|
725
|
+
private flushImmediateLogs;
|
|
726
|
+
private removeEntriesFromStorage;
|
|
727
|
+
private sendEntriesAndCleanup;
|
|
728
|
+
private processBatch;
|
|
729
|
+
private setupNetworkMonitoring;
|
|
730
|
+
private syncOfflineQueue;
|
|
731
|
+
private addToOfflineQueue;
|
|
732
|
+
private scheduleConfigurationUpdate;
|
|
733
|
+
private applyPendingConfiguration;
|
|
734
|
+
private resetLoggerState;
|
|
735
|
+
private handleNetworkReconnection;
|
|
736
|
+
private setDefaultLoggerConfiguration;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
export interface ILoggerDatabase {
|
|
740
|
+
storeLog(entry: LogEntryDB): Promise<void>;
|
|
741
|
+
getLogBatch(maxSize: number): Promise<LogEntryDB[]>;
|
|
742
|
+
removeLogs(ids: string[]): Promise<void>;
|
|
743
|
+
clearLogs(): Promise<void>;
|
|
744
|
+
getLogCount(): Promise<number>;
|
|
745
|
+
}
|
|
746
|
+
export declare class LoggerStorage {
|
|
747
|
+
private database;
|
|
748
|
+
constructor(database: ILoggerDatabase);
|
|
749
|
+
store(entry: LogEntryDB): Promise<void>;
|
|
750
|
+
getBatch(maxSize: number): Promise<LogEntryDB[]>;
|
|
751
|
+
remove(ids: string[]): Promise<void>;
|
|
752
|
+
clear(): Promise<void>;
|
|
753
|
+
getLogCount(): Promise<number>;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
export declare class LoggerThrottle {
|
|
757
|
+
private batchIntervalMs;
|
|
758
|
+
private logCount;
|
|
759
|
+
private batchInterval;
|
|
760
|
+
private batchCallback;
|
|
761
|
+
private _maxBatchSize;
|
|
762
|
+
private _minBatchSize;
|
|
763
|
+
get minBatchSize(): number;
|
|
764
|
+
get maxBatchSize(): number;
|
|
765
|
+
updateConfiguration(config: {
|
|
766
|
+
batchIntervalMs: number;
|
|
767
|
+
maxBatchSize: number;
|
|
768
|
+
minBatchSize: number;
|
|
769
|
+
}): void;
|
|
770
|
+
onBatchReady(callback: () => Promise<void>): void;
|
|
771
|
+
destroy(): void;
|
|
772
|
+
private setupBatchInterval;
|
|
773
|
+
incrementLogCount(): void;
|
|
774
|
+
shouldTriggerBatch(): boolean;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export declare class BatchRejectedError extends Error {
|
|
778
|
+
constructor(message?: string);
|
|
779
|
+
}
|
|
780
|
+
export interface ILogApiRequest {
|
|
781
|
+
message: string;
|
|
782
|
+
level: string;
|
|
783
|
+
api_key: string;
|
|
784
|
+
api_scheme_version: string;
|
|
785
|
+
metadata: ILogMetadata;
|
|
786
|
+
}
|
|
787
|
+
export declare class LoggerTransport {
|
|
788
|
+
private readonly MAX_RETRY_ATTEMPTS;
|
|
789
|
+
private readonly BASE_RETRY_DELAY;
|
|
790
|
+
private readonly MAX_RETRY_DELAY;
|
|
791
|
+
private readonly REQUEST_TIMEOUT;
|
|
792
|
+
send(entries: LogEntryDB[]): Promise<void>;
|
|
793
|
+
private sendWithRetry;
|
|
794
|
+
private attemptSend;
|
|
795
|
+
private preparePayload;
|
|
796
|
+
private sendToEndpoint;
|
|
797
|
+
private calculateRetryDelay;
|
|
798
|
+
private delay;
|
|
799
|
+
}
|
|
800
|
+
|
|
582
801
|
export declare class BlazeAlert extends BaseWidget {
|
|
583
802
|
titleContainer: HTMLDivElement;
|
|
584
803
|
textContainer: HTMLDivElement;
|
|
@@ -749,7 +968,8 @@ export declare class BlazeButton extends BaseWidget {
|
|
|
749
968
|
isAnimationOnDesktopInitialized: boolean;
|
|
750
969
|
get refElement(): ShadowRoot | this;
|
|
751
970
|
constructor();
|
|
752
|
-
|
|
971
|
+
private setupFocusDelegation;
|
|
972
|
+
static get observedAttributes(): ("height" | "order" | "width" | "icon-color" | "disabled" | "blaze-btn-visible" | "blaze-btn-hidden" | "button-desktop-animation")[];
|
|
753
973
|
private onMouseEnter;
|
|
754
974
|
private onMouseLeave;
|
|
755
975
|
private onClick;
|
|
@@ -760,12 +980,14 @@ export declare class BlazeButton extends BaseWidget {
|
|
|
760
980
|
get width(): string | number | boolean;
|
|
761
981
|
setIconUrl(value: string): void;
|
|
762
982
|
setIconUrlAnimation(value: string): void;
|
|
983
|
+
setAriaLabel(label: string): void;
|
|
763
984
|
private applyIconStyles;
|
|
764
985
|
private setIsHidden;
|
|
765
986
|
private setIsVisible;
|
|
766
987
|
private setIsDisabled;
|
|
767
988
|
private setHeight;
|
|
768
989
|
private setWidth;
|
|
990
|
+
setDataTestId(value: string): void;
|
|
769
991
|
}
|
|
770
992
|
|
|
771
993
|
export declare const CTA_BUTTON_ATTRIBUTES: {
|
|
@@ -830,6 +1052,7 @@ export declare class BlazeCtaButton extends BaseWidget {
|
|
|
830
1052
|
setAnchorButtonStyles(styles: Partial<CSSStyleDeclaration>): void;
|
|
831
1053
|
setCtaTextStyle(styles: Partial<CSSStyleDeclaration>): void;
|
|
832
1054
|
setCtaIconStyles(styles: Partial<CSSStyleDeclaration>): void;
|
|
1055
|
+
setAriaLabel(label: string): void;
|
|
833
1056
|
clearAllAnimations(): void;
|
|
834
1057
|
}
|
|
835
1058
|
|
|
@@ -856,6 +1079,19 @@ export declare class BlazeShareButton extends BaseWidget {
|
|
|
856
1079
|
createButton(text: string, svgIcon: string): void;
|
|
857
1080
|
}
|
|
858
1081
|
|
|
1082
|
+
export declare const ACCESSIBILITY_TIMING: {
|
|
1083
|
+
readonly FOCUS_DELAY: 500;
|
|
1084
|
+
readonly LABEL_CLEAR_DELAY: 1000;
|
|
1085
|
+
readonly CONFIG_SCHEDULE_DELAY: 1000;
|
|
1086
|
+
};
|
|
1087
|
+
export declare const ACCESSIBILITY_ATTRIBUTES: {
|
|
1088
|
+
readonly ACTIVE_TABINDEX: "0";
|
|
1089
|
+
readonly INACTIVE_TABINDEX: "-1";
|
|
1090
|
+
readonly REGION_ROLE: "region";
|
|
1091
|
+
readonly ARIA_HIDDEN_FALSE: "false";
|
|
1092
|
+
readonly ARIA_HIDDEN_TRUE: "true";
|
|
1093
|
+
};
|
|
1094
|
+
|
|
859
1095
|
export declare const IMA_RATIOS: {
|
|
860
1096
|
readonly general: "1x1";
|
|
861
1097
|
readonly horizontal: "640x480";
|
|
@@ -983,6 +1219,7 @@ export declare const ASPECT_RATIO_16_9_STRING = "16 / 9";
|
|
|
983
1219
|
export declare const ASPECT_RATIO_9_16_STRING = "9 / 16";
|
|
984
1220
|
export declare const ASPECT_RATIO_4_3_STRING = "4 / 3";
|
|
985
1221
|
|
|
1222
|
+
export * from './accessibility.constants';
|
|
986
1223
|
export * from './ads.constants';
|
|
987
1224
|
export * from './analytics.constants';
|
|
988
1225
|
export * from './device.constants';
|
|
@@ -1040,6 +1277,7 @@ export declare const DB_NAMES: {
|
|
|
1040
1277
|
readonly USER: "user";
|
|
1041
1278
|
readonly STORIES: "stories";
|
|
1042
1279
|
readonly VIDEOS: "videos";
|
|
1280
|
+
readonly LOGS: "logs";
|
|
1043
1281
|
};
|
|
1044
1282
|
export declare class Database implements IDatabase {
|
|
1045
1283
|
private readonly options;
|
|
@@ -1053,7 +1291,9 @@ export declare class Database implements IDatabase {
|
|
|
1053
1291
|
private deleteDatabase;
|
|
1054
1292
|
createTransaction(tableName: string, mode: 'readonly' | 'readwrite'): IDBObjectStore | null;
|
|
1055
1293
|
get<T>(tableName: string, key: string): Promise<IResponse<T>>;
|
|
1294
|
+
getAll<T>(tableName: string): Promise<T[]>;
|
|
1056
1295
|
update<T>(tableName: string, value: any): Promise<IResponse<T>>;
|
|
1296
|
+
delete(tableName: string, key: string): Promise<IResponse<void>>;
|
|
1057
1297
|
private throttledReinit;
|
|
1058
1298
|
}
|
|
1059
1299
|
|
|
@@ -1091,7 +1331,9 @@ export type IAdInfo = IWebAdInfo | IImaAdInfo;
|
|
|
1091
1331
|
export interface AppConfiguration {
|
|
1092
1332
|
configurations: {
|
|
1093
1333
|
analyticsAddEntitiesInfo?: string;
|
|
1334
|
+
configRefetchIntervalInMinutes?: number;
|
|
1094
1335
|
};
|
|
1336
|
+
sdkLoggerConfigurations?: ILoggerConfiguration;
|
|
1095
1337
|
}
|
|
1096
1338
|
|
|
1097
1339
|
export type ContentExtraInfo = {
|
|
@@ -1154,6 +1396,7 @@ export * from './cta.interface';
|
|
|
1154
1396
|
export * from './interaction.interface';
|
|
1155
1397
|
export * from './layer-content.interface';
|
|
1156
1398
|
export * from './layer.interface';
|
|
1399
|
+
export * from './log-entry.interface';
|
|
1157
1400
|
export * from './moment.interface';
|
|
1158
1401
|
export * from './page.interface';
|
|
1159
1402
|
export * from './rendition.interface';
|
|
@@ -1258,6 +1501,16 @@ export interface ILayer {
|
|
|
1258
1501
|
content: ILayerContent;
|
|
1259
1502
|
}
|
|
1260
1503
|
|
|
1504
|
+
export interface LogEntryDB {
|
|
1505
|
+
id: string;
|
|
1506
|
+
message: string;
|
|
1507
|
+
level: LogLevel;
|
|
1508
|
+
timestamp: string;
|
|
1509
|
+
logIdentifier: string;
|
|
1510
|
+
metadata: string;
|
|
1511
|
+
priority: number;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1261
1514
|
type MomentType = 'Content' | 'Ad';
|
|
1262
1515
|
export interface IMoment extends IContent {
|
|
1263
1516
|
momentIndexInPlaylist: number;
|
|
@@ -1448,6 +1701,15 @@ export * from './event.enum';
|
|
|
1448
1701
|
export * from './http-status.enum';
|
|
1449
1702
|
export * from './button.enum';
|
|
1450
1703
|
export * from './action-handler-id.enum';
|
|
1704
|
+
export * from './log-level.enum';
|
|
1705
|
+
|
|
1706
|
+
export declare enum LogLevel {
|
|
1707
|
+
DEBUG = "DEBUG",
|
|
1708
|
+
INFO = "INFO",
|
|
1709
|
+
WARN = "WARN",
|
|
1710
|
+
ERROR = "ERROR",
|
|
1711
|
+
CRITICAL = "CRITICAL"
|
|
1712
|
+
}
|
|
1451
1713
|
|
|
1452
1714
|
export interface WidgetsTagNameMap {
|
|
1453
1715
|
'blaze-sdk': BlazeWidgetSDK;
|
|
@@ -1595,6 +1857,72 @@ export declare const shareVideosIconSvg = "data:image/svg+xml;base64,PHN2ZyB4bWx
|
|
|
1595
1857
|
export declare const linkIconSvg = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjNWY2MzY4Ij48cGF0aCBkPSJNNDQwLTI4MEgyODBxLTgzIDAtMTQxLjUtNTguNVQ4MC00ODBxMC04MyA1OC41LTE0MS41VDI4MC02ODBoMTYwdjgwSDI4MHEtNTAgMC04NSAzNXQtMzUgODVxMCA1MCAzNSA4NXQ4NSAzNWgxNjB2ODBaTTMyMC00NDB2LTgwaDMyMHY4MEgzMjBabTIwMCAxNjB2LTgwaDE2MHE1MCAwIDg1LTM1dDM1LTg1cTAtNTAtMzUtODV0LTg1LTM1SDUyMHYtODBoMTYwcTgzIDAgMTQxLjUgNTguNVQ4ODAtNDgwcTAgODMtNTguNSAxNDEuNVQ2ODAtMjgwSDUyMFoiLz48L3N2Zz4=";
|
|
1596
1858
|
export declare const checkMarkSvg = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9Im1hc2swXzUxMl8xMDY4IiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IiNEOUQ5RDkiLz4KPC9tYXNrPgo8ZyBtYXNrPSJ1cmwoI21hc2swXzUxMl8xMDY4KSI+CjxwYXRoIGQ9Ik05LjU1MDEgMThMMy44NTAxIDEyLjNMNS4yNzUxIDEwLjg3NUw5LjU1MDEgMTUuMTVMMTguNzI1MSA1Ljk3NDk4TDIwLjE1MDEgNy4zOTk5OEw5LjU1MDEgMThaIiBmaWxsPSIjRjBGMEYwIi8+CjwvZz4KPC9zdmc+Cg==";
|
|
1597
1859
|
|
|
1860
|
+
export interface AccessibilityContext {
|
|
1861
|
+
navigationType?: string;
|
|
1862
|
+
export interface ModalContext extends AccessibilityContext {
|
|
1863
|
+
total: number;
|
|
1864
|
+
isPlaying?: boolean;
|
|
1865
|
+
hasClosedCaptions?: boolean;
|
|
1866
|
+
totalPages?: number;
|
|
1867
|
+
}
|
|
1868
|
+
export interface UserActionContext extends AccessibilityContext {
|
|
1869
|
+
setupAccessibility(contentId: string, elements: IContentWidgetElements): void;
|
|
1870
|
+
updateLabels(contentId: string, data: IContentWidgetData): void;
|
|
1871
|
+
cleanup(contentId: string): void;
|
|
1872
|
+
}
|
|
1873
|
+
export interface AccessibilityAnnouncement {
|
|
1874
|
+
message: string;
|
|
1875
|
+
priority: AnnouncementPriority;
|
|
1876
|
+
delay?: number;
|
|
1877
|
+
category?: AnnouncementCategory;
|
|
1878
|
+
}
|
|
1879
|
+
export interface IContentWidgetButtons {
|
|
1880
|
+
play?: HTMLElement;
|
|
1881
|
+
mute?: HTMLElement;
|
|
1882
|
+
like?: HTMLElement;
|
|
1883
|
+
share?: HTMLElement;
|
|
1884
|
+
close?: HTMLElement;
|
|
1885
|
+
cta?: HTMLElement;
|
|
1886
|
+
captions?: HTMLElement;
|
|
1887
|
+
custom1?: HTMLElement;
|
|
1888
|
+
custom2?: HTMLElement;
|
|
1889
|
+
nextStoryPage?: HTMLElement;
|
|
1890
|
+
prevStoryPage?: HTMLElement;
|
|
1891
|
+
nextStory?: HTMLElement;
|
|
1892
|
+
prevStory?: HTMLElement;
|
|
1893
|
+
nextMoment?: HTMLElement;
|
|
1894
|
+
prevMoment?: HTMLElement;
|
|
1895
|
+
}
|
|
1896
|
+
export interface IContentWidgetData {
|
|
1897
|
+
id: string;
|
|
1898
|
+
title?: string;
|
|
1899
|
+
isPlaying?: boolean;
|
|
1900
|
+
isMuted?: boolean;
|
|
1901
|
+
isLiked?: boolean;
|
|
1902
|
+
hasClosedCaptions?: boolean;
|
|
1903
|
+
ctaText?: string;
|
|
1904
|
+
}
|
|
1905
|
+
export interface IContentWidgetElements {
|
|
1906
|
+
widget: HTMLElement;
|
|
1907
|
+
buttons: IContentWidgetButtons;
|
|
1908
|
+
data: IContentWidgetData;
|
|
1909
|
+
}
|
|
1910
|
+
export interface IContentAccessibilityManager {
|
|
1911
|
+
registerContentWidget(contentId: string, elements: IContentWidgetElements, contentType: ContentType): void;
|
|
1912
|
+
updateButtonLabels(contentId: string, dynamicState: Partial<IContentWidgetData>): void;
|
|
1913
|
+
announceUserAction(contentType: ContentType, action: string, context: UserActionContext): void;
|
|
1914
|
+
announceModalOpening(contentType: ContentType, context: ModalContext): void;
|
|
1915
|
+
announceNavigation(position: number, total: number, type: string, title?: string, context?: AccessibilityContext): void;
|
|
1916
|
+
unregisterContentWidget(contentId: string): void;
|
|
1917
|
+
cleanup(): void;
|
|
1918
|
+
}
|
|
1919
|
+
export interface IAccessibilityManager {
|
|
1920
|
+
setupLiveRegions(container?: HTMLElement): void;
|
|
1921
|
+
announce(announcement: AccessibilityAnnouncement): void;
|
|
1922
|
+
manageFocus(element: HTMLElement): void;
|
|
1923
|
+
cleanup(): void;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1598
1926
|
type CustomNativeTargeting = Record<string, string | string[]>;
|
|
1599
1927
|
type CustomNativeArgs = {
|
|
1600
1928
|
path: string;
|
|
@@ -1662,7 +1990,9 @@ export type IdsDataSourceParams = Omit<BlazeDataSourceType, 'sourceType' | 'labe
|
|
|
1662
1990
|
export interface IDatabase {
|
|
1663
1991
|
init: () => Promise<void>;
|
|
1664
1992
|
get: <T>(tableName: string, key: string) => Promise<IResponse<T>>;
|
|
1993
|
+
getAll: <T>(tableName: string) => Promise<T[]>;
|
|
1665
1994
|
update: <T>(tableName: string, value: any) => Promise<IResponse<T>>;
|
|
1995
|
+
delete: (tableName: string, key: string) => Promise<IResponse<void>>;
|
|
1666
1996
|
}
|
|
1667
1997
|
export interface IDatabaseInitOptions {
|
|
1668
1998
|
onOpen: (db: IDBDatabase) => Promise<void>;
|
|
@@ -1752,6 +2082,7 @@ export type BlazeVideoIconsStyle = BaseBlazeIcons & {
|
|
|
1752
2082
|
};
|
|
1753
2083
|
};
|
|
1754
2084
|
|
|
2085
|
+
export * from './accessibility-manager.interface';
|
|
1755
2086
|
export * from './ad-handler.interface';
|
|
1756
2087
|
export * from './behaviors.interface';
|
|
1757
2088
|
export * from './blaze-sdk.interface';
|
|
@@ -1762,13 +2093,14 @@ export * from './device.interface';
|
|
|
1762
2093
|
export * from './drawable.interface';
|
|
1763
2094
|
export * from './http-response.interface';
|
|
1764
2095
|
export * from './icons.interface';
|
|
1765
|
-
export * from './
|
|
2096
|
+
export * from './logger.interface';
|
|
1766
2097
|
export * from './player.interface';
|
|
1767
2098
|
export * from './response.interface';
|
|
1768
2099
|
export * from './service.interface';
|
|
1769
2100
|
export * from './widget-label-builder.interface';
|
|
1770
2101
|
export * from './widget-options.interface';
|
|
1771
2102
|
export * from './widget-view.interface';
|
|
2103
|
+
export * from './item-click-callback.interface';
|
|
1772
2104
|
export { default as Observable } from './observable';
|
|
1773
2105
|
|
|
1774
2106
|
export interface ItemClickContext {
|
|
@@ -1794,6 +2126,74 @@ export interface ILayoutDataSourceOptions {
|
|
|
1794
2126
|
shouldOrderWidgetByReadStatus?: boolean;
|
|
1795
2127
|
}
|
|
1796
2128
|
|
|
2129
|
+
export interface ILoggerConfiguration {
|
|
2130
|
+
isEnabled: boolean;
|
|
2131
|
+
loggerBatchIntervalInSeconds: number;
|
|
2132
|
+
loggerMaxAllowedBatchSize: number;
|
|
2133
|
+
loggerMinAllowedBatchSize: number;
|
|
2134
|
+
logLevel: LogLevel;
|
|
2135
|
+
immediateLogLevel: LogLevel;
|
|
2136
|
+
ignoredLogs: IIgnoredLog[];
|
|
2137
|
+
}
|
|
2138
|
+
export interface IIgnoredLog {
|
|
2139
|
+
logIdentifier: string;
|
|
2140
|
+
sdkType: 'Web';
|
|
2141
|
+
applyFromVersion?: string;
|
|
2142
|
+
applyBelowVersion?: string;
|
|
2143
|
+
applySpecificVersions?: string[];
|
|
2144
|
+
}
|
|
2145
|
+
export interface ILogEntry {
|
|
2146
|
+
id: string;
|
|
2147
|
+
message: string;
|
|
2148
|
+
level: LogLevel;
|
|
2149
|
+
timestamp: string;
|
|
2150
|
+
logIdentifier: string;
|
|
2151
|
+
metadata: ILogMetadata;
|
|
2152
|
+
}
|
|
2153
|
+
export interface ILogMetadata {
|
|
2154
|
+
session_id: string;
|
|
2155
|
+
id: string;
|
|
2156
|
+
log_identifier: string;
|
|
2157
|
+
sdk_type: string;
|
|
2158
|
+
sdk_version: string;
|
|
2159
|
+
api_key: string;
|
|
2160
|
+
device_type: string;
|
|
2161
|
+
device_brand: string;
|
|
2162
|
+
device_model: string;
|
|
2163
|
+
operating_system: string;
|
|
2164
|
+
operating_system_version: string;
|
|
2165
|
+
screen_resolution: string;
|
|
2166
|
+
connection_type: string;
|
|
2167
|
+
app_id: string;
|
|
2168
|
+
app_version: string;
|
|
2169
|
+
reporting_timestamp: string;
|
|
2170
|
+
[key: string]: any;
|
|
2171
|
+
}
|
|
2172
|
+
export declare const METADATA_FIELDS: {
|
|
2173
|
+
readonly SESSION_ID: "session_id";
|
|
2174
|
+
readonly ID: "id";
|
|
2175
|
+
readonly SDK_TYPE: "sdk_type";
|
|
2176
|
+
readonly SDK_VERSION: "sdk_version";
|
|
2177
|
+
readonly API_KEY: "api_key";
|
|
2178
|
+
readonly DEVICE_TYPE: "device_type";
|
|
2179
|
+
readonly DEVICE_BRAND: "device_brand";
|
|
2180
|
+
readonly DEVICE_MODEL: "device_model";
|
|
2181
|
+
readonly OPERATING_SYSTEM: "operating_system";
|
|
2182
|
+
readonly OPERATING_SYSTEM_VERSION: "operating_system_version";
|
|
2183
|
+
readonly SCREEN_RESOLUTION: "screen_resolution";
|
|
2184
|
+
readonly CONNECTION_TYPE: "connection_type";
|
|
2185
|
+
readonly APP_ID: "app_id";
|
|
2186
|
+
readonly APP_VERSION: "app_version";
|
|
2187
|
+
readonly REPORTING_TIMESTAMP: "reporting_timestamp";
|
|
2188
|
+
readonly LOG_IDENTIFIER: "log_identifier";
|
|
2189
|
+
};
|
|
2190
|
+
export interface ILogger {
|
|
2191
|
+
init(configuration?: ILoggerConfiguration): Promise<void>;
|
|
2192
|
+
log(level: LogLevel, logIdentifier: string, message: string, metadata?: Record<string, any>): void;
|
|
2193
|
+
updateConfiguration(configuration: ILoggerConfiguration): void;
|
|
2194
|
+
destroy(): Promise<void>;
|
|
2195
|
+
}
|
|
2196
|
+
|
|
1797
2197
|
export default interface IntersectionObservable {
|
|
1798
2198
|
intersectionObserver: IntersectionObserver;
|
|
1799
2199
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
@@ -1917,6 +2317,24 @@ declare abstract class AnalyticsServiceClass extends AnalyticsServiceClass_base
|
|
|
1917
2317
|
}
|
|
1918
2318
|
export declare const AnalyticsService: AnalyticsServiceClass;
|
|
1919
2319
|
|
|
2320
|
+
export declare class AnnouncementService implements IAnnouncementService {
|
|
2321
|
+
private config;
|
|
2322
|
+
private containerRegions;
|
|
2323
|
+
private announcementQueue;
|
|
2324
|
+
private isProcessingAnnouncement;
|
|
2325
|
+
private lastAnnouncementTime;
|
|
2326
|
+
private liveRegionsSetup;
|
|
2327
|
+
constructor(config: AnnouncementConfig);
|
|
2328
|
+
setupLiveRegions(container: HTMLElement): void;
|
|
2329
|
+
announce(message: string, priority?: AnnouncementPriority, category?: AnnouncementCategory): void;
|
|
2330
|
+
queueAnnouncement(announcement: AccessibilityAnnouncement): void;
|
|
2331
|
+
clearQueue(): void;
|
|
2332
|
+
isProcessing(): boolean;
|
|
2333
|
+
private processAnnouncementQueue;
|
|
2334
|
+
private performAnnouncement;
|
|
2335
|
+
cleanup(): void;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
1920
2338
|
type GetOptions = {
|
|
1921
2339
|
orderType?: OrderType;
|
|
1922
2340
|
};
|
|
@@ -1990,6 +2408,7 @@ declare abstract class ApiServiceClass extends ApiServiceClass_base implements I
|
|
|
1990
2408
|
setLiked: boolean;
|
|
1991
2409
|
}): Promise<void>;
|
|
1992
2410
|
sendAnaltyicsEvents(body: Partial<AnalyticsEvent>[]): Promise<import("../interfaces").IHttpResponse<unknown>>;
|
|
2411
|
+
sendLoggerLogs(compressedBody: ArrayBuffer): Promise<import("../interfaces").IHttpResponse<unknown>>;
|
|
1993
2412
|
sendInteractionResponse(options: {
|
|
1994
2413
|
interactionId: Interaction['id'];
|
|
1995
2414
|
responseId: string;
|
|
@@ -2011,9 +2430,13 @@ declare const AppConfigurationServiceClass_base: {
|
|
|
2011
2430
|
};
|
|
2012
2431
|
declare abstract class AppConfigurationServiceClass extends AppConfigurationServiceClass_base implements IService {
|
|
2013
2432
|
private _appConfigurations?;
|
|
2433
|
+
private _refetchInterval;
|
|
2014
2434
|
constructor();
|
|
2015
2435
|
get appConfigurations(): AppConfiguration | undefined;
|
|
2016
2436
|
init(options: IBlazeSDKOptions): Promise<void>;
|
|
2437
|
+
private setupRefetchInterval;
|
|
2438
|
+
private clearRefetchInterval;
|
|
2439
|
+
destroy(): void;
|
|
2017
2440
|
}
|
|
2018
2441
|
export declare const AppConfigurationService: AppConfigurationServiceClass;
|
|
2019
2442
|
|
|
@@ -2059,6 +2482,7 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
2059
2482
|
private readonly _russiaRegionCDN;
|
|
2060
2483
|
private readonly _urls;
|
|
2061
2484
|
private readonly _analyticsUrls;
|
|
2485
|
+
private _loggerUrls;
|
|
2062
2486
|
private readonly _globalStorageCDN;
|
|
2063
2487
|
private readonly _russiaStorageCDN;
|
|
2064
2488
|
private readonly _sdkStorageCDNs;
|
|
@@ -2070,7 +2494,8 @@ declare abstract class ConfigServiceClass extends ConfigServiceClass_base implem
|
|
|
2070
2494
|
private set environment(value);
|
|
2071
2495
|
get sendAnalytics(): boolean;
|
|
2072
2496
|
get shouldCreateUser(): boolean;
|
|
2073
|
-
get analyticsApiUrl(): string
|
|
2497
|
+
get analyticsApiUrl(): string;
|
|
2498
|
+
get loggerApiUrl(): string;
|
|
2074
2499
|
get externalUserId(): string | null;
|
|
2075
2500
|
set externalUserId(value: string | null);
|
|
2076
2501
|
get doNotTrack(): boolean;
|
|
@@ -2148,6 +2573,11 @@ declare abstract class DatabaseServiceClass extends DatabaseServiceClass_base im
|
|
|
2148
2573
|
updateVideoData(videoId: string, data: Partial<VideoDBData>): Promise<void>;
|
|
2149
2574
|
getVideoLike(videoId: string): Promise<IResponse<VideoDBData> | null>;
|
|
2150
2575
|
getVideoPosterById(videoId: string): Promise<string | undefined>;
|
|
2576
|
+
addLog(log: LogEntryDB): Promise<void>;
|
|
2577
|
+
getLogs(maxCount: number): Promise<LogEntryDB[]>;
|
|
2578
|
+
removeLogs(logIds: string[]): Promise<void>;
|
|
2579
|
+
clearLogs(): Promise<void>;
|
|
2580
|
+
getLogCount(): Promise<number>;
|
|
2151
2581
|
}
|
|
2152
2582
|
export declare const DatabaseService: DatabaseServiceClass;
|
|
2153
2583
|
|
|
@@ -2219,7 +2649,9 @@ export * from './event.service';
|
|
|
2219
2649
|
export * from './interaction.service';
|
|
2220
2650
|
export * from './like.service';
|
|
2221
2651
|
export * from './logger.service';
|
|
2652
|
+
export * from './moment.service';
|
|
2222
2653
|
export * from './startup.service';
|
|
2654
|
+
export * from './story.service';
|
|
2223
2655
|
export * from './user.service';
|
|
2224
2656
|
export * from './video-cache.service';
|
|
2225
2657
|
export * from './video-player.service';
|
|
@@ -2228,6 +2660,7 @@ export * from './widgets.service';
|
|
|
2228
2660
|
export * from './moment.service';
|
|
2229
2661
|
export * from './story.service';
|
|
2230
2662
|
export * from './user-country.service';
|
|
2663
|
+
export * from './announcement.service';
|
|
2231
2664
|
|
|
2232
2665
|
declare const InteractionServiceClass_base: {
|
|
2233
2666
|
new (): {};
|
|
@@ -2257,33 +2690,18 @@ declare abstract class LikeServiceClass extends LikeServiceClass_base implements
|
|
|
2257
2690
|
}
|
|
2258
2691
|
export declare const LikeService: LikeServiceClass;
|
|
2259
2692
|
|
|
2260
|
-
interface LoggerParams {
|
|
2261
|
-
message: string;
|
|
2262
|
-
level?: LogLevel;
|
|
2263
|
-
metadata?: Record<string, any>;
|
|
2264
|
-
}
|
|
2265
|
-
declare enum LogLevel {
|
|
2266
|
-
INFO = "info",
|
|
2267
|
-
WARN = "warn",
|
|
2268
|
-
ERROR = "error"
|
|
2269
|
-
}
|
|
2270
2693
|
declare const LoggerServiceClass_base: {
|
|
2271
2694
|
new (): {};
|
|
2272
2695
|
_instance: LoggerServiceClass;
|
|
2273
2696
|
getInstance(): LoggerServiceClass;
|
|
2274
2697
|
};
|
|
2275
|
-
declare class LoggerServiceClass extends LoggerServiceClass_base implements IService {
|
|
2276
|
-
private
|
|
2277
|
-
|
|
2278
|
-
private constructor();
|
|
2698
|
+
declare abstract class LoggerServiceClass extends LoggerServiceClass_base implements IService, ILogger {
|
|
2699
|
+
private loggerManager;
|
|
2700
|
+
constructor();
|
|
2279
2701
|
init(): Promise<void>;
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
log(
|
|
2283
|
-
info(message: string, metadata?: Record<string, any>): void;
|
|
2284
|
-
warn(message: string, metadata?: Record<string, any>): void;
|
|
2285
|
-
error(message: string, metadata?: Record<string, any>): void;
|
|
2286
|
-
printLogsToScreen(): void;
|
|
2702
|
+
destroy(): Promise<void>;
|
|
2703
|
+
updateConfiguration(configuration: ILoggerConfiguration): void;
|
|
2704
|
+
log(level: LogLevel, logIdentifier: string, message: string, metadata?: ILogMetadata): Promise<void>;
|
|
2287
2705
|
}
|
|
2288
2706
|
export declare const LoggerService: LoggerServiceClass;
|
|
2289
2707
|
|
|
@@ -2929,6 +3347,30 @@ export type EnhancementsType = {
|
|
|
2929
3347
|
hasSwipeUp: boolean;
|
|
2930
3348
|
} | null;
|
|
2931
3349
|
|
|
3350
|
+
export type AnnouncementPriority = 'polite' | 'assertive';
|
|
3351
|
+
export type AnnouncementCategory = 'navigation' | 'status' | 'error' | 'success';
|
|
3352
|
+
export declare const ANNOUNCEMENT_CONSTANTS: {
|
|
3353
|
+
readonly LIVE_REGIONS: {
|
|
3354
|
+
readonly POLITE_ID: "blaze-aria-live-polite";
|
|
3355
|
+
readonly ASSERTIVE_ID: "blaze-aria-live-assertive";
|
|
3356
|
+
readonly STYLES: {
|
|
3357
|
+
readonly POSITION: "absolute";
|
|
3358
|
+
readonly LEFT: "-10000px";
|
|
3359
|
+
readonly WIDTH: "1px";
|
|
3360
|
+
readonly HEIGHT: "1px";
|
|
3361
|
+
readonly OVERFLOW: "hidden";
|
|
3362
|
+
};
|
|
3363
|
+
};
|
|
3364
|
+
readonly ATTRIBUTES: {
|
|
3365
|
+
readonly ARIA_LIVE: "aria-live";
|
|
3366
|
+
readonly ARIA_ATOMIC: "aria-atomic";
|
|
3367
|
+
readonly ATOMIC_VALUE: "true";
|
|
3368
|
+
};
|
|
3369
|
+
readonly TIMING: {
|
|
3370
|
+
readonly REGION_SETUP_DELAY: 10;
|
|
3371
|
+
};
|
|
3372
|
+
};
|
|
3373
|
+
|
|
2932
3374
|
export interface IAttributeParser {
|
|
2933
3375
|
getIntAttribute(key: string, defaultValue?: number): number | undefined;
|
|
2934
3376
|
getFloatAttribute(key: string, defaultValue?: number): number | undefined;
|
|
@@ -3348,6 +3790,7 @@ export type StoryGestureType = 'Swipe Up' | 'CTA Click';
|
|
|
3348
3790
|
export type MomentGestureType = 'CTA Click';
|
|
3349
3791
|
|
|
3350
3792
|
export * from './animation.type';
|
|
3793
|
+
export * from './announcement.type';
|
|
3351
3794
|
export * from './attribute-parser';
|
|
3352
3795
|
export * from './button.type';
|
|
3353
3796
|
export * from './chip-status.type';
|
|
@@ -3483,6 +3926,24 @@ export type IWidgetViewOptions = IWidgetViewOptionsWithLabels | IWidgetViewOptio
|
|
|
3483
3926
|
|
|
3484
3927
|
export type WidgetType = 'Row' | 'Grid';
|
|
3485
3928
|
|
|
3929
|
+
export declare function buildContentTypeLabel(contentType: ContentType, title: string, elementType?: 'button' | 'item' | 'player'): string;
|
|
3930
|
+
export declare function getContentTypeAction(contentType: ContentType): string;
|
|
3931
|
+
export declare function buildStatusInfo(content: IStory | IMoment | IVideo, badgeStyle?: IndicatorStyle): string;
|
|
3932
|
+
export declare function buildContentAriaLabel(options: {
|
|
3933
|
+
contentType: ContentType;
|
|
3934
|
+
title: string;
|
|
3935
|
+
content: IStory | IMoment | IVideo;
|
|
3936
|
+
position?: number;
|
|
3937
|
+
total?: number;
|
|
3938
|
+
badgeStyle?: IndicatorStyle;
|
|
3939
|
+
elementType?: 'button' | 'item' | 'player';
|
|
3940
|
+
}): string;
|
|
3941
|
+
export declare function buildCarouselLabel(contentType: ContentType, count: number, includeInstructions?: boolean): {
|
|
3942
|
+
label: string;
|
|
3943
|
+
announcement: string;
|
|
3944
|
+
};
|
|
3945
|
+
export declare function generateThumbnailAltText(contentType: ContentType, title: string, content: IStory | IMoment | IVideo): string;
|
|
3946
|
+
|
|
3486
3947
|
export declare function isImaAdInfo(ad: IAdInfo): ad is IImaAdInfo;
|
|
3487
3948
|
export declare function addContextToCustomTargeting(adInfo: IBaseAdInfo, customTargeting: Record<string, string | string[]>): void;
|
|
3488
3949
|
|
|
@@ -3553,6 +4014,7 @@ export declare function findParentOfType<T>(target: EventTarget | null, type: {
|
|
|
3553
4014
|
}, stopAt: Element): T | null;
|
|
3554
4015
|
export declare function validateContainer(containerId: string, widgetElementName?: string): HTMLElement;
|
|
3555
4016
|
|
|
4017
|
+
export * from './accessibility-label.utils';
|
|
3556
4018
|
export * from './ad-info.utils';
|
|
3557
4019
|
export * from './cc-language.utils';
|
|
3558
4020
|
export * from './chip.utils';
|
|
@@ -3565,6 +4027,7 @@ export * from './personalized.utils';
|
|
|
3565
4027
|
export * from './position.utils';
|
|
3566
4028
|
export * from './regex.utils';
|
|
3567
4029
|
export * from './shared-event-target.utils';
|
|
4030
|
+
export * from './tab-index-utils';
|
|
3568
4031
|
export * from './stopwatch';
|
|
3569
4032
|
|
|
3570
4033
|
export declare function getPersonalizedParamsForRequest(personalized?: BlazePersonalized): {
|
|
@@ -3611,8 +4074,74 @@ export declare class Stopwatch {
|
|
|
3611
4074
|
reset(): void;
|
|
3612
4075
|
}
|
|
3613
4076
|
|
|
4077
|
+
export declare class AccessibilityUtils {
|
|
4078
|
+
static setElementsAccessible(elements: Element[]): void;
|
|
4079
|
+
static setElementsInaccessible(elements: Element[]): void;
|
|
4080
|
+
static setElementAccessibilityHidden(element: Element): void;
|
|
4081
|
+
static setElementsAccessibilityHidden(elements: Element[]): void;
|
|
4082
|
+
}
|
|
4083
|
+
|
|
3614
4084
|
export declare function getVideoDuration(existingVideo?: HTMLVideoElement, videoUrl?: string): Promise<number>;
|
|
3615
4085
|
|
|
4086
|
+
export { LOG_LEVEL_VALUES, isLogLevelAllowed, calculateLogPriority } from './logger-level-utils';
|
|
4087
|
+
export { buildLogMetadata, MetadataKeys } from './logger-metadata-utils';
|
|
4088
|
+
export { compressPayload } from './logger-compression-utils';
|
|
4089
|
+
export { estimateEntrySize, calculateTotalMemoryUsage } from './logger-memory-utils';
|
|
4090
|
+
export { validateLoggerConfigurationDetailed, shouldIgnoreLog, sanitizeBatchSizeConfiguration } from './logger-validation-utils';
|
|
4091
|
+
export { extractEntryIds } from './logger-storage-utils';
|
|
4092
|
+
export { pruneOfflineQueue, addToOfflineQueueWithPruning } from './logger-offline-utils';
|
|
4093
|
+
|
|
4094
|
+
export declare function compressPayload(payload: object | string): Promise<ArrayBuffer>;
|
|
4095
|
+
|
|
4096
|
+
export declare const LOG_LEVEL_VALUES: {
|
|
4097
|
+
readonly DEBUG: 1;
|
|
4098
|
+
readonly INFO: 2;
|
|
4099
|
+
readonly WARN: 3;
|
|
4100
|
+
readonly ERROR: 4;
|
|
4101
|
+
readonly CRITICAL: 5;
|
|
4102
|
+
};
|
|
4103
|
+
export declare function isLogLevelAllowed(logLevel: LogLevel, configuredLevel: LogLevel): boolean;
|
|
4104
|
+
export declare function calculateLogPriority(level: LogLevel): number;
|
|
4105
|
+
|
|
4106
|
+
export declare function estimateEntrySize(entry: LogEntryDB): number;
|
|
4107
|
+
export declare function calculateTotalMemoryUsage(entries: LogEntryDB[]): number;
|
|
4108
|
+
|
|
4109
|
+
export declare const MetadataKeys: {
|
|
4110
|
+
readonly SESSION_ID: "session_id";
|
|
4111
|
+
readonly ID: "id";
|
|
4112
|
+
readonly SDK_TYPE: "sdk_type";
|
|
4113
|
+
readonly SDK_VERSION: "sdk_version";
|
|
4114
|
+
readonly API_KEY: "api_key";
|
|
4115
|
+
readonly DEVICE_TYPE: "device_type";
|
|
4116
|
+
readonly DEVICE_BRAND: "device_brand";
|
|
4117
|
+
readonly DEVICE_MODEL: "device_model";
|
|
4118
|
+
readonly OPERATING_SYSTEM: "operating_system";
|
|
4119
|
+
readonly OPERATING_SYSTEM_VERSION: "operating_system_version";
|
|
4120
|
+
readonly SCREEN_RESOLUTION: "screen_resolution";
|
|
4121
|
+
readonly CONNECTION_TYPE: "connection_type";
|
|
4122
|
+
readonly REPORTING_TIMESTAMP: "reporting_timestamp";
|
|
4123
|
+
readonly LOG_IDENTIFIER: "log_identifier";
|
|
4124
|
+
};
|
|
4125
|
+
export declare function buildLogMetadata(sessionId: string, logId: string, logIdentifier?: string, customMetadata?: Record<string, any>): Record<string, any>;
|
|
4126
|
+
|
|
4127
|
+
export declare function pruneOfflineQueue(queue: LogEntryDB[], maxSize: number): {
|
|
4128
|
+
prunedQueue: LogEntryDB[];
|
|
4129
|
+
removedCount: number;
|
|
4130
|
+
};
|
|
4131
|
+
export declare function addToOfflineQueueWithPruning(queue: LogEntryDB[], entry: LogEntryDB, maxSize: number): {
|
|
4132
|
+
updatedQueue: LogEntryDB[];
|
|
4133
|
+
removedCount: number;
|
|
4134
|
+
};
|
|
4135
|
+
|
|
4136
|
+
export declare function extractEntryIds(entries: LogEntryDB[]): string[];
|
|
4137
|
+
|
|
4138
|
+
export declare function validateLoggerConfigurationDetailed(config: ILoggerConfiguration): {
|
|
4139
|
+
isValid: boolean;
|
|
4140
|
+
errors: string[];
|
|
4141
|
+
};
|
|
4142
|
+
export declare function sanitizeBatchSizeConfiguration(config: ILoggerConfiguration): ILoggerConfiguration;
|
|
4143
|
+
export declare function shouldIgnoreLog(logIdentifier: string, ignoredLogs: IIgnoredLog[]): boolean;
|
|
4144
|
+
|
|
3616
4145
|
export * from './commands/player-buttons.command';
|
|
3617
4146
|
export * from './commands/video-commands';
|
|
3618
4147
|
export * from './components/timer';
|
|
@@ -4351,7 +4880,7 @@ export declare abstract class WidgetBaseLayout extends BlazeWidgetScrollable imp
|
|
|
4351
4880
|
protected abstract updateWidgetDisplay(): void;
|
|
4352
4881
|
protected sortContent(): void;
|
|
4353
4882
|
protected reorderWidgets(): void;
|
|
4354
|
-
|
|
4883
|
+
protected getContentType(): ContentType;
|
|
4355
4884
|
static get observedAttributes(): string[];
|
|
4356
4885
|
protected createModal(type: ContentType): void;
|
|
4357
4886
|
protected beforeStoryModalCreation(): void;
|
|
@@ -4637,20 +5166,25 @@ export declare class BlazeWidgetItem extends BaseWidget implements Observable {
|
|
|
4637
5166
|
contentType: ContentType | undefined;
|
|
4638
5167
|
chipType: ChipStatusType;
|
|
4639
5168
|
intersectionObserver: IntersectionObserver;
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
paddingItem: PositionOffset;
|
|
5169
|
+
private position;
|
|
5170
|
+
private total;
|
|
4643
5171
|
content: IStory | IMoment | IVideo;
|
|
4644
5172
|
onClick: (() => void) | undefined;
|
|
4645
5173
|
private boundOnWidgetClick;
|
|
5174
|
+
private boundOnFocus;
|
|
5175
|
+
get parentRef(): BlazeWidgetLayout;
|
|
5176
|
+
statusIndicatorSettings: IndicatorStyle;
|
|
5177
|
+
paddingItem: PositionOffset;
|
|
4646
5178
|
constructor(options: BlazeWidgetItemOptions);
|
|
4647
5179
|
private initializeWidget;
|
|
4648
5180
|
connectedCallback(): void;
|
|
5181
|
+
private updateAriaLabel;
|
|
4649
5182
|
updateWidget(): void;
|
|
4650
5183
|
updateWidgetItemPadding(): void;
|
|
4651
5184
|
updateWidgetItemStyle(layoutStyle: LayoutStyle): void;
|
|
4652
5185
|
private setupDOMElements;
|
|
4653
5186
|
private setupEventListeners;
|
|
5187
|
+
private onFocus;
|
|
4654
5188
|
private handleWidgetClick;
|
|
4655
5189
|
disconnectedCallback(): void;
|
|
4656
5190
|
debouncedIntersectionAction: {
|
|
@@ -4661,6 +5195,7 @@ export declare class BlazeWidgetItem extends BaseWidget implements Observable {
|
|
|
4661
5195
|
};
|
|
4662
5196
|
handleIntersection(): void;
|
|
4663
5197
|
private setData;
|
|
5198
|
+
private setupChildElementsAccessibility;
|
|
4664
5199
|
isFullyVisibleInParent(): boolean;
|
|
4665
5200
|
loadNewThumbnail(): void;
|
|
4666
5201
|
getThumbnailUrl(): string;
|
|
@@ -4684,6 +5219,11 @@ export declare class BlazeWidgetItem extends BaseWidget implements Observable {
|
|
|
4684
5219
|
private getItemIndex;
|
|
4685
5220
|
event(action: WidgetAction, data: Partial<WidgetEvent>, label?: string | undefined): void;
|
|
4686
5221
|
render(): void;
|
|
5222
|
+
updateAccessibilityInfo(info: {
|
|
5223
|
+
position: number;
|
|
5224
|
+
total: number;
|
|
5225
|
+
contentType?: ContentType;
|
|
5226
|
+
}): void;
|
|
4687
5227
|
}
|
|
4688
5228
|
|
|
4689
5229
|
/// <reference types="node" />
|
|
@@ -4701,6 +5241,8 @@ export declare class BlazeWidgetLayout extends WidgetBaseLayout {
|
|
|
4701
5241
|
onMouseLeaveEvent: (e: MouseEvent) => void;
|
|
4702
5242
|
currentlyAnimatedItem: BlazeWidgetItem | undefined;
|
|
4703
5243
|
firstVisibleItem: BlazeWidgetItem | undefined;
|
|
5244
|
+
private focusedItemIndex;
|
|
5245
|
+
private lastFocusedIndex;
|
|
4704
5246
|
get refElement(): ShadowRoot | BlazeWidgetLayout;
|
|
4705
5247
|
constructor();
|
|
4706
5248
|
connectedCallback(): void;
|
|
@@ -4709,7 +5251,6 @@ export declare class BlazeWidgetLayout extends WidgetBaseLayout {
|
|
|
4709
5251
|
onResize(): void;
|
|
4710
5252
|
handleHeightChangeMutation(mutationsList: MutationRecord[]): void;
|
|
4711
5253
|
handleIntersection(entries: IntersectionObserverEntry[]): void;
|
|
4712
|
-
onKeyDown(e: KeyboardEvent): void;
|
|
4713
5254
|
onContentChange(mode: ContentDirection): void;
|
|
4714
5255
|
onPlayerClose(): void;
|
|
4715
5256
|
onPlayerOpen(): void;
|
|
@@ -4777,10 +5318,24 @@ export declare class BlazeWidgetLayout extends WidgetBaseLayout {
|
|
|
4777
5318
|
connectWidgets(): void;
|
|
4778
5319
|
get thumbnailShape(): ThumbnailShape;
|
|
4779
5320
|
widgetType(): WidgetType;
|
|
5321
|
+
setPersonalized(personalized?: BlazePersonalized): void;
|
|
5322
|
+
private setupAccessibility;
|
|
5323
|
+
private updateAccessibilityLabel;
|
|
5324
|
+
onKeyDown(e: KeyboardEvent): void;
|
|
5325
|
+
private navigateToNextItem;
|
|
5326
|
+
private navigateToPreviousItem;
|
|
5327
|
+
private navigateToItem;
|
|
5328
|
+
private activateCurrentItem;
|
|
5329
|
+
private announceCurrentItem;
|
|
5330
|
+
updateFocusedItemIndex(index: number): void;
|
|
5331
|
+
private setFocusState;
|
|
5332
|
+
private removeTabIndexFromWidgetItems;
|
|
5333
|
+
private restoreTabIndexOnWidgetItems;
|
|
4780
5334
|
}
|
|
4781
5335
|
|
|
4782
5336
|
export declare class BlazeWidgetModal extends BaseWidget {
|
|
4783
5337
|
player: BlazeWidgetStoryPlayer | BlazeWidgetMomentPlayer | BlazeWidgetVideoPlayer;
|
|
5338
|
+
private contentType;
|
|
4784
5339
|
isOpen: boolean;
|
|
4785
5340
|
exitButtonElement: BlazeButton;
|
|
4786
5341
|
exitButtonWrapperElement: BlazeDiv;
|
|
@@ -4789,6 +5344,7 @@ export declare class BlazeWidgetModal extends BaseWidget {
|
|
|
4789
5344
|
isMultiTouch: boolean;
|
|
4790
5345
|
boundOnResizeEvent: (this: Window, ev: UIEvent) => void;
|
|
4791
5346
|
boundOnPopStateEvent: (ev: PopStateEvent) => void;
|
|
5347
|
+
boundOnExitButtonClick: (ev: MouseEvent) => void;
|
|
4792
5348
|
onContentChange?: (mode: ContentDirection) => void;
|
|
4793
5349
|
onClose: ((options?: ISmoothOpenCloseModal) => void) | undefined;
|
|
4794
5350
|
onOpen: (() => void) | undefined;
|
|
@@ -4798,6 +5354,7 @@ export declare class BlazeWidgetModal extends BaseWidget {
|
|
|
4798
5354
|
private isRealResizeEvent;
|
|
4799
5355
|
onResize(): void;
|
|
4800
5356
|
handleOnContentChange(mode: ContentDirection): void;
|
|
5357
|
+
handleOnExitButtonClick(): void;
|
|
4801
5358
|
handlePopState(): void;
|
|
4802
5359
|
seek(id: string): void;
|
|
4803
5360
|
setupHammer(): void;
|
|
@@ -4814,6 +5371,7 @@ export declare class BlazeWidgetModal extends BaseWidget {
|
|
|
4814
5371
|
customButtonVisibility?: boolean;
|
|
4815
5372
|
}): boolean;
|
|
4816
5373
|
render(): void;
|
|
5374
|
+
private transferFocusToModal;
|
|
4817
5375
|
}
|
|
4818
5376
|
|
|
4819
5377
|
export type BlazeWidgetContent = BlazeWidgetStory | BlazeWidgetMoment | BlazeVideoElement;
|
|
@@ -5209,6 +5767,8 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
5209
5767
|
boundHandleMuteClicked: () => void;
|
|
5210
5768
|
private fetchedPosterUrls;
|
|
5211
5769
|
private preloadTimer;
|
|
5770
|
+
private accessibilityConfigTimeout;
|
|
5771
|
+
private focusTimeout;
|
|
5212
5772
|
constructor();
|
|
5213
5773
|
get currentMoment(): BlazeWidgetMoment;
|
|
5214
5774
|
connectedCallback(): void;
|
|
@@ -5228,6 +5788,7 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
5228
5788
|
updateItemData(itemToReplaceWith: BlazeWidgetMoment & BlazeWidgetStory & BlazeVideoElement, nextItemToInsert: BlazeWidgetMoment | BlazeWidgetStory | BlazeVideoElement): void;
|
|
5229
5789
|
createAnimation(content: BlazeWidgetMoment, direction: ContentDirection, targetIndex: number): AnimeTimelineInstance;
|
|
5230
5790
|
handleAnimationStart(content: BlazeWidgetMoment, direction: ContentDirection): void;
|
|
5791
|
+
private calculateTruePosition;
|
|
5231
5792
|
handleAnimationCompletion(content: BlazeWidgetMoment, mode: ContentDirection): Promise<void>;
|
|
5232
5793
|
loadAndPlayContent(): Promise<void>;
|
|
5233
5794
|
setContent(content: BlazeWidgetMoment[]): void;
|
|
@@ -5246,6 +5807,13 @@ export declare class BlazeWidgetMomentPlayer extends WidgetAbstractPlayer {
|
|
|
5246
5807
|
loadContentBatch(): void;
|
|
5247
5808
|
resetStyles(): void;
|
|
5248
5809
|
render(): void;
|
|
5810
|
+
configurePlayerContentAccessibility(): void;
|
|
5811
|
+
private setCurrentMomentAccessibility;
|
|
5812
|
+
private setInactiveMomentAccessibility;
|
|
5813
|
+
private scheduleAccessibilityConfig;
|
|
5814
|
+
private cancelAccessibilityConfig;
|
|
5815
|
+
private scheduleFocus;
|
|
5816
|
+
private cancelFocus;
|
|
5249
5817
|
}
|
|
5250
5818
|
|
|
5251
5819
|
export declare class BlazeWidgetMomentSeekBar extends HTMLElement {
|
|
@@ -5335,6 +5903,7 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
5335
5903
|
onClose: () => void;
|
|
5336
5904
|
boundOnCtaClicked: (event: Event) => void;
|
|
5337
5905
|
boundPlayPauseButtonClick: (event: MouseEvent) => void;
|
|
5906
|
+
boundOnKeyDown: (event: KeyboardEvent) => void;
|
|
5338
5907
|
topContainer: BlazeDiv;
|
|
5339
5908
|
bottomContainer: BlazeDiv;
|
|
5340
5909
|
bottomContentContainer: BlazeDiv;
|
|
@@ -5443,6 +6012,18 @@ export declare class BlazeWidgetMoment extends BlazeWidgetContent {
|
|
|
5443
6012
|
restartVideo(): void;
|
|
5444
6013
|
adjustContentView(): void;
|
|
5445
6014
|
event(action: MomentAction, momentData: Partial<MomentEvent>, label?: string | undefined): Promise<void>;
|
|
6015
|
+
private registerMomentAccessibility;
|
|
6016
|
+
updateAccessibilityLabels(): void;
|
|
6017
|
+
private buildMomentAccessibilityState;
|
|
6018
|
+
updateContentAccessibilityAfterDataChange(): void;
|
|
6019
|
+
protected updateButtonAccessibilityLabels(): void;
|
|
6020
|
+
enableAllButtons(): void;
|
|
6021
|
+
disableAllButtons(): void;
|
|
6022
|
+
protected setButtonsAccessibilityState(buttons: Element[], accessible: boolean): void;
|
|
6023
|
+
private enableAnchorElements;
|
|
6024
|
+
private disableAnchorElements;
|
|
6025
|
+
getAllFocusableButtons(): Element[];
|
|
6026
|
+
private getMomentButtonsForAccessibility;
|
|
5446
6027
|
render(): void;
|
|
5447
6028
|
}
|
|
5448
6029
|
|
|
@@ -5475,6 +6056,8 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
|
5475
6056
|
boundOnKeyDown: (event: KeyboardEvent) => Promise<void>;
|
|
5476
6057
|
backgroundAnimation?: Animation;
|
|
5477
6058
|
dispatchExitStoryEvents: (() => void) | undefined;
|
|
6059
|
+
private accessibilityConfigTimeout;
|
|
6060
|
+
private focusTimeout;
|
|
5478
6061
|
constructor();
|
|
5479
6062
|
connectedCallback(): void;
|
|
5480
6063
|
disconnectedCallback(): void;
|
|
@@ -5505,6 +6088,15 @@ export declare class BlazeWidgetStoryPlayer extends WidgetAbstractPlayer {
|
|
|
5505
6088
|
render(): void;
|
|
5506
6089
|
loadContentBatch(): void;
|
|
5507
6090
|
playToggleCurrentStory(): void;
|
|
6091
|
+
manageElementsAccessible(activeContentId: string): void;
|
|
6092
|
+
calculateTruePosition(currentContent: BlazeWidgetStory): number;
|
|
6093
|
+
private configurePlayerContentAccessibility;
|
|
6094
|
+
private setCurrentStoryAccessibility;
|
|
6095
|
+
private setInactiveStoryAccessibility;
|
|
6096
|
+
private scheduleAccessibilityConfig;
|
|
6097
|
+
private cancelAccessibilityConfig;
|
|
6098
|
+
private scheduleFocus;
|
|
6099
|
+
private cancelFocus;
|
|
5508
6100
|
}
|
|
5509
6101
|
|
|
5510
6102
|
export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
@@ -5677,6 +6269,18 @@ export declare class BlazeWidgetStory extends BlazeWidgetContent {
|
|
|
5677
6269
|
private onNextPageEvent;
|
|
5678
6270
|
private onPrevPageEvent;
|
|
5679
6271
|
private getPagesContentExtraInfo;
|
|
6272
|
+
getAllFocusableButtons(): Element[];
|
|
6273
|
+
enableAllButtons(): void;
|
|
6274
|
+
disableAllButtons(): void;
|
|
6275
|
+
protected setButtonsAccessibilityState(buttons: Element[], accessible: boolean): void;
|
|
6276
|
+
private registerStoryAccessibility;
|
|
6277
|
+
private buildStoryRegistrationData;
|
|
6278
|
+
private getStoryButtonsForAccessibility;
|
|
6279
|
+
private getStoryDataForAccessibility;
|
|
6280
|
+
private updateStoryAccessibilityLabels;
|
|
6281
|
+
private getCurrentAccessibilityState;
|
|
6282
|
+
updateAccessibilityLabels(): void;
|
|
6283
|
+
private buildStoryAccessibilityState;
|
|
5680
6284
|
}
|
|
5681
6285
|
|
|
5682
6286
|
export declare const ElementId: {
|