@mathews_cometchat/bubble-builder 1.0.0-alpha25 → 1.0.0-alpha27
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.
|
@@ -14,6 +14,12 @@ export interface NotificationConfig {
|
|
|
14
14
|
appName?: string;
|
|
15
15
|
/** App icon URL shown in the notification preview */
|
|
16
16
|
appIcon?: string;
|
|
17
|
+
/** Show the Data key-value editor in the notification tab */
|
|
18
|
+
enableData?: boolean;
|
|
19
|
+
/** Show the push notification phone preview in the canvas. Default: true */
|
|
20
|
+
showPreview?: boolean;
|
|
21
|
+
/** Called when notification data changes */
|
|
22
|
+
onNotificationDataChange?: (data: Record<string, string>) => void;
|
|
17
23
|
}
|
|
18
24
|
/** Which channels the builder supports */
|
|
19
25
|
export type BuilderChannels = 'inapp' | 'push' | 'both';
|
package/dist/lib.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface BubbleBuilderOptions {
|
|
|
25
25
|
hideTopBar?: boolean;
|
|
26
26
|
/** Hide the template library view — go straight to editor. Default: false */
|
|
27
27
|
hideTemplateLibrary?: boolean;
|
|
28
|
-
/** Which channels to show: 'inapp'
|
|
28
|
+
/** Which channels to show: 'inapp', 'push', or 'both' (default). */
|
|
29
29
|
channels?: BuilderChannels;
|
|
30
30
|
/** Push notification preview config (app name, icon). Only used when channels is 'push' or 'both'. */
|
|
31
31
|
notification?: NotificationConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BubbleElement, BubbleSettings, BubbleMessage, Template, ElementType } from '../types/schema';
|
|
2
2
|
import type { ComponentTemplateName } from '../config/component-templates';
|
|
3
|
-
import type
|
|
3
|
+
import { type BubbleVariable } from '../config/builder-config';
|
|
4
4
|
export interface BuilderState {
|
|
5
5
|
templateId: string | null;
|
|
6
6
|
templateName: string;
|
|
@@ -10,6 +10,10 @@ export interface BuilderState {
|
|
|
10
10
|
fallbackText: string;
|
|
11
11
|
notificationTitle: string;
|
|
12
12
|
notificationBody: string;
|
|
13
|
+
notificationData: Array<{
|
|
14
|
+
key: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}>;
|
|
13
17
|
notificationEnabled: boolean;
|
|
14
18
|
/** Which view the canvas shows: bubble editor or notification preview */
|
|
15
19
|
canvasView: 'bubble' | 'notification';
|
|
@@ -56,6 +60,10 @@ export interface BuilderState {
|
|
|
56
60
|
setFallbackText: (text: string) => void;
|
|
57
61
|
setNotificationTitle: (text: string) => void;
|
|
58
62
|
setNotificationBody: (text: string) => void;
|
|
63
|
+
setNotificationData: (data: Array<{
|
|
64
|
+
key: string;
|
|
65
|
+
value: string;
|
|
66
|
+
}>) => void;
|
|
59
67
|
setNotificationEnabled: (enabled: boolean) => void;
|
|
60
68
|
setCanvasView: (view: 'bubble' | 'notification') => void;
|
|
61
69
|
setChannels: (channels: 'inapp' | 'push' | 'both') => void;
|