react-native-radar 3.20.4 → 3.21.0-beta.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.
Files changed (133) hide show
  1. package/Radar.podspec +22 -0
  2. package/android/build.gradle +77 -35
  3. package/android/gradle.properties +5 -1
  4. package/android/src/main/AndroidManifest.xml +1 -3
  5. package/android/src/main/java/{io/radar/react/RNRadarModule.java → com/radar/RadarModuleImpl.java} +131 -258
  6. package/android/src/main/java/com/radar/RadarPackage.kt +35 -0
  7. package/android/src/main/java/{io/radar/react/RNRadarUtils.java → com/radar/RadarUtils.java} +3 -2
  8. package/android/src/newarch/java/com/radar/RadarModule.kt +381 -0
  9. package/android/src/oldarch/java/com/radar/RadarModule.java +416 -0
  10. package/android/src/{main/java/io/radar/react/RNRadarReceiver.java → oldarch/java/com/radar/RadarOldArchReceiver.java} +8 -8
  11. package/android/src/{main/java/io/radar/react/RNRadarVerifiedReceiver.java → oldarch/java/com/radar/RadarOldArchVerifiedReceiver.java} +4 -4
  12. package/app.plugin.js +1 -1
  13. package/ios/RNRadar.h +11 -2
  14. package/ios/{RNRadar.m → RNRadar.mm} +77 -39
  15. package/lib/commonjs/@types/RadarNativeInterface.js +2 -0
  16. package/lib/commonjs/@types/RadarNativeInterface.js.map +1 -0
  17. package/lib/commonjs/@types/types.js +2 -0
  18. package/lib/commonjs/@types/types.js.map +1 -0
  19. package/lib/commonjs/NativeRadar.js +2 -0
  20. package/lib/commonjs/NativeRadar.js.map +1 -0
  21. package/lib/commonjs/helpers.js +2 -0
  22. package/lib/commonjs/helpers.js.map +1 -0
  23. package/lib/commonjs/index.js +2 -0
  24. package/lib/commonjs/index.js.map +1 -0
  25. package/lib/commonjs/index.native.js +2 -0
  26. package/lib/commonjs/index.native.js.map +1 -0
  27. package/lib/commonjs/index.web.js +2 -0
  28. package/lib/commonjs/index.web.js.map +1 -0
  29. package/lib/commonjs/package.json +1 -0
  30. package/lib/commonjs/plugin/types.js +2 -0
  31. package/lib/commonjs/plugin/types.js.map +1 -0
  32. package/lib/commonjs/plugin/withRadar.js +2 -0
  33. package/lib/commonjs/plugin/withRadar.js.map +1 -0
  34. package/lib/commonjs/plugin/withRadarAndroid.js +2 -0
  35. package/lib/commonjs/plugin/withRadarAndroid.js.map +1 -0
  36. package/lib/commonjs/plugin/withRadarIOS.js +2 -0
  37. package/lib/commonjs/plugin/withRadarIOS.js.map +1 -0
  38. package/lib/commonjs/ui/autocomplete.js +2 -0
  39. package/lib/commonjs/ui/autocomplete.js.map +1 -0
  40. package/lib/commonjs/ui/images.js +2 -0
  41. package/lib/commonjs/ui/images.js.map +1 -0
  42. package/lib/commonjs/ui/map.js +2 -0
  43. package/lib/commonjs/ui/map.js.map +1 -0
  44. package/lib/commonjs/ui/styles.js +2 -0
  45. package/lib/commonjs/ui/styles.js.map +1 -0
  46. package/lib/commonjs/version.js +2 -0
  47. package/lib/commonjs/version.js.map +1 -0
  48. package/{dist → lib/typescript/src}/@types/RadarNativeInterface.d.ts +18 -7
  49. package/lib/typescript/src/@types/RadarNativeInterface.d.ts.map +1 -0
  50. package/{dist → lib/typescript/src}/@types/types.d.ts +5 -3
  51. package/lib/typescript/src/@types/types.d.ts.map +1 -0
  52. package/lib/typescript/src/NativeRadar.d.ts +87 -0
  53. package/lib/typescript/src/NativeRadar.d.ts.map +1 -0
  54. package/{dist → lib/typescript/src}/index.d.ts +1 -0
  55. package/lib/typescript/src/index.d.ts.map +1 -0
  56. package/lib/typescript/src/index.native.d.ts +7 -0
  57. package/lib/typescript/src/index.native.d.ts.map +1 -0
  58. package/lib/typescript/src/plugin/types.d.ts +13 -0
  59. package/lib/typescript/src/plugin/types.d.ts.map +1 -0
  60. package/{plugin/build → lib/typescript/src/plugin}/withRadar.d.ts +2 -1
  61. package/lib/typescript/src/plugin/withRadar.d.ts.map +1 -0
  62. package/{plugin/build → lib/typescript/src/plugin}/withRadarAndroid.d.ts +1 -0
  63. package/lib/typescript/src/plugin/withRadarAndroid.d.ts.map +1 -0
  64. package/{plugin/build → lib/typescript/src/plugin}/withRadarIOS.d.ts +1 -0
  65. package/lib/typescript/src/plugin/withRadarIOS.d.ts.map +1 -0
  66. package/lib/typescript/src/version.d.ts +2 -0
  67. package/lib/typescript/src/version.d.ts.map +1 -0
  68. package/package.json +85 -34
  69. package/react-native.config.js +10 -0
  70. package/src/@types/RadarNativeInterface.ts +127 -0
  71. package/src/@types/types.ts +808 -0
  72. package/src/NativeRadar.ts +95 -0
  73. package/src/helpers.js +11 -0
  74. package/src/index.native.ts +419 -0
  75. package/src/index.tsx +22 -0
  76. package/src/index.web.js +528 -0
  77. package/{plugin/build/types.d.ts → src/plugin/types.ts} +1 -1
  78. package/src/plugin/withRadar.ts +39 -0
  79. package/src/plugin/withRadarAndroid.ts +147 -0
  80. package/src/plugin/withRadarIOS.ts +80 -0
  81. package/src/ui/autocomplete.jsx +324 -0
  82. package/src/ui/back.png +0 -0
  83. package/src/ui/close.png +0 -0
  84. package/src/ui/images.js +5 -0
  85. package/src/ui/map-logo.png +0 -0
  86. package/src/ui/map.jsx +122 -0
  87. package/src/ui/marker.png +0 -0
  88. package/src/ui/radar-logo.png +0 -0
  89. package/src/ui/search.png +0 -0
  90. package/src/ui/styles.js +125 -0
  91. package/src/version.ts +3 -0
  92. package/android/build.gradle.template +0 -49
  93. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  94. package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  95. package/android/gradlew +0 -160
  96. package/android/gradlew.bat +0 -90
  97. package/android/proguard-rules.pro +0 -4
  98. package/android/src/main/java/io/radar/react/RNRadarPackage.java +0 -29
  99. package/dist/@types/RadarNativeInterface.js +0 -2
  100. package/dist/@types/types.js +0 -150
  101. package/dist/helpers.d.ts +0 -2
  102. package/dist/helpers.js +0 -11
  103. package/dist/index.js +0 -29
  104. package/dist/index.native.d.ts +0 -3
  105. package/dist/index.native.js +0 -150
  106. package/dist/index.web.d.ts +0 -113
  107. package/dist/index.web.js +0 -516
  108. package/dist/ui/autocomplete.d.ts +0 -5
  109. package/dist/ui/autocomplete.js +0 -206
  110. package/dist/ui/images.d.ts +0 -5
  111. package/dist/ui/images.js +0 -8
  112. package/dist/ui/map.d.ts +0 -6
  113. package/dist/ui/map.js +0 -122
  114. package/dist/ui/styles.d.ts +0 -172
  115. package/dist/ui/styles.js +0 -125
  116. package/ios/Cartfile.private +0 -1
  117. package/ios/Cartfile.resolved +0 -1
  118. package/ios/Cartfile.resolved.template +0 -1
  119. package/ios/RNRadar.xcodeproj/project.pbxproj +0 -521
  120. package/ios/RNRadar.xcodeproj/xcshareddata/xcschemes/RNRadar.xcscheme +0 -76
  121. package/plugin/build/index.d.ts +0 -3
  122. package/plugin/build/index.js +0 -6
  123. package/plugin/build/types.js +0 -2
  124. package/plugin/build/withRadar.js +0 -26
  125. package/plugin/build/withRadarAndroid.js +0 -98
  126. package/plugin/build/withRadarIOS.js +0 -76
  127. package/react-native-radar.podspec +0 -19
  128. /package/{dist → lib/commonjs}/ui/back.png +0 -0
  129. /package/{dist → lib/commonjs}/ui/close.png +0 -0
  130. /package/{dist → lib/commonjs}/ui/map-logo.png +0 -0
  131. /package/{dist → lib/commonjs}/ui/marker.png +0 -0
  132. /package/{dist → lib/commonjs}/ui/radar-logo.png +0 -0
  133. /package/{dist → lib/commonjs}/ui/search.png +0 -0
