pushwoosh-react-native-plugin 1.2.5 → 2.2.17

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 (66) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +135 -0
  2. package/.github/ISSUE_TEMPLATE/feature_request.yml +31 -0
  3. package/.github/ISSUE_TEMPLATE/question.yml +28 -0
  4. package/InlineInApp.js +71 -0
  5. package/README.md +35 -85
  6. package/docs/README.md +230 -11
  7. package/index.d.ts +91 -0
  8. package/index.js +536 -154
  9. package/package.json +12 -1
  10. package/pushwoosh-react-native-plugin.podspec +20 -0
  11. package/react-native.config.js +9 -0
  12. package/scripts/add_inbox_ios_resources.js +42 -0
  13. package/src/android/build.gradle +40 -10
  14. package/src/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  15. package/src/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  16. package/src/android/gradlew +160 -0
  17. package/src/android/gradlew.bat +90 -0
  18. package/src/android/src/main/AndroidManifest.xml +19 -54
  19. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/ConversionUtil.java +214 -148
  20. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/CustomFirebaseMessagingService.java +29 -0
  21. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/EventDispatcher.java +10 -2
  22. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/InboxUiStyleManager.java +162 -0
  23. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/InlineInAppManager.java +48 -0
  24. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshNotificationServiceExtension.java +44 -0
  25. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshPackage.java +4 -2
  26. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshPlugin.java +608 -297
  27. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/RCTInlineInAppView.java +75 -0
  28. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/internal/ReactNativePluginProvider.java +15 -0
  29. package/src/ios/PWAppDelegate.h +20 -0
  30. package/src/ios/PWGDPRManager.h +46 -0
  31. package/src/ios/PWIInboxStyle.h +122 -0
  32. package/src/ios/PWIInboxUI.h +39 -0
  33. package/src/ios/PWInAppManager.h +176 -0
  34. package/src/ios/PWInbox.h +147 -0
  35. package/src/ios/PWInlineInAppView.h +26 -0
  36. package/src/ios/PWLog.h +23 -0
  37. package/src/ios/PWMessaging.h +20 -0
  38. package/src/ios/PWNotificationExtensionManager.h +46 -0
  39. package/src/ios/PWRichMediaManager.h +123 -0
  40. package/src/ios/PWRichMediaStyle.h +122 -0
  41. package/src/ios/PushNotificationManager.h +234 -111
  42. package/src/ios/Pushwoosh.h +623 -0
  43. package/src/ios/PushwooshInboxBundle.bundle/Info.plist +0 -0
  44. package/src/ios/PushwooshInboxBundle.bundle/PWIInboxAttachmentViewController.nib +0 -0
  45. package/src/ios/PushwooshInboxBundle.bundle/PWIInboxMessageViewCell.nib +0 -0
  46. package/src/ios/PushwooshInboxBundle.bundle/PWIInboxViewController.nib +0 -0
  47. package/src/ios/PushwooshInboxBundle.bundle/errorMessage@2x.png +0 -0
  48. package/src/ios/PushwooshInboxBundle.bundle/inbox_icon.png +0 -0
  49. package/src/ios/PushwooshInboxBundle.bundle/noMessage@2x.png +0 -0
  50. package/src/ios/PushwooshInboxBundle.bundle/unread.png +0 -0
  51. package/src/ios/PushwooshInboxUI.h +19 -0
  52. package/src/ios/PushwooshPlugin/PWEventDispatcher.h +1 -1
  53. package/src/ios/PushwooshPlugin/PWInlineInAppManager.h +17 -0
  54. package/src/ios/PushwooshPlugin/PWInlineInAppManager.m +54 -0
  55. package/src/ios/PushwooshPlugin/Pushwoosh.h +19 -2
  56. package/src/ios/PushwooshPlugin/Pushwoosh.m +552 -75
  57. package/src/ios/PushwooshPlugin.xcodeproj/project.pbxproj +27 -6
  58. package/src/ios/libPushwoosh.a +0 -0
  59. package/src/ios/libPushwooshInboxUI.a +0 -0
  60. package/.npmignore +0 -3
  61. package/src/android/.npmignore +0 -1
  62. package/src/android/pushwooshplugin.iml +0 -145
  63. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/NotificationReceiver.java +0 -42
  64. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PostEventActivity.java +0 -45
  65. package/src/ios/Pushwoosh.a +0 -0
  66. package/src/ios/PushwooshPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
