tapjoy-react-native-sdk 14.4.0 → 14.5.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.
@@ -3,10 +3,13 @@ import {
3
3
  View,
4
4
  TextInput,
5
5
  Text,
6
- SafeAreaView,
7
6
  ScrollView,
8
7
  Platform,
9
8
  } from 'react-native';
9
+ import {
10
+ SafeAreaProvider,
11
+ useSafeAreaInsets,
12
+ } from 'react-native-safe-area-context';
10
13
  import AsyncStorage from '@react-native-async-storage/async-storage';
11
14
  import Button from './Button';
12
15
  import styles from './Styles';
@@ -255,157 +258,169 @@ const UserProperties: React.FC = () => {
255
258
  setOptOut(item.value);
256
259
  };
257
260
 
261
+ const safeAreaInsets = useSafeAreaInsets();
262
+
258
263
  return (
259
- <ScrollView>
260
- <SafeAreaView style={styles.container}>
261
- <View style={styles.lineGap}>
262
- <Text style={styles.statusText}>{statusLabelText}</Text>
263
- </View>
264
- <View style={styles.inputContainer}>
265
- <Text style={styles.userPropertiesLabel}>User ID:</Text>
266
- <TextInput
267
- style={styles.textInput}
268
- value={userId}
269
- onChangeText={setUserId}
270
- placeholder="Enter user ID"
271
- placeholderTextColor="#888"
272
- />
273
- <Button
274
- style={styles.clearButton}
275
- onPress={handleClearInput}
276
- title={'\u2573'}
277
- />
278
- </View>
279
- <View style={styles.inputContainer}>
280
- <Text style={styles.userPropertiesLabel}>Max Level:</Text>
281
- <TextInput
282
- style={styles.textInput}
283
- value={maxLevel}
284
- keyboardType={'numeric'}
285
- onChangeText={setMaxLevel}
286
- placeholder="Enter max level"
287
- placeholderTextColor="#888"
288
- />
289
- <Button
290
- style={styles.clearButton}
291
- onPress={handleClearMaxLevel}
292
- title={'\u2573'}
293
- />
294
- </View>
295
- <View style={styles.inputContainer}>
296
- <Text style={styles.userPropertiesLabel}>User Level:</Text>
297
- <TextInput
298
- style={styles.textInput}
299
- value={userLevel}
300
- keyboardType={'numeric'}
301
- onChangeText={setUserLevel}
302
- placeholder="Enter user level"
303
- placeholderTextColor="#888"
304
- />
305
- <Button
306
- style={styles.clearButton}
307
- onPress={handleClearUserLevel}
308
- title={'\u2573'}
309
- />
310
- </View>
311
- <View style={styles.inputContainer}>
312
- <Text style={styles.userPropertiesLabel}>User Tags:</Text>
313
- <TextInput
314
- style={styles.textInput}
315
- value={userTag}
316
- onChangeText={setUserTag}
317
- placeholder="Enter user tag"
318
- placeholderTextColor="#888"
319
- />
320
- </View>
321
- <View style={styles.horizontalContainer}>
322
- <Button
323
- style={styles.buttonTag}
324
- onPress={handleAddUserTag}
325
- title={'Add'}
326
- />
327
- <Button
328
- style={styles.buttonTag}
329
- onPress={handleRemoveUserTag}
330
- title={'Remove'}
331
- />
332
- <Button
333
- style={styles.buttonTag}
334
- onPress={handleClearUserTag}
335
- title={'Clear'}
336
- />
337
- </View>
338
- <View style={styles.selectionContainer}>
339
- <View style={styles.horizontalContainer}>
340
- <Text style={styles.userPropertiesLabel}>User Segment:</Text>
341
- <SelectionMenu
342
- data={segmentData}
343
- onSelectItem={handleUserSegment}
344
- initialSelectedItem={initialUserSegmentItem}
264
+ <SafeAreaProvider>
265
+ <ScrollView>
266
+ <View style={[
267
+ styles.mainContainer,
268
+ {
269
+ paddingTop: safeAreaInsets.top,
270
+ paddingBottom: safeAreaInsets.bottom,
271
+ paddingLeft: safeAreaInsets.left,
272
+ paddingRight: safeAreaInsets.right,
273
+ },
274
+ ]}>
275
+ <View style={styles.lineGap}>
276
+ <Text style={styles.statusText}>{statusLabelText}</Text>
277
+ </View>
278
+ <View style={styles.inputContainer}>
279
+ <Text style={styles.userPropertiesLabel}>User ID:</Text>
280
+ <TextInput
281
+ style={styles.textInput}
282
+ value={userId}
283
+ onChangeText={setUserId}
284
+ placeholder="Enter user ID"
285
+ placeholderTextColor="#888"
286
+ />
287
+ <Button
288
+ style={styles.clearButton}
289
+ onPress={handleClearInput}
290
+ title={'\u2573'}
345
291
  />
346
292
  </View>
347
- </View>
348
- <View style={styles.selectionContainer}>
349
- <View style={styles.horizontalContainer}>
350
- <Text style={styles.userPropertiesLabel}>Subject To GDPR:</Text>
351
- <SelectionMenu
352
- data={statusData}
353
- onSelectItem={handleSubjectToGDPR}
354
- initialSelectedItem={initialSubjectToGDPRItem}
293
+ <View style={styles.inputContainer}>
294
+ <Text style={styles.userPropertiesLabel}>Max Level:</Text>
295
+ <TextInput
296
+ style={styles.textInput}
297
+ value={maxLevel}
298
+ keyboardType={'numeric'}
299
+ onChangeText={setMaxLevel}
300
+ placeholder="Enter max level"
301
+ placeholderTextColor="#888"
302
+ />
303
+ <Button
304
+ style={styles.clearButton}
305
+ onPress={handleClearMaxLevel}
306
+ title={'\u2573'}
355
307
  />
356
308
  </View>
357
- </View>
358
- <View style={styles.selectionContainer}>
359
- <View style={styles.horizontalContainer}>
360
- <Text style={styles.userPropertiesLabel}>Below Consent Age:</Text>
361
- <SelectionMenu
362
- data={statusData}
363
- onSelectItem={handleBelowConsentAge}
364
- initialSelectedItem={initialBelowConsentAgeItem}
309
+ <View style={styles.inputContainer}>
310
+ <Text style={styles.userPropertiesLabel}>User Level:</Text>
311
+ <TextInput
312
+ style={styles.textInput}
313
+ value={userLevel}
314
+ keyboardType={'numeric'}
315
+ onChangeText={setUserLevel}
316
+ placeholder="Enter user level"
317
+ placeholderTextColor="#888"
318
+ />
319
+ <Button
320
+ style={styles.clearButton}
321
+ onPress={handleClearUserLevel}
322
+ title={'\u2573'}
323
+ />
324
+ </View>
325
+ <View style={styles.inputContainer}>
326
+ <Text style={styles.userPropertiesLabel}>User Tags:</Text>
327
+ <TextInput
328
+ style={styles.textInput}
329
+ value={userTag}
330
+ onChangeText={setUserTag}
331
+ placeholder="Enter user tag"
332
+ placeholderTextColor="#888"
365
333
  />
366
334
  </View>
367
- </View>
368
- <View style={styles.selectionContainer}>
369
335
  <View style={styles.horizontalContainer}>
370
- <Text style={styles.userPropertiesLabel}>User Consent:</Text>
371
- <SelectionMenu
372
- data={statusData}
373
- onSelectItem={handleUserConsent}
374
- initialSelectedItem={initialUserConsentItem}
336
+ <Button
337
+ style={styles.buttonTag}
338
+ onPress={handleAddUserTag}
339
+ title={'Add'}
340
+ />
341
+ <Button
342
+ style={styles.buttonTag}
343
+ onPress={handleRemoveUserTag}
344
+ title={'Remove'}
345
+ />
346
+ <Button
347
+ style={styles.buttonTag}
348
+ onPress={handleClearUserTag}
349
+ title={'Clear'}
375
350
  />
376
351
  </View>
377
- </View>
378
- <View style={styles.inputContainer}>
379
- <Text style={styles.userPropertiesLabel}>US Privacy:</Text>
380
- <TextInput
381
- style={styles.textInput}
382
- value={USPrivacy}
383
- onChangeText={handleUSPrivacy}
384
- placeholder="E.g 1YYN"
385
- placeholderTextColor="#888"
386
- />
387
- </View>
388
- {Platform.OS === 'android' && (
389
352
  <View style={styles.selectionContainer}>
390
353
  <View style={styles.horizontalContainer}>
391
- <Text style={styles.userPropertiesLabel}>Opt Out Ad ID:</Text>
354
+ <Text style={styles.userPropertiesLabel}>User Segment:</Text>
392
355
  <SelectionMenu
393
- data={optOutAdData}
394
- onSelectItem={handleOptOut}
395
- initialSelectedItem={initialOptOutItem}
356
+ data={segmentData}
357
+ onSelectItem={handleUserSegment}
358
+ initialSelectedItem={initialUserSegmentItem}
396
359
  />
397
360
  </View>
398
361
  </View>
399
- )}
400
- <View style={styles.buttonContainer}>
401
- <Button
402
- style={styles.button}
403
- onPress={applyProperties}
404
- title={'Apply'}
405
- />
362
+ <View style={styles.selectionContainer}>
363
+ <View style={styles.horizontalContainer}>
364
+ <Text style={styles.userPropertiesLabel}>Subject To GDPR:</Text>
365
+ <SelectionMenu
366
+ data={statusData}
367
+ onSelectItem={handleSubjectToGDPR}
368
+ initialSelectedItem={initialSubjectToGDPRItem}
369
+ />
370
+ </View>
371
+ </View>
372
+ <View style={styles.selectionContainer}>
373
+ <View style={styles.horizontalContainer}>
374
+ <Text style={styles.userPropertiesLabel}>Below Consent Age:</Text>
375
+ <SelectionMenu
376
+ data={statusData}
377
+ onSelectItem={handleBelowConsentAge}
378
+ initialSelectedItem={initialBelowConsentAgeItem}
379
+ />
380
+ </View>
381
+ </View>
382
+ <View style={styles.selectionContainer}>
383
+ <View style={styles.horizontalContainer}>
384
+ <Text style={styles.userPropertiesLabel}>User Consent:</Text>
385
+ <SelectionMenu
386
+ data={statusData}
387
+ onSelectItem={handleUserConsent}
388
+ initialSelectedItem={initialUserConsentItem}
389
+ />
390
+ </View>
391
+ </View>
392
+ <View style={styles.inputContainer}>
393
+ <Text style={styles.userPropertiesLabel}>US Privacy:</Text>
394
+ <TextInput
395
+ style={styles.textInput}
396
+ value={USPrivacy}
397
+ onChangeText={handleUSPrivacy}
398
+ placeholder="E.g 1YYN"
399
+ placeholderTextColor="#888"
400
+ />
401
+ </View>
402
+ {Platform.OS === 'android' && (
403
+ <View style={styles.selectionContainer}>
404
+ <View style={styles.horizontalContainer}>
405
+ <Text style={styles.userPropertiesLabel}>Opt Out Ad ID:</Text>
406
+ <SelectionMenu
407
+ data={optOutAdData}
408
+ onSelectItem={handleOptOut}
409
+ initialSelectedItem={initialOptOutItem}
410
+ />
411
+ </View>
412
+ </View>
413
+ )}
414
+ <View style={styles.buttonContainer}>
415
+ <Button
416
+ style={styles.button}
417
+ onPress={applyProperties}
418
+ title={'Apply'}
419
+ />
420
+ </View>
406
421
  </View>
407
- </SafeAreaView>
408
- </ScrollView>
422
+ </ScrollView>
423
+ </SafeAreaProvider>
409
424
  );
