@capacitor/screen-orientation 5.0.0-alpha.1 → 5.0.0-beta.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.0.0-beta.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-orientation@5.0.0-beta.0...@capacitor/screen-orientation@5.0.0-beta.1) (2023-04-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Update gradle to 8.0.2 and gradle plugin to 8.0.0 ([#1542](https://github.com/ionic-team/capacitor-plugins/issues/1542)) ([e7210b4](https://github.com/ionic-team/capacitor-plugins/commit/e7210b47867644f5983e37acdbf0247214ec232d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [5.0.0-beta.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-orientation@5.0.0-alpha.1...@capacitor/screen-orientation@5.0.0-beta.0) (2023-03-31)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **screen-orientation:** Add native implementation for landscape and any ([#1517](https://github.com/ionic-team/capacitor-plugins/issues/1517)) ([d5d4584](https://github.com/ionic-team/capacitor-plugins/commit/d5d4584a2f2f17ea80fd6d6139991ecc6edbd4c8))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [5.0.0-alpha.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-orientation@4.1.0...@capacitor/screen-orientation@5.0.0-alpha.1) (2023-03-16)
|
|
7
29
|
|
|
8
30
|
|
package/android/build.gradle
CHANGED
|
@@ -11,13 +11,14 @@ buildscript {
|
|
|
11
11
|
mavenCentral()
|
|
12
12
|
}
|
|
13
13
|
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:
|
|
14
|
+
classpath 'com.android.tools.build:gradle:8.0.0'
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
apply plugin: 'com.android.library'
|
|
19
19
|
|
|
20
20
|
android {
|
|
21
|
+
namespace "com.capacitorjs.plugins.screenorientation"
|
|
21
22
|
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
|
|
22
23
|
defaultConfig {
|
|
23
24
|
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
|
|
@@ -36,8 +37,8 @@ android {
|
|
|
36
37
|
abortOnError false
|
|
37
38
|
}
|
|
38
39
|
compileOptions {
|
|
39
|
-
sourceCompatibility JavaVersion.
|
|
40
|
-
targetCompatibility JavaVersion.
|
|
40
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
41
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
|
package/android/src/main/java/com/capacitorjs/plugins/screenorientation/ScreenOrientation.java
CHANGED
|
@@ -57,6 +57,9 @@ public class ScreenOrientation {
|
|
|
57
57
|
|
|
58
58
|
private int fromOrientationTypeToEnum(String orientationType) {
|
|
59
59
|
switch (orientationType) {
|
|
60
|
+
case "any":
|
|
61
|
+
return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
|
|
62
|
+
case "landscape":
|
|
60
63
|
case "landscape-primary":
|
|
61
64
|
return ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
|
|
62
65
|
case "landscape-secondary":
|
|
@@ -82,7 +82,9 @@ public class ScreenOrientation: NSObject {
|
|
|
82
82
|
|
|
83
83
|
private func fromOrientationTypeToMask(_ orientationType: String) -> UIInterfaceOrientationMask {
|
|
84
84
|
switch orientationType {
|
|
85
|
-
case "
|
|
85
|
+
case "any":
|
|
86
|
+
return UIInterfaceOrientationMask.all
|
|
87
|
+
case "landscape", "landscape-primary":
|
|
86
88
|
return UIInterfaceOrientationMask.landscapeLeft
|
|
87
89
|
case "landscape-secondary":
|
|
88
90
|
return UIInterfaceOrientationMask.landscapeRight
|
|
@@ -96,7 +98,9 @@ public class ScreenOrientation: NSObject {
|
|
|
96
98
|
|
|
97
99
|
private func fromOrientationTypeToInt(_ orientationType: String) -> Int {
|
|
98
100
|
switch orientationType {
|
|
99
|
-
case "
|
|
101
|
+
case "any":
|
|
102
|
+
return UIInterfaceOrientation.unknown.rawValue
|
|
103
|
+
case "landscape", "landscape-primary":
|
|
100
104
|
return UIInterfaceOrientation.landscapeLeft.rawValue
|
|
101
105
|
case "landscape-secondary":
|
|
102
106
|
return UIInterfaceOrientation.landscapeRight.rawValue
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/screen-orientation",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-beta.1",
|
|
4
4
|
"description": "The Screen Orientation API provides methods to lock and unlock the screen orientation.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "a837068f095735043d64f8c4bfa22a0e77dcda7a"
|
|
83
83
|
}
|