@redacto.io/consent-sdk-react 11.1.0-beta.0 → 11.1.0-beta.1
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 +68 -53
- package/dist/index.mjs +68 -53
- package/dist/privacy-center.d.mts +1 -1
- package/dist/privacy-center.d.ts +1 -1
- package/dist/{types-9S_PyqzL.d.mts → types-CaqLBkJt.d.mts} +4 -1
- package/dist/{types-9S_PyqzL.d.ts → types-CaqLBkJt.d.ts} +4 -1
- 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-CaqLBkJt.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-CaqLBkJt.js';
|
|
4
4
|
import { f as NoticeFontOptions } from './types-xaCyZUfo.js';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/index.js
CHANGED
|
@@ -5305,7 +5305,7 @@ var PurposeItem = ({
|
|
|
5305
5305
|
controlSkin,
|
|
5306
5306
|
rowClassName,
|
|
5307
5307
|
showsDataElements = true,
|
|
5308
|
-
|
|
5308
|
+
descriptionPlacement = "always",
|
|
5309
5309
|
animateDisclosure = false
|
|
5310
5310
|
}) => {
|
|
5311
5311
|
var _a, _b;
|
|
@@ -5332,11 +5332,30 @@ var PurposeItem = ({
|
|
|
5332
5332
|
[settings == null ? void 0 : settings.textColor]
|
|
5333
5333
|
);
|
|
5334
5334
|
const hasDataElements = showsDataElements && Boolean(purpose.data_elements) && purpose.data_elements.length > 0;
|
|
5335
|
-
const
|
|
5335
|
+
const descriptionText = getTranslatedText(
|
|
5336
|
+
`purposes.description`,
|
|
5337
|
+
purpose.description,
|
|
5338
|
+
purpose.uuid
|
|
5339
|
+
);
|
|
5340
|
+
const disclosesDescription = descriptionPlacement === "expanded" && descriptionText.trim() !== "";
|
|
5341
|
+
const hasDisclosure = hasDataElements || disclosesDescription;
|
|
5342
|
+
const dataElementsOpen = !collapsedPurposes[stateKey] && hasDisclosure;
|
|
5343
|
+
const purposeDescription = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5344
|
+
"h3",
|
|
5345
|
+
{
|
|
5346
|
+
id: `purpose-description-${stateKey}`,
|
|
5347
|
+
style: {
|
|
5348
|
+
...styles4.optionDescription,
|
|
5349
|
+
...responsiveStyles.optionDescription,
|
|
5350
|
+
...textStyle
|
|
5351
|
+
},
|
|
5352
|
+
children: descriptionText
|
|
5353
|
+
},
|
|
5354
|
+
`purpose-description-${purpose.uuid}-${selectedLanguage}`
|
|
5355
|
+
);
|
|
5336
5356
|
const dataElements = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5337
5357
|
"div",
|
|
5338
5358
|
{
|
|
5339
|
-
id: `purpose-${purpose.uuid}`,
|
|
5340
5359
|
style: {
|
|
5341
5360
|
...styles4.dataElementsContainer,
|
|
5342
5361
|
...roomyControls ? styles4.dataElementsContainerRoomy : null
|
|
@@ -5456,13 +5475,17 @@ var PurposeItem = ({
|
|
|
5456
5475
|
},
|
|
5457
5476
|
`purpose-${purpose.uuid}-container-${selectedLanguage}`
|
|
5458
5477
|
);
|
|
5478
|
+
const disclosureContents = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
5479
|
+
disclosesDescription && purposeDescription,
|
|
5480
|
+
hasDataElements && dataElements
|
|
5481
|
+
] });
|
|
5459
5482
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: rowClassName, children: [
|
|
5460
5483
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ...PART_PROPS.purpose, style: styles4.optionItem, children: [
|
|
5461
5484
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
5462
5485
|
"div",
|
|
5463
5486
|
{
|
|
5464
5487
|
style: styles4.optionLeft,
|
|
5465
|
-
...
|
|
5488
|
+
...hasDisclosure && {
|
|
5466
5489
|
onClick: () => onPurposeCollapse(purpose.uuid, productUuid),
|
|
5467
5490
|
role: "button",
|
|
5468
5491
|
tabIndex: 0,
|
|
@@ -5481,7 +5504,7 @@ var PurposeItem = ({
|
|
|
5481
5504
|
}
|
|
5482
5505
|
},
|
|
5483
5506
|
children: [
|
|
5484
|
-
|
|
5507
|
+
hasDisclosure && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
5485
5508
|
CollapseChevron,
|
|
5486
5509
|
{
|
|
5487
5510
|
open: !collapsedPurposes[stateKey],
|
|
@@ -5506,23 +5529,7 @@ var PurposeItem = ({
|
|
|
5506
5529
|
},
|
|
5507
5530
|
`purpose-name-${purpose.uuid}-${selectedLanguage}`
|
|
5508
5531
|
),
|
|
5509
|
-
|
|
5510
|
-
"h3",
|
|
5511
|
-
{
|
|
5512
|
-
id: `purpose-description-${stateKey}`,
|
|
5513
|
-
style: {
|
|
5514
|
-
...styles4.optionDescription,
|
|
5515
|
-
...responsiveStyles.optionDescription,
|
|
5516
|
-
...textStyle
|
|
5517
|
-
},
|
|
5518
|
-
children: getTranslatedText(
|
|
5519
|
-
`purposes.description`,
|
|
5520
|
-
purpose.description,
|
|
5521
|
-
purpose.uuid
|
|
5522
|
-
)
|
|
5523
|
-
},
|
|
5524
|
-
`purpose-description-${purpose.uuid}-${selectedLanguage}`
|
|
5525
|
-
)
|
|
5532
|
+
descriptionPlacement === "always" && purposeDescription
|
|
5526
5533
|
] })
|
|
5527
5534
|
]
|
|
5528
5535
|
}
|
|
@@ -5548,7 +5555,13 @@ var PurposeItem = ({
|
|
|
5548
5555
|
}
|
|
5549
5556
|
)
|
|
5550
5557
|
] }),
|
|
5551
|
-
|
|
5558
|
+
hasDisclosure && (animateDisclosure ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Collapse, { open: dataElementsOpen, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { id: `purpose-${purpose.uuid}`, children: disclosureContents }) }) : (
|
|
5559
|
+
// The container is always drawn, empty while the row is closed:
|
|
5560
|
+
// `aria-controls` on the chevron names it, and a control that points
|
|
5561
|
+
// at an element which is not in the document is worse than no
|
|
5562
|
+
// control at all.
|
|
5563
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { id: `purpose-${purpose.uuid}`, children: dataElementsOpen && disclosureContents })
|
|
5564
|
+
))
|
|
5552
5565
|
] }, purpose.uuid);
|
|
5553
5566
|
};
|
|
5554
5567
|
var RELATIONSHIP_OPTIONS = [
|
|
@@ -6466,7 +6479,7 @@ var NoticeConsentView = ({
|
|
|
6466
6479
|
forceMobile,
|
|
6467
6480
|
forceColorScheme
|
|
6468
6481
|
}) => {
|
|
6469
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L;
|
|
6482
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M;
|
|
6470
6483
|
const endpoints = useResolvedEndpoints(baseUrlProp, ledgerBaseUrlProp, {
|
|
6471
6484
|
warn: !previewContent
|
|
6472
6485
|
});
|
|
@@ -6544,7 +6557,7 @@ var NoticeConsentView = ({
|
|
|
6544
6557
|
const servedAppearance = content ? content.appearance : cachedAppearance;
|
|
6545
6558
|
const showsProductSection = (servedAppearance == null ? void 0 : servedAppearance.show_product_section) !== false;
|
|
6546
6559
|
const showsDataElements = (servedAppearance == null ? void 0 : servedAppearance.show_data_elements) !== false;
|
|
6547
|
-
const
|
|
6560
|
+
const descriptionPlacement = (_a = servedAppearance == null ? void 0 : servedAppearance.purpose_description) != null ? _a : "always";
|
|
6548
6561
|
const showsPurposeSectionHeading = (servedAppearance == null ? void 0 : servedAppearance.show_purpose_section_heading) !== false;
|
|
6549
6562
|
const noticeAppearance = useNoticeAppearance(
|
|
6550
6563
|
servedAppearance,
|
|
@@ -6734,8 +6747,8 @@ var NoticeConsentView = ({
|
|
|
6734
6747
|
const docked = isDocked(layout, isMobile);
|
|
6735
6748
|
const headingColor = (noticeSettings == null ? void 0 : noticeSettings.headingColor) || DEFAULT_HEADING_COLOR;
|
|
6736
6749
|
const textColor = (noticeSettings == null ? void 0 : noticeSettings.textColor) || DEFAULT_TEXT_COLOR;
|
|
6737
|
-
const classicAccentColor = ((
|
|
6738
|
-
const accentColor = (
|
|
6750
|
+
const classicAccentColor = ((_c = (_b = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _b.accept) == null ? void 0 : _c.backgroundColor) || (content == null ? void 0 : content.primary_color) || (content ? DEFAULT_ACCENT_COLOR : headingColor);
|
|
6751
|
+
const accentColor = (_f = appearanceColors.toggle_on) != null ? _f : hasNoticeSkin(appearance) ? ((_e = (_d = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _d.acceptAll) == null ? void 0 : _e.backgroundColor) || classicAccentColor : classicAccentColor;
|
|
6739
6752
|
const variantStyles = (0, import_react9.useMemo)(
|
|
6740
6753
|
() => buildVariantStyles(
|
|
6741
6754
|
styles,
|
|
@@ -6769,7 +6782,7 @@ var NoticeConsentView = ({
|
|
|
6769
6782
|
docked
|
|
6770
6783
|
]
|
|
6771
6784
|
);
|
|
6772
|
-
const textScale = NOTICE_TEXT_SCALE_FACTORS[(
|
|
6785
|
+
const textScale = NOTICE_TEXT_SCALE_FACTORS[(_g = noticeAppearance.textScale) != null ? _g : DEFAULT_TEXT_SCALE];
|
|
6773
6786
|
const styles4 = (0, import_react9.useMemo)(
|
|
6774
6787
|
() => {
|
|
6775
6788
|
var _a2;
|
|
@@ -6834,7 +6847,7 @@ var NoticeConsentView = ({
|
|
|
6834
6847
|
...otpLocked && styles4.otpGateLocked
|
|
6835
6848
|
};
|
|
6836
6849
|
const drawsSwitches = layout.switchControl;
|
|
6837
|
-
const roomyControls = drawsSwitches || ((
|
|
6850
|
+
const roomyControls = drawsSwitches || ((_h = noticeSettings == null ? void 0 : noticeSettings.selectionControl) != null ? _h : DEFAULT_SELECTION_CONTROL) !== "checkbox";
|
|
6838
6851
|
const appearanceRootProps = {
|
|
6839
6852
|
[NOTICE_ROOT_ATTRIBUTE]: "",
|
|
6840
6853
|
[NOTICE_ID_ATTRIBUTE]: noticeId,
|
|
@@ -8222,7 +8235,7 @@ var NoticeConsentView = ({
|
|
|
8222
8235
|
if ((_a2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _a2.name_audio_url) {
|
|
8223
8236
|
sequence.push(ttsAudioUrls.purposes_audio[purpose.uuid].name_audio_url);
|
|
8224
8237
|
}
|
|
8225
|
-
if (
|
|
8238
|
+
if (descriptionPlacement !== "hidden" && ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url)) {
|
|
8226
8239
|
sequence.push(
|
|
8227
8240
|
ttsAudioUrls.purposes_audio[purpose.uuid].description_audio_url
|
|
8228
8241
|
);
|
|
@@ -8294,8 +8307,10 @@ var NoticeConsentView = ({
|
|
|
8294
8307
|
if ((_a2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _a2.name_audio_url) {
|
|
8295
8308
|
elementIds.push(`purpose-name-${purpose.uuid}`);
|
|
8296
8309
|
}
|
|
8297
|
-
if (
|
|
8298
|
-
elementIds.push(
|
|
8310
|
+
if (descriptionPlacement !== "hidden" && ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url)) {
|
|
8311
|
+
elementIds.push(
|
|
8312
|
+
descriptionPlacement === "always" ? `purpose-description-${purpose.uuid}` : null
|
|
8313
|
+
);
|
|
8299
8314
|
}
|
|
8300
8315
|
if (showsDataElements && purpose.data_elements && purpose.data_elements.length > 0) {
|
|
8301
8316
|
purpose.data_elements.forEach((dataElement) => {
|
|
@@ -8544,20 +8559,20 @@ var NoticeConsentView = ({
|
|
|
8544
8559
|
};
|
|
8545
8560
|
const acceptAllButtonStyle = {
|
|
8546
8561
|
...buttonStyle2,
|
|
8547
|
-
backgroundColor: ((
|
|
8548
|
-
color: ((
|
|
8562
|
+
backgroundColor: ((_j = (_i = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _i.acceptAll) == null ? void 0 : _j.backgroundColor) || ((_l = (_k = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _k.accept) == null ? void 0 : _l.backgroundColor) || (content == null ? void 0 : content.primary_color) || "#4f87ff",
|
|
8563
|
+
color: ((_n = (_m = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _m.acceptAll) == null ? void 0 : _n.textColor) || ((_p = (_o = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _o.accept) == null ? void 0 : _p.textColor) || "#ffffff"
|
|
8549
8564
|
};
|
|
8550
8565
|
const acceptSelectedButtonStyle = {
|
|
8551
8566
|
...buttonStyle2,
|
|
8552
|
-
backgroundColor: (
|
|
8553
|
-
color: (
|
|
8554
|
-
borderColor: skin ? "transparent" : (
|
|
8567
|
+
backgroundColor: (_q = appearanceColors.accept_bg) != null ? _q : skin ? skin.palette.accentWash : "#ffffff",
|
|
8568
|
+
color: (_r = appearanceColors.accept_text) != null ? _r : accentColor,
|
|
8569
|
+
borderColor: skin ? "transparent" : (_s = appearanceColors.accept_text) != null ? _s : accentColor
|
|
8555
8570
|
};
|
|
8556
8571
|
const declineButtonStyle = {
|
|
8557
8572
|
...buttonStyle2,
|
|
8558
|
-
backgroundColor: ((
|
|
8559
|
-
color: ((
|
|
8560
|
-
borderColor: (
|
|
8573
|
+
backgroundColor: ((_u = (_t = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _t.decline) == null ? void 0 : _u.backgroundColor) || (skin ? "transparent" : "#ffffff"),
|
|
8574
|
+
color: ((_w = (_v = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _v.decline) == null ? void 0 : _w.textColor) || (skin ? textColor : "#000000"),
|
|
8575
|
+
borderColor: (_x = appearanceColors.decline_border) != null ? _x : (noticeSettings == null ? void 0 : noticeSettings.borderColor) || (skin ? skin.palette.outline : "#d0d5dd")
|
|
8561
8576
|
};
|
|
8562
8577
|
const confirmHint = (0, import_react9.useMemo)(() => {
|
|
8563
8578
|
var _a2;
|
|
@@ -8638,7 +8653,7 @@ var NoticeConsentView = ({
|
|
|
8638
8653
|
[content]
|
|
8639
8654
|
);
|
|
8640
8655
|
const showNoticePolicyLink = showsNoticePolicyLink(
|
|
8641
|
-
(
|
|
8656
|
+
(_z = (_y = content == null ? void 0 : content.products) == null ? void 0 : _y.length) != null ? _z : 0,
|
|
8642
8657
|
productPolicyLinks.length
|
|
8643
8658
|
);
|
|
8644
8659
|
const handleAcceptAll = () => handleAccept("all");
|
|
@@ -8649,20 +8664,20 @@ var NoticeConsentView = ({
|
|
|
8649
8664
|
const languageSelectorStyle = {
|
|
8650
8665
|
borderRadius: hostRadius || styleRadii.button,
|
|
8651
8666
|
borderColor: (noticeSettings == null ? void 0 : noticeSettings.borderColor) || (skin ? skin.palette.hairline : "#d0d5dd"),
|
|
8652
|
-
backgroundColor: ((
|
|
8653
|
-
color: ((
|
|
8667
|
+
backgroundColor: ((_B = (_A = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _A.language) == null ? void 0 : _B.backgroundColor) || (skin ? skin.palette.control : "#ffffff"),
|
|
8668
|
+
color: ((_D = (_C = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _C.language) == null ? void 0 : _D.textColor) || (skin ? headingColor : "#344054")
|
|
8654
8669
|
};
|
|
8655
8670
|
const { borderRadius: _chipRadius, ...languageChipColors } = languageSelectorStyle;
|
|
8656
8671
|
const languageMenuStyle = skin ? {
|
|
8657
|
-
...((
|
|
8672
|
+
...((_F = (_E = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _E.language) == null ? void 0 : _F.backgroundColor) && {
|
|
8658
8673
|
backgroundColor: noticeSettings.button.language.backgroundColor
|
|
8659
8674
|
},
|
|
8660
8675
|
color: languageSelectorStyle.color
|
|
8661
8676
|
} : languageChipColors;
|
|
8662
8677
|
const selectedLanguageItemStyle = {
|
|
8663
8678
|
...languageMenuStyle,
|
|
8664
|
-
backgroundColor: ((
|
|
8665
|
-
color: ((
|
|
8679
|
+
backgroundColor: ((_H = (_G = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _G.language) == null ? void 0 : _H.selectedBackgroundColor) || (skin ? skin.palette.accentWash : "#f3f4f6"),
|
|
8680
|
+
color: ((_J = (_I = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _I.language) == null ? void 0 : _J.selectedTextColor) || (skin ? headingColor : "#344054"),
|
|
8666
8681
|
fontWeight: 600
|
|
8667
8682
|
};
|
|
8668
8683
|
const isSectionOpen = (section) => openSections[section] || isTalkbackActive;
|
|
@@ -9410,7 +9425,7 @@ var NoticeConsentView = ({
|
|
|
9410
9425
|
PurposeItem,
|
|
9411
9426
|
{
|
|
9412
9427
|
showsDataElements,
|
|
9413
|
-
|
|
9428
|
+
descriptionPlacement,
|
|
9414
9429
|
roomyControls,
|
|
9415
9430
|
purpose,
|
|
9416
9431
|
selectedPurposes,
|
|
@@ -9438,7 +9453,7 @@ var NoticeConsentView = ({
|
|
|
9438
9453
|
PurposeItem,
|
|
9439
9454
|
{
|
|
9440
9455
|
showsDataElements,
|
|
9441
|
-
|
|
9456
|
+
descriptionPlacement,
|
|
9442
9457
|
roomyControls,
|
|
9443
9458
|
purpose,
|
|
9444
9459
|
selectedPurposes,
|
|
@@ -9515,7 +9530,7 @@ var NoticeConsentView = ({
|
|
|
9515
9530
|
PurposeItem,
|
|
9516
9531
|
{
|
|
9517
9532
|
showsDataElements,
|
|
9518
|
-
|
|
9533
|
+
descriptionPlacement,
|
|
9519
9534
|
purpose,
|
|
9520
9535
|
productUuid: group.product.uuid,
|
|
9521
9536
|
selectedPurposes,
|
|
@@ -9553,7 +9568,7 @@ var NoticeConsentView = ({
|
|
|
9553
9568
|
PurposeItem,
|
|
9554
9569
|
{
|
|
9555
9570
|
showsDataElements,
|
|
9556
|
-
|
|
9571
|
+
descriptionPlacement,
|
|
9557
9572
|
roomyControls,
|
|
9558
9573
|
purpose,
|
|
9559
9574
|
selectedPurposes,
|
|
@@ -9755,8 +9770,8 @@ var NoticeConsentView = ({
|
|
|
9755
9770
|
}
|
|
9756
9771
|
),
|
|
9757
9772
|
otpLocked && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ...PART_PROPS.otp, style: styles4.otpGatePanel, children: [
|
|
9758
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles4.otpGateTitle, children: (
|
|
9759
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles4.otpGateDescription, children: (
|
|
9773
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles4.otpGateTitle, children: (_K = otpGate == null ? void 0 : otpGate.title) != null ? _K : chrome.otpTitle }),
|
|
9774
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { style: styles4.otpGateDescription, children: (_L = otpGate == null ? void 0 : otpGate.description) != null ? _L : chrome.otpDescription }),
|
|
9760
9775
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: styles4.otpGateDigits, children: Array.from({ length: OTP_GATE_LENGTH }).map(
|
|
9761
9776
|
(_, i) => {
|
|
9762
9777
|
var _a2;
|
|
@@ -9829,7 +9844,7 @@ var NoticeConsentView = ({
|
|
|
9829
9844
|
},
|
|
9830
9845
|
onClick: handleOtpConfirm,
|
|
9831
9846
|
disabled: otpBusy || otpCode.length !== OTP_GATE_LENGTH,
|
|
9832
|
-
children: otpBusy ? chrome.otpVerifying : (
|
|
9847
|
+
children: otpBusy ? chrome.otpVerifying : (_M = otpGate == null ? void 0 : otpGate.submitLabel) != null ? _M : chrome.otpSubmit
|
|
9833
9848
|
}
|
|
9834
9849
|
)
|
|
9835
9850
|
] }),
|
package/dist/index.mjs
CHANGED
|
@@ -4316,7 +4316,7 @@ var PurposeItem = ({
|
|
|
4316
4316
|
controlSkin,
|
|
4317
4317
|
rowClassName,
|
|
4318
4318
|
showsDataElements = true,
|
|
4319
|
-
|
|
4319
|
+
descriptionPlacement = "always",
|
|
4320
4320
|
animateDisclosure = false
|
|
4321
4321
|
}) => {
|
|
4322
4322
|
var _a, _b;
|
|
@@ -4343,11 +4343,30 @@ var PurposeItem = ({
|
|
|
4343
4343
|
[settings == null ? void 0 : settings.textColor]
|
|
4344
4344
|
);
|
|
4345
4345
|
const hasDataElements = showsDataElements && Boolean(purpose.data_elements) && purpose.data_elements.length > 0;
|
|
4346
|
-
const
|
|
4346
|
+
const descriptionText = getTranslatedText(
|
|
4347
|
+
`purposes.description`,
|
|
4348
|
+
purpose.description,
|
|
4349
|
+
purpose.uuid
|
|
4350
|
+
);
|
|
4351
|
+
const disclosesDescription = descriptionPlacement === "expanded" && descriptionText.trim() !== "";
|
|
4352
|
+
const hasDisclosure = hasDataElements || disclosesDescription;
|
|
4353
|
+
const dataElementsOpen = !collapsedPurposes[stateKey] && hasDisclosure;
|
|
4354
|
+
const purposeDescription = /* @__PURE__ */ jsx6(
|
|
4355
|
+
"h3",
|
|
4356
|
+
{
|
|
4357
|
+
id: `purpose-description-${stateKey}`,
|
|
4358
|
+
style: {
|
|
4359
|
+
...styles4.optionDescription,
|
|
4360
|
+
...responsiveStyles.optionDescription,
|
|
4361
|
+
...textStyle
|
|
4362
|
+
},
|
|
4363
|
+
children: descriptionText
|
|
4364
|
+
},
|
|
4365
|
+
`purpose-description-${purpose.uuid}-${selectedLanguage}`
|
|
4366
|
+
);
|
|
4347
4367
|
const dataElements = /* @__PURE__ */ jsx6(
|
|
4348
4368
|
"div",
|
|
4349
4369
|
{
|
|
4350
|
-
id: `purpose-${purpose.uuid}`,
|
|
4351
4370
|
style: {
|
|
4352
4371
|
...styles4.dataElementsContainer,
|
|
4353
4372
|
...roomyControls ? styles4.dataElementsContainerRoomy : null
|
|
@@ -4467,13 +4486,17 @@ var PurposeItem = ({
|
|
|
4467
4486
|
},
|
|
4468
4487
|
`purpose-${purpose.uuid}-container-${selectedLanguage}`
|
|
4469
4488
|
);
|
|
4489
|
+
const disclosureContents = /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
4490
|
+
disclosesDescription && purposeDescription,
|
|
4491
|
+
hasDataElements && dataElements
|
|
4492
|
+
] });
|
|
4470
4493
|
return /* @__PURE__ */ jsxs5("div", { className: rowClassName, children: [
|
|
4471
4494
|
/* @__PURE__ */ jsxs5("div", { ...PART_PROPS.purpose, style: styles4.optionItem, children: [
|
|
4472
4495
|
/* @__PURE__ */ jsxs5(
|
|
4473
4496
|
"div",
|
|
4474
4497
|
{
|
|
4475
4498
|
style: styles4.optionLeft,
|
|
4476
|
-
...
|
|
4499
|
+
...hasDisclosure && {
|
|
4477
4500
|
onClick: () => onPurposeCollapse(purpose.uuid, productUuid),
|
|
4478
4501
|
role: "button",
|
|
4479
4502
|
tabIndex: 0,
|
|
@@ -4492,7 +4515,7 @@ var PurposeItem = ({
|
|
|
4492
4515
|
}
|
|
4493
4516
|
},
|
|
4494
4517
|
children: [
|
|
4495
|
-
|
|
4518
|
+
hasDisclosure && /* @__PURE__ */ jsx6(
|
|
4496
4519
|
CollapseChevron,
|
|
4497
4520
|
{
|
|
4498
4521
|
open: !collapsedPurposes[stateKey],
|
|
@@ -4517,23 +4540,7 @@ var PurposeItem = ({
|
|
|
4517
4540
|
},
|
|
4518
4541
|
`purpose-name-${purpose.uuid}-${selectedLanguage}`
|
|
4519
4542
|
),
|
|
4520
|
-
|
|
4521
|
-
"h3",
|
|
4522
|
-
{
|
|
4523
|
-
id: `purpose-description-${stateKey}`,
|
|
4524
|
-
style: {
|
|
4525
|
-
...styles4.optionDescription,
|
|
4526
|
-
...responsiveStyles.optionDescription,
|
|
4527
|
-
...textStyle
|
|
4528
|
-
},
|
|
4529
|
-
children: getTranslatedText(
|
|
4530
|
-
`purposes.description`,
|
|
4531
|
-
purpose.description,
|
|
4532
|
-
purpose.uuid
|
|
4533
|
-
)
|
|
4534
|
-
},
|
|
4535
|
-
`purpose-description-${purpose.uuid}-${selectedLanguage}`
|
|
4536
|
-
)
|
|
4543
|
+
descriptionPlacement === "always" && purposeDescription
|
|
4537
4544
|
] })
|
|
4538
4545
|
]
|
|
4539
4546
|
}
|
|
@@ -4559,7 +4566,13 @@ var PurposeItem = ({
|
|
|
4559
4566
|
}
|
|
4560
4567
|
)
|
|
4561
4568
|
] }),
|
|
4562
|
-
|
|
4569
|
+
hasDisclosure && (animateDisclosure ? /* @__PURE__ */ jsx6(Collapse, { open: dataElementsOpen, children: /* @__PURE__ */ jsx6("div", { id: `purpose-${purpose.uuid}`, children: disclosureContents }) }) : (
|
|
4570
|
+
// The container is always drawn, empty while the row is closed:
|
|
4571
|
+
// `aria-controls` on the chevron names it, and a control that points
|
|
4572
|
+
// at an element which is not in the document is worse than no
|
|
4573
|
+
// control at all.
|
|
4574
|
+
/* @__PURE__ */ jsx6("div", { id: `purpose-${purpose.uuid}`, children: dataElementsOpen && disclosureContents })
|
|
4575
|
+
))
|
|
4563
4576
|
] }, purpose.uuid);
|
|
4564
4577
|
};
|
|
4565
4578
|
var RELATIONSHIP_OPTIONS = [
|
|
@@ -5477,7 +5490,7 @@ var NoticeConsentView = ({
|
|
|
5477
5490
|
forceMobile,
|
|
5478
5491
|
forceColorScheme
|
|
5479
5492
|
}) => {
|
|
5480
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L;
|
|
5493
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M;
|
|
5481
5494
|
const endpoints = useResolvedEndpoints(baseUrlProp, ledgerBaseUrlProp, {
|
|
5482
5495
|
warn: !previewContent
|
|
5483
5496
|
});
|
|
@@ -5555,7 +5568,7 @@ var NoticeConsentView = ({
|
|
|
5555
5568
|
const servedAppearance = content ? content.appearance : cachedAppearance;
|
|
5556
5569
|
const showsProductSection = (servedAppearance == null ? void 0 : servedAppearance.show_product_section) !== false;
|
|
5557
5570
|
const showsDataElements = (servedAppearance == null ? void 0 : servedAppearance.show_data_elements) !== false;
|
|
5558
|
-
const
|
|
5571
|
+
const descriptionPlacement = (_a = servedAppearance == null ? void 0 : servedAppearance.purpose_description) != null ? _a : "always";
|
|
5559
5572
|
const showsPurposeSectionHeading = (servedAppearance == null ? void 0 : servedAppearance.show_purpose_section_heading) !== false;
|
|
5560
5573
|
const noticeAppearance = useNoticeAppearance(
|
|
5561
5574
|
servedAppearance,
|
|
@@ -5745,8 +5758,8 @@ var NoticeConsentView = ({
|
|
|
5745
5758
|
const docked = isDocked(layout, isMobile);
|
|
5746
5759
|
const headingColor = (noticeSettings == null ? void 0 : noticeSettings.headingColor) || DEFAULT_HEADING_COLOR;
|
|
5747
5760
|
const textColor = (noticeSettings == null ? void 0 : noticeSettings.textColor) || DEFAULT_TEXT_COLOR;
|
|
5748
|
-
const classicAccentColor = ((
|
|
5749
|
-
const accentColor = (
|
|
5761
|
+
const classicAccentColor = ((_c = (_b = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _b.accept) == null ? void 0 : _c.backgroundColor) || (content == null ? void 0 : content.primary_color) || (content ? DEFAULT_ACCENT_COLOR : headingColor);
|
|
5762
|
+
const accentColor = (_f = appearanceColors.toggle_on) != null ? _f : hasNoticeSkin(appearance) ? ((_e = (_d = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _d.acceptAll) == null ? void 0 : _e.backgroundColor) || classicAccentColor : classicAccentColor;
|
|
5750
5763
|
const variantStyles = useMemo3(
|
|
5751
5764
|
() => buildVariantStyles(
|
|
5752
5765
|
styles,
|
|
@@ -5780,7 +5793,7 @@ var NoticeConsentView = ({
|
|
|
5780
5793
|
docked
|
|
5781
5794
|
]
|
|
5782
5795
|
);
|
|
5783
|
-
const textScale = NOTICE_TEXT_SCALE_FACTORS[(
|
|
5796
|
+
const textScale = NOTICE_TEXT_SCALE_FACTORS[(_g = noticeAppearance.textScale) != null ? _g : DEFAULT_TEXT_SCALE];
|
|
5784
5797
|
const styles4 = useMemo3(
|
|
5785
5798
|
() => {
|
|
5786
5799
|
var _a2;
|
|
@@ -5845,7 +5858,7 @@ var NoticeConsentView = ({
|
|
|
5845
5858
|
...otpLocked && styles4.otpGateLocked
|
|
5846
5859
|
};
|
|
5847
5860
|
const drawsSwitches = layout.switchControl;
|
|
5848
|
-
const roomyControls = drawsSwitches || ((
|
|
5861
|
+
const roomyControls = drawsSwitches || ((_h = noticeSettings == null ? void 0 : noticeSettings.selectionControl) != null ? _h : DEFAULT_SELECTION_CONTROL) !== "checkbox";
|
|
5849
5862
|
const appearanceRootProps = {
|
|
5850
5863
|
[NOTICE_ROOT_ATTRIBUTE]: "",
|
|
5851
5864
|
[NOTICE_ID_ATTRIBUTE]: noticeId,
|
|
@@ -7233,7 +7246,7 @@ var NoticeConsentView = ({
|
|
|
7233
7246
|
if ((_a2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _a2.name_audio_url) {
|
|
7234
7247
|
sequence.push(ttsAudioUrls.purposes_audio[purpose.uuid].name_audio_url);
|
|
7235
7248
|
}
|
|
7236
|
-
if (
|
|
7249
|
+
if (descriptionPlacement !== "hidden" && ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url)) {
|
|
7237
7250
|
sequence.push(
|
|
7238
7251
|
ttsAudioUrls.purposes_audio[purpose.uuid].description_audio_url
|
|
7239
7252
|
);
|
|
@@ -7305,8 +7318,10 @@ var NoticeConsentView = ({
|
|
|
7305
7318
|
if ((_a2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _a2.name_audio_url) {
|
|
7306
7319
|
elementIds.push(`purpose-name-${purpose.uuid}`);
|
|
7307
7320
|
}
|
|
7308
|
-
if (
|
|
7309
|
-
elementIds.push(
|
|
7321
|
+
if (descriptionPlacement !== "hidden" && ((_b2 = ttsAudioUrls.purposes_audio[purpose.uuid]) == null ? void 0 : _b2.description_audio_url)) {
|
|
7322
|
+
elementIds.push(
|
|
7323
|
+
descriptionPlacement === "always" ? `purpose-description-${purpose.uuid}` : null
|
|
7324
|
+
);
|
|
7310
7325
|
}
|
|
7311
7326
|
if (showsDataElements && purpose.data_elements && purpose.data_elements.length > 0) {
|
|
7312
7327
|
purpose.data_elements.forEach((dataElement) => {
|
|
@@ -7555,20 +7570,20 @@ var NoticeConsentView = ({
|
|
|
7555
7570
|
};
|
|
7556
7571
|
const acceptAllButtonStyle = {
|
|
7557
7572
|
...buttonStyle2,
|
|
7558
|
-
backgroundColor: ((
|
|
7559
|
-
color: ((
|
|
7573
|
+
backgroundColor: ((_j = (_i = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _i.acceptAll) == null ? void 0 : _j.backgroundColor) || ((_l = (_k = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _k.accept) == null ? void 0 : _l.backgroundColor) || (content == null ? void 0 : content.primary_color) || "#4f87ff",
|
|
7574
|
+
color: ((_n = (_m = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _m.acceptAll) == null ? void 0 : _n.textColor) || ((_p = (_o = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _o.accept) == null ? void 0 : _p.textColor) || "#ffffff"
|
|
7560
7575
|
};
|
|
7561
7576
|
const acceptSelectedButtonStyle = {
|
|
7562
7577
|
...buttonStyle2,
|
|
7563
|
-
backgroundColor: (
|
|
7564
|
-
color: (
|
|
7565
|
-
borderColor: skin ? "transparent" : (
|
|
7578
|
+
backgroundColor: (_q = appearanceColors.accept_bg) != null ? _q : skin ? skin.palette.accentWash : "#ffffff",
|
|
7579
|
+
color: (_r = appearanceColors.accept_text) != null ? _r : accentColor,
|
|
7580
|
+
borderColor: skin ? "transparent" : (_s = appearanceColors.accept_text) != null ? _s : accentColor
|
|
7566
7581
|
};
|
|
7567
7582
|
const declineButtonStyle = {
|
|
7568
7583
|
...buttonStyle2,
|
|
7569
|
-
backgroundColor: ((
|
|
7570
|
-
color: ((
|
|
7571
|
-
borderColor: (
|
|
7584
|
+
backgroundColor: ((_u = (_t = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _t.decline) == null ? void 0 : _u.backgroundColor) || (skin ? "transparent" : "#ffffff"),
|
|
7585
|
+
color: ((_w = (_v = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _v.decline) == null ? void 0 : _w.textColor) || (skin ? textColor : "#000000"),
|
|
7586
|
+
borderColor: (_x = appearanceColors.decline_border) != null ? _x : (noticeSettings == null ? void 0 : noticeSettings.borderColor) || (skin ? skin.palette.outline : "#d0d5dd")
|
|
7572
7587
|
};
|
|
7573
7588
|
const confirmHint = useMemo3(() => {
|
|
7574
7589
|
var _a2;
|
|
@@ -7649,7 +7664,7 @@ var NoticeConsentView = ({
|
|
|
7649
7664
|
[content]
|
|
7650
7665
|
);
|
|
7651
7666
|
const showNoticePolicyLink = showsNoticePolicyLink(
|
|
7652
|
-
(
|
|
7667
|
+
(_z = (_y = content == null ? void 0 : content.products) == null ? void 0 : _y.length) != null ? _z : 0,
|
|
7653
7668
|
productPolicyLinks.length
|
|
7654
7669
|
);
|
|
7655
7670
|
const handleAcceptAll = () => handleAccept("all");
|
|
@@ -7660,20 +7675,20 @@ var NoticeConsentView = ({
|
|
|
7660
7675
|
const languageSelectorStyle = {
|
|
7661
7676
|
borderRadius: hostRadius || styleRadii.button,
|
|
7662
7677
|
borderColor: (noticeSettings == null ? void 0 : noticeSettings.borderColor) || (skin ? skin.palette.hairline : "#d0d5dd"),
|
|
7663
|
-
backgroundColor: ((
|
|
7664
|
-
color: ((
|
|
7678
|
+
backgroundColor: ((_B = (_A = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _A.language) == null ? void 0 : _B.backgroundColor) || (skin ? skin.palette.control : "#ffffff"),
|
|
7679
|
+
color: ((_D = (_C = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _C.language) == null ? void 0 : _D.textColor) || (skin ? headingColor : "#344054")
|
|
7665
7680
|
};
|
|
7666
7681
|
const { borderRadius: _chipRadius, ...languageChipColors } = languageSelectorStyle;
|
|
7667
7682
|
const languageMenuStyle = skin ? {
|
|
7668
|
-
...((
|
|
7683
|
+
...((_F = (_E = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _E.language) == null ? void 0 : _F.backgroundColor) && {
|
|
7669
7684
|
backgroundColor: noticeSettings.button.language.backgroundColor
|
|
7670
7685
|
},
|
|
7671
7686
|
color: languageSelectorStyle.color
|
|
7672
7687
|
} : languageChipColors;
|
|
7673
7688
|
const selectedLanguageItemStyle = {
|
|
7674
7689
|
...languageMenuStyle,
|
|
7675
|
-
backgroundColor: ((
|
|
7676
|
-
color: ((
|
|
7690
|
+
backgroundColor: ((_H = (_G = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _G.language) == null ? void 0 : _H.selectedBackgroundColor) || (skin ? skin.palette.accentWash : "#f3f4f6"),
|
|
7691
|
+
color: ((_J = (_I = noticeSettings == null ? void 0 : noticeSettings.button) == null ? void 0 : _I.language) == null ? void 0 : _J.selectedTextColor) || (skin ? headingColor : "#344054"),
|
|
7677
7692
|
fontWeight: 600
|
|
7678
7693
|
};
|
|
7679
7694
|
const isSectionOpen = (section) => openSections[section] || isTalkbackActive;
|
|
@@ -8421,7 +8436,7 @@ var NoticeConsentView = ({
|
|
|
8421
8436
|
PurposeItem,
|
|
8422
8437
|
{
|
|
8423
8438
|
showsDataElements,
|
|
8424
|
-
|
|
8439
|
+
descriptionPlacement,
|
|
8425
8440
|
roomyControls,
|
|
8426
8441
|
purpose,
|
|
8427
8442
|
selectedPurposes,
|
|
@@ -8449,7 +8464,7 @@ var NoticeConsentView = ({
|
|
|
8449
8464
|
PurposeItem,
|
|
8450
8465
|
{
|
|
8451
8466
|
showsDataElements,
|
|
8452
|
-
|
|
8467
|
+
descriptionPlacement,
|
|
8453
8468
|
roomyControls,
|
|
8454
8469
|
purpose,
|
|
8455
8470
|
selectedPurposes,
|
|
@@ -8526,7 +8541,7 @@ var NoticeConsentView = ({
|
|
|
8526
8541
|
PurposeItem,
|
|
8527
8542
|
{
|
|
8528
8543
|
showsDataElements,
|
|
8529
|
-
|
|
8544
|
+
descriptionPlacement,
|
|
8530
8545
|
purpose,
|
|
8531
8546
|
productUuid: group.product.uuid,
|
|
8532
8547
|
selectedPurposes,
|
|
@@ -8564,7 +8579,7 @@ var NoticeConsentView = ({
|
|
|
8564
8579
|
PurposeItem,
|
|
8565
8580
|
{
|
|
8566
8581
|
showsDataElements,
|
|
8567
|
-
|
|
8582
|
+
descriptionPlacement,
|
|
8568
8583
|
roomyControls,
|
|
8569
8584
|
purpose,
|
|
8570
8585
|
selectedPurposes,
|
|
@@ -8766,8 +8781,8 @@ var NoticeConsentView = ({
|
|
|
8766
8781
|
}
|
|
8767
8782
|
),
|
|
8768
8783
|
otpLocked && /* @__PURE__ */ jsxs5("div", { ...PART_PROPS.otp, style: styles4.otpGatePanel, children: [
|
|
8769
|
-
/* @__PURE__ */ jsx6("p", { style: styles4.otpGateTitle, children: (
|
|
8770
|
-
/* @__PURE__ */ jsx6("p", { style: styles4.otpGateDescription, children: (
|
|
8784
|
+
/* @__PURE__ */ jsx6("p", { style: styles4.otpGateTitle, children: (_K = otpGate == null ? void 0 : otpGate.title) != null ? _K : chrome.otpTitle }),
|
|
8785
|
+
/* @__PURE__ */ jsx6("p", { style: styles4.otpGateDescription, children: (_L = otpGate == null ? void 0 : otpGate.description) != null ? _L : chrome.otpDescription }),
|
|
8771
8786
|
/* @__PURE__ */ jsx6("div", { style: styles4.otpGateDigits, children: Array.from({ length: OTP_GATE_LENGTH }).map(
|
|
8772
8787
|
(_, i) => {
|
|
8773
8788
|
var _a2;
|
|
@@ -8840,7 +8855,7 @@ var NoticeConsentView = ({
|
|
|
8840
8855
|
},
|
|
8841
8856
|
onClick: handleOtpConfirm,
|
|
8842
8857
|
disabled: otpBusy || otpCode.length !== OTP_GATE_LENGTH,
|
|
8843
|
-
children: otpBusy ? chrome.otpVerifying : (
|
|
8858
|
+
children: otpBusy ? chrome.otpVerifying : (_M = otpGate == null ? void 0 : otpGate.submitLabel) != null ? _M : chrome.otpSubmit
|
|
8844
8859
|
}
|
|
8845
8860
|
)
|
|
8846
8861
|
] }),
|
|
@@ -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-CaqLBkJt.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-CaqLBkJt.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -16,6 +16,8 @@ declare const NOTICE_BACKDROPS: readonly ["dim", "none"];
|
|
|
16
16
|
declare const NOTICE_PHONE_FOOTERS: readonly ["stacked", "paired"];
|
|
17
17
|
declare const NOTICE_TEXT_SCALES: readonly ["sm", "md", "lg"];
|
|
18
18
|
|
|
19
|
+
type PurposeDescriptionPlacement = "always" | "expanded" | "hidden";
|
|
20
|
+
|
|
19
21
|
/**
|
|
20
22
|
* Surface and layout family a notice is drawn with, chosen in the Redacto
|
|
21
23
|
* console and served on `active_config.appearance.style`. Colours never come
|
|
@@ -57,7 +59,8 @@ type NoticeAppearance = Readonly<{
|
|
|
57
59
|
show_product_section?: boolean;
|
|
58
60
|
/** Absent draws the data elements, and the chevron that opens them. */
|
|
59
61
|
show_data_elements?: boolean;
|
|
60
|
-
|
|
62
|
+
/** Where the purpose description goes. Absent draws it on the row. */
|
|
63
|
+
purpose_description?: PurposeDescriptionPlacement;
|
|
61
64
|
show_purpose_section_heading?: boolean;
|
|
62
65
|
phone_footer?: string;
|
|
63
66
|
auto_dark?: boolean;
|
|
@@ -16,6 +16,8 @@ declare const NOTICE_BACKDROPS: readonly ["dim", "none"];
|
|
|
16
16
|
declare const NOTICE_PHONE_FOOTERS: readonly ["stacked", "paired"];
|
|
17
17
|
declare const NOTICE_TEXT_SCALES: readonly ["sm", "md", "lg"];
|
|
18
18
|
|
|
19
|
+
type PurposeDescriptionPlacement = "always" | "expanded" | "hidden";
|
|
20
|
+
|
|
19
21
|
/**
|
|
20
22
|
* Surface and layout family a notice is drawn with, chosen in the Redacto
|
|
21
23
|
* console and served on `active_config.appearance.style`. Colours never come
|
|
@@ -57,7 +59,8 @@ type NoticeAppearance = Readonly<{
|
|
|
57
59
|
show_product_section?: boolean;
|
|
58
60
|
/** Absent draws the data elements, and the chevron that opens them. */
|
|
59
61
|
show_data_elements?: boolean;
|
|
60
|
-
|
|
62
|
+
/** Where the purpose description goes. Absent draws it on the row. */
|
|
63
|
+
purpose_description?: PurposeDescriptionPlacement;
|
|
61
64
|
show_purpose_section_heading?: boolean;
|
|
62
65
|
phone_footer?: string;
|
|
63
66
|
auto_dark?: boolean;
|