expo-mail-composer 12.7.1 → 13.0.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 CHANGED
@@ -10,7 +10,13 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 12.7.12023-12-19
13
+ ## 13.0.02024-04-18
14
+
15
+ ### 💡 Others
16
+
17
+ - Removed deprecated backward compatible Gradle settings. ([#28083](https://github.com/expo/expo/pull/28083) by [@kudo](https://github.com/kudo))
18
+
19
+ ## 12.7.1 - 2023-12-19
14
20
 
15
21
  _This version does not introduce any user-facing changes._
16
22
 
@@ -1,109 +1,23 @@
1
1
  apply plugin: 'com.android.library'
2
- apply plugin: 'kotlin-android'
3
- apply plugin: 'maven-publish'
4
2
 
5
3
  group = 'host.exp.exponent'
6
- version = '12.7.1'
4
+ version = '13.0.0'
7
5
 
8
6
  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()
16
- }
17
- }
18
-
19
- buildscript {
20
- // Simple helper that allows the root project to override versions declared by this library.
21
- ext.safeExtGet = { prop, fallback ->
22
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
23
- }
24
-
25
- // Ensures backward compatibility
26
- ext.getKotlinVersion = {
27
- if (ext.has("kotlinVersion")) {
28
- ext.kotlinVersion()
29
- } else {
30
- ext.safeExtGet("kotlinVersion", "1.8.10")
31
- }
32
- }
33
-
34
- repositories {
35
- mavenCentral()
36
- }
37
-
38
- dependencies {
39
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
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
- }
51
- }
52
- repositories {
53
- maven {
54
- url = mavenLocal().url
55
- }
56
- }
57
- }
58
- }
59
- }
7
+ apply from: expoModulesCorePlugin
8
+ applyKotlinExpoModulesCorePlugin()
9
+ useCoreDependencies()
10
+ useDefaultAndroidSdkVersions()
11
+ useExpoPublishing()
60
12
 
61
13
  android {
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
- }
81
-
82
- def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
83
- if (agpVersion.tokenize('.')[0].toInteger() < 8) {
84
- compileOptions {
85
- sourceCompatibility JavaVersion.VERSION_11
86
- targetCompatibility JavaVersion.VERSION_11
87
- }
88
-
89
- kotlinOptions {
90
- jvmTarget = JavaVersion.VERSION_11.majorVersion
91
- }
92
- }
93
-
94
14
  namespace "expo.modules.mailcomposer"
95
15
  defaultConfig {
96
16
  versionCode 17
97
- versionName "12.7.1"
17
+ versionName "13.0.0"
98
18
  }
99
19
  }
100
20
 
101
21
  dependencies {
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
- }
107
-
108
22
  api "androidx.appcompat:appcompat:1.2.0"
109
23
  }
@@ -20,7 +20,7 @@ class MailComposerModule : Module() {
20
20
  override fun definition() = ModuleDefinition {
21
21
  Name("ExpoMailComposer")
22
22
 
23
- AsyncFunction("isAvailableAsync") {
23
+ AsyncFunction<Boolean>("isAvailableAsync") {
24
24
  return@AsyncFunction true
25
25
  }
26
26
 
@@ -1 +1 @@
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
+ {"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,OAAO,CAAC,kBAAkB,CAAC;wBAqBnD,OAAO,CAAC,OAAO,CAAC;;AAtB5C,wBAyBE"}
@@ -1 +1 @@
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"]}
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,CAAC;QAC3B,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC;YAC1B,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,UAAU,CAAC,KAAyB;IAC3C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;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,CAAC;YAClC,OAAO,EAAE,MAAM,EAAE,kBAAkB,CAAC,SAAS,EAAE,CAAC;QAClD,CAAC;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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-mail-composer",
3
- "version": "12.7.1",
3
+ "version": "13.0.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",
@@ -40,5 +40,5 @@
40
40
  "peerDependencies": {
41
41
  "expo": "*"
42
42
  },
43
- "gitHead": "43f1b4f8a5a9bca649e4e7ca6e4155482a162431"
43
+ "gitHead": "4165b8d72e1b9a1889c2767534cc619e21468110"
44
44
  }