@soyio/soyio-widget 3.3.0 → 3.4.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 +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +431 -429
- package/dist/index.umd.cjs +23 -23
- package/package.json +1 -1
- package/src/schemas/config.schema.json +15 -1
package/README.md
CHANGED
|
@@ -254,6 +254,8 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
254
254
|
consentRetentionPeriod: "30 days", // Optional: prevents immediate revoke for this period
|
|
255
255
|
allowGranularScopeSelection: true, // Optional: only applies when templates have multiple scopes
|
|
256
256
|
groupConsentsByScope: true, // Optional: groups consent templates by scope in consent management
|
|
257
|
+
origin: "<origin>", // Optional: attached to consent actions captured here
|
|
258
|
+
metadata: { key: "value" }, // Optional: attached to consent actions captured here
|
|
257
259
|
onEvent: (event) => console.log(event),
|
|
258
260
|
onReady: () => console.log("PrivacyCenterBox is ready"), // Optional
|
|
259
261
|
isSandbox: true, // Optional
|
|
@@ -309,6 +311,8 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
309
311
|
- `groupConsentsByScope`: Optional boolean, groups consent templates by scope in consent management. This must be enabled for `consentManagement.scopeGroups` to apply.
|
|
310
312
|
- `consentManagement.scopeGroups`: Optional array to customize accordion groups in consent management. Each group requires a `title` and a `scopes` array with `{ scopeType: 'product' | 'branch', scopeId: string }` entries. Scopes not included in custom groups keep the default scope grouping.
|
|
311
313
|
- `showBatchConsentConfirmation`: Optional boolean, whether to show a confirmation dialog before saving consent changes in batch mode.
|
|
314
|
+
- `origin`: Optional string attached to every consent action captured by the Privacy Center. Useful to identify the business context where the consent was given (e.g. `"my-onboarding-flow"`).
|
|
315
|
+
- `metadata`: Optional object with arbitrary metadata attached to every consent action captured by the Privacy Center. The object must be serializable to JSON; properties with non-serializable values (like functions or `undefined`) will be omitted.
|
|
312
316
|
- `appearance`: Customize the iframe appearance. See Appearance section below.
|
|
313
317
|
- `onEvent`: Callback that receives events from the iframe.
|
|
314
318
|
- `onReady`: Optional callback fired when the iframe becomes ready.
|
package/dist/index.d.ts
CHANGED
|
@@ -349,6 +349,8 @@ declare type PrivacyCenterConfig = BaseConfig & {
|
|
|
349
349
|
content?: PrivacyCenterContentConfig;
|
|
350
350
|
header?: PrivacyCenterHeaderCopyConfig;
|
|
351
351
|
rightExamples?: PrivacyCenterContentConfig['rightExamples'];
|
|
352
|
+
origin?: string;
|
|
353
|
+
metadata?: Record<string, unknown>;
|
|
352
354
|
} & ({
|
|
353
355
|
companyId: `com_${string}`;
|
|
354
356
|
sessionToken?: never;
|