@soyio/soyio-widget 2.22.1 → 2.23.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 +10 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +93 -91
- package/dist/index.umd.cjs +20 -20
- package/package.json +1 -1
- package/src/schemas/config.schema.json +15 -0
package/README.md
CHANGED
|
@@ -85,6 +85,7 @@ The **`ConsentBox`** is a component that allows you to embed a consent request d
|
|
|
85
85
|
onReady: () => console.log("ConsentBox is ready"), // Optional
|
|
86
86
|
optionalReconsentBehavior: "notice", // Optional
|
|
87
87
|
mandatoryReconsentBehavior: "notice", // Optional
|
|
88
|
+
allowGranularScopeSelection: true, // Optional
|
|
88
89
|
};
|
|
89
90
|
|
|
90
91
|
// Wait for DOM to be fully loaded
|
|
@@ -140,6 +141,7 @@ The `onEvent` follows the following format:
|
|
|
140
141
|
- `askAgain` will show the consent as if it wasn't given in the first place,
|
|
141
142
|
|
|
142
143
|
We don't support hiding the mandatory consent, and we strongly recommend using `notice` so the user doesn't have to give the consent again and knows what they have already given consent to.
|
|
144
|
+
- **`allowGranularScopeSelection`**: Enables selecting consent at a more granular scope when the template supports granular scopes.
|
|
143
145
|
|
|
144
146
|
## Privacy Center
|
|
145
147
|
|
|
@@ -190,6 +192,12 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
190
192
|
],
|
|
191
193
|
|
|
192
194
|
// Common options
|
|
195
|
+
consentControl: "checkbox", // Optional: 'switch' (default) | 'checkbox'
|
|
196
|
+
consentMode: "batch", // Optional: 'immediate' (default) | 'batch'
|
|
197
|
+
showBatchConsentConfirmation: true, // Optional: only used in batch mode
|
|
198
|
+
consentRetentionPeriod: "30 days", // Optional: prevents immediate revoke for this period
|
|
199
|
+
allowGranularScopeSelection: true, // Optional: only applies when templates have multiple scopes
|
|
200
|
+
groupConsentsByScope: true, // Optional: groups consent templates by scope in consent management
|
|
193
201
|
onEvent: (event) => console.log(event),
|
|
194
202
|
onReady: () => console.log("PrivacyCenterBox is ready"), // Optional
|
|
195
203
|
isSandbox: true, // Optional
|
|
@@ -220,6 +228,8 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
|
|
|
220
228
|
- `consentControl`: Optional, controls the visual interaction for consent toggles. Values: `'switch'` (default) or `'checkbox'`.
|
|
221
229
|
- `consentMode`: Optional, controls how consent changes are committed. Values: `'immediate'` (default) or `'batch'` (save multiple changes at once).
|
|
222
230
|
- `consentRetentionPeriod`: Optional, specifies a duration during which a consent cannot be revoked after being granted. Format: `"<value> <unit>"`. Supported units: `day`, `week`, `month`, `year` (and their plural forms). Example: `'30 days'`, `'1 week'`.
|
|
231
|
+
- `allowGranularScopeSelection`: Optional boolean, enables selecting/deselecting individual consent scopes in consent management when templates define multiple scopes. When enabled and a consent has more than one scope, the main consent checkbox supports partial state.
|
|
232
|
+
- `groupConsentsByScope`: Optional boolean, groups consent templates by scope in consent management.
|
|
223
233
|
- `showBatchConsentConfirmation`: Optional boolean, whether to show a confirmation dialog before saving consent changes in batch mode.
|
|
224
234
|
- `appearance`: Customize the iframe appearance. See Appearance section below.
|
|
225
235
|
- `onEvent`: Callback that receives events from the iframe.
|
package/dist/index.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ declare type ConsentConfig = BaseConfig & {
|
|
|
84
84
|
context?: string;
|
|
85
85
|
optionalReconsentBehavior?: 'notice' | 'askAgain' | 'hide';
|
|
86
86
|
mandatoryReconsentBehavior?: 'notice' | 'askAgain';
|
|
87
|
+
allowGranularScopeSelection?: boolean;
|
|
87
88
|
};
|
|
88
89
|
|
|
89
90
|
declare type ConsentEvent = ConsentCheckboxChangeEvent;
|
|
@@ -332,6 +333,8 @@ declare type PrivacyCenterConfig = BaseConfig & {
|
|
|
332
333
|
};
|
|
333
334
|
consentMode?: 'immediate' | 'batch';
|
|
334
335
|
consentRetentionPeriod?: string;
|
|
336
|
+
allowGranularScopeSelection?: boolean;
|
|
337
|
+
groupConsentsByScope?: boolean;
|
|
335
338
|
showBatchConsentConfirmation?: boolean;
|
|
336
339
|
redecOperationIds?: RedecOperationId[];
|
|
337
340
|
} & ({
|