@redacto.io/consent-sdk-react 9.3.0 → 9.4.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 (80) hide show
  1. package/.turbo/turbo-build.log +12 -12
  2. package/CHANGELOG.md +13 -0
  3. package/README.md +93 -12
  4. package/dist/index.d.mts +39 -1
  5. package/dist/index.d.ts +39 -1
  6. package/dist/index.js +4454 -334
  7. package/dist/index.mjs +4454 -335
  8. package/dist/privacy-center.d.mts +5 -1
  9. package/dist/privacy-center.d.ts +5 -1
  10. package/dist/privacy-center.js +2958 -2583
  11. package/dist/privacy-center.mjs +2666 -2285
  12. package/package.json +1 -1
  13. package/src/RedactoNoticeAssisted/RedactoNoticeAssisted.test.tsx +847 -0
  14. package/src/RedactoNoticeAssisted/RedactoNoticeAssisted.tsx +2133 -0
  15. package/src/RedactoNoticeAssisted/api/index.ts +269 -0
  16. package/src/RedactoNoticeAssisted/api/types.ts +180 -0
  17. package/src/RedactoNoticeAssisted/assets/redacto-logo.png +0 -0
  18. package/src/RedactoNoticeAssisted/constants.ts +51 -0
  19. package/src/RedactoNoticeAssisted/i18n.ts +1463 -0
  20. package/src/RedactoNoticeAssisted/index.ts +1 -0
  21. package/src/RedactoNoticeAssisted/injectStyles.ts +251 -0
  22. package/src/RedactoNoticeAssisted/styles.ts +730 -0
  23. package/src/RedactoNoticeAssisted/types.ts +24 -0
  24. package/src/RedactoNoticeAssisted/useMediaQuery.ts +36 -0
  25. package/src/RedactoPrivacyCenter/NotificationsPage.tsx +8 -0
  26. package/src/RedactoPrivacyCenter/api/actions.ts +6 -11
  27. package/src/RedactoPrivacyCenter/api/client.ts +15 -3
  28. package/src/RedactoPrivacyCenter/api/fetcher.ts +80 -1
  29. package/src/RedactoPrivacyCenter/components/ActivitiesList.tsx +193 -213
  30. package/src/RedactoPrivacyCenter/components/ActivityTimeline.tsx +239 -0
  31. package/src/RedactoPrivacyCenter/components/AppShell/AppShell.tsx +5 -0
  32. package/src/RedactoPrivacyCenter/components/AppShell/UserMenu.tsx +6 -16
  33. package/src/RedactoPrivacyCenter/components/AppShell/usePrivacyCenterExitAction.ts +36 -0
  34. package/src/RedactoPrivacyCenter/components/CaseDetails/MessagesTab.tsx +3 -1
  35. package/src/RedactoPrivacyCenter/components/CaseDetails/useMessagePolling.ts +8 -1
  36. package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +23 -17
  37. package/src/RedactoPrivacyCenter/components/ConsentManagerCells.tsx +24 -10
  38. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationBell.tsx +16 -3
  39. package/src/RedactoPrivacyCenter/components/PrivacyCenterSessionExpired.tsx +97 -0
  40. package/src/RedactoPrivacyCenter/components/constant.ts +25 -0
  41. package/src/RedactoPrivacyCenter/components/types.ts +32 -1
  42. package/src/RedactoPrivacyCenter/context/AuthContext.tsx +23 -2
  43. package/src/RedactoPrivacyCenter/context/DataAvailabilityContext.session-expired.test.tsx +92 -0
  44. package/src/RedactoPrivacyCenter/context/DataAvailabilityContext.tsx +15 -3
  45. package/src/RedactoPrivacyCenter/context/types.ts +4 -0
  46. package/src/RedactoPrivacyCenter/lib/consent-manager/utils.tsx +25 -23
  47. package/src/RedactoPrivacyCenter/lib/constants.ts +23 -10
  48. package/src/RedactoPrivacyCenter/lib/queries.ts +9 -2
  49. package/src/RedactoPrivacyCenter/lib/utils.refresh-circuit.test.ts +127 -0
  50. package/src/RedactoPrivacyCenter/lib/utils.refresh-storage.test.ts +85 -0
  51. package/src/RedactoPrivacyCenter/lib/utils.session-expired.test.ts +109 -0
  52. package/src/RedactoPrivacyCenter/lib/utils.ts +265 -139
  53. package/src/RedactoPrivacyCenter/locales/as/translation.json +2 -0
  54. package/src/RedactoPrivacyCenter/locales/bho/translation.json +2 -0
  55. package/src/RedactoPrivacyCenter/locales/bn/translation.json +2 -0
  56. package/src/RedactoPrivacyCenter/locales/brx/translation.json +2 -0
  57. package/src/RedactoPrivacyCenter/locales/doi/translation.json +2 -0
  58. package/src/RedactoPrivacyCenter/locales/en/translation.json +5 -0
  59. package/src/RedactoPrivacyCenter/locales/gom/translation.json +2 -0
  60. package/src/RedactoPrivacyCenter/locales/gu/translation.json +2 -0
  61. package/src/RedactoPrivacyCenter/locales/hi/translation.json +2 -0
  62. package/src/RedactoPrivacyCenter/locales/kn/translation.json +2 -0
  63. package/src/RedactoPrivacyCenter/locales/ks/translation.json +2 -0
  64. package/src/RedactoPrivacyCenter/locales/mai/translation.json +2 -0
  65. package/src/RedactoPrivacyCenter/locales/ml/translation.json +2 -0
  66. package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +2 -0
  67. package/src/RedactoPrivacyCenter/locales/mr/translation.json +2 -0
  68. package/src/RedactoPrivacyCenter/locales/ne/translation.json +2 -0
  69. package/src/RedactoPrivacyCenter/locales/or/translation.json +2 -0
  70. package/src/RedactoPrivacyCenter/locales/pa/translation.json +2 -0
  71. package/src/RedactoPrivacyCenter/locales/sa/translation.json +2 -0
  72. package/src/RedactoPrivacyCenter/locales/sat/translation.json +2 -0
  73. package/src/RedactoPrivacyCenter/locales/sd/translation.json +2 -0
  74. package/src/RedactoPrivacyCenter/locales/ta/translation.json +2 -0
  75. package/src/RedactoPrivacyCenter/locales/te/translation.json +2 -0
  76. package/src/RedactoPrivacyCenter/locales/ur/translation.json +2 -0
  77. package/src/RedactoPrivacyCenter/styles/injectStyles.ts +16 -0
  78. package/src/index.ts +2 -0
  79. package/src/shared/api-errors.ts +9 -0
  80. package/src/RedactoPrivacyCenter/components/activitiesColumns.tsx +0 -141
