@appboxo/capacitor-boxo-sdk 0.7.0 → 0.7.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/README.md +17 -16
- package/android/src/main/java/io/boxo/sdk/capacitor/AppboxoPlugin.kt +5 -0
- package/dist/docs.json +9 -2
- package/dist/esm/definitions.d.ts +6 -2
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/plugin.cjs.js +2 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +2 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/AppboxoPlugin/AppboxoPlugin.swift +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -142,7 +142,7 @@ hideMiniapps() => Promise<void>
|
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen.
|
|
145
|
-
To use this function need to enable 'enableMultitaskMode: true' in
|
|
145
|
+
To use this function need to enable 'enableMultitaskMode: true' in Boxo.setConfig()
|
|
146
146
|
|
|
147
147
|
--------------------
|
|
148
148
|
|
|
@@ -228,16 +228,17 @@ logout() => Promise<void>
|
|
|
228
228
|
|
|
229
229
|
#### OpenMiniappOptions
|
|
230
230
|
|
|
231
|
-
| Prop | Type
|
|
232
|
-
| -------------------- |
|
|
233
|
-
| **`appId`** | <code>string</code>
|
|
234
|
-
| **`data`** | <code>object</code>
|
|
235
|
-
| **`theme`** | <code>'light' \| 'dark' \| 'system'</code>
|
|
236
|
-
| **`extraUrlParams`** | <code>object</code>
|
|
237
|
-
| **`urlSuffix`** | <code>string</code>
|
|
238
|
-
| **`colors`** | <code><a href="#coloroptions">ColorOptions</a></code>
|
|
239
|
-
| **`enableSplash`** | <code>boolean</code>
|
|
240
|
-
| **`saveState`** | <code>boolean</code>
|
|
231
|
+
| Prop | Type | Description |
|
|
232
|
+
| -------------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
233
|
+
| **`appId`** | <code>string</code> | miniapp id |
|
|
234
|
+
| **`data`** | <code>object</code> | (optional) data as Map that is sent to miniapp |
|
|
235
|
+
| **`theme`** | <code>'light' \| 'dark' \| 'system'</code> | (optional) miniapp theme "dark" \| "light" (by default is system theme) |
|
|
236
|
+
| **`extraUrlParams`** | <code>object</code> | (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
|
|
237
|
+
| **`urlSuffix`** | <code>string</code> | (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test) |
|
|
238
|
+
| **`colors`** | <code><a href="#coloroptions">ColorOptions</a></code> | (optional) provide colors to miniapp if miniapp supports |
|
|
239
|
+
| **`enableSplash`** | <code>boolean</code> | (optional) use to skip miniapp splash screen |
|
|
240
|
+
| **`saveState`** | <code>boolean</code> | (optional) use to save state on close miniapp |
|
|
241
|
+
| **`pageAnimation`** | <code>'BOTTOM_TO_TOP' \| 'TOP_TO_BOTTOM' \| 'LEFT_TO_RIGHT' \| 'RIGHT_TO_LEFT' \| 'FADE_IN'</code> | (optional) use to change launch animation for miniapp. |
|
|
241
242
|
|
|
242
243
|
|
|
243
244
|
#### ColorOptions
|
|
@@ -302,10 +303,10 @@ logout() => Promise<void>
|
|
|
302
303
|
|
|
303
304
|
#### LifecycleEvent
|
|
304
305
|
|
|
305
|
-
| Prop | Type | Description
|
|
306
|
-
| --------------- | ------------------- |
|
|
307
|
-
| **`appId`** | <code>string</code> |
|
|
308
|
-
| **`lifecycle`** | <code>string</code> | onLaunch - Called when the miniapp will launch with
|
|
309
|
-
| **`error`** | <code>string</code> |
|
|
306
|
+
| Prop | Type | Description |
|
|
307
|
+
| --------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
308
|
+
| **`appId`** | <code>string</code> | |
|
|
309
|
+
| **`lifecycle`** | <code>string</code> | onLaunch - Called when the miniapp will launch with Boxo.open(...) onResume - Called when the miniapp will start interacting with the user onPause - Called when the miniapp loses foreground state onClose - Called when clicked close button in miniapp or when destroyed miniapp page onError - Called when miniapp fails to launch due to internet connection issues onUserInteraction - Called whenever touch event is dispatched to the miniapp page. onAuth - Called when the miniapp starts login and user allows it |
|
|
310
|
+
| **`error`** | <code>string</code> | |
|
|
310
311
|
|
|
311
312
|
</docgen-api>
|
|
@@ -3,6 +3,7 @@ package io.boxo.sdk.capacitor
|
|
|
3
3
|
import android.os.Handler
|
|
4
4
|
import android.os.Looper
|
|
5
5
|
import io.boxo.data.models.MiniappData
|
|
6
|
+
import io.boxo.data.models.PageAnimation
|
|
6
7
|
import io.boxo.js.params.CustomEvent
|
|
7
8
|
import io.boxo.js.params.PaymentData
|
|
8
9
|
import io.boxo.sdk.Boxo
|
|
@@ -76,6 +77,9 @@ class AppboxoPlugin : Plugin(), Miniapp.LifecycleListener,
|
|
|
76
77
|
val urlSuffix = call.getString("urlSuffix")
|
|
77
78
|
val colors = call.getObject("colors")
|
|
78
79
|
val enableSplash = call.getBoolean("enableSplash")
|
|
80
|
+
val pageAnimation =
|
|
81
|
+
runCatching { PageAnimation.valueOf(call.getString("pageAnimation") ?: "") }
|
|
82
|
+
.getOrDefault(PageAnimation.BOTTOM_TO_TOP)
|
|
79
83
|
val saveState = call.getBoolean("saveState") ?: true
|
|
80
84
|
handler?.post {
|
|
81
85
|
val miniapp: Miniapp = Boxo.getMiniapp(appId)
|
|
@@ -113,6 +117,7 @@ class AppboxoPlugin : Plugin(), Miniapp.LifecycleListener,
|
|
|
113
117
|
if (enableSplash != null)
|
|
114
118
|
configBuilder.enableSplash(enableSplash)
|
|
115
119
|
configBuilder.saveState(saveState)
|
|
120
|
+
configBuilder.pageAnimation(pageAnimation)
|
|
116
121
|
miniapp.setConfig(configBuilder.build())
|
|
117
122
|
miniapp.open(bridge.activity)
|
|
118
123
|
}
|
package/dist/docs.json
CHANGED
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"parameters": [],
|
|
128
128
|
"returns": "Promise<void>",
|
|
129
129
|
"tags": [],
|
|
130
|
-
"docs": "Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen.\nTo use this function need to enable 'enableMultitaskMode: true' in
|
|
130
|
+
"docs": "Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen.\nTo use this function need to enable 'enableMultitaskMode: true' in Boxo.setConfig()",
|
|
131
131
|
"complexTypes": [],
|
|
132
132
|
"slug": "hideminiapps"
|
|
133
133
|
},
|
|
@@ -367,6 +367,13 @@
|
|
|
367
367
|
"docs": "(optional) use to save state on close miniapp",
|
|
368
368
|
"complexTypes": [],
|
|
369
369
|
"type": "boolean | undefined"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"name": "pageAnimation",
|
|
373
|
+
"tags": [],
|
|
374
|
+
"docs": "(optional) use to change launch animation for miniapp.",
|
|
375
|
+
"complexTypes": [],
|
|
376
|
+
"type": "'BOTTOM_TO_TOP' | 'TOP_TO_BOTTOM' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FADE_IN' | undefined"
|
|
370
377
|
}
|
|
371
378
|
]
|
|
372
379
|
},
|
|
@@ -611,7 +618,7 @@
|
|
|
611
618
|
{
|
|
612
619
|
"name": "lifecycle",
|
|
613
620
|
"tags": [],
|
|
614
|
-
"docs": "onLaunch - Called when the miniapp will launch with
|
|
621
|
+
"docs": "onLaunch - Called when the miniapp will launch with Boxo.open(...)\nonResume - Called when the miniapp will start interacting with the user\nonPause - Called when the miniapp loses foreground state\nonClose - Called when clicked close button in miniapp or when destroyed miniapp page\nonError - Called when miniapp fails to launch due to internet connection issues\nonUserInteraction - Called whenever touch event is dispatched to the miniapp page.\nonAuth - Called when the miniapp starts login and user allows it",
|
|
615
622
|
"complexTypes": [],
|
|
616
623
|
"type": "string"
|
|
617
624
|
},
|
|
@@ -35,7 +35,7 @@ export interface AppboxoPlugin {
|
|
|
35
35
|
getMiniapps(): Promise<MiniappListResult>;
|
|
36
36
|
/**
|
|
37
37
|
* Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen.
|
|
38
|
-
* To use this function need to enable 'enableMultitaskMode: true' in
|
|
38
|
+
* To use this function need to enable 'enableMultitaskMode: true' in Boxo.setConfig()
|
|
39
39
|
*/
|
|
40
40
|
hideMiniapps(): Promise<void>;
|
|
41
41
|
/**
|
|
@@ -126,6 +126,10 @@ export interface OpenMiniappOptions {
|
|
|
126
126
|
* (optional) use to save state on close miniapp
|
|
127
127
|
*/
|
|
128
128
|
saveState?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* (optional) use to change launch animation for miniapp.
|
|
131
|
+
*/
|
|
132
|
+
pageAnimation?: 'BOTTOM_TO_TOP' | 'TOP_TO_BOTTOM' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FADE_IN';
|
|
129
133
|
}
|
|
130
134
|
export interface ColorOptions {
|
|
131
135
|
primaryColor?: string;
|
|
@@ -152,7 +156,7 @@ export interface PaymentEvent {
|
|
|
152
156
|
export interface LifecycleEvent {
|
|
153
157
|
appId: string;
|
|
154
158
|
/**
|
|
155
|
-
* onLaunch - Called when the miniapp will launch with
|
|
159
|
+
* onLaunch - Called when the miniapp will launch with Boxo.open(...)
|
|
156
160
|
* onResume - Called when the miniapp will start interacting with the user
|
|
157
161
|
* onPause - Called when the miniapp loses foreground state
|
|
158
162
|
* onClose - Called when clicked close button in miniapp or when destroyed miniapp page
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface AppboxoPlugin {\n /**\n * Set global configs\n */\n setConfig(options: ConfigOptions): Promise<void>;\n /**\n * Open miniapp with options\n */\n openMiniapp(options: OpenMiniappOptions): Promise<void>;\n /**\n * get AuthCode from hostapp backend and send it to miniapp\n */\n setAuthCode(options: { appId: string; authCode: string }): Promise<void>;\n /**\n * close miniapp by appId\n */\n closeMiniapp(options: { appId: string }): Promise<void>;\n /**\n * send custom event to miniapp\n */\n sendCustomEvent(customEvent: CustomEvent): Promise<void>;\n /**\n * send payment event to miniapp\n */\n sendPaymentEvent(paymentEvent: PaymentEvent): Promise<void>;\n /**\n * Get list of miniapps\n */\n getMiniapps(): Promise<MiniappListResult>;\n /**\n * Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen.\n * To use this function need to enable 'enableMultitaskMode: true' in
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface AppboxoPlugin {\n /**\n * Set global configs\n */\n setConfig(options: ConfigOptions): Promise<void>;\n /**\n * Open miniapp with options\n */\n openMiniapp(options: OpenMiniappOptions): Promise<void>;\n /**\n * get AuthCode from hostapp backend and send it to miniapp\n */\n setAuthCode(options: { appId: string; authCode: string }): Promise<void>;\n /**\n * close miniapp by appId\n */\n closeMiniapp(options: { appId: string }): Promise<void>;\n /**\n * send custom event to miniapp\n */\n sendCustomEvent(customEvent: CustomEvent): Promise<void>;\n /**\n * send payment event to miniapp\n */\n sendPaymentEvent(paymentEvent: PaymentEvent): Promise<void>;\n /**\n * Get list of miniapps\n */\n getMiniapps(): Promise<MiniappListResult>;\n /**\n * Miniapp opens on a native screen. To show payment processing page need to hide miniapp screen.\n * To use this function need to enable 'enableMultitaskMode: true' in Boxo.setConfig()\n */\n hideMiniapps(): Promise<void>;\n /**\n * When host app user logs out, it is highly important to clear all miniapp storage data.\n */\n addListener(\n eventName: 'custom_event',\n listenerFunc: (customEvent: CustomEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'payment_event',\n listenerFunc: (paymentEvent: PaymentEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'miniapp_lifecycle',\n listenerFunc: (lifecycle: LifecycleEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n logout(): Promise<void>;\n}\n\nexport interface ConfigOptions {\n /**\n * your client id from dashboard\n */\n clientId: string;\n /**\n * hostapp userId, will be used for the Consent Management\n */\n userId?: string;\n /**\n * language value will be passed to the miniapp\n */\n language?: string;\n /**\n * switch to sandbox mode\n */\n sandboxMode?: boolean;\n /**\n * Each miniapp appears as a task in the Recents screen.\n * !It works only on android devices.\n */\n enableMultitaskMode?: boolean;\n /**\n * theme for splash screen and other native components used inside miniapp.\n */\n theme?: 'light' | 'dark' | 'system';\n /**\n * enables webview debugging\n */\n isDebug?: boolean;\n /**\n * use it to hide \"Settings\" from Miniapp menu\n */\n showPermissionsPage?: boolean;\n /**\n * use it to hide \"Clear cache\" from Miniapp menu\n */\n showClearCache?: boolean;\n /**\n * use it to hide \"About Page\" from Miniapp menu\n */\n showAboutPage?: boolean;\n /**\n * use it to change miniapp settings cache time in sec. By default is 60 sec\n */\n miniappSettingsExpirationTime?: number;\n}\n\nexport interface OpenMiniappOptions {\n /**\n * miniapp id\n */\n appId: string;\n /**\n * (optional) data as Map that is sent to miniapp\n */\n data?: object;\n /**\n * (optional) miniapp theme \"dark\" | \"light\" (by default is system theme)\n */\n theme?: 'light' | 'dark' | 'system';\n /**\n * (optional) extra query params to append to miniapp URL (like: http://miniapp-url.com/?param=test)\n */\n extraUrlParams?: object;\n /**\n * (optional) suffix to append to miniapp URL (like: http://miniapp-url.com/?param=test)\n */\n urlSuffix?: string;\n /**\n * (optional) provide colors to miniapp if miniapp supports\n */\n colors?: ColorOptions;\n /**\n * (optional) use to skip miniapp splash screen\n */\n enableSplash?: boolean;\n /**\n * (optional) use to save state on close miniapp\n */\n saveState?: boolean;\n /**\n * (optional) use to change launch animation for miniapp.\n */\n pageAnimation?: 'BOTTOM_TO_TOP' | 'TOP_TO_BOTTOM' | 'LEFT_TO_RIGHT' | 'RIGHT_TO_LEFT' | 'FADE_IN';\n}\n\nexport interface ColorOptions {\n primaryColor?: string;\n secondaryColor?: string;\n tertiaryColor?: string;\n}\n\nexport interface CustomEvent {\n appId: string;\n requestId: number;\n type: string;\n errorType?: string;\n payload?: object;\n}\n\nexport interface PaymentEvent {\n appId: string;\n transactionToken?: string;\n miniappOrderId?: string;\n amount: number;\n currency?: string;\n status?: string;\n hostappOrderId?: string;\n extraParams?: object;\n}\n\nexport interface LifecycleEvent {\n appId: string;\n /**\n * onLaunch - Called when the miniapp will launch with Boxo.open(...)\n * onResume - Called when the miniapp will start interacting with the user\n * onPause - Called when the miniapp loses foreground state\n * onClose - Called when clicked close button in miniapp or when destroyed miniapp page\n * onError - Called when miniapp fails to launch due to internet connection issues\n * onUserInteraction - Called whenever touch event is dispatched to the miniapp page.\n * onAuth - Called when the miniapp starts login and user allows it\n */\n lifecycle: string;\n error?: string;\n}\n\nexport interface MiniappListResult {\n miniapps?: [MiniappData];\n error?: string;\n}\n\nexport interface MiniappData {\n appId: string;\n name: string;\n category: string;\n description: string;\n logo: string;\n}\n"]}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,OAAO,GAAG,cAAc,CAAgB,SAAS,CAAC,CAAC;AAEzD,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { AppboxoPlugin } from './definitions';\n\nconst Appboxo = registerPlugin<AppboxoPlugin>('Appboxo');\n\nexport * from './definitions';\nexport { Appboxo };\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,IAAI,GAAG,cAAc,CAAgB,SAAS,CAAC,CAAC;AACtD,MAAM,OAAO,GAAG,cAAc,CAAgB,SAAS,CAAC,CAAC;AAEzD,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,IAAI,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { AppboxoPlugin } from './definitions';\n\nconst Boxo = registerPlugin<AppboxoPlugin>('Appboxo');\nconst Appboxo = registerPlugin<AppboxoPlugin>('Appboxo');\n\nexport * from './definitions';\nexport { Appboxo };\nexport { Boxo };\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var core = require('@capacitor/core');
|
|
6
6
|
|
|
7
|
+
const Boxo = core.registerPlugin('Appboxo');
|
|
7
8
|
const Appboxo = core.registerPlugin('Appboxo');
|
|
8
9
|
|
|
9
10
|
exports.Appboxo = Appboxo;
|
|
11
|
+
exports.Boxo = Boxo;
|
|
10
12
|
//# sourceMappingURL=plugin.cjs.js.map
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Appboxo = registerPlugin('Appboxo');\nexport * from './definitions';\nexport { Appboxo };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;;;;AACK,MAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Boxo = registerPlugin('Appboxo');\nconst Appboxo = registerPlugin('Appboxo');\nexport * from './definitions';\nexport { Appboxo };\nexport { Boxo };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;;;;AACK,MAAC,IAAI,GAAGA,mBAAc,CAAC,SAAS,EAAE;AAClC,MAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
var capacitorAppboxo = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
const Boxo = core.registerPlugin('Appboxo');
|
|
4
5
|
const Appboxo = core.registerPlugin('Appboxo');
|
|
5
6
|
|
|
6
7
|
exports.Appboxo = Appboxo;
|
|
8
|
+
exports.Boxo = Boxo;
|
|
7
9
|
|
|
8
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
11
|
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Appboxo = registerPlugin('Appboxo');\nexport * from './definitions';\nexport { Appboxo };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;AACK,OAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Boxo = registerPlugin('Appboxo');\nconst Appboxo = registerPlugin('Appboxo');\nexport * from './definitions';\nexport { Appboxo };\nexport { Boxo };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;AACK,OAAC,IAAI,GAAGA,mBAAc,CAAC,SAAS,EAAE;AAClC,OAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS;;;;;;;;;;;;;"}
|
|
@@ -67,6 +67,7 @@ public class AppboxoPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
67
67
|
let enableSplash = call.getBool("enableSplash")
|
|
68
68
|
let saveState = call.getBool("saveState", true)
|
|
69
69
|
let urlSuffix = call.getString("urlSuffix", "")
|
|
70
|
+
let pageAnimation = call.getString("pageAnimation", "")
|
|
70
71
|
|
|
71
72
|
let miniApp = Appboxo.shared.getMiniapp(appId: appId)
|
|
72
73
|
miniApp.setData(data: data)
|
|
@@ -76,6 +77,21 @@ public class AppboxoPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
76
77
|
miniappConfig.saveState = saveState
|
|
77
78
|
miniappConfig.urlSuffix = urlSuffix
|
|
78
79
|
|
|
80
|
+
switch pageAnimation {
|
|
81
|
+
case "BOTTOM_TO_TOP":
|
|
82
|
+
miniappConfig.pageAnimation = .BOTTOM_TO_TOP
|
|
83
|
+
case "TOP_TO_BOTTOM":
|
|
84
|
+
miniappConfig.pageAnimation = .TOP_TO_BOTTOM
|
|
85
|
+
case "LEFT_TO_RIGHT":
|
|
86
|
+
miniappConfig.pageAnimation = .LEFT_TO_RIGHT
|
|
87
|
+
case "RIGHT_TO_LEFT":
|
|
88
|
+
miniappConfig.pageAnimation = .RIGHT_TO_LEFT
|
|
89
|
+
case "FADE_IN":
|
|
90
|
+
miniappConfig.pageAnimation = .FADE_IN
|
|
91
|
+
default:
|
|
92
|
+
miniappConfig.pageAnimation = .BOTTOM_TO_TOP
|
|
93
|
+
}
|
|
94
|
+
|
|
79
95
|
if let enableSplash = enableSplash {
|
|
80
96
|
miniappConfig.enableSplash(isSplashEnabled: enableSplash)
|
|
81
97
|
}
|