react-native-share 7.3.8 → 7.4.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.
- package/LICENSE +1 -1
- package/android/src/main/java/cl/json/social/ShareIntent.java +4 -0
- package/ios/EmailShare.h +1 -31
- package/ios/FacebookStories.h +0 -30
- package/ios/FacebookStories.m +0 -6
- package/ios/GenericShare.h +0 -30
- package/ios/GooglePlusShare.h +0 -30
- package/ios/InstagramShare.h +0 -30
- package/ios/InstagramStories.h +0 -30
- package/ios/InstagramStories.m +0 -6
- package/ios/RNShare.h +0 -6
- package/ios/RNShare.m +7 -32
- package/ios/RNShareActivityItemSource.m +0 -12
- package/ios/TelegramShare.h +0 -30
- package/ios/WhatsAppShare.h +0 -30
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/types.ts +1 -0
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2015 Esteban Fuentealba
|
|
3
|
+
Copyright (c) 2015 Esteban Fuentealba 🇨🇱, Mateus Andrade 🇧🇷, Mike Hardy 🇪🇨, João Marins 🇧🇷
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -98,6 +98,10 @@ public abstract class ShareIntent {
|
|
|
98
98
|
public void open(ReadableMap options) throws ActivityNotFoundException {
|
|
99
99
|
this.options = options;
|
|
100
100
|
|
|
101
|
+
if (ShareIntent.hasValidKey("isNewTask", options) && options.getBoolean("isNewTask")) {
|
|
102
|
+
this.getIntent().addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
|
103
|
+
}
|
|
104
|
+
|
|
101
105
|
if (ShareIntent.hasValidKey("subject", options)) {
|
|
102
106
|
this.getIntent().putExtra(Intent.EXTRA_SUBJECT, options.getString("subject"));
|
|
103
107
|
}
|
package/ios/EmailShare.h
CHANGED
|
@@ -8,46 +8,16 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
#import <UIKit/UIKit.h>
|
|
11
|
-
// import
|
|
12
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
11
|
+
// import RCTConvertttt
|
|
13
12
|
#import <React/RCTConvert.h>
|
|
14
|
-
#elif __has_include("RCTConvert.h")
|
|
15
|
-
#import "RCTConvert.h"
|
|
16
|
-
#else
|
|
17
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
18
|
-
#endif
|
|
19
13
|
// import RCTBridge
|
|
20
|
-
#if __has_include(<React/RCTBridge.h>)
|
|
21
14
|
#import <React/RCTBridge.h>
|
|
22
|
-
#elif __has_include("RCTBridge.h")
|
|
23
|
-
#import "RCTBridge.h"
|
|
24
|
-
#else
|
|
25
|
-
#import "React/RCTBridge.h" // Required when used as a Pod in a Swift project
|
|
26
|
-
#endif
|
|
27
15
|
// import RCTUIManager
|
|
28
|
-
#if __has_include(<React/RCTUIManager.h>)
|
|
29
16
|
#import <React/RCTUIManager.h>
|
|
30
|
-
#elif __has_include("RCTUIManager.h")
|
|
31
|
-
#import "RCTUIManager.h"
|
|
32
|
-
#else
|
|
33
|
-
#import "React/RCTUIManager.h" // Required when used as a Pod in a Swift project
|
|
34
|
-
#endif
|
|
35
17
|
// import RCTLog
|
|
36
|
-
#if __has_include(<React/RCTLog.h>)
|
|
37
18
|
#import <React/RCTLog.h>
|
|
38
|
-
#elif __has_include("RCTLog.h")
|
|
39
|
-
#import "RCTLog.h"
|
|
40
|
-
#else
|
|
41
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
42
|
-
#endif
|
|
43
19
|
// import RCTUtils
|
|
44
|
-
#if __has_include(<React/RCTUtils.h>)
|
|
45
20
|
#import <React/RCTUtils.h>
|
|
46
|
-
#elif __has_include("RCTUtils.h")
|
|
47
|
-
#import "RCTUtils.h"
|
|
48
|
-
#else
|
|
49
|
-
#import "React/RCTUtils.h" // Required when used as a Pod in a Swift project
|
|
50
|
-
#endif
|
|
51
21
|
#import <MessageUI/MessageUI.h>
|
|
52
22
|
@interface EmailShare : NSObject <MFMailComposeViewControllerDelegate>
|
|
53
23
|
|
package/ios/FacebookStories.h
CHANGED
|
@@ -9,45 +9,15 @@
|
|
|
9
9
|
|
|
10
10
|
#import <UIKit/UIKit.h>
|
|
11
11
|
// import RCTConvert
|
|
12
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
13
12
|
#import <React/RCTConvert.h>
|
|
14
|
-
#elif __has_include("RCTConvert.h")
|
|
15
|
-
#import "RCTConvert.h"
|
|
16
|
-
#else
|
|
17
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
18
|
-
#endif
|
|
19
13
|
// import RCTBridge
|
|
20
|
-
#if __has_include(<React/RCTBridge.h>)
|
|
21
14
|
#import <React/RCTBridge.h>
|
|
22
|
-
#elif __has_include("RCTBridge.h")
|
|
23
|
-
#import "RCTBridge.h"
|
|
24
|
-
#else
|
|
25
|
-
#import "React/RCTBridge.h" // Required when used as a Pod in a Swift project
|
|
26
|
-
#endif
|
|
27
15
|
// import RCTUIManager
|
|
28
|
-
#if __has_include(<React/RCTUIManager.h>)
|
|
29
16
|
#import <React/RCTUIManager.h>
|
|
30
|
-
#elif __has_include("RCTUIManager.h")
|
|
31
|
-
#import "RCTUIManager.h"
|
|
32
|
-
#else
|
|
33
|
-
#import "React/RCTUIManager.h" // Required when used as a Pod in a Swift project
|
|
34
|
-
#endif
|
|
35
17
|
// import RCTLog
|
|
36
|
-
#if __has_include(<React/RCTLog.h>)
|
|
37
18
|
#import <React/RCTLog.h>
|
|
38
|
-
#elif __has_include("RCTLog.h")
|
|
39
|
-
#import "RCTLog.h"
|
|
40
|
-
#else
|
|
41
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
42
|
-
#endif
|
|
43
19
|
// import RCTUtils
|
|
44
|
-
#if __has_include(<React/RCTUtils.h>)
|
|
45
20
|
#import <React/RCTUtils.h>
|
|
46
|
-
#elif __has_include("RCTUtils.h")
|
|
47
|
-
#import "RCTUtils.h"
|
|
48
|
-
#else
|
|
49
|
-
#import "React/RCTUtils.h" // Required when used as a Pod in a Swift project
|
|
50
|
-
#endif
|
|
51
21
|
@interface FacebookStories : NSObject <RCTBridgeModule>
|
|
52
22
|
|
|
53
23
|
- (void *) shareSingle:(NSDictionary *)options failureCallback:(RCTResponseErrorBlock)failureCallback successCallback:(RCTResponseSenderBlock)successCallback;
|
package/ios/FacebookStories.m
CHANGED
|
@@ -8,13 +8,7 @@
|
|
|
8
8
|
//
|
|
9
9
|
|
|
10
10
|
// import RCTLog
|
|
11
|
-
#if __has_include(<React/RCTLog.h>)
|
|
12
11
|
#import <React/RCTLog.h>
|
|
13
|
-
#elif __has_include("RCTLog.h")
|
|
14
|
-
#import "RCTLog.h"
|
|
15
|
-
#else
|
|
16
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
17
|
-
#endif
|
|
18
12
|
|
|
19
13
|
#import "FacebookStories.h"
|
|
20
14
|
|
package/ios/GenericShare.h
CHANGED
|
@@ -10,45 +10,15 @@
|
|
|
10
10
|
#import <Social/Social.h>
|
|
11
11
|
#import <UIKit/UIKit.h>
|
|
12
12
|
// import RCTConvert
|
|
13
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
14
13
|
#import <React/RCTConvert.h>
|
|
15
|
-
#elif __has_include("RCTConvert.h")
|
|
16
|
-
#import "RCTConvert.h"
|
|
17
|
-
#else
|
|
18
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
19
|
-
#endif
|
|
20
14
|
// import RCTBridge
|
|
21
|
-
#if __has_include(<React/RCTBridge.h>)
|
|
22
15
|
#import <React/RCTBridge.h>
|
|
23
|
-
#elif __has_include("RCTBridge.h")
|
|
24
|
-
#import "RCTBridge.h"
|
|
25
|
-
#else
|
|
26
|
-
#import "React/RCTBridge.h" // Required when used as a Pod in a Swift project
|
|
27
|
-
#endif
|
|
28
16
|
// import RCTUIManager
|
|
29
|
-
#if __has_include(<React/RCTUIManager.h>)
|
|
30
17
|
#import <React/RCTUIManager.h>
|
|
31
|
-
#elif __has_include("RCTUIManager.h")
|
|
32
|
-
#import "RCTUIManager.h"
|
|
33
|
-
#else
|
|
34
|
-
#import "React/RCTUIManager.h" // Required when used as a Pod in a Swift project
|
|
35
|
-
#endif
|
|
36
18
|
// import RCTLog
|
|
37
|
-
#if __has_include(<React/RCTLog.h>)
|
|
38
19
|
#import <React/RCTLog.h>
|
|
39
|
-
#elif __has_include("RCTLog.h")
|
|
40
|
-
#import "RCTLog.h"
|
|
41
|
-
#else
|
|
42
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
43
|
-
#endif
|
|
44
20
|
// import RCTUtils
|
|
45
|
-
#if __has_include(<React/RCTUtils.h>)
|
|
46
21
|
#import <React/RCTUtils.h>
|
|
47
|
-
#elif __has_include("RCTUtils.h")
|
|
48
|
-
#import "RCTUtils.h"
|
|
49
|
-
#else
|
|
50
|
-
#import "React/RCTUtils.h" // Required when used as a Pod in a Swift project
|
|
51
|
-
#endif
|
|
52
22
|
@interface GenericShare : NSObject <RCTBridgeModule>
|
|
53
23
|
|
|
54
24
|
- (void) shareSingle:(NSDictionary *)options failureCallback:(RCTResponseErrorBlock)failureCallback successCallback:(RCTResponseSenderBlock)successCallback serviceType:(NSString*)serviceType
|
package/ios/GooglePlusShare.h
CHANGED
|
@@ -7,45 +7,15 @@
|
|
|
7
7
|
//
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
9
|
// import RCTConvert
|
|
10
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
11
10
|
#import <React/RCTConvert.h>
|
|
12
|
-
#elif __has_include("RCTConvert.h")
|
|
13
|
-
#import "RCTConvert.h"
|
|
14
|
-
#else
|
|
15
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
16
|
-
#endif
|
|
17
11
|
// import RCTBridge
|
|
18
|
-
#if __has_include(<React/RCTBridge.h>)
|
|
19
12
|
#import <React/RCTBridge.h>
|
|
20
|
-
#elif __has_include("RCTBridge.h")
|
|
21
|
-
#import "RCTBridge.h"
|
|
22
|
-
#else
|
|
23
|
-
#import "React/RCTBridge.h" // Required when used as a Pod in a Swift project
|
|
24
|
-
#endif
|
|
25
13
|
// import RCTUIManager
|
|
26
|
-
#if __has_include(<React/RCTUIManager.h>)
|
|
27
14
|
#import <React/RCTUIManager.h>
|
|
28
|
-
#elif __has_include("RCTUIManager.h")
|
|
29
|
-
#import "RCTUIManager.h"
|
|
30
|
-
#else
|
|
31
|
-
#import "React/RCTUIManager.h" // Required when used as a Pod in a Swift project
|
|
32
|
-
#endif
|
|
33
15
|
// import RCTLog
|
|
34
|
-
#if __has_include(<React/RCTLog.h>)
|
|
35
16
|
#import <React/RCTLog.h>
|
|
36
|
-
#elif __has_include("RCTLog.h")
|
|
37
|
-
#import "RCTLog.h"
|
|
38
|
-
#else
|
|
39
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
40
|
-
#endif
|
|
41
17
|
// import RCTUtils
|
|
42
|
-
#if __has_include(<React/RCTUtils.h>)
|
|
43
18
|
#import <React/RCTUtils.h>
|
|
44
|
-
#elif __has_include("RCTUtils.h")
|
|
45
|
-
#import "RCTUtils.h"
|
|
46
|
-
#else
|
|
47
|
-
#import "React/RCTUtils.h" // Required when used as a Pod in a Swift project
|
|
48
|
-
#endif
|
|
49
19
|
@interface GooglePlusShare : NSObject <RCTBridgeModule>
|
|
50
20
|
|
|
51
21
|
- (void) shareSingle:(NSDictionary *)options failureCallback:(RCTResponseErrorBlock)failureCallback successCallback:(RCTResponseSenderBlock)successCallback;
|
package/ios/InstagramShare.h
CHANGED
|
@@ -7,45 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
9
|
// import RCTConvert
|
|
10
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
11
10
|
#import <React/RCTConvert.h>
|
|
12
|
-
#elif __has_include("RCTConvert.h")
|
|
13
|
-
#import "RCTConvert.h"
|
|
14
|
-
#else
|
|
15
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
16
|
-
#endif
|
|
17
11
|
// import RCTBridge
|
|
18
|
-
#if __has_include(<React/RCTBridge.h>)
|
|
19
12
|
#import <React/RCTBridge.h>
|
|
20
|
-
#elif __has_include("RCTBridge.h")
|
|
21
|
-
#import "RCTBridge.h"
|
|
22
|
-
#else
|
|
23
|
-
#import "React/RCTBridge.h" // Required when used as a Pod in a Swift project
|
|
24
|
-
#endif
|
|
25
13
|
// import RCTUIManager
|
|
26
|
-
#if __has_include(<React/RCTUIManager.h>)
|
|
27
14
|
#import <React/RCTUIManager.h>
|
|
28
|
-
#elif __has_include("RCTUIManager.h")
|
|
29
|
-
#import "RCTUIManager.h"
|
|
30
|
-
#else
|
|
31
|
-
#import "React/RCTUIManager.h" // Required when used as a Pod in a Swift project
|
|
32
|
-
#endif
|
|
33
15
|
// import RCTLog
|
|
34
|
-
#if __has_include(<React/RCTLog.h>)
|
|
35
16
|
#import <React/RCTLog.h>
|
|
36
|
-
#elif __has_include("RCTLog.h")
|
|
37
|
-
#import "RCTLog.h"
|
|
38
|
-
#else
|
|
39
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
40
|
-
#endif
|
|
41
17
|
// import RCTUtils
|
|
42
|
-
#if __has_include(<React/RCTUtils.h>)
|
|
43
18
|
#import <React/RCTUtils.h>
|
|
44
|
-
#elif __has_include("RCTUtils.h")
|
|
45
|
-
#import "RCTUtils.h"
|
|
46
|
-
#else
|
|
47
|
-
#import "React/RCTUtils.h" // Required when used as a Pod in a Swift project
|
|
48
|
-
#endif
|
|
49
19
|
@interface InstagramShare : NSObject <RCTBridgeModule>
|
|
50
20
|
|
|
51
21
|
- (void) shareSingle:(NSDictionary *)options failureCallback:(RCTResponseErrorBlock)failureCallback successCallback:(RCTResponseSenderBlock)successCallback;
|
package/ios/InstagramStories.h
CHANGED
|
@@ -8,45 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
#import <UIKit/UIKit.h>
|
|
10
10
|
// import RCTConvert
|
|
11
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
12
11
|
#import <React/RCTConvert.h>
|
|
13
|
-
#elif __has_include("RCTConvert.h")
|
|
14
|
-
#import "RCTConvert.h"
|
|
15
|
-
#else
|
|
16
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
17
|
-
#endif
|
|
18
12
|
// import RCTBridge
|
|
19
|
-
#if __has_include(<React/RCTBridge.h>)
|
|
20
13
|
#import <React/RCTBridge.h>
|
|
21
|
-
#elif __has_include("RCTBridge.h")
|
|
22
|
-
#import "RCTBridge.h"
|
|
23
|
-
#else
|
|
24
|
-
#import "React/RCTBridge.h" // Required when used as a Pod in a Swift project
|
|
25
|
-
#endif
|
|
26
14
|
// import RCTUIManager
|
|
27
|
-
#if __has_include(<React/RCTUIManager.h>)
|
|
28
15
|
#import <React/RCTUIManager.h>
|
|
29
|
-
#elif __has_include("RCTUIManager.h")
|
|
30
|
-
#import "RCTUIManager.h"
|
|
31
|
-
#else
|
|
32
|
-
#import "React/RCTUIManager.h" // Required when used as a Pod in a Swift project
|
|
33
|
-
#endif
|
|
34
16
|
// import RCTLog
|
|
35
|
-
#if __has_include(<React/RCTLog.h>)
|
|
36
17
|
#import <React/RCTLog.h>
|
|
37
|
-
#elif __has_include("RCTLog.h")
|
|
38
|
-
#import "RCTLog.h"
|
|
39
|
-
#else
|
|
40
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
41
|
-
#endif
|
|
42
18
|
// import RCTUtils
|
|
43
|
-
#if __has_include(<React/RCTUtils.h>)
|
|
44
19
|
#import <React/RCTUtils.h>
|
|
45
|
-
#elif __has_include("RCTUtils.h")
|
|
46
|
-
#import "RCTUtils.h"
|
|
47
|
-
#else
|
|
48
|
-
#import "React/RCTUtils.h" // Required when used as a Pod in a Swift project
|
|
49
|
-
#endif
|
|
50
20
|
@interface InstagramStories : NSObject <RCTBridgeModule>
|
|
51
21
|
|
|
52
22
|
- (void *) shareSingle:(NSDictionary *)options failureCallback:(RCTResponseErrorBlock)failureCallback successCallback:(RCTResponseSenderBlock)successCallback;
|
package/ios/InstagramStories.m
CHANGED
|
@@ -7,13 +7,7 @@
|
|
|
7
7
|
//
|
|
8
8
|
|
|
9
9
|
// import RCTLog
|
|
10
|
-
#if __has_include(<React/RCTLog.h>)
|
|
11
10
|
#import <React/RCTLog.h>
|
|
12
|
-
#elif __has_include("RCTLog.h")
|
|
13
|
-
#import "RCTLog.h"
|
|
14
|
-
#else
|
|
15
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
16
|
-
#endif
|
|
17
11
|
|
|
18
12
|
#import "InstagramStories.h"
|
|
19
13
|
|
package/ios/RNShare.h
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
@import UIKit;
|
|
2
2
|
// import RCTBridgeModule
|
|
3
|
-
#if __has_include(<React/RCTBridgeModule.h>)
|
|
4
3
|
#import <React/RCTBridgeModule.h>
|
|
5
|
-
#elif __has_include("RCTBridgeModule.h")
|
|
6
|
-
#import "RCTBridgeModule.h"
|
|
7
|
-
#else
|
|
8
|
-
#import "React/RCTBridgeModule.h" // Required when used as a Pod in a Swift project
|
|
9
|
-
#endif
|
|
10
4
|
|
|
11
5
|
@interface RNShare : NSObject <RCTBridgeModule, UIDocumentPickerDelegate>
|
|
12
6
|
|
package/ios/RNShare.m
CHANGED
|
@@ -1,45 +1,15 @@
|
|
|
1
1
|
#import <MessageUI/MessageUI.h>
|
|
2
2
|
#import "RNShare.h"
|
|
3
3
|
// import RCTConvert
|
|
4
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
5
4
|
#import <React/RCTConvert.h>
|
|
6
|
-
#elif __has_include("RCTConvert.h")
|
|
7
|
-
#import "RCTConvert.h"
|
|
8
|
-
#else
|
|
9
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
10
|
-
#endif
|
|
11
5
|
// import RCTLog
|
|
12
|
-
#if __has_include(<React/RCTLog.h>)
|
|
13
6
|
#import <React/RCTLog.h>
|
|
14
|
-
#elif __has_include("RCTLog.h")
|
|
15
|
-
#import "RCTLog.h"
|
|
16
|
-
#else
|
|
17
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
18
|
-
#endif
|
|
19
7
|
// import RCTUtils
|
|
20
|
-
#if __has_include(<React/RCTUtils.h>)
|
|
21
8
|
#import <React/RCTUtils.h>
|
|
22
|
-
#elif __has_include("RCTUtils.h")
|
|
23
|
-
#import "RCTUtils.h"
|
|
24
|
-
#else
|
|
25
|
-
#import "React/RCTUtils.h" // Required when used as a Pod in a Swift project
|
|
26
|
-
#endif
|
|
27
9
|
// import RCTBridge
|
|
28
|
-
#if __has_include(<React/RCTBridge.h>)
|
|
29
10
|
#import <React/RCTBridge.h>
|
|
30
|
-
#elif __has_include("RCTBridge.h")
|
|
31
|
-
#import "RCTBridge.h"
|
|
32
|
-
#else
|
|
33
|
-
#import "React/RCTBridge.h" // Required when used as a Pod in a Swift project
|
|
34
|
-
#endif
|
|
35
11
|
// import RCTBridge
|
|
36
|
-
#if __has_include(<React/RCTUIManager.h>)
|
|
37
12
|
#import <React/RCTUIManager.h>
|
|
38
|
-
#elif __has_include("RCTUIManager.h")
|
|
39
|
-
#import "RCTUIManager.h"
|
|
40
|
-
#else
|
|
41
|
-
#import "React/RCTUIManager.h" // Required when used as a Pod in a Swift project
|
|
42
|
-
#endif
|
|
43
13
|
#import "GenericShare.h"
|
|
44
14
|
#import "WhatsAppShare.h"
|
|
45
15
|
#import "InstagramShare.h"
|
|
@@ -246,10 +216,15 @@ RCT_EXPORT_METHOD(open:(NSDictionary *)options
|
|
|
246
216
|
RCTLogError(@"No `urls` to save in Files");
|
|
247
217
|
return;
|
|
248
218
|
}
|
|
249
|
-
if (@available(iOS 11.0, *)) {
|
|
219
|
+
if (@available(iOS 11.0, macCatalyst 13.1, *)) {
|
|
250
220
|
resolveBlock = successCallback;
|
|
251
221
|
rejectBlock = failureCallback;
|
|
252
|
-
UIDocumentPickerViewController *documentPicker =
|
|
222
|
+
UIDocumentPickerViewController *documentPicker = nil;
|
|
223
|
+
if (@available(iOS 15.0, macCatalyst 15.0, *)) {
|
|
224
|
+
documentPicker = [[UIDocumentPickerViewController alloc] initForExportingURLs:urls asCopy:YES];
|
|
225
|
+
} else {
|
|
226
|
+
documentPicker = [[UIDocumentPickerViewController alloc] initWithURLs:urls inMode:UIDocumentPickerModeExportToService];
|
|
227
|
+
}
|
|
253
228
|
[documentPicker setDelegate:self];
|
|
254
229
|
[controller presentViewController:documentPicker animated:YES completion:nil];
|
|
255
230
|
return;
|
|
@@ -5,22 +5,10 @@
|
|
|
5
5
|
#endif
|
|
6
6
|
|
|
7
7
|
// import RCTBridgeModule
|
|
8
|
-
#if __has_include(<React/RCTBridgeModule.h>)
|
|
9
8
|
#import <React/RCTBridgeModule.h>
|
|
10
|
-
#elif __has_include("RCTBridgeModule.h")
|
|
11
|
-
#import "RCTBridgeModule.h"
|
|
12
|
-
#else
|
|
13
|
-
#import "React/RCTBridgeModule.h" // Required when used as a Pod in a Swift project
|
|
14
|
-
#endif
|
|
15
9
|
|
|
16
10
|
// import RCTConvert
|
|
17
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
18
11
|
#import <React/RCTConvert.h>
|
|
19
|
-
#elif __has_include("RCTConvert.h")
|
|
20
|
-
#import "RCTConvert.h"
|
|
21
|
-
#else
|
|
22
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
23
|
-
#endif
|
|
24
12
|
|
|
25
13
|
@implementation RNShareActivityItemSource {
|
|
26
14
|
id placeholderItem;
|
package/ios/TelegramShare.h
CHANGED
|
@@ -7,45 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
9
|
// import RCTConvert
|
|
10
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
11
10
|
#import <React/RCTConvert.h>
|
|
12
|
-
#elif __has_include("RCTConvert.h")
|
|
13
|
-
#import "RCTConvert.h"
|
|
14
|
-
#else
|
|
15
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
16
|
-
#endif
|
|
17
11
|
// import RCTBridge
|
|
18
|
-
#if __has_include(<React/RCTBridge.h>)
|
|
19
12
|
#import <React/RCTBridge.h>
|
|
20
|
-
#elif __has_include("RCTBridge.h")
|
|
21
|
-
#import "RCTBridge.h"
|
|
22
|
-
#else
|
|
23
|
-
#import "React/RCTBridge.h" // Required when used as a Pod in a Swift project
|
|
24
|
-
#endif
|
|
25
13
|
// import RCTUIManager
|
|
26
|
-
#if __has_include(<React/RCTUIManager.h>)
|
|
27
14
|
#import <React/RCTUIManager.h>
|
|
28
|
-
#elif __has_include("RCTUIManager.h")
|
|
29
|
-
#import "RCTUIManager.h"
|
|
30
|
-
#else
|
|
31
|
-
#import "React/RCTUIManager.h" // Required when used as a Pod in a Swift project
|
|
32
|
-
#endif
|
|
33
15
|
// import RCTLog
|
|
34
|
-
#if __has_include(<React/RCTLog.h>)
|
|
35
16
|
#import <React/RCTLog.h>
|
|
36
|
-
#elif __has_include("RCTLog.h")
|
|
37
|
-
#import "RCTLog.h"
|
|
38
|
-
#else
|
|
39
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
40
|
-
#endif
|
|
41
17
|
// import RCTUtils
|
|
42
|
-
#if __has_include(<React/RCTUtils.h>)
|
|
43
18
|
#import <React/RCTUtils.h>
|
|
44
|
-
#elif __has_include("RCTUtils.h")
|
|
45
|
-
#import "RCTUtils.h"
|
|
46
|
-
#else
|
|
47
|
-
#import "React/RCTUtils.h" // Required when used as a Pod in a Swift project
|
|
48
|
-
#endif
|
|
49
19
|
@interface TelegramShare : NSObject <RCTBridgeModule>
|
|
50
20
|
|
|
51
21
|
- (void) shareSingle:(NSDictionary *)options failureCallback:(RCTResponseErrorBlock)failureCallback successCallback:(RCTResponseSenderBlock)successCallback;
|
package/ios/WhatsAppShare.h
CHANGED
|
@@ -8,45 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
#import <UIKit/UIKit.h>
|
|
10
10
|
// import RCTConvert
|
|
11
|
-
#if __has_include(<React/RCTConvert.h>)
|
|
12
11
|
#import <React/RCTConvert.h>
|
|
13
|
-
#elif __has_include("RCTConvert.h")
|
|
14
|
-
#import "RCTConvert.h"
|
|
15
|
-
#else
|
|
16
|
-
#import "React/RCTConvert.h" // Required when used as a Pod in a Swift project
|
|
17
|
-
#endif
|
|
18
12
|
// import RCTBridge
|
|
19
|
-
#if __has_include(<React/RCTBridge.h>)
|
|
20
13
|
#import <React/RCTBridge.h>
|
|
21
|
-
#elif __has_include("RCTBridge.h")
|
|
22
|
-
#import "RCTBridge.h"
|
|
23
|
-
#else
|
|
24
|
-
#import "React/RCTBridge.h" // Required when used as a Pod in a Swift project
|
|
25
|
-
#endif
|
|
26
14
|
// import RCTUIManager
|
|
27
|
-
#if __has_include(<React/RCTUIManager.h>)
|
|
28
15
|
#import <React/RCTUIManager.h>
|
|
29
|
-
#elif __has_include("RCTUIManager.h")
|
|
30
|
-
#import "RCTUIManager.h"
|
|
31
|
-
#else
|
|
32
|
-
#import "React/RCTUIManager.h" // Required when used as a Pod in a Swift project
|
|
33
|
-
#endif
|
|
34
16
|
// import RCTLog
|
|
35
|
-
#if __has_include(<React/RCTLog.h>)
|
|
36
17
|
#import <React/RCTLog.h>
|
|
37
|
-
#elif __has_include("RCTLog.h")
|
|
38
|
-
#import "RCTLog.h"
|
|
39
|
-
#else
|
|
40
|
-
#import "React/RCTLog.h" // Required when used as a Pod in a Swift project
|
|
41
|
-
#endif
|
|
42
18
|
// import RCTUtils
|
|
43
|
-
#if __has_include(<React/RCTUtils.h>)
|
|
44
19
|
#import <React/RCTUtils.h>
|
|
45
|
-
#elif __has_include("RCTUtils.h")
|
|
46
|
-
#import "RCTUtils.h"
|
|
47
|
-
#else
|
|
48
|
-
#import "React/RCTUtils.h" // Required when used as a Pod in a Swift project
|
|
49
|
-
#endif
|
|
50
20
|
@interface WhatsAppShare : NSObject <RCTBridgeModule,UIDocumentInteractionControllerDelegate>
|
|
51
21
|
|
|
52
22
|
- (void) shareSingle:(NSDictionary *)options failureCallback:(RCTResponseErrorBlock)failureCallback successCallback:(RCTResponseSenderBlock)successCallback;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["types.ts"],"names":["Social","ShareAsset"],"mappings":";;;;;;IAAYA,M;;;WAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;GAAAA,M,sBAAAA,M;;IAmBAC,U;;;WAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;GAAAA,U,0BAAAA,U","sourcesContent":["export enum Social {\n Facebook = 'facebook',\n FacebookStories = 'facebookstories',\n Pagesmanager = 'pagesmanager',\n Twitter = 'twitter',\n Whatsapp = 'whatsapp',\n Whatsappbusiness = 'whatsappbusiness',\n Instagram = 'instagram',\n InstagramStories = 'instagramstories',\n Googleplus = 'googleplus',\n Email = 'email',\n Pinterest = 'pinterest',\n Linkedin = 'linkedin',\n Sms = 'sms',\n Telegram = 'telegram',\n Snapchat = 'snapchat',\n Messenger = 'messenger',\n}\n\nexport enum ShareAsset {\n BackgroundImage = 'shareBackgroundImage',\n BackgroundVideo = 'shareBackgroundVideo',\n StickerImage = 'shareStickerImage',\n BackgroundAndStickerImage = 'shareBackgroundAndStickerImage',\n}\n\nexport interface LinkMetadata {\n originalUrl?: string;\n url?: string;\n title?: string;\n icon?: string;\n image?: string;\n remoteVideoUrl?: string;\n video?: string;\n}\n\nexport interface ActivityItem {\n type: 'text' | 'url';\n content: string;\n}\n\nexport interface ActivityItemSource {\n placeholderItem: ActivityItem;\n item: { [key in ActivityType]?: ActivityItem | null | undefined };\n subject?: { [key in ActivityType]?: string };\n dataTypeIdentifier?: { [key in ActivityType]?: string };\n thumbnailImage?: { [key in ActivityType]?: string };\n linkMetadata?: LinkMetadata;\n}\n\ninterface BaseShareSingleOptions {\n url?: string;\n type?: string;\n filename?: string;\n message?: string;\n title?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n social: Exclude<Social, Social.FacebookStories | Social.InstagramStories>;\n forceDialog?: boolean;\n}\n\ninterface BaseSocialStoriesShareSingleOptions extends Omit<BaseShareSingleOptions, 'social'> {\n backgroundImage?: string;\n stickerImage?: string;\n backgroundBottomColor?: string;\n backgroundTopColor?: string;\n attributionURL?: string;\n backgroundVideo?: string;\n}\n\nexport interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.InstagramStories;\n}\n\nexport interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.FacebookStories;\n method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;\n appId: string;\n}\n\nexport type ShareSingleOptions =\n | BaseShareSingleOptions\n | InstagramStoriesShareSingleOptions\n | FacebookStoriesShareSingleOptions;\n\nexport interface ShareOptions {\n message?: string;\n title?: string;\n url?: string;\n urls?: string[];\n type?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n excludedActivityTypes?: ActivityType[];\n failOnCancel?: boolean;\n showAppsToView?: boolean;\n filename?: string;\n filenames?: string[];\n saveToFiles?: boolean;\n activityItemSources?: ActivityItemSource[];\n}\n\nexport type ActivityType =\n | 'default'\n | 'addToReadingList'\n | 'airDrop'\n | 'assignToContact'\n | 'copyToPasteBoard'\n | 'mail'\n | 'message'\n | 'openInIBooks' // iOS 9 or later\n | 'postToFacebook'\n | 'postToFlickr'\n | 'postToTencentWeibo'\n | 'postToTwitter'\n | 'postToVimeo'\n | 'postToWeibo'\n | 'print'\n | 'saveToCameraRoll'\n | 'markupAsPDF'; // iOS 11 or late\n\nexport interface ShareSingleResult {\n message: string;\n success: boolean;\n}\n\nexport interface ShareOpenResult extends ShareSingleResult {\n dismissedAction?: boolean;\n}\nexport interface IsPackageInstalledResult {\n message: string;\n isInstalled: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["types.ts"],"names":["Social","ShareAsset"],"mappings":";;;;;;IAAYA,M;;;WAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;GAAAA,M,sBAAAA,M;;IAmBAC,U;;;WAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;GAAAA,U,0BAAAA,U","sourcesContent":["export enum Social {\n Facebook = 'facebook',\n FacebookStories = 'facebookstories',\n Pagesmanager = 'pagesmanager',\n Twitter = 'twitter',\n Whatsapp = 'whatsapp',\n Whatsappbusiness = 'whatsappbusiness',\n Instagram = 'instagram',\n InstagramStories = 'instagramstories',\n Googleplus = 'googleplus',\n Email = 'email',\n Pinterest = 'pinterest',\n Linkedin = 'linkedin',\n Sms = 'sms',\n Telegram = 'telegram',\n Snapchat = 'snapchat',\n Messenger = 'messenger',\n}\n\nexport enum ShareAsset {\n BackgroundImage = 'shareBackgroundImage',\n BackgroundVideo = 'shareBackgroundVideo',\n StickerImage = 'shareStickerImage',\n BackgroundAndStickerImage = 'shareBackgroundAndStickerImage',\n}\n\nexport interface LinkMetadata {\n originalUrl?: string;\n url?: string;\n title?: string;\n icon?: string;\n image?: string;\n remoteVideoUrl?: string;\n video?: string;\n}\n\nexport interface ActivityItem {\n type: 'text' | 'url';\n content: string;\n}\n\nexport interface ActivityItemSource {\n placeholderItem: ActivityItem;\n item: { [key in ActivityType]?: ActivityItem | null | undefined };\n subject?: { [key in ActivityType]?: string };\n dataTypeIdentifier?: { [key in ActivityType]?: string };\n thumbnailImage?: { [key in ActivityType]?: string };\n linkMetadata?: LinkMetadata;\n}\n\ninterface BaseShareSingleOptions {\n url?: string;\n type?: string;\n filename?: string;\n message?: string;\n title?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n social: Exclude<Social, Social.FacebookStories | Social.InstagramStories>;\n forceDialog?: boolean;\n}\n\ninterface BaseSocialStoriesShareSingleOptions extends Omit<BaseShareSingleOptions, 'social'> {\n backgroundImage?: string;\n stickerImage?: string;\n backgroundBottomColor?: string;\n backgroundTopColor?: string;\n attributionURL?: string;\n backgroundVideo?: string;\n}\n\nexport interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.InstagramStories;\n}\n\nexport interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.FacebookStories;\n method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;\n appId: string;\n}\n\nexport type ShareSingleOptions =\n | BaseShareSingleOptions\n | InstagramStoriesShareSingleOptions\n | FacebookStoriesShareSingleOptions;\n\nexport interface ShareOptions {\n message?: string;\n title?: string;\n url?: string;\n urls?: string[];\n type?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n excludedActivityTypes?: ActivityType[];\n failOnCancel?: boolean;\n showAppsToView?: boolean;\n filename?: string;\n filenames?: string[];\n saveToFiles?: boolean;\n activityItemSources?: ActivityItemSource[];\n isNewTask?: boolean;\n}\n\nexport type ActivityType =\n | 'default'\n | 'addToReadingList'\n | 'airDrop'\n | 'assignToContact'\n | 'copyToPasteBoard'\n | 'mail'\n | 'message'\n | 'openInIBooks' // iOS 9 or later\n | 'postToFacebook'\n | 'postToFlickr'\n | 'postToTencentWeibo'\n | 'postToTwitter'\n | 'postToVimeo'\n | 'postToWeibo'\n | 'print'\n | 'saveToCameraRoll'\n | 'markupAsPDF'; // iOS 11 or late\n\nexport interface ShareSingleResult {\n message: string;\n success: boolean;\n}\n\nexport interface ShareOpenResult extends ShareSingleResult {\n dismissedAction?: boolean;\n}\nexport interface IsPackageInstalledResult {\n message: string;\n isInstalled: boolean;\n}\n"]}
|
package/lib/module/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["types.ts"],"names":["Social","ShareAsset"],"mappings":"AAAA,WAAYA,MAAZ;;WAAYA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;GAAAA,M,KAAAA,M;;AAmBZ,WAAYC,UAAZ;;WAAYA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;GAAAA,U,KAAAA,U","sourcesContent":["export enum Social {\n Facebook = 'facebook',\n FacebookStories = 'facebookstories',\n Pagesmanager = 'pagesmanager',\n Twitter = 'twitter',\n Whatsapp = 'whatsapp',\n Whatsappbusiness = 'whatsappbusiness',\n Instagram = 'instagram',\n InstagramStories = 'instagramstories',\n Googleplus = 'googleplus',\n Email = 'email',\n Pinterest = 'pinterest',\n Linkedin = 'linkedin',\n Sms = 'sms',\n Telegram = 'telegram',\n Snapchat = 'snapchat',\n Messenger = 'messenger',\n}\n\nexport enum ShareAsset {\n BackgroundImage = 'shareBackgroundImage',\n BackgroundVideo = 'shareBackgroundVideo',\n StickerImage = 'shareStickerImage',\n BackgroundAndStickerImage = 'shareBackgroundAndStickerImage',\n}\n\nexport interface LinkMetadata {\n originalUrl?: string;\n url?: string;\n title?: string;\n icon?: string;\n image?: string;\n remoteVideoUrl?: string;\n video?: string;\n}\n\nexport interface ActivityItem {\n type: 'text' | 'url';\n content: string;\n}\n\nexport interface ActivityItemSource {\n placeholderItem: ActivityItem;\n item: { [key in ActivityType]?: ActivityItem | null | undefined };\n subject?: { [key in ActivityType]?: string };\n dataTypeIdentifier?: { [key in ActivityType]?: string };\n thumbnailImage?: { [key in ActivityType]?: string };\n linkMetadata?: LinkMetadata;\n}\n\ninterface BaseShareSingleOptions {\n url?: string;\n type?: string;\n filename?: string;\n message?: string;\n title?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n social: Exclude<Social, Social.FacebookStories | Social.InstagramStories>;\n forceDialog?: boolean;\n}\n\ninterface BaseSocialStoriesShareSingleOptions extends Omit<BaseShareSingleOptions, 'social'> {\n backgroundImage?: string;\n stickerImage?: string;\n backgroundBottomColor?: string;\n backgroundTopColor?: string;\n attributionURL?: string;\n backgroundVideo?: string;\n}\n\nexport interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.InstagramStories;\n}\n\nexport interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.FacebookStories;\n method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;\n appId: string;\n}\n\nexport type ShareSingleOptions =\n | BaseShareSingleOptions\n | InstagramStoriesShareSingleOptions\n | FacebookStoriesShareSingleOptions;\n\nexport interface ShareOptions {\n message?: string;\n title?: string;\n url?: string;\n urls?: string[];\n type?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n excludedActivityTypes?: ActivityType[];\n failOnCancel?: boolean;\n showAppsToView?: boolean;\n filename?: string;\n filenames?: string[];\n saveToFiles?: boolean;\n activityItemSources?: ActivityItemSource[];\n}\n\nexport type ActivityType =\n | 'default'\n | 'addToReadingList'\n | 'airDrop'\n | 'assignToContact'\n | 'copyToPasteBoard'\n | 'mail'\n | 'message'\n | 'openInIBooks' // iOS 9 or later\n | 'postToFacebook'\n | 'postToFlickr'\n | 'postToTencentWeibo'\n | 'postToTwitter'\n | 'postToVimeo'\n | 'postToWeibo'\n | 'print'\n | 'saveToCameraRoll'\n | 'markupAsPDF'; // iOS 11 or late\n\nexport interface ShareSingleResult {\n message: string;\n success: boolean;\n}\n\nexport interface ShareOpenResult extends ShareSingleResult {\n dismissedAction?: boolean;\n}\nexport interface IsPackageInstalledResult {\n message: string;\n isInstalled: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["types.ts"],"names":["Social","ShareAsset"],"mappings":"AAAA,WAAYA,MAAZ;;WAAYA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;AAAAA,EAAAA,M;GAAAA,M,KAAAA,M;;AAmBZ,WAAYC,UAAZ;;WAAYA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;AAAAA,EAAAA,U;GAAAA,U,KAAAA,U","sourcesContent":["export enum Social {\n Facebook = 'facebook',\n FacebookStories = 'facebookstories',\n Pagesmanager = 'pagesmanager',\n Twitter = 'twitter',\n Whatsapp = 'whatsapp',\n Whatsappbusiness = 'whatsappbusiness',\n Instagram = 'instagram',\n InstagramStories = 'instagramstories',\n Googleplus = 'googleplus',\n Email = 'email',\n Pinterest = 'pinterest',\n Linkedin = 'linkedin',\n Sms = 'sms',\n Telegram = 'telegram',\n Snapchat = 'snapchat',\n Messenger = 'messenger',\n}\n\nexport enum ShareAsset {\n BackgroundImage = 'shareBackgroundImage',\n BackgroundVideo = 'shareBackgroundVideo',\n StickerImage = 'shareStickerImage',\n BackgroundAndStickerImage = 'shareBackgroundAndStickerImage',\n}\n\nexport interface LinkMetadata {\n originalUrl?: string;\n url?: string;\n title?: string;\n icon?: string;\n image?: string;\n remoteVideoUrl?: string;\n video?: string;\n}\n\nexport interface ActivityItem {\n type: 'text' | 'url';\n content: string;\n}\n\nexport interface ActivityItemSource {\n placeholderItem: ActivityItem;\n item: { [key in ActivityType]?: ActivityItem | null | undefined };\n subject?: { [key in ActivityType]?: string };\n dataTypeIdentifier?: { [key in ActivityType]?: string };\n thumbnailImage?: { [key in ActivityType]?: string };\n linkMetadata?: LinkMetadata;\n}\n\ninterface BaseShareSingleOptions {\n url?: string;\n type?: string;\n filename?: string;\n message?: string;\n title?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n social: Exclude<Social, Social.FacebookStories | Social.InstagramStories>;\n forceDialog?: boolean;\n}\n\ninterface BaseSocialStoriesShareSingleOptions extends Omit<BaseShareSingleOptions, 'social'> {\n backgroundImage?: string;\n stickerImage?: string;\n backgroundBottomColor?: string;\n backgroundTopColor?: string;\n attributionURL?: string;\n backgroundVideo?: string;\n}\n\nexport interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.InstagramStories;\n}\n\nexport interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {\n social: Social.FacebookStories;\n method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;\n appId: string;\n}\n\nexport type ShareSingleOptions =\n | BaseShareSingleOptions\n | InstagramStoriesShareSingleOptions\n | FacebookStoriesShareSingleOptions;\n\nexport interface ShareOptions {\n message?: string;\n title?: string;\n url?: string;\n urls?: string[];\n type?: string;\n subject?: string;\n email?: string;\n recipient?: string;\n excludedActivityTypes?: ActivityType[];\n failOnCancel?: boolean;\n showAppsToView?: boolean;\n filename?: string;\n filenames?: string[];\n saveToFiles?: boolean;\n activityItemSources?: ActivityItemSource[];\n isNewTask?: boolean;\n}\n\nexport type ActivityType =\n | 'default'\n | 'addToReadingList'\n | 'airDrop'\n | 'assignToContact'\n | 'copyToPasteBoard'\n | 'mail'\n | 'message'\n | 'openInIBooks' // iOS 9 or later\n | 'postToFacebook'\n | 'postToFlickr'\n | 'postToTencentWeibo'\n | 'postToTwitter'\n | 'postToVimeo'\n | 'postToWeibo'\n | 'print'\n | 'saveToCameraRoll'\n | 'markupAsPDF'; // iOS 11 or late\n\nexport interface ShareSingleResult {\n message: string;\n success: boolean;\n}\n\nexport interface ShareOpenResult extends ShareSingleResult {\n dismissedAction?: boolean;\n}\nexport interface IsPackageInstalledResult {\n message: string;\n isInstalled: boolean;\n}\n"]}
|
|
@@ -96,6 +96,7 @@ export interface ShareOptions {
|
|
|
96
96
|
filenames?: string[];
|
|
97
97
|
saveToFiles?: boolean;
|
|
98
98
|
activityItemSources?: ActivityItemSource[];
|
|
99
|
+
isNewTask?: boolean;
|
|
99
100
|
}
|
|
100
101
|
export declare type ActivityType = 'default' | 'addToReadingList' | 'airDrop' | 'assignToContact' | 'copyToPasteBoard' | 'mail' | 'message' | 'openInIBooks' | 'postToFacebook' | 'postToFlickr' | 'postToTencentWeibo' | 'postToTwitter' | 'postToVimeo' | 'postToWeibo' | 'print' | 'saveToCameraRoll' | 'markupAsPDF';
|
|
101
102
|
export interface ShareSingleResult {
|
package/package.json
CHANGED