@redacto.io/consent-sdk-react 7.2.0 → 8.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.
Files changed (29) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/chunk-6A665OPR.mjs +30 -0
  3. package/dist/index.mjs +85 -108
  4. package/dist/privacy-center.js +3527 -3285
  5. package/dist/privacy-center.mjs +3530 -3300
  6. package/package.json +1 -1
  7. package/src/RedactoPrivacyCenter/PrivacyCenterLayout.tsx +3 -3
  8. package/src/RedactoPrivacyCenter/RedactoPrivacyCenter.tsx +1 -1
  9. package/src/RedactoPrivacyCenter/api/orgBranding.ts +10 -3
  10. package/src/RedactoPrivacyCenter/components/AppShell/AppShell.tsx +204 -0
  11. package/src/RedactoPrivacyCenter/components/AppShell/MobileNavDrawer.tsx +218 -0
  12. package/src/RedactoPrivacyCenter/components/AppShell/NavItem.tsx +205 -0
  13. package/src/RedactoPrivacyCenter/components/AppShell/PageHeader.tsx +107 -0
  14. package/src/RedactoPrivacyCenter/components/AppShell/SidebarNav.tsx +100 -0
  15. package/src/RedactoPrivacyCenter/components/AppShell/TopAppBar.tsx +338 -0
  16. package/src/RedactoPrivacyCenter/components/AppShell/UserMenu.tsx +222 -0
  17. package/src/RedactoPrivacyCenter/components/AppShell/hooks/useIsTruncated.ts +28 -0
  18. package/src/RedactoPrivacyCenter/components/AppShell/hooks/useKeyboardShortcut.ts +40 -0
  19. package/src/RedactoPrivacyCenter/components/AppShell/hooks/useSidebarState.ts +62 -0
  20. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/constants.tsx +5 -27
  21. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/types.ts +0 -19
  22. package/src/RedactoPrivacyCenter/context/BrandingContext.tsx +11 -3
  23. package/src/RedactoPrivacyCenter/styles/injectStyles.ts +42 -5
  24. package/src/RedactoPrivacyCenter/ui/PCPopover.tsx +13 -2
  25. package/src/RedactoPrivacyCenter/components/PrivacyCenterLayout.tsx +0 -350
  26. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideBarPC.tsx +0 -489
  27. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideMenuPC.tsx +0 -408
  28. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/menuItemsPC.tsx +0 -1
  29. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/utils.ts +0 -38
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @redacto.io/consent-sdk-react
2
2
 
3
+ ## 8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - enhance ui/ux
8
+
9
+ ## 7.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - change branding path
14
+
3
15
  ## 7.2.0
4
16
 
5
17
  ### Minor Changes
@@ -0,0 +1,30 @@
1
+ // src/RedactoNoticeConsent/useMediaQuery.ts
2
+ import { useState, useEffect } from "react";
3
+ var useMediaQuery = (query) => {
4
+ const getMatches = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
5
+ const [matches, setMatches] = useState(getMatches);
6
+ useEffect(() => {
7
+ if (typeof window === "undefined") return;
8
+ const media = window.matchMedia(query);
9
+ const listener = (e) => {
10
+ setMatches(e.matches);
11
+ };
12
+ if (media.addEventListener) {
13
+ media.addEventListener("change", listener);
14
+ } else {
15
+ media.addListener(listener);
16
+ }
17
+ return () => {
18
+ if (media.removeEventListener) {
19
+ media.removeEventListener("change", listener);
20
+ } else {
21
+ media.removeListener(listener);
22
+ }
23
+ };
24
+ }, [query]);
25
+ return matches;
26
+ };
27
+
28
+ export {
29
+ useMediaQuery
30
+ };
package/dist/index.mjs CHANGED
@@ -1,5 +1,9 @@
1
+ import {
2
+ useMediaQuery
3
+ } from "./chunk-6A665OPR.mjs";
4
+
1
5
  // src/RedactoNoticeConsent/RedactoNoticeConsent.tsx
2
- import { useCallback, useEffect as useEffect2, useMemo, useRef, useState as useState2 } from "react";
6
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
3
7
 
4
8
  // src/RedactoNoticeConsent/api/index.ts
5
9
  import { jwtDecode } from "jwt-decode";
@@ -990,33 +994,6 @@ var styles = {
990
994
  }
