@braze/react-native-sdk
Advanced tools
Comparing version 12.0.0 to 12.1.0
@@ -129,7 +129,15 @@ const NativeEventEmitter = require('react-native').NativeEventEmitter; | ||
test('it calls BrazeReactBridge.launchContentCards', () => { | ||
test('it calls BrazeReactBridge.launchContentCards without parameters', () => { | ||
Braze.launchContentCards(); | ||
expect(NativeBrazeReactModule.launchContentCards).toBeCalled(); | ||
expect(NativeBrazeReactModule.launchContentCards).toBeCalledWith(false); | ||
}); | ||
test('it calls BrazeReactBridge.launchContentCards with parameters', () => { | ||
Braze.launchContentCards(true); | ||
expect(NativeBrazeReactModule.launchContentCards).toBeCalledWith(true); | ||
Braze.launchContentCards(false); | ||
expect(NativeBrazeReactModule.launchContentCards).toBeCalledWith(false); | ||
}); | ||
test('it calls BrazeReactBridge.getContentCards', () => { | ||
@@ -136,0 +144,0 @@ Braze.getContentCards(); |
{ | ||
"name": "@braze/react-native-sdk", | ||
"version": "12.0.0", | ||
"version": "12.1.0", | ||
"description": "Braze SDK for React Native.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -596,5 +596,10 @@ import { | ||
* Launches the Content Cards UI element. | ||
* | ||
* @param {boolean | undefined} dismissAutomaticallyOnCardClick | ||
* When enabled, the feed UI will automatically dismiss on scheme-based deep link clicks. | ||
* This setting is a no-op on Android, which already removes the Content Cards feed when opening a deep link. | ||
*/ | ||
static launchContentCards() { | ||
this.bridge.launchContentCards(); | ||
static launchContentCards(dismissAutomaticallyOnCardClick) { | ||
const dismissAutomatically = typeof dismissAutomaticallyOnCardClick === 'boolean' ? dismissAutomaticallyOnCardClick : false; | ||
this.bridge.launchContentCards(dismissAutomatically); | ||
} | ||
@@ -601,0 +606,0 @@ |
@@ -625,4 +625,8 @@ // Definitions by: ahanriat <https://github.com/ahanriat> | ||
* Launches the Content Cards UI element. | ||
* | ||
* @param {boolean | undefined} dismissAutomaticallyOnCardClick | ||
* When enabled, the feed UI will automatically dismiss on scheme-based deep link clicks. | ||
* This setting is a no-op on Android, which already removes the Content Cards feed when opening a deep link. | ||
*/ | ||
export function launchContentCards(): void; | ||
export function launchContentCards(dismissAutomaticallyOnCardClick?: boolean): void; | ||
@@ -629,0 +633,0 @@ /** |
@@ -133,3 +133,3 @@ import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport'; | ||
getNewsFeedCards(): Promise<NewsFeedCard[]>; | ||
launchContentCards(): void; | ||
launchContentCards(dismissAutomaticallyOnCardClick: boolean): void; | ||
requestContentCardsRefresh(): void; | ||
@@ -136,0 +136,0 @@ logContentCardClicked(cardId: string): void; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
296243
3506