web-push-notifications 3.89.1 → 3.91.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.
@@ -10,10 +10,6 @@ export declare class PWInboxWidget {
10
10
  count: number;
11
11
  messages: Array<IInboxMessagePublic>;
12
12
  messagesElements: TMessagesElementsType;
13
- /** Visible slide per carousel message, kept across the widget's re-renders. */
14
- activeSlides: {
15
- [code: string]: number;
16
- };
17
13
  readItems: Array<string>;
18
14
  isOpened: boolean;
19
15
  config: IInboxWidgetConfig;
@@ -25,10 +21,8 @@ export declare class PWInboxWidget {
25
21
  toggle(isOpened?: boolean): void;
26
22
  private initTrigger;
27
23
  private renderWidget;
28
- private getStyle;
29
24
  private applyStyleVariables;
30
25
  private renderWidgetInner;
31
- private renderMessages;
32
26
  private updateCounter;
33
27
  private updateInboxMessages;
34
28
  openWidget(): void;
@@ -51,7 +45,5 @@ export declare class PWInboxWidget {
51
45
  private removeMessages;
52
46
  private onTriggerClickHandler;
53
47
  private onWidgetClickHandler;
54
- /** Switch the visible slide of one carousel message and redraw just that cell. */
55
- private showSlide;
56
48
  private onWindowScrollHandler;
57
49
  }
@@ -1,9 +1,6 @@
1
1
  import { type IConfigStyles, type IInboxWidgetConfig } from './inbox_widget.types';
2
2
  /** Shortest gap between two server refreshes triggered by opening the widget. */
3
3
  export declare const SYNC_INTERVAL: number;
4
- export declare const MILLISECONDS_IN_DAY: number;
5
- export declare const MILLISECONDS_IN_HOUR: number;
6
- export declare const MONTHS: string[];
7
4
  export declare const STYLE_PREFIX = "pw-inbox";
8
5
  export declare const CONFIG_STYLES: Array<IConfigStyles>;
9
6
  export declare const TRIGGER_CONFIG_STYLES: Array<IConfigStyles>;
@@ -1,3 +1 @@
1
1
  export declare function isElementFixed(element: HTMLElement): boolean;
2
- export declare function getMessageTime(date: string): string;
3
- export declare function compareBySendDate(dateOne: string, dateTwo: string): number;
@@ -1,42 +1,14 @@
1
+ import { type InboxWidgetAppearance, type InboxWidgetPosition, type InboxWidgetStyleName } from '@pushwoosh/websdk-common/inbox';
1
2
  import { type IStyleVariable } from '../../helpers/cssVariables';
2
3
  export interface TMessagesElementsType {
3
4
  [code: string]: HTMLElement;
4
5
  }
5
6
  export type IConfigStyles = IStyleVariable<TStylesNames>;
6
- export type TStylesNames = 'bgColor' | 'textColor' | 'fontFamily' | 'borderRadius' | 'borderColor' | 'badgeBgColor' | 'badgeTextColor' | 'widgetWidth' | 'zIndex' | 'messageTitleColor' | 'timeTextColor' | 'emptyInboxTitleColor' | 'emptyInboxTextColor' | 'arrowBorderColor' | 'unreadDotColor' | 'avatarBgColor' | 'avatarTextColor' | 'avatarSize' | 'mediaRadius' | 'slideCaptionColor' | 'slideScrimColor' | 'pagerDotActiveColor' | 'pagerDotColor';
7
- export type TWidgetPosition = 'left' | 'right' | 'top' | 'bottom';
8
- export interface IInboxWidgetConfig {
7
+ export type TStylesNames = InboxWidgetStyleName;
8
+ export type TWidgetPosition = InboxWidgetPosition;
9
+ export interface IInboxWidgetConfig extends InboxWidgetAppearance {
9
10
  enable: boolean;
10
11
  triggerId: string;
11
12
  position: TWidgetPosition;
12
13
  appendTo: string;
13
- title: string;
14
- bgColor: string;
15
- textColor: string;
16
- fontFamily: string;
17
- borderRadius: number;
18
- borderColor: string;
19
- badgeBgColor: string;
20
- badgeTextColor: string;
21
- widgetWidth: number;
22
- zIndex: number;
23
- messageTitleColor: string;
24
- timeTextColor: string;
25
- emptyInboxTitle: string;
26
- emptyInboxText: string;
27
- emptyInboxIconUrl: string;
28
- emptyInboxTitleColor: string;
29
- emptyInboxTextColor: string;
30
- arrowBorderColor: string;
31
- /** Keep the pre-3.75 look of the classic cell. The new layouts are unaffected. */
32
- legacyClassicCell: boolean;
33
- unreadDotColor: string;
34
- avatarBgColor: string;
35
- avatarTextColor: string;
36
- avatarSize: number;
37
- mediaRadius: number;
38
- slideCaptionColor: string;
39
- slideScrimColor: string;
40
- pagerDotActiveColor: string;
41
- pagerDotColor: string;
42
14
  }
@@ -0,0 +1,10 @@
1
+ import { type InboxWidgetAppearance, type InboxWidgetMessage } from '@pushwoosh/websdk-common/inbox';
2
+ import { type IInboxMessagePublic } from '../../models/InboxMessages.types';
3
+ /** Clicks the reader reports back; the widget owns the actions, this module only renders. */
4
+ export type InboxWidgetHandlers = {
5
+ onMessageClick: (code: string) => void;
6
+ onMessageRemove: (code: string) => void;
7
+ onSlideLinkClick: (code: string, link: string) => void;
8
+ };
9
+ export declare const toInboxWidgetMessage: (message: IInboxMessagePublic) => InboxWidgetMessage;
10
+ export declare const renderInboxWidget: (container: HTMLElement, messages: Array<IInboxMessagePublic>, appearance: InboxWidgetAppearance, handlers: InboxWidgetHandlers) => void;
@@ -19,6 +19,8 @@ export declare class PWSubscriptionWidget implements ISubscriptionWidgetPublicAp
19
19
  private mount;
20
20
  private render;
21
21
  private scheduleAutoShow;
22
+ private launcherClick;
23
+ private subscribeFromLauncher;
22
24
  private accept;
23
25
  private decline;
24
26
  private listenSubscriptionChanges;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import { type IInboxMessagePublic } from '../../models/InboxMessages.types';
2
- export declare const widgetTemplate: (title: string) => string;
3
- export declare const widgetTemplateEmpty: (emptyInboxIconUrl: string, emptyInboxTitle: string, emptyInboxText: string) => string;
4
- export declare const messageTemplate: (message: IInboxMessagePublic, activeSlide?: number) => string;