@soyio/soyio-widget 2.8.2 → 2.10.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 +13 -0
- package/dist/index.d.ts +9 -4
- package/dist/index.js +742 -701
- package/dist/index.umd.cjs +48 -48
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -306,6 +306,8 @@ The **`ConsentBox`** is a component that allows you to embed a consent request d
|
|
|
306
306
|
entityId: "<entity id>", // Optional
|
|
307
307
|
context: "<context>", // Optional
|
|
308
308
|
onReady: () => console.log("ConsentBox is ready"), // Optional
|
|
309
|
+
optionalReconsentBehavior: "notice", // Optional
|
|
310
|
+
mandatoryReconsentBehavior: "notice", // Optional
|
|
309
311
|
};
|
|
310
312
|
|
|
311
313
|
// Wait for DOM to be fully loaded
|
|
@@ -351,6 +353,17 @@ The `onEvent` follows the following format:
|
|
|
351
353
|
- **`entityId`**: Identifier of the `entity` associated with a `ConsentAction`. If provided and a consent was previously granted by this entity, the UI will display a message indicating that consent has already been given.
|
|
352
354
|
- **`context`**: Additional information that will be saved with the consent. Useful when you want to track the consent from a specific context.
|
|
353
355
|
- **`onReady`**: Optional callback that executes when the consent box is ready to use. You can use this to handle logic when the iframe is not mounted yet.
|
|
356
|
+
- **`optionalReconsentBehavior`**: What should happen when the consent is initialized with an `entityId` that has already given consent on an optional category.
|
|
357
|
+
- `notice` will show a message letting the user know that they have already given consent,
|
|
358
|
+
- `askAgain` will show the consent as if it wasn't given in the first place,
|
|
359
|
+
- `hide` will not show the consent at all.
|
|
360
|
+
|
|
361
|
+
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.
|
|
362
|
+
- **`mandatoryReconsentBehavior`**: What should happen when the consent is initialized with an `entityId` that has already given consent on a mandatory category.
|
|
363
|
+
- `notice` will show a message letting the user know that they have already given consent,
|
|
364
|
+
- `askAgain` will show the consent as if it wasn't given in the first place,
|
|
365
|
+
|
|
366
|
+
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.
|
|
354
367
|
|
|
355
368
|
# Appearance
|
|
356
369
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
import { AuthRequestConfig } from './widget/types';
|
|
2
2
|
import { AuthRequestProps } from './widget/types';
|
|
3
|
-
import { ConsentBox } from './embeds';
|
|
4
|
-
import { ConsentConfig } from './embeds/types';
|
|
5
|
-
import { ConsentEvent } from './embeds/types';
|
|
3
|
+
import { ConsentBox } from './embeds/consent';
|
|
4
|
+
import { ConsentConfig } from './embeds/consent/types';
|
|
5
|
+
import { ConsentEvent } from './embeds/consent/types';
|
|
6
6
|
import { DisclosureRequestConfig } from './widget/types';
|
|
7
7
|
import { DisclosureRequestProps } from './widget/types';
|
|
8
8
|
import { EventData } from './widget/types';
|
|
9
9
|
import { ExistingDisclosureRequestProps } from './widget/types';
|
|
10
10
|
import { ForceErrors } from './widget/types';
|
|
11
11
|
import { NewDisclosureRequestProps } from './widget/types';
|
|
12
|
+
import { PrivacyCenterBox } from './embeds/privacy-center';
|
|
13
|
+
import { PrivacyCenterConfig } from './embeds/privacy-center/types';
|
|
12
14
|
import { Request as Request_2 } from './widget/types';
|
|
13
15
|
import { RequestConfig } from './widget/types';
|
|
14
16
|
import { SignatureAttemptProps } from './widget/types';
|
|
15
17
|
import { SignatureRequestConfig } from './widget/types';
|
|
16
18
|
import { SoyioAppearance } from './embeds/appearance/types';
|
|
17
19
|
import { SoyioWidget } from './widget';
|
|
18
|
-
import { TooltipManager as _TooltipManager } from './embeds/tooltip-manager';
|
|
20
|
+
import { TooltipManager as _TooltipManager } from './embeds/base/tooltip-manager';
|
|
19
21
|
|
|
20
22
|
export { ConsentBox }
|
|
21
23
|
|
|
24
|
+
export { PrivacyCenterBox }
|
|
25
|
+
|
|
22
26
|
declare namespace SoyioTypes {
|
|
23
27
|
export {
|
|
24
28
|
ConsentEvent,
|
|
25
29
|
ConsentConfig,
|
|
30
|
+
PrivacyCenterConfig,
|
|
26
31
|
SoyioAppearance,
|
|
27
32
|
ForceErrors,
|
|
28
33
|
Request_2 as Request,
|