@usercentrics/react-native-sdk 2.6.1 → 2.7.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.
@@ -1,4 +1,4 @@
1
- def usercentrics_version = "2.6.1"
1
+ def usercentrics_version = "2.7.0"
2
2
  version usercentrics_version
3
3
 
4
4
  buildscript {
@@ -56,7 +56,7 @@ internal class FakeUsercentricsProxy(
56
56
  override fun showFirstLayer(activity: Activity, layout: UsercentricsLayout, bannerSettings: BannerSettings?, promise: Promise) {
57
57
  this.showFirstLayerLayout = layout
58
58
  this.showFirstLayerBannerSettings = bannerSettings
59
- this.showFirstLayerStyle = bannerSettings?.firstLayerSettings
59
+ this.showFirstLayerStyle = bannerSettings?.firstLayerStyleSettings
60
60
  }
61
61
 
62
62
  override fun showSecondLayer(activity: Activity, bannerSettings: BannerSettings?, promise: Promise) {
@@ -31,13 +31,12 @@ internal class RNUsercentricsModule(
31
31
 
32
32
  @ReactMethod
33
33
  fun showFirstLayer(options: ReadableMap, promise: Promise) {
34
- UiThreadUtil.runOnUiThread {
34
+ runOnUiThread {
35
35
  try {
36
36
  val assetManager = currentActivity!!.assets
37
37
 
38
38
  val layout = options.getString("layout")!!.usercentricsLayoutFromEnumString()
39
- val bannerSettings =
40
- options.getMap("bannerSettings")?.bannerSettingsFromMap(assetManager)
39
+ val bannerSettings = options.getMap("bannerSettings")?.bannerSettingsFromMap(assetManager)
41
40
  usercentricsProxy.showFirstLayer(currentActivity!!, layout, bannerSettings, promise)
42
41
 
43
42
  } catch (e: Exception) {
@@ -48,12 +47,11 @@ internal class RNUsercentricsModule(
48
47
 
49
48
  @ReactMethod
50
49
  fun showSecondLayer(options: ReadableMap, promise: Promise) {
51
- UiThreadUtil.runOnUiThread {
50
+ runOnUiThread {
52
51
  try {
53
52
  val assetManager = currentActivity!!.assets
54
53
 
55
- val bannerSettings =
56
- options.getMap("bannerSettings")?.bannerSettingsFromMap(assetManager)
54
+ val bannerSettings = options.getMap("bannerSettings")?.bannerSettingsFromMap(assetManager)
57
55
  usercentricsProxy.showSecondLayer(currentActivity!!, bannerSettings, promise)
58
56
  } catch (e: Exception) {
59
57
  promise.reject(e)
@@ -196,4 +194,8 @@ internal class RNUsercentricsModule(
196
194
  fun reset() {
197
195
  usercentricsProxy.reset()
198
196
  }
197
+
198
+ private fun runOnUiThread(block: () -> Unit) {
199
+ UiThreadUtil.runOnUiThread(block)
200
+ }
199
201
  }
@@ -17,19 +17,14 @@ internal fun String.usercentricsLayoutFromEnumString(): UsercentricsLayout {
17
17
  }
18
18
 
19
19
  internal fun ReadableMap.bannerSettingsFromMap(assetManager: AssetManager): BannerSettings {
20
- val customFont = getMap("font")
21
- val customLogo = getMap("logo")
22
-
23
- val rawFirstLayerStyleSettings = getMap("firstLayerSettings")
24
- val rawSecondLayerStyleSettings = getMap("secondLayerSettings")
25
- val rawLegalLinkSettings = getString("links")
20
+ val rawFirstLayerStyleSettings = getMap("firstLayerStyleSettings")
21
+ val rawSecondLayerStyleSettings = getMap("secondLayerStyleSettings")
22
+ val rawGeneralStyleSettings = getMap("generalStyleSettings")
26
23
 
27
24
  return BannerSettings(
28
- font = customFont?.bannerFontFromMap(assetManager),
29
- logo = customLogo?.bannerLogoFromMap(),
30
- firstLayerSettings = rawFirstLayerStyleSettings?.firstLayerStyleSettingsFromMap(assetManager),
31
- secondLayerSettings = rawSecondLayerStyleSettings?.secondLayerStyleSettingsFromMap(assetManager),
32
- links = rawLegalLinkSettings?.legalLinksFromEnumString()
25
+ firstLayerStyleSettings = rawFirstLayerStyleSettings?.firstLayerStyleSettingsFromMap(assetManager),
26
+ secondLayerStyleSettings = rawSecondLayerStyleSettings?.secondLayerStyleSettingsFromMap(assetManager),
27
+ generalStyleSettings = rawGeneralStyleSettings?.generalStyleSettingsFromMap(assetManager),
33
28
  )
34
29
  }
35
30
 
@@ -138,7 +133,7 @@ internal fun ReadableMap.buttonLayoutFromMap(
138
133
  internal fun ReadableMap.buttonSettingsFromMap(
139
134
  assetManager: AssetManager
140
135
  ): ButtonSettings {
141
- return ButtonSettings(
136
+ return ButtonSettings(
142
137
  type = getString("buttonType")!!.deserializeButtonType(),
143
138
  isAllCaps = getBooleanOrNull("isAllCaps"),
144
139
  font = assetManager.createFontFromName(getString("fontName")),
@@ -160,6 +155,33 @@ internal fun ReadableMap.secondLayerStyleSettingsFromMap(assetManager: AssetMana
160
155
  )
161
156
  }
162
157
 
158
+ internal fun ReadableMap.generalStyleSettingsFromMap(assetManager: AssetManager): GeneralStyleSettings {
159
+ val rawToggleStyleSettings = getMap("toggleStyleSettings")
160
+ return GeneralStyleSettings(
161
+ textColor = getString("textColorHex")?.deserializeColor(),
162
+ layerBackgroundColor = getString("layerBackgroundColorHex")?.deserializeColor(),
163
+ layerBackgroundSecondaryColor = getString("layerBackgroundSecondaryColorHex")?.deserializeColor(),
164
+ linkColor = getString("linkColorHex")?.deserializeColor(),
165
+ tabColor = getString("tabColorHex")?.deserializeColor(),
166
+ bordersColor = getString("bordersColorHex")?.deserializeColor(),
167
+ toggleStyleSettings = rawToggleStyleSettings?.toggleStyleSettingsFromMap(),
168
+ font = getMap("font")?.bannerFontFromMap(assetManager),
169
+ logo = getMap("logo")?.bannerLogoFromMap(),
170
+ links = getString("links")?.legalLinksFromEnumString(),
171
+ )
172
+ }
173
+
174
+ internal fun ReadableMap.toggleStyleSettingsFromMap(): ToggleStyleSettings {
175
+ return ToggleStyleSettings(
176
+ activeBackgroundColor = getString("activeBackgroundColorHex")?.deserializeColor(),
177
+ inactiveBackgroundColor = getString("inactiveBackgroundColorHex")?.deserializeColor(),
178
+ disabledBackgroundColor = getString("disabledBackgroundColorHex")?.deserializeColor(),
179
+ activeThumbColor = getString("activeThumbColorHex")?.deserializeColor(),
180
+ inactiveThumbColor = getString("inactiveThumbColorHex")?.deserializeColor(),
181
+ disabledThumbColor = getString("disabledThumbColorHex")?.deserializeColor(),
182
+ )
183
+ }
184
+
163
185
  internal fun String?.legalLinksFromEnumString(): LegalLinksSettings? {
164
186
  return when (this) {
165
187
  "BOTH" -> LegalLinksSettings.BOTH
@@ -172,14 +194,10 @@ internal fun String?.legalLinksFromEnumString(): LegalLinksSettings? {
172
194
 
173
195
  @ColorInt
174
196
  internal fun String.deserializeColor(): Int? {
175
- val colorString: String =
176
- if (!this.startsWith("#")) {
177
- "#$this"
178
- } else {
179
- this
180
- }
181
-
182
- return runCatching {
183
- Color.parseColor(colorString)
184
- }.getOrNull()
197
+ val colorString: String = if (!this.startsWith("#")) {
198
+ "#$this"
199
+ } else {
200
+ this
201
+ }
202
+ return runCatching { Color.parseColor(colorString) }.getOrNull()
185
203
  }
@@ -5,7 +5,7 @@ import com.usercentrics.sdk.UsercentricsOptions
5
5
  import com.usercentrics.sdk.models.common.NetworkMode
6
6
  import com.usercentrics.sdk.models.common.UsercentricsLoggerLevel
7
7
 
8
- internal fun ReadableMap.usercentricsOptionsFromMap(): UsercentricsOptions? {
8
+ internal fun ReadableMap.usercentricsOptionsFromMap(): UsercentricsOptions {
9
9
  val options = UsercentricsOptions()
10
10
 
11
11
  getString("settingsId")?.let {
@@ -48,5 +48,9 @@ internal fun ReadableMap.usercentricsOptionsFromMap(): UsercentricsOptions? {
48
48
  }
49
49
  }
50
50
 
51
+ getBooleanOrNull("consentMediation")?.let {
52
+ options.consentMediation = it
53
+ }
54
+
51
55
  return options
52
- }
56
+ }
@@ -5,21 +5,37 @@ extension BannerSettings {
5
5
  init?(from dictionary: NSDictionary?) {
6
6
  guard let dictionary = dictionary else { return nil }
7
7
 
8
- let bannerFontHolder = BannerFontHolder(from: dictionary["font"] as? NSDictionary)
8
+ let generalStyleSettingsDict = dictionary["generalStyleSettings"] as? NSDictionary ?? [:]
9
9
 
10
- let firstLayerStyleSettingsDict = dictionary["firstLayerSettings"] as? NSDictionary
10
+ let bannerFontHolder = BannerFontHolder(from: generalStyleSettingsDict["font"] as? NSDictionary)
11
+
12
+ let firstLayerStyleSettingsDict = dictionary["firstLayerStyleSettings"] as? NSDictionary
11
13
  let firstLayerSettings = FirstLayerStyleSettings(from: firstLayerStyleSettingsDict, bannerFontHolder: bannerFontHolder)
12
14
 
13
- let secondLayerStyleSettingsDict = dictionary["secondLayerSettings"] as? NSDictionary
15
+ let secondLayerStyleSettingsDict = dictionary["secondLayerStyleSettings"] as? NSDictionary
14
16
  let secondLayerSettings = SecondLayerStyleSettings(from: secondLayerStyleSettingsDict, bannerFontHolder: bannerFontHolder)
15
17
 
16
- let links = LegalLinksSettings.from(enumString: dictionary["links"] as? String)
17
-
18
- self.init(font: bannerFontHolder?.font,
19
- logo: UIImage(from: dictionary["logo"] as? NSDictionary),
20
- links: links,
21
- firstLayerSettings: firstLayerSettings,
22
- secondLayerSettings: secondLayerSettings)
18
+ let toggleStyleSettingsDict = generalStyleSettingsDict["toggleStyleSettings"] as? NSDictionary
19
+ let toggleStyleSettings = ToggleStyleSettings(from: toggleStyleSettingsDict)
20
+
21
+ let links = LegalLinksSettings.from(enumString: generalStyleSettingsDict["links"] as? String)
22
+ let font = bannerFontHolder?.font
23
+ let logo = UIImage(from: generalStyleSettingsDict["logo"] as? NSDictionary)
24
+
25
+ let generalStyleSettings = GeneralStyleSettings(font: font,
26
+ logo: logo,
27
+ links: links,
28
+ textColor: UIColor(unsafeHex: generalStyleSettingsDict["textColorHex"] as? String),
29
+ layerBackgroundColor: UIColor(unsafeHex: generalStyleSettingsDict["layerBackgroundColorHex"] as? String),
30
+ layerBackgroundSecondaryColor: UIColor(unsafeHex: generalStyleSettingsDict["layerBackgroundSecondaryColorHex"] as? String),
31
+ linkColor: UIColor(unsafeHex: generalStyleSettingsDict["linkColorHex"] as? String),
32
+ tabColor: UIColor(unsafeHex: generalStyleSettingsDict["tabColorHex"] as? String),
33
+ bordersColor: UIColor(unsafeHex: generalStyleSettingsDict["bordersColorHex"] as? String),
34
+ toggleStyleSettings: toggleStyleSettings)
35
+
36
+ self.init(generalStyleSettings: generalStyleSettings,
37
+ firstLayerStyleSettings: firstLayerSettings,
38
+ secondLayerStyleSettings: secondLayerSettings)
23
39
  }
24
40
  }
25
41
 
@@ -265,3 +281,16 @@ extension LegalLinksSettings {
265
281
  }
266
282
  }
267
283
  }
284
+
285
+ extension ToggleStyleSettings {
286
+ init?(from dictionary: NSDictionary?) {
287
+ guard let dictionary = dictionary else { return nil }
288
+
289
+ self.init(activeBackgroundColor: UIColor(unsafeHex: dictionary["activeBackgroundColorHex"] as? String),
290
+ inactiveBackgroundColor: UIColor(unsafeHex: dictionary["inactiveBackgroundColorHex"] as? String),
291
+ disabledBackgroundColor: UIColor(unsafeHex: dictionary["disabledBackgroundColorHex"] as? String),
292
+ activeThumbColor: UIColor(unsafeHex: dictionary["activeThumbColorHex"] as? String),
293
+ inactiveThumbColor: UIColor(unsafeHex: dictionary["inactiveThumbColorHex"] as? String),
294
+ disabledThumbColor: UIColor(unsafeHex: dictionary["disabledThumbColorHex"] as? String))
295
+ }
296
+ }
@@ -33,6 +33,10 @@ public extension UsercentricsOptions {
33
33
  options.networkMode = NetworkMode.initialize(from: networkModeValue)
34
34
  }
35
35
 
36
+ if let consentMediationValue = dictionary["networkMode"] as? Bool {
37
+ options.consentMediation = consentMediationValue
38
+ }
39
+
36
40
  return options
37
41
  }
38
42
  }
@@ -18,11 +18,31 @@ export declare enum LegalLinksSettings {
18
18
  both = "BOTH",
19
19
  none = "NONE"
20
20
  }
21
- export declare class BannerSettings {
22
- logo?: BannerLogo;
21
+ export declare class ToggleStyleSettings {
22
+ activeBackgroundColorHex?: String;
23
+ inactiveBackgroundColorHex?: String;
24
+ disabledBackgroundColorHex?: String;
25
+ activeThumbColorHex?: String;
26
+ inactiveThumbColorHex?: String;
27
+ disabledThumbColorHex?: String;
28
+ constructor(activeBackgroundColorHex?: String, inactiveBackgroundColorHex?: String, disabledBackgroundColorHex?: String, activeThumbColorHex?: String, inactiveThumbColorHex?: String, disabledThumbColorHex?: String);
29
+ }
30
+ export declare class GeneralStyleSettings {
23
31
  font?: BannerFont;
32
+ logo?: BannerLogo;
24
33
  links?: LegalLinksSettings;
25
- firstLayerSettings?: FirstLayerStyleSettings;
26
- secondLayerSettings?: SecondLayerStyleSettings;
27
- constructor(logo?: BannerLogo, font?: BannerFont, links?: LegalLinksSettings, firstLayerSettings?: FirstLayerStyleSettings, secondLayerSettings?: SecondLayerStyleSettings);
34
+ textColorHex?: String;
35
+ layerBackgroundColorHex?: String;
36
+ layerBackgroundSecondaryColorHex?: String;
37
+ linkColorHex?: String;
38
+ tabColorHex?: String;
39
+ bordersColorHex?: String;
40
+ toggleStyleSettings?: ToggleStyleSettings;
41
+ constructor(font?: BannerFont, logo?: BannerLogo, links?: LegalLinksSettings, textColorHex?: String, layerBackgroundColorHex?: String, layerBackgroundSecondaryColorHex?: String, linkColorHex?: String, tabColorHex?: String, bordersColorHex?: String, toggleStyleSettings?: ToggleStyleSettings);
42
+ }
43
+ export declare class BannerSettings {
44
+ firstLayerStyleSettings?: FirstLayerStyleSettings;
45
+ secondLayerStyleSettings?: SecondLayerStyleSettings;
46
+ generalStyleSettings?: GeneralStyleSettings;
47
+ constructor(firstLayerStyleSettings?: FirstLayerStyleSettings, secondLayerStyleSettings?: SecondLayerStyleSettings, generalStyleSettings?: GeneralStyleSettings);
28
48
  }
@@ -19,13 +19,35 @@ export var LegalLinksSettings;
19
19
  LegalLinksSettings["both"] = "BOTH";
20
20
  LegalLinksSettings["none"] = "NONE";
21
21
  })(LegalLinksSettings || (LegalLinksSettings = {}));
22
- export class BannerSettings {
23
- constructor(logo, font, links, firstLayerSettings, secondLayerSettings) {
24
- this.logo = logo;
22
+ export class ToggleStyleSettings {
23
+ constructor(activeBackgroundColorHex, inactiveBackgroundColorHex, disabledBackgroundColorHex, activeThumbColorHex, inactiveThumbColorHex, disabledThumbColorHex) {
24
+ this.activeBackgroundColorHex = activeBackgroundColorHex;
25
+ this.inactiveBackgroundColorHex = inactiveBackgroundColorHex;
26
+ this.disabledBackgroundColorHex = disabledBackgroundColorHex;
27
+ this.activeThumbColorHex = activeThumbColorHex;
28
+ this.inactiveThumbColorHex = inactiveThumbColorHex;
29
+ this.disabledThumbColorHex = disabledThumbColorHex;
30
+ }
31
+ }
32
+ export class GeneralStyleSettings {
33
+ constructor(font, logo, links, textColorHex, layerBackgroundColorHex, layerBackgroundSecondaryColorHex, linkColorHex, tabColorHex, bordersColorHex, toggleStyleSettings) {
25
34
  this.font = font;
35
+ this.logo = logo;
26
36
  this.links = links;
27
- this.firstLayerSettings = firstLayerSettings;
28
- this.secondLayerSettings = secondLayerSettings;
37
+ this.textColorHex = textColorHex;
38
+ this.layerBackgroundColorHex = layerBackgroundColorHex;
39
+ this.layerBackgroundSecondaryColorHex = layerBackgroundSecondaryColorHex;
40
+ this.linkColorHex = linkColorHex;
41
+ this.tabColorHex = tabColorHex;
42
+ this.bordersColorHex = bordersColorHex;
43
+ this.toggleStyleSettings = toggleStyleSettings;
44
+ }
45
+ }
46
+ export class BannerSettings {
47
+ constructor(firstLayerStyleSettings, secondLayerStyleSettings, generalStyleSettings) {
48
+ this.firstLayerStyleSettings = firstLayerStyleSettings;
49
+ this.secondLayerStyleSettings = secondLayerStyleSettings;
50
+ this.generalStyleSettings = generalStyleSettings;
29
51
  }
30
52
  }
31
53
  //# sourceMappingURL=BannerSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BannerSettings.js","sourceRoot":"","sources":["../../src/models/BannerSettings.tsx"],"names":[],"mappings":"AAGA,MAAM,OAAO,UAAU;IAKnB,YAAY,QAAgB,EAAE,QAAkC,EAAE,OAAgB;QAC9E,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;CACJ;AAED,MAAM,OAAO,UAAU;IAKnB,YAAY,WAAmB,EAAE,QAAgB,EAAE,QAAgB;QAC/D,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAA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AAC,uBAAuB,GAAG,uBAAuB,CAAC;QACvD,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;QACzD,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACrD,CAAC;CACJ"}
@@ -7,7 +7,8 @@ export declare class UsercentricsOptions {
7
7
  timeoutMillis?: number;
8
8
  version?: string;
9
9
  networkMode?: NetworkMode;
10
- constructor({ settingsId, ruleSetId, defaultLanguage, loggerLevel, timeoutMillis, version, networkMode }: {
10
+ consentMediation?: Boolean;
11
+ constructor({ settingsId, ruleSetId, defaultLanguage, loggerLevel, timeoutMillis, version, networkMode, consentMediation }: {
11
12
  settingsId?: string;
12
13
  ruleSetId?: string;
13
14
  defaultLanguage?: string;
@@ -15,5 +16,6 @@ export declare class UsercentricsOptions {
15
16
  timeoutMillis?: number;
16
17
  version?: string;
17
18
  networkMode?: NetworkMode;
19
+ consentMediation?: Boolean;
18
20
  });
19
21
  }
@@ -1,5 +1,5 @@
1
1
  export class UsercentricsOptions {
2
- constructor({ settingsId = "", ruleSetId = "", defaultLanguage = undefined, loggerLevel = undefined, timeoutMillis = undefined, version = undefined, networkMode = undefined }) {
2
+ constructor({ settingsId = "", ruleSetId = "", defaultLanguage = undefined, loggerLevel = undefined, timeoutMillis = undefined, version = undefined, networkMode = undefined, consentMediation = undefined }) {
3
3
  this.settingsId = settingsId;
4
4
  this.ruleSetId = ruleSetId;
5
5
  this.defaultLanguage = defaultLanguage;
@@ -7,6 +7,7 @@ export class UsercentricsOptions {
7
7
  this.timeoutMillis = timeoutMillis;
8
8
  this.version = version;
9
9
  this.networkMode = networkMode;
10
+ this.consentMediation = consentMediation;
10
11
  }
11
12
  }
12
13
  //# sourceMappingURL=UsercentricsOptions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UsercentricsOptions.js","sourceRoot":"","sources":["../../src/models/UsercentricsOptions.tsx"],"names":[],"mappings":"AAEA,MAAM,OAAO,mBAAmB;IAS5B,YAAY,EACR,UAAU,GAAG,EAAE,EACf,SAAS,GAAG,EAAE,EACd,eAAe,GAAG,SAAS,EAC3B,WAAW,GAAG,SAAS,EACvB,aAAa,GAAG,SAAS,EACzB,OAAO,GAAG,SAAS,EACnB,WAAW,GAAG,SAAS,EAStB;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAClC,CAAC;CACJ"}
1
+ {"version":3,"file":"UsercentricsOptions.js","sourceRoot":"","sources":["../../src/models/UsercentricsOptions.tsx"],"names":[],"mappings":"AAEA,MAAM,OAAO,mBAAmB;IAU5B,YAAY,EACR,UAAU,GAAG,EAAE,EACf,SAAS,GAAG,EAAE,EACd,eAAe,GAAG,SAAS,EAC3B,WAAW,GAAG,SAAS,EACvB,aAAa,GAAG,SAAS,EACzB,OAAO,GAAG,SAAS,EACnB,WAAW,GAAG,SAAS,EACvB,gBAAgB,GAAG,SAAS,EAU3B;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QACtC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;IAC5C,CAAC;CACJ"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@usercentrics/react-native-sdk",
3
- "version": "2.6.1",
3
+ "version": "2.7.0",
4
4
  "description": "Usercentrics SDK",
5
5
  "homepage": "https://usercentrics.com",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "author": "Usercentrics <developer@usercentrics.com>",
9
9
  "iosPackageName": "react-native-usercentrics",
10
- "iosPackageVersion": "2.6.1",
10
+ "iosPackageVersion": "2.7.0",
11
11
  "license": "SEE LICENSE IN LICENSE",
12
12
  "files": [
13
13
  "android",
@@ -1,27 +0,0 @@
1
- package com.usercentrics.reactnativemodule.mock
2
-
3
- import com.usercentrics.reactnativeusercentrics.extensions.toWritableMap
4
-
5
- internal class ShowFirstLayerMock {
6
- companion object {
7
- val arguments = mapOf(
8
- "layout" to "POPUP_CENTER",
9
- "bannerSettings" to mapOf(
10
- "font" to null,
11
- "logo" to null,
12
- ),
13
- "styleSettings" to mapOf(
14
- "headerImage" to null,
15
- "title" to mapOf(
16
- "alignment" to "END",
17
- "textSize" to 20.0,
18
- ),
19
- "message" to mapOf(
20
- "alignment" to "CENTER",
21
- "textSize" to 16,
22
- ),
23
- "cornerRadius" to 50
24
- ),
25
- ).toWritableMap()
26
- }
27
- }