diff --git a/CHANGELOG.md b/CHANGELOG.md index 2de3f7f..f13f072 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ [Release Notes](https://docs.usercentrics.com/cmp_in_app_sdk/latest/about/history/) +### 2.18.2 - November 27, 2024 + +## Features +* Added support for manual resurface in the mobile SDK, which can be trigged through Admin Interface. + +## Improvements +* Exposed `readLess` label in `UsercentricsLabels` object + ### 2.18.1 - November 20, 2024 ## Improvements diff --git a/android/build.gradle b/android/build.gradle index 674d3ed..33dd0fc 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,4 +1,4 @@ -def usercentrics_version = "2.18.1" +def usercentrics_version = "2.18.2" version usercentrics_version buildscript { diff --git a/android/src/androidTest/java/com/usercentrics/reactnativemodule/mock/GetCMPDataMock.kt b/android/src/androidTest/java/com/usercentrics/reactnativemodule/mock/GetCMPDataMock.kt index 495e964..f962259 100644 --- a/android/src/androidTest/java/com/usercentrics/reactnativemodule/mock/GetCMPDataMock.kt +++ b/android/src/androidTest/java/com/usercentrics/reactnativemodule/mock/GetCMPDataMock.kt @@ -154,6 +154,7 @@ internal object GetCMPDataMock { yes = "yes", storageInformationDescription = "Below you can see the longest potential duration for storage on a device, as set when using the cookie method of storage and if there are any other methods used.", btnBannerReadMore = "Read more", + readLess = "Read less", btnMore = "more", more = "more", linkToDpaInfo = "Data Processing Agreement", @@ -333,6 +334,7 @@ internal object GetCMPDataMock { publishedApps = listOf( PublishedApp(bundleId = "bundleId", platform = PublishedAppPlatform.ANDROID) ), + renewConsentsTimestamp = 1000L ) // From the debugger @@ -411,6 +413,7 @@ internal object GetCMPDataMock { "yes" to "yes", "storageInformationDescription" to "Below you can see the longest potential duration for storage on a device, as set when using the cookie method of storage and if there are any other methods used.", "btnBannerReadMore" to "Read more", + "readLess" to "Read less", "btnMore" to "more", "more" to "more", "linkToDpaInfo" to "Data Processing Agreement", @@ -568,7 +571,8 @@ internal object GetCMPDataMock { "platform" to 0 ) ), - "reshowBanner" to 0 + "reshowBanner" to 0, + "renewConsentsTimestamp" to 1000L ) val expectedCategories = listOf( diff --git a/android/src/main/java/com/usercentrics/reactnativeusercentrics/extensions/UsercentricsCMPDataExtensions.kt b/android/src/main/java/com/usercentrics/reactnativeusercentrics/extensions/UsercentricsCMPDataExtensions.kt index 98142de..4d86c8f 100644 --- a/android/src/main/java/com/usercentrics/reactnativeusercentrics/extensions/UsercentricsCMPDataExtensions.kt +++ b/android/src/main/java/com/usercentrics/reactnativeusercentrics/extensions/UsercentricsCMPDataExtensions.kt @@ -62,6 +62,7 @@ private fun UsercentricsSettings.serialize(): WritableMap { "dpsDisplayFormat" to dpsDisplayFormat?.ordinal, "framework" to framework?.ordinal, "publishedApps" to publishedApps?.map { it.serialize() }, + "renewConsentsTimestamp" to renewConsentsTimestamp ).toWritableMap() } @@ -127,6 +128,7 @@ private fun UsercentricsLabels.serialize(): Map { "yes" to yes, "storageInformationDescription" to storageInformationDescription, "btnBannerReadMore" to btnBannerReadMore, + "readLess" to readLess, "btnMore" to btnMore, "more" to more, "linkToDpaInfo" to linkToDpaInfo, diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 44dd807..de16e36 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -208,9 +208,9 @@ PODS: - React-jsinspector (0.65.3) - react-native-safe-area-context (3.4.1): - React-Core - - react-native-usercentrics (2.18.1): + - react-native-usercentrics (2.18.2): - React - - UsercentricsUI (= 2.18.1) + - UsercentricsUI (= 2.18.2) - react-native-webview (11.26.1): - React-Core - React-perflogger (0.65.3) @@ -280,9 +280,9 @@ PODS: - RNScreens (3.20.0): - React-Core - React-RCTImage - - Usercentrics (2.18.1) - - UsercentricsUI (2.18.1): - - Usercentrics (= 2.18.1) + - Usercentrics (2.18.2) + - UsercentricsUI (2.18.2): + - Usercentrics (= 2.18.2) - Yoga (1.14.0) DEPENDENCIES: diff --git a/example/ios/exampleTests/Mock/CMPData+Mock.swift b/example/ios/exampleTests/Mock/CMPData+Mock.swift index 9f7e603..001b176 100644 --- a/example/ios/exampleTests/Mock/CMPData+Mock.swift +++ b/example/ios/exampleTests/Mock/CMPData+Mock.swift @@ -44,6 +44,7 @@ extension UsercentricsSettings { dpsDisplayFormat: .all, framework: .vcdpa, publishedApps: [.mock()], + renewConsentsTimestamp: 1000, consentTemplates: [.mock()], categories: [.mock()]) } @@ -173,6 +174,7 @@ extension UsercentricsLabels { yes: "yes", storageInformationDescription: "storageInformationDescription", btnBannerReadMore: "btnBannerReadMore", + readLess: "readLess", btnMore: "btnMore", more: "more", linkToDpaInfo: "linkToDpaInfo", diff --git a/ios/Extensions/UsercentricsCMPData+Dict.swift b/ios/Extensions/UsercentricsCMPData+Dict.swift index e05b378..55febb5 100644 --- a/ios/Extensions/UsercentricsCMPData+Dict.swift +++ b/ios/Extensions/UsercentricsCMPData+Dict.swift @@ -43,6 +43,7 @@ extension UsercentricsSettings { "dpsDisplayFormat": (self.dpsDisplayFormat?.ordinal ?? nil) as Any, "framework": (self.framework?.ordinal ?? nil) as Any, "publishedApps": (self.publishedApps?.map { $0.toDictionary() } ?? nil) as Any, + "renewConsentsTimestamp": self.renewConsentsTimestamp as Any, ] } } @@ -110,6 +111,7 @@ extension UsercentricsLabels { "yes" : self.yes, "storageInformationDescription" : self.storageInformationDescription, "btnBannerReadMore" : self.btnBannerReadMore, + "readLess": self.readLess, "btnMore": self.btnMore, "more": self.more, "linkToDpaInfo" : self.linkToDpaInfo, diff --git a/package-lock.json b/package-lock.json index aafd49a..c06b3a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@usercentrics/react-native-sdk", - "version": "2.18.1", + "version": "2.18.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index dbc72eb..7cb4913 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "@usercentrics/react-native-sdk", - "version": "2.18.1", + "version": "2.18.2", "description": "Usercentrics SDK", "homepage": "https://usercentrics.com", "main": "lib/index.js", "types": "lib/index.d.ts", "author": "Usercentrics ", "iosPackageName": "react-native-usercentrics", - "iosPackageVersion": "2.18.1", + "iosPackageVersion": "2.18.2", "license": "SEE LICENSE IN LICENSE", "files": [ "android", diff --git a/src/__tests__/mocks.ts b/src/__tests__/mocks.ts index bfe414b..a3b3690 100644 --- a/src/__tests__/mocks.ts +++ b/src/__tests__/mocks.ts @@ -105,6 +105,7 @@ const ucLabels: UsercentricsLabels = { yes: "yes", storageInformationDescription: "storageInformationDescription", btnBannerReadMore: "btnBannerReadMore", + readLess: "readLess", btnMore: "btnMore", more: "more", linkToDpaInfo: "linkToDpaInfo", @@ -249,7 +250,8 @@ const ucSettings: UsercentricsSettings = { variants: undefined, dpsDisplayFormat: DpsDisplayFormat.all, framework: USAFrameworks.cpa, - publishedApps: undefined + publishedApps: undefined, + renewConsentsTimestamp: 1000 } const disclosure: ConsentDisclosure = { diff --git a/src/models/UsercentricsLabels.tsx b/src/models/UsercentricsLabels.tsx index fec7de3..1d3bb4d 100644 --- a/src/models/UsercentricsLabels.tsx +++ b/src/models/UsercentricsLabels.tsx @@ -60,6 +60,7 @@ export class UsercentricsLabels { yes: string storageInformationDescription: string btnBannerReadMore: string + readLess: string btnMore: string more: string linkToDpaInfo: string @@ -152,6 +153,7 @@ export class UsercentricsLabels { yes: string, storageInformationDescription: string, btnBannerReadMore: string, + readLess: string, btnMore: string, more: string, linkToDpaInfo: string, @@ -241,6 +243,7 @@ export class UsercentricsLabels { this.yes = yes this.storageInformationDescription = storageInformationDescription this.btnBannerReadMore = btnBannerReadMore + this.readLess = readLess this.btnMore = btnMore this.more = more this.linkToDpaInfo = linkToDpaInfo diff --git a/src/models/UsercentricsSettings.tsx b/src/models/UsercentricsSettings.tsx index eb95440..96f1b03 100644 --- a/src/models/UsercentricsSettings.tsx +++ b/src/models/UsercentricsSettings.tsx @@ -29,6 +29,7 @@ export class UsercentricsSettings { dpsDisplayFormat?: DpsDisplayFormat framework?: USAFrameworks publishedApps?: [PublishedApp] + renewConsentsTimestamp?: number constructor( labels: UsercentricsLabels, @@ -57,6 +58,7 @@ export class UsercentricsSettings { dpsDisplayFormat?: DpsDisplayFormat, framework?: USAFrameworks, publishedApps?: [PublishedApp], + renewConsentsTimestamp?: number, ) { this.labels = labels this.version = version @@ -84,6 +86,7 @@ export class UsercentricsSettings { this.dpsDisplayFormat = dpsDisplayFormat this.framework = framework this.publishedApps = publishedApps + this.renewConsentsTimestamp = renewConsentsTimestamp } }