@soyio/soyio-widget 2.23.0 → 2.24.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 +21 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +777 -769
- package/dist/index.umd.cjs +26 -26
- package/package.json +1 -1
- package/src/schemas/appearance.schema.json +3 -0
- package/src/schemas/config.schema.json +135 -0
package/README.md
CHANGED
|
@@ -191,6 +191,17 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
191
191
|
{ id: "op_rectification", label: "Rectification" },
|
|
192
192
|
],
|
|
193
193
|
|
|
194
|
+
// Header and copy customization (optional)
|
|
195
|
+
content: {
|
|
196
|
+
header: {
|
|
197
|
+
title: "Privacy preferences",
|
|
198
|
+
description: "Manage your requests and consent settings.",
|
|
199
|
+
},
|
|
200
|
+
rightExamples: {
|
|
201
|
+
access: 'Example: "I want to know what data you store about me."',
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
|
|
194
205
|
// Common options
|
|
195
206
|
consentControl: "checkbox", // Optional: 'switch' (default) | 'checkbox'
|
|
196
207
|
consentMode: "batch", // Optional: 'immediate' (default) | 'batch'
|
|
@@ -201,7 +212,11 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
201
212
|
onEvent: (event) => console.log(event),
|
|
202
213
|
onReady: () => console.log("PrivacyCenterBox is ready"), // Optional
|
|
203
214
|
isSandbox: true, // Optional
|
|
204
|
-
appearance: {
|
|
215
|
+
appearance: {
|
|
216
|
+
config: {
|
|
217
|
+
showHeader: true,
|
|
218
|
+
},
|
|
219
|
+
}, // Optional
|
|
205
220
|
};
|
|
206
221
|
|
|
207
222
|
// Wait for DOM to be fully loaded
|
|
@@ -224,6 +239,11 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
224
239
|
- `allowedExtensions`: Array of allowed file extensions (e.g. `['pdf', 'jpg']`). Default: `['pdf', 'png', 'jpeg', 'jpg']`.
|
|
225
240
|
- `maxFileSize`: Maximum file size in bytes. Default: `5 * 1024 * 1024` (5MB).
|
|
226
241
|
- `redecOperationIds`: Optional array of `{ id, label }` values for the Redec operation select. Required if `redec` right is included in `enabledRights` param.
|
|
242
|
+
- `appearance.config.showHeader`: Optional boolean to show/hide the privacy center header (title and description).
|
|
243
|
+
- `content.header`: Optional object with `title` and `description` overrides for the privacy center header copy.
|
|
244
|
+
- `content.rightExamples`: Optional object to override DSR right examples. Supported keys: `access`, `opposition`, `rectification`, `suppression`, `portability`, `redec_update`, `redec_rectification`, `redec_complementation`, `redec_cancellation`.
|
|
245
|
+
- `header`: Optional legacy alias for `content.header`.
|
|
246
|
+
- `rightExamples`: Optional legacy alias for `content.rightExamples`.
|
|
227
247
|
- `isSandbox`: Whether to use the sandbox environment. Defaults to `false`.
|
|
228
248
|
- `consentControl`: Optional, controls the visual interaction for consent toggles. Values: `'switch'` (default) or `'checkbox'`.
|
|
229
249
|
- `consentMode`: Optional, controls how consent changes are committed. Values: `'immediate'` (default) or `'batch'` (save multiple changes at once).
|
package/dist/index.d.ts
CHANGED
|
@@ -186,6 +186,8 @@ declare type CSSProperties = {
|
|
|
186
186
|
|
|
187
187
|
declare type DataSubject = 'anonymous_user' | 'citizen_voter' | 'commuter' | 'consultant' | 'customer' | 'employee' | 'job_applicant' | 'next_of_kin' | 'passenger' | 'patient' | 'prospect' | 'shareholder' | 'supplier_vendor' | 'trainee' | 'visitor';
|
|
188
188
|
|
|
189
|
+
declare type DataSubjectRequestKind = 'access' | 'opposition' | 'rectification' | 'suppression' | 'portability' | 'redec_update' | 'redec_rectification' | 'redec_complementation' | 'redec_cancellation';
|
|
190
|
+
|
|
189
191
|
export declare class DisclosureRequestBox extends BaseIframeBox<DisclosureRequestBoxEvent, DisclosureRequestBoxConfig> {
|
|
190
192
|
readonly defaultIframePrefix = "disclosure-request-box";
|
|
191
193
|
private passkeyPopupWindow;
|
|
@@ -337,6 +339,9 @@ declare type PrivacyCenterConfig = BaseConfig & {
|
|
|
337
339
|
groupConsentsByScope?: boolean;
|
|
338
340
|
showBatchConsentConfirmation?: boolean;
|
|
339
341
|
redecOperationIds?: RedecOperationId[];
|
|
342
|
+
content?: PrivacyCenterContentConfig;
|
|
343
|
+
header?: PrivacyCenterHeaderCopyConfig;
|
|
344
|
+
rightExamples?: PrivacyCenterContentConfig['rightExamples'];
|
|
340
345
|
} & ({
|
|
341
346
|
companyId: `com_${string}`;
|
|
342
347
|
sessionToken?: never;
|
|
@@ -345,6 +350,16 @@ declare type PrivacyCenterConfig = BaseConfig & {
|
|
|
345
350
|
companyId?: never;
|
|
346
351
|
});
|
|
347
352
|
|
|
353
|
+
declare type PrivacyCenterContentConfig = {
|
|
354
|
+
header?: PrivacyCenterHeaderCopyConfig;
|
|
355
|
+
rightExamples?: Partial<Record<DataSubjectRequestKind, string>>;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
declare type PrivacyCenterHeaderCopyConfig = {
|
|
359
|
+
title?: string;
|
|
360
|
+
description?: string;
|
|
361
|
+
};
|
|
362
|
+
|
|
348
363
|
declare type PrivacyCenterRight = 'arsop' | 'redec';
|
|
349
364
|
|
|
350
365
|
declare type PrivacyManagerFeature = 'DataSubjectRequest' | 'ConsentManagement' | 'RequestTracking';
|
|
@@ -389,6 +404,7 @@ declare interface SoyioAppearanceConfig {
|
|
|
389
404
|
* @default 'switch'
|
|
390
405
|
*/
|
|
391
406
|
consentControl?: 'switch' | 'checkbox';
|
|
407
|
+
showHeader?: boolean;
|
|
392
408
|
/**
|
|
393
409
|
* Icon name to use for hint/help tooltips on input labels.
|
|
394
410
|
* Available icons: 'Question' (default), 'Info', 'QuestionMark', etc.
|