@attentive-mobile/attentive-react-native-sdk 1.0.0 → 1.0.2
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
CHANGED
|
@@ -5,7 +5,7 @@ buildscript {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
dependencies {
|
|
8
|
-
classpath "com.android.tools.build:gradle:7.
|
|
8
|
+
classpath "com.android.tools.build:gradle:7.3.1"
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -55,12 +55,12 @@ android {
|
|
|
55
55
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
Properties ghProperties = new Properties()
|
|
59
|
-
File ghPropertiesFile = file("github.properties")
|
|
60
|
-
if (!ghPropertiesFile.exists()) {
|
|
61
|
-
throw new GradleException('Could not find github.properties file.')
|
|
62
|
-
}
|
|
63
|
-
ghProperties.load(ghPropertiesFile.newDataInputStream())
|
|
58
|
+
//Properties ghProperties = new Properties()
|
|
59
|
+
//File ghPropertiesFile = file("github.properties")
|
|
60
|
+
//if (!ghPropertiesFile.exists()) {
|
|
61
|
+
// throw new GradleException('Could not find github.properties file.')
|
|
62
|
+
//}
|
|
63
|
+
//ghProperties.load(ghPropertiesFile.newDataInputStream())
|
|
64
64
|
|
|
65
65
|
repositories {
|
|
66
66
|
mavenCentral()
|
|
@@ -68,8 +68,8 @@ repositories {
|
|
|
68
68
|
maven {
|
|
69
69
|
url = uri("https://maven.pkg.github.com/attentive-mobile/attentive-android-sdk")
|
|
70
70
|
credentials {
|
|
71
|
-
username = ghProperties.getProperty('gpr.user')
|
|
72
|
-
password = ghProperties.getProperty('gpr.key')
|
|
71
|
+
// username = ghProperties.getProperty('gpr.user')
|
|
72
|
+
// password = ghProperties.getProperty('gpr.key')
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -80,7 +80,7 @@ dependencies {
|
|
|
80
80
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
81
81
|
//noinspection GradleDynamicVersion
|
|
82
82
|
implementation "com.facebook.react:react-native:+"
|
|
83
|
-
implementation 'com.attentive:attentive-android-sdk:1.0.
|
|
83
|
+
implementation 'com.attentive:attentive-android-sdk:1.0.1'
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
if (isNewArchitectureEnabled()) {
|
package/android/src/main/java/com/attentivereactnativesdk/AttentiveReactNativeSdkModule.java
CHANGED
|
@@ -212,6 +212,7 @@ public class AttentiveReactNativeSdkModule extends ReactContextBaseJavaModule {
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
private List<Item> buildItems(ReadableArray rawItems) {
|
|
215
|
+
Log.i(TAG, "buildItems method called with rawItems: " + rawItems.toString());
|
|
215
216
|
List<Item> items = new ArrayList<>();
|
|
216
217
|
for (int i = 0; i < rawItems.size(); i++) {
|
|
217
218
|
ReadableMap rawItem = rawItems.getMap(i);
|
|
@@ -219,7 +220,25 @@ public class AttentiveReactNativeSdkModule extends ReactContextBaseJavaModule {
|
|
|
219
220
|
ReadableMap priceMap = rawItem.getMap("price");
|
|
220
221
|
Price price = new Price.Builder(new BigDecimal(priceMap.getString("price")), Currency.getInstance(priceMap.getString("currency"))).build();
|
|
221
222
|
|
|
222
|
-
Item
|
|
223
|
+
Item.Builder builder = new Item.Builder(rawItem.getString("productId"), rawItem.getString("productVariantId"), price);
|
|
224
|
+
|
|
225
|
+
if (rawItem.hasKey("productImage")) {
|
|
226
|
+
builder.productImage(rawItem.getString("productImage"));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (rawItem.hasKey("name")) {
|
|
230
|
+
builder.name(rawItem.getString("name"));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (rawItem.hasKey("quantity")) {
|
|
234
|
+
builder.quantity(rawItem.getInt("quantity"));
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if (rawItem.hasKey("category")) {
|
|
238
|
+
builder.category(rawItem.getString("category"));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
Item item = builder.build();
|
|
223
242
|
items.add(item);
|
|
224
243
|
}
|
|
225
244
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attentive-mobile/attentive-react-native-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "React Native Module for the Attentive SDK",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
],
|
|
46
46
|
"repository": "https://github.com/attentive-mobile/attentive-react-native-sdk",
|
|
47
47
|
"author": "Attentive <epd-accounts+npm@attentivemobile.com> (https://www.attentive.com)",
|
|
48
|
-
"contributors": [
|
|
48
|
+
"contributors": [
|
|
49
|
+
"Wyatt Davis"
|
|
50
|
+
],
|
|
49
51
|
"license": "MIT",
|
|
50
52
|
"bugs": {
|
|
51
53
|
"url": "https://github.com/attentive-mobile/attentive-react-native-sdk/issues"
|
|
@@ -55,8 +57,8 @@
|
|
|
55
57
|
"registry": "https://registry.npmjs.org/"
|
|
56
58
|
},
|
|
57
59
|
"devDependencies": {
|
|
58
|
-
"@evilmartians/lefthook": "^1.2.2",
|
|
59
60
|
"@commitlint/config-conventional": "^17.0.2",
|
|
61
|
+
"@evilmartians/lefthook": "^1.2.2",
|
|
60
62
|
"@react-native-community/eslint-config": "^3.0.2",
|
|
61
63
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
62
64
|
"@types/jest": "^28.1.2",
|
|
@@ -158,5 +160,8 @@
|
|
|
158
160
|
}
|
|
159
161
|
]
|
|
160
162
|
]
|
|
163
|
+
},
|
|
164
|
+
"dependencies": {
|
|
165
|
+
"@babel/runtime": "^7.27.0"
|
|
161
166
|
}
|
|
162
167
|
}
|