@appboxo/expo-boxo-sdk 0.9.2 → 0.11.0

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
@@ -1,4 +1,12 @@
1
1
  # Changelog
2
+ ## [0.11.0]
3
+ - add splash screen configuration options
4
+
5
+ ## [0.10.0]
6
+ - saveState is false by default
7
+ - add style_5 for ActionButtons
8
+ - android: esim direct install
9
+
2
10
  ## [0.9.2]
3
11
  - android: add Consent screen config
4
12
 
@@ -42,7 +42,5 @@ android {
42
42
  }
43
43
  }
44
44
  dependencies {
45
- implementation('io.boxo.sdk:boxo-android:1.33.2') {
46
- exclude group: 'com.google.android.gms', module: 'play-services-location'
47
- }
45
+ implementation('io.boxo.sdk:boxo-android:1.39.0')
48
46
  }
@@ -17,7 +17,7 @@ class ConfigOptions : Record {
17
17
  val sandboxMode: Boolean = false
18
18
 
19
19
  @Field
20
- val multitaskMode: Boolean = false
20
+ val multitaskMode: Boolean = true
21
21
 
22
22
  @Field
23
23
  val theme: String = "system"
@@ -36,4 +36,7 @@ class ConfigOptions : Record {
36
36
 
37
37
  @Field
38
38
  val consentScreenConfig: ConsentScreenConfigOptions? = null
39
+
40
+ @Field
41
+ val splashScreenOptions: SplashScreenOptions? = null
39
42
  }
@@ -2,6 +2,7 @@ package io.boxo.expo
2
2
 
3
3
  import android.os.Handler
4
4
  import android.os.Looper
5
+ import android.graphics.Color
5
6
  import io.boxo.data.models.MiniappData
6
7
  import io.boxo.data.models.PageAnimation
7
8
  import io.boxo.data.models.ConsentScreenConfig
@@ -55,6 +56,25 @@ class ExpoBoxoSdkModule : Module() {
55
56
  .showAboutPage(options.showAboutPage)
56
57
  .debug(options.isDebug)
57
58
  .setConsentScreenConfig(consentScreenConfig)
59
+ .apply{
60
+ if (options.splashScreenOptions != null) {
61
+ val options = options.splashScreenOptions
62
+ setProgressBarColors(
63
+ lightIndicator =
64
+ Color.parseColor(options.lightProgressIndicator),
65
+ lightTrack =
66
+ Color.parseColor(options.lightProgressTrack),
67
+ darkIndicator =
68
+ Color.parseColor(options.darkProgressIndicator),
69
+ darkTrack =
70
+ Color.parseColor(options.darkProgressTrack)
71
+ )
72
+ setSplashBackgroundColors(
73
+ light = Color.parseColor(options.lightBackground),
74
+ dark = Color.parseColor(options.darkBackground)
75
+ )
76
+ }
77
+ }
58
78
  .build()
59
79
  )
60
80
  }