410
425
  };
411
426
 
@@ -1,4 +1,4 @@
1
- const REACT_LIBRARY_VERSION = '14.4.0';
1
+ const REACT_LIBRARY_VERSION = '14.5.0';
2
2
  const REACT_LIBRARY_VERSION_SUFFIX = '';
3
3
  export class TJVersion {
4
4
  // Returns the version of the plugin - eg: 1.0.0-alpha-rc1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tapjoy-react-native-sdk",
3
- "version": "14.4.0",
3
+ "version": "14.5.0",
4
4
  "description": "ReactNative Plugin for Tapjoy SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -41,21 +41,14 @@
41
41
  "CODEOWNERS"
42
42
  ],
43
43
  "scripts": {
44
- "generate-declarations": "rm -rf lib && npx tsc --outDir lib/commonjs --declarationDir lib/typescript",
45
44
  "test": "jest",
46
45
  "typecheck": "tsc --noEmit",
47
46
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
48
47
  "example": "yarn --cwd example",
49
48
  "bootstrap": "yarn example && yarn install && yarn example pods",
50
49
  "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build temp package",
51
- "prepare-repo": "rm -rf temp package && mkdir temp && cd temp && git clone git@github.com:Tapjoy/react-native-sdk . && rm -rf *",
52
- "prepare-staging-repo": "rm -rf temp package && mkdir temp && cd temp && git clone git@github.com:Tapjoy/react-native-sdk-staging.git . && rm -rf *",
53
- "copy-pack": "npm pack && tar xvzf tapjoy-react-native*.tgz && cp -af ./package/* ./temp && rm tapjoy-react-native*.tgz",
54
- "push": "cd temp && git add . && export VERSION=`node -p \"require('./package.json').version\"` && git commit -m \"Release $VERSION\" && git push",
55
- "publish-npm": "yarn prepare-repo && yarn copy-pack && yarn push && cd temp && npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN && npm pkg fix && npm publish && yarn tag-branch",
56
- "publish-staging-npm": "yarn prepare-staging-repo && yarn copy-pack && yarn push && cd temp && npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN && npm pkg fix && npm publish --dry-run && yarn tag-branch",
57
50
  "doc": "typedoc --entryPointStrategy expand src/*",
58
- "tag-branch": "export VERSION=`node -p \"require('./package.json').version\"` && git tag $VERSION && git push origin $VERSION"
51
+ "postinstall": "echo 'For Android, please ensure your project’s Gradle is configured correctly. Instructions can be found at: https://dev.tapjoy.com/en/reactnative-plugin/Quickstart'"
59
52
  },
