@primer-io/react-native 2.43.1 → 2.45.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.
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/primerioreactnative/datamodels/PrimerSettingsRN.kt +6 -3
- package/android/src/main/java/com/primerioreactnative/extensions/PrimerUIOptionsRN.kt +3 -2
- package/ios/Sources/version.swift +1 -1
- package/package.json +1 -1
- package/primer-io-react-native.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -133,7 +133,7 @@ dependencies {
|
|
|
133
133
|
implementation 'com.facebook.react:react-native:+'
|
|
134
134
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
135
135
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3"
|
|
136
|
-
implementation 'io.primer:android:2.
|
|
136
|
+
implementation 'io.primer:android:2.51.0'
|
|
137
137
|
testImplementation 'io.mockk:mockk:1.14.2'
|
|
138
138
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
|
|
139
139
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
package com.primerioreactnative.datamodels
|
|
2
2
|
|
|
3
3
|
import android.content.Context
|
|
4
|
+
import android.content.res.Configuration
|
|
4
5
|
import com.primerioreactnative.extensions.toLocale
|
|
5
6
|
import com.primerioreactnative.extensions.toPrimerDebugOptions
|
|
6
7
|
import com.primerioreactnative.extensions.toPrimerPaymentMethodOptions
|
|
@@ -62,8 +63,10 @@ data class PrimerThemeRN(
|
|
|
62
63
|
val colors: ColorThemeRN? = null,
|
|
63
64
|
val darkModeColors: ColorThemeRN? = null,
|
|
64
65
|
) {
|
|
65
|
-
fun toPrimerTheme(): PrimerTheme {
|
|
66
|
-
val isDarkMode =
|
|
66
|
+
fun toPrimerTheme(context: Context): PrimerTheme {
|
|
67
|
+
val isDarkMode =
|
|
68
|
+
(context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) ==
|
|
69
|
+
Configuration.UI_MODE_NIGHT_YES
|
|
67
70
|
|
|
68
71
|
return PrimerTheme.buildWithDynamicValues(
|
|
69
72
|
isDarkMode = isDarkMode,
|
|
@@ -206,7 +209,7 @@ fun PrimerSettingsRN.toPrimerSettings(context: Context) =
|
|
|
206
209
|
paymentHandling = paymentHandling,
|
|
207
210
|
locale = localeData.toLocale(),
|
|
208
211
|
paymentMethodOptions = paymentMethodOptions.toPrimerPaymentMethodOptions(context),
|
|
209
|
-
uiOptions = uiOptions.toPrimerUIOptions(),
|
|
212
|
+
uiOptions = uiOptions.toPrimerUIOptions(context),
|
|
210
213
|
debugOptions = debugOptions.toPrimerDebugOptions(),
|
|
211
214
|
clientSessionCachingEnabled = clientSessionCachingEnabled,
|
|
212
215
|
apiVersion = when (apiVersion) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
package com.primerioreactnative.extensions
|
|
2
2
|
|
|
3
|
+
import android.content.Context
|
|
3
4
|
import com.primerioreactnative.datamodels.PrimerUIOptionsRN
|
|
4
5
|
import io.primer.android.data.settings.DismissalMechanism
|
|
5
6
|
import io.primer.android.ui.settings.PrimerUIOptions
|
|
6
7
|
|
|
7
8
|
@OptIn(kotlin.ExperimentalStdlibApi::class)
|
|
8
|
-
internal fun PrimerUIOptionsRN.toPrimerUIOptions() =
|
|
9
|
+
internal fun PrimerUIOptionsRN.toPrimerUIOptions(context: Context) =
|
|
9
10
|
PrimerUIOptions(
|
|
10
11
|
isInitScreenEnabled,
|
|
11
12
|
isSuccessScreenEnabled,
|
|
@@ -19,6 +20,6 @@ internal fun PrimerUIOptionsRN.toPrimerUIOptions() =
|
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
}.toList().takeIf { it.isNotEmpty() } ?: listOf(DismissalMechanism.GESTURES),
|
|
22
|
-
theme.toPrimerTheme(),
|
|
23
|
+
theme.toPrimerTheme(context),
|
|
23
24
|
cardFormUIOptions.toPrimerCardFormUIOptions(),
|
|
24
25
|
)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// swiftlint:disable:next identifier_name
|
|
2
|
-
public let PrimerReactNativeSDKVersion = "2.
|
|
2
|
+
public let PrimerReactNativeSDKVersion = "2.45.0"
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
|
|
|
17
17
|
s.private_header_files = ['ios/PrimerSwiftInterop.h' ]
|
|
18
18
|
|
|
19
19
|
s.dependency "React-Core"
|
|
20
|
-
s.dependency "PrimerSDK", "2.
|
|
20
|
+
s.dependency "PrimerSDK", "2.49.0"
|
|
21
21
|
|
|
22
22
|
s.pod_target_xcconfig = {
|
|
23
23
|
"SWIFT_ENABLE_EXPLICIT_MODULES" => "NO"
|