zixflow-reactnative 1.1.2 → 1.1.4
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/README.md +2224 -322
- package/android/build.gradle +18 -1
- package/android/consumer-rules.pro +3 -2
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/zixflow/reactnative/sdk/NativeZixflowModule.kt +69 -24
- package/android/src/main/java/com/zixflow/reactnative/sdk/ZixflowReactNativePackage.kt +25 -1
- package/android/src/main/java/com/zixflow/reactnative/sdk/constant/Keys.kt +19 -3
- package/android/src/main/java/com/zixflow/reactnative/sdk/geofence/NativeGeofenceModule.kt +65 -0
- package/android/src/main/java/com/zixflow/reactnative/sdk/liveactivities/NativeLiveActivitiesModule.kt +310 -0
- package/android/src/main/java/com/zixflow/reactnative/sdk/logging/NativeZixflowLoggingModule.kt +2 -2
- package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginapp/NativeMessagingInAppModule.kt +149 -10
- package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginapp/ReactInboxEventListener.kt +99 -0
- package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/NotificationInboxBellViewManager.kt +38 -0
- package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/NotificationInboxViewManager.kt +30 -0
- package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/ReactComposeHostView.kt +96 -0
- package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/ReactNotificationInboxBellView.kt +48 -0
- package/android/src/main/java/com/zixflow/reactnative/sdk/messaginginbox/ReactNotificationInboxView.kt +17 -0
- package/android/src/main/java/com/zixflow/reactnative/sdk/messagingpush/NativeMessagingPushModule.kt +11 -1
- package/android/src/main/res/values/zixflow_config.xml +1 -1
- package/android/zixflow-core.gradle +17 -7
- package/docs/cocoapods-deployment-target-normalization.md +139 -0
- package/ios/cocoapods_deployment_target.rb +432 -0
- package/ios/wrappers/NativeZixflow.mm +37 -0
- package/ios/wrappers/NativeZixflow.swift +135 -1
- package/ios/wrappers/ZixflowReactNativeDeepLinkRequestStore.swift +123 -0
- package/ios/wrappers/ZixflowReactNativeDeepLinkRouter.swift +312 -0
- package/ios/wrappers/geofence/NativeGeofence.mm +46 -0
- package/ios/wrappers/geofence/NativeGeofence.swift +27 -0
- package/ios/wrappers/inapp/NativeMessagingInApp.mm +22 -0
- package/ios/wrappers/inapp/NativeMessagingInApp.swift +90 -0
- package/ios/wrappers/inbox/InboxHostContainment.swift +40 -0
- package/ios/wrappers/inbox/RCTNotificationInboxBellNative.h +12 -0
- package/ios/wrappers/inbox/RCTNotificationInboxBellNative.mm +98 -0
- package/ios/wrappers/inbox/RCTNotificationInboxViewNative.h +12 -0
- package/ios/wrappers/inbox/RCTNotificationInboxViewNative.mm +78 -0
- package/ios/wrappers/inbox/ReactInboxEventListener.swift +76 -0
- package/ios/wrappers/inbox/ReactNotificationInboxBellView.h +22 -0
- package/ios/wrappers/inbox/ReactNotificationInboxBellView.swift +109 -0
- package/ios/wrappers/inbox/ReactNotificationInboxView.h +22 -0
- package/ios/wrappers/inbox/ReactNotificationInboxView.swift +69 -0
- package/ios/wrappers/liveactivities/NativeLiveActivities.mm +83 -0
- package/ios/wrappers/liveactivities/NativeLiveActivities.swift +390 -0
- package/ios/wrappers/location/NativeLocation.swift +7 -5
- package/ios/wrappers/utils/ZixflowConfigUtils.swift +5 -9
- package/ios/wrappers/utils/ZixflowConstants.swift +4 -0
- package/ios/wrappers/zixflow_reactnative.h +6 -0
- package/lib/commonjs/components/NotificationInboxBellView.js +49 -0
- package/lib/commonjs/components/NotificationInboxBellView.js.map +1 -0
- package/lib/commonjs/components/NotificationInboxView.js +36 -0
- package/lib/commonjs/components/NotificationInboxView.js.map +1 -0
- package/lib/commonjs/components/index.js +14 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/index.js +81 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notification-inbox.js +1 -0
- package/lib/commonjs/notification-inbox.js.map +1 -1
- package/lib/commonjs/specs/components/NotificationInboxBellNativeComponent.ts +24 -0
- package/lib/commonjs/specs/components/NotificationInboxViewNativeComponent.ts +22 -0
- package/lib/commonjs/specs/modules/NativeZixflow.js.map +1 -1
- package/lib/commonjs/specs/modules/NativeZixflowGeofence.js +15 -0
- package/lib/commonjs/specs/modules/NativeZixflowGeofence.js.map +1 -0
- package/lib/commonjs/specs/modules/NativeZixflowLiveActivities.js +23 -0
- package/lib/commonjs/specs/modules/NativeZixflowLiveActivities.js.map +1 -0
- package/lib/commonjs/specs/modules/NativeZixflowMessagingInApp.js +3 -1
- package/lib/commonjs/specs/modules/NativeZixflowMessagingInApp.js.map +1 -1
- package/lib/commonjs/specs/modules/NativeZixflowMessagingPush.js +3 -1
- package/lib/commonjs/specs/modules/NativeZixflowMessagingPush.js.map +1 -1
- package/lib/commonjs/types/data-pipelines.js +15 -15
- package/lib/commonjs/types/data-pipelines.js.map +1 -1
- package/lib/commonjs/types/in-app.js +24 -1
- package/lib/commonjs/types/in-app.js.map +1 -1
- package/lib/commonjs/types/inbox.js +79 -0
- package/lib/commonjs/types/inbox.js.map +1 -0
- package/lib/commonjs/types/index.js +22 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/live-activities.js +85 -0
- package/lib/commonjs/types/live-activities.js.map +1 -0
- package/lib/commonjs/utils/param-validation.js +77 -2
- package/lib/commonjs/utils/param-validation.js.map +1 -1
- package/lib/commonjs/zixflow-cdp.js +101 -11
- package/lib/commonjs/zixflow-cdp.js.map +1 -1
- package/lib/commonjs/zixflow-geofence.js +55 -0
- package/lib/commonjs/zixflow-geofence.js.map +1 -0
- package/lib/commonjs/zixflow-inapp.js +120 -0
- package/lib/commonjs/zixflow-inapp.js.map +1 -1
- package/lib/commonjs/zixflow-liveactivities.js +85 -0
- package/lib/commonjs/zixflow-liveactivities.js.map +1 -0
- package/lib/commonjs/zixflow.js.map +1 -1
- package/lib/module/components/NotificationInboxBellView.js +44 -0
- package/lib/module/components/NotificationInboxBellView.js.map +1 -0
- package/lib/module/components/NotificationInboxView.js +31 -0
- package/lib/module/components/NotificationInboxView.js.map +1 -0
- package/lib/module/components/index.js +5 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +8 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/notification-inbox.js +1 -1
- package/lib/module/notification-inbox.js.map +1 -1
- package/lib/module/specs/components/NotificationInboxBellNativeComponent.ts +24 -0
- package/lib/module/specs/components/NotificationInboxViewNativeComponent.ts +22 -0
- package/lib/module/specs/modules/NativeZixflow.js.map +1 -1
- package/lib/module/specs/modules/NativeZixflowGeofence.js +13 -0
- package/lib/module/specs/modules/NativeZixflowGeofence.js.map +1 -0
- package/lib/module/specs/modules/NativeZixflowLiveActivities.js +21 -0
- package/lib/module/specs/modules/NativeZixflowLiveActivities.js.map +1 -0
- package/lib/module/specs/modules/NativeZixflowMessagingInApp.js +3 -1
- package/lib/module/specs/modules/NativeZixflowMessagingInApp.js.map +1 -1
- package/lib/module/specs/modules/NativeZixflowMessagingPush.js +3 -1
- package/lib/module/specs/modules/NativeZixflowMessagingPush.js.map +1 -1
- package/lib/module/types/data-pipelines.js +15 -15
- package/lib/module/types/data-pipelines.js.map +1 -1
- package/lib/module/types/in-app.js +24 -0
- package/lib/module/types/in-app.js.map +1 -1
- package/lib/module/types/inbox.js +75 -0
- package/lib/module/types/inbox.js.map +1 -0
- package/lib/module/types/index.js +2 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/live-activities.js +88 -0
- package/lib/module/types/live-activities.js.map +1 -0
- package/lib/module/utils/param-validation.js +77 -2
- package/lib/module/utils/param-validation.js.map +1 -1
- package/lib/module/zixflow-cdp.js +101 -11
- package/lib/module/zixflow-cdp.js.map +1 -1
- package/lib/module/zixflow-geofence.js +50 -0
- package/lib/module/zixflow-geofence.js.map +1 -0
- package/lib/module/zixflow-inapp.js +99 -1
- package/lib/module/zixflow-inapp.js.map +1 -1
- package/lib/module/zixflow-liveactivities.js +80 -0
- package/lib/module/zixflow-liveactivities.js.map +1 -0
- package/lib/module/zixflow.js +0 -6
- package/lib/module/zixflow.js.map +1 -1
- package/lib/typescript/commonjs/components/NotificationInboxBellView.d.ts +39 -0
- package/lib/typescript/commonjs/components/NotificationInboxBellView.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/NotificationInboxView.d.ts +25 -0
- package/lib/typescript/commonjs/components/NotificationInboxView.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/index.d.ts +4 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +8 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notification-inbox.d.ts +5 -0
- package/lib/typescript/commonjs/notification-inbox.d.ts.map +1 -1
- package/lib/typescript/commonjs/specs/components/NotificationInboxBellNativeComponent.d.ts +13 -0
- package/lib/typescript/commonjs/specs/components/NotificationInboxBellNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/specs/components/NotificationInboxViewNativeComponent.d.ts +12 -0
- package/lib/typescript/commonjs/specs/components/NotificationInboxViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/specs/modules/NativeZixflow.d.ts +6 -1
- package/lib/typescript/commonjs/specs/modules/NativeZixflow.d.ts.map +1 -1
- package/lib/typescript/commonjs/specs/modules/NativeZixflowGeofence.d.ts +13 -0
- package/lib/typescript/commonjs/specs/modules/NativeZixflowGeofence.d.ts.map +1 -0
- package/lib/typescript/commonjs/specs/modules/NativeZixflowLiveActivities.d.ts +31 -0
- package/lib/typescript/commonjs/specs/modules/NativeZixflowLiveActivities.d.ts.map +1 -0
- package/lib/typescript/commonjs/specs/modules/NativeZixflowMessagingInApp.d.ts +5 -1
- package/lib/typescript/commonjs/specs/modules/NativeZixflowMessagingInApp.d.ts.map +1 -1
- package/lib/typescript/commonjs/specs/modules/NativeZixflowMessagingPush.d.ts +1 -1
- package/lib/typescript/commonjs/specs/modules/NativeZixflowMessagingPush.d.ts.map +1 -1
- package/lib/typescript/commonjs/types/data-pipelines.d.ts +54 -18
- package/lib/typescript/commonjs/types/data-pipelines.d.ts.map +1 -1
- package/lib/typescript/commonjs/types/in-app.d.ts +22 -0
- package/lib/typescript/commonjs/types/in-app.d.ts.map +1 -1
- package/lib/typescript/commonjs/types/inbox.d.ts +97 -0
- package/lib/typescript/commonjs/types/inbox.d.ts.map +1 -0
- package/lib/typescript/commonjs/types/index.d.ts +2 -0
- package/lib/typescript/commonjs/types/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/types/live-activities.d.ts +161 -0
- package/lib/typescript/commonjs/types/live-activities.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/param-validation.d.ts +7 -0
- package/lib/typescript/commonjs/utils/param-validation.d.ts.map +1 -1
- package/lib/typescript/commonjs/zixflow-cdp.d.ts +38 -0
- package/lib/typescript/commonjs/zixflow-cdp.d.ts.map +1 -1
- package/lib/typescript/commonjs/zixflow-geofence.d.ts +36 -0
- package/lib/typescript/commonjs/zixflow-geofence.d.ts.map +1 -0
- package/lib/typescript/commonjs/zixflow-inapp.d.ts +36 -2
- package/lib/typescript/commonjs/zixflow-inapp.d.ts.map +1 -1
- package/lib/typescript/commonjs/zixflow-liveactivities.d.ts +66 -0
- package/lib/typescript/commonjs/zixflow-liveactivities.d.ts.map +1 -0
- package/lib/typescript/commonjs/zixflow.d.ts +0 -5
- package/lib/typescript/commonjs/zixflow.d.ts.map +1 -1
- package/lib/typescript/module/components/NotificationInboxBellView.d.ts +39 -0
- package/lib/typescript/module/components/NotificationInboxBellView.d.ts.map +1 -0
- package/lib/typescript/module/components/NotificationInboxView.d.ts +25 -0
- package/lib/typescript/module/components/NotificationInboxView.d.ts.map +1 -0
- package/lib/typescript/module/components/index.d.ts +4 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +8 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notification-inbox.d.ts +5 -0
- package/lib/typescript/module/notification-inbox.d.ts.map +1 -1
- package/lib/typescript/module/specs/components/NotificationInboxBellNativeComponent.d.ts +13 -0
- package/lib/typescript/module/specs/components/NotificationInboxBellNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/specs/components/NotificationInboxViewNativeComponent.d.ts +12 -0
- package/lib/typescript/module/specs/components/NotificationInboxViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/specs/modules/NativeZixflow.d.ts +6 -1
- package/lib/typescript/module/specs/modules/NativeZixflow.d.ts.map +1 -1
- package/lib/typescript/module/specs/modules/NativeZixflowGeofence.d.ts +13 -0
- package/lib/typescript/module/specs/modules/NativeZixflowGeofence.d.ts.map +1 -0
- package/lib/typescript/module/specs/modules/NativeZixflowLiveActivities.d.ts +31 -0
- package/lib/typescript/module/specs/modules/NativeZixflowLiveActivities.d.ts.map +1 -0
- package/lib/typescript/module/specs/modules/NativeZixflowMessagingInApp.d.ts +5 -1
- package/lib/typescript/module/specs/modules/NativeZixflowMessagingInApp.d.ts.map +1 -1
- package/lib/typescript/module/specs/modules/NativeZixflowMessagingPush.d.ts +1 -1
- package/lib/typescript/module/specs/modules/NativeZixflowMessagingPush.d.ts.map +1 -1
- package/lib/typescript/module/types/data-pipelines.d.ts +54 -18
- package/lib/typescript/module/types/data-pipelines.d.ts.map +1 -1
- package/lib/typescript/module/types/in-app.d.ts +22 -0
- package/lib/typescript/module/types/in-app.d.ts.map +1 -1
- package/lib/typescript/module/types/inbox.d.ts +97 -0
- package/lib/typescript/module/types/inbox.d.ts.map +1 -0
- package/lib/typescript/module/types/index.d.ts +2 -0
- package/lib/typescript/module/types/index.d.ts.map +1 -1
- package/lib/typescript/module/types/live-activities.d.ts +161 -0
- package/lib/typescript/module/types/live-activities.d.ts.map +1 -0
- package/lib/typescript/module/utils/param-validation.d.ts +7 -0
- package/lib/typescript/module/utils/param-validation.d.ts.map +1 -1
- package/lib/typescript/module/zixflow-cdp.d.ts +38 -0
- package/lib/typescript/module/zixflow-cdp.d.ts.map +1 -1
- package/lib/typescript/module/zixflow-geofence.d.ts +36 -0
- package/lib/typescript/module/zixflow-geofence.d.ts.map +1 -0
- package/lib/typescript/module/zixflow-inapp.d.ts +36 -2
- package/lib/typescript/module/zixflow-inapp.d.ts.map +1 -1
- package/lib/typescript/module/zixflow-liveactivities.d.ts +66 -0
- package/lib/typescript/module/zixflow-liveactivities.d.ts.map +1 -0
- package/lib/typescript/module/zixflow.d.ts +0 -5
- package/lib/typescript/module/zixflow.d.ts.map +1 -1
- package/package.json +14 -5
- package/src/components/NotificationInboxBellView.tsx +55 -0
- package/src/components/NotificationInboxView.tsx +30 -0
- package/src/components/index.ts +6 -0
- package/src/index.ts +8 -3
- package/src/notification-inbox.ts +1 -1
- package/src/specs/components/NotificationInboxBellNativeComponent.ts +24 -0
- package/src/specs/components/NotificationInboxViewNativeComponent.ts +22 -0
- package/src/specs/modules/NativeZixflow.ts +9 -1
- package/src/specs/modules/NativeZixflowGeofence.ts +14 -0
- package/src/specs/modules/NativeZixflowLiveActivities.ts +39 -0
- package/src/specs/modules/NativeZixflowMessagingInApp.ts +12 -1
- package/src/specs/modules/NativeZixflowMessagingPush.ts +3 -1
- package/src/types/data-pipelines.ts +55 -19
- package/src/types/in-app.ts +23 -0
- package/src/types/inbox.ts +110 -0
- package/src/types/index.ts +2 -0
- package/src/types/live-activities.ts +170 -0
- package/src/utils/param-validation.ts +104 -1
- package/src/zixflow-cdp.ts +119 -13
- package/src/zixflow-geofence.ts +56 -0
- package/src/zixflow-inapp.ts +125 -2
- package/src/zixflow-liveactivities.ts +86 -0
- package/src/zixflow.ts +0 -6
- package/zixflow-reactnative-richpush.podspec +6 -3
- package/zixflow-reactnative.podspec +28 -2
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for the Live Activities module.
|
|
3
|
+
*
|
|
4
|
+
* Live Activities (iOS) / Live Notifications (Android) render live, updating
|
|
5
|
+
* notifications from built-in templates. Two templates ship today: Segments and
|
|
6
|
+
* Countdown Timer. Field names and identifiers are identical across platforms.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Built-in activity type identifiers usable from the wrapper.
|
|
10
|
+
*
|
|
11
|
+
* The values are the reverse-DNS identifiers Zixflow uses everywhere — the
|
|
12
|
+
* `notificationType` on the wire, Android's `LiveNotificationType`, and iOS's
|
|
13
|
+
* `CIOSegmentsAttributes.identifier` — so JS, both native SDKs, and the backend
|
|
14
|
+
* share one vocabulary.
|
|
15
|
+
*
|
|
16
|
+
* Use these enum members (not raw strings) for `LiveActivitiesConfig.types` and a
|
|
17
|
+
* payload's `type` to avoid typos.
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare enum LiveActivityTemplate {
|
|
22
|
+
Segments = "com.zixflow.livenotifications.segments",
|
|
23
|
+
CountdownTimer = "com.zixflow.livenotifications.countdowntimer",
|
|
24
|
+
/**
|
|
25
|
+
* Your own activity type, rendered by SwiftUI you write.
|
|
26
|
+
*
|
|
27
|
+
* Unlike the members above, this value is a marker rather than an identifier — your activity is
|
|
28
|
+
* named by {@link LiveActivitiesConfig.customType}, and the SDK reports it under that name. It
|
|
29
|
+
* belongs in a payload's `type`, never in {@link LiveActivitiesConfig.types}.
|
|
30
|
+
*/
|
|
31
|
+
Custom = "custom"
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Segments template — a progress activity split into N segments.
|
|
35
|
+
* `header` is a static attribute (fixed at start); the rest are content-state.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export interface LiveActivitySegmentsPayload {
|
|
40
|
+
type: LiveActivityTemplate.Segments;
|
|
41
|
+
/** Static header line (set at start, never changes). */
|
|
42
|
+
header: string;
|
|
43
|
+
/** Primary status line. */
|
|
44
|
+
status: string;
|
|
45
|
+
/** Optional secondary status line. */
|
|
46
|
+
substatus?: string;
|
|
47
|
+
/** Total number of segments. */
|
|
48
|
+
segmentsTotal: number;
|
|
49
|
+
/** Number of completed segments (clamped to 0..segmentsTotal). */
|
|
50
|
+
segmentsComplete: number;
|
|
51
|
+
/** Optional trailing text (e.g. an ETA). */
|
|
52
|
+
trailingText?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Custom template — your own activity type, rendered by SwiftUI you write.
|
|
56
|
+
*
|
|
57
|
+
* Unlike the built-in templates there is no schema: `data` is an untyped map, because a bridge
|
|
58
|
+
* payload carries nothing for the SDK to validate against. Every value is a string, so your widget
|
|
59
|
+
* parses whichever ones it needs.
|
|
60
|
+
*
|
|
61
|
+
* Requires {@link LiveActivitiesConfig.customType} to be set. On iOS you must also render
|
|
62
|
+
* `CIOCustomAttributes` in your Widget Extension; on Android your `createLiveNotification`
|
|
63
|
+
* callback receives the same map.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
export interface LiveActivityCustomPayload {
|
|
68
|
+
type: LiveActivityTemplate.Custom;
|
|
69
|
+
/**
|
|
70
|
+
* The full content-state, re-sent in its entirety on every update. Neither platform keeps a
|
|
71
|
+
* static/dynamic split for custom types, so include anything your widget needs each time.
|
|
72
|
+
*
|
|
73
|
+
* Values must be strings. Numbers and booleans are coerced, but nested objects and arrays are
|
|
74
|
+
* not supported and the platforms disagree on them — iOS drops them, Android stringifies them —
|
|
75
|
+
* so flatten anything structured before sending it.
|
|
76
|
+
*/
|
|
77
|
+
data: Record<string, string>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Countdown Timer template — a live countdown to a target time.
|
|
81
|
+
* `header` is a static attribute (fixed at start); the rest are content-state.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
export interface LiveActivityCountdownTimerPayload {
|
|
86
|
+
type: LiveActivityTemplate.CountdownTimer;
|
|
87
|
+
/** Static header line (set at start, never changes). */
|
|
88
|
+
header: string;
|
|
89
|
+
/** Primary title line. */
|
|
90
|
+
title: string;
|
|
91
|
+
/** Optional status message. */
|
|
92
|
+
statusMessage?: string;
|
|
93
|
+
/** Target time as epoch **seconds**. Omit to render the finished state. */
|
|
94
|
+
endTime?: number;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Payload for {@link ZixflowLiveActivities.start} and
|
|
98
|
+
* {@link ZixflowLiveActivities.update}.
|
|
99
|
+
*
|
|
100
|
+
* Because ActivityKit replaces content-state wholesale on update, `update` takes the
|
|
101
|
+
* same full payload as `start` — pass the complete desired state each time.
|
|
102
|
+
*
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
export type LiveActivityPayload = LiveActivitySegmentsPayload | LiveActivityCountdownTimerPayload | LiveActivityCustomPayload;
|
|
106
|
+
/**
|
|
107
|
+
* Live Activities branding (Android only). On iOS, branding is compiled into the
|
|
108
|
+
* widget extension's SwiftUI, so these values are ignored there.
|
|
109
|
+
*
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export interface LiveActivitiesBranding {
|
|
113
|
+
/** Reserved for future use. */
|
|
114
|
+
companyName?: string;
|
|
115
|
+
/** Accent color as "#RRGGBB". */
|
|
116
|
+
accentColorHex?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Bundled Android drawable resource name for the logo, resolved natively.
|
|
119
|
+
* Preferred over {@link LiveActivitiesBranding.logoUrl} when both are set — it
|
|
120
|
+
* needs no network.
|
|
121
|
+
*/
|
|
122
|
+
logoResource?: string;
|
|
123
|
+
/** Remote logo URL (downloaded and cached natively). */
|
|
124
|
+
logoUrl?: string;
|
|
125
|
+
/** Android drawable resource name, resolved natively. */
|
|
126
|
+
smallIconResource?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Live Activities configuration, passed under the `liveNotifications` key of the SDK config.
|
|
130
|
+
*
|
|
131
|
+
* @public
|
|
132
|
+
*/
|
|
133
|
+
export interface LiveActivitiesConfig {
|
|
134
|
+
/**
|
|
135
|
+
* Built-in activity types to enable. Enables the matching native type on each
|
|
136
|
+
* platform and registers push-to-start for it. Unrecognized identifiers are
|
|
137
|
+
* ignored, so a newer native template can't break an older wrapper build.
|
|
138
|
+
*
|
|
139
|
+
* `Custom` is excluded on purpose — it is enabled by {@link LiveActivitiesConfig.customType},
|
|
140
|
+
* and both platforms would silently drop it from this list.
|
|
141
|
+
*/
|
|
142
|
+
types?: Exclude<LiveActivityTemplate, LiveActivityTemplate.Custom>[];
|
|
143
|
+
/**
|
|
144
|
+
* Your own reverse-DNS identifier for the custom activity type, e.g.
|
|
145
|
+
* `'com.myapp.rideshare'`. Setting it enables the custom template on both platforms.
|
|
146
|
+
*
|
|
147
|
+
* Start one with `{ type: LiveActivityTemplate.Custom, data: { … } }`; the SDK reports it
|
|
148
|
+
* under this identifier, and your campaigns target it by the same name.
|
|
149
|
+
*
|
|
150
|
+
* Singular by design: iOS resolves an activity's type from its Swift attributes type, and
|
|
151
|
+
* every custom activity shares one. A second identifier could not be told apart, so one
|
|
152
|
+
* identifier is the limit rather than a silent mis-attribution.
|
|
153
|
+
*
|
|
154
|
+
* You must also render it yourself — `CIOCustomAttributes` in an iOS Widget Extension, and
|
|
155
|
+
* the `createLiveNotification` callback on Android.
|
|
156
|
+
*/
|
|
157
|
+
customType?: string;
|
|
158
|
+
/** Android Live Notification branding (ignored on iOS). */
|
|
159
|
+
branding?: LiveActivitiesBranding;
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=live-activities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-activities.d.ts","sourceRoot":"","sources":["../../../../src/types/live-activities.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;GAYG;AACH,oBAAY,oBAAoB;IAC9B,QAAQ,2CAA2C;IACnD,cAAc,iDAAiD;IAC/D;;;;;;OAMG;IACH,MAAM,WAAW;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,oBAAoB,CAAC,QAAQ,CAAC;IACpC,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,gBAAgB,EAAE,MAAM,CAAC;IACzB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC;IAClC;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,oBAAoB,CAAC,cAAc,CAAC;IAC1C,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAC3B,2BAA2B,GAC3B,iCAAiC,GACjC,yBAAyB,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC;IACrE;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,sBAAsB,CAAC;CACnC"}
|
|
@@ -30,12 +30,19 @@ declare function validateAttributes(value: unknown, fieldName: string, options?:
|
|
|
30
30
|
expectedType?: string;
|
|
31
31
|
optional?: boolean;
|
|
32
32
|
}): CustomAttributes | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Validates the argument to `setColorScheme`. Unlike the config field, an absent value is
|
|
35
|
+
* itself the mistake: the caller asked for a scheme change and named none, and there is no
|
|
36
|
+
* default to fall back to, so null and undefined are reported rather than skipped.
|
|
37
|
+
*/
|
|
38
|
+
declare function validateColorSchemeArgument(value: unknown): void;
|
|
33
39
|
type ConfigValidator = (value: unknown) => asserts value is ZixflowConfig;
|
|
34
40
|
export declare const assert: {
|
|
35
41
|
string: typeof validateString;
|
|
36
42
|
record: typeof validateRecord;
|
|
37
43
|
attributes: typeof validateAttributes;
|
|
38
44
|
config: ConfigValidator;
|
|
45
|
+
colorScheme: typeof validateColorSchemeArgument;
|
|
39
46
|
};
|
|
40
47
|
export declare const validate: {
|
|
41
48
|
isUndefined: typeof isUndefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"param-validation.d.ts","sourceRoot":"","sources":["../../../../src/utils/param-validation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"param-validation.d.ts","sourceRoot":"","sources":["../../../../src/utils/param-validation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAchE;;GAEG;AACH,iBAAS,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE5C;AAoCD;;;GAGG;AACH,iBAAS,cAAc,CACrB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IACP,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACG,QAqBzB;AAED;;GAEG;AACH,iBAAS,cAAc,CACrB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACf,QAeP;AAED;;;;GAIG;AACH,iBAAS,kBAAkB,CACzB,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACf,GACL,gBAAgB,GAAG,SAAS,CAe9B;AA2ED;;;;GAIG;AACH,iBAAS,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAMzD;AA4BD,KAAK,eAAe,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI,aAAa,CAAC;AAE1E,eAAO,MAAM,MAAM,EAAE;IACnB,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,UAAU,EAAE,OAAO,kBAAkB,CAAC;IACtC,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,OAAO,2BAA2B,CAAC;CAOjD,CAAC;AAEF,eAAO,MAAM,QAAQ;;CAEpB,CAAC"}
|
|
@@ -1,11 +1,47 @@
|
|
|
1
|
+
import { ZixflowGeofence } from './zixflow-geofence';
|
|
1
2
|
import { ZixflowInAppMessaging } from './zixflow-inapp';
|
|
3
|
+
import { ZixflowLiveActivities } from './zixflow-liveactivities';
|
|
2
4
|
import { ZixflowLocation } from './zixflow-location';
|
|
3
5
|
import { ZixflowPushMessaging } from './zixflow-push';
|
|
4
6
|
import { MetricEvent, type ZixflowConfig, type IdentifyParams } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Handles a Zixflow deep-link destination delivered from iOS.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export type DeepLinkHandler = (url: string) => boolean | Promise<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Removes a Zixflow deep-link handler.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export interface DeepLinkHandlerSubscription {
|
|
17
|
+
/** Stop routing Zixflow deep links through this handler. */
|
|
18
|
+
remove(): void;
|
|
19
|
+
}
|
|
5
20
|
/** @public */
|
|
6
21
|
export declare class Zixflow {
|
|
7
22
|
/** Initialize the Zixflow SDK with given configuration. */
|
|
8
23
|
static readonly initialize: (config: ZixflowConfig) => Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Signal that the app's React Native Linking listener is ready to receive Zixflow URLs.
|
|
26
|
+
*
|
|
27
|
+
* This is only needed by UIScene hosts that initialize Zixflow natively, such as Expo
|
|
28
|
+
* config-plugin auto-initialization. Call it after registering the Linking listener.
|
|
29
|
+
*/
|
|
30
|
+
static readonly setDeepLinkRoutingReady: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Register an acknowledged deep-link handler for an iOS UIScene host.
|
|
33
|
+
*
|
|
34
|
+
* This API only handles Zixflow destinations delivered through an iOS UIScene lifecycle.
|
|
35
|
+
* In a native React Native scene host, pair this with
|
|
36
|
+
* `NativeZixflow.configureAcknowledgedSceneDeepLinkRouting()` in the SceneDelegate. Register
|
|
37
|
+
* this before `initialize` when possible. Return `true` after routing a URL. Returning `false`,
|
|
38
|
+
* throwing, or rejecting lets the native SDK try the host AppDelegate, then React Native Linking
|
|
39
|
+
* for a host-owned custom scheme or the system for other URLs. Cold URLs are buffered until this
|
|
40
|
+
* handler is registered, subject to the native timeout. After delivery, the handler has ten
|
|
41
|
+
* seconds to settle. Once that timeout runs the native fallback, a late handler cannot cancel it
|
|
42
|
+
* and may cause a second navigation if it also routes the URL.
|
|
43
|
+
*/
|
|
44
|
+
static readonly setDeepLinkHandler: (handler: DeepLinkHandler) => DeepLinkHandlerSubscription;
|
|
9
45
|
/** Identify a user to start tracking their activity. Requires userId, traits, or both. */
|
|
10
46
|
static readonly identify: ({ userId, traits, }?: IdentifyParams) => Promise<any>;
|
|
11
47
|
/** Clear current user identification and stop tracking. */
|
|
@@ -33,7 +69,9 @@ export declare class Zixflow {
|
|
|
33
69
|
* @deprecated This method will be removed in a future version. If you need this functionality, please contact us.
|
|
34
70
|
*/
|
|
35
71
|
static readonly isInitialized: () => boolean;
|
|
72
|
+
static readonly geofence: ZixflowGeofence;
|
|
36
73
|
static readonly inAppMessaging: ZixflowInAppMessaging;
|
|
74
|
+
static readonly liveActivities: ZixflowLiveActivities;
|
|
37
75
|
static readonly location: ZixflowLocation;
|
|
38
76
|
static readonly pushMessaging: ZixflowPushMessaging;
|
|
39
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zixflow-cdp.d.ts","sourceRoot":"","sources":["../../../src/zixflow-cdp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtD,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAElB,KAAK,cAAc,EACpB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"zixflow-cdp.d.ts","sourceRoot":"","sources":["../../../src/zixflow-cdp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtD,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAElB,KAAK,cAAc,EACpB,MAAM,SAAS,CAAC;AAWjB;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,4DAA4D;IAC5D,MAAM,IAAI,IAAI,CAAC;CAChB;AAUD,cAAc;AACd,qBAAa,OAAO;IAClB,2DAA2D;IAC3D,MAAM,CAAC,QAAQ,CAAC,UAAU,GAAU,QAAQ,aAAa,mBAuBvD;IAEF;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,uBAAuB,aAErC;IAEF;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,GAChC,SAAS,eAAe,KACvB,2BAA2B,CAqE5B;IAEF,0FAA0F;IAC1F,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAU,sBAG/B,cAAmB,kBAkBpB;IAEF,2DAA2D;IAC3D,MAAM,CAAC,QAAQ,CAAC,aAAa,qBAE3B;IAEF,+CAA+C;IAC/C,MAAM,CAAC,QAAQ,CAAC,KAAK,GACnB,MAAM,MAAM,EACZ,aAAa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAWhC;IAEF,0DAA0D;IAC1D,MAAM,CAAC,QAAQ,CAAC,MAAM,GACpB,OAAO,MAAM,EACb,aAAa,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAWhC;IAEF,0EAA0E;IAC1E,MAAM,CAAC,QAAQ,CAAC,oBAAoB,GAClC,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAS/B;IAEF,6CAA6C;IAC7C,MAAM,CAAC,QAAQ,CAAC,mBAAmB,GACjC,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,kBAS/B;IAEF,sDAAsD;IACtD,MAAM,CAAC,QAAQ,CAAC,mBAAmB,GAAU,OAAO,MAAM,mBAIxD;IAEF,4EAA4E;IAC5E,MAAM,CAAC,QAAQ,CAAC,iBAAiB,sBAE/B;IAEF,kFAAkF;IAClF,MAAM,CAAC,QAAQ,CAAC,WAAW,GAAU,qCAIlC;QACD,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,WAAW,CAAC;KACpB,mBAQC;IAEF;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,aAAa,gBAAsB;IAEnD,MAAM,CAAC,QAAQ,CAAC,QAAQ,kBAAyB;IACjD,MAAM,CAAC,QAAQ,CAAC,cAAc,wBAA+B;IAC7D,MAAM,CAAC,QAAQ,CAAC,cAAc,wBAA+B;IAC7D,MAAM,CAAC,QAAQ,CAAC,QAAQ,kBAAyB;IACjD,MAAM,CAAC,QAAQ,CAAC,aAAa,uBAA8B;CAC5D"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type TurboModule } from 'react-native';
|
|
2
|
+
import { type Spec as CodegenSpec } from './specs/modules/NativeZixflowGeofence';
|
|
3
|
+
/**
|
|
4
|
+
* Ensures all methods defined in codegen spec are implemented by the public module
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
interface NativeGeofenceSpec extends Omit<CodegenSpec, keyof TurboModule> {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Public entry point for the optional Geofence module.
|
|
12
|
+
*
|
|
13
|
+
* Geofence runs automatically once enabled. Apps opt in by passing a `geofence` config to
|
|
14
|
+
* `initialize` and enabling the module at build time: set `zixflow_geofence_enabled=true`
|
|
15
|
+
* in `gradle.properties` (Android) or add the `geofence` subspec to your Podfile (iOS).
|
|
16
|
+
* Enabling geofence also enables the Location module, which geofence depends on.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare class ZixflowGeofence implements NativeGeofenceSpec {
|
|
21
|
+
/**
|
|
22
|
+
* Requests a one-shot location fix and refreshes the nearby geofence set from it,
|
|
23
|
+
* without sending a location analytics event (unlike
|
|
24
|
+
* `Zixflow.location.requestLocationUpdate()`) and without caching the fix.
|
|
25
|
+
*
|
|
26
|
+
* Call this after the host app has been granted location permission — the SDK never
|
|
27
|
+
* requests permission itself. It is the primary way to drive geofencing when the module
|
|
28
|
+
* is configured with `MANUAL` location mode; with the default `AUTOMATIC` the SDK acquires
|
|
29
|
+
* location on its own and this only forces an immediate refresh.
|
|
30
|
+
*
|
|
31
|
+
* No-ops if the geofence module is not enabled or a user has not been identified.
|
|
32
|
+
*/
|
|
33
|
+
refreshFromCurrentLocation(): void;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=zixflow-geofence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zixflow-geofence.d.ts","sourceRoot":"","sources":["../../../src/zixflow-geofence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAEL,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,uCAAuC,CAAC;AAE/C;;;;GAIG;AACH,UAAU,kBAAmB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,WAAW,CAAC;CAAG;AAkB5E;;;;;;;;;GASG;AACH,qBAAa,eAAgB,YAAW,kBAAkB;IACxD;;;;;;;;;;;OAWG;IACH,0BAA0B,IAAI,IAAI;CAGnC"}
|
|
@@ -2,13 +2,14 @@ import { type EventSubscription, type TurboModule } from 'react-native';
|
|
|
2
2
|
import { InlineInAppMessageView } from './components';
|
|
3
3
|
import { NotificationInbox, type NotificationInboxSpec } from './notification-inbox';
|
|
4
4
|
import { type Spec as CodegenSpec } from './specs/modules/NativeZixflowMessagingInApp';
|
|
5
|
-
import type { InAppMessageEventType } from './types';
|
|
5
|
+
import type { ZixflowColorScheme, InAppMessageEventType } from './types';
|
|
6
|
+
import { InboxMessageEvent } from './types';
|
|
6
7
|
/**
|
|
7
8
|
* Ensures all methods defined in codegen spec are implemented by the public module
|
|
8
9
|
*
|
|
9
10
|
* @internal
|
|
10
11
|
*/
|
|
11
|
-
interface NativeInAppSpec extends Omit<CodegenSpec, keyof TurboModule | NotificationInboxSpec | 'onInAppEventReceived'> {
|
|
12
|
+
interface NativeInAppSpec extends Omit<CodegenSpec, keyof TurboModule | NotificationInboxSpec | 'onInAppEventReceived' | 'registerInboxEventListener' | 'unregisterInboxEventListener' | 'onInboxEventReceived'> {
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Helper class so that registering event listeners is easier for customers.
|
|
@@ -17,11 +18,41 @@ interface NativeInAppSpec extends Omit<CodegenSpec, keyof TurboModule | Notifica
|
|
|
17
18
|
*/
|
|
18
19
|
declare class ZixflowInAppMessaging implements NativeInAppSpec {
|
|
19
20
|
private _notificationInbox?;
|
|
21
|
+
/**
|
|
22
|
+
* Live inbox subscriptions. The SDK's inbox forwarder is a SINGLE global listener, so it is
|
|
23
|
+
* registered when the first subscription is created and unregistered when the last one goes away —
|
|
24
|
+
* never per subscription, or one `remove()` would tear it out from under the others.
|
|
25
|
+
*/
|
|
26
|
+
private _inboxListenerCount;
|
|
20
27
|
registerEventsListener(listener: (event: InAppMessageEvent) => void): EventSubscription;
|
|
28
|
+
/**
|
|
29
|
+
* Registers a listener for Visual Notification Inbox events (action taken,
|
|
30
|
+
* shown, opened, dismissed).
|
|
31
|
+
*
|
|
32
|
+
* While a listener is registered the host owns action navigation: the native
|
|
33
|
+
* SDK suppresses its default action handling and forwards the event here.
|
|
34
|
+
* Call `.remove()` on the returned subscription to unregister and restore the
|
|
35
|
+
* SDK's default behavior.
|
|
36
|
+
*
|
|
37
|
+
* @param listener - callback invoked with an {@link InboxMessageEvent}
|
|
38
|
+
* @returns an EventSubscription; call `.remove()` to stop listening
|
|
39
|
+
*/
|
|
40
|
+
registerInboxEventListener(listener: (event: InboxMessageEvent) => void): EventSubscription;
|
|
21
41
|
/**
|
|
22
42
|
* Dismisses any currently displayed in-app message
|
|
23
43
|
*/
|
|
24
44
|
dismissMessage(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Overrides the color scheme used to render in-app messages.
|
|
47
|
+
*
|
|
48
|
+
* Takes effect immediately: messages already on screen — inline views included — are
|
|
49
|
+
* re-themed in place, so this can be called whenever the app's appearance setting
|
|
50
|
+
* changes rather than only before a message is shown.
|
|
51
|
+
*
|
|
52
|
+
* @param colorScheme - scheme to render with; `ZixflowColorScheme.Auto` returns to following
|
|
53
|
+
* the device appearance
|
|
54
|
+
*/
|
|
55
|
+
setColorScheme(colorScheme: ZixflowColorScheme): void;
|
|
25
56
|
/**
|
|
26
57
|
* Gets the message inbox instance for managing inbox messages
|
|
27
58
|
*
|
|
@@ -42,7 +73,10 @@ declare class InAppMessageEvent {
|
|
|
42
73
|
constructor(eventType: InAppMessageEventType, messageId: string, deliveryId?: string, actionValue?: string, actionName?: string);
|
|
43
74
|
}
|
|
44
75
|
export type { InlineInAppMessageViewProps } from './components';
|
|
76
|
+
export type { NotificationInboxBellViewProps, NotificationInboxViewProps, } from './components';
|
|
77
|
+
export { NotificationInboxBellView, NotificationInboxView } from './components';
|
|
45
78
|
export { NotificationInbox } from './notification-inbox';
|
|
46
79
|
export type { InboxMessage, NotificationInboxChangeListener } from './types';
|
|
80
|
+
export { InboxEventType, InboxMessageEvent } from './types';
|
|
47
81
|
export { ZixflowInAppMessaging, InAppMessageEvent, InlineInAppMessageView };
|
|
48
82
|
//# sourceMappingURL=zixflow-inapp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zixflow-inapp.d.ts","sourceRoot":"","sources":["../../../src/zixflow-inapp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"zixflow-inapp.d.ts","sourceRoot":"","sources":["../../../src/zixflow-inapp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EACL,iBAAiB,EAEjB,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAoC,EAClC,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAkB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAI5D;;;;GAIG;AACH,UAAU,eAAgB,SAAQ,IAAI,CACpC,WAAW,EACT,MAAM,WAAW,GACjB,qBAAqB,GACrB,sBAAsB,GACtB,4BAA4B,GAC5B,8BAA8B,GAC9B,sBAAsB,CACzB;CAAG;AAUJ;;;;GAIG;AACH,cAAM,qBAAsB,YAAW,eAAe;IACpD,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAE/C;;;;OAIG;IACH,OAAO,CAAC,mBAAmB,CAAK;IAEhC,sBAAsB,CACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAC3C,iBAAiB;IAmCpB;;;;;;;;;;;OAWG;IACH,0BAA0B,CACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAC3C,iBAAiB;IAuEpB;;OAEG;IACH,cAAc;IAId;;;;;;;;;OASG;IACH,cAAc,CAAC,WAAW,EAAE,kBAAkB;IAO9C;;;;OAIG;IACH,KAAK,IAAI,iBAAiB;CAM3B;AAED;;GAEG;AACH,cAAc;AACd,cAAM,iBAAiB;IACrB,SAAS,EAAE,qBAAqB,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;gBAGlB,SAAS,EAAE,qBAAqB,EAChC,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,CAAC,EAAE,MAAM;CAQtB;AAGD,YAAY,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAChE,YAAY,EACV,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,YAAY,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type TurboModule } from 'react-native';
|
|
2
|
+
import { type Spec as CodegenSpec } from './specs/modules/NativeZixflowLiveActivities';
|
|
3
|
+
import type { LiveActivityPayload } from './types/live-activities';
|
|
4
|
+
/**
|
|
5
|
+
* Ensures all methods defined in codegen spec are implemented by the public module
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
interface NativeLiveActivitiesSpec extends Omit<CodegenSpec, keyof TurboModule> {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Live Activities (iOS) / Live Notifications (Android).
|
|
13
|
+
*
|
|
14
|
+
* Start, update, and end live, updating notifications from built-in templates
|
|
15
|
+
* (Segments, Countdown Timer). Enable the activity types via the `liveNotifications`
|
|
16
|
+
* key of the SDK config passed to {@link Zixflow.initialize}.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare class ZixflowLiveActivities implements NativeLiveActivitiesSpec {
|
|
21
|
+
/**
|
|
22
|
+
* Report an opened Live Activity and return the URL the app should route.
|
|
23
|
+
*
|
|
24
|
+
* Zixflow tracking URLs are unwrapped to their destination after attribution is recorded.
|
|
25
|
+
* A tracking URL without a destination returns `null`; any other URL is returned unchanged.
|
|
26
|
+
* This method never rejects, so it can safely compose with Expo Router's
|
|
27
|
+
* `redirectSystemPath` hook. On Android it is a pass-through.
|
|
28
|
+
*
|
|
29
|
+
* Use this in exactly one URL-routing layer. Calling it more than once for the same Zixflow
|
|
30
|
+
* tracking URL reports more than one opened event.
|
|
31
|
+
*
|
|
32
|
+
* @param url - The incoming URL from the host's linking lifecycle.
|
|
33
|
+
* @returns The URL to route, or `null` when the Zixflow URL has no destination.
|
|
34
|
+
*/
|
|
35
|
+
handleWidgetUrl(url: string): Promise<string | null>;
|
|
36
|
+
/**
|
|
37
|
+
* Start a built-in-template activity.
|
|
38
|
+
*
|
|
39
|
+
* @param payload - Template payload; `payload.type` selects the template.
|
|
40
|
+
* @returns The SDK-minted activity id, used for later `update`/`end`.
|
|
41
|
+
*/
|
|
42
|
+
start(payload: LiveActivityPayload): Promise<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Replace the whole content-state of a running activity.
|
|
45
|
+
*
|
|
46
|
+
* ActivityKit (iOS) replaces content-state wholesale, so pass the **full** desired
|
|
47
|
+
* state — not just the changed fields. Static attributes (e.g. `header`) cannot
|
|
48
|
+
* change after start and are ignored on iOS.
|
|
49
|
+
*
|
|
50
|
+
* @param activityId - Id returned by {@link ZixflowLiveActivities.start}.
|
|
51
|
+
* @param payload - The complete desired state.
|
|
52
|
+
*/
|
|
53
|
+
update(activityId: string, payload: LiveActivityPayload): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* End a running activity, optionally rendering a final content-state.
|
|
56
|
+
*
|
|
57
|
+
* @param activityId - Id returned by {@link ZixflowLiveActivities.start}.
|
|
58
|
+
* @param payload - **iOS only.** The final content-state to render as the activity ends.
|
|
59
|
+
* ActivityKit keeps the last content-state on screen when none is given, so pass one to show
|
|
60
|
+
* a terminal state (e.g. all segments complete). Android renders its own terminal state and
|
|
61
|
+
* ignores this.
|
|
62
|
+
*/
|
|
63
|
+
end(activityId: string, payload?: LiveActivityPayload): Promise<void>;
|
|
64
|
+
}
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=zixflow-liveactivities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zixflow-liveactivities.d.ts","sourceRoot":"","sources":["../../../src/zixflow-liveactivities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAEL,KAAK,IAAI,IAAI,WAAW,EACzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE;;;;GAIG;AACH,UAAU,wBAAyB,SAAQ,IAAI,CAC7C,WAAW,EACX,MAAM,WAAW,CAClB;CAAG;AAEJ;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,YAAW,wBAAwB;IACpE;;;;;;;;;;;;;OAaG;IACG,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQ1D;;;;;OAKG;IACH,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC;IAIpD;;;;;;;;;OASG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvE;;;;;;;;OAQG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zixflow.d.ts","sourceRoot":"","sources":["../../../src/zixflow.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"zixflow.d.ts","sourceRoot":"","sources":["../../../src/zixflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGtD,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zixflow-reactnative",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Official Zixflow SDK for React Native.
|
|
3
|
+
"version": "1.1.4",
|
|
4
|
+
"description": "Official Zixflow SDK for React Native. Track customers and send messages to your iOS/Android apps.",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
7
7
|
"module": "./lib/module/index.js",
|
|
@@ -19,13 +19,14 @@
|
|
|
19
19
|
},
|
|
20
20
|
"./package.json": "./package.json"
|
|
21
21
|
},
|
|
22
|
-
"zixflowNativeiOSSdkVersion": "= 1.1.
|
|
23
|
-
"zixflowNativeAndroidSdkVersion": "1.1.
|
|
22
|
+
"zixflowNativeiOSSdkVersion": "= 1.1.3",
|
|
23
|
+
"zixflowNativeAndroidSdkVersion": "1.1.3",
|
|
24
24
|
"files": [
|
|
25
25
|
"src",
|
|
26
26
|
"lib",
|
|
27
27
|
"android",
|
|
28
28
|
"ios",
|
|
29
|
+
"docs/cocoapods-deployment-target-normalization.md",
|
|
29
30
|
"cpp",
|
|
30
31
|
"*.podspec",
|
|
31
32
|
"react-native.config.js",
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"pre-deploy": "npm run typescript",
|
|
45
46
|
"typecheck": "tsc",
|
|
46
47
|
"typescript": "tsc --noEmit",
|
|
48
|
+
"test": "jest",
|
|
47
49
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
48
50
|
"lint:report": "npm run lint -- --output-file eslint_report.json --format json",
|
|
49
51
|
"prepare": "bob build",
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
"@evilmartians/lefthook": "^1.11.12",
|
|
74
76
|
"@microsoft/api-extractor": "^7.52.8",
|
|
75
77
|
"@react-native-community/cli": "^20.0.0",
|
|
78
|
+
"@react-native-community/cli-config-apple": "20.1.3",
|
|
76
79
|
"@react-native/babel-preset": "^0.83.0",
|
|
77
80
|
"@react-native/eslint-config": "^0.83.0",
|
|
78
81
|
"@react-native/metro-config": "^0.86.0",
|
|
@@ -80,6 +83,7 @@
|
|
|
80
83
|
"@types/react": "^19.2.0",
|
|
81
84
|
"@typescript-eslint/eslint-plugin": "^8.31.1",
|
|
82
85
|
"@typescript-eslint/parser": "^8.31.1",
|
|
86
|
+
"babel-jest": "^29.7.0",
|
|
83
87
|
"eslint": "9.25.1",
|
|
84
88
|
"eslint-config-prettier": "10.1.2",
|
|
85
89
|
"eslint-plugin-ft-flow": "^3.0.11",
|
|
@@ -87,6 +91,7 @@
|
|
|
87
91
|
"eslint-plugin-prettier": "^5.2.6",
|
|
88
92
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
89
93
|
"eslint-plugin-react-native": "^5.0.0",
|
|
94
|
+
"jest": "^29.7.0",
|
|
90
95
|
"prettier": "^3.5.3",
|
|
91
96
|
"react": "19.2.0",
|
|
92
97
|
"react-native": "^0.83.0",
|
|
@@ -150,12 +155,16 @@
|
|
|
150
155
|
},
|
|
151
156
|
"ios": {
|
|
152
157
|
"componentProvider": {
|
|
153
|
-
"InlineMessageNative": "RCTInlineMessageNative"
|
|
158
|
+
"InlineMessageNative": "RCTInlineMessageNative",
|
|
159
|
+
"NotificationInboxBellNative": "RCTNotificationInboxBellNative",
|
|
160
|
+
"NotificationInboxViewNative": "RCTNotificationInboxViewNative"
|
|
154
161
|
},
|
|
155
162
|
"modulesProvider": {
|
|
156
163
|
"NativeZixflowLogging": "RCTNativeZixflowLogging",
|
|
157
164
|
"NativeZixflow": "RCTNativeZixflow",
|
|
165
|
+
"NativeZixflowLiveActivities": "RCTNativeLiveActivities",
|
|
158
166
|
"NativeZixflowLocation": "RCTNativeZixflowLocation",
|
|
167
|
+
"NativeZixflowGeofence": "RCTNativeZixflowGeofence",
|
|
159
168
|
"NativeZixflowMessagingInApp": "RCTNativeMessagingInApp",
|
|
160
169
|
"NativeZixflowMessagingPush": "RCTNativeMessagingPush"
|
|
161
170
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import NotificationInboxBellNativeComponent, {
|
|
3
|
+
type NativeProps,
|
|
4
|
+
} from '../specs/components/NotificationInboxBellNativeComponent';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Props for the {@link NotificationInboxBellView} component.
|
|
8
|
+
*/
|
|
9
|
+
/** @public */
|
|
10
|
+
export interface NotificationInboxBellViewProps extends Omit<
|
|
11
|
+
NativeProps,
|
|
12
|
+
'onTap'
|
|
13
|
+
> {
|
|
14
|
+
/**
|
|
15
|
+
* Called when the user taps the bell.
|
|
16
|
+
*
|
|
17
|
+
* Observational only — the SDK opens the inbox itself, so there is nothing the
|
|
18
|
+
* host has to do in response. Reports any tap inside this view's frame, which
|
|
19
|
+
* is the bell when the view is sized to it as recommended.
|
|
20
|
+
*/
|
|
21
|
+
onTap?: () => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The Visual Notification Inbox bell (with unread badge). Tapping it opens the
|
|
26
|
+
* SDK's own inbox panel — the host presents nothing.
|
|
27
|
+
*
|
|
28
|
+
* Place it wherever the app's layout calls for it. Remote branding still styles
|
|
29
|
+
* the bell itself (colors, icon), but branding's *position* is not applied: the
|
|
30
|
+
* host owns placement via `style`. The bell renders nothing when the inbox has
|
|
31
|
+
* nothing to show, so give it a fixed size for predictable layout — at least 88
|
|
32
|
+
* points/dp square, since the native composition insets the 56pt bell by 16 on
|
|
33
|
+
* each side and a smaller box squeezes the circle onto the glyph.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* <NotificationInboxBellView
|
|
38
|
+
* style={{ width: 88, height: 88 }}
|
|
39
|
+
* onTap={() => analytics.track('inbox_bell_tapped')}
|
|
40
|
+
* />
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
/** @public */
|
|
44
|
+
const NotificationInboxBellView: React.FC<NotificationInboxBellViewProps> = ({
|
|
45
|
+
onTap,
|
|
46
|
+
...props
|
|
47
|
+
}) => {
|
|
48
|
+
const handleTap = () => {
|
|
49
|
+
onTap?.();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
return <NotificationInboxBellNativeComponent {...props} onTap={handleTap} />;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default NotificationInboxBellView;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import NotificationInboxViewNativeComponent, {
|
|
3
|
+
type NativeProps,
|
|
4
|
+
} from '../specs/components/NotificationInboxViewNativeComponent';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Props for the {@link NotificationInboxView} component.
|
|
8
|
+
*/
|
|
9
|
+
/** @public */
|
|
10
|
+
export interface NotificationInboxViewProps extends NativeProps {}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The Visual Notification Inbox message list — the Jist-rendered messages —
|
|
14
|
+
* embeddable directly in your own screen. It fills the area you give it via
|
|
15
|
+
* `style` and brings no surrounding chrome (no bell, no scrim).
|
|
16
|
+
*
|
|
17
|
+
* Message actions are handled by the existing global InboxEventListener, so this
|
|
18
|
+
* component takes no per-message action callback.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* <NotificationInboxView style={{ flex: 1 }} />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
/** @public */
|
|
26
|
+
const NotificationInboxView: React.FC<NotificationInboxViewProps> = (props) => {
|
|
27
|
+
return <NotificationInboxViewNativeComponent {...props} />;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default NotificationInboxView;
|
package/src/components/index.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
// Export all components and types from the components directory for simplified imports
|
|
2
2
|
export type { InlineInAppMessageViewProps } from './InlineInAppMessageView';
|
|
3
3
|
export { default as InlineInAppMessageView } from './InlineInAppMessageView';
|
|
4
|
+
|
|
5
|
+
// Visual Notification Inbox UI components
|
|
6
|
+
export type { NotificationInboxBellViewProps } from './NotificationInboxBellView';
|
|
7
|
+
export { default as NotificationInboxBellView } from './NotificationInboxBellView';
|
|
8
|
+
export type { NotificationInboxViewProps } from './NotificationInboxView';
|
|
9
|
+
export { default as NotificationInboxView } from './NotificationInboxView';
|