@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.js
CHANGED
|
@@ -37,7 +37,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
37
37
|
|
|
38
38
|
// src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
|
|
39
39
|
var import_react2 = require("react");
|
|
40
|
-
var
|
|
40
|
+
var import_react_native6 = require("react-native");
|
|
41
41
|
var import_react_native_svg3 = __toESM(require("react-native-svg"));
|
|
42
42
|
|
|
43
43
|
// src/RedactoNoticeConsent/api/index.ts
|
|
@@ -48,7 +48,7 @@ var SANDBOX_TOKEN_HEADER = "X-Consent-Token";
|
|
|
48
48
|
|
|
49
49
|
// src/RedactoNoticeConsent/api/sandbox.ts
|
|
50
50
|
var resolveSandboxAuth = (params) => {
|
|
51
|
-
var _a, _b, _c, _d, _e;
|
|
51
|
+
var _a, _b, _c, _d, _e, _f;
|
|
52
52
|
const token = (_a = params.token) == null ? void 0 : _a.trim();
|
|
53
53
|
if (!token) {
|
|
54
54
|
return null;
|
|
@@ -56,16 +56,17 @@ var resolveSandboxAuth = (params) => {
|
|
|
56
56
|
const organisationUuid = (_b = params.organisationUuid) == null ? void 0 : _b.trim();
|
|
57
57
|
const workspaceUuid = (_c = params.workspaceUuid) == null ? void 0 : _c.trim();
|
|
58
58
|
const ucic = (_d = params.sandboxUcic) == null ? void 0 : _d.trim();
|
|
59
|
-
const
|
|
59
|
+
const email = (_e = params.sandboxEmail) == null ? void 0 : _e.trim();
|
|
60
|
+
const mobile = (_f = params.sandboxMobile) == null ? void 0 : _f.trim();
|
|
60
61
|
if (!organisationUuid || !workspaceUuid) {
|
|
61
62
|
throw new Error(
|
|
62
63
|
"Sandbox mode requires organisationUuid and workspaceUuid props"
|
|
63
64
|
);
|
|
64
65
|
}
|
|
65
|
-
if (!ucic && !
|
|
66
|
+
if (!ucic && !email && !mobile) {
|
|
66
67
|
throw new Error("Sandbox mode requires a UCIC, email, or mobile");
|
|
67
68
|
}
|
|
68
|
-
return { token, ucic,
|
|
69
|
+
return { token, ucic, email, mobile, organisationUuid, workspaceUuid };
|
|
69
70
|
};
|
|
70
71
|
var resolveRequestAuth = (accessToken, sandboxParams, decodeTokenSafely2) => {
|
|
71
72
|
const sandbox = resolveSandboxAuth(sandboxParams);
|
|
@@ -97,15 +98,24 @@ var buildAuthHeaders = (accessToken, sandbox) => {
|
|
|
97
98
|
return { Authorization: `Bearer ${accessToken}` };
|
|
98
99
|
};
|
|
99
100
|
var sandboxBodyIdentity = (sandbox) => {
|
|
101
|
+
const payload = {};
|
|
100
102
|
if (sandbox.ucic) {
|
|
101
|
-
|
|
103
|
+
payload.org_user_id = sandbox.ucic;
|
|
102
104
|
}
|
|
103
|
-
|
|
105
|
+
if (sandbox.email) {
|
|
106
|
+
payload.primary_email = sandbox.email;
|
|
107
|
+
}
|
|
108
|
+
if (sandbox.mobile) {
|
|
109
|
+
payload.primary_mobile = sandbox.mobile;
|
|
110
|
+
}
|
|
111
|
+
return payload;
|
|
104
112
|
};
|
|
105
113
|
var sandboxQueryIdentity = (sandbox) => sandboxBodyIdentity(sandbox);
|
|
106
114
|
|
|
107
115
|
// src/constants.ts
|
|
108
116
|
var DEFAULT_CONSENT_API_BASE_URL = "https://api.redacto.io/consent";
|
|
117
|
+
var REQUIRED_MARKER_GLYPH = " *";
|
|
118
|
+
var REQUIRED_MARKER_COLOR = "red";
|
|
109
119
|
|
|
110
120
|
// src/shared/languages.ts
|
|
111
121
|
var languageOptions = [
|
|
@@ -197,7 +207,7 @@ var fetchConsentContent = async ({
|
|
|
197
207
|
}
|
|
198
208
|
const { organisationUuid: ORGANISATION_UUID, workspaceUuid: WORKSPACE_UUID, sandbox } = resolveRequestAuth(accessToken, sandboxParams, decodeTokenSafely);
|
|
199
209
|
const apiBaseUrl = baseUrl || DEFAULT_CONSENT_API_BASE_URL;
|
|
200
|
-
const cacheIdentity = sandbox ? `sandbox:${sandbox.organisationUuid}:${sandbox.workspaceUuid}:${sandbox.ucic || sandbox.
|
|
210
|
+
const cacheIdentity = sandbox ? `sandbox:${sandbox.organisationUuid}:${sandbox.workspaceUuid}:${sandbox.ucic || sandbox.email || sandbox.mobile}` : accessToken;
|
|
201
211
|
const cacheKey = `${cacheIdentity}-${noticeId}-${validate_against}-${language}-${specific_uuid || ""}-${include_fully_consented_data}`;
|
|
202
212
|
if (validate_against === "all" && !specific_uuid) {
|
|
203
213
|
const cachedData = getCachedData(cacheKey);
|
|
@@ -217,7 +227,9 @@ var fetchConsentContent = async ({
|
|
|
217
227
|
}
|
|
218
228
|
if (sandbox) {
|
|
219
229
|
for (const [key, value] of Object.entries(sandboxQueryIdentity(sandbox))) {
|
|
220
|
-
|
|
230
|
+
if (value) {
|
|
231
|
+
url.searchParams.append(key, value);
|
|
232
|
+
}
|
|
221
233
|
}
|
|
222
234
|
}
|
|
223
235
|
const response = await fetch(url.toString(), {
|
|
@@ -351,7 +363,9 @@ var fetchTTSAudioUrls = async ({
|
|
|
351
363
|
);
|
|
352
364
|
if (sandbox) {
|
|
353
365
|
for (const [key, value] of Object.entries(sandboxQueryIdentity(sandbox))) {
|
|
354
|
-
|
|
366
|
+
if (value) {
|
|
367
|
+
url.searchParams.append(key, value);
|
|
368
|
+
}
|
|
355
369
|
}
|
|
356
370
|
}
|
|
357
371
|
const response = await fetch(url.toString(), {
|
|
@@ -599,11 +613,21 @@ var styles = import_react_native.StyleSheet.create({
|
|
|
599
613
|
}
|
|
600
614
|
});
|
|
601
615
|
|
|
616
|
+
// src/RedactoNoticeConsent/components/RequiredMarker.tsx
|
|
617
|
+
var import_react_native2 = require("react-native");
|
|
618
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
619
|
+
var RequiredMarker = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: styles2.marker, children: REQUIRED_MARKER_GLYPH });
|
|
620
|
+
var styles2 = import_react_native2.StyleSheet.create({
|
|
621
|
+
marker: {
|
|
622
|
+
color: REQUIRED_MARKER_COLOR
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
|
|
602
626
|
// src/RedactoNoticeConsent/components/VerificationScreen.tsx
|
|
603
627
|
var import_react = require("react");
|
|
604
|
-
var
|
|
628
|
+
var import_react_native3 = require("react-native");
|
|
605
629
|
var import_react_native_svg2 = __toESM(require("react-native-svg"));
|
|
606
|
-
var
|
|
630
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
607
631
|
var VerificationScreen = ({
|
|
608
632
|
status,
|
|
609
633
|
errorMessage,
|
|
@@ -623,32 +647,32 @@ var VerificationScreen = ({
|
|
|
623
647
|
const declineBg = ((_f = (_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.decline) == null ? void 0 : _f.backgroundColor) || "#ffffff";
|
|
624
648
|
const declineText = ((_h = (_g = settings == null ? void 0 : settings.button) == null ? void 0 : _g.decline) == null ? void 0 : _h.textColor) || "#000000";
|
|
625
649
|
const borderColor = (settings == null ? void 0 : settings.borderColor) || "#d0d5dd";
|
|
626
|
-
const scaleAnim = (0, import_react.useRef)(new
|
|
627
|
-
const contentAnim = (0, import_react.useRef)(new
|
|
628
|
-
const pulseAnim = (0, import_react.useRef)(new
|
|
650
|
+
const scaleAnim = (0, import_react.useRef)(new import_react_native3.Animated.Value(0.3)).current;
|
|
651
|
+
const contentAnim = (0, import_react.useRef)(new import_react_native3.Animated.Value(0)).current;
|
|
652
|
+
const pulseAnim = (0, import_react.useRef)(new import_react_native3.Animated.Value(0.6)).current;
|
|
629
653
|
(0, import_react.useEffect)(() => {
|
|
630
|
-
|
|
654
|
+
import_react_native3.Animated.spring(scaleAnim, {
|
|
631
655
|
toValue: 1,
|
|
632
656
|
friction: 5,
|
|
633
657
|
tension: 40,
|
|
634
658
|
delay: 100,
|
|
635
659
|
useNativeDriver: true
|
|
636
660
|
}).start();
|
|
637
|
-
|
|
661
|
+
import_react_native3.Animated.timing(contentAnim, {
|
|
638
662
|
toValue: 1,
|
|
639
663
|
duration: 400,
|
|
640
664
|
delay: 250,
|
|
641
665
|
useNativeDriver: true
|
|
642
666
|
}).start();
|
|
643
667
|
if (status === "verified") {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
668
|
+
import_react_native3.Animated.loop(
|
|
669
|
+
import_react_native3.Animated.sequence([
|
|
670
|
+
import_react_native3.Animated.timing(pulseAnim, {
|
|
647
671
|
toValue: 0,
|
|
648
672
|
duration: 1200,
|
|
649
673
|
useNativeDriver: true
|
|
650
674
|
}),
|
|
651
|
-
|
|
675
|
+
import_react_native3.Animated.timing(pulseAnim, {
|
|
652
676
|
toValue: 0.6,
|
|
653
677
|
duration: 0,
|
|
654
678
|
useNativeDriver: true
|
|
@@ -671,20 +695,20 @@ var VerificationScreen = ({
|
|
|
671
695
|
return errorMessage || "An error occurred during verification. Please try again.";
|
|
672
696
|
}
|
|
673
697
|
};
|
|
674
|
-
const renderPendingContent = () => /* @__PURE__ */ (0,
|
|
675
|
-
/* @__PURE__ */ (0,
|
|
676
|
-
/* @__PURE__ */ (0,
|
|
677
|
-
/* @__PURE__ */ (0,
|
|
678
|
-
/* @__PURE__ */ (0,
|
|
679
|
-
/* @__PURE__ */ (0,
|
|
698
|
+
const renderPendingContent = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.centerContent, children: [
|
|
699
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.ActivityIndicator, { size: "large", color: acceptBg, style: s.pendingSpinner }),
|
|
700
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.infoBanner, children: [
|
|
701
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native_svg2.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: [
|
|
702
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.Circle, { cx: "12", cy: "12", r: "10", stroke: "#059669", strokeWidth: 2 }),
|
|
703
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.Path, { d: "M12 16v-4M12 8h.01", stroke: "#059669", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
680
704
|
] }),
|
|
681
|
-
/* @__PURE__ */ (0,
|
|
705
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: s.infoBannerText, children: "Please complete the verification in Safari. This screen will update automatically when verification is complete." })
|
|
682
706
|
] })
|
|
683
707
|
] });
|
|
684
|
-
const renderSuccessContent = () => /* @__PURE__ */ (0,
|
|
685
|
-
/* @__PURE__ */ (0,
|
|
686
|
-
/* @__PURE__ */ (0,
|
|
687
|
-
|
|
708
|
+
const renderSuccessContent = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.centerContent, children: [
|
|
709
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.iconWrapper, children: [
|
|
710
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
711
|
+
import_react_native3.Animated.View,
|
|
688
712
|
{
|
|
689
713
|
style: [
|
|
690
714
|
s.pulseRing,
|
|
@@ -700,7 +724,7 @@ var VerificationScreen = ({
|
|
|
700
724
|
]
|
|
701
725
|
}
|
|
702
726
|
),
|
|
703
|
-
/* @__PURE__ */ (0,
|
|
727
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Animated.View, { style: [s.successCircle, { transform: [{ scale: scaleAnim }] }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.default, { width: 30, height: 30, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
704
728
|
import_react_native_svg2.Path,
|
|
705
729
|
{
|
|
706
730
|
d: "M5 13L9 17L19 7",
|
|
@@ -711,8 +735,8 @@ var VerificationScreen = ({
|
|
|
711
735
|
}
|
|
712
736
|
) }) })
|
|
713
737
|
] }),
|
|
714
|
-
/* @__PURE__ */ (0,
|
|
715
|
-
|
|
738
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
739
|
+
import_react_native3.Animated.Text,
|
|
716
740
|
{
|
|
717
741
|
style: [
|
|
718
742
|
s.statusTitle,
|
|
@@ -721,8 +745,8 @@ var VerificationScreen = ({
|
|
|
721
745
|
children: "Verification Completed"
|
|
722
746
|
}
|
|
723
747
|
),
|
|
724
|
-
/* @__PURE__ */ (0,
|
|
725
|
-
|
|
748
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
749
|
+
import_react_native3.Animated.Text,
|
|
726
750
|
{
|
|
727
751
|
style: [
|
|
728
752
|
s.statusSubtext,
|
|
@@ -732,8 +756,8 @@ var VerificationScreen = ({
|
|
|
732
756
|
}
|
|
733
757
|
)
|
|
734
758
|
] });
|
|
735
|
-
const renderErrorContent = () => /* @__PURE__ */ (0,
|
|
736
|
-
/* @__PURE__ */ (0,
|
|
759
|
+
const renderErrorContent = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.centerContent, children: [
|
|
760
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: s.iconWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Animated.View, { style: [s.errorCircle, { transform: [{ scale: scaleAnim }] }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.default, { width: 30, height: 30, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
737
761
|
import_react_native_svg2.Path,
|
|
738
762
|
{
|
|
739
763
|
d: "M18 6L6 18M6 6L18 18",
|
|
@@ -743,8 +767,8 @@ var VerificationScreen = ({
|
|
|
743
767
|
strokeLinejoin: "round"
|
|
744
768
|
}
|
|
745
769
|
) }) }) }),
|
|
746
|
-
/* @__PURE__ */ (0,
|
|
747
|
-
|
|
770
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
771
|
+
import_react_native3.Animated.Text,
|
|
748
772
|
{
|
|
749
773
|
style: [
|
|
750
774
|
s.statusTitle,
|
|
@@ -756,8 +780,8 @@ var VerificationScreen = ({
|
|
|
756
780
|
]
|
|
757
781
|
}
|
|
758
782
|
),
|
|
759
|
-
/* @__PURE__ */ (0,
|
|
760
|
-
/* @__PURE__ */ (0,
|
|
783
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.Animated.View, { style: [s.errorBanner, { opacity: contentAnim }], children: [
|
|
784
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native_svg2.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", style: s.infoBannerIcon, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
761
785
|
import_react_native_svg2.Path,
|
|
762
786
|
{
|
|
763
787
|
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",
|
|
@@ -767,69 +791,69 @@ var VerificationScreen = ({
|
|
|
767
791
|
strokeLinejoin: "round"
|
|
768
792
|
}
|
|
769
793
|
) }),
|
|
770
|
-
/* @__PURE__ */ (0,
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: s.errorBannerText, children: getErrorGuidance() })
|
|
771
795
|
] })
|
|
772
796
|
] });
|
|
773
797
|
const renderBottomButtons = () => {
|
|
774
798
|
if (status === "verified") {
|
|
775
799
|
if (!onContinue) return null;
|
|
776
|
-
return /* @__PURE__ */ (0,
|
|
777
|
-
|
|
800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
801
|
+
import_react_native3.TouchableOpacity,
|
|
778
802
|
{
|
|
779
803
|
style: [s.primaryButton, { backgroundColor: acceptBg }],
|
|
780
804
|
onPress: onContinue,
|
|
781
805
|
activeOpacity: 0.8,
|
|
782
|
-
children: /* @__PURE__ */ (0,
|
|
806
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.primaryButtonText, { color: acceptText }], children: "Continue" })
|
|
783
807
|
}
|
|
784
808
|
) });
|
|
785
809
|
}
|
|
786
810
|
if (status === "failed" || status === "expired") {
|
|
787
|
-
return /* @__PURE__ */ (0,
|
|
788
|
-
errorCode === "GUARDIAN_UNDER_18" && onChangeGuardian ? /* @__PURE__ */ (0,
|
|
789
|
-
|
|
811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: [
|
|
812
|
+
errorCode === "GUARDIAN_UNDER_18" && onChangeGuardian ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
813
|
+
import_react_native3.TouchableOpacity,
|
|
790
814
|
{
|
|
791
815
|
style: [s.primaryButton, { backgroundColor: acceptBg }],
|
|
792
816
|
onPress: onChangeGuardian,
|
|
793
817
|
activeOpacity: 0.8,
|
|
794
|
-
children: /* @__PURE__ */ (0,
|
|
818
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.primaryButtonText, { color: acceptText }], children: "Change Guardian" })
|
|
795
819
|
}
|
|
796
|
-
) : canRetry !== false ? /* @__PURE__ */ (0,
|
|
797
|
-
|
|
820
|
+
) : canRetry !== false ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
821
|
+
import_react_native3.TouchableOpacity,
|
|
798
822
|
{
|
|
799
823
|
style: [s.primaryButton, { backgroundColor: acceptBg }],
|
|
800
824
|
onPress: onRetry,
|
|
801
825
|
activeOpacity: 0.8,
|
|
802
|
-
children: /* @__PURE__ */ (0,
|
|
826
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.primaryButtonText, { color: acceptText }], children: "Try Again" })
|
|
803
827
|
}
|
|
804
828
|
) : null,
|
|
805
|
-
/* @__PURE__ */ (0,
|
|
806
|
-
|
|
829
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
830
|
+
import_react_native3.TouchableOpacity,
|
|
807
831
|
{
|
|
808
832
|
style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
|
|
809
833
|
onPress: onBack,
|
|
810
834
|
activeOpacity: 0.8,
|
|
811
|
-
children: /* @__PURE__ */ (0,
|
|
835
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.outlineButtonText, { color: declineText }], children: "Go Back" })
|
|
812
836
|
}
|
|
813
837
|
)
|
|
814
838
|
] });
|
|
815
839
|
}
|
|
816
|
-
return /* @__PURE__ */ (0,
|
|
817
|
-
|
|
840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: [s.bottomSection, { borderTopColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
841
|
+
import_react_native3.TouchableOpacity,
|
|
818
842
|
{
|
|
819
843
|
style: [s.outlineButton, { backgroundColor: declineBg, borderColor }],
|
|
820
844
|
onPress: onBack,
|
|
821
845
|
activeOpacity: 0.8,
|
|
822
|
-
children: /* @__PURE__ */ (0,
|
|
846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.outlineButtonText, { color: declineText }], children: "Cancel" })
|
|
823
847
|
}
|
|
824
848
|
) });
|
|
825
849
|
};
|
|
826
|
-
return /* @__PURE__ */ (0,
|
|
827
|
-
/* @__PURE__ */ (0,
|
|
828
|
-
/* @__PURE__ */ (0,
|
|
850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_native3.View, { style: s.root, children: [
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: [s.topSection, { borderBottomColor: borderColor }], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.Text, { style: [s.topTitle, { color: headingColor }], children: "Guardian Verification" }) }),
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_native3.View, { style: s.centerArea, children: status === "verified" ? renderSuccessContent() : status === "failed" || status === "expired" ? renderErrorContent() : renderPendingContent() }),
|
|
829
853
|
renderBottomButtons()
|
|
830
854
|
] });
|
|
831
855
|
};
|
|
832
|
-
var s =
|
|
856
|
+
var s = import_react_native3.StyleSheet.create({
|
|
833
857
|
root: {
|
|
834
858
|
flex: 1
|
|
835
859
|
},
|
|
@@ -839,7 +863,7 @@ var s = import_react_native2.StyleSheet.create({
|
|
|
839
863
|
alignItems: "center",
|
|
840
864
|
paddingHorizontal: 20,
|
|
841
865
|
paddingVertical: 16,
|
|
842
|
-
borderBottomWidth:
|
|
866
|
+
borderBottomWidth: import_react_native3.StyleSheet.hairlineWidth,
|
|
843
867
|
borderBottomColor: "#E5E7EB"
|
|
844
868
|
},
|
|
845
869
|
topTitle: {
|
|
@@ -947,7 +971,7 @@ var s = import_react_native2.StyleSheet.create({
|
|
|
947
971
|
bottomSection: {
|
|
948
972
|
padding: 20,
|
|
949
973
|
gap: 8,
|
|
950
|
-
borderTopWidth:
|
|
974
|
+
borderTopWidth: import_react_native3.StyleSheet.hairlineWidth,
|
|
951
975
|
borderTopColor: "#E5E7EB"
|
|
952
976
|
},
|
|
953
977
|
primaryButton: {
|
|
@@ -982,10 +1006,13 @@ var DPO_AUDIO_ELEMENT_MAP = [
|
|
|
982
1006
|
{ audioKey: "dpo_text_audio_url", elementId: "dpo-dpo-text" },
|
|
983
1007
|
{ audioKey: "dpo_anchor_text_audio_url", elementId: "dpo-dpo-link" }
|
|
984
1008
|
];
|
|
1009
|
+
var DEFAULT_ACCEPT_ALL_BUTTON_TEXT = "Accept All";
|
|
1010
|
+
var DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT = "Accept Selected";
|
|
1011
|
+
var DEFAULT_DECLINE_BUTTON_TEXT = "Decline";
|
|
985
1012
|
|
|
986
1013
|
// src/RedactoNoticeConsent/styles.ts
|
|
987
|
-
var
|
|
988
|
-
var
|
|
1014
|
+
var import_react_native4 = require("react-native");
|
|
1015
|
+
var styles3 = import_react_native4.StyleSheet.create({
|
|
989
1016
|
overlay: {
|
|
990
1017
|
flex: 1,
|
|
991
1018
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
@@ -999,7 +1026,7 @@ var styles2 = import_react_native3.StyleSheet.create({
|
|
|
999
1026
|
height: "90%",
|
|
1000
1027
|
borderRadius: 8,
|
|
1001
1028
|
backgroundColor: "#ffffff",
|
|
1002
|
-
...
|
|
1029
|
+
...import_react_native4.Platform.select({
|
|
1003
1030
|
ios: {
|
|
1004
1031
|
shadowColor: "#000",
|
|
1005
1032
|
shadowOffset: { width: 0, height: 2 },
|
|
@@ -1147,6 +1174,29 @@ var styles2 = import_react_native3.StyleSheet.create({
|
|
|
1147
1174
|
backgroundColor: "#ffffff",
|
|
1148
1175
|
flexShrink: 0
|
|
1149
1176
|
},
|
|
1177
|
+
/**
|
|
1178
|
+
* The main notice footer. Wide: one row with decline pushed left and the
|
|
1179
|
+
* accepts grouped right (see `declineSpacer`). Narrow: a full-width stack.
|
|
1180
|
+
* The guardian-verification and age-gate sub-flows still use
|
|
1181
|
+
* `bottomSection` — they have their own two-button layout.
|
|
1182
|
+
*/
|
|
1183
|
+
actionButtonRow: {
|
|
1184
|
+
flexDirection: "row",
|
|
1185
|
+
alignItems: "center",
|
|
1186
|
+
gap: 10,
|
|
1187
|
+
paddingTop: 15,
|
|
1188
|
+
paddingBottom: 16,
|
|
1189
|
+
backgroundColor: "#ffffff",
|
|
1190
|
+
flexShrink: 0
|
|
1191
|
+
},
|
|
1192
|
+
actionButtonStack: {
|
|
1193
|
+
flexDirection: "column",
|
|
1194
|
+
gap: 10,
|
|
1195
|
+
paddingTop: 15,
|
|
1196
|
+
paddingBottom: 16,
|
|
1197
|
+
backgroundColor: "#ffffff",
|
|
1198
|
+
flexShrink: 0
|
|
1199
|
+
},
|
|
1150
1200
|
button: {
|
|
1151
1201
|
borderRadius: 8,
|
|
1152
1202
|
paddingVertical: 9,
|
|
@@ -1154,6 +1204,24 @@ var styles2 = import_react_native3.StyleSheet.create({
|
|
|
1154
1204
|
alignItems: "center",
|
|
1155
1205
|
justifyContent: "center"
|
|
1156
1206
|
},
|
|
1207
|
+
/**
|
|
1208
|
+
* In the wide row each button shrinks to its own label so the left/right
|
|
1209
|
+
* split survives; `flexShrink` lets a long translated label wrap rather than
|
|
1210
|
+
* overflow the modal.
|
|
1211
|
+
*/
|
|
1212
|
+
rowButton: {
|
|
1213
|
+
flexShrink: 1,
|
|
1214
|
+
paddingHorizontal: 16
|
|
1215
|
+
},
|
|
1216
|
+
/** In the narrow stack every button spans the full width. */
|
|
1217
|
+
stackButton: {
|
|
1218
|
+
alignSelf: "stretch",
|
|
1219
|
+
paddingHorizontal: 16
|
|
1220
|
+
},
|
|
1221
|
+
/** Pushes everything after decline to the right edge of the wide row. */
|
|
1222
|
+
declineSpacer: {
|
|
1223
|
+
marginRight: "auto"
|
|
1224
|
+
},
|
|
1157
1225
|
buttonText: {
|
|
1158
1226
|
fontWeight: "400",
|
|
1159
1227
|
fontSize: 16,
|
|
@@ -1166,6 +1234,19 @@ var styles2 = import_react_native3.StyleSheet.create({
|
|
|
1166
1234
|
acceptButtonText: {
|
|
1167
1235
|
color: "#ffffff"
|
|
1168
1236
|
},
|
|
1237
|
+
/**
|
|
1238
|
+
* The accept-all shortcut. Outlined rather than filled so the primary
|
|
1239
|
+
* "accept selected" action stays dominant, but tinted with the accent colour
|
|
1240
|
+
* so it still reads as an accept next to the neutral decline button.
|
|
1241
|
+
*/
|
|
1242
|
+
acceptSecondaryButton: {
|
|
1243
|
+
borderWidth: 1,
|
|
1244
|
+
borderColor: "#4f87ff",
|
|
1245
|
+
backgroundColor: "#ffffff"
|
|
1246
|
+
},
|
|
1247
|
+
acceptSecondaryButtonText: {
|
|
1248
|
+
color: "#4f87ff"
|
|
1249
|
+
},
|
|
1169
1250
|
cancelButton: {
|
|
1170
1251
|
borderWidth: 1,
|
|
1171
1252
|
borderColor: "#d0d5dd",
|
|
@@ -1189,7 +1270,7 @@ var styles2 = import_react_native3.StyleSheet.create({
|
|
|
1189
1270
|
minWidth: 120,
|
|
1190
1271
|
maxHeight: 200,
|
|
1191
1272
|
marginTop: 4,
|
|
1192
|
-
...
|
|
1273
|
+
...import_react_native4.Platform.select({
|
|
1193
1274
|
ios: {
|
|
1194
1275
|
shadowColor: "#000",
|
|
1195
1276
|
shadowOffset: { width: 0, height: 2 },
|
|
@@ -1245,9 +1326,6 @@ var styles2 = import_react_native3.StyleSheet.create({
|
|
|
1245
1326
|
fontSize: 14,
|
|
1246
1327
|
flex: 1
|
|
1247
1328
|
},
|
|
1248
|
-
requiredAsterisk: {
|
|
1249
|
-
color: "red"
|
|
1250
|
-
},
|
|
1251
1329
|
divider: {
|
|
1252
1330
|
height: 1,
|
|
1253
1331
|
backgroundColor: "#e5e7eb",
|
|
@@ -1312,10 +1390,28 @@ var styles2 = import_react_native3.StyleSheet.create({
|
|
|
1312
1390
|
}
|
|
1313
1391
|
});
|
|
1314
1392
|
|
|
1393
|
+
// src/RedactoNoticeConsent/utils/consentSelection.ts
|
|
1394
|
+
var dataElementKey = (purposeUuid, elementUuid) => `${purposeUuid}-${elementUuid}`;
|
|
1395
|
+
var buildSelectionForMode = (purposes, mode, current) => {
|
|
1396
|
+
if (mode === "selected") {
|
|
1397
|
+
return current;
|
|
1398
|
+
}
|
|
1399
|
+
const selectedPurposes = {};
|
|
1400
|
+
const selectedDataElements = {};
|
|
1401
|
+
purposes.forEach((purpose) => {
|
|
1402
|
+
selectedPurposes[purpose.uuid] = true;
|
|
1403
|
+
purpose.data_elements.forEach((element) => {
|
|
1404
|
+
selectedDataElements[dataElementKey(purpose.uuid, element.uuid)] = element.enabled;
|
|
1405
|
+
});
|
|
1406
|
+
});
|
|
1407
|
+
return { selectedPurposes, selectedDataElements };
|
|
1408
|
+
};
|
|
1409
|
+
var hasRequiredDataElement = (purpose) => purpose.data_elements.some((element) => element.required);
|
|
1410
|
+
|
|
1315
1411
|
// src/RedactoNoticeConsent/useResponsive.ts
|
|
1316
|
-
var
|
|
1412
|
+
var import_react_native5 = require("react-native");
|
|
1317
1413
|
var useResponsive = () => {
|
|
1318
|
-
const { width, height } = (0,
|
|
1414
|
+
const { width, height } = (0, import_react_native5.useWindowDimensions)();
|
|
1319
1415
|
return {
|
|
1320
1416
|
isMobile: width < 768,
|
|
1321
1417
|
width,
|
|
@@ -1324,13 +1420,13 @@ var useResponsive = () => {
|
|
|
1324
1420
|
};
|
|
1325
1421
|
|
|
1326
1422
|
// src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
|
|
1327
|
-
var
|
|
1423
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
1328
1424
|
function RemoteLogo({ uri }) {
|
|
1329
1425
|
const isSvg = uri.toLowerCase().endsWith(".svg") || uri.toLowerCase().includes("image/svg");
|
|
1330
1426
|
if (isSvg && import_react_native_svg3.SvgUri) {
|
|
1331
|
-
return /* @__PURE__ */ (0,
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.SvgUri, { uri, width: 32, height: 32 });
|
|
1332
1428
|
}
|
|
1333
|
-
return /* @__PURE__ */ (0,
|
|
1429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Image, { style: styles3.logo, source: { uri } });
|
|
1334
1430
|
}
|
|
1335
1431
|
function stripHtml(html) {
|
|
1336
1432
|
return html.replace(/<[^>]*>/g, "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/ /g, " ").trim();
|
|
@@ -1382,17 +1478,17 @@ var PurposeItem = ({
|
|
|
1382
1478
|
}) => {
|
|
1383
1479
|
const headingColor = (settings == null ? void 0 : settings.headingColor) || "#323B4B";
|
|
1384
1480
|
const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
|
|
1385
|
-
return /* @__PURE__ */ (0,
|
|
1386
|
-
/* @__PURE__ */ (0,
|
|
1387
|
-
/* @__PURE__ */ (0,
|
|
1388
|
-
|
|
1481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { children: [
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.optionItem, children: [
|
|
1483
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1484
|
+
import_react_native6.TouchableOpacity,
|
|
1389
1485
|
{
|
|
1390
|
-
style:
|
|
1486
|
+
style: styles3.optionLeft,
|
|
1391
1487
|
onPress: () => onPurposeCollapse(purpose.uuid),
|
|
1392
1488
|
accessibilityRole: "button",
|
|
1393
1489
|
accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)} details`,
|
|
1394
1490
|
children: [
|
|
1395
|
-
/* @__PURE__ */ (0,
|
|
1491
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.purposeChevron, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 7, height: 12, viewBox: "0 0 7 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1396
1492
|
import_react_native_svg3.Path,
|
|
1397
1493
|
{
|
|
1398
1494
|
d: "M1 1L6 6L1 11",
|
|
@@ -1403,25 +1499,28 @@ var PurposeItem = ({
|
|
|
1403
1499
|
transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
|
|
1404
1500
|
}
|
|
1405
1501
|
) }) }),
|
|
1406
|
-
/* @__PURE__ */ (0,
|
|
1407
|
-
/* @__PURE__ */ (0,
|
|
1408
|
-
|
|
1502
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.optionTextContainer, children: [
|
|
1503
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1504
|
+
import_react_native6.Text,
|
|
1409
1505
|
{
|
|
1410
1506
|
style: [
|
|
1411
|
-
|
|
1507
|
+
styles3.optionTitle,
|
|
1412
1508
|
{ color: headingColor },
|
|
1413
|
-
activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ?
|
|
1509
|
+
activeTTSSegmentKey === `purpose_name_${purpose.uuid}` ? styles3.ttsHighlight : null
|
|
1414
1510
|
],
|
|
1415
|
-
children:
|
|
1511
|
+
children: [
|
|
1512
|
+
getTranslatedText("purposes.name", purpose.name, purpose.uuid),
|
|
1513
|
+
hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RequiredMarker, {})
|
|
1514
|
+
]
|
|
1416
1515
|
}
|
|
1417
1516
|
),
|
|
1418
|
-
/* @__PURE__ */ (0,
|
|
1419
|
-
|
|
1517
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1518
|
+
import_react_native6.Text,
|
|
1420
1519
|
{
|
|
1421
1520
|
style: [
|
|
1422
|
-
|
|
1521
|
+
styles3.optionDescription,
|
|
1423
1522
|
{ color: textColor },
|
|
1424
|
-
activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ?
|
|
1523
|
+
activeTTSSegmentKey === `purpose_desc_${purpose.uuid}` ? styles3.ttsHighlight : null
|
|
1425
1524
|
],
|
|
1426
1525
|
children: getTranslatedText("purposes.description", purpose.description, purpose.uuid)
|
|
1427
1526
|
}
|
|
@@ -1430,7 +1529,7 @@ var PurposeItem = ({
|
|
|
1430
1529
|
]
|
|
1431
1530
|
}
|
|
1432
1531
|
),
|
|
1433
|
-
!isAlreadyConsented && /* @__PURE__ */ (0,
|
|
1532
|
+
!isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1434
1533
|
Checkbox,
|
|
1435
1534
|
{
|
|
1436
1535
|
checked: selectedPurposes[purpose.uuid] || false,
|
|
@@ -1440,7 +1539,7 @@ var PurposeItem = ({
|
|
|
1440
1539
|
accessibilityLabel: `Select all data elements for ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`
|
|
1441
1540
|
}
|
|
1442
1541
|
),
|
|
1443
|
-
isAlreadyConsented && /* @__PURE__ */ (0,
|
|
1542
|
+
isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.consentedCheckmark, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1444
1543
|
import_react_native_svg3.Path,
|
|
1445
1544
|
{
|
|
1446
1545
|
d: "M4 6L5.5 7.5L8.5 4.5",
|
|
@@ -1451,22 +1550,22 @@ var PurposeItem = ({
|
|
|
1451
1550
|
}
|
|
1452
1551
|
) }) })
|
|
1453
1552
|
] }),
|
|
1454
|
-
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0,
|
|
1455
|
-
/* @__PURE__ */ (0,
|
|
1456
|
-
|
|
1553
|
+
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.dataElementsContainer, children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.dataElementItem, children: [
|
|
1554
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1555
|
+
import_react_native6.Text,
|
|
1457
1556
|
{
|
|
1458
1557
|
style: [
|
|
1459
|
-
|
|
1558
|
+
styles3.dataElementText,
|
|
1460
1559
|
{ color: textColor },
|
|
1461
|
-
activeTTSSegmentKey === `element_${dataElement.uuid}` ?
|
|
1560
|
+
activeTTSSegmentKey === `element_${dataElement.uuid}` ? styles3.ttsHighlight : null
|
|
1462
1561
|
],
|
|
1463
1562
|
children: [
|
|
1464
1563
|
getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
|
|
1465
|
-
dataElement.required && /* @__PURE__ */ (0,
|
|
1564
|
+
dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RequiredMarker, {})
|
|
1466
1565
|
]
|
|
1467
1566
|
}
|
|
1468
1567
|
),
|
|
1469
|
-
!isAlreadyConsented && /* @__PURE__ */ (0,
|
|
1568
|
+
!isAlreadyConsented && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1470
1569
|
Checkbox,
|
|
1471
1570
|
{
|
|
1472
1571
|
checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,
|
|
@@ -1478,7 +1577,7 @@ var PurposeItem = ({
|
|
|
1478
1577
|
),
|
|
1479
1578
|
isAlreadyConsented && (() => {
|
|
1480
1579
|
const wasSelected = initialDataElementSelections[`${purpose.uuid}-${dataElement.uuid}`] || false;
|
|
1481
|
-
return wasSelected ? /* @__PURE__ */ (0,
|
|
1580
|
+
return wasSelected ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.consentedCheckmarkSmall, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 10, height: 10, viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1482
1581
|
import_react_native_svg3.Path,
|
|
1483
1582
|
{
|
|
1484
1583
|
d: "M3 5L4.5 6.5L7.5 3.5",
|
|
@@ -1487,7 +1586,7 @@ var PurposeItem = ({
|
|
|
1487
1586
|
strokeLinecap: "round",
|
|
1488
1587
|
strokeLinejoin: "round"
|
|
1489
1588
|
}
|
|
1490
|
-
) }) }) : /* @__PURE__ */ (0,
|
|
1589
|
+
) }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.notConsentedCircle });
|
|
1491
1590
|
})()
|
|
1492
1591
|
] }, dataElement.uuid)) })
|
|
1493
1592
|
] });
|
|
@@ -1498,48 +1597,48 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1498
1597
|
const borderColor = (settings == null ? void 0 : settings.borderColor) || "#d0d5dd";
|
|
1499
1598
|
const textColor = (settings == null ? void 0 : settings.textColor) || "#344054";
|
|
1500
1599
|
const [showRelationshipDropdown, setShowRelationshipDropdown] = (0, import_react2.useState)(false);
|
|
1501
|
-
return /* @__PURE__ */ (0,
|
|
1502
|
-
/* @__PURE__ */ (0,
|
|
1503
|
-
logoUrl ? /* @__PURE__ */ (0,
|
|
1504
|
-
/* @__PURE__ */ (0,
|
|
1600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
1601
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.topSection, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topLeft, children: [
|
|
1602
|
+
logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
|
|
1603
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Guardian Verification" })
|
|
1505
1604
|
] }) }),
|
|
1506
|
-
/* @__PURE__ */ (0,
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1508
|
-
/* @__PURE__ */ (0,
|
|
1509
|
-
/* @__PURE__ */ (0,
|
|
1510
|
-
/* @__PURE__ */ (0,
|
|
1511
|
-
/* @__PURE__ */ (0,
|
|
1512
|
-
/* @__PURE__ */ (0,
|
|
1605
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.divider }),
|
|
1606
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
|
|
1607
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { 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." }),
|
|
1608
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: guardianStyles.infoBanner, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: guardianStyles.infoBannerText, children: "Please ensure the name and phone number entered below match the guardian's official Aadhaar-linked records for successful verification." }) }),
|
|
1609
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: { marginTop: 16, gap: 12 }, children: [
|
|
1610
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.inputContainer, children: [
|
|
1611
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: [styles3.inputLabel, { color: textColor }], children: [
|
|
1513
1612
|
"Guardian's Full Name ",
|
|
1514
|
-
/* @__PURE__ */ (0,
|
|
1613
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { color: "red" }, children: "*" })
|
|
1515
1614
|
] }),
|
|
1516
|
-
/* @__PURE__ */ (0,
|
|
1517
|
-
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1616
|
+
import_react_native6.TextInput,
|
|
1518
1617
|
{
|
|
1519
1618
|
value: formData.guardianName,
|
|
1520
1619
|
onChangeText: (v) => onChange("guardianName", v),
|
|
1521
1620
|
style: [
|
|
1522
|
-
|
|
1621
|
+
styles3.textInput,
|
|
1523
1622
|
{ borderColor: errors.guardianName ? "#DC2626" : borderColor, color: textColor }
|
|
1524
1623
|
],
|
|
1525
1624
|
placeholder: "e.g. Rajesh Kumar",
|
|
1526
1625
|
placeholderTextColor: "#9CA3AF"
|
|
1527
1626
|
}
|
|
1528
1627
|
),
|
|
1529
|
-
errors.guardianName ? /* @__PURE__ */ (0,
|
|
1628
|
+
errors.guardianName ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.inputError, children: errors.guardianName }) : null
|
|
1530
1629
|
] }),
|
|
1531
|
-
/* @__PURE__ */ (0,
|
|
1532
|
-
/* @__PURE__ */ (0,
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.inputContainer, children: [
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: [styles3.inputLabel, { color: textColor }], children: [
|
|
1533
1632
|
"Guardian's Phone Number ",
|
|
1534
|
-
/* @__PURE__ */ (0,
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { color: "red" }, children: "*" })
|
|
1535
1634
|
] }),
|
|
1536
|
-
/* @__PURE__ */ (0,
|
|
1537
|
-
|
|
1635
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1636
|
+
import_react_native6.TextInput,
|
|
1538
1637
|
{
|
|
1539
1638
|
value: formData.guardianContact,
|
|
1540
1639
|
onChangeText: (v) => onChange("guardianContact", v),
|
|
1541
1640
|
style: [
|
|
1542
|
-
|
|
1641
|
+
styles3.textInput,
|
|
1543
1642
|
{ borderColor: errors.guardianContact ? "#DC2626" : borderColor, color: textColor }
|
|
1544
1643
|
],
|
|
1545
1644
|
placeholder: "e.g. 9876543210",
|
|
@@ -1547,20 +1646,20 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1547
1646
|
keyboardType: "phone-pad"
|
|
1548
1647
|
}
|
|
1549
1648
|
),
|
|
1550
|
-
/* @__PURE__ */ (0,
|
|
1551
|
-
errors.guardianContact ? /* @__PURE__ */ (0,
|
|
1649
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { fontSize: 11, color: "#667085", marginTop: 4 }, children: "Mobile number linked to guardian's Aadhaar" }),
|
|
1650
|
+
errors.guardianContact ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.inputError, children: errors.guardianContact }) : null
|
|
1552
1651
|
] }),
|
|
1553
|
-
/* @__PURE__ */ (0,
|
|
1554
|
-
/* @__PURE__ */ (0,
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.inputContainer, children: [
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: [styles3.inputLabel, { color: textColor }], children: [
|
|
1555
1654
|
"Relationship ",
|
|
1556
|
-
/* @__PURE__ */ (0,
|
|
1655
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { color: "red" }, children: "*" })
|
|
1557
1656
|
] }),
|
|
1558
|
-
/* @__PURE__ */ (0,
|
|
1559
|
-
/* @__PURE__ */ (0,
|
|
1560
|
-
|
|
1657
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: { position: "relative" }, children: [
|
|
1658
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1659
|
+
import_react_native6.TouchableOpacity,
|
|
1561
1660
|
{
|
|
1562
1661
|
style: [
|
|
1563
|
-
|
|
1662
|
+
styles3.textInput,
|
|
1564
1663
|
{
|
|
1565
1664
|
borderColor: errors.guardianRelationship ? "#DC2626" : borderColor,
|
|
1566
1665
|
flexDirection: "row",
|
|
@@ -1570,8 +1669,8 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1570
1669
|
],
|
|
1571
1670
|
onPress: () => setShowRelationshipDropdown((v) => !v),
|
|
1572
1671
|
children: [
|
|
1573
|
-
/* @__PURE__ */ (0,
|
|
1574
|
-
/* @__PURE__ */ (0,
|
|
1672
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: { color: formData.guardianRelationship ? textColor : "#9CA3AF", fontSize: 13 }, children: formData.guardianRelationship || "Select relationship" }),
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1575
1674
|
import_react_native_svg3.Path,
|
|
1576
1675
|
{
|
|
1577
1676
|
d: "M4 6L8 10L12 6",
|
|
@@ -1584,8 +1683,8 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1584
1683
|
]
|
|
1585
1684
|
}
|
|
1586
1685
|
),
|
|
1587
|
-
showRelationshipDropdown && /* @__PURE__ */ (0,
|
|
1588
|
-
|
|
1686
|
+
showRelationshipDropdown && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: guardianStyles.relationshipDropdown, children: RELATIONSHIP_OPTIONS.map((option) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1687
|
+
import_react_native6.TouchableOpacity,
|
|
1589
1688
|
{
|
|
1590
1689
|
style: [
|
|
1591
1690
|
guardianStyles.relationshipItem,
|
|
@@ -1595,41 +1694,41 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1595
1694
|
onChange("guardianRelationship", option);
|
|
1596
1695
|
setShowRelationshipDropdown(false);
|
|
1597
1696
|
},
|
|
1598
|
-
children: /* @__PURE__ */ (0,
|
|
1697
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [guardianStyles.relationshipItemText, { color: textColor }], children: option })
|
|
1599
1698
|
},
|
|
1600
1699
|
option
|
|
1601
1700
|
)) })
|
|
1602
1701
|
] }),
|
|
1603
|
-
errors.guardianRelationship ? /* @__PURE__ */ (0,
|
|
1702
|
+
errors.guardianRelationship ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.inputError, children: errors.guardianRelationship }) : null
|
|
1604
1703
|
] }),
|
|
1605
|
-
errors.general ? /* @__PURE__ */ (0,
|
|
1704
|
+
errors.general ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.errorContainer, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.errorText, children: errors.general }) }) : null
|
|
1606
1705
|
] })
|
|
1607
1706
|
] }),
|
|
1608
|
-
/* @__PURE__ */ (0,
|
|
1609
|
-
/* @__PURE__ */ (0,
|
|
1610
|
-
|
|
1707
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.bottomSection, children: [
|
|
1708
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1709
|
+
import_react_native6.TouchableOpacity,
|
|
1611
1710
|
{
|
|
1612
1711
|
style: [
|
|
1613
|
-
|
|
1614
|
-
|
|
1712
|
+
styles3.button,
|
|
1713
|
+
styles3.acceptButton,
|
|
1615
1714
|
((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
|
|
1616
1715
|
],
|
|
1617
1716
|
onPress: onNext,
|
|
1618
1717
|
disabled: isSubmitting,
|
|
1619
1718
|
accessibilityLabel: "Submit guardian information and proceed",
|
|
1620
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
1621
|
-
|
|
1622
|
-
|
|
1719
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.ActivityIndicator, { size: "small", color: ((_c = (_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.accept) == null ? void 0 : _c.textColor) || "#ffffff" }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
|
|
1720
|
+
styles3.buttonText,
|
|
1721
|
+
styles3.acceptButtonText,
|
|
1623
1722
|
((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.accept) ? { color: settings.button.accept.textColor } : null
|
|
1624
1723
|
], children: "Verify via DigiLocker" })
|
|
1625
1724
|
}
|
|
1626
1725
|
),
|
|
1627
|
-
/* @__PURE__ */ (0,
|
|
1628
|
-
|
|
1726
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1727
|
+
import_react_native6.TouchableOpacity,
|
|
1629
1728
|
{
|
|
1630
1729
|
style: [
|
|
1631
|
-
|
|
1632
|
-
|
|
1730
|
+
styles3.button,
|
|
1731
|
+
styles3.cancelButton,
|
|
1633
1732
|
((_e = settings == null ? void 0 : settings.button) == null ? void 0 : _e.decline) ? {
|
|
1634
1733
|
backgroundColor: settings.button.decline.backgroundColor,
|
|
1635
1734
|
borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
|
|
@@ -1638,9 +1737,9 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1638
1737
|
onPress: onDecline,
|
|
1639
1738
|
disabled: isSubmitting,
|
|
1640
1739
|
accessibilityLabel: "Cancel guardian information form",
|
|
1641
|
-
children: /* @__PURE__ */ (0,
|
|
1642
|
-
|
|
1643
|
-
|
|
1740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
|
|
1741
|
+
styles3.buttonText,
|
|
1742
|
+
styles3.cancelButtonText,
|
|
1644
1743
|
((_f = settings == null ? void 0 : settings.button) == null ? void 0 : _f.decline) ? { color: settings.button.decline.textColor } : null
|
|
1645
1744
|
], children: "Cancel" })
|
|
1646
1745
|
}
|
|
@@ -1648,7 +1747,7 @@ var GuardianForm = ({ formData, errors, isSubmitting, onChange, onNext, onDeclin
|
|
|
1648
1747
|
] })
|
|
1649
1748
|
] });
|
|
1650
1749
|
};
|
|
1651
|
-
var guardianStyles =
|
|
1750
|
+
var guardianStyles = import_react_native6.StyleSheet.create({
|
|
1652
1751
|
infoBanner: {
|
|
1653
1752
|
backgroundColor: "#EFF6FF",
|
|
1654
1753
|
borderWidth: 1,
|
|
@@ -1690,43 +1789,43 @@ var guardianStyles = import_react_native5.StyleSheet.create({
|
|
|
1690
1789
|
});
|
|
1691
1790
|
var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
|
|
1692
1791
|
var _a, _b, _c, _d;
|
|
1693
|
-
return /* @__PURE__ */ (0,
|
|
1694
|
-
/* @__PURE__ */ (0,
|
|
1695
|
-
/* @__PURE__ */ (0,
|
|
1696
|
-
logoUrl ? /* @__PURE__ */ (0,
|
|
1697
|
-
/* @__PURE__ */ (0,
|
|
1792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
1793
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topSection, children: [
|
|
1794
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topLeft, children: [
|
|
1795
|
+
logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
|
|
1796
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.title, { color: (settings == null ? void 0 : settings.headingColor) || "#323B4B" }], children: "Age Verification Required" })
|
|
1698
1797
|
] }),
|
|
1699
|
-
onClose ? /* @__PURE__ */ (0,
|
|
1798
|
+
onClose ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.TouchableOpacity, { onPress: onClose, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.Path, { d: "M18 6L6 18M6 6l12 12", stroke: "#9CA3AF", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }) }) : null
|
|
1700
1799
|
] }),
|
|
1701
|
-
/* @__PURE__ */ (0,
|
|
1702
|
-
/* @__PURE__ */ (0,
|
|
1703
|
-
/* @__PURE__ */ (0,
|
|
1704
|
-
/* @__PURE__ */ (0,
|
|
1800
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.divider }),
|
|
1801
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
|
|
1802
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.privacyText, { color: (settings == null ? void 0 : settings.textColor) || "#344054" }], children: "To proceed with this consent form, we need to verify your age." }),
|
|
1803
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.privacyText, { color: (settings == null ? void 0 : settings.textColor) || "#344054", marginTop: 12, fontWeight: "600" }], children: "Are you 18 years of age or older?" })
|
|
1705
1804
|
] }),
|
|
1706
|
-
/* @__PURE__ */ (0,
|
|
1707
|
-
/* @__PURE__ */ (0,
|
|
1708
|
-
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.bottomSection, children: [
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1807
|
+
import_react_native6.TouchableOpacity,
|
|
1709
1808
|
{
|
|
1710
1809
|
style: [
|
|
1711
|
-
|
|
1712
|
-
|
|
1810
|
+
styles3.button,
|
|
1811
|
+
styles3.acceptButton,
|
|
1713
1812
|
((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.accept) ? { backgroundColor: settings.button.accept.backgroundColor } : null
|
|
1714
1813
|
],
|
|
1715
1814
|
onPress: onYes,
|
|
1716
1815
|
accessibilityLabel: "Yes, I am 18 or older",
|
|
1717
|
-
children: /* @__PURE__ */ (0,
|
|
1718
|
-
|
|
1719
|
-
|
|
1816
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
|
|
1817
|
+
styles3.buttonText,
|
|
1818
|
+
styles3.acceptButtonText,
|
|
1720
1819
|
((_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.accept) ? { color: settings.button.accept.textColor } : null
|
|
1721
1820
|
], children: "Yes, I am 18 or older" })
|
|
1722
1821
|
}
|
|
1723
1822
|
),
|
|
1724
|
-
/* @__PURE__ */ (0,
|
|
1725
|
-
|
|
1823
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1824
|
+
import_react_native6.TouchableOpacity,
|
|
1726
1825
|
{
|
|
1727
1826
|
style: [
|
|
1728
|
-
|
|
1729
|
-
|
|
1827
|
+
styles3.button,
|
|
1828
|
+
styles3.cancelButton,
|
|
1730
1829
|
((_c = settings == null ? void 0 : settings.button) == null ? void 0 : _c.decline) ? {
|
|
1731
1830
|
backgroundColor: settings.button.decline.backgroundColor,
|
|
1732
1831
|
borderColor: (settings == null ? void 0 : settings.borderColor) || "#d0d5dd"
|
|
@@ -1734,9 +1833,9 @@ var AgeVerification = ({ onYes, onNo, onClose, settings, logoUrl }) => {
|
|
|
1734
1833
|
],
|
|
1735
1834
|
onPress: onNo,
|
|
1736
1835
|
accessibilityLabel: "No, I am under 18",
|
|
1737
|
-
children: /* @__PURE__ */ (0,
|
|
1738
|
-
|
|
1739
|
-
|
|
1836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [
|
|
1837
|
+
styles3.buttonText,
|
|
1838
|
+
styles3.cancelButtonText,
|
|
1740
1839
|
((_d = settings == null ? void 0 : settings.button) == null ? void 0 : _d.decline) ? { color: settings.button.decline.textColor } : null
|
|
1741
1840
|
], children: "No, I am under 18" })
|
|
1742
1841
|
}
|
|
@@ -1767,13 +1866,14 @@ var RedactoNoticeConsent = ({
|
|
|
1767
1866
|
includeFullyConsentedData = false,
|
|
1768
1867
|
reviewModeButtonText
|
|
1769
1868
|
}) => {
|
|
1770
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
1869
|
+
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;
|
|
1771
1870
|
const { isMobile } = useResponsive();
|
|
1772
1871
|
const sandboxParams = (0, import_react2.useMemo)(
|
|
1773
1872
|
() => ({
|
|
1774
1873
|
token,
|
|
1775
1874
|
sandboxUcic: ucic,
|
|
1776
|
-
|
|
1875
|
+
sandboxEmail: email,
|
|
1876
|
+
sandboxMobile: mobile,
|
|
1777
1877
|
organisationUuid,
|
|
1778
1878
|
workspaceUuid
|
|
1779
1879
|
}),
|
|
@@ -1945,6 +2045,9 @@ var RedactoNoticeConsent = ({
|
|
|
1945
2045
|
confirm_button_text: data.detail.confirm_button_text_audio_url,
|
|
1946
2046
|
decline_button_text: data.detail.decline_button_text_audio_url
|
|
1947
2047
|
};
|
|
2048
|
+
if (data.detail.accept_all_button_text_audio_url) {
|
|
2049
|
+
urls.accept_all_button_text = data.detail.accept_all_button_text_audio_url;
|
|
2050
|
+
}
|
|
1948
2051
|
if (data.detail.privacy_center_anchor_text_audio_url) {
|
|
1949
2052
|
urls.privacy_center_anchor_text = data.detail.privacy_center_anchor_text_audio_url;
|
|
1950
2053
|
}
|
|
@@ -2154,6 +2257,7 @@ var RedactoNoticeConsent = ({
|
|
|
2154
2257
|
DPO_AUDIO_ELEMENT_MAP.forEach(({ elementId }) => {
|
|
2155
2258
|
pushSegment(elementId, ttsAudioUrls[elementId]);
|
|
2156
2259
|
});
|
|
2260
|
+
pushSegment("accept_all_button_text", ttsAudioUrls.accept_all_button_text);
|
|
2157
2261
|
pushSegment("confirm_button_text", ttsAudioUrls.confirm_button_text);
|
|
2158
2262
|
pushSegment("decline_button_text", ttsAudioUrls.decline_button_text);
|
|
2159
2263
|
if (queue.length === 0) {
|
|
@@ -2194,7 +2298,7 @@ var RedactoNoticeConsent = ({
|
|
|
2194
2298
|
};
|
|
2195
2299
|
}, [stopAudio]);
|
|
2196
2300
|
(0, import_react2.useEffect)(() => {
|
|
2197
|
-
const subscription =
|
|
2301
|
+
const subscription = import_react_native6.AppState.addEventListener("change", (nextAppState) => {
|
|
2198
2302
|
isAppActiveRef.current = nextAppState === "active";
|
|
2199
2303
|
});
|
|
2200
2304
|
return () => subscription.remove();
|
|
@@ -2305,12 +2409,20 @@ var RedactoNoticeConsent = ({
|
|
|
2305
2409
|
return newState;
|
|
2306
2410
|
});
|
|
2307
2411
|
}, [content]);
|
|
2308
|
-
const handleAccept = (0, import_react2.useCallback)(async () => {
|
|
2412
|
+
const handleAccept = (0, import_react2.useCallback)(async (mode = "selected") => {
|
|
2309
2413
|
if (!content) return;
|
|
2310
2414
|
try {
|
|
2311
2415
|
setIsSubmitting(true);
|
|
2312
2416
|
setErrorMessage(null);
|
|
2313
2417
|
const activeConfig2 = content.detail.active_config;
|
|
2418
|
+
const selection = buildSelectionForMode(activeConfig2.purposes, mode, {
|
|
2419
|
+
selectedPurposes,
|
|
2420
|
+
selectedDataElements
|
|
2421
|
+
});
|
|
2422
|
+
if (mode !== "selected") {
|
|
2423
|
+
setSelectedPurposes(selection.selectedPurposes);
|
|
2424
|
+
setSelectedDataElements(selection.selectedDataElements);
|
|
2425
|
+
}
|
|
2314
2426
|
await submitConsentEvent({
|
|
2315
2427
|
accessToken,
|
|
2316
2428
|
baseUrl,
|
|
@@ -2318,10 +2430,10 @@ var RedactoNoticeConsent = ({
|
|
|
2318
2430
|
noticeUuid: activeConfig2.notice_uuid,
|
|
2319
2431
|
purposes: activeConfig2.purposes.map((purpose) => ({
|
|
2320
2432
|
...purpose,
|
|
2321
|
-
selected: selectedPurposes[purpose.uuid] || false,
|
|
2433
|
+
selected: selection.selectedPurposes[purpose.uuid] || false,
|
|
2322
2434
|
data_elements: purpose.data_elements.map((el) => ({
|
|
2323
2435
|
...el,
|
|
2324
|
-
selected: selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
|
|
2436
|
+
selected: selection.selectedDataElements[`${purpose.uuid}-${el.uuid}`] || false
|
|
2325
2437
|
}))
|
|
2326
2438
|
})),
|
|
2327
2439
|
declined: false,
|
|
@@ -2386,9 +2498,9 @@ var RedactoNoticeConsent = ({
|
|
|
2386
2498
|
setShowVerificationScreen(true);
|
|
2387
2499
|
pollingCountRef.current = 0;
|
|
2388
2500
|
try {
|
|
2389
|
-
const canOpen = await
|
|
2501
|
+
const canOpen = await import_react_native6.Linking.canOpenURL(result.digilockerRedirectUrl);
|
|
2390
2502
|
if (canOpen) {
|
|
2391
|
-
await
|
|
2503
|
+
await import_react_native6.Linking.openURL(result.digilockerRedirectUrl);
|
|
2392
2504
|
}
|
|
2393
2505
|
} catch {
|
|
2394
2506
|
}
|
|
@@ -2450,41 +2562,71 @@ var RedactoNoticeConsent = ({
|
|
|
2450
2562
|
}, [activeConfig, selectedDataElements]);
|
|
2451
2563
|
const acceptButtonStyle = { backgroundColor: acceptBackgroundColor };
|
|
2452
2564
|
const acceptButtonTextStyle = { color: acceptTextColor };
|
|
2565
|
+
const acceptAllButtonStyle = {
|
|
2566
|
+
backgroundColor: ((_j = (_i = settings == null ? void 0 : settings.button) == null ? void 0 : _i.acceptAll) == null ? void 0 : _j.backgroundColor) || acceptBackgroundColor
|
|
2567
|
+
};
|
|
2568
|
+
const acceptAllButtonTextStyle = {
|
|
2569
|
+
color: ((_l = (_k = settings == null ? void 0 : settings.button) == null ? void 0 : _k.acceptAll) == null ? void 0 : _l.textColor) || acceptTextColor
|
|
2570
|
+
};
|
|
2571
|
+
const acceptSelectedButtonStyle = {
|
|
2572
|
+
backgroundColor: "#ffffff",
|
|
2573
|
+
borderColor: accentColor
|
|
2574
|
+
};
|
|
2575
|
+
const acceptSelectedButtonTextStyle = { color: accentColor };
|
|
2453
2576
|
const declineButtonStyle = { backgroundColor: declineBackgroundColor, borderColor };
|
|
2454
2577
|
const declineButtonTextStyle = { color: declineTextColor };
|
|
2578
|
+
const acceptAllLabel = getTranslatedText(
|
|
2579
|
+
"accept_all_button_text",
|
|
2580
|
+
(activeConfig == null ? void 0 : activeConfig.accept_all_button_text) || DEFAULT_ACCEPT_ALL_BUTTON_TEXT
|
|
2581
|
+
);
|
|
2582
|
+
const acceptSelectedLabel = getTranslatedText(
|
|
2583
|
+
"confirm_button_text",
|
|
2584
|
+
(activeConfig == null ? void 0 : activeConfig.confirm_button_text) || DEFAULT_ACCEPT_SELECTED_BUTTON_TEXT
|
|
2585
|
+
);
|
|
2586
|
+
const declineLabel = getTranslatedText(
|
|
2587
|
+
"decline_button_text",
|
|
2588
|
+
(activeConfig == null ? void 0 : activeConfig.decline_button_text) || DEFAULT_DECLINE_BUTTON_TEXT
|
|
2589
|
+
);
|
|
2590
|
+
const footerButtonOrder = isMobile ? ["acceptAll", "acceptSelected", "decline"] : ["decline", "acceptSelected", "acceptAll"];
|
|
2591
|
+
const widthStyle = isMobile ? styles3.stackButton : styles3.rowButton;
|
|
2592
|
+
const handleAcceptAll = (0, import_react2.useCallback)(() => handleAccept("all"), [handleAccept]);
|
|
2593
|
+
const handleAcceptSelected = (0, import_react2.useCallback)(
|
|
2594
|
+
() => handleAccept("selected"),
|
|
2595
|
+
[handleAccept]
|
|
2596
|
+
);
|
|
2455
2597
|
const modalBg = (settings == null ? void 0 : settings.backgroundColor) ? { backgroundColor: settings.backgroundColor } : {};
|
|
2456
2598
|
const translatedNoticeText = activeConfig ? stripHtml(getTranslatedText("notice_text", activeConfig.notice_text || "")) : "";
|
|
2457
2599
|
const translatedAdditionalText = activeConfig ? stripHtml(getTranslatedText("additional_text", activeConfig.additional_text || "")) : "";
|
|
2458
2600
|
if (!isVisible && !isLoading) return null;
|
|
2459
|
-
return /* @__PURE__ */ (0,
|
|
2460
|
-
|
|
2601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2602
|
+
import_react_native6.Modal,
|
|
2461
2603
|
{
|
|
2462
2604
|
visible: isVisible || isLoading,
|
|
2463
2605
|
transparent: true,
|
|
2464
2606
|
animationType: "fade",
|
|
2465
2607
|
onRequestClose: blockUI ? void 0 : handleDecline,
|
|
2466
2608
|
accessibilityViewIsModal: true,
|
|
2467
|
-
children: /* @__PURE__ */ (0,
|
|
2468
|
-
isLanguageDropdownOpen && /* @__PURE__ */ (0,
|
|
2469
|
-
|
|
2609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.overlay, children: [
|
|
2610
|
+
isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2611
|
+
import_react_native6.Pressable,
|
|
2470
2612
|
{
|
|
2471
|
-
style: [
|
|
2613
|
+
style: [import_react_native6.StyleSheet.absoluteFillObject, { zIndex: 1 }],
|
|
2472
2614
|
onPress: () => setIsLanguageDropdownOpen(false)
|
|
2473
2615
|
}
|
|
2474
2616
|
),
|
|
2475
|
-
/* @__PURE__ */ (0,
|
|
2476
|
-
|
|
2617
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2618
|
+
import_react_native6.View,
|
|
2477
2619
|
{
|
|
2478
2620
|
style: [
|
|
2479
|
-
|
|
2621
|
+
styles3.modal,
|
|
2480
2622
|
modalBg,
|
|
2481
2623
|
{ zIndex: 2 },
|
|
2482
2624
|
(settings == null ? void 0 : settings.borderRadius) ? { borderRadius: parseInt(settings.borderRadius, 10) } : null
|
|
2483
2625
|
],
|
|
2484
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
2485
|
-
/* @__PURE__ */ (0,
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
2487
|
-
] }) : showVerificationScreen ? /* @__PURE__ */ (0,
|
|
2626
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.loadingContainer, children: [
|
|
2627
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.ActivityIndicator, { size: "large", color: acceptBackgroundColor }),
|
|
2628
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.loadingText, children: "Loading..." })
|
|
2629
|
+
] }) : showVerificationScreen ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.content, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2488
2630
|
VerificationScreen,
|
|
2489
2631
|
{
|
|
2490
2632
|
status: verificationStatus,
|
|
@@ -2521,7 +2663,7 @@ var RedactoNoticeConsent = ({
|
|
|
2521
2663
|
}
|
|
2522
2664
|
}
|
|
2523
2665
|
}
|
|
2524
|
-
) }) : showGuardianForm ? /* @__PURE__ */ (0,
|
|
2666
|
+
) }) : showGuardianForm ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.content, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2525
2667
|
GuardianForm,
|
|
2526
2668
|
{
|
|
2527
2669
|
formData: guardianFormData,
|
|
@@ -2548,7 +2690,7 @@ var RedactoNoticeConsent = ({
|
|
|
2548
2690
|
},
|
|
2549
2691
|
logoUrl
|
|
2550
2692
|
}
|
|
2551
|
-
) }) : showAgeVerification ? /* @__PURE__ */ (0,
|
|
2693
|
+
) }) : showAgeVerification ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.content, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2552
2694
|
AgeVerification,
|
|
2553
2695
|
{
|
|
2554
2696
|
onYes: () => {
|
|
@@ -2576,22 +2718,22 @@ var RedactoNoticeConsent = ({
|
|
|
2576
2718
|
},
|
|
2577
2719
|
logoUrl
|
|
2578
2720
|
}
|
|
2579
|
-
) }) : /* @__PURE__ */ (0,
|
|
2580
|
-
errorMessage ? /* @__PURE__ */ (0,
|
|
2581
|
-
/* @__PURE__ */ (0,
|
|
2582
|
-
/* @__PURE__ */ (0,
|
|
2721
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.content, children: [
|
|
2722
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.errorContainer, children: [
|
|
2723
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: styles3.errorText, children: errorMessage }),
|
|
2724
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.TouchableOpacity, { onPress: () => setErrorMessage(null), hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.Path, { d: "M12 4L4 12M4 4L12 12", stroke: "#DC2626", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
2583
2725
|
] }) : null,
|
|
2584
|
-
/* @__PURE__ */ (0,
|
|
2585
|
-
/* @__PURE__ */ (0,
|
|
2586
|
-
logoUrl ? /* @__PURE__ */ (0,
|
|
2587
|
-
/* @__PURE__ */ (0,
|
|
2588
|
-
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topSection, children: [
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.topLeft, children: [
|
|
2728
|
+
logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RemoteLogo, { uri: logoUrl, style: { height: 32, width: 80 } }) : null,
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2730
|
+
import_react_native6.Text,
|
|
2589
2731
|
{
|
|
2590
2732
|
style: [
|
|
2591
|
-
|
|
2733
|
+
styles3.title,
|
|
2592
2734
|
{ color: headingColor },
|
|
2593
2735
|
isMobile ? { fontSize: 16 } : null,
|
|
2594
|
-
activeTTSSegmentKey === "notice_banner_heading" ?
|
|
2736
|
+
activeTTSSegmentKey === "notice_banner_heading" ? styles3.ttsHighlight : null
|
|
2595
2737
|
],
|
|
2596
2738
|
numberOfLines: 2,
|
|
2597
2739
|
children: getTranslatedText(
|
|
@@ -2601,32 +2743,32 @@ var RedactoNoticeConsent = ({
|
|
|
2601
2743
|
}
|
|
2602
2744
|
)
|
|
2603
2745
|
] }),
|
|
2604
|
-
/* @__PURE__ */ (0,
|
|
2605
|
-
isTTSAvailable && /* @__PURE__ */ (0,
|
|
2606
|
-
|
|
2746
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: { flexDirection: "row", gap: 8, alignItems: "center" }, children: [
|
|
2747
|
+
isTTSAvailable && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2748
|
+
import_react_native6.TouchableOpacity,
|
|
2607
2749
|
{
|
|
2608
|
-
style: [
|
|
2750
|
+
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],
|
|
2609
2751
|
onPress: toggleAudio,
|
|
2610
2752
|
accessibilityLabel: isPlaying && !isPaused ? "Pause audio" : isPaused ? "Resume audio" : "Start audio",
|
|
2611
|
-
children: isPlaying && !isPaused ? /* @__PURE__ */ (0,
|
|
2612
|
-
/* @__PURE__ */ (0,
|
|
2613
|
-
/* @__PURE__ */ (0,
|
|
2614
|
-
] }) : /* @__PURE__ */ (0,
|
|
2615
|
-
/* @__PURE__ */ (0,
|
|
2753
|
+
children: isPlaying && !isPaused ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
|
|
2754
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.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" }),
|
|
2755
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.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" })
|
|
2756
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native_svg3.default, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", children: [
|
|
2757
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2616
2758
|
import_react_native_svg3.Path,
|
|
2617
2759
|
{
|
|
2618
2760
|
d: "M11 5L6 9H2V15H6L11 19V5Z",
|
|
2619
|
-
stroke: ((
|
|
2761
|
+
stroke: ((_s = (_r = settings == null ? void 0 : settings.button) == null ? void 0 : _r.language) == null ? void 0 : _s.textColor) || "#344054",
|
|
2620
2762
|
strokeWidth: 2,
|
|
2621
2763
|
strokeLinecap: "round",
|
|
2622
2764
|
strokeLinejoin: "round"
|
|
2623
2765
|
}
|
|
2624
2766
|
),
|
|
2625
|
-
/* @__PURE__ */ (0,
|
|
2767
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2626
2768
|
import_react_native_svg3.Path,
|
|
2627
2769
|
{
|
|
2628
2770
|
d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07",
|
|
2629
|
-
stroke: ((
|
|
2771
|
+
stroke: ((_u = (_t = settings == null ? void 0 : settings.button) == null ? void 0 : _t.language) == null ? void 0 : _u.textColor) || "#344054",
|
|
2630
2772
|
strokeWidth: 2,
|
|
2631
2773
|
strokeLinecap: "round",
|
|
2632
2774
|
strokeLinejoin: "round"
|
|
@@ -2635,23 +2777,23 @@ var RedactoNoticeConsent = ({
|
|
|
2635
2777
|
] })
|
|
2636
2778
|
}
|
|
2637
2779
|
),
|
|
2638
|
-
supportedLanguages.length > 0 && /* @__PURE__ */ (0,
|
|
2639
|
-
/* @__PURE__ */ (0,
|
|
2640
|
-
|
|
2780
|
+
supportedLanguages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.View, { style: styles3.languageSelectorContainer, children: [
|
|
2781
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
2782
|
+
import_react_native6.TouchableOpacity,
|
|
2641
2783
|
{
|
|
2642
2784
|
style: [
|
|
2643
|
-
|
|
2644
|
-
((
|
|
2785
|
+
styles3.topRight,
|
|
2786
|
+
((_v = settings == null ? void 0 : settings.button) == null ? void 0 : _v.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
|
|
2645
2787
|
],
|
|
2646
2788
|
onPress: () => setIsLanguageDropdownOpen((v) => !v),
|
|
2647
2789
|
accessibilityLabel: `Select language. Current: ${selectedLanguage}`,
|
|
2648
2790
|
children: [
|
|
2649
|
-
/* @__PURE__ */ (0,
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
2791
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.topRightText, ((_w = settings == null ? void 0 : settings.button) == null ? void 0 : _w.language) ? { color: settings.button.language.textColor } : null], children: selectedLanguage }),
|
|
2792
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg3.default, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2651
2793
|
import_react_native_svg3.Path,
|
|
2652
2794
|
{
|
|
2653
2795
|
d: "M4 6L8 10L12 6",
|
|
2654
|
-
stroke: ((
|
|
2796
|
+
stroke: ((_y = (_x = settings == null ? void 0 : settings.button) == null ? void 0 : _x.language) == null ? void 0 : _y.textColor) || "#344054",
|
|
2655
2797
|
strokeWidth: 2,
|
|
2656
2798
|
strokeLinecap: "round",
|
|
2657
2799
|
strokeLinejoin: "round"
|
|
@@ -2660,23 +2802,23 @@ var RedactoNoticeConsent = ({
|
|
|
2660
2802
|
]
|
|
2661
2803
|
}
|
|
2662
2804
|
),
|
|
2663
|
-
isLanguageDropdownOpen && /* @__PURE__ */ (0,
|
|
2664
|
-
|
|
2805
|
+
isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.languageDropdown, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.ScrollView, { children: supportedLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2806
|
+
import_react_native6.TouchableOpacity,
|
|
2665
2807
|
{
|
|
2666
2808
|
style: [
|
|
2667
|
-
|
|
2668
|
-
lang === selectedLanguage ?
|
|
2809
|
+
styles3.languageItem,
|
|
2810
|
+
lang === selectedLanguage ? styles3.selectedLanguageItem : null
|
|
2669
2811
|
],
|
|
2670
2812
|
onPress: () => {
|
|
2671
2813
|
setSelectedLanguage(lang);
|
|
2672
2814
|
setIsLanguageDropdownOpen(false);
|
|
2673
2815
|
},
|
|
2674
|
-
children: /* @__PURE__ */ (0,
|
|
2675
|
-
|
|
2816
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2817
|
+
import_react_native6.Text,
|
|
2676
2818
|
{
|
|
2677
2819
|
style: [
|
|
2678
|
-
|
|
2679
|
-
lang === selectedLanguage ?
|
|
2820
|
+
styles3.languageItemText,
|
|
2821
|
+
lang === selectedLanguage ? styles3.selectedLanguageItemText : null
|
|
2680
2822
|
],
|
|
2681
2823
|
children: lang
|
|
2682
2824
|
}
|
|
@@ -2687,63 +2829,63 @@ var RedactoNoticeConsent = ({
|
|
|
2687
2829
|
] })
|
|
2688
2830
|
] })
|
|
2689
2831
|
] }),
|
|
2690
|
-
/* @__PURE__ */ (0,
|
|
2691
|
-
translatedNoticeText ? /* @__PURE__ */ (0,
|
|
2692
|
-
|
|
2832
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.ScrollView, { style: styles3.middleSection, showsVerticalScrollIndicator: false, children: [
|
|
2833
|
+
translatedNoticeText ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2834
|
+
import_react_native6.Text,
|
|
2693
2835
|
{
|
|
2694
2836
|
style: [
|
|
2695
|
-
|
|
2837
|
+
styles3.privacyText,
|
|
2696
2838
|
{ color: textColor },
|
|
2697
|
-
activeTTSSegmentKey === "notice_text" ?
|
|
2839
|
+
activeTTSSegmentKey === "notice_text" ? styles3.ttsHighlight : null
|
|
2698
2840
|
],
|
|
2699
2841
|
children: translatedNoticeText
|
|
2700
2842
|
}
|
|
2701
2843
|
) : null,
|
|
2702
|
-
(activeConfig == null ? void 0 : activeConfig.privacy_policy_url) ? /* @__PURE__ */ (0,
|
|
2703
|
-
|
|
2844
|
+
(activeConfig == null ? void 0 : activeConfig.privacy_policy_url) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
2845
|
+
import_react_native6.Text,
|
|
2704
2846
|
{
|
|
2705
2847
|
style: [
|
|
2706
|
-
|
|
2848
|
+
styles3.privacyText,
|
|
2707
2849
|
{ marginTop: 8 },
|
|
2708
2850
|
{ color: textColor }
|
|
2709
2851
|
],
|
|
2710
2852
|
children: [
|
|
2711
|
-
/* @__PURE__ */ (0,
|
|
2853
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "privacy_policy_prefix_text" ? styles3.ttsHighlight : null, children: [
|
|
2712
2854
|
getTranslatedText("privacy_policy_prefix_text", activeConfig.privacy_policy_prefix_text || ""),
|
|
2713
2855
|
" "
|
|
2714
2856
|
] }),
|
|
2715
|
-
/* @__PURE__ */ (0,
|
|
2716
|
-
|
|
2857
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2858
|
+
import_react_native6.Text,
|
|
2717
2859
|
{
|
|
2718
2860
|
style: [
|
|
2719
|
-
|
|
2861
|
+
styles3.link,
|
|
2720
2862
|
{ color: linkColor },
|
|
2721
|
-
activeTTSSegmentKey === "privacy_policy_anchor_text" ?
|
|
2863
|
+
activeTTSSegmentKey === "privacy_policy_anchor_text" ? styles3.ttsHighlight : null
|
|
2722
2864
|
],
|
|
2723
|
-
onPress: () =>
|
|
2865
|
+
onPress: () => import_react_native6.Linking.openURL(activeConfig.privacy_policy_url),
|
|
2724
2866
|
children: getTranslatedText("privacy_policy_anchor_text", activeConfig.privacy_policy_anchor_text || "Privacy Policy")
|
|
2725
2867
|
}
|
|
2726
2868
|
)
|
|
2727
2869
|
]
|
|
2728
2870
|
}
|
|
2729
2871
|
) : null,
|
|
2730
|
-
(activeConfig == null ? void 0 : activeConfig.purposes) && activeConfig.purposes.length > 0 ? /* @__PURE__ */ (0,
|
|
2731
|
-
|
|
2872
|
+
(activeConfig == null ? void 0 : activeConfig.purposes) && activeConfig.purposes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2873
|
+
import_react_native6.Text,
|
|
2732
2874
|
{
|
|
2733
2875
|
style: [
|
|
2734
|
-
|
|
2876
|
+
styles3.subTitle,
|
|
2735
2877
|
{ marginTop: 16, marginBottom: 8 },
|
|
2736
2878
|
{ color: headingColor },
|
|
2737
|
-
activeTTSSegmentKey === "purpose_section_heading" ?
|
|
2879
|
+
activeTTSSegmentKey === "purpose_section_heading" ? styles3.ttsHighlight : null
|
|
2738
2880
|
],
|
|
2739
2881
|
children: getTranslatedText("purpose_section_heading", activeConfig.purpose_section_heading || "Data Purposes")
|
|
2740
2882
|
}
|
|
2741
2883
|
) : null,
|
|
2742
|
-
/* @__PURE__ */ (0,
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: styles3.optionsContainer, children: activeConfig == null ? void 0 : activeConfig.purposes.map((purpose) => {
|
|
2743
2885
|
var _a2;
|
|
2744
2886
|
const purposeSelection = (_a2 = content == null ? void 0 : content.detail.purpose_selections) == null ? void 0 : _a2[purpose.uuid];
|
|
2745
2887
|
const isAlreadyConsented = !isReconsentMode && ((purposeSelection == null ? void 0 : purposeSelection.selected) || false) && !(purposeSelection == null ? void 0 : purposeSelection.needs_reconsent);
|
|
2746
|
-
return /* @__PURE__ */ (0,
|
|
2888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2747
2889
|
PurposeItem,
|
|
2748
2890
|
{
|
|
2749
2891
|
purpose,
|
|
@@ -2776,95 +2918,95 @@ var RedactoNoticeConsent = ({
|
|
|
2776
2918
|
}
|
|
2777
2919
|
return fallback;
|
|
2778
2920
|
};
|
|
2779
|
-
return /* @__PURE__ */ (0,
|
|
2780
|
-
translatedAdditionalText ? /* @__PURE__ */ (0,
|
|
2921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.View, { style: { marginTop: 8, paddingTop: 8, borderTopWidth: 1, borderTopColor: "rgba(152, 162, 179, 0.3)", opacity: 0.6 }, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: [styles3.privacyText, { fontSize: 14, color: dpoTextColor }], children: [
|
|
2922
|
+
translatedAdditionalText ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "additional_text" ? styles3.ttsHighlight : null, children: [
|
|
2781
2923
|
translatedAdditionalText,
|
|
2782
2924
|
" "
|
|
2783
2925
|
] }) : null,
|
|
2784
|
-
(activeConfig == null ? void 0 : activeConfig.privacy_center_url) ? /* @__PURE__ */ (0,
|
|
2785
|
-
/* @__PURE__ */ (0,
|
|
2786
|
-
|
|
2926
|
+
(activeConfig == null ? void 0 : activeConfig.privacy_center_url) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
2927
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2928
|
+
import_react_native6.Text,
|
|
2787
2929
|
{
|
|
2788
2930
|
style: [
|
|
2789
|
-
|
|
2931
|
+
styles3.link,
|
|
2790
2932
|
{ color: linkColor },
|
|
2791
|
-
activeTTSSegmentKey === "privacy_center_anchor_text" ?
|
|
2933
|
+
activeTTSSegmentKey === "privacy_center_anchor_text" ? styles3.ttsHighlight : null
|
|
2792
2934
|
],
|
|
2793
|
-
onPress: () =>
|
|
2935
|
+
onPress: () => import_react_native6.Linking.openURL(activeConfig.privacy_center_url),
|
|
2794
2936
|
children: getTranslatedText("privacy_center_anchor_text", activeConfig.privacy_center_anchor_text || "Privacy Center")
|
|
2795
2937
|
}
|
|
2796
2938
|
),
|
|
2797
2939
|
".\n"
|
|
2798
2940
|
] }) : null,
|
|
2799
|
-
(dpo == null ? void 0 : dpo.grievance_text) ? /* @__PURE__ */ (0,
|
|
2800
|
-
/* @__PURE__ */ (0,
|
|
2941
|
+
(dpo == null ? void 0 : dpo.grievance_text) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
2942
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "dpo-grievance-text" ? styles3.ttsHighlight : null, children: [
|
|
2801
2943
|
getT("grievance_text", dpo.grievance_text),
|
|
2802
2944
|
" "
|
|
2803
2945
|
] }),
|
|
2804
|
-
/* @__PURE__ */ (0,
|
|
2805
|
-
|
|
2946
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2947
|
+
import_react_native6.Text,
|
|
2806
2948
|
{
|
|
2807
2949
|
style: [
|
|
2808
|
-
|
|
2950
|
+
styles3.link,
|
|
2809
2951
|
{ color: linkColor },
|
|
2810
|
-
activeTTSSegmentKey === "dpo-grievance-link" ?
|
|
2952
|
+
activeTTSSegmentKey === "dpo-grievance-link" ? styles3.ttsHighlight : null
|
|
2811
2953
|
],
|
|
2812
|
-
onPress: () =>
|
|
2954
|
+
onPress: () => import_react_native6.Linking.openURL(dpo.grievance_url),
|
|
2813
2955
|
children: getT("grievance_anchor_text", dpo.grievance_anchor_text)
|
|
2814
2956
|
}
|
|
2815
2957
|
),
|
|
2816
|
-
dpo.grievance_email ? /* @__PURE__ */ (0,
|
|
2958
|
+
dpo.grievance_email ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
2817
2959
|
" ",
|
|
2818
|
-
/* @__PURE__ */ (0,
|
|
2960
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: activeTTSSegmentKey === "dpo-grievance-email-connector" ? styles3.ttsHighlight : null, children: getT("grievance_email_connector_text", dpo.grievance_email_connector_text || "or email to") }),
|
|
2819
2961
|
" ",
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
2821
|
-
|
|
2962
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2963
|
+
import_react_native6.Text,
|
|
2822
2964
|
{
|
|
2823
2965
|
style: [
|
|
2824
|
-
|
|
2966
|
+
styles3.link,
|
|
2825
2967
|
{ color: linkColor },
|
|
2826
|
-
activeTTSSegmentKey === "dpo-grievance-email" ?
|
|
2968
|
+
activeTTSSegmentKey === "dpo-grievance-email" ? styles3.ttsHighlight : null
|
|
2827
2969
|
],
|
|
2828
|
-
onPress: () =>
|
|
2970
|
+
onPress: () => import_react_native6.Linking.openURL(`mailto:${dpo.grievance_email}`),
|
|
2829
2971
|
children: dpo.grievance_email
|
|
2830
2972
|
}
|
|
2831
2973
|
)
|
|
2832
2974
|
] }) : null,
|
|
2833
2975
|
"\n"
|
|
2834
2976
|
] }) : null,
|
|
2835
|
-
(dpo == null ? void 0 : dpo.dp_board_text) ? /* @__PURE__ */ (0,
|
|
2836
|
-
/* @__PURE__ */ (0,
|
|
2977
|
+
(dpo == null ? void 0 : dpo.dp_board_text) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
2978
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "dpo-dp-board-text" ? styles3.ttsHighlight : null, children: [
|
|
2837
2979
|
getT("dp_board_text", dpo.dp_board_text),
|
|
2838
2980
|
" "
|
|
2839
2981
|
] }),
|
|
2840
|
-
/* @__PURE__ */ (0,
|
|
2841
|
-
|
|
2982
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2983
|
+
import_react_native6.Text,
|
|
2842
2984
|
{
|
|
2843
2985
|
style: [
|
|
2844
|
-
|
|
2986
|
+
styles3.link,
|
|
2845
2987
|
{ color: linkColor },
|
|
2846
|
-
activeTTSSegmentKey === "dpo-dp-board-link" ?
|
|
2988
|
+
activeTTSSegmentKey === "dpo-dp-board-link" ? styles3.ttsHighlight : null
|
|
2847
2989
|
],
|
|
2848
|
-
onPress: () =>
|
|
2990
|
+
onPress: () => import_react_native6.Linking.openURL(dpo.dp_board_url),
|
|
2849
2991
|
children: getT("dp_board_anchor_text", dpo.dp_board_anchor_text)
|
|
2850
2992
|
}
|
|
2851
2993
|
),
|
|
2852
2994
|
"\n"
|
|
2853
2995
|
] }) : null,
|
|
2854
|
-
(dpo == null ? void 0 : dpo.dpo_text) ? /* @__PURE__ */ (0,
|
|
2855
|
-
/* @__PURE__ */ (0,
|
|
2996
|
+
(dpo == null ? void 0 : dpo.dpo_text) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
2997
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react_native6.Text, { style: activeTTSSegmentKey === "dpo-dpo-text" ? styles3.ttsHighlight : null, children: [
|
|
2856
2998
|
getT("dpo_text", dpo.dpo_text),
|
|
2857
2999
|
" "
|
|
2858
3000
|
] }),
|
|
2859
|
-
/* @__PURE__ */ (0,
|
|
2860
|
-
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3002
|
+
import_react_native6.Text,
|
|
2861
3003
|
{
|
|
2862
3004
|
style: [
|
|
2863
|
-
|
|
3005
|
+
styles3.link,
|
|
2864
3006
|
{ color: linkColor },
|
|
2865
|
-
activeTTSSegmentKey === "dpo-dpo-link" ?
|
|
3007
|
+
activeTTSSegmentKey === "dpo-dpo-link" ? styles3.ttsHighlight : null
|
|
2866
3008
|
],
|
|
2867
|
-
onPress: () =>
|
|
3009
|
+
onPress: () => import_react_native6.Linking.openURL(dpo.dpo_url),
|
|
2868
3010
|
children: getT("dpo_anchor_text", dpo.dpo_anchor_text)
|
|
2869
3011
|
}
|
|
2870
3012
|
)
|
|
@@ -2872,62 +3014,114 @@ var RedactoNoticeConsent = ({
|
|
|
2872
3014
|
] }) });
|
|
2873
3015
|
})() : null
|
|
2874
3016
|
] }),
|
|
2875
|
-
/* @__PURE__ */ (0,
|
|
2876
|
-
|
|
3017
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3018
|
+
import_react_native6.View,
|
|
2877
3019
|
{
|
|
2878
|
-
style:
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
3020
|
+
style: isReviewMode ? styles3.bottomSection : isMobile ? styles3.actionButtonStack : styles3.actionButtonRow,
|
|
3021
|
+
children: isReviewMode ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3022
|
+
import_react_native6.TouchableOpacity,
|
|
3023
|
+
{
|
|
3024
|
+
style: [styles3.button, styles3.acceptButton, acceptButtonStyle],
|
|
3025
|
+
onPress: () => setIsReviewMode(false),
|
|
3026
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.Text, { style: [styles3.buttonText, styles3.acceptButtonText, acceptButtonTextStyle], children: reviewModeButtonText || "Update Consent" })
|
|
3027
|
+
}
|
|
3028
|
+
) : (
|
|
3029
|
+
/* Rendered in a different order per breakpoint rather than
|
|
3030
|
+
reordered with styles, so focus order follows visual order. */
|
|
3031
|
+
footerButtonOrder.map((slot) => {
|
|
3032
|
+
if (slot === "acceptAll") {
|
|
3033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3034
|
+
import_react_native6.TouchableOpacity,
|
|
3035
|
+
{
|
|
3036
|
+
style: [
|
|
3037
|
+
styles3.button,
|
|
3038
|
+
widthStyle,
|
|
3039
|
+
styles3.acceptButton,
|
|
3040
|
+
acceptAllButtonStyle,
|
|
3041
|
+
isSubmitting ? { opacity: 0.5 } : null
|
|
3042
|
+
],
|
|
3043
|
+
onPress: handleAcceptAll,
|
|
3044
|
+
disabled: isSubmitting,
|
|
3045
|
+
accessibilityLabel: acceptAllLabel,
|
|
3046
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3047
|
+
import_react_native6.Text,
|
|
3048
|
+
{
|
|
3049
|
+
style: [
|
|
3050
|
+
styles3.buttonText,
|
|
3051
|
+
styles3.acceptButtonText,
|
|
3052
|
+
acceptAllButtonTextStyle,
|
|
3053
|
+
activeTTSSegmentKey === "accept_all_button_text" ? styles3.ttsHighlight : null
|
|
3054
|
+
],
|
|
3055
|
+
children: acceptAllLabel
|
|
3056
|
+
}
|
|
3057
|
+
)
|
|
3058
|
+
},
|
|
3059
|
+
slot
|
|
3060
|
+
);
|
|
2905
3061
|
}
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
3062
|
+
if (slot === "acceptSelected") {
|
|
3063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3064
|
+
import_react_native6.TouchableOpacity,
|
|
3065
|
+
{
|
|
3066
|
+
style: [
|
|
3067
|
+
styles3.button,
|
|
3068
|
+
widthStyle,
|
|
3069
|
+
styles3.acceptSecondaryButton,
|
|
3070
|
+
acceptSelectedButtonStyle,
|
|
3071
|
+
isSubmitting || !areAllRequiredElementsChecked ? { opacity: 0.5 } : null
|
|
3072
|
+
],
|
|
3073
|
+
onPress: handleAcceptSelected,
|
|
3074
|
+
disabled: isSubmitting || !areAllRequiredElementsChecked,
|
|
3075
|
+
accessibilityLabel: isSubmitting ? "Submitting consent" : acceptSelectedLabel,
|
|
3076
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native6.ActivityIndicator, { size: "small", color: accentColor }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3077
|
+
import_react_native6.Text,
|
|
3078
|
+
{
|
|
3079
|
+
style: [
|
|
3080
|
+
styles3.buttonText,
|
|
3081
|
+
styles3.acceptSecondaryButtonText,
|
|
3082
|
+
acceptSelectedButtonTextStyle,
|
|
3083
|
+
activeTTSSegmentKey === "confirm_button_text" ? styles3.ttsHighlight : null
|
|
3084
|
+
],
|
|
3085
|
+
children: acceptSelectedLabel
|
|
3086
|
+
}
|
|
3087
|
+
)
|
|
3088
|
+
},
|
|
3089
|
+
slot
|
|
3090
|
+
);
|
|
2926
3091
|
}
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
3092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3093
|
+
import_react_native6.TouchableOpacity,
|
|
3094
|
+
{
|
|
3095
|
+
style: [
|
|
3096
|
+
styles3.button,
|
|
3097
|
+
widthStyle,
|
|
3098
|
+
styles3.cancelButton,
|
|
3099
|
+
declineButtonStyle,
|
|
3100
|
+
isMobile ? null : styles3.declineSpacer,
|
|
3101
|
+
isSubmitting ? { opacity: 0.5 } : null
|
|
3102
|
+
],
|
|
3103
|
+
onPress: handleDecline,
|
|
3104
|
+
disabled: isSubmitting,
|
|
3105
|
+
accessibilityLabel: declineLabel,
|
|
3106
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3107
|
+
import_react_native6.Text,
|
|
3108
|
+
{
|
|
3109
|
+
style: [
|
|
3110
|
+
styles3.buttonText,
|
|
3111
|
+
styles3.cancelButtonText,
|
|
3112
|
+
declineButtonTextStyle,
|
|
3113
|
+
activeTTSSegmentKey === "decline_button_text" ? styles3.ttsHighlight : null
|
|
3114
|
+
],
|
|
3115
|
+
children: declineLabel
|
|
3116
|
+
}
|
|
3117
|
+
)
|
|
3118
|
+
},
|
|
3119
|
+
slot
|
|
3120
|
+
);
|
|
3121
|
+
})
|
|
3122
|
+
)
|
|
3123
|
+
}
|
|
3124
|
+
)
|
|
2931
3125
|
] })
|
|
2932
3126
|
}
|
|
2933
3127
|
)
|
|
@@ -2938,7 +3132,7 @@ var RedactoNoticeConsent = ({
|
|
|
2938
3132
|
|
|
2939
3133
|
// src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
|
|
2940
3134
|
var import_react3 = require("react");
|
|
2941
|
-
var
|
|
3135
|
+
var import_react_native8 = require("react-native");
|
|
2942
3136
|
var import_react_native_svg4 = __toESM(require("react-native-svg"));
|
|
2943
3137
|
|
|
2944
3138
|
// src/RedactoNoticeConsentInline/api/index.ts
|
|
@@ -3104,15 +3298,15 @@ var fetchNoticeConsentStatusForScope = async ({
|
|
|
3104
3298
|
var isNoticeFullyConsented = (status) => status.consented && status.all_mandatory_active;
|
|
3105
3299
|
|
|
3106
3300
|
// src/RedactoNoticeConsentInline/styles.ts
|
|
3107
|
-
var
|
|
3108
|
-
var
|
|
3301
|
+
var import_react_native7 = require("react-native");
|
|
3302
|
+
var styles4 = import_react_native7.StyleSheet.create({
|
|
3109
3303
|
container: {
|
|
3110
3304
|
width: "100%",
|
|
3111
3305
|
borderRadius: 8,
|
|
3112
3306
|
backgroundColor: "#ffffff",
|
|
3113
3307
|
borderWidth: 1,
|
|
3114
3308
|
borderColor: "#e5e7eb",
|
|
3115
|
-
...
|
|
3309
|
+
...import_react_native7.Platform.select({
|
|
3116
3310
|
ios: {
|
|
3117
3311
|
shadowColor: "#000",
|
|
3118
3312
|
shadowOffset: { width: 0, height: 1 },
|
|
@@ -3305,9 +3499,6 @@ var styles3 = import_react_native6.StyleSheet.create({
|
|
|
3305
3499
|
color: "#DC2626",
|
|
3306
3500
|
fontSize: 14
|
|
3307
3501
|
},
|
|
3308
|
-
requiredAsterisk: {
|
|
3309
|
-
color: "red"
|
|
3310
|
-
},
|
|
3311
3502
|
purposeChevron: {
|
|
3312
3503
|
marginLeft: 5,
|
|
3313
3504
|
alignItems: "center",
|
|
@@ -3328,7 +3519,7 @@ var styles3 = import_react_native6.StyleSheet.create({
|
|
|
3328
3519
|
minWidth: 120,
|
|
3329
3520
|
maxHeight: 200,
|
|
3330
3521
|
marginTop: 4,
|
|
3331
|
-
...
|
|
3522
|
+
...import_react_native7.Platform.select({
|
|
3332
3523
|
ios: {
|
|
3333
3524
|
shadowColor: "#000",
|
|
3334
3525
|
shadowOffset: { width: 0, height: 2 },
|
|
@@ -3359,7 +3550,7 @@ var styles3 = import_react_native6.StyleSheet.create({
|
|
|
3359
3550
|
});
|
|
3360
3551
|
|
|
3361
3552
|
// src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
|
|
3362
|
-
var
|
|
3553
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
3363
3554
|
var RedactoConsentInlineComponent = ({
|
|
3364
3555
|
org_uuid,
|
|
3365
3556
|
workspace_uuid,
|
|
@@ -3670,28 +3861,28 @@ var RedactoConsentInlineComponent = ({
|
|
|
3670
3861
|
);
|
|
3671
3862
|
if (hasAlreadyConsented || fetchError) return null;
|
|
3672
3863
|
if (isLoading) {
|
|
3673
|
-
return /* @__PURE__ */ (0,
|
|
3674
|
-
/* @__PURE__ */ (0,
|
|
3675
|
-
/* @__PURE__ */ (0,
|
|
3864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.loadingContainer, children: [
|
|
3865
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.ActivityIndicator, { size: "large", color: "#4f87ff" }),
|
|
3866
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: [styles4.loadingText, { color: textColor }], children: "Loading..." })
|
|
3676
3867
|
] });
|
|
3677
3868
|
}
|
|
3678
3869
|
if (!content) return null;
|
|
3679
|
-
return /* @__PURE__ */ (0,
|
|
3680
|
-
errorMessage ? /* @__PURE__ */ (0,
|
|
3681
|
-
supportedLanguages.length > 0 && /* @__PURE__ */ (0,
|
|
3682
|
-
/* @__PURE__ */ (0,
|
|
3683
|
-
/* @__PURE__ */ (0,
|
|
3684
|
-
/* @__PURE__ */ (0,
|
|
3685
|
-
|
|
3870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: { gap: 16 }, children: [
|
|
3871
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, { style: styles4.errorContainer, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: styles4.errorText, children: errorMessage }) }) : null,
|
|
3872
|
+
supportedLanguages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: [styles4.topSection, { borderBottomWidth: 0, paddingBottom: 0 }], children: [
|
|
3873
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, {}),
|
|
3874
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.languageSelectorContainer, children: [
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
3876
|
+
import_react_native8.TouchableOpacity,
|
|
3686
3877
|
{
|
|
3687
3878
|
style: [
|
|
3688
|
-
|
|
3879
|
+
styles4.topRight,
|
|
3689
3880
|
((_a = settings == null ? void 0 : settings.button) == null ? void 0 : _a.language) ? { backgroundColor: settings.button.language.backgroundColor, borderColor: settings.button.language.backgroundColor } : null
|
|
3690
3881
|
],
|
|
3691
3882
|
onPress: () => setIsLanguageDropdownOpen((v) => !v),
|
|
3692
3883
|
children: [
|
|
3693
|
-
/* @__PURE__ */ (0,
|
|
3694
|
-
/* @__PURE__ */ (0,
|
|
3884
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: [styles4.topRightText, ((_b = settings == null ? void 0 : settings.button) == null ? void 0 : _b.language) ? { color: settings.button.language.textColor } : null], children: selectedLanguage }),
|
|
3885
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native_svg4.default, { width: 12, height: 12, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3695
3886
|
import_react_native_svg4.Path,
|
|
3696
3887
|
{
|
|
3697
3888
|
d: "M4 6L8 10L12 6",
|
|
@@ -3704,34 +3895,34 @@ var RedactoConsentInlineComponent = ({
|
|
|
3704
3895
|
]
|
|
3705
3896
|
}
|
|
3706
3897
|
),
|
|
3707
|
-
isLanguageDropdownOpen && /* @__PURE__ */ (0,
|
|
3708
|
-
|
|
3898
|
+
isLanguageDropdownOpen && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, { style: styles4.languageDropdown, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.ScrollView, { children: supportedLanguages.map((lang) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3899
|
+
import_react_native8.TouchableOpacity,
|
|
3709
3900
|
{
|
|
3710
3901
|
style: [
|
|
3711
|
-
|
|
3712
|
-
lang === selectedLanguage ?
|
|
3902
|
+
styles4.languageItem,
|
|
3903
|
+
lang === selectedLanguage ? styles4.selectedLanguageItem : null
|
|
3713
3904
|
],
|
|
3714
3905
|
onPress: () => {
|
|
3715
3906
|
setSelectedLanguage(lang);
|
|
3716
3907
|
setIsLanguageDropdownOpen(false);
|
|
3717
3908
|
},
|
|
3718
|
-
children: /* @__PURE__ */ (0,
|
|
3909
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: [styles4.languageItemText, lang === selectedLanguage ? styles4.selectedLanguageItemText : null], children: lang })
|
|
3719
3910
|
},
|
|
3720
3911
|
lang
|
|
3721
3912
|
)) }) })
|
|
3722
3913
|
] })
|
|
3723
3914
|
] }),
|
|
3724
|
-
content.purposes.map((purpose) => /* @__PURE__ */ (0,
|
|
3725
|
-
/* @__PURE__ */ (0,
|
|
3726
|
-
/* @__PURE__ */ (0,
|
|
3727
|
-
|
|
3915
|
+
content.purposes.map((purpose) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { children: [
|
|
3916
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.optionItem, children: [
|
|
3917
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
3918
|
+
import_react_native8.TouchableOpacity,
|
|
3728
3919
|
{
|
|
3729
|
-
style:
|
|
3920
|
+
style: styles4.optionLeft,
|
|
3730
3921
|
onPress: () => togglePurposeCollapse(purpose.uuid),
|
|
3731
3922
|
accessibilityRole: "button",
|
|
3732
3923
|
accessibilityLabel: `${collapsedPurposes[purpose.uuid] ? "Expand" : "Collapse"} ${getTranslatedText("purposes.name", purpose.name, purpose.uuid)}`,
|
|
3733
3924
|
children: [
|
|
3734
|
-
/* @__PURE__ */ (0,
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, { style: styles4.purposeChevron, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native_svg4.default, { width: 7, height: 12, viewBox: "0 0 7 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3735
3926
|
import_react_native_svg4.Path,
|
|
3736
3927
|
{
|
|
3737
3928
|
d: "M1 1L6 6L1 11",
|
|
@@ -3742,14 +3933,17 @@ var RedactoConsentInlineComponent = ({
|
|
|
3742
3933
|
transform: !collapsedPurposes[purpose.uuid] ? "rotate(90 3.5 6)" : void 0
|
|
3743
3934
|
}
|
|
3744
3935
|
) }) }),
|
|
3745
|
-
/* @__PURE__ */ (0,
|
|
3746
|
-
/* @__PURE__ */ (0,
|
|
3747
|
-
|
|
3936
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.optionTextContainer, children: [
|
|
3937
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.Text, { style: [styles4.optionTitle, { color: headingColor }, isMobile ? { fontSize: 14 } : null], children: [
|
|
3938
|
+
getTranslatedText("purposes.name", purpose.name, purpose.uuid),
|
|
3939
|
+
hasRequiredDataElement(purpose) && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, {})
|
|
3940
|
+
] }),
|
|
3941
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.Text, { style: [styles4.optionDescription, { color: textColor }, isMobile ? { fontSize: 11 } : null], children: getTranslatedText("purposes.description", purpose.description, purpose.uuid) })
|
|
3748
3942
|
] })
|
|
3749
3943
|
]
|
|
3750
3944
|
}
|
|
3751
3945
|
),
|
|
3752
|
-
/* @__PURE__ */ (0,
|
|
3946
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3753
3947
|
Checkbox,
|
|
3754
3948
|
{
|
|
3755
3949
|
checked: selectedPurposes[purpose.uuid] || false,
|
|
@@ -3760,12 +3954,12 @@ var RedactoConsentInlineComponent = ({
|
|
|
3760
3954
|
}
|
|
3761
3955
|
)
|
|
3762
3956
|
] }),
|
|
3763
|
-
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0,
|
|
3764
|
-
/* @__PURE__ */ (0,
|
|
3957
|
+
!collapsedPurposes[purpose.uuid] && purpose.data_elements && purpose.data_elements.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native8.View, { style: styles4.dataElementsContainer, children: purpose.data_elements.map((dataElement) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.View, { style: styles4.dataElementItem, children: [
|
|
3958
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native8.Text, { style: [styles4.dataElementText, { color: textColor }, isMobile ? { fontSize: 12 } : null], children: [
|
|
3765
3959
|
getTranslatedText("data_elements.name", dataElement.name, dataElement.uuid),
|
|
3766
|
-
dataElement.required && /* @__PURE__ */ (0,
|
|
3960
|
+
dataElement.required && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RequiredMarker, {})
|
|
3767
3961
|
] }),
|
|
3768
|
-
/* @__PURE__ */ (0,
|
|
3962
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3769
3963
|
Checkbox,
|
|
3770
3964
|
{
|
|
3771
3965
|
checked: selectedDataElements[`${purpose.uuid}-${dataElement.uuid}`] || false,
|