@redacto.io/consent-sdk-react 11.0.0-beta.3 → 11.1.0-beta.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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +61 -33
- package/dist/index.mjs +61 -33
- package/dist/privacy-center.d.mts +1 -1
- package/dist/privacy-center.d.ts +1 -1
- package/dist/{types-B8qroG0j.d.mts → types-9S_PyqzL.d.mts} +4 -0
- package/dist/{types-B8qroG0j.d.ts → types-9S_PyqzL.d.ts} +4 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { A as AppearanceStyle, N as NoticeControlStyle, a as NoticeMobileLayout, b as NoticeDesktopPosition, c as NoticeBackdrop, d as NoticePhoneFooter, e as NoticeTextScale, f as NoticeAppearance } from './types-
|
|
3
|
+
import { A as AppearanceStyle, N as NoticeControlStyle, a as NoticeMobileLayout, b as NoticeDesktopPosition, c as NoticeBackdrop, d as NoticePhoneFooter, e as NoticeTextScale, f as NoticeAppearance } from './types-9S_PyqzL.mjs';
|
|
4
4
|
import { f as NoticeFontOptions } from './types-xaCyZUfo.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { A as AppearanceStyle, N as NoticeControlStyle, a as NoticeMobileLayout, b as NoticeDesktopPosition, c as NoticeBackdrop, d as NoticePhoneFooter, e as NoticeTextScale, f as NoticeAppearance } from './types-
|
|
3
|
+
import { A as AppearanceStyle, N as NoticeControlStyle, a as NoticeMobileLayout, b as NoticeDesktopPosition, c as NoticeBackdrop, d as NoticePhoneFooter, e as NoticeTextScale, f as NoticeAppearance } from './types-9S_PyqzL.js';
|
|
4
4
|
import { f as NoticeFontOptions } from './types-xaCyZUfo.js';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1505,6 +1505,8 @@ var PREVIEW_FRAME_STYLE = {
|
|
|
1505
1505
|
var LAYOUT_STYLE_ID = "redacto-notice-layout-styles";
|
|
1506
1506
|
var DOCK_ATTRIBUTE = "data-redacto-sheet";
|
|
1507
1507
|
var DOCKED = "dock";
|
|
1508
|
+
var PREVIEW_ATTRIBUTE = "data-redacto-preview";
|
|
1509
|
+
var PREVIEWED = "frame";
|
|
1508
1510
|
var MOTION_ATTRIBUTE = "data-redacto-motion";
|
|
1509
1511
|
var MOTION_OFF = "off";
|
|
1510
1512
|
var NOTICE_ID_ATTRIBUTE = "data-redacto-notice-id";
|
|
@@ -1582,7 +1584,7 @@ var styles = {
|
|
|
1582
1584
|
border: "none",
|
|
1583
1585
|
display: "flex",
|
|
1584
1586
|
flexDirection: "column",
|
|
1585
|
-
maxHeight: "
|
|
1587
|
+
maxHeight: "90%",
|
|
1586
1588
|
zIndex: 1e3,
|
|
1587
1589
|
margin: 0,
|
|
1588
1590
|
padding: 0,
|
|
@@ -1963,7 +1965,14 @@ var styles = {
|
|
|
1963
1965
|
lineHeight: "150%",
|
|
1964
1966
|
letterSpacing: "0.2px",
|
|
1965
1967
|
cursor: "pointer",
|
|
1966
|
-
margin:
|
|
1968
|
+
// Longhands, not the `margin` shorthand: `declineSpacer` spreads
|
|
1969
|
+
// `marginRight` over this on the wide row only, and React clears a
|
|
1970
|
+
// longhand that sits beside a shorthand when a render drops it, which
|
|
1971
|
+
// leaves the value order-dependent.
|
|
1972
|
+
marginTop: 0,
|
|
1973
|
+
marginRight: 0,
|
|
1974
|
+
marginBottom: 0,
|
|
1975
|
+
marginLeft: 0,
|
|
1967
1976
|
boxSizing: "border-box",
|
|
1968
1977
|
textAlign: "center",
|
|
1969
1978
|
fontFamily: "inherit"
|
|
@@ -3829,10 +3838,12 @@ var FLOAT_FRAMES_STILL = `
|
|
|
3829
3838
|
var floatKeyframes = (frames) => [NOTICE_KEYFRAMES.float, NOTICE_KEYFRAMES.floatPill].map((name) => `@keyframes ${name} {${frames}
|
|
3830
3839
|
}`).join("\n");
|
|
3831
3840
|
var css = `
|
|
3832
|
-
/* dvh tracks the phone's collapsing toolbars;
|
|
3833
|
-
fallback for browsers without it.
|
|
3841
|
+
/* dvh tracks the phone's collapsing toolbars; the inline percentage stays
|
|
3842
|
+
as the fallback for browsers without it. Never in the console preview:
|
|
3843
|
+
there the frame is the containing block the inline cap is measured
|
|
3844
|
+
against, and a viewport unit would overrule it with the window's height. */
|
|
3834
3845
|
@supports (height: 100dvh) {
|
|
3835
|
-
${N}[${DOCK_ATTRIBUTE}="${DOCKED}"] {
|
|
3846
|
+
${N}[${DOCK_ATTRIBUTE}="${DOCKED}"]:not([${PREVIEW_ATTRIBUTE}]) {
|
|
3836
3847
|
max-height: 92dvh !important;
|
|
3837
3848
|
}
|
|
3838
3849
|
}
|
|
@@ -4074,7 +4085,7 @@ var modalPosition = ({
|
|
|
4074
4085
|
if (isMobile) {
|
|
4075
4086
|
return layout.mobileSheet ? {
|
|
4076
4087
|
...edgeDock(radius),
|
|
4077
|
-
maxHeight: "
|
|
4088
|
+
maxHeight: "92%",
|
|
4078
4089
|
paddingBottom: "env(safe-area-inset-bottom, 0px)"
|
|
4079
4090
|
} : {};
|
|
4080
4091
|
}
|
|
@@ -4087,7 +4098,7 @@ var modalPosition = ({
|
|
|
4087
4098
|
case "bottom-bar":
|
|
4088
4099
|
return {
|
|
4089
4100
|
...edgeDock(radius),
|
|
4090
|
-
maxHeight: "
|
|
4101
|
+
maxHeight: "70%",
|
|
4091
4102
|
paddingLeft: `max(0px, calc((100% - ${BOTTOM_BAR_CONTENT_WIDTH}) / 2))`,
|
|
4092
4103
|
paddingRight: `max(0px, calc((100% - ${BOTTOM_BAR_CONTENT_WIDTH}) / 2))`
|
|
4093
4104
|
};
|
|
@@ -4308,7 +4319,7 @@ var stylePatch = (p, {
|
|
|
4308
4319
|
...blur,
|
|
4309
4320
|
border: `1px solid ${p.sheetEdge}`,
|
|
4310
4321
|
boxShadow: docked ? p.shadow : p.floatShadow,
|
|
4311
|
-
maxHeight: "
|
|
4322
|
+
maxHeight: "85%",
|
|
4312
4323
|
overflow: "hidden",
|
|
4313
4324
|
animation: `${NOTICE_KEYFRAMES.float} ${MOTION.dimMs}ms ${MOTION.outEase} both`
|
|
4314
4325
|
},
|
|
@@ -5293,6 +5304,8 @@ var PurposeItem = ({
|
|
|
5293
5304
|
initialDataElementSelections = {},
|
|
5294
5305
|
controlSkin,
|
|
5295
5306
|
rowClassName,
|
|
5307
|
+
showsDataElements = true,
|
|
5308
|
+
showsPurposeDescription = true,
|
|
5296
5309
|
animateDisclosure = false
|
|
5297
5310
|
}) => {
|
|
5298
5311
|
var _a, _b;
|
|
@@ -5318,7 +5331,8 @@ var PurposeItem = ({
|
|
|
5318
5331
|
}),
|
|
5319
5332
|
[settings == null ? void 0 : settings.textColor]
|
|
5320
5333
|
);
|
|
5321
|
-
const
|
|
5334
|
+
const hasDataElements = showsDataElements && Boolean(purpose.data_elements) && purpose.data_elements.length > 0;
|
|
5335
|
+
const dataElementsOpen = !collapsedPurposes[stateKey] && hasDataElements;
|
|
5322
5336
|
const dataElements = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5323
5337
|
"div",
|
|
5324
5338
|
{
|
|
@@ -5448,24 +5462,26 @@ var PurposeItem = ({
|
|
|
5448
5462
|
"div",
|
|
5449
5463
|
{
|
|
5450
5464
|
style: styles4.optionLeft,
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
e.
|
|
5464
|
-
|
|
5465
|
+
...hasDataElements && {
|
|
5466
|
+
onClick: () => onPurposeCollapse(purpose.uuid, productUuid),
|
|
5467
|
+
role: "button",
|
|
5468
|
+
tabIndex: 0,
|
|
5469
|
+
"aria-expanded": !collapsedPurposes[stateKey],
|
|
5470
|
+
"aria-controls": `purpose-${purpose.uuid}`,
|
|
5471
|
+
"aria-label": `${collapsedPurposes[stateKey] ? "Expand" : "Collapse"} ${getTranslatedText(
|
|
5472
|
+
`purposes.name`,
|
|
5473
|
+
purpose.name,
|
|
5474
|
+
purpose.uuid
|
|
5475
|
+
)} details`,
|
|
5476
|
+
onKeyDown: (e) => {
|
|
5477
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
5478
|
+
e.preventDefault();
|
|
5479
|
+
onPurposeCollapse(purpose.uuid, productUuid);
|
|
5480
|
+
}
|
|
5465
5481
|
}
|
|
5466
5482
|
},
|
|
5467
5483
|
children: [
|
|
5468
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5484
|
+
hasDataElements && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5469
5485
|
CollapseChevron,
|
|
5470
5486
|
{
|
|
5471
5487
|
open: !collapsedPurposes[stateKey],
|
|
@@ -5490,7 +5506,7 @@ var PurposeItem = ({
|
|
|
5490
5506
|
},
|
|
5491
5507
|
`purpose-name-${purpose.uuid}-${selectedLanguage}`
|
|
5492
5508
|
),
|
|
5493
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5509
|
+
showsPurposeDescription && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5494
5510
|
"h3",
|
|
5495
5511
|
{
|
|
5496
5512
|
id: `purpose-description-${stateKey}`,
|
|
@@ -5532,7 +5548,7 @@ var PurposeItem = ({
|
|
|
5532
5548
|
}
|
|
5533
5549
|
)
|
|
5534
5550
|
] }),
|
|
5535
|
-
animateDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Collapse, { open: dataElementsOpen, children: dataElements }) : dataElementsOpen && dataElements
|
|
5551
|
+
hasDataElements && (animateDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Collapse, { open: dataElementsOpen, children: dataElements }) : dataElementsOpen && dataElements)
|
|
5536
5552
|
] }, purpose.uuid);
|
|
5537
5553
|
};
|
|
5538
5554
|
var RELATIONSHIP_OPTIONS = [
|
|
@@ -6527,6 +6543,9 @@ var NoticeConsentView = ({
|
|
|
6527
6543
|
}, [noticeId]);
|
|
6528
6544
|
const servedAppearance = content ? content.appearance : cachedAppearance;
|
|
6529
6545
|
const showsProductSection = (servedAppearance == null ? void 0 : servedAppearance.show_product_section) !== false;
|
|
6546
|
+
const showsDataElements = (servedAppearance == null ? void 0 : servedAppearance.show_data_elements) !== false;
|
|
6547
|
+
const showsPurposeDescription = (servedAppearance == null ? void 0 : servedAppearance.show_purpose_description) !== false;
|
|
6548
|
+
const showsPurposeSectionHeading = (servedAppearance == null ? void 0 : servedAppearance.show_purpose_section_heading) !== false;
|
|
6530
6549
|
const noticeAppearance = useNoticeAppearance(
|
|
6531
6550
|
servedAppearance,
|
|
6532
6551
|
settings,
|
|
@@ -8187,7 +8206,7 @@ var NoticeConsentView = ({
|
|
|
8187
8206
|
if (ttsAudioUrls.privacy_policy_anchor_text_audio_url) {
|
|
8188
8207
|
sequence.push(ttsAudioUrls.privacy_policy_anchor_text_audio_url);
|
|
8189
8208
|
}
|
|
8190
|
-
if (ttsAudioUrls.purpose_section_heading_audio_url) {
|
|
8209
|
+
if (showsPurposeSectionHeading && ttsAudioUrls.purpose_section_heading_audio_url) {
|
|
8191
8210
|
sequence.push(ttsAudioUrls.purpose_section_heading_audio_url);
|
|
8192
8211
|
}
|
|
8193
8212
|
const purposesToProcess = categorizedPurposes ? [
|
|
@@ -8203,12 +8222,12 @@ var NoticeConsentView = ({
|
|
|
8203
8222
|
if ((_a2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _a2.name_audio_url) {
|
|
8204
8223
|
sequence.push(ttsAudioUrls.purposes_audio[purpose.uuid].name_audio_url);
|
|
8205
8224
|
}
|
|
8206
|
-
if ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url) {
|
|
8225
|
+
if (showsPurposeDescription && ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url)) {
|
|
8207
8226
|
sequence.push(
|
|
8208
8227
|
ttsAudioUrls.purposes_audio[purpose.uuid].description_audio_url
|
|
8209
8228
|
);
|
|
8210
8229
|
}
|
|
8211
|
-
if (purpose.data_elements && purpose.data_elements.length > 0) {
|
|
8230
|
+
if (showsDataElements && purpose.data_elements && purpose.data_elements.length > 0) {
|
|
8212
8231
|
purpose.data_elements.forEach((dataElement) => {
|
|
8213
8232
|
var _a3;
|
|
8214
8233
|
if ((_a3 = ttsAudioUrls.data_elements_audio[dataElement.uuid]) == null ? void 0 : _a3.name_audio_url) {
|
|
@@ -8259,7 +8278,7 @@ var NoticeConsentView = ({
|
|
|
8259
8278
|
if (ttsAudioUrls.privacy_policy_anchor_text_audio_url) {
|
|
8260
8279
|
elementIds.push("privacy-policy-link");
|
|
8261
8280
|
}
|
|
8262
|
-
if (ttsAudioUrls.purpose_section_heading_audio_url) {
|
|
8281
|
+
if (showsPurposeSectionHeading && ttsAudioUrls.purpose_section_heading_audio_url) {
|
|
8263
8282
|
elementIds.push("purpose-section-heading");
|
|
8264
8283
|
}
|
|
8265
8284
|
const purposesToProcess = categorizedPurposes ? [
|
|
@@ -8275,10 +8294,10 @@ var NoticeConsentView = ({
|
|
|
8275
8294
|
if ((_a2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _a2.name_audio_url) {
|
|
8276
8295
|
elementIds.push(`purpose-name-${purpose.uuid}`);
|
|
8277
8296
|
}
|
|
8278
|
-
if ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url) {
|
|
8297
|
+
if (showsPurposeDescription && ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url)) {
|
|
8279
8298
|
elementIds.push(`purpose-description-${purpose.uuid}`);
|
|
8280
8299
|
}
|
|
8281
|
-
if (purpose.data_elements && purpose.data_elements.length > 0) {
|
|
8300
|
+
if (showsDataElements && purpose.data_elements && purpose.data_elements.length > 0) {
|
|
8282
8301
|
purpose.data_elements.forEach((dataElement) => {
|
|
8283
8302
|
var _a3;
|
|
8284
8303
|
if ((_a3 = ttsAudioUrls.data_elements_audio[dataElement.uuid]) == null ? void 0 : _a3.name_audio_url) {
|
|
@@ -8823,6 +8842,7 @@ var NoticeConsentView = ({
|
|
|
8823
8842
|
...appearanceRootProps,
|
|
8824
8843
|
...PART_PROPS.root,
|
|
8825
8844
|
...docked && { [DOCK_ATTRIBUTE]: DOCKED },
|
|
8845
|
+
...previewContent && { [PREVIEW_ATTRIBUTE]: PREVIEWED },
|
|
8826
8846
|
style: isLoading && showsLoaderPill && skin ? (
|
|
8827
8847
|
// The dialog itself shrinks to a pill until the notice
|
|
8828
8848
|
// arrives, then grows into the sheet: one element, so the
|
|
@@ -9366,7 +9386,7 @@ var NoticeConsentView = ({
|
|
|
9366
9386
|
`privacy-text-${selectedLanguage}`
|
|
9367
9387
|
)
|
|
9368
9388
|
),
|
|
9369
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
9389
|
+
showsPurposeSectionHeading && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
9370
9390
|
"h2",
|
|
9371
9391
|
{
|
|
9372
9392
|
id: "purpose-section-heading",
|
|
@@ -9389,6 +9409,8 @@ var NoticeConsentView = ({
|
|
|
9389
9409
|
(purpose) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
9390
9410
|
PurposeItem,
|
|
9391
9411
|
{
|
|
9412
|
+
showsDataElements,
|
|
9413
|
+
showsPurposeDescription,
|
|
9392
9414
|
roomyControls,
|
|
9393
9415
|
purpose,
|
|
9394
9416
|
selectedPurposes,
|
|
@@ -9415,6 +9437,8 @@ var NoticeConsentView = ({
|
|
|
9415
9437
|
categorizedPurposes.needsConsent.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
9416
9438
|
PurposeItem,
|
|
9417
9439
|
{
|
|
9440
|
+
showsDataElements,
|
|
9441
|
+
showsPurposeDescription,
|
|
9418
9442
|
roomyControls,
|
|
9419
9443
|
purpose,
|
|
9420
9444
|
selectedPurposes,
|
|
@@ -9490,6 +9514,8 @@ var NoticeConsentView = ({
|
|
|
9490
9514
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
9491
9515
|
PurposeItem,
|
|
9492
9516
|
{
|
|
9517
|
+
showsDataElements,
|
|
9518
|
+
showsPurposeDescription,
|
|
9493
9519
|
purpose,
|
|
9494
9520
|
productUuid: group.product.uuid,
|
|
9495
9521
|
selectedPurposes,
|
|
@@ -9526,6 +9552,8 @@ var NoticeConsentView = ({
|
|
|
9526
9552
|
renderedPurposes.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
9527
9553
|
PurposeItem,
|
|
9528
9554
|
{
|
|
9555
|
+
showsDataElements,
|
|
9556
|
+
showsPurposeDescription,
|
|
9529
9557
|
roomyControls,
|
|
9530
9558
|
purpose,
|
|
9531
9559
|
selectedPurposes,
|
package/dist/index.mjs
CHANGED
|
@@ -1311,6 +1311,8 @@ var PREVIEW_FRAME_STYLE = {
|
|
|
1311
1311
|
var LAYOUT_STYLE_ID = "redacto-notice-layout-styles";
|
|
1312
1312
|
var DOCK_ATTRIBUTE = "data-redacto-sheet";
|
|
1313
1313
|
var DOCKED = "dock";
|
|
1314
|
+
var PREVIEW_ATTRIBUTE = "data-redacto-preview";
|
|
1315
|
+
var PREVIEWED = "frame";
|
|
1314
1316
|
var MOTION_ATTRIBUTE = "data-redacto-motion";
|
|
1315
1317
|
var MOTION_OFF = "off";
|
|
1316
1318
|
var NOTICE_ID_ATTRIBUTE = "data-redacto-notice-id";
|
|
@@ -1388,7 +1390,7 @@ var styles = {
|
|
|
1388
1390
|
border: "none",
|
|
1389
1391
|
display: "flex",
|
|
1390
1392
|
flexDirection: "column",
|
|
1391
|
-
maxHeight: "
|
|
1393
|
+
maxHeight: "90%",
|
|
1392
1394
|
zIndex: 1e3,
|
|
1393
1395
|
margin: 0,
|
|
1394
1396
|
padding: 0,
|
|
@@ -1769,7 +1771,14 @@ var styles = {
|
|
|
1769
1771
|
lineHeight: "150%",
|
|
1770
1772
|
letterSpacing: "0.2px",
|
|
1771
1773
|
cursor: "pointer",
|
|
1772
|
-
margin:
|
|
1774
|
+
// Longhands, not the `margin` shorthand: `declineSpacer` spreads
|
|
1775
|
+
// `marginRight` over this on the wide row only, and React clears a
|
|
1776
|
+
// longhand that sits beside a shorthand when a render drops it, which
|
|
1777
|
+
// leaves the value order-dependent.
|
|
1778
|
+
marginTop: 0,
|
|
1779
|
+
marginRight: 0,
|
|
1780
|
+
marginBottom: 0,
|
|
1781
|
+
marginLeft: 0,
|
|
1773
1782
|
boxSizing: "border-box",
|
|
1774
1783
|
textAlign: "center",
|
|
1775
1784
|
fontFamily: "inherit"
|
|
@@ -2956,10 +2965,12 @@ var FLOAT_FRAMES_STILL = `
|
|
|
2956
2965
|
var floatKeyframes = (frames) => [NOTICE_KEYFRAMES.float, NOTICE_KEYFRAMES.floatPill].map((name) => `@keyframes ${name} {${frames}
|
|
2957
2966
|
}`).join("\n");
|
|
2958
2967
|
var css = `
|
|
2959
|
-
/* dvh tracks the phone's collapsing toolbars;
|
|
2960
|
-
fallback for browsers without it.
|
|
2968
|
+
/* dvh tracks the phone's collapsing toolbars; the inline percentage stays
|
|
2969
|
+
as the fallback for browsers without it. Never in the console preview:
|
|
2970
|
+
there the frame is the containing block the inline cap is measured
|
|
2971
|
+
against, and a viewport unit would overrule it with the window's height. */
|
|
2961
2972
|
@supports (height: 100dvh) {
|
|
2962
|
-
${N}[${DOCK_ATTRIBUTE}="${DOCKED}"] {
|
|
2973
|
+
${N}[${DOCK_ATTRIBUTE}="${DOCKED}"]:not([${PREVIEW_ATTRIBUTE}]) {
|
|
2963
2974
|
max-height: 92dvh !important;
|
|
2964
2975
|
}
|
|
2965
2976
|
}
|
|
@@ -3201,7 +3212,7 @@ var modalPosition = ({
|
|
|
3201
3212
|
if (isMobile) {
|
|
3202
3213
|
return layout.mobileSheet ? {
|
|
3203
3214
|
...edgeDock(radius),
|
|
3204
|
-
maxHeight: "
|
|
3215
|
+
maxHeight: "92%",
|
|
3205
3216
|
paddingBottom: "env(safe-area-inset-bottom, 0px)"
|
|
3206
3217
|
} : {};
|
|
3207
3218
|
}
|
|
@@ -3214,7 +3225,7 @@ var modalPosition = ({
|
|
|
3214
3225
|
case "bottom-bar":
|
|
3215
3226
|
return {
|
|
3216
3227
|
...edgeDock(radius),
|
|
3217
|
-
maxHeight: "
|
|
3228
|
+
maxHeight: "70%",
|
|
3218
3229
|
paddingLeft: `max(0px, calc((100% - ${BOTTOM_BAR_CONTENT_WIDTH}) / 2))`,
|
|
3219
3230
|
paddingRight: `max(0px, calc((100% - ${BOTTOM_BAR_CONTENT_WIDTH}) / 2))`
|
|
3220
3231
|
};
|
|
@@ -3435,7 +3446,7 @@ var stylePatch = (p, {
|
|
|
3435
3446
|
...blur,
|
|
3436
3447
|
border: `1px solid ${p.sheetEdge}`,
|
|
3437
3448
|
boxShadow: docked ? p.shadow : p.floatShadow,
|
|
3438
|
-
maxHeight: "
|
|
3449
|
+
maxHeight: "85%",
|
|
3439
3450
|
overflow: "hidden",
|
|
3440
3451
|
animation: `${NOTICE_KEYFRAMES.float} ${MOTION.dimMs}ms ${MOTION.outEase} both`
|
|
3441
3452
|
},
|
|
@@ -4304,6 +4315,8 @@ var PurposeItem = ({
|
|
|
4304
4315
|
initialDataElementSelections = {},
|
|
4305
4316
|
controlSkin,
|
|
4306
4317
|
rowClassName,
|
|
4318
|
+
showsDataElements = true,
|
|
4319
|
+
showsPurposeDescription = true,
|
|
4307
4320
|
animateDisclosure = false
|
|
4308
4321
|
}) => {
|
|
4309
4322
|
var _a, _b;
|
|
@@ -4329,7 +4342,8 @@ var PurposeItem = ({
|
|
|
4329
4342
|
}),
|
|
4330
4343
|
[settings == null ? void 0 : settings.textColor]
|
|
4331
4344
|
);
|
|
4332
|
-
const
|
|
4345
|
+
const hasDataElements = showsDataElements && Boolean(purpose.data_elements) && purpose.data_elements.length > 0;
|
|
4346
|
+
const dataElementsOpen = !collapsedPurposes[stateKey] && hasDataElements;
|
|
4333
4347
|
const dataElements = /* @__PURE__ */ jsx6(
|
|
4334
4348
|
"div",
|
|
4335
4349
|
{
|
|
@@ -4459,24 +4473,26 @@ var PurposeItem = ({
|
|
|
4459
4473
|
"div",
|
|
4460
4474
|
{
|
|
4461
4475
|
style: styles4.optionLeft,
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
e.
|
|
4475
|
-
|
|
4476
|
+
...hasDataElements && {
|
|
4477
|
+
onClick: () => onPurposeCollapse(purpose.uuid, productUuid),
|
|
4478
|
+
role: "button",
|
|
4479
|
+
tabIndex: 0,
|
|
4480
|
+
"aria-expanded": !collapsedPurposes[stateKey],
|
|
4481
|
+
"aria-controls": `purpose-${purpose.uuid}`,
|
|
4482
|
+
"aria-label": `${collapsedPurposes[stateKey] ? "Expand" : "Collapse"} ${getTranslatedText(
|
|
4483
|
+
`purposes.name`,
|
|
4484
|
+
purpose.name,
|
|
4485
|
+
purpose.uuid
|
|
4486
|
+
)} details`,
|
|
4487
|
+
onKeyDown: (e) => {
|
|
4488
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
4489
|
+
e.preventDefault();
|
|
4490
|
+
onPurposeCollapse(purpose.uuid, productUuid);
|
|
4491
|
+
}
|
|
4476
4492
|
}
|
|
4477
4493
|
},
|
|
4478
4494
|
children: [
|
|
4479
|
-
/* @__PURE__ */ jsx6(
|
|
4495
|
+
hasDataElements && /* @__PURE__ */ jsx6(
|
|
4480
4496
|
CollapseChevron,
|
|
4481
4497
|
{
|
|
4482
4498
|
open: !collapsedPurposes[stateKey],
|
|
@@ -4501,7 +4517,7 @@ var PurposeItem = ({
|
|
|
4501
4517
|
},
|
|
4502
4518
|
`purpose-name-${purpose.uuid}-${selectedLanguage}`
|
|
4503
4519
|
),
|
|
4504
|
-
/* @__PURE__ */ jsx6(
|
|
4520
|
+
showsPurposeDescription && /* @__PURE__ */ jsx6(
|
|
4505
4521
|
"h3",
|
|
4506
4522
|
{
|
|
4507
4523
|
id: `purpose-description-${stateKey}`,
|
|
@@ -4543,7 +4559,7 @@ var PurposeItem = ({
|
|
|
4543
4559
|
}
|
|
4544
4560
|
)
|
|
4545
4561
|
] }),
|
|
4546
|
-
animateDisclosure ? /* @__PURE__ */ jsx6(Collapse, { open: dataElementsOpen, children: dataElements }) : dataElementsOpen && dataElements
|
|
4562
|
+
hasDataElements && (animateDisclosure ? /* @__PURE__ */ jsx6(Collapse, { open: dataElementsOpen, children: dataElements }) : dataElementsOpen && dataElements)
|
|
4547
4563
|
] }, purpose.uuid);
|
|
4548
4564
|
};
|
|
4549
4565
|
var RELATIONSHIP_OPTIONS = [
|
|
@@ -5538,6 +5554,9 @@ var NoticeConsentView = ({
|
|
|
5538
5554
|
}, [noticeId]);
|
|
5539
5555
|
const servedAppearance = content ? content.appearance : cachedAppearance;
|
|
5540
5556
|
const showsProductSection = (servedAppearance == null ? void 0 : servedAppearance.show_product_section) !== false;
|
|
5557
|
+
const showsDataElements = (servedAppearance == null ? void 0 : servedAppearance.show_data_elements) !== false;
|
|
5558
|
+
const showsPurposeDescription = (servedAppearance == null ? void 0 : servedAppearance.show_purpose_description) !== false;
|
|
5559
|
+
const showsPurposeSectionHeading = (servedAppearance == null ? void 0 : servedAppearance.show_purpose_section_heading) !== false;
|
|
5541
5560
|
const noticeAppearance = useNoticeAppearance(
|
|
5542
5561
|
servedAppearance,
|
|
5543
5562
|
settings,
|
|
@@ -7198,7 +7217,7 @@ var NoticeConsentView = ({
|
|
|
7198
7217
|
if (ttsAudioUrls.privacy_policy_anchor_text_audio_url) {
|
|
7199
7218
|
sequence.push(ttsAudioUrls.privacy_policy_anchor_text_audio_url);
|
|
7200
7219
|
}
|
|
7201
|
-
if (ttsAudioUrls.purpose_section_heading_audio_url) {
|
|
7220
|
+
if (showsPurposeSectionHeading && ttsAudioUrls.purpose_section_heading_audio_url) {
|
|
7202
7221
|
sequence.push(ttsAudioUrls.purpose_section_heading_audio_url);
|
|
7203
7222
|
}
|
|
7204
7223
|
const purposesToProcess = categorizedPurposes ? [
|
|
@@ -7214,12 +7233,12 @@ var NoticeConsentView = ({
|
|
|
7214
7233
|
if ((_a2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _a2.name_audio_url) {
|
|
7215
7234
|
sequence.push(ttsAudioUrls.purposes_audio[purpose.uuid].name_audio_url);
|
|
7216
7235
|
}
|
|
7217
|
-
if ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url) {
|
|
7236
|
+
if (showsPurposeDescription && ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url)) {
|
|
7218
7237
|
sequence.push(
|
|
7219
7238
|
ttsAudioUrls.purposes_audio[purpose.uuid].description_audio_url
|
|
7220
7239
|
);
|
|
7221
7240
|
}
|
|
7222
|
-
if (purpose.data_elements && purpose.data_elements.length > 0) {
|
|
7241
|
+
if (showsDataElements && purpose.data_elements && purpose.data_elements.length > 0) {
|
|
7223
7242
|
purpose.data_elements.forEach((dataElement) => {
|
|
7224
7243
|
var _a3;
|
|
7225
7244
|
if ((_a3 = ttsAudioUrls.data_elements_audio[dataElement.uuid]) == null ? void 0 : _a3.name_audio_url) {
|
|
@@ -7270,7 +7289,7 @@ var NoticeConsentView = ({
|
|
|
7270
7289
|
if (ttsAudioUrls.privacy_policy_anchor_text_audio_url) {
|
|
7271
7290
|
elementIds.push("privacy-policy-link");
|
|
7272
7291
|
}
|
|
7273
|
-
if (ttsAudioUrls.purpose_section_heading_audio_url) {
|
|
7292
|
+
if (showsPurposeSectionHeading && ttsAudioUrls.purpose_section_heading_audio_url) {
|
|
7274
7293
|
elementIds.push("purpose-section-heading");
|
|
7275
7294
|
}
|
|
7276
7295
|
const purposesToProcess = categorizedPurposes ? [
|
|
@@ -7286,10 +7305,10 @@ var NoticeConsentView = ({
|
|
|
7286
7305
|
if ((_a2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _a2.name_audio_url) {
|
|
7287
7306
|
elementIds.push(`purpose-name-${purpose.uuid}`);
|
|
7288
7307
|
}
|
|
7289
|
-
if ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url) {
|
|
7308
|
+
if (showsPurposeDescription && ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url)) {
|
|
7290
7309
|
elementIds.push(`purpose-description-${purpose.uuid}`);
|
|
7291
7310
|
}
|
|
7292
|
-
if (purpose.data_elements && purpose.data_elements.length > 0) {
|
|
7311
|
+
if (showsDataElements && purpose.data_elements && purpose.data_elements.length > 0) {
|
|
7293
7312
|
purpose.data_elements.forEach((dataElement) => {
|
|
7294
7313
|
var _a3;
|
|
7295
7314
|
if ((_a3 = ttsAudioUrls.data_elements_audio[dataElement.uuid]) == null ? void 0 : _a3.name_audio_url) {
|
|
@@ -7834,6 +7853,7 @@ var NoticeConsentView = ({
|
|
|
7834
7853
|
...appearanceRootProps,
|
|
7835
7854
|
...PART_PROPS.root,
|
|
7836
7855
|
...docked && { [DOCK_ATTRIBUTE]: DOCKED },
|
|
7856
|
+
...previewContent && { [PREVIEW_ATTRIBUTE]: PREVIEWED },
|
|
7837
7857
|
style: isLoading && showsLoaderPill && skin ? (
|
|
7838
7858
|
// The dialog itself shrinks to a pill until the notice
|
|
7839
7859
|
// arrives, then grows into the sheet: one element, so the
|
|
@@ -8377,7 +8397,7 @@ var NoticeConsentView = ({
|
|
|
8377
8397
|
`privacy-text-${selectedLanguage}`
|
|
8378
8398
|
)
|
|
8379
8399
|
),
|
|
8380
|
-
/* @__PURE__ */ jsx6(
|
|
8400
|
+
showsPurposeSectionHeading && /* @__PURE__ */ jsx6(
|
|
8381
8401
|
"h2",
|
|
8382
8402
|
{
|
|
8383
8403
|
id: "purpose-section-heading",
|
|
@@ -8400,6 +8420,8 @@ var NoticeConsentView = ({
|
|
|
8400
8420
|
(purpose) => /* @__PURE__ */ jsx6(
|
|
8401
8421
|
PurposeItem,
|
|
8402
8422
|
{
|
|
8423
|
+
showsDataElements,
|
|
8424
|
+
showsPurposeDescription,
|
|
8403
8425
|
roomyControls,
|
|
8404
8426
|
purpose,
|
|
8405
8427
|
selectedPurposes,
|
|
@@ -8426,6 +8448,8 @@ var NoticeConsentView = ({
|
|
|
8426
8448
|
categorizedPurposes.needsConsent.map((purpose) => /* @__PURE__ */ jsx6(
|
|
8427
8449
|
PurposeItem,
|
|
8428
8450
|
{
|
|
8451
|
+
showsDataElements,
|
|
8452
|
+
showsPurposeDescription,
|
|
8429
8453
|
roomyControls,
|
|
8430
8454
|
purpose,
|
|
8431
8455
|
selectedPurposes,
|
|
@@ -8501,6 +8525,8 @@ var NoticeConsentView = ({
|
|
|
8501
8525
|
return /* @__PURE__ */ jsx6(
|
|
8502
8526
|
PurposeItem,
|
|
8503
8527
|
{
|
|
8528
|
+
showsDataElements,
|
|
8529
|
+
showsPurposeDescription,
|
|
8504
8530
|
purpose,
|
|
8505
8531
|
productUuid: group.product.uuid,
|
|
8506
8532
|
selectedPurposes,
|
|
@@ -8537,6 +8563,8 @@ var NoticeConsentView = ({
|
|
|
8537
8563
|
renderedPurposes.map((purpose) => /* @__PURE__ */ jsx6(
|
|
8538
8564
|
PurposeItem,
|
|
8539
8565
|
{
|
|
8566
|
+
showsDataElements,
|
|
8567
|
+
showsPurposeDescription,
|
|
8540
8568
|
roomyControls,
|
|
8541
8569
|
purpose,
|
|
8542
8570
|
selectedPurposes,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { P as PrivacyCenterTheme } from './types-
|
|
3
|
+
import { P as PrivacyCenterTheme } from './types-9S_PyqzL.mjs';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/privacy-center.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { P as PrivacyCenterTheme } from './types-
|
|
3
|
+
import { P as PrivacyCenterTheme } from './types-9S_PyqzL.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -55,6 +55,10 @@ type NoticeAppearance = Readonly<{
|
|
|
55
55
|
collapsible_sections?: boolean;
|
|
56
56
|
/** Only read when the notice covers one product. */
|
|
57
57
|
show_product_section?: boolean;
|
|
58
|
+
/** Absent draws the data elements, and the chevron that opens them. */
|
|
59
|
+
show_data_elements?: boolean;
|
|
60
|
+
show_purpose_description?: boolean;
|
|
61
|
+
show_purpose_section_heading?: boolean;
|
|
58
62
|
phone_footer?: string;
|
|
59
63
|
auto_dark?: boolean;
|
|
60
64
|
dark_colors?: NoticeAppearanceColors;
|
|
@@ -55,6 +55,10 @@ type NoticeAppearance = Readonly<{
|
|
|
55
55
|
collapsible_sections?: boolean;
|
|
56
56
|
/** Only read when the notice covers one product. */
|
|
57
57
|
show_product_section?: boolean;
|
|
58
|
+
/** Absent draws the data elements, and the chevron that opens them. */
|
|
59
|
+
show_data_elements?: boolean;
|
|
60
|
+
show_purpose_description?: boolean;
|
|
61
|
+
show_purpose_section_heading?: boolean;
|
|
58
62
|
phone_footer?: string;
|
|
59
63
|
auto_dark?: boolean;
|
|
60
64
|
dark_colors?: NoticeAppearanceColors;
|