@@ -0,0 +1,54 @@
1
+ //
2
+ // PWInlineInAppManager.m
3
+ // pushwoosh-react-native-plugin
4
+ //
5
+ // Created by Fectum on 15/01/2020.
6
+ //
7
+
8
+ #import "PWInlineInAppManager.h"
9
+
10
+ @interface PWReactInlineInAppView: PWInlineInAppView
11
+
12
+ @property (nonatomic) RCTBubblingEventBlock onLoaded;
13
+ @property (nonatomic) RCTBubblingEventBlock onClosed;
14
+ @property (nonatomic) RCTBubblingEventBlock onSizeChanged;
15
+
16
+ @end
17
+
18
+ @implementation PWReactInlineInAppView
19
+ @end
20
+
21
+ @implementation PWInlineInAppManager
22
+
23
+ RCT_EXPORT_MODULE(PWInlineInAppView)
24
+
25
+ - (UIView *)view {
26
+ PWReactInlineInAppView *view = [PWReactInlineInAppView new];
27
+ view.delegate = self;
28
+ return view;
29
+ }
30
+
31
+ RCT_EXPORT_VIEW_PROPERTY(identifier, NSString)
32
+ RCT_EXPORT_VIEW_PROPERTY(onLoaded, RCTBubblingEventBlock)
33
+ RCT_EXPORT_VIEW_PROPERTY(onClosed, RCTBubblingEventBlock)
34
+ RCT_EXPORT_VIEW_PROPERTY(onSizeChanged, RCTBubblingEventBlock)
35
+
36
+ - (void)inlineInAppDidLoadInView:(PWReactInlineInAppView *)inAppView {
37
+ if (inAppView.onLoaded) {
38
+ inAppView.onLoaded(@{@"identifier": inAppView.identifier});
39
+ }
40
+ }
41
+
42
+ - (void)didCloseInlineInAppView:(PWReactInlineInAppView *)inAppView {
43
+ if (inAppView.onClosed) {
44
+ inAppView.onClosed(@{@"identifier": inAppView.identifier});
45
+ }
46
+ }
47
+
48
+ - (void)didChangeSizeOfInlineInAppView:(PWReactInlineInAppView *)inAppView {
49
+ if (inAppView.onSizeChanged) {
50
+ inAppView.onSizeChanged(@{@"width": @(inAppView.bounds.size.width), @"height": @(inAppView.bounds.size.height)});
51
+ }
52
+ }
53
+
54
+ @end
@@ -6,9 +6,26 @@
6
6
 
7
7
  #import <Foundation/Foundation.h>
8
8
 
9
- #import "RCTBridgeModule.h"
9
+ #import <React/RCTBridgeModule.h>
10
+ #import <React/RCTEventEmitter.h>
11
+ #import <Pushwoosh/Pushwoosh.h>
12
+
13
+ #if __has_include(<Pushwoosh/PushNotificationManager.h>)
14
+ #import <Pushwoosh/PushNotificationManager.h>
15
+ #import <Pushwoosh/PWInAppManager.h>
16
+ #import <PushwooshInboxUI/PushwooshInboxUI.h>
17
+ #import <Pushwoosh/PWGDPRManager.h>
18
+ #import <Pushwoosh/PWInlineInAppView.h>
19
+ #import <Pushwoosh/PWInbox.h>
20
+ #else
10
21
  #import "PushNotificationManager.h"
22
+ #import "PWInAppManager.h"
23
+ #import "PushwooshInboxUI.h"
24
+ #import "PWGDPRManager.h"
25
+ #import "PWInlineInAppView.h"
26
+ #import "PWInbox.h"
27
+ #endif
11
28
 
12
- @interface Pushwoosh: NSObject<RCTBridgeModule,PushNotificationDelegate>
29
+ @interface PushwooshPlugin: RCTEventEmitter<RCTBridgeModule,PushNotificationDelegate>
13
30
 
14
31
  @end