expo-mail-composer 12.5.0 → 12.7.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.
- package/CHANGELOG.md +17 -0
- package/android/build.gradle +48 -30
- package/build/ExpoMailComposer.web.d.ts +0 -1
- package/build/ExpoMailComposer.web.d.ts.map +1 -1
- package/build/ExpoMailComposer.web.js +11 -12
- package/build/ExpoMailComposer.web.js.map +1 -1
- package/ios/ExpoMailComposer.podspec +1 -1
- package/package.json +2 -5
- package/src/ExpoMailComposer.web.ts +13 -14
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,23 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 12.7.0 — 2023-11-14
|
|
14
|
+
|
|
15
|
+
### 🛠 Breaking changes
|
|
16
|
+
|
|
17
|
+
- Bumped iOS deployment target to 13.4. ([#25063](https://github.com/expo/expo/pull/25063) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
18
|
+
- On `Android` bump `compileSdkVersion` and `targetSdkVersion` to `34`. ([#24708](https://github.com/expo/expo/pull/24708) by [@alanjhughes](https://github.com/alanjhughes))
|
|
19
|
+
|
|
20
|
+
### 💡 Others
|
|
21
|
+
|
|
22
|
+
- Migrate to new standard `URL` support on native. ([#24941](https://github.com/expo/expo/pull/24941) by [@EvanBacon](https://github.com/EvanBacon))
|
|
23
|
+
|
|
24
|
+
## 12.6.0 — 2023-10-17
|
|
25
|
+
|
|
26
|
+
### 🛠 Breaking changes
|
|
27
|
+
|
|
28
|
+
- Dropped support for Android SDK 21 and 22. ([#24201](https://github.com/expo/expo/pull/24201) by [@behenate](https://github.com/behenate))
|
|
29
|
+
|
|
13
30
|
## 12.5.0 — 2023-09-04
|
|
14
31
|
|
|
15
32
|
### 🎉 New features
|
package/android/build.gradle
CHANGED
|
@@ -3,15 +3,20 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '12.
|
|
6
|
+
version = '12.7.0'
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
|
+
if (expoModulesCorePlugin.exists()) {
|
|
10
|
+
apply from: expoModulesCorePlugin
|
|
11
|
+
applyKotlinExpoModulesCorePlugin()
|
|
12
|
+
// Remove this check, but keep the contents after SDK49 support is dropped
|
|
13
|
+
if (safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
14
|
+
useExpoPublishing()
|
|
15
|
+
useCoreDependencies()
|
|
13
16
|
}
|
|
17
|
+
}
|
|
14
18
|
|
|
19
|
+
buildscript {
|
|
15
20
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
16
21
|
ext.safeExtGet = { prop, fallback ->
|
|
17
22
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
@@ -35,23 +40,44 @@ buildscript {
|
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
44
|
+
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
45
|
+
afterEvaluate {
|
|
46
|
+
publishing {
|
|
47
|
+
publications {
|
|
48
|
+
release(MavenPublication) {
|
|
49
|
+
from components.release
|
|
50
|
+
}
|
|
43
51
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
repositories {
|
|
53
|
+
maven {
|
|
54
|
+
url = mavenLocal().url
|
|
55
|
+
}
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
59
|
}
|
|
52
60
|
|
|
53
61
|
android {
|
|
54
|
-
|
|
62
|
+
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
63
|
+
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
64
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
65
|
+
|
|
66
|
+
defaultConfig {
|
|
67
|
+
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
68
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
publishing {
|
|
72
|
+
singleVariant("release") {
|
|
73
|
+
withSourcesJar()
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
lintOptions {
|
|
78
|
+
abortOnError false
|
|
79
|
+
}
|
|
80
|
+
}
|
|
55
81
|
|
|
56
82
|
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
57
83
|
if (agpVersion.tokenize('.')[0].toInteger() < 8) {
|
|
@@ -67,25 +93,17 @@ android {
|
|
|
67
93
|
|
|
68
94
|
namespace "expo.modules.mailcomposer"
|
|
69
95
|
defaultConfig {
|
|
70
|
-
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
71
|
-
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
72
96
|
versionCode 17
|
|
73
|
-
versionName "12.
|
|
74
|
-
}
|
|
75
|
-
lintOptions {
|
|
76
|
-
abortOnError false
|
|
77
|
-
}
|
|
78
|
-
publishing {
|
|
79
|
-
singleVariant("release") {
|
|
80
|
-
withSourcesJar()
|
|
81
|
-
}
|
|
97
|
+
versionName "12.7.0"
|
|
82
98
|
}
|
|
83
99
|
}
|
|
84
100
|
|
|
85
101
|
dependencies {
|
|
86
|
-
|
|
102
|
+
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
103
|
+
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
104
|
+
implementation project(':expo-modules-core')
|
|
105
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
106
|
+
}
|
|
87
107
|
|
|
88
108
|
api "androidx.appcompat:appcompat:1.2.0"
|
|
89
|
-
|
|
90
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
91
109
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoMailComposer.web.d.ts","sourceRoot":"","sources":["../src/ExpoMailComposer.web.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpoMailComposer.web.d.ts","sourceRoot":"","sources":["../src/ExpoMailComposer.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAsB,MAAM,sBAAsB,CAAC;;0BAqBrE,mBAAmB,GAAG,QAAQ,kBAAkB,CAAC;wBAqBnD,QAAQ,OAAO,CAAC;;AAtB5C,wBAyBE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import qs from 'query-string';
|
|
2
1
|
import { MailComposerStatus } from './MailComposer.types';
|
|
3
2
|
function removeNullishValues(obj) {
|
|
4
3
|
for (const propName in obj) {
|
|
@@ -16,25 +15,25 @@ function checkValue(value) {
|
|
|
16
15
|
return arr.join(',');
|
|
17
16
|
}
|
|
18
17
|
export default {
|
|
19
|
-
get name() {
|
|
20
|
-
return 'ExpoMailComposer';
|
|
21
|
-
},
|
|
22
18
|
async composeAsync(options) {
|
|
19
|
+
if (typeof window === 'undefined') {
|
|
20
|
+
return { status: MailComposerStatus.CANCELLED };
|
|
21
|
+
}
|
|
22
|
+
const mailtoUrl = new URL('mailto:' + (checkValue(options.recipients) || ''));
|
|
23
23
|
const email = removeNullishValues({
|
|
24
|
-
cc:
|
|
25
|
-
bcc:
|
|
24
|
+
cc: options.ccRecipients,
|
|
25
|
+
bcc: options.bccRecipients,
|
|
26
26
|
subject: options.subject,
|
|
27
27
|
body: options.body,
|
|
28
28
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
window.open(mailto);
|
|
29
|
+
Object.entries(email).forEach(([key, value]) => {
|
|
30
|
+
mailtoUrl.searchParams.append(key, value);
|
|
31
|
+
});
|
|
32
|
+
window.open(mailtoUrl.toString());
|
|
34
33
|
return { status: MailComposerStatus.UNDETERMINED };
|
|
35
34
|
},
|
|
36
35
|
async isAvailableAsync() {
|
|
37
|
-
return
|
|
36
|
+
return typeof window !== 'undefined';
|
|
38
37
|
},
|
|
39
38
|
};
|
|
40
39
|
//# sourceMappingURL=ExpoMailComposer.web.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoMailComposer.web.js","sourceRoot":"","sources":["../src/ExpoMailComposer.web.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ExpoMailComposer.web.js","sourceRoot":"","sources":["../src/ExpoMailComposer.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAEnG,SAAS,mBAAmB,CAAC,GAAG;IAC9B,KAAK,MAAM,QAAQ,IAAI,GAAG,EAAE;QAC1B,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE;YACzB,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;SACtB;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,UAAU,CAAC,KAAyB;IAC3C,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,IAAI,CAAC;KACb;IAED,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnD,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC;AAED,eAAe;IACb,KAAK,CAAC,YAAY,CAAC,OAA4B;QAC7C,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,OAAO,EAAE,MAAM,EAAE,kBAAkB,CAAC,SAAS,EAAE,CAAC;SACjD;QACD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,SAAS,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAE9E,MAAM,KAAK,GAAG,mBAAmB,CAAC;YAChC,EAAE,EAAE,OAAO,CAAC,YAAY;YACxB,GAAG,EAAE,OAAO,CAAC,aAAa;YAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,CAA2B,CAAC;QAE7B,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC7C,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;QAElC,OAAO,EAAE,MAAM,EAAE,kBAAkB,CAAC,YAAY,EAAE,CAAC;IACrD,CAAC;IACD,KAAK,CAAC,gBAAgB;QACpB,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC;IACvC,CAAC;CACF,CAAC","sourcesContent":["import { MailComposerOptions, MailComposerResult, MailComposerStatus } from './MailComposer.types';\n\nfunction removeNullishValues(obj) {\n for (const propName in obj) {\n if (obj[propName] == null) {\n delete obj[propName];\n }\n }\n return obj;\n}\n\nfunction checkValue(value?: string[] | string): string | null {\n if (!value) {\n return null;\n }\n\n const arr = Array.isArray(value) ? value : [value];\n return arr.join(',');\n}\n\nexport default {\n async composeAsync(options: MailComposerOptions): Promise<MailComposerResult> {\n if (typeof window === 'undefined') {\n return { status: MailComposerStatus.CANCELLED };\n }\n const mailtoUrl = new URL('mailto:' + (checkValue(options.recipients) || ''));\n\n const email = removeNullishValues({\n cc: options.ccRecipients,\n bcc: options.bccRecipients,\n subject: options.subject,\n body: options.body,\n }) as Record<string, string>;\n\n Object.entries(email).forEach(([key, value]) => {\n mailtoUrl.searchParams.append(key, value);\n });\n\n window.open(mailtoUrl.toString());\n\n return { status: MailComposerStatus.UNDETERMINED };\n },\n async isAvailableAsync(): Promise<boolean> {\n return typeof window !== 'undefined';\n },\n};\n"]}
|
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.homepage = package['homepage']
|
|
13
|
-
s.platform = :ios, '13.
|
|
13
|
+
s.platform = :ios, '13.4'
|
|
14
14
|
s.swift_version = '5.4'
|
|
15
15
|
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
16
16
|
s.static_framework = true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-mail-composer",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.7.0",
|
|
4
4
|
"description": "Provides an API to compose mails using OS specific UI",
|
|
5
5
|
"main": "build/MailComposer.js",
|
|
6
6
|
"types": "build/MailComposer.d.ts",
|
|
@@ -34,14 +34,11 @@
|
|
|
34
34
|
"jest": {
|
|
35
35
|
"preset": "expo-module-scripts"
|
|
36
36
|
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"query-string": "^6.2.0"
|
|
39
|
-
},
|
|
40
37
|
"devDependencies": {
|
|
41
38
|
"expo-module-scripts": "^3.0.0"
|
|
42
39
|
},
|
|
43
40
|
"peerDependencies": {
|
|
44
41
|
"expo": "*"
|
|
45
42
|
},
|
|
46
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "3142a086578deffd8704a8f1b6f0f661527d836c"
|
|
47
44
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import qs from 'query-string';
|
|
2
|
-
|
|
3
1
|
import { MailComposerOptions, MailComposerResult, MailComposerStatus } from './MailComposer.types';
|
|
4
2
|
|
|
5
3
|
function removeNullishValues(obj) {
|
|
@@ -21,27 +19,28 @@ function checkValue(value?: string[] | string): string | null {
|
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
export default {
|
|
24
|
-
get name(): string {
|
|
25
|
-
return 'ExpoMailComposer';
|
|
26
|
-
},
|
|
27
22
|
async composeAsync(options: MailComposerOptions): Promise<MailComposerResult> {
|
|
23
|
+
if (typeof window === 'undefined') {
|
|
24
|
+
return { status: MailComposerStatus.CANCELLED };
|
|
25
|
+
}
|
|
26
|
+
const mailtoUrl = new URL('mailto:' + (checkValue(options.recipients) || ''));
|
|
27
|
+
|
|
28
28
|
const email = removeNullishValues({
|
|
29
|
-
cc:
|
|
30
|
-
bcc:
|
|
29
|
+
cc: options.ccRecipients,
|
|
30
|
+
bcc: options.bccRecipients,
|
|
31
31
|
subject: options.subject,
|
|
32
32
|
body: options.body,
|
|
33
|
-
})
|
|
33
|
+
}) as Record<string, string>;
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const mailto = `mailto:${to}${queryComponent}`;
|
|
35
|
+
Object.entries(email).forEach(([key, value]) => {
|
|
36
|
+
mailtoUrl.searchParams.append(key, value);
|
|
37
|
+
});
|
|
39
38
|
|
|
40
|
-
window.open(
|
|
39
|
+
window.open(mailtoUrl.toString());
|
|
41
40
|
|
|
42
41
|
return { status: MailComposerStatus.UNDETERMINED };
|
|
43
42
|
},
|
|
44
43
|
async isAvailableAsync(): Promise<boolean> {
|
|
45
|
-
return
|
|
44
|
+
return typeof window !== 'undefined';
|
|
46
45
|
},
|
|
47
46
|
};
|