@soyio/soyio-widget 2.20.0 → 2.21.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 CHANGED
@@ -216,6 +216,10 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
216
216
  - `maxFileSize`: Maximum file size in bytes. Default: `5 * 1024 * 1024` (5MB).
217
217
  - `redecOperationIds`: Optional array of `{ id, label }` values for the Redec operation select. Required if `redec` right is included in `enabledRights` param.
218
218
  - `isSandbox`: Whether to use the sandbox environment. Defaults to `false`.
219
+ - `consentControl`: Optional, controls the visual interaction for consent toggles. Values: `'switch'` (default) or `'checkbox'`.
220
+ - `consentMode`: Optional, controls how consent changes are committed. Values: `'immediate'` (default) or `'batch'` (save multiple changes at once).
221
+ - `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'`.
222
+ - `showBatchConsentConfirmation`: Optional boolean, whether to show a confirmation dialog before saving consent changes in batch mode.
219
223
  - `appearance`: Customize the iframe appearance. See Appearance section below.
220
224
  - `onEvent`: Callback that receives events from the iframe.
221
225
  - `onReady`: Optional callback fired when the iframe becomes ready.
@@ -543,6 +547,7 @@ interface Config {
543
547
  | `icon.size` | Global default icon size in pixels | `24` |
544
548
  | `iconRules` | Per-component icon style overrides | `{}` |
545
549
  | `mainPageColumns` | Number of columns in the main page feature cards grid (1-4) | `2` |
550
+ | `consentManagementColumns` | Number of columns in the consent management grid (1-4) | `2` |
546
551
  | `brandTheme` | Theme variant for branded elements like the footer (`default`, `dark`, `light`) | `"default"` |
547
552
 
548
553
  #### Icons
package/dist/index.d.ts CHANGED
@@ -264,6 +264,9 @@ declare type PrivacyCenterConfig = BaseConfig & {
264
264
  allowedExtensions?: string[];
265
265
  maxFileSize?: number;
266
266
  };
267
+ consentMode?: 'immediate' | 'batch';
268
+ consentRetentionPeriod?: string;
269
+ showBatchConsentConfirmation?: boolean;
267
270
  redecOperationIds?: RedecOperationId[];
268
271
  } & ({
269
272
  companyId: `com_${string}`;
@@ -310,6 +313,13 @@ declare interface SoyioAppearance {
310
313
 
311
314
  declare interface SoyioAppearanceConfig {
312
315
  helperTextPosition?: 'top' | 'bottom';
316
+ /**
317
+ * Control type for consent items.
318
+ * - 'switch': Toggle switch (default)
319
+ * - 'checkbox': Checkbox
320
+ * @default 'switch'
321
+ */
322
+ consentControl?: 'switch' | 'checkbox';
313
323
  /**
314
324
  * Icon name to use for hint/help tooltips on input labels.
315
325
  * Available icons: 'Question' (default), 'Info', 'QuestionMark', etc.
@@ -340,6 +350,11 @@ declare interface SoyioAppearanceConfig {
340
350
  * @default 2
341
351
  */
342
352
  mainPageColumns?: 1 | 2 | 3 | 4;
353
+ /**
354
+ * Number of columns in the consent management grid.
355
+ * @default 2
356
+ */
357
+ consentManagementColumns?: 1 | 2 | 3 | 4;
343
358
  /**
344
359
  * Theme variant for branded elements like the footer.
345
360
  * - 'default': Standard Soyio brand colors (purple/indigo)
@@ -389,7 +404,7 @@ declare interface SoyioAppearanceVariables {
389
404
  dataUseIconColor?: string;
390
405
  }
391
406
 
392
- declare type SoyioBaseRule = '.MainContainer' | '.Button' | '.Checkbox' | '.CheckboxInput' | '.CheckboxLabel' | '.Input' | '.Label' | '.HintIcon' | '.Title' | '.StepTitle' | '.Link' | '.Card' | '.CardTitle' | '.Select' | '.Loader' | '.TextArea' | '.ErrorMessage' | '.Description' | '.Switch' | '.SwitchRoot' | '.SwitchThumb' | '.SwitchIcon' | '.Alert' | '.AlertIcon' | '.AlertContent' | '.Radio' | '.RadioButton' | '.RadioIndicator' | '.RadioLabel' | '.Chip' | '.Dialog' | '.DialogOverlay' | '.DialogContent' | '.DialogTitle' | '.DialogDescription' | '.Combobox' | '.NinInput' | '.TrackingCodeInput' | '.TrackingCodeInputCell' | '.TrackingCodeInputSeparator' | '.RadioCard' | '.RadioCardButton' | '.RadioCardIndicator' | '.RadioCardTitle' | '.StepIndicatorContainer' | '.StepIndicator' | '.StepIndicatorLine' | '.StepIndicatorIcon' | '.StepIndicatorDot' | '.StepIndicatorNumber' | '.TooltipContent';
407
+ declare type SoyioBaseRule = '.MainContainer' | '.Button' | '.Checkbox' | '.CheckboxInput' | '.CheckboxLabel' | '.CheckboxCheck' | '.Input' | '.Label' | '.HintIcon' | '.Title' | '.CategoryTag' | '.StepTitle' | '.Link' | '.Card' | '.CardTitle' | '.Select' | '.Loader' | '.TextArea' | '.ErrorMessage' | '.Description' | '.Switch' | '.SwitchRoot' | '.SwitchThumb' | '.SwitchIcon' | '.Alert' | '.AlertIcon' | '.AlertContent' | '.Radio' | '.RadioButton' | '.RadioIndicator' | '.RadioLabel' | '.Chip' | '.Dialog' | '.DialogOverlay' | '.DialogContent' | '.DialogTitle' | '.DialogDescription' | '.Combobox' | '.NinInput' | '.TrackingCodeInput' | '.TrackingCodeInputCell' | '.TrackingCodeInputSeparator' | '.RadioCard' | '.RadioCardButton' | '.RadioCardIndicator' | '.RadioCardTitle' | '.StepIndicatorContainer' | '.StepIndicator' | '.StepIndicatorLine' | '.StepIndicatorIcon' | '.StepIndicatorDot' | '.StepIndicatorNumber' | '.TooltipContent';
393
408
 
394
409
  declare type SoyioElementState = '--checked';
395
410
 
@@ -427,7 +442,7 @@ declare type SoyioRule = {
427
442
 
428
443
  declare type SoyioRuleKey = `${SoyioBaseRule}${SoyioElementState | SoyioPseudoClass | SoyioPseudoElement | ''}` | SoyioStateRule;
429
444
 
430
- declare type SoyioStateRule = '.Input--error' | '.Alert--error' | '.Alert--warning' | '.Alert--info' | '.Alert--success' | '.Chip--info' | '.Chip--green' | '.Chip--red' | '.Chip--amber' | '.RadioCard--checked' | '.RadioCardIndicator--checked' | '.StepIndicator--active' | '.StepIndicator--completed' | '.StepIndicator--pending' | '.StepIndicatorLine--top' | '.StepIndicatorLine--bottom';
445
+ declare type SoyioStateRule = '.Input--error' | '.Alert--error' | '.Alert--warning' | '.Alert--info' | '.Alert--note' | '.Alert--success' | '.Chip--info' | '.Chip--green' | '.Chip--red' | '.Chip--amber' | '.RadioCard--checked' | '.RadioCardIndicator--checked' | '.StepIndicator--active' | '.StepIndicator--completed' | '.StepIndicator--pending' | '.StepIndicatorLine--top' | '.StepIndicatorLine--bottom';
431
446
 
432
447
  declare type SoyioTheme = 'soyio' | 'night' | 'flat';
433
448