60
53
  "keywords": [
61
54
  "react-native",
@@ -77,9 +70,9 @@
77
70
  "devDependencies": {
78
71
  "@commitlint/config-conventional": "^19.5.0",
79
72
  "@react-native-community/eslint-config": "^3.2.0",
80
- "@react-native/metro-config": "^0.79.2",
73
+ "@react-native/metro-config": "^0.81.0",
81
74
  "@types/jest": "^29.5.13",
82
- "@types/react": "^18.3.10",
75
+ "@types/react": "^19.1.0",
83
76
  "commitlint": "^19.5.0",
84
77
  "del-cli": "^5.1.0",
85
78
  "eslint": "^9.11.1",
@@ -88,13 +81,13 @@
88
81
  "jest": "^29.7.0",
89
82
  "pod-install": "^0.2.2",
90
83
  "prettier": "^3.3.3",
91
- "react": "^19.0.0",
92
- "react-native": "0.79.2",
84
+ "react": "^19.1.0",
85
+ "react-native": "0.81.0",
93
86
  "typedoc": "^0.26.7",
94
- "typescript": "^5.6.2"
87
+ "typescript": "^5.8.3"
95
88
  },
96
89
  "resolutions": {
97
- "@types/react": "^18.3.10"
90
+ "@types/react": "^19.1.0"
98
91
  },
99
92
  "peerDependencies": {
100
93
  "react": "*",
package/src/TJVersion.ts CHANGED
@@ -1,4 +1,4 @@
1
- const REACT_LIBRARY_VERSION = '14.4.0';
1
+ const REACT_LIBRARY_VERSION = '14.5.0';
2
2
  const REACT_LIBRARY_VERSION_SUFFIX = '';
3
3
 
4
4
  export class TJVersion {
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
- s.dependency "TapjoySDK", "14.4.0"
20
+ s.dependency "TapjoySDK", "14.5.0"
21
21
 
22
22
  # Don't install the dependencies when we run `pod install` in the old architecture.
23
23
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then