@klarna/react-native-klarna-network-payment 2.8.2 → 2.9.1
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.
|
@@ -46,17 +46,20 @@ private extension KlarnaPaymentPresentationPaymentOption {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
private extension KlarnaPaymentPresentationText {
|
|
49
|
+
private extension KlarnaPaymentPresentationText.PlainText {
|
|
50
50
|
func toDictionary() -> NSDictionary {
|
|
51
51
|
let dict = NSMutableDictionary()
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
dict["type"] = "plainText"
|
|
53
|
+
dict["text"] = text
|
|
54
|
+
return dict
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
private extension KlarnaPaymentPresentationText.AttributedText {
|
|
59
|
+
func toDictionary() -> NSDictionary {
|
|
60
|
+
let dict = NSMutableDictionary()
|
|
61
|
+
dict["type"] = "attributedText"
|
|
62
|
+
dict["parts"] = parts?.map { $0.toDictionary() } ?? NSNull()
|
|
60
63
|
return dict
|
|
61
64
|
}
|
|
62
65
|
}
|
|
@@ -65,7 +68,7 @@ private extension KlarnaPaymentPresentationTextPart {
|
|
|
65
68
|
func toDictionary() -> NSDictionary {
|
|
66
69
|
let dict = NSMutableDictionary()
|
|
67
70
|
switch self {
|
|
68
|
-
case .
|
|
71
|
+
case .plainText(let styles, let text):
|
|
69
72
|
dict["type"] = "plain"
|
|
70
73
|
dict["text"] = text
|
|
71
74
|
dict["styles"] = styles?.map { $0.rawValue } ?? NSNull()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@klarna/react-native-klarna-network-payment",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"description": "React Native package for Klarna Network Payment",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"typescript": "^5.0.2"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
|
-
"@klarna/react-native-klarna-network-core": "2.
|
|
101
|
+
"@klarna/react-native-klarna-network-core": "2.9.1",
|
|
102
102
|
"react": ">=18.2.0",
|
|
103
103
|
"react-native": ">=0.76.0 <1.0.x"
|
|
104
104
|
},
|
|
@@ -19,8 +19,8 @@ Pod::Spec.new do |s|
|
|
|
19
19
|
|
|
20
20
|
install_modules_dependencies(s)
|
|
21
21
|
|
|
22
|
-
s.dependency 'KlarnaMobileSDK/KlarnaNetworkPayment', '2.
|
|
23
|
-
s.dependency 'KlarnaMobileSDK/KlarnaNetworkPaymentButton', '2.
|
|
22
|
+
s.dependency 'KlarnaMobileSDK/KlarnaNetworkPayment', '2.14.0'
|
|
23
|
+
s.dependency 'KlarnaMobileSDK/KlarnaNetworkPaymentButton', '2.14.0'
|
|
24
24
|
s.dependency 'react-native-klarna-network-core', s.version.to_s
|
|
25
25
|
|
|
26
26
|
s.test_spec 'Tests' do |ts|
|