991
995
  };
992
996
 
993
- // src/RedactoNoticeConsent/useMediaQuery.ts
994
- import { useState, useEffect } from "react";
995
- var useMediaQuery = (query) => {
996
- const getMatches = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
997
- const [matches, setMatches] = useState(getMatches);
998
- useEffect(() => {
999
- if (typeof window === "undefined") return;
1000
- const media = window.matchMedia(query);
1001
- const listener = (e) => {
1002
- setMatches(e.matches);
1003
- };
1004
- if (media.addEventListener) {
1005
- media.addEventListener("change", listener);
1006
- } else {
1007
- media.addListener(listener);
1008
- }
1009
- return () => {
1010
- if (media.removeEventListener) {
1011
- media.removeEventListener("change", listener);
1012
- } else {
1013
- media.removeListener(listener);
1014
- }
1015
- };
1016
- }, [query]);
1017
- return matches;
1018
- };
1019
-
1020
997
  // src/RedactoNoticeConsent/services/storage.ts
1021
998
  var STORAGE_KEY = "redacto_consent_sdk_state";
1022
999
  var STATE_EXPIRY_MS = 30 * 60 * 1e3;
@@ -1410,12 +1387,12 @@ var GuardianForm = ({
1410
1387
  logoUrl
1411
1388
  }) => {
1412
1389
  var _a, _b, _c, _d, _e;
1413
- const [isDropdownOpen, setIsDropdownOpen] = useState2(false);
1414
- const [focusedIndex, setFocusedIndex] = useState2(-1);
1415
- const [openUpward, setOpenUpward] = useState2(false);
1390
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
1391
+ const [focusedIndex, setFocusedIndex] = useState(-1);
1392
+ const [openUpward, setOpenUpward] = useState(false);
1416
1393
  const dropdownRef = useRef(null);
1417
1394
  const optionsRef = useRef(null);
1418
- useEffect2(() => {
1395
+ useEffect(() => {
1419
1396
  if (!isDropdownOpen) return;
1420
1397
  const handleClickOutside = (e) => {
1421
1398
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
@@ -1426,7 +1403,7 @@ var GuardianForm = ({
1426
1403
  document.addEventListener("mousedown", handleClickOutside);
1427
1404
  return () => document.removeEventListener("mousedown", handleClickOutside);
1428
1405
  }, [isDropdownOpen]);
1429
- useEffect2(() => {
1406
+ useEffect(() => {
1430
1407
  if (!isDropdownOpen || !dropdownRef.current) return;
1431
1408
  const rect = dropdownRef.current.getBoundingClientRect();
1432
1409
  const spaceBelow = window.innerHeight - rect.bottom;
@@ -1468,7 +1445,7 @@ var GuardianForm = ({
1468
1445
  break;
1469
1446
  }
1470
1447
  };
1471
- useEffect2(() => {
1448
+ useEffect(() => {
1472
1449
  var _a2;
1473
1450
  if (focusedIndex >= 0 && optionsRef.current) {
1474
1451
  const option = optionsRef.current.children[focusedIndex];
@@ -2306,50 +2283,50 @@ var RedactoNoticeConsent = ({
2306
2283
  }
2307
2284
  );
2308
2285
  }
2309
- const [isLoading, setIsLoading] = useState2(true);
2310
- const [isSubmitting, setIsSubmitting] = useState2(false);
2311
- const [isSubmittingAccept, setIsSubmittingAccept] = useState2(false);
2312
- const [isSubmittingDecline, setIsSubmittingDecline] = useState2(false);
2313
- const [content, setContent] = useState2(null);
2314
- const [categorizedPurposes, setCategorizedPurposes] = useState2(null);
2315
- const [selectedPurposes, setSelectedPurposes] = useState2({});
2316
- const [selectedDataElements, setSelectedDataElements] = useState2({});
2317
- const [initialDataElementSelections, setInitialDataElementSelections] = useState2({});
2318
- const [collapsedPurposes, setCollapsedPurposes] = useState2({});
2319
- const [hasAlreadyConsented, setHasAlreadyConsented] = useState2(false);
2320
- const [isFullyConsentedReviewMode, setIsFullyConsentedReviewMode] = useState2(false);
2321
- const [isLanguageDropdownOpen, setIsLanguageDropdownOpen] = useState2(false);
2322
- const [selectedLanguage, setSelectedLanguage] = useState2(language);
2323
- const [errorMessage, setErrorMessage] = useState2(null);
2324
- const [fetchError, setFetchError] = useState2(null);
2325
- const [ttsAudioUrls, setTtsAudioUrls] = useState2(null);
2326
- const [isTTSAvailable, setIsTTSAvailable] = useState2(false);
2327
- const [isPlaying, setIsPlaying] = useState2(false);
2328
- const [isPaused, setIsPaused] = useState2(false);
2329
- const [currentAudioIndex, setCurrentAudioIndex] = useState2(0);
2330
- const [highlightedElementId, setHighlightedElementId] = useState2(null);
2331
- const [showAgeVerification, setShowAgeVerification] = useState2(false);
2332
- const [isMinorFlow, setIsMinorFlow] = useState2(false);
2333
- const [selfDeclaredAdult, setSelfDeclaredAdult] = useState2(false);
2334
- const [showGuardianForm, setShowGuardianForm] = useState2(false);
2335
- const [isSubmittingGuardian, setIsSubmittingGuardian] = useState2(false);
2336
- const [guardianFormData, setGuardianFormData] = useState2({
2286
+ const [isLoading, setIsLoading] = useState(true);
2287
+ const [isSubmitting, setIsSubmitting] = useState(false);
2288
+ const [isSubmittingAccept, setIsSubmittingAccept] = useState(false);
2289
+ const [isSubmittingDecline, setIsSubmittingDecline] = useState(false);
2290
+ const [content, setContent] = useState(null);
2291
+ const [categorizedPurposes, setCategorizedPurposes] = useState(null);
2292
+ const [selectedPurposes, setSelectedPurposes] = useState({});
2293
+ const [selectedDataElements, setSelectedDataElements] = useState({});
2294
+ const [initialDataElementSelections, setInitialDataElementSelections] = useState({});
2295
+ const [collapsedPurposes, setCollapsedPurposes] = useState({});
2296
+ const [hasAlreadyConsented, setHasAlreadyConsented] = useState(false);
2297
+ const [isFullyConsentedReviewMode, setIsFullyConsentedReviewMode] = useState(false);
2298
+ const [isLanguageDropdownOpen, setIsLanguageDropdownOpen] = useState(false);
2299
+ const [selectedLanguage, setSelectedLanguage] = useState(language);
2300
+ const [errorMessage, setErrorMessage] = useState(null);
2301
+ const [fetchError, setFetchError] = useState(null);
2302
+ const [ttsAudioUrls, setTtsAudioUrls] = useState(null);
2303
+ const [isTTSAvailable, setIsTTSAvailable] = useState(false);
2304
+ const [isPlaying, setIsPlaying] = useState(false);
2305
+ const [isPaused, setIsPaused] = useState(false);
2306
+ const [currentAudioIndex, setCurrentAudioIndex] = useState(0);
2307
+ const [highlightedElementId, setHighlightedElementId] = useState(null);
2308
+ const [showAgeVerification, setShowAgeVerification] = useState(false);
2309
+ const [isMinorFlow, setIsMinorFlow] = useState(false);
2310
+ const [selfDeclaredAdult, setSelfDeclaredAdult] = useState(false);
2311
+ const [showGuardianForm, setShowGuardianForm] = useState(false);
2312
+ const [isSubmittingGuardian, setIsSubmittingGuardian] = useState(false);
2313
+ const [guardianFormData, setGuardianFormData] = useState({
2337
2314
  guardianName: "",
2338
2315
  guardianContact: "",
2339
2316
  guardianRelationship: ""
2340
2317
  });
2341
- const [guardianFormErrors, setGuardianFormErrors] = useState2({});
2342
- const [showVerificationScreen, setShowVerificationScreen] = useState2(false);
2343
- const [verificationReference, setVerificationReference] = useState2(null);
2344
- const [isInitiatingVerification, setIsInitiatingVerification] = useState2(false);
2345
- const [verificationError, setVerificationError] = useState2(
2318
+ const [guardianFormErrors, setGuardianFormErrors] = useState({});
2319
+ const [showVerificationScreen, setShowVerificationScreen] = useState(false);
2320
+ const [verificationReference, setVerificationReference] = useState(null);
2321
+ const [isInitiatingVerification, setIsInitiatingVerification] = useState(false);
2322
+ const [verificationError, setVerificationError] = useState(
2346
2323
  null
2347
2324
  );
2348
- const [verificationErrorCode, setVerificationErrorCode] = useState2(null);
2349
- const [canRetryVerification, setCanRetryVerification] = useState2(false);
2350
- const [isPollingStatus, setIsPollingStatus] = useState2(false);
2351
- const [isVerificationComplete, setIsVerificationComplete] = useState2(false);
2352
- const [isAutoTransitioning, setIsAutoTransitioning] = useState2(false);
2325
+ const [verificationErrorCode, setVerificationErrorCode] = useState(null);
2326
+ const [canRetryVerification, setCanRetryVerification] = useState(false);
2327
+ const [isPollingStatus, setIsPollingStatus] = useState(false);
2328
+ const [isVerificationComplete, setIsVerificationComplete] = useState(false);
2329
+ const [isAutoTransitioning, setIsAutoTransitioning] = useState(false);
2353
2330
  const modalRef = useRef(null);
2354
2331
  const firstFocusableRef = useRef(null);
2355
2332
  const lastFocusableRef = useRef(null);
@@ -2480,7 +2457,7 @@ var RedactoNoticeConsent = ({
2480
2457
  });
2481
2458
  }, [content, selectedDataElements]);
2482
2459
  const acceptDisabled = isSubmitting || !areAllRequiredElementsChecked;
2483
- useEffect2(() => {
2460
+ useEffect(() => {
2484
2461
  var _a2, _b2;
2485
2462
  clearApiCache();
2486
2463
  isRequestInProgressRef.current = false;
@@ -2543,7 +2520,7 @@ var RedactoNoticeConsent = ({
2543
2520
  }
2544
2521
  isInitialMountRef.current = false;
2545
2522
  }, [accessToken]);
2546
- useEffect2(() => {
2523
+ useEffect(() => {
2547
2524
  if (hasAlreadyConsented) {
2548
2525
  onAccept == null ? void 0 : onAccept();
2549
2526
  }
@@ -2773,7 +2750,7 @@ var RedactoNoticeConsent = ({
2773
2750
  isRequestInProgressRef.current = false;
2774
2751
  }
2775
2752
  };
2776
- useEffect2(() => {
2753
+ useEffect(() => {
2777
2754
  injectCheckboxStyles();
2778
2755
  fetchNotice();
2779
2756
  }, [
@@ -3544,7 +3521,7 @@ var RedactoNoticeConsent = ({
3544
3521
  playAudio();
3545
3522
  }
3546
3523
  }, [isPlaying, playAudio, pauseAudio]);
3547
- useEffect2(() => {
3524
+ useEffect(() => {
3548
3525
  var _a2;
3549
3526
  if (!isPlaying || !content || audioSequence.length === 0) return;
3550
3527
  const currentIndex = currentAudioIndex;
@@ -3578,7 +3555,7 @@ var RedactoNoticeConsent = ({
3578
3555
  categorizedPurposes,
3579
3556
  collapsedPurposes
3580
3557
  ]);
3581
- useEffect2(() => {
3558
+ useEffect(() => {
3582
3559
  const removeAllHighlights = () => {
3583
3560
  document.querySelectorAll(".redacto-tts-highlight").forEach((el) => {
3584
3561
  el.classList.remove("redacto-tts-highlight");
@@ -3614,7 +3591,7 @@ var RedactoNoticeConsent = ({
3614
3591
  removeAllHighlights();
3615
3592
  };
3616
3593
  }, [highlightedElementId, isPlaying]);
3617
- useEffect2(() => {
3594
+ useEffect(() => {
3618
3595
  setIsTTSAvailable(false);
3619
3596
  setTtsAudioUrls(null);
3620
3597
  stopAudio();
@@ -3678,7 +3655,7 @@ var RedactoNoticeConsent = ({
3678
3655
  const handleCloseError = () => {
3679
3656
  setErrorMessage(null);
3680
3657
  };
3681
- useEffect2(() => {
3658
+ useEffect(() => {
3682
3659
  const handleKeyDown = (event) => {
3683
3660
  if (!modalRef.current) return;
3684
3661
  const focusableElements = modalRef.current.querySelectorAll(
@@ -3717,13 +3694,13 @@ var RedactoNoticeConsent = ({
3717
3694
  modal == null ? void 0 : modal.removeEventListener("keydown", handleKeyDown);
3718
3695
  };
3719
3696
  }, [isLoading, handleDecline]);
3720
- useEffect2(() => {
3697
+ useEffect(() => {
3721
3698
  stopAudio();
3722
3699
  }, [selectedLanguage, stopAudio]);
3723
- useEffect2(() => {
3700
+ useEffect(() => {
3724
3701
  stopAudio();
3725
3702
  }, [content, stopAudio]);
3726
- useEffect2(() => {
3703
+ useEffect(() => {
3727
3704
  return () => {
3728
3705
  var _a2, _b2;
3729
3706
  if (abortControllerRef.current) {
@@ -3749,7 +3726,7 @@ var RedactoNoticeConsent = ({
3749
3726
  }
3750
3727
  };
3751
3728
  }, [stopAudio]);
3752
- useEffect2(() => {
3729
+ useEffect(() => {
3753
3730
  const persistedState = getConsentState();
3754
3731
  if (!persistedState) return;
3755
3732
  if (persistedState.noticeId && persistedState.noticeId !== noticeId) {
@@ -4609,7 +4586,7 @@ var RedactoNoticeConsent = ({
4609
4586
  };
4610
4587
 
4611
4588
  // src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx
4612
- import { useEffect as useEffect4, useMemo as useMemo2, useState as useState4, useRef as useRef2, useCallback as useCallback2, memo } from "react";
4589
+ import { useEffect as useEffect3, useMemo as useMemo2, useState as useState3, useRef as useRef2, useCallback as useCallback2, memo } from "react";
4613
4590
 
4614
4591
  // src/RedactoNoticeConsentInline/api/index.ts
4615
4592
  var BASE_URL2 = "https://api.redacto.tech/consent";
@@ -5041,11 +5018,11 @@ var styles2 = {
5041
5018
  };
5042
5019
 
5043
5020
  // src/RedactoNoticeConsentInline/useMediaQuery.ts
5044
- import { useState as useState3, useEffect as useEffect3 } from "react";
5021
+ import { useState as useState2, useEffect as useEffect2 } from "react";
5045
5022
  var useMediaQuery2 = (query) => {
5046
5023
  const getMatches = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
5047
- const [matches, setMatches] = useState3(getMatches);
5048
- useEffect3(() => {
5024
+ const [matches, setMatches] = useState2(getMatches);
5025
+ useEffect2(() => {
5049
5026
  if (typeof window === "undefined") return;
5050
5027
  const media = window.matchMedia(query);
5051
5028
  const listener = (e) => {
@@ -5111,18 +5088,18 @@ var RedactoConsentInlineComponent = ({
5111
5088
  applicationId
5112
5089
  }) => {
5113
5090
  var _a;
5114
- const [content, setContent] = useState4(null);
5115
- const [isLoading, setIsLoading] = useState4(true);
5116
- const [isSubmitting, setIsSubmitting] = useState4(false);
5117
- const [selectedLanguage, setSelectedLanguage] = useState4(language);
5118
- const [collapsedPurposes, setCollapsedPurposes] = useState4({});
5119
- const [selectedPurposes, setSelectedPurposes] = useState4({});
5120
- const [selectedDataElements, setSelectedDataElements] = useState4({});
5121
- const [hasAlreadyConsented, setHasAlreadyConsented] = useState4(false);
5122
- const [fetchError, setFetchError] = useState4(null);
5123
- const [errorMessage, setErrorMessage] = useState4(null);
5091
+ const [content, setContent] = useState3(null);
5092
+ const [isLoading, setIsLoading] = useState3(true);
5093
+ const [isSubmitting, setIsSubmitting] = useState3(false);
5094
+ const [selectedLanguage, setSelectedLanguage] = useState3(language);
5095
+ const [collapsedPurposes, setCollapsedPurposes] = useState3({});
5096
+ const [selectedPurposes, setSelectedPurposes] = useState3({});
5097
+ const [selectedDataElements, setSelectedDataElements] = useState3({});
5098
+ const [hasAlreadyConsented, setHasAlreadyConsented] = useState3(false);
5099
+ const [fetchError, setFetchError] = useState3(null);
5100
+ const [errorMessage, setErrorMessage] = useState3(null);
5124
5101
  const hasSubmittedRef = useRef2(false);
5125
- useEffect4(() => {
5102
+ useEffect3(() => {
5126
5103
  injectSpinnerAnimation();
5127
5104
  }, []);
5128
5105
  const isMobile = useMediaQuery2("(max-width: 768px)");
@@ -5155,10 +5132,10 @@ var RedactoConsentInlineComponent = ({
5155
5132
  );
5156
5133
  });
5157
5134
  }, [content, selectedDataElements]);
5158
- useEffect4(() => {
5135
+ useEffect3(() => {
5159
5136
  onValidationChange == null ? void 0 : onValidationChange(areAllRequiredElementsChecked);
5160
5137
  }, [areAllRequiredElementsChecked, onValidationChange]);
5161
- useEffect4(() => {
5138
+ useEffect3(() => {
5162
5139
  if (hasAlreadyConsented) {
5163
5140
  onAccept == null ? void 0 : onAccept();
5164
5141
  }
@@ -5258,7 +5235,7 @@ var RedactoConsentInlineComponent = ({
5258
5235
  setIsLoading(false);
5259
5236
  }
5260
5237
  };
5261
- useEffect4(() => {
5238
+ useEffect3(() => {
5262
5239
  fetchNotice();
5263
5240
  }, [org_uuid, workspace_uuid, notice_uuid, language, applicationId]);
5264
5241
  const togglePurposeCollapse = (purposeUuid) => {
@@ -5381,7 +5358,7 @@ var RedactoConsentInlineComponent = ({
5381
5358
  onAccept
5382
5359
  ]
5383
5360
  );
5384
- useEffect4(() => {
5361
+ useEffect3(() => {
5385
5362
  if (accessToken && content && areAllRequiredElementsChecked && !isSubmitting && !hasSubmittedRef.current) {
5386
5363
  hasSubmittedRef.current = true;
5387
5364
  const autoSubmit = async () => {
@@ -5401,7 +5378,7 @@ var RedactoConsentInlineComponent = ({
5401
5378
  isSubmitting,
5402
5379
  handleAcceptWithToken
5403
5380
  ]);
5404
- useEffect4(() => {
5381
+ useEffect3(() => {
5405
5382
  if (!accessToken) {
5406
5383
  hasSubmittedRef.current = false;
5407
5384
  }
@@ -5603,7 +5580,7 @@ RedactoConsentInlineComponent.displayName = "RedactoConsentInline";
5603
5580
  var RedactoConsentInline = memo(RedactoConsentInlineComponent);
5604
5581
 
5605
5582
  // src/RedactoNoticeConsent/components/DigiLockerCallback.tsx
5606
- import { useCallback as useCallback3, useEffect as useEffect5, useRef as useRef3, useState as useState5 } from "react";
5583
+ import { useCallback as useCallback3, useEffect as useEffect4, useRef as useRef3, useState as useState4 } from "react";
5607
5584
  import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
5608
5585
  var DigiLockerCallback = ({
5609
5586
  accessToken: propAccessToken,
@@ -5611,9 +5588,9 @@ var DigiLockerCallback = ({
5611
5588
  onSuccess,
5612
5589
  onError
5613
5590
  }) => {
5614
- const [status, setStatus] = useState5("processing");
5615
- const [message, setMessage] = useState5("Verifying your guardian...");
5616
- const [errorDetail, setErrorDetail] = useState5(null);
5591
+ const [status, setStatus] = useState4("processing");
5592
+ const [message, setMessage] = useState4("Verifying your guardian...");
5593
+ const [errorDetail, setErrorDetail] = useState4(null);
5617
5594
  const retryTimeoutRef = useRef3(null);
5618
5595
  const redirectTimeoutRef = useRef3(null);
5619
5596
  const isMountedRef = useRef3(true);
@@ -5861,7 +5838,7 @@ var DigiLockerCallback = ({
5861
5838
  }
5862
5839
  }
5863
5840
  }, [propAccessToken, baseUrl, onSuccess, onError, redirectToOriginalPage]);
5864
- useEffect5(() => {
5841
+ useEffect4(() => {
5865
5842
  injectCheckboxStyles();
5866
5843
  handleCallback();
5867
5844
  return () => {