@capgo/inappbrowser 0.0.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/CapgoInappbrowser.podspec +17 -0
- package/README.md +118 -0
- package/android/build.gradle +58 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/InAppBrowserPlugin.java +160 -0
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/Options.java +88 -0
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewCallbacks.java +7 -0
- package/android/src/main/java/ee/forgr/capacitor_inappbrowser/WebViewDialog.java +218 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/android/src/main/res/drawable/arrow_back_disabled.xml +9 -0
- package/android/src/main/res/drawable/arrow_back_enabled.xml +9 -0
- package/android/src/main/res/drawable/arrow_forward_disabled.xml +9 -0
- package/android/src/main/res/drawable/arrow_forward_enabled.xml +9 -0
- package/android/src/main/res/drawable/ic_clear_24px.xml +9 -0
- package/android/src/main/res/layout/activity_browser.xml +22 -0
- package/android/src/main/res/layout/bridge_layout_main.xml +15 -0
- package/android/src/main/res/layout/content_browser.xml +16 -0
- package/android/src/main/res/layout/tool_bar.xml +50 -0
- package/android/src/main/res/values/colors.xml +5 -0
- package/android/src/main/res/values/dimens.xml +3 -0
- package/android/src/main/res/values/strings.xml +9 -0
- package/android/src/main/res/values/styles.xml +12 -0
- package/dist/docs.json +234 -0
- package/dist/esm/definitions.d.ts +34 -0
- package/dist/esm/definitions.js +8 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +7 -0
- package/dist/esm/web.js +16 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +40 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +43 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/Enums.swift +64 -0
- package/ios/Plugin/InAppBrowserPlugin.h +10 -0
- package/ios/Plugin/InAppBrowserPlugin.m +14 -0
- package/ios/Plugin/InAppBrowserPlugin.swift +191 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/WKWebViewController.swift +782 -0
- package/package.json +78 -0
|
@@ -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"
|
|
5
|
+
android:viewportHeight="24">
|
|
6
|
+
<path
|
|
7
|
+
android:fillColor="@color/disable"
|
|
8
|
+
android:pathData="M5.88,4.12L13.76,12l-7.88,7.88L8,22l10,-10L8,2z"/>
|
|
9
|
+
</vector>
|
|
@@ -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"
|
|
5
|
+
android:viewportHeight="24">
|
|
6
|
+
<path
|
|
7
|
+
android:fillColor="@color/enable"
|
|
8
|
+
android:pathData="M5.88,4.12L13.76,12l-7.88,7.88L8,22l10,-10L8,2z"/>
|
|
9
|
+
</vector>
|
|
@@ -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"
|
|
5
|
+
android:viewportHeight="24">
|
|
6
|
+
<path
|
|
7
|
+
android:fillColor="@color/enable"
|
|
8
|
+
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
|
9
|
+
</vector>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
5
|
+
android:layout_width="match_parent"
|
|
6
|
+
android:layout_height="match_parent"
|
|
7
|
+
tools:context="com.cap.browser.plugin.WebViewActivity">
|
|
8
|
+
|
|
9
|
+
<android.support.design.widget.AppBarLayout
|
|
10
|
+
android:layout_width="match_parent"
|
|
11
|
+
android:layout_height="wrap_content"
|
|
12
|
+
android:theme="@style/AppTheme.AppBarOverlay">
|
|
13
|
+
|
|
14
|
+
<include
|
|
15
|
+
android:id="@+id/tool_bar"
|
|
16
|
+
layout="@layout/tool_bar" />
|
|
17
|
+
|
|
18
|
+
</android.support.design.widget.AppBarLayout>
|
|
19
|
+
|
|
20
|
+
<include layout="@layout/content_browser" />
|
|
21
|
+
|
|
22
|
+
</android.support.design.widget.CoordinatorLayout>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
5
|
+
android:layout_width="match_parent"
|
|
6
|
+
android:layout_height="match_parent"
|
|
7
|
+
tools:context="com.getcapacitor.BridgeActivity"
|
|
8
|
+
>
|
|
9
|
+
|
|
10
|
+
<WebView
|
|
11
|
+
android:id="@+id/webview"
|
|
12
|
+
android:layout_width="fill_parent"
|
|
13
|
+
android:layout_height="fill_parent" />
|
|
14
|
+
|
|
15
|
+
</android.support.design.widget.CoordinatorLayout>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
5
|
+
android:layout_width="match_parent"
|
|
6
|
+
android:layout_height="match_parent"
|
|
7
|
+
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
|
8
|
+
tools:context="com.cap.browser.plugin.WebViewActivity"
|
|
9
|
+
tools:showIn="@layout/activity_browser">
|
|
10
|
+
|
|
11
|
+
<WebView
|
|
12
|
+
android:id="@+id/browser_view"
|
|
13
|
+
android:layout_width="match_parent"
|
|
14
|
+
android:layout_height="match_parent"/>
|
|
15
|
+
|
|
16
|
+
</android.support.constraint.ConstraintLayout>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
4
|
+
android:layout_width="match_parent"
|
|
5
|
+
android:layout_height="wrap_content"
|
|
6
|
+
android:background="#eeeeef"
|
|
7
|
+
android:elevation="4dp"
|
|
8
|
+
app:titleTextColor="#262626">
|
|
9
|
+
|
|
10
|
+
<ImageButton
|
|
11
|
+
android:id="@+id/closeButton"
|
|
12
|
+
android:layout_width="wrap_content"
|
|
13
|
+
android:layout_height="wrap_content"
|
|
14
|
+
android:src="@drawable/ic_clear_24px"
|
|
15
|
+
android:layout_gravity="start"
|
|
16
|
+
android:background="#eeeeef"
|
|
17
|
+
android:contentDescription="@string/close_button" />
|
|
18
|
+
|
|
19
|
+
<TextView
|
|
20
|
+
android:id="@+id/titleText"
|
|
21
|
+
android:layout_width="wrap_content"
|
|
22
|
+
android:layout_height="wrap_content"
|
|
23
|
+
android:layout_gravity="center_horizontal"
|
|
24
|
+
android:text="@string/title"
|
|
25
|
+
android:maxLines="5"
|
|
26
|
+
android:ellipsize="end"
|
|
27
|
+
android:singleLine="false"
|
|
28
|
+
android:textColor="#262626" />
|
|
29
|
+
|
|
30
|
+
<ImageButton
|
|
31
|
+
android:id="@+id/forwardButton"
|
|
32
|
+
android:layout_width="wrap_content"
|
|
33
|
+
android:layout_height="wrap_content"
|
|
34
|
+
android:layout_gravity="end"
|
|
35
|
+
android:background="#eeeeef"
|
|
36
|
+
android:contentDescription="@string/forward_button"
|
|
37
|
+
android:paddingLeft="10dp"
|
|
38
|
+
android:paddingRight="10dp"
|
|
39
|
+
android:src="@drawable/arrow_forward_disabled" />
|
|
40
|
+
|
|
41
|
+
<ImageButton
|
|
42
|
+
android:id="@+id/backButton"
|
|
43
|
+
android:layout_width="wrap_content"
|
|
44
|
+
android:layout_height="wrap_content"
|
|
45
|
+
android:layout_gravity="end"
|
|
46
|
+
android:background="#eeeeef"
|
|
47
|
+
android:contentDescription="@string/back_button"
|
|
48
|
+
android:paddingRight="10dp"
|
|
49
|
+
android:src="@drawable/arrow_back_disabled" />
|
|
50
|
+
</android.support.v7.widget.Toolbar>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<resources>
|
|
2
|
+
<string name="my_string">Just a simple string</string>
|
|
3
|
+
<string name="title_activity_browser">BrowserActivity</string>
|
|
4
|
+
<string name="title_activity_basic">BasicActivity</string>
|
|
5
|
+
<string name="close_button">Close Button</string>
|
|
6
|
+
<string name="back_button">Back Button</string>
|
|
7
|
+
<string name="title">Title</string>
|
|
8
|
+
<string name="forward_button">Forward Button</string>
|
|
9
|
+
</resources>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<resources>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<style name="AppTheme.NoActionBar">
|
|
5
|
+
<item name="windowActionBar">false</item>
|
|
6
|
+
<item name="windowNoTitle">true</item>
|
|
7
|
+
</style>
|
|
8
|
+
|
|
9
|
+
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
|
10
|
+
|
|
11
|
+
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
|
12
|
+
</resources>
|
package/dist/docs.json
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"name": "InAppBrowserPlugin",
|
|
4
|
+
"slug": "inappbrowserplugin",
|
|
5
|
+
"docs": "",
|
|
6
|
+
"tags": [],
|
|
7
|
+
"methods": [
|
|
8
|
+
{
|
|
9
|
+
"name": "open",
|
|
10
|
+
"signature": "(options: OpenOptions) => Promise<any>",
|
|
11
|
+
"parameters": [
|
|
12
|
+
{
|
|
13
|
+
"name": "options",
|
|
14
|
+
"docs": "",
|
|
15
|
+
"type": "OpenOptions"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"returns": "Promise<any>",
|
|
19
|
+
"tags": [],
|
|
20
|
+
"docs": "",
|
|
21
|
+
"complexTypes": [
|
|
22
|
+
"OpenOptions"
|
|
23
|
+
],
|
|
24
|
+
"slug": "open"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "close",
|
|
28
|
+
"signature": "() => Promise<any>",
|
|
29
|
+
"parameters": [],
|
|
30
|
+
"returns": "Promise<any>",
|
|
31
|
+
"tags": [],
|
|
32
|
+
"docs": "",
|
|
33
|
+
"complexTypes": [],
|
|
34
|
+
"slug": "close"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "openWebView",
|
|
38
|
+
"signature": "(options: OpenWebViewOptions) => Promise<any>",
|
|
39
|
+
"parameters": [
|
|
40
|
+
{
|
|
41
|
+
"name": "options",
|
|
42
|
+
"docs": "",
|
|
43
|
+
"type": "OpenWebViewOptions"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"returns": "Promise<any>",
|
|
47
|
+
"tags": [],
|
|
48
|
+
"docs": "",
|
|
49
|
+
"complexTypes": [
|
|
50
|
+
"OpenWebViewOptions"
|
|
51
|
+
],
|
|
52
|
+
"slug": "openwebview"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"properties": []
|
|
56
|
+
},
|
|
57
|
+
"interfaces": [
|
|
58
|
+
{
|
|
59
|
+
"name": "OpenOptions",
|
|
60
|
+
"slug": "openoptions",
|
|
61
|
+
"docs": "",
|
|
62
|
+
"tags": [],
|
|
63
|
+
"methods": [],
|
|
64
|
+
"properties": [
|
|
65
|
+
{
|
|
66
|
+
"name": "url",
|
|
67
|
+
"tags": [],
|
|
68
|
+
"docs": "",
|
|
69
|
+
"complexTypes": [],
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "headers",
|
|
74
|
+
"tags": [],
|
|
75
|
+
"docs": "",
|
|
76
|
+
"complexTypes": [
|
|
77
|
+
"Headers"
|
|
78
|
+
],
|
|
79
|
+
"type": "Headers"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "isPresentAfterPageLoad",
|
|
83
|
+
"tags": [],
|
|
84
|
+
"docs": "",
|
|
85
|
+
"complexTypes": [],
|
|
86
|
+
"type": "boolean | undefined"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "Headers",
|
|
92
|
+
"slug": "headers",
|
|
93
|
+
"docs": "",
|
|
94
|
+
"tags": [],
|
|
95
|
+
"methods": [],
|
|
96
|
+
"properties": []
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "OpenWebViewOptions",
|
|
100
|
+
"slug": "openwebviewoptions",
|
|
101
|
+
"docs": "",
|
|
102
|
+
"tags": [],
|
|
103
|
+
"methods": [],
|
|
104
|
+
"properties": [
|
|
105
|
+
{
|
|
106
|
+
"name": "url",
|
|
107
|
+
"tags": [],
|
|
108
|
+
"docs": "",
|
|
109
|
+
"complexTypes": [],
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "headers",
|
|
114
|
+
"tags": [],
|
|
115
|
+
"docs": "",
|
|
116
|
+
"complexTypes": [
|
|
117
|
+
"Headers"
|
|
118
|
+
],
|
|
119
|
+
"type": "Headers"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "shareDisclaimer",
|
|
123
|
+
"tags": [],
|
|
124
|
+
"docs": "",
|
|
125
|
+
"complexTypes": [
|
|
126
|
+
"DisclaimerOptions"
|
|
127
|
+
],
|
|
128
|
+
"type": "DisclaimerOptions"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "toolbarType",
|
|
132
|
+
"tags": [],
|
|
133
|
+
"docs": "",
|
|
134
|
+
"complexTypes": [
|
|
135
|
+
"ToolBarType"
|
|
136
|
+
],
|
|
137
|
+
"type": "ToolBarType"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "shareSubject",
|
|
141
|
+
"tags": [],
|
|
142
|
+
"docs": "",
|
|
143
|
+
"complexTypes": [],
|
|
144
|
+
"type": "string | undefined"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "title",
|
|
148
|
+
"tags": [],
|
|
149
|
+
"docs": "",
|
|
150
|
+
"complexTypes": [],
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "isPresentAfterPageLoad",
|
|
155
|
+
"tags": [],
|
|
156
|
+
"docs": "",
|
|
157
|
+
"complexTypes": [],
|
|
158
|
+
"type": "boolean | undefined"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "DisclaimerOptions",
|
|
164
|
+
"slug": "disclaimeroptions",
|
|
165
|
+
"docs": "",
|
|
166
|
+
"tags": [],
|
|
167
|
+
"methods": [],
|
|
168
|
+
"properties": [
|
|
169
|
+
{
|
|
170
|
+
"name": "title",
|
|
171
|
+
"tags": [],
|
|
172
|
+
"docs": "",
|
|
173
|
+
"complexTypes": [],
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "message",
|
|
178
|
+
"tags": [],
|
|
179
|
+
"docs": "",
|
|
180
|
+
"complexTypes": [],
|
|
181
|
+
"type": "string"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "confirmBtn",
|
|
185
|
+
"tags": [],
|
|
186
|
+
"docs": "",
|
|
187
|
+
"complexTypes": [],
|
|
188
|
+
"type": "string"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "cancelBtn",
|
|
192
|
+
"tags": [],
|
|
193
|
+
"docs": "",
|
|
194
|
+
"complexTypes": [],
|
|
195
|
+
"type": "string"
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"enums": [
|
|
201
|
+
{
|
|
202
|
+
"name": "ToolBarType",
|
|
203
|
+
"slug": "toolbartype",
|
|
204
|
+
"members": [
|
|
205
|
+
{
|
|
206
|
+
"name": "ACTIVITY",
|
|
207
|
+
"value": "\"activity\"",
|
|
208
|
+
"tags": [],
|
|
209
|
+
"docs": ""
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "NAVIGATION",
|
|
213
|
+
"value": "\"navigation\"",
|
|
214
|
+
"tags": [],
|
|
215
|
+
"docs": ""
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "BLANK",
|
|
219
|
+
"value": "\"blank\"",
|
|
220
|
+
"tags": [],
|
|
221
|
+
"docs": ""
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "DEFAULT",
|
|
225
|
+
"value": "\"\"",
|
|
226
|
+
"tags": [],
|
|
227
|
+
"docs": ""
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"typeAliases": [],
|
|
233
|
+
"pluginConfigs": []
|
|
234
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare enum ToolBarType {
|
|
2
|
+
ACTIVITY = "activity",
|
|
3
|
+
NAVIGATION = "navigation",
|
|
4
|
+
BLANK = "blank",
|
|
5
|
+
DEFAULT = ""
|
|
6
|
+
}
|
|
7
|
+
export interface Headers {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
}
|
|
10
|
+
export interface OpenOptions {
|
|
11
|
+
url: string;
|
|
12
|
+
headers?: Headers;
|
|
13
|
+
isPresentAfterPageLoad?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface DisclaimerOptions {
|
|
16
|
+
title: string;
|
|
17
|
+
message: string;
|
|
18
|
+
confirmBtn: string;
|
|
19
|
+
cancelBtn: string;
|
|
20
|
+
}
|
|
21
|
+
export interface OpenWebViewOptions {
|
|
22
|
+
url: string;
|
|
23
|
+
headers?: Headers;
|
|
24
|
+
shareDisclaimer?: DisclaimerOptions;
|
|
25
|
+
toolbarType?: ToolBarType;
|
|
26
|
+
shareSubject?: string;
|
|
27
|
+
title: string;
|
|
28
|
+
isPresentAfterPageLoad?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface InAppBrowserPlugin {
|
|
31
|
+
open(options: OpenOptions): Promise<any>;
|
|
32
|
+
close(): Promise<any>;
|
|
33
|
+
openWebView(options: OpenWebViewOptions): Promise<any>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var ToolBarType;
|
|
2
|
+
(function (ToolBarType) {
|
|
3
|
+
ToolBarType["ACTIVITY"] = "activity";
|
|
4
|
+
ToolBarType["NAVIGATION"] = "navigation";
|
|
5
|
+
ToolBarType["BLANK"] = "blank";
|
|
6
|
+
ToolBarType["DEFAULT"] = "";
|
|
7
|
+
})(ToolBarType || (ToolBarType = {}));
|
|
8
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,wCAAyB,CAAA;IACzB,8BAAe,CAAA;IACf,2BAAY,CAAA;AACd,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB","sourcesContent":["export enum ToolBarType {\n ACTIVITY = \"activity\",\n NAVIGATION = \"navigation\",\n BLANK = \"blank\",\n DEFAULT = \"\"\n}\n\nexport interface Headers {\n [key: string] : string;\n}\n\nexport interface OpenOptions {\n url: string;\n headers?: Headers;\n isPresentAfterPageLoad?: boolean;\n}\n\nexport interface DisclaimerOptions {\n title: string;\n message: string;\n confirmBtn: string;\n cancelBtn: string;\n}\n\nexport interface OpenWebViewOptions {\n url: string;\n headers?: Headers;\n shareDisclaimer?: DisclaimerOptions;\n toolbarType?: ToolBarType;\n shareSubject?: string;\n title: string;\n isPresentAfterPageLoad?: boolean;\n}\nexport interface InAppBrowserPlugin {\n open(options: OpenOptions): Promise<any>;\n close(): Promise<any>;\n openWebView(options: OpenWebViewOptions): Promise<any>;\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { registerPlugin } from '@capacitor/core';
|
|
2
|
+
const InAppBrowser = registerPlugin('InAppBrowser', {
|
|
3
|
+
web: () => import('./web').then(m => new m.InAppBrowserWeb()),
|
|
4
|
+
});
|
|
5
|
+
export * from './definitions';
|
|
6
|
+
export { InAppBrowser };
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { InAppBrowserPlugin } from './definitions';\n\nconst InAppBrowser = registerPlugin<InAppBrowserPlugin>('InAppBrowser', {\n web: () => import('./web').then(m => new m.InAppBrowserWeb()),\n});\n\nexport * from './definitions';\nexport { InAppBrowser };\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
import type { InAppBrowserPlugin, OpenWebViewOptions, OpenOptions } from './definitions';
|
|
3
|
+
export declare class InAppBrowserWeb extends WebPlugin implements InAppBrowserPlugin {
|
|
4
|
+
open(options: OpenOptions): Promise<any>;
|
|
5
|
+
openWebView(options: OpenWebViewOptions): Promise<any>;
|
|
6
|
+
close(): Promise<any>;
|
|
7
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
export class InAppBrowserWeb extends WebPlugin {
|
|
3
|
+
async open(options) {
|
|
4
|
+
console.log('open', options);
|
|
5
|
+
return options;
|
|
6
|
+
}
|
|
7
|
+
async openWebView(options) {
|
|
8
|
+
console.log('openWebView', options);
|
|
9
|
+
return options;
|
|
10
|
+
}
|
|
11
|
+
async close() {
|
|
12
|
+
console.log('close');
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,OAA2B;QAC3C,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QACpC,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,KAAK,CAAC,KAAK;QACT,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { InAppBrowserPlugin, OpenWebViewOptions, OpenOptions } from './definitions';\n\nexport class InAppBrowserWeb extends WebPlugin implements InAppBrowserPlugin {\n async open(options: OpenOptions): Promise<any> {\n console.log('open', options);\n return options;\n }\n async openWebView(options: OpenWebViewOptions): Promise<any> {\n console.log('openWebView', options);\n return options;\n }\n async close(): Promise<any> {\n console.log('close');\n return;\n }\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var core = require('@capacitor/core');
|
|
6
|
+
|
|
7
|
+
exports.ToolBarType = void 0;
|
|
8
|
+
(function (ToolBarType) {
|
|
9
|
+
ToolBarType["ACTIVITY"] = "activity";
|
|
10
|
+
ToolBarType["NAVIGATION"] = "navigation";
|
|
11
|
+
ToolBarType["BLANK"] = "blank";
|
|
12
|
+
ToolBarType["DEFAULT"] = "";
|
|
13
|
+
})(exports.ToolBarType || (exports.ToolBarType = {}));
|
|
14
|
+
|
|
15
|
+
const InAppBrowser = core.registerPlugin('InAppBrowser', {
|
|
16
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.InAppBrowserWeb()),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
class InAppBrowserWeb extends core.WebPlugin {
|
|
20
|
+
async open(options) {
|
|
21
|
+
console.log('open', options);
|
|
22
|
+
return options;
|
|
23
|
+
}
|
|
24
|
+
async openWebView(options) {
|
|
25
|
+
console.log('openWebView', options);
|
|
26
|
+
return options;
|
|
27
|
+
}
|
|
28
|
+
async close() {
|
|
29
|
+
console.log('close');
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
35
|
+
__proto__: null,
|
|
36
|
+
InAppBrowserWeb: InAppBrowserWeb
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
exports.InAppBrowser = InAppBrowser;
|
|
40
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ToolBarType;\n(function (ToolBarType) {\n ToolBarType[\"ACTIVITY\"] = \"activity\";\n ToolBarType[\"NAVIGATION\"] = \"navigation\";\n ToolBarType[\"BLANK\"] = \"blank\";\n ToolBarType[\"DEFAULT\"] = \"\";\n})(ToolBarType || (ToolBarType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst InAppBrowser = registerPlugin('InAppBrowser', {\n web: () => import('./web').then(m => new m.InAppBrowserWeb()),\n});\nexport * from './definitions';\nexport { InAppBrowser };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class InAppBrowserWeb extends WebPlugin {\n async open(options) {\n console.log('open', options);\n return options;\n }\n async openWebView(options) {\n console.log('openWebView', options);\n return options;\n }\n async close() {\n console.log('close');\n return;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ToolBarType","registerPlugin","WebPlugin"],"mappings":";;;;;;AAAWA,6BAAY;AACvB,CAAC,UAAU,WAAW,EAAE;AACxB,IAAI,WAAW,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;AACzC,IAAI,WAAW,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC;AAC7C,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AACnC,IAAI,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;AAChC,CAAC,EAAEA,mBAAW,KAAKA,mBAAW,GAAG,EAAE,CAAC,CAAC;;ACLhC,MAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;AACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,eAAe,SAASC,cAAS,CAAC;AAC/C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AAC5C,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC7B,QAAQ,OAAO;AACf,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var capacitorInAppBrowser = (function (exports, core) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
exports.ToolBarType = void 0;
|
|
5
|
+
(function (ToolBarType) {
|
|
6
|
+
ToolBarType["ACTIVITY"] = "activity";
|
|
7
|
+
ToolBarType["NAVIGATION"] = "navigation";
|
|
8
|
+
ToolBarType["BLANK"] = "blank";
|
|
9
|
+
ToolBarType["DEFAULT"] = "";
|
|
10
|
+
})(exports.ToolBarType || (exports.ToolBarType = {}));
|
|
11
|
+
|
|
12
|
+
const InAppBrowser = core.registerPlugin('InAppBrowser', {
|
|
13
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.InAppBrowserWeb()),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
class InAppBrowserWeb extends core.WebPlugin {
|
|
17
|
+
async open(options) {
|
|
18
|
+
console.log('open', options);
|
|
19
|
+
return options;
|
|
20
|
+
}
|
|
21
|
+
async openWebView(options) {
|
|
22
|
+
console.log('openWebView', options);
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
async close() {
|
|
26
|
+
console.log('close');
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
32
|
+
__proto__: null,
|
|
33
|
+
InAppBrowserWeb: InAppBrowserWeb
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
exports.InAppBrowser = InAppBrowser;
|
|
37
|
+
|
|
38
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
39
|
+
|
|
40
|
+
return exports;
|
|
41
|
+
|
|
42
|
+
})({}, capacitorExports);
|
|
43
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ToolBarType;\n(function (ToolBarType) {\n ToolBarType[\"ACTIVITY\"] = \"activity\";\n ToolBarType[\"NAVIGATION\"] = \"navigation\";\n ToolBarType[\"BLANK\"] = \"blank\";\n ToolBarType[\"DEFAULT\"] = \"\";\n})(ToolBarType || (ToolBarType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst InAppBrowser = registerPlugin('InAppBrowser', {\n web: () => import('./web').then(m => new m.InAppBrowserWeb()),\n});\nexport * from './definitions';\nexport { InAppBrowser };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class InAppBrowserWeb extends WebPlugin {\n async open(options) {\n console.log('open', options);\n return options;\n }\n async openWebView(options) {\n console.log('openWebView', options);\n return options;\n }\n async close() {\n console.log('close');\n return;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ToolBarType","registerPlugin","WebPlugin"],"mappings":";;;AAAWA,iCAAY;IACvB,CAAC,UAAU,WAAW,EAAE;IACxB,IAAI,WAAW,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC;IACzC,IAAI,WAAW,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC;IAC7C,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IACnC,IAAI,WAAW,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;IAChC,CAAC,EAAEA,mBAAW,KAAKA,mBAAW,GAAG,EAAE,CAAC,CAAC;;ACLhC,UAAC,YAAY,GAAGC,mBAAc,CAAC,cAAc,EAAE;IACpD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,eAAe,SAASC,cAAS,CAAC;IAC/C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK;IACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC5C,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK;IACL,IAAI,MAAM,KAAK,GAAG;IAClB,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,OAAO;IACf,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|