@@ -1,150 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_native_1 = require("react-native");
4
- const package_json_1 = require("../package.json");
5
- if (!react_native_1.NativeModules.RNRadar &&
6
- (react_native_1.Platform.OS === "ios" || react_native_1.Platform.OS === "android")) {
7
- throw new Error("NativeModules.RNRadar is undefined");
8
- }
9
- const eventEmitter = new react_native_1.NativeEventEmitter(react_native_1.NativeModules.RNRadar);
10
- const initialize = (publishableKey, fraud = false) => {
11
- react_native_1.NativeModules.RNRadar.initialize(publishableKey, fraud);
12
- };
13
- const setLogLevel = (level) => {
14
- react_native_1.NativeModules.RNRadar.setLogLevel(level);
15
- };
16
- const setUserId = (userId) => {
17
- react_native_1.NativeModules.RNRadar.setUserId(userId);
18
- };
19
- const getUserId = () => react_native_1.NativeModules.RNRadar.getUserId();
20
- const setDescription = (description) => {
21
- react_native_1.NativeModules.RNRadar.setDescription(description);
22
- };
23
- const getDescription = () => react_native_1.NativeModules.RNRadar.getDescription();
24
- const setMetadata = (metadata) => {
25
- react_native_1.NativeModules.RNRadar.setMetadata(metadata);
26
- };
27
- const getMetadata = () => react_native_1.NativeModules.RNRadar.getMetadata();
28
- const setProduct = (product) => {
29
- react_native_1.NativeModules.RNRadar.setProduct(product);
30
- };
31
- const getProduct = () => react_native_1.NativeModules.RNRadar.getProduct();
32
- const setAnonymousTrackingEnabled = (enabled) => react_native_1.NativeModules.RNRadar.setAnonymousTrackingEnabled(enabled);
33
- const getPermissionsStatus = () => react_native_1.NativeModules.RNRadar.getPermissionsStatus();
34
- const requestPermissions = (background) => react_native_1.NativeModules.RNRadar.requestPermissions(background);
35
- const getLocation = (desiredAccuracy) => react_native_1.NativeModules.RNRadar.getLocation(desiredAccuracy);
36
- const trackOnce = (options) => {
37
- let backCompatibleOptions = options;
38
- if (options && "latitude" in options) {
39
- backCompatibleOptions = {
40
- location: Object.assign({}, options),
41
- };
42
- }
43
- return react_native_1.NativeModules.RNRadar.trackOnce(backCompatibleOptions);
44
- };
45
- const trackVerified = (options) => react_native_1.NativeModules.RNRadar.trackVerified(options);
46
- const getVerifiedLocationToken = () => react_native_1.NativeModules.RNRadar.getVerifiedLocationToken();
47
- const clearVerifiedLocationToken = () => react_native_1.NativeModules.RNRadar.clearVerifiedLocationToken();
48
- const startTrackingEfficient = () => react_native_1.NativeModules.RNRadar.startTrackingEfficient();
49
- const startTrackingResponsive = () => react_native_1.NativeModules.RNRadar.startTrackingResponsive();
50
- const startTrackingContinuous = () => react_native_1.NativeModules.RNRadar.startTrackingContinuous();
51
- const startTrackingCustom = (options) => react_native_1.NativeModules.RNRadar.startTrackingCustom(options);
52
- const startTrackingVerified = (options) => react_native_1.NativeModules.RNRadar.startTrackingVerified(options);
53
- const mockTracking = (options) => react_native_1.NativeModules.RNRadar.mockTracking(options);
54
- const stopTracking = () => react_native_1.NativeModules.RNRadar.stopTracking();
55
- const stopTrackingVerified = () => react_native_1.NativeModules.RNRadar.stopTrackingVerified();
56
- const isTracking = () => react_native_1.NativeModules.RNRadar.isTracking();
57
- const isTrackingVerified = () => react_native_1.NativeModules.RNRadar.isTrackingVerified();
58
- const getTrackingOptions = () => react_native_1.NativeModules.RNRadar.getTrackingOptions();
59
- const isUsingRemoteTrackingOptions = () => react_native_1.NativeModules.RNRadar.isUsingRemoteTrackingOptions();
60
- const setForegroundServiceOptions = (options) => react_native_1.NativeModules.RNRadar.setForegroundServiceOptions(options);
61
- const setNotificationOptions = (options) => react_native_1.NativeModules.RNRadar.setNotificationOptions(options);
62
- const getTripOptions = () => react_native_1.NativeModules.RNRadar.getTripOptions();
63
- const startTrip = (options) => react_native_1.NativeModules.RNRadar.startTrip(options);
64
- const completeTrip = () => react_native_1.NativeModules.RNRadar.completeTrip();
65
- const cancelTrip = () => react_native_1.NativeModules.RNRadar.cancelTrip();
66
- const updateTrip = (options) => react_native_1.NativeModules.RNRadar.updateTrip(options);
67
- const acceptEvent = (eventId, verifiedPlaceId) => react_native_1.NativeModules.RNRadar.acceptEvent(eventId, verifiedPlaceId);
68
- const rejectEvent = (eventId) => react_native_1.NativeModules.RNRadar.rejectEvent(eventId);
69
- const getContext = (location) => react_native_1.NativeModules.RNRadar.getContext(location);
70
- const searchPlaces = (options) => react_native_1.NativeModules.RNRadar.searchPlaces(options);
71
- const searchGeofences = (options) => react_native_1.NativeModules.RNRadar.searchGeofences(options);
72
- const autocomplete = (options) => react_native_1.NativeModules.RNRadar.autocomplete(options);
73
- const geocode = (options) => react_native_1.NativeModules.RNRadar.geocode(options);
74
- const reverseGeocode = (options) => react_native_1.NativeModules.RNRadar.reverseGeocode(options);
75
- const ipGeocode = () => react_native_1.NativeModules.RNRadar.ipGeocode();
76
- const validateAddress = (address) => react_native_1.NativeModules.RNRadar.validateAddress(address);
77
- const getDistance = (options) => react_native_1.NativeModules.RNRadar.getDistance(options);
78
- const getMatrix = (options) => react_native_1.NativeModules.RNRadar.getMatrix(options);
79
- const logConversion = (options) => react_native_1.NativeModules.RNRadar.logConversion(options);
80
- const sendEvent = (name, metadata) => react_native_1.NativeModules.RNRadar.sendEvent(name, metadata);
81
- const on = (channel, callback) => eventEmitter.addListener(channel, callback);
82
- const off = (channel, callback) => {
83
- if (callback) {
84
- // @ts-ignore
85
- eventEmitter.removeListener(channel, callback);
86
- }
87
- else {
88
- eventEmitter.removeAllListeners(channel);
89
- }
90
- };
91
- const nativeSdkVersion = () => react_native_1.NativeModules.RNRadar.nativeSdkVersion();
92
- const rnSdkVersion = () => package_json_1.version;
93
- const Radar = {
94
- initialize,
95
- setLogLevel,
96
- setUserId,
97
- getUserId,
98
- setDescription,
99
- getDescription,
100
- setMetadata,
101
- getMetadata,
102
- setProduct,
103
- getProduct,
104
- setAnonymousTrackingEnabled,
105
- getPermissionsStatus,
106
- requestPermissions,
107
- getLocation,
108
- trackOnce,
109
- trackVerified,
110
- isTrackingVerified,
111
- getVerifiedLocationToken,
112
- clearVerifiedLocationToken,
113
- startTrackingEfficient,
114
- startTrackingResponsive,
115
- startTrackingContinuous,
116
- startTrackingCustom,
117
- startTrackingVerified,
118
- mockTracking,
119
- stopTracking,
120
- stopTrackingVerified,
121
- isTracking,
122
- getTrackingOptions,
123
- isUsingRemoteTrackingOptions,
124
- setForegroundServiceOptions,
125
- setNotificationOptions,
126
- getTripOptions,
127
- startTrip,
128
- completeTrip,
129
- cancelTrip,
130
- updateTrip,
131
- acceptEvent,
132
- rejectEvent,
133
- getContext,
134
- searchPlaces,
135
- searchGeofences,
136
- autocomplete,
137
- geocode,
138
- reverseGeocode,
139
- ipGeocode,
140
- validateAddress,
141
- getDistance,
142
- getMatrix,
143
- logConversion,
144
- sendEvent,
145
- on,
146
- off,
147
- nativeSdkVersion,
148
- rnSdkVersion,
149
- };
150
- exports.default = Radar;
@@ -1,113 +0,0 @@
1
- export default Radar;
2
- declare namespace Radar {
3
- export { initialize };
4
- export { setLogLevel };
5
- export { setUserId };
6
- export { getUserId };
7
- export { setDescription };
8
- export { getDescription };
9
- export { setMetadata };
10
- export { getMetadata };
11
- export { setAnonymousTrackingEnabled };
12
- export { getPermissionsStatus };
13
- export { requestPermissions };
14
- export { getLocation };
15
- export { trackOnce };
16
- export { trackVerified };
17
- export { getVerifiedLocationToken };
18
- export { startTrackingEfficient };
19
- export { startTrackingResponsive };
20
- export { startTrackingContinuous };
21
- export { startTrackingCustom };
22
- export { startTrackingVerified };
23
- export { mockTracking };
24
- export { stopTracking };
25
- export { stopTrackingVerified };
26
- export { isTracking };
27
- export { getTrackingOptions };
28
- export { isUsingRemoteTrackingOptions };
29
- export { setForegroundServiceOptions };
30
- export { setNotificationOptions };
31
- export { getTripOptions };
32
- export { startTrip };
33
- export { completeTrip };
34
- export { cancelTrip };
35
- export { updateTrip };
36
- export { acceptEvent };
37
- export { rejectEvent };
38
- export { getContext };
39
- export { searchPlaces };
40
- export { searchGeofences };
41
- export { autocomplete };
42
- export { geocode };
43
- export { reverseGeocode };
44
- export { ipGeocode };
45
- export { validateAddress };
46
- export { getDistance };
47
- export { getMatrix };
48
- export { logConversion };
49
- export { sendEvent };
50
- export { on };
51
- export { off };
52
- export { nativeSdkVersion };
53
- export { rnSdkVersion };
54
- export { throwOnUnimplemented };
55
- export { setDeviceId };
56
- export { setDeviceType };
57
- export { setRequestHeaders };
58
- }
59
- declare function initialize(publishableKey: any): void;
60
- declare function setLogLevel(level: any): void;
61
- declare function setUserId(userId: any): void;
62
- declare function getUserId(): Promise<any>;
63
- declare function setDescription(description: any): void;
64
- declare function getDescription(): Promise<any>;
65
- declare function setMetadata(metadata: any): void;
66
- declare function getMetadata(): Promise<any>;
67
- declare function setAnonymousTrackingEnabled(): void;
68
- declare function getPermissionsStatus(): Promise<any>;
69
- declare function requestPermissions(background: any): Promise<any>;
70
- declare function getLocation(): Promise<any>;
71
- declare function trackOnce(options: any): Promise<any>;
72
- declare function trackVerified(): Promise<any>;
73
- declare function getVerifiedLocationToken(): Promise<any>;
74
- declare function startTrackingEfficient(): void;
75
- declare function startTrackingResponsive(): void;
76
- declare function startTrackingContinuous(): void;
77
- declare function startTrackingCustom(options: any): void;
78
- declare function startTrackingVerified(options: any): void;
79
- declare function mockTracking(options: any): void;
80
- declare function stopTracking(): void;
81
- declare function stopTrackingVerified(): void;
82
- declare function isTracking(): Promise<any>;
83
- declare function getTrackingOptions(): Promise<any>;
84
- declare function isUsingRemoteTrackingOptions(): Promise<any>;
85
- declare function setForegroundServiceOptions(options: any): void;
86
- declare function setNotificationOptions(options: any): void;
87
- declare function getTripOptions(): Promise<any>;
88
- declare function startTrip(options: any): Promise<any>;
89
- declare function completeTrip(): Promise<any>;
90
- declare function cancelTrip(): Promise<any>;
91
- declare function updateTrip(tripOptions: any): Promise<any>;
92
- declare function acceptEvent(eventId: any, verifiedPlaceId: any): void;
93
- declare function rejectEvent(eventId: any): void;
94
- declare function getContext(options: any): Promise<any>;
95
- declare function searchPlaces(options: any): Promise<any>;
96
- declare function searchGeofences(options: any): Promise<any>;
97
- declare function autocomplete(options: any): Promise<any>;
98
- declare function geocode(options: any): Promise<any>;
99
- declare function reverseGeocode(options: any): Promise<any>;
100
- declare function ipGeocode(): Promise<any>;
101
- declare function validateAddress(options: any): Promise<any>;
102
- declare function getDistance(options: any): Promise<any>;
103
- declare function getMatrix(options: any): Promise<any>;
104
- declare function logConversion(options: any): Promise<any>;
105
- declare function sendEvent(name: any, metadata: any): void;
106
- declare function on(event: any, callback: any): void;
107
- declare function off(event: any, callback: any): void;
108
- declare function nativeSdkVersion(): Promise<any>;
109
- declare function rnSdkVersion(): string;
110
- declare function throwOnUnimplemented(value: any): void;
111
- declare function setDeviceId(deviceId: any, installId: any): void;
112
- declare function setDeviceType(deviceType: any): void;
113
- declare function setRequestHeaders(headers: any): void;