@usercentrics/react-native-sdk 2.12.0 → 2.13.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,5 +1,30 @@
1
1
  [Release Notes](https://docs.usercentrics.com/cmp_in_app_sdk/latest/about/history/)
2
2
 
3
+ ### 2.13.0 - February 29, 2024
4
+
5
+ ## Features
6
+
7
+ **New Usercentrics Ready API** - The API's new properties introduce a feature that, through Rulesets, allows identification of scenarios where the banner may be bypassed in specific locations, [check it out](integration/initialize.md#initialize-usercentrics)
8
+
9
+ ## Improvements
10
+
11
+ **Removes TCF 2.0 warnings** - Since TCF 2.0 has been deprecated, we've removed all warnings regarding the usage of version 2.0 of this framework
12
+ **New TCF 2.2 Stacks** - Added support for Stacks 44 and 45
13
+
14
+ ## Android Bug Fixes
15
+
16
+ **[Warning]** ⚠️Support for versions lower than Android 5.0 (API Level 20) is planned to be removed in releases starting from end of March/24
17
+ **[Fix]** Fully removes support for TLS 1.2 in Android versions lower than 5.0 (API Level 20)
18
+
19
+ ## iOS Bug Fixes
20
+
21
+ **[Fix]** Banner was not correctly rendered given some specific programmatic customization scenarios
22
+ **[Fix]** Fixes layout constraints when changing the language for CCPA banners
23
+
24
+ ## Other Fixes
25
+
26
+ **[Fix]** General improvement on resurfacing logic for any Legal Basis change on TCF Purposes
27
+
3
28
  ### 2.12.0 - February 15, 2024
4
29
 
5
30
  ## Features
@@ -20,7 +45,6 @@
20
45
 
21
46
  * Enhancing the UI of First-layer Popups and Sheets for Optimal Display on iPads
22
47
 
23
-
24
48
  ## Other Fixes
25
49
 
26
50
  * Aligned purposes descriptions/illustrations and vendor data with GVL translation
package/README.md CHANGED
@@ -6,6 +6,10 @@
6
6
  alt="follow on Twitter">
7
7
  </a>
8
8
 
9
+ # Already a customer?
10
+
11
+ In case you wish to report an issue, we provide a [dedicated page](https://usercentricssupport.zendesk.com/hc/en-us/requests/new) specifically for this purpose. By accessing the provided link and submitting a ticket our team will address your concerns with the utmost efficiency, ensuring a prompt resolution.
12
+
9
13
  # Welcome!
10
14
 
11
15
  You are now one step closer from making **privacy** a core feature in your application. We are very happy that you decided to make this a priority. We are here to help you **build trust** with your users.
@@ -1,4 +1,4 @@
1
- def usercentrics_version = "2.12.0"
1
+ def usercentrics_version = "2.13.0"
2
2
  version usercentrics_version
3
3
 
4
4
  buildscript {
@@ -19,6 +19,7 @@ import com.usercentrics.sdk.models.common.UsercentricsVariant
19
19
  import com.usercentrics.sdk.models.settings.UsercentricsConsentType
20
20
  import com.usercentrics.sdk.services.tcf.TCFDecisionUILayer
21
21
  import com.usercentrics.sdk.services.tcf.interfaces.TCFData
22
+ import com.usercentrics.sdk.v2.location.data.UsercentricsLocation
22
23
  import io.mockk.every
23
24
  import io.mockk.mockk
24
25
  import io.mockk.verify
@@ -81,7 +82,9 @@ class RNUsercentricsModuleTest {
81
82
  isEssential = false,
82
83
  history = usercentricsConsentHistoryEntries
83
84
  )
84
- )
85
+ ),
86
+ geolocationRuleset = GeolocationRuleset(activeSettingsId = "settingsId", bannerRequiredAtLocation = true),
87
+ location = UsercentricsLocation(countryCode = "PT", regionCode = "PT11")
85
88
  )
86
89
  }
87
90
 
@@ -142,6 +145,13 @@ class RNUsercentricsModuleTest {
142
145
 
143
146
  assertEquals(1, usercentricsProxy.isReadyCount)
144
147
  assertEquals(false, result.getBoolean("shouldCollectConsent"))
148
+
149
+ assertEquals("settingsId", result.getMap("geolocationRuleset")?.getString("activeSettingsId"))
150
+ assertEquals(true, result.getMap("geolocationRuleset")?.getBoolean("bannerRequiredAtLocation"))
151
+
152
+ assertEquals("PT", result.getMap("location")?.getString("countryCode"))
153
+ assertEquals("PT11", result.getMap("location")?.getString("regionCode"))
154
+
145
155
  assertEquals(false, consent.getBoolean("status"))
146
156
  assertEquals("ocv9HNX_g", consent.getString("templateId"))
147
157
  assertEquals("Facebook SDK", consent.getString("dataProcessor"))
@@ -339,7 +339,7 @@ private fun UsercentricsCategory.serialize(): WritableMap {
339
339
  ).toWritableMap()
340
340
  }
341
341
 
