@pushwoosh/websdk-common 6.17.1 → 6.19.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.
@@ -28,6 +28,8 @@ export type SubscriptionWidgetTexts = {
28
28
  };
29
29
  /** The ask itself. */
30
30
  export type SubscriptionWidgetPrompt = {
31
+ /** Whether the prompt is drawn at all; independent of the launcher. */
32
+ enabled: boolean;
31
33
  layout: SubscriptionWidgetLayout;
32
34
  position: SubscriptionWidgetPosition;
33
35
  /** Image drawn beside the copy; absent = no image. */
@@ -36,15 +38,25 @@ export type SubscriptionWidgetPrompt = {
36
38
  /** Page dim behind the prompt; a modal always has one. */
37
39
  overlay: boolean;
38
40
  };
39
- /** The floating bell that reopens the prompt. */
41
+ /** The floating bell: opens the prompt when it is on, asks for the permission itself otherwise. */
40
42
  export type SubscriptionWidgetLauncher = {
43
+ /** Whether the bell is drawn at all; independent of the prompt. */
41
44
  enabled: boolean;
42
45
  position: SubscriptionWidgetCorner;
43
46
  /** Distance from the screen edges, px. */
44
47
  offset: number;
45
- /** Button diameter, px. */
46
- size: number;
48
+ /** Button size, px. */
49
+ width: number;
50
+ height: number;
51
+ /** Picture drawn instead of the round bell button; absent = the bell. */
52
+ imageUrl?: string;
53
+ /** Fill of the round button; absent = the palette accent. */
54
+ background?: string;
55
+ /** The bell glyph; absent = the label colour over the accent. */
56
+ iconColor?: string;
47
57
  };
58
+ /** What a launcher click does: open the prompt, ask the browser directly, or nothing (blocked). */
59
+ export type SubscriptionWidgetLauncherAction = 'prompt' | 'subscribe' | 'none';
48
60
  /** When the prompt shows by itself. */
49
61
  export type SubscriptionWidgetDisplay = {
50
62
  trigger: SubscriptionWidgetTrigger;
@@ -57,6 +69,7 @@ export type SubscriptionWidgetDisplay = {
57
69
  };
58
70
  /** The whole widget configuration as stored in the WebSDK config (`subscriptionWidget`). */
59
71
  export type SubscriptionWidgetConfig = {
72
+ /** True when the prompt or the launcher is on, i.e. the widget draws something. */
60
73
  enable: boolean;
61
74
  prompt: SubscriptionWidgetPrompt;
62
75
  launcher: SubscriptionWidgetLauncher;