@usercentrics/react-native-sdk 2.8.4 → 2.10.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 +34 -0
- package/README.md +15 -40
- package/android/build.gradle +1 -1
- package/android/src/androidTest/java/com/usercentrics/reactnativemodule/RNUsercentricsModuleTest.kt +92 -32
- package/android/src/androidTest/java/com/usercentrics/reactnativemodule/mock/GetCMPDataMock.kt +11 -1
- package/android/src/androidTest/java/com/usercentrics/reactnativemodule/mock/GetTCFDataMock.kt +29 -13
- package/android/src/main/java/com/usercentrics/reactnativeusercentrics/extensions/BannerSettingsExtensions.kt +1 -1
- package/android/src/main/java/com/usercentrics/reactnativeusercentrics/extensions/ReadableMapExtensions.kt +8 -0
- package/android/src/main/java/com/usercentrics/reactnativeusercentrics/extensions/TCFDataExtensions.kt +26 -7
- package/android/src/main/java/com/usercentrics/reactnativeusercentrics/extensions/UsercentricsCMPDataExtensions.kt +5 -0
- package/ios/Extensions/TCFData+Dict.swift +21 -6
- package/ios/Extensions/UsercentricsCMPData+Dict.swift +53 -0
- package/lib/models/TCF2Settings.d.ts +6 -1
- package/lib/models/TCF2Settings.js +6 -1
- package/lib/models/TCF2Settings.js.map +1 -1
- package/lib/models/TCFData.d.ts +19 -10
- package/lib/models/TCFData.js +20 -10
- package/lib/models/TCFData.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
[Release Notes](https://docs.usercentrics.com/cmp_in_app_sdk/latest/about/history/)
|
|
2
2
|
|
|
3
|
+
### 2.10.0 - November 16, 2023
|
|
4
|
+
|
|
5
|
+
## Improvements
|
|
6
|
+
|
|
7
|
+
* Accessibility: Various issues have been addressed to enhance accessibility.
|
|
8
|
+
* Resolved banner compatibility issues with iOS VoiceOver.
|
|
9
|
+
* Resolved banner compatibility issues with Android TalkBack.
|
|
10
|
+
* Adjusted font sizes to comply with Accessibility requirements on both iOS and Android.
|
|
11
|
+
|
|
12
|
+
* Added Ukrainian support language for TCF.
|
|
13
|
+
|
|
14
|
+
## Resolved Issues
|
|
15
|
+
|
|
16
|
+
* Fixed the issue of not disclosing the setting "showCloseButton" has been addressed, preventing errors on Android.
|
|
17
|
+
* Fixed the crash on Android when passing an invalid controller id to restore the user session.
|
|
18
|
+
* Fixed The issue of the remote variant configuration not being used in first layer on Unity.
|
|
19
|
+
|
|
20
|
+
### 2.9.0 - October 6, 2023
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
* :rocket: **Full TCF 2.2 Support**: As the industry shifts to TCF 2.2 (deadline: November 20, 2024), we are pleased to announce that SDK Version 2.9.0 now offers comprehensive support for this new industry standard.
|
|
25
|
+
* :warning: **Important Note**: Please be aware that this version is incompatible with TCF 2.0. Before upgrading to V 2.9.0, ensure a smooth transition to TCF 2.2 following the guidelines:
|
|
26
|
+
|
|
27
|
+
[How to migrate from TCF v2.0 to TCF v2.2](https://usercentrics.atlassian.net/wiki/spaces/SKB/pages/2668789801/How+to+migrate+from+TCF+v2.0+to+TCF+v2.2#\uD83D\uDCD8-Migration-instructions-for-TCF-v2.2)
|
|
28
|
+
|
|
29
|
+
## Key Changes and Enhancements:
|
|
30
|
+
|
|
31
|
+
* Updated Global Vendor List: We've transitioned to Global Vendor List v3 to align with industry standards.
|
|
32
|
+
* Legitimate Interest: To enhance transparency and privacy, purposes 3 to 6 have been removed, and purpose 11 has been introduced.
|
|
33
|
+
* Improved User Interface: We've made enhancements to the banner's second layer for a better user experience.
|
|
34
|
+
* Vendor Count Display: Users can now easily see the total count of IAB and non-IAB vendors.
|
|
35
|
+
* New Resurface Requirements: We've implemented new resurfacing requirements to keep your CMP compliant with the latest standards.
|
|
36
|
+
|
|
3
37
|
### 2.8.4 - September 27, 2023
|
|
4
38
|
|
|
5
39
|
## Improvements
|
package/README.md
CHANGED
|
@@ -6,50 +6,36 @@
|
|
|
6
6
|
alt="follow on Twitter">
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
# Welcome!
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
## The Usercentrics Apps SDK
|
|
14
|
+
|
|
15
|
+
The Usercentrics Apps SDK is a native Consent Management Platform solution for mobile apps, mobile games & TV applications, that enables the collection, documentation, and management of your user's privacy choices, in order to ensure legal compliance for legal regulations around the world.
|
|
12
16
|
|
|
13
17
|
<p align="center">
|
|
14
18
|
<img src="https://docs.usercentrics.com/cmp_in_app_sdk/latest/assets/media/predefinedUI.png" alt="Usercentrics UI" />
|
|
15
19
|
</p>
|
|
16
20
|
|
|
17
|
-
### Supported Legal Frameworks
|
|
18
|
-
|
|
19
|
-
* 🇪🇺 GDPR - European Union's General Data Protection Regulation
|
|
20
|
-
* 🇺🇸 CCPA - California's Consumer Privacy Act
|
|
21
|
-
* 🇧🇷 LGPD - Brazil’s Lei Geral de Proteção de Dados
|
|
22
|
-
* 🌎 TCF 2.0 - Transparency & Consent Framework 2.0
|
|
23
|
-
|
|
24
|
-
### Supported Platforms
|
|
25
|
-
|
|
26
|
-
| Android | iOS | Web | tvOS | MacOS |
|
|
27
|
-
|:-------:|:---:|:-----:|:----:|:-----:|
|
|
28
|
-
| ✅ | ✅ | ❌ | ❌ | ❌ |
|
|
29
|
-
|
|
30
21
|
### Requirements
|
|
31
22
|
* Android 5.0 (API 21) or higher with Kotlin 1.5 or higher
|
|
32
23
|
* iOS 11 or higher
|
|
33
24
|
* React 17.0 or higher
|
|
34
25
|
* React Native 0.65 or higher
|
|
35
|
-
* Node 14
|
|
26
|
+
* Node 14
|
|
36
27
|
|
|
37
|
-
##
|
|
28
|
+
## Get started!
|
|
38
29
|
|
|
39
|
-
|
|
30
|
+
In order to use and test the SDK, you will need a Usercentrics Account. Get [started with a free trial](https://usercentrics.com/in-app-sdk/).
|
|
40
31
|
|
|
41
|
-
|
|
42
|
-
npm install @usercentrics/react-native-sdk
|
|
43
|
-
```
|
|
32
|
+
## Integration
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```sh
|
|
51
|
-
pod install
|
|
52
|
-
```
|
|
34
|
+
Continue to our [documentation](https://usercentrics.com/docs/apps/intro/) for a step by step integration guide.
|
|
35
|
+
|
|
36
|
+
## Example
|
|
37
|
+
|
|
38
|
+
See the [example](https://github.com/Usercentrics/react-native/tree/master/example) directory for a complete sample app using Usercentrics.
|
|
53
39
|
|
|
54
40
|
## Sample Project
|
|
55
41
|
|
|
@@ -79,16 +65,5 @@ To run the sample project, you will need to run npm install from both root and e
|
|
|
79
65
|
npx react-native run-android
|
|
80
66
|
```
|
|
81
67
|
|
|
82
|
-
## Integration
|
|
83
|
-
|
|
84
|
-
Continue to our [documentation](https://docs.usercentrics.com/cmp_in_app_sdk/) for a step by step integration guide.
|
|
85
|
-
|
|
86
|
-
## Example
|
|
87
|
-
|
|
88
|
-
See the [example](https://github.com/Usercentrics/react-native/tree/master/example) directory for a complete sample app using Usercentrics.
|
|
89
|
-
|
|
90
|
-
## Get an Account
|
|
91
|
-
First step to get started with our SDK, is to create a Usercentrics Account, [get started with a free account](https://usercentrics.com/pricing/#mobile) or [request a quote](https://usercentrics.com/in-app-sdk/#in-app-demo) for your organization.
|
|
92
|
-
|
|
93
68
|
## Maintainers
|
|
94
69
|
- [Usercentrics](https://github.com/Usercentrics)
|
package/android/build.gradle
CHANGED
package/android/src/androidTest/java/com/usercentrics/reactnativemodule/RNUsercentricsModuleTest.kt
CHANGED
|
@@ -105,14 +105,18 @@ class RNUsercentricsModuleTest {
|
|
|
105
105
|
fun testConfigure() {
|
|
106
106
|
val usercentricsProxy = FakeUsercentricsProxy()
|
|
107
107
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
108
|
-
val module =
|
|
108
|
+
val module =
|
|
109
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
109
110
|
|
|
110
111
|
module.configure(usercentricsOptions)
|
|
111
112
|
|
|
112
113
|
assertEquals(1, usercentricsProxy.initializeCount)
|
|
113
114
|
assertEquals("AAAAA", usercentricsProxy.initializeOptionsArgument?.settingsId)
|
|
114
115
|
assertEquals("BBBBB", usercentricsProxy.initializeOptionsArgument?.ruleSetId)
|
|
115
|
-
assertEquals(
|
|
116
|
+
assertEquals(
|
|
117
|
+
UsercentricsLoggerLevel.NONE,
|
|
118
|
+
usercentricsProxy.initializeOptionsArgument?.loggerLevel
|
|
119
|
+
)
|
|
116
120
|
assertEquals(1000L, usercentricsProxy.initializeOptionsArgument?.timeoutMillis)
|
|
117
121
|
assertEquals("1.2.3", usercentricsProxy.initializeOptionsArgument?.version)
|
|
118
122
|
assertEquals(NetworkMode.EU, usercentricsProxy.initializeOptionsArgument?.networkMode)
|
|
@@ -122,7 +126,8 @@ class RNUsercentricsModuleTest {
|
|
|
122
126
|
fun testConfigureWithWrongValues() {
|
|
123
127
|
val usercentricsProxy = FakeUsercentricsProxy()
|
|
124
128
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
125
|
-
val module =
|
|
129
|
+
val module =
|
|
130
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
126
131
|
|
|
127
132
|
module.configure(JavaOnlyMap())
|
|
128
133
|
assertEquals(UsercentricsOptions(), usercentricsProxy.initializeOptionsArgument)
|
|
@@ -132,7 +137,8 @@ class RNUsercentricsModuleTest {
|
|
|
132
137
|
fun testIsReady() {
|
|
133
138
|
val usercentricsProxy = FakeUsercentricsProxy(isReadyAnswer = usercentricsReadyStatus)
|
|
134
139
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
135
|
-
val module =
|
|
140
|
+
val module =
|
|
141
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
136
142
|
|
|
137
143
|
val promise = FakePromise()
|
|
138
144
|
module.isReady(promise)
|
|
@@ -155,7 +161,8 @@ class RNUsercentricsModuleTest {
|
|
|
155
161
|
|
|
156
162
|
val usercentricsProxy = FakeUsercentricsProxy(isReadyAnswer = error)
|
|
157
163
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
158
|
-
val module =
|
|
164
|
+
val module =
|
|
165
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
159
166
|
|
|
160
167
|
val promise = FakePromise()
|
|
161
168
|
module.isReady(promise)
|
|
@@ -174,7 +181,8 @@ class RNUsercentricsModuleTest {
|
|
|
174
181
|
|
|
175
182
|
val usercentricsProxy = FakeUsercentricsProxy(instanceAnswer = usercentricsSDK)
|
|
176
183
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
177
|
-
val module =
|
|
184
|
+
val module =
|
|
185
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
178
186
|
|
|
179
187
|
val promise = FakePromise()
|
|
180
188
|
module.restoreUserSession("abc", promise)
|
|
@@ -202,7 +210,8 @@ class RNUsercentricsModuleTest {
|
|
|
202
210
|
}
|
|
203
211
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
204
212
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
205
|
-
val module =
|
|
213
|
+
val module =
|
|
214
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
206
215
|
|
|
207
216
|
val promise = FakePromise()
|
|
208
217
|
module.restoreUserSession("abc", promise)
|
|
@@ -217,7 +226,8 @@ class RNUsercentricsModuleTest {
|
|
|
217
226
|
every { usercentricsSDK.getControllerId() }.returns("abc")
|
|
218
227
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
219
228
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
220
|
-
val module =
|
|
229
|
+
val module =
|
|
230
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
221
231
|
val promise = FakePromise()
|
|
222
232
|
|
|
223
233
|
module.getControllerId(promise)
|
|
@@ -232,7 +242,8 @@ class RNUsercentricsModuleTest {
|
|
|
232
242
|
every { usercentricsSDK.getABTestingVariant() }.returns("variantA")
|
|
233
243
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
234
244
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
235
|
-
val module =
|
|
245
|
+
val module =
|
|
246
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
236
247
|
val promise = FakePromise()
|
|
237
248
|
|
|
238
249
|
module.getABTestingVariant(promise)
|
|
@@ -248,7 +259,8 @@ class RNUsercentricsModuleTest {
|
|
|
248
259
|
|
|
249
260
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
250
261
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
251
|
-
val module =
|
|
262
|
+
val module =
|
|
263
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
252
264
|
|
|
253
265
|
val promise = FakePromise()
|
|
254
266
|
|
|
@@ -280,7 +292,8 @@ class RNUsercentricsModuleTest {
|
|
|
280
292
|
|
|
281
293
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
282
294
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
283
|
-
val module =
|
|
295
|
+
val module =
|
|
296
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
284
297
|
|
|
285
298
|
val promise = FakePromise()
|
|
286
299
|
|
|
@@ -318,7 +331,8 @@ class RNUsercentricsModuleTest {
|
|
|
318
331
|
|
|
319
332
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
320
333
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
321
|
-
val module =
|
|
334
|
+
val module =
|
|
335
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
322
336
|
|
|
323
337
|
module.setCMPId(123)
|
|
324
338
|
|
|
@@ -332,7 +346,8 @@ class RNUsercentricsModuleTest {
|
|
|
332
346
|
|
|
333
347
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
334
348
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
335
|
-
val module =
|
|
349
|
+
val module =
|
|
350
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
336
351
|
|
|
337
352
|
module.setABTestingVariant("variantA")
|
|
338
353
|
|
|
@@ -348,7 +363,8 @@ class RNUsercentricsModuleTest {
|
|
|
348
363
|
|
|
349
364
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
350
365
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
351
|
-
val module =
|
|
366
|
+
val module =
|
|
367
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
352
368
|
val promise = FakePromise()
|
|
353
369
|
|
|
354
370
|
module.getTCFData(promise)
|
|
@@ -365,7 +381,8 @@ class RNUsercentricsModuleTest {
|
|
|
365
381
|
every { usercentricsSDK.getUserSessionData() }.returns(GetUserSessionDataMock.fake)
|
|
366
382
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
367
383
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
368
|
-
val module =
|
|
384
|
+
val module =
|
|
385
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
369
386
|
val promise = FakePromise()
|
|
370
387
|
|
|
371
388
|
module.getUserSessionData(promise)
|
|
@@ -380,7 +397,8 @@ class RNUsercentricsModuleTest {
|
|
|
380
397
|
|
|
381
398
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
382
399
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
383
|
-
val module =
|
|
400
|
+
val module =
|
|
401
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
384
402
|
val promise = FakePromise()
|
|
385
403
|
|
|
386
404
|
module.getUSPData(promise)
|
|
@@ -399,7 +417,8 @@ class RNUsercentricsModuleTest {
|
|
|
399
417
|
}
|
|
400
418
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
401
419
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
402
|
-
val module =
|
|
420
|
+
val module =
|
|
421
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
403
422
|
val promise = FakePromise()
|
|
404
423
|
|
|
405
424
|
module.changeLanguage("abc", promise)
|
|
@@ -426,7 +445,8 @@ class RNUsercentricsModuleTest {
|
|
|
426
445
|
|
|
427
446
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
428
447
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
429
|
-
val module =
|
|
448
|
+
val module =
|
|
449
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
430
450
|
val promise = FakePromise()
|
|
431
451
|
|
|
432
452
|
module.changeLanguage("abc", promise)
|
|
@@ -454,7 +474,8 @@ class RNUsercentricsModuleTest {
|
|
|
454
474
|
|
|
455
475
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
456
476
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
457
|
-
val module =
|
|
477
|
+
val module =
|
|
478
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
458
479
|
|
|
459
480
|
val promise = FakePromise()
|
|
460
481
|
module.acceptAllForTCF(0, 0, promise)
|
|
@@ -482,7 +503,8 @@ class RNUsercentricsModuleTest {
|
|
|
482
503
|
|
|
483
504
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
484
505
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
485
|
-
val module =
|
|
506
|
+
val module =
|
|
507
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
486
508
|
|
|
487
509
|
val promise = FakePromise()
|
|
488
510
|
module.denyAllForTCF(0, 0, promise)
|
|
@@ -509,7 +531,8 @@ class RNUsercentricsModuleTest {
|
|
|
509
531
|
|
|
510
532
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
511
533
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
512
|
-
val module =
|
|
534
|
+
val module =
|
|
535
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
513
536
|
|
|
514
537
|
val promise = FakePromise()
|
|
515
538
|
module.acceptAll(0, promise)
|
|
@@ -530,7 +553,8 @@ class RNUsercentricsModuleTest {
|
|
|
530
553
|
|
|
531
554
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
532
555
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
533
|
-
val module =
|
|
556
|
+
val module =
|
|
557
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
534
558
|
|
|
535
559
|
val promise = FakePromise()
|
|
536
560
|
module.denyAll(0, promise)
|
|
@@ -552,7 +576,8 @@ class RNUsercentricsModuleTest {
|
|
|
552
576
|
|
|
553
577
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
554
578
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
555
|
-
val module =
|
|
579
|
+
val module =
|
|
580
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
556
581
|
|
|
557
582
|
val promise = FakePromise()
|
|
558
583
|
module.saveDecisions(SaveDecisionsMock.callDecisions.serialize(), 0, promise)
|
|
@@ -576,7 +601,8 @@ class RNUsercentricsModuleTest {
|
|
|
576
601
|
|
|
577
602
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
578
603
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
579
|
-
val module =
|
|
604
|
+
val module =
|
|
605
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
580
606
|
|
|
581
607
|
val promise = FakePromise()
|
|
582
608
|
module.saveDecisionsForTCF(
|
|
@@ -603,7 +629,8 @@ class RNUsercentricsModuleTest {
|
|
|
603
629
|
|
|
604
630
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSDK)
|
|
605
631
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
606
|
-
val module =
|
|
632
|
+
val module =
|
|
633
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
607
634
|
|
|
608
635
|
val promise = FakePromise()
|
|
609
636
|
module.saveOptOutForCCPA(
|
|
@@ -628,7 +655,8 @@ class RNUsercentricsModuleTest {
|
|
|
628
655
|
|
|
629
656
|
val usercentricsProxy = FakeUsercentricsProxy(usercentricsSdk)
|
|
630
657
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
631
|
-
val module =
|
|
658
|
+
val module =
|
|
659
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
632
660
|
|
|
633
661
|
module.track(UsercentricsAnalyticsEventType.ACCEPT_ALL_FIRST_LAYER.ordinal)
|
|
634
662
|
|
|
@@ -640,7 +668,8 @@ class RNUsercentricsModuleTest {
|
|
|
640
668
|
fun testResetMethod() {
|
|
641
669
|
val usercentricsProxy = FakeUsercentricsProxy()
|
|
642
670
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
643
|
-
val module =
|
|
671
|
+
val module =
|
|
672
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
644
673
|
|
|
645
674
|
module.reset()
|
|
646
675
|
|
|
@@ -651,7 +680,8 @@ class RNUsercentricsModuleTest {
|
|
|
651
680
|
fun testShowFirstLayer() {
|
|
652
681
|
val usercentricsProxy = FakeUsercentricsProxy()
|
|
653
682
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
654
|
-
val module =
|
|
683
|
+
val module =
|
|
684
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
655
685
|
val promise = FakePromise()
|
|
656
686
|
module.showFirstLayer(bannerSettingsMap.toWritableMap(), promise)
|
|
657
687
|
promise.await()
|
|
@@ -662,7 +692,8 @@ class RNUsercentricsModuleTest {
|
|
|
662
692
|
fun testShowSecondLayer() {
|
|
663
693
|
val usercentricsProxy = FakeUsercentricsProxy()
|
|
664
694
|
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
665
|
-
val module =
|
|
695
|
+
val module =
|
|
696
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
666
697
|
val promise = FakePromise()
|
|
667
698
|
module.showSecondLayer(bannerSettingsMap.toWritableMap(), promise)
|
|
668
699
|
promise.await()
|
|
@@ -672,7 +703,7 @@ class RNUsercentricsModuleTest {
|
|
|
672
703
|
@Test
|
|
673
704
|
fun testShowFirstLayerWithCustomLocalLogo() {
|
|
674
705
|
val context = InstrumentationRegistry.getInstrumentation().context
|
|
675
|
-
val reactContextProviderMock = object: ReactContextProviderMock() {
|
|
706
|
+
val reactContextProviderMock = object : ReactContextProviderMock() {
|
|
676
707
|
|
|
677
708
|
override fun context(): Context {
|
|
678
709
|
return context
|
|
@@ -681,7 +712,11 @@ class RNUsercentricsModuleTest {
|
|
|
681
712
|
|
|
682
713
|
val usercentricsProxy = FakeUsercentricsProxy()
|
|
683
714
|
val reactApplicationContext = mockk<ReactApplicationContext>(relaxed = true)
|
|
684
|
-
val module = RNUsercentricsModule(
|
|
715
|
+
val module = RNUsercentricsModule(
|
|
716
|
+
reactApplicationContext,
|
|
717
|
+
usercentricsProxy,
|
|
718
|
+
reactContextProviderMock
|
|
719
|
+
)
|
|
685
720
|
|
|
686
721
|
val bannerSettingsMap = mapOf(
|
|
687
722
|
"variant" to null,
|
|
@@ -702,7 +737,8 @@ class RNUsercentricsModuleTest {
|
|
|
702
737
|
module.showFirstLayer(bannerSettingsMap.toWritableMap(), promise)
|
|
703
738
|
promise.await()
|
|
704
739
|
|
|
705
|
-
val someLocalImageDrawableId =
|
|
740
|
+
val someLocalImageDrawableId =
|
|
741
|
+
context.resources.getIdentifier("some_local_image", "drawable", context.packageName)
|
|
706
742
|
val expectedBannerSettings = BannerSettings(
|
|
707
743
|
firstLayerStyleSettings = FirstLayerStyleSettings(
|
|
708
744
|
layout = UsercentricsLayout.Popup(
|
|
@@ -716,4 +752,28 @@ class RNUsercentricsModuleTest {
|
|
|
716
752
|
)
|
|
717
753
|
assertEquals(expectedBannerSettings, usercentricsProxy.showFirstLayerBannerSettings)
|
|
718
754
|
}
|
|
755
|
+
|
|
756
|
+
@Test
|
|
757
|
+
fun testShowFirstLayerWhenShowCloseButtonIsNull() {
|
|
758
|
+
val usercentricsProxy = FakeUsercentricsProxy()
|
|
759
|
+
val contextMock = mockk<ReactApplicationContext>(relaxed = true)
|
|
760
|
+
val module =
|
|
761
|
+
RNUsercentricsModule(contextMock, usercentricsProxy, ReactContextProviderMock())
|
|
762
|
+
val bannerSettingsMap = mapOf(
|
|
763
|
+
"secondLayerStyleSettings" to mapOf(
|
|
764
|
+
"showCloseButton" to null
|
|
765
|
+
),
|
|
766
|
+
)
|
|
767
|
+
val promise = FakePromise()
|
|
768
|
+
module.showFirstLayer(bannerSettingsMap.toWritableMap(), promise)
|
|
769
|
+
promise.await()
|
|
770
|
+
|
|
771
|
+
val expectedBannerSettings = BannerSettings(
|
|
772
|
+
secondLayerStyleSettings = SecondLayerStyleSettings(
|
|
773
|
+
showCloseButton = null
|
|
774
|
+
)
|
|
775
|
+
)
|
|
776
|
+
|
|
777
|
+
assertEquals(expectedBannerSettings, usercentricsProxy.showFirstLayerBannerSettings)
|
|
778
|
+
}
|
|
719
779
|
}
|
package/android/src/androidTest/java/com/usercentrics/reactnativemodule/mock/GetCMPDataMock.kt
CHANGED
|
@@ -215,7 +215,12 @@ internal class GetCMPDataMock {
|
|
|
215
215
|
firstLayerHideToggles = false,
|
|
216
216
|
gdprApplies = true,
|
|
217
217
|
linksVendorListLinkLabel = "Vendorlist",
|
|
218
|
-
tabsPurposeLabel = "Purposes"
|
|
218
|
+
tabsPurposeLabel = "Purposes",
|
|
219
|
+
version = "2.2",
|
|
220
|
+
categoriesOfDataLabel = "categoriesOfDataLabel",
|
|
221
|
+
dataRetentionPeriodLabel = "dataRetentionPeriodLabel",
|
|
222
|
+
legitimateInterestLabel = "legitimateInterestLabel",
|
|
223
|
+
examplesLabel = "examplesLabel",
|
|
219
224
|
)
|
|
220
225
|
private val fakeCCPASettings = CCPASettings(
|
|
221
226
|
secondLayerHideLanguageSwitch = false,
|
|
@@ -398,6 +403,11 @@ internal class GetCMPDataMock {
|
|
|
398
403
|
"togglesSpecialFeaturesToggleOff" to "Off",
|
|
399
404
|
"appLayerNoteResurface" to "You can change your privacy settings or withdraw your consent at any time by opening the menu point Privacy Settings.",
|
|
400
405
|
"firstLayerNoteResurface" to "You can change your privacy settings or withdraw your consent at any time by clicking on our Privacy Button.",
|
|
406
|
+
"categoriesOfDataLabel" to "categoriesOfDataLabel",
|
|
407
|
+
"dataRetentionPeriodLabel" to "dataRetentionPeriodLabel",
|
|
408
|
+
"legitimateInterestLabel" to "legitimateInterestLabel",
|
|
409
|
+
"examplesLabel" to "examplesLabel",
|
|
410
|
+
"version" to "2.2",
|
|
401
411
|
)
|
|
402
412
|
private val expectedCCPASettings = hashMapOf(
|
|
403
413
|
"optOutNoticeLabel" to "Do not sell my personal information",
|
package/android/src/androidTest/java/com/usercentrics/reactnativemodule/mock/GetTCFDataMock.kt
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
package com.usercentrics.reactnativemodule.mock
|
|
2
2
|
|
|
3
|
-
import com.usercentrics.sdk.services.tcf.interfaces
|
|
3
|
+
import com.usercentrics.sdk.services.tcf.interfaces.IdAndName
|
|
4
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFData
|
|
5
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFFeature
|
|
6
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFPurpose
|
|
7
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFSpecialFeature
|
|
8
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFSpecialPurpose
|
|
9
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFStack
|
|
10
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFVendor
|
|
11
|
+
import com.usercentrics.tcf.core.model.gvl.VendorUrl
|
|
4
12
|
|
|
5
13
|
internal class GetTCFDataMock {
|
|
6
14
|
companion object {
|
|
@@ -8,7 +16,7 @@ internal class GetTCFDataMock {
|
|
|
8
16
|
features = listOf(
|
|
9
17
|
TCFFeature(
|
|
10
18
|
purposeDescription = "Data from offline data sources can be combined with your online activity in support of one or more purposes",
|
|
11
|
-
|
|
19
|
+
illustrations = listOf("Vendors can:\n* Combine data obtained offline with data collected online in support of one or more Purposes or Special Purposes."),
|
|
12
20
|
id = 2,
|
|
13
21
|
name = "Link different devices",
|
|
14
22
|
)
|
|
@@ -16,7 +24,7 @@ internal class GetTCFDataMock {
|
|
|
16
24
|
purposes = listOf(
|
|
17
25
|
TCFPurpose(
|
|
18
26
|
purposeDescription = "Cookies, device identifiers, or other information can be stored or accessed on your device for the purposes presented to you.",
|
|
19
|
-
|
|
27
|
+
illustrations = listOf("Vendors can:\n* Store and access information on the device such as cookies and device identifiers presented to a user."),
|
|
20
28
|
id = 1,
|
|
21
29
|
name = "Store and/or access information on a device",
|
|
22
30
|
consent = null,
|
|
@@ -30,7 +38,7 @@ internal class GetTCFDataMock {
|
|
|
30
38
|
specialFeatures = listOf(
|
|
31
39
|
TCFSpecialFeature(
|
|
32
40
|
purposeDescription = "Your precise geolocation data can be used in support of one or more purposes. This means your location can be accurate to within several meters.",
|
|
33
|
-
|
|
41
|
+
illustrations = listOf("Vendors can:\n* Collect and process precise geolocation data in support of one or more purposes.\nN.B. Precise geolocation means that there are no restrictions on the precision of a user’s location; this can be accurate to within several meters."),
|
|
34
42
|
id = 1,
|
|
35
43
|
name = "Use precise geolocation data",
|
|
36
44
|
consent = null,
|
|
@@ -42,7 +50,7 @@ internal class GetTCFDataMock {
|
|
|
42
50
|
specialPurposes = listOf(
|
|
43
51
|
TCFSpecialPurpose(
|
|
44
52
|
purposeDescription = "Your data can be used to monitor for and prevent fraudulent activity, and ensure systems and processes work properly and securely.",
|
|
45
|
-
|
|
53
|
+
illustrations = listOf("To ensure security, prevent fraud and debug vendors can:\n* Ensure data are securely transmitted\n* Detect and prevent malicious, fraudulent, invalid, or illegal activity.\n* Ensure correct and efficient operation of systems and processes, including to monitor and enhance the performance of systems and processes engaged in permitted purposes\nVendors cannot:\n* Conduct any other data processing operation allowed under a different purpose under this purpose.\nNote: Data collected and used to ensure security, prevent fraud, and debug may include automatically-sent device characteristics for identification, precise geolocation data, and data obtained by actively scanning device characteristics for identification without separate disclosure and/or opt-in."),
|
|
46
54
|
id = 1,
|
|
47
55
|
name = "Ensure security, prevent fraud, and debug",
|
|
48
56
|
)
|
|
@@ -92,10 +100,14 @@ internal class GetTCFDataMock {
|
|
|
92
100
|
deviceStorage = null,
|
|
93
101
|
usesCookies = false,
|
|
94
102
|
cookieRefresh = null,
|
|
95
|
-
dataSharedOutsideEU = false
|
|
103
|
+
dataSharedOutsideEU = false,
|
|
104
|
+
dataRetention = null,
|
|
105
|
+
dataCategories = listOf(IdAndName(id = 123, name = "name")),
|
|
106
|
+
vendorUrls = listOf(VendorUrl(langId = "langId", privacy = "privacy", legIntClaim = "legIntClaim"))
|
|
96
107
|
)
|
|
97
108
|
),
|
|
98
|
-
tcString = "abc"
|
|
109
|
+
tcString = "abc",
|
|
110
|
+
thirdPartyCount = 123,
|
|
99
111
|
)
|
|
100
112
|
|
|
101
113
|
// From the debugger
|
|
@@ -103,7 +115,7 @@ internal class GetTCFDataMock {
|
|
|
103
115
|
"features" to listOf(
|
|
104
116
|
mapOf(
|
|
105
117
|
"purposeDescription" to "Data from offline data sources can be combined with your online activity in support of one or more purposes",
|
|
106
|
-
"
|
|
118
|
+
"illustrations" to listOf("Vendors can:\n* Combine data obtained offline with data collected online in support of one or more Purposes or Special Purposes."),
|
|
107
119
|
"id" to 2,
|
|
108
120
|
"name" to "Link different devices",
|
|
109
121
|
)
|
|
@@ -111,7 +123,7 @@ internal class GetTCFDataMock {
|
|
|
111
123
|
"purposes" to listOf(
|
|
112
124
|
mapOf(
|
|
113
125
|
"purposeDescription" to "Cookies, device identifiers, or other information can be stored or accessed on your device for the purposes presented to you.",
|
|
114
|
-
"
|
|
126
|
+
"illustrations" to listOf("Vendors can:\n* Store and access information on the device such as cookies and device identifiers presented to a user."),
|
|
115
127
|
"id" to 1,
|
|
116
128
|
"name" to "Store and/or access information on a device",
|
|
117
129
|
"consent" to null,
|
|
@@ -125,7 +137,7 @@ internal class GetTCFDataMock {
|
|
|
125
137
|
"specialFeatures" to listOf(
|
|
126
138
|
mapOf(
|
|
127
139
|
"purposeDescription" to "Your precise geolocation data can be used in support of one or more purposes. This means your location can be accurate to within several meters.",
|
|
128
|
-
"
|
|
140
|
+
"illustrations" to listOf("Vendors can:\n* Collect and process precise geolocation data in support of one or more purposes.\nN.B. Precise geolocation means that there are no restrictions on the precision of a user’s location; this can be accurate to within several meters."),
|
|
129
141
|
"id" to 1,
|
|
130
142
|
"name" to "Use precise geolocation data",
|
|
131
143
|
"consent" to null,
|
|
@@ -137,7 +149,7 @@ internal class GetTCFDataMock {
|
|
|
137
149
|
"specialPurposes" to listOf(
|
|
138
150
|
mapOf(
|
|
139
151
|
"purposeDescription" to "Your data can be used to monitor for and prevent fraudulent activity, and ensure systems and processes work properly and securely.",
|
|
140
|
-
"
|
|
152
|
+
"illustrations" to listOf("To ensure security, prevent fraud and debug vendors can:\n* Ensure data are securely transmitted\n* Detect and prevent malicious, fraudulent, invalid, or illegal activity.\n* Ensure correct and efficient operation of systems and processes, including to monitor and enhance the performance of systems and processes engaged in permitted purposes\nVendors cannot:\n* Conduct any other data processing operation allowed under a different purpose under this purpose.\nNote: Data collected and used to ensure security, prevent fraud, and debug may include automatically-sent device characteristics for identification, precise geolocation data, and data obtained by actively scanning device characteristics for identification without separate disclosure and/or opt-in."),
|
|
141
153
|
"id" to 1,
|
|
142
154
|
"name" to "Ensure security, prevent fraud, and debug",
|
|
143
155
|
)
|
|
@@ -184,10 +196,14 @@ internal class GetTCFDataMock {
|
|
|
184
196
|
"deviceStorageDisclosureUrl" to null,
|
|
185
197
|
"usesCookies" to false,
|
|
186
198
|
"cookieRefresh" to null,
|
|
187
|
-
"dataSharedOutsideEU" to false
|
|
199
|
+
"dataSharedOutsideEU" to false,
|
|
200
|
+
"dataRetention" to null,
|
|
201
|
+
"dataCategories" to listOf(123),
|
|
202
|
+
"vendorUrls" to listOf(mapOf("langId" to "langId", "privacy" to "privacy", "legIntClaim" to "legIntClaim")),
|
|
188
203
|
),
|
|
189
204
|
),
|
|
190
|
-
"tcString" to "abc"
|
|
205
|
+
"tcString" to "abc",
|
|
206
|
+
"thirdPartyCount" to 123,
|
|
191
207
|
)
|
|
192
208
|
}
|
|
193
209
|
}
|
|
@@ -155,7 +155,7 @@ internal fun String.deserializeButtonType(): ButtonType {
|
|
|
155
155
|
internal fun ReadableMap.secondLayerStyleSettingsFromMap(context: Context): SecondLayerStyleSettings {
|
|
156
156
|
return SecondLayerStyleSettings(
|
|
157
157
|
buttonLayout = getMap("buttonLayout")?.buttonLayoutFromMap(context),
|
|
158
|
-
showCloseButton =
|
|
158
|
+
showCloseButton = getBooleanOrNull("showCloseButton"),
|
|
159
159
|
)
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -36,15 +36,19 @@ internal fun List<*>.serialize(): WritableArray {
|
|
|
36
36
|
is Boolean -> {
|
|
37
37
|
array.pushBoolean(value)
|
|
38
38
|
}
|
|
39
|
+
|
|
39
40
|
is Int -> {
|
|
40
41
|
array.pushInt(value)
|
|
41
42
|
}
|
|
43
|
+
|
|
42
44
|
is Double -> {
|
|
43
45
|
array.pushDouble(value)
|
|
44
46
|
}
|
|
47
|
+
|
|
45
48
|
is String -> {
|
|
46
49
|
array.pushString(value)
|
|
47
50
|
}
|
|
51
|
+
|
|
48
52
|
is Map<*, *> -> {
|
|
49
53
|
val newMap = (value as Map<String, Any>).toWritableMap()
|
|
50
54
|
array.pushMap(newMap)
|
|
@@ -75,15 +79,19 @@ internal fun Map<String, Any?>.toWritableMap(): WritableMap {
|
|
|
75
79
|
is Boolean -> {
|
|
76
80
|
map.putBoolean(key, value)
|
|
77
81
|
}
|
|
82
|
+
|
|
78
83
|
is Int -> {
|
|
79
84
|
map.putInt(key, value)
|
|
80
85
|
}
|
|
86
|
+
|
|
81
87
|
is Double -> {
|
|
82
88
|
map.putDouble(key, value)
|
|
83
89
|
}
|
|
90
|
+
|
|
84
91
|
is String -> {
|
|
85
92
|
map.putString(key, value)
|
|
86
93
|
}
|
|
94
|
+
|
|
87
95
|
is Map<*, *> -> {
|
|
88
96
|
val newMap = (value as Map<String, Any>).toWritableMap()
|
|
89
97
|
map.putMap(key, newMap)
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
package com.usercentrics.reactnativeusercentrics.extensions
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.WritableMap
|
|
4
|
-
import com.usercentrics.sdk.services.tcf.interfaces
|
|
4
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFData
|
|
5
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFFeature
|
|
6
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFPurpose
|
|
7
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFSpecialFeature
|
|
8
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFSpecialPurpose
|
|
9
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFStack
|
|
10
|
+
import com.usercentrics.sdk.services.tcf.interfaces.TCFVendor
|
|
11
|
+
import com.usercentrics.tcf.core.model.gvl.DataRetention
|
|
12
|
+
import com.usercentrics.tcf.core.model.gvl.VendorUrl
|
|
5
13
|
|
|
6
14
|
internal fun TCFData.serialize(): WritableMap {
|
|
7
15
|
return mapOf(
|
|
@@ -11,14 +19,15 @@ internal fun TCFData.serialize(): WritableMap {
|
|
|
11
19
|
"specialPurposes" to specialPurposes.map { it.serialize() },
|
|
12
20
|
"stacks" to stacks.map { it.serialize() },
|
|
13
21
|
"vendors" to vendors.map { it.serialize() },
|
|
14
|
-
"tcString" to tcString
|
|
22
|
+
"tcString" to tcString,
|
|
23
|
+
"thirdPartyCount" to thirdPartyCount
|
|
15
24
|
).toWritableMap()
|
|
16
25
|
}
|
|
17
26
|
|
|
18
27
|
private fun TCFFeature.serialize(): WritableMap {
|
|
19
28
|
return mapOf(
|
|
20
29
|
"purposeDescription" to purposeDescription,
|
|
21
|
-
"
|
|
30
|
+
"illustrations" to illustrations,
|
|
22
31
|
"id" to id,
|
|
23
32
|
"name" to name,
|
|
24
33
|
).toWritableMap()
|
|
@@ -27,7 +36,7 @@ private fun TCFFeature.serialize(): WritableMap {
|
|
|
27
36
|
private fun TCFPurpose.serialize(): WritableMap {
|
|
28
37
|
return mapOf(
|
|
29
38
|
"purposeDescription" to purposeDescription,
|
|
30
|
-
"
|
|
39
|
+
"illustrations" to illustrations,
|
|
31
40
|
"id" to id,
|
|
32
41
|
"name" to name,
|
|
33
42
|
"consent" to consent,
|
|
@@ -43,7 +52,7 @@ private fun TCFPurpose.serialize(): WritableMap {
|
|
|
43
52
|
private fun TCFSpecialPurpose.serialize(): WritableMap {
|
|
44
53
|
return mapOf(
|
|
45
54
|
"purposeDescription" to purposeDescription,
|
|
46
|
-
"
|
|
55
|
+
"illustrations" to illustrations,
|
|
47
56
|
"id" to id,
|
|
48
57
|
"name" to name,
|
|
49
58
|
).toWritableMap()
|
|
@@ -52,7 +61,7 @@ private fun TCFSpecialPurpose.serialize(): WritableMap {
|
|
|
52
61
|
private fun TCFSpecialFeature.serialize(): WritableMap {
|
|
53
62
|
return mapOf(
|
|
54
63
|
"purposeDescription" to purposeDescription,
|
|
55
|
-
"
|
|
64
|
+
"illustrations" to illustrations,
|
|
56
65
|
"id" to id,
|
|
57
66
|
"name" to name,
|
|
58
67
|
"consent" to consent,
|
|
@@ -94,6 +103,16 @@ private fun TCFVendor.serialize(): WritableMap {
|
|
|
94
103
|
// "deviceStorage" to deviceStorage.serialize(),
|
|
95
104
|
"usesCookies" to usesCookies,
|
|
96
105
|
"cookieRefresh" to cookieRefresh,
|
|
97
|
-
"dataSharedOutsideEU" to dataSharedOutsideEU
|
|
106
|
+
"dataSharedOutsideEU" to dataSharedOutsideEU,
|
|
107
|
+
"dataCategories" to dataCategories.map { it.id },
|
|
108
|
+
"vendorUrls" to vendorUrls.map { it.serialize() }
|
|
109
|
+
).toWritableMap()
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
private fun VendorUrl.serialize(): WritableMap {
|
|
113
|
+
return mapOf(
|
|
114
|
+
"langId" to langId,
|
|
115
|
+
"privacy" to privacy,
|
|
116
|
+
"legIntClaim" to legIntClaim
|
|
98
117
|
).toWritableMap()
|
|
99
118
|
}
|
|
@@ -184,6 +184,11 @@ private fun TCF2Settings.serialize(): WritableMap {
|
|
|
184
184
|
"togglesSpecialFeaturesToggleOff" to togglesSpecialFeaturesToggleOff,
|
|
185
185
|
"appLayerNoteResurface" to appLayerNoteResurface,
|
|
186
186
|
"firstLayerNoteResurface" to firstLayerNoteResurface,
|
|
187
|
+
"categoriesOfDataLabel" to categoriesOfDataLabel,
|
|
188
|
+
"dataRetentionPeriodLabel" to dataRetentionPeriodLabel,
|
|
189
|
+
"legitimateInterestLabel" to legitimateInterestLabel,
|
|
190
|
+
"version" to version,
|
|
191
|
+
"examplesLabel" to examplesLabel,
|
|
187
192
|
).toWritableMap()
|
|
188
193
|
}
|
|
189
194
|
|
|
@@ -9,7 +9,9 @@ extension TCFData {
|
|
|
9
9
|
"specialFeatures" : specialFeatures.map { $0.toDictionary() },
|
|
10
10
|
"specialPurposes" : specialPurposes.map { $0.toDictionary() },
|
|
11
11
|
"stacks" : stacks.map { $0.toDictionary() },
|
|
12
|
-
"vendors" : vendors.map { $0.toDictionary() }
|
|
12
|
+
"vendors" : vendors.map { $0.toDictionary() },
|
|
13
|
+
"tcString": tcString,
|
|
14
|
+
"thirdPartyCount": thirdPartyCount
|
|
13
15
|
]
|
|
14
16
|
}
|
|
15
17
|
}
|
|
@@ -18,7 +20,7 @@ extension TCFFeature {
|
|
|
18
20
|
func toDictionary() -> NSDictionary {
|
|
19
21
|
return[
|
|
20
22
|
"purposeDescription" : purposeDescription,
|
|
21
|
-
"
|
|
23
|
+
"illustrations" : illustrations,
|
|
22
24
|
"id" : id,
|
|
23
25
|
"name" : name,
|
|
24
26
|
]
|
|
@@ -29,7 +31,7 @@ extension TCFPurpose {
|
|
|
29
31
|
func toDictionary() -> NSDictionary {
|
|
30
32
|
return[
|
|
31
33
|
"purposeDescription" : purposeDescription,
|
|
32
|
-
"
|
|
34
|
+
"illustrations" : illustrations,
|
|
33
35
|
"id" : id,
|
|
34
36
|
"name" : name,
|
|
35
37
|
"consent" : consent?.boolValue as Any,
|
|
@@ -46,7 +48,7 @@ extension TCFSpecialPurpose {
|
|
|
46
48
|
func toDictionary() -> NSDictionary {
|
|
47
49
|
return[
|
|
48
50
|
"purposeDescription" : purposeDescription,
|
|
49
|
-
"
|
|
51
|
+
"illustrations" : illustrations,
|
|
50
52
|
"id" : id,
|
|
51
53
|
"name" : name,
|
|
52
54
|
]
|
|
@@ -59,7 +61,7 @@ extension TCFSpecialFeature {
|
|
|
59
61
|
func toDictionary() -> NSDictionary {
|
|
60
62
|
return[
|
|
61
63
|
"purposeDescription" : purposeDescription,
|
|
62
|
-
"
|
|
64
|
+
"illustrations" : illustrations,
|
|
63
65
|
"id" : id,
|
|
64
66
|
"name" : name,
|
|
65
67
|
"consent" : self.consent?.boolValue as Any ,
|
|
@@ -103,7 +105,20 @@ extension TCFVendor {
|
|
|
103
105
|
"deviceStorageDisclosureUrl" : deviceStorageDisclosureUrl as Any,
|
|
104
106
|
"usesCookies" : usesCookies,
|
|
105
107
|
"cookieRefresh" : cookieRefresh?.boolValue as Any,
|
|
106
|
-
"dataSharedOutsideEU": dataSharedOutsideEU?.boolValue as Any
|
|
108
|
+
"dataSharedOutsideEU": dataSharedOutsideEU?.boolValue as Any,
|
|
109
|
+
"dataCategories": dataCategories.map { $0.id },
|
|
110
|
+
"vendorUrls": vendorUrls.map { $0.toDictionary() }
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
extension VendorUrl {
|
|
116
|
+
|
|
117
|
+
func toDictionary() -> NSDictionary {
|
|
118
|
+
return [
|
|
119
|
+
"langId": langId as Any,
|
|
120
|
+
"privacy": privacy as Any,
|
|
121
|
+
"legIntClaim": legIntClaim as Any
|
|
107
122
|
]
|
|
108
123
|
}
|
|
109
124
|
}
|
|
@@ -9,6 +9,7 @@ extension UsercentricsCMPData {
|
|
|
9
9
|
"categories": self.categories.map { $0.toDictionary() },
|
|
10
10
|
"activeVariant": self.activeVariant.ordinal as Any,
|
|
11
11
|
"userLocation": self.userLocation.toDictionary(),
|
|
12
|
+
"legalBasis": self.legalBasis.toDictionary()
|
|
12
13
|
]
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -189,6 +190,12 @@ extension TCF2Settings {
|
|
|
189
190
|
"togglesSpecialFeaturesToggleOff" : self.togglesSpecialFeaturesToggleOff as Any,
|
|
190
191
|
"appLayerNoteResurface" : self.appLayerNoteResurface as Any,
|
|
191
192
|
"firstLayerNoteResurface" : self.firstLayerNoteResurface as Any,
|
|
193
|
+
"version": self.version as Any,
|
|
194
|
+
"categoriesOfDataLabel": self.categoriesOfDataLabel,
|
|
195
|
+
"dataRetentionPeriodLabel": self.dataRetentionPeriodLabel,
|
|
196
|
+
"legitimateInterestLabel": self.legitimateInterestLabel,
|
|
197
|
+
"version": self.version,
|
|
198
|
+
"examplesLabel": self.examplesLabel,
|
|
192
199
|
]
|
|
193
200
|
}
|
|
194
201
|
}
|
|
@@ -342,3 +349,49 @@ extension UsercentricsLocation {
|
|
|
342
349
|
]
|
|
343
350
|
}
|
|
344
351
|
}
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
extension LegalBasisLocalization {
|
|
355
|
+
|
|
356
|
+
func toDictionary() -> NSDictionary {
|
|
357
|
+
return [
|
|
358
|
+
"labelsAria": (labelsAria?.toDictionary() ?? nil) as Any,
|
|
359
|
+
"data": data as Any
|
|
360
|
+
]
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
extension TranslationAriaLabels {
|
|
365
|
+
|
|
366
|
+
func toDictionary() -> NSDictionary {
|
|
367
|
+
return [
|
|
368
|
+
"acceptAllButton": acceptAllButton as Any,
|
|
369
|
+
"ccpaButton": ccpaButton as Any,
|
|
370
|
+
"ccpaMoreInformation": ccpaMoreInformation as Any,
|
|
371
|
+
"closeButton": closeButton as Any,
|
|
372
|
+
"collapse": collapse as Any,
|
|
373
|
+
"cookiePolicyButton": cookiePolicyButton as Any,
|
|
374
|
+
"copyControllerId": copyControllerId as Any,
|
|
375
|
+
"denyAllButton": denyAllButton as Any,
|
|
376
|
+
"expand": expand as Any,
|
|
377
|
+
"fullscreenButton": fullscreenButton as Any,
|
|
378
|
+
"imprintButton": imprintButton as Any,
|
|
379
|
+
"languageSelector": languageSelector as Any,
|
|
380
|
+
"privacyButton": privacyButton as Any,
|
|
381
|
+
"privacyPolicyButton": privacyPolicyButton as Any,
|
|
382
|
+
"saveButton": saveButton as Any,
|
|
383
|
+
"serviceInCategoryDetails": serviceInCategoryDetails as Any,
|
|
384
|
+
"servicesInCategory": servicesInCategory as Any,
|
|
385
|
+
"tabButton": tabButton as Any,
|
|
386
|
+
"usercentricsCMPButtons": usercentricsCMPButtons as Any,
|
|
387
|
+
"usercentricsCMPContent": usercentricsCMPContent as Any,
|
|
388
|
+
"usercentricsCMPHeader": usercentricsCMPHeader as Any,
|
|
389
|
+
"usercentricsCMPUI": usercentricsCMPUI as Any,
|
|
390
|
+
"usercentricsCard": usercentricsCard as Any,
|
|
391
|
+
"usercentricsList": usercentricsList as Any,
|
|
392
|
+
"vendorConsentToggle": vendorConsentToggle as Any,
|
|
393
|
+
"vendorDetailedStorageInformation": vendorDetailedStorageInformation as Any,
|
|
394
|
+
"vendorLegIntToggle": vendorLegIntToggle as Any
|
|
395
|
+
]
|
|
396
|
+
}
|
|
397
|
+
}
|
|
@@ -45,5 +45,10 @@ export declare class TCF2Settings {
|
|
|
45
45
|
togglesSpecialFeaturesToggleOff: string;
|
|
46
46
|
appLayerNoteResurface: string;
|
|
47
47
|
firstLayerNoteResurface: string;
|
|
48
|
-
|
|
48
|
+
categoriesOfDataLabel: string;
|
|
49
|
+
dataRetentionPeriodLabel: string;
|
|
50
|
+
legitimateInterestLabel: string;
|
|
51
|
+
version: string;
|
|
52
|
+
examplesLabel: string;
|
|
53
|
+
constructor(firstLayerTitle: string, secondLayerTitle: string, tabsPurposeLabel: string, tabsVendorsLabel: string, labelsFeatures: string, labelsIabVendors: string, labelsNonIabPurposes: string, labelsNonIabVendors: string, labelsPurposes: string, vendorFeatures: string, vendorLegitimateInterestPurposes: string, vendorPurpose: string, vendorSpecialFeatures: string, vendorSpecialPurposes: string, togglesConsentToggleLabel: string, togglesLegIntToggleLabel: string, buttonsAcceptAllLabel: string, buttonsDenyAllLabel: string, buttonsSaveLabel: string, linksManageSettingsLabel: string, linksVendorListLinkLabel: string, cmpId: number, cmpVersion: number, firstLayerHideToggles: boolean, secondLayerHideToggles: boolean, hideLegitimateInterestToggles: boolean, secondLayerHideButtonDeny: boolean, publisherCountryCode: string, purposeOneTreatment: boolean, selectedVendorIds: [number], gdprApplies: boolean, selectedStacks: [number], disabledSpecialFeatures: [number], firstLayerShowDescriptions: boolean, hideNonIabOnFirstLayer: boolean, resurfacePeriodEnded: boolean, resurfacePurposeChanged: boolean, resurfaceVendorAdded: boolean, firstLayerDescription: string, firstLayerAdditionalInfo: string, secondLayerDescription: string, togglesSpecialFeaturesToggleOn: string, togglesSpecialFeaturesToggleOff: string, appLayerNoteResurface: string, firstLayerNoteResurface: string, categoriesOfDataLabel: string, dataRetentionPeriodLabel: string, legitimateInterestLabel: string, version: string, examplesLabel: string, firstLayerHideButtonDeny?: boolean);
|
|
49
54
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class TCF2Settings {
|
|
2
|
-
constructor(firstLayerTitle, secondLayerTitle, tabsPurposeLabel, tabsVendorsLabel, labelsFeatures, labelsIabVendors, labelsNonIabPurposes, labelsNonIabVendors, labelsPurposes, vendorFeatures, vendorLegitimateInterestPurposes, vendorPurpose, vendorSpecialFeatures, vendorSpecialPurposes, togglesConsentToggleLabel, togglesLegIntToggleLabel, buttonsAcceptAllLabel, buttonsDenyAllLabel, buttonsSaveLabel, linksManageSettingsLabel, linksVendorListLinkLabel, cmpId, cmpVersion, firstLayerHideToggles, secondLayerHideToggles, hideLegitimateInterestToggles, secondLayerHideButtonDeny, publisherCountryCode, purposeOneTreatment, selectedVendorIds, gdprApplies, selectedStacks, disabledSpecialFeatures, firstLayerShowDescriptions, hideNonIabOnFirstLayer, resurfacePeriodEnded, resurfacePurposeChanged, resurfaceVendorAdded, firstLayerDescription, firstLayerAdditionalInfo, secondLayerDescription, togglesSpecialFeaturesToggleOn, togglesSpecialFeaturesToggleOff, appLayerNoteResurface, firstLayerNoteResurface, firstLayerHideButtonDeny) {
|
|
2
|
+
constructor(firstLayerTitle, secondLayerTitle, tabsPurposeLabel, tabsVendorsLabel, labelsFeatures, labelsIabVendors, labelsNonIabPurposes, labelsNonIabVendors, labelsPurposes, vendorFeatures, vendorLegitimateInterestPurposes, vendorPurpose, vendorSpecialFeatures, vendorSpecialPurposes, togglesConsentToggleLabel, togglesLegIntToggleLabel, buttonsAcceptAllLabel, buttonsDenyAllLabel, buttonsSaveLabel, linksManageSettingsLabel, linksVendorListLinkLabel, cmpId, cmpVersion, firstLayerHideToggles, secondLayerHideToggles, hideLegitimateInterestToggles, secondLayerHideButtonDeny, publisherCountryCode, purposeOneTreatment, selectedVendorIds, gdprApplies, selectedStacks, disabledSpecialFeatures, firstLayerShowDescriptions, hideNonIabOnFirstLayer, resurfacePeriodEnded, resurfacePurposeChanged, resurfaceVendorAdded, firstLayerDescription, firstLayerAdditionalInfo, secondLayerDescription, togglesSpecialFeaturesToggleOn, togglesSpecialFeaturesToggleOff, appLayerNoteResurface, firstLayerNoteResurface, categoriesOfDataLabel, dataRetentionPeriodLabel, legitimateInterestLabel, version, examplesLabel, firstLayerHideButtonDeny) {
|
|
3
3
|
this.firstLayerTitle = firstLayerTitle;
|
|
4
4
|
this.secondLayerTitle = secondLayerTitle;
|
|
5
5
|
this.tabsPurposeLabel = tabsPurposeLabel;
|
|
@@ -46,6 +46,11 @@ export class TCF2Settings {
|
|
|
46
46
|
this.togglesSpecialFeaturesToggleOff = togglesSpecialFeaturesToggleOff;
|
|
47
47
|
this.appLayerNoteResurface = appLayerNoteResurface;
|
|
48
48
|
this.firstLayerNoteResurface = firstLayerNoteResurface;
|
|
49
|
+
this.categoriesOfDataLabel = categoriesOfDataLabel;
|
|
50
|
+
this.dataRetentionPeriodLabel = dataRetentionPeriodLabel;
|
|
51
|
+
this.legitimateInterestLabel = legitimateInterestLabel;
|
|
52
|
+
this.version = version;
|
|
53
|
+
this.examplesLabel = examplesLabel;
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
56
|
//# sourceMappingURL=TCF2Settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TCF2Settings.js","sourceRoot":"","sources":["../../src/models/TCF2Settings.tsx"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAY;
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CAAA;QAC5D,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAA;QACpD,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAA;QAChD,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAA;QACtD,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAA;QAChD,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAA;QAClD,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAA;QACxD,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAA;QACpD,IAAI,CAAC,8BAA8B,GAAG,8BAA8B,CAAA;QACpE,IAAI,CAAC,+BAA+B,GAAG,+BAA+B,CAAA;QACtE,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAA;QAClD,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAA;QACtD,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAA;QAClD,IAAI,CAAC,wBAAwB,GAAG,wBAAwB,CAAA;QACxD,IAAI,CAAC,uBAAuB,GAAG,uBAAuB,CAAA;QACtD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IACtC,CAAC;CAEJ"}
|
package/lib/models/TCFData.d.ts
CHANGED
|
@@ -6,18 +6,19 @@ export declare class TCFData {
|
|
|
6
6
|
stacks: TCFStack[];
|
|
7
7
|
vendors: TCFVendor[];
|
|
8
8
|
tcString: String;
|
|
9
|
-
|
|
9
|
+
thirdPartyCount: number;
|
|
10
|
+
constructor(features: TCFFeature[], purposes: TCFPurpose[], specialFeatures: TCFSpecialFeature[], specialPurposes: TCFSpecialPurpose[], stacks: TCFStack[], vendors: TCFVendor[], tcString: String, thirdPartyCount: number);
|
|
10
11
|
}
|
|
11
12
|
export declare class TCFFeature {
|
|
12
13
|
purposeDescription: string;
|
|
13
|
-
|
|
14
|
+
illustrations: [string];
|
|
14
15
|
id: number;
|
|
15
16
|
name: string;
|
|
16
|
-
constructor(purposeDescription: string,
|
|
17
|
+
constructor(purposeDescription: string, illustrations: [string], id: number, name: string);
|
|
17
18
|
}
|
|
18
19
|
export declare class TCFPurpose {
|
|
19
20
|
purposeDescription: string;
|
|
20
|
-
|
|
21
|
+
illustrations: [string];
|
|
21
22
|
id: number;
|
|
22
23
|
name: string;
|
|
23
24
|
consent?: boolean;
|
|
@@ -26,25 +27,25 @@ export declare class TCFPurpose {
|
|
|
26
27
|
showConsentToggle: boolean;
|
|
27
28
|
showLegitimateInterestToggle: boolean;
|
|
28
29
|
stackId?: number;
|
|
29
|
-
constructor(purposeDescription: string,
|
|
30
|
+
constructor(purposeDescription: string, illustrations: [string], id: number, name: string, isPartOfASelectedStack: boolean, showConsentToggle: boolean, showLegitimateInterestToggle: boolean, legitimateInterestConsent?: boolean, consent?: boolean, stackId?: number);
|
|
30
31
|
}
|
|
31
32
|
export declare class TCFSpecialFeature {
|
|
32
33
|
purposeDescription: string;
|
|
33
|
-
|
|
34
|
+
illustrations: [string];
|
|
34
35
|
id: number;
|
|
35
36
|
name: string;
|
|
36
37
|
consent?: boolean;
|
|
37
38
|
isPartOfASelectedStack: boolean;
|
|
38
39
|
stackId?: number;
|
|
39
40
|
showConsentToggle: boolean;
|
|
40
|
-
constructor(purposeDescription: string,
|
|
41
|
+
constructor(purposeDescription: string, illustrations: [string], id: number, isPartOfASelectedStack: boolean, showConsentToggle: boolean, name: string, consent?: boolean, stackId?: number);
|
|
41
42
|
}
|
|
42
43
|
export declare class TCFSpecialPurpose {
|
|
43
44
|
purposeDescription: string;
|
|
44
|
-
|
|
45
|
+
illustrations: [string];
|
|
45
46
|
id: number;
|
|
46
47
|
name: string;
|
|
47
|
-
constructor(purposeDescription: string,
|
|
48
|
+
constructor(purposeDescription: string, illustrations: [string], id: number, name: string);
|
|
48
49
|
}
|
|
49
50
|
export declare class TCFStack {
|
|
50
51
|
description: string;
|
|
@@ -74,5 +75,13 @@ export declare class TCFVendor {
|
|
|
74
75
|
usesCookies: boolean;
|
|
75
76
|
cookieRefresh?: boolean;
|
|
76
77
|
dataSharedOutsideEU: boolean;
|
|
77
|
-
|
|
78
|
+
dataCategories: [number];
|
|
79
|
+
vendorUrls: VendorUrl[];
|
|
80
|
+
constructor(features: [number], flexiblePurposes: [number], id: number, legitimateInterestPurposes: [number], name: string, policyUrl: string, purposes: [number], specialFeatures: [number], specialPurposes: [number], showConsentToggle: boolean, showLegitimateInterestToggle: boolean, cookieMaxAgeSeconds: number, usesNonCookieAccess: boolean, usesCookies: boolean, dataSharedOutsideEU: boolean, dataCategories: [number], vendorUrls: VendorUrl[], deviceStorageDisclosureUrl?: string, legitimateInterestConsent?: boolean, consent?: boolean, cookieRefresh?: boolean);
|
|
81
|
+
}
|
|
82
|
+
export declare class VendorUrl {
|
|
83
|
+
langId?: string;
|
|
84
|
+
privacy?: string;
|
|
85
|
+
legIntClaim?: string;
|
|
86
|
+
constructor(langId: string, privacy: string, legIntClaim: string);
|
|
78
87
|
}
|
package/lib/models/TCFData.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export class TCFData {
|
|
2
|
-
constructor(features, purposes, specialFeatures, specialPurposes, stacks, vendors, tcString) {
|
|
2
|
+
constructor(features, purposes, specialFeatures, specialPurposes, stacks, vendors, tcString, thirdPartyCount) {
|
|
3
3
|
this.features = features;
|
|
4
4
|
this.purposes = purposes;
|
|
5
5
|
this.specialFeatures = specialFeatures;
|
|
@@ -7,20 +7,21 @@ export class TCFData {
|
|
|
7
7
|
this.stacks = stacks;
|
|
8
8
|
this.vendors = vendors;
|
|
9
9
|
this.tcString = tcString;
|
|
10
|
+
this.thirdPartyCount = thirdPartyCount;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
export class TCFFeature {
|
|
13
|
-
constructor(purposeDescription,
|
|
14
|
+
constructor(purposeDescription, illustrations, id, name) {
|
|
14
15
|
this.purposeDescription = purposeDescription;
|
|
15
|
-
this.
|
|
16
|
+
this.illustrations = illustrations;
|
|
16
17
|
this.id = id;
|
|
17
18
|
this.name = name;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
export class TCFPurpose {
|
|
21
|
-
constructor(purposeDescription,
|
|
22
|
+
constructor(purposeDescription, illustrations, id, name, isPartOfASelectedStack, showConsentToggle, showLegitimateInterestToggle, legitimateInterestConsent, consent, stackId) {
|
|
22
23
|
this.purposeDescription = purposeDescription;
|
|
23
|
-
this.
|
|
24
|
+
this.illustrations = illustrations;
|
|
24
25
|
this.id = id;
|
|
25
26
|
this.name = name;
|
|
26
27
|
this.consent = consent;
|
|
@@ -32,9 +33,9 @@ export class TCFPurpose {
|
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
export class TCFSpecialFeature {
|
|
35
|
-
constructor(purposeDescription,
|
|
36
|
+
constructor(purposeDescription, illustrations, id, isPartOfASelectedStack, showConsentToggle, name, consent, stackId) {
|
|
36
37
|
this.purposeDescription = purposeDescription;
|
|
37
|
-
this.
|
|
38
|
+
this.illustrations = illustrations;
|
|
38
39
|
this.id = id;
|
|
39
40
|
this.name = name;
|
|
40
41
|
this.consent = consent;
|
|
@@ -44,9 +45,9 @@ export class TCFSpecialFeature {
|
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
export class TCFSpecialPurpose {
|
|
47
|
-
constructor(purposeDescription,
|
|
48
|
+
constructor(purposeDescription, illustrations, id, name) {
|
|
48
49
|
this.purposeDescription = purposeDescription;
|
|
49
|
-
this.
|
|
50
|
+
this.illustrations = illustrations;
|
|
50
51
|
this.id = id;
|
|
51
52
|
this.name = name;
|
|
52
53
|
}
|
|
@@ -61,7 +62,7 @@ export class TCFStack {
|
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
export class TCFVendor {
|
|
64
|
-
constructor(features, flexiblePurposes, id, legitimateInterestPurposes, name, policyUrl, purposes, specialFeatures, specialPurposes, showConsentToggle, showLegitimateInterestToggle, cookieMaxAgeSeconds, usesNonCookieAccess, usesCookies, dataSharedOutsideEU, deviceStorageDisclosureUrl, legitimateInterestConsent, consent, cookieRefresh) {
|
|
65
|
+
constructor(features, flexiblePurposes, id, legitimateInterestPurposes, name, policyUrl, purposes, specialFeatures, specialPurposes, showConsentToggle, showLegitimateInterestToggle, cookieMaxAgeSeconds, usesNonCookieAccess, usesCookies, dataSharedOutsideEU, dataCategories, vendorUrls, deviceStorageDisclosureUrl, legitimateInterestConsent, consent, cookieRefresh) {
|
|
65
66
|
this.consent = consent;
|
|
66
67
|
this.features = features;
|
|
67
68
|
this.flexiblePurposes = flexiblePurposes;
|
|
@@ -81,6 +82,15 @@ export class TCFVendor {
|
|
|
81
82
|
this.usesCookies = usesCookies;
|
|
82
83
|
this.cookieRefresh = cookieRefresh;
|
|
83
84
|
this.dataSharedOutsideEU = dataSharedOutsideEU;
|
|
85
|
+
this.dataCategories = dataCategories;
|
|
86
|
+
this.vendorUrls = vendorUrls;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export class VendorUrl {
|
|
90
|
+
constructor(langId, privacy, legIntClaim) {
|
|
91
|
+
this.langId = langId;
|
|
92
|
+
this.privacy = privacy;
|
|
93
|
+
this.legIntClaim = legIntClaim;
|
|
84
94
|
}
|
|
85
95
|
}
|
|
86
96
|
//# sourceMappingURL=TCFData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TCFData.js","sourceRoot":"","sources":["../../src/models/TCFData.tsx"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;
|
|
1
|
+
{"version":3,"file":"TCFData.js","sourceRoot":"","sources":["../../src/models/TCFData.tsx"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;IA8BhB,YACI,QAAsB,EACtB,QAAsB,EACtB,eAAoC,EACpC,eAAoC,EACpC,MAAkB,EAClB,OAAoB,EACpB,QAAgB,EAChB,eAAuB;QAEvB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;Q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A;QACpB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAClC,CAAC;CAEJ"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usercentrics/react-native-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.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.
|
|
10
|
+
"iosPackageVersion": "2.10.0",
|
|
11
11
|
"license": "SEE LICENSE IN LICENSE",
|
|
12
12
|
"files": [
|
|
13
13
|
"android",
|