@redacto.io/consent-sdk-react-native 5.0.0 → 5.0.1-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 +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +567 -386
- package/dist/index.mjs +486 -305
- package/dist/privacy-center.js +25 -14
- package/dist/privacy-center.mjs +25 -14
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
Modal,
|
|
20
20
|
Pressable,
|
|
21
21
|
ScrollView,
|
|
22
|
-
StyleSheet as
|
|
23
|
-
Text as
|
|
22
|
+
StyleSheet as StyleSheet5,
|
|
23
|
+
Text as Text3,
|
|
24
24
|
TextInput,
|
|
25
25
|
TouchableOpacity as TouchableOpacity3,
|
|
26
26
|
View as View3
|
|
@@ -90,6 +90,8 @@ var sandboxQueryIdentity = (sandbox) => sandboxBodyIdentity(sandbox);
|
|
|
90
90
|
|
|
91
91
|
// src/constants.ts
|
|
92
92
|
var DEFAULT_CONSENT_API_BASE_URL = "https://api.redacto.io/consent";
|
|
93
|
+
var REQUIRED_MARKER_GLYPH = " *";
|
|
94
|
+
var REQUIRED_MARKER_COLOR = "red";
|
|
93
95
|
|
|
94
96
|
// src/RedactoNoticeConsent/api/index.ts
|
|
95
97
|
var apiCache = /* @__PURE__ */ new Map();
|
|
@@ -539,18 +541,28 @@ var styles = StyleSheet.create({
|
|
|
539
541
|
}
|
|
540
542
|
});
|
|
541
543
|
|
|
544
|
+
// src/RedactoNoticeConsent/components/RequiredMarker.tsx
|
|
545
|
+
import { StyleSheet as StyleSheet2, Text } from "react-native";
|
|
546
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
547
|
+
var RequiredMarker = () => /* @__PURE__ */ jsx2(Text, { style: styles2.marker, children: REQUIRED_MARKER_GLYPH });
|
|
548
|
+
var styles2 = StyleSheet2.create({
|
|
549
|
+
marker: {
|
|
550
|
+
color: REQUIRED_MARKER_COLOR
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
|
|
542
554
|
// src/RedactoNoticeConsent/components/VerificationScreen.tsx
|
|
543
555
|
import { useEffect, useRef } from "react";
|
|
544
556
|
import {
|
|
545
557
|
ActivityIndicator,
|
|
546
558
|
Animated,
|
|
547
|
-
StyleSheet as
|
|
548
|
-
Text,
|
|
559
|
+
StyleSheet as StyleSheet3,
|
|
560
|
+
Text as Text2,
|
|
549
561
|
TouchableOpacity as TouchableOpacity2,
|
|
550
562
|
View as View2
|
|
551
563
|
} from "react-native";
|
|
552
564
|
import Svg2, { Circle as SvgCircle, Path as Path2 } from "react-native-svg";
|
|
553
|
-
import { jsx as
|
|
565
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
554
566
|
var VerificationScreen = ({
|
|
555
567
|
status,
|
|
556
568
|
errorMessage,
|
|
@@ -619,18 +631,18 @@ var VerificationScreen = ({
|
|
|
619
631
|
}
|
|
620
632
|
};
|
|
621
633
|
const renderPendingContent = () => /* @__PURE__ */ jsxs(View2, { style: s.centerContent, children: [
|
|
622
|
-
/* @__PURE__ */
|
|
634
|
+
/* @__PURE__ */ jsx3(ActivityIndicator, { size: "large", color: acceptBg, style: s.pendingSpinner }),
|
|
623
635
|
/* @__PURE__ */ jsxs(View2, { style: s.infoBanner, children: [
|
|
624
636
|
/* @__PURE__ */ jsxs(Svg2, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: [
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ jsx3(SvgCircle, { cx: "12", cy: "12", r: "10", stroke: "#059669", strokeWidth: 2 }),
|
|
638
|
+
/* @__PURE__ */ jsx3(Path2, { d: "M12 16v-4M12 8h.01", stroke: "#059669", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
627
639
|
] }),
|
|
628
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ jsx3(Text2, { style: s.infoBannerText, children: "Please complete the verification in Safari. This screen will update automatically when verification is complete." })
|
|
629
641
|
] })
|
|
630
642
|
] });
|
|
631
643
|
const renderSuccessContent = () => /* @__PURE__ */ jsxs(View2, { style: s.centerContent, children: [
|
|
632
644
|
/* @__PURE__ */ jsxs(View2, { style: s.iconWrapper, children: [
|
|
633
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ jsx3(
|
|
634
646
|
Animated.View,
|
|
635
647
|
{
|
|
636
648
|
style: [
|
|
@@ -647,7 +659,7 @@ var VerificationScreen = ({
|
|
|
647
659
|
]
|
|
648
660
|
}
|
|
649
661
|
),
|
|
650
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ jsx3(Animated.View, { style: [s.successCircle, { transform: [{ scale: scaleAnim }] }], children: /* @__PURE__ */ jsx3(Svg2, { width: 30, height: 30, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx3(
|
|
651
663
|
Path2,
|
|
652
664
|
{
|
|
653
665
|
d: "M5 13L9 17L19 7",
|
|
@@ -658,7 +670,7 @@ var VerificationScreen = ({
|
|
|
658
670
|
}
|
|
659
671
|
) }) })
|
|
660
672
|
] }),
|
|
661
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ jsx3(
|
|
662
674
|
Animated.Text,
|
|
663
675
|
{
|
|
664
676
|
style: [
|
|
@@ -668,7 +680,7 @@ var VerificationScreen = ({
|
|
|
668
680
|
children: "Verification Completed"
|
|
669
681
|
}
|
|
670
682
|
),
|
|
671
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ jsx3(
|
|
672
684
|
Animated.Text,
|
|
673
685
|
{
|
|
674
686
|
style: [
|
|
@@ -680,7 +692,7 @@ var VerificationScreen = ({
|
|
|
680
692
|
)
|
|
681
693
|
] });
|
|
682
694
|
const renderErrorContent = () => /* @__PURE__ */ jsxs(View2, { style: s.centerContent, children: [
|
|
683
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ jsx3(View2, { style: s.iconWrapper, children: /* @__PURE__ */ jsx3(Animated.View, { style: [s.errorCircle, { transform: [{ scale: scaleAnim }] }], children: /* @__PURE__ */ jsx3(Svg2, { width: 30, height: 30, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx3(
|
|
684
696
|
Path2,
|
|
685
697
|
{
|
|
686
698
|
d: "M18 6L6 18M6 6L18 18",
|
|
@@ -704,7 +716,7 @@ var VerificationScreen = ({
|
|
|
704
716
|
}
|
|
705
717
|
),
|
|
706
718
|
/* @__PURE__ */ jsxs(Animated.View, { style: [s.errorBanner, { opacity: contentAnim }], children: [
|
|
707
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ jsx3(Svg2, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: /* @__PURE__ */ jsx3(
|
|
708
720
|
Path2,
|
|
709
721
|
{
|
|
710
722
|
d: "M12 9v4M12 17h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",
|
|
@@ -714,69 +726,69 @@ var VerificationScreen = ({
|
|
|
714
726
|
strokeLinejoin: "round"
|
|
715
727
|
}
|
|
716
728
|
) }),
|
|
717
|
-
/* @__PURE__ */
|
|
729
|
+
/* @__PURE__ */ jsx3(Text2, { style: s.errorBannerText, children: getErrorGuidance() })
|
|
718
730
|
] })
|
|
719
731
|
] });
|
|
720
732
|
const renderBottomButtons = () => {
|
|
721
733
|
if (status === "verified") {
|
|
722
734
|
if (!onContinue) return null;
|
|
723
|
-
return /* @__PURE__ */
|
|
735
|
+
return /* @__PURE__ */ jsx3(View2, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ jsx3(
|
|
724
736
|
TouchableOpacity2,
|
|
725
737
|
{
|
|
726
738
|
style: [s.primaryButton, { backgroundColor: acceptBg }],
|
|
727
739
|
onPress: onContinue,
|
|
728
740
|
activeOpacity: 0.8,
|
|
729
|
-
children: /* @__PURE__ */
|
|
741
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.primaryButtonText, { color: acceptText }], children: "Continue" })
|
|
730
742
|
}
|
|
731
743
|
) });
|
|
732
744
|
}
|
|
733
745
|
if (status === "failed" || status === "expired") {
|
|
734
746
|
return /* @__PURE__ */ jsxs(View2, { style: [s.bottomSection, { borderTopColor: borderColor }], children: [
|
|
735
|
-
errorCode === "GUARDIAN_UNDER_18" && onChangeGuardian ? /* @__PURE__ */
|
|
747
|
+
errorCode === "GUARDIAN_UNDER_18" && onChangeGuardian ? /* @__PURE__ */ jsx3(
|
|
736
748
|
TouchableOpacity2,
|
|
737
749
|
{
|
|
738
750
|
style: [s.primaryButton, { backgroundColor: acceptBg }],
|
|
739
751
|
onPress: onChangeGuardian,
|
|
740
752
|
activeOpacity: 0.8,
|
|
741
|
-
children: /* @__PURE__ */
|
|
753
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.primaryButtonText, { color: acceptText }], children: "Change Guardian" })
|
|
742
754
|
}
|
|
743
|
-
) : canRetry !== false ? /* @__PURE__ */
|
|
755
|
+
) : canRetry !== false ? /* @__PURE__ */ jsx3(
|
|
744
756
|
TouchableOpacity2,
|
|
745
757
|
{
|
|
746
758
|
style: [s.primaryButton, { backgroundColor: acceptBg }],
|
|
747
759
|
onPress: onRetry,
|
|
748
760
|
activeOpacity: 0.8,
|
|
749
|
-
children: /* @__PURE__ */
|
|
761
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.primaryButtonText, { color: acceptText }], children: "Try Again" })
|
|
750
762
|
}
|
|
751
763
|
) : null,
|
|
752
|
-
/* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ jsx3(
|
|
753
765
|
TouchableOpacity2,
|
|
754
766
|
{
|
|
755
767
|
style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
|
|
756
768
|
onPress: onBack,
|
|
757
769
|
activeOpacity: 0.8,
|
|
758
|
-
children: /* @__PURE__ */
|
|
770
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.outlineButtonText, { color: declineText }], children: "Go Back" })
|
|
759
771
|
}
|
|
760
772
|
)
|
|
761
773
|
] });
|
|
762
774
|
}
|
|
763
|
-
return /* @__PURE__ */
|
|
775
|
+
return /* @__PURE__ */ jsx3(View2, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ jsx3(
|
|
764
776
|
TouchableOpacity2,
|
|
765
777
|
{
|
|
766
778
|
style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
|
|
767
779
|
onPress: onBack,
|
|
768
780
|
activeOpacity: 0.8,
|
|
769
|
-
children: /* @__PURE__ */
|
|
781
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.outlineButtonText, { color: declineText }], children: "Cancel" })
|
|
770
782
|
}
|
|
771
783
|
) });
|
|
772
784
|
};
|
|
773
785
|
return /* @__PURE__ */ jsxs(View2, { style: s.root, children: [
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */
|
|
786
|
+
/* @__PURE__ */ jsx3(View2, { style: [s.topSection, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsx3(Text2, { style: [s.topTitle, { color: headingColor }], children: "Guardian Verification" }) }),
|
|
787
|
+
/* @__PURE__ */ jsx3(View2, { style: s.centerArea, children: status === "verified" ? renderSuccessContent() : status === "failed" || status === "expired" ? renderErrorContent() : renderPendingContent() }),
|
|
776
788
|
renderBottomButtons()
|
|
777
789
|
] });
|
|
778
790
|
};
|
|
779
|
-
var s =
|
|
791
|
+
var s = StyleSheet3.create({
|
|
780
792
|
root: {
|
|
781
793
|
flex: 1
|
|
782
794
|
},
|
|
@@ -786,7 +798,7 @@ var s = StyleSheet2.create({
|
|
|
786
798
|
alignItems: "center",
|
|
787
799
|
paddingHorizontal: 20,
|
|
788
800
|
paddingVertical: 16,
|
|
789
|
-
borderBottomWidth:
|
|
801
|
+
borderBottomWidth: StyleSheet3.hairlineWidth,
|
|
790
802
|
borderBottomColor: "#E5E7EB"
|
|
791
803
|
},
|
|
792
804
|
topTitle: {
|
|
@@ -894,7 +906,7 @@ var s = StyleSheet2.create({
|
|
|
894
906
|
bottomSection: {
|
|
895
907
|
padding: 20,
|
|
896
908
|
gap: 8,
|
|
897
|
-
borderTopWidth:
|
|
909
|
+
borderTopWidth: StyleSheet3.hairlineWidth,
|
|
898
910
|
borderTopColor: "#E5E7EB"
|
|
899
911
|
},
|
|
900
912
|
primaryButton: {
|
|
@@ -929,10 +941,13 @@ var DPO_AUDIO_ELEMENT_MAP = [
|
|
|
929
941
|
{ audioKey: "dpo_text_audio_url", elementId: "dpo-dpo-text" },
|
|
930
942
|
{ audioKey: "dpo_anchor_text_audio_url", elementId: "dpo-dpo-link" }
|
|
931
943
|
];
|
|
944
|
+
var DEFAULT_ACCEPT_ALL_BUTTON_TEXT = "Accept All";
|
|
945
|
+
var DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT = "Accept Selected";
|
|
946
|
+
var DEFAULT_DECLINE_BUTTON_TEXT = "Decline";
|
|
932
947
|
|
|
933
948
|
// src/RedactoNoticeConsent/styles.ts
|
|
934
|
-
import { StyleSheet as
|
|
935
|
-
var
|
|
949
|
+
import { StyleSheet as StyleSheet4, Platform } from "react-native";
|
|
950
|
+
var styles3 = StyleSheet4.create({
|
|
936
951
|
overlay: {
|
|
937
952
|
flex: 1,
|
|
938
953
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
@@ -1094,6 +1109,29 @@ var styles2 = StyleSheet3.create({
|
|
|
1094
1109
|
backgroundColor: "#ffffff",
|
|
1095
1110
|
flexShrink: 0
|
|
1096
1111
|
},
|
|
1112
|
+
/**
|
|
1113
|
+
* The main notice footer. Wide: one row with decline pushed left and the
|
|
1114
|
+
* accepts grouped right (see `declineSpacer`). Narrow: a full-width stack.
|
|
1115
|
+
* The guardian-verification and age-gate sub-flows still use
|
|
1116
|
+
* `bottomSection` — they have their own two-button layout.
|
|
1117
|
+
*/
|
|
1118
|
+
actionButtonRow: {
|
|
1119
|
+
flexDirection: "row",
|
|
1120
|
+
alignItems: "center",
|
|
1121
|
+
gap: 10,
|
|
1122
|
+
paddingTop: 15,
|
|
1123
|
+
paddingBottom: 16,
|
|
1124
|
+
backgroundColor: "#ffffff",
|
|
1125
|
+
flexShrink: 0
|
|
1126
|
+
},
|
|
1127
|
+
actionButtonStack: {
|
|
1128
|
+
flexDirection: "column",
|
|
1129
|
+
gap: 10,
|
|
1130
|
+
paddingTop: 15,
|
|
1131
|
+
paddingBottom: 16,
|
|
1132
|
+
backgroundColor: "#ffffff",
|
|
1133
|
+
flexShrink: 0
|
|
1134
|
+
},
|
|
1097
1135
|
button: {
|
|
1098
1136
|
borderRadius: 8,
|
|
1099
1137
|
paddingVertical: 9,
|
|
@@ -1101,6 +1139,24 @@ var styles2 = StyleSheet3.create({
|
|
|
1101
1139
|
alignItems: "center",
|
|
1102
1140
|
justifyContent: "center"
|
|
1103
1141
|
},
|
|
1142
|
+
/**
|
|
1143
|
+
* In the wide row each button shrinks to its own label so the left/right
|
|
1144
|
+
* split survives; `flexShrink` lets a long translated label wrap rather than
|
|
1145
|
+
* overflow the modal.
|
|
1146
|
+
*/
|
|
1147
|
+
rowButton: {
|
|
1148
|
+
flexShrink: 1,
|
|
1149
|
+
paddingHorizontal: 16
|
|
1150
|
+
},
|
|
1151
|
+
/** In the narrow stack every button spans the full width. */
|
|
1152
|
+
stackButton: {
|
|
1153
|
+
alignSelf: "stretch",
|
|
1154
|
+
paddingHorizontal: 16
|
|
1155
|
+
},
|
|
1156
|
+
/** Pushes everything after decline to the right edge of the wide row. */
|
|
1157
|
+
declineSpacer: {
|
|
1158
|
+
marginRight: "auto"
|
|
1159
|
+
},
|
|
1104
1160
|
buttonText: {
|
|
1105
1161
|
fontWeight: "400",
|
|
1106
1162
|
fontSize: 16,
|
|
@@ -1113,6 +1169,19 @@ var styles2 = StyleSheet3.create({
|
|
|
1113
1169
|
acceptButtonText: {
|
|
1114
1170
|
color: "#ffffff"
|
|
1115
1171
|
},
|
|
1172
|
+
/**
|
|
1173
|
+
* The accept-all shortcut. Outlined rather than filled so the primary
|
|
1174
|
+
* "accept selected" action stays dominant, but tinted with the accent colour
|
|
1175
|
+
* so it still reads as an accept next to the neutral decline button.
|
|
1176
|
+
*/
|
|
1177
|
+
acceptSecondaryButton: {
|
|
1178
|
+
borderWidth: 1,
|
|
1179
|
+
borderColor: "#4f87ff",
|
|
1180
|
+
backgroundColor: "#ffffff"
|
|
1181
|
+
},
|
|
1182
|
+
acceptSecondaryButtonText: {
|
|
1183
|
+
color: "#4f87ff"
|
|
1184
|
+
},
|
|
1116
1185
|
cancelButton: {
|
|
1117
1186
|
borderWidth: 1,
|
|
1118
1187
|
borderColor: "#d0d5dd",
|
|
@@ -1192,9 +1261,6 @@ var styles2 = StyleSheet3.create({
|
|
|
1192
1261
|
fontSize: 14,
|
|
1193
1262
|
flex: 1
|
|
1194
1263
|
},
|
|
1195
|
-
requiredAsterisk: {
|
|
1196
|
-
color: "red"
|
|
1197
|
-
},
|
|
1198
1264
|
divider: {
|
|
1199
1265
|
height: 1,
|
|
1200
1266
|
backgroundColor: "#e5e7eb",
|
|
@@ -1259,6 +1325,24 @@ var styles2 = StyleSheet3.create({
|
|
|
1259
1325
|
}
|
|
1260
1326
|
});
|
|
1261
1327
|
|
|
1328
|
+
// src/RedactoNoticeConsent/utils/consentSelection.ts
|
|
1329
|
+
var dataElementKey = (purposeUuid, elementUuid) => `${purposeUuid}-${elementUuid}`;
|
|
1330
|
+
var buildSelectionForMode = (purposes, mode, current) => {
|
|
1331
|
+
if (mode === "selected") {
|
|
1332
|
+
return current;
|
|
1333
|
+
}
|
|
1334
|
+
const selectedPurposes = {};
|
|
1335
|
+
const selectedDataElements = {};
|
|
1336
|
+
purposes.forEach((purpose) => {
|
|
1337
|
+
selectedPurposes[purpose.uuid] = true;
|
|
1338
|
+
purpose.data_elements.forEach((element) => {
|
|
1339
|
+
selectedDataElements[dataElementKey(purpose.uuid, element.uuid)] = element.enabled;
|
|
1340
|
+
});
|
|
1341
|
+
});
|
|
1342
|
+
return { selectedPurposes, selectedDataElements };
|
|
1343
|
+
};
|
|
1344
|
+
var hasRequiredDataElement = (purpose) => purpose.data_elements.some((element) => element.required);
|
|
1345
|
+
|
|
1262
1346
|
// src/RedactoNoticeConsent/useResponsive.ts
|
|
1263
1347
|
import { useWindowDimensions } from "react-native";
|
|
1264
1348
|
var useResponsive = () => {
|
|
@@ -1271,13 +1355,13 @@ var useResponsive = () => {
|
|
|
1271
1355
|
};
|
|
1272
1356
|
|
|
1273
1357
|
// src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
|
|
1274
|
-
import { Fragment, jsx as
|
|
1358
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1275
1359
|
function RemoteLogo({ uri }) {
|
|
1276
1360
|
const isSvg = uri.toLowerCase().endsWith(".svg") || uri.toLowerCase().includes("image/svg");
|
|
1277
1361
|
if (isSvg && SvgUri) {
|
|
1278
|
-
return /* @__PURE__ */
|
|
1362
|
+
return /* @__PURE__ */ jsx4(SvgUri, { uri, width: 32, height: 32 });
|
|
1279
1363
|
}
|
|
1280
|
-
return /* @__PURE__ */
|
|
1364
|
+
return /* @__PURE__ */ jsx4(Image, { style: styles3.logo, source: { uri } });
|
|
1281
1365
|
}
|
|
1282
1366
|
function stripHtml(html) {
|
|
1283
1367
|
return html.replace(/<[^>]*>/g, "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/ /g, " ").trim();
|
|
@@ -1330,16 +1414,16 @@ var PurposeItem = ({
|
|
|
1330
1414
|
const headingColor = (settings == null ? void 0 : settings.headingColor) || "#323B4B";
|
|
1331
1415
|
const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
|
|
1332
1416
|
return /* @__PURE__ */ jsxs2(View3, { children: [
|
|
1333
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1417
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.optionItem, children: [
|
|
1334
1418
|
/* @__PURE__ */ jsxs2(
|
|
1335
1419
|
TouchableOpacity3,
|
|
1336
1420
|
{
|
|
1337
|
-
style:
|
|
1421
|
+
style: styles3.optionLeft,
|
|
1338
1422
|
onPress: () => onPurposeCollapse(purpose.uuid),
|
|
1339
1423
|
accessibilityRole: "button",
|
|
1340
1424
|
accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)} details`,
|
|
1341
1425
|
children: [
|
|
1342
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ jsx4(View3, { style: styles3.purposeChevron, children: /* @__PURE__ */ jsx4(Svg3, { width: 7, height: 12, viewBox: "0 0 7 12", fill: "none", children: /* @__PURE__ */ jsx4(
|
|
1343
1427
|
Path3,
|
|
1344
1428
|
{
|
|
1345
1429
|
d: "M1 1L6 6L1 11",
|
|
@@ -1350,25 +1434,28 @@ var PurposeItem = ({
|
|
|
1350
1434
|
transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
|
|
1351
1435
|
}
|
|
1352
1436
|
) }) }),
|
|
1353
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1354
|
-
/* @__PURE__ */
|
|
1355
|
-
|
|
1437
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.optionTextContainer, children: [
|
|
1438
|
+
/* @__PURE__ */ jsxs2(
|
|
1439
|
+
Text3,
|
|
1356
1440
|
{
|
|
1357
1441
|
style: [
|
|
1358
|
-
|
|
1442
|
+
styles3.optionTitle,
|
|
1359
1443
|
{ color: headingColor },
|
|
1360
|
-
activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ?
|
|
1444
|
+
activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ? styles3.ttsHighlight : null
|
|
1361
1445
|
],
|
|
1362
|
-
children:
|
|
1446
|
+
children: [
|
|
1447
|
+
getTranslatedText("purposes.name", purpose.name, purpose.uuid),
|
|
1448
|
+
hasRequiredDataElement(purpose) && /* @__PURE__ */ jsx4(RequiredMarker, {})
|
|
1449
|
+
]
|
|
1363
1450
|
}
|
|
1364
1451
|
),
|
|
1365
|
-
/* @__PURE__ */
|
|
1366
|
-
|
|
1452
|
+
/* @__PURE__ */ jsx4(
|
|
1453
|
+
Text3,
|
|
1367
1454
|
{
|
|
1368
1455
|
style: [
|
|
1369
|
-
|
|
1456
|
+
styles3.optionDescription,
|
|
1370
1457
|
{ color: textColor },
|
|
1371
|
-
activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ?
|
|
1458
|
+
activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ? styles3.ttsHighlight : null
|
|
1372
1459
|
],
|
|
1373
1460
|
children: getTranslatedText("purposes.description", purpose.description, purpose.uuid)
|
|
1374
1461
|
}
|
|
@@ -1377,7 +1464,7 @@ var PurposeItem = ({
|
|
|
1377
1464
|
]
|
|
1378
1465
|
}
|
|
1379
1466
|
),
|
|
1380
|
-
!isAlreadyConsented && /* @__PURE__ */
|
|
1467
|
+
!isAlreadyConsented && /* @__PURE__ */ jsx4(
|
|
1381
1468
|
Checkbox,
|
|
1382
1469
|
{
|
|
1383
1470
|
checked: selectedPurposes[purpose.uuid] || false,
|
|
@@ -1387,7 +1474,7 @@ var PurposeItem = ({
|
|
|
1387
1474
|
accessibilityLabel: `Select all data elements for ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`
|
|
1388
1475
|
}
|
|
1389
1476
|
),
|
|
1390
|
-
isAlreadyConsented && /* @__PURE__ */
|
|
1477
|
+
isAlreadyConsented && /* @__PURE__ */ jsx4(View3, { style: styles3.consentedCheckmark, children: /* @__PURE__ */ jsx4(Svg3, { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx4(
|
|
1391
1478
|
Path3,
|
|
1392
1479
|
{
|
|
1393
1480
|
d: "M4 6L5.5 7.5L8.5 4.5",
|
|
@@ -1398,22 +1485,22 @@ var PurposeItem = ({
|
|
|
1398
1485
|
}
|
|
1399
1486
|
) }) })
|
|
1400
1487
|
] }),
|
|
1401
|
-
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */
|
|
1488
|
+
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ jsx4(View3, { style: styles3.dataElementsContainer, children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ jsxs2(View3, { style: styles3.dataElementItem, children: [
|
|
1402
1489
|
/* @__PURE__ */ jsxs2(
|
|
1403
|
-
|
|
1490
|
+
Text3,
|
|
1404
1491
|
{
|
|
1405
1492
|
style: [
|
|
1406
|
-
|
|
1493
|
+
styles3.dataElementText,
|
|
1407
1494
|
{ color: textColor },
|
|
1408
|
-
activeTTSSegmentKey === `element_${dataElement.uuid}` ?
|
|
1495
|
+
activeTTSSegmentKey === `element_${dataElement.uuid}` ? styles3.ttsHighlight : null
|
|
1409
1496
|
],
|
|
1410
1497
|
children: [
|
|
1411
1498
|
getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
|
|
1412
|
-
dataElement.required && /* @__PURE__ */
|
|
1499
|
+
dataElement.required && /* @__PURE__ */ jsx4(RequiredMarker, {})
|
|
1413
1500
|
]
|
|
1414
1501
|
}
|
|
1415
1502
|
),
|
|
1416
|
-
!isAlreadyConsented && /* @__PURE__ */
|
|
1503
|
+
!isAlreadyConsented && /* @__PURE__ */ jsx4(
|
|
1417
1504
|
Checkbox,
|
|
1418
1505
|
{
|
|
1419
1506
|
checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,
|
|
@@ -1425,7 +1512,7 @@ var PurposeItem = ({
|
|
|
1425
1512
|
),
|
|
1426
1513
|
isAlreadyConsented && (() => {
|
|
1427
1514
|
const wasSelected = initialDataElementSelections[`${purpose.uuid}-${dataElement.uuid}`] || false;
|
|
1428
|
-
return wasSelected ? /* @__PURE__ */
|
|
1515
|
+
return wasSelected ? /* @__PURE__ */ jsx4(View3, { style: styles3.consentedCheckmarkSmall, children: /* @__PURE__ */ jsx4(Svg3, { width: 10, height: 10, viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ jsx4(
|
|
1429
1516
|
Path3,
|
|
1430
1517
|
{
|
|
1431
1518
|
d: "M3 5L4.5 6.5L7.5 3.5",
|
|
@@ -1434,7 +1521,7 @@ var PurposeItem = ({
|
|
|
1434
1521
|
strokeLinecap: "round",
|
|
1435
1522
|
strokeLinejoin: "round"
|
|
1436
1523
|
}
|
|
1437
|
-
) }) }) : /* @__PURE__ */
|
|
1524
|
+
) }) }) : /* @__PURE__ */ jsx4(View3, { style: styles3.notConsentedCircle });
|
|
1438
1525
|
})()
|
|
1439
1526
|
] }, dataElement.uuid)) })
|
|
1440
1527
|
] });
|
|
@@ -1446,47 +1533,47 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1446
1533
|
const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
|
|
1447
1534
|
const [showRelationshipDropdown, setShowRelationshipDropdown] = useState(false);
|
|
1448
1535
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1449
|
-
/* @__PURE__ */
|
|
1450
|
-
logoUrl ? /* @__PURE__ */
|
|
1451
|
-
/* @__PURE__ */
|
|
1536
|
+
/* @__PURE__ */ jsx4(View3, { style: styles3.topSection, children: /* @__PURE__ */ jsxs2(View3, { style: styles3.topLeft, children: [
|
|
1537
|
+
logoUrl ? /* @__PURE__ */ jsx4(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
|
|
1538
|
+
/* @__PURE__ */ jsx4(Text3, { style: [styles3.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Guardian Verification" })
|
|
1452
1539
|
] }) }),
|
|
1453
|
-
/* @__PURE__ */
|
|
1454
|
-
/* @__PURE__ */ jsxs2(ScrollView, { style:
|
|
1455
|
-
/* @__PURE__ */
|
|
1456
|
-
/* @__PURE__ */
|
|
1540
|
+
/* @__PURE__ */ jsx4(View3, { style: styles3.divider }),
|
|
1541
|
+
/* @__PURE__ */ jsxs2(ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
|
|
1542
|
+
/* @__PURE__ */ jsx4(Text3, { style: [styles3.privacyText, { color: textColor, fontSize: 13, lineHeight: 20 }], children: "Since you are under the age of consent, a legal guardian must verify their identity via DigiLocker before consent can be provided on your behalf." }),
|
|
1543
|
+
/* @__PURE__ */ jsx4(View3, { style: guardianStyles.infoBanner, children: /* @__PURE__ */ jsx4(Text3, { style: guardianStyles.infoBannerText, children: "Please ensure the name and phone number entered below match the guardian's official Aadhaar-linked records for successful verification." }) }),
|
|
1457
1544
|
/* @__PURE__ */ jsxs2(View3, { style: { marginTop: 16, gap: 12 }, children: [
|
|
1458
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1459
|
-
/* @__PURE__ */ jsxs2(
|
|
1545
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.inputContainer, children: [
|
|
1546
|
+
/* @__PURE__ */ jsxs2(Text3, { style: [styles3.inputLabel, { color: textColor }], children: [
|
|
1460
1547
|
"Guardian's Full Name ",
|
|
1461
|
-
/* @__PURE__ */
|
|
1548
|
+
/* @__PURE__ */ jsx4(Text3, { style: { color: "red" }, children: "*" })
|
|
1462
1549
|
] }),
|
|
1463
|
-
/* @__PURE__ */
|
|
1550
|
+
/* @__PURE__ */ jsx4(
|
|
1464
1551
|
TextInput,
|
|
1465
1552
|
{
|
|
1466
1553
|
value: formData.guardianName,
|
|
1467
1554
|
onChangeText: (v) => onChange("guardianName", v),
|
|
1468
1555
|
style: [
|
|
1469
|
-
|
|
1556
|
+
styles3.textInput,
|
|
1470
1557
|
{ borderColor: errors.guardianName ? "#DC2626" : borderColor, color: textColor }
|
|
1471
1558
|
],
|
|
1472
1559
|
placeholder: "e.g. Rajesh Kumar",
|
|
1473
1560
|
placeholderTextColor: "#9CA3AF"
|
|
1474
1561
|
}
|
|
1475
1562
|
),
|
|
1476
|
-
errors.guardianName ? /* @__PURE__ */
|
|
1563
|
+
errors.guardianName ? /* @__PURE__ */ jsx4(Text3, { style: styles3.inputError, children: errors.guardianName }) : null
|
|
1477
1564
|
] }),
|
|
1478
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1479
|
-
/* @__PURE__ */ jsxs2(
|
|
1565
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.inputContainer, children: [
|
|
1566
|
+
/* @__PURE__ */ jsxs2(Text3, { style: [styles3.inputLabel, { color: textColor }], children: [
|
|
1480
1567
|
"Guardian's Phone Number ",
|
|
1481
|
-
/* @__PURE__ */
|
|
1568
|
+
/* @__PURE__ */ jsx4(Text3, { style: { color: "red" }, children: "*" })
|
|
1482
1569
|
] }),
|
|
1483
|
-
/* @__PURE__ */
|
|
1570
|
+
/* @__PURE__ */ jsx4(
|
|
1484
1571
|
TextInput,
|
|
1485
1572
|
{
|
|
1486
1573
|
value: formData.guardianContact,
|
|
1487
1574
|
onChangeText: (v) => onChange("guardianContact", v),
|
|
1488
1575
|
style: [
|
|
1489
|
-
|
|
1576
|
+
styles3.textInput,
|
|
1490
1577
|
{ borderColor: errors.guardianContact ? "#DC2626" : borderColor, color: textColor }
|
|
1491
1578
|
],
|
|
1492
1579
|
placeholder: "e.g. 9876543210",
|
|
@@ -1494,20 +1581,20 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1494
1581
|
keyboardType: "phone-pad"
|
|
1495
1582
|
}
|
|
1496
1583
|
),
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
errors.guardianContact ? /* @__PURE__ */
|
|
1584
|
+
/* @__PURE__ */ jsx4(Text3, { style: { fontSize: 11, color: "#667085", marginTop: 4 }, children: "Mobile number linked to guardian's Aadhaar" }),
|
|
1585
|
+
errors.guardianContact ? /* @__PURE__ */ jsx4(Text3, { style: styles3.inputError, children: errors.guardianContact }) : null
|
|
1499
1586
|
] }),
|
|
1500
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1501
|
-
/* @__PURE__ */ jsxs2(
|
|
1587
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.inputContainer, children: [
|
|
1588
|
+
/* @__PURE__ */ jsxs2(Text3, { style: [styles3.inputLabel, { color: textColor }], children: [
|
|
1502
1589
|
"Relationship ",
|
|
1503
|
-
/* @__PURE__ */
|
|
1590
|
+
/* @__PURE__ */ jsx4(Text3, { style: { color: "red" }, children: "*" })
|
|
1504
1591
|
] }),
|
|
1505
1592
|
/* @__PURE__ */ jsxs2(View3, { style: { position: "relative" }, children: [
|
|
1506
1593
|
/* @__PURE__ */ jsxs2(
|
|
1507
1594
|
TouchableOpacity3,
|
|
1508
1595
|
{
|
|
1509
1596
|
style: [
|
|
1510
|
-
|
|
1597
|
+
styles3.textInput,
|
|
1511
1598
|
{
|
|
1512
1599
|
borderColor: errors.guardianRelationship ? "#DC2626" : borderColor,
|
|
1513
1600
|
flexDirection: "row",
|
|
@@ -1517,8 +1604,8 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1517
1604
|
],
|
|
1518
1605
|
onPress: () => setShowRelationshipDropdown((v) => !v),
|
|
1519
1606
|
children: [
|
|
1520
|
-
/* @__PURE__ */
|
|
1521
|
-
/* @__PURE__ */
|
|
1607
|
+
/* @__PURE__ */ jsx4(Text3, { style: { color: formData.guardianRelationship ? textColor : "#9CA3AF", fontSize: 13 }, children: formData.guardianRelationship || "Select relationship" }),
|
|
1608
|
+
/* @__PURE__ */ jsx4(Svg3, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx4(
|
|
1522
1609
|
Path3,
|
|
1523
1610
|
{
|
|
1524
1611
|
d: "M4 6L8 10L12 6",
|
|
@@ -1531,7 +1618,7 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1531
1618
|
]
|
|
1532
1619
|
}
|
|
1533
1620
|
),
|
|
1534
|
-
showRelationshipDropdown && /* @__PURE__ */
|
|
1621
|
+
showRelationshipDropdown && /* @__PURE__ */ jsx4(View3, { style: guardianStyles.relationshipDropdown, children: RELATIONSHIP_OPTIONS.map((option) => /* @__PURE__ */ jsx4(
|
|
1535
1622
|
TouchableOpacity3,
|
|
1536
1623
|
{
|
|
1537
1624
|
style: [
|
|
@@ -1542,41 +1629,41 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1542
1629
|
onChange("guardianRelationship", option);
|
|
1543
1630
|
setShowRelationshipDropdown(false);
|
|
1544
1631
|
},
|
|
1545
|
-
children: /* @__PURE__ */
|
|
1632
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [guardianStyles.relationshipItemText, { color: textColor }], children: option })
|
|
1546
1633
|
},
|
|
1547
1634
|
option
|
|
1548
1635
|
)) })
|
|
1549
1636
|
] }),
|
|
1550
|
-
errors.guardianRelationship ? /* @__PURE__ */
|
|
1637
|
+
errors.guardianRelationship ? /* @__PURE__ */ jsx4(Text3, { style: styles3.inputError, children: errors.guardianRelationship }) : null
|
|
1551
1638
|
] }),
|
|
1552
|
-
errors.general ? /* @__PURE__ */
|
|
1639
|
+
errors.general ? /* @__PURE__ */ jsx4(View3, { style: styles3.errorContainer, children: /* @__PURE__ */ jsx4(Text3, { style: styles3.errorText, children: errors.general }) }) : null
|
|
1553
1640
|
] })
|
|
1554
1641
|
] }),
|
|
1555
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1556
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.bottomSection, children: [
|
|
1643
|
+
/* @__PURE__ */ jsx4(
|
|
1557
1644
|
TouchableOpacity3,
|
|
1558
1645
|
{
|
|
1559
1646
|
style: [
|
|
1560
|
-
|
|
1561
|
-
|
|
1647
|
+
styles3.button,
|
|
1648
|
+
styles3.acceptButton,
|
|
1562
1649
|
((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
|
|
1563
1650
|
],
|
|
1564
1651
|
onPress: onNext,
|
|
1565
1652
|
disabled: isSubmitting,
|
|
1566
1653
|
accessibilityLabel: "Submit guardian information and proceed",
|
|
1567
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
1568
|
-
|
|
1569
|
-
|
|
1654
|
+
children: isSubmitting ? /* @__PURE__ */ jsx4(ActivityIndicator2, { size: "small", color: ((_c = (_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.accept) == null ? void 0 : _c.textColor) || "#ffffff" }) : /* @__PURE__ */ jsx4(Text3, { style: [
|
|
1655
|
+
styles3.buttonText,
|
|
1656
|
+
styles3.acceptButtonText,
|
|
1570
1657
|
((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.accept) ? { color: settings.button.accept.textColor } : null
|
|
1571
1658
|
], children: "Verify via DigiLocker" })
|
|
1572
1659
|
}
|
|
1573
1660
|
),
|
|
1574
|
-
/* @__PURE__ */
|
|
1661
|
+
/* @__PURE__ */ jsx4(
|
|
1575
1662
|
TouchableOpacity3,
|
|
1576
1663
|
{
|
|
1577
1664
|
style: [
|
|
1578
|
-
|
|
1579
|
-
|
|
1665
|
+
styles3.button,
|
|
1666
|
+
styles3.cancelButton,
|
|
1580
1667
|
((_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.decline) ? {
|
|
1581
1668
|
backgroundColor: settings.button.decline.backgroundColor,
|
|
1582
1669
|
borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
|
|
@@ -1585,9 +1672,9 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1585
1672
|
onPress: onDecline,
|
|
1586
1673
|
disabled: isSubmitting,
|
|
1587
1674
|
accessibilityLabel: "Cancel guardian information form",
|
|
1588
|
-
children: /* @__PURE__ */
|
|
1589
|
-
|
|
1590
|
-
|
|
1675
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [
|
|
1676
|
+
styles3.buttonText,
|
|
1677
|
+
styles3.cancelButtonText,
|
|
1591
1678
|
((_f = settings == null ? void 0 : settings.button) == null ? void 0 : _f.decline) ? { color: settings.button.decline.textColor } : null
|
|
1592
1679
|
], children: "Cancel" })
|
|
1593
1680
|
}
|
|
@@ -1595,7 +1682,7 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1595
1682
|
] })
|
|
1596
1683
|
] });
|
|
1597
1684
|
};
|
|
1598
|
-
var guardianStyles =
|
|
1685
|
+
var guardianStyles = StyleSheet5.create({
|
|
1599
1686
|
infoBanner: {
|
|
1600
1687
|
backgroundColor: "#EFF6FF",
|
|
1601
1688
|
borderWidth: 1,
|
|
@@ -1638,42 +1725,42 @@ var guardianStyles = StyleSheet4.create({
|
|
|
1638
1725
|
var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
|
|
1639
1726
|
var _a, _b, _c, _d;
|
|
1640
1727
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1641
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1642
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1643
|
-
logoUrl ? /* @__PURE__ */
|
|
1644
|
-
/* @__PURE__ */
|
|
1728
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.topSection, children: [
|
|
1729
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.topLeft, children: [
|
|
1730
|
+
logoUrl ? /* @__PURE__ */ jsx4(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
|
|
1731
|
+
/* @__PURE__ */ jsx4(Text3, { style: [styles3.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Age Verification Required" })
|
|
1645
1732
|
] }),
|
|
1646
|
-
onClose ? /* @__PURE__ */
|
|
1733
|
+
onClose ? /* @__PURE__ */ jsx4(TouchableOpacity3, { onPress: onClose, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: /* @__PURE__ */ jsx4(Svg3, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx4(Path3, { d: "M18 6L6 18M6 6l12 12", stroke: "#9CA3AF", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }) }) : null
|
|
1647
1734
|
] }),
|
|
1648
|
-
/* @__PURE__ */
|
|
1649
|
-
/* @__PURE__ */ jsxs2(ScrollView, { style:
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ jsx4(View3, { style: styles3.divider }),
|
|
1736
|
+
/* @__PURE__ */ jsxs2(ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
|
|
1737
|
+
/* @__PURE__ */ jsx4(Text3, { style: [styles3.privacyText, { color: (settings == null ? void 0 : settings.textColor) || "#344054" }], children: "To proceed with this consent form, we need to verify your age." }),
|
|
1738
|
+
/* @__PURE__ */ jsx4(Text3, { style: [styles3.privacyText, { color: (settings == null ? void 0 : settings.textColor) || "#344054", marginTop: 12, fontWeight: "600" }], children: "Are you 18 years of age or older?" })
|
|
1652
1739
|
] }),
|
|
1653
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1654
|
-
/* @__PURE__ */
|
|
1740
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.bottomSection, children: [
|
|
1741
|
+
/* @__PURE__ */ jsx4(
|
|
1655
1742
|
TouchableOpacity3,
|
|
1656
1743
|
{
|
|
1657
1744
|
style: [
|
|
1658
|
-
|
|
1659
|
-
|
|
1745
|
+
styles3.button,
|
|
1746
|
+
styles3.acceptButton,
|
|
1660
1747
|
((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
|
|
1661
1748
|
],
|
|
1662
1749
|
onPress: onYes,
|
|
1663
1750
|
accessibilityLabel: "Yes, I am 18 or older",
|
|
1664
|
-
children: /* @__PURE__ */
|
|
1665
|
-
|
|
1666
|
-
|
|
1751
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [
|
|
1752
|
+
styles3.buttonText,
|
|
1753
|
+
styles3.acceptButtonText,
|
|
1667
1754
|
((_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.accept) ? { color: settings.button.accept.textColor } : null
|
|
1668
1755
|
], children: "Yes, I am 18 or older" })
|
|
1669
1756
|
}
|
|
1670
1757
|
),
|
|
1671
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ jsx4(
|
|
1672
1759
|
TouchableOpacity3,
|
|
1673
1760
|
{
|
|
1674
1761
|
style: [
|
|
1675
|
-
|
|
1676
|
-
|
|
1762
|
+
styles3.button,
|
|
1763
|
+
styles3.cancelButton,
|
|
1677
1764
|
((_c = settings == null ? void 0 : settings.button) == null ? void 0 : _c.decline) ? {
|
|
1678
1765
|
backgroundColor: settings.button.decline.backgroundColor,
|
|
1679
1766
|
borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
|
|
@@ -1681,9 +1768,9 @@ var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
|
|
|
1681
1768
|
],
|
|
1682
1769
|
onPress: onNo,
|
|
1683
1770
|
accessibilityLabel: "No, I am under 18",
|
|
1684
|
-
children: /* @__PURE__ */
|
|
1685
|
-
|
|
1686
|
-
|
|
1771
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [
|
|
1772
|
+
styles3.buttonText,
|
|
1773
|
+
styles3.cancelButtonText,
|
|
1687
1774
|
((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.decline) ? { color: settings.button.decline.textColor } : null
|
|
1688
1775
|
], children: "No, I am under 18" })
|
|
1689
1776
|
}
|
|
@@ -1714,7 +1801,7 @@ var RedactoNoticeConsent = ({
|
|
|
1714
1801
|
includeFullyConsentedData = false,
|
|
1715
1802
|
reviewModeButtonText
|
|
1716
1803
|
}) => {
|
|
1717
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
1804
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
1718
1805
|
const { isMobile } = useResponsive();
|
|
1719
1806
|
const sandboxParams = useMemo(
|
|
1720
1807
|
() => ({
|
|
@@ -1892,6 +1979,9 @@ var RedactoNoticeConsent = ({
|
|
|
1892
1979
|
confirm_button_text: data.detail.confirm_button_text_audio_url,
|
|
1893
1980
|
decline_button_text: data.detail.decline_button_text_audio_url
|
|
1894
1981
|
};
|
|
1982
|
+
if (data.detail.accept_all_button_text_audio_url) {
|
|
1983
|
+
urls.accept_all_button_text = data.detail.accept_all_button_text_audio_url;
|
|
1984
|
+
}
|
|
1895
1985
|
if (data.detail.privacy_center_anchor_text_audio_url) {
|
|
1896
1986
|
urls.privacy_center_anchor_text = data.detail.privacy_center_anchor_text_audio_url;
|
|
1897
1987
|
}
|
|
@@ -2101,6 +2191,7 @@ var RedactoNoticeConsent = ({
|
|
|
2101
2191
|
DPO_AUDIO_ELEMENT_MAP.forEach(({ elementId }) => {
|
|
2102
2192
|
pushSegment(elementId, ttsAudioUrls[elementId]);
|
|
2103
2193
|
});
|
|
2194
|
+
pushSegment("accept_all_button_text", ttsAudioUrls.accept_all_button_text);
|
|
2104
2195
|
pushSegment("confirm_button_text", ttsAudioUrls.confirm_button_text);
|
|
2105
2196
|
pushSegment("decline_button_text", ttsAudioUrls.decline_button_text);
|
|
2106
2197
|
if (queue.length === 0) {
|
|
@@ -2252,12 +2343,20 @@ var RedactoNoticeConsent = ({
|
|
|
2252
2343
|
return newState;
|
|
2253
2344
|
});
|
|
2254
2345
|
}, [content]);
|
|
2255
|
-
const handleAccept = useCallback(async () => {
|
|
2346
|
+
const handleAccept = useCallback(async (mode = "selected") => {
|
|
2256
2347
|
if (!content) return;
|
|
2257
2348
|
try {
|
|
2258
2349
|
setIsSubmitting(true);
|
|
2259
2350
|
setErrorMessage(null);
|
|
2260
2351
|
const activeConfig2 = content.detail.active_config;
|
|
2352
|
+
const selection = buildSelectionForMode(activeConfig2.purposes, mode, {
|
|
2353
|
+
selectedPurposes,
|
|
2354
|
+
selectedDataElements
|
|
2355
|
+
});
|
|
2356
|
+
if (mode !== "selected") {
|
|
2357
|
+
setSelectedPurposes(selection.selectedPurposes);
|
|
2358
|
+
setSelectedDataElements(selection.selectedDataElements);
|
|
2359
|
+
}
|
|
2261
2360
|
await submitConsentEvent({
|
|
2262
2361
|
accessToken,
|
|
2263
2362
|
baseUrl,
|
|
@@ -2265,10 +2364,10 @@ var RedactoNoticeConsent = ({
|
|
|
2265
2364
|
noticeUuid: activeConfig2.notice_uuid,
|
|
2266
2365
|
purposes: activeConfig2.purposes.map((purpose) => ({
|
|
2267
2366
|
...purpose,
|
|
2268
|
-
selected: selectedPurposes[purpose.uuid] || false,
|
|
2367
|
+
selected: selection.selectedPurposes[purpose.uuid] || false,
|
|
2269
2368
|
data_elements: purpose.data_elements.map((el) => ({
|
|
2270
2369
|
...el,
|
|
2271
|
-
selected: selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
|
|
2370
|
+
selected: selection.selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
|
|
2272
2371
|
}))
|
|
2273
2372
|
})),
|
|
2274
2373
|
declined: false,
|
|
@@ -2397,13 +2496,43 @@ var RedactoNoticeConsent = ({
|
|
|
2397
2496
|
}, [activeConfig, selectedDataElements]);
|
|
2398
2497
|
const acceptButtonStyle = { backgroundColor: acceptBackgroundColor };
|
|
2399
2498
|
const acceptButtonTextStyle = { color: acceptTextColor };
|
|
2499
|
+
const acceptAllButtonStyle = {
|
|
2500
|
+
backgroundColor: ((_j = (_i = settings == null ? void 0 : settings.button) == null ? void 0 : _i.acceptAll) == null ? void 0 : _j.backgroundColor) || acceptBackgroundColor
|
|
2501
|
+
};
|
|
2502
|
+
const acceptAllButtonTextStyle = {
|
|
2503
|
+
color: ((_l = (_k = settings == null ? void 0 : settings.button) == null ? void 0 : _k.acceptAll) == null ? void 0 : _l.textColor) || acceptTextColor
|
|
2504
|
+
};
|
|
2505
|
+
const acceptSelectedButtonStyle = {
|
|
2506
|
+
backgroundColor: "#ffffff",
|
|
2507
|
+
borderColor: accentColor
|
|
2508
|
+
};
|
|
2509
|
+
const acceptSelectedButtonTextStyle = { color: accentColor };
|
|
2400
2510
|
const declineButtonStyle = { backgroundColor: declineBackgroundColor, borderColor };
|
|
2401
2511
|
const declineButtonTextStyle = { color: declineTextColor };
|
|
2512
|
+
const acceptAllLabel = getTranslatedText(
|
|
2513
|
+
"accept_all_button_text",
|
|
2514
|
+
(activeConfig == null ? void 0 : activeConfig.accept_all_button_text) || DEFAULT_ACCEPT_ALL_BUTTON_TEXT
|
|
2515
|
+
);
|
|
2516
|
+
const acceptSelectedLabel = getTranslatedText(
|
|
2517
|
+
"confirm_button_text",
|
|
2518
|
+
(activeConfig == null ? void 0 : activeConfig.confirm_button_text) || DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT
|
|
2519
|
+
);
|
|
2520
|
+
const declineLabel = getTranslatedText(
|
|
2521
|
+
"decline_button_text",
|
|
2522
|
+
(activeConfig == null ? void 0 : activeConfig.decline_button_text) || DEFAULT_DECLINE_BUTTON_TEXT
|
|
2523
|
+
);
|
|
2524
|
+
const footerButtonOrder = isMobile ? ["acceptAll", "acceptSelected", "decline"] : ["decline", "acceptSelected", "acceptAll"];
|
|
2525
|
+
const widthStyle = isMobile ? styles3.stackButton : styles3.rowButton;
|
|
2526
|
+
const handleAcceptAll = useCallback(() => handleAccept("all"), [handleAccept]);
|
|
2527
|
+
const handleAcceptSelected = useCallback(
|
|
2528
|
+
() => handleAccept("selected"),
|
|
2529
|
+
[handleAccept]
|
|
2530
|
+
);
|
|
2402
2531
|
const modalBg = (settings == null ? void 0 : settings.backgroundColor) ? { backgroundColor: settings.backgroundColor } : {};
|
|
2403
2532
|
const translatedNoticeText = activeConfig ? stripHtml(getTranslatedText("notice_text", activeConfig.notice_text || "")) : "";
|
|
2404
2533
|
const translatedAdditionalText = activeConfig ? stripHtml(getTranslatedText("additional_text", activeConfig.additional_text || "")) : "";
|
|
2405
2534
|
if (!isVisible && !isLoading) return null;
|
|
2406
|
-
return /* @__PURE__ */
|
|
2535
|
+
return /* @__PURE__ */ jsx4(
|
|
2407
2536
|
Modal,
|
|
2408
2537
|
{
|
|
2409
2538
|
visible: isVisible || isLoading,
|
|
@@ -2411,27 +2540,27 @@ var RedactoNoticeConsent = ({
|
|
|
2411
2540
|
animationType: "fade",
|
|
2412
2541
|
onRequestClose: blockUI ? void 0 : handleDecline,
|
|
2413
2542
|
accessibilityViewIsModal: true,
|
|
2414
|
-
children: /* @__PURE__ */ jsxs2(View3, { style:
|
|
2415
|
-
isLanguageDropdownOpen && /* @__PURE__ */
|
|
2543
|
+
children: /* @__PURE__ */ jsxs2(View3, { style: styles3.overlay, children: [
|
|
2544
|
+
isLanguageDropdownOpen && /* @__PURE__ */ jsx4(
|
|
2416
2545
|
Pressable,
|
|
2417
2546
|
{
|
|
2418
|
-
style: [
|
|
2547
|
+
style: [StyleSheet5.absoluteFillObject, { zIndex: 1 }],
|
|
2419
2548
|
onPress: () => setIsLanguageDropdownOpen(false)
|
|
2420
2549
|
}
|
|
2421
2550
|
),
|
|
2422
|
-
/* @__PURE__ */
|
|
2551
|
+
/* @__PURE__ */ jsx4(
|
|
2423
2552
|
View3,
|
|
2424
2553
|
{
|
|
2425
2554
|
style: [
|
|
2426
|
-
|
|
2555
|
+
styles3.modal,
|
|
2427
2556
|
modalBg,
|
|
2428
2557
|
{ zIndex: 2 },
|
|
2429
2558
|
(settings == null ? void 0 : settings.borderRadius) ? { borderRadius: parseInt(settings.borderRadius, 10) } : null
|
|
2430
2559
|
],
|
|
2431
|
-
children: isLoading ? /* @__PURE__ */ jsxs2(View3, { style:
|
|
2432
|
-
/* @__PURE__ */
|
|
2433
|
-
/* @__PURE__ */
|
|
2434
|
-
] }) : showVerificationScreen ? /* @__PURE__ */
|
|
2560
|
+
children: isLoading ? /* @__PURE__ */ jsxs2(View3, { style: styles3.loadingContainer, children: [
|
|
2561
|
+
/* @__PURE__ */ jsx4(ActivityIndicator2, { size: "large", color: acceptBackgroundColor }),
|
|
2562
|
+
/* @__PURE__ */ jsx4(Text3, { style: styles3.loadingText, children: "Loading..." })
|
|
2563
|
+
] }) : showVerificationScreen ? /* @__PURE__ */ jsx4(View3, { style: styles3.content, children: /* @__PURE__ */ jsx4(
|
|
2435
2564
|
VerificationScreen,
|
|
2436
2565
|
{
|
|
2437
2566
|
status: verificationStatus,
|
|
@@ -2468,7 +2597,7 @@ var RedactoNoticeConsent = ({
|
|
|
2468
2597
|
}
|
|
2469
2598
|
}
|
|
2470
2599
|
}
|
|
2471
|
-
) }) : showGuardianForm ? /* @__PURE__ */
|
|
2600
|
+
) }) : showGuardianForm ? /* @__PURE__ */ jsx4(View3, { style: styles3.content, children: /* @__PURE__ */ jsx4(
|
|
2472
2601
|
GuardianForm,
|
|
2473
2602
|
{
|
|
2474
2603
|
formData: guardianFormData,
|
|
@@ -2495,7 +2624,7 @@ var RedactoNoticeConsent = ({
|
|
|
2495
2624
|
},
|
|
2496
2625
|
logoUrl
|
|
2497
2626
|
}
|
|
2498
|
-
) }) : showAgeVerification ? /* @__PURE__ */
|
|
2627
|
+
) }) : showAgeVerification ? /* @__PURE__ */ jsx4(View3, { style: styles3.content, children: /* @__PURE__ */ jsx4(
|
|
2499
2628
|
AgeVerification,
|
|
2500
2629
|
{
|
|
2501
2630
|
onYes: () => {
|
|
@@ -2523,22 +2652,22 @@ var RedactoNoticeConsent = ({
|
|
|
2523
2652
|
},
|
|
2524
2653
|
logoUrl
|
|
2525
2654
|
}
|
|
2526
|
-
) }) : /* @__PURE__ */ jsxs2(View3, { style:
|
|
2527
|
-
errorMessage ? /* @__PURE__ */ jsxs2(View3, { style:
|
|
2528
|
-
/* @__PURE__ */
|
|
2529
|
-
/* @__PURE__ */
|
|
2655
|
+
) }) : /* @__PURE__ */ jsxs2(View3, { style: styles3.content, children: [
|
|
2656
|
+
errorMessage ? /* @__PURE__ */ jsxs2(View3, { style: styles3.errorContainer, children: [
|
|
2657
|
+
/* @__PURE__ */ jsx4(Text3, { style: styles3.errorText, children: errorMessage }),
|
|
2658
|
+
/* @__PURE__ */ jsx4(TouchableOpacity3, { onPress: () => setErrorMessage(null), hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: /* @__PURE__ */ jsx4(Svg3, { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx4(Path3, { d: "M12 4L4 12M4 4L12 12", stroke: "#DC2626", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
2530
2659
|
] }) : null,
|
|
2531
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
2532
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
2533
|
-
logoUrl ? /* @__PURE__ */
|
|
2534
|
-
/* @__PURE__ */
|
|
2535
|
-
|
|
2660
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.topSection, children: [
|
|
2661
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.topLeft, children: [
|
|
2662
|
+
logoUrl ? /* @__PURE__ */ jsx4(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
|
|
2663
|
+
/* @__PURE__ */ jsx4(
|
|
2664
|
+
Text3,
|
|
2536
2665
|
{
|
|
2537
2666
|
style: [
|
|
2538
|
-
|
|
2667
|
+
styles3.title,
|
|
2539
2668
|
{ color: headingColor },
|
|
2540
2669
|
isMobile ? { fontSize: 16 } : null,
|
|
2541
|
-
activeTTSSegmentKey === "notice_banner_heading" ?
|
|
2670
|
+
activeTTSSegmentKey === "notice_banner_heading" ? styles3.ttsHighlight : null
|
|
2542
2671
|
],
|
|
2543
2672
|
numberOfLines: 2,
|
|
2544
2673
|
children: getTranslatedText(
|
|
@@ -2549,31 +2678,31 @@ var RedactoNoticeConsent = ({
|
|
|
2549
2678
|
)
|
|
2550
2679
|
] }),
|
|
2551
2680
|
/* @__PURE__ */ jsxs2(View3, { style: { flexDirection: "row", gap: 8, alignItems: "center" }, children: [
|
|
2552
|
-
isTTSAvailable && /* @__PURE__ */
|
|
2681
|
+
isTTSAvailable && /* @__PURE__ */ jsx4(
|
|
2553
2682
|
TouchableOpacity3,
|
|
2554
2683
|
{
|
|
2555
|
-
style: [
|
|
2684
|
+
style: [styles3.topRight, ((_m = settings == null ? void 0 : settings.button) == null ? void 0 : _m.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null],
|
|
2556
2685
|
onPress: toggleAudio,
|
|
2557
2686
|
accessibilityLabel: isPlaying && !isPaused ? "Pause audio" : isPaused ? "Resume audio" : "Start audio",
|
|
2558
2687
|
children: isPlaying && !isPaused ? /* @__PURE__ */ jsxs2(Svg3, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
|
|
2559
|
-
/* @__PURE__ */
|
|
2560
|
-
/* @__PURE__ */
|
|
2688
|
+
/* @__PURE__ */ jsx4(Rect, { x: "6", y: "4", width: "4", height: "16", fill: ((_o = (_n = settings == null ? void 0 : settings.button) == null ? void 0 : _n.language) == null ? void 0 : _o.textColor) || "#344054" }),
|
|
2689
|
+
/* @__PURE__ */ jsx4(Rect, { x: "14", y: "4", width: "4", height: "16", fill: ((_q = (_p = settings == null ? void 0 : settings.button) == null ? void 0 : _p.language) == null ? void 0 : _q.textColor) || "#344054" })
|
|
2561
2690
|
] }) : /* @__PURE__ */ jsxs2(Svg3, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
|
|
2562
|
-
/* @__PURE__ */
|
|
2691
|
+
/* @__PURE__ */ jsx4(
|
|
2563
2692
|
Path3,
|
|
2564
2693
|
{
|
|
2565
2694
|
d: "M11 5L6 9H2V15H6L11 19V5Z",
|
|
2566
|
-
stroke: ((
|
|
2695
|
+
stroke: ((_s = (_r = settings == null ? void 0 : settings.button) == null ? void 0 : _r.language) == null ? void 0 : _s.textColor) || "#344054",
|
|
2567
2696
|
strokeWidth: 2,
|
|
2568
2697
|
strokeLinecap: "round",
|
|
2569
2698
|
strokeLinejoin: "round"
|
|
2570
2699
|
}
|
|
2571
2700
|
),
|
|
2572
|
-
/* @__PURE__ */
|
|
2701
|
+
/* @__PURE__ */ jsx4(
|
|
2573
2702
|
Path3,
|
|
2574
2703
|
{
|
|
2575
2704
|
d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07",
|
|
2576
|
-
stroke: ((
|
|
2705
|
+
stroke: ((_u = (_t = settings == null ? void 0 : settings.button) == null ? void 0 : _t.language) == null ? void 0 : _u.textColor) || "#344054",
|
|
2577
2706
|
strokeWidth: 2,
|
|
2578
2707
|
strokeLinecap: "round",
|
|
2579
2708
|
strokeLinejoin: "round"
|
|
@@ -2582,23 +2711,23 @@ var RedactoNoticeConsent = ({
|
|
|
2582
2711
|
] })
|
|
2583
2712
|
}
|
|
2584
2713
|
),
|
|
2585
|
-
supportedLanguages.length > 0 && /* @__PURE__ */ jsxs2(View3, { style:
|
|
2714
|
+
supportedLanguages.length > 0 && /* @__PURE__ */ jsxs2(View3, { style: styles3.languageSelectorContainer, children: [
|
|
2586
2715
|
/* @__PURE__ */ jsxs2(
|
|
2587
2716
|
TouchableOpacity3,
|
|
2588
2717
|
{
|
|
2589
2718
|
style: [
|
|
2590
|
-
|
|
2591
|
-
((
|
|
2719
|
+
styles3.topRight,
|
|
2720
|
+
((_v = settings == null ? void 0 : settings.button) == null ? void 0 : _v.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
|
|
2592
2721
|
],
|
|
2593
2722
|
onPress: () => setIsLanguageDropdownOpen((v) => !v),
|
|
2594
2723
|
accessibilityLabel: `Select language. Current: ${selectedLanguage}`,
|
|
2595
2724
|
children: [
|
|
2596
|
-
/* @__PURE__ */
|
|
2597
|
-
/* @__PURE__ */
|
|
2725
|
+
/* @__PURE__ */ jsx4(Text3, { style: [styles3.topRightText, ((_w = settings == null ? void 0 : settings.button) == null ? void 0 : _w.language) ? { color: settings.button.language.textColor } : null], children: selectedLanguage }),
|
|
2726
|
+
/* @__PURE__ */ jsx4(Svg3, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx4(
|
|
2598
2727
|
Path3,
|
|
2599
2728
|
{
|
|
2600
2729
|
d: "M4 6L8 10L12 6",
|
|
2601
|
-
stroke: ((
|
|
2730
|
+
stroke: ((_y = (_x = settings == null ? void 0 : settings.button) == null ? void 0 : _x.language) == null ? void 0 : _y.textColor) || "#344054",
|
|
2602
2731
|
strokeWidth: 2,
|
|
2603
2732
|
strokeLinecap: "round",
|
|
2604
2733
|
strokeLinejoin: "round"
|
|
@@ -2607,23 +2736,23 @@ var RedactoNoticeConsent = ({
|
|
|
2607
2736
|
]
|
|
2608
2737
|
}
|
|
2609
2738
|
),
|
|
2610
|
-
isLanguageDropdownOpen && /* @__PURE__ */
|
|
2739
|
+
isLanguageDropdownOpen && /* @__PURE__ */ jsx4(View3, { style: styles3.languageDropdown, children: /* @__PURE__ */ jsx4(ScrollView, { children: supportedLanguages.map((lang) => /* @__PURE__ */ jsx4(
|
|
2611
2740
|
TouchableOpacity3,
|
|
2612
2741
|
{
|
|
2613
2742
|
style: [
|
|
2614
|
-
|
|
2615
|
-
lang === selectedLanguage ?
|
|
2743
|
+
styles3.languageItem,
|
|
2744
|
+
lang === selectedLanguage ? styles3.selectedLanguageItem : null
|
|
2616
2745
|
],
|
|
2617
2746
|
onPress: () => {
|
|
2618
2747
|
setSelectedLanguage(lang);
|
|
2619
2748
|
setIsLanguageDropdownOpen(false);
|
|
2620
2749
|
},
|
|
2621
|
-
children: /* @__PURE__ */
|
|
2622
|
-
|
|
2750
|
+
children: /* @__PURE__ */ jsx4(
|
|
2751
|
+
Text3,
|
|
2623
2752
|
{
|
|
2624
2753
|
style: [
|
|
2625
|
-
|
|
2626
|
-
lang === selectedLanguage ?
|
|
2754
|
+
styles3.languageItemText,
|
|
2755
|
+
lang === selectedLanguage ? styles3.selectedLanguageItemText : null
|
|
2627
2756
|
],
|
|
2628
2757
|
children: lang
|
|
2629
2758
|
}
|
|
@@ -2634,38 +2763,38 @@ var RedactoNoticeConsent = ({
|
|
|
2634
2763
|
] })
|
|
2635
2764
|
] })
|
|
2636
2765
|
] }),
|
|
2637
|
-
/* @__PURE__ */ jsxs2(ScrollView, { style:
|
|
2638
|
-
translatedNoticeText ? /* @__PURE__ */
|
|
2639
|
-
|
|
2766
|
+
/* @__PURE__ */ jsxs2(ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
|
|
2767
|
+
translatedNoticeText ? /* @__PURE__ */ jsx4(
|
|
2768
|
+
Text3,
|
|
2640
2769
|
{
|
|
2641
2770
|
style: [
|
|
2642
|
-
|
|
2771
|
+
styles3.privacyText,
|
|
2643
2772
|
{ color: textColor },
|
|
2644
|
-
activeTTSSegmentKey === "notice_text" ?
|
|
2773
|
+
activeTTSSegmentKey === "notice_text" ? styles3.ttsHighlight : null
|
|
2645
2774
|
],
|
|
2646
2775
|
children: translatedNoticeText
|
|
2647
2776
|
}
|
|
2648
2777
|
) : null,
|
|
2649
2778
|
(activeConfig == null ? void 0 : activeConfig.privacy_policy_url) ? /* @__PURE__ */ jsxs2(
|
|
2650
|
-
|
|
2779
|
+
Text3,
|
|
2651
2780
|
{
|
|
2652
2781
|
style: [
|
|
2653
|
-
|
|
2782
|
+
styles3.privacyText,
|
|
2654
2783
|
{ marginTop: 8 },
|
|
2655
2784
|
{ color: textColor }
|
|
2656
2785
|
],
|
|
2657
2786
|
children: [
|
|
2658
|
-
/* @__PURE__ */ jsxs2(
|
|
2787
|
+
/* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "privacy_policy_prefix_text" ? styles3.ttsHighlight : null, children: [
|
|
2659
2788
|
getTranslatedText("privacy_policy_prefix_text", activeConfig.privacy_policy_prefix_text || ""),
|
|
2660
2789
|
" "
|
|
2661
2790
|
] }),
|
|
2662
|
-
/* @__PURE__ */
|
|
2663
|
-
|
|
2791
|
+
/* @__PURE__ */ jsx4(
|
|
2792
|
+
Text3,
|
|
2664
2793
|
{
|
|
2665
2794
|
style: [
|
|
2666
|
-
|
|
2795
|
+
styles3.link,
|
|
2667
2796
|
{ color: linkColor },
|
|
2668
|
-
activeTTSSegmentKey === "privacy_policy_anchor_text" ?
|
|
2797
|
+
activeTTSSegmentKey === "privacy_policy_anchor_text" ? styles3.ttsHighlight : null
|
|
2669
2798
|
],
|
|
2670
2799
|
onPress: () => Linking.openURL(activeConfig.privacy_policy_url),
|
|
2671
2800
|
children: getTranslatedText("privacy_policy_anchor_text", activeConfig.privacy_policy_anchor_text || "Privacy Policy")
|
|
@@ -2674,23 +2803,23 @@ var RedactoNoticeConsent = ({
|
|
|
2674
2803
|
]
|
|
2675
2804
|
}
|
|
2676
2805
|
) : null,
|
|
2677
|
-
(activeConfig == null ? void 0 : activeConfig.purposes) && activeConfig.purposes.length > 0 ? /* @__PURE__ */
|
|
2678
|
-
|
|
2806
|
+
(activeConfig == null ? void 0 : activeConfig.purposes) && activeConfig.purposes.length > 0 ? /* @__PURE__ */ jsx4(
|
|
2807
|
+
Text3,
|
|
2679
2808
|
{
|
|
2680
2809
|
style: [
|
|
2681
|
-
|
|
2810
|
+
styles3.subTitle,
|
|
2682
2811
|
{ marginTop: 16, marginBottom: 8 },
|
|
2683
2812
|
{ color: headingColor },
|
|
2684
|
-
activeTTSSegmentKey === "purpose_section_heading" ?
|
|
2813
|
+
activeTTSSegmentKey === "purpose_section_heading" ? styles3.ttsHighlight : null
|
|
2685
2814
|
],
|
|
2686
2815
|
children: getTranslatedText("purpose_section_heading", activeConfig.purpose_section_heading || "Data Purposes")
|
|
2687
2816
|
}
|
|
2688
2817
|
) : null,
|
|
2689
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ jsx4(View3, { style: styles3.optionsContainer, children: activeConfig == null ? void 0 : activeConfig.purposes.map((purpose) => {
|
|
2690
2819
|
var _a2;
|
|
2691
2820
|
const purposeSelection = (_a2 = content == null ? void 0 : content.detail.purpose_selections) == null ? void 0 : _a2[purpose.uuid];
|
|
2692
2821
|
const isAlreadyConsented = !isReconsentMode && ((purposeSelection == null ? void 0 : purposeSelection.selected) || false) && !(purposeSelection == null ? void 0 : purposeSelection.needs_reconsent);
|
|
2693
|
-
return /* @__PURE__ */
|
|
2822
|
+
return /* @__PURE__ */ jsx4(
|
|
2694
2823
|
PurposeItem,
|
|
2695
2824
|
{
|
|
2696
2825
|
purpose,
|
|
@@ -2723,19 +2852,19 @@ var RedactoNoticeConsent = ({
|
|
|
2723
2852
|
}
|
|
2724
2853
|
return fallback;
|
|
2725
2854
|
};
|
|
2726
|
-
return /* @__PURE__ */
|
|
2727
|
-
translatedAdditionalText ? /* @__PURE__ */ jsxs2(
|
|
2855
|
+
return /* @__PURE__ */ jsx4(View3, { style: { marginTop: 8, paddingTop: 8, borderTopWidth: 1, borderTopColor: "rgba(152, 162, 179, 0.3)", opacity: 0.6 }, children: /* @__PURE__ */ jsxs2(Text3, { style: [styles3.privacyText, { fontSize: 14, color: dpoTextColor }], children: [
|
|
2856
|
+
translatedAdditionalText ? /* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "additional_text" ? styles3.ttsHighlight : null, children: [
|
|
2728
2857
|
translatedAdditionalText,
|
|
2729
2858
|
" "
|
|
2730
2859
|
] }) : null,
|
|
2731
2860
|
(activeConfig == null ? void 0 : activeConfig.privacy_center_url) ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2732
|
-
/* @__PURE__ */
|
|
2733
|
-
|
|
2861
|
+
/* @__PURE__ */ jsx4(
|
|
2862
|
+
Text3,
|
|
2734
2863
|
{
|
|
2735
2864
|
style: [
|
|
2736
|
-
|
|
2865
|
+
styles3.link,
|
|
2737
2866
|
{ color: linkColor },
|
|
2738
|
-
activeTTSSegmentKey === "privacy_center_anchor_text" ?
|
|
2867
|
+
activeTTSSegmentKey === "privacy_center_anchor_text" ? styles3.ttsHighlight : null
|
|
2739
2868
|
],
|
|
2740
2869
|
onPress: () => Linking.openURL(activeConfig.privacy_center_url),
|
|
2741
2870
|
children: getTranslatedText("privacy_center_anchor_text", activeConfig.privacy_center_anchor_text || "Privacy Center")
|
|
@@ -2744,17 +2873,17 @@ var RedactoNoticeConsent = ({
|
|
|
2744
2873
|
".\n"
|
|
2745
2874
|
] }) : null,
|
|
2746
2875
|
(dpo == null ? void 0 : dpo.grievance_text) ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2747
|
-
/* @__PURE__ */ jsxs2(
|
|
2876
|
+
/* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "dpo-grievance-text" ? styles3.ttsHighlight : null, children: [
|
|
2748
2877
|
getT("grievance_text", dpo.grievance_text),
|
|
2749
2878
|
" "
|
|
2750
2879
|
] }),
|
|
2751
|
-
/* @__PURE__ */
|
|
2752
|
-
|
|
2880
|
+
/* @__PURE__ */ jsx4(
|
|
2881
|
+
Text3,
|
|
2753
2882
|
{
|
|
2754
2883
|
style: [
|
|
2755
|
-
|
|
2884
|
+
styles3.link,
|
|
2756
2885
|
{ color: linkColor },
|
|
2757
|
-
activeTTSSegmentKey === "dpo-grievance-link" ?
|
|
2886
|
+
activeTTSSegmentKey === "dpo-grievance-link" ? styles3.ttsHighlight : null
|
|
2758
2887
|
],
|
|
2759
2888
|
onPress: () => Linking.openURL(dpo.grievance_url),
|
|
2760
2889
|
children: getT("grievance_anchor_text", dpo.grievance_anchor_text)
|
|
@@ -2762,15 +2891,15 @@ var RedactoNoticeConsent = ({
|
|
|
2762
2891
|
),
|
|
2763
2892
|
dpo.grievance_email ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2764
2893
|
" ",
|
|
2765
|
-
/* @__PURE__ */
|
|
2894
|
+
/* @__PURE__ */ jsx4(Text3, { style: activeTTSSegmentKey === "dpo-grievance-email-connector" ? styles3.ttsHighlight : null, children: getT("grievance_email_connector_text", dpo.grievance_email_connector_text || "or email to") }),
|
|
2766
2895
|
" ",
|
|
2767
|
-
/* @__PURE__ */
|
|
2768
|
-
|
|
2896
|
+
/* @__PURE__ */ jsx4(
|
|
2897
|
+
Text3,
|
|
2769
2898
|
{
|
|
2770
2899
|
style: [
|
|
2771
|
-
|
|
2900
|
+
styles3.link,
|
|
2772
2901
|
{ color: linkColor },
|
|
2773
|
-
activeTTSSegmentKey === "dpo-grievance-email" ?
|
|
2902
|
+
activeTTSSegmentKey === "dpo-grievance-email" ? styles3.ttsHighlight : null
|
|
2774
2903
|
],
|
|
2775
2904
|
onPress: () => Linking.openURL(`mailto:${dpo.grievance_email}`),
|
|
2776
2905
|
children: dpo.grievance_email
|
|
@@ -2780,17 +2909,17 @@ var RedactoNoticeConsent = ({
|
|
|
2780
2909
|
"\n"
|
|
2781
2910
|
] }) : null,
|
|
2782
2911
|
(dpo == null ? void 0 : dpo.dp_board_text) ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2783
|
-
/* @__PURE__ */ jsxs2(
|
|
2912
|
+
/* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "dpo-dp-board-text" ? styles3.ttsHighlight : null, children: [
|
|
2784
2913
|
getT("dp_board_text", dpo.dp_board_text),
|
|
2785
2914
|
" "
|
|
2786
2915
|
] }),
|
|
2787
|
-
/* @__PURE__ */
|
|
2788
|
-
|
|
2916
|
+
/* @__PURE__ */ jsx4(
|
|
2917
|
+
Text3,
|
|
2789
2918
|
{
|
|
2790
2919
|
style: [
|
|
2791
|
-
|
|
2920
|
+
styles3.link,
|
|
2792
2921
|
{ color: linkColor },
|
|
2793
|
-
activeTTSSegmentKey === "dpo-dp-board-link" ?
|
|
2922
|
+
activeTTSSegmentKey === "dpo-dp-board-link" ? styles3.ttsHighlight : null
|
|
2794
2923
|
],
|
|
2795
2924
|
onPress: () => Linking.openURL(dpo.dp_board_url),
|
|
2796
2925
|
children: getT("dp_board_anchor_text", dpo.dp_board_anchor_text)
|
|
@@ -2799,17 +2928,17 @@ var RedactoNoticeConsent = ({
|
|
|
2799
2928
|
"\n"
|
|
2800
2929
|
] }) : null,
|
|
2801
2930
|
(dpo == null ? void 0 : dpo.dpo_text) ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2802
|
-
/* @__PURE__ */ jsxs2(
|
|
2931
|
+
/* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "dpo-dpo-text" ? styles3.ttsHighlight : null, children: [
|
|
2803
2932
|
getT("dpo_text", dpo.dpo_text),
|
|
2804
2933
|
" "
|
|
2805
2934
|
] }),
|
|
2806
|
-
/* @__PURE__ */
|
|
2807
|
-
|
|
2935
|
+
/* @__PURE__ */ jsx4(
|
|
2936
|
+
Text3,
|
|
2808
2937
|
{
|
|
2809
2938
|
style: [
|
|
2810
|
-
|
|
2939
|
+
styles3.link,
|
|
2811
2940
|
{ color: linkColor },
|
|
2812
|
-
activeTTSSegmentKey === "dpo-dpo-link" ?
|
|
2941
|
+
activeTTSSegmentKey === "dpo-dpo-link" ? styles3.ttsHighlight : null
|
|
2813
2942
|
],
|
|
2814
2943
|
onPress: () => Linking.openURL(dpo.dpo_url),
|
|
2815
2944
|
children: getT("dpo_anchor_text", dpo.dpo_anchor_text)
|
|
@@ -2819,62 +2948,114 @@ var RedactoNoticeConsent = ({
|
|
|
2819
2948
|
] }) });
|
|
2820
2949
|
})() : null
|
|
2821
2950
|
] }),
|
|
2822
|
-
/* @__PURE__ */
|
|
2823
|
-
|
|
2951
|
+
/* @__PURE__ */ jsx4(
|
|
2952
|
+
View3,
|
|
2824
2953
|
{
|
|
2825
|
-
style:
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2954
|
+
style: isReviewMode ? styles3.bottomSection : isMobile ? styles3.actionButtonStack : styles3.actionButtonRow,
|
|
2955
|
+
children: isReviewMode ? /* @__PURE__ */ jsx4(
|
|
2956
|
+
TouchableOpacity3,
|
|
2957
|
+
{
|
|
2958
|
+
style: [styles3.button, styles3.acceptButton, acceptButtonStyle],
|
|
2959
|
+
onPress: () => setIsReviewMode(false),
|
|
2960
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [styles3.buttonText, styles3.acceptButtonText, acceptButtonTextStyle], children: reviewModeButtonText || "Update Consent" })
|
|
2961
|
+
}
|
|
2962
|
+
) : (
|
|
2963
|
+
/* Rendered in a different order per breakpoint rather than
|
|
2964
|
+
reordered with styles, so focus order follows visual order. */
|
|
2965
|
+
footerButtonOrder.map((slot) => {
|
|
2966
|
+
if (slot === "acceptAll") {
|
|
2967
|
+
return /* @__PURE__ */ jsx4(
|
|
2968
|
+
TouchableOpacity3,
|
|
2969
|
+
{
|
|
2970
|
+
style: [
|
|
2971
|
+
styles3.button,
|
|
2972
|
+
widthStyle,
|
|
2973
|
+
styles3.acceptButton,
|
|
2974
|
+
acceptAllButtonStyle,
|
|
2975
|
+
isSubmitting ? { opacity: 0.5 } : null
|
|
2976
|
+
],
|
|
2977
|
+
onPress: handleAcceptAll,
|
|
2978
|
+
disabled: isSubmitting,
|
|
2979
|
+
accessibilityLabel: acceptAllLabel,
|
|
2980
|
+
children: /* @__PURE__ */ jsx4(
|
|
2981
|
+
Text3,
|
|
2982
|
+
{
|
|
2983
|
+
style: [
|
|
2984
|
+
styles3.buttonText,
|
|
2985
|
+
styles3.acceptButtonText,
|
|
2986
|
+
acceptAllButtonTextStyle,
|
|
2987
|
+
activeTTSSegmentKey === "accept_all_button_text" ? styles3.ttsHighlight : null
|
|
2988
|
+
],
|
|
2989
|
+
children: acceptAllLabel
|
|
2990
|
+
}
|
|
2991
|
+
)
|
|
2992
|
+
},
|
|
2993
|
+
slot
|
|
2994
|
+
);
|
|
2852
2995
|
}
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2996
|
+
if (slot === "acceptSelected") {
|
|
2997
|
+
return /* @__PURE__ */ jsx4(
|
|
2998
|
+
TouchableOpacity3,
|
|
2999
|
+
{
|
|
3000
|
+
style: [
|
|
3001
|
+
styles3.button,
|
|
3002
|
+
widthStyle,
|
|
3003
|
+
styles3.acceptSecondaryButton,
|
|
3004
|
+
acceptSelectedButtonStyle,
|
|
3005
|
+
isSubmitting || !areAllRequiredElementsChecked ? { opacity: 0.5 } : null
|
|
3006
|
+
],
|
|
3007
|
+
onPress: handleAcceptSelected,
|
|
3008
|
+
disabled: isSubmitting || !areAllRequiredElementsChecked,
|
|
3009
|
+
accessibilityLabel: isSubmitting ? "Submitting consent" : acceptSelectedLabel,
|
|
3010
|
+
children: isSubmitting ? /* @__PURE__ */ jsx4(ActivityIndicator2, { size: "small", color: accentColor }) : /* @__PURE__ */ jsx4(
|
|
3011
|
+
Text3,
|
|
3012
|
+
{
|
|
3013
|
+
style: [
|
|
3014
|
+
styles3.buttonText,
|
|
3015
|
+
styles3.acceptSecondaryButtonText,
|
|
3016
|
+
acceptSelectedButtonTextStyle,
|
|
3017
|
+
activeTTSSegmentKey === "confirm_button_text" ? styles3.ttsHighlight : null
|
|
3018
|
+
],
|
|
3019
|
+
children: acceptSelectedLabel
|
|
3020
|
+
}
|
|
3021
|
+
)
|
|
3022
|
+
},
|
|
3023
|
+
slot
|
|
3024
|
+
);
|
|
2873
3025
|
}
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
3026
|
+
return /* @__PURE__ */ jsx4(
|
|
3027
|
+
TouchableOpacity3,
|
|
3028
|
+
{
|
|
3029
|
+
style: [
|
|
3030
|
+
styles3.button,
|
|
3031
|
+
widthStyle,
|
|
3032
|
+
styles3.cancelButton,
|
|
3033
|
+
declineButtonStyle,
|
|
3034
|
+
isMobile ? null : styles3.declineSpacer,
|
|
3035
|
+
isSubmitting ? { opacity: 0.5 } : null
|
|
3036
|
+
],
|
|
3037
|
+
onPress: handleDecline,
|
|
3038
|
+
disabled: isSubmitting,
|
|
3039
|
+
accessibilityLabel: declineLabel,
|
|
3040
|
+
children: /* @__PURE__ */ jsx4(
|
|
3041
|
+
Text3,
|
|
3042
|
+
{
|
|
3043
|
+
style: [
|
|
3044
|
+
styles3.buttonText,
|
|
3045
|
+
styles3.cancelButtonText,
|
|
3046
|
+
declineButtonTextStyle,
|
|
3047
|
+
activeTTSSegmentKey === "decline_button_text" ? styles3.ttsHighlight : null
|
|
3048
|
+
],
|
|
3049
|
+
children: declineLabel
|
|
3050
|
+
}
|
|
3051
|
+
)
|
|
3052
|
+
},
|
|
3053
|
+
slot
|
|
3054
|
+
);
|
|
3055
|
+
})
|
|
3056
|
+
)
|
|
3057
|
+
}
|
|
3058
|
+
)
|
|
2878
3059
|
] })
|
|
2879
3060
|
}
|
|
2880
3061
|
)
|
|
@@ -2895,7 +3076,7 @@ import {
|
|
|
2895
3076
|
import {
|
|
2896
3077
|
ActivityIndicator as ActivityIndicator3,
|
|
2897
3078
|
ScrollView as ScrollView2,
|
|
2898
|
-
Text as
|
|
3079
|
+
Text as Text4,
|
|
2899
3080
|
TouchableOpacity as TouchableOpacity4,
|
|
2900
3081
|
View as View4
|
|
2901
3082
|
} from "react-native";
|
|
@@ -3064,8 +3245,8 @@ var fetchNoticeConsentStatusForScope = async ({
|
|
|
3064
3245
|
var isNoticeFullyConsented = (status) => status.consented && status.all_mandatory_active;
|
|
3065
3246
|
|
|
3066
3247
|
// src/RedactoNoticeConsentInline/styles.ts
|
|
3067
|
-
import { StyleSheet as
|
|
3068
|
-
var
|
|
3248
|
+
import { StyleSheet as StyleSheet6, Platform as Platform2 } from "react-native";
|
|
3249
|
+
var styles4 = StyleSheet6.create({
|
|
3069
3250
|
container: {
|
|
3070
3251
|
width: "100%",
|
|
3071
3252
|
borderRadius: 8,
|
|
@@ -3265,9 +3446,6 @@ var styles3 = StyleSheet5.create({
|
|
|
3265
3446
|
color: "#DC2626",
|
|
3266
3447
|
fontSize: 14
|
|
3267
3448
|
},
|
|
3268
|
-
requiredAsterisk: {
|
|
3269
|
-
color: "red"
|
|
3270
|
-
},
|
|
3271
3449
|
purposeChevron: {
|
|
3272
3450
|
marginLeft: 5,
|
|
3273
3451
|
alignItems: "center",
|
|
@@ -3319,7 +3497,7 @@ var styles3 = StyleSheet5.create({
|
|
|
3319
3497
|
});
|
|
3320
3498
|
|
|
3321
3499
|
// src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
|
|
3322
|
-
import { jsx as
|
|
3500
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
3323
3501
|
var RedactoConsentInlineComponent = ({
|
|
3324
3502
|
org_uuid,
|
|
3325
3503
|
workspace_uuid,
|
|
@@ -3630,28 +3808,28 @@ var RedactoConsentInlineComponent = ({
|
|
|
3630
3808
|
);
|
|
3631
3809
|
if (hasAlreadyConsented || fetchError) return null;
|
|
3632
3810
|
if (isLoading) {
|
|
3633
|
-
return /* @__PURE__ */ jsxs3(View4, { style:
|
|
3634
|
-
/* @__PURE__ */
|
|
3635
|
-
/* @__PURE__ */
|
|
3811
|
+
return /* @__PURE__ */ jsxs3(View4, { style: styles4.loadingContainer, children: [
|
|
3812
|
+
/* @__PURE__ */ jsx5(ActivityIndicator3, { size: "large", color: "#4f87ff" }),
|
|
3813
|
+
/* @__PURE__ */ jsx5(Text4, { style: [styles4.loadingText, { color: textColor }], children: "Loading..." })
|
|
3636
3814
|
] });
|
|
3637
3815
|
}
|
|
3638
3816
|
if (!content) return null;
|
|
3639
3817
|
return /* @__PURE__ */ jsxs3(View4, { style: { gap: 16 }, children: [
|
|
3640
|
-
errorMessage ? /* @__PURE__ */
|
|
3641
|
-
supportedLanguages.length > 0 && /* @__PURE__ */ jsxs3(View4, { style: [
|
|
3642
|
-
/* @__PURE__ */
|
|
3643
|
-
/* @__PURE__ */ jsxs3(View4, { style:
|
|
3818
|
+
errorMessage ? /* @__PURE__ */ jsx5(View4, { style: styles4.errorContainer, children: /* @__PURE__ */ jsx5(Text4, { style: styles4.errorText, children: errorMessage }) }) : null,
|
|
3819
|
+
supportedLanguages.length > 0 && /* @__PURE__ */ jsxs3(View4, { style: [styles4.topSection, { borderBottomWidth: 0, paddingBottom: 0 }], children: [
|
|
3820
|
+
/* @__PURE__ */ jsx5(View4, {}),
|
|
3821
|
+
/* @__PURE__ */ jsxs3(View4, { style: styles4.languageSelectorContainer, children: [
|
|
3644
3822
|
/* @__PURE__ */ jsxs3(
|
|
3645
3823
|
TouchableOpacity4,
|
|
3646
3824
|
{
|
|
3647
3825
|
style: [
|
|
3648
|
-
|
|
3826
|
+
styles4.topRight,
|
|
3649
3827
|
((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
|
|
3650
3828
|
],
|
|
3651
3829
|
onPress: () => setIsLanguageDropdownOpen((v) => !v),
|
|
3652
3830
|
children: [
|
|
3653
|
-
/* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3831
|
+
/* @__PURE__ */ jsx5(Text4, { style: [styles4.topRightText, ((_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.language) ? { color: settings.button.language.textColor } : null], children: selectedLanguage }),
|
|
3832
|
+
/* @__PURE__ */ jsx5(Svg4, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx5(
|
|
3655
3833
|
Path4,
|
|
3656
3834
|
{
|
|
3657
3835
|
d: "M4 6L8 10L12 6",
|
|
@@ -3664,34 +3842,34 @@ var RedactoConsentInlineComponent = ({
|
|
|
3664
3842
|
]
|
|
3665
3843
|
}
|
|
3666
3844
|
),
|
|
3667
|
-
isLanguageDropdownOpen && /* @__PURE__ */
|
|
3845
|
+
isLanguageDropdownOpen && /* @__PURE__ */ jsx5(View4, { style: styles4.languageDropdown, children: /* @__PURE__ */ jsx5(ScrollView2, { children: supportedLanguages.map((lang) => /* @__PURE__ */ jsx5(
|
|
3668
3846
|
TouchableOpacity4,
|
|
3669
3847
|
{
|
|
3670
3848
|
style: [
|
|
3671
|
-
|
|
3672
|
-
lang === selectedLanguage ?
|
|
3849
|
+
styles4.languageItem,
|
|
3850
|
+
lang === selectedLanguage ? styles4.selectedLanguageItem : null
|
|
3673
3851
|
],
|
|
3674
3852
|
onPress: () => {
|
|
3675
3853
|
setSelectedLanguage(lang);
|
|
3676
3854
|
setIsLanguageDropdownOpen(false);
|
|
3677
3855
|
},
|
|
3678
|
-
children: /* @__PURE__ */
|
|
3856
|
+
children: /* @__PURE__ */ jsx5(Text4, { style: [styles4.languageItemText, lang === selectedLanguage ? styles4.selectedLanguageItemText : null], children: lang })
|
|
3679
3857
|
},
|
|
3680
3858
|
lang
|
|
3681
3859
|
)) }) })
|
|
3682
3860
|
] })
|
|
3683
3861
|
] }),
|
|
3684
3862
|
content.purposes.map((purpose) => /* @__PURE__ */ jsxs3(View4, { children: [
|
|
3685
|
-
/* @__PURE__ */ jsxs3(View4, { style:
|
|
3863
|
+
/* @__PURE__ */ jsxs3(View4, { style: styles4.optionItem, children: [
|
|
3686
3864
|
/* @__PURE__ */ jsxs3(
|
|
3687
3865
|
TouchableOpacity4,
|
|
3688
3866
|
{
|
|
3689
|
-
style:
|
|
3867
|
+
style: styles4.optionLeft,
|
|
3690
3868
|
onPress: () => togglePurposeCollapse(purpose.uuid),
|
|
3691
3869
|
accessibilityRole: "button",
|
|
3692
3870
|
accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`,
|
|
3693
3871
|
children: [
|
|
3694
|
-
/* @__PURE__ */
|
|
3872
|
+
/* @__PURE__ */ jsx5(View4, { style: styles4.purposeChevron, children: /* @__PURE__ */ jsx5(Svg4, { width: 7, height: 12, viewBox: "0 0 7 12", fill: "none", children: /* @__PURE__ */ jsx5(
|
|
3695
3873
|
Path4,
|
|
3696
3874
|
{
|
|
3697
3875
|
d: "M1 1L6 6L1 11",
|
|
@@ -3702,14 +3880,17 @@ var RedactoConsentInlineComponent = ({
|
|
|
3702
3880
|
transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
|
|
3703
3881
|
}
|
|
3704
3882
|
) }) }),
|
|
3705
|
-
/* @__PURE__ */ jsxs3(View4, { style:
|
|
3706
|
-
/* @__PURE__ */
|
|
3707
|
-
|
|
3883
|
+
/* @__PURE__ */ jsxs3(View4, { style: styles4.optionTextContainer, children: [
|
|
3884
|
+
/* @__PURE__ */ jsxs3(Text4, { style: [styles4.optionTitle, { color: headingColor }, isMobile ? { fontSize: 14 } : null], children: [
|
|
3885
|
+
getTranslatedText("purposes.name", purpose.name, purpose.uuid),
|
|
3886
|
+
hasRequiredDataElement(purpose) && /* @__PURE__ */ jsx5(RequiredMarker, {})
|
|
3887
|
+
] }),
|
|
3888
|
+
/* @__PURE__ */ jsx5(Text4, { style: [styles4.optionDescription, { color: textColor }, isMobile ? { fontSize: 11 } : null], children: getTranslatedText("purposes.description", purpose.description, purpose.uuid) })
|
|
3708
3889
|
] })
|
|
3709
3890
|
]
|
|
3710
3891
|
}
|
|
3711
3892
|
),
|
|
3712
|
-
/* @__PURE__ */
|
|
3893
|
+
/* @__PURE__ */ jsx5(
|
|
3713
3894
|
Checkbox,
|
|
3714
3895
|
{
|
|
3715
3896
|
checked: selectedPurposes[purpose.uuid] || false,
|
|
@@ -3720,12 +3901,12 @@ var RedactoConsentInlineComponent = ({
|
|
|
3720
3901
|
}
|
|
3721
3902
|
)
|
|
3722
3903
|
] }),
|
|
3723
|
-
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */
|
|
3724
|
-
/* @__PURE__ */ jsxs3(
|
|
3904
|
+
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ jsx5(View4, { style: styles4.dataElementsContainer, children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ jsxs3(View4, { style: styles4.dataElementItem, children: [
|
|
3905
|
+
/* @__PURE__ */ jsxs3(Text4, { style: [styles4.dataElementText, { color: textColor }, isMobile ? { fontSize: 12 } : null], children: [
|
|
3725
3906
|
getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
|
|
3726
|
-
dataElement.required && /* @__PURE__ */
|
|
3907
|
+
dataElement.required && /* @__PURE__ */ jsx5(RequiredMarker, {})
|
|
3727
3908
|
] }),
|
|
3728
|
-
/* @__PURE__ */
|
|
3909
|
+
/* @__PURE__ */ jsx5(
|
|
3729
3910
|
Checkbox,
|
|
3730
3911
|
{
|
|
3731
3912
|
checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,
|