@@ -26,7 +26,7 @@ class MiniappOptions : Record {
26
26
  val enableSplash: Boolean = true
27
27
 
28
28
  @Field
29
- val saveState: Boolean = true
29
+ val saveState: Boolean = false
30
30
 
31
31
  @Field
32
32
  val pageAnimation: String? = null
@@ -0,0 +1,24 @@
1
+ package io.boxo.expo
2
+
3
+ import expo.modules.kotlin.records.Field
4
+ import expo.modules.kotlin.records.Record
5
+
6
+ class SplashScreenOptions : Record {
7
+ @Field
8
+ val lightProgressIndicator: String = ""
9
+
10
+ @Field
11
+ val lightProgressTrack: String = ""
12
+
13
+ @Field
14
+ val darkProgressIndicator: String = ""
15
+
16
+ @Field
17
+ val darkProgressTrack: String = ""
18
+
19
+ @Field
20
+ val lightBackground: String = ""
21
+
22
+ @Field
23
+ val darkBackground: String = ""
24
+ }
@@ -77,6 +77,10 @@ export type ConfigOptions = {
77
77
  * use it to customize the consent screen
78
78
  */
79
79
  consentScreenConfig?: ConsentScreenConfig;
80
+ /**
81
+ * use it to customize the splash screen
82
+ */
83
+ splashScreenOptions?: SplashScreenOptions;
80
84
  };
81
85
  export type MiniappOptions = {
82
86
  /**
@@ -134,4 +138,12 @@ export type ConsentScreenConfig = {
134
138
  allowButtonTitle?: string;
135
139
  cancelButtonTitle?: string;
136
140
  };
141
+ export type SplashScreenOptions = {
142
+ lightBackground: string;
143
+ darkBackground: string;
144
+ lightProgressIndicator: string;
145
+ lightProgressTrack: string;
146
+ darkProgressIndicator: string;
147
+ darkProgressTrack: string;
148
+ };
137
149
  //# sourceMappingURL=ExpoBoxoSdk.types.d.ts.map
@@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AG,eAAe,GAAG,SAAS,CAAC;CACnG,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoBoxoSdk.types.js","sourceRoot":"","sources":["../src/ExpoBoxoSdk.types.ts"],"names":[],"mappings":"","sourcesContent":["export type AuthEventPayload = {\n appId: string;\n};\n\nexport type PaymentData = {\n appId: string;\n transactionToken?: string;\n miniappOrderId?: string;\n amount?: number;\n currency?: string;\n extraParams?: Record<string, any>;\n hostappOrderId?: string;\n status?: string;\n};\n\nexport type CustomEventData = {\n appId: string;\n requestId?: number;\n type?: string;\n errorType?: string;\n payload?: Record<string, any>;\n};\n\nexport type LifecycleData = {\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 */\n lifecycle: string;\n error?: string\n};\n\nexport type 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 multitaskMode?: 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 /**\n * use it to hide \"About Page\" from Miniapp menu\n */\n showAboutPage?: boolean;\n\n /**\n * use it to customize the consent screen\n */\n consentScreenConfig?: ConsentScreenConfig\n};\n\nexport type MiniappOptions = {\n /**\n * miniapp id\n */\n appId: string;\n /**\n * (optional) data as Map that is sent to miniapp\n */\n data?: Record<string, any>;\n /**\n * (optional) miniapp theme 'dark' | 'light' | 'system' (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?: Record<string, string>;\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?: Record<string, string>;\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 type MiniappListResult = {\n miniapps?: Array<MiniappData>;\n error?: string;\n}\n\nexport type MiniappData = {\n appId: string;\n name: string;\n category: string;\n description: string;\n logo: string;\n}\n\nexport type ConsentScreenConfig = {\n title?: string;\n noRequiredFieldsDescription?: string;\n requiredFieldsDescription?: string;\n allowButtonTitle?: string;\n cancelButtonTitle?: string;\n};"]}
1
+ {"version":3,"file":"ExpoBoxoSdk.types.js","sourceRoot":"","sources":["../src/ExpoBoxoSdk.types.ts"],"names":[],"mappings":"","sourcesContent":["export type AuthEventPayload = {\n appId: string;\n};\n\nexport type PaymentData = {\n appId: string;\n transactionToken?: string;\n miniappOrderId?: string;\n amount?: number;\n currency?: string;\n extraParams?: Record<string, any>;\n hostappOrderId?: string;\n status?: string;\n};\n\nexport type CustomEventData = {\n appId: string;\n requestId?: number;\n type?: string;\n errorType?: string;\n payload?: Record<string, any>;\n};\n\nexport type LifecycleData = {\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 */\n lifecycle: string;\n error?: string\n};\n\nexport type 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 multitaskMode?: 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 /**\n * use it to hide \"About Page\" from Miniapp menu\n */\n showAboutPage?: boolean;\n\n /**\n * use it to customize the consent screen\n */\n consentScreenConfig?: ConsentScreenConfig;\n\n /**\n * use it to customize the splash screen\n */\n splashScreenOptions?: SplashScreenOptions;\n};\n\nexport type MiniappOptions = {\n /**\n * miniapp id\n */\n appId: string;\n /**\n * (optional) data as Map that is sent to miniapp\n */\n data?: Record<string, any>;\n /**\n * (optional) miniapp theme 'dark' | 'light' | 'system' (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?: Record<string, string>;\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?: Record<string, string>;\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 type MiniappListResult = {\n miniapps?: Array<MiniappData>;\n error?: string;\n}\n\nexport type MiniappData = {\n appId: string;\n name: string;\n category: string;\n description: string;\n logo: string;\n}\n\nexport type ConsentScreenConfig = {\n title?: string;\n noRequiredFieldsDescription?: string;\n requiredFieldsDescription?: string;\n allowButtonTitle?: string;\n cancelButtonTitle?: string;\n};\n\nexport type SplashScreenOptions = {\n lightBackground: string;\n darkBackground: string;\n lightProgressIndicator: string;\n lightProgressTrack: string;\n darkProgressIndicator: string;\n darkProgressTrack: string;\n};"]}
@@ -21,7 +21,7 @@ struct ConfigOptions: Record {
21
21
  var sandboxMode: Bool = false
22
22
 
23
23
  @Field
24
- var multitaskMode: Bool = false
24
+ var multitaskMode: Bool = true
25
25
 
26
26
  @Field
27
27
  var theme: String = "system"
@@ -40,4 +40,7 @@ struct ConfigOptions: Record {
40
40
 
41
41
  @Field
42
42
  var consentScreenConfig: ConsentScreenConfigOptions?
43
+
44
+ @Field
45
+ var splashScreenOptions: SplashScreenOptions?
43
46
  }
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.static_framework = true
17
17
 
18
18
  s.dependency 'ExpoModulesCore'
19
- s.dependency 'BoxoSDK', '1.19.1'
19
+ s.dependency 'BoxoSDK', '1.25.0'
20
20
 
21
21
  # Swift/Objective-C compatibility
22
22
  s.pod_target_xcconfig = {
@@ -1,5 +1,6 @@
1
1
  import ExpoModulesCore
2
2
  import BoxoSDK
3
+ import UIKit
3
4
 
4
5
  public class ExpoBoxoSdkModule: Module {
5
6
 
@@ -38,6 +39,20 @@ public class ExpoBoxoSdkModule: Module {
38
39
  config.consentScreenConfig = consentScreenConfig
39
40
  }
40
41
 
42
+ if let splashScreenOptions = options.splashScreenOptions {
43
+ if let lightBgColor = UIColor(hex: splashScreenOptions.lightBackground), let darkBgColor = UIColor(hex: splashScreenOptions.darkBackground) {
44
+ config.splashBackgroundColors = SplashBackgroundColors(light: lightBgColor, dark: darkBgColor)
45
+ }
46
+
47
+ if
48
+ let lightProgressIndicatorColor = UIColor(hex: splashScreenOptions.lightProgressIndicator),
49
+ let lightProgressTrackColor = UIColor(hex: splashScreenOptions.lightProgressTrack),
50
+ let darkProgressIndicatorColor = UIColor(hex: splashScreenOptions.darkProgressIndicator),
51
+ let darkProgressTrackColor = UIColor(hex: splashScreenOptions.darkProgressTrack) {
52
+ config.progressBarColors = ProgressBarColors(lightIndicator: lightProgressIndicatorColor, lightTrack: lightProgressTrackColor, darkIndicator: darkProgressIndicatorColor, darkTrack: darkProgressTrackColor)
53
+ }
54
+ }
55
+
41
56
  Boxo.shared.setConfig(config: config)
42
57
  }
43
58
 
@@ -261,3 +276,45 @@ extension ExpoBoxoSdkModule : MiniappDelegate {
261
276
  sendEvent("onAuth", dict)
262
277
  }
263
278
  }
279
+
280
+ extension UIColor {
281
+ convenience init?(hex: String) {
282
+ let hex = hex.trimmingCharacters(in: .whitespacesAndNewlines)
283
+ .replacingOccurrences(of: "#", with: "")
284
+
285
+ guard let int = UInt64(hex, radix: 16) else { return nil }
286
+
287
+ switch hex.count {
288
+ case 6: // RRGGBB
289
+ self.init(
290
+ red: CGFloat((int >> 16) & 0xFF) / 255.0,
291
+ green: CGFloat((int >> 8) & 0xFF) / 255.0,
292
+ blue: CGFloat(int & 0xFF) / 255.0,
293
+ alpha: 1.0
294
+ )
295
+
296
+ case 8: // RRGGBBAA
297
+ self.init(
298
+ red: CGFloat((int >> 24) & 0xFF) / 255.0,
299
+ green: CGFloat((int >> 16) & 0xFF) / 255.0,
300
+ blue: CGFloat((int >> 8) & 0xFF) / 255.0,
301
+ alpha: CGFloat(int & 0xFF) / 255.0
302
+ )
303
+
304
+ case 3: // RGB (short form)
305
+ let r = ((int >> 8) & 0xF) * 17
306
+ let g = ((int >> 4) & 0xF) * 17
307
+ let b = (int & 0xF) * 17
308
+
309
+ self.init(
310
+ red: CGFloat(r) / 255.0,
311
+ green: CGFloat(g) / 255.0,
312
+ blue: CGFloat(b) / 255.0,
313
+ alpha: 1.0
314
+ )
315
+
316
+ default:
317
+ return nil
318
+ }
319
+ }
320
+ }
@@ -30,7 +30,7 @@ struct MiniappOptions: Record {
30
30
  var enableSplash: Bool = true
31
31
 
32
32
  @Field
33
- var saveState: Bool = true
33
+ var saveState: Bool = false
34
34
 
35
35
  @Field
36
36
  var pageAnimation: String?
@@ -0,0 +1,26 @@
1
+ //
2
+ // SplashScreenOptions.swift
3
+ // ExpoBoxoSdk
4
+ //
5
+
6
+ import ExpoModulesCore
7
+
8
+ struct SplashScreenOptions: Record {
9
+ @Field
10
+ var lightProgressIndicator: String = ""
11
+
12
+ @Field
13
+ var lightProgressTrack: String = ""
14
+
15
+ @Field
16
+ var darkProgressIndicator: String = ""
17
+
18
+ @Field
19
+ var darkProgressTrack: String = ""
20
+
21
+ @Field
22
+ var lightBackground: String = ""
23
+
24
+ @Field
25
+ var darkBackground: String = ""
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appboxo/expo-boxo-sdk",
3
- "version": "0.9.2",
3
+ "version": "0.11.0",
4
4
  "description": "Expo wrapper over Boxo SDK for IOS and Android.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -82,7 +82,12 @@ export type ConfigOptions = {
82
82
  /**
83
83
  * use it to customize the consent screen
84
84
  */
85
- consentScreenConfig?: ConsentScreenConfig
85
+ consentScreenConfig?: ConsentScreenConfig;
86
+
87
+ /**
88
+ * use it to customize the splash screen
89
+ */
90
+ splashScreenOptions?: SplashScreenOptions;
86
91
  };
87
92
 
88
93
  export type MiniappOptions = {
@@ -143,4 +148,13 @@ export type ConsentScreenConfig = {
143
148
  requiredFieldsDescription?: string;
144
149
  allowButtonTitle?: string;
145
150
  cancelButtonTitle?: string;
151
+ };
152
+
153
+ export type SplashScreenOptions = {
154
+ lightBackground: string;
155
+ darkBackground: string;
156
+ lightProgressIndicator: string;
157
+ lightProgressTrack: string;
158
+ darkProgressIndicator: string;
159
+ darkProgressTrack: string;
146
160
  };