@capgo/inappbrowser 8.0.0 → 8.0.2
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/CapgoInappbrowser.podspec +2 -2
- package/LICENSE +373 -21
- package/Package.swift +28 -0
- package/README.md +600 -74
- package/android/build.gradle +17 -16
- package/android/src/main/AndroidManifest.xml +14 -2
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/InAppBrowserPlugin.java +952 -204
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/Options.java +478 -81
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewCallbacks.java +10 -4
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewDialog.java +3021 -226
- package/android/src/main/res/drawable/ic_refresh.xml +9 -0
- package/android/src/main/res/drawable/ic_share.xml +10 -0
- package/android/src/main/res/layout/activity_browser.xml +10 -0
- package/android/src/main/res/layout/content_browser.xml +3 -2
- package/android/src/main/res/layout/tool_bar.xml +44 -7
- package/android/src/main/res/values/strings.xml +4 -0
- package/android/src/main/res/values/themes.xml +27 -0
- package/android/src/main/res/xml/file_paths.xml +14 -0
- package/dist/docs.json +1289 -149
- package/dist/esm/definitions.d.ts +614 -25
- package/dist/esm/definitions.js +17 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.d.ts +16 -3
- package/dist/esm/web.js +43 -7
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +60 -8
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +60 -8
- package/dist/plugin.js.map +1 -1
- package/ios/{Plugin → Sources/InAppBrowserPlugin}/Enums.swift +5 -5
- package/ios/Sources/InAppBrowserPlugin/InAppBrowserPlugin.swift +954 -0
- package/ios/Sources/InAppBrowserPlugin/WKWebViewController.swift +2003 -0
- package/package.json +32 -30
- package/ios/Plugin/Assets.xcassets/Back.imageset/Back.png +0 -0
- package/ios/Plugin/Assets.xcassets/Back.imageset/Back@2x.png +0 -0
- package/ios/Plugin/Assets.xcassets/Back.imageset/Back@3x.png +0 -0
- package/ios/Plugin/Assets.xcassets/Back.imageset/Contents.json +0 -26
- package/ios/Plugin/Assets.xcassets/Contents.json +0 -6
- package/ios/Plugin/Assets.xcassets/Forward.imageset/Contents.json +0 -26
- package/ios/Plugin/Assets.xcassets/Forward.imageset/Forward.png +0 -0
- package/ios/Plugin/Assets.xcassets/Forward.imageset/Forward@2x.png +0 -0
- package/ios/Plugin/Assets.xcassets/Forward.imageset/Forward@3x.png +0 -0
- package/ios/Plugin/InAppBrowserPlugin.h +0 -10
- package/ios/Plugin/InAppBrowserPlugin.m +0 -17
- package/ios/Plugin/InAppBrowserPlugin.swift +0 -203
- package/ios/Plugin/Info.plist +0 -24
- package/ios/Plugin/WKWebViewController.swift +0 -784
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
android:width="24dp"
|
|
3
|
+
android:height="24dp"
|
|
4
|
+
android:viewportWidth="24.0"
|
|
5
|
+
android:viewportHeight="24.0">
|
|
6
|
+
<path
|
|
7
|
+
android:fillColor="@color/enable"
|
|
8
|
+
android:pathData="M17.65,6.35C16.2,4.9 14.21,4 12,4c-4.42,0 -7.99,3.58 -7.99,8s3.57,8 7.99,8c3.73,0 6.84,-2.55 7.73,-6h-2.08c-0.82,2.33 -3.04,4 -5.65,4 -3.31,0 -6,-2.69 -6,-6s2.69,-6 6,-6c1.66,0 3.14,0.69 4.22,1.78L13,11h7V4l-2.35,2.35z"/>
|
|
9
|
+
</vector>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
android:width="24dp"
|
|
4
|
+
android:height="24dp"
|
|
5
|
+
android:viewportWidth="24"
|
|
6
|
+
android:viewportHeight="24">
|
|
7
|
+
<path
|
|
8
|
+
android:fillColor="#FFFFFF"
|
|
9
|
+
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"/>
|
|
10
|
+
</vector>
|
|
@@ -2,13 +2,23 @@
|
|
|
2
2
|
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
3
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
4
|
xmlns:tools="http://schemas.android.com/tools"
|
|
5
|
+
android:id="@+id/coordinator_layout"
|
|
5
6
|
android:layout_width="match_parent"
|
|
6
7
|
android:layout_height="match_parent"
|
|
7
8
|
tools:context="com.cap.browser.plugin.WebViewActivity">
|
|
8
9
|
|
|
10
|
+
<!-- Status bar color view that will be positioned at the top -->
|
|
11
|
+
<View
|
|
12
|
+
android:id="@+id/status_bar_color_view"
|
|
13
|
+
android:layout_width="match_parent"
|
|
14
|
+
android:layout_height="0dp"
|
|
15
|
+
android:background="@android:color/transparent" />
|
|
16
|
+
|
|
9
17
|
<com.google.android.material.appbar.AppBarLayout
|
|
18
|
+
android:id="@+id/app_bar_layout"
|
|
10
19
|
android:layout_width="match_parent"
|
|
11
20
|
android:layout_height="wrap_content"
|
|
21
|
+
android:layout_marginTop="0dp"
|
|
12
22
|
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
|
13
23
|
|
|
14
24
|
<include
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<
|
|
2
|
+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
3
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
4
|
xmlns:tools="http://schemas.android.com/tools"
|
|
5
5
|
android:layout_width="match_parent"
|
|
6
6
|
android:layout_height="match_parent"
|
|
7
|
+
android:id="@+id/content_browser_layout"
|
|
7
8
|
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
8
9
|
tools:context="com.cap.browser.plugin.WebViewActivity"
|
|
9
10
|
tools:showIn="@layout/activity_browser">
|
|
@@ -13,4 +14,4 @@
|
|
|
13
14
|
android:layout_width="match_parent"
|
|
14
15
|
android:layout_height="match_parent"/>
|
|
15
16
|
|
|
16
|
-
</
|
|
17
|
+
</RelativeLayout>
|
|
@@ -1,20 +1,46 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<
|
|
2
|
+
<android.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
3
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
4
5
|
android:layout_width="match_parent"
|
|
5
6
|
android:layout_height="wrap_content"
|
|
6
7
|
android:background="#eeeeef"
|
|
7
8
|
android:elevation="4dp"
|
|
8
9
|
app:titleTextColor="#262626">
|
|
9
10
|
|
|
11
|
+
<ImageButton
|
|
12
|
+
android:id="@+id/closeButton"
|
|
13
|
+
android:layout_width="wrap_content"
|
|
14
|
+
android:layout_height="wrap_content"
|
|
15
|
+
android:layout_gravity="start"
|
|
16
|
+
android:background="#eeeeef"
|
|
17
|
+
android:contentDescription="@string/close_button"
|
|
18
|
+
android:minWidth="38dp"
|
|
19
|
+
android:minHeight="38dp"
|
|
20
|
+
android:src="@drawable/ic_clear_24px"
|
|
21
|
+
android:translationX="-8dp" />
|
|
22
|
+
|
|
10
23
|
<ImageButton
|
|
11
|
-
android:id="@+id/
|
|
24
|
+
android:id="@+id/buttonNearDone"
|
|
25
|
+
android:layout_width="48dp"
|
|
26
|
+
android:layout_height="48dp"
|
|
27
|
+
android:layout_gravity="end"
|
|
28
|
+
android:layout_marginEnd="8dp"
|
|
29
|
+
android:background="?attr/selectableItemBackgroundBorderless"
|
|
30
|
+
android:contentDescription="@string/button_near_done"
|
|
31
|
+
android:padding="12dp"
|
|
32
|
+
android:src="@drawable/ic_clear_24px"
|
|
33
|
+
android:visibility="gone" />
|
|
34
|
+
<ImageButton
|
|
35
|
+
android:id="@+id/reloadButton"
|
|
12
36
|
android:layout_width="wrap_content"
|
|
13
37
|
android:layout_height="wrap_content"
|
|
14
|
-
android:
|
|
15
|
-
android:layout_gravity="start"
|
|
38
|
+
android:layout_gravity="end"
|
|
16
39
|
android:background="#eeeeef"
|
|
17
|
-
android:
|
|
40
|
+
android:paddingRight="10dp"
|
|
41
|
+
android:contentDescription="@string/reload_button"
|
|
42
|
+
android:src="@drawable/ic_refresh"
|
|
43
|
+
android:visibility="gone" />
|
|
18
44
|
|
|
19
45
|
<TextView
|
|
20
46
|
android:id="@+id/titleText"
|
|
@@ -27,6 +53,18 @@
|
|
|
27
53
|
android:singleLine="false"
|
|
28
54
|
android:textColor="#262626" />
|
|
29
55
|
|
|
56
|
+
<ImageButton
|
|
57
|
+
android:id="@+id/shareButton"
|
|
58
|
+
android:layout_width="48dp"
|
|
59
|
+
android:layout_height="48dp"
|
|
60
|
+
android:layout_gravity="end"
|
|
61
|
+
android:layout_marginEnd="8dp"
|
|
62
|
+
android:background="?attr/selectableItemBackgroundBorderless"
|
|
63
|
+
android:contentDescription="@string/share_button"
|
|
64
|
+
android:padding="12dp"
|
|
65
|
+
android:src="@drawable/ic_share"
|
|
66
|
+
android:visibility="gone" />
|
|
67
|
+
|
|
30
68
|
<ImageButton
|
|
31
69
|
android:id="@+id/forwardButton"
|
|
32
70
|
android:layout_width="wrap_content"
|
|
@@ -34,7 +72,6 @@
|
|
|
34
72
|
android:layout_gravity="end"
|
|
35
73
|
android:background="#eeeeef"
|
|
36
74
|
android:contentDescription="@string/forward_button"
|
|
37
|
-
android:paddingLeft="10dp"
|
|
38
75
|
android:paddingRight="10dp"
|
|
39
76
|
android:src="@drawable/arrow_forward_disabled" />
|
|
40
77
|
|
|
@@ -47,4 +84,4 @@
|
|
|
47
84
|
android:contentDescription="@string/back_button"
|
|
48
85
|
android:paddingRight="10dp"
|
|
49
86
|
android:src="@drawable/arrow_back_disabled" />
|
|
50
|
-
</
|
|
87
|
+
</android.widget.Toolbar>
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
1
2
|
<resources>
|
|
2
3
|
<string name="my_string">Just a simple string</string>
|
|
3
4
|
<string name="title_activity_browser">BrowserActivity</string>
|
|
4
5
|
<string name="title_activity_basic">BasicActivity</string>
|
|
5
6
|
<string name="close_button">Close Button</string>
|
|
7
|
+
<string name="button_near_done">Button near "done"</string>
|
|
8
|
+
<string name="reload_button">Reload Button</string>
|
|
6
9
|
<string name="back_button">Back Button</string>
|
|
7
10
|
<string name="title">Title</string>
|
|
8
11
|
<string name="forward_button">Forward Button</string>
|
|
12
|
+
<string name="share_button">Share</string>
|
|
9
13
|
</resources>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<resources>
|
|
3
|
+
<!-- Base application theme with Material Components -->
|
|
4
|
+
<style name="InAppBrowserMaterialTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
|
|
5
|
+
<!-- Customize your theme here -->
|
|
6
|
+
<item name="colorPrimary">@android:color/holo_blue_dark</item>
|
|
7
|
+
<item name="colorPrimaryDark">@android:color/holo_blue_dark</item>
|
|
8
|
+
<item name="colorAccent">@android:color/holo_blue_dark</item>
|
|
9
|
+
|
|
10
|
+
<!-- Force Material Design date and time pickers -->
|
|
11
|
+
<item name="android:datePickerStyle">@style/MaterialDatePickerStyle</item>
|
|
12
|
+
<item name="android:timePickerStyle">@style/MaterialTimePickerStyle</item>
|
|
13
|
+
<item name="materialCalendarStyle">@style/Widget.MaterialComponents.MaterialCalendar</item>
|
|
14
|
+
<item name="materialCalendarFullscreenTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar.Fullscreen</item>
|
|
15
|
+
<item name="materialCalendarTheme">@style/ThemeOverlay.MaterialComponents.MaterialCalendar</item>
|
|
16
|
+
</style>
|
|
17
|
+
|
|
18
|
+
<!-- Date Picker Style -->
|
|
19
|
+
<style name="MaterialDatePickerStyle" parent="@android:style/Widget.Material.DatePicker">
|
|
20
|
+
<item name="android:datePickerMode">calendar</item>
|
|
21
|
+
</style>
|
|
22
|
+
|
|
23
|
+
<!-- Time Picker Style -->
|
|
24
|
+
<style name="MaterialTimePickerStyle" parent="@android:style/Widget.Material.TimePicker">
|
|
25
|
+
<item name="android:timePickerMode">clock</item>
|
|
26
|
+
</style>
|
|
27
|
+
</resources>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
|
+
<!-- Internal cache for most operations -->
|
|
4
|
+
<cache-path name="camera_captures" path="." />
|
|
5
|
+
|
|
6
|
+
<!-- External cache for fallback -->
|
|
7
|
+
<external-cache-path name="external_cache" path="." />
|
|
8
|
+
|
|
9
|
+
<!-- External files for additional compatibility -->
|
|
10
|
+
<external-files-path name="external_files" path="." />
|
|
11
|
+
|
|
12
|
+
<!-- Allow sharing app-specific files if needed -->
|
|
13
|
+
<files-path name="app_files" path="." />
|
|
14
|
+
</paths>
|