@aigens/aigens-sdk-core 0.4.1 → 0.4.3
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/README.md +3 -3
- package/android/src/main/java/com/aigens/sdk/WebContainerActivity.java +5 -2
- package/dist/docs.json +2 -2
- package/dist/esm/definitions.d.ts +1 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +1 -1
- package/dist/esm/web.js +1 -1
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/WebContainerViewController.swift +21 -4
- package/package.json +1 -1
package/README.md
CHANGED
@@ -26,7 +26,7 @@ npx cap sync
|
|
26
26
|
* [`getFinishData(...)`](#getfinishdata)
|
27
27
|
* [`setTextZoom(...)`](#settextzoom)
|
28
28
|
* [`readClipboard()`](#readclipboard)
|
29
|
-
* [`
|
29
|
+
* [`addCalendar(...)`](#addcalendar)
|
30
30
|
* [Interfaces](#interfaces)
|
31
31
|
* [Type Aliases](#type-aliases)
|
32
32
|
|
@@ -220,10 +220,10 @@ Promise<any>: { value: string, type: 'text/plain' }
|
|
220
220
|
--------------------
|
221
221
|
|
222
222
|
|
223
|
-
###
|
223
|
+
### addCalendar(...)
|
224
224
|
|
225
225
|
```typescript
|
226
|
-
|
226
|
+
addCalendar(options: CalendarOptions) => Promise<{ notPermission?: boolean; resultCode?: number; }>
|
227
227
|
```
|
228
228
|
|
229
229
|
| Param | Type |
|
@@ -102,6 +102,7 @@ public class WebContainerActivity extends BridgeActivity {
|
|
102
102
|
Uri uri = intent.getData();
|
103
103
|
if (uri != null) {
|
104
104
|
String totalUrl = uri.toString();
|
105
|
+
// Log.i("Jason totalUrl", totalUrl);
|
105
106
|
String redirectUrl = null;
|
106
107
|
String universalLink = null;
|
107
108
|
if (perviousIntent != null) {
|
@@ -113,10 +114,11 @@ public class WebContainerActivity extends BridgeActivity {
|
|
113
114
|
universalLink = null;
|
114
115
|
}
|
115
116
|
}
|
116
|
-
|
117
|
+
// Log.i("Jason totalUrl", totalUrl+universalLink);
|
118
|
+
if (totalUrl != null && totalUrl.indexOf("redirect=") >= 0) {
|
117
119
|
redirectUrl = totalUrl.split("redirect=")[1];
|
118
120
|
}
|
119
|
-
if (
|
121
|
+
if (totalUrl != null && totalUrl.indexOf("aigensRedirect/") >= 0) {
|
120
122
|
redirectUrl = totalUrl.split("aigensRedirect/")[1];
|
121
123
|
}
|
122
124
|
// Log.i("getRedirectUrl", totalUrl);
|
@@ -126,6 +128,7 @@ public class WebContainerActivity extends BridgeActivity {
|
|
126
128
|
if (!redirectUrl.startsWith("http://") && !redirectUrl.startsWith("https://")) {
|
127
129
|
redirectUrl = "https://" + redirectUrl;
|
128
130
|
}
|
131
|
+
Log.i("Jason redirectUrl", redirectUrl);
|
129
132
|
return redirectUrl;
|
130
133
|
} else {
|
131
134
|
// Log.i("getRedirectUrl", "null");
|
package/dist/docs.json
CHANGED
@@ -207,7 +207,7 @@
|
|
207
207
|
"slug": "readclipboard"
|
208
208
|
},
|
209
209
|
{
|
210
|
-
"name": "
|
210
|
+
"name": "addCalendar",
|
211
211
|
"signature": "(options: CalendarOptions) => Promise<{ notPermission?: boolean; resultCode?: number; }>",
|
212
212
|
"parameters": [
|
213
213
|
{
|
@@ -222,7 +222,7 @@
|
|
222
222
|
"complexTypes": [
|
223
223
|
"CalendarOptions"
|
224
224
|
],
|
225
|
-
"slug": "
|
225
|
+
"slug": "addcalendar"
|
226
226
|
}
|
227
227
|
],
|
228
228
|
"properties": []
|
@@ -36,7 +36,7 @@ export interface CorePlugin {
|
|
36
36
|
* Promise<any>: { value: string, type: 'text/plain' }
|
37
37
|
*/
|
38
38
|
readClipboard(): Promise<any>;
|
39
|
-
|
39
|
+
addCalendar(options: CalendarOptions): Promise<{
|
40
40
|
notPermission?: boolean;
|
41
41
|
resultCode?: number;
|
42
42
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PermissionState } from '@capacitor/core';\nexport interface CorePlugin {\n echo(options: any): Promise<any>;\n dismiss(options: any): Promise<any>;\n finish(options: any): Promise<any>;\n getMember(options: any): Promise<{ member: Member }>;\n getDeeplink(options: any): Promise<{ deeplink: Deeplink }>;\n openBrowser(options: any): Promise<any>;\n isInstalledApp(options: { key: string }): Promise<{ install: boolean }>;\n getIsProductionEnvironment(): Promise<{ isPrd: boolean }>;\n openExternalUrl(options: { url: string }): Promise<any>;\n checkNotificationPermissions(): Promise<PermissionStatus>;\n getFinishData(options: any): Promise<{closedData: any}>;\n /**\n *\n * @param value : 0 - 1\n */\n setTextZoom(options: { value: number }): Promise<any>;\n\n /**\n * Promise<any>: { value: string, type: 'text/plain' }\n */\n readClipboard(): Promise<any>;\n\n
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PermissionState } from '@capacitor/core';\nexport interface CorePlugin {\n echo(options: any): Promise<any>;\n dismiss(options: any): Promise<any>;\n finish(options: any): Promise<any>;\n getMember(options: any): Promise<{ member: Member }>;\n getDeeplink(options: any): Promise<{ deeplink: Deeplink }>;\n openBrowser(options: any): Promise<any>;\n isInstalledApp(options: { key: string }): Promise<{ install: boolean }>;\n getIsProductionEnvironment(): Promise<{ isPrd: boolean }>;\n openExternalUrl(options: { url: string }): Promise<any>;\n checkNotificationPermissions(): Promise<PermissionStatus>;\n getFinishData(options: any): Promise<{closedData: any}>;\n /**\n *\n * @param value : 0 - 1\n */\n setTextZoom(options: { value: number }): Promise<any>;\n\n /**\n * Promise<any>: { value: string, type: 'text/plain' }\n */\n readClipboard(): Promise<any>;\n\n addCalendar(options: CalendarOptions): Promise<{notPermission?: boolean, resultCode?: number}>;\n}\nexport interface CalendarOptions {\n title: string,\n isAllDay?: boolean,\n beginTime?: number,\n endTime?: number,\n location?: string,\n notes?: string\n}\n\nexport interface Member {\n \"memberCode\"?: string;\n \"source\"?: string;\n \"sessionId\"?: string;\n \"pushId\"?: string;\n \"deviceId\": string;\n \"universalLink\"?: string;\n \"appleMerchantId\"?: string;\n \"cachedOrderContext\"?: boolean;\n \"name\"?: string;\n \"email\"?: string;\n \"phone\"?: string;\n}\nexport interface Deeplink {\n \"addItemId\"?: string;\n \"addDiscountCode\"?: string;\n \"addOfferId\"?: string;\n}\n\nexport interface PermissionStatus {\n display: PermissionState;\n}\n\n"]}
|
package/dist/esm/web.d.ts
CHANGED
@@ -30,7 +30,7 @@ export declare class CoreWeb extends WebPlugin implements CorePlugin {
|
|
30
30
|
value: number;
|
31
31
|
}): Promise<any>;
|
32
32
|
readClipboard(): Promise<any>;
|
33
|
-
|
33
|
+
addCalendar(options: CalendarOptions): Promise<{
|
34
34
|
notPermission?: boolean;
|
35
35
|
resultCode?: number;
|
36
36
|
}>;
|
package/dist/esm/web.js
CHANGED
@@ -70,7 +70,7 @@ export class CoreWeb extends WebPlugin {
|
|
70
70
|
const text = await navigator.clipboard.readText();
|
71
71
|
return { value: text, type: 'text/plain' };
|
72
72
|
}
|
73
|
-
async
|
73
|
+
async addCalendar(options) {
|
74
74
|
options;
|
75
75
|
return { notPermission: true };
|
76
76
|
}
|
package/dist/esm/web.js.map
CHANGED
@@ -1 +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,OAAQ,SAAQ,SAAS;IAClC,KAAK,CAAC,IAAI,CAAC,OAAY;QACnB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAY;;QACxB,OAAO,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AO;YACH,IAAI,EAAE,IAAI;SACb,CAAA;IACL,CAAC;IAED,KAAK,CAAC,0BAA0B;QAC5B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,4BAA4B;QAC9B,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAAY;QAC5B,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAA;IAClC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAA0B;QACxC,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YACjC,IAAI;gBACA,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC;aACpF;YAAC,OAAO,KAAK,EAAE;aACf;SACJ;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,aAAa;QACf,IACI,OAAO,SAAS,KAAK,WAAW;YAChC,CAAC,SAAS,CAAC,SAAS;YACpB,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,EAC/B;YACE,MAAM,IAAI,CAAC,WAAW,CAClB,sDAAsD,CACzD,CAAC;SACL;QAED,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAClD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAwB;QACtC,OAAO,CAAA;QACP,OAAO,EAAC,aAAa,EAAE,IAAI,EAAC,CAAA;IAChC,CAAC;CAEJ","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { CalendarOptions, CorePlugin, Deeplink, Member, PermissionStatus } from './definitions';\n\n\nexport class CoreWeb extends WebPlugin implements CorePlugin {\n async echo(options: any): Promise<any> {\n console.log('ECHO', options);\n return options;\n }\n\n async getMember(options: any): Promise<{ member: Member }> {\n console.log('GET MEMBER', options);\n var result = {} as any;\n var w = window as any;\n result.member = w.aigens?.context?.member;\n return result;\n }\n async getDeeplink(options: any): Promise<{ deeplink: Deeplink }> {\n console.log('GET Deeplink', options);\n var result = {} as any;\n var w = window as any;\n result.deeplink = w.aigens?.context?.deeplink;\n return result;\n }\n\n async dismiss(options: any): Promise<any> {\n console.log('DISMISS', options);\n return options;\n }\n\n async finish(options: any): Promise<any> {\n console.log('FINISH', options);\n return options;\n }\n\n async openBrowser(options: any): Promise<any> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async isInstalledApp(options: { key: string }): Promise<{ install: boolean }> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async openExternalUrl(options: { url: string }): Promise<any> {\n window.open(options.url, \"_blank\");\n return {\n open: true\n }\n }\n\n async getIsProductionEnvironment(): Promise<{ isPrd: boolean }> {\n return { isPrd: true };\n }\n\n async checkNotificationPermissions(): Promise<PermissionStatus> {\n throw new Error('checkNotificationPermissions not supported in browser.');\n }\n\n async getFinishData(options: any): Promise<{ closedData: any }> {\n return { closedData: options }\n }\n\n async setTextZoom(options: { value: number }): Promise<any> {\n if (typeof document !== 'undefined') {\n try {\n document.body.style.webkitTextSizeAdjust = `${Math.round(options.value * 100)}%`;\n } catch (error) {\n }\n }\n return options;\n }\n\n async readClipboard(): Promise<any> {\n if (\n typeof navigator === 'undefined' ||\n !navigator.clipboard ||\n !navigator.clipboard.readText\n ) {\n throw this.unavailable(\n 'Reading from clipboard not supported in this browser',\n );\n }\n\n const text = await navigator.clipboard.readText();\n return { value: text, type: 'text/plain' };\n }\n\n async
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,OAAQ,SAAQ,SAAS;IAClC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a,EAAE,IAAI,EAAC,CAAA;IAChC,CAAC;CAEJ","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { CalendarOptions, CorePlugin, Deeplink, Member, PermissionStatus } from './definitions';\n\n\nexport class CoreWeb extends WebPlugin implements CorePlugin {\n async echo(options: any): Promise<any> {\n console.log('ECHO', options);\n return options;\n }\n\n async getMember(options: any): Promise<{ member: Member }> {\n console.log('GET MEMBER', options);\n var result = {} as any;\n var w = window as any;\n result.member = w.aigens?.context?.member;\n return result;\n }\n async getDeeplink(options: any): Promise<{ deeplink: Deeplink }> {\n console.log('GET Deeplink', options);\n var result = {} as any;\n var w = window as any;\n result.deeplink = w.aigens?.context?.deeplink;\n return result;\n }\n\n async dismiss(options: any): Promise<any> {\n console.log('DISMISS', options);\n return options;\n }\n\n async finish(options: any): Promise<any> {\n console.log('FINISH', options);\n return options;\n }\n\n async openBrowser(options: any): Promise<any> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async isInstalledApp(options: { key: string }): Promise<{ install: boolean }> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async openExternalUrl(options: { url: string }): Promise<any> {\n window.open(options.url, \"_blank\");\n return {\n open: true\n }\n }\n\n async getIsProductionEnvironment(): Promise<{ isPrd: boolean }> {\n return { isPrd: true };\n }\n\n async checkNotificationPermissions(): Promise<PermissionStatus> {\n throw new Error('checkNotificationPermissions not supported in browser.');\n }\n\n async getFinishData(options: any): Promise<{ closedData: any }> {\n return { closedData: options }\n }\n\n async setTextZoom(options: { value: number }): Promise<any> {\n if (typeof document !== 'undefined') {\n try {\n document.body.style.webkitTextSizeAdjust = `${Math.round(options.value * 100)}%`;\n } catch (error) {\n }\n }\n return options;\n }\n\n async readClipboard(): Promise<any> {\n if (\n typeof navigator === 'undefined' ||\n !navigator.clipboard ||\n !navigator.clipboard.readText\n ) {\n throw this.unavailable(\n 'Reading from clipboard not supported in this browser',\n );\n }\n\n const text = await navigator.clipboard.readText();\n return { value: text, type: 'text/plain' };\n }\n\n async addCalendar(options: CalendarOptions): Promise<{notPermission?: boolean, resultCode?: number}> {\n options\n return {notPermission: true}\n }\n\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
package/dist/plugin.cjs.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Core = registerPlugin('Core', {\n web: () => import('./web').then(m => new m.CoreWeb()),\n});\nexport * from './definitions';\nexport { Core };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CoreWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async getMember(options) {\n var _a, _b;\n console.log('GET MEMBER', options);\n var result = {};\n var w = window;\n result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;\n return result;\n }\n async getDeeplink(options) {\n var _a, _b;\n console.log('GET Deeplink', options);\n var result = {};\n var w = window;\n result.deeplink = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.deeplink;\n return result;\n }\n async dismiss(options) {\n console.log('DISMISS', options);\n return options;\n }\n async finish(options) {\n console.log('FINISH', options);\n return options;\n }\n async openBrowser(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async isInstalledApp(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async openExternalUrl(options) {\n window.open(options.url, \"_blank\");\n return {\n open: true\n };\n }\n async getIsProductionEnvironment() {\n return { isPrd: true };\n }\n async checkNotificationPermissions() {\n throw new Error('checkNotificationPermissions not supported in browser.');\n }\n async getFinishData(options) {\n return { closedData: options };\n }\n async setTextZoom(options) {\n if (typeof document !== 'undefined') {\n try {\n document.body.style.webkitTextSizeAdjust = `${Math.round(options.value * 100)}%`;\n }\n catch (error) {\n }\n }\n return options;\n }\n async readClipboard() {\n if (typeof navigator === 'undefined' ||\n !navigator.clipboard ||\n !navigator.clipboard.readText) {\n throw this.unavailable('Reading from clipboard not supported in this browser');\n }\n const text = await navigator.clipboard.readText();\n return { value: text, type: 'text/plain' };\n }\n async
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Core = registerPlugin('Core', {\n web: () => import('./web').then(m => new m.CoreWeb()),\n});\nexport * from './definitions';\nexport { Core };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CoreWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async getMember(options) {\n var _a, _b;\n console.log('GET MEMBER', options);\n var result = {};\n var w = window;\n result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;\n return result;\n }\n async getDeeplink(options) {\n var _a, _b;\n console.log('GET Deeplink', options);\n var result = {};\n var w = window;\n result.deeplink = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.deeplink;\n return result;\n }\n async dismiss(options) {\n console.log('DISMISS', options);\n return options;\n }\n async finish(options) {\n console.log('FINISH', options);\n return options;\n }\n async openBrowser(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async isInstalledApp(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async openExternalUrl(options) {\n window.open(options.url, \"_blank\");\n return {\n open: true\n };\n }\n async getIsProductionEnvironment() {\n return { isPrd: true };\n }\n async checkNotificationPermissions() {\n throw new Error('checkNotificationPermissions not supported in browser.');\n }\n async getFinishData(options) {\n return { closedData: options };\n }\n async setTextZoom(options) {\n if (typeof document !== 'undefined') {\n try {\n document.body.style.webkitTextSizeAdjust = `${Math.round(options.value * 100)}%`;\n }\n catch (error) {\n }\n }\n return options;\n }\n async readClipboard() {\n if (typeof navigator === 'undefined' ||\n !navigator.clipboard ||\n !navigator.clipboard.readText) {\n throw this.unavailable('Reading from clipboard not supported in this browser');\n }\n const text = await navigator.clipboard.readText();\n return { value: text, type: 'text/plain' };\n }\n async addCalendar(options) {\n options;\n return { notPermission: true };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;AACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC;;ACFM,MAAM,OAAO,SAASC,cAAS,CAAC;AACvC,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,SAAS,CAAC,OAAO,EAAE;AAC7B,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC;AACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC3C,QAAQ,IAAI,MAAM,GAAG,EAAE,CAAC;AACxB,QAAQ,IAAI,CAAC,GAAG,MAAM,CAAC;AACvB,QAAQ,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;AAC9I,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK;AACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC;AACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,cAAc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,CAAC;AACvC,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
@@ -76,7 +76,7 @@ var capacitorCore = (function (exports, core) {
|
|
76
76
|
const text = await navigator.clipboard.readText();
|
77
77
|
return { value: text, type: 'text/plain' };
|
78
78
|
}
|
79
|
-
async
|
79
|
+
async addCalendar(options) {
|
80
80
|
return { notPermission: true };
|
81
81
|
}
|
82
82
|
}
|
package/dist/plugin.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Core = registerPlugin('Core', {\n web: () => import('./web').then(m => new m.CoreWeb()),\n});\nexport * from './definitions';\nexport { Core };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CoreWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async getMember(options) {\n var _a, _b;\n console.log('GET MEMBER', options);\n var result = {};\n var w = window;\n result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;\n return result;\n }\n async getDeeplink(options) {\n var _a, _b;\n console.log('GET Deeplink', options);\n var result = {};\n var w = window;\n result.deeplink = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.deeplink;\n return result;\n }\n async dismiss(options) {\n console.log('DISMISS', options);\n return options;\n }\n async finish(options) {\n console.log('FINISH', options);\n return options;\n }\n async openBrowser(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async isInstalledApp(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async openExternalUrl(options) {\n window.open(options.url, \"_blank\");\n return {\n open: true\n };\n }\n async getIsProductionEnvironment() {\n return { isPrd: true };\n }\n async checkNotificationPermissions() {\n throw new Error('checkNotificationPermissions not supported in browser.');\n }\n async getFinishData(options) {\n return { closedData: options };\n }\n async setTextZoom(options) {\n if (typeof document !== 'undefined') {\n try {\n document.body.style.webkitTextSizeAdjust = `${Math.round(options.value * 100)}%`;\n }\n catch (error) {\n }\n }\n return options;\n }\n async readClipboard() {\n if (typeof navigator === 'undefined' ||\n !navigator.clipboard ||\n !navigator.clipboard.readText) {\n throw this.unavailable('Reading from clipboard not supported in this browser');\n }\n const text = await navigator.clipboard.readText();\n return { value: text, type: 'text/plain' };\n }\n async
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Core = registerPlugin('Core', {\n web: () => import('./web').then(m => new m.CoreWeb()),\n});\nexport * from './definitions';\nexport { Core };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CoreWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async getMember(options) {\n var _a, _b;\n console.log('GET MEMBER', options);\n var result = {};\n var w = window;\n result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;\n return result;\n }\n async getDeeplink(options) {\n var _a, _b;\n console.log('GET Deeplink', options);\n var result = {};\n var w = window;\n result.deeplink = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.deeplink;\n return result;\n }\n async dismiss(options) {\n console.log('DISMISS', options);\n return options;\n }\n async finish(options) {\n console.log('FINISH', options);\n return options;\n }\n async openBrowser(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async isInstalledApp(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async openExternalUrl(options) {\n window.open(options.url, \"_blank\");\n return {\n open: true\n };\n }\n async getIsProductionEnvironment() {\n return { isPrd: true };\n }\n async checkNotificationPermissions() {\n throw new Error('checkNotificationPermissions not supported in browser.');\n }\n async getFinishData(options) {\n return { closedData: options };\n }\n async setTextZoom(options) {\n if (typeof document !== 'undefined') {\n try {\n document.body.style.webkitTextSizeAdjust = `${Math.round(options.value * 100)}%`;\n }\n catch (error) {\n }\n }\n return options;\n }\n async readClipboard() {\n if (typeof navigator === 'undefined' ||\n !navigator.clipboard ||\n !navigator.clipboard.readText) {\n throw this.unavailable('Reading from clipboard not supported in this browser');\n }\n const text = await navigator.clipboard.readText();\n return { value: text, type: 'text/plain' };\n }\n async addCalendar(options) {\n options;\n return { notPermission: true };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;IACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IACzD,CAAC;;ICFM,MAAM,OAAO,SAASC,cAAS,CAAC;IACvC,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,SAAS,CAAC,OAAO,EAAE;IAC7B,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC;IACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3C,QAAQ,IAAI,MAAM,GAAG,EAAE,CAAC;IACxB,QAAQ,IAAI,CAAC,GAAG,MAAM,CAAC;IACvB,QAAQ,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAC9I,QAAQ,OAAO,MAAM,CAAC;IACtB,KAAK;IACL,IAAI,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Y,EAAE,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;IAE/B,QAAQ,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IACvC,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
@@ -17,6 +17,7 @@ import Capacitor
|
|
17
17
|
private var isFirstError = true
|
18
18
|
private var redirectLink = ""
|
19
19
|
private var universalLink = ""
|
20
|
+
private var appScheme = ""
|
20
21
|
var externalProtocols: [String] = [
|
21
22
|
"octopus://", "alipay://", "alipays://", "alipayhk://", "https://play.google.com", "https://itunes.apple.com", "tel:", "mailto:", "itms-apps://itunes.apple.com", "https://apps.apple.com", "payme://", "weixin://", "hsbcpaymepay://", "mpay://"
|
22
23
|
]
|
@@ -131,6 +132,20 @@ import Capacitor
|
|
131
132
|
NotificationCenter.default.addObserver(self, selector: #selector(self.handleUrlOpened(notification:)), name: Notification.Name.capacitorOpenURL, object: nil)
|
132
133
|
}
|
133
134
|
|
135
|
+
private func isParseUrl(_ url: String) -> Bool {
|
136
|
+
|
137
|
+
if url.contains("aigens=true") || url.contains("aigens/true") {
|
138
|
+
return true;
|
139
|
+
}
|
140
|
+
if !universalLink.isEmpty && url.contains(universalLink) {
|
141
|
+
return true
|
142
|
+
}
|
143
|
+
if !appScheme.isEmpty && url.contains(appScheme) {
|
144
|
+
return true
|
145
|
+
}
|
146
|
+
return false;
|
147
|
+
}
|
148
|
+
|
134
149
|
@objc func handleUrlOpened(notification: NSNotification) {
|
135
150
|
guard let object = notification.object as? [String: Any?] else {
|
136
151
|
return
|
@@ -143,7 +158,8 @@ import Capacitor
|
|
143
158
|
|
144
159
|
url = decodeURIComponent(url);
|
145
160
|
|
146
|
-
|
161
|
+
|
162
|
+
if !isParseUrl(url.absoluteString) {
|
147
163
|
return;
|
148
164
|
}
|
149
165
|
|
@@ -175,8 +191,7 @@ import Capacitor
|
|
175
191
|
|
176
192
|
url = decodeURIComponent(url);
|
177
193
|
|
178
|
-
|
179
|
-
if universalLink.isEmpty || (!url.absoluteString.starts(with: universalLink) && !universalLink.contains("aigens=true") && !universalLink.contains("aigens/true")) {
|
194
|
+
if !isParseUrl(url.absoluteString) {
|
180
195
|
return;
|
181
196
|
}
|
182
197
|
|
@@ -286,6 +301,8 @@ import Capacitor
|
|
286
301
|
|
287
302
|
let member = self.options?["member"] as? Dictionary<String, Any>
|
288
303
|
self.universalLink = member?["universalLink"] as? String ?? ""
|
304
|
+
self.appScheme = member?["appScheme"] as? String ?? ""
|
305
|
+
|
289
306
|
|
290
307
|
CorePlugin.member = member
|
291
308
|
let deeplink = self.options?["deeplink"] as? Dictionary<String, Any>
|
@@ -380,7 +397,7 @@ extension WebContainerViewController: WKNavigationDelegate {
|
|
380
397
|
}
|
381
398
|
|
382
399
|
aigensprint("navURL--:\(navURL)")
|
383
|
-
if
|
400
|
+
if isParseUrl(navURL.absoluteString) {
|
384
401
|
|
385
402
|
if navURL.absoluteString.range(of: "redirect=") != nil, var redirect = navURL.absoluteString.components(separatedBy:"redirect=").last{
|
386
403
|
if !redirect.starts(with: "http://") && !redirect.starts(with: "https://") {
|