expo-calendar 10.0.3 → 10.2.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 +23 -4
- package/README.md +4 -4
- package/android/build.gradle +38 -25
- package/android/src/main/java/expo/modules/calendar/CalendarModule.kt +4 -4
- package/build/Calendar.d.ts +583 -34
- package/build/Calendar.d.ts.map +1 -0
- package/build/Calendar.js +220 -22
- package/build/Calendar.js.map +1 -1
- package/build/ExpoCalendar.d.ts +1 -0
- package/build/ExpoCalendar.d.ts.map +1 -0
- package/build/ExpoCalendar.web.d.ts +1 -0
- package/build/ExpoCalendar.web.d.ts.map +1 -0
- package/package.json +7 -5
- package/plugin/build/withCalendar.js +1 -1
- package/plugin/src/withCalendar.ts +6 -4
- package/src/Calendar.ts +679 -84
package/CHANGELOG.md
CHANGED
|
@@ -10,13 +10,32 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 10.0
|
|
13
|
+
## 10.2.0 — 2022-04-18
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
### 💡 Others
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
- Updated `@expo/config-plugins` from `4.0.2` to `4.0.14` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
### ⚠️ Notices
|
|
20
|
+
|
|
21
|
+
- On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
|
|
22
|
+
|
|
23
|
+
## 10.1.1 - 2022-02-01
|
|
24
|
+
|
|
25
|
+
### 🐛 Bug fixes
|
|
26
|
+
|
|
27
|
+
- Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
|
|
28
|
+
|
|
29
|
+
## 10.1.0 — 2021-12-03
|
|
30
|
+
|
|
31
|
+
### 🐛 Bug fixes
|
|
32
|
+
|
|
33
|
+
- [Android] Fix `allowModifications` always return false in calendar object. ([#15307](https://github.com/expo/expo/pull/15307) by [@jekiwijaya](https://github.com/jekiwijaya))
|
|
34
|
+
|
|
35
|
+
### 💡 Others
|
|
36
|
+
|
|
37
|
+
- Replace custom `OptionalKeys` type wrapper with embedded in TypeScript `Partial`. ([#15192](https://github.com/expo/expo/pull/15192) by [@Simek](https://github.com/Simek))
|
|
38
|
+
- Extract nested object in current types to new, separate types: `AlarmLocation` and `DaysOfTheWeek`. ([#15192](https://github.com/expo/expo/pull/15192) by [@Simek](https://github.com/Simek))
|
|
20
39
|
|
|
21
40
|
## 10.0.1 — 2021-10-01
|
|
22
41
|
|
package/README.md
CHANGED
|
@@ -4,16 +4,16 @@ Provides an API for interacting with the device's system calendars, events, remi
|
|
|
4
4
|
|
|
5
5
|
# API documentation
|
|
6
6
|
|
|
7
|
-
- [Documentation for the
|
|
8
|
-
- [Documentation for the latest stable release](https://docs.expo.
|
|
7
|
+
- [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/calendar.md)
|
|
8
|
+
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/calendar/)
|
|
9
9
|
|
|
10
10
|
# Installation in managed Expo projects
|
|
11
11
|
|
|
12
|
-
For
|
|
12
|
+
For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/calendar/).
|
|
13
13
|
|
|
14
14
|
# Installation in bare React Native projects
|
|
15
15
|
|
|
16
|
-
For bare React Native projects, you must ensure that you have [installed and configured the `
|
|
16
|
+
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
|
|
17
17
|
|
|
18
18
|
### Add the package to your npm dependencies
|
|
19
19
|
|
package/android/build.gradle
CHANGED
|
@@ -1,67 +1,80 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
apply plugin: 'kotlin-android'
|
|
3
|
-
apply plugin: 'maven'
|
|
3
|
+
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '10.0
|
|
6
|
+
version = '10.2.0'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
10
|
+
if (expoModulesCorePlugin.exists()) {
|
|
11
|
+
apply from: expoModulesCorePlugin
|
|
12
|
+
applyKotlinExpoModulesCorePlugin()
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
10
16
|
ext.safeExtGet = { prop, fallback ->
|
|
11
17
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
12
18
|
}
|
|
13
19
|
|
|
20
|
+
// Ensures backward compatibility
|
|
21
|
+
ext.getKotlinVersion = {
|
|
22
|
+
if (ext.has("kotlinVersion")) {
|
|
23
|
+
ext.kotlinVersion()
|
|
24
|
+
} else {
|
|
25
|
+
ext.safeExtGet("kotlinVersion", "1.6.10")
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
14
29
|
repositories {
|
|
15
30
|
mavenCentral()
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
dependencies {
|
|
19
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${
|
|
34
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
37
|
|
|
23
|
-
// Upload android library to maven with javadoc and android sources
|
|
24
|
-
configurations {
|
|
25
|
-
deployerJars
|
|
26
|
-
}
|
|
27
|
-
|
|
28
38
|
// Creating sources with comments
|
|
29
39
|
task androidSourcesJar(type: Jar) {
|
|
30
40
|
classifier = 'sources'
|
|
31
41
|
from android.sourceSets.main.java.srcDirs
|
|
32
42
|
}
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
afterEvaluate {
|
|
45
|
+
publishing {
|
|
46
|
+
publications {
|
|
47
|
+
release(MavenPublication) {
|
|
48
|
+
from components.release
|
|
49
|
+
// Add additional sourcesJar to artifacts
|
|
50
|
+
artifact(androidSourcesJar)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
repositories {
|
|
54
|
+
maven {
|
|
55
|
+
url = mavenLocal().url
|
|
56
|
+
}
|
|
44
57
|
}
|
|
45
58
|
}
|
|
46
59
|
}
|
|
47
60
|
|
|
48
61
|
android {
|
|
49
|
-
compileSdkVersion safeExtGet("compileSdkVersion",
|
|
62
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 31)
|
|
50
63
|
|
|
51
64
|
compileOptions {
|
|
52
|
-
sourceCompatibility JavaVersion.
|
|
53
|
-
targetCompatibility JavaVersion.
|
|
65
|
+
sourceCompatibility JavaVersion.VERSION_11
|
|
66
|
+
targetCompatibility JavaVersion.VERSION_11
|
|
54
67
|
}
|
|
55
68
|
|
|
56
69
|
kotlinOptions {
|
|
57
|
-
jvmTarget = JavaVersion.
|
|
70
|
+
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
58
71
|
}
|
|
59
72
|
|
|
60
73
|
defaultConfig {
|
|
61
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
62
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
75
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
63
76
|
versionCode 17
|
|
64
|
-
versionName '10.0
|
|
77
|
+
versionName '10.2.0'
|
|
65
78
|
}
|
|
66
79
|
lintOptions {
|
|
67
80
|
abortOnError false
|
|
@@ -71,7 +84,7 @@ android {
|
|
|
71
84
|
dependencies {
|
|
72
85
|
implementation project(':expo-modules-core')
|
|
73
86
|
|
|
74
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${
|
|
87
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
75
88
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
|
|
76
89
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1")
|
|
77
90
|
}
|
|
@@ -785,10 +785,10 @@ class CalendarModule(
|
|
|
785
785
|
putString("accessLevel", calAccessStringMatchingConstant(accessLevel))
|
|
786
786
|
putBoolean(
|
|
787
787
|
"allowsModifications",
|
|
788
|
-
accessLevel == CalendarContract.Calendars.CAL_ACCESS_ROOT
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
788
|
+
accessLevel == CalendarContract.Calendars.CAL_ACCESS_ROOT ||
|
|
789
|
+
accessLevel == CalendarContract.Calendars.CAL_ACCESS_OWNER ||
|
|
790
|
+
accessLevel == CalendarContract.Calendars.CAL_ACCESS_EDITOR ||
|
|
791
|
+
accessLevel == CalendarContract.Calendars.CAL_ACCESS_CONTRIBUTOR
|
|
792
792
|
)
|
|
793
793
|
}
|
|
794
794
|
val source = Bundle().apply {
|