@soyio/soyio-widget 2.19.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
@@ -182,6 +182,12 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
182
182
  maxFileSize: 5 * 1024 * 1024, // 5MB
183
183
  },
184
184
 
185
+ // Redec operation options (optional unless "redec" is in enabledRights)
186
+ redecOperationIds: [
187
+ { id: "op_update", label: "Update" },
188
+ { id: "op_rectification", label: "Rectification" },
189
+ ],
190
+
185
191
  // Common options
186
192
  onEvent: (event) => console.log(event),
187
193
  onReady: () => console.log("PrivacyCenterBox is ready"), // Optional
@@ -208,7 +214,12 @@ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You c
208
214
  - `fileRequisites`: Optional object to configure file upload constraints.
209
215
  - `allowedExtensions`: Array of allowed file extensions (e.g. `['pdf', 'jpg']`). Default: `['pdf', 'png', 'jpeg', 'jpg']`.
210
216
  - `maxFileSize`: Maximum file size in bytes. Default: `5 * 1024 * 1024` (5MB).
217
+ - `redecOperationIds`: Optional array of `{ id, label }` values for the Redec operation select. Required if `redec` right is included in `enabledRights` param.
211
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.
212
223
  - `appearance`: Customize the iframe appearance. See Appearance section below.
213
224
  - `onEvent`: Callback that receives events from the iframe.
214
225
  - `onReady`: Optional callback fired when the iframe becomes ready.
@@ -536,6 +547,7 @@ interface Config {
536
547
  | `icon.size` | Global default icon size in pixels | `24` |
537
548
  | `iconRules` | Per-component icon style overrides | `{}` |
538
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` |
539
551
  | `brandTheme` | Theme variant for branded elements like the footer (`default`, `dark`, `light`) | `"default"` |
540
552
 
541
553
  #### Icons
@@ -1125,6 +1137,20 @@ VITE_CONSENT_URL=http://localhost:5173
1125
1137
  VITE_CONSENT_TEMPLATE_ID=constpl_test
1126
1138
  ```
1127
1139
 
1140
+ To test DSR rights in the Privacy Center tab, add these parameters to the JSON config in the editor:
1141
+
1142
+ ```json
1143
+ {
1144
+ "enabledRights": ["arsop", "redec"],
1145
+ "redecOperationIds": [
1146
+ { "id": "op_update", "label": "Update" },
1147
+ { "id": "op_rectification", "label": "Rectification" }
1148
+ ]
1149
+ }
1150
+ ```
1151
+
1152
+ `redecOperationIds` is required when `redec` is included in `enabledRights`.
1153
+
1128
1154
  ### Presets Management
1129
1155
 
1130
1156
  The smoke test includes preset management functionality that allows you to save, load, and share widget configurations:
package/dist/index.d.ts CHANGED
@@ -250,6 +250,7 @@ export declare class PrivacyCenterBox extends BaseIframeBox<PrivacyCenterConfig>
250
250
  protected readonly _uniqueIdentifier = "privacy-center";
251
251
  readonly defaultIframeCSSConfig: IframeCSSConfig;
252
252
  get uniqueIdentifier(): string;
253
+ protected handleIframeReady(): Promise<void>;
253
254
  iframeUrl(): string;
254
255
  }
255
256
 
@@ -263,6 +264,10 @@ declare type PrivacyCenterConfig = BaseConfig & {
263
264
  allowedExtensions?: string[];
264
265
  maxFileSize?: number;
265
266
  };
267
+ consentMode?: 'immediate' | 'batch';
268
+ consentRetentionPeriod?: string;
269
+ showBatchConsentConfirmation?: boolean;
270
+ redecOperationIds?: RedecOperationId[];
266
271
  } & ({
267
272
  companyId: `com_${string}`;
268
273
  sessionToken?: never;
@@ -275,6 +280,11 @@ declare type PrivacyCenterRight = 'arsop' | 'redec';
275
280
 
276
281
  declare type PrivacyManagerFeature = 'DataSubjectRequest' | 'ConsentManagement' | 'RequestTracking';
277
282
 
283
+ declare type RedecOperationId = {
284
+ id: string;
285
+ label: string;
286
+ };
287
+
278
288
  declare type Request_2 = 'disclosure' | 'signature' | 'authentication';
279
289
 
280
290
  declare type RequestConfig = DisclosureRequestConfig | SignatureRequestConfig | AuthRequestConfig;
@@ -303,6 +313,13 @@ declare interface SoyioAppearance {
303
313
 
304
314
  declare interface SoyioAppearanceConfig {
305
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';
306
323
  /**
307
324
  * Icon name to use for hint/help tooltips on input labels.
308
325
  * Available icons: 'Question' (default), 'Info', 'QuestionMark', etc.
@@ -333,6 +350,11 @@ declare interface SoyioAppearanceConfig {
333
350
  * @default 2
334
351
  */
335
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;
336
358
  /**
337
359
  * Theme variant for branded elements like the footer.
338
360
  * - 'default': Standard Soyio brand colors (purple/indigo)
@@ -382,7 +404,7 @@ declare interface SoyioAppearanceVariables {
382
404
  dataUseIconColor?: string;
383
405
  }
384
406
 
385
- 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';
386
408
 
387
409
  declare type SoyioElementState = '--checked';
388
410
 
@@ -420,7 +442,7 @@ declare type SoyioRule = {
420
442
 
421
443
  declare type SoyioRuleKey = `${SoyioBaseRule}${SoyioElementState | SoyioPseudoClass | SoyioPseudoElement | ''}` | SoyioStateRule;
422
444
 
423
- 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';
424
446
 
425
447
  declare type SoyioTheme = 'soyio' | 'night' | 'flat';
426
448