@redacto.io/consent-sdk-react 4.0.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/LICENSE +176 -0
- package/dist/index.js +231 -96
- package/dist/index.mjs +231 -96
- package/dist/privacy-center.d.mts +649 -0
- package/dist/privacy-center.d.ts +649 -0
- package/dist/privacy-center.js +20824 -0
- package/dist/privacy-center.mjs +20789 -0
- package/package.json +47 -3
- package/src/RedactoNoticeConsent/RedactoNoticeConsent.tsx +6 -4
- package/src/RedactoNoticeConsent/api/index.ts +2 -0
- package/src/RedactoNoticeConsent/api/types.ts +2 -0
- package/src/RedactoNoticeConsent/components/DigiLockerCallback.tsx +128 -62
- package/src/RedactoNoticeConsent/language-codes.ts +97 -0
- package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx +0 -3
- package/src/RedactoNoticeConsentInline/api/index.ts +0 -1
- package/src/RedactoPrivacyCenter/PrivacyCenterActivityPage.tsx +19 -0
- package/src/RedactoPrivacyCenter/PrivacyCenterCaseDetailsPage.tsx +154 -0
- package/src/RedactoPrivacyCenter/PrivacyCenterConsentManagerPage.tsx +17 -0
- package/src/RedactoPrivacyCenter/PrivacyCenterFormPage.tsx +79 -0
- package/src/RedactoPrivacyCenter/PrivacyCenterHomePage.tsx +30 -0
- package/src/RedactoPrivacyCenter/PrivacyCenterLayout.tsx +173 -0
- package/src/RedactoPrivacyCenter/RedactoPrivacyCenter.tsx +55 -0
- package/src/RedactoPrivacyCenter/api/actions.ts +476 -0
- package/src/RedactoPrivacyCenter/api/client.ts +524 -0
- package/src/RedactoPrivacyCenter/api/config.ts +33 -0
- package/src/RedactoPrivacyCenter/api/fetcher.ts +181 -0
- package/src/RedactoPrivacyCenter/api/upload.ts +93 -0
- package/src/RedactoPrivacyCenter/assets/character.svg +31 -0
- package/src/RedactoPrivacyCenter/assets/fileAttach.svg +9 -0
- package/src/RedactoPrivacyCenter/assets/greenTick.svg +4 -0
- package/src/RedactoPrivacyCenter/assets/mail.svg +3 -0
- package/src/RedactoPrivacyCenter/assets/poweredByRedacto.svg +9 -0
- package/src/RedactoPrivacyCenter/assets/sentImg.svg +9 -0
- package/src/RedactoPrivacyCenter/assets/uploadFileIcon.svg +9 -0
- package/src/RedactoPrivacyCenter/components/ActivitiesList.tsx +272 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/AttachmentCard.tsx +38 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/ChatBubble.tsx +31 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/DocumentRequestCard.tsx +73 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/MessageComposer.tsx +87 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/MessageItem.tsx +95 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/MessagesTab.tsx +147 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/RequestDetailsTab.tsx +171 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/StatusEvent.tsx +23 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/useFileUpload.ts +116 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/useMessagePolling.ts +36 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/utils.ts +56 -0
- package/src/RedactoPrivacyCenter/components/CaseDetailsModal.tsx +469 -0
- package/src/RedactoPrivacyCenter/components/CaseHistory.tsx +426 -0
- package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +732 -0
- package/src/RedactoPrivacyCenter/components/ConsentManagerColumns.tsx +238 -0
- package/src/RedactoPrivacyCenter/components/ConsentManagerConstants.ts +7 -0
- package/src/RedactoPrivacyCenter/components/ConsentManagerTableSkeleton.tsx +155 -0
- package/src/RedactoPrivacyCenter/components/DataRequest/CorrectionDataSection.tsx +189 -0
- package/src/RedactoPrivacyCenter/components/DataRequest/GrievanceDataSection.tsx +118 -0
- package/src/RedactoPrivacyCenter/components/DataRequest/NominationDataSection.tsx +66 -0
- package/src/RedactoPrivacyCenter/components/DataRequest/PurposeSelectionSection.tsx +304 -0
- package/src/RedactoPrivacyCenter/components/Form.tsx +1596 -0
- package/src/RedactoPrivacyCenter/components/GrievanceTable.tsx +174 -0
- package/src/RedactoPrivacyCenter/components/GrievanceTablePagination.tsx +337 -0
- package/src/RedactoPrivacyCenter/components/ModifyConsentModal.tsx +330 -0
- package/src/RedactoPrivacyCenter/components/Pagination.tsx +140 -0
- package/src/RedactoPrivacyCenter/components/PrivacyCenterLayout.tsx +304 -0
- package/src/RedactoPrivacyCenter/components/RequestSubmit.tsx +232 -0
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideBarPC.tsx +475 -0
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideMenuPC.tsx +408 -0
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/constants.tsx +42 -0
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/menuItemsPC.tsx +1 -0
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/types.ts +40 -0
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/utils.ts +38 -0
- package/src/RedactoPrivacyCenter/components/ThemeTransitionOverlay.tsx +85 -0
- package/src/RedactoPrivacyCenter/components/activitiesColumns.tsx +141 -0
- package/src/RedactoPrivacyCenter/components/caseHistoryColumns.tsx +159 -0
- package/src/RedactoPrivacyCenter/components/constant.ts +16 -0
- package/src/RedactoPrivacyCenter/components/types.ts +76 -0
- package/src/RedactoPrivacyCenter/components/utils.tsx +10 -0
- package/src/RedactoPrivacyCenter/config/routes.ts +9 -0
- package/src/RedactoPrivacyCenter/config/table.ts +25 -0
- package/src/RedactoPrivacyCenter/context/AuthContext.tsx +137 -0
- package/src/RedactoPrivacyCenter/context/BaseUrlContext.tsx +41 -0
- package/src/RedactoPrivacyCenter/context/LocaleContext.tsx +11 -0
- package/src/RedactoPrivacyCenter/context/NavigationContext.tsx +96 -0
- package/src/RedactoPrivacyCenter/context/OrganizationContext.tsx +30 -0
- package/src/RedactoPrivacyCenter/context/PageChromeContext.tsx +60 -0
- package/src/RedactoPrivacyCenter/context/theme.tsx +127 -0
- package/src/RedactoPrivacyCenter/context/types.ts +14 -0
- package/src/RedactoPrivacyCenter/lib/api.ts +566 -0
- package/src/RedactoPrivacyCenter/lib/consent-manager/utils.tsx +63 -0
- package/src/RedactoPrivacyCenter/lib/constants.ts +161 -0
- package/src/RedactoPrivacyCenter/lib/i18n.ts +81 -0
- package/src/RedactoPrivacyCenter/lib/locales.ts +105 -0
- package/src/RedactoPrivacyCenter/lib/queries.ts +134 -0
- package/src/RedactoPrivacyCenter/lib/types.ts +531 -0
- package/src/RedactoPrivacyCenter/lib/useCurrentLanguage.ts +37 -0
- package/src/RedactoPrivacyCenter/lib/utils.ts +626 -0
- package/src/RedactoPrivacyCenter/locales/as/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/bho/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/bn/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/brx/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/doi/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/en/translation.json +255 -0
- package/src/RedactoPrivacyCenter/locales/gom/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/gu/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/hi/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/kn/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/ks/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/mai/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/ml/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/mr/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/ne/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/or/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/pa/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/sa/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/sat/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/sd/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/ta/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/te/translation.json +280 -0
- package/src/RedactoPrivacyCenter/locales/ur/translation.json +280 -0
- package/src/RedactoPrivacyCenter/styles/base.css +117 -0
- package/src/RedactoPrivacyCenter/styles/injectStyles.ts +1725 -0
- package/src/RedactoPrivacyCenter/styles/pcStyles.ts +813 -0
- package/src/RedactoPrivacyCenter/styles/responsive.ts +138 -0
- package/src/RedactoPrivacyCenter/styles/variables.css +133 -0
- package/src/RedactoPrivacyCenter/table/AdvancedTable.tsx +367 -0
- package/src/RedactoPrivacyCenter/table/AdvancedTablePagination.tsx +476 -0
- package/src/RedactoPrivacyCenter/table/index.ts +2 -0
- package/src/RedactoPrivacyCenter/types/images.d.ts +29 -0
- package/src/RedactoPrivacyCenter/ui/Footer.tsx +75 -0
- package/src/RedactoPrivacyCenter/ui/FormBlockWrapper.tsx +54 -0
- package/src/RedactoPrivacyCenter/ui/PCAccordion.tsx +93 -0
- package/src/RedactoPrivacyCenter/ui/PCActionIcon.tsx +47 -0
- package/src/RedactoPrivacyCenter/ui/PCAvatar.tsx +69 -0
- package/src/RedactoPrivacyCenter/ui/PCBadge.tsx +48 -0
- package/src/RedactoPrivacyCenter/ui/PCButton.tsx +77 -0
- package/src/RedactoPrivacyCenter/ui/PCCheckbox.tsx +55 -0
- package/src/RedactoPrivacyCenter/ui/PCCollapse.tsx +107 -0
- package/src/RedactoPrivacyCenter/ui/PCEmpty.tsx +35 -0
- package/src/RedactoPrivacyCenter/ui/PCInput.tsx +132 -0
- package/src/RedactoPrivacyCenter/ui/PCLoader.tsx +31 -0
- package/src/RedactoPrivacyCenter/ui/PCModal.tsx +106 -0
- package/src/RedactoPrivacyCenter/ui/PCPopover.tsx +173 -0
- package/src/RedactoPrivacyCenter/ui/PCSelect.tsx +387 -0
- package/src/RedactoPrivacyCenter/ui/PCTable.tsx +149 -0
- package/src/RedactoPrivacyCenter/ui/PCText.tsx +41 -0
- package/src/RedactoPrivacyCenter/ui/PCTextarea.tsx +43 -0
- package/src/RedactoPrivacyCenter/ui/PCTitle.tsx +37 -0
- package/src/RedactoPrivacyCenter/ui/PCTooltip.tsx +119 -0
- package/src/RedactoPrivacyCenter/ui/SimpleBar.tsx +25 -0
- package/src/RedactoPrivacyCenter/ui/StatusBadge.tsx +53 -0
- package/src/RedactoPrivacyCenter/ui/ThemeToggle.tsx +72 -0
- package/src/RedactoPrivacyCenter/ui/index.ts +18 -0
- package/src/RedactoPrivacyCenter/utils/cn.ts +28 -0
- package/src/RedactoPrivacyCenter/utils/date.ts +48 -0
- package/src/RedactoPrivacyCenter/utils/status.ts +111 -0
- package/src/RedactoPrivacyCenter/utils/toast.ts +130 -0
- package/src/privacy-center.ts +108 -0
- package/tsconfig.json +2 -0
- package/tsup.config.ts +16 -1
- package/.turbo/turbo-build.log +0 -21
package/dist/index.mjs
CHANGED
|
@@ -106,6 +106,7 @@ var submitConsentEvent = async ({
|
|
|
106
106
|
noticeUuid,
|
|
107
107
|
purposes,
|
|
108
108
|
declined,
|
|
109
|
+
language,
|
|
109
110
|
meta_data,
|
|
110
111
|
guardianVerificationReference,
|
|
111
112
|
selfDeclaredAdult,
|
|
@@ -143,6 +144,7 @@ var submitConsentEvent = async ({
|
|
|
143
144
|
select_all_mandatory: false,
|
|
144
145
|
source: "WEB",
|
|
145
146
|
declined: Boolean(declined),
|
|
147
|
+
language: language || void 0,
|
|
146
148
|
meta_data: meta_data ? { specific_uuid: meta_data.specific_uuid, minor_age: meta_data.minor_age } : void 0,
|
|
147
149
|
guardian_verification_reference: guardianVerificationReference,
|
|
148
150
|
self_declared_adult: selfDeclaredAdult
|
|
@@ -421,6 +423,83 @@ var DPO_AUDIO_ELEMENT_MAP = [
|
|
|
421
423
|
{ audioKey: "dpo_anchor_text_audio_url", elementId: "dpo-dpo-link" }
|
|
422
424
|
];
|
|
423
425
|
|
|
426
|
+
// src/RedactoNoticeConsent/language-codes.ts
|
|
427
|
+
var LANGUAGE_NATIVE_LABELS = {
|
|
428
|
+
English: "English",
|
|
429
|
+
Assamese: "\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE (Assamese)",
|
|
430
|
+
Bengali: "\u09AC\u09BE\u0982\u09B2\u09BE (Bengali)",
|
|
431
|
+
Bhojpuri: "\u092D\u094B\u091C\u092A\u0941\u0930\u0940 (Bhojpuri)",
|
|
432
|
+
Bodo: "\u092C\u0921\u093C\u094B (Bodo)",
|
|
433
|
+
Dogri: "\u0921\u094B\u0917\u0930\u0940 (Dogri)",
|
|
434
|
+
Gujarati: "\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0 (Gujarati)",
|
|
435
|
+
Hindi: "\u0939\u093F\u0928\u094D\u0926\u0940 (Hindi)",
|
|
436
|
+
Kannada: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1 (Kannada)",
|
|
437
|
+
Kashmiri: "\u0643\u0672\u0634\u064F\u0631 (Kashmiri)",
|
|
438
|
+
"Goan Konkani": "\u0915\u094B\u0902\u0915\u0923\u0940 (Goan Konkani)",
|
|
439
|
+
Maithili: "\u092E\u0948\u0925\u093F\u0932\u0940 (Maithili)",
|
|
440
|
+
Malayalam: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02 (Malayalam)",
|
|
441
|
+
Manipuri: "\uABC3\uABE9\uABC7\uABE9\uABC2\uABE3\uABDF (Manipuri)",
|
|
442
|
+
Marathi: "\u092E\u0930\u093E\u0920\u0940 (Marathi)",
|
|
443
|
+
Nepali: "\u0928\u0947\u092A\u093E\u0932\u0940 (Nepali)",
|
|
444
|
+
Odia: "\u0B13\u0B21\u0B3C\u0B3F\u0B06 (Odia)",
|
|
445
|
+
Punjabi: "\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40 (Punjabi)",
|
|
446
|
+
Sanskrit: "\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D (Sanskrit)",
|
|
447
|
+
Santali: "\u1C65\u1C5F\u1C71\u1C5B\u1C5F\u1C72\u1C64 (Santali)",
|
|
448
|
+
Sindhi: "\u0633\u0646\u068C\u064A (Sindhi)",
|
|
449
|
+
Tamil: "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD (Tamil)",
|
|
450
|
+
Telugu: "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41 (Telugu)",
|
|
451
|
+
Urdu: "\u0627\u0631\u062F\u0648 (Urdu)"
|
|
452
|
+
};
|
|
453
|
+
var toNativeLabel = (name) => {
|
|
454
|
+
var _a;
|
|
455
|
+
return (_a = LANGUAGE_NATIVE_LABELS[name]) != null ? _a : name;
|
|
456
|
+
};
|
|
457
|
+
var LANGUAGE_NAME_TO_BCP47 = {
|
|
458
|
+
English: "en",
|
|
459
|
+
Assamese: "as",
|
|
460
|
+
Bengali: "bn",
|
|
461
|
+
Bhojpuri: "bho",
|
|
462
|
+
Bodo: "brx",
|
|
463
|
+
Dogri: "doi",
|
|
464
|
+
Gujarati: "gu",
|
|
465
|
+
Hindi: "hi",
|
|
466
|
+
Kannada: "kn",
|
|
467
|
+
Kashmiri: "ks",
|
|
468
|
+
"Goan Konkani": "gom",
|
|
469
|
+
Maithili: "mai",
|
|
470
|
+
Malayalam: "ml",
|
|
471
|
+
Manipuri: "mni-Mtei",
|
|
472
|
+
Marathi: "mr",
|
|
473
|
+
Nepali: "ne",
|
|
474
|
+
Odia: "or",
|
|
475
|
+
Punjabi: "pa",
|
|
476
|
+
Sanskrit: "sa",
|
|
477
|
+
Santali: "sat",
|
|
478
|
+
Sindhi: "sd",
|
|
479
|
+
Tamil: "ta",
|
|
480
|
+
Telugu: "te",
|
|
481
|
+
Urdu: "ur"
|
|
482
|
+
};
|
|
483
|
+
var KNOWN_BCP47_CODES = new Set(Object.values(LANGUAGE_NAME_TO_BCP47));
|
|
484
|
+
var toBcp47Code = (language) => {
|
|
485
|
+
if (LANGUAGE_NAME_TO_BCP47[language]) {
|
|
486
|
+
return LANGUAGE_NAME_TO_BCP47[language];
|
|
487
|
+
}
|
|
488
|
+
if (KNOWN_BCP47_CODES.has(language)) {
|
|
489
|
+
return language;
|
|
490
|
+
}
|
|
491
|
+
const lower = language.toLowerCase();
|
|
492
|
+
for (const [name, code] of Object.entries(LANGUAGE_NAME_TO_BCP47)) {
|
|
493
|
+
if (name.toLowerCase() === lower) {
|
|
494
|
+
return code;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (/^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/.test(language)) {
|
|
498
|
+
return language;
|
|
499
|
+
}
|
|
500
|
+
return "en";
|
|
501
|
+
};
|
|
502
|
+
|
|
424
503
|
// src/RedactoNoticeConsent/injectStyles.ts
|
|
425
504
|
var stylesInjected = false;
|
|
426
505
|
var injectCheckboxStyles = () => {
|
|
@@ -2809,6 +2888,7 @@ var RedactoNoticeConsent = ({
|
|
|
2809
2888
|
};
|
|
2810
2889
|
}),
|
|
2811
2890
|
declined: false,
|
|
2891
|
+
language: toBcp47Code(selectedLanguage),
|
|
2812
2892
|
meta_data: applicationId ? { specific_uuid: applicationId } : void 0,
|
|
2813
2893
|
guardianVerificationReference: verificationReference || void 0,
|
|
2814
2894
|
selfDeclaredAdult: selfDeclaredAdult || void 0,
|
|
@@ -4090,9 +4170,9 @@ var RedactoNoticeConsent = ({
|
|
|
4090
4170
|
"aria-expanded": isLanguageDropdownOpen,
|
|
4091
4171
|
"aria-haspopup": "listbox",
|
|
4092
4172
|
"aria-controls": "language-listbox",
|
|
4093
|
-
"aria-label": `Select language. Current language: ${selectedLanguage}`,
|
|
4173
|
+
"aria-label": `Select language. Current language: ${toNativeLabel(selectedLanguage)}`,
|
|
4094
4174
|
children: [
|
|
4095
|
-
selectedLanguage,
|
|
4175
|
+
toNativeLabel(selectedLanguage),
|
|
4096
4176
|
/* @__PURE__ */ jsx(
|
|
4097
4177
|
"svg",
|
|
4098
4178
|
{
|
|
@@ -4139,8 +4219,8 @@ var RedactoNoticeConsent = ({
|
|
|
4139
4219
|
role: "option",
|
|
4140
4220
|
"aria-selected": selectedLanguage === lang,
|
|
4141
4221
|
tabIndex: 0,
|
|
4142
|
-
"aria-label": `Select ${lang} language`,
|
|
4143
|
-
children: lang
|
|
4222
|
+
"aria-label": `Select ${toNativeLabel(lang)} language`,
|
|
4223
|
+
children: toNativeLabel(lang)
|
|
4144
4224
|
},
|
|
4145
4225
|
lang
|
|
4146
4226
|
))
|
|
@@ -4499,7 +4579,6 @@ var fetchConsentContent2 = async ({
|
|
|
4499
4579
|
workspace_uuid,
|
|
4500
4580
|
notice_uuid,
|
|
4501
4581
|
baseUrl,
|
|
4502
|
-
language = "en",
|
|
4503
4582
|
specific_uuid
|
|
4504
4583
|
}) => {
|
|
4505
4584
|
try {
|
|
@@ -5076,7 +5155,6 @@ var RedactoConsentInlineComponent = ({
|
|
|
5076
5155
|
useEffect4(() => {
|
|
5077
5156
|
onValidationChange == null ? void 0 : onValidationChange(areAllRequiredElementsChecked);
|
|
5078
5157
|
}, [areAllRequiredElementsChecked, onValidationChange]);
|
|
5079
|
-
const acceptDisabled = isSubmitting || !areAllRequiredElementsChecked || !accessToken;
|
|
5080
5158
|
useEffect4(() => {
|
|
5081
5159
|
if (hasAlreadyConsented) {
|
|
5082
5160
|
onAccept == null ? void 0 : onAccept();
|
|
@@ -5803,138 +5881,195 @@ var DigiLockerCallback = ({
|
|
|
5803
5881
|
alignItems: "center",
|
|
5804
5882
|
justifyContent: "center",
|
|
5805
5883
|
minHeight: "100vh",
|
|
5806
|
-
backgroundColor: "#
|
|
5884
|
+
backgroundColor: "#f8fafc",
|
|
5807
5885
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
5808
|
-
padding: "
|
|
5886
|
+
padding: "24px",
|
|
5809
5887
|
boxSizing: "border-box"
|
|
5810
5888
|
};
|
|
5811
5889
|
const cardStyle = {
|
|
5812
5890
|
backgroundColor: "#ffffff",
|
|
5813
|
-
borderRadius: "
|
|
5814
|
-
boxShadow: "0
|
|
5815
|
-
padding: "40px",
|
|
5891
|
+
borderRadius: "16px",
|
|
5892
|
+
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 30px rgba(0, 0, 0, 0.06)",
|
|
5893
|
+
padding: "48px 40px 40px",
|
|
5816
5894
|
textAlign: "center",
|
|
5817
|
-
maxWidth: "
|
|
5895
|
+
maxWidth: "420px",
|
|
5818
5896
|
width: "100%"
|
|
5819
5897
|
};
|
|
5898
|
+
const spinnerContainerStyle = {
|
|
5899
|
+
width: "72px",
|
|
5900
|
+
height: "72px",
|
|
5901
|
+
margin: "0 auto 28px",
|
|
5902
|
+
position: "relative"
|
|
5903
|
+
};
|
|
5820
5904
|
const spinnerStyle = {
|
|
5821
|
-
width: "
|
|
5822
|
-
height: "
|
|
5823
|
-
border: "
|
|
5824
|
-
borderTopColor: "#
|
|
5905
|
+
width: "72px",
|
|
5906
|
+
height: "72px",
|
|
5907
|
+
border: "3px solid #e5e7eb",
|
|
5908
|
+
borderTopColor: "#4f87ff",
|
|
5825
5909
|
borderRadius: "50%",
|
|
5826
|
-
animation: "spin
|
|
5827
|
-
|
|
5910
|
+
animation: "redacto-dl-spin 0.8s linear infinite",
|
|
5911
|
+
boxSizing: "border-box"
|
|
5828
5912
|
};
|
|
5829
|
-
const
|
|
5830
|
-
width: "
|
|
5831
|
-
height: "
|
|
5913
|
+
const iconContainerStyle = {
|
|
5914
|
+
width: "72px",
|
|
5915
|
+
height: "72px",
|
|
5832
5916
|
borderRadius: "50%",
|
|
5833
5917
|
display: "flex",
|
|
5834
5918
|
alignItems: "center",
|
|
5835
5919
|
justifyContent: "center",
|
|
5836
|
-
margin: "0 auto
|
|
5920
|
+
margin: "0 auto 28px",
|
|
5921
|
+
animation: "redacto-dl-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards",
|
|
5922
|
+
position: "relative"
|
|
5837
5923
|
};
|
|
5838
5924
|
const successIconStyle = {
|
|
5839
|
-
...
|
|
5925
|
+
...iconContainerStyle,
|
|
5840
5926
|
backgroundColor: "#d1fae5",
|
|
5841
5927
|
color: "#059669"
|
|
5842
5928
|
};
|
|
5843
5929
|
const errorIconStyle = {
|
|
5844
|
-
...
|
|
5930
|
+
...iconContainerStyle,
|
|
5845
5931
|
backgroundColor: "#fee2e2",
|
|
5846
5932
|
color: "#dc2626"
|
|
5847
5933
|
};
|
|
5848
5934
|
const titleStyle = {
|
|
5849
|
-
fontSize: "
|
|
5850
|
-
fontWeight:
|
|
5935
|
+
fontSize: "22px",
|
|
5936
|
+
fontWeight: 700,
|
|
5851
5937
|
color: "#111827",
|
|
5852
|
-
margin: "0 0
|
|
5938
|
+
margin: "0 0 8px 0",
|
|
5939
|
+
letterSpacing: "-0.01em"
|
|
5853
5940
|
};
|
|
5854
5941
|
const messageStyle = {
|
|
5855
5942
|
fontSize: "14px",
|
|
5856
5943
|
color: "#6b7280",
|
|
5857
|
-
marginBottom: "
|
|
5944
|
+
marginBottom: "0",
|
|
5945
|
+
lineHeight: 1.6
|
|
5946
|
+
};
|
|
5947
|
+
const subtextStyle = {
|
|
5948
|
+
fontSize: "13px",
|
|
5949
|
+
color: "#9ca3af",
|
|
5950
|
+
marginTop: "16px",
|
|
5858
5951
|
lineHeight: 1.5
|
|
5859
5952
|
};
|
|
5860
5953
|
const errorDetailStyle = {
|
|
5861
5954
|
fontSize: "13px",
|
|
5862
5955
|
color: "#dc2626",
|
|
5863
|
-
marginTop: "
|
|
5864
|
-
padding: "12px",
|
|
5956
|
+
marginTop: "16px",
|
|
5957
|
+
padding: "12px 16px",
|
|
5865
5958
|
backgroundColor: "#fef2f2",
|
|
5866
|
-
borderRadius: "
|
|
5867
|
-
border: "1px solid #fecaca"
|
|
5959
|
+
borderRadius: "10px",
|
|
5960
|
+
border: "1px solid #fecaca",
|
|
5961
|
+
lineHeight: 1.5,
|
|
5962
|
+
textAlign: "left"
|
|
5868
5963
|
};
|
|
5869
5964
|
const buttonStyle = {
|
|
5870
|
-
marginTop: "
|
|
5871
|
-
padding: "
|
|
5872
|
-
backgroundColor: "#
|
|
5965
|
+
marginTop: "24px",
|
|
5966
|
+
padding: "12px 28px",
|
|
5967
|
+
backgroundColor: "#4f87ff",
|
|
5873
5968
|
color: "#ffffff",
|
|
5874
5969
|
border: "none",
|
|
5875
|
-
borderRadius: "
|
|
5876
|
-
fontSize: "
|
|
5877
|
-
fontWeight:
|
|
5970
|
+
borderRadius: "10px",
|
|
5971
|
+
fontSize: "15px",
|
|
5972
|
+
fontWeight: 600,
|
|
5878
5973
|
cursor: "pointer",
|
|
5879
|
-
transition: "background-color 0.2s"
|
|
5974
|
+
transition: "background-color 0.2s, transform 0.15s",
|
|
5975
|
+
width: "100%"
|
|
5880
5976
|
};
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5977
|
+
const keyframesStyle = `
|
|
5978
|
+
@keyframes redacto-dl-spin {
|
|
5979
|
+
to { transform: rotate(360deg); }
|
|
5980
|
+
}
|
|
5981
|
+
@keyframes redacto-dl-pop {
|
|
5982
|
+
0% { transform: scale(0.3); opacity: 0; }
|
|
5983
|
+
60% { transform: scale(1.08); opacity: 1; }
|
|
5984
|
+
100% { transform: scale(1); opacity: 1; }
|
|
5985
|
+
}
|
|
5986
|
+
@keyframes redacto-dl-check {
|
|
5987
|
+
0% { stroke-dashoffset: 24; }
|
|
5988
|
+
100% { stroke-dashoffset: 0; }
|
|
5989
|
+
}
|
|
5990
|
+
@keyframes redacto-dl-pulse {
|
|
5991
|
+
0%, 100% { transform: scale(1); opacity: 0.6; }
|
|
5992
|
+
50% { transform: scale(1.15); opacity: 0; }
|
|
5993
|
+
}
|
|
5994
|
+
.redacto-dl-retry-btn:hover {
|
|
5995
|
+
background-color: #3d6fdb !important;
|
|
5996
|
+
transform: translateY(-1px);
|
|
5997
|
+
}
|
|
5998
|
+
.redacto-dl-retry-btn:active {
|
|
5999
|
+
transform: translateY(0);
|
|
6000
|
+
}
|
|
6001
|
+
`;
|
|
6002
|
+
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
6003
|
+
/* @__PURE__ */ jsx3("style", { dangerouslySetInnerHTML: { __html: keyframesStyle } }),
|
|
6004
|
+
/* @__PURE__ */ jsx3("div", { style: containerStyle, children: /* @__PURE__ */ jsxs3("div", { style: cardStyle, children: [
|
|
6005
|
+
status === "processing" && /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
6006
|
+
/* @__PURE__ */ jsx3("div", { style: spinnerContainerStyle, children: /* @__PURE__ */ jsx3("div", { style: spinnerStyle }) }),
|
|
6007
|
+
/* @__PURE__ */ jsx3("h2", { style: titleStyle, children: "Processing Verification" }),
|
|
6008
|
+
/* @__PURE__ */ jsx3("p", { style: messageStyle, children: message }),
|
|
6009
|
+
/* @__PURE__ */ jsx3("p", { style: subtextStyle, children: "Please wait while we verify your guardian's identity..." })
|
|
6010
|
+
] }),
|
|
6011
|
+
status === "success" && /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
6012
|
+
/* @__PURE__ */ jsxs3("div", { style: { position: "relative", width: "72px", height: "72px", margin: "0 auto 28px" }, children: [
|
|
6013
|
+
/* @__PURE__ */ jsx3("div", { style: {
|
|
6014
|
+
position: "absolute",
|
|
6015
|
+
inset: "-8px",
|
|
6016
|
+
borderRadius: "50%",
|
|
6017
|
+
border: "2px solid #d1fae5",
|
|
6018
|
+
animation: "redacto-dl-pulse 1.5s ease-out infinite"
|
|
6019
|
+
} }),
|
|
6020
|
+
/* @__PURE__ */ jsx3("div", { style: successIconStyle, children: /* @__PURE__ */ jsx3(
|
|
6021
|
+
"svg",
|
|
6022
|
+
{
|
|
6023
|
+
width: "30",
|
|
6024
|
+
height: "30",
|
|
6025
|
+
viewBox: "0 0 24 24",
|
|
6026
|
+
fill: "none",
|
|
6027
|
+
stroke: "currentColor",
|
|
6028
|
+
strokeWidth: "2.5",
|
|
6029
|
+
strokeLinecap: "round",
|
|
6030
|
+
strokeLinejoin: "round",
|
|
6031
|
+
style: { strokeDasharray: 24, animation: "redacto-dl-check 0.4s ease-out 0.3s forwards", strokeDashoffset: 24 },
|
|
6032
|
+
children: /* @__PURE__ */ jsx3("polyline", { points: "20 6 9 17 4 12" })
|
|
6033
|
+
}
|
|
6034
|
+
) })
|
|
6035
|
+
] }),
|
|
6036
|
+
/* @__PURE__ */ jsx3("h2", { style: titleStyle, children: "Verification Successful" }),
|
|
6037
|
+
/* @__PURE__ */ jsx3("p", { style: messageStyle, children: message }),
|
|
6038
|
+
/* @__PURE__ */ jsx3("p", { style: subtextStyle, children: "You will be redirected automatically." })
|
|
6039
|
+
] }),
|
|
6040
|
+
status === "error" && /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
6041
|
+
/* @__PURE__ */ jsx3("div", { style: errorIconStyle, children: /* @__PURE__ */ jsxs3(
|
|
6042
|
+
"svg",
|
|
6043
|
+
{
|
|
6044
|
+
width: "30",
|
|
6045
|
+
height: "30",
|
|
6046
|
+
viewBox: "0 0 24 24",
|
|
6047
|
+
fill: "none",
|
|
6048
|
+
stroke: "currentColor",
|
|
6049
|
+
strokeWidth: "2.5",
|
|
6050
|
+
strokeLinecap: "round",
|
|
6051
|
+
strokeLinejoin: "round",
|
|
6052
|
+
children: [
|
|
6053
|
+
/* @__PURE__ */ jsx3("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
6054
|
+
/* @__PURE__ */ jsx3("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
6055
|
+
]
|
|
6056
|
+
}
|
|
6057
|
+
) }),
|
|
6058
|
+
/* @__PURE__ */ jsx3("h2", { style: titleStyle, children: "Verification Failed" }),
|
|
6059
|
+
/* @__PURE__ */ jsx3("p", { style: messageStyle, children: message }),
|
|
6060
|
+
errorDetail && /* @__PURE__ */ jsx3("p", { style: errorDetailStyle, children: errorDetail }),
|
|
6061
|
+
/* @__PURE__ */ jsx3(
|
|
6062
|
+
"button",
|
|
6063
|
+
{
|
|
6064
|
+
className: "redacto-dl-retry-btn",
|
|
6065
|
+
style: buttonStyle,
|
|
6066
|
+
onClick: handleRetry,
|
|
6067
|
+
children: "Try Again"
|
|
6068
|
+
}
|
|
6069
|
+
)
|
|
6070
|
+
] })
|
|
6071
|
+
] }) })
|
|
6072
|
+
] });
|
|
5938
6073
|
};
|
|
5939
6074
|
export {
|
|
5940
6075
|
DigiLockerCallback,
|