@redacto.io/consent-sdk-react-native 5.0.0 → 5.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +590 -396
- package/dist/index.mjs +509 -315
- package/dist/privacy-center.d.mts +15 -4
- package/dist/privacy-center.d.ts +15 -4
- package/dist/privacy-center.js +62 -31
- package/dist/privacy-center.mjs +62 -31
- 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
|
|
@@ -32,7 +32,7 @@ import { jwtDecode } from "jwt-decode";
|
|
|
32
32
|
|
|
33
33
|
// src/RedactoNoticeConsent/api/sandbox.ts
|
|
34
34
|
var resolveSandboxAuth = (params) => {
|
|
35
|
-
var _a, _b, _c, _d, _e;
|
|
35
|
+
var _a, _b, _c, _d, _e, _f;
|
|
36
36
|
const token = (_a = params.token) == null ? void 0 : _a.trim();
|
|
37
37
|
if (!token) {
|
|
38
38
|
return null;
|
|
@@ -40,16 +40,17 @@ var resolveSandboxAuth = (params) => {
|
|
|
40
40
|
const organisationUuid = (_b = params.organisationUuid) == null ? void 0 : _b.trim();
|
|
41
41
|
const workspaceUuid = (_c = params.workspaceUuid) == null ? void 0 : _c.trim();
|
|
42
42
|
const ucic = (_d = params.sandboxUcic) == null ? void 0 : _d.trim();
|
|
43
|
-
const
|
|
43
|
+
const email = (_e = params.sandboxEmail) == null ? void 0 : _e.trim();
|
|
44
|
+
const mobile = (_f = params.sandboxMobile) == null ? void 0 : _f.trim();
|
|
44
45
|
if (!organisationUuid || !workspaceUuid) {
|
|
45
46
|
throw new Error(
|
|
46
47
|
"Sandbox mode requires organisationUuid and workspaceUuid props"
|
|
47
48
|
);
|
|
48
49
|
}
|
|
49
|
-
if (!ucic && !
|
|
50
|
+
if (!ucic && !email && !mobile) {
|
|
50
51
|
throw new Error("Sandbox mode requires a UCIC, email, or mobile");
|
|
51
52
|
}
|
|
52
|
-
return { token, ucic,
|
|
53
|
+
return { token, ucic, email, mobile, organisationUuid, workspaceUuid };
|
|
53
54
|
};
|
|
54
55
|
var resolveRequestAuth = (accessToken, sandboxParams, decodeTokenSafely2) => {
|
|
55
56
|
const sandbox = resolveSandboxAuth(sandboxParams);
|
|
@@ -81,15 +82,24 @@ var buildAuthHeaders = (accessToken, sandbox) => {
|
|
|
81
82
|
return { Authorization: `Bearer ${accessToken}` };
|
|
82
83
|
};
|
|
83
84
|
var sandboxBodyIdentity = (sandbox) => {
|
|
85
|
+
const payload = {};
|
|
84
86
|
if (sandbox.ucic) {
|
|
85
|
-
|
|
87
|
+
payload.org_user_id = sandbox.ucic;
|
|
88
|
+
}
|
|
89
|
+
if (sandbox.email) {
|
|
90
|
+
payload.primary_email = sandbox.email;
|
|
91
|
+
}
|
|
92
|
+
if (sandbox.mobile) {
|
|
93
|
+
payload.primary_mobile = sandbox.mobile;
|
|
86
94
|
}
|
|
87
|
-
return
|
|
95
|
+
return payload;
|
|
88
96
|
};
|
|
89
97
|
var sandboxQueryIdentity = (sandbox) => sandboxBodyIdentity(sandbox);
|
|
90
98
|
|
|
91
99
|
// src/constants.ts
|
|
92
100
|
var DEFAULT_CONSENT_API_BASE_URL = "https://api.redacto.io/consent";
|
|
101
|
+
var REQUIRED_MARKER_GLYPH = " *";
|
|
102
|
+
var REQUIRED_MARKER_COLOR = "red";
|
|
93
103
|
|
|
94
104
|
// src/RedactoNoticeConsent/api/index.ts
|
|
95
105
|
var apiCache = /* @__PURE__ */ new Map();
|
|
@@ -137,7 +147,7 @@ var fetchConsentContent = async ({
|
|
|
137
147
|
}
|
|
138
148
|
const { organisationUuid: ORGANISATION_UUID, workspaceUuid: WORKSPACE_UUID, sandbox } = resolveRequestAuth(accessToken, sandboxParams, decodeTokenSafely);
|
|
139
149
|
const apiBaseUrl = baseUrl || DEFAULT_CONSENT_API_BASE_URL;
|
|
140
|
-
const cacheIdentity = sandbox ? `sandbox:${sandbox.organisationUuid}:${sandbox.workspaceUuid}:${sandbox.ucic || sandbox.
|
|
150
|
+
const cacheIdentity = sandbox ? `sandbox:${sandbox.organisationUuid}:${sandbox.workspaceUuid}:${sandbox.ucic || sandbox.email || sandbox.mobile}` : accessToken;
|
|
141
151
|
const cacheKey = `${cacheIdentity}-${noticeId}-${validate_against}-${language}-${specific_uuid || ""}-${include_fully_consented_data}`;
|
|
142
152
|
if (validate_against === "all" && !specific_uuid) {
|
|
143
153
|
const cachedData = getCachedData(cacheKey);
|
|
@@ -157,7 +167,9 @@ var fetchConsentContent = async ({
|
|
|
157
167
|
}
|
|
158
168
|
if (sandbox) {
|
|
159
169
|
for (const [key, value] of Object.entries(sandboxQueryIdentity(sandbox))) {
|
|
160
|
-
|
|
170
|
+
if (value) {
|
|
171
|
+
url.searchParams.append(key, value);
|
|
172
|
+
}
|
|
161
173
|
}
|
|
162
174
|
}
|
|
163
175
|
const response = await fetch(url.toString(), {
|
|
@@ -291,7 +303,9 @@ var fetchTTSAudioUrls = async ({
|
|
|
291
303
|
);
|
|
292
304
|
if (sandbox) {
|
|
293
305
|
for (const [key, value] of Object.entries(sandboxQueryIdentity(sandbox))) {
|
|
294
|
-
|
|
306
|
+
if (value) {
|
|
307
|
+
url.searchParams.append(key, value);
|
|
308
|
+
}
|
|
295
309
|
}
|
|
296
310
|
}
|
|
297
311
|
const response = await fetch(url.toString(), {
|
|
@@ -539,18 +553,28 @@ var styles = StyleSheet.create({
|
|
|
539
553
|
}
|
|
540
554
|
});
|
|
541
555
|
|
|
556
|
+
// src/RedactoNoticeConsent/components/RequiredMarker.tsx
|
|
557
|
+
import { StyleSheet as StyleSheet2, Text } from "react-native";
|
|
558
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
559
|
+
var RequiredMarker = () => /* @__PURE__ */ jsx2(Text, { style: styles2.marker, children: REQUIRED_MARKER_GLYPH });
|
|
560
|
+
var styles2 = StyleSheet2.create({
|
|
561
|
+
marker: {
|
|
562
|
+
color: REQUIRED_MARKER_COLOR
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
|
|
542
566
|
// src/RedactoNoticeConsent/components/VerificationScreen.tsx
|
|
543
567
|
import { useEffect, useRef } from "react";
|
|
544
568
|
import {
|
|
545
569
|
ActivityIndicator,
|
|
546
570
|
Animated,
|
|
547
|
-
StyleSheet as
|
|
548
|
-
Text,
|
|
571
|
+
StyleSheet as StyleSheet3,
|
|
572
|
+
Text as Text2,
|
|
549
573
|
TouchableOpacity as TouchableOpacity2,
|
|
550
574
|
View as View2
|
|
551
575
|
} from "react-native";
|
|
552
576
|
import Svg2, { Circle as SvgCircle, Path as Path2 } from "react-native-svg";
|
|
553
|
-
import { jsx as
|
|
577
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
554
578
|
var VerificationScreen = ({
|
|
555
579
|
status,
|
|
556
580
|
errorMessage,
|
|
@@ -619,18 +643,18 @@ var VerificationScreen = ({
|
|
|
619
643
|
}
|
|
620
644
|
};
|
|
621
645
|
const renderPendingContent = () => /* @__PURE__ */ jsxs(View2, { style: s.centerContent, children: [
|
|
622
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ jsx3(ActivityIndicator, { size: "large", color: acceptBg, style: s.pendingSpinner }),
|
|
623
647
|
/* @__PURE__ */ jsxs(View2, { style: s.infoBanner, children: [
|
|
624
648
|
/* @__PURE__ */ jsxs(Svg2, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: [
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ jsx3(SvgCircle, { cx: "12", cy: "12", r: "10", stroke: "#059669", strokeWidth: 2 }),
|
|
650
|
+
/* @__PURE__ */ jsx3(Path2, { d: "M12 16v-4M12 8h.01", stroke: "#059669", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
627
651
|
] }),
|
|
628
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ jsx3(Text2, { style: s.infoBannerText, children: "Please complete the verification in Safari. This screen will update automatically when verification is complete." })
|
|
629
653
|
] })
|
|
630
654
|
] });
|
|
631
655
|
const renderSuccessContent = () => /* @__PURE__ */ jsxs(View2, { style: s.centerContent, children: [
|
|
632
656
|
/* @__PURE__ */ jsxs(View2, { style: s.iconWrapper, children: [
|
|
633
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ jsx3(
|
|
634
658
|
Animated.View,
|
|
635
659
|
{
|
|
636
660
|
style: [
|
|
@@ -647,7 +671,7 @@ var VerificationScreen = ({
|
|
|
647
671
|
]
|
|
648
672
|
}
|
|
649
673
|
),
|
|
650
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__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
675
|
Path2,
|
|
652
676
|
{
|
|
653
677
|
d: "M5 13L9 17L19 7",
|
|
@@ -658,7 +682,7 @@ var VerificationScreen = ({
|
|
|
658
682
|
}
|
|
659
683
|
) }) })
|
|
660
684
|
] }),
|
|
661
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ jsx3(
|
|
662
686
|
Animated.Text,
|
|
663
687
|
{
|
|
664
688
|
style: [
|
|
@@ -668,7 +692,7 @@ var VerificationScreen = ({
|
|
|
668
692
|
children: "Verification Completed"
|
|
669
693
|
}
|
|
670
694
|
),
|
|
671
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ jsx3(
|
|
672
696
|
Animated.Text,
|
|
673
697
|
{
|
|
674
698
|
style: [
|
|
@@ -680,7 +704,7 @@ var VerificationScreen = ({
|
|
|
680
704
|
)
|
|
681
705
|
] });
|
|
682
706
|
const renderErrorContent = () => /* @__PURE__ */ jsxs(View2, { style: s.centerContent, children: [
|
|
683
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__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
708
|
Path2,
|
|
685
709
|
{
|
|
686
710
|
d: "M18 6L6 18M6 6L18 18",
|
|
@@ -704,7 +728,7 @@ var VerificationScreen = ({
|
|
|
704
728
|
}
|
|
705
729
|
),
|
|
706
730
|
/* @__PURE__ */ jsxs(Animated.View, { style: [s.errorBanner, { opacity: contentAnim }], children: [
|
|
707
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ jsx3(Svg2, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: /* @__PURE__ */ jsx3(
|
|
708
732
|
Path2,
|
|
709
733
|
{
|
|
710
734
|
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 +738,69 @@ var VerificationScreen = ({
|
|
|
714
738
|
strokeLinejoin: "round"
|
|
715
739
|
}
|
|
716
740
|
) }),
|
|
717
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ jsx3(Text2, { style: s.errorBannerText, children: getErrorGuidance() })
|
|
718
742
|
] })
|
|
719
743
|
] });
|
|
720
744
|
const renderBottomButtons = () => {
|
|
721
745
|
if (status === "verified") {
|
|
722
746
|
if (!onContinue) return null;
|
|
723
|
-
return /* @__PURE__ */
|
|
747
|
+
return /* @__PURE__ */ jsx3(View2, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ jsx3(
|
|
724
748
|
TouchableOpacity2,
|
|
725
749
|
{
|
|
726
750
|
style: [s.primaryButton, { backgroundColor: acceptBg }],
|
|
727
751
|
onPress: onContinue,
|
|
728
752
|
activeOpacity: 0.8,
|
|
729
|
-
children: /* @__PURE__ */
|
|
753
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.primaryButtonText, { color: acceptText }], children: "Continue" })
|
|
730
754
|
}
|
|
731
755
|
) });
|
|
732
756
|
}
|
|
733
757
|
if (status === "failed" || status === "expired") {
|
|
734
758
|
return /* @__PURE__ */ jsxs(View2, { style: [s.bottomSection, { borderTopColor: borderColor }], children: [
|
|
735
|
-
errorCode === "GUARDIAN_UNDER_18" && onChangeGuardian ? /* @__PURE__ */
|
|
759
|
+
errorCode === "GUARDIAN_UNDER_18" && onChangeGuardian ? /* @__PURE__ */ jsx3(
|
|
736
760
|
TouchableOpacity2,
|
|
737
761
|
{
|
|
738
762
|
style: [s.primaryButton, { backgroundColor: acceptBg }],
|
|
739
763
|
onPress: onChangeGuardian,
|
|
740
764
|
activeOpacity: 0.8,
|
|
741
|
-
children: /* @__PURE__ */
|
|
765
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.primaryButtonText, { color: acceptText }], children: "Change Guardian" })
|
|
742
766
|
}
|
|
743
|
-
) : canRetry !== false ? /* @__PURE__ */
|
|
767
|
+
) : canRetry !== false ? /* @__PURE__ */ jsx3(
|
|
744
768
|
TouchableOpacity2,
|
|
745
769
|
{
|
|
746
770
|
style: [s.primaryButton, { backgroundColor: acceptBg }],
|
|
747
771
|
onPress: onRetry,
|
|
748
772
|
activeOpacity: 0.8,
|
|
749
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.primaryButtonText, { color: acceptText }], children: "Try Again" })
|
|
750
774
|
}
|
|
751
775
|
) : null,
|
|
752
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ jsx3(
|
|
753
777
|
TouchableOpacity2,
|
|
754
778
|
{
|
|
755
779
|
style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
|
|
756
780
|
onPress: onBack,
|
|
757
781
|
activeOpacity: 0.8,
|
|
758
|
-
children: /* @__PURE__ */
|
|
782
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.outlineButtonText, { color: declineText }], children: "Go Back" })
|
|
759
783
|
}
|
|
760
784
|
)
|
|
761
785
|
] });
|
|
762
786
|
}
|
|
763
|
-
return /* @__PURE__ */
|
|
787
|
+
return /* @__PURE__ */ jsx3(View2, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ jsx3(
|
|
764
788
|
TouchableOpacity2,
|
|
765
789
|
{
|
|
766
790
|
style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
|
|
767
791
|
onPress: onBack,
|
|
768
792
|
activeOpacity: 0.8,
|
|
769
|
-
children: /* @__PURE__ */
|
|
793
|
+
children: /* @__PURE__ */ jsx3(Text2, { style: [s.outlineButtonText, { color: declineText }], children: "Cancel" })
|
|
770
794
|
}
|
|
771
795
|
) });
|
|
772
796
|
};
|
|
773
797
|
return /* @__PURE__ */ jsxs(View2, { style: s.root, children: [
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ jsx3(View2, { style: [s.topSection, { borderBottomColor: borderColor }], children: /* @__PURE__ */ jsx3(Text2, { style: [s.topTitle, { color: headingColor }], children: "Guardian Verification" }) }),
|
|
799
|
+
/* @__PURE__ */ jsx3(View2, { style: s.centerArea, children: status === "verified" ? renderSuccessContent() : status === "failed" || status === "expired" ? renderErrorContent() : renderPendingContent() }),
|
|
776
800
|
renderBottomButtons()
|
|
777
801
|
] });
|
|
778
802
|
};
|
|
779
|
-
var s =
|
|
803
|
+
var s = StyleSheet3.create({
|
|
780
804
|
root: {
|
|
781
805
|
flex: 1
|
|
782
806
|
},
|
|
@@ -786,7 +810,7 @@ var s = StyleSheet2.create({
|
|
|
786
810
|
alignItems: "center",
|
|
787
811
|
paddingHorizontal: 20,
|
|
788
812
|
paddingVertical: 16,
|
|
789
|
-
borderBottomWidth:
|
|
813
|
+
borderBottomWidth: StyleSheet3.hairlineWidth,
|
|
790
814
|
borderBottomColor: "#E5E7EB"
|
|
791
815
|
},
|
|
792
816
|
topTitle: {
|
|
@@ -894,7 +918,7 @@ var s = StyleSheet2.create({
|
|
|
894
918
|
bottomSection: {
|
|
895
919
|
padding: 20,
|
|
896
920
|
gap: 8,
|
|
897
|
-
borderTopWidth:
|
|
921
|
+
borderTopWidth: StyleSheet3.hairlineWidth,
|
|
898
922
|
borderTopColor: "#E5E7EB"
|
|
899
923
|
},
|
|
900
924
|
primaryButton: {
|
|
@@ -929,10 +953,13 @@ var DPO_AUDIO_ELEMENT_MAP = [
|
|
|
929
953
|
{ audioKey: "dpo_text_audio_url", elementId: "dpo-dpo-text" },
|
|
930
954
|
{ audioKey: "dpo_anchor_text_audio_url", elementId: "dpo-dpo-link" }
|
|
931
955
|
];
|
|
956
|
+
var DEFAULT_ACCEPT_ALL_BUTTON_TEXT = "Accept All";
|
|
957
|
+
var DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT = "Accept Selected";
|
|
958
|
+
var DEFAULT_DECLINE_BUTTON_TEXT = "Decline";
|
|
932
959
|
|
|
933
960
|
// src/RedactoNoticeConsent/styles.ts
|
|
934
|
-
import { StyleSheet as
|
|
935
|
-
var
|
|
961
|
+
import { StyleSheet as StyleSheet4, Platform } from "react-native";
|
|
962
|
+
var styles3 = StyleSheet4.create({
|
|
936
963
|
overlay: {
|
|
937
964
|
flex: 1,
|
|
938
965
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
@@ -1094,6 +1121,29 @@ var styles2 = StyleSheet3.create({
|
|
|
1094
1121
|
backgroundColor: "#ffffff",
|
|
1095
1122
|
flexShrink: 0
|
|
1096
1123
|
},
|
|
1124
|
+
/**
|
|
1125
|
+
* The main notice footer. Wide: one row with decline pushed left and the
|
|
1126
|
+
* accepts grouped right (see `declineSpacer`). Narrow: a full-width stack.
|
|
1127
|
+
* The guardian-verification and age-gate sub-flows still use
|
|
1128
|
+
* `bottomSection` — they have their own two-button layout.
|
|
1129
|
+
*/
|
|
1130
|
+
actionButtonRow: {
|
|
1131
|
+
flexDirection: "row",
|
|
1132
|
+
alignItems: "center",
|
|
1133
|
+
gap: 10,
|
|
1134
|
+
paddingTop: 15,
|
|
1135
|
+
paddingBottom: 16,
|
|
1136
|
+
backgroundColor: "#ffffff",
|
|
1137
|
+
flexShrink: 0
|
|
1138
|
+
},
|
|
1139
|
+
actionButtonStack: {
|
|
1140
|
+
flexDirection: "column",
|
|
1141
|
+
gap: 10,
|
|
1142
|
+
paddingTop: 15,
|
|
1143
|
+
paddingBottom: 16,
|
|
1144
|
+
backgroundColor: "#ffffff",
|
|
1145
|
+
flexShrink: 0
|
|
1146
|
+
},
|
|
1097
1147
|
button: {
|
|
1098
1148
|
borderRadius: 8,
|
|
1099
1149
|
paddingVertical: 9,
|
|
@@ -1101,6 +1151,24 @@ var styles2 = StyleSheet3.create({
|
|
|
1101
1151
|
alignItems: "center",
|
|
1102
1152
|
justifyContent: "center"
|
|
1103
1153
|
},
|
|
1154
|
+
/**
|
|
1155
|
+
* In the wide row each button shrinks to its own label so the left/right
|
|
1156
|
+
* split survives; `flexShrink` lets a long translated label wrap rather than
|
|
1157
|
+
* overflow the modal.
|
|
1158
|
+
*/
|
|
1159
|
+
rowButton: {
|
|
1160
|
+
flexShrink: 1,
|
|
1161
|
+
paddingHorizontal: 16
|
|
1162
|
+
},
|
|
1163
|
+
/** In the narrow stack every button spans the full width. */
|
|
1164
|
+
stackButton: {
|
|
1165
|
+
alignSelf: "stretch",
|
|
1166
|
+
paddingHorizontal: 16
|
|
1167
|
+
},
|
|
1168
|
+
/** Pushes everything after decline to the right edge of the wide row. */
|
|
1169
|
+
declineSpacer: {
|
|
1170
|
+
marginRight: "auto"
|
|
1171
|
+
},
|
|
1104
1172
|
buttonText: {
|
|
1105
1173
|
fontWeight: "400",
|
|
1106
1174
|
fontSize: 16,
|
|
@@ -1113,6 +1181,19 @@ var styles2 = StyleSheet3.create({
|
|
|
1113
1181
|
acceptButtonText: {
|
|
1114
1182
|
color: "#ffffff"
|
|
1115
1183
|
},
|
|
1184
|
+
/**
|
|
1185
|
+
* The accept-all shortcut. Outlined rather than filled so the primary
|
|
1186
|
+
* "accept selected" action stays dominant, but tinted with the accent colour
|
|
1187
|
+
* so it still reads as an accept next to the neutral decline button.
|
|
1188
|
+
*/
|
|
1189
|
+
acceptSecondaryButton: {
|
|
1190
|
+
borderWidth: 1,
|
|
1191
|
+
borderColor: "#4f87ff",
|
|
1192
|
+
backgroundColor: "#ffffff"
|
|
1193
|
+
},
|
|
1194
|
+
acceptSecondaryButtonText: {
|
|
1195
|
+
color: "#4f87ff"
|
|
1196
|
+
},
|
|
1116
1197
|
cancelButton: {
|
|
1117
1198
|
borderWidth: 1,
|
|
1118
1199
|
borderColor: "#d0d5dd",
|
|
@@ -1192,9 +1273,6 @@ var styles2 = StyleSheet3.create({
|
|
|
1192
1273
|
fontSize: 14,
|
|
1193
1274
|
flex: 1
|
|
1194
1275
|
},
|
|
1195
|
-
requiredAsterisk: {
|
|
1196
|
-
color: "red"
|
|
1197
|
-
},
|
|
1198
1276
|
divider: {
|
|
1199
1277
|
height: 1,
|
|
1200
1278
|
backgroundColor: "#e5e7eb",
|
|
@@ -1259,6 +1337,24 @@ var styles2 = StyleSheet3.create({
|
|
|
1259
1337
|
}
|
|
1260
1338
|
});
|
|
1261
1339
|
|
|
1340
|
+
// src/RedactoNoticeConsent/utils/consentSelection.ts
|
|
1341
|
+
var dataElementKey = (purposeUuid, elementUuid) => `${purposeUuid}-${elementUuid}`;
|
|
1342
|
+
var buildSelectionForMode = (purposes, mode, current) => {
|
|
1343
|
+
if (mode === "selected") {
|
|
1344
|
+
return current;
|
|
1345
|
+
}
|
|
1346
|
+
const selectedPurposes = {};
|
|
1347
|
+
const selectedDataElements = {};
|
|
1348
|
+
purposes.forEach((purpose) => {
|
|
1349
|
+
selectedPurposes[purpose.uuid] = true;
|
|
1350
|
+
purpose.data_elements.forEach((element) => {
|
|
1351
|
+
selectedDataElements[dataElementKey(purpose.uuid, element.uuid)] = element.enabled;
|
|
1352
|
+
});
|
|
1353
|
+
});
|
|
1354
|
+
return { selectedPurposes, selectedDataElements };
|
|
1355
|
+
};
|
|
1356
|
+
var hasRequiredDataElement = (purpose) => purpose.data_elements.some((element) => element.required);
|
|
1357
|
+
|
|
1262
1358
|
// src/RedactoNoticeConsent/useResponsive.ts
|
|
1263
1359
|
import { useWindowDimensions } from "react-native";
|
|
1264
1360
|
var useResponsive = () => {
|
|
@@ -1271,13 +1367,13 @@ var useResponsive = () => {
|
|
|
1271
1367
|
};
|
|
1272
1368
|
|
|
1273
1369
|
// src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
|
|
1274
|
-
import { Fragment, jsx as
|
|
1370
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1275
1371
|
function RemoteLogo({ uri }) {
|
|
1276
1372
|
const isSvg = uri.toLowerCase().endsWith(".svg") || uri.toLowerCase().includes("image/svg");
|
|
1277
1373
|
if (isSvg && SvgUri) {
|
|
1278
|
-
return /* @__PURE__ */
|
|
1374
|
+
return /* @__PURE__ */ jsx4(SvgUri, { uri, width: 32, height: 32 });
|
|
1279
1375
|
}
|
|
1280
|
-
return /* @__PURE__ */
|
|
1376
|
+
return /* @__PURE__ */ jsx4(Image, { style: styles3.logo, source: { uri } });
|
|
1281
1377
|
}
|
|
1282
1378
|
function stripHtml(html) {
|
|
1283
1379
|
return html.replace(/<[^>]*>/g, "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/ /g, " ").trim();
|
|
@@ -1330,16 +1426,16 @@ var PurposeItem = ({
|
|
|
1330
1426
|
const headingColor = (settings == null ? void 0 : settings.headingColor) || "#323B4B";
|
|
1331
1427
|
const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
|
|
1332
1428
|
return /* @__PURE__ */ jsxs2(View3, { children: [
|
|
1333
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1429
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.optionItem, children: [
|
|
1334
1430
|
/* @__PURE__ */ jsxs2(
|
|
1335
1431
|
TouchableOpacity3,
|
|
1336
1432
|
{
|
|
1337
|
-
style:
|
|
1433
|
+
style: styles3.optionLeft,
|
|
1338
1434
|
onPress: () => onPurposeCollapse(purpose.uuid),
|
|
1339
1435
|
accessibilityRole: "button",
|
|
1340
1436
|
accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)} details`,
|
|
1341
1437
|
children: [
|
|
1342
|
-
/* @__PURE__ */
|
|
1438
|
+
/* @__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
1439
|
Path3,
|
|
1344
1440
|
{
|
|
1345
1441
|
d: "M1 1L6 6L1 11",
|
|
@@ -1350,25 +1446,28 @@ var PurposeItem = ({
|
|
|
1350
1446
|
transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
|
|
1351
1447
|
}
|
|
1352
1448
|
) }) }),
|
|
1353
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1354
|
-
/* @__PURE__ */
|
|
1355
|
-
|
|
1449
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.optionTextContainer, children: [
|
|
1450
|
+
/* @__PURE__ */ jsxs2(
|
|
1451
|
+
Text3,
|
|
1356
1452
|
{
|
|
1357
1453
|
style: [
|
|
1358
|
-
|
|
1454
|
+
styles3.optionTitle,
|
|
1359
1455
|
{ color: headingColor },
|
|
1360
|
-
activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ?
|
|
1456
|
+
activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ? styles3.ttsHighlight : null
|
|
1361
1457
|
],
|
|
1362
|
-
children:
|
|
1458
|
+
children: [
|
|
1459
|
+
getTranslatedText("purposes.name", purpose.name, purpose.uuid),
|
|
1460
|
+
hasRequiredDataElement(purpose) && /* @__PURE__ */ jsx4(RequiredMarker, {})
|
|
1461
|
+
]
|
|
1363
1462
|
}
|
|
1364
1463
|
),
|
|
1365
|
-
/* @__PURE__ */
|
|
1366
|
-
|
|
1464
|
+
/* @__PURE__ */ jsx4(
|
|
1465
|
+
Text3,
|
|
1367
1466
|
{
|
|
1368
1467
|
style: [
|
|
1369
|
-
|
|
1468
|
+
styles3.optionDescription,
|
|
1370
1469
|
{ color: textColor },
|
|
1371
|
-
activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ?
|
|
1470
|
+
activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ? styles3.ttsHighlight : null
|
|
1372
1471
|
],
|
|
1373
1472
|
children: getTranslatedText("purposes.description", purpose.description, purpose.uuid)
|
|
1374
1473
|
}
|
|
@@ -1377,7 +1476,7 @@ var PurposeItem = ({
|
|
|
1377
1476
|
]
|
|
1378
1477
|
}
|
|
1379
1478
|
),
|
|
1380
|
-
!isAlreadyConsented && /* @__PURE__ */
|
|
1479
|
+
!isAlreadyConsented && /* @__PURE__ */ jsx4(
|
|
1381
1480
|
Checkbox,
|
|
1382
1481
|
{
|
|
1383
1482
|
checked: selectedPurposes[purpose.uuid] || false,
|
|
@@ -1387,7 +1486,7 @@ var PurposeItem = ({
|
|
|
1387
1486
|
accessibilityLabel: `Select all data elements for ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`
|
|
1388
1487
|
}
|
|
1389
1488
|
),
|
|
1390
|
-
isAlreadyConsented && /* @__PURE__ */
|
|
1489
|
+
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
1490
|
Path3,
|
|
1392
1491
|
{
|
|
1393
1492
|
d: "M4 6L5.5 7.5L8.5 4.5",
|
|
@@ -1398,22 +1497,22 @@ var PurposeItem = ({
|
|
|
1398
1497
|
}
|
|
1399
1498
|
) }) })
|
|
1400
1499
|
] }),
|
|
1401
|
-
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */
|
|
1500
|
+
!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
1501
|
/* @__PURE__ */ jsxs2(
|
|
1403
|
-
|
|
1502
|
+
Text3,
|
|
1404
1503
|
{
|
|
1405
1504
|
style: [
|
|
1406
|
-
|
|
1505
|
+
styles3.dataElementText,
|
|
1407
1506
|
{ color: textColor },
|
|
1408
|
-
activeTTSSegmentKey === `element_${dataElement.uuid}` ?
|
|
1507
|
+
activeTTSSegmentKey === `element_${dataElement.uuid}` ? styles3.ttsHighlight : null
|
|
1409
1508
|
],
|
|
1410
1509
|
children: [
|
|
1411
1510
|
getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
|
|
1412
|
-
dataElement.required && /* @__PURE__ */
|
|
1511
|
+
dataElement.required && /* @__PURE__ */ jsx4(RequiredMarker, {})
|
|
1413
1512
|
]
|
|
1414
1513
|
}
|
|
1415
1514
|
),
|
|
1416
|
-
!isAlreadyConsented && /* @__PURE__ */
|
|
1515
|
+
!isAlreadyConsented && /* @__PURE__ */ jsx4(
|
|
1417
1516
|
Checkbox,
|
|
1418
1517
|
{
|
|
1419
1518
|
checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,
|
|
@@ -1425,7 +1524,7 @@ var PurposeItem = ({
|
|
|
1425
1524
|
),
|
|
1426
1525
|
isAlreadyConsented && (() => {
|
|
1427
1526
|
const wasSelected = initialDataElementSelections[`${purpose.uuid}-${dataElement.uuid}`] || false;
|
|
1428
|
-
return wasSelected ? /* @__PURE__ */
|
|
1527
|
+
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
1528
|
Path3,
|
|
1430
1529
|
{
|
|
1431
1530
|
d: "M3 5L4.5 6.5L7.5 3.5",
|
|
@@ -1434,7 +1533,7 @@ var PurposeItem = ({
|
|
|
1434
1533
|
strokeLinecap: "round",
|
|
1435
1534
|
strokeLinejoin: "round"
|
|
1436
1535
|
}
|
|
1437
|
-
) }) }) : /* @__PURE__ */
|
|
1536
|
+
) }) }) : /* @__PURE__ */ jsx4(View3, { style: styles3.notConsentedCircle });
|
|
1438
1537
|
})()
|
|
1439
1538
|
] }, dataElement.uuid)) })
|
|
1440
1539
|
] });
|
|
@@ -1446,47 +1545,47 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1446
1545
|
const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
|
|
1447
1546
|
const [showRelationshipDropdown, setShowRelationshipDropdown] = useState(false);
|
|
1448
1547
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1449
|
-
/* @__PURE__ */
|
|
1450
|
-
logoUrl ? /* @__PURE__ */
|
|
1451
|
-
/* @__PURE__ */
|
|
1548
|
+
/* @__PURE__ */ jsx4(View3, { style: styles3.topSection, children: /* @__PURE__ */ jsxs2(View3, { style: styles3.topLeft, children: [
|
|
1549
|
+
logoUrl ? /* @__PURE__ */ jsx4(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
|
|
1550
|
+
/* @__PURE__ */ jsx4(Text3, { style: [styles3.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Guardian Verification" })
|
|
1452
1551
|
] }) }),
|
|
1453
|
-
/* @__PURE__ */
|
|
1454
|
-
/* @__PURE__ */ jsxs2(ScrollView, { style:
|
|
1455
|
-
/* @__PURE__ */
|
|
1456
|
-
/* @__PURE__ */
|
|
1552
|
+
/* @__PURE__ */ jsx4(View3, { style: styles3.divider }),
|
|
1553
|
+
/* @__PURE__ */ jsxs2(ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
|
|
1554
|
+
/* @__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." }),
|
|
1555
|
+
/* @__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
1556
|
/* @__PURE__ */ jsxs2(View3, { style: { marginTop: 16, gap: 12 }, children: [
|
|
1458
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1459
|
-
/* @__PURE__ */ jsxs2(
|
|
1557
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.inputContainer, children: [
|
|
1558
|
+
/* @__PURE__ */ jsxs2(Text3, { style: [styles3.inputLabel, { color: textColor }], children: [
|
|
1460
1559
|
"Guardian's Full Name ",
|
|
1461
|
-
/* @__PURE__ */
|
|
1560
|
+
/* @__PURE__ */ jsx4(Text3, { style: { color: "red" }, children: "*" })
|
|
1462
1561
|
] }),
|
|
1463
|
-
/* @__PURE__ */
|
|
1562
|
+
/* @__PURE__ */ jsx4(
|
|
1464
1563
|
TextInput,
|
|
1465
1564
|
{
|
|
1466
1565
|
value: formData.guardianName,
|
|
1467
1566
|
onChangeText: (v) => onChange("guardianName", v),
|
|
1468
1567
|
style: [
|
|
1469
|
-
|
|
1568
|
+
styles3.textInput,
|
|
1470
1569
|
{ borderColor: errors.guardianName ? "#DC2626" : borderColor, color: textColor }
|
|
1471
1570
|
],
|
|
1472
1571
|
placeholder: "e.g. Rajesh Kumar",
|
|
1473
1572
|
placeholderTextColor: "#9CA3AF"
|
|
1474
1573
|
}
|
|
1475
1574
|
),
|
|
1476
|
-
errors.guardianName ? /* @__PURE__ */
|
|
1575
|
+
errors.guardianName ? /* @__PURE__ */ jsx4(Text3, { style: styles3.inputError, children: errors.guardianName }) : null
|
|
1477
1576
|
] }),
|
|
1478
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1479
|
-
/* @__PURE__ */ jsxs2(
|
|
1577
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.inputContainer, children: [
|
|
1578
|
+
/* @__PURE__ */ jsxs2(Text3, { style: [styles3.inputLabel, { color: textColor }], children: [
|
|
1480
1579
|
"Guardian's Phone Number ",
|
|
1481
|
-
/* @__PURE__ */
|
|
1580
|
+
/* @__PURE__ */ jsx4(Text3, { style: { color: "red" }, children: "*" })
|
|
1482
1581
|
] }),
|
|
1483
|
-
/* @__PURE__ */
|
|
1582
|
+
/* @__PURE__ */ jsx4(
|
|
1484
1583
|
TextInput,
|
|
1485
1584
|
{
|
|
1486
1585
|
value: formData.guardianContact,
|
|
1487
1586
|
onChangeText: (v) => onChange("guardianContact", v),
|
|
1488
1587
|
style: [
|
|
1489
|
-
|
|
1588
|
+
styles3.textInput,
|
|
1490
1589
|
{ borderColor: errors.guardianContact ? "#DC2626" : borderColor, color: textColor }
|
|
1491
1590
|
],
|
|
1492
1591
|
placeholder: "e.g. 9876543210",
|
|
@@ -1494,20 +1593,20 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1494
1593
|
keyboardType: "phone-pad"
|
|
1495
1594
|
}
|
|
1496
1595
|
),
|
|
1497
|
-
/* @__PURE__ */
|
|
1498
|
-
errors.guardianContact ? /* @__PURE__ */
|
|
1596
|
+
/* @__PURE__ */ jsx4(Text3, { style: { fontSize: 11, color: "#667085", marginTop: 4 }, children: "Mobile number linked to guardian's Aadhaar" }),
|
|
1597
|
+
errors.guardianContact ? /* @__PURE__ */ jsx4(Text3, { style: styles3.inputError, children: errors.guardianContact }) : null
|
|
1499
1598
|
] }),
|
|
1500
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1501
|
-
/* @__PURE__ */ jsxs2(
|
|
1599
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.inputContainer, children: [
|
|
1600
|
+
/* @__PURE__ */ jsxs2(Text3, { style: [styles3.inputLabel, { color: textColor }], children: [
|
|
1502
1601
|
"Relationship ",
|
|
1503
|
-
/* @__PURE__ */
|
|
1602
|
+
/* @__PURE__ */ jsx4(Text3, { style: { color: "red" }, children: "*" })
|
|
1504
1603
|
] }),
|
|
1505
1604
|
/* @__PURE__ */ jsxs2(View3, { style: { position: "relative" }, children: [
|
|
1506
1605
|
/* @__PURE__ */ jsxs2(
|
|
1507
1606
|
TouchableOpacity3,
|
|
1508
1607
|
{
|
|
1509
1608
|
style: [
|
|
1510
|
-
|
|
1609
|
+
styles3.textInput,
|
|
1511
1610
|
{
|
|
1512
1611
|
borderColor: errors.guardianRelationship ? "#DC2626" : borderColor,
|
|
1513
1612
|
flexDirection: "row",
|
|
@@ -1517,8 +1616,8 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1517
1616
|
],
|
|
1518
1617
|
onPress: () => setShowRelationshipDropdown((v) => !v),
|
|
1519
1618
|
children: [
|
|
1520
|
-
/* @__PURE__ */
|
|
1521
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ jsx4(Text3, { style: { color: formData.guardianRelationship ? textColor : "#9CA3AF", fontSize: 13 }, children: formData.guardianRelationship || "Select relationship" }),
|
|
1620
|
+
/* @__PURE__ */ jsx4(Svg3, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx4(
|
|
1522
1621
|
Path3,
|
|
1523
1622
|
{
|
|
1524
1623
|
d: "M4 6L8 10L12 6",
|
|
@@ -1531,7 +1630,7 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1531
1630
|
]
|
|
1532
1631
|
}
|
|
1533
1632
|
),
|
|
1534
|
-
showRelationshipDropdown && /* @__PURE__ */
|
|
1633
|
+
showRelationshipDropdown && /* @__PURE__ */ jsx4(View3, { style: guardianStyles.relationshipDropdown, children: RELATIONSHIP_OPTIONS.map((option) => /* @__PURE__ */ jsx4(
|
|
1535
1634
|
TouchableOpacity3,
|
|
1536
1635
|
{
|
|
1537
1636
|
style: [
|
|
@@ -1542,41 +1641,41 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1542
1641
|
onChange("guardianRelationship", option);
|
|
1543
1642
|
setShowRelationshipDropdown(false);
|
|
1544
1643
|
},
|
|
1545
|
-
children: /* @__PURE__ */
|
|
1644
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [guardianStyles.relationshipItemText, { color: textColor }], children: option })
|
|
1546
1645
|
},
|
|
1547
1646
|
option
|
|
1548
1647
|
)) })
|
|
1549
1648
|
] }),
|
|
1550
|
-
errors.guardianRelationship ? /* @__PURE__ */
|
|
1649
|
+
errors.guardianRelationship ? /* @__PURE__ */ jsx4(Text3, { style: styles3.inputError, children: errors.guardianRelationship }) : null
|
|
1551
1650
|
] }),
|
|
1552
|
-
errors.general ? /* @__PURE__ */
|
|
1651
|
+
errors.general ? /* @__PURE__ */ jsx4(View3, { style: styles3.errorContainer, children: /* @__PURE__ */ jsx4(Text3, { style: styles3.errorText, children: errors.general }) }) : null
|
|
1553
1652
|
] })
|
|
1554
1653
|
] }),
|
|
1555
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1556
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.bottomSection, children: [
|
|
1655
|
+
/* @__PURE__ */ jsx4(
|
|
1557
1656
|
TouchableOpacity3,
|
|
1558
1657
|
{
|
|
1559
1658
|
style: [
|
|
1560
|
-
|
|
1561
|
-
|
|
1659
|
+
styles3.button,
|
|
1660
|
+
styles3.acceptButton,
|
|
1562
1661
|
((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
|
|
1563
1662
|
],
|
|
1564
1663
|
onPress: onNext,
|
|
1565
1664
|
disabled: isSubmitting,
|
|
1566
1665
|
accessibilityLabel: "Submit guardian information and proceed",
|
|
1567
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
1568
|
-
|
|
1569
|
-
|
|
1666
|
+
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: [
|
|
1667
|
+
styles3.buttonText,
|
|
1668
|
+
styles3.acceptButtonText,
|
|
1570
1669
|
((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.accept) ? { color: settings.button.accept.textColor } : null
|
|
1571
1670
|
], children: "Verify via DigiLocker" })
|
|
1572
1671
|
}
|
|
1573
1672
|
),
|
|
1574
|
-
/* @__PURE__ */
|
|
1673
|
+
/* @__PURE__ */ jsx4(
|
|
1575
1674
|
TouchableOpacity3,
|
|
1576
1675
|
{
|
|
1577
1676
|
style: [
|
|
1578
|
-
|
|
1579
|
-
|
|
1677
|
+
styles3.button,
|
|
1678
|
+
styles3.cancelButton,
|
|
1580
1679
|
((_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.decline) ? {
|
|
1581
1680
|
backgroundColor: settings.button.decline.backgroundColor,
|
|
1582
1681
|
borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
|
|
@@ -1585,9 +1684,9 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1585
1684
|
onPress: onDecline,
|
|
1586
1685
|
disabled: isSubmitting,
|
|
1587
1686
|
accessibilityLabel: "Cancel guardian information form",
|
|
1588
|
-
children: /* @__PURE__ */
|
|
1589
|
-
|
|
1590
|
-
|
|
1687
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [
|
|
1688
|
+
styles3.buttonText,
|
|
1689
|
+
styles3.cancelButtonText,
|
|
1591
1690
|
((_f = settings == null ? void 0 : settings.button) == null ? void 0 : _f.decline) ? { color: settings.button.decline.textColor } : null
|
|
1592
1691
|
], children: "Cancel" })
|
|
1593
1692
|
}
|
|
@@ -1595,7 +1694,7 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1595
1694
|
] })
|
|
1596
1695
|
] });
|
|
1597
1696
|
};
|
|
1598
|
-
var guardianStyles =
|
|
1697
|
+
var guardianStyles = StyleSheet5.create({
|
|
1599
1698
|
infoBanner: {
|
|
1600
1699
|
backgroundColor: "#EFF6FF",
|
|
1601
1700
|
borderWidth: 1,
|
|
@@ -1638,42 +1737,42 @@ var guardianStyles = StyleSheet4.create({
|
|
|
1638
1737
|
var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
|
|
1639
1738
|
var _a, _b, _c, _d;
|
|
1640
1739
|
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1641
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1642
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1643
|
-
logoUrl ? /* @__PURE__ */
|
|
1644
|
-
/* @__PURE__ */
|
|
1740
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.topSection, children: [
|
|
1741
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.topLeft, children: [
|
|
1742
|
+
logoUrl ? /* @__PURE__ */ jsx4(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
|
|
1743
|
+
/* @__PURE__ */ jsx4(Text3, { style: [styles3.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Age Verification Required" })
|
|
1645
1744
|
] }),
|
|
1646
|
-
onClose ? /* @__PURE__ */
|
|
1745
|
+
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
1746
|
] }),
|
|
1648
|
-
/* @__PURE__ */
|
|
1649
|
-
/* @__PURE__ */ jsxs2(ScrollView, { style:
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ jsx4(View3, { style: styles3.divider }),
|
|
1748
|
+
/* @__PURE__ */ jsxs2(ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
|
|
1749
|
+
/* @__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." }),
|
|
1750
|
+
/* @__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
1751
|
] }),
|
|
1653
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
1654
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.bottomSection, children: [
|
|
1753
|
+
/* @__PURE__ */ jsx4(
|
|
1655
1754
|
TouchableOpacity3,
|
|
1656
1755
|
{
|
|
1657
1756
|
style: [
|
|
1658
|
-
|
|
1659
|
-
|
|
1757
|
+
styles3.button,
|
|
1758
|
+
styles3.acceptButton,
|
|
1660
1759
|
((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
|
|
1661
1760
|
],
|
|
1662
1761
|
onPress: onYes,
|
|
1663
1762
|
accessibilityLabel: "Yes, I am 18 or older",
|
|
1664
|
-
children: /* @__PURE__ */
|
|
1665
|
-
|
|
1666
|
-
|
|
1763
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [
|
|
1764
|
+
styles3.buttonText,
|
|
1765
|
+
styles3.acceptButtonText,
|
|
1667
1766
|
((_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.accept) ? { color: settings.button.accept.textColor } : null
|
|
1668
1767
|
], children: "Yes, I am 18 or older" })
|
|
1669
1768
|
}
|
|
1670
1769
|
),
|
|
1671
|
-
/* @__PURE__ */
|
|
1770
|
+
/* @__PURE__ */ jsx4(
|
|
1672
1771
|
TouchableOpacity3,
|
|
1673
1772
|
{
|
|
1674
1773
|
style: [
|
|
1675
|
-
|
|
1676
|
-
|
|
1774
|
+
styles3.button,
|
|
1775
|
+
styles3.cancelButton,
|
|
1677
1776
|
((_c = settings == null ? void 0 : settings.button) == null ? void 0 : _c.decline) ? {
|
|
1678
1777
|
backgroundColor: settings.button.decline.backgroundColor,
|
|
1679
1778
|
borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
|
|
@@ -1681,9 +1780,9 @@ var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
|
|
|
1681
1780
|
],
|
|
1682
1781
|
onPress: onNo,
|
|
1683
1782
|
accessibilityLabel: "No, I am under 18",
|
|
1684
|
-
children: /* @__PURE__ */
|
|
1685
|
-
|
|
1686
|
-
|
|
1783
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [
|
|
1784
|
+
styles3.buttonText,
|
|
1785
|
+
styles3.cancelButtonText,
|
|
1687
1786
|
((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.decline) ? { color: settings.button.decline.textColor } : null
|
|
1688
1787
|
], children: "No, I am under 18" })
|
|
1689
1788
|
}
|
|
@@ -1714,13 +1813,14 @@ var RedactoNoticeConsent = ({
|
|
|
1714
1813
|
includeFullyConsentedData = false,
|
|
1715
1814
|
reviewModeButtonText
|
|
1716
1815
|
}) => {
|
|
1717
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
1816
|
+
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
1817
|
const { isMobile } = useResponsive();
|
|
1719
1818
|
const sandboxParams = useMemo(
|
|
1720
1819
|
() => ({
|
|
1721
1820
|
token,
|
|
1722
1821
|
sandboxUcic: ucic,
|
|
1723
|
-
|
|
1822
|
+
sandboxEmail: email,
|
|
1823
|
+
sandboxMobile: mobile,
|
|
1724
1824
|
organisationUuid,
|
|
1725
1825
|
workspaceUuid
|
|
1726
1826
|
}),
|
|
@@ -1892,6 +1992,9 @@ var RedactoNoticeConsent = ({
|
|
|
1892
1992
|
confirm_button_text: data.detail.confirm_button_text_audio_url,
|
|
1893
1993
|
decline_button_text: data.detail.decline_button_text_audio_url
|
|
1894
1994
|
};
|
|
1995
|
+
if (data.detail.accept_all_button_text_audio_url) {
|
|
1996
|
+
urls.accept_all_button_text = data.detail.accept_all_button_text_audio_url;
|
|
1997
|
+
}
|
|
1895
1998
|
if (data.detail.privacy_center_anchor_text_audio_url) {
|
|
1896
1999
|
urls.privacy_center_anchor_text = data.detail.privacy_center_anchor_text_audio_url;
|
|
1897
2000
|
}
|
|
@@ -2101,6 +2204,7 @@ var RedactoNoticeConsent = ({
|
|
|
2101
2204
|
DPO_AUDIO_ELEMENT_MAP.forEach(({ elementId }) => {
|
|
2102
2205
|
pushSegment(elementId, ttsAudioUrls[elementId]);
|
|
2103
2206
|
});
|
|
2207
|
+
pushSegment("accept_all_button_text", ttsAudioUrls.accept_all_button_text);
|
|
2104
2208
|
pushSegment("confirm_button_text", ttsAudioUrls.confirm_button_text);
|
|
2105
2209
|
pushSegment("decline_button_text", ttsAudioUrls.decline_button_text);
|
|
2106
2210
|
if (queue.length === 0) {
|
|
@@ -2252,12 +2356,20 @@ var RedactoNoticeConsent = ({
|
|
|
2252
2356
|
return newState;
|
|
2253
2357
|
});
|
|
2254
2358
|
}, [content]);
|
|
2255
|
-
const handleAccept = useCallback(async () => {
|
|
2359
|
+
const handleAccept = useCallback(async (mode = "selected") => {
|
|
2256
2360
|
if (!content) return;
|
|
2257
2361
|
try {
|
|
2258
2362
|
setIsSubmitting(true);
|
|
2259
2363
|
setErrorMessage(null);
|
|
2260
2364
|
const activeConfig2 = content.detail.active_config;
|
|
2365
|
+
const selection = buildSelectionForMode(activeConfig2.purposes, mode, {
|
|
2366
|
+
selectedPurposes,
|
|
2367
|
+
selectedDataElements
|
|
2368
|
+
});
|
|
2369
|
+
if (mode !== "selected") {
|
|
2370
|
+
setSelectedPurposes(selection.selectedPurposes);
|
|
2371
|
+
setSelectedDataElements(selection.selectedDataElements);
|
|
2372
|
+
}
|
|
2261
2373
|
await submitConsentEvent({
|
|
2262
2374
|
accessToken,
|
|
2263
2375
|
baseUrl,
|
|
@@ -2265,10 +2377,10 @@ var RedactoNoticeConsent = ({
|
|
|
2265
2377
|
noticeUuid: activeConfig2.notice_uuid,
|
|
2266
2378
|
purposes: activeConfig2.purposes.map((purpose) => ({
|
|
2267
2379
|
...purpose,
|
|
2268
|
-
selected: selectedPurposes[purpose.uuid] || false,
|
|
2380
|
+
selected: selection.selectedPurposes[purpose.uuid] || false,
|
|
2269
2381
|
data_elements: purpose.data_elements.map((el) => ({
|
|
2270
2382
|
...el,
|
|
2271
|
-
selected: selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
|
|
2383
|
+
selected: selection.selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
|
|
2272
2384
|
}))
|
|
2273
2385
|
})),
|
|
2274
2386
|
declined: false,
|
|
@@ -2397,13 +2509,43 @@ var RedactoNoticeConsent = ({
|
|
|
2397
2509
|
}, [activeConfig, selectedDataElements]);
|
|
2398
2510
|
const acceptButtonStyle = { backgroundColor: acceptBackgroundColor };
|
|
2399
2511
|
const acceptButtonTextStyle = { color: acceptTextColor };
|
|
2512
|
+
const acceptAllButtonStyle = {
|
|
2513
|
+
backgroundColor: ((_j = (_i = settings == null ? void 0 : settings.button) == null ? void 0 : _i.acceptAll) == null ? void 0 : _j.backgroundColor) || acceptBackgroundColor
|
|
2514
|
+
};
|
|
2515
|
+
const acceptAllButtonTextStyle = {
|
|
2516
|
+
color: ((_l = (_k = settings == null ? void 0 : settings.button) == null ? void 0 : _k.acceptAll) == null ? void 0 : _l.textColor) || acceptTextColor
|
|
2517
|
+
};
|
|
2518
|
+
const acceptSelectedButtonStyle = {
|
|
2519
|
+
backgroundColor: "#ffffff",
|
|
2520
|
+
borderColor: accentColor
|
|
2521
|
+
};
|
|
2522
|
+
const acceptSelectedButtonTextStyle = { color: accentColor };
|
|
2400
2523
|
const declineButtonStyle = { backgroundColor: declineBackgroundColor, borderColor };
|
|
2401
2524
|
const declineButtonTextStyle = { color: declineTextColor };
|
|
2525
|
+
const acceptAllLabel = getTranslatedText(
|
|
2526
|
+
"accept_all_button_text",
|
|
2527
|
+
(activeConfig == null ? void 0 : activeConfig.accept_all_button_text) || DEFAULT_ACCEPT_ALL_BUTTON_TEXT
|
|
2528
|
+
);
|
|
2529
|
+
const acceptSelectedLabel = getTranslatedText(
|
|
2530
|
+
"confirm_button_text",
|
|
2531
|
+
(activeConfig == null ? void 0 : activeConfig.confirm_button_text) || DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT
|
|
2532
|
+
);
|
|
2533
|
+
const declineLabel = getTranslatedText(
|
|
2534
|
+
"decline_button_text",
|
|
2535
|
+
(activeConfig == null ? void 0 : activeConfig.decline_button_text) || DEFAULT_DECLINE_BUTTON_TEXT
|
|
2536
|
+
);
|
|
2537
|
+
const footerButtonOrder = isMobile ? ["acceptAll", "acceptSelected", "decline"] : ["decline", "acceptSelected", "acceptAll"];
|
|
2538
|
+
const widthStyle = isMobile ? styles3.stackButton : styles3.rowButton;
|
|
2539
|
+
const handleAcceptAll = useCallback(() => handleAccept("all"), [handleAccept]);
|
|
2540
|
+
const handleAcceptSelected = useCallback(
|
|
2541
|
+
() => handleAccept("selected"),
|
|
2542
|
+
[handleAccept]
|
|
2543
|
+
);
|
|
2402
2544
|
const modalBg = (settings == null ? void 0 : settings.backgroundColor) ? { backgroundColor: settings.backgroundColor } : {};
|
|
2403
2545
|
const translatedNoticeText = activeConfig ? stripHtml(getTranslatedText("notice_text", activeConfig.notice_text || "")) : "";
|
|
2404
2546
|
const translatedAdditionalText = activeConfig ? stripHtml(getTranslatedText("additional_text", activeConfig.additional_text || "")) : "";
|
|
2405
2547
|
if (!isVisible && !isLoading) return null;
|
|
2406
|
-
return /* @__PURE__ */
|
|
2548
|
+
return /* @__PURE__ */ jsx4(
|
|
2407
2549
|
Modal,
|
|
2408
2550
|
{
|
|
2409
2551
|
visible: isVisible || isLoading,
|
|
@@ -2411,27 +2553,27 @@ var RedactoNoticeConsent = ({
|
|
|
2411
2553
|
animationType: "fade",
|
|
2412
2554
|
onRequestClose: blockUI ? void 0 : handleDecline,
|
|
2413
2555
|
accessibilityViewIsModal: true,
|
|
2414
|
-
children: /* @__PURE__ */ jsxs2(View3, { style:
|
|
2415
|
-
isLanguageDropdownOpen && /* @__PURE__ */
|
|
2556
|
+
children: /* @__PURE__ */ jsxs2(View3, { style: styles3.overlay, children: [
|
|
2557
|
+
isLanguageDropdownOpen && /* @__PURE__ */ jsx4(
|
|
2416
2558
|
Pressable,
|
|
2417
2559
|
{
|
|
2418
|
-
style: [
|
|
2560
|
+
style: [StyleSheet5.absoluteFillObject, { zIndex: 1 }],
|
|
2419
2561
|
onPress: () => setIsLanguageDropdownOpen(false)
|
|
2420
2562
|
}
|
|
2421
2563
|
),
|
|
2422
|
-
/* @__PURE__ */
|
|
2564
|
+
/* @__PURE__ */ jsx4(
|
|
2423
2565
|
View3,
|
|
2424
2566
|
{
|
|
2425
2567
|
style: [
|
|
2426
|
-
|
|
2568
|
+
styles3.modal,
|
|
2427
2569
|
modalBg,
|
|
2428
2570
|
{ zIndex: 2 },
|
|
2429
2571
|
(settings == null ? void 0 : settings.borderRadius) ? { borderRadius: parseInt(settings.borderRadius, 10) } : null
|
|
2430
2572
|
],
|
|
2431
|
-
children: isLoading ? /* @__PURE__ */ jsxs2(View3, { style:
|
|
2432
|
-
/* @__PURE__ */
|
|
2433
|
-
/* @__PURE__ */
|
|
2434
|
-
] }) : showVerificationScreen ? /* @__PURE__ */
|
|
2573
|
+
children: isLoading ? /* @__PURE__ */ jsxs2(View3, { style: styles3.loadingContainer, children: [
|
|
2574
|
+
/* @__PURE__ */ jsx4(ActivityIndicator2, { size: "large", color: acceptBackgroundColor }),
|
|
2575
|
+
/* @__PURE__ */ jsx4(Text3, { style: styles3.loadingText, children: "Loading..." })
|
|
2576
|
+
] }) : showVerificationScreen ? /* @__PURE__ */ jsx4(View3, { style: styles3.content, children: /* @__PURE__ */ jsx4(
|
|
2435
2577
|
VerificationScreen,
|
|
2436
2578
|
{
|
|
2437
2579
|
status: verificationStatus,
|
|
@@ -2468,7 +2610,7 @@ var RedactoNoticeConsent = ({
|
|
|
2468
2610
|
}
|
|
2469
2611
|
}
|
|
2470
2612
|
}
|
|
2471
|
-
) }) : showGuardianForm ? /* @__PURE__ */
|
|
2613
|
+
) }) : showGuardianForm ? /* @__PURE__ */ jsx4(View3, { style: styles3.content, children: /* @__PURE__ */ jsx4(
|
|
2472
2614
|
GuardianForm,
|
|
2473
2615
|
{
|
|
2474
2616
|
formData: guardianFormData,
|
|
@@ -2495,7 +2637,7 @@ var RedactoNoticeConsent = ({
|
|
|
2495
2637
|
},
|
|
2496
2638
|
logoUrl
|
|
2497
2639
|
}
|
|
2498
|
-
) }) : showAgeVerification ? /* @__PURE__ */
|
|
2640
|
+
) }) : showAgeVerification ? /* @__PURE__ */ jsx4(View3, { style: styles3.content, children: /* @__PURE__ */ jsx4(
|
|
2499
2641
|
AgeVerification,
|
|
2500
2642
|
{
|
|
2501
2643
|
onYes: () => {
|
|
@@ -2523,22 +2665,22 @@ var RedactoNoticeConsent = ({
|
|
|
2523
2665
|
},
|
|
2524
2666
|
logoUrl
|
|
2525
2667
|
}
|
|
2526
|
-
) }) : /* @__PURE__ */ jsxs2(View3, { style:
|
|
2527
|
-
errorMessage ? /* @__PURE__ */ jsxs2(View3, { style:
|
|
2528
|
-
/* @__PURE__ */
|
|
2529
|
-
/* @__PURE__ */
|
|
2668
|
+
) }) : /* @__PURE__ */ jsxs2(View3, { style: styles3.content, children: [
|
|
2669
|
+
errorMessage ? /* @__PURE__ */ jsxs2(View3, { style: styles3.errorContainer, children: [
|
|
2670
|
+
/* @__PURE__ */ jsx4(Text3, { style: styles3.errorText, children: errorMessage }),
|
|
2671
|
+
/* @__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
2672
|
] }) : null,
|
|
2531
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
2532
|
-
/* @__PURE__ */ jsxs2(View3, { style:
|
|
2533
|
-
logoUrl ? /* @__PURE__ */
|
|
2534
|
-
/* @__PURE__ */
|
|
2535
|
-
|
|
2673
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.topSection, children: [
|
|
2674
|
+
/* @__PURE__ */ jsxs2(View3, { style: styles3.topLeft, children: [
|
|
2675
|
+
logoUrl ? /* @__PURE__ */ jsx4(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
|
|
2676
|
+
/* @__PURE__ */ jsx4(
|
|
2677
|
+
Text3,
|
|
2536
2678
|
{
|
|
2537
2679
|
style: [
|
|
2538
|
-
|
|
2680
|
+
styles3.title,
|
|
2539
2681
|
{ color: headingColor },
|
|
2540
2682
|
isMobile ? { fontSize: 16 } : null,
|
|
2541
|
-
activeTTSSegmentKey === "notice_banner_heading" ?
|
|
2683
|
+
activeTTSSegmentKey === "notice_banner_heading" ? styles3.ttsHighlight : null
|
|
2542
2684
|
],
|
|
2543
2685
|
numberOfLines: 2,
|
|
2544
2686
|
children: getTranslatedText(
|
|
@@ -2549,31 +2691,31 @@ var RedactoNoticeConsent = ({
|
|
|
2549
2691
|
)
|
|
2550
2692
|
] }),
|
|
2551
2693
|
/* @__PURE__ */ jsxs2(View3, { style: { flexDirection: "row", gap: 8, alignItems: "center" }, children: [
|
|
2552
|
-
isTTSAvailable && /* @__PURE__ */
|
|
2694
|
+
isTTSAvailable && /* @__PURE__ */ jsx4(
|
|
2553
2695
|
TouchableOpacity3,
|
|
2554
2696
|
{
|
|
2555
|
-
style: [
|
|
2697
|
+
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
2698
|
onPress: toggleAudio,
|
|
2557
2699
|
accessibilityLabel: isPlaying && !isPaused ? "Pause audio" : isPaused ? "Resume audio" : "Start audio",
|
|
2558
2700
|
children: isPlaying && !isPaused ? /* @__PURE__ */ jsxs2(Svg3, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
|
|
2559
|
-
/* @__PURE__ */
|
|
2560
|
-
/* @__PURE__ */
|
|
2701
|
+
/* @__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" }),
|
|
2702
|
+
/* @__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
2703
|
] }) : /* @__PURE__ */ jsxs2(Svg3, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
|
|
2562
|
-
/* @__PURE__ */
|
|
2704
|
+
/* @__PURE__ */ jsx4(
|
|
2563
2705
|
Path3,
|
|
2564
2706
|
{
|
|
2565
2707
|
d: "M11 5L6 9H2V15H6L11 19V5Z",
|
|
2566
|
-
stroke: ((
|
|
2708
|
+
stroke: ((_s = (_r = settings == null ? void 0 : settings.button) == null ? void 0 : _r.language) == null ? void 0 : _s.textColor) || "#344054",
|
|
2567
2709
|
strokeWidth: 2,
|
|
2568
2710
|
strokeLinecap: "round",
|
|
2569
2711
|
strokeLinejoin: "round"
|
|
2570
2712
|
}
|
|
2571
2713
|
),
|
|
2572
|
-
/* @__PURE__ */
|
|
2714
|
+
/* @__PURE__ */ jsx4(
|
|
2573
2715
|
Path3,
|
|
2574
2716
|
{
|
|
2575
2717
|
d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07",
|
|
2576
|
-
stroke: ((
|
|
2718
|
+
stroke: ((_u = (_t = settings == null ? void 0 : settings.button) == null ? void 0 : _t.language) == null ? void 0 : _u.textColor) || "#344054",
|
|
2577
2719
|
strokeWidth: 2,
|
|
2578
2720
|
strokeLinecap: "round",
|
|
2579
2721
|
strokeLinejoin: "round"
|
|
@@ -2582,23 +2724,23 @@ var RedactoNoticeConsent = ({
|
|
|
2582
2724
|
] })
|
|
2583
2725
|
}
|
|
2584
2726
|
),
|
|
2585
|
-
supportedLanguages.length > 0 && /* @__PURE__ */ jsxs2(View3, { style:
|
|
2727
|
+
supportedLanguages.length > 0 && /* @__PURE__ */ jsxs2(View3, { style: styles3.languageSelectorContainer, children: [
|
|
2586
2728
|
/* @__PURE__ */ jsxs2(
|
|
2587
2729
|
TouchableOpacity3,
|
|
2588
2730
|
{
|
|
2589
2731
|
style: [
|
|
2590
|
-
|
|
2591
|
-
((
|
|
2732
|
+
styles3.topRight,
|
|
2733
|
+
((_v = settings == null ? void 0 : settings.button) == null ? void 0 : _v.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
|
|
2592
2734
|
],
|
|
2593
2735
|
onPress: () => setIsLanguageDropdownOpen((v) => !v),
|
|
2594
2736
|
accessibilityLabel: `Select language. Current: ${selectedLanguage}`,
|
|
2595
2737
|
children: [
|
|
2596
|
-
/* @__PURE__ */
|
|
2597
|
-
/* @__PURE__ */
|
|
2738
|
+
/* @__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 }),
|
|
2739
|
+
/* @__PURE__ */ jsx4(Svg3, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx4(
|
|
2598
2740
|
Path3,
|
|
2599
2741
|
{
|
|
2600
2742
|
d: "M4 6L8 10L12 6",
|
|
2601
|
-
stroke: ((
|
|
2743
|
+
stroke: ((_y = (_x = settings == null ? void 0 : settings.button) == null ? void 0 : _x.language) == null ? void 0 : _y.textColor) || "#344054",
|
|
2602
2744
|
strokeWidth: 2,
|
|
2603
2745
|
strokeLinecap: "round",
|
|
2604
2746
|
strokeLinejoin: "round"
|
|
@@ -2607,23 +2749,23 @@ var RedactoNoticeConsent = ({
|
|
|
2607
2749
|
]
|
|
2608
2750
|
}
|
|
2609
2751
|
),
|
|
2610
|
-
isLanguageDropdownOpen && /* @__PURE__ */
|
|
2752
|
+
isLanguageDropdownOpen && /* @__PURE__ */ jsx4(View3, { style: styles3.languageDropdown, children: /* @__PURE__ */ jsx4(ScrollView, { children: supportedLanguages.map((lang) => /* @__PURE__ */ jsx4(
|
|
2611
2753
|
TouchableOpacity3,
|
|
2612
2754
|
{
|
|
2613
2755
|
style: [
|
|
2614
|
-
|
|
2615
|
-
lang === selectedLanguage ?
|
|
2756
|
+
styles3.languageItem,
|
|
2757
|
+
lang === selectedLanguage ? styles3.selectedLanguageItem : null
|
|
2616
2758
|
],
|
|
2617
2759
|
onPress: () => {
|
|
2618
2760
|
setSelectedLanguage(lang);
|
|
2619
2761
|
setIsLanguageDropdownOpen(false);
|
|
2620
2762
|
},
|
|
2621
|
-
children: /* @__PURE__ */
|
|
2622
|
-
|
|
2763
|
+
children: /* @__PURE__ */ jsx4(
|
|
2764
|
+
Text3,
|
|
2623
2765
|
{
|
|
2624
2766
|
style: [
|
|
2625
|
-
|
|
2626
|
-
lang === selectedLanguage ?
|
|
2767
|
+
styles3.languageItemText,
|
|
2768
|
+
lang === selectedLanguage ? styles3.selectedLanguageItemText : null
|
|
2627
2769
|
],
|
|
2628
2770
|
children: lang
|
|
2629
2771
|
}
|
|
@@ -2634,38 +2776,38 @@ var RedactoNoticeConsent = ({
|
|
|
2634
2776
|
] })
|
|
2635
2777
|
] })
|
|
2636
2778
|
] }),
|
|
2637
|
-
/* @__PURE__ */ jsxs2(ScrollView, { style:
|
|
2638
|
-
translatedNoticeText ? /* @__PURE__ */
|
|
2639
|
-
|
|
2779
|
+
/* @__PURE__ */ jsxs2(ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
|
|
2780
|
+
translatedNoticeText ? /* @__PURE__ */ jsx4(
|
|
2781
|
+
Text3,
|
|
2640
2782
|
{
|
|
2641
2783
|
style: [
|
|
2642
|
-
|
|
2784
|
+
styles3.privacyText,
|
|
2643
2785
|
{ color: textColor },
|
|
2644
|
-
activeTTSSegmentKey === "notice_text" ?
|
|
2786
|
+
activeTTSSegmentKey === "notice_text" ? styles3.ttsHighlight : null
|
|
2645
2787
|
],
|
|
2646
2788
|
children: translatedNoticeText
|
|
2647
2789
|
}
|
|
2648
2790
|
) : null,
|
|
2649
2791
|
(activeConfig == null ? void 0 : activeConfig.privacy_policy_url) ? /* @__PURE__ */ jsxs2(
|
|
2650
|
-
|
|
2792
|
+
Text3,
|
|
2651
2793
|
{
|
|
2652
2794
|
style: [
|
|
2653
|
-
|
|
2795
|
+
styles3.privacyText,
|
|
2654
2796
|
{ marginTop: 8 },
|
|
2655
2797
|
{ color: textColor }
|
|
2656
2798
|
],
|
|
2657
2799
|
children: [
|
|
2658
|
-
/* @__PURE__ */ jsxs2(
|
|
2800
|
+
/* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "privacy_policy_prefix_text" ? styles3.ttsHighlight : null, children: [
|
|
2659
2801
|
getTranslatedText("privacy_policy_prefix_text", activeConfig.privacy_policy_prefix_text || ""),
|
|
2660
2802
|
" "
|
|
2661
2803
|
] }),
|
|
2662
|
-
/* @__PURE__ */
|
|
2663
|
-
|
|
2804
|
+
/* @__PURE__ */ jsx4(
|
|
2805
|
+
Text3,
|
|
2664
2806
|
{
|
|
2665
2807
|
style: [
|
|
2666
|
-
|
|
2808
|
+
styles3.link,
|
|
2667
2809
|
{ color: linkColor },
|
|
2668
|
-
activeTTSSegmentKey === "privacy_policy_anchor_text" ?
|
|
2810
|
+
activeTTSSegmentKey === "privacy_policy_anchor_text" ? styles3.ttsHighlight : null
|
|
2669
2811
|
],
|
|
2670
2812
|
onPress: () => Linking.openURL(activeConfig.privacy_policy_url),
|
|
2671
2813
|
children: getTranslatedText("privacy_policy_anchor_text", activeConfig.privacy_policy_anchor_text || "Privacy Policy")
|
|
@@ -2674,23 +2816,23 @@ var RedactoNoticeConsent = ({
|
|
|
2674
2816
|
]
|
|
2675
2817
|
}
|
|
2676
2818
|
) : null,
|
|
2677
|
-
(activeConfig == null ? void 0 : activeConfig.purposes) && activeConfig.purposes.length > 0 ? /* @__PURE__ */
|
|
2678
|
-
|
|
2819
|
+
(activeConfig == null ? void 0 : activeConfig.purposes) && activeConfig.purposes.length > 0 ? /* @__PURE__ */ jsx4(
|
|
2820
|
+
Text3,
|
|
2679
2821
|
{
|
|
2680
2822
|
style: [
|
|
2681
|
-
|
|
2823
|
+
styles3.subTitle,
|
|
2682
2824
|
{ marginTop: 16, marginBottom: 8 },
|
|
2683
2825
|
{ color: headingColor },
|
|
2684
|
-
activeTTSSegmentKey === "purpose_section_heading" ?
|
|
2826
|
+
activeTTSSegmentKey === "purpose_section_heading" ? styles3.ttsHighlight : null
|
|
2685
2827
|
],
|
|
2686
2828
|
children: getTranslatedText("purpose_section_heading", activeConfig.purpose_section_heading || "Data Purposes")
|
|
2687
2829
|
}
|
|
2688
2830
|
) : null,
|
|
2689
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ jsx4(View3, { style: styles3.optionsContainer, children: activeConfig == null ? void 0 : activeConfig.purposes.map((purpose) => {
|
|
2690
2832
|
var _a2;
|
|
2691
2833
|
const purposeSelection = (_a2 = content == null ? void 0 : content.detail.purpose_selections) == null ? void 0 : _a2[purpose.uuid];
|
|
2692
2834
|
const isAlreadyConsented = !isReconsentMode && ((purposeSelection == null ? void 0 : purposeSelection.selected) || false) && !(purposeSelection == null ? void 0 : purposeSelection.needs_reconsent);
|
|
2693
|
-
return /* @__PURE__ */
|
|
2835
|
+
return /* @__PURE__ */ jsx4(
|
|
2694
2836
|
PurposeItem,
|
|
2695
2837
|
{
|
|
2696
2838
|
purpose,
|
|
@@ -2723,19 +2865,19 @@ var RedactoNoticeConsent = ({
|
|
|
2723
2865
|
}
|
|
2724
2866
|
return fallback;
|
|
2725
2867
|
};
|
|
2726
|
-
return /* @__PURE__ */
|
|
2727
|
-
translatedAdditionalText ? /* @__PURE__ */ jsxs2(
|
|
2868
|
+
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: [
|
|
2869
|
+
translatedAdditionalText ? /* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "additional_text" ? styles3.ttsHighlight : null, children: [
|
|
2728
2870
|
translatedAdditionalText,
|
|
2729
2871
|
" "
|
|
2730
2872
|
] }) : null,
|
|
2731
2873
|
(activeConfig == null ? void 0 : activeConfig.privacy_center_url) ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2732
|
-
/* @__PURE__ */
|
|
2733
|
-
|
|
2874
|
+
/* @__PURE__ */ jsx4(
|
|
2875
|
+
Text3,
|
|
2734
2876
|
{
|
|
2735
2877
|
style: [
|
|
2736
|
-
|
|
2878
|
+
styles3.link,
|
|
2737
2879
|
{ color: linkColor },
|
|
2738
|
-
activeTTSSegmentKey === "privacy_center_anchor_text" ?
|
|
2880
|
+
activeTTSSegmentKey === "privacy_center_anchor_text" ? styles3.ttsHighlight : null
|
|
2739
2881
|
],
|
|
2740
2882
|
onPress: () => Linking.openURL(activeConfig.privacy_center_url),
|
|
2741
2883
|
children: getTranslatedText("privacy_center_anchor_text", activeConfig.privacy_center_anchor_text || "Privacy Center")
|
|
@@ -2744,17 +2886,17 @@ var RedactoNoticeConsent = ({
|
|
|
2744
2886
|
".\n"
|
|
2745
2887
|
] }) : null,
|
|
2746
2888
|
(dpo == null ? void 0 : dpo.grievance_text) ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2747
|
-
/* @__PURE__ */ jsxs2(
|
|
2889
|
+
/* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "dpo-grievance-text" ? styles3.ttsHighlight : null, children: [
|
|
2748
2890
|
getT("grievance_text", dpo.grievance_text),
|
|
2749
2891
|
" "
|
|
2750
2892
|
] }),
|
|
2751
|
-
/* @__PURE__ */
|
|
2752
|
-
|
|
2893
|
+
/* @__PURE__ */ jsx4(
|
|
2894
|
+
Text3,
|
|
2753
2895
|
{
|
|
2754
2896
|
style: [
|
|
2755
|
-
|
|
2897
|
+
styles3.link,
|
|
2756
2898
|
{ color: linkColor },
|
|
2757
|
-
activeTTSSegmentKey === "dpo-grievance-link" ?
|
|
2899
|
+
activeTTSSegmentKey === "dpo-grievance-link" ? styles3.ttsHighlight : null
|
|
2758
2900
|
],
|
|
2759
2901
|
onPress: () => Linking.openURL(dpo.grievance_url),
|
|
2760
2902
|
children: getT("grievance_anchor_text", dpo.grievance_anchor_text)
|
|
@@ -2762,15 +2904,15 @@ var RedactoNoticeConsent = ({
|
|
|
2762
2904
|
),
|
|
2763
2905
|
dpo.grievance_email ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2764
2906
|
" ",
|
|
2765
|
-
/* @__PURE__ */
|
|
2907
|
+
/* @__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
2908
|
" ",
|
|
2767
|
-
/* @__PURE__ */
|
|
2768
|
-
|
|
2909
|
+
/* @__PURE__ */ jsx4(
|
|
2910
|
+
Text3,
|
|
2769
2911
|
{
|
|
2770
2912
|
style: [
|
|
2771
|
-
|
|
2913
|
+
styles3.link,
|
|
2772
2914
|
{ color: linkColor },
|
|
2773
|
-
activeTTSSegmentKey === "dpo-grievance-email" ?
|
|
2915
|
+
activeTTSSegmentKey === "dpo-grievance-email" ? styles3.ttsHighlight : null
|
|
2774
2916
|
],
|
|
2775
2917
|
onPress: () => Linking.openURL(`mailto:${dpo.grievance_email}`),
|
|
2776
2918
|
children: dpo.grievance_email
|
|
@@ -2780,17 +2922,17 @@ var RedactoNoticeConsent = ({
|
|
|
2780
2922
|
"\n"
|
|
2781
2923
|
] }) : null,
|
|
2782
2924
|
(dpo == null ? void 0 : dpo.dp_board_text) ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2783
|
-
/* @__PURE__ */ jsxs2(
|
|
2925
|
+
/* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "dpo-dp-board-text" ? styles3.ttsHighlight : null, children: [
|
|
2784
2926
|
getT("dp_board_text", dpo.dp_board_text),
|
|
2785
2927
|
" "
|
|
2786
2928
|
] }),
|
|
2787
|
-
/* @__PURE__ */
|
|
2788
|
-
|
|
2929
|
+
/* @__PURE__ */ jsx4(
|
|
2930
|
+
Text3,
|
|
2789
2931
|
{
|
|
2790
2932
|
style: [
|
|
2791
|
-
|
|
2933
|
+
styles3.link,
|
|
2792
2934
|
{ color: linkColor },
|
|
2793
|
-
activeTTSSegmentKey === "dpo-dp-board-link" ?
|
|
2935
|
+
activeTTSSegmentKey === "dpo-dp-board-link" ? styles3.ttsHighlight : null
|
|
2794
2936
|
],
|
|
2795
2937
|
onPress: () => Linking.openURL(dpo.dp_board_url),
|
|
2796
2938
|
children: getT("dp_board_anchor_text", dpo.dp_board_anchor_text)
|
|
@@ -2799,17 +2941,17 @@ var RedactoNoticeConsent = ({
|
|
|
2799
2941
|
"\n"
|
|
2800
2942
|
] }) : null,
|
|
2801
2943
|
(dpo == null ? void 0 : dpo.dpo_text) ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
2802
|
-
/* @__PURE__ */ jsxs2(
|
|
2944
|
+
/* @__PURE__ */ jsxs2(Text3, { style: activeTTSSegmentKey === "dpo-dpo-text" ? styles3.ttsHighlight : null, children: [
|
|
2803
2945
|
getT("dpo_text", dpo.dpo_text),
|
|
2804
2946
|
" "
|
|
2805
2947
|
] }),
|
|
2806
|
-
/* @__PURE__ */
|
|
2807
|
-
|
|
2948
|
+
/* @__PURE__ */ jsx4(
|
|
2949
|
+
Text3,
|
|
2808
2950
|
{
|
|
2809
2951
|
style: [
|
|
2810
|
-
|
|
2952
|
+
styles3.link,
|
|
2811
2953
|
{ color: linkColor },
|
|
2812
|
-
activeTTSSegmentKey === "dpo-dpo-link" ?
|
|
2954
|
+
activeTTSSegmentKey === "dpo-dpo-link" ? styles3.ttsHighlight : null
|
|
2813
2955
|
],
|
|
2814
2956
|
onPress: () => Linking.openURL(dpo.dpo_url),
|
|
2815
2957
|
children: getT("dpo_anchor_text", dpo.dpo_anchor_text)
|
|
@@ -2819,62 +2961,114 @@ var RedactoNoticeConsent = ({
|
|
|
2819
2961
|
] }) });
|
|
2820
2962
|
})() : null
|
|
2821
2963
|
] }),
|
|
2822
|
-
/* @__PURE__ */
|
|
2823
|
-
|
|
2964
|
+
/* @__PURE__ */ jsx4(
|
|
2965
|
+
View3,
|
|
2824
2966
|
{
|
|
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
|
-
|
|
2967
|
+
style: isReviewMode ? styles3.bottomSection : isMobile ? styles3.actionButtonStack : styles3.actionButtonRow,
|
|
2968
|
+
children: isReviewMode ? /* @__PURE__ */ jsx4(
|
|
2969
|
+
TouchableOpacity3,
|
|
2970
|
+
{
|
|
2971
|
+
style: [styles3.button, styles3.acceptButton, acceptButtonStyle],
|
|
2972
|
+
onPress: () => setIsReviewMode(false),
|
|
2973
|
+
children: /* @__PURE__ */ jsx4(Text3, { style: [styles3.buttonText, styles3.acceptButtonText, acceptButtonTextStyle], children: reviewModeButtonText || "Update Consent" })
|
|
2974
|
+
}
|
|
2975
|
+
) : (
|
|
2976
|
+
/* Rendered in a different order per breakpoint rather than
|
|
2977
|
+
reordered with styles, so focus order follows visual order. */
|
|
2978
|
+
footerButtonOrder.map((slot) => {
|
|
2979
|
+
if (slot === "acceptAll") {
|
|
2980
|
+
return /* @__PURE__ */ jsx4(
|
|
2981
|
+
TouchableOpacity3,
|
|
2982
|
+
{
|
|
2983
|
+
style: [
|
|
2984
|
+
styles3.button,
|
|
2985
|
+
widthStyle,
|
|
2986
|
+
styles3.acceptButton,
|
|
2987
|
+
acceptAllButtonStyle,
|
|
2988
|
+
isSubmitting ? { opacity: 0.5 } : null
|
|
2989
|
+
],
|
|
2990
|
+
onPress: handleAcceptAll,
|
|
2991
|
+
disabled: isSubmitting,
|
|
2992
|
+
accessibilityLabel: acceptAllLabel,
|
|
2993
|
+
children: /* @__PURE__ */ jsx4(
|
|
2994
|
+
Text3,
|
|
2995
|
+
{
|
|
2996
|
+
style: [
|
|
2997
|
+
styles3.buttonText,
|
|
2998
|
+
styles3.acceptButtonText,
|
|
2999
|
+
acceptAllButtonTextStyle,
|
|
3000
|
+
activeTTSSegmentKey === "accept_all_button_text" ? styles3.ttsHighlight : null
|
|
3001
|
+
],
|
|
3002
|
+
children: acceptAllLabel
|
|
3003
|
+
}
|
|
3004
|
+
)
|
|
3005
|
+
},
|
|
3006
|
+
slot
|
|
3007
|
+
);
|
|
2852
3008
|
}
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
3009
|
+
if (slot === "acceptSelected") {
|
|
3010
|
+
return /* @__PURE__ */ jsx4(
|
|
3011
|
+
TouchableOpacity3,
|
|
3012
|
+
{
|
|
3013
|
+
style: [
|
|
3014
|
+
styles3.button,
|
|
3015
|
+
widthStyle,
|
|
3016
|
+
styles3.acceptSecondaryButton,
|
|
3017
|
+
acceptSelectedButtonStyle,
|
|
3018
|
+
isSubmitting || !areAllRequiredElementsChecked ? { opacity: 0.5 } : null
|
|
3019
|
+
],
|
|
3020
|
+
onPress: handleAcceptSelected,
|
|
3021
|
+
disabled: isSubmitting || !areAllRequiredElementsChecked,
|
|
3022
|
+
accessibilityLabel: isSubmitting ? "Submitting consent" : acceptSelectedLabel,
|
|
3023
|
+
children: isSubmitting ? /* @__PURE__ */ jsx4(ActivityIndicator2, { size: "small", color: accentColor }) : /* @__PURE__ */ jsx4(
|
|
3024
|
+
Text3,
|
|
3025
|
+
{
|
|
3026
|
+
style: [
|
|
3027
|
+
styles3.buttonText,
|
|
3028
|
+
styles3.acceptSecondaryButtonText,
|
|
3029
|
+
acceptSelectedButtonTextStyle,
|
|
3030
|
+
activeTTSSegmentKey === "confirm_button_text" ? styles3.ttsHighlight : null
|
|
3031
|
+
],
|
|
3032
|
+
children: acceptSelectedLabel
|
|
3033
|
+
}
|
|
3034
|
+
)
|
|
3035
|
+
},
|
|
3036
|
+
slot
|
|
3037
|
+
);
|
|
2873
3038
|
}
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
3039
|
+
return /* @__PURE__ */ jsx4(
|
|
3040
|
+
TouchableOpacity3,
|
|
3041
|
+
{
|
|
3042
|
+
style: [
|
|
3043
|
+
styles3.button,
|
|
3044
|
+
widthStyle,
|
|
3045
|
+
styles3.cancelButton,
|
|
3046
|
+
declineButtonStyle,
|
|
3047
|
+
isMobile ? null : styles3.declineSpacer,
|
|
3048
|
+
isSubmitting ? { opacity: 0.5 } : null
|
|
3049
|
+
],
|
|
3050
|
+
onPress: handleDecline,
|
|
3051
|
+
disabled: isSubmitting,
|
|
3052
|
+
accessibilityLabel: declineLabel,
|
|
3053
|
+
children: /* @__PURE__ */ jsx4(
|
|
3054
|
+
Text3,
|
|
3055
|
+
{
|
|
3056
|
+
style: [
|
|
3057
|
+
styles3.buttonText,
|
|
3058
|
+
styles3.cancelButtonText,
|
|
3059
|
+
declineButtonTextStyle,
|
|
3060
|
+
activeTTSSegmentKey === "decline_button_text" ? styles3.ttsHighlight : null
|
|
3061
|
+
],
|
|
3062
|
+
children: declineLabel
|
|
3063
|
+
}
|
|
3064
|
+
)
|
|
3065
|
+
},
|
|
3066
|
+
slot
|
|
3067
|
+
);
|
|
3068
|
+
})
|
|
3069
|
+
)
|
|
3070
|
+
}
|
|
3071
|
+
)
|
|
2878
3072
|
] })
|
|
2879
3073
|
}
|
|
2880
3074
|
)
|
|
@@ -2895,7 +3089,7 @@ import {
|
|
|
2895
3089
|
import {
|
|
2896
3090
|
ActivityIndicator as ActivityIndicator3,
|
|
2897
3091
|
ScrollView as ScrollView2,
|
|
2898
|
-
Text as
|
|
3092
|
+
Text as Text4,
|
|
2899
3093
|
TouchableOpacity as TouchableOpacity4,
|
|
2900
3094
|
View as View4
|
|
2901
3095
|
} from "react-native";
|
|
@@ -3064,8 +3258,8 @@ var fetchNoticeConsentStatusForScope = async ({
|
|
|
3064
3258
|
var isNoticeFullyConsented = (status) => status.consented && status.all_mandatory_active;
|
|
3065
3259
|
|
|
3066
3260
|
// src/RedactoNoticeConsentInline/styles.ts
|
|
3067
|
-
import { StyleSheet as
|
|
3068
|
-
var
|
|
3261
|
+
import { StyleSheet as StyleSheet6, Platform as Platform2 } from "react-native";
|
|
3262
|
+
var styles4 = StyleSheet6.create({
|
|
3069
3263
|
container: {
|
|
3070
3264
|
width: "100%",
|
|
3071
3265
|
borderRadius: 8,
|
|
@@ -3265,9 +3459,6 @@ var styles3 = StyleSheet5.create({
|
|
|
3265
3459
|
color: "#DC2626",
|
|
3266
3460
|
fontSize: 14
|
|
3267
3461
|
},
|
|
3268
|
-
requiredAsterisk: {
|
|
3269
|
-
color: "red"
|
|
3270
|
-
},
|
|
3271
3462
|
purposeChevron: {
|
|
3272
3463
|
marginLeft: 5,
|
|
3273
3464
|
alignItems: "center",
|
|
@@ -3319,7 +3510,7 @@ var styles3 = StyleSheet5.create({
|
|
|
3319
3510
|
});
|
|
3320
3511
|
|
|
3321
3512
|
// src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
|
|
3322
|
-
import { jsx as
|
|
3513
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
3323
3514
|
var RedactoConsentInlineComponent = ({
|
|
3324
3515
|
org_uuid,
|
|
3325
3516
|
workspace_uuid,
|
|
@@ -3630,28 +3821,28 @@ var RedactoConsentInlineComponent = ({
|
|
|
3630
3821
|
);
|
|
3631
3822
|
if (hasAlreadyConsented || fetchError) return null;
|
|
3632
3823
|
if (isLoading) {
|
|
3633
|
-
return /* @__PURE__ */ jsxs3(View4, { style:
|
|
3634
|
-
/* @__PURE__ */
|
|
3635
|
-
/* @__PURE__ */
|
|
3824
|
+
return /* @__PURE__ */ jsxs3(View4, { style: styles4.loadingContainer, children: [
|
|
3825
|
+
/* @__PURE__ */ jsx5(ActivityIndicator3, { size: "large", color: "#4f87ff" }),
|
|
3826
|
+
/* @__PURE__ */ jsx5(Text4, { style: [styles4.loadingText, { color: textColor }], children: "Loading..." })
|
|
3636
3827
|
] });
|
|
3637
3828
|
}
|
|
3638
3829
|
if (!content) return null;
|
|
3639
3830
|
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:
|
|
3831
|
+
errorMessage ? /* @__PURE__ */ jsx5(View4, { style: styles4.errorContainer, children: /* @__PURE__ */ jsx5(Text4, { style: styles4.errorText, children: errorMessage }) }) : null,
|
|
3832
|
+
supportedLanguages.length > 0 && /* @__PURE__ */ jsxs3(View4, { style: [styles4.topSection, { borderBottomWidth: 0, paddingBottom: 0 }], children: [
|
|
3833
|
+
/* @__PURE__ */ jsx5(View4, {}),
|
|
3834
|
+
/* @__PURE__ */ jsxs3(View4, { style: styles4.languageSelectorContainer, children: [
|
|
3644
3835
|
/* @__PURE__ */ jsxs3(
|
|
3645
3836
|
TouchableOpacity4,
|
|
3646
3837
|
{
|
|
3647
3838
|
style: [
|
|
3648
|
-
|
|
3839
|
+
styles4.topRight,
|
|
3649
3840
|
((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
|
|
3650
3841
|
],
|
|
3651
3842
|
onPress: () => setIsLanguageDropdownOpen((v) => !v),
|
|
3652
3843
|
children: [
|
|
3653
|
-
/* @__PURE__ */
|
|
3654
|
-
/* @__PURE__ */
|
|
3844
|
+
/* @__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 }),
|
|
3845
|
+
/* @__PURE__ */ jsx5(Svg4, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx5(
|
|
3655
3846
|
Path4,
|
|
3656
3847
|
{
|
|
3657
3848
|
d: "M4 6L8 10L12 6",
|
|
@@ -3664,34 +3855,34 @@ var RedactoConsentInlineComponent = ({
|
|
|
3664
3855
|
]
|
|
3665
3856
|
}
|
|
3666
3857
|
),
|
|
3667
|
-
isLanguageDropdownOpen && /* @__PURE__ */
|
|
3858
|
+
isLanguageDropdownOpen && /* @__PURE__ */ jsx5(View4, { style: styles4.languageDropdown, children: /* @__PURE__ */ jsx5(ScrollView2, { children: supportedLanguages.map((lang) => /* @__PURE__ */ jsx5(
|
|
3668
3859
|
TouchableOpacity4,
|
|
3669
3860
|
{
|
|
3670
3861
|
style: [
|
|
3671
|
-
|
|
3672
|
-
lang === selectedLanguage ?
|
|
3862
|
+
styles4.languageItem,
|
|
3863
|
+
lang === selectedLanguage ? styles4.selectedLanguageItem : null
|
|
3673
3864
|
],
|
|
3674
3865
|
onPress: () => {
|
|
3675
3866
|
setSelectedLanguage(lang);
|
|
3676
3867
|
setIsLanguageDropdownOpen(false);
|
|
3677
3868
|
},
|
|
3678
|
-
children: /* @__PURE__ */
|
|
3869
|
+
children: /* @__PURE__ */ jsx5(Text4, { style: [styles4.languageItemText, lang === selectedLanguage ? styles4.selectedLanguageItemText : null], children: lang })
|
|
3679
3870
|
},
|
|
3680
3871
|
lang
|
|
3681
3872
|
)) }) })
|
|
3682
3873
|
] })
|
|
3683
3874
|
] }),
|
|
3684
3875
|
content.purposes.map((purpose) => /* @__PURE__ */ jsxs3(View4, { children: [
|
|
3685
|
-
/* @__PURE__ */ jsxs3(View4, { style:
|
|
3876
|
+
/* @__PURE__ */ jsxs3(View4, { style: styles4.optionItem, children: [
|
|
3686
3877
|
/* @__PURE__ */ jsxs3(
|
|
3687
3878
|
TouchableOpacity4,
|
|
3688
3879
|
{
|
|
3689
|
-
style:
|
|
3880
|
+
style: styles4.optionLeft,
|
|
3690
3881
|
onPress: () => togglePurposeCollapse(purpose.uuid),
|
|
3691
3882
|
accessibilityRole: "button",
|
|
3692
3883
|
accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`,
|
|
3693
3884
|
children: [
|
|
3694
|
-
/* @__PURE__ */
|
|
3885
|
+
/* @__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
3886
|
Path4,
|
|
3696
3887
|
{
|
|
3697
3888
|
d: "M1 1L6 6L1 11",
|
|
@@ -3702,14 +3893,17 @@ var RedactoConsentInlineComponent = ({
|
|
|
3702
3893
|
transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
|
|
3703
3894
|
}
|
|
3704
3895
|
) }) }),
|
|
3705
|
-
/* @__PURE__ */ jsxs3(View4, { style:
|
|
3706
|
-
/* @__PURE__ */
|
|
3707
|
-
|
|
3896
|
+
/* @__PURE__ */ jsxs3(View4, { style: styles4.optionTextContainer, children: [
|
|
3897
|
+
/* @__PURE__ */ jsxs3(Text4, { style: [styles4.optionTitle, { color: headingColor }, isMobile ? { fontSize: 14 } : null], children: [
|
|
3898
|
+
getTranslatedText("purposes.name", purpose.name, purpose.uuid),
|
|
3899
|
+
hasRequiredDataElement(purpose) && /* @__PURE__ */ jsx5(RequiredMarker, {})
|
|
3900
|
+
] }),
|
|
3901
|
+
/* @__PURE__ */ jsx5(Text4, { style: [styles4.optionDescription, { color: textColor }, isMobile ? { fontSize: 11 } : null], children: getTranslatedText("purposes.description", purpose.description, purpose.uuid) })
|
|
3708
3902
|
] })
|
|
3709
3903
|
]
|
|
3710
3904
|
}
|
|
3711
3905
|
),
|
|
3712
|
-
/* @__PURE__ */
|
|
3906
|
+
/* @__PURE__ */ jsx5(
|
|
3713
3907
|
Checkbox,
|
|
3714
3908
|
{
|
|
3715
3909
|
checked: selectedPurposes[purpose.uuid] || false,
|
|
@@ -3720,12 +3914,12 @@ var RedactoConsentInlineComponent = ({
|
|
|
3720
3914
|
}
|
|
3721
3915
|
)
|
|
3722
3916
|
] }),
|
|
3723
|
-
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */
|
|
3724
|
-
/* @__PURE__ */ jsxs3(
|
|
3917
|
+
!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: [
|
|
3918
|
+
/* @__PURE__ */ jsxs3(Text4, { style: [styles4.dataElementText, { color: textColor }, isMobile ? { fontSize: 12 } : null], children: [
|
|
3725
3919
|
getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
|
|
3726
|
-
dataElement.required && /* @__PURE__ */
|
|
3920
|
+
dataElement.required && /* @__PURE__ */ jsx5(RequiredMarker, {})
|
|
3727
3921
|
] }),
|
|
3728
|
-
/* @__PURE__ */
|
|
3922
|
+
/* @__PURE__ */ jsx5(
|
|
3729
3923
|
Checkbox,
|
|
3730
3924
|
{
|
|
3731
3925
|
checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,
|