react-native-share 7.6.2 → 7.6.5
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/README.md
CHANGED
|
@@ -52,4 +52,4 @@ Which you do something similar to this:
|
|
|
52
52
|
|
|
53
53
|
# Documentation
|
|
54
54
|
|
|
55
|
-
If you are using a older version of `react-native` or `react-native-share`, having any problem or want to know how use `Share.open` and other functions, please refer to our new [docs](https://react-native-share.github.io/react-native-share) and help us improve that
|
|
55
|
+
If you are using a older version of `react-native` or `react-native-share`, having any problem or want to know how use `Share.open` and other functions, please refer to our new [docs](https://react-native-share.github.io/react-native-share) and help us improve that.🚀
|
|
@@ -98,14 +98,14 @@ public class FacebookStoriesShare extends SingleShareIntent {
|
|
|
98
98
|
backgroundFileName = options.getString("backgroundVideo");
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
ShareFile backgroundAsset = new ShareFile(backgroundFileName, "background", useInternalStorage, this.reactContext);
|
|
101
|
+
ShareFile backgroundAsset = new ShareFile(backgroundFileName, "image/jpeg", "background", useInternalStorage, this.reactContext);
|
|
102
102
|
|
|
103
103
|
this.intent.setDataAndType(backgroundAsset.getURI(), backgroundAsset.getType());
|
|
104
104
|
this.intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
if (this.hasValidKey("stickerImage", options)) {
|
|
108
|
-
ShareFile stickerAsset = new ShareFile(options.getString("stickerImage"), "sticker", useInternalStorage, this.reactContext);
|
|
108
|
+
ShareFile stickerAsset = new ShareFile(options.getString("stickerImage"), "image/png", "sticker", useInternalStorage, this.reactContext);
|
|
109
109
|
|
|
110
110
|
if (!hasBackgroundAsset) {
|
|
111
111
|
this.intent.setType("image/*");
|
|
@@ -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;AAAAA,EAAAA,M;GAAAA,M,sBAAAA,M;;IAoBAC,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 Viber = 'viber',\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 urls?: string[];\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
|
|
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;AAAAA,EAAAA,M;GAAAA,M,sBAAAA,M;;IAoBAC,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 Viber = 'viber',\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 urls?: string[];\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 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[] | string[];\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;AAAAA,EAAAA,M;GAAAA,M,KAAAA,M;;AAoBZ,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 Viber = 'viber',\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 urls?: string[];\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
|
|
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;AAAAA,EAAAA,M;GAAAA,M,KAAAA,M;;AAoBZ,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 Viber = 'viber',\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 urls?: string[];\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 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[] | string[];\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"]}
|
|
@@ -78,7 +78,6 @@ export interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesSha
|
|
|
78
78
|
}
|
|
79
79
|
export interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {
|
|
80
80
|
social: Social.FacebookStories;
|
|
81
|
-
method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;
|
|
82
81
|
appId: string;
|
|
83
82
|
}
|
|
84
83
|
export declare type ShareSingleOptions = BaseShareSingleOptions | InstagramStoriesShareSingleOptions | FacebookStoriesShareSingleOptions;
|
|
@@ -91,7 +90,7 @@ export interface ShareOptions {
|
|
|
91
90
|
subject?: string;
|
|
92
91
|
email?: string;
|
|
93
92
|
recipient?: string;
|
|
94
|
-
excludedActivityTypes?: ActivityType[];
|
|
93
|
+
excludedActivityTypes?: ActivityType[] | string[];
|
|
95
94
|
failOnCancel?: boolean;
|
|
96
95
|
showAppsToView?: boolean;
|
|
97
96
|
filename?: string;
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -78,7 +78,6 @@ export interface InstagramStoriesShareSingleOptions extends BaseSocialStoriesSha
|
|
|
78
78
|
|
|
79
79
|
export interface FacebookStoriesShareSingleOptions extends BaseSocialStoriesShareSingleOptions {
|
|
80
80
|
social: Social.FacebookStories;
|
|
81
|
-
method: Exclude<ShareAsset, ShareAsset.BackgroundVideo>;
|
|
82
81
|
appId: string;
|
|
83
82
|
}
|
|
84
83
|
|
|
@@ -96,7 +95,7 @@ export interface ShareOptions {
|
|
|
96
95
|
subject?: string;
|
|
97
96
|
email?: string;
|
|
98
97
|
recipient?: string;
|
|
99
|
-
excludedActivityTypes?: ActivityType[];
|
|
98
|
+
excludedActivityTypes?: ActivityType[] | string[];
|
|
100
99
|
failOnCancel?: boolean;
|
|
101
100
|
showAppsToView?: boolean;
|
|
102
101
|
filename?: string;
|