@@ -642,6 +642,7 @@ type AuthContextValue = Readonly<{
642
642
  refreshToken: string;
643
643
  onError: (error: Error) => boolean;
644
644
  updateTokens: (accessToken: string, refreshToken?: string) => void;
645
+ sessionExpired: boolean;
645
646
  }>;
646
647
  type BaseUrlContextValue = Readonly<{
647
648
  baseUrl: string;
@@ -663,7 +664,10 @@ declare function exchangeTokenServer(token: string, consentClient?: ReturnType<t
663
664
 
664
665
  declare const getCookieValue: (name: string) => string | null;
665
666
  /**
666
- * Set refresh token cookie with proper attributes
667
+ * Persist the refresh token. Named `setRefreshTokenCookie` for backward
668
+ * compatibility (it is part of the package's exported surface); it now writes
669
+ * to localStorage rather than a cookie, and clears any cookie an older SDK
670
+ * version left at path=/privacy-center.
667
671
  * @param refreshToken - The refresh token value to set
668
672
  */
669
673
  declare const setRefreshTokenCookie: (refreshToken: string) => void;
@@ -642,6 +642,7 @@ type AuthContextValue = Readonly<{
642
642
  refreshToken: string;
643
643
  onError: (error: Error) => boolean;
644
644
  updateTokens: (accessToken: string, refreshToken?: string) => void;
645
+ sessionExpired: boolean;
645
646
  }>;
646
647
  type BaseUrlContextValue = Readonly<{
647
648
  baseUrl: string;
@@ -663,7 +664,10 @@ declare function exchangeTokenServer(token: string, consentClient?: ReturnType<t
663
664
 
664
665
  declare const getCookieValue: (name: string) => string | null;
665
666
  /**
666
- * Set refresh token cookie with proper attributes
667
+ * Persist the refresh token. Named `setRefreshTokenCookie` for backward
668
+ * compatibility (it is part of the package's exported surface); it now writes
669
+ * to localStorage rather than a cookie, and clears any cookie an older SDK
670
+ * version left at path=/privacy-center.
667
671
  * @param refreshToken - The refresh token value to set
668
672
  */
669
673
  declare const setRefreshTokenCookie: (refreshToken: string) => void;