@redacto.io/consent-sdk-react 10.2.1 → 10.2.2-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 +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +1262 -807
- package/dist/index.mjs +1147 -692
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
|
|
20
20
|
// src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
|
|
21
21
|
import {
|
|
22
|
-
useCallback,
|
|
23
|
-
useEffect as
|
|
22
|
+
useCallback as useCallback3,
|
|
23
|
+
useEffect as useEffect4,
|
|
24
24
|
useMemo as useMemo2,
|
|
25
|
-
useRef,
|
|
25
|
+
useRef as useRef3,
|
|
26
26
|
useState
|
|
27
27
|
} from "react";
|
|
28
28
|
|
|
@@ -589,6 +589,8 @@ var redacto_logo_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATkAAA
|
|
|
589
589
|
var DEFAULT_LOGO_POSITION = "left";
|
|
590
590
|
var DEFAULT_PURPOSE_PRESELECTION = "NONE";
|
|
591
591
|
var PURPOSE_STATUS_INACTIVE = "INACTIVE";
|
|
592
|
+
var PURPOSE_STATUS_ACTIVE = "ACTIVE";
|
|
593
|
+
var PURPOSE_STATUS_EXPIRED = "EXPIRED";
|
|
592
594
|
var DEFAULT_ACCEPT_ALL_BUTTON_TEXT = "Accept All";
|
|
593
595
|
var DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT = "Accept Selected";
|
|
594
596
|
var DEFAULT_DECLINE_BUTTON_TEXT = "Decline";
|
|
@@ -625,6 +627,47 @@ var PRODUCT_SECTION_COPY = {
|
|
|
625
627
|
toggleRequired: (productName, purposeCount) => `Toggle the ${purposeCount} required purposes for ${productName}`,
|
|
626
628
|
settled: (productName) => `Already consented to ${productName}`
|
|
627
629
|
};
|
|
630
|
+
var CONFIRM_HINT_ID = "redacto-confirm-hint";
|
|
631
|
+
var CONFIRM_HINT_COPY = {
|
|
632
|
+
"nothing-chosen": "Select at least one purpose to confirm.",
|
|
633
|
+
"nothing-engaged": "Select or change a purpose for the product you are consenting to.",
|
|
634
|
+
"required-outstanding": "Accept the required purposes to confirm.",
|
|
635
|
+
productsIncomplete: (productNames) => `Accept the required purposes for ${productNames.join(", ")} to confirm.`
|
|
636
|
+
};
|
|
637
|
+
var DEFAULT_SELECTION_CONTROL = "checkbox";
|
|
638
|
+
var SELECTION_CONTROL_ACCENT = "#4f87ff";
|
|
639
|
+
var SELECTION_CONTROL_COPY = {
|
|
640
|
+
/**
|
|
641
|
+
* What the server already holds for a row. Read out beside the control, not
|
|
642
|
+
* folded into an option label -- in a dropdown that text is on screen, and a
|
|
643
|
+
* list reading "Yes (your current answer)" is worse than no cue at all.
|
|
644
|
+
*/
|
|
645
|
+
onRecord: (answer) => `Saved answer: ${answer}`,
|
|
646
|
+
/** The dropdown's resting state on a partly answered product section. */
|
|
647
|
+
mixed: "Mixed",
|
|
648
|
+
options: [
|
|
649
|
+
{ label: "Yes", value: true },
|
|
650
|
+
{ label: "No", value: false }
|
|
651
|
+
]
|
|
652
|
+
};
|
|
653
|
+
var CONFIRM_DIALOG_ID = "redacto-confirm-dialog";
|
|
654
|
+
var CONFIRM_DIALOG_DETAIL_ID = "redacto-confirm-dialog-detail";
|
|
655
|
+
var CONFIRM_DIALOG_COPY = {
|
|
656
|
+
"accept-all": {
|
|
657
|
+
title: "Accept every purpose?",
|
|
658
|
+
detail: "This agrees to all purposes on this notice, including any you left unselected."
|
|
659
|
+
},
|
|
660
|
+
"accept-selected": {
|
|
661
|
+
title: "Confirm your selections?",
|
|
662
|
+
detail: "Only the purposes you selected are recorded as agreed. The rest are recorded as not agreed."
|
|
663
|
+
},
|
|
664
|
+
decline: {
|
|
665
|
+
title: "Decline this notice?",
|
|
666
|
+
detail: "Nothing is recorded as agreed, including any purposes you selected."
|
|
667
|
+
},
|
|
668
|
+
confirm: "Yes",
|
|
669
|
+
cancel: "No"
|
|
670
|
+
};
|
|
628
671
|
|
|
629
672
|
// src/RedactoNoticeConsent/styles.ts
|
|
630
673
|
var styles = {
|
|
@@ -986,6 +1029,15 @@ var styles = {
|
|
|
986
1029
|
margin: 0,
|
|
987
1030
|
boxSizing: "border-box"
|
|
988
1031
|
},
|
|
1032
|
+
/** Sits above the footer, which is a bare fragment of three flex children. */
|
|
1033
|
+
confirmHint: {
|
|
1034
|
+
fontSize: "13px",
|
|
1035
|
+
lineHeight: "18px",
|
|
1036
|
+
color: "#6b6b6b",
|
|
1037
|
+
margin: 0,
|
|
1038
|
+
paddingTop: "12px",
|
|
1039
|
+
boxSizing: "border-box"
|
|
1040
|
+
},
|
|
989
1041
|
actionButtonStack: {
|
|
990
1042
|
display: "flex",
|
|
991
1043
|
flexDirection: "column",
|
|
@@ -1127,6 +1179,7 @@ var DISABLED_OPACITY = 0.5;
|
|
|
1127
1179
|
var NoticeFooter = ({
|
|
1128
1180
|
labels,
|
|
1129
1181
|
acceptSelectedDisabled,
|
|
1182
|
+
acceptSelectedHintId,
|
|
1130
1183
|
isSubmittingAccept,
|
|
1131
1184
|
isSubmittingDecline,
|
|
1132
1185
|
isMobile,
|
|
@@ -1177,6 +1230,7 @@ var NoticeFooter = ({
|
|
|
1177
1230
|
onClick: onAcceptSelected,
|
|
1178
1231
|
disabled: acceptSelectedDisabled || isSubmittingDecline,
|
|
1179
1232
|
"aria-label": labels.acceptSelected,
|
|
1233
|
+
"aria-describedby": acceptSelectedHintId,
|
|
1180
1234
|
children: isSubmittingAccept ? SUBMITTING_BUTTON_TEXT : labels.acceptSelected
|
|
1181
1235
|
}
|
|
1182
1236
|
);
|
|
@@ -1213,6 +1267,335 @@ var NoticeFooter = ({
|
|
|
1213
1267
|
] });
|
|
1214
1268
|
};
|
|
1215
1269
|
|
|
1270
|
+
// src/RedactoNoticeConsent/components/ConfirmDialog.tsx
|
|
1271
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
1272
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1273
|
+
var overlayStyle = {
|
|
1274
|
+
// fixed, not absolute: the notice root is not a positioned ancestor on
|
|
1275
|
+
// every surface, and a mispositioned overlay would leave the buttons live.
|
|
1276
|
+
position: "fixed",
|
|
1277
|
+
inset: 0,
|
|
1278
|
+
backgroundColor: "rgba(16, 24, 40, 0.45)",
|
|
1279
|
+
display: "flex",
|
|
1280
|
+
alignItems: "center",
|
|
1281
|
+
justifyContent: "center",
|
|
1282
|
+
padding: "24px",
|
|
1283
|
+
zIndex: 2147483647
|
|
1284
|
+
};
|
|
1285
|
+
var panelStyle = {
|
|
1286
|
+
backgroundColor: "#ffffff",
|
|
1287
|
+
borderRadius: "12px",
|
|
1288
|
+
padding: "24px",
|
|
1289
|
+
maxWidth: "380px",
|
|
1290
|
+
width: "100%",
|
|
1291
|
+
boxShadow: "0 12px 32px rgba(16, 24, 40, 0.18)"
|
|
1292
|
+
};
|
|
1293
|
+
var titleStyle = {
|
|
1294
|
+
margin: "0 0 8px",
|
|
1295
|
+
fontSize: "16px",
|
|
1296
|
+
lineHeight: "24px",
|
|
1297
|
+
fontWeight: 600,
|
|
1298
|
+
color: "#101828"
|
|
1299
|
+
};
|
|
1300
|
+
var detailStyle = {
|
|
1301
|
+
margin: "0 0 20px",
|
|
1302
|
+
fontSize: "14px",
|
|
1303
|
+
lineHeight: "20px",
|
|
1304
|
+
color: "#475467"
|
|
1305
|
+
};
|
|
1306
|
+
var actionsStyle = {
|
|
1307
|
+
display: "flex",
|
|
1308
|
+
gap: "12px",
|
|
1309
|
+
justifyContent: "flex-end"
|
|
1310
|
+
};
|
|
1311
|
+
var buttonStyle = {
|
|
1312
|
+
borderRadius: "8px",
|
|
1313
|
+
padding: "8px 20px",
|
|
1314
|
+
fontSize: "14px",
|
|
1315
|
+
lineHeight: "20px",
|
|
1316
|
+
cursor: "pointer",
|
|
1317
|
+
border: "1px solid #d0d5dd",
|
|
1318
|
+
backgroundColor: "#ffffff",
|
|
1319
|
+
color: "#344054"
|
|
1320
|
+
};
|
|
1321
|
+
var ConfirmDialog = ({
|
|
1322
|
+
action,
|
|
1323
|
+
onConfirm,
|
|
1324
|
+
onCancel,
|
|
1325
|
+
confirmStyle
|
|
1326
|
+
}) => {
|
|
1327
|
+
const cancelRef = useRef(null);
|
|
1328
|
+
const panelRef = useRef(null);
|
|
1329
|
+
const openerRef = useRef(null);
|
|
1330
|
+
useEffect(() => {
|
|
1331
|
+
var _a;
|
|
1332
|
+
openerRef.current = document.activeElement;
|
|
1333
|
+
(_a = cancelRef.current) == null ? void 0 : _a.focus();
|
|
1334
|
+
}, []);
|
|
1335
|
+
const cancel = useCallback(() => {
|
|
1336
|
+
const opener = openerRef.current;
|
|
1337
|
+
onCancel();
|
|
1338
|
+
if (opener instanceof HTMLElement) opener.focus();
|
|
1339
|
+
}, [onCancel]);
|
|
1340
|
+
useEffect(() => {
|
|
1341
|
+
const onKeyDown = (event) => {
|
|
1342
|
+
if (event.key === "Escape") {
|
|
1343
|
+
cancel();
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
if (event.key !== "Tab" || !panelRef.current) return;
|
|
1347
|
+
const focusable = panelRef.current.querySelectorAll("button");
|
|
1348
|
+
if (focusable.length === 0) return;
|
|
1349
|
+
const first = focusable[0];
|
|
1350
|
+
const last = focusable[focusable.length - 1];
|
|
1351
|
+
if (event.shiftKey && document.activeElement === first) {
|
|
1352
|
+
event.preventDefault();
|
|
1353
|
+
last.focus();
|
|
1354
|
+
return;
|
|
1355
|
+
}
|
|
1356
|
+
if (!event.shiftKey && document.activeElement === last) {
|
|
1357
|
+
event.preventDefault();
|
|
1358
|
+
first.focus();
|
|
1359
|
+
}
|
|
1360
|
+
};
|
|
1361
|
+
document.addEventListener("keydown", onKeyDown);
|
|
1362
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
1363
|
+
}, [cancel]);
|
|
1364
|
+
return /* @__PURE__ */ jsx2("div", { style: overlayStyle, children: /* @__PURE__ */ jsxs2(
|
|
1365
|
+
"div",
|
|
1366
|
+
{
|
|
1367
|
+
ref: panelRef,
|
|
1368
|
+
role: "dialog",
|
|
1369
|
+
"aria-modal": "true",
|
|
1370
|
+
"aria-labelledby": CONFIRM_DIALOG_ID,
|
|
1371
|
+
"aria-describedby": CONFIRM_DIALOG_DETAIL_ID,
|
|
1372
|
+
style: panelStyle,
|
|
1373
|
+
children: [
|
|
1374
|
+
/* @__PURE__ */ jsx2("p", { id: CONFIRM_DIALOG_ID, style: titleStyle, children: CONFIRM_DIALOG_COPY[action].title }),
|
|
1375
|
+
/* @__PURE__ */ jsx2("p", { id: CONFIRM_DIALOG_DETAIL_ID, style: detailStyle, children: CONFIRM_DIALOG_COPY[action].detail }),
|
|
1376
|
+
/* @__PURE__ */ jsxs2("div", { style: actionsStyle, children: [
|
|
1377
|
+
/* @__PURE__ */ jsx2(
|
|
1378
|
+
"button",
|
|
1379
|
+
{
|
|
1380
|
+
ref: cancelRef,
|
|
1381
|
+
type: "button",
|
|
1382
|
+
onClick: cancel,
|
|
1383
|
+
style: buttonStyle,
|
|
1384
|
+
children: CONFIRM_DIALOG_COPY.cancel
|
|
1385
|
+
}
|
|
1386
|
+
),
|
|
1387
|
+
/* @__PURE__ */ jsx2(
|
|
1388
|
+
"button",
|
|
1389
|
+
{
|
|
1390
|
+
type: "button",
|
|
1391
|
+
onClick: onConfirm,
|
|
1392
|
+
style: { ...buttonStyle, ...confirmStyle },
|
|
1393
|
+
children: CONFIRM_DIALOG_COPY.confirm
|
|
1394
|
+
}
|
|
1395
|
+
)
|
|
1396
|
+
] })
|
|
1397
|
+
]
|
|
1398
|
+
}
|
|
1399
|
+
) });
|
|
1400
|
+
};
|
|
1401
|
+
|
|
1402
|
+
// src/RedactoNoticeConsent/components/SelectionControl.tsx
|
|
1403
|
+
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
1404
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1405
|
+
var groupStyle = {
|
|
1406
|
+
display: "flex",
|
|
1407
|
+
alignItems: "center",
|
|
1408
|
+
gap: "12px",
|
|
1409
|
+
flexShrink: 0
|
|
1410
|
+
};
|
|
1411
|
+
var optionStyle = {
|
|
1412
|
+
display: "flex",
|
|
1413
|
+
alignItems: "center",
|
|
1414
|
+
gap: "4px",
|
|
1415
|
+
cursor: "pointer",
|
|
1416
|
+
whiteSpace: "nowrap"
|
|
1417
|
+
};
|
|
1418
|
+
var SIZES = {
|
|
1419
|
+
large: {
|
|
1420
|
+
option: { fontSize: "14px", fontWeight: 500 },
|
|
1421
|
+
radio: { width: "17px", height: "17px" },
|
|
1422
|
+
select: { fontSize: "13px", padding: "6px 8px", fontWeight: 500 },
|
|
1423
|
+
slot: "68px",
|
|
1424
|
+
gap: "10px",
|
|
1425
|
+
tick: { box: 20, glyph: 12 }
|
|
1426
|
+
},
|
|
1427
|
+
small: {
|
|
1428
|
+
option: { fontSize: "12px", fontWeight: 400 },
|
|
1429
|
+
radio: { width: "13px", height: "13px" },
|
|
1430
|
+
select: { fontSize: "12px", padding: "5px 8px", fontWeight: 400 },
|
|
1431
|
+
slot: "62px",
|
|
1432
|
+
gap: "8px",
|
|
1433
|
+
tick: { box: 17, glyph: 10 }
|
|
1434
|
+
}
|
|
1435
|
+
};
|
|
1436
|
+
var dropdownWrapStyle = {
|
|
1437
|
+
display: "inline-flex",
|
|
1438
|
+
alignItems: "center",
|
|
1439
|
+
justifyContent: "flex-end",
|
|
1440
|
+
flexShrink: 0
|
|
1441
|
+
};
|
|
1442
|
+
var settledAnswerStyle = {
|
|
1443
|
+
display: "inline-flex",
|
|
1444
|
+
alignItems: "center",
|
|
1445
|
+
justifyContent: "flex-end",
|
|
1446
|
+
color: "#667085",
|
|
1447
|
+
whiteSpace: "nowrap"
|
|
1448
|
+
};
|
|
1449
|
+
var selectStyle = {
|
|
1450
|
+
border: "1px solid #d0d5dd",
|
|
1451
|
+
borderRadius: "6px",
|
|
1452
|
+
// Explicit, so the box does not follow the font metrics of whatever face the
|
|
1453
|
+
// notice is themed with -- that is what made it read as a strip.
|
|
1454
|
+
lineHeight: "18px",
|
|
1455
|
+
boxSizing: "border-box",
|
|
1456
|
+
cursor: "pointer",
|
|
1457
|
+
backgroundColor: "#ffffff",
|
|
1458
|
+
color: "#344054",
|
|
1459
|
+
flexShrink: 0
|
|
1460
|
+
};
|
|
1461
|
+
var lockedBadgeStyle = (box) => ({
|
|
1462
|
+
display: "flex",
|
|
1463
|
+
alignItems: "center",
|
|
1464
|
+
justifyContent: "center",
|
|
1465
|
+
width: `${box}px`,
|
|
1466
|
+
height: `${box}px`,
|
|
1467
|
+
borderRadius: "50%",
|
|
1468
|
+
flexShrink: 0,
|
|
1469
|
+
boxSizing: "border-box",
|
|
1470
|
+
backgroundColor: "#10B981",
|
|
1471
|
+
marginLeft: "12px"
|
|
1472
|
+
});
|
|
1473
|
+
var LockedTick = ({ label, box, glyph }) => /* @__PURE__ */ jsx3("div", { role: "img", style: lockedBadgeStyle(box), "aria-label": label, children: /* @__PURE__ */ jsx3(
|
|
1474
|
+
"svg",
|
|
1475
|
+
{
|
|
1476
|
+
width: glyph,
|
|
1477
|
+
height: glyph,
|
|
1478
|
+
viewBox: "0 0 12 12",
|
|
1479
|
+
fill: "none",
|
|
1480
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1481
|
+
"aria-hidden": "true",
|
|
1482
|
+
children: /* @__PURE__ */ jsx3(
|
|
1483
|
+
"path",
|
|
1484
|
+
{
|
|
1485
|
+
d: "M4 6L5.5 7.5L8.5 4.5",
|
|
1486
|
+
stroke: "white",
|
|
1487
|
+
strokeWidth: "2",
|
|
1488
|
+
strokeLinecap: "round",
|
|
1489
|
+
strokeLinejoin: "round"
|
|
1490
|
+
}
|
|
1491
|
+
)
|
|
1492
|
+
}
|
|
1493
|
+
) });
|
|
1494
|
+
var SelectionControl = ({
|
|
1495
|
+
control,
|
|
1496
|
+
checked,
|
|
1497
|
+
indeterminate = false,
|
|
1498
|
+
onSelect,
|
|
1499
|
+
label,
|
|
1500
|
+
groupName,
|
|
1501
|
+
className,
|
|
1502
|
+
locked = false,
|
|
1503
|
+
lockedLabel,
|
|
1504
|
+
recordedAnswer,
|
|
1505
|
+
size = "large"
|
|
1506
|
+
}) => {
|
|
1507
|
+
const scale = SIZES[size];
|
|
1508
|
+
const boxClass = className != null ? className : size === "small" ? "redacto-checkbox-medium" : "redacto-checkbox-large";
|
|
1509
|
+
const checkboxRef = useRef2(null);
|
|
1510
|
+
useEffect2(() => {
|
|
1511
|
+
if (checkboxRef.current) {
|
|
1512
|
+
checkboxRef.current.indeterminate = indeterminate;
|
|
1513
|
+
}
|
|
1514
|
+
}, [indeterminate]);
|
|
1515
|
+
const select = useCallback2(
|
|
1516
|
+
(next) => {
|
|
1517
|
+
if (indeterminate || next !== checked) onSelect(next);
|
|
1518
|
+
},
|
|
1519
|
+
[checked, indeterminate, onSelect]
|
|
1520
|
+
);
|
|
1521
|
+
const held = (value) => locked ? value : !indeterminate && checked === value;
|
|
1522
|
+
const onRecord = (value) => recordedAnswer === value;
|
|
1523
|
+
const optionLabel = (label2, value) => onRecord(value) ? `${label2} ${SELECTION_CONTROL_COPY.onRecord(label2)}` : label2;
|
|
1524
|
+
if (locked && control === "checkbox") {
|
|
1525
|
+
return /* @__PURE__ */ jsx3(
|
|
1526
|
+
LockedTick,
|
|
1527
|
+
{
|
|
1528
|
+
label: lockedLabel,
|
|
1529
|
+
box: scale.tick.box,
|
|
1530
|
+
glyph: scale.tick.glyph
|
|
1531
|
+
}
|
|
1532
|
+
);
|
|
1533
|
+
}
|
|
1534
|
+
if (control === "radio") {
|
|
1535
|
+
return /* @__PURE__ */ jsx3(
|
|
1536
|
+
"div",
|
|
1537
|
+
{
|
|
1538
|
+
role: "radiogroup",
|
|
1539
|
+
"aria-label": locked ? lockedLabel : label,
|
|
1540
|
+
style: { ...groupStyle, gap: scale.gap },
|
|
1541
|
+
children: SELECTION_CONTROL_COPY.options.map((option) => /* @__PURE__ */ jsxs3("label", { style: { ...optionStyle, ...scale.option }, children: [
|
|
1542
|
+
/* @__PURE__ */ jsx3(
|
|
1543
|
+
"input",
|
|
1544
|
+
{
|
|
1545
|
+
type: "radio",
|
|
1546
|
+
name: groupName,
|
|
1547
|
+
checked: held(option.value),
|
|
1548
|
+
disabled: locked,
|
|
1549
|
+
onChange: () => select(option.value),
|
|
1550
|
+
style: { accentColor: SELECTION_CONTROL_ACCENT, ...scale.radio },
|
|
1551
|
+
"aria-label": optionLabel(option.label, option.value)
|
|
1552
|
+
}
|
|
1553
|
+
),
|
|
1554
|
+
option.label
|
|
1555
|
+
] }, option.label))
|
|
1556
|
+
}
|
|
1557
|
+
);
|
|
1558
|
+
}
|
|
1559
|
+
if (control === "dropdown") {
|
|
1560
|
+
if (locked) {
|
|
1561
|
+
return /* @__PURE__ */ jsx3(
|
|
1562
|
+
"span",
|
|
1563
|
+
{
|
|
1564
|
+
role: "img",
|
|
1565
|
+
"aria-label": lockedLabel,
|
|
1566
|
+
style: { ...settledAnswerStyle, ...scale.select, width: scale.slot },
|
|
1567
|
+
children: SELECTION_CONTROL_COPY.options[0].label
|
|
1568
|
+
}
|
|
1569
|
+
);
|
|
1570
|
+
}
|
|
1571
|
+
return /* @__PURE__ */ jsx3("span", { style: { ...dropdownWrapStyle, width: scale.slot }, children: /* @__PURE__ */ jsxs3(
|
|
1572
|
+
"select",
|
|
1573
|
+
{
|
|
1574
|
+
"aria-label": locked ? lockedLabel : label,
|
|
1575
|
+
disabled: locked,
|
|
1576
|
+
value: indeterminate ? "" : String(held(true)),
|
|
1577
|
+
onChange: (event) => select(event.target.value === "true"),
|
|
1578
|
+
style: { ...selectStyle, ...scale.select, width: "100%" },
|
|
1579
|
+
children: [
|
|
1580
|
+
indeterminate && /* @__PURE__ */ jsx3("option", { value: "", disabled: true, children: SELECTION_CONTROL_COPY.mixed }),
|
|
1581
|
+
SELECTION_CONTROL_COPY.options.map((option) => /* @__PURE__ */ jsx3("option", { value: String(option.value), children: option.label }, option.label))
|
|
1582
|
+
]
|
|
1583
|
+
}
|
|
1584
|
+
) });
|
|
1585
|
+
}
|
|
1586
|
+
return /* @__PURE__ */ jsx3(
|
|
1587
|
+
"input",
|
|
1588
|
+
{
|
|
1589
|
+
ref: checkboxRef,
|
|
1590
|
+
className: boxClass,
|
|
1591
|
+
type: "checkbox",
|
|
1592
|
+
checked,
|
|
1593
|
+
onChange: () => select(!checked),
|
|
1594
|
+
"aria-label": label
|
|
1595
|
+
}
|
|
1596
|
+
);
|
|
1597
|
+
};
|
|
1598
|
+
|
|
1216
1599
|
// src/shared/productMatrix.ts
|
|
1217
1600
|
var productPurposeKey = (productUuid, purposeUuid) => productUuid ? `${productUuid}:${purposeUuid}` : purposeUuid;
|
|
1218
1601
|
var purposeCoversProduct = (purpose, productUuid) => {
|
|
@@ -1221,6 +1604,14 @@ var purposeCoversProduct = (purpose, productUuid) => {
|
|
|
1221
1604
|
return scope.includes(productUuid);
|
|
1222
1605
|
};
|
|
1223
1606
|
var isMultiProduct = (products) => Boolean(products && products.length > 1);
|
|
1607
|
+
var purposeNamesProduct = (purpose, productUuid) => {
|
|
1608
|
+
var _a;
|
|
1609
|
+
return Boolean((_a = purpose.product_uuids) == null ? void 0 : _a.includes(productUuid));
|
|
1610
|
+
};
|
|
1611
|
+
var noticeScopesPurposes = (purposes) => purposes.some((purpose) => {
|
|
1612
|
+
var _a, _b;
|
|
1613
|
+
return ((_b = (_a = purpose.product_uuids) == null ? void 0 : _a.length) != null ? _b : 0) > 0;
|
|
1614
|
+
});
|
|
1224
1615
|
var serverMarksMandatoryProducts = (products) => Boolean(
|
|
1225
1616
|
products && products.length > 0 && products.every((product) => product.mandatory !== void 0)
|
|
1226
1617
|
);
|
|
@@ -1231,17 +1622,19 @@ var rowProductUuid = (row, products) => {
|
|
|
1231
1622
|
var _a;
|
|
1232
1623
|
return (_a = row.productUuid) != null ? _a : (products == null ? void 0 : products.length) === 1 ? products[0].uuid : void 0;
|
|
1233
1624
|
};
|
|
1234
|
-
var
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1625
|
+
var mandatoryProductsFirst = (products) => {
|
|
1626
|
+
const mandatory = products.filter((product) => product.mandatory === true);
|
|
1627
|
+
if (mandatory.length === 0 || mandatory.length === products.length) {
|
|
1628
|
+
return products;
|
|
1629
|
+
}
|
|
1630
|
+
return [
|
|
1631
|
+
...mandatory,
|
|
1632
|
+
...products.filter((product) => product.mandatory !== true)
|
|
1633
|
+
];
|
|
1241
1634
|
};
|
|
1242
1635
|
var groupPurposesByProduct = (products, purposes, order) => {
|
|
1243
1636
|
if (!products || products.length === 0) return [];
|
|
1244
|
-
return products.map((product) => {
|
|
1637
|
+
return mandatoryProductsFirst(products).map((product) => {
|
|
1245
1638
|
const covered = purposes.filter(
|
|
1246
1639
|
(purpose) => purposeCoversProduct(purpose, product.uuid)
|
|
1247
1640
|
);
|
|
@@ -1337,8 +1730,8 @@ var buildPreselection = (purposes, mode) => {
|
|
|
1337
1730
|
});
|
|
1338
1731
|
return { selectedPurposes, selectedDataElements };
|
|
1339
1732
|
};
|
|
1340
|
-
var hasRequiredDataElement = (purpose) => purpose.data_elements.some((element) => element.required);
|
|
1341
1733
|
var isBlockingRequiredElement = (element) => element.required && element.enabled;
|
|
1734
|
+
var hasRequiredDataElement = (purpose) => purpose.data_elements.some(isBlockingRequiredElement);
|
|
1342
1735
|
|
|
1343
1736
|
// src/RedactoNoticeConsent/layout.ts
|
|
1344
1737
|
var resolveLogoPosition = (raw) => raw === "center" || raw === "right" ? raw : DEFAULT_LOGO_POSITION;
|
|
@@ -1451,6 +1844,25 @@ var injectCheckboxStyles = () => {
|
|
|
1451
1844
|
padding: 4px !important;
|
|
1452
1845
|
}
|
|
1453
1846
|
|
|
1847
|
+
/* Purpose rows sit between the product heading and a data element, so the
|
|
1848
|
+
three levels read as three levels rather than two sizes and an indent. */
|
|
1849
|
+
.redacto-checkbox-medium {
|
|
1850
|
+
appearance: none !important;
|
|
1851
|
+
-webkit-appearance: none !important;
|
|
1852
|
+
-moz-appearance: none !important;
|
|
1853
|
+
height: 17px !important;
|
|
1854
|
+
width: 17px !important;
|
|
1855
|
+
border: 2px solid #d0d5dd !important;
|
|
1856
|
+
border-radius: 5px !important;
|
|
1857
|
+
background-color: transparent !important;
|
|
1858
|
+
cursor: pointer !important;
|
|
1859
|
+
position: relative !important;
|
|
1860
|
+
box-sizing: border-box !important;
|
|
1861
|
+
flex-shrink: 0 !important;
|
|
1862
|
+
margin: 0 !important;
|
|
1863
|
+
padding: 4px !important;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1454
1866
|
.redacto-checkbox-small {
|
|
1455
1867
|
appearance: none !important;
|
|
1456
1868
|
-webkit-appearance: none !important;
|
|
@@ -1473,12 +1885,18 @@ var injectCheckboxStyles = () => {
|
|
|
1473
1885
|
border-color: #4f87ff !important;
|
|
1474
1886
|
}
|
|
1475
1887
|
|
|
1888
|
+
.redacto-checkbox-medium:checked {
|
|
1889
|
+
background-color: #4f87ff !important;
|
|
1890
|
+
border-color: #4f87ff !important;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1476
1893
|
.redacto-checkbox-small:checked {
|
|
1477
1894
|
background-color: #4f87ff !important;
|
|
1478
1895
|
border-color: #4f87ff !important;
|
|
1479
1896
|
}
|
|
1480
1897
|
|
|
1481
|
-
.redacto-checkbox-large:checked::after
|
|
1898
|
+
.redacto-checkbox-large:checked::after,
|
|
1899
|
+
.redacto-checkbox-medium:checked::after {
|
|
1482
1900
|
content: '' !important;
|
|
1483
1901
|
position: absolute !important;
|
|
1484
1902
|
left: 50% !important;
|
|
@@ -1504,7 +1922,8 @@ var injectCheckboxStyles = () => {
|
|
|
1504
1922
|
box-sizing: border-box !important;
|
|
1505
1923
|
}
|
|
1506
1924
|
|
|
1507
|
-
.redacto-checkbox-large:focus
|
|
1925
|
+
.redacto-checkbox-large:focus,
|
|
1926
|
+
.redacto-checkbox-medium:focus {
|
|
1508
1927
|
outline: 2px solid #4f87ff !important;
|
|
1509
1928
|
outline-offset: 2px !important;
|
|
1510
1929
|
}
|
|
@@ -1568,13 +1987,13 @@ var injectCheckboxStyles = () => {
|
|
|
1568
1987
|
};
|
|
1569
1988
|
|
|
1570
1989
|
// src/shared/RequiredMarker.tsx
|
|
1571
|
-
import { jsx as
|
|
1990
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1572
1991
|
var RequiredMarker = ({
|
|
1573
1992
|
label = REQUIRED_MARKER_ARIA_LABEL
|
|
1574
|
-
}) => /* @__PURE__ */
|
|
1993
|
+
}) => /* @__PURE__ */ jsx4("span", { style: REQUIRED_MARKER_STYLE, "aria-label": label, children: REQUIRED_MARKER_GLYPH });
|
|
1575
1994
|
|
|
1576
1995
|
// src/shared/useNoticeFont.ts
|
|
1577
|
-
import { useEffect, useMemo } from "react";
|
|
1996
|
+
import { useEffect as useEffect3, useMemo } from "react";
|
|
1578
1997
|
|
|
1579
1998
|
// src/shared/fonts/font-sources.generated.ts
|
|
1580
1999
|
var NOTICE_FONT_SOURCE_IMPORTS = {
|
|
@@ -1679,10 +2098,10 @@ var useNoticeFont = ({
|
|
|
1679
2098
|
() => resolveNoticeFontFamily({ hostFont, noticeFont }),
|
|
1680
2099
|
[hostFont, noticeFont]
|
|
1681
2100
|
);
|
|
1682
|
-
|
|
2101
|
+
useEffect3(() => {
|
|
1683
2102
|
injectNoticeFontStyles();
|
|
1684
2103
|
}, []);
|
|
1685
|
-
|
|
2104
|
+
useEffect3(() => {
|
|
1686
2105
|
const controller = new AbortController();
|
|
1687
2106
|
void loadNoticeWebfont(fontFamily, controller.signal);
|
|
1688
2107
|
return () => controller.abort();
|
|
@@ -1754,7 +2173,7 @@ var updateConsentState = (updates) => {
|
|
|
1754
2173
|
};
|
|
1755
2174
|
|
|
1756
2175
|
// src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
|
|
1757
|
-
import { Fragment as Fragment2, jsx as
|
|
2176
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1758
2177
|
var DEFAULT_HEADING_COLOR = "#323B4B";
|
|
1759
2178
|
var CHEVRON_BUTTON_STYLE = {
|
|
1760
2179
|
background: "none",
|
|
@@ -1781,7 +2200,7 @@ var reviewIndicatorStyle = (size) => ({
|
|
|
1781
2200
|
flexShrink: 0,
|
|
1782
2201
|
boxSizing: "border-box"
|
|
1783
2202
|
});
|
|
1784
|
-
var CollapseChevron = ({ open, color }) => /* @__PURE__ */
|
|
2203
|
+
var CollapseChevron = ({ open, color }) => /* @__PURE__ */ jsx5("div", { style: CHEVRON_WRAPPER_STYLE, children: /* @__PURE__ */ jsx5(
|
|
1785
2204
|
"svg",
|
|
1786
2205
|
{
|
|
1787
2206
|
width: "7",
|
|
@@ -1798,7 +2217,7 @@ var CollapseChevron = ({ open, color }) => /* @__PURE__ */ jsx3("div", { style:
|
|
|
1798
2217
|
transition: "transform 0.3s ease"
|
|
1799
2218
|
},
|
|
1800
2219
|
"aria-hidden": "true",
|
|
1801
|
-
children: /* @__PURE__ */
|
|
2220
|
+
children: /* @__PURE__ */ jsx5("path", { d: "M1 1L6 6L1 11" })
|
|
1802
2221
|
}
|
|
1803
2222
|
) });
|
|
1804
2223
|
var ProductSectionHeader = ({
|
|
@@ -1817,23 +2236,18 @@ var ProductSectionHeader = ({
|
|
|
1817
2236
|
onToggleSelect,
|
|
1818
2237
|
getTranslatedText
|
|
1819
2238
|
}) => {
|
|
1820
|
-
|
|
2239
|
+
var _a;
|
|
1821
2240
|
const name = getTranslatedText("products.name", product.name, product.uuid);
|
|
1822
2241
|
const headingColor = (settings == null ? void 0 : settings.headingColor) || DEFAULT_HEADING_COLOR;
|
|
1823
|
-
useEffect2(() => {
|
|
1824
|
-
if (checkboxRef.current) {
|
|
1825
|
-
checkboxRef.current.indeterminate = someSelected && !allSelected;
|
|
1826
|
-
}
|
|
1827
|
-
}, [someSelected, allSelected]);
|
|
1828
2242
|
const handleToggleCollapse = () => {
|
|
1829
2243
|
onToggleCollapse(product.uuid);
|
|
1830
2244
|
};
|
|
1831
|
-
const
|
|
1832
|
-
onToggleSelect(product.uuid);
|
|
2245
|
+
const handleSelect = (next) => {
|
|
2246
|
+
onToggleSelect(product.uuid, next);
|
|
1833
2247
|
};
|
|
1834
|
-
return /* @__PURE__ */
|
|
1835
|
-
/* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
2248
|
+
return /* @__PURE__ */ jsxs4("div", { style: styles4.sectionHeader, children: [
|
|
2249
|
+
/* @__PURE__ */ jsxs4("div", { style: styles4.optionLeft, children: [
|
|
2250
|
+
/* @__PURE__ */ jsx5(
|
|
1837
2251
|
"button",
|
|
1838
2252
|
{
|
|
1839
2253
|
type: "button",
|
|
@@ -1842,10 +2256,10 @@ var ProductSectionHeader = ({
|
|
|
1842
2256
|
"aria-controls": `product-${product.uuid}`,
|
|
1843
2257
|
"aria-labelledby": `product-name-${product.uuid}`,
|
|
1844
2258
|
style: CHEVRON_BUTTON_STYLE,
|
|
1845
|
-
children: /* @__PURE__ */
|
|
2259
|
+
children: /* @__PURE__ */ jsx5(CollapseChevron, { open: !collapsed, color: headingColor })
|
|
1846
2260
|
}
|
|
1847
2261
|
),
|
|
1848
|
-
/* @__PURE__ */
|
|
2262
|
+
/* @__PURE__ */ jsx5("div", { style: styles4.optionTextContainer, children: /* @__PURE__ */ jsxs4(
|
|
1849
2263
|
"h2",
|
|
1850
2264
|
{
|
|
1851
2265
|
id: `product-name-${product.uuid}`,
|
|
@@ -1856,52 +2270,22 @@ var ProductSectionHeader = ({
|
|
|
1856
2270
|
},
|
|
1857
2271
|
children: [
|
|
1858
2272
|
name,
|
|
1859
|
-
isRequired && /* @__PURE__ */
|
|
2273
|
+
isRequired && /* @__PURE__ */ jsx5(RequiredMarker, {})
|
|
1860
2274
|
]
|
|
1861
2275
|
}
|
|
1862
2276
|
) })
|
|
1863
2277
|
] }),
|
|
1864
|
-
|
|
1865
|
-
|
|
2278
|
+
/* @__PURE__ */ jsx5(
|
|
2279
|
+
SelectionControl,
|
|
1866
2280
|
{
|
|
1867
|
-
|
|
1868
|
-
style: {
|
|
1869
|
-
...reviewIndicatorStyle(20),
|
|
1870
|
-
backgroundColor: "#10B981",
|
|
1871
|
-
marginLeft: "12px"
|
|
1872
|
-
},
|
|
1873
|
-
"aria-label": PRODUCT_SECTION_COPY.settled(name),
|
|
1874
|
-
children: /* @__PURE__ */ jsx3(
|
|
1875
|
-
"svg",
|
|
1876
|
-
{
|
|
1877
|
-
width: "12",
|
|
1878
|
-
height: "12",
|
|
1879
|
-
viewBox: "0 0 12 12",
|
|
1880
|
-
fill: "none",
|
|
1881
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1882
|
-
"aria-hidden": "true",
|
|
1883
|
-
children: /* @__PURE__ */ jsx3(
|
|
1884
|
-
"path",
|
|
1885
|
-
{
|
|
1886
|
-
d: "M4 6L5.5 7.5L8.5 4.5",
|
|
1887
|
-
stroke: "white",
|
|
1888
|
-
strokeWidth: "2",
|
|
1889
|
-
strokeLinecap: "round",
|
|
1890
|
-
strokeLinejoin: "round"
|
|
1891
|
-
}
|
|
1892
|
-
)
|
|
1893
|
-
}
|
|
1894
|
-
)
|
|
1895
|
-
}
|
|
1896
|
-
) : /* @__PURE__ */ jsx3(
|
|
1897
|
-
"input",
|
|
1898
|
-
{
|
|
1899
|
-
ref: checkboxRef,
|
|
1900
|
-
className: "redacto-checkbox-large",
|
|
1901
|
-
type: "checkbox",
|
|
2281
|
+
control: (_a = settings == null ? void 0 : settings.selectionControl) != null ? _a : DEFAULT_SELECTION_CONTROL,
|
|
1902
2282
|
checked: allSelected,
|
|
1903
|
-
|
|
1904
|
-
|
|
2283
|
+
indeterminate: someSelected && !allSelected,
|
|
2284
|
+
onSelect: handleSelect,
|
|
2285
|
+
label: requiredOnly ? PRODUCT_SECTION_COPY.toggleRequired(name, purposeCount) : PRODUCT_SECTION_COPY.toggleSelection(name, purposeCount),
|
|
2286
|
+
groupName: `redacto-product-${product.uuid}`,
|
|
2287
|
+
locked,
|
|
2288
|
+
lockedLabel: PRODUCT_SECTION_COPY.settled(name)
|
|
1905
2289
|
}
|
|
1906
2290
|
)
|
|
1907
2291
|
] });
|
|
@@ -1909,10 +2293,10 @@ var ProductSectionHeader = ({
|
|
|
1909
2293
|
var PurposeItem = ({
|
|
1910
2294
|
purpose,
|
|
1911
2295
|
productUuid,
|
|
1912
|
-
productIsRequired,
|
|
1913
2296
|
selectedPurposes,
|
|
1914
2297
|
collapsedPurposes,
|
|
1915
2298
|
selectedDataElements,
|
|
2299
|
+
recordedAnswers,
|
|
1916
2300
|
settings,
|
|
1917
2301
|
styles: styles4,
|
|
1918
2302
|
responsiveStyles,
|
|
@@ -1924,7 +2308,17 @@ var PurposeItem = ({
|
|
|
1924
2308
|
selectedLanguage,
|
|
1925
2309
|
initialDataElementSelections = {}
|
|
1926
2310
|
}) => {
|
|
2311
|
+
var _a;
|
|
1927
2312
|
const stateKey = productPurposeKey(productUuid, purpose.uuid);
|
|
2313
|
+
const handlePurposeToggle = useCallback3(
|
|
2314
|
+
() => onPurposeToggle(purpose.uuid, productUuid),
|
|
2315
|
+
[onPurposeToggle, purpose.uuid, productUuid]
|
|
2316
|
+
);
|
|
2317
|
+
const purposeControlLabel = `Select all data elements for ${getTranslatedText(
|
|
2318
|
+
`purposes.name`,
|
|
2319
|
+
purpose.name,
|
|
2320
|
+
purpose.uuid
|
|
2321
|
+
)}`;
|
|
1928
2322
|
const headingStyle = useMemo2(
|
|
1929
2323
|
() => ({
|
|
1930
2324
|
color: (settings == null ? void 0 : settings.headingColor) || DEFAULT_HEADING_COLOR
|
|
@@ -1937,9 +2331,9 @@ var PurposeItem = ({
|
|
|
1937
2331
|
}),
|
|
1938
2332
|
[settings == null ? void 0 : settings.textColor]
|
|
1939
2333
|
);
|
|
1940
|
-
return /* @__PURE__ */
|
|
1941
|
-
/* @__PURE__ */
|
|
1942
|
-
/* @__PURE__ */
|
|
2334
|
+
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
2335
|
+
/* @__PURE__ */ jsxs4("div", { style: styles4.optionItem, children: [
|
|
2336
|
+
/* @__PURE__ */ jsxs4(
|
|
1943
2337
|
"div",
|
|
1944
2338
|
{
|
|
1945
2339
|
style: styles4.optionLeft,
|
|
@@ -1960,15 +2354,15 @@ var PurposeItem = ({
|
|
|
1960
2354
|
}
|
|
1961
2355
|
},
|
|
1962
2356
|
children: [
|
|
1963
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ jsx5(
|
|
1964
2358
|
CollapseChevron,
|
|
1965
2359
|
{
|
|
1966
2360
|
open: !collapsedPurposes[stateKey],
|
|
1967
2361
|
color: (settings == null ? void 0 : settings.headingColor) || DEFAULT_HEADING_COLOR
|
|
1968
2362
|
}
|
|
1969
2363
|
),
|
|
1970
|
-
/* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
2364
|
+
/* @__PURE__ */ jsxs4("div", { style: styles4.optionTextContainer, children: [
|
|
2365
|
+
/* @__PURE__ */ jsxs4(
|
|
1972
2366
|
"h2",
|
|
1973
2367
|
{
|
|
1974
2368
|
id: `purpose-name-${stateKey}`,
|
|
@@ -1979,12 +2373,12 @@ var PurposeItem = ({
|
|
|
1979
2373
|
},
|
|
1980
2374
|
children: [
|
|
1981
2375
|
getTranslatedText(`purposes.name`, purpose.name, purpose.uuid),
|
|
1982
|
-
|
|
2376
|
+
hasRequiredDataElement(purpose) && /* @__PURE__ */ jsx5(RequiredMarker, {})
|
|
1983
2377
|
]
|
|
1984
2378
|
},
|
|
1985
2379
|
`purpose-name-${purpose.uuid}-${selectedLanguage}`
|
|
1986
2380
|
),
|
|
1987
|
-
/* @__PURE__ */
|
|
2381
|
+
/* @__PURE__ */ jsx5(
|
|
1988
2382
|
"h3",
|
|
1989
2383
|
{
|
|
1990
2384
|
id: `purpose-description-${stateKey}`,
|
|
@@ -2005,69 +2399,36 @@ var PurposeItem = ({
|
|
|
2005
2399
|
]
|
|
2006
2400
|
}
|
|
2007
2401
|
),
|
|
2008
|
-
|
|
2009
|
-
|
|
2402
|
+
/* @__PURE__ */ jsx5(
|
|
2403
|
+
SelectionControl,
|
|
2010
2404
|
{
|
|
2011
|
-
|
|
2012
|
-
type: "checkbox",
|
|
2405
|
+
control: (_a = settings == null ? void 0 : settings.selectionControl) != null ? _a : DEFAULT_SELECTION_CONTROL,
|
|
2013
2406
|
checked: selectedPurposes[stateKey] || false,
|
|
2014
|
-
|
|
2015
|
-
|
|
2407
|
+
onSelect: handlePurposeToggle,
|
|
2408
|
+
label: purposeControlLabel,
|
|
2409
|
+
groupName: `redacto-purpose-${stateKey}`,
|
|
2410
|
+
recordedAnswer: recordedAnswers == null ? void 0 : recordedAnswers[stateKey],
|
|
2411
|
+
size: "small",
|
|
2412
|
+
locked: isAlreadyConsented,
|
|
2413
|
+
lockedLabel: `Already consented to ${getTranslatedText(
|
|
2016
2414
|
`purposes.name`,
|
|
2017
2415
|
purpose.name,
|
|
2018
2416
|
purpose.uuid
|
|
2019
2417
|
)}`
|
|
2020
2418
|
}
|
|
2021
|
-
),
|
|
2022
|
-
isAlreadyConsented && /* @__PURE__ */ jsx3(
|
|
2023
|
-
"div",
|
|
2024
|
-
{
|
|
2025
|
-
role: "img",
|
|
2026
|
-
style: {
|
|
2027
|
-
...reviewIndicatorStyle(20),
|
|
2028
|
-
backgroundColor: "#10B981",
|
|
2029
|
-
marginLeft: "12px"
|
|
2030
|
-
},
|
|
2031
|
-
"aria-label": `Already consented to ${getTranslatedText(
|
|
2032
|
-
`purposes.name`,
|
|
2033
|
-
purpose.name,
|
|
2034
|
-
purpose.uuid
|
|
2035
|
-
)}`,
|
|
2036
|
-
children: /* @__PURE__ */ jsx3(
|
|
2037
|
-
"svg",
|
|
2038
|
-
{
|
|
2039
|
-
width: "12",
|
|
2040
|
-
height: "12",
|
|
2041
|
-
viewBox: "0 0 12 12",
|
|
2042
|
-
fill: "none",
|
|
2043
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2044
|
-
"aria-hidden": "true",
|
|
2045
|
-
children: /* @__PURE__ */ jsx3(
|
|
2046
|
-
"path",
|
|
2047
|
-
{
|
|
2048
|
-
d: "M4 6L5.5 7.5L8.5 4.5",
|
|
2049
|
-
stroke: "white",
|
|
2050
|
-
strokeWidth: "2",
|
|
2051
|
-
strokeLinecap: "round",
|
|
2052
|
-
strokeLinejoin: "round"
|
|
2053
|
-
}
|
|
2054
|
-
)
|
|
2055
|
-
}
|
|
2056
|
-
)
|
|
2057
|
-
}
|
|
2058
2419
|
)
|
|
2059
2420
|
] }),
|
|
2060
|
-
!collapsedPurposes[stateKey] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */
|
|
2421
|
+
!collapsedPurposes[stateKey] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ jsx5(
|
|
2061
2422
|
"div",
|
|
2062
2423
|
{
|
|
2063
2424
|
id: `purpose-${purpose.uuid}`,
|
|
2064
2425
|
style: styles4.dataElementsContainer,
|
|
2065
|
-
children: purpose.data_elements.map((dataElement) => /* @__PURE__ */
|
|
2426
|
+
children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ jsxs4(
|
|
2066
2427
|
"div",
|
|
2067
2428
|
{
|
|
2068
2429
|
style: styles4.dataElementItem,
|
|
2069
2430
|
children: [
|
|
2070
|
-
/* @__PURE__ */
|
|
2431
|
+
/* @__PURE__ */ jsxs4(
|
|
2071
2432
|
"span",
|
|
2072
2433
|
{
|
|
2073
2434
|
id: `data-element-${stateKey}-${dataElement.uuid}`,
|
|
@@ -2082,12 +2443,12 @@ var PurposeItem = ({
|
|
|
2082
2443
|
dataElement.name,
|
|
2083
2444
|
dataElement.uuid
|
|
2084
2445
|
),
|
|
2085
|
-
dataElement
|
|
2446
|
+
isBlockingRequiredElement(dataElement) && /* @__PURE__ */ jsx5(RequiredMarker, {})
|
|
2086
2447
|
]
|
|
2087
2448
|
},
|
|
2088
2449
|
`data-element-${purpose.uuid}-${dataElement.uuid}-${selectedLanguage}`
|
|
2089
2450
|
),
|
|
2090
|
-
!isAlreadyConsented && /* @__PURE__ */
|
|
2451
|
+
!isAlreadyConsented && /* @__PURE__ */ jsx5(
|
|
2091
2452
|
"input",
|
|
2092
2453
|
{
|
|
2093
2454
|
className: "redacto-checkbox-small",
|
|
@@ -2105,11 +2466,11 @@ var PurposeItem = ({
|
|
|
2105
2466
|
)}${dataElement.required ? " (required)" : ""}`
|
|
2106
2467
|
}
|
|
2107
2468
|
),
|
|
2108
|
-
isAlreadyConsented && /* @__PURE__ */
|
|
2469
|
+
isAlreadyConsented && /* @__PURE__ */ jsx5(Fragment2, { children: (() => {
|
|
2109
2470
|
const combinedId = `${stateKey}-${dataElement.uuid}`;
|
|
2110
2471
|
const wasOriginallySelected = initialDataElementSelections[combinedId] || false;
|
|
2111
2472
|
if (wasOriginallySelected) {
|
|
2112
|
-
return /* @__PURE__ */
|
|
2473
|
+
return /* @__PURE__ */ jsx5(
|
|
2113
2474
|
"div",
|
|
2114
2475
|
{
|
|
2115
2476
|
role: "img",
|
|
@@ -2122,7 +2483,7 @@ var PurposeItem = ({
|
|
|
2122
2483
|
dataElement.name,
|
|
2123
2484
|
dataElement.uuid
|
|
2124
2485
|
)}`,
|
|
2125
|
-
children: /* @__PURE__ */
|
|
2486
|
+
children: /* @__PURE__ */ jsx5(
|
|
2126
2487
|
"svg",
|
|
2127
2488
|
{
|
|
2128
2489
|
width: "10",
|
|
@@ -2131,7 +2492,7 @@ var PurposeItem = ({
|
|
|
2131
2492
|
fill: "none",
|
|
2132
2493
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2133
2494
|
"aria-hidden": "true",
|
|
2134
|
-
children: /* @__PURE__ */
|
|
2495
|
+
children: /* @__PURE__ */ jsx5(
|
|
2135
2496
|
"path",
|
|
2136
2497
|
{
|
|
2137
2498
|
d: "M3 5L4.5 6.5L7.5 3.5",
|
|
@@ -2146,7 +2507,7 @@ var PurposeItem = ({
|
|
|
2146
2507
|
}
|
|
2147
2508
|
);
|
|
2148
2509
|
} else {
|
|
2149
|
-
return /* @__PURE__ */
|
|
2510
|
+
return /* @__PURE__ */ jsx5(
|
|
2150
2511
|
"div",
|
|
2151
2512
|
{
|
|
2152
2513
|
role: "img",
|
|
@@ -2199,9 +2560,9 @@ var GuardianForm = ({
|
|
|
2199
2560
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
2200
2561
|
const [focusedIndex, setFocusedIndex] = useState(-1);
|
|
2201
2562
|
const [openUpward, setOpenUpward] = useState(false);
|
|
2202
|
-
const dropdownRef =
|
|
2203
|
-
const optionsRef =
|
|
2204
|
-
|
|
2563
|
+
const dropdownRef = useRef3(null);
|
|
2564
|
+
const optionsRef = useRef3(null);
|
|
2565
|
+
useEffect4(() => {
|
|
2205
2566
|
if (!isDropdownOpen) return;
|
|
2206
2567
|
const handleClickOutside = (e) => {
|
|
2207
2568
|
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
@@ -2212,7 +2573,7 @@ var GuardianForm = ({
|
|
|
2212
2573
|
document.addEventListener("mousedown", handleClickOutside);
|
|
2213
2574
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
2214
2575
|
}, [isDropdownOpen]);
|
|
2215
|
-
|
|
2576
|
+
useEffect4(() => {
|
|
2216
2577
|
if (!isDropdownOpen || !dropdownRef.current) return;
|
|
2217
2578
|
const rect = dropdownRef.current.getBoundingClientRect();
|
|
2218
2579
|
const spaceBelow = window.innerHeight - rect.bottom;
|
|
@@ -2257,7 +2618,7 @@ var GuardianForm = ({
|
|
|
2257
2618
|
break;
|
|
2258
2619
|
}
|
|
2259
2620
|
};
|
|
2260
|
-
|
|
2621
|
+
useEffect4(() => {
|
|
2261
2622
|
var _a2;
|
|
2262
2623
|
if (focusedIndex >= 0 && optionsRef.current) {
|
|
2263
2624
|
const option = optionsRef.current.children[focusedIndex];
|
|
@@ -2317,10 +2678,10 @@ var GuardianForm = ({
|
|
|
2317
2678
|
(o) => o.value === formData.guardianRelationship
|
|
2318
2679
|
)) == null ? void 0 : _a.label;
|
|
2319
2680
|
const hasError = Boolean(errors.guardianRelationship);
|
|
2320
|
-
return /* @__PURE__ */
|
|
2321
|
-
/* @__PURE__ */
|
|
2322
|
-
/* @__PURE__ */
|
|
2323
|
-
/* @__PURE__ */
|
|
2681
|
+
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
2682
|
+
/* @__PURE__ */ jsx5("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ jsxs4("div", { style: styles4.topLeft, children: [
|
|
2683
|
+
/* @__PURE__ */ jsx5("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
|
|
2684
|
+
/* @__PURE__ */ jsx5(
|
|
2324
2685
|
"h2",
|
|
2325
2686
|
{
|
|
2326
2687
|
id: "guardian-form-title",
|
|
@@ -2335,7 +2696,7 @@ var GuardianForm = ({
|
|
|
2335
2696
|
}
|
|
2336
2697
|
)
|
|
2337
2698
|
] }) }),
|
|
2338
|
-
/* @__PURE__ */
|
|
2699
|
+
/* @__PURE__ */ jsxs4(
|
|
2339
2700
|
"div",
|
|
2340
2701
|
{
|
|
2341
2702
|
style: {
|
|
@@ -2344,7 +2705,7 @@ var GuardianForm = ({
|
|
|
2344
2705
|
...componentTextStyle
|
|
2345
2706
|
},
|
|
2346
2707
|
children: [
|
|
2347
|
-
/* @__PURE__ */
|
|
2708
|
+
/* @__PURE__ */ jsx5(
|
|
2348
2709
|
"p",
|
|
2349
2710
|
{
|
|
2350
2711
|
style: {
|
|
@@ -2358,8 +2719,8 @@ var GuardianForm = ({
|
|
|
2358
2719
|
children: "Since you are under the age of consent, a legal guardian must verify their identity via DigiLocker before you can proceed."
|
|
2359
2720
|
}
|
|
2360
2721
|
),
|
|
2361
|
-
/* @__PURE__ */
|
|
2362
|
-
/* @__PURE__ */
|
|
2722
|
+
/* @__PURE__ */ jsxs4("div", { style: infoBannerStyle, children: [
|
|
2723
|
+
/* @__PURE__ */ jsxs4(
|
|
2363
2724
|
"svg",
|
|
2364
2725
|
{
|
|
2365
2726
|
width: "16",
|
|
@@ -2372,15 +2733,15 @@ var GuardianForm = ({
|
|
|
2372
2733
|
strokeLinejoin: "round",
|
|
2373
2734
|
style: { flexShrink: 0, marginTop: "1px" },
|
|
2374
2735
|
children: [
|
|
2375
|
-
/* @__PURE__ */
|
|
2376
|
-
/* @__PURE__ */
|
|
2377
|
-
/* @__PURE__ */
|
|
2736
|
+
/* @__PURE__ */ jsx5("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2737
|
+
/* @__PURE__ */ jsx5("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
2738
|
+
/* @__PURE__ */ jsx5("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
2378
2739
|
]
|
|
2379
2740
|
}
|
|
2380
2741
|
),
|
|
2381
|
-
/* @__PURE__ */
|
|
2742
|
+
/* @__PURE__ */ jsx5("span", { children: "The guardian's name will be matched against their DigiLocker identity document (e.g. Aadhaar). Please enter the name exactly as it appears on the document." })
|
|
2382
2743
|
] }),
|
|
2383
|
-
/* @__PURE__ */
|
|
2744
|
+
/* @__PURE__ */ jsxs4(
|
|
2384
2745
|
"div",
|
|
2385
2746
|
{
|
|
2386
2747
|
style: {
|
|
@@ -2389,12 +2750,12 @@ var GuardianForm = ({
|
|
|
2389
2750
|
gap: "14px"
|
|
2390
2751
|
},
|
|
2391
2752
|
children: [
|
|
2392
|
-
/* @__PURE__ */
|
|
2393
|
-
/* @__PURE__ */
|
|
2753
|
+
/* @__PURE__ */ jsxs4("div", { children: [
|
|
2754
|
+
/* @__PURE__ */ jsxs4("label", { htmlFor: "guardianName", style: labelStyle, children: [
|
|
2394
2755
|
"Guardian's Full Name ",
|
|
2395
|
-
/* @__PURE__ */
|
|
2756
|
+
/* @__PURE__ */ jsx5("span", { style: { color: "#DC2626" }, children: "*" })
|
|
2396
2757
|
] }),
|
|
2397
|
-
/* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ jsx5(
|
|
2398
2759
|
"input",
|
|
2399
2760
|
{
|
|
2400
2761
|
id: "guardianName",
|
|
@@ -2410,16 +2771,16 @@ var GuardianForm = ({
|
|
|
2410
2771
|
"aria-describedby": "guardianName-hint"
|
|
2411
2772
|
}
|
|
2412
2773
|
),
|
|
2413
|
-
/* @__PURE__ */
|
|
2414
|
-
errors.guardianName && /* @__PURE__ */
|
|
2774
|
+
/* @__PURE__ */ jsx5("p", { id: "guardianName-hint", style: hintStyle, children: "Enter the full name as per government ID (Aadhaar, PAN, etc.)" }),
|
|
2775
|
+
errors.guardianName && /* @__PURE__ */ jsx5("div", { style: errorStyle, role: "alert", children: errors.guardianName })
|
|
2415
2776
|
] }),
|
|
2416
|
-
/* @__PURE__ */
|
|
2417
|
-
/* @__PURE__ */
|
|
2777
|
+
/* @__PURE__ */ jsxs4("div", { children: [
|
|
2778
|
+
/* @__PURE__ */ jsxs4("label", { htmlFor: "guardianContact", style: labelStyle, children: [
|
|
2418
2779
|
"Guardian's Phone Number",
|
|
2419
2780
|
" ",
|
|
2420
|
-
/* @__PURE__ */
|
|
2781
|
+
/* @__PURE__ */ jsx5("span", { style: { color: "#DC2626" }, children: "*" })
|
|
2421
2782
|
] }),
|
|
2422
|
-
/* @__PURE__ */
|
|
2783
|
+
/* @__PURE__ */ jsx5(
|
|
2423
2784
|
"input",
|
|
2424
2785
|
{
|
|
2425
2786
|
id: "guardianContact",
|
|
@@ -2436,15 +2797,15 @@ var GuardianForm = ({
|
|
|
2436
2797
|
"aria-describedby": "guardianContact-hint"
|
|
2437
2798
|
}
|
|
2438
2799
|
),
|
|
2439
|
-
/* @__PURE__ */
|
|
2440
|
-
errors.guardianContact && /* @__PURE__ */
|
|
2800
|
+
/* @__PURE__ */ jsx5("p", { id: "guardianContact-hint", style: hintStyle, children: "Mobile number linked to guardian's Aadhaar" }),
|
|
2801
|
+
errors.guardianContact && /* @__PURE__ */ jsx5("div", { style: errorStyle, role: "alert", children: errors.guardianContact })
|
|
2441
2802
|
] }),
|
|
2442
|
-
/* @__PURE__ */
|
|
2443
|
-
/* @__PURE__ */
|
|
2803
|
+
/* @__PURE__ */ jsxs4("div", { ref: dropdownRef, style: { position: "relative" }, children: [
|
|
2804
|
+
/* @__PURE__ */ jsxs4("label", { id: "guardianRelationship-label", style: labelStyle, children: [
|
|
2444
2805
|
"Relationship ",
|
|
2445
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ jsx5("span", { style: { color: "#DC2626" }, children: "*" })
|
|
2446
2807
|
] }),
|
|
2447
|
-
/* @__PURE__ */
|
|
2808
|
+
/* @__PURE__ */ jsxs4(
|
|
2448
2809
|
"div",
|
|
2449
2810
|
{
|
|
2450
2811
|
role: "combobox",
|
|
@@ -2472,7 +2833,7 @@ var GuardianForm = ({
|
|
|
2472
2833
|
transition: "border-color 0.15s, box-shadow 0.15s"
|
|
2473
2834
|
},
|
|
2474
2835
|
children: [
|
|
2475
|
-
/* @__PURE__ */
|
|
2836
|
+
/* @__PURE__ */ jsx5(
|
|
2476
2837
|
"span",
|
|
2477
2838
|
{
|
|
2478
2839
|
style: {
|
|
@@ -2483,7 +2844,7 @@ var GuardianForm = ({
|
|
|
2483
2844
|
children: selectedLabel || "Select relationship"
|
|
2484
2845
|
}
|
|
2485
2846
|
),
|
|
2486
|
-
/* @__PURE__ */
|
|
2847
|
+
/* @__PURE__ */ jsx5(
|
|
2487
2848
|
"svg",
|
|
2488
2849
|
{
|
|
2489
2850
|
width: "14",
|
|
@@ -2500,13 +2861,13 @@ var GuardianForm = ({
|
|
|
2500
2861
|
transform: isDropdownOpen ? "rotate(180deg)" : "rotate(0deg)",
|
|
2501
2862
|
transition: "transform 0.2s"
|
|
2502
2863
|
},
|
|
2503
|
-
children: /* @__PURE__ */
|
|
2864
|
+
children: /* @__PURE__ */ jsx5("polyline", { points: "6 9 12 15 18 9" })
|
|
2504
2865
|
}
|
|
2505
2866
|
)
|
|
2506
2867
|
]
|
|
2507
2868
|
}
|
|
2508
2869
|
),
|
|
2509
|
-
isDropdownOpen && /* @__PURE__ */
|
|
2870
|
+
isDropdownOpen && /* @__PURE__ */ jsx5(
|
|
2510
2871
|
"div",
|
|
2511
2872
|
{
|
|
2512
2873
|
ref: optionsRef,
|
|
@@ -2533,7 +2894,7 @@ var GuardianForm = ({
|
|
|
2533
2894
|
const isSelected = formData.guardianRelationship === option.value;
|
|
2534
2895
|
const isFocused = focusedIndex === index;
|
|
2535
2896
|
const accentColor = ((_b2 = (_a2 = settings == null ? void 0 : settings.button) == null ? void 0 : _a2.accept) == null ? void 0 : _b2.backgroundColor) || "#3b82f6";
|
|
2536
|
-
return /* @__PURE__ */
|
|
2897
|
+
return /* @__PURE__ */ jsxs4(
|
|
2537
2898
|
"div",
|
|
2538
2899
|
{
|
|
2539
2900
|
id: `guardianRelationship-option-${index}`,
|
|
@@ -2553,8 +2914,8 @@ var GuardianForm = ({
|
|
|
2553
2914
|
transition: "background-color 0.1s"
|
|
2554
2915
|
},
|
|
2555
2916
|
children: [
|
|
2556
|
-
/* @__PURE__ */
|
|
2557
|
-
isSelected && /* @__PURE__ */
|
|
2917
|
+
/* @__PURE__ */ jsx5("span", { children: option.label }),
|
|
2918
|
+
isSelected && /* @__PURE__ */ jsx5(
|
|
2558
2919
|
"svg",
|
|
2559
2920
|
{
|
|
2560
2921
|
width: "14",
|
|
@@ -2566,7 +2927,7 @@ var GuardianForm = ({
|
|
|
2566
2927
|
strokeLinecap: "round",
|
|
2567
2928
|
strokeLinejoin: "round",
|
|
2568
2929
|
style: { flexShrink: 0 },
|
|
2569
|
-
children: /* @__PURE__ */
|
|
2930
|
+
children: /* @__PURE__ */ jsx5("polyline", { points: "20 6 9 17 4 12" })
|
|
2570
2931
|
}
|
|
2571
2932
|
)
|
|
2572
2933
|
]
|
|
@@ -2576,12 +2937,12 @@ var GuardianForm = ({
|
|
|
2576
2937
|
})
|
|
2577
2938
|
}
|
|
2578
2939
|
),
|
|
2579
|
-
errors.guardianRelationship && /* @__PURE__ */
|
|
2940
|
+
errors.guardianRelationship && /* @__PURE__ */ jsx5("div", { style: errorStyle, role: "alert", children: errors.guardianRelationship })
|
|
2580
2941
|
] })
|
|
2581
2942
|
]
|
|
2582
2943
|
}
|
|
2583
2944
|
),
|
|
2584
|
-
errors.general && /* @__PURE__ */
|
|
2945
|
+
errors.general && /* @__PURE__ */ jsx5(
|
|
2585
2946
|
"div",
|
|
2586
2947
|
{
|
|
2587
2948
|
role: "alert",
|
|
@@ -2601,7 +2962,7 @@ var GuardianForm = ({
|
|
|
2601
2962
|
]
|
|
2602
2963
|
}
|
|
2603
2964
|
),
|
|
2604
|
-
/* @__PURE__ */
|
|
2965
|
+
/* @__PURE__ */ jsxs4(
|
|
2605
2966
|
"div",
|
|
2606
2967
|
{
|
|
2607
2968
|
style: {
|
|
@@ -2611,7 +2972,7 @@ var GuardianForm = ({
|
|
|
2611
2972
|
paddingTop: "12px"
|
|
2612
2973
|
},
|
|
2613
2974
|
children: [
|
|
2614
|
-
/* @__PURE__ */
|
|
2975
|
+
/* @__PURE__ */ jsx5(
|
|
2615
2976
|
"button",
|
|
2616
2977
|
{
|
|
2617
2978
|
style: {
|
|
@@ -2627,7 +2988,7 @@ var GuardianForm = ({
|
|
|
2627
2988
|
children: isSubmitting ? "Verifying..." : "Verify via DigiLocker"
|
|
2628
2989
|
}
|
|
2629
2990
|
),
|
|
2630
|
-
/* @__PURE__ */
|
|
2991
|
+
/* @__PURE__ */ jsx5(
|
|
2631
2992
|
"button",
|
|
2632
2993
|
{
|
|
2633
2994
|
style: {
|
|
@@ -2696,10 +3057,10 @@ var VerificationScreen = ({
|
|
|
2696
3057
|
animation: "spin 1s linear infinite",
|
|
2697
3058
|
margin: "24px auto"
|
|
2698
3059
|
};
|
|
2699
|
-
return /* @__PURE__ */
|
|
2700
|
-
/* @__PURE__ */
|
|
2701
|
-
/* @__PURE__ */
|
|
2702
|
-
/* @__PURE__ */
|
|
3060
|
+
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
3061
|
+
/* @__PURE__ */ jsx5("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: /* @__PURE__ */ jsxs4("div", { style: styles4.topLeft, children: [
|
|
3062
|
+
/* @__PURE__ */ jsx5("img", { style: styles4.logo, src: logoUrl, alt: "Logo" }),
|
|
3063
|
+
/* @__PURE__ */ jsx5(
|
|
2703
3064
|
"h2",
|
|
2704
3065
|
{
|
|
2705
3066
|
id: "verification-title",
|
|
@@ -2714,7 +3075,7 @@ var VerificationScreen = ({
|
|
|
2714
3075
|
}
|
|
2715
3076
|
)
|
|
2716
3077
|
] }) }),
|
|
2717
|
-
/* @__PURE__ */
|
|
3078
|
+
/* @__PURE__ */ jsxs4(
|
|
2718
3079
|
"div",
|
|
2719
3080
|
{
|
|
2720
3081
|
style: {
|
|
@@ -2724,7 +3085,7 @@ var VerificationScreen = ({
|
|
|
2724
3085
|
textAlign: "center"
|
|
2725
3086
|
},
|
|
2726
3087
|
children: [
|
|
2727
|
-
isVerificationComplete && !error ? /* @__PURE__ */
|
|
3088
|
+
isVerificationComplete && !error ? /* @__PURE__ */ jsxs4(
|
|
2728
3089
|
"div",
|
|
2729
3090
|
{
|
|
2730
3091
|
style: {
|
|
@@ -2735,7 +3096,7 @@ var VerificationScreen = ({
|
|
|
2735
3096
|
flex: 1
|
|
2736
3097
|
},
|
|
2737
3098
|
children: [
|
|
2738
|
-
/* @__PURE__ */
|
|
3099
|
+
/* @__PURE__ */ jsx5(
|
|
2739
3100
|
"div",
|
|
2740
3101
|
{
|
|
2741
3102
|
style: {
|
|
@@ -2747,7 +3108,7 @@ var VerificationScreen = ({
|
|
|
2747
3108
|
alignItems: "center",
|
|
2748
3109
|
justifyContent: "center"
|
|
2749
3110
|
},
|
|
2750
|
-
children: /* @__PURE__ */
|
|
3111
|
+
children: /* @__PURE__ */ jsx5(
|
|
2751
3112
|
"svg",
|
|
2752
3113
|
{
|
|
2753
3114
|
width: "32",
|
|
@@ -2758,12 +3119,12 @@ var VerificationScreen = ({
|
|
|
2758
3119
|
strokeWidth: "2",
|
|
2759
3120
|
strokeLinecap: "round",
|
|
2760
3121
|
strokeLinejoin: "round",
|
|
2761
|
-
children: /* @__PURE__ */
|
|
3122
|
+
children: /* @__PURE__ */ jsx5("polyline", { points: "20 6 9 17 4 12" })
|
|
2762
3123
|
}
|
|
2763
3124
|
)
|
|
2764
3125
|
}
|
|
2765
3126
|
),
|
|
2766
|
-
/* @__PURE__ */
|
|
3127
|
+
/* @__PURE__ */ jsx5(
|
|
2767
3128
|
"p",
|
|
2768
3129
|
{
|
|
2769
3130
|
style: {
|
|
@@ -2779,12 +3140,12 @@ var VerificationScreen = ({
|
|
|
2779
3140
|
)
|
|
2780
3141
|
]
|
|
2781
3142
|
}
|
|
2782
|
-
) : (isInitiating || isPolling) && !error ? /* @__PURE__ */
|
|
2783
|
-
/* @__PURE__ */
|
|
2784
|
-
/* @__PURE__ */
|
|
3143
|
+
) : (isInitiating || isPolling) && !error ? /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
3144
|
+
/* @__PURE__ */ jsx5("div", { style: spinnerStyle }),
|
|
3145
|
+
/* @__PURE__ */ jsx5("div", { style: statusStyle, children: isInitiating ? "Opening DigiLocker in a new tab..." : "Please complete the verification in the DigiLocker tab. This page will update automatically when verification is complete." })
|
|
2785
3146
|
] }) : null,
|
|
2786
|
-
error && /* @__PURE__ */
|
|
2787
|
-
/* @__PURE__ */
|
|
3147
|
+
error && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
3148
|
+
/* @__PURE__ */ jsx5(
|
|
2788
3149
|
"div",
|
|
2789
3150
|
{
|
|
2790
3151
|
style: {
|
|
@@ -2797,7 +3158,7 @@ var VerificationScreen = ({
|
|
|
2797
3158
|
justifyContent: "center",
|
|
2798
3159
|
margin: "24px auto"
|
|
2799
3160
|
},
|
|
2800
|
-
children: /* @__PURE__ */
|
|
3161
|
+
children: /* @__PURE__ */ jsxs4(
|
|
2801
3162
|
"svg",
|
|
2802
3163
|
{
|
|
2803
3164
|
width: "32",
|
|
@@ -2809,14 +3170,14 @@ var VerificationScreen = ({
|
|
|
2809
3170
|
strokeLinecap: "round",
|
|
2810
3171
|
strokeLinejoin: "round",
|
|
2811
3172
|
children: [
|
|
2812
|
-
/* @__PURE__ */
|
|
2813
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ jsx5("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3174
|
+
/* @__PURE__ */ jsx5("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
2814
3175
|
]
|
|
2815
3176
|
}
|
|
2816
3177
|
)
|
|
2817
3178
|
}
|
|
2818
3179
|
),
|
|
2819
|
-
/* @__PURE__ */
|
|
3180
|
+
/* @__PURE__ */ jsx5(
|
|
2820
3181
|
"p",
|
|
2821
3182
|
{
|
|
2822
3183
|
style: {
|
|
@@ -2830,12 +3191,12 @@ var VerificationScreen = ({
|
|
|
2830
3191
|
children: "Verification failed"
|
|
2831
3192
|
}
|
|
2832
3193
|
),
|
|
2833
|
-
/* @__PURE__ */
|
|
3194
|
+
/* @__PURE__ */ jsx5("div", { style: errorStyle, children: error })
|
|
2834
3195
|
] })
|
|
2835
3196
|
]
|
|
2836
3197
|
}
|
|
2837
3198
|
),
|
|
2838
|
-
isAutoTransitioning ? null : /* @__PURE__ */
|
|
3199
|
+
isAutoTransitioning ? null : /* @__PURE__ */ jsx5(
|
|
2839
3200
|
"div",
|
|
2840
3201
|
{
|
|
2841
3202
|
style: {
|
|
@@ -2847,7 +3208,7 @@ var VerificationScreen = ({
|
|
|
2847
3208
|
gap: "12px",
|
|
2848
3209
|
justifyContent: "center"
|
|
2849
3210
|
},
|
|
2850
|
-
children: isVerificationComplete && !error ? /* @__PURE__ */
|
|
3211
|
+
children: isVerificationComplete && !error ? /* @__PURE__ */ jsx5(
|
|
2851
3212
|
"button",
|
|
2852
3213
|
{
|
|
2853
3214
|
style: {
|
|
@@ -2860,7 +3221,7 @@ var VerificationScreen = ({
|
|
|
2860
3221
|
"aria-label": "Continue to consent form",
|
|
2861
3222
|
children: "Continue"
|
|
2862
3223
|
}
|
|
2863
|
-
) : error && canRetry ? /* @__PURE__ */
|
|
3224
|
+
) : error && canRetry ? /* @__PURE__ */ jsx5(
|
|
2864
3225
|
"button",
|
|
2865
3226
|
{
|
|
2866
3227
|
style: {
|
|
@@ -2874,7 +3235,7 @@ var VerificationScreen = ({
|
|
|
2874
3235
|
"aria-label": errorCode === "GUARDIAN_UNDER_18" ? "Change guardian details" : "Try verification again",
|
|
2875
3236
|
children: errorCode === "GUARDIAN_UNDER_18" ? "Change Guardian" : "Try Again"
|
|
2876
3237
|
}
|
|
2877
|
-
) : error ? /* @__PURE__ */
|
|
3238
|
+
) : error ? /* @__PURE__ */ jsx5(
|
|
2878
3239
|
"button",
|
|
2879
3240
|
{
|
|
2880
3241
|
style: {
|
|
@@ -2888,7 +3249,7 @@ var VerificationScreen = ({
|
|
|
2888
3249
|
"aria-label": "Go back",
|
|
2889
3250
|
children: "Go Back"
|
|
2890
3251
|
}
|
|
2891
|
-
) : /* @__PURE__ */
|
|
3252
|
+
) : /* @__PURE__ */ jsx5(
|
|
2892
3253
|
"button",
|
|
2893
3254
|
{
|
|
2894
3255
|
style: {
|
|
@@ -2920,11 +3281,11 @@ var AgeVerification = ({
|
|
|
2920
3281
|
logoUrl,
|
|
2921
3282
|
isMobile
|
|
2922
3283
|
}) => {
|
|
2923
|
-
return /* @__PURE__ */
|
|
2924
|
-
/* @__PURE__ */
|
|
2925
|
-
/* @__PURE__ */
|
|
2926
|
-
/* @__PURE__ */
|
|
2927
|
-
/* @__PURE__ */
|
|
3284
|
+
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
3285
|
+
/* @__PURE__ */ jsxs4("div", { style: { ...styles4.topSection, ...componentTextStyle }, children: [
|
|
3286
|
+
/* @__PURE__ */ jsxs4("div", { style: styles4.topLeft, children: [
|
|
3287
|
+
/* @__PURE__ */ jsx5("img", { style: styles4.logo, src: logoUrl, alt: "Redacto Logo" }),
|
|
3288
|
+
/* @__PURE__ */ jsx5(
|
|
2928
3289
|
"h2",
|
|
2929
3290
|
{
|
|
2930
3291
|
id: "age-verification-title",
|
|
@@ -2937,7 +3298,7 @@ var AgeVerification = ({
|
|
|
2937
3298
|
}
|
|
2938
3299
|
)
|
|
2939
3300
|
] }),
|
|
2940
|
-
/* @__PURE__ */
|
|
3301
|
+
/* @__PURE__ */ jsx5(
|
|
2941
3302
|
"button",
|
|
2942
3303
|
{
|
|
2943
3304
|
onClick: onClose,
|
|
@@ -2952,7 +3313,7 @@ var AgeVerification = ({
|
|
|
2952
3313
|
justifyContent: "center"
|
|
2953
3314
|
},
|
|
2954
3315
|
"aria-label": "Close modal",
|
|
2955
|
-
children: /* @__PURE__ */
|
|
3316
|
+
children: /* @__PURE__ */ jsx5(
|
|
2956
3317
|
"svg",
|
|
2957
3318
|
{
|
|
2958
3319
|
width: isMobile ? "18" : "20",
|
|
@@ -2961,7 +3322,7 @@ var AgeVerification = ({
|
|
|
2961
3322
|
fill: "none",
|
|
2962
3323
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2963
3324
|
"aria-hidden": "true",
|
|
2964
|
-
children: /* @__PURE__ */
|
|
3325
|
+
children: /* @__PURE__ */ jsx5(
|
|
2965
3326
|
"path",
|
|
2966
3327
|
{
|
|
2967
3328
|
d: "M15 5L5 15M5 5L15 15",
|
|
@@ -2976,7 +3337,7 @@ var AgeVerification = ({
|
|
|
2976
3337
|
}
|
|
2977
3338
|
)
|
|
2978
3339
|
] }),
|
|
2979
|
-
/* @__PURE__ */
|
|
3340
|
+
/* @__PURE__ */ jsxs4(
|
|
2980
3341
|
"div",
|
|
2981
3342
|
{
|
|
2982
3343
|
style: {
|
|
@@ -2985,7 +3346,7 @@ var AgeVerification = ({
|
|
|
2985
3346
|
...componentTextStyle
|
|
2986
3347
|
},
|
|
2987
3348
|
children: [
|
|
2988
|
-
/* @__PURE__ */
|
|
3349
|
+
/* @__PURE__ */ jsx5(
|
|
2989
3350
|
"p",
|
|
2990
3351
|
{
|
|
2991
3352
|
style: {
|
|
@@ -2997,7 +3358,7 @@ var AgeVerification = ({
|
|
|
2997
3358
|
children: "To proceed with this consent form, we need to verify your age."
|
|
2998
3359
|
}
|
|
2999
3360
|
),
|
|
3000
|
-
/* @__PURE__ */
|
|
3361
|
+
/* @__PURE__ */ jsx5(
|
|
3001
3362
|
"p",
|
|
3002
3363
|
{
|
|
3003
3364
|
style: {
|
|
@@ -3012,7 +3373,7 @@ var AgeVerification = ({
|
|
|
3012
3373
|
]
|
|
3013
3374
|
}
|
|
3014
3375
|
),
|
|
3015
|
-
/* @__PURE__ */
|
|
3376
|
+
/* @__PURE__ */ jsxs4(
|
|
3016
3377
|
"div",
|
|
3017
3378
|
{
|
|
3018
3379
|
style: {
|
|
@@ -3021,7 +3382,7 @@ var AgeVerification = ({
|
|
|
3021
3382
|
...componentTextStyle
|
|
3022
3383
|
},
|
|
3023
3384
|
children: [
|
|
3024
|
-
/* @__PURE__ */
|
|
3385
|
+
/* @__PURE__ */ jsx5(
|
|
3025
3386
|
"button",
|
|
3026
3387
|
{
|
|
3027
3388
|
style: {
|
|
@@ -3036,7 +3397,7 @@ var AgeVerification = ({
|
|
|
3036
3397
|
children: "Yes, I am 18 or older"
|
|
3037
3398
|
}
|
|
3038
3399
|
),
|
|
3039
|
-
/* @__PURE__ */
|
|
3400
|
+
/* @__PURE__ */ jsx5(
|
|
3040
3401
|
"button",
|
|
3041
3402
|
{
|
|
3042
3403
|
style: {
|
|
@@ -3124,7 +3485,7 @@ var RedactoNoticeConsent = ({
|
|
|
3124
3485
|
ucic
|
|
3125
3486
|
]);
|
|
3126
3487
|
if (propValidationError) {
|
|
3127
|
-
return /* @__PURE__ */
|
|
3488
|
+
return /* @__PURE__ */ jsxs4(
|
|
3128
3489
|
"div",
|
|
3129
3490
|
{
|
|
3130
3491
|
style: {
|
|
@@ -3135,9 +3496,9 @@ var RedactoNoticeConsent = ({
|
|
|
3135
3496
|
color: "#c33"
|
|
3136
3497
|
},
|
|
3137
3498
|
children: [
|
|
3138
|
-
/* @__PURE__ */
|
|
3139
|
-
/* @__PURE__ */
|
|
3140
|
-
/* @__PURE__ */
|
|
3499
|
+
/* @__PURE__ */ jsx5("h3", { children: "Configuration Error" }),
|
|
3500
|
+
/* @__PURE__ */ jsx5("p", { children: propValidationError }),
|
|
3501
|
+
/* @__PURE__ */ jsx5("p", { children: "Please check your component props and try again." })
|
|
3141
3502
|
]
|
|
3142
3503
|
}
|
|
3143
3504
|
);
|
|
@@ -3151,7 +3512,13 @@ var RedactoNoticeConsent = ({
|
|
|
3151
3512
|
const [selectedPurposes, setSelectedPurposes] = useState({});
|
|
3152
3513
|
const [selectedDataElements, setSelectedDataElements] = useState({});
|
|
3153
3514
|
const [initialDataElementSelections, setInitialDataElementSelections] = useState({});
|
|
3515
|
+
const [recordedPurposeSelections, setRecordedPurposeSelections] = useState({});
|
|
3516
|
+
const [recordedAnswers, setRecordedAnswers] = useState({});
|
|
3154
3517
|
const [collapsedProducts, setCollapsedProducts] = useState({});
|
|
3518
|
+
const [pendingAction, setPendingAction] = useState(null);
|
|
3519
|
+
const pendingActionRef = useRef3(null);
|
|
3520
|
+
pendingActionRef.current = pendingAction;
|
|
3521
|
+
const [confirmAction, setConfirmAction] = useState("accept-selected");
|
|
3155
3522
|
const [collapsedPurposes, setCollapsedPurposes] = useState({});
|
|
3156
3523
|
const [hasAlreadyConsented, setHasAlreadyConsented] = useState(false);
|
|
3157
3524
|
const [consentedProducts, setConsentedProducts] = useState({});
|
|
@@ -3189,23 +3556,23 @@ var RedactoNoticeConsent = ({
|
|
|
3189
3556
|
const [isPollingStatus, setIsPollingStatus] = useState(false);
|
|
3190
3557
|
const [isVerificationComplete, setIsVerificationComplete] = useState(false);
|
|
3191
3558
|
const [isAutoTransitioning, setIsAutoTransitioning] = useState(false);
|
|
3192
|
-
const modalRef =
|
|
3193
|
-
const firstFocusableRef =
|
|
3194
|
-
const lastFocusableRef =
|
|
3195
|
-
const abortControllerRef =
|
|
3196
|
-
const isRequestInProgressRef =
|
|
3197
|
-
const currentAudioRef =
|
|
3198
|
-
const popupCheckIntervalRef =
|
|
3199
|
-
const statusPollIntervalRef =
|
|
3200
|
-
const verificationPopupRef =
|
|
3201
|
-
const pollingCleanupRef =
|
|
3202
|
-
const autoTransitionTimerRef =
|
|
3559
|
+
const modalRef = useRef3(null);
|
|
3560
|
+
const firstFocusableRef = useRef3(null);
|
|
3561
|
+
const lastFocusableRef = useRef3(null);
|
|
3562
|
+
const abortControllerRef = useRef3(null);
|
|
3563
|
+
const isRequestInProgressRef = useRef3(false);
|
|
3564
|
+
const currentAudioRef = useRef3(null);
|
|
3565
|
+
const popupCheckIntervalRef = useRef3(null);
|
|
3566
|
+
const statusPollIntervalRef = useRef3(null);
|
|
3567
|
+
const verificationPopupRef = useRef3(null);
|
|
3568
|
+
const pollingCleanupRef = useRef3(null);
|
|
3569
|
+
const autoTransitionTimerRef = useRef3(
|
|
3203
3570
|
null
|
|
3204
3571
|
);
|
|
3205
|
-
const digilockerRedirectTimeoutRef =
|
|
3206
|
-
const isInitialMountRef =
|
|
3207
|
-
const isPollingStatusRef =
|
|
3208
|
-
const verificationSessionTokenRef =
|
|
3572
|
+
const digilockerRedirectTimeoutRef = useRef3(null);
|
|
3573
|
+
const isInitialMountRef = useRef3(true);
|
|
3574
|
+
const isPollingStatusRef = useRef3(false);
|
|
3575
|
+
const verificationSessionTokenRef = useRef3(null);
|
|
3209
3576
|
const isMobile = useMediaQuery("(max-width: 768px)");
|
|
3210
3577
|
const responsiveStyles = useMemo2(
|
|
3211
3578
|
() => ({
|
|
@@ -3347,7 +3714,7 @@ var RedactoNoticeConsent = ({
|
|
|
3347
3714
|
() => gatedProductUuids(content == null ? void 0 : content.products),
|
|
3348
3715
|
[content]
|
|
3349
3716
|
);
|
|
3350
|
-
const productIsRequiredFor =
|
|
3717
|
+
const productIsRequiredFor = useCallback3(
|
|
3351
3718
|
(productUuid) => {
|
|
3352
3719
|
var _a2;
|
|
3353
3720
|
if (!productMandatoryIsAuthoritative) return void 0;
|
|
@@ -3356,59 +3723,98 @@ var RedactoNoticeConsent = ({
|
|
|
3356
3723
|
},
|
|
3357
3724
|
[productMandatoryIsAuthoritative, gatedProducts, content]
|
|
3358
3725
|
);
|
|
3359
|
-
const
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
);
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
const group = rowsByProduct.get(groupKey);
|
|
3383
|
-
if (group) {
|
|
3384
|
-
group.push(row);
|
|
3385
|
-
} else {
|
|
3386
|
-
rowsByProduct.set(groupKey, [row]);
|
|
3387
|
-
}
|
|
3726
|
+
const confirmVerdict = useMemo2(() => {
|
|
3727
|
+
var _a2;
|
|
3728
|
+
if (!content) return { ok: false, reason: "nothing-chosen", blocking: [] };
|
|
3729
|
+
if (purposeRows.length === 0)
|
|
3730
|
+
return { ok: true, reason: "ok", blocking: [] };
|
|
3731
|
+
const rowKey = (row) => productPurposeKey(row.productUuid, row.purpose.uuid);
|
|
3732
|
+
const isSelected = (row) => Boolean(selectedPurposes[rowKey(row)]);
|
|
3733
|
+
const wasRecorded = (row) => Boolean(recordedPurposeSelections[rowKey(row)]);
|
|
3734
|
+
const isMandatory = (row) => hasRequiredDataElement(row.purpose);
|
|
3735
|
+
const satisfies = (rows) => rows.filter(isMandatory).every(isSelected);
|
|
3736
|
+
const rowsByProduct = /* @__PURE__ */ new Map();
|
|
3737
|
+
const unresolved = [];
|
|
3738
|
+
for (const row of purposeRows) {
|
|
3739
|
+
const productUuid = rowProductUuid(row, content.products);
|
|
3740
|
+
if (productUuid === void 0) {
|
|
3741
|
+
unresolved.push(row);
|
|
3742
|
+
continue;
|
|
3743
|
+
}
|
|
3744
|
+
const group = rowsByProduct.get(productUuid);
|
|
3745
|
+
if (group) {
|
|
3746
|
+
group.push(row);
|
|
3747
|
+
} else {
|
|
3748
|
+
rowsByProduct.set(productUuid, [row]);
|
|
3388
3749
|
}
|
|
3750
|
+
}
|
|
3751
|
+
const touched = (rows) => rows.some(isSelected) && rows.some((row) => isSelected(row) !== wasRecorded(row));
|
|
3752
|
+
if (!productMandatoryIsAuthoritative) {
|
|
3389
3753
|
const groups = [...rowsByProduct.values()];
|
|
3754
|
+
if (unresolved.length > 0) groups.push(unresolved);
|
|
3390
3755
|
const everyProductHasMandatory = groups.every(
|
|
3391
|
-
(rows) => rows.some(
|
|
3392
|
-
({ purpose }) => purpose.data_elements.some(isBlockingRequiredElement)
|
|
3393
|
-
)
|
|
3756
|
+
(rows) => rows.some(isMandatory)
|
|
3394
3757
|
);
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3758
|
+
const baseline = everyProductHasMandatory ? groups.some(satisfies) : satisfies(purposeRows);
|
|
3759
|
+
const blocking2 = [...rowsByProduct.entries()].filter(([, rows]) => touched(rows) && !satisfies(rows)).map(([productUuid]) => productUuid);
|
|
3760
|
+
const ok = baseline && blocking2.length === 0;
|
|
3761
|
+
return {
|
|
3762
|
+
ok,
|
|
3763
|
+
reason: ok ? "ok" : blocking2.length > 0 ? "product-incomplete" : "required-outstanding",
|
|
3764
|
+
blocking: blocking2
|
|
3765
|
+
};
|
|
3766
|
+
}
|
|
3767
|
+
if (unresolved.length > 0 && rowsByProduct.size === 0) {
|
|
3768
|
+
const ok = satisfies(unresolved);
|
|
3769
|
+
return { ok, reason: ok ? "ok" : "required-outstanding", blocking: [] };
|
|
3770
|
+
}
|
|
3771
|
+
const scoped = noticeScopesPurposes((_a2 = content.purposes) != null ? _a2 : []);
|
|
3772
|
+
const engagingRows = (rows, productUuid) => scoped ? rows.filter((row) => purposeNamesProduct(row.purpose, productUuid)) : rows;
|
|
3773
|
+
const engaged = [];
|
|
3774
|
+
rowsByProduct.forEach((rows, productUuid) => {
|
|
3775
|
+
if (gatedProducts.has(productUuid)) {
|
|
3776
|
+
engaged.push(productUuid);
|
|
3777
|
+
return;
|
|
3778
|
+
}
|
|
3779
|
+
if (touched(engagingRows(rows, productUuid))) engaged.push(productUuid);
|
|
3780
|
+
});
|
|
3781
|
+
if (engaged.length === 0) {
|
|
3782
|
+
return {
|
|
3783
|
+
ok: false,
|
|
3784
|
+
reason: purposeRows.some(isSelected) ? "nothing-engaged" : "nothing-chosen",
|
|
3785
|
+
blocking: []
|
|
3786
|
+
};
|
|
3787
|
+
}
|
|
3788
|
+
const blocking = engaged.filter(
|
|
3789
|
+
(productUuid) => {
|
|
3790
|
+
var _a3;
|
|
3791
|
+
return !satisfies((_a3 = rowsByProduct.get(productUuid)) != null ? _a3 : []);
|
|
3792
|
+
}
|
|
3793
|
+
);
|
|
3794
|
+
return {
|
|
3795
|
+
ok: blocking.length === 0,
|
|
3796
|
+
reason: blocking.length === 0 ? "ok" : "product-incomplete",
|
|
3797
|
+
blocking
|
|
3798
|
+
};
|
|
3799
|
+
}, [
|
|
3800
|
+
content,
|
|
3801
|
+
purposeRows,
|
|
3802
|
+
selectedPurposes,
|
|
3803
|
+
recordedPurposeSelections,
|
|
3804
|
+
productMandatoryIsAuthoritative,
|
|
3805
|
+
gatedProducts
|
|
3806
|
+
]);
|
|
3807
|
+
const acceptDisabled = isSubmitting || !confirmVerdict.ok;
|
|
3808
|
+
useEffect4(() => {
|
|
3405
3809
|
var _a2, _b2;
|
|
3406
3810
|
clearApiCache();
|
|
3407
3811
|
isRequestInProgressRef.current = false;
|
|
3408
3812
|
setContent(null);
|
|
3409
3813
|
setCategorizedPurposes(null);
|
|
3814
|
+
setPendingAction(null);
|
|
3410
3815
|
setSelectedPurposes({});
|
|
3411
3816
|
setSelectedDataElements({});
|
|
3817
|
+
setRecordedAnswers({});
|
|
3412
3818
|
setInitialDataElementSelections({});
|
|
3413
3819
|
setCollapsedPurposes({});
|
|
3414
3820
|
setCollapsedProducts({});
|
|
@@ -3466,7 +3872,7 @@ var RedactoNoticeConsent = ({
|
|
|
3466
3872
|
}
|
|
3467
3873
|
isInitialMountRef.current = false;
|
|
3468
3874
|
}, [accessToken]);
|
|
3469
|
-
|
|
3875
|
+
useEffect4(() => {
|
|
3470
3876
|
if (hasAlreadyConsented) {
|
|
3471
3877
|
onAccept == null ? void 0 : onAccept();
|
|
3472
3878
|
}
|
|
@@ -3617,11 +4023,11 @@ var RedactoNoticeConsent = ({
|
|
|
3617
4023
|
const newCategorizedPurposes = isReconsentRequired ? {
|
|
3618
4024
|
alreadyConsented: activeConfig.purposes.filter((purpose) => {
|
|
3619
4025
|
const selection = purposeSelections == null ? void 0 : purposeSelections[purpose.uuid];
|
|
3620
|
-
return selection && (selection.status ===
|
|
4026
|
+
return selection && (selection.status === PURPOSE_STATUS_ACTIVE || selection.status === PURPOSE_STATUS_EXPIRED) && !selection.needs_reconsent;
|
|
3621
4027
|
}),
|
|
3622
4028
|
needsConsent: activeConfig.purposes.filter((purpose) => {
|
|
3623
4029
|
const selection = purposeSelections == null ? void 0 : purposeSelections[purpose.uuid];
|
|
3624
|
-
return !selection || selection.status !==
|
|
4030
|
+
return !selection || selection.status !== PURPOSE_STATUS_ACTIVE || selection.needs_reconsent;
|
|
3625
4031
|
})
|
|
3626
4032
|
} : null;
|
|
3627
4033
|
setCategorizedPurposes(newCategorizedPurposes);
|
|
@@ -3684,6 +4090,22 @@ var RedactoNoticeConsent = ({
|
|
|
3684
4090
|
var _a3;
|
|
3685
4091
|
return ((_a3 = recordedFor(purpose.uuid, productUuid)) == null ? void 0 : _a3.selected) === true;
|
|
3686
4092
|
};
|
|
4093
|
+
setRecordedPurposeSelections(
|
|
4094
|
+
seedRows.reduce((acc, row) => {
|
|
4095
|
+
const recorded = recordedFor(row.purpose.uuid, row.productUuid);
|
|
4096
|
+
acc[productPurposeKey(row.productUuid, row.purpose.uuid)] = (recorded == null ? void 0 : recorded.selected) === true && (!recorded.status || recorded.status === PURPOSE_STATUS_ACTIVE) && recorded.needs_reconsent !== true;
|
|
4097
|
+
return acc;
|
|
4098
|
+
}, {})
|
|
4099
|
+
);
|
|
4100
|
+
setRecordedAnswers(
|
|
4101
|
+
seedRows.reduce((acc, row) => {
|
|
4102
|
+
const recorded = recordedFor(row.purpose.uuid, row.productUuid);
|
|
4103
|
+
if (hasRecordedPurposeState(recorded)) {
|
|
4104
|
+
acc[productPurposeKey(row.productUuid, row.purpose.uuid)] = recorded.selected === true;
|
|
4105
|
+
}
|
|
4106
|
+
return acc;
|
|
4107
|
+
}, {})
|
|
4108
|
+
);
|
|
3687
4109
|
const recordedElementSelections = () => {
|
|
3688
4110
|
const selections = {};
|
|
3689
4111
|
seedRows.filter(rowIsRecorded).forEach(({ purpose, productUuid }) => {
|
|
@@ -3705,14 +4127,7 @@ var RedactoNoticeConsent = ({
|
|
|
3705
4127
|
var _a3;
|
|
3706
4128
|
return ((_a3 = recordedFor(purpose.uuid, productUuid)) == null ? void 0 : _a3.needs_reconsent) === true;
|
|
3707
4129
|
};
|
|
3708
|
-
const
|
|
3709
|
-
const marksMandatory = serverMarksMandatoryProducts(
|
|
3710
|
-
activeConfig.products
|
|
3711
|
-
);
|
|
3712
|
-
const rowIsMandatory = (row) => {
|
|
3713
|
-
const resolved = rowProductUuid(row, activeConfig.products);
|
|
3714
|
-
return (!marksMandatory || !!resolved && gated.has(resolved)) && hasRequiredDataElement(row.purpose);
|
|
3715
|
-
};
|
|
4130
|
+
const rowIsMandatory = (row) => hasRequiredDataElement(row.purpose);
|
|
3716
4131
|
const rowsByProduct = /* @__PURE__ */ new Map();
|
|
3717
4132
|
seedRows.forEach((row) => {
|
|
3718
4133
|
var _a3;
|
|
@@ -3784,7 +4199,7 @@ var RedactoNoticeConsent = ({
|
|
|
3784
4199
|
isRequestInProgressRef.current = false;
|
|
3785
4200
|
}
|
|
3786
4201
|
};
|
|
3787
|
-
|
|
4202
|
+
useEffect4(() => {
|
|
3788
4203
|
injectCheckboxStyles();
|
|
3789
4204
|
fetchNotice();
|
|
3790
4205
|
}, [
|
|
@@ -3827,7 +4242,7 @@ var RedactoNoticeConsent = ({
|
|
|
3827
4242
|
setSelectedDataElements((prev) => {
|
|
3828
4243
|
const updated = { ...prev };
|
|
3829
4244
|
purpose.data_elements.forEach((el) => {
|
|
3830
|
-
updated[`${key}-${el.uuid}`] = newPurposeState;
|
|
4245
|
+
updated[`${key}-${el.uuid}`] = el.enabled ? newPurposeState : false;
|
|
3831
4246
|
});
|
|
3832
4247
|
return updated;
|
|
3833
4248
|
});
|
|
@@ -3840,8 +4255,8 @@ var RedactoNoticeConsent = ({
|
|
|
3840
4255
|
[productUuid]: !prev[productUuid]
|
|
3841
4256
|
}));
|
|
3842
4257
|
};
|
|
3843
|
-
const toggleSection = (sectionPurposes, keyProductUuid) => {
|
|
3844
|
-
const nextState = !sectionPurposes.every(
|
|
4258
|
+
const toggleSection = (sectionPurposes, keyProductUuid, target) => {
|
|
4259
|
+
const nextState = target != null ? target : !sectionPurposes.every(
|
|
3845
4260
|
(purpose) => selectedPurposes[productPurposeKey(keyProductUuid, purpose.uuid)]
|
|
3846
4261
|
);
|
|
3847
4262
|
setSelectedPurposes((prev) => {
|
|
@@ -3855,22 +4270,16 @@ var RedactoNoticeConsent = ({
|
|
|
3855
4270
|
sectionPurposes.forEach((purpose) => {
|
|
3856
4271
|
const key = productPurposeKey(keyProductUuid, purpose.uuid);
|
|
3857
4272
|
purpose.data_elements.forEach((element) => {
|
|
3858
|
-
elementOverrides[`${key}-${element.uuid}`] = nextState;
|
|
4273
|
+
elementOverrides[`${key}-${element.uuid}`] = element.enabled ? nextState : false;
|
|
3859
4274
|
});
|
|
3860
4275
|
});
|
|
3861
4276
|
setSelectedDataElements((prev) => ({ ...prev, ...elementOverrides }));
|
|
3862
4277
|
};
|
|
3863
|
-
const productBoxPurposes =
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
const required = purposes.filter(hasRequiredDataElement);
|
|
3869
|
-
return required.length > 0 ? required : purposes;
|
|
3870
|
-
},
|
|
3871
|
-
[productIsRequiredFor]
|
|
3872
|
-
);
|
|
3873
|
-
const handleProductCheckboxChange = (productUuid) => {
|
|
4278
|
+
const productBoxPurposes = useCallback3((purposes) => {
|
|
4279
|
+
const required = purposes.filter(hasRequiredDataElement);
|
|
4280
|
+
return required.length > 0 ? required : purposes;
|
|
4281
|
+
}, []);
|
|
4282
|
+
const handleProductCheckboxChange = (productUuid, next) => {
|
|
3874
4283
|
if (!content) {
|
|
3875
4284
|
return;
|
|
3876
4285
|
}
|
|
@@ -3880,13 +4289,13 @@ var RedactoNoticeConsent = ({
|
|
|
3880
4289
|
if (!group) {
|
|
3881
4290
|
return;
|
|
3882
4291
|
}
|
|
3883
|
-
const editable = productBoxPurposes(
|
|
4292
|
+
const editable = productBoxPurposes(group.purposes).filter(
|
|
3884
4293
|
(purpose) => !consentedPurposes[productPurposeKey(productUuid, purpose.uuid)]
|
|
3885
4294
|
);
|
|
3886
4295
|
if (editable.length === 0) {
|
|
3887
4296
|
return;
|
|
3888
4297
|
}
|
|
3889
|
-
toggleSection(editable, productUuid);
|
|
4298
|
+
toggleSection(editable, productUuid, next);
|
|
3890
4299
|
};
|
|
3891
4300
|
const soleProductSection = (rows) => {
|
|
3892
4301
|
var _a2, _b2;
|
|
@@ -3896,12 +4305,12 @@ var RedactoNoticeConsent = ({
|
|
|
3896
4305
|
}
|
|
3897
4306
|
const product = products[0];
|
|
3898
4307
|
const purposes = (_a2 = content == null ? void 0 : content.purposes) != null ? _a2 : [];
|
|
3899
|
-
const boxPurposes = productBoxPurposes(
|
|
4308
|
+
const boxPurposes = productBoxPurposes(purposes);
|
|
3900
4309
|
const selectedCount = boxPurposes.filter(
|
|
3901
4310
|
(purpose) => selectedPurposes[productPurposeKey(void 0, purpose.uuid)]
|
|
3902
4311
|
).length;
|
|
3903
|
-
return /* @__PURE__ */
|
|
3904
|
-
/* @__PURE__ */
|
|
4312
|
+
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
4313
|
+
/* @__PURE__ */ jsx5(
|
|
3905
4314
|
ProductSectionHeader,
|
|
3906
4315
|
{
|
|
3907
4316
|
product,
|
|
@@ -3916,11 +4325,11 @@ var RedactoNoticeConsent = ({
|
|
|
3916
4325
|
styles,
|
|
3917
4326
|
responsiveStyles,
|
|
3918
4327
|
onToggleCollapse: () => toggleProductCollapse(product.uuid),
|
|
3919
|
-
onToggleSelect: () => toggleSection(boxPurposes, void 0),
|
|
4328
|
+
onToggleSelect: (_productUuid, next) => toggleSection(boxPurposes, void 0, next),
|
|
3920
4329
|
getTranslatedText
|
|
3921
4330
|
}
|
|
3922
4331
|
),
|
|
3923
|
-
!collapsedProducts[product.uuid] && /* @__PURE__ */
|
|
4332
|
+
!collapsedProducts[product.uuid] && /* @__PURE__ */ jsx5("div", { style: styles.sectionBody, children: rows })
|
|
3924
4333
|
] });
|
|
3925
4334
|
};
|
|
3926
4335
|
const handleDataElementCheckboxChange = (elementUuid, purposeUuid, productUuid) => {
|
|
@@ -3935,7 +4344,7 @@ var RedactoNoticeConsent = ({
|
|
|
3935
4344
|
const purpose = content.purposes.find((p) => p.uuid === purposeUuid);
|
|
3936
4345
|
if (purpose) {
|
|
3937
4346
|
const requiredElements = purpose.data_elements.filter(
|
|
3938
|
-
|
|
4347
|
+
isBlockingRequiredElement
|
|
3939
4348
|
);
|
|
3940
4349
|
let shouldCheckPurpose;
|
|
3941
4350
|
if (requiredElements.length > 0) {
|
|
@@ -3987,10 +4396,11 @@ var RedactoNoticeConsent = ({
|
|
|
3987
4396
|
// for the other. Collapses to content.purposes on a single-product
|
|
3988
4397
|
// notice, so that payload is byte-identical to before.
|
|
3989
4398
|
purposes: purposeRows.map(({ purpose, productUuid }) => {
|
|
4399
|
+
var _a2, _b2;
|
|
3990
4400
|
const stateKey = productPurposeKey(productUuid, purpose.uuid);
|
|
3991
|
-
const isAlreadyConsented = (categorizedPurposes == null ? void 0 : categorizedPurposes.alreadyConsented.some(
|
|
4401
|
+
const isAlreadyConsented = ((_a2 = categorizedPurposes == null ? void 0 : categorizedPurposes.alreadyConsented.some(
|
|
3992
4402
|
(p) => p.uuid === purpose.uuid
|
|
3993
|
-
))
|
|
4403
|
+
)) != null ? _a2 : false) && ((_b2 = recordedPurposeSelections[stateKey]) != null ? _b2 : false);
|
|
3994
4404
|
let purposeSelected = selection.selectedPurposes[stateKey] || false;
|
|
3995
4405
|
if (mode === "selected" && isAlreadyConsented) {
|
|
3996
4406
|
const wasModified = purpose.data_elements.some((element) => {
|
|
@@ -4009,7 +4419,7 @@ var RedactoNoticeConsent = ({
|
|
|
4009
4419
|
selected: purposeSelected,
|
|
4010
4420
|
data_elements: purpose.data_elements.map((element) => ({
|
|
4011
4421
|
...element,
|
|
4012
|
-
selected: element
|
|
4422
|
+
selected: isBlockingRequiredElement(element) ? true : selection.selectedDataElements[`${stateKey}-${element.uuid}`] || false
|
|
4013
4423
|
}))
|
|
4014
4424
|
};
|
|
4015
4425
|
}),
|
|
@@ -4036,7 +4446,7 @@ var RedactoNoticeConsent = ({
|
|
|
4036
4446
|
setIsSubmitting(false);
|
|
4037
4447
|
}
|
|
4038
4448
|
};
|
|
4039
|
-
const handleDecline =
|
|
4449
|
+
const handleDecline = useCallback3(async () => {
|
|
4040
4450
|
try {
|
|
4041
4451
|
setIsSubmittingDecline(true);
|
|
4042
4452
|
setIsSubmitting(true);
|
|
@@ -4046,7 +4456,22 @@ var RedactoNoticeConsent = ({
|
|
|
4046
4456
|
setIsSubmitting(false);
|
|
4047
4457
|
}
|
|
4048
4458
|
}, [onDecline]);
|
|
4049
|
-
const
|
|
4459
|
+
const confirmFirst = (kind, action) => () => {
|
|
4460
|
+
if (!(settings == null ? void 0 : settings.confirmBeforeSubmit)) {
|
|
4461
|
+
action();
|
|
4462
|
+
return;
|
|
4463
|
+
}
|
|
4464
|
+
setConfirmAction(kind);
|
|
4465
|
+
setPendingAction(() => action);
|
|
4466
|
+
};
|
|
4467
|
+
const dismissConfirm = useCallback3(() => setPendingAction(null), []);
|
|
4468
|
+
const runPendingAction = useCallback3(() => {
|
|
4469
|
+
const action = pendingActionRef.current;
|
|
4470
|
+
if (!action) return;
|
|
4471
|
+
setPendingAction(null);
|
|
4472
|
+
action();
|
|
4473
|
+
}, []);
|
|
4474
|
+
const handleGuardianFormChange = useCallback3(
|
|
4050
4475
|
(field, value) => {
|
|
4051
4476
|
setGuardianFormData((prev) => ({
|
|
4052
4477
|
...prev,
|
|
@@ -4075,7 +4500,7 @@ var RedactoNoticeConsent = ({
|
|
|
4075
4500
|
setGuardianFormErrors(errors);
|
|
4076
4501
|
return Object.keys(errors).length === 0;
|
|
4077
4502
|
};
|
|
4078
|
-
const handleGuardianFormNext =
|
|
4503
|
+
const handleGuardianFormNext = useCallback3(async () => {
|
|
4079
4504
|
if (!validateGuardianForm()) {
|
|
4080
4505
|
return;
|
|
4081
4506
|
}
|
|
@@ -4216,20 +4641,20 @@ var RedactoNoticeConsent = ({
|
|
|
4216
4641
|
noticeId,
|
|
4217
4642
|
onError
|
|
4218
4643
|
]);
|
|
4219
|
-
const handleAgeVerificationYes =
|
|
4644
|
+
const handleAgeVerificationYes = useCallback3(() => {
|
|
4220
4645
|
setShowAgeVerification(false);
|
|
4221
4646
|
setIsMinorFlow(false);
|
|
4222
4647
|
setSelfDeclaredAdult(true);
|
|
4223
4648
|
}, []);
|
|
4224
|
-
const handleAgeVerificationNo =
|
|
4649
|
+
const handleAgeVerificationNo = useCallback3(() => {
|
|
4225
4650
|
setShowAgeVerification(false);
|
|
4226
4651
|
setShowGuardianForm(true);
|
|
4227
4652
|
}, []);
|
|
4228
|
-
const handleVerificationContinue =
|
|
4653
|
+
const handleVerificationContinue = useCallback3(() => {
|
|
4229
4654
|
setShowVerificationScreen(false);
|
|
4230
4655
|
setIsVerificationComplete(false);
|
|
4231
4656
|
}, []);
|
|
4232
|
-
const handlePopupClosed =
|
|
4657
|
+
const handlePopupClosed = useCallback3(async () => {
|
|
4233
4658
|
var _a2, _b2;
|
|
4234
4659
|
if (popupCheckIntervalRef.current) {
|
|
4235
4660
|
clearInterval(popupCheckIntervalRef.current);
|
|
@@ -4271,7 +4696,7 @@ var RedactoNoticeConsent = ({
|
|
|
4271
4696
|
isPollingStatusRef.current = false;
|
|
4272
4697
|
setIsInitiatingVerification(false);
|
|
4273
4698
|
}, [accessToken, sandboxParams, baseUrl]);
|
|
4274
|
-
const startPopupMonitoring =
|
|
4699
|
+
const startPopupMonitoring = useCallback3(
|
|
4275
4700
|
(popup) => {
|
|
4276
4701
|
popupCheckIntervalRef.current = window.setInterval(() => {
|
|
4277
4702
|
if (popup.closed) {
|
|
@@ -4281,7 +4706,7 @@ var RedactoNoticeConsent = ({
|
|
|
4281
4706
|
},
|
|
4282
4707
|
[handlePopupClosed]
|
|
4283
4708
|
);
|
|
4284
|
-
const getVerificationErrorMessage =
|
|
4709
|
+
const getVerificationErrorMessage = useCallback3(
|
|
4285
4710
|
(errorCode, fallbackError) => {
|
|
4286
4711
|
switch (errorCode) {
|
|
4287
4712
|
case "GUARDIAN_UNDER_18":
|
|
@@ -4300,7 +4725,7 @@ var RedactoNoticeConsent = ({
|
|
|
4300
4725
|
},
|
|
4301
4726
|
[]
|
|
4302
4727
|
);
|
|
4303
|
-
const startStatusPolling =
|
|
4728
|
+
const startStatusPolling = useCallback3(
|
|
4304
4729
|
(token2) => {
|
|
4305
4730
|
verificationSessionTokenRef.current = token2;
|
|
4306
4731
|
setIsPollingStatus(true);
|
|
@@ -4432,7 +4857,7 @@ var RedactoNoticeConsent = ({
|
|
|
4432
4857
|
},
|
|
4433
4858
|
[accessToken, sandboxParams, baseUrl, getVerificationErrorMessage]
|
|
4434
4859
|
);
|
|
4435
|
-
const handleBackToGuardianForm =
|
|
4860
|
+
const handleBackToGuardianForm = useCallback3((clearName = false) => {
|
|
4436
4861
|
var _a2, _b2;
|
|
4437
4862
|
(_a2 = verificationPopupRef.current) == null ? void 0 : _a2.close();
|
|
4438
4863
|
verificationPopupRef.current = null;
|
|
@@ -4477,7 +4902,7 @@ var RedactoNoticeConsent = ({
|
|
|
4477
4902
|
const rest = content.supported_languages_and_translations ? Object.keys(content.supported_languages_and_translations).filter((lang) => !pinned.includes(lang)).sort((a, b) => a.localeCompare(b, "en")) : [];
|
|
4478
4903
|
return [...pinned, ...rest];
|
|
4479
4904
|
}, [content, language]);
|
|
4480
|
-
const getLanguageCode =
|
|
4905
|
+
const getLanguageCode = useCallback3(
|
|
4481
4906
|
(displayLanguage) => {
|
|
4482
4907
|
if (!content) return "English";
|
|
4483
4908
|
if (displayLanguage === "English" || displayLanguage === "en") {
|
|
@@ -4622,7 +5047,7 @@ var RedactoNoticeConsent = ({
|
|
|
4622
5047
|
}
|
|
4623
5048
|
return elementIds;
|
|
4624
5049
|
}, [ttsAudioUrls, content, categorizedPurposes]);
|
|
4625
|
-
const stopAudio =
|
|
5050
|
+
const stopAudio = useCallback3(() => {
|
|
4626
5051
|
if (currentAudioRef.current) {
|
|
4627
5052
|
currentAudioRef.current.pause();
|
|
4628
5053
|
currentAudioRef.current.currentTime = 0;
|
|
@@ -4633,7 +5058,7 @@ var RedactoNoticeConsent = ({
|
|
|
4633
5058
|
setCurrentAudioIndex(0);
|
|
4634
5059
|
setHighlightedElementId(null);
|
|
4635
5060
|
}, []);
|
|
4636
|
-
const playNextAudio =
|
|
5061
|
+
const playNextAudio = useCallback3(
|
|
4637
5062
|
(index) => {
|
|
4638
5063
|
if (index >= audioSequence.length) {
|
|
4639
5064
|
stopAudio();
|
|
@@ -4666,7 +5091,7 @@ var RedactoNoticeConsent = ({
|
|
|
4666
5091
|
},
|
|
4667
5092
|
[audioSequence, elementIdSequence, stopAudio]
|
|
4668
5093
|
);
|
|
4669
|
-
const playAudio =
|
|
5094
|
+
const playAudio = useCallback3(() => {
|
|
4670
5095
|
if (audioSequence.length === 0) return;
|
|
4671
5096
|
if (isPaused && currentAudioRef.current) {
|
|
4672
5097
|
currentAudioRef.current.play().then(() => {
|
|
@@ -4680,21 +5105,21 @@ var RedactoNoticeConsent = ({
|
|
|
4680
5105
|
playNextAudio(startIndex);
|
|
4681
5106
|
}
|
|
4682
5107
|
}, [audioSequence, isPaused, isPlaying, currentAudioIndex, playNextAudio]);
|
|
4683
|
-
const pauseAudio =
|
|
5108
|
+
const pauseAudio = useCallback3(() => {
|
|
4684
5109
|
if (currentAudioRef.current && isPlaying) {
|
|
4685
5110
|
currentAudioRef.current.pause();
|
|
4686
5111
|
setIsPlaying(false);
|
|
4687
5112
|
setIsPaused(true);
|
|
4688
5113
|
}
|
|
4689
5114
|
}, [isPlaying]);
|
|
4690
|
-
const toggleAudio =
|
|
5115
|
+
const toggleAudio = useCallback3(() => {
|
|
4691
5116
|
if (isPlaying) {
|
|
4692
5117
|
pauseAudio();
|
|
4693
5118
|
} else {
|
|
4694
5119
|
playAudio();
|
|
4695
5120
|
}
|
|
4696
5121
|
}, [isPlaying, playAudio, pauseAudio]);
|
|
4697
|
-
|
|
5122
|
+
useEffect4(() => {
|
|
4698
5123
|
var _a2;
|
|
4699
5124
|
if (!isPlaying || !content || audioSequence.length === 0) return;
|
|
4700
5125
|
const currentIndex = currentAudioIndex;
|
|
@@ -4735,7 +5160,7 @@ var RedactoNoticeConsent = ({
|
|
|
4735
5160
|
categorizedPurposes,
|
|
4736
5161
|
collapsedPurposes
|
|
4737
5162
|
]);
|
|
4738
|
-
|
|
5163
|
+
useEffect4(() => {
|
|
4739
5164
|
const removeAllHighlights = () => {
|
|
4740
5165
|
document.querySelectorAll(".redacto-tts-highlight").forEach((el) => {
|
|
4741
5166
|
el.classList.remove("redacto-tts-highlight");
|
|
@@ -4771,7 +5196,7 @@ var RedactoNoticeConsent = ({
|
|
|
4771
5196
|
removeAllHighlights();
|
|
4772
5197
|
};
|
|
4773
5198
|
}, [highlightedElementId, isPlaying]);
|
|
4774
|
-
|
|
5199
|
+
useEffect4(() => {
|
|
4775
5200
|
setIsTTSAvailable(false);
|
|
4776
5201
|
setTtsAudioUrls(null);
|
|
4777
5202
|
stopAudio();
|
|
@@ -4814,26 +5239,42 @@ var RedactoNoticeConsent = ({
|
|
|
4814
5239
|
backgroundColor: (settings == null ? void 0 : settings.backgroundColor) || "#ffffff",
|
|
4815
5240
|
fontFamily
|
|
4816
5241
|
};
|
|
4817
|
-
const
|
|
5242
|
+
const buttonStyle2 = {
|
|
4818
5243
|
borderRadius: (settings == null ? void 0 : settings.borderRadius) || "8px"
|
|
4819
5244
|
};
|
|
4820
5245
|
const acceptAllButtonStyle = {
|
|
4821
|
-
...
|
|
5246
|
+
...buttonStyle2,
|
|
4822
5247
|
backgroundColor: ((_b = (_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.acceptAll) == null ? void 0 : _b.backgroundColor) || ((_d = (_c = settings == null ? void 0 : settings.button) == null ? void 0 : _c.accept) == null ? void 0 : _d.backgroundColor) || (content == null ? void 0 : content.primary_color) || "#4f87ff",
|
|
4823
5248
|
color: ((_f = (_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.acceptAll) == null ? void 0 : _f.textColor) || ((_h = (_g = settings == null ? void 0 : settings.button) == null ? void 0 : _g.accept) == null ? void 0 : _h.textColor) || "#ffffff"
|
|
4824
5249
|
};
|
|
4825
5250
|
const acceptSelectedButtonStyle = {
|
|
4826
|
-
...
|
|
5251
|
+
...buttonStyle2,
|
|
4827
5252
|
backgroundColor: "#ffffff",
|
|
4828
5253
|
color: ((_j = (_i = settings == null ? void 0 : settings.button) == null ? void 0 : _i.accept) == null ? void 0 : _j.backgroundColor) || (content == null ? void 0 : content.primary_color) || "#4f87ff",
|
|
4829
5254
|
borderColor: ((_l = (_k = settings == null ? void 0 : settings.button) == null ? void 0 : _k.accept) == null ? void 0 : _l.backgroundColor) || (content == null ? void 0 : content.primary_color) || "#4f87ff"
|
|
4830
5255
|
};
|
|
4831
5256
|
const declineButtonStyle = {
|
|
4832
|
-
...
|
|
5257
|
+
...buttonStyle2,
|
|
4833
5258
|
backgroundColor: ((_n = (_m = settings == null ? void 0 : settings.button) == null ? void 0 : _m.decline) == null ? void 0 : _n.backgroundColor) || "#ffffff",
|
|
4834
5259
|
color: ((_p = (_o = settings == null ? void 0 : settings.button) == null ? void 0 : _o.decline) == null ? void 0 : _p.textColor) || "#000000",
|
|
4835
5260
|
borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
|
|
4836
5261
|
};
|
|
5262
|
+
const confirmHint = useMemo2(() => {
|
|
5263
|
+
var _a2;
|
|
5264
|
+
const { ok, reason, blocking } = confirmVerdict;
|
|
5265
|
+
if (ok || reason === "ok" || isSubmitting) return null;
|
|
5266
|
+
if (reason !== "product-incomplete") {
|
|
5267
|
+
return CONFIRM_HINT_COPY[reason];
|
|
5268
|
+
}
|
|
5269
|
+
const byUuid = new Map(
|
|
5270
|
+
((_a2 = content == null ? void 0 : content.products) != null ? _a2 : []).map((product) => [product.uuid, product])
|
|
5271
|
+
);
|
|
5272
|
+
const names = blocking.map((uuid) => {
|
|
5273
|
+
const product = byUuid.get(uuid);
|
|
5274
|
+
return product ? getTranslatedText("products.name", product.name, product.uuid) : uuid;
|
|
5275
|
+
});
|
|
5276
|
+
return CONFIRM_HINT_COPY.productsIncomplete(names);
|
|
5277
|
+
}, [confirmVerdict, isSubmitting, content, getTranslatedText]);
|
|
4837
5278
|
const actionLabels = {
|
|
4838
5279
|
acceptAll: getTranslatedText(
|
|
4839
5280
|
"accept_all_button_text",
|
|
@@ -4868,9 +5309,10 @@ var RedactoNoticeConsent = ({
|
|
|
4868
5309
|
const handleCloseError = () => {
|
|
4869
5310
|
setErrorMessage(null);
|
|
4870
5311
|
};
|
|
4871
|
-
|
|
5312
|
+
useEffect4(() => {
|
|
4872
5313
|
const handleKeyDown = (event) => {
|
|
4873
5314
|
if (!modalRef.current) return;
|
|
5315
|
+
if (pendingActionRef.current) return;
|
|
4874
5316
|
const focusableElements = modalRef.current.querySelectorAll(
|
|
4875
5317
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
4876
5318
|
);
|
|
@@ -4907,13 +5349,13 @@ var RedactoNoticeConsent = ({
|
|
|
4907
5349
|
modal == null ? void 0 : modal.removeEventListener("keydown", handleKeyDown);
|
|
4908
5350
|
};
|
|
4909
5351
|
}, [isLoading, handleDecline]);
|
|
4910
|
-
|
|
5352
|
+
useEffect4(() => {
|
|
4911
5353
|
stopAudio();
|
|
4912
5354
|
}, [selectedLanguage, stopAudio]);
|
|
4913
|
-
|
|
5355
|
+
useEffect4(() => {
|
|
4914
5356
|
stopAudio();
|
|
4915
5357
|
}, [content, stopAudio]);
|
|
4916
|
-
|
|
5358
|
+
useEffect4(() => {
|
|
4917
5359
|
return () => {
|
|
4918
5360
|
var _a2, _b2;
|
|
4919
5361
|
if (abortControllerRef.current) {
|
|
@@ -4939,7 +5381,7 @@ var RedactoNoticeConsent = ({
|
|
|
4939
5381
|
}
|
|
4940
5382
|
};
|
|
4941
5383
|
}, [stopAudio]);
|
|
4942
|
-
|
|
5384
|
+
useEffect4(() => {
|
|
4943
5385
|
const persistedState = getConsentState();
|
|
4944
5386
|
if (!persistedState) return;
|
|
4945
5387
|
if (persistedState.noticeId && persistedState.noticeId !== noticeId) {
|
|
@@ -4976,8 +5418,8 @@ var RedactoNoticeConsent = ({
|
|
|
4976
5418
|
clearConsentState();
|
|
4977
5419
|
}
|
|
4978
5420
|
}, [startStatusPolling, noticeId]);
|
|
4979
|
-
return /* @__PURE__ */
|
|
4980
|
-
blockUI && /* @__PURE__ */
|
|
5421
|
+
return /* @__PURE__ */ jsx5(Fragment2, { children: hasAlreadyConsented ? null : /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
5422
|
+
blockUI && /* @__PURE__ */ jsx5(
|
|
4981
5423
|
"div",
|
|
4982
5424
|
{
|
|
4983
5425
|
style: styles.overlay,
|
|
@@ -4985,7 +5427,7 @@ var RedactoNoticeConsent = ({
|
|
|
4985
5427
|
role: "presentation"
|
|
4986
5428
|
}
|
|
4987
5429
|
),
|
|
4988
|
-
/* @__PURE__ */
|
|
5430
|
+
/* @__PURE__ */ jsx5(
|
|
4989
5431
|
"div",
|
|
4990
5432
|
{
|
|
4991
5433
|
ref: modalRef,
|
|
@@ -5000,7 +5442,7 @@ var RedactoNoticeConsent = ({
|
|
|
5000
5442
|
"aria-labelledby": "privacy-notice-title",
|
|
5001
5443
|
"aria-describedby": "privacy-notice-description",
|
|
5002
5444
|
tabIndex: -1,
|
|
5003
|
-
children: isLoading ? /* @__PURE__ */
|
|
5445
|
+
children: isLoading ? /* @__PURE__ */ jsxs4(
|
|
5004
5446
|
"div",
|
|
5005
5447
|
{
|
|
5006
5448
|
role: "status",
|
|
@@ -5008,11 +5450,11 @@ var RedactoNoticeConsent = ({
|
|
|
5008
5450
|
"aria-label": "Loading consent notice",
|
|
5009
5451
|
style: styles.loadingContainer,
|
|
5010
5452
|
children: [
|
|
5011
|
-
/* @__PURE__ */
|
|
5012
|
-
/* @__PURE__ */
|
|
5453
|
+
/* @__PURE__ */ jsx5("div", { style: styles.loadingSpinner, "aria-hidden": "true" }),
|
|
5454
|
+
/* @__PURE__ */ jsx5("p", { style: { ...styles.privacyText, ...componentTextStyle }, children: "Loading..." })
|
|
5013
5455
|
]
|
|
5014
5456
|
}
|
|
5015
|
-
) : fetchError ? /* @__PURE__ */
|
|
5457
|
+
) : fetchError ? /* @__PURE__ */ jsx5(
|
|
5016
5458
|
"div",
|
|
5017
5459
|
{
|
|
5018
5460
|
role: "alert",
|
|
@@ -5028,7 +5470,7 @@ var RedactoNoticeConsent = ({
|
|
|
5028
5470
|
textAlign: "center",
|
|
5029
5471
|
padding: "40px 20px"
|
|
5030
5472
|
},
|
|
5031
|
-
children: /* @__PURE__ */
|
|
5473
|
+
children: /* @__PURE__ */ jsxs4(
|
|
5032
5474
|
"div",
|
|
5033
5475
|
{
|
|
5034
5476
|
style: {
|
|
@@ -5041,7 +5483,7 @@ var RedactoNoticeConsent = ({
|
|
|
5041
5483
|
position: "relative"
|
|
5042
5484
|
},
|
|
5043
5485
|
children: [
|
|
5044
|
-
/* @__PURE__ */
|
|
5486
|
+
/* @__PURE__ */ jsx5(
|
|
5045
5487
|
"button",
|
|
5046
5488
|
{
|
|
5047
5489
|
onClick: handleDecline,
|
|
@@ -5059,7 +5501,7 @@ var RedactoNoticeConsent = ({
|
|
|
5059
5501
|
justifyContent: "center"
|
|
5060
5502
|
},
|
|
5061
5503
|
"aria-label": "Close error message",
|
|
5062
|
-
children: /* @__PURE__ */
|
|
5504
|
+
children: /* @__PURE__ */ jsx5(
|
|
5063
5505
|
"svg",
|
|
5064
5506
|
{
|
|
5065
5507
|
width: isMobile ? "14" : "16",
|
|
@@ -5068,7 +5510,7 @@ var RedactoNoticeConsent = ({
|
|
|
5068
5510
|
fill: "none",
|
|
5069
5511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5070
5512
|
"aria-hidden": "true",
|
|
5071
|
-
children: /* @__PURE__ */
|
|
5513
|
+
children: /* @__PURE__ */ jsx5(
|
|
5072
5514
|
"path",
|
|
5073
5515
|
{
|
|
5074
5516
|
d: "M12 4L4 12M4 4L12 12",
|
|
@@ -5082,7 +5524,7 @@ var RedactoNoticeConsent = ({
|
|
|
5082
5524
|
)
|
|
5083
5525
|
}
|
|
5084
5526
|
),
|
|
5085
|
-
/* @__PURE__ */
|
|
5527
|
+
/* @__PURE__ */ jsx5(
|
|
5086
5528
|
"h3",
|
|
5087
5529
|
{
|
|
5088
5530
|
style: {
|
|
@@ -5093,7 +5535,7 @@ var RedactoNoticeConsent = ({
|
|
|
5093
5535
|
children: "Error Loading Consent Notice"
|
|
5094
5536
|
}
|
|
5095
5537
|
),
|
|
5096
|
-
/* @__PURE__ */
|
|
5538
|
+
/* @__PURE__ */ jsx5(
|
|
5097
5539
|
"p",
|
|
5098
5540
|
{
|
|
5099
5541
|
style: {
|
|
@@ -5104,7 +5546,7 @@ var RedactoNoticeConsent = ({
|
|
|
5104
5546
|
children: fetchError.message || "Failed to load consent notice. Please try again."
|
|
5105
5547
|
}
|
|
5106
5548
|
),
|
|
5107
|
-
/* @__PURE__ */
|
|
5549
|
+
/* @__PURE__ */ jsx5(
|
|
5108
5550
|
"button",
|
|
5109
5551
|
{
|
|
5110
5552
|
onClick: fetchNotice,
|
|
@@ -5129,7 +5571,7 @@ var RedactoNoticeConsent = ({
|
|
|
5129
5571
|
}
|
|
5130
5572
|
)
|
|
5131
5573
|
}
|
|
5132
|
-
) : showAgeVerification ? /* @__PURE__ */
|
|
5574
|
+
) : showAgeVerification ? /* @__PURE__ */ jsx5("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ jsx5(
|
|
5133
5575
|
AgeVerification,
|
|
5134
5576
|
{
|
|
5135
5577
|
onYes: handleAgeVerificationYes,
|
|
@@ -5144,7 +5586,7 @@ var RedactoNoticeConsent = ({
|
|
|
5144
5586
|
logoUrl: (content == null ? void 0 : content.logo_url) || redacto_logo_default,
|
|
5145
5587
|
isMobile
|
|
5146
5588
|
}
|
|
5147
|
-
) }) : showGuardianForm ? /* @__PURE__ */
|
|
5589
|
+
) }) : showGuardianForm ? /* @__PURE__ */ jsx5("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ jsx5(
|
|
5148
5590
|
GuardianForm,
|
|
5149
5591
|
{
|
|
5150
5592
|
formData: guardianFormData,
|
|
@@ -5162,7 +5604,7 @@ var RedactoNoticeConsent = ({
|
|
|
5162
5604
|
declineButtonStyle,
|
|
5163
5605
|
logoUrl: (content == null ? void 0 : content.logo_url) || redacto_logo_default
|
|
5164
5606
|
}
|
|
5165
|
-
) }) : showVerificationScreen ? /* @__PURE__ */
|
|
5607
|
+
) }) : showVerificationScreen ? /* @__PURE__ */ jsx5("div", { style: { ...styles.content, ...responsiveStyles.content }, children: /* @__PURE__ */ jsx5(
|
|
5166
5608
|
VerificationScreen,
|
|
5167
5609
|
{
|
|
5168
5610
|
onBack: handleBackToGuardianForm,
|
|
@@ -5183,8 +5625,8 @@ var RedactoNoticeConsent = ({
|
|
|
5183
5625
|
declineButtonStyle,
|
|
5184
5626
|
logoUrl: (content == null ? void 0 : content.logo_url) || redacto_logo_default
|
|
5185
5627
|
}
|
|
5186
|
-
) }) : /* @__PURE__ */
|
|
5187
|
-
errorMessage && /* @__PURE__ */
|
|
5628
|
+
) }) : /* @__PURE__ */ jsxs4("div", { style: { ...styles.content, ...responsiveStyles.content }, children: [
|
|
5629
|
+
errorMessage && /* @__PURE__ */ jsxs4(
|
|
5188
5630
|
"div",
|
|
5189
5631
|
{
|
|
5190
5632
|
role: "alert",
|
|
@@ -5202,8 +5644,8 @@ var RedactoNoticeConsent = ({
|
|
|
5202
5644
|
justifyContent: "space-between"
|
|
5203
5645
|
},
|
|
5204
5646
|
children: [
|
|
5205
|
-
/* @__PURE__ */
|
|
5206
|
-
/* @__PURE__ */
|
|
5647
|
+
/* @__PURE__ */ jsx5("span", { children: errorMessage }),
|
|
5648
|
+
/* @__PURE__ */ jsx5(
|
|
5207
5649
|
"button",
|
|
5208
5650
|
{
|
|
5209
5651
|
type: "button",
|
|
@@ -5220,7 +5662,7 @@ var RedactoNoticeConsent = ({
|
|
|
5220
5662
|
justifyContent: "center"
|
|
5221
5663
|
},
|
|
5222
5664
|
"aria-label": "Close error message",
|
|
5223
|
-
children: /* @__PURE__ */
|
|
5665
|
+
children: /* @__PURE__ */ jsx5(
|
|
5224
5666
|
"svg",
|
|
5225
5667
|
{
|
|
5226
5668
|
width: "16",
|
|
@@ -5229,7 +5671,7 @@ var RedactoNoticeConsent = ({
|
|
|
5229
5671
|
fill: "none",
|
|
5230
5672
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5231
5673
|
"aria-hidden": "true",
|
|
5232
|
-
children: /* @__PURE__ */
|
|
5674
|
+
children: /* @__PURE__ */ jsx5(
|
|
5233
5675
|
"path",
|
|
5234
5676
|
{
|
|
5235
5677
|
d: "M12 4L4 12M4 4L12 12",
|
|
@@ -5246,7 +5688,7 @@ var RedactoNoticeConsent = ({
|
|
|
5246
5688
|
]
|
|
5247
5689
|
}
|
|
5248
5690
|
),
|
|
5249
|
-
/* @__PURE__ */
|
|
5691
|
+
/* @__PURE__ */ jsx5(
|
|
5250
5692
|
"div",
|
|
5251
5693
|
{
|
|
5252
5694
|
style: {
|
|
@@ -5256,7 +5698,7 @@ var RedactoNoticeConsent = ({
|
|
|
5256
5698
|
},
|
|
5257
5699
|
children: (() => {
|
|
5258
5700
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
5259
|
-
const logoNode = /* @__PURE__ */
|
|
5701
|
+
const logoNode = /* @__PURE__ */ jsx5(
|
|
5260
5702
|
"img",
|
|
5261
5703
|
{
|
|
5262
5704
|
style: { ...styles.logo, ...responsiveStyles.logo },
|
|
@@ -5264,7 +5706,7 @@ var RedactoNoticeConsent = ({
|
|
|
5264
5706
|
alt: "Redacto Logo"
|
|
5265
5707
|
}
|
|
5266
5708
|
);
|
|
5267
|
-
const titleNode = /* @__PURE__ */
|
|
5709
|
+
const titleNode = /* @__PURE__ */ jsx5(
|
|
5268
5710
|
"h2",
|
|
5269
5711
|
{
|
|
5270
5712
|
id: "privacy-notice-title",
|
|
@@ -5280,8 +5722,8 @@ var RedactoNoticeConsent = ({
|
|
|
5280
5722
|
},
|
|
5281
5723
|
`privacy-notice-title-${selectedLanguage}`
|
|
5282
5724
|
);
|
|
5283
|
-
const controlsBlock = /* @__PURE__ */
|
|
5284
|
-
/* @__PURE__ */
|
|
5725
|
+
const controlsBlock = /* @__PURE__ */ jsxs4("div", { style: styles.languageSelectorContainer, children: [
|
|
5726
|
+
/* @__PURE__ */ jsxs4(
|
|
5285
5727
|
"div",
|
|
5286
5728
|
{
|
|
5287
5729
|
style: {
|
|
@@ -5290,7 +5732,7 @@ var RedactoNoticeConsent = ({
|
|
|
5290
5732
|
gap: "8px"
|
|
5291
5733
|
},
|
|
5292
5734
|
children: [
|
|
5293
|
-
isTTSAvailable && /* @__PURE__ */
|
|
5735
|
+
isTTSAvailable && /* @__PURE__ */ jsx5(
|
|
5294
5736
|
"button",
|
|
5295
5737
|
{
|
|
5296
5738
|
onClick: toggleAudio,
|
|
@@ -5307,7 +5749,7 @@ var RedactoNoticeConsent = ({
|
|
|
5307
5749
|
title: isPlaying && !isPaused ? "Pause Talkback" : isPaused ? "Resume Talkback" : "Start Talkback",
|
|
5308
5750
|
children: isPlaying && !isPaused ? (
|
|
5309
5751
|
// Pause icon
|
|
5310
|
-
/* @__PURE__ */
|
|
5752
|
+
/* @__PURE__ */ jsxs4(
|
|
5311
5753
|
"svg",
|
|
5312
5754
|
{
|
|
5313
5755
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5321,14 +5763,14 @@ var RedactoNoticeConsent = ({
|
|
|
5321
5763
|
strokeLinejoin: "round",
|
|
5322
5764
|
"aria-hidden": "true",
|
|
5323
5765
|
children: [
|
|
5324
|
-
/* @__PURE__ */
|
|
5325
|
-
/* @__PURE__ */
|
|
5766
|
+
/* @__PURE__ */ jsx5("rect", { x: "6", y: "4", width: "4", height: "16" }),
|
|
5767
|
+
/* @__PURE__ */ jsx5("rect", { x: "14", y: "4", width: "4", height: "16" })
|
|
5326
5768
|
]
|
|
5327
5769
|
}
|
|
5328
5770
|
)
|
|
5329
5771
|
) : (
|
|
5330
5772
|
// Play/Sound icon
|
|
5331
|
-
/* @__PURE__ */
|
|
5773
|
+
/* @__PURE__ */ jsxs4(
|
|
5332
5774
|
"svg",
|
|
5333
5775
|
{
|
|
5334
5776
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5342,15 +5784,15 @@ var RedactoNoticeConsent = ({
|
|
|
5342
5784
|
strokeLinejoin: "round",
|
|
5343
5785
|
"aria-hidden": "true",
|
|
5344
5786
|
children: [
|
|
5345
|
-
/* @__PURE__ */
|
|
5346
|
-
/* @__PURE__ */
|
|
5787
|
+
/* @__PURE__ */ jsx5("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
5788
|
+
/* @__PURE__ */ jsx5("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
5347
5789
|
]
|
|
5348
5790
|
}
|
|
5349
5791
|
)
|
|
5350
5792
|
)
|
|
5351
5793
|
}
|
|
5352
5794
|
),
|
|
5353
|
-
/* @__PURE__ */
|
|
5795
|
+
/* @__PURE__ */ jsx5("div", { children: /* @__PURE__ */ jsxs4(
|
|
5354
5796
|
"button",
|
|
5355
5797
|
{
|
|
5356
5798
|
ref: firstFocusableRef,
|
|
@@ -5366,7 +5808,7 @@ var RedactoNoticeConsent = ({
|
|
|
5366
5808
|
"aria-label": `Select language. Current language: ${toNativeLabel(selectedLanguage)}`,
|
|
5367
5809
|
children: [
|
|
5368
5810
|
toNativeLabel(selectedLanguage),
|
|
5369
|
-
/* @__PURE__ */
|
|
5811
|
+
/* @__PURE__ */ jsx5(
|
|
5370
5812
|
"svg",
|
|
5371
5813
|
{
|
|
5372
5814
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5380,7 +5822,7 @@ var RedactoNoticeConsent = ({
|
|
|
5380
5822
|
strokeLinejoin: "round",
|
|
5381
5823
|
style: { flexShrink: 0, marginLeft: "4px" },
|
|
5382
5824
|
"aria-hidden": "true",
|
|
5383
|
-
children: /* @__PURE__ */
|
|
5825
|
+
children: /* @__PURE__ */ jsx5("path", { d: "M4 6l4 4 4-4" })
|
|
5384
5826
|
}
|
|
5385
5827
|
)
|
|
5386
5828
|
]
|
|
@@ -5389,7 +5831,7 @@ var RedactoNoticeConsent = ({
|
|
|
5389
5831
|
]
|
|
5390
5832
|
}
|
|
5391
5833
|
),
|
|
5392
|
-
isLanguageDropdownOpen && /* @__PURE__ */
|
|
5834
|
+
isLanguageDropdownOpen && /* @__PURE__ */ jsx5(
|
|
5393
5835
|
"ul",
|
|
5394
5836
|
{
|
|
5395
5837
|
id: "language-listbox",
|
|
@@ -5399,7 +5841,7 @@ var RedactoNoticeConsent = ({
|
|
|
5399
5841
|
},
|
|
5400
5842
|
role: "listbox",
|
|
5401
5843
|
"aria-label": "Select language",
|
|
5402
|
-
children: availableLanguages.map((lang) => /* @__PURE__ */
|
|
5844
|
+
children: availableLanguages.map((lang) => /* @__PURE__ */ jsx5(
|
|
5403
5845
|
"li",
|
|
5404
5846
|
{
|
|
5405
5847
|
style: {
|
|
@@ -5420,9 +5862,9 @@ var RedactoNoticeConsent = ({
|
|
|
5420
5862
|
}
|
|
5421
5863
|
)
|
|
5422
5864
|
] });
|
|
5423
|
-
return /* @__PURE__ */
|
|
5424
|
-
/* @__PURE__ */
|
|
5425
|
-
/* @__PURE__ */
|
|
5865
|
+
return /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
5866
|
+
/* @__PURE__ */ jsx5("div", { style: logoRowStyle, children: logoNode }),
|
|
5867
|
+
/* @__PURE__ */ jsxs4("div", { style: styles.headerRow, children: [
|
|
5426
5868
|
titleNode,
|
|
5427
5869
|
controlsBlock
|
|
5428
5870
|
] })
|
|
@@ -5430,7 +5872,7 @@ var RedactoNoticeConsent = ({
|
|
|
5430
5872
|
})()
|
|
5431
5873
|
}
|
|
5432
5874
|
),
|
|
5433
|
-
/* @__PURE__ */
|
|
5875
|
+
/* @__PURE__ */ jsxs4(
|
|
5434
5876
|
"div",
|
|
5435
5877
|
{
|
|
5436
5878
|
id: "privacy-notice-description",
|
|
@@ -5440,7 +5882,7 @@ var RedactoNoticeConsent = ({
|
|
|
5440
5882
|
...sectionStyle
|
|
5441
5883
|
},
|
|
5442
5884
|
children: [
|
|
5443
|
-
/* @__PURE__ */
|
|
5885
|
+
/* @__PURE__ */ jsxs4(
|
|
5444
5886
|
"p",
|
|
5445
5887
|
{
|
|
5446
5888
|
style: {
|
|
@@ -5449,7 +5891,7 @@ var RedactoNoticeConsent = ({
|
|
|
5449
5891
|
...componentTextStyle
|
|
5450
5892
|
},
|
|
5451
5893
|
children: [
|
|
5452
|
-
/* @__PURE__ */
|
|
5894
|
+
/* @__PURE__ */ jsx5(
|
|
5453
5895
|
"span",
|
|
5454
5896
|
{
|
|
5455
5897
|
id: "privacy-notice-text",
|
|
@@ -5457,8 +5899,8 @@ var RedactoNoticeConsent = ({
|
|
|
5457
5899
|
},
|
|
5458
5900
|
`privacy-notice-text-${selectedLanguage}`
|
|
5459
5901
|
),
|
|
5460
|
-
/* @__PURE__ */
|
|
5461
|
-
/* @__PURE__ */
|
|
5902
|
+
/* @__PURE__ */ jsx5("br", {}),
|
|
5903
|
+
/* @__PURE__ */ jsxs4(
|
|
5462
5904
|
"span",
|
|
5463
5905
|
{
|
|
5464
5906
|
id: "privacy-policy-text",
|
|
@@ -5468,7 +5910,7 @@ var RedactoNoticeConsent = ({
|
|
|
5468
5910
|
(content == null ? void 0 : content.privacy_policy_prefix_text) || ""
|
|
5469
5911
|
),
|
|
5470
5912
|
" ",
|
|
5471
|
-
/* @__PURE__ */
|
|
5913
|
+
/* @__PURE__ */ jsx5(
|
|
5472
5914
|
"a",
|
|
5473
5915
|
{
|
|
5474
5916
|
id: "privacy-policy-link",
|
|
@@ -5491,7 +5933,7 @@ var RedactoNoticeConsent = ({
|
|
|
5491
5933
|
},
|
|
5492
5934
|
`privacy-text-${selectedLanguage}`
|
|
5493
5935
|
),
|
|
5494
|
-
/* @__PURE__ */
|
|
5936
|
+
/* @__PURE__ */ jsx5(
|
|
5495
5937
|
"h2",
|
|
5496
5938
|
{
|
|
5497
5939
|
id: "purpose-section-heading",
|
|
@@ -5507,19 +5949,17 @@ var RedactoNoticeConsent = ({
|
|
|
5507
5949
|
},
|
|
5508
5950
|
`purpose-section-heading-${selectedLanguage}`
|
|
5509
5951
|
),
|
|
5510
|
-
categorizedPurposes && !isMultiProduct(content == null ? void 0 : content.products) ? /* @__PURE__ */
|
|
5511
|
-
/* @__PURE__ */
|
|
5952
|
+
categorizedPurposes && !isMultiProduct(content == null ? void 0 : content.products) ? /* @__PURE__ */ jsx5("div", { style: styles.optionsContainer, children: soleProductSection(
|
|
5953
|
+
/* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
5512
5954
|
categorizedPurposes.alreadyConsented.map(
|
|
5513
|
-
(purpose) => /* @__PURE__ */
|
|
5955
|
+
(purpose) => /* @__PURE__ */ jsx5(
|
|
5514
5956
|
PurposeItem,
|
|
5515
5957
|
{
|
|
5516
5958
|
purpose,
|
|
5517
|
-
productIsRequired: productIsRequiredFor(
|
|
5518
|
-
void 0
|
|
5519
|
-
),
|
|
5520
5959
|
selectedPurposes,
|
|
5521
5960
|
collapsedPurposes,
|
|
5522
5961
|
selectedDataElements,
|
|
5962
|
+
recordedAnswers,
|
|
5523
5963
|
settings,
|
|
5524
5964
|
styles,
|
|
5525
5965
|
responsiveStyles,
|
|
@@ -5534,16 +5974,14 @@ var RedactoNoticeConsent = ({
|
|
|
5534
5974
|
`${purpose.uuid}-${selectedLanguage}`
|
|
5535
5975
|
)
|
|
5536
5976
|
),
|
|
5537
|
-
categorizedPurposes.needsConsent.map((purpose) => /* @__PURE__ */
|
|
5977
|
+
categorizedPurposes.needsConsent.map((purpose) => /* @__PURE__ */ jsx5(
|
|
5538
5978
|
PurposeItem,
|
|
5539
5979
|
{
|
|
5540
5980
|
purpose,
|
|
5541
|
-
productIsRequired: productIsRequiredFor(
|
|
5542
|
-
void 0
|
|
5543
|
-
),
|
|
5544
5981
|
selectedPurposes,
|
|
5545
5982
|
collapsedPurposes,
|
|
5546
5983
|
selectedDataElements,
|
|
5984
|
+
recordedAnswers,
|
|
5547
5985
|
settings,
|
|
5548
5986
|
styles,
|
|
5549
5987
|
responsiveStyles,
|
|
@@ -5559,10 +5997,9 @@ var RedactoNoticeConsent = ({
|
|
|
5559
5997
|
] })
|
|
5560
5998
|
) }) : (
|
|
5561
5999
|
/* Regular consent UI */
|
|
5562
|
-
/* @__PURE__ */
|
|
6000
|
+
/* @__PURE__ */ jsx5("div", { style: styles.optionsContainer, children: isMultiProduct(content == null ? void 0 : content.products) ? productGroups.map((group) => {
|
|
5563
6001
|
var _a2;
|
|
5564
6002
|
const boxPurposes = productBoxPurposes(
|
|
5565
|
-
group.product.uuid,
|
|
5566
6003
|
group.purposes
|
|
5567
6004
|
);
|
|
5568
6005
|
const selectedInGroup = boxPurposes.filter(
|
|
@@ -5571,8 +6008,8 @@ var RedactoNoticeConsent = ({
|
|
|
5571
6008
|
purpose.uuid
|
|
5572
6009
|
)]
|
|
5573
6010
|
).length;
|
|
5574
|
-
return /* @__PURE__ */
|
|
5575
|
-
/* @__PURE__ */
|
|
6011
|
+
return /* @__PURE__ */ jsxs4("div", { children: [
|
|
6012
|
+
/* @__PURE__ */ jsx5(
|
|
5576
6013
|
ProductSectionHeader,
|
|
5577
6014
|
{
|
|
5578
6015
|
product: group.product,
|
|
@@ -5593,7 +6030,7 @@ var RedactoNoticeConsent = ({
|
|
|
5593
6030
|
getTranslatedText
|
|
5594
6031
|
}
|
|
5595
6032
|
),
|
|
5596
|
-
/* @__PURE__ */
|
|
6033
|
+
/* @__PURE__ */ jsx5(
|
|
5597
6034
|
"div",
|
|
5598
6035
|
{
|
|
5599
6036
|
id: `product-${group.product.uuid}`,
|
|
@@ -5601,17 +6038,15 @@ var RedactoNoticeConsent = ({
|
|
|
5601
6038
|
hidden: collapsedProducts[group.product.uuid] || false,
|
|
5602
6039
|
children: group.purposes.map((purpose) => {
|
|
5603
6040
|
var _a3;
|
|
5604
|
-
return /* @__PURE__ */
|
|
6041
|
+
return /* @__PURE__ */ jsx5(
|
|
5605
6042
|
PurposeItem,
|
|
5606
6043
|
{
|
|
5607
6044
|
purpose,
|
|
5608
6045
|
productUuid: group.product.uuid,
|
|
5609
|
-
productIsRequired: productIsRequiredFor(
|
|
5610
|
-
group.product.uuid
|
|
5611
|
-
),
|
|
5612
6046
|
selectedPurposes,
|
|
5613
6047
|
collapsedPurposes,
|
|
5614
6048
|
selectedDataElements,
|
|
6049
|
+
recordedAnswers,
|
|
5615
6050
|
settings,
|
|
5616
6051
|
styles,
|
|
5617
6052
|
responsiveStyles,
|
|
@@ -5633,16 +6068,14 @@ var RedactoNoticeConsent = ({
|
|
|
5633
6068
|
)
|
|
5634
6069
|
] }, group.product.uuid);
|
|
5635
6070
|
}) : soleProductSection(
|
|
5636
|
-
(_y = content == null ? void 0 : content.purposes) == null ? void 0 : _y.map((purpose) => /* @__PURE__ */
|
|
6071
|
+
(_y = content == null ? void 0 : content.purposes) == null ? void 0 : _y.map((purpose) => /* @__PURE__ */ jsx5(
|
|
5637
6072
|
PurposeItem,
|
|
5638
6073
|
{
|
|
5639
6074
|
purpose,
|
|
5640
|
-
productIsRequired: productIsRequiredFor(
|
|
5641
|
-
void 0
|
|
5642
|
-
),
|
|
5643
6075
|
selectedPurposes,
|
|
5644
6076
|
collapsedPurposes,
|
|
5645
6077
|
selectedDataElements,
|
|
6078
|
+
recordedAnswers,
|
|
5646
6079
|
settings,
|
|
5647
6080
|
styles,
|
|
5648
6081
|
responsiveStyles,
|
|
@@ -5658,7 +6091,7 @@ var RedactoNoticeConsent = ({
|
|
|
5658
6091
|
))
|
|
5659
6092
|
) })
|
|
5660
6093
|
),
|
|
5661
|
-
((content == null ? void 0 : content.privacy_center_url) || (content == null ? void 0 : content.dpo_info)) && /* @__PURE__ */
|
|
6094
|
+
((content == null ? void 0 : content.privacy_center_url) || (content == null ? void 0 : content.dpo_info)) && /* @__PURE__ */ jsx5(
|
|
5662
6095
|
"div",
|
|
5663
6096
|
{
|
|
5664
6097
|
style: {
|
|
@@ -5671,14 +6104,14 @@ var RedactoNoticeConsent = ({
|
|
|
5671
6104
|
paddingTop: "12px",
|
|
5672
6105
|
marginTop: "12px"
|
|
5673
6106
|
},
|
|
5674
|
-
children: /* @__PURE__ */
|
|
5675
|
-
content.privacy_center_url && /* @__PURE__ */
|
|
5676
|
-
content.additional_text && /* @__PURE__ */
|
|
6107
|
+
children: /* @__PURE__ */ jsxs4("p", { style: { margin: 0, opacity: 0.6 }, children: [
|
|
6108
|
+
content.privacy_center_url && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
6109
|
+
content.additional_text && /* @__PURE__ */ jsx5("span", { id: "additional-text", children: getTranslatedText(
|
|
5677
6110
|
"additional_text",
|
|
5678
6111
|
content.additional_text
|
|
5679
6112
|
) }),
|
|
5680
6113
|
" ",
|
|
5681
|
-
/* @__PURE__ */
|
|
6114
|
+
/* @__PURE__ */ jsx5(
|
|
5682
6115
|
"a",
|
|
5683
6116
|
{
|
|
5684
6117
|
id: "privacy-center-link",
|
|
@@ -5694,14 +6127,14 @@ var RedactoNoticeConsent = ({
|
|
|
5694
6127
|
),
|
|
5695
6128
|
"."
|
|
5696
6129
|
] }),
|
|
5697
|
-
content.dpo_info && /* @__PURE__ */
|
|
5698
|
-
content.privacy_center_url && /* @__PURE__ */
|
|
5699
|
-
/* @__PURE__ */
|
|
6130
|
+
content.dpo_info && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
6131
|
+
content.privacy_center_url && /* @__PURE__ */ jsx5("br", {}),
|
|
6132
|
+
/* @__PURE__ */ jsx5("span", { id: "dpo-grievance-text", children: getTranslatedDpoText(
|
|
5700
6133
|
"grievance_text",
|
|
5701
6134
|
content.dpo_info.grievance_text || ""
|
|
5702
6135
|
) }),
|
|
5703
6136
|
" ",
|
|
5704
|
-
content.dpo_info.grievance_url && /* @__PURE__ */
|
|
6137
|
+
content.dpo_info.grievance_url && /* @__PURE__ */ jsx5(
|
|
5705
6138
|
"a",
|
|
5706
6139
|
{
|
|
5707
6140
|
id: "dpo-grievance-link",
|
|
@@ -5715,14 +6148,14 @@ var RedactoNoticeConsent = ({
|
|
|
5715
6148
|
)
|
|
5716
6149
|
}
|
|
5717
6150
|
),
|
|
5718
|
-
content.dpo_info.grievance_email && /* @__PURE__ */
|
|
6151
|
+
content.dpo_info.grievance_email && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
5719
6152
|
" ",
|
|
5720
|
-
/* @__PURE__ */
|
|
6153
|
+
/* @__PURE__ */ jsx5("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
|
|
5721
6154
|
"grievance_email_connector_text",
|
|
5722
6155
|
content.dpo_info.grievance_email_connector_text || "or email to"
|
|
5723
6156
|
) }),
|
|
5724
6157
|
" ",
|
|
5725
|
-
/* @__PURE__ */
|
|
6158
|
+
/* @__PURE__ */ jsx5(
|
|
5726
6159
|
"a",
|
|
5727
6160
|
{
|
|
5728
6161
|
id: "dpo-grievance-email",
|
|
@@ -5732,13 +6165,13 @@ var RedactoNoticeConsent = ({
|
|
|
5732
6165
|
}
|
|
5733
6166
|
)
|
|
5734
6167
|
] }),
|
|
5735
|
-
/* @__PURE__ */
|
|
5736
|
-
/* @__PURE__ */
|
|
6168
|
+
/* @__PURE__ */ jsx5("br", {}),
|
|
6169
|
+
/* @__PURE__ */ jsx5("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText(
|
|
5737
6170
|
"dp_board_text",
|
|
5738
6171
|
content.dpo_info.dp_board_text || ""
|
|
5739
6172
|
) }),
|
|
5740
6173
|
" ",
|
|
5741
|
-
content.dpo_info.dp_board_url && /* @__PURE__ */
|
|
6174
|
+
content.dpo_info.dp_board_url && /* @__PURE__ */ jsx5(
|
|
5742
6175
|
"a",
|
|
5743
6176
|
{
|
|
5744
6177
|
id: "dpo-dp-board-link",
|
|
@@ -5752,13 +6185,13 @@ var RedactoNoticeConsent = ({
|
|
|
5752
6185
|
)
|
|
5753
6186
|
}
|
|
5754
6187
|
),
|
|
5755
|
-
/* @__PURE__ */
|
|
5756
|
-
/* @__PURE__ */
|
|
6188
|
+
/* @__PURE__ */ jsx5("br", {}),
|
|
6189
|
+
/* @__PURE__ */ jsx5("span", { id: "dpo-dpo-text", children: getTranslatedDpoText(
|
|
5757
6190
|
"dpo_text",
|
|
5758
6191
|
content.dpo_info.dpo_text || ""
|
|
5759
6192
|
) }),
|
|
5760
6193
|
" ",
|
|
5761
|
-
content.dpo_info.dpo_email && /* @__PURE__ */
|
|
6194
|
+
content.dpo_info.dpo_email && /* @__PURE__ */ jsx5(
|
|
5762
6195
|
"a",
|
|
5763
6196
|
{
|
|
5764
6197
|
id: "dpo-dpo-link",
|
|
@@ -5777,7 +6210,16 @@ var RedactoNoticeConsent = ({
|
|
|
5777
6210
|
]
|
|
5778
6211
|
}
|
|
5779
6212
|
),
|
|
5780
|
-
/* @__PURE__ */
|
|
6213
|
+
!isFullyConsentedReviewMode && confirmHint && /* @__PURE__ */ jsx5(
|
|
6214
|
+
"p",
|
|
6215
|
+
{
|
|
6216
|
+
id: CONFIRM_HINT_ID,
|
|
6217
|
+
role: "status",
|
|
6218
|
+
style: styles.confirmHint,
|
|
6219
|
+
children: confirmHint
|
|
6220
|
+
}
|
|
6221
|
+
),
|
|
6222
|
+
/* @__PURE__ */ jsx5(
|
|
5781
6223
|
"div",
|
|
5782
6224
|
{
|
|
5783
6225
|
style: {
|
|
@@ -5787,7 +6229,7 @@ var RedactoNoticeConsent = ({
|
|
|
5787
6229
|
} : isMobile ? styles.actionButtonStack : styles.actionButtonRow,
|
|
5788
6230
|
...sectionStyle
|
|
5789
6231
|
},
|
|
5790
|
-
children: isFullyConsentedReviewMode ? /* @__PURE__ */
|
|
6232
|
+
children: isFullyConsentedReviewMode ? /* @__PURE__ */ jsx5(
|
|
5791
6233
|
"button",
|
|
5792
6234
|
{
|
|
5793
6235
|
ref: lastFocusableRef,
|
|
@@ -5802,11 +6244,12 @@ var RedactoNoticeConsent = ({
|
|
|
5802
6244
|
"aria-label": reviewModeButtonText,
|
|
5803
6245
|
children: reviewModeButtonText
|
|
5804
6246
|
}
|
|
5805
|
-
) : /* @__PURE__ */
|
|
6247
|
+
) : /* @__PURE__ */ jsx5(
|
|
5806
6248
|
NoticeFooter,
|
|
5807
6249
|
{
|
|
5808
6250
|
labels: actionLabels,
|
|
5809
6251
|
acceptSelectedDisabled: acceptDisabled,
|
|
6252
|
+
acceptSelectedHintId: confirmHint ? CONFIRM_HINT_ID : void 0,
|
|
5810
6253
|
isSubmittingAccept,
|
|
5811
6254
|
isSubmittingDecline,
|
|
5812
6255
|
isMobile,
|
|
@@ -5815,21 +6258,33 @@ var RedactoNoticeConsent = ({
|
|
|
5815
6258
|
acceptSelectedButtonStyle,
|
|
5816
6259
|
declineButtonStyle,
|
|
5817
6260
|
lastFocusableRef,
|
|
5818
|
-
onAcceptAll: handleAcceptAll,
|
|
5819
|
-
onAcceptSelected:
|
|
5820
|
-
|
|
6261
|
+
onAcceptAll: confirmFirst("accept-all", handleAcceptAll),
|
|
6262
|
+
onAcceptSelected: confirmFirst(
|
|
6263
|
+
"accept-selected",
|
|
6264
|
+
handleAcceptSelected
|
|
6265
|
+
),
|
|
6266
|
+
onDecline: confirmFirst("decline", handleDecline)
|
|
5821
6267
|
}
|
|
5822
6268
|
)
|
|
5823
6269
|
}
|
|
5824
6270
|
)
|
|
5825
6271
|
] })
|
|
5826
6272
|
}
|
|
6273
|
+
),
|
|
6274
|
+
pendingAction && /* @__PURE__ */ jsx5(
|
|
6275
|
+
ConfirmDialog,
|
|
6276
|
+
{
|
|
6277
|
+
action: confirmAction,
|
|
6278
|
+
onConfirm: runPendingAction,
|
|
6279
|
+
onCancel: dismissConfirm,
|
|
6280
|
+
confirmStyle: acceptAllButtonStyle
|
|
6281
|
+
}
|
|
5827
6282
|
)
|
|
5828
6283
|
] }) });
|
|
5829
6284
|
};
|
|
5830
6285
|
|
|
5831
6286
|
// src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
|
|
5832
|
-
import { useEffect as
|
|
6287
|
+
import { useEffect as useEffect6, useMemo as useMemo3, useState as useState3, useRef as useRef4, useCallback as useCallback4, memo } from "react";
|
|
5833
6288
|
|
|
5834
6289
|
// src/RedactoNoticeConsentInline/api/index.ts
|
|
5835
6290
|
var BASE_URL2 = "https://api.redacto.tech/consent";
|
|
@@ -6282,11 +6737,11 @@ var styles2 = {
|
|
|
6282
6737
|
};
|
|
6283
6738
|
|
|
6284
6739
|
// src/RedactoNoticeConsentInline/useMediaQuery.ts
|
|
6285
|
-
import { useState as useState2, useEffect as
|
|
6740
|
+
import { useState as useState2, useEffect as useEffect5 } from "react";
|
|
6286
6741
|
var useMediaQuery2 = (query) => {
|
|
6287
6742
|
const getMatches = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
|
|
6288
6743
|
const [matches, setMatches] = useState2(getMatches);
|
|
6289
|
-
|
|
6744
|
+
useEffect5(() => {
|
|
6290
6745
|
if (typeof window === "undefined") return;
|
|
6291
6746
|
const media = window.matchMedia(query);
|
|
6292
6747
|
const listener = (e) => {
|
|
@@ -6337,7 +6792,7 @@ var injectSpinnerAnimation = () => {
|
|
|
6337
6792
|
};
|
|
6338
6793
|
|
|
6339
6794
|
// src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
|
|
6340
|
-
import { jsx as
|
|
6795
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
6341
6796
|
var RedactoConsentInlineComponent = ({
|
|
6342
6797
|
org_uuid,
|
|
6343
6798
|
workspace_uuid,
|
|
@@ -6365,8 +6820,8 @@ var RedactoConsentInlineComponent = ({
|
|
|
6365
6820
|
);
|
|
6366
6821
|
const [fetchError, setFetchError] = useState3(null);
|
|
6367
6822
|
const [errorMessage, setErrorMessage] = useState3(null);
|
|
6368
|
-
const hasSubmittedRef =
|
|
6369
|
-
|
|
6823
|
+
const hasSubmittedRef = useRef4(false);
|
|
6824
|
+
useEffect6(() => {
|
|
6370
6825
|
injectSpinnerAnimation();
|
|
6371
6826
|
}, []);
|
|
6372
6827
|
const isMobile = useMediaQuery2("(max-width: 768px)");
|
|
@@ -6392,17 +6847,17 @@ var RedactoConsentInlineComponent = ({
|
|
|
6392
6847
|
if (!content) return false;
|
|
6393
6848
|
return content.purposes.every((purpose) => {
|
|
6394
6849
|
const requiredElements = purpose.data_elements.filter(
|
|
6395
|
-
|
|
6850
|
+
isBlockingRequiredElement
|
|
6396
6851
|
);
|
|
6397
6852
|
return requiredElements.every(
|
|
6398
6853
|
(element) => selectedDataElements[`${purpose.uuid}-${element.uuid}`]
|
|
6399
6854
|
);
|
|
6400
6855
|
});
|
|
6401
6856
|
}, [content, selectedDataElements]);
|
|
6402
|
-
|
|
6857
|
+
useEffect6(() => {
|
|
6403
6858
|
onValidationChange == null ? void 0 : onValidationChange(areAllRequiredElementsChecked);
|
|
6404
6859
|
}, [areAllRequiredElementsChecked, onValidationChange]);
|
|
6405
|
-
|
|
6860
|
+
useEffect6(() => {
|
|
6406
6861
|
if (hasAlreadyConsented) {
|
|
6407
6862
|
onAccept == null ? void 0 : onAccept();
|
|
6408
6863
|
}
|
|
@@ -6508,7 +6963,7 @@ var RedactoConsentInlineComponent = ({
|
|
|
6508
6963
|
}
|
|
6509
6964
|
}
|
|
6510
6965
|
};
|
|
6511
|
-
|
|
6966
|
+
useEffect6(() => {
|
|
6512
6967
|
const controller = new AbortController();
|
|
6513
6968
|
void fetchNotice(controller.signal);
|
|
6514
6969
|
return () => {
|
|
@@ -6522,7 +6977,7 @@ var RedactoConsentInlineComponent = ({
|
|
|
6522
6977
|
applicationId,
|
|
6523
6978
|
accessToken
|
|
6524
6979
|
]);
|
|
6525
|
-
|
|
6980
|
+
useEffect6(() => {
|
|
6526
6981
|
if (!ledgerBaseUrl || applicationId) {
|
|
6527
6982
|
return;
|
|
6528
6983
|
}
|
|
@@ -6619,7 +7074,7 @@ var RedactoConsentInlineComponent = ({
|
|
|
6619
7074
|
return newState;
|
|
6620
7075
|
});
|
|
6621
7076
|
};
|
|
6622
|
-
const handleAcceptWithToken =
|
|
7077
|
+
const handleAcceptWithToken = useCallback4(
|
|
6623
7078
|
async (tokenToUse) => {
|
|
6624
7079
|
if (!tokenToUse || !content) {
|
|
6625
7080
|
setErrorMessage("Unable to submit consent. Please try again.");
|
|
@@ -6695,7 +7150,7 @@ var RedactoConsentInlineComponent = ({
|
|
|
6695
7150
|
onAccept
|
|
6696
7151
|
]
|
|
6697
7152
|
);
|
|
6698
|
-
|
|
7153
|
+
useEffect6(() => {
|
|
6699
7154
|
if (accessToken && content && areAllRequiredElementsChecked && !isSubmitting && !isCheckingConsent && !hasAlreadyConsented && !hasSubmittedRef.current) {
|
|
6700
7155
|
hasSubmittedRef.current = true;
|
|
6701
7156
|
const autoSubmit = async () => {
|
|
@@ -6717,7 +7172,7 @@ var RedactoConsentInlineComponent = ({
|
|
|
6717
7172
|
hasAlreadyConsented,
|
|
6718
7173
|
handleAcceptWithToken
|
|
6719
7174
|
]);
|
|
6720
|
-
|
|
7175
|
+
useEffect6(() => {
|
|
6721
7176
|
if (!accessToken) {
|
|
6722
7177
|
hasSubmittedRef.current = false;
|
|
6723
7178
|
}
|
|
@@ -6741,16 +7196,16 @@ var RedactoConsentInlineComponent = ({
|
|
|
6741
7196
|
return null;
|
|
6742
7197
|
}
|
|
6743
7198
|
if (isLoading) {
|
|
6744
|
-
return /* @__PURE__ */
|
|
6745
|
-
/* @__PURE__ */
|
|
6746
|
-
/* @__PURE__ */
|
|
7199
|
+
return /* @__PURE__ */ jsxs5("div", { ...NOTICE_FONT_ROOT_PROPS, style: loadingRootStyle, children: [
|
|
7200
|
+
/* @__PURE__ */ jsx6("div", { style: styles2.loadingSpinner }),
|
|
7201
|
+
/* @__PURE__ */ jsx6("p", { style: { ...styles2.privacyText, ...textStyle }, children: "Loading..." })
|
|
6747
7202
|
] });
|
|
6748
7203
|
}
|
|
6749
7204
|
if (!content) {
|
|
6750
7205
|
return null;
|
|
6751
7206
|
}
|
|
6752
|
-
return /* @__PURE__ */
|
|
6753
|
-
errorMessage && /* @__PURE__ */
|
|
7207
|
+
return /* @__PURE__ */ jsxs5("div", { ...NOTICE_FONT_ROOT_PROPS, style: rootStyle, children: [
|
|
7208
|
+
errorMessage && /* @__PURE__ */ jsx6(
|
|
6754
7209
|
"div",
|
|
6755
7210
|
{
|
|
6756
7211
|
role: "alert",
|
|
@@ -6769,9 +7224,9 @@ var RedactoConsentInlineComponent = ({
|
|
|
6769
7224
|
var _a, _b;
|
|
6770
7225
|
const renderPurpose = (purpose, productUuid) => {
|
|
6771
7226
|
const stateKey = productPurposeKey(productUuid, purpose.uuid);
|
|
6772
|
-
return /* @__PURE__ */
|
|
6773
|
-
/* @__PURE__ */
|
|
6774
|
-
/* @__PURE__ */
|
|
7227
|
+
return /* @__PURE__ */ jsxs5("div", { children: [
|
|
7228
|
+
/* @__PURE__ */ jsxs5("div", { style: styles2.optionItem, children: [
|
|
7229
|
+
/* @__PURE__ */ jsxs5(
|
|
6775
7230
|
"div",
|
|
6776
7231
|
{
|
|
6777
7232
|
style: styles2.optionLeft,
|
|
@@ -6792,7 +7247,7 @@ var RedactoConsentInlineComponent = ({
|
|
|
6792
7247
|
}
|
|
6793
7248
|
},
|
|
6794
7249
|
children: [
|
|
6795
|
-
/* @__PURE__ */
|
|
7250
|
+
/* @__PURE__ */ jsx6(
|
|
6796
7251
|
"div",
|
|
6797
7252
|
{
|
|
6798
7253
|
style: {
|
|
@@ -6801,7 +7256,7 @@ var RedactoConsentInlineComponent = ({
|
|
|
6801
7256
|
justifyContent: "center",
|
|
6802
7257
|
marginLeft: "5px"
|
|
6803
7258
|
},
|
|
6804
|
-
children: /* @__PURE__ */
|
|
7259
|
+
children: /* @__PURE__ */ jsx6(
|
|
6805
7260
|
"svg",
|
|
6806
7261
|
{
|
|
6807
7262
|
width: "7",
|
|
@@ -6818,13 +7273,13 @@ var RedactoConsentInlineComponent = ({
|
|
|
6818
7273
|
transition: "transform 0.3s ease"
|
|
6819
7274
|
},
|
|
6820
7275
|
"aria-hidden": "true",
|
|
6821
|
-
children: /* @__PURE__ */
|
|
7276
|
+
children: /* @__PURE__ */ jsx6("path", { d: "M1 1L6 6L1 11" })
|
|
6822
7277
|
}
|
|
6823
7278
|
)
|
|
6824
7279
|
}
|
|
6825
7280
|
),
|
|
6826
|
-
/* @__PURE__ */
|
|
6827
|
-
/* @__PURE__ */
|
|
7281
|
+
/* @__PURE__ */ jsxs5("div", { style: styles2.optionTextContainer, children: [
|
|
7282
|
+
/* @__PURE__ */ jsxs5(
|
|
6828
7283
|
"h2",
|
|
6829
7284
|
{
|
|
6830
7285
|
style: {
|
|
@@ -6838,11 +7293,11 @@ var RedactoConsentInlineComponent = ({
|
|
|
6838
7293
|
purpose.name,
|
|
6839
7294
|
purpose.uuid
|
|
6840
7295
|
),
|
|
6841
|
-
hasRequiredDataElement(purpose) && /* @__PURE__ */
|
|
7296
|
+
hasRequiredDataElement(purpose) && /* @__PURE__ */ jsx6(RequiredMarker, {})
|
|
6842
7297
|
]
|
|
6843
7298
|
}
|
|
6844
7299
|
),
|
|
6845
|
-
/* @__PURE__ */
|
|
7300
|
+
/* @__PURE__ */ jsx6(
|
|
6846
7301
|
"h3",
|
|
6847
7302
|
{
|
|
6848
7303
|
style: {
|
|
@@ -6861,7 +7316,7 @@ var RedactoConsentInlineComponent = ({
|
|
|
6861
7316
|
]
|
|
6862
7317
|
}
|
|
6863
7318
|
),
|
|
6864
|
-
/* @__PURE__ */
|
|
7319
|
+
/* @__PURE__ */ jsx6(
|
|
6865
7320
|
"input",
|
|
6866
7321
|
{
|
|
6867
7322
|
type: "checkbox",
|
|
@@ -6875,17 +7330,17 @@ var RedactoConsentInlineComponent = ({
|
|
|
6875
7330
|
}
|
|
6876
7331
|
)
|
|
6877
7332
|
] }),
|
|
6878
|
-
!collapsedPurposes[stateKey] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */
|
|
7333
|
+
!collapsedPurposes[stateKey] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ jsx6(
|
|
6879
7334
|
"div",
|
|
6880
7335
|
{
|
|
6881
7336
|
id: `purpose-${stateKey}`,
|
|
6882
7337
|
style: styles2.dataElementsContainer,
|
|
6883
|
-
children: purpose.data_elements.map((dataElement) => /* @__PURE__ */
|
|
7338
|
+
children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ jsxs5(
|
|
6884
7339
|
"div",
|
|
6885
7340
|
{
|
|
6886
7341
|
style: styles2.dataElementItem,
|
|
6887
7342
|
children: [
|
|
6888
|
-
/* @__PURE__ */
|
|
7343
|
+
/* @__PURE__ */ jsxs5(
|
|
6889
7344
|
"span",
|
|
6890
7345
|
{
|
|
6891
7346
|
style: {
|
|
@@ -6899,11 +7354,11 @@ var RedactoConsentInlineComponent = ({
|
|
|
6899
7354
|
dataElement.name,
|
|
6900
7355
|
dataElement.uuid
|
|
6901
7356
|
),
|
|
6902
|
-
dataElement
|
|
7357
|
+
isBlockingRequiredElement(dataElement) && /* @__PURE__ */ jsx6(RequiredMarker, {})
|
|
6903
7358
|
]
|
|
6904
7359
|
}
|
|
6905
7360
|
),
|
|
6906
|
-
/* @__PURE__ */
|
|
7361
|
+
/* @__PURE__ */ jsx6(
|
|
6907
7362
|
"input",
|
|
6908
7363
|
{
|
|
6909
7364
|
type: "checkbox",
|
|
@@ -6935,8 +7390,8 @@ var RedactoConsentInlineComponent = ({
|
|
|
6935
7390
|
content == null ? void 0 : content.products,
|
|
6936
7391
|
(_b = content == null ? void 0 : content.purposes) != null ? _b : [],
|
|
6937
7392
|
content == null ? void 0 : content.product_purpose_order
|
|
6938
|
-
).map((group) => /* @__PURE__ */
|
|
6939
|
-
/* @__PURE__ */
|
|
7393
|
+
).map((group) => /* @__PURE__ */ jsxs5("div", { children: [
|
|
7394
|
+
/* @__PURE__ */ jsx6("div", { style: { ...styles2.optionTitle, margin: "0 0 8px" }, children: getTranslatedText(
|
|
6940
7395
|
"products.name",
|
|
6941
7396
|
group.product.name,
|
|
6942
7397
|
group.product.uuid
|
|
@@ -6952,7 +7407,7 @@ RedactoConsentInlineComponent.displayName = "RedactoConsentInline";
|
|
|
6952
7407
|
var RedactoConsentInline = memo(RedactoConsentInlineComponent);
|
|
6953
7408
|
|
|
6954
7409
|
// src/RedactoNoticeAssisted/RedactoNoticeAssisted.tsx
|
|
6955
|
-
import { useState as useState5, useEffect as
|
|
7410
|
+
import { useState as useState5, useEffect as useEffect8, useMemo as useMemo4, useRef as useRef5, useCallback as useCallback5 } from "react";
|
|
6956
7411
|
|
|
6957
7412
|
// src/RedactoNoticeAssisted/styles.ts
|
|
6958
7413
|
var styles3 = {
|
|
@@ -7900,11 +8355,11 @@ var injectAssistedStyles = () => {
|
|
|
7900
8355
|
};
|
|
7901
8356
|
|
|
7902
8357
|
// src/RedactoNoticeAssisted/useMediaQuery.ts
|
|
7903
|
-
import { useState as useState4, useEffect as
|
|
8358
|
+
import { useState as useState4, useEffect as useEffect7 } from "react";
|
|
7904
8359
|
var useMediaQuery3 = (query) => {
|
|
7905
8360
|
const getMatches = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
|
|
7906
8361
|
const [matches, setMatches] = useState4(getMatches);
|
|
7907
|
-
|
|
8362
|
+
useEffect7(() => {
|
|
7908
8363
|
if (typeof window === "undefined") return;
|
|
7909
8364
|
const media = window.matchMedia(query);
|
|
7910
8365
|
const listener = (e) => {
|
|
@@ -9359,7 +9814,7 @@ var makeStaticT = (langCode) => (key, vars) => {
|
|
|
9359
9814
|
var redacto_logo_default2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATkAAAE5CAYAAADr4VfxAAAgAElEQVR4nO3deXhU5dkG8Ps552S2sId931RWwQVwq6LihmttiVUhaNUEcGnpXluLtnaz7WeVqhCokAS0RVuK4lK1igpaFRQREJBFQCAsAQJk9nOe748hNEDWycy858x5ftfldZllzjwkM3fe97wbMTOEaMjTd6BlLBLtoenclcEdLYvbaaA8Js5jII9AbQD2E9CKgRYA/ABa1rhELgDPCZc9D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|
|
|
9361
9816
|
// src/RedactoNoticeAssisted/RedactoNoticeAssisted.tsx
|
|
9362
|
-
import { Fragment as Fragment3, jsx as
|
|
9817
|
+
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
9363
9818
|
var PurposeItem2 = ({
|
|
9364
9819
|
purpose,
|
|
9365
9820
|
selectedPurposes,
|
|
@@ -9384,9 +9839,9 @@ var PurposeItem2 = ({
|
|
|
9384
9839
|
(el) => el.enabled !== false
|
|
9385
9840
|
);
|
|
9386
9841
|
const hasRequired = hasRequiredDataElement(purpose);
|
|
9387
|
-
return /* @__PURE__ */
|
|
9388
|
-
/* @__PURE__ */
|
|
9389
|
-
/* @__PURE__ */
|
|
9842
|
+
return /* @__PURE__ */ jsxs6("div", { children: [
|
|
9843
|
+
/* @__PURE__ */ jsxs6("div", { style: styles3.optionItem, children: [
|
|
9844
|
+
/* @__PURE__ */ jsxs6(
|
|
9390
9845
|
"div",
|
|
9391
9846
|
{
|
|
9392
9847
|
style: styles3.optionLeft,
|
|
@@ -9403,7 +9858,7 @@ var PurposeItem2 = ({
|
|
|
9403
9858
|
}
|
|
9404
9859
|
},
|
|
9405
9860
|
children: [
|
|
9406
|
-
/* @__PURE__ */
|
|
9861
|
+
/* @__PURE__ */ jsx7(
|
|
9407
9862
|
"div",
|
|
9408
9863
|
{
|
|
9409
9864
|
style: {
|
|
@@ -9412,7 +9867,7 @@ var PurposeItem2 = ({
|
|
|
9412
9867
|
justifyContent: "center",
|
|
9413
9868
|
marginLeft: "5px"
|
|
9414
9869
|
},
|
|
9415
|
-
children: /* @__PURE__ */
|
|
9870
|
+
children: /* @__PURE__ */ jsx7(
|
|
9416
9871
|
"svg",
|
|
9417
9872
|
{
|
|
9418
9873
|
width: "7",
|
|
@@ -9429,24 +9884,24 @@ var PurposeItem2 = ({
|
|
|
9429
9884
|
transition: "transform 0.3s ease"
|
|
9430
9885
|
},
|
|
9431
9886
|
"aria-hidden": "true",
|
|
9432
|
-
children: /* @__PURE__ */
|
|
9887
|
+
children: /* @__PURE__ */ jsx7("path", { d: "M1 1L6 6L1 11" })
|
|
9433
9888
|
}
|
|
9434
9889
|
)
|
|
9435
9890
|
}
|
|
9436
9891
|
),
|
|
9437
|
-
/* @__PURE__ */
|
|
9438
|
-
/* @__PURE__ */
|
|
9892
|
+
/* @__PURE__ */ jsxs6("div", { style: styles3.optionTextContainer, children: [
|
|
9893
|
+
/* @__PURE__ */ jsxs6(
|
|
9439
9894
|
"h2",
|
|
9440
9895
|
{
|
|
9441
9896
|
id: `purpose-name-${purpose.uuid}`,
|
|
9442
9897
|
style: { ...styles3.optionTitle, ...responsive.optionTitle },
|
|
9443
9898
|
children: [
|
|
9444
9899
|
name,
|
|
9445
|
-
hasRequired && /* @__PURE__ */
|
|
9900
|
+
hasRequired && /* @__PURE__ */ jsx7(RequiredMarker, { label: ts("required") })
|
|
9446
9901
|
]
|
|
9447
9902
|
}
|
|
9448
9903
|
),
|
|
9449
|
-
description && /* @__PURE__ */
|
|
9904
|
+
description && /* @__PURE__ */ jsx7(
|
|
9450
9905
|
"h3",
|
|
9451
9906
|
{
|
|
9452
9907
|
id: `purpose-description-${purpose.uuid}`,
|
|
@@ -9461,7 +9916,7 @@ var PurposeItem2 = ({
|
|
|
9461
9916
|
]
|
|
9462
9917
|
}
|
|
9463
9918
|
),
|
|
9464
|
-
/* @__PURE__ */
|
|
9919
|
+
/* @__PURE__ */ jsx7(
|
|
9465
9920
|
"input",
|
|
9466
9921
|
{
|
|
9467
9922
|
className: "redacto-assisted-checkbox-large",
|
|
@@ -9473,7 +9928,7 @@ var PurposeItem2 = ({
|
|
|
9473
9928
|
}
|
|
9474
9929
|
)
|
|
9475
9930
|
] }),
|
|
9476
|
-
isExpanded && dataElements.length > 0 && /* @__PURE__ */
|
|
9931
|
+
isExpanded && dataElements.length > 0 && /* @__PURE__ */ jsx7(
|
|
9477
9932
|
"div",
|
|
9478
9933
|
{
|
|
9479
9934
|
id: `redacto-assisted-purpose-${purpose.uuid}`,
|
|
@@ -9485,8 +9940,8 @@ var PurposeItem2 = ({
|
|
|
9485
9940
|
dataElement.name,
|
|
9486
9941
|
dataElement.uuid
|
|
9487
9942
|
);
|
|
9488
|
-
return /* @__PURE__ */
|
|
9489
|
-
/* @__PURE__ */
|
|
9943
|
+
return /* @__PURE__ */ jsxs6("div", { style: styles3.dataElementItem, children: [
|
|
9944
|
+
/* @__PURE__ */ jsxs6(
|
|
9490
9945
|
"span",
|
|
9491
9946
|
{
|
|
9492
9947
|
id: `data-element-${combinedId}`,
|
|
@@ -9496,11 +9951,11 @@ var PurposeItem2 = ({
|
|
|
9496
9951
|
},
|
|
9497
9952
|
children: [
|
|
9498
9953
|
elementName,
|
|
9499
|
-
dataElement
|
|
9954
|
+
isBlockingRequiredElement(dataElement) && /* @__PURE__ */ jsx7(RequiredMarker, { label: ts("required") })
|
|
9500
9955
|
]
|
|
9501
9956
|
}
|
|
9502
9957
|
),
|
|
9503
|
-
/* @__PURE__ */
|
|
9958
|
+
/* @__PURE__ */ jsx7(
|
|
9504
9959
|
"input",
|
|
9505
9960
|
{
|
|
9506
9961
|
className: "redacto-assisted-checkbox-small",
|
|
@@ -9537,38 +9992,38 @@ var RedactoNoticeAssisted = ({
|
|
|
9537
9992
|
const [collapsedPurposes, setCollapsedPurposes] = useState5({});
|
|
9538
9993
|
const [isLanguageDropdownOpen, setIsLanguageDropdownOpen] = useState5(false);
|
|
9539
9994
|
const [selectedLanguage, setSelectedLanguage] = useState5("English");
|
|
9540
|
-
const languageContainerRef =
|
|
9995
|
+
const languageContainerRef = useRef5(null);
|
|
9541
9996
|
const [ttsAudioUrls, setTtsAudioUrls] = useState5(null);
|
|
9542
9997
|
const [isTTSAvailable, setIsTTSAvailable] = useState5(false);
|
|
9543
9998
|
const [isPlaying, setIsPlaying] = useState5(false);
|
|
9544
9999
|
const [isPaused, setIsPaused] = useState5(false);
|
|
9545
10000
|
const [currentAudioIndex, setCurrentAudioIndex] = useState5(0);
|
|
9546
10001
|
const [highlightedElementId, setHighlightedElementId] = useState5(null);
|
|
9547
|
-
const currentAudioRef =
|
|
10002
|
+
const currentAudioRef = useRef5(null);
|
|
9548
10003
|
const [verifyMethod, setVerifyMethod] = useState5(
|
|
9549
10004
|
"mobile"
|
|
9550
10005
|
);
|
|
9551
10006
|
const [mobile, setMobile] = useState5("");
|
|
9552
|
-
const mobileInputRef =
|
|
10007
|
+
const mobileInputRef = useRef5(null);
|
|
9553
10008
|
const [email, setEmail] = useState5("");
|
|
9554
|
-
const emailInputRef =
|
|
10009
|
+
const emailInputRef = useRef5(null);
|
|
9555
10010
|
const [otpSent, setOtpSent] = useState5(false);
|
|
9556
|
-
const verifyBlockRef =
|
|
9557
|
-
const otpSectionRef =
|
|
10011
|
+
const verifyBlockRef = useRef5(null);
|
|
10012
|
+
const otpSectionRef = useRef5(null);
|
|
9558
10013
|
const [otpDigits, setOtpDigits] = useState5(
|
|
9559
10014
|
() => Array.from({ length: ASSISTED_CONFIG.otpLength }, () => "")
|
|
9560
10015
|
);
|
|
9561
|
-
const otpInputRefs =
|
|
10016
|
+
const otpInputRefs = useRef5([]);
|
|
9562
10017
|
const [resendCountdown, setResendCountdown] = useState5(0);
|
|
9563
10018
|
const [otpUuid, setOtpUuid] = useState5("");
|
|
9564
10019
|
const [isSendingOtp, setIsSendingOtp] = useState5(false);
|
|
9565
10020
|
const [isVerifying, setIsVerifying] = useState5(false);
|
|
9566
10021
|
const [createError, setCreateError] = useState5(null);
|
|
9567
10022
|
const [otpError, setOtpError] = useState5(null);
|
|
9568
|
-
|
|
10023
|
+
useEffect8(() => {
|
|
9569
10024
|
injectAssistedStyles();
|
|
9570
10025
|
}, []);
|
|
9571
|
-
|
|
10026
|
+
useEffect8(() => {
|
|
9572
10027
|
const controller = new AbortController();
|
|
9573
10028
|
setIsLoading(true);
|
|
9574
10029
|
setFetchError(null);
|
|
@@ -9604,14 +10059,14 @@ var RedactoNoticeAssisted = ({
|
|
|
9604
10059
|
});
|
|
9605
10060
|
return () => controller.abort();
|
|
9606
10061
|
}, [organisationUuid, workspaceUuid, noticeUuid, baseUrl]);
|
|
9607
|
-
|
|
10062
|
+
useEffect8(() => {
|
|
9608
10063
|
if (resendCountdown <= 0) return;
|
|
9609
10064
|
const intervalId = window.setInterval(() => {
|
|
9610
10065
|
setResendCountdown((prev) => prev <= 1 ? 0 : prev - 1);
|
|
9611
10066
|
}, 1e3);
|
|
9612
10067
|
return () => window.clearInterval(intervalId);
|
|
9613
10068
|
}, [resendCountdown]);
|
|
9614
|
-
|
|
10069
|
+
useEffect8(() => {
|
|
9615
10070
|
if (step !== "verify") return;
|
|
9616
10071
|
const id = window.setTimeout(
|
|
9617
10072
|
() => scrollIntoViewSoft(verifyBlockRef.current),
|
|
@@ -9619,7 +10074,7 @@ var RedactoNoticeAssisted = ({
|
|
|
9619
10074
|
);
|
|
9620
10075
|
return () => window.clearTimeout(id);
|
|
9621
10076
|
}, [step]);
|
|
9622
|
-
|
|
10077
|
+
useEffect8(() => {
|
|
9623
10078
|
if (!otpSent) return;
|
|
9624
10079
|
const id = window.setTimeout(
|
|
9625
10080
|
() => scrollIntoViewSoft(otpSectionRef.current),
|
|
@@ -9627,7 +10082,7 @@ var RedactoNoticeAssisted = ({
|
|
|
9627
10082
|
);
|
|
9628
10083
|
return () => window.clearTimeout(id);
|
|
9629
10084
|
}, [otpSent]);
|
|
9630
|
-
|
|
10085
|
+
useEffect8(() => {
|
|
9631
10086
|
if (!isLanguageDropdownOpen) return;
|
|
9632
10087
|
const handleClickOutside = (e) => {
|
|
9633
10088
|
if (languageContainerRef.current && !languageContainerRef.current.contains(e.target)) {
|
|
@@ -9658,7 +10113,7 @@ var RedactoNoticeAssisted = ({
|
|
|
9658
10113
|
if (!dl) return "English";
|
|
9659
10114
|
return dl === "en" || dl === "EN" ? "English" : dl;
|
|
9660
10115
|
}, [content]);
|
|
9661
|
-
const isDefaultLanguage =
|
|
10116
|
+
const isDefaultLanguage = useCallback5(
|
|
9662
10117
|
(lang) => lang === "English" || lang === "en" || lang === "EN",
|
|
9663
10118
|
[]
|
|
9664
10119
|
);
|
|
@@ -9666,7 +10121,7 @@ var RedactoNoticeAssisted = ({
|
|
|
9666
10121
|
() => makeStaticT(toBcp47Code(selectedLanguage)),
|
|
9667
10122
|
[selectedLanguage]
|
|
9668
10123
|
);
|
|
9669
|
-
const getTranslatedText =
|
|
10124
|
+
const getTranslatedText = useCallback5(
|
|
9670
10125
|
(key, fallback, itemId) => {
|
|
9671
10126
|
var _a, _b, _c;
|
|
9672
10127
|
if (!content) return fallback;
|
|
@@ -9696,7 +10151,7 @@ var RedactoNoticeAssisted = ({
|
|
|
9696
10151
|
},
|
|
9697
10152
|
[content, selectedLanguage, isDefaultLanguage]
|
|
9698
10153
|
);
|
|
9699
|
-
const getTranslatedDpoText =
|
|
10154
|
+
const getTranslatedDpoText = useCallback5(
|
|
9700
10155
|
(key, fallback) => {
|
|
9701
10156
|
var _a, _b;
|
|
9702
10157
|
if (!(content == null ? void 0 : content.dpo_info)) return fallback;
|
|
@@ -9766,7 +10221,7 @@ var RedactoNoticeAssisted = ({
|
|
|
9766
10221
|
}),
|
|
9767
10222
|
[isMobile]
|
|
9768
10223
|
);
|
|
9769
|
-
const togglePurpose =
|
|
10224
|
+
const togglePurpose = useCallback5(
|
|
9770
10225
|
(uuid) => {
|
|
9771
10226
|
setSelectedPurposes((prev) => {
|
|
9772
10227
|
const next = !prev[uuid];
|
|
@@ -9783,10 +10238,10 @@ var RedactoNoticeAssisted = ({
|
|
|
9783
10238
|
},
|
|
9784
10239
|
[content]
|
|
9785
10240
|
);
|
|
9786
|
-
const togglePurposeCollapse =
|
|
10241
|
+
const togglePurposeCollapse = useCallback5((uuid) => {
|
|
9787
10242
|
setCollapsedPurposes((prev) => ({ ...prev, [uuid]: !prev[uuid] }));
|
|
9788
10243
|
}, []);
|
|
9789
|
-
const handleDataElementToggle =
|
|
10244
|
+
const handleDataElementToggle = useCallback5(
|
|
9790
10245
|
(purposeUuid, elementUuid) => {
|
|
9791
10246
|
if (!content) return;
|
|
9792
10247
|
const combinedId = `${purposeUuid}-${elementUuid}`;
|
|
@@ -9812,10 +10267,10 @@ var RedactoNoticeAssisted = ({
|
|
|
9812
10267
|
},
|
|
9813
10268
|
[content]
|
|
9814
10269
|
);
|
|
9815
|
-
const toggleLanguageDropdown =
|
|
10270
|
+
const toggleLanguageDropdown = useCallback5(() => {
|
|
9816
10271
|
setIsLanguageDropdownOpen((prev) => !prev);
|
|
9817
10272
|
}, []);
|
|
9818
|
-
const handleLanguageSelect =
|
|
10273
|
+
const handleLanguageSelect = useCallback5((lang) => {
|
|
9819
10274
|
setSelectedLanguage(lang);
|
|
9820
10275
|
setIsLanguageDropdownOpen(false);
|
|
9821
10276
|
}, []);
|
|
@@ -9937,7 +10392,7 @@ var RedactoNoticeAssisted = ({
|
|
|
9937
10392
|
}
|
|
9938
10393
|
return elementIds;
|
|
9939
10394
|
}, [ttsAudioUrls, content]);
|
|
9940
|
-
const stopAudio =
|
|
10395
|
+
const stopAudio = useCallback5(() => {
|
|
9941
10396
|
if (currentAudioRef.current) {
|
|
9942
10397
|
currentAudioRef.current.pause();
|
|
9943
10398
|
currentAudioRef.current.currentTime = 0;
|
|
@@ -9948,7 +10403,7 @@ var RedactoNoticeAssisted = ({
|
|
|
9948
10403
|
setCurrentAudioIndex(0);
|
|
9949
10404
|
setHighlightedElementId(null);
|
|
9950
10405
|
}, []);
|
|
9951
|
-
const playNextAudio =
|
|
10406
|
+
const playNextAudio = useCallback5(
|
|
9952
10407
|
(index) => {
|
|
9953
10408
|
if (index >= audioSequence.length) {
|
|
9954
10409
|
stopAudio();
|
|
@@ -9981,7 +10436,7 @@ var RedactoNoticeAssisted = ({
|
|
|
9981
10436
|
},
|
|
9982
10437
|
[audioSequence, elementIdSequence, stopAudio]
|
|
9983
10438
|
);
|
|
9984
|
-
const playAudio =
|
|
10439
|
+
const playAudio = useCallback5(() => {
|
|
9985
10440
|
if (audioSequence.length === 0) return;
|
|
9986
10441
|
if (isPaused && currentAudioRef.current) {
|
|
9987
10442
|
currentAudioRef.current.play().then(() => {
|
|
@@ -9995,21 +10450,21 @@ var RedactoNoticeAssisted = ({
|
|
|
9995
10450
|
playNextAudio(startIndex);
|
|
9996
10451
|
}
|
|
9997
10452
|
}, [audioSequence, isPaused, isPlaying, currentAudioIndex, playNextAudio]);
|
|
9998
|
-
const pauseAudio =
|
|
10453
|
+
const pauseAudio = useCallback5(() => {
|
|
9999
10454
|
if (currentAudioRef.current && isPlaying) {
|
|
10000
10455
|
currentAudioRef.current.pause();
|
|
10001
10456
|
setIsPlaying(false);
|
|
10002
10457
|
setIsPaused(true);
|
|
10003
10458
|
}
|
|
10004
10459
|
}, [isPlaying]);
|
|
10005
|
-
const toggleAudio =
|
|
10460
|
+
const toggleAudio = useCallback5(() => {
|
|
10006
10461
|
if (isPlaying) {
|
|
10007
10462
|
pauseAudio();
|
|
10008
10463
|
} else {
|
|
10009
10464
|
playAudio();
|
|
10010
10465
|
}
|
|
10011
10466
|
}, [isPlaying, playAudio, pauseAudio]);
|
|
10012
|
-
|
|
10467
|
+
useEffect8(() => {
|
|
10013
10468
|
setIsTTSAvailable(false);
|
|
10014
10469
|
setTtsAudioUrls(null);
|
|
10015
10470
|
stopAudio();
|
|
@@ -10040,7 +10495,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10040
10495
|
baseUrl,
|
|
10041
10496
|
stopAudio
|
|
10042
10497
|
]);
|
|
10043
|
-
|
|
10498
|
+
useEffect8(() => {
|
|
10044
10499
|
var _a;
|
|
10045
10500
|
if (!isPlaying || !content || audioSequence.length === 0) return;
|
|
10046
10501
|
const currentIndex = currentAudioIndex;
|
|
@@ -10059,7 +10514,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10059
10514
|
audioOffset += totalPurposeAudioCount;
|
|
10060
10515
|
}
|
|
10061
10516
|
}, [isPlaying, currentAudioIndex, audioSequence, content, collapsedPurposes]);
|
|
10062
|
-
|
|
10517
|
+
useEffect8(() => {
|
|
10063
10518
|
const removeAllHighlights = () => {
|
|
10064
10519
|
document.querySelectorAll(".redacto-tts-highlight").forEach((el) => {
|
|
10065
10520
|
el.classList.remove("redacto-tts-highlight");
|
|
@@ -10090,7 +10545,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10090
10545
|
removeAllHighlights();
|
|
10091
10546
|
};
|
|
10092
10547
|
}, [highlightedElementId, isPlaying]);
|
|
10093
|
-
const handleConfirmStep =
|
|
10548
|
+
const handleConfirmStep = useCallback5(
|
|
10094
10549
|
(mode = "selected") => {
|
|
10095
10550
|
if (mode !== "selected" && content) {
|
|
10096
10551
|
const selection = buildSelectionForMode(
|
|
@@ -10115,15 +10570,15 @@ var RedactoNoticeAssisted = ({
|
|
|
10115
10570
|
},
|
|
10116
10571
|
[content, selectedPurposes, selectedDataElements, verifyMethod, stopAudio]
|
|
10117
10572
|
);
|
|
10118
|
-
const handleAcceptAll =
|
|
10573
|
+
const handleAcceptAll = useCallback5(
|
|
10119
10574
|
() => handleConfirmStep("all"),
|
|
10120
10575
|
[handleConfirmStep]
|
|
10121
10576
|
);
|
|
10122
|
-
const handleAcceptSelected =
|
|
10577
|
+
const handleAcceptSelected = useCallback5(
|
|
10123
10578
|
() => handleConfirmStep("selected"),
|
|
10124
10579
|
[handleConfirmStep]
|
|
10125
10580
|
);
|
|
10126
|
-
const handleEditSelections =
|
|
10581
|
+
const handleEditSelections = useCallback5(() => {
|
|
10127
10582
|
setAcceptMode("selected");
|
|
10128
10583
|
setStep("notice");
|
|
10129
10584
|
setOtpSent(false);
|
|
@@ -10137,7 +10592,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10137
10592
|
}, []);
|
|
10138
10593
|
const otpRecipient = verifyMethod === "email" ? email.trim() : `${ASSISTED_CONFIG.dialCode}${mobile}`;
|
|
10139
10594
|
const otpChannel = verifyMethod === "email" ? ASSISTED_CONFIG.emailChannel : ASSISTED_CONFIG.channel;
|
|
10140
|
-
const sendOtp =
|
|
10595
|
+
const sendOtp = useCallback5(async () => {
|
|
10141
10596
|
setCreateError(null);
|
|
10142
10597
|
setIsSendingOtp(true);
|
|
10143
10598
|
try {
|
|
@@ -10163,11 +10618,11 @@ var RedactoNoticeAssisted = ({
|
|
|
10163
10618
|
setIsSendingOtp(false);
|
|
10164
10619
|
}
|
|
10165
10620
|
}, [organisationUuid, workspaceUuid, otpRecipient, otpChannel, baseUrl, ts]);
|
|
10166
|
-
const handleGetOtp =
|
|
10621
|
+
const handleGetOtp = useCallback5(() => {
|
|
10167
10622
|
if (!isContactValid || isSendingOtp) return;
|
|
10168
10623
|
void sendOtp();
|
|
10169
10624
|
}, [isContactValid, isSendingOtp, sendOtp]);
|
|
10170
|
-
const handleSelectMethod =
|
|
10625
|
+
const handleSelectMethod = useCallback5(
|
|
10171
10626
|
(method) => {
|
|
10172
10627
|
if (otpSent || isSendingOtp) return;
|
|
10173
10628
|
setVerifyMethod(method);
|
|
@@ -10179,11 +10634,11 @@ var RedactoNoticeAssisted = ({
|
|
|
10179
10634
|
},
|
|
10180
10635
|
[otpSent, isSendingOtp]
|
|
10181
10636
|
);
|
|
10182
|
-
const handleResend =
|
|
10637
|
+
const handleResend = useCallback5(() => {
|
|
10183
10638
|
if (isSendingOtp) return;
|
|
10184
10639
|
void sendOtp();
|
|
10185
10640
|
}, [isSendingOtp, sendOtp]);
|
|
10186
|
-
const handleChangeContact =
|
|
10641
|
+
const handleChangeContact = useCallback5(() => {
|
|
10187
10642
|
setOtpSent(false);
|
|
10188
10643
|
setOtpUuid("");
|
|
10189
10644
|
setOtpDigits(Array.from({ length: ASSISTED_CONFIG.otpLength }, () => ""));
|
|
@@ -10195,7 +10650,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10195
10650
|
(_a = (verifyMethod === "email" ? emailInputRef : mobileInputRef).current) == null ? void 0 : _a.focus();
|
|
10196
10651
|
}, 0);
|
|
10197
10652
|
}, [verifyMethod]);
|
|
10198
|
-
const handleOtpChange =
|
|
10653
|
+
const handleOtpChange = useCallback5((index, raw) => {
|
|
10199
10654
|
var _a;
|
|
10200
10655
|
const digit = raw.replace(/\D/g, "").slice(-1);
|
|
10201
10656
|
setOtpDigits((prev) => {
|
|
@@ -10207,7 +10662,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10207
10662
|
(_a = otpInputRefs.current[index + 1]) == null ? void 0 : _a.focus();
|
|
10208
10663
|
}
|
|
10209
10664
|
}, []);
|
|
10210
|
-
const handleOtpKeyDown =
|
|
10665
|
+
const handleOtpKeyDown = useCallback5(
|
|
10211
10666
|
(index, e) => {
|
|
10212
10667
|
var _a;
|
|
10213
10668
|
if (e.key === "Backspace" && !otpDigits[index] && index > 0) {
|
|
@@ -10216,7 +10671,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10216
10671
|
},
|
|
10217
10672
|
[otpDigits]
|
|
10218
10673
|
);
|
|
10219
|
-
const handleOtpPaste =
|
|
10674
|
+
const handleOtpPaste = useCallback5((e) => {
|
|
10220
10675
|
var _a;
|
|
10221
10676
|
const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, ASSISTED_CONFIG.otpLength);
|
|
10222
10677
|
if (!pasted) return;
|
|
@@ -10233,7 +10688,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10233
10688
|
const focusIndex = Math.min(pasted.length, ASSISTED_CONFIG.otpLength - 1);
|
|
10234
10689
|
(_a = otpInputRefs.current[focusIndex]) == null ? void 0 : _a.focus();
|
|
10235
10690
|
}, []);
|
|
10236
|
-
const resetFlow =
|
|
10691
|
+
const resetFlow = useCallback5(() => {
|
|
10237
10692
|
var _a;
|
|
10238
10693
|
setStep("notice");
|
|
10239
10694
|
const preselection = buildPreselection(
|
|
@@ -10252,7 +10707,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10252
10707
|
setCreateError(null);
|
|
10253
10708
|
setOtpError(null);
|
|
10254
10709
|
}, [content]);
|
|
10255
|
-
const handleSuccess =
|
|
10710
|
+
const handleSuccess = useCallback5(() => {
|
|
10256
10711
|
if (onComplete) {
|
|
10257
10712
|
onComplete();
|
|
10258
10713
|
return;
|
|
@@ -10260,7 +10715,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10260
10715
|
console.log("[RedactoNoticeAssisted] consent recorded");
|
|
10261
10716
|
resetFlow();
|
|
10262
10717
|
}, [onComplete, resetFlow]);
|
|
10263
|
-
const handleConfirm =
|
|
10718
|
+
const handleConfirm = useCallback5(async () => {
|
|
10264
10719
|
if (!isOtpComplete || isVerifying || !content) return;
|
|
10265
10720
|
setOtpError(null);
|
|
10266
10721
|
setIsVerifying(true);
|
|
@@ -10353,7 +10808,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10353
10808
|
handleSuccess,
|
|
10354
10809
|
ts
|
|
10355
10810
|
]);
|
|
10356
|
-
const handleDecline =
|
|
10811
|
+
const handleDecline = useCallback5(() => {
|
|
10357
10812
|
if (onDecline) {
|
|
10358
10813
|
onDecline();
|
|
10359
10814
|
return;
|
|
@@ -10366,7 +10821,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10366
10821
|
(content == null ? void 0 : content.notice_banner_heading) || "Privacy Notice"
|
|
10367
10822
|
);
|
|
10368
10823
|
const renderHeader = () => {
|
|
10369
|
-
const logoNode = /* @__PURE__ */
|
|
10824
|
+
const logoNode = /* @__PURE__ */ jsx7(
|
|
10370
10825
|
"img",
|
|
10371
10826
|
{
|
|
10372
10827
|
style: { ...styles3.logo, ...responsive.logo },
|
|
@@ -10374,7 +10829,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10374
10829
|
alt: ts("logoAlt")
|
|
10375
10830
|
}
|
|
10376
10831
|
);
|
|
10377
|
-
const titleNode = /* @__PURE__ */
|
|
10832
|
+
const titleNode = /* @__PURE__ */ jsx7(
|
|
10378
10833
|
"h2",
|
|
10379
10834
|
{
|
|
10380
10835
|
id: "privacy-notice-title",
|
|
@@ -10382,9 +10837,9 @@ var RedactoNoticeAssisted = ({
|
|
|
10382
10837
|
children: noticeTitle
|
|
10383
10838
|
}
|
|
10384
10839
|
);
|
|
10385
|
-
const controlsBlock = /* @__PURE__ */
|
|
10386
|
-
/* @__PURE__ */
|
|
10387
|
-
isTTSAvailable && step === "notice" && /* @__PURE__ */
|
|
10840
|
+
const controlsBlock = /* @__PURE__ */ jsxs6("div", { style: styles3.languageSelectorContainer, ref: languageContainerRef, children: [
|
|
10841
|
+
/* @__PURE__ */ jsxs6("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
10842
|
+
isTTSAvailable && step === "notice" && /* @__PURE__ */ jsx7(
|
|
10388
10843
|
"button",
|
|
10389
10844
|
{
|
|
10390
10845
|
type: "button",
|
|
@@ -10399,7 +10854,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10399
10854
|
},
|
|
10400
10855
|
"aria-label": isPlaying && !isPaused ? ts("audioPause") : ts("audioStart"),
|
|
10401
10856
|
title: isPlaying && !isPaused ? ts("talkbackPause") : ts("talkbackStart"),
|
|
10402
|
-
children: isPlaying && !isPaused ? /* @__PURE__ */
|
|
10857
|
+
children: isPlaying && !isPaused ? /* @__PURE__ */ jsxs6(
|
|
10403
10858
|
"svg",
|
|
10404
10859
|
{
|
|
10405
10860
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10413,11 +10868,11 @@ var RedactoNoticeAssisted = ({
|
|
|
10413
10868
|
strokeLinejoin: "round",
|
|
10414
10869
|
"aria-hidden": "true",
|
|
10415
10870
|
children: [
|
|
10416
|
-
/* @__PURE__ */
|
|
10417
|
-
/* @__PURE__ */
|
|
10871
|
+
/* @__PURE__ */ jsx7("rect", { x: "6", y: "4", width: "4", height: "16" }),
|
|
10872
|
+
/* @__PURE__ */ jsx7("rect", { x: "14", y: "4", width: "4", height: "16" })
|
|
10418
10873
|
]
|
|
10419
10874
|
}
|
|
10420
|
-
) : /* @__PURE__ */
|
|
10875
|
+
) : /* @__PURE__ */ jsxs6(
|
|
10421
10876
|
"svg",
|
|
10422
10877
|
{
|
|
10423
10878
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10431,14 +10886,14 @@ var RedactoNoticeAssisted = ({
|
|
|
10431
10886
|
strokeLinejoin: "round",
|
|
10432
10887
|
"aria-hidden": "true",
|
|
10433
10888
|
children: [
|
|
10434
|
-
/* @__PURE__ */
|
|
10435
|
-
/* @__PURE__ */
|
|
10889
|
+
/* @__PURE__ */ jsx7("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
10890
|
+
/* @__PURE__ */ jsx7("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
10436
10891
|
]
|
|
10437
10892
|
}
|
|
10438
10893
|
)
|
|
10439
10894
|
}
|
|
10440
10895
|
),
|
|
10441
|
-
/* @__PURE__ */
|
|
10896
|
+
/* @__PURE__ */ jsx7("div", { children: /* @__PURE__ */ jsxs6(
|
|
10442
10897
|
"button",
|
|
10443
10898
|
{
|
|
10444
10899
|
type: "button",
|
|
@@ -10452,7 +10907,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10452
10907
|
}),
|
|
10453
10908
|
children: [
|
|
10454
10909
|
toNativeLabel(selectedLanguage),
|
|
10455
|
-
/* @__PURE__ */
|
|
10910
|
+
/* @__PURE__ */ jsx7(
|
|
10456
10911
|
"svg",
|
|
10457
10912
|
{
|
|
10458
10913
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10466,21 +10921,21 @@ var RedactoNoticeAssisted = ({
|
|
|
10466
10921
|
strokeLinejoin: "round",
|
|
10467
10922
|
style: { flexShrink: 0, marginLeft: "4px" },
|
|
10468
10923
|
"aria-hidden": "true",
|
|
10469
|
-
children: /* @__PURE__ */
|
|
10924
|
+
children: /* @__PURE__ */ jsx7("path", { d: "M4 6l4 4 4-4" })
|
|
10470
10925
|
}
|
|
10471
10926
|
)
|
|
10472
10927
|
]
|
|
10473
10928
|
}
|
|
10474
10929
|
) })
|
|
10475
10930
|
] }),
|
|
10476
|
-
isLanguageDropdownOpen && /* @__PURE__ */
|
|
10931
|
+
isLanguageDropdownOpen && /* @__PURE__ */ jsx7(
|
|
10477
10932
|
"ul",
|
|
10478
10933
|
{
|
|
10479
10934
|
id: "redacto-assisted-language-listbox",
|
|
10480
10935
|
style: styles3.languageDropdown,
|
|
10481
10936
|
role: "listbox",
|
|
10482
10937
|
"aria-label": ts("selectLanguage"),
|
|
10483
|
-
children: availableLanguages.map((lang) => /* @__PURE__ */
|
|
10938
|
+
children: availableLanguages.map((lang) => /* @__PURE__ */ jsx7(
|
|
10484
10939
|
"li",
|
|
10485
10940
|
{
|
|
10486
10941
|
style: {
|
|
@@ -10500,8 +10955,8 @@ var RedactoNoticeAssisted = ({
|
|
|
10500
10955
|
}
|
|
10501
10956
|
)
|
|
10502
10957
|
] });
|
|
10503
|
-
return /* @__PURE__ */
|
|
10504
|
-
/* @__PURE__ */
|
|
10958
|
+
return /* @__PURE__ */ jsx7("div", { style: { ...styles3.topSection, ...responsive.topSection }, children: isMobile ? /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
10959
|
+
/* @__PURE__ */ jsxs6(
|
|
10505
10960
|
"div",
|
|
10506
10961
|
{
|
|
10507
10962
|
style: {
|
|
@@ -10512,7 +10967,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10512
10967
|
},
|
|
10513
10968
|
children: [
|
|
10514
10969
|
logoNode,
|
|
10515
|
-
/* @__PURE__ */
|
|
10970
|
+
/* @__PURE__ */ jsx7(
|
|
10516
10971
|
"div",
|
|
10517
10972
|
{
|
|
10518
10973
|
style: {
|
|
@@ -10528,8 +10983,8 @@ var RedactoNoticeAssisted = ({
|
|
|
10528
10983
|
}
|
|
10529
10984
|
),
|
|
10530
10985
|
titleNode
|
|
10531
|
-
] }) : /* @__PURE__ */
|
|
10532
|
-
/* @__PURE__ */
|
|
10986
|
+
] }) : /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
10987
|
+
/* @__PURE__ */ jsxs6("div", { style: styles3.topLeft, children: [
|
|
10533
10988
|
logoNode,
|
|
10534
10989
|
titleNode
|
|
10535
10990
|
] }),
|
|
@@ -10540,7 +10995,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10540
10995
|
if (!content) return null;
|
|
10541
10996
|
const dpoInfo = content.dpo_info;
|
|
10542
10997
|
if (!content.privacy_center_url && !dpoInfo) return null;
|
|
10543
|
-
return /* @__PURE__ */
|
|
10998
|
+
return /* @__PURE__ */ jsx7(
|
|
10544
10999
|
"div",
|
|
10545
11000
|
{
|
|
10546
11001
|
style: {
|
|
@@ -10552,14 +11007,14 @@ var RedactoNoticeAssisted = ({
|
|
|
10552
11007
|
paddingTop: "12px",
|
|
10553
11008
|
marginTop: "12px"
|
|
10554
11009
|
},
|
|
10555
|
-
children: /* @__PURE__ */
|
|
10556
|
-
content.privacy_center_url && /* @__PURE__ */
|
|
10557
|
-
/* @__PURE__ */
|
|
11010
|
+
children: /* @__PURE__ */ jsxs6("p", { style: { margin: 0, opacity: 0.6 }, children: [
|
|
11011
|
+
content.privacy_center_url && /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
11012
|
+
/* @__PURE__ */ jsx7("span", { id: "additional-text", children: getTranslatedText(
|
|
10558
11013
|
"additional_text",
|
|
10559
11014
|
content.additional_text || "Manage or withdraw consent anytime at"
|
|
10560
11015
|
) }),
|
|
10561
11016
|
" ",
|
|
10562
|
-
/* @__PURE__ */
|
|
11017
|
+
/* @__PURE__ */ jsx7(
|
|
10563
11018
|
"a",
|
|
10564
11019
|
{
|
|
10565
11020
|
id: "privacy-center-link",
|
|
@@ -10575,11 +11030,11 @@ var RedactoNoticeAssisted = ({
|
|
|
10575
11030
|
),
|
|
10576
11031
|
"."
|
|
10577
11032
|
] }),
|
|
10578
|
-
dpoInfo && /* @__PURE__ */
|
|
10579
|
-
content.privacy_center_url && /* @__PURE__ */
|
|
10580
|
-
/* @__PURE__ */
|
|
11033
|
+
dpoInfo && /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
11034
|
+
content.privacy_center_url && /* @__PURE__ */ jsx7("br", {}),
|
|
11035
|
+
/* @__PURE__ */ jsx7("span", { id: "dpo-grievance-text", children: getTranslatedDpoText("grievance_text", dpoInfo.grievance_text) }),
|
|
10581
11036
|
" ",
|
|
10582
|
-
dpoInfo.grievance_url && /* @__PURE__ */
|
|
11037
|
+
dpoInfo.grievance_url && /* @__PURE__ */ jsx7(
|
|
10583
11038
|
"a",
|
|
10584
11039
|
{
|
|
10585
11040
|
id: "dpo-grievance-link",
|
|
@@ -10594,13 +11049,13 @@ var RedactoNoticeAssisted = ({
|
|
|
10594
11049
|
}
|
|
10595
11050
|
),
|
|
10596
11051
|
" ",
|
|
10597
|
-
dpoInfo.grievance_email && /* @__PURE__ */
|
|
10598
|
-
/* @__PURE__ */
|
|
11052
|
+
dpoInfo.grievance_email && /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
11053
|
+
/* @__PURE__ */ jsx7("span", { id: "dpo-grievance-email-connector", children: getTranslatedDpoText(
|
|
10599
11054
|
"grievance_email_connector_text",
|
|
10600
11055
|
dpoInfo.grievance_email_connector_text || "or email to"
|
|
10601
11056
|
) }),
|
|
10602
11057
|
" ",
|
|
10603
|
-
/* @__PURE__ */
|
|
11058
|
+
/* @__PURE__ */ jsx7(
|
|
10604
11059
|
"a",
|
|
10605
11060
|
{
|
|
10606
11061
|
id: "dpo-grievance-email",
|
|
@@ -10610,10 +11065,10 @@ var RedactoNoticeAssisted = ({
|
|
|
10610
11065
|
}
|
|
10611
11066
|
)
|
|
10612
11067
|
] }),
|
|
10613
|
-
/* @__PURE__ */
|
|
10614
|
-
/* @__PURE__ */
|
|
11068
|
+
/* @__PURE__ */ jsx7("br", {}),
|
|
11069
|
+
/* @__PURE__ */ jsx7("span", { id: "dpo-dp-board-text", children: getTranslatedDpoText("dp_board_text", dpoInfo.dp_board_text) }),
|
|
10615
11070
|
" ",
|
|
10616
|
-
dpoInfo.dp_board_url && /* @__PURE__ */
|
|
11071
|
+
dpoInfo.dp_board_url && /* @__PURE__ */ jsx7(
|
|
10617
11072
|
"a",
|
|
10618
11073
|
{
|
|
10619
11074
|
id: "dpo-dp-board-link",
|
|
@@ -10627,10 +11082,10 @@ var RedactoNoticeAssisted = ({
|
|
|
10627
11082
|
)
|
|
10628
11083
|
}
|
|
10629
11084
|
),
|
|
10630
|
-
/* @__PURE__ */
|
|
10631
|
-
/* @__PURE__ */
|
|
11085
|
+
/* @__PURE__ */ jsx7("br", {}),
|
|
11086
|
+
/* @__PURE__ */ jsx7("span", { id: "dpo-dpo-text", children: getTranslatedDpoText("dpo_text", dpoInfo.dpo_text) }),
|
|
10632
11087
|
" ",
|
|
10633
|
-
dpoInfo.dpo_email && /* @__PURE__ */
|
|
11088
|
+
dpoInfo.dpo_email && /* @__PURE__ */ jsx7(
|
|
10634
11089
|
"a",
|
|
10635
11090
|
{
|
|
10636
11091
|
id: "dpo-dpo-link",
|
|
@@ -10649,17 +11104,17 @@ var RedactoNoticeAssisted = ({
|
|
|
10649
11104
|
};
|
|
10650
11105
|
const renderNoticeScreen = (locked) => {
|
|
10651
11106
|
if (!content) return null;
|
|
10652
|
-
return /* @__PURE__ */
|
|
10653
|
-
/* @__PURE__ */
|
|
10654
|
-
/* @__PURE__ */
|
|
10655
|
-
/* @__PURE__ */
|
|
10656
|
-
/* @__PURE__ */
|
|
10657
|
-
/* @__PURE__ */
|
|
11107
|
+
return /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
11108
|
+
/* @__PURE__ */ jsxs6("p", { style: { ...styles3.privacyText, ...responsive.privacyText }, children: [
|
|
11109
|
+
/* @__PURE__ */ jsx7("span", { id: "privacy-notice-text", children: getTranslatedText("notice_text", content.notice_text) }),
|
|
11110
|
+
/* @__PURE__ */ jsx7("br", {}),
|
|
11111
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
11112
|
+
/* @__PURE__ */ jsx7("span", { id: "privacy-policy-text", children: getTranslatedText(
|
|
10658
11113
|
"privacy_policy_prefix_text",
|
|
10659
11114
|
content.privacy_policy_prefix_text || ""
|
|
10660
11115
|
) }),
|
|
10661
11116
|
" ",
|
|
10662
|
-
/* @__PURE__ */
|
|
11117
|
+
/* @__PURE__ */ jsx7(
|
|
10663
11118
|
"a",
|
|
10664
11119
|
{
|
|
10665
11120
|
id: "privacy-policy-link",
|
|
@@ -10679,7 +11134,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10679
11134
|
)
|
|
10680
11135
|
] })
|
|
10681
11136
|
] }),
|
|
10682
|
-
/* @__PURE__ */
|
|
11137
|
+
/* @__PURE__ */ jsx7(
|
|
10683
11138
|
"h2",
|
|
10684
11139
|
{
|
|
10685
11140
|
id: "purpose-section-heading",
|
|
@@ -10690,7 +11145,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10690
11145
|
)
|
|
10691
11146
|
}
|
|
10692
11147
|
),
|
|
10693
|
-
/* @__PURE__ */
|
|
11148
|
+
/* @__PURE__ */ jsx7(
|
|
10694
11149
|
"div",
|
|
10695
11150
|
{
|
|
10696
11151
|
style: {
|
|
@@ -10698,7 +11153,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10698
11153
|
...locked ? styles3.lockedOptions : null
|
|
10699
11154
|
},
|
|
10700
11155
|
"aria-disabled": locked || void 0,
|
|
10701
|
-
children: content.purposes.map((purpose) => /* @__PURE__ */
|
|
11156
|
+
children: content.purposes.map((purpose) => /* @__PURE__ */ jsx7(
|
|
10702
11157
|
PurposeItem2,
|
|
10703
11158
|
{
|
|
10704
11159
|
purpose,
|
|
@@ -10720,19 +11175,19 @@ var RedactoNoticeAssisted = ({
|
|
|
10720
11175
|
renderDpoFooter()
|
|
10721
11176
|
] });
|
|
10722
11177
|
};
|
|
10723
|
-
const renderVerifyBlock = () => /* @__PURE__ */
|
|
11178
|
+
const renderVerifyBlock = () => /* @__PURE__ */ jsxs6(
|
|
10724
11179
|
"div",
|
|
10725
11180
|
{
|
|
10726
11181
|
ref: verifyBlockRef,
|
|
10727
11182
|
className: "redacto-assisted-reveal",
|
|
10728
11183
|
style: styles3.verifyPanel,
|
|
10729
11184
|
children: [
|
|
10730
|
-
/* @__PURE__ */
|
|
10731
|
-
/* @__PURE__ */
|
|
10732
|
-
/* @__PURE__ */
|
|
11185
|
+
/* @__PURE__ */ jsxs6("div", { style: styles3.verifyPanelHeader, children: [
|
|
11186
|
+
/* @__PURE__ */ jsxs6("span", { style: styles3.verifyPanelTitle, children: [
|
|
11187
|
+
/* @__PURE__ */ jsx7(LockIcon, { size: 15, color: primaryColor }),
|
|
10733
11188
|
ts("verifyWithOtp")
|
|
10734
11189
|
] }),
|
|
10735
|
-
/* @__PURE__ */
|
|
11190
|
+
/* @__PURE__ */ jsx7(
|
|
10736
11191
|
"button",
|
|
10737
11192
|
{
|
|
10738
11193
|
type: "button",
|
|
@@ -10743,20 +11198,20 @@ var RedactoNoticeAssisted = ({
|
|
|
10743
11198
|
}
|
|
10744
11199
|
)
|
|
10745
11200
|
] }),
|
|
10746
|
-
/* @__PURE__ */
|
|
10747
|
-
/* @__PURE__ */
|
|
10748
|
-
/* @__PURE__ */
|
|
11201
|
+
/* @__PURE__ */ jsxs6("div", { style: styles3.phoneFieldWrap, children: [
|
|
11202
|
+
/* @__PURE__ */ jsxs6("div", { style: styles3.fieldLabelRow, children: [
|
|
11203
|
+
/* @__PURE__ */ jsxs6(
|
|
10749
11204
|
"label",
|
|
10750
11205
|
{
|
|
10751
11206
|
htmlFor: verifyMethod === "email" ? "redacto-assisted-email" : "redacto-assisted-mobile",
|
|
10752
11207
|
style: styles3.fieldLabelWithIcon,
|
|
10753
11208
|
children: [
|
|
10754
|
-
verifyMethod === "email" ? /* @__PURE__ */
|
|
11209
|
+
verifyMethod === "email" ? /* @__PURE__ */ jsx7(MailIcon, { size: 14, color: "#475467" }) : /* @__PURE__ */ jsx7(PhoneIcon, { size: 14, color: "#475467" }),
|
|
10755
11210
|
verifyMethod === "email" ? ts("emailAddress") : ts("mobileNumber")
|
|
10756
11211
|
]
|
|
10757
11212
|
}
|
|
10758
11213
|
),
|
|
10759
|
-
!otpSent && /* @__PURE__ */
|
|
11214
|
+
!otpSent && /* @__PURE__ */ jsxs6(
|
|
10760
11215
|
"button",
|
|
10761
11216
|
{
|
|
10762
11217
|
type: "button",
|
|
@@ -10767,20 +11222,20 @@ var RedactoNoticeAssisted = ({
|
|
|
10767
11222
|
),
|
|
10768
11223
|
disabled: isSendingOtp,
|
|
10769
11224
|
children: [
|
|
10770
|
-
verifyMethod === "email" ? /* @__PURE__ */
|
|
11225
|
+
verifyMethod === "email" ? /* @__PURE__ */ jsx7(PhoneIcon, { size: 14, color: primaryColor }) : /* @__PURE__ */ jsx7(MailIcon, { size: 14, color: primaryColor }),
|
|
10771
11226
|
verifyMethod === "email" ? ts("useMobileInstead") : ts("useEmailInstead")
|
|
10772
11227
|
]
|
|
10773
11228
|
}
|
|
10774
11229
|
)
|
|
10775
11230
|
] }),
|
|
10776
|
-
verifyMethod === "mobile" ? /* @__PURE__ */
|
|
11231
|
+
verifyMethod === "mobile" ? /* @__PURE__ */ jsxs6(
|
|
10777
11232
|
"div",
|
|
10778
11233
|
{
|
|
10779
11234
|
className: "redacto-assisted-phone-field",
|
|
10780
11235
|
style: styles3.phoneField,
|
|
10781
11236
|
children: [
|
|
10782
|
-
/* @__PURE__ */
|
|
10783
|
-
/* @__PURE__ */
|
|
11237
|
+
/* @__PURE__ */ jsx7("span", { style: styles3.phonePrefix, children: ASSISTED_CONFIG.dialCode }),
|
|
11238
|
+
/* @__PURE__ */ jsx7(
|
|
10784
11239
|
"input",
|
|
10785
11240
|
{
|
|
10786
11241
|
id: "redacto-assisted-mobile",
|
|
@@ -10798,12 +11253,12 @@ var RedactoNoticeAssisted = ({
|
|
|
10798
11253
|
)
|
|
10799
11254
|
]
|
|
10800
11255
|
}
|
|
10801
|
-
) : /* @__PURE__ */
|
|
11256
|
+
) : /* @__PURE__ */ jsx7(
|
|
10802
11257
|
"div",
|
|
10803
11258
|
{
|
|
10804
11259
|
className: "redacto-assisted-phone-field",
|
|
10805
11260
|
style: styles3.phoneField,
|
|
10806
|
-
children: /* @__PURE__ */
|
|
11261
|
+
children: /* @__PURE__ */ jsx7(
|
|
10807
11262
|
"input",
|
|
10808
11263
|
{
|
|
10809
11264
|
id: "redacto-assisted-email",
|
|
@@ -10821,15 +11276,15 @@ var RedactoNoticeAssisted = ({
|
|
|
10821
11276
|
)
|
|
10822
11277
|
}
|
|
10823
11278
|
),
|
|
10824
|
-
!otpSent ? /* @__PURE__ */
|
|
10825
|
-
/* @__PURE__ */
|
|
10826
|
-
/* @__PURE__ */
|
|
11279
|
+
!otpSent ? /* @__PURE__ */ jsx7("p", { style: styles3.helperText, children: verifyMethod === "email" ? ts("otpHelperEmail") : ts("otpHelper") }) : /* @__PURE__ */ jsxs6("div", { style: styles3.otpStatusRow, children: [
|
|
11280
|
+
/* @__PURE__ */ jsxs6("span", { style: styles3.otpSentText, children: [
|
|
11281
|
+
/* @__PURE__ */ jsx7(CheckIcon, { size: 15, color: "#10B981" }),
|
|
10827
11282
|
" ",
|
|
10828
11283
|
ts("otpSentTo"),
|
|
10829
11284
|
" ",
|
|
10830
11285
|
verifyMethod === "email" ? email : `${ASSISTED_CONFIG.dialCode} ${mobile}`
|
|
10831
11286
|
] }),
|
|
10832
|
-
/* @__PURE__ */
|
|
11287
|
+
/* @__PURE__ */ jsx7(
|
|
10833
11288
|
"button",
|
|
10834
11289
|
{
|
|
10835
11290
|
type: "button",
|
|
@@ -10840,15 +11295,15 @@ var RedactoNoticeAssisted = ({
|
|
|
10840
11295
|
}
|
|
10841
11296
|
)
|
|
10842
11297
|
] }),
|
|
10843
|
-
createError && /* @__PURE__ */
|
|
10844
|
-
otpSent && /* @__PURE__ */
|
|
11298
|
+
createError && /* @__PURE__ */ jsx7("p", { style: styles3.fieldError, role: "alert", children: createError }),
|
|
11299
|
+
otpSent && /* @__PURE__ */ jsxs6(
|
|
10845
11300
|
"div",
|
|
10846
11301
|
{
|
|
10847
11302
|
ref: otpSectionRef,
|
|
10848
11303
|
style: { display: "flex", flexDirection: "column", gap: "12px" },
|
|
10849
11304
|
children: [
|
|
10850
|
-
/* @__PURE__ */
|
|
10851
|
-
/* @__PURE__ */
|
|
11305
|
+
/* @__PURE__ */ jsx7("p", { style: styles3.centerLabel, children: ts("enterNDigitOtp", { count: ASSISTED_CONFIG.otpLength }) }),
|
|
11306
|
+
/* @__PURE__ */ jsx7("div", { style: styles3.otpRow, children: otpDigits.map((digit, index) => /* @__PURE__ */ jsx7(
|
|
10852
11307
|
"input",
|
|
10853
11308
|
{
|
|
10854
11309
|
ref: (el) => {
|
|
@@ -10878,11 +11333,11 @@ var RedactoNoticeAssisted = ({
|
|
|
10878
11333
|
},
|
|
10879
11334
|
index
|
|
10880
11335
|
)) }),
|
|
10881
|
-
otpError && /* @__PURE__ */
|
|
10882
|
-
/* @__PURE__ */
|
|
10883
|
-
/* @__PURE__ */
|
|
11336
|
+
otpError && /* @__PURE__ */ jsx7("p", { style: styles3.fieldError, role: "alert", children: otpError }),
|
|
11337
|
+
/* @__PURE__ */ jsx7("p", { style: styles3.resendText, children: resendCountdown > 0 ? /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
11338
|
+
/* @__PURE__ */ jsx7(ClockIcon, {}),
|
|
10884
11339
|
ts("resendIn", { seconds: resendCountdown })
|
|
10885
|
-
] }) : /* @__PURE__ */
|
|
11340
|
+
] }) : /* @__PURE__ */ jsx7(
|
|
10886
11341
|
"button",
|
|
10887
11342
|
{
|
|
10888
11343
|
type: "button",
|
|
@@ -10928,7 +11383,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10928
11383
|
...isVerify ? {} : widthStyle,
|
|
10929
11384
|
backgroundColor: primaryColor
|
|
10930
11385
|
};
|
|
10931
|
-
const acceptAllButton = /* @__PURE__ */
|
|
11386
|
+
const acceptAllButton = /* @__PURE__ */ jsx7(
|
|
10932
11387
|
"button",
|
|
10933
11388
|
{
|
|
10934
11389
|
type: "button",
|
|
@@ -10942,7 +11397,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10942
11397
|
)
|
|
10943
11398
|
}
|
|
10944
11399
|
);
|
|
10945
|
-
const primaryButton = /* @__PURE__ */
|
|
11400
|
+
const primaryButton = /* @__PURE__ */ jsx7(
|
|
10946
11401
|
"button",
|
|
10947
11402
|
{
|
|
10948
11403
|
type: "button",
|
|
@@ -10963,7 +11418,7 @@ var RedactoNoticeAssisted = ({
|
|
|
10963
11418
|
children: primaryLabel
|
|
10964
11419
|
}
|
|
10965
11420
|
);
|
|
10966
|
-
const declineButton = /* @__PURE__ */
|
|
11421
|
+
const declineButton = /* @__PURE__ */ jsx7(
|
|
10967
11422
|
"button",
|
|
10968
11423
|
{
|
|
10969
11424
|
type: "button",
|
|
@@ -10982,16 +11437,16 @@ var RedactoNoticeAssisted = ({
|
|
|
10982
11437
|
}
|
|
10983
11438
|
);
|
|
10984
11439
|
if (isVerify) {
|
|
10985
|
-
return /* @__PURE__ */
|
|
11440
|
+
return /* @__PURE__ */ jsxs6("div", { style: { ...styles3.bottomSection, ...responsive.bottomSection }, children: [
|
|
10986
11441
|
primaryButton,
|
|
10987
11442
|
declineButton
|
|
10988
11443
|
] });
|
|
10989
11444
|
}
|
|
10990
|
-
return /* @__PURE__ */
|
|
11445
|
+
return /* @__PURE__ */ jsx7("div", { style: isMobile ? styles3.actionButtonStack : styles3.actionButtonRow, children: isMobile ? /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
10991
11446
|
acceptAllButton,
|
|
10992
11447
|
primaryButton,
|
|
10993
11448
|
declineButton
|
|
10994
|
-
] }) : /* @__PURE__ */
|
|
11449
|
+
] }) : /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
10995
11450
|
declineButton,
|
|
10996
11451
|
primaryButton,
|
|
10997
11452
|
acceptAllButton
|
|
@@ -10999,13 +11454,13 @@ var RedactoNoticeAssisted = ({
|
|
|
10999
11454
|
};
|
|
11000
11455
|
const renderBody = () => {
|
|
11001
11456
|
if (isLoading) {
|
|
11002
|
-
return /* @__PURE__ */
|
|
11457
|
+
return /* @__PURE__ */ jsx7("div", { style: styles3.loadingWrap, children: /* @__PURE__ */ jsx7("div", { style: styles3.loadingSpinner, "aria-label": ts("loadingNotice") }) });
|
|
11003
11458
|
}
|
|
11004
11459
|
if (fetchError || !content) {
|
|
11005
|
-
return /* @__PURE__ */
|
|
11006
|
-
/* @__PURE__ */
|
|
11007
|
-
/* @__PURE__ */
|
|
11008
|
-
/* @__PURE__ */
|
|
11460
|
+
return /* @__PURE__ */ jsxs6("div", { style: styles3.loadingWrap, children: [
|
|
11461
|
+
/* @__PURE__ */ jsx7("p", { style: styles3.errorTitle, children: ts("loadFailedTitle") }),
|
|
11462
|
+
/* @__PURE__ */ jsx7("p", { style: styles3.errorText, children: (fetchError == null ? void 0 : fetchError.message) || ts("tryAgain") }),
|
|
11463
|
+
/* @__PURE__ */ jsx7(
|
|
11009
11464
|
"button",
|
|
11010
11465
|
{
|
|
11011
11466
|
type: "button",
|
|
@@ -11017,16 +11472,16 @@ var RedactoNoticeAssisted = ({
|
|
|
11017
11472
|
)
|
|
11018
11473
|
] });
|
|
11019
11474
|
}
|
|
11020
|
-
return /* @__PURE__ */
|
|
11475
|
+
return /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
11021
11476
|
renderHeader(),
|
|
11022
|
-
/* @__PURE__ */
|
|
11477
|
+
/* @__PURE__ */ jsxs6("div", { style: { ...styles3.middleSection, ...responsive.middleSection }, children: [
|
|
11023
11478
|
renderNoticeScreen(step === "verify"),
|
|
11024
11479
|
step === "verify" && renderVerifyBlock()
|
|
11025
11480
|
] }),
|
|
11026
11481
|
renderFooter()
|
|
11027
11482
|
] });
|
|
11028
11483
|
};
|
|
11029
|
-
return /* @__PURE__ */
|
|
11484
|
+
return /* @__PURE__ */ jsx7("div", { style: styles3.overlay, children: /* @__PURE__ */ jsx7(
|
|
11030
11485
|
"div",
|
|
11031
11486
|
{
|
|
11032
11487
|
...NOTICE_FONT_ROOT_PROPS,
|
|
@@ -11039,7 +11494,7 @@ var RedactoNoticeAssisted = ({
|
|
|
11039
11494
|
role: "dialog",
|
|
11040
11495
|
"aria-modal": "true",
|
|
11041
11496
|
"aria-label": noticeTitle,
|
|
11042
|
-
children: /* @__PURE__ */
|
|
11497
|
+
children: /* @__PURE__ */ jsx7("div", { style: styles3.content, children: renderBody() })
|
|
11043
11498
|
}
|
|
11044
11499
|
) });
|
|
11045
11500
|
};
|
|
@@ -11061,7 +11516,7 @@ var scrollIntoViewSoft = (el) => {
|
|
|
11061
11516
|
var ClockIcon = ({
|
|
11062
11517
|
size = 13,
|
|
11063
11518
|
color = "#667085"
|
|
11064
|
-
}) => /* @__PURE__ */
|
|
11519
|
+
}) => /* @__PURE__ */ jsxs6(
|
|
11065
11520
|
"svg",
|
|
11066
11521
|
{
|
|
11067
11522
|
width: size,
|
|
@@ -11075,15 +11530,15 @@ var ClockIcon = ({
|
|
|
11075
11530
|
"aria-hidden": "true",
|
|
11076
11531
|
style: { flexShrink: 0 },
|
|
11077
11532
|
children: [
|
|
11078
|
-
/* @__PURE__ */
|
|
11079
|
-
/* @__PURE__ */
|
|
11533
|
+
/* @__PURE__ */ jsx7("circle", { cx: "12", cy: "12", r: "9" }),
|
|
11534
|
+
/* @__PURE__ */ jsx7("path", { d: "M12 7v5l3 2" })
|
|
11080
11535
|
]
|
|
11081
11536
|
}
|
|
11082
11537
|
);
|
|
11083
11538
|
var LockIcon = ({
|
|
11084
11539
|
size = 15,
|
|
11085
11540
|
color = "#475467"
|
|
11086
|
-
}) => /* @__PURE__ */
|
|
11541
|
+
}) => /* @__PURE__ */ jsxs6(
|
|
11087
11542
|
"svg",
|
|
11088
11543
|
{
|
|
11089
11544
|
width: size,
|
|
@@ -11097,15 +11552,15 @@ var LockIcon = ({
|
|
|
11097
11552
|
"aria-hidden": "true",
|
|
11098
11553
|
style: { flexShrink: 0 },
|
|
11099
11554
|
children: [
|
|
11100
|
-
/* @__PURE__ */
|
|
11101
|
-
/* @__PURE__ */
|
|
11555
|
+
/* @__PURE__ */ jsx7("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2" }),
|
|
11556
|
+
/* @__PURE__ */ jsx7("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
11102
11557
|
]
|
|
11103
11558
|
}
|
|
11104
11559
|
);
|
|
11105
11560
|
var CheckIcon = ({
|
|
11106
11561
|
size = 16,
|
|
11107
11562
|
color = "#10B981"
|
|
11108
|
-
}) => /* @__PURE__ */
|
|
11563
|
+
}) => /* @__PURE__ */ jsx7(
|
|
11109
11564
|
"svg",
|
|
11110
11565
|
{
|
|
11111
11566
|
width: size,
|
|
@@ -11118,13 +11573,13 @@ var CheckIcon = ({
|
|
|
11118
11573
|
strokeLinejoin: "round",
|
|
11119
11574
|
"aria-hidden": "true",
|
|
11120
11575
|
style: { flexShrink: 0 },
|
|
11121
|
-
children: /* @__PURE__ */
|
|
11576
|
+
children: /* @__PURE__ */ jsx7("path", { d: "M20 6 9 17l-5-5" })
|
|
11122
11577
|
}
|
|
11123
11578
|
);
|
|
11124
11579
|
var PhoneIcon = ({
|
|
11125
11580
|
size = 14,
|
|
11126
11581
|
color = "#475467"
|
|
11127
|
-
}) => /* @__PURE__ */
|
|
11582
|
+
}) => /* @__PURE__ */ jsx7(
|
|
11128
11583
|
"svg",
|
|
11129
11584
|
{
|
|
11130
11585
|
width: size,
|
|
@@ -11137,13 +11592,13 @@ var PhoneIcon = ({
|
|
|
11137
11592
|
strokeLinejoin: "round",
|
|
11138
11593
|
"aria-hidden": "true",
|
|
11139
11594
|
style: { flexShrink: 0 },
|
|
11140
|
-
children: /* @__PURE__ */
|
|
11595
|
+
children: /* @__PURE__ */ jsx7("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z" })
|
|
11141
11596
|
}
|
|
11142
11597
|
);
|
|
11143
11598
|
var MailIcon = ({
|
|
11144
11599
|
size = 14,
|
|
11145
11600
|
color = "#475467"
|
|
11146
|
-
}) => /* @__PURE__ */
|
|
11601
|
+
}) => /* @__PURE__ */ jsxs6(
|
|
11147
11602
|
"svg",
|
|
11148
11603
|
{
|
|
11149
11604
|
width: size,
|
|
@@ -11157,15 +11612,15 @@ var MailIcon = ({
|
|
|
11157
11612
|
"aria-hidden": "true",
|
|
11158
11613
|
style: { flexShrink: 0 },
|
|
11159
11614
|
children: [
|
|
11160
|
-
/* @__PURE__ */
|
|
11161
|
-
/* @__PURE__ */
|
|
11615
|
+
/* @__PURE__ */ jsx7("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
|
|
11616
|
+
/* @__PURE__ */ jsx7("path", { d: "m22 7-10 5L2 7" })
|
|
11162
11617
|
]
|
|
11163
11618
|
}
|
|
11164
11619
|
);
|
|
11165
11620
|
|
|
11166
11621
|
// src/RedactoNoticeConsent/components/DigiLockerCallback.tsx
|
|
11167
|
-
import { useCallback as
|
|
11168
|
-
import { Fragment as Fragment4, jsx as
|
|
11622
|
+
import { useCallback as useCallback6, useEffect as useEffect9, useRef as useRef6, useState as useState6 } from "react";
|
|
11623
|
+
import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
11169
11624
|
var DigiLockerCallback = ({
|
|
11170
11625
|
accessToken: propAccessToken,
|
|
11171
11626
|
baseUrl,
|
|
@@ -11175,9 +11630,9 @@ var DigiLockerCallback = ({
|
|
|
11175
11630
|
const [status, setStatus] = useState6("processing");
|
|
11176
11631
|
const [message, setMessage] = useState6("Verifying your guardian...");
|
|
11177
11632
|
const [errorDetail, setErrorDetail] = useState6(null);
|
|
11178
|
-
const retryTimeoutRef =
|
|
11179
|
-
const redirectTimeoutRef =
|
|
11180
|
-
const isMountedRef =
|
|
11633
|
+
const retryTimeoutRef = useRef6(null);
|
|
11634
|
+
const redirectTimeoutRef = useRef6(null);
|
|
11635
|
+
const isMountedRef = useRef6(true);
|
|
11181
11636
|
const getErrorMessage = (errorCode) => {
|
|
11182
11637
|
switch (errorCode) {
|
|
11183
11638
|
case "GUARDIAN_UNDER_18":
|
|
@@ -11194,7 +11649,7 @@ var DigiLockerCallback = ({
|
|
|
11194
11649
|
return "Verification failed. Please try again.";
|
|
11195
11650
|
}
|
|
11196
11651
|
};
|
|
11197
|
-
const redirectToOriginalPage =
|
|
11652
|
+
const redirectToOriginalPage = useCallback6(
|
|
11198
11653
|
(originalUrl, verificationResult, verificationReference) => {
|
|
11199
11654
|
updateConsentState({
|
|
11200
11655
|
verificationResult,
|
|
@@ -11207,7 +11662,7 @@ var DigiLockerCallback = ({
|
|
|
11207
11662
|
},
|
|
11208
11663
|
[]
|
|
11209
11664
|
);
|
|
11210
|
-
const handleCallback =
|
|
11665
|
+
const handleCallback = useCallback6(async () => {
|
|
11211
11666
|
var _a, _b;
|
|
11212
11667
|
try {
|
|
11213
11668
|
const params = new URLSearchParams(window.location.search);
|
|
@@ -11422,7 +11877,7 @@ var DigiLockerCallback = ({
|
|
|
11422
11877
|
}
|
|
11423
11878
|
}
|
|
11424
11879
|
}, [propAccessToken, baseUrl, onSuccess, onError, redirectToOriginalPage]);
|
|
11425
|
-
|
|
11880
|
+
useEffect9(() => {
|
|
11426
11881
|
injectCheckboxStyles();
|
|
11427
11882
|
handleCallback();
|
|
11428
11883
|
return () => {
|
|
@@ -11431,7 +11886,7 @@ var DigiLockerCallback = ({
|
|
|
11431
11886
|
if (redirectTimeoutRef.current) clearTimeout(redirectTimeoutRef.current);
|
|
11432
11887
|
};
|
|
11433
11888
|
}, [handleCallback]);
|
|
11434
|
-
const handleRetry =
|
|
11889
|
+
const handleRetry = useCallback6(() => {
|
|
11435
11890
|
const persistedState = getConsentState();
|
|
11436
11891
|
if (persistedState == null ? void 0 : persistedState.originalUrl) {
|
|
11437
11892
|
clearConsentState();
|
|
@@ -11495,7 +11950,7 @@ var DigiLockerCallback = ({
|
|
|
11495
11950
|
backgroundColor: "#fee2e2",
|
|
11496
11951
|
color: "#dc2626"
|
|
11497
11952
|
};
|
|
11498
|
-
const
|
|
11953
|
+
const titleStyle2 = {
|
|
11499
11954
|
fontSize: "22px",
|
|
11500
11955
|
fontWeight: 700,
|
|
11501
11956
|
color: "#111827",
|
|
@@ -11525,7 +11980,7 @@ var DigiLockerCallback = ({
|
|
|
11525
11980
|
lineHeight: 1.5,
|
|
11526
11981
|
textAlign: "left"
|
|
11527
11982
|
};
|
|
11528
|
-
const
|
|
11983
|
+
const buttonStyle2 = {
|
|
11529
11984
|
marginTop: "24px",
|
|
11530
11985
|
padding: "12px 28px",
|
|
11531
11986
|
backgroundColor: "#4f87ff",
|
|
@@ -11563,25 +12018,25 @@ var DigiLockerCallback = ({
|
|
|
11563
12018
|
transform: translateY(0);
|
|
11564
12019
|
}
|
|
11565
12020
|
`;
|
|
11566
|
-
return /* @__PURE__ */
|
|
11567
|
-
/* @__PURE__ */
|
|
11568
|
-
/* @__PURE__ */
|
|
11569
|
-
status === "processing" && /* @__PURE__ */
|
|
11570
|
-
/* @__PURE__ */
|
|
11571
|
-
/* @__PURE__ */
|
|
11572
|
-
/* @__PURE__ */
|
|
11573
|
-
/* @__PURE__ */
|
|
12021
|
+
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
12022
|
+
/* @__PURE__ */ jsx8("style", { dangerouslySetInnerHTML: { __html: keyframesStyle } }),
|
|
12023
|
+
/* @__PURE__ */ jsx8("div", { style: containerStyle, children: /* @__PURE__ */ jsxs7("div", { style: cardStyle, children: [
|
|
12024
|
+
status === "processing" && /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
12025
|
+
/* @__PURE__ */ jsx8("div", { style: spinnerContainerStyle, children: /* @__PURE__ */ jsx8("div", { style: spinnerStyle }) }),
|
|
12026
|
+
/* @__PURE__ */ jsx8("h2", { style: titleStyle2, children: "Processing Verification" }),
|
|
12027
|
+
/* @__PURE__ */ jsx8("p", { style: messageStyle, children: message }),
|
|
12028
|
+
/* @__PURE__ */ jsx8("p", { style: subtextStyle, children: "Please wait while we verify your guardian's identity..." })
|
|
11574
12029
|
] }),
|
|
11575
|
-
status === "success" && /* @__PURE__ */
|
|
11576
|
-
/* @__PURE__ */
|
|
11577
|
-
/* @__PURE__ */
|
|
12030
|
+
status === "success" && /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
12031
|
+
/* @__PURE__ */ jsxs7("div", { style: { position: "relative", width: "72px", height: "72px", margin: "0 auto 28px" }, children: [
|
|
12032
|
+
/* @__PURE__ */ jsx8("div", { style: {
|
|
11578
12033
|
position: "absolute",
|
|
11579
12034
|
inset: "-8px",
|
|
11580
12035
|
borderRadius: "50%",
|
|
11581
12036
|
border: "2px solid #d1fae5",
|
|
11582
12037
|
animation: "redacto-dl-pulse 1.5s ease-out infinite"
|
|
11583
12038
|
} }),
|
|
11584
|
-
/* @__PURE__ */
|
|
12039
|
+
/* @__PURE__ */ jsx8("div", { style: successIconStyle, children: /* @__PURE__ */ jsx8(
|
|
11585
12040
|
"svg",
|
|
11586
12041
|
{
|
|
11587
12042
|
width: "30",
|
|
@@ -11593,16 +12048,16 @@ var DigiLockerCallback = ({
|
|
|
11593
12048
|
strokeLinecap: "round",
|
|
11594
12049
|
strokeLinejoin: "round",
|
|
11595
12050
|
style: { strokeDasharray: 24, animation: "redacto-dl-check 0.4s ease-out 0.3s forwards", strokeDashoffset: 24 },
|
|
11596
|
-
children: /* @__PURE__ */
|
|
12051
|
+
children: /* @__PURE__ */ jsx8("polyline", { points: "20 6 9 17 4 12" })
|
|
11597
12052
|
}
|
|
11598
12053
|
) })
|
|
11599
12054
|
] }),
|
|
11600
|
-
/* @__PURE__ */
|
|
11601
|
-
/* @__PURE__ */
|
|
11602
|
-
/* @__PURE__ */
|
|
12055
|
+
/* @__PURE__ */ jsx8("h2", { style: titleStyle2, children: "Verification Successful" }),
|
|
12056
|
+
/* @__PURE__ */ jsx8("p", { style: messageStyle, children: message }),
|
|
12057
|
+
/* @__PURE__ */ jsx8("p", { style: subtextStyle, children: "You will be redirected automatically." })
|
|
11603
12058
|
] }),
|
|
11604
|
-
status === "error" && /* @__PURE__ */
|
|
11605
|
-
/* @__PURE__ */
|
|
12059
|
+
status === "error" && /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
12060
|
+
/* @__PURE__ */ jsx8("div", { style: errorIconStyle, children: /* @__PURE__ */ jsxs7(
|
|
11606
12061
|
"svg",
|
|
11607
12062
|
{
|
|
11608
12063
|
width: "30",
|
|
@@ -11614,19 +12069,19 @@ var DigiLockerCallback = ({
|
|
|
11614
12069
|
strokeLinecap: "round",
|
|
11615
12070
|
strokeLinejoin: "round",
|
|
11616
12071
|
children: [
|
|
11617
|
-
/* @__PURE__ */
|
|
11618
|
-
/* @__PURE__ */
|
|
12072
|
+
/* @__PURE__ */ jsx8("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
12073
|
+
/* @__PURE__ */ jsx8("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
11619
12074
|
]
|
|
11620
12075
|
}
|
|
11621
12076
|
) }),
|
|
11622
|
-
/* @__PURE__ */
|
|
11623
|
-
/* @__PURE__ */
|
|
11624
|
-
errorDetail && /* @__PURE__ */
|
|
11625
|
-
/* @__PURE__ */
|
|
12077
|
+
/* @__PURE__ */ jsx8("h2", { style: titleStyle2, children: "Verification Failed" }),
|
|
12078
|
+
/* @__PURE__ */ jsx8("p", { style: messageStyle, children: message }),
|
|
12079
|
+
errorDetail && /* @__PURE__ */ jsx8("p", { style: errorDetailStyle, children: errorDetail }),
|
|
12080
|
+
/* @__PURE__ */ jsx8(
|
|
11626
12081
|
"button",
|
|
11627
12082
|
{
|
|
11628
12083
|
className: "redacto-dl-retry-btn",
|
|
11629
|
-
style:
|
|
12084
|
+
style: buttonStyle2,
|
|
11630
12085
|
onClick: handleRetry,
|
|
11631
12086
|
children: "Try Again"
|
|
11632
12087
|
}
|