@soyio/soyio-widget 3.1.0 → 3.3.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/README.md +34 -3
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1202 -1084
- package/dist/index.umd.cjs +36 -36
- package/package.json +12 -26
- package/src/schemas/config.schema.json +128 -1
package/README.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
</a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
|
+
This package is validated by the Soyio SDK CI workflow.
|
|
16
|
+
|
|
15
17
|
## Table of Contents
|
|
16
18
|
|
|
17
19
|
- [Installation](#installation)
|
|
@@ -81,7 +83,7 @@ The **`ConsentBox`** is a component that allows you to embed a consent request d
|
|
|
81
83
|
appearance: {}, // Optional
|
|
82
84
|
actionToken: "<action token>", // Optional
|
|
83
85
|
entityId: "<entity id>", // Optional
|
|
84
|
-
|
|
86
|
+
origin: "<origin>", // Optional
|
|
85
87
|
onReady: () => console.log("ConsentBox is ready"), // Optional
|
|
86
88
|
optionalReconsentBehavior: "notice", // Optional
|
|
87
89
|
mandatoryReconsentBehavior: "notice", // Optional
|
|
@@ -193,6 +195,18 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
193
195
|
{ id: "op_rectification", label: "Rectification" },
|
|
194
196
|
],
|
|
195
197
|
|
|
198
|
+
// Customize which user data categories appear in DSR dropdowns (optional)
|
|
199
|
+
requestableDataCategories: [
|
|
200
|
+
{
|
|
201
|
+
value: "user.contact.email",
|
|
202
|
+
label: "Primary email",
|
|
203
|
+
description: "The email address we use for this account.",
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
value: "user.name.first",
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
|
|
196
210
|
// Override the "exercise your rights" link shown in consent-only mode (optional)
|
|
197
211
|
externalRightsExerciseUrl: "https://privacy.example.com/rights",
|
|
198
212
|
|
|
@@ -271,6 +285,14 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
271
285
|
- `allowedExtensions`: Array of allowed file extensions (e.g. `['pdf', 'jpg']`). Default: `['pdf', 'png', 'jpeg', 'jpg']`.
|
|
272
286
|
- `maxFileSize`: Maximum file size in bytes. Default: `5 * 1024 * 1024` (5MB).
|
|
273
287
|
- `redecOperationIds`: Optional array of `{ id, label }` values for the Redec operation select. Required if `redec` right is included in `enabledRights` param.
|
|
288
|
+
- `requestableDataCategories`: Optional array of `{ value, label?, description? }` objects to customize the categories shown in DSR dropdowns.
|
|
289
|
+
- `value`: Must be a canonical `user` data category taxonomy key such as `user.contact.email`, `user.name.first`, or `user.labor_activity.salary`.
|
|
290
|
+
- `label`: Optional override for the option label shown to end users.
|
|
291
|
+
- `description`: Optional override for the option helper text shown in the dropdown.
|
|
292
|
+
- When omitted, the Privacy Center keeps the default grouped category list.
|
|
293
|
+
- When provided, the Privacy Center uses the configured list and order.
|
|
294
|
+
- Non-`user` taxonomy values are ignored.
|
|
295
|
+
- Backend `blacklistedDataCategories` can still hide configured values.
|
|
274
296
|
- `externalRightsExerciseUrl`: Optional URL used by required consent alerts when users need to exercise their rights outside the embedded privacy center.
|
|
275
297
|
- `appearance.config.showHeader`: Optional boolean to show/hide the privacy center header (title and description).
|
|
276
298
|
- `content.header`: Optional object with `title` and `description` overrides for the privacy center header copy.
|
|
@@ -294,7 +316,7 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
294
316
|
Note:
|
|
295
317
|
- When `sessionToken` is provided, do not pass `companyId`.
|
|
296
318
|
- `consentManagement.scopeGroups` is applied during initial iframe URL render and also synchronized through `SET_PRIVACY_CENTER_CONFIG` updates.
|
|
297
|
-
- `content.header`, `content.consentManagement.header`, `appearance.config.showConsentManagementHeader`, and `
|
|
319
|
+
- `content.header`, `content.consentManagement.header`, `appearance.config.showConsentManagementHeader`, `externalRightsExerciseUrl`, and `requestableDataCategories` are applied through `SET_PRIVACY_CENTER_CONFIG`; those overrides may briefly appear after the iframe is ready.
|
|
298
320
|
|
|
299
321
|
### Privacy Center Events
|
|
300
322
|
|
|
@@ -1244,7 +1266,7 @@ export default function PrivacyCenterContainer() {
|
|
|
1244
1266
|
To run the widget customization smoke test locally:
|
|
1245
1267
|
|
|
1246
1268
|
```sh
|
|
1247
|
-
|
|
1269
|
+
pnpm smoke
|
|
1248
1270
|
```
|
|
1249
1271
|
|
|
1250
1272
|
The smoke test configuration is loaded from `smoke-test/.env.development`. You can modify this file to change the default values:
|
|
@@ -1261,6 +1283,15 @@ To test DSR rights in the Privacy Center tab, add these parameters to the JSON c
|
|
|
1261
1283
|
```json
|
|
1262
1284
|
{
|
|
1263
1285
|
"enabledRights": ["arsop", "redec"],
|
|
1286
|
+
"requestableDataCategories": [
|
|
1287
|
+
{
|
|
1288
|
+
"value": "user.contact.email",
|
|
1289
|
+
"label": "Primary email"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
"value": "user.name.first"
|
|
1293
|
+
}
|
|
1294
|
+
],
|
|
1264
1295
|
"redecOperationIds": [
|
|
1265
1296
|
{ "id": "op_update", "label": "Update" },
|
|
1266
1297
|
{ "id": "op_rectification", "label": "Rectification" }
|
package/dist/index.d.ts
CHANGED
|
@@ -345,6 +345,7 @@ declare type PrivacyCenterConfig = BaseConfig & {
|
|
|
345
345
|
showBatchConsentConfirmation?: boolean;
|
|
346
346
|
consentManagement?: PrivacyCenterConsentManagementConfig;
|
|
347
347
|
redecOperationIds?: RedecOperationId[];
|
|
348
|
+
requestableDataCategories?: PrivacyCenterRequestableDataCategoryOption[];
|
|
348
349
|
content?: PrivacyCenterContentConfig;
|
|
349
350
|
header?: PrivacyCenterHeaderCopyConfig;
|
|
350
351
|
rightExamples?: PrivacyCenterContentConfig['rightExamples'];
|
|
@@ -361,6 +362,7 @@ declare type PrivacyCenterConsentManagementConfig = {
|
|
|
361
362
|
PrivacyCenterConsentManagementScopeGroupConfig,
|
|
362
363
|
...PrivacyCenterConsentManagementScopeGroupConfig[]
|
|
363
364
|
];
|
|
365
|
+
allowMultipleOpenScopeGroups?: boolean;
|
|
364
366
|
};
|
|
365
367
|
|
|
366
368
|
declare type PrivacyCenterConsentManagementCopyConfig = {
|
|
@@ -383,6 +385,12 @@ declare type PrivacyCenterHeaderCopyConfig = {
|
|
|
383
385
|
description?: string;
|
|
384
386
|
};
|
|
385
387
|
|
|
388
|
+
declare type PrivacyCenterRequestableDataCategoryOption = {
|
|
389
|
+
value: UserDataCategoryKey;
|
|
390
|
+
label?: string;
|
|
391
|
+
description?: string;
|
|
392
|
+
};
|
|
393
|
+
|
|
386
394
|
declare type PrivacyCenterRight = 'arsop' | 'redec';
|
|
387
395
|
|
|
388
396
|
declare type PrivacyCenterScopeReference = {
|
|
@@ -655,4 +663,8 @@ export declare class _TooltipManager {
|
|
|
655
663
|
destroy(): void;
|
|
656
664
|
}
|
|
657
665
|
|
|
666
|
+
declare const USER_DATA_CATEGORY_KEYS: readonly ["user", "user.account", "user.authorization", "user.behavior", "user.biometric", "user.childrens", "user.contact", "user.content", "user.demographic", "user.location", "user.device", "user.payment", "user.social", "user.unique_id", "user.telemetry", "user.user_sensor", "user.workplace", "user.sensor", "user.financial", "user.government_id", "user.health_and_medical", "user.name", "user.criminal_history", "user.privacy_preferences", "user.job_title", "user.account.settings", "user.account.username", "user.authorization.credentials", "user.authorization.biometric", "user.authorization.password", "user.behavior.browsing_history", "user.behavior.media_consumption", "user.behavior.purchase_history", "user.behavior.search_history", "user.biometric.fingerprint", "user.biometric.retinal", "user.biometric.voice", "user.biometric.health", "user.contact.address", "user.contact.email", "user.contact.phone_number", "user.contact.url", "user.contact.fax_number", "user.contact.organization", "user.contact.address.city", "user.contact.address.country", "user.contact.address.postal_code", "user.contact.address.state", "user.contact.address.street", "user.content.private", "user.content.public", "user.content.self_image", "user.demographic.age_range", "user.demographic.date_of_birth", "user.demographic.gender", "user.demographic.language", "user.demographic.marital_status", "user.demographic.political_opinion", "user.demographic.profile", "user.demographic.race_ethnicity", "user.demographic.religious_belief", "user.demographic.sexual_orientation", "user.demographic.nationality", "user.device.cookie", "user.device.cookie_id", "user.device.device_id", "user.device.ip_address", "user.financial.bank_account", "user.financial.credit_card", "user.government_id.birth_certificate", "user.government_id.drivers_license_number", "user.government_id.immigration", "user.government_id.national_identification_number", "user.government_id.passport_number", "user.government_id.vehicle_registration", "user.health_and_medical.genetic", "user.health_and_medical.insurance_beneficiary_id", "user.health_and_medical.record_id", "user.labor_activity", "user.labor_activity.profession", "user.labor_activity.job_title", "user.labor_activity.worker_type", "user.labor_activity.salary", "user.labor_activity.workplace", "user.location.imprecise", "user.location.precise", "user.name.first", "user.name.last", "user.unique_id.pseudonymous"];
|
|
667
|
+
|
|
668
|
+
declare type UserDataCategoryKey = (typeof USER_DATA_CATEGORY_KEYS)[number];
|
|
669
|
+
|
|
658
670
|
export { }
|