342
- private fun UsercentricsLocation.serialize(): WritableMap {
342
+ internal fun UsercentricsLocation.serialize(): WritableMap {
343
343
  return mapOf(
344
344
  "countryCode" to countryCode,
345
345
  "regionCode" to regionCode,
@@ -2,11 +2,21 @@ package com.usercentrics.reactnativeusercentrics.extensions
2
2
 
3
3
  import com.facebook.react.bridge.Arguments
4
4
  import com.facebook.react.bridge.WritableMap
5
+ import com.usercentrics.sdk.GeolocationRuleset
5
6
  import com.usercentrics.sdk.UsercentricsReadyStatus
6
7
 
7
8
  internal fun UsercentricsReadyStatus.toWritableMap(): WritableMap {
8
9
  return Arguments.createMap().apply {
9
10
  putBoolean("shouldCollectConsent", shouldCollectConsent)
10
11
  putArray("consents", consents.toWritableArray())
12
+ putMap("geolocationRuleset", geolocationRuleset?.serialize())
13
+ putMap("location", location.serialize())
11
14
  }
12
- }
15
+ }
16
+
17
+ internal fun GeolocationRuleset.serialize(): WritableMap {
18
+ return mapOf(
19
+ "activeSettingsId" to activeSettingsId,
20
+ "bannerRequiredAtLocation" to bannerRequiredAtLocation,
21
+ ).toWritableMap()
22
+ }
@@ -5,7 +5,18 @@ public extension UsercentricsReadyStatus {
5
5
  func toDictionary() -> NSDictionary {
6
6
  return [
7
7
  "shouldCollectConsent": self.shouldCollectConsent,
8
- "consents": self.consents.toListOfDictionary()
8
+ "consents": self.consents.toListOfDictionary(),
9
+ "geolocationRuleset": self.geolocationRuleset?.toDictionary(),
10
+ "location": location.toDictionary()
11
+ ]
12
+ }
13
+ }
14
+
15
+ public extension GeolocationRuleset {
16
+ func toDictionary() -> NSDictionary {
17
+ return [
18
+ "activeSettingsId": self.activeSettingsId,
19
+ "bannerRequiredAtLocation": self.bannerRequiredAtLocation
9
20
  ]
10
21
  }
11
22
  }
@@ -0,0 +1,5 @@
1
+ export declare class GeolocationRuleset {
2
+ activeSettingsId: string;
3
+ bannerRequiredAtLocation: boolean;
4
+ constructor(activeSettingsId: string, bannerRequiredAtLocation: boolean);
5
+ }
@@ -0,0 +1,7 @@
1
+ export class GeolocationRuleset {
2
+ constructor(activeSettingsId, bannerRequiredAtLocation) {
3
+ this.activeSettingsId = activeSettingsId;
4
+ this.bannerRequiredAtLocation = bannerRequiredAtLocation;
5
+ }
6
+ }
7
+ //# sourceMappingURL=GeolocationRuleset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeolocationRuleset.js","sourceRoot":"","sources":["../../src/models/GeolocationRuleset.tsx"],"names":[],"mappings":"AAAA,MAAM,OAAO,kBAAkB;IAK3B,YAAY,gBAAwB,EAAE,wBAAiC;QACnE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;QACxC,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAA;IAC5D,CAAC;CACJ"}
@@ -1,6 +1,9 @@
1
- import { UsercentricsServiceConsent } from ".";
1
+ import { UsercentricsLocation, UsercentricsServiceConsent } from ".";
2
+ import { GeolocationRuleset } from "./GeolocationRuleset";
2
3
  export declare class UsercentricsReadyStatus {
3
4
  shouldCollectConsent: boolean;
4
5
  consents: [UsercentricsServiceConsent];
5
- constructor(shouldCollectConsent: boolean, consents: [UsercentricsServiceConsent]);
6
+ geolocationRuleset?: GeolocationRuleset;
7
+ location: UsercentricsLocation;
8
+ constructor(shouldCollectConsent: boolean, consents: [UsercentricsServiceConsent], location: UsercentricsLocation, geolocationRuleSet?: GeolocationRuleset);
6
9
  }
@@ -1,7 +1,9 @@
1
1
  export class UsercentricsReadyStatus {
2
- constructor(shouldCollectConsent, consents) {
2
+ constructor(shouldCollectConsent, consents, location, geolocationRuleSet) {
3
3
  this.shouldCollectConsent = shouldCollectConsent;
4
4
  this.consents = consents;
5
+ this.geolocationRuleset = geolocationRuleSet;
6
+ this.location = location;
5
7
  }
6
8
  }
7
9
  //# sourceMappingURL=UsercentricsReadyStatus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UsercentricsReadyStatus.js","sourceRoot":"","sources":["../../src/models/UsercentricsReadyStatus.tsx"],"names":[],"mappings":"AAEA,MAAM,OAAO,uBAAuB;IAKhC,YAAY,oBAA6B,EAAE,QAAsC;QAC7E,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAA;QAChD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC5B,CAAC;CACJ"}
1
+ {"version":3,"file":"UsercentricsReadyStatus.js","sourceRoot":"","sources":["../../src/models/UsercentricsReadyStatus.tsx"],"names":[],"mappings":"AAGA,MAAM,OAAO,uBAAuB;IAOhC,YAAY,oBAA6B,EAC7B,QAAsC,EACtC,QAA8B,EAC9B,kBAAuC;QAC/C,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAA;QAChD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAA;QAC5C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC5B,CAAC;CACJ"}
@@ -25,3 +25,4 @@ export * from './UsercentricsCategory';
25
25
  export * from './UsercentricsLabels';
26
26
  export * from './UsercentricsLocation';
27
27
  export * from './UsercentricsSettings';
28
+ export * from './GeolocationRuleset';
@@ -25,4 +25,5 @@ export * from './UsercentricsCategory';
25
25
  export * from './UsercentricsLabels';
26
26
  export * from './UsercentricsLocation';
27
27
  export * from './UsercentricsSettings';
28
+ export * from './GeolocationRuleset';
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,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,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@usercentrics/react-native-sdk",
3
- "version": "2.12.0",
3
+ "version": "2.13.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.12.0",
10
+ "iosPackageVersion": "2.13.0",
11
11
  "license": "SEE LICENSE IN LICENSE",
12
12
  "files": [
13
13
  "android",