@redacto.io/consent-sdk-react 10.0.0-beta.9 → 10.1.0-beta.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 (264) hide show
  1. package/NOTICE.md +17 -0
  2. package/README.md +141 -3
  3. package/dist/chunk-FT5G2PXK.mjs +193 -0
  4. package/dist/fonts.d.mts +35 -0
  5. package/dist/fonts.d.ts +35 -0
  6. package/dist/fonts.js +183 -0
  7. package/dist/fonts.mjs +10 -0
  8. package/dist/index.d.mts +18 -1
  9. package/dist/index.d.ts +18 -1
  10. package/dist/index.js +1864 -1158
  11. package/dist/index.mjs +1444 -957
  12. package/dist/montserrat.generated-NBTECYRW.mjs +22 -0
  13. package/dist/privacy-center.d.mts +0 -1
  14. package/dist/privacy-center.d.ts +0 -1
  15. package/dist/privacy-center.js +2 -66
  16. package/dist/privacy-center.mjs +2 -66
  17. package/dist/types-xaCyZUfo.d.mts +53 -0
  18. package/dist/types-xaCyZUfo.d.ts +53 -0
  19. package/package.json +10 -1
  20. package/.turbo/turbo-build.log +0 -22
  21. package/.turbo/turbo-test.log +0 -203
  22. package/.turbo/turbo-verify-pack.log +0 -6
  23. package/CHANGELOG.md +0 -353
  24. package/src/RedactoNoticeAssisted/RedactoNoticeAssisted.test.tsx +0 -934
  25. package/src/RedactoNoticeAssisted/RedactoNoticeAssisted.tsx +0 -2160
  26. package/src/RedactoNoticeAssisted/api/index.ts +0 -275
  27. package/src/RedactoNoticeAssisted/api/types.ts +0 -182
  28. package/src/RedactoNoticeAssisted/assets/redacto-logo.png +0 -0
  29. package/src/RedactoNoticeAssisted/constants.ts +0 -51
  30. package/src/RedactoNoticeAssisted/i18n.ts +0 -1408
  31. package/src/RedactoNoticeAssisted/index.ts +0 -1
  32. package/src/RedactoNoticeAssisted/injectStyles.ts +0 -251
  33. package/src/RedactoNoticeAssisted/styles.ts +0 -730
  34. package/src/RedactoNoticeAssisted/types.ts +0 -26
  35. package/src/RedactoNoticeAssisted/useMediaQuery.ts +0 -36
  36. package/src/RedactoNoticeConsent/RedactoNoticeConsent.test.tsx +0 -1152
  37. package/src/RedactoNoticeConsent/RedactoNoticeConsent.tsx +0 -4308
  38. package/src/RedactoNoticeConsent/api/index.ts +0 -542
  39. package/src/RedactoNoticeConsent/api/sandbox.ts +0 -150
  40. package/src/RedactoNoticeConsent/api/types.ts +0 -515
  41. package/src/RedactoNoticeConsent/assets/redacto-logo.png +0 -0
  42. package/src/RedactoNoticeConsent/components/DigiLockerCallback.tsx +0 -602
  43. package/src/RedactoNoticeConsent/components/index.ts +0 -7
  44. package/src/RedactoNoticeConsent/constants.ts +0 -20
  45. package/src/RedactoNoticeConsent/index.ts +0 -1
  46. package/src/RedactoNoticeConsent/injectStyles.ts +0 -151
  47. package/src/RedactoNoticeConsent/language-codes.ts +0 -95
  48. package/src/RedactoNoticeConsent/services/storage.ts +0 -122
  49. package/src/RedactoNoticeConsent/styles.ts +0 -409
  50. package/src/RedactoNoticeConsent/types.ts +0 -80
  51. package/src/RedactoNoticeConsent/useMediaQuery.ts +0 -36
  52. package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.test.tsx +0 -369
  53. package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx +0 -687
  54. package/src/RedactoNoticeConsentInline/api/index.ts +0 -106
  55. package/src/RedactoNoticeConsentInline/api/types.ts +0 -183
  56. package/src/RedactoNoticeConsentInline/assets/redacto-logo.png +0 -0
  57. package/src/RedactoNoticeConsentInline/index.ts +0 -1
  58. package/src/RedactoNoticeConsentInline/injectStyles.ts +0 -40
  59. package/src/RedactoNoticeConsentInline/styles.ts +0 -397
  60. package/src/RedactoNoticeConsentInline/types.ts +0 -51
  61. package/src/RedactoNoticeConsentInline/useMediaQuery.ts +0 -36
  62. package/src/RedactoPrivacyCenter/NotificationsPage.tsx +0 -182
  63. package/src/RedactoPrivacyCenter/PrivacyCenterActivityPage.tsx +0 -19
  64. package/src/RedactoPrivacyCenter/PrivacyCenterCaseDetailsPage.tsx +0 -156
  65. package/src/RedactoPrivacyCenter/PrivacyCenterConsentManagerPage.tsx +0 -17
  66. package/src/RedactoPrivacyCenter/PrivacyCenterFormPage.tsx +0 -79
  67. package/src/RedactoPrivacyCenter/PrivacyCenterHomePage.tsx +0 -36
  68. package/src/RedactoPrivacyCenter/PrivacyCenterLayout.tsx +0 -177
  69. package/src/RedactoPrivacyCenter/PrivacyCenterMyReceiptPage.tsx +0 -26
  70. package/src/RedactoPrivacyCenter/RedactoPrivacyCenter.tsx +0 -93
  71. package/src/RedactoPrivacyCenter/api/actions.ts +0 -695
  72. package/src/RedactoPrivacyCenter/api/client.ts +0 -1003
  73. package/src/RedactoPrivacyCenter/api/config.ts +0 -33
  74. package/src/RedactoPrivacyCenter/api/fetcher.ts +0 -275
  75. package/src/RedactoPrivacyCenter/api/orgBranding.ts +0 -16
  76. package/src/RedactoPrivacyCenter/api/upload.ts +0 -93
  77. package/src/RedactoPrivacyCenter/assets/character.svg +0 -31
  78. package/src/RedactoPrivacyCenter/assets/fileAttach.svg +0 -9
  79. package/src/RedactoPrivacyCenter/assets/greenTick.svg +0 -4
  80. package/src/RedactoPrivacyCenter/assets/mail.svg +0 -3
  81. package/src/RedactoPrivacyCenter/assets/poweredByRedacto.svg +0 -9
  82. package/src/RedactoPrivacyCenter/assets/sentImg.svg +0 -9
  83. package/src/RedactoPrivacyCenter/assets/uploadFileIcon.svg +0 -9
  84. package/src/RedactoPrivacyCenter/components/ActivitiesList.tsx +0 -252
  85. package/src/RedactoPrivacyCenter/components/ActivityTimeline.tsx +0 -239
  86. package/src/RedactoPrivacyCenter/components/AppShell/AppShell.tsx +0 -268
  87. package/src/RedactoPrivacyCenter/components/AppShell/MobileNavDrawer.tsx +0 -218
  88. package/src/RedactoPrivacyCenter/components/AppShell/NavItem.tsx +0 -205
  89. package/src/RedactoPrivacyCenter/components/AppShell/PageHeader.tsx +0 -107
  90. package/src/RedactoPrivacyCenter/components/AppShell/SidebarNav.tsx +0 -100
  91. package/src/RedactoPrivacyCenter/components/AppShell/TopAppBar.tsx +0 -339
  92. package/src/RedactoPrivacyCenter/components/AppShell/UserMenu.tsx +0 -245
  93. package/src/RedactoPrivacyCenter/components/AppShell/hooks/useIsTruncated.ts +0 -28
  94. package/src/RedactoPrivacyCenter/components/AppShell/hooks/useKeyboardShortcut.ts +0 -40
  95. package/src/RedactoPrivacyCenter/components/AppShell/hooks/useSidebarState.ts +0 -62
  96. package/src/RedactoPrivacyCenter/components/AppShell/usePrivacyCenterExitAction.ts +0 -36
  97. package/src/RedactoPrivacyCenter/components/CaseDetails/AttachmentCard.tsx +0 -38
  98. package/src/RedactoPrivacyCenter/components/CaseDetails/ChatBubble.tsx +0 -31
  99. package/src/RedactoPrivacyCenter/components/CaseDetails/DocumentRequestCard.tsx +0 -79
  100. package/src/RedactoPrivacyCenter/components/CaseDetails/FinalizedTooltipWrapper.tsx +0 -25
  101. package/src/RedactoPrivacyCenter/components/CaseDetails/MessageComposer.tsx +0 -96
  102. package/src/RedactoPrivacyCenter/components/CaseDetails/MessageItem.tsx +0 -97
  103. package/src/RedactoPrivacyCenter/components/CaseDetails/MessagesTab.tsx +0 -156
  104. package/src/RedactoPrivacyCenter/components/CaseDetails/RequestDetailsTab.tsx +0 -171
  105. package/src/RedactoPrivacyCenter/components/CaseDetails/StatusEvent.tsx +0 -23
  106. package/src/RedactoPrivacyCenter/components/CaseDetails/useFileUpload.ts +0 -116
  107. package/src/RedactoPrivacyCenter/components/CaseDetails/useMessagePolling.ts +0 -43
  108. package/src/RedactoPrivacyCenter/components/CaseDetails/utils.ts +0 -71
  109. package/src/RedactoPrivacyCenter/components/CaseDetailsModal.tsx +0 -469
  110. package/src/RedactoPrivacyCenter/components/CaseHistory.tsx +0 -426
  111. package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +0 -1206
  112. package/src/RedactoPrivacyCenter/components/ConsentManagerCells.tsx +0 -218
  113. package/src/RedactoPrivacyCenter/components/ConsentManagerColumns.tsx +0 -138
  114. package/src/RedactoPrivacyCenter/components/ConsentManagerConstants.ts +0 -7
  115. package/src/RedactoPrivacyCenter/components/ConsentManagerExpandedRow.tsx +0 -179
  116. package/src/RedactoPrivacyCenter/components/ConsentManagerGroupedColumns.tsx +0 -318
  117. package/src/RedactoPrivacyCenter/components/ConsentManagerProductCards.tsx +0 -333
  118. package/src/RedactoPrivacyCenter/components/ConsentManagerPurposeCards.tsx +0 -102
  119. package/src/RedactoPrivacyCenter/components/ConsentManagerTableSkeleton.tsx +0 -159
  120. package/src/RedactoPrivacyCenter/components/DataRequest/CorrectionDataSection.tsx +0 -189
  121. package/src/RedactoPrivacyCenter/components/DataRequest/GrievanceDataSection.tsx +0 -118
  122. package/src/RedactoPrivacyCenter/components/DataRequest/NominationDataSection.tsx +0 -66
  123. package/src/RedactoPrivacyCenter/components/DataRequest/ProductSelectionSection.tsx +0 -222
  124. package/src/RedactoPrivacyCenter/components/DataRequest/PurposeSelectionSection.tsx +0 -331
  125. package/src/RedactoPrivacyCenter/components/Form.tsx +0 -1821
  126. package/src/RedactoPrivacyCenter/components/GrievanceTable.tsx +0 -174
  127. package/src/RedactoPrivacyCenter/components/GrievanceTablePagination.tsx +0 -337
  128. package/src/RedactoPrivacyCenter/components/ModifyConsentModal.tsx +0 -334
  129. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationBell.tsx +0 -173
  130. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationCTAButton.tsx +0 -18
  131. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationDropdown.tsx +0 -54
  132. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationDropdownItem.tsx +0 -57
  133. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationIcon.tsx +0 -19
  134. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationListPanel.tsx +0 -92
  135. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationRefreshButton.tsx +0 -20
  136. package/src/RedactoPrivacyCenter/components/NotificationHub/NotificationRow.tsx +0 -58
  137. package/src/RedactoPrivacyCenter/components/NotificationHub/StatCard.tsx +0 -10
  138. package/src/RedactoPrivacyCenter/components/NotificationHub/useNotificationActions.ts +0 -112
  139. package/src/RedactoPrivacyCenter/components/NotificationHub/utils.ts +0 -27
  140. package/src/RedactoPrivacyCenter/components/Pagination.tsx +0 -140
  141. package/src/RedactoPrivacyCenter/components/PrivacyCenterEmptyState.tsx +0 -76
  142. package/src/RedactoPrivacyCenter/components/PrivacyCenterSessionExpired.tsx +0 -97
  143. package/src/RedactoPrivacyCenter/components/ReceiptsList.tsx +0 -454
  144. package/src/RedactoPrivacyCenter/components/RequestSubmit.tsx +0 -270
  145. package/src/RedactoPrivacyCenter/components/SelectUser.tsx +0 -95
  146. package/src/RedactoPrivacyCenter/components/SelectUserGate.tsx +0 -195
  147. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/constants.tsx +0 -25
  148. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/types.ts +0 -21
  149. package/src/RedactoPrivacyCenter/components/caseHistoryColumns.tsx +0 -159
  150. package/src/RedactoPrivacyCenter/components/constant.ts +0 -52
  151. package/src/RedactoPrivacyCenter/components/groupHelpers.ts +0 -155
  152. package/src/RedactoPrivacyCenter/components/receiptColumns.tsx +0 -203
  153. package/src/RedactoPrivacyCenter/components/types.ts +0 -123
  154. package/src/RedactoPrivacyCenter/components/utils.tsx +0 -10
  155. package/src/RedactoPrivacyCenter/config/routes.ts +0 -9
  156. package/src/RedactoPrivacyCenter/config/table.ts +0 -25
  157. package/src/RedactoPrivacyCenter/context/AuthContext.tsx +0 -252
  158. package/src/RedactoPrivacyCenter/context/BaseUrlContext.tsx +0 -47
  159. package/src/RedactoPrivacyCenter/context/BrandingContext.tsx +0 -52
  160. package/src/RedactoPrivacyCenter/context/DataAvailabilityContext.session-expired.test.tsx +0 -92
  161. package/src/RedactoPrivacyCenter/context/DataAvailabilityContext.tsx +0 -181
  162. package/src/RedactoPrivacyCenter/context/LocaleContext.tsx +0 -11
  163. package/src/RedactoPrivacyCenter/context/NavigationContext.tsx +0 -96
  164. package/src/RedactoPrivacyCenter/context/OrganizationContext.tsx +0 -30
  165. package/src/RedactoPrivacyCenter/context/PageChromeContext.tsx +0 -80
  166. package/src/RedactoPrivacyCenter/context/ProfileSwitchContext.tsx +0 -15
  167. package/src/RedactoPrivacyCenter/context/types.ts +0 -57
  168. package/src/RedactoPrivacyCenter/lib/api.ts +0 -759
  169. package/src/RedactoPrivacyCenter/lib/consent-manager/utils.tsx +0 -67
  170. package/src/RedactoPrivacyCenter/lib/constants.ts +0 -283
  171. package/src/RedactoPrivacyCenter/lib/i18n.ts +0 -81
  172. package/src/RedactoPrivacyCenter/lib/locales.ts +0 -102
  173. package/src/RedactoPrivacyCenter/lib/queries.ts +0 -141
  174. package/src/RedactoPrivacyCenter/lib/sandbox.ts +0 -104
  175. package/src/RedactoPrivacyCenter/lib/types.ts +0 -896
  176. package/src/RedactoPrivacyCenter/lib/useCurrentLanguage.ts +0 -37
  177. package/src/RedactoPrivacyCenter/lib/utils.refresh-circuit.test.ts +0 -127
  178. package/src/RedactoPrivacyCenter/lib/utils.refresh-storage.test.ts +0 -85
  179. package/src/RedactoPrivacyCenter/lib/utils.session-expired.test.ts +0 -109
  180. package/src/RedactoPrivacyCenter/lib/utils.ts +0 -798
  181. package/src/RedactoPrivacyCenter/locales/as/translation.json +0 -342
  182. package/src/RedactoPrivacyCenter/locales/bn/translation.json +0 -342
  183. package/src/RedactoPrivacyCenter/locales/brx/translation.json +0 -342
  184. package/src/RedactoPrivacyCenter/locales/doi/translation.json +0 -342
  185. package/src/RedactoPrivacyCenter/locales/en/translation.json +0 -357
  186. package/src/RedactoPrivacyCenter/locales/gom/translation.json +0 -342
  187. package/src/RedactoPrivacyCenter/locales/gu/translation.json +0 -342
  188. package/src/RedactoPrivacyCenter/locales/hi/translation.json +0 -345
  189. package/src/RedactoPrivacyCenter/locales/kn/translation.json +0 -342
  190. package/src/RedactoPrivacyCenter/locales/ks/translation.json +0 -342
  191. package/src/RedactoPrivacyCenter/locales/mai/translation.json +0 -342
  192. package/src/RedactoPrivacyCenter/locales/ml/translation.json +0 -342
  193. package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +0 -342
  194. package/src/RedactoPrivacyCenter/locales/mr/translation.json +0 -342
  195. package/src/RedactoPrivacyCenter/locales/ne/translation.json +0 -342
  196. package/src/RedactoPrivacyCenter/locales/or/translation.json +0 -342
  197. package/src/RedactoPrivacyCenter/locales/pa/translation.json +0 -342
  198. package/src/RedactoPrivacyCenter/locales/sa/translation.json +0 -342
  199. package/src/RedactoPrivacyCenter/locales/sat/translation.json +0 -342
  200. package/src/RedactoPrivacyCenter/locales/sd/translation.json +0 -342
  201. package/src/RedactoPrivacyCenter/locales/ta/translation.json +0 -342
  202. package/src/RedactoPrivacyCenter/locales/te/translation.json +0 -342
  203. package/src/RedactoPrivacyCenter/locales/ur/translation.json +0 -342
  204. package/src/RedactoPrivacyCenter/styles/applyBrandingTheme.ts +0 -66
  205. package/src/RedactoPrivacyCenter/styles/base.css +0 -117
  206. package/src/RedactoPrivacyCenter/styles/injectStyles.ts +0 -3108
  207. package/src/RedactoPrivacyCenter/styles/pcStyles.ts +0 -831
  208. package/src/RedactoPrivacyCenter/styles/responsive.ts +0 -138
  209. package/src/RedactoPrivacyCenter/styles/variables.css +0 -96
  210. package/src/RedactoPrivacyCenter/table/AdvancedTable.tsx +0 -387
  211. package/src/RedactoPrivacyCenter/table/AdvancedTablePagination.tsx +0 -468
  212. package/src/RedactoPrivacyCenter/table/index.ts +0 -2
  213. package/src/RedactoPrivacyCenter/types/images.d.ts +0 -29
  214. package/src/RedactoPrivacyCenter/ui/Footer.tsx +0 -69
  215. package/src/RedactoPrivacyCenter/ui/FormBlockWrapper.tsx +0 -54
  216. package/src/RedactoPrivacyCenter/ui/PCAccordion.tsx +0 -93
  217. package/src/RedactoPrivacyCenter/ui/PCActionIcon.tsx +0 -47
  218. package/src/RedactoPrivacyCenter/ui/PCAvatar.test.tsx +0 -83
  219. package/src/RedactoPrivacyCenter/ui/PCAvatar.tsx +0 -93
  220. package/src/RedactoPrivacyCenter/ui/PCBadge.tsx +0 -48
  221. package/src/RedactoPrivacyCenter/ui/PCButton.tsx +0 -77
  222. package/src/RedactoPrivacyCenter/ui/PCCheckbox.tsx +0 -55
  223. package/src/RedactoPrivacyCenter/ui/PCCollapse.tsx +0 -107
  224. package/src/RedactoPrivacyCenter/ui/PCEmpty.tsx +0 -35
  225. package/src/RedactoPrivacyCenter/ui/PCInput.tsx +0 -132
  226. package/src/RedactoPrivacyCenter/ui/PCLoader.tsx +0 -31
  227. package/src/RedactoPrivacyCenter/ui/PCModal.tsx +0 -106
  228. package/src/RedactoPrivacyCenter/ui/PCPopover.tsx +0 -206
  229. package/src/RedactoPrivacyCenter/ui/PCSelect.tsx +0 -433
  230. package/src/RedactoPrivacyCenter/ui/PCTable.tsx +0 -149
  231. package/src/RedactoPrivacyCenter/ui/PCText.tsx +0 -41
  232. package/src/RedactoPrivacyCenter/ui/PCTextarea.tsx +0 -43
  233. package/src/RedactoPrivacyCenter/ui/PCTitle.tsx +0 -37
  234. package/src/RedactoPrivacyCenter/ui/PCTooltip.tsx +0 -121
  235. package/src/RedactoPrivacyCenter/ui/SimpleBar.tsx +0 -25
  236. package/src/RedactoPrivacyCenter/ui/StatusBadge.tsx +0 -53
  237. package/src/RedactoPrivacyCenter/ui/index.ts +0 -18
  238. package/src/RedactoPrivacyCenter/utils/cn.ts +0 -28
  239. package/src/RedactoPrivacyCenter/utils/date.ts +0 -48
  240. package/src/RedactoPrivacyCenter/utils/status.ts +0 -111
  241. package/src/RedactoPrivacyCenter/utils/toast.ts +0 -130
  242. package/src/index.ts +0 -19
  243. package/src/privacy-center.ts +0 -113
  244. package/src/shared/api-errors.ts +0 -180
  245. package/src/shared/notice-consent-status.ts +0 -190
  246. package/src/shared/sandbox.ts +0 -6
  247. package/src/types/css.d.ts +0 -4
  248. package/src/types/images.d.ts +0 -19
  249. package/src/types/react-jsx.d.ts +0 -26
  250. package/tests/DataAvailabilityContext.test.tsx +0 -123
  251. package/tests/Form.test.tsx +0 -1424
  252. package/tests/ManageConsentErrorMapping.test.tsx +0 -85
  253. package/tests/ProductSelectionSection.test.tsx +0 -328
  254. package/tests/RequestSubmit.test.tsx +0 -135
  255. package/tests/RevocablePurpose.test.tsx +0 -146
  256. package/tests/RevokeWarningMessage.test.tsx +0 -151
  257. package/tests/consentClient.test.ts +0 -217
  258. package/tests/manageConsentServer.test.ts +0 -38
  259. package/tests/mocks.ts +0 -257
  260. package/tests/resolveContactFromJwt.test.ts +0 -44
  261. package/tests/setup.ts +0 -16
  262. package/tsconfig.json +0 -16
  263. package/tsup.config.ts +0 -31
  264. package/vitest.config.ts +0 -16
@@ -1,397 +0,0 @@
1
- export const styles = {
2
- overlay: {
3
- position: "fixed",
4
- top: 0,
5
- left: 0,
6
- width: "100%",
7
- height: "100%",
8
- backgroundColor: "rgba(0, 0, 0, 0.5)",
9
- display: "flex",
10
- alignItems: "center",
11
- justifyContent: "center",
12
- zIndex: 999,
13
- animation: "overlayFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1)",
14
- pointerEvents: "all",
15
- margin: 0,
16
- padding: 0,
17
- boxSizing: "border-box",
18
- },
19
-
20
- container: {
21
- position: "relative",
22
- width: "100%",
23
- maxWidth: "700px",
24
- borderRadius: "8px",
25
- backgroundColor: "#ffffff",
26
- boxShadow: "0px 1px 3px rgba(0, 0, 0, 0.1)",
27
- border: "1px solid #e5e7eb",
28
- display: "flex",
29
- flexDirection: "column",
30
- margin: 0,
31
- padding: 0,
32
- boxSizing: "border-box",
33
- textAlign: "left",
34
- fontFamily: "inherit",
35
- },
36
-
37
- content: {
38
- margin: "22px",
39
- display: "flex",
40
- flexDirection: "column",
41
- flexGrow: 1,
42
- overflow: "hidden",
43
- minHeight: 0,
44
- boxSizing: "border-box",
45
- textAlign: "left",
46
- },
47
-
48
- topSection: {
49
- display: "flex",
50
- justifyContent: "space-between",
51
- alignItems: "center",
52
- paddingBottom: "15px",
53
- borderBottom: "1px solid #e5e7eb",
54
- boxShadow: "0 1px 2px rgba(0, 0, 0, 0.03)",
55
- backgroundColor: "#ffffff",
56
- margin: 0,
57
- boxSizing: "border-box",
58
- textAlign: "left",
59
- },
60
-
61
- topLeft: {
62
- display: "flex",
63
- alignItems: "center",
64
- gap: "10px",
65
- margin: 0,
66
- padding: 0,
67
- boxSizing: "border-box",
68
- },
69
-
70
- logo: {
71
- height: "32px",
72
- width: "auto",
73
- objectFit: "contain",
74
- margin: 0,
75
- padding: 0,
76
- display: "block",
77
- },
78
-
79
- title: {
80
- fontSize: "18px",
81
- fontWeight: 700,
82
- lineHeight: "150%",
83
- letterSpacing: "0.2px",
84
- verticalAlign: "middle",
85
- color: "#101828",
86
- margin: 0,
87
- padding: 0,
88
- textAlign: "left",
89
- },
90
-
91
- topRight: {
92
- borderRadius: "8px",
93
- padding: "3px 9px",
94
- border: "1px solid #d0d5dd",
95
- display: "flex",
96
- alignItems: "center",
97
- justifyContent: "center",
98
- fontWeight: 400,
99
- fontSize: "12px",
100
- lineHeight: "150%",
101
- letterSpacing: "0.2px",
102
- verticalAlign: "middle",
103
- color: "#344054",
104
- gap: "5px",
105
- margin: 0,
106
- boxSizing: "border-box",
107
- textAlign: "left",
108
- cursor: "pointer",
109
- backgroundColor: "#ffffff",
110
- },
111
-
112
- middleSection: {
113
- margin: "20px 0px",
114
- display: "flex",
115
- flexDirection: "column",
116
- gap: "12px",
117
- flexGrow: 1,
118
- overflowY: "auto",
119
- minHeight: 0,
120
- paddingRight: "15px",
121
- boxSizing: "border-box",
122
- textAlign: "left",
123
- },
124
-
125
- privacyText: {
126
- fontSize: "16px",
127
- fontWeight: 400,
128
- lineHeight: "150%",
129
- letterSpacing: "0.2px",
130
- color: "#344054",
131
- margin: 0,
132
- padding: 0,
133
- textAlign: "left",
134
- },
135
-
136
- link: {
137
- color: "#4f87ff",
138
- textDecoration: "none",
139
- margin: 0,
140
- padding: 0,
141
- boxSizing: "border-box",
142
- },
143
-
144
- subTitle: {
145
- fontWeight: 600,
146
- fontSize: "16px",
147
- lineHeight: "150%",
148
- letterSpacing: "0.2px",
149
- color: "#101828",
150
- margin: 0,
151
- padding: 0,
152
- textAlign: "left",
153
- },
154
-
155
- optionsContainer: {
156
- display: "flex",
157
- flexDirection: "column",
158
- gap: "14px",
159
- margin: 0,
160
- padding: 0,
161
- boxSizing: "border-box",
162
- },
163
-
164
- optionItem: {
165
- display: "flex",
166
- justifyContent: "space-between",
167
- alignItems: "center",
168
- margin: 0,
169
- padding: 0,
170
- boxSizing: "border-box",
171
- },
172
-
173
- optionLeft: {
174
- display: "flex",
175
- gap: "12px",
176
- alignItems: "center",
177
- cursor: "pointer",
178
- margin: 0,
179
- padding: 0,
180
- boxSizing: "border-box",
181
- },
182
-
183
- optionTextContainer: {
184
- display: "flex",
185
- flexDirection: "column",
186
- margin: 0,
187
- padding: 0,
188
- boxSizing: "border-box",
189
- },
190
-
191
- optionTitle: {
192
- fontWeight: 500,
193
- fontSize: "16px",
194
- lineHeight: "150%",
195
- letterSpacing: "0.2px",
196
- color: "#101828",
197
- margin: 0,
198
- padding: 0,
199
- textAlign: "left",
200
- },
201
-
202
- optionDescription: {
203
- fontWeight: 400,
204
- fontSize: "12px",
205
- lineHeight: "150%",
206
- letterSpacing: "0.2px",
207
- color: "#475467",
208
- verticalAlign: "middle",
209
- margin: 0,
210
- padding: 0,
211
- textAlign: "left",
212
- },
213
-
214
- checkboxLarge: {
215
- height: "20px",
216
- width: "20px",
217
- padding: "4px",
218
- borderRadius: "5px",
219
- border: "2px solid #d0d5dd",
220
- margin: 0,
221
- boxSizing: "border-box",
222
- appearance: "none",
223
- WebkitAppearance: "none",
224
- MozAppearance: "none",
225
- cursor: "pointer",
226
- position: "relative",
227
- backgroundColor: "transparent",
228
- },
229
-
230
- dataElementsContainer: {
231
- marginLeft: "27px",
232
- display: "flex",
233
- flexDirection: "column",
234
- margin: 0,
235
- padding: 0,
236
- boxSizing: "border-box",
237
- paddingLeft: "22px",
238
- },
239
-
240
- dataElementItem: {
241
- display: "flex",
242
- alignItems: "center",
243
- gap: "10px",
244
- justifyContent: "space-between",
245
- margin: 0,
246
- padding: 0,
247
- boxSizing: "border-box",
248
- minHeight: "24px",
249
- },
250
-
251
- dataElementText: {
252
- fontWeight: 400,
253
- fontSize: "14px",
254
- lineHeight: "150%",
255
- letterSpacing: "0.2px",
256
- color: "#344054",
257
- margin: 0,
258
- padding: 0,
259
- textAlign: "left",
260
- },
261
-
262
- checkboxSmall: {
263
- height: "16px",
264
- width: "16px",
265
- padding: "4px",
266
- borderRadius: "5px",
267
- border: "2px solid #d0d5dd",
268
- margin: 0,
269
- boxSizing: "border-box",
270
- appearance: "none",
271
- WebkitAppearance: "none",
272
- MozAppearance: "none",
273
- cursor: "pointer",
274
- position: "relative",
275
- backgroundColor: "transparent",
276
- },
277
-
278
- bottomSection: {
279
- display: "flex",
280
- justifyContent: "space-between",
281
- gap: "29px",
282
- paddingTop: "15px",
283
- borderTop: "1px solid #e5e7eb",
284
- boxShadow: "0 -1px 2px rgba(0, 0, 0, 0.03)",
285
- backgroundColor: "#ffffff",
286
- margin: 0,
287
- boxSizing: "border-box",
288
- },
289
-
290
- button: {
291
- width: "100%",
292
- borderRadius: "8px",
293
- padding: "9px 45px",
294
- fontWeight: 400,
295
- fontSize: "16px",
296
- lineHeight: "150%",
297
- letterSpacing: "0.2px",
298
- cursor: "pointer",
299
- margin: 0,
300
- boxSizing: "border-box",
301
- textAlign: "center",
302
- },
303
-
304
- acceptButton: {
305
- backgroundColor: "#4f87ff",
306
- border: "none",
307
- color: "#ffffff",
308
- },
309
-
310
- cancelButton: {
311
- border: "1px solid #d0d5dd",
312
- backgroundColor: "#ffffff",
313
- color: "#000000",
314
- },
315
-
316
- languageSelectorContainer: {
317
- position: "relative",
318
- margin: 0,
319
- padding: 0,
320
- boxSizing: "border-box",
321
- },
322
-
323
- languageDropdown: {
324
- position: "absolute",
325
- top: "100%",
326
- right: 0,
327
- backgroundColor: "#ffffff",
328
- border: "1px solid #d0d5dd",
329
- borderRadius: "4px",
330
- boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.1)",
331
- zIndex: 10,
332
- width: "max-content",
333
- marginTop: "4px",
334
- padding: 0,
335
- boxSizing: "border-box",
336
- textAlign: "left",
337
- },
338
-
339
- languageItem: {
340
- padding: "8px 12px",
341
- cursor: "pointer",
342
- fontSize: "12px",
343
- color: "#344054",
344
- backgroundColor: "#ffffff",
345
- borderBottom: "1px solid #e5e7eb",
346
- margin: 0,
347
- boxSizing: "border-box",
348
- textAlign: "left",
349
- },
350
-
351
- selectedLanguageItem: {
352
- backgroundColor: "#f3f4f6",
353
- fontWeight: 600,
354
- },
355
-
356
- loadingContainer: {
357
- display: "flex",
358
- flexDirection: "column",
359
- alignItems: "center",
360
- justifyContent: "center",
361
- padding: "2rem",
362
- minHeight: "200px",
363
- margin: 0,
364
- boxSizing: "border-box",
365
- },
366
-
367
- loadingSpinner: {
368
- width: "40px",
369
- height: "40px",
370
- border: "4px solid #f3f3f3",
371
- borderTop: "4px solid #3498db",
372
- borderRadius: "50%",
373
- animation: "spin 1s linear infinite",
374
- marginBottom: "1rem",
375
- boxSizing: "border-box",
376
- },
377
- } as const;
378
-
379
- // Keyframes
380
- export const keyframes = {
381
- overlayFadeIn: {
382
- from: {
383
- opacity: 0,
384
- },
385
- to: {
386
- opacity: 1,
387
- },
388
- },
389
- spin: {
390
- "0%": {
391
- transform: "rotate(0deg)",
392
- },
393
- "100%": {
394
- transform: "rotate(360deg)",
395
- },
396
- },
397
- } as const;
@@ -1,51 +0,0 @@
1
- import type { Settings } from "./api/types";
2
- import type { DpoInfoTranslation } from "../RedactoNoticeConsent/api/types";
3
-
4
- export type Props = Readonly<{
5
- org_uuid: string;
6
- workspace_uuid: string;
7
- notice_uuid: string;
8
- accessToken?: string;
9
- refreshToken?: string;
10
- baseUrl?: string;
11
- ledgerBaseUrl?: string;
12
- settings?: Partial<Settings>;
13
- language?: string;
14
- onAccept?: () => void;
15
- onDecline?: () => void;
16
- onError?: (error: Error) => void;
17
- onValidationChange?: (isValid: boolean) => void;
18
- applicationId?: string;
19
- }>;
20
-
21
- export type PurposeTranslation = string | { name: string; description: string };
22
-
23
- export type PurposeTranslations = {
24
- [purposeId: string]: PurposeTranslation;
25
- };
26
-
27
- export type DataElementTranslations = {
28
- [elementId: string]: string;
29
- };
30
-
31
- export type TranslationObject = {
32
- notice_text?: string;
33
- additional_text?: string;
34
- confirm_button_text?: string;
35
- decline_button_text?: string;
36
- purposes?: PurposeTranslations;
37
- data_elements?: DataElementTranslations;
38
- purpose_section_heading?: string;
39
- privacy_policy_prefix_text?: string;
40
- privacy_policy_anchor_text?: string;
41
- privacy_center_anchor_text?: string;
42
- dpo_info?: DpoInfoTranslation;
43
- [key: string]:
44
- | string
45
- | PurposeTranslations
46
- | DataElementTranslations
47
- | DpoInfoTranslation
48
- | Record<string, string | undefined>
49
- | Record<string, string | { name: string; description: string }>
50
- | undefined;
51
- };
@@ -1,36 +0,0 @@
1
- import { useState, useEffect } from "react";
2
-
3
- export const useMediaQuery = (query: string): boolean => {
4
- const getMatches = () =>
5
- typeof window !== "undefined" ? window.matchMedia(query).matches : false;
6
- const [matches, setMatches] = useState<boolean>(getMatches);
7
-
8
- useEffect(() => {
9
- if (typeof window === "undefined") return;
10
- const media = window.matchMedia(query);
11
-
12
- // Create event listener
13
- const listener = (e: MediaQueryListEvent) => {
14
- setMatches(e.matches);
15
- };
16
-
17
- // Add listener (fallback for legacy browsers)
18
- if (media.addEventListener) {
19
- media.addEventListener("change", listener);
20
- } else {
21
- // @ts-ignore – deprecated fallback
22
- media.addListener(listener);
23
- }
24
-
25
- // Clean up
26
- return () => {
27
- if (media.removeEventListener) {
28
- media.removeEventListener("change", listener);
29
- } else {
30
- media.removeListener(listener);
31
- }
32
- };
33
- }, [query]);
34
-
35
- return matches;
36
- };
@@ -1,182 +0,0 @@
1
- import { useState, useEffect, useCallback, useRef } from 'react';
2
- import { IoChevronBackOutline } from 'react-icons/io5';
3
- import { useTranslation } from 'react-i18next';
4
- import { usePageChrome } from './context/PageChromeContext';
5
- import { fetchNotifications } from './lib/api';
6
- import { isRefreshBlocked } from './lib/utils';
7
- import type { Notification, NotificationSummary, NotificationCTA, FilterTab } from './lib/types';
8
- import { TAB_TO_CATEGORY, POLL_INTERVAL, NOTIFICATION_PAGE_SIZE, useNotificationStatLabels } from './lib/constants';
9
- import { useCurrentLanguage } from './lib/useCurrentLanguage';
10
- import { StatCard } from './components/NotificationHub/StatCard';
11
- import { NotificationListPanel } from './components/NotificationHub/NotificationListPanel';
12
- import { useNotificationActions } from './components/NotificationHub/useNotificationActions';
13
-
14
- export const NotificationsPage = () => {
15
- const { t } = useTranslation();
16
- const { langParam } = useCurrentLanguage();
17
- const { setPageChromeOverride, clearPageChromeOverride } = usePageChrome();
18
- const statLabels = useNotificationStatLabels();
19
- const {
20
- organizationId, workspaceId, authContext, consentClient, navigateTo,
21
- hasAcknowledgeCTA, handleMarkRead, handleMarkAllRead, handleAcknowledge, handleCTAClick,
22
- } = useNotificationActions();
23
-
24
- const [notifications, setNotifications] = useState<Notification[]>([]);
25
- const [summary, setSummary] = useState<NotificationSummary>({ total: 0, unread: 0, action_needed: 0, acknowledged: 0 });
26
- const [activeTab, setActiveTab] = useState<FilterTab>('all');
27
- const [isLoading, setIsLoading] = useState(true);
28
- const [isRefreshing, setIsRefreshing] = useState(false);
29
- const [totalCount, setTotalCount] = useState(0);
30
- const [skip, setSkip] = useState(0);
31
- const pollRef = useRef<ReturnType<typeof setInterval> | null>(null);
32
- const loadNotificationsRef = useRef<(includeSummary?: boolean, silent?: boolean) => Promise<void>>();
33
-
34
- useEffect(() => {
35
- setPageChromeOverride({ titleKey: 'notificationHub', descriptionKey: 'notificationHubSubtitle' });
36
- return () => clearPageChromeOverride();
37
- }, [setPageChromeOverride, clearPageChromeOverride]);
38
-
39
- const loadNotifications = useCallback(async (includeSummary = false, silent = false) => {
40
- if (!organizationId || !workspaceId) {
41
- return;
42
- }
43
- // Skip polling/loading work while auth is terminally failed / backing off
44
- // (incident 2026-06-22); clear spinners so the UI doesn't hang.
45
- if (isRefreshBlocked(authContext)) {
46
- setIsLoading(false);
47
- setIsRefreshing(false);
48
- return;
49
- }
50
- if (!silent) {
51
- setIsLoading(true);
52
- }
53
- try {
54
- const result = await fetchNotifications(organizationId, workspaceId, {
55
- category: TAB_TO_CATEGORY[activeTab], skip, limit: NOTIFICATION_PAGE_SIZE,
56
- include_summary: includeSummary,
57
- }, authContext, consentClient, langParam);
58
- if (result) {
59
- setNotifications(result.data);
60
- if (result.summary) {
61
- setSummary(result.summary);
62
- }
63
- setTotalCount(result.total);
64
- }
65
- } finally {
66
- setIsLoading(false);
67
- setIsRefreshing(false);
68
- }
69
- }, [organizationId, workspaceId, activeTab, skip, authContext, consentClient, langParam]);
70
-
71
- // Initial load with summary
72
- useEffect(() => { loadNotifications(true); }, [loadNotifications]);
73
-
74
- // Keep ref pointed at the latest loadNotifications so the polling effect
75
- // can call it without depending on (and resetting on) tab/pagination changes.
76
- useEffect(() => {
77
- loadNotificationsRef.current = loadNotifications;
78
- }, [loadNotifications]);
79
-
80
- // Silent poll without summary (counts don't change on pagination)
81
- useEffect(() => {
82
- pollRef.current = setInterval(() => {
83
- loadNotificationsRef.current?.(false, true);
84
- }, POLL_INTERVAL);
85
- return () => {
86
- if (pollRef.current) {
87
- clearInterval(pollRef.current);
88
- }
89
- };
90
- }, []);
91
-
92
- useEffect(() => { setSkip(0); }, [activeTab]);
93
-
94
- const onNotificationClick = useCallback(async (notification: Notification) => {
95
- if (!organizationId || !workspaceId) {
96
- return;
97
- }
98
- const shouldMarkRead = !notification.is_read;
99
- const shouldAutoAcknowledge = !notification.is_acknowledged && !hasAcknowledgeCTA(notification);
100
- if (!shouldMarkRead && !shouldAutoAcknowledge) {
101
- return;
102
- }
103
-
104
- const markedRead = shouldMarkRead ? await handleMarkRead(notification.uuid) : false;
105
- const acknowledged = shouldAutoAcknowledge ? await handleAcknowledge(notification.uuid) : false;
106
- if (!markedRead && !acknowledged) {
107
- return;
108
- }
109
-
110
- setNotifications((prev) => prev.map((n) =>
111
- n.uuid === notification.uuid ? { ...n, ...(markedRead ? { is_read: true } : {}), ...(acknowledged ? { is_acknowledged: true } : {}) } : n
112
- ));
113
- setSummary((prev) => ({
114
- ...prev,
115
- unread: Math.max(0, prev.unread - (markedRead ? 1 : 0)),
116
- acknowledged: prev.acknowledged + (acknowledged && !notification.is_acknowledged ? 1 : 0),
117
- }));
118
- }, [organizationId, workspaceId, hasAcknowledgeCTA, handleMarkRead, handleAcknowledge]);
119
-
120
- const onCTAClick = useCallback(async (notification: Notification, cta: NotificationCTA) => {
121
- const result = await handleCTAClick(notification, cta);
122
- if (result === 'acknowledged') {
123
- setNotifications((prev) => prev.map((n) =>
124
- n.uuid === notification.uuid ? { ...n, is_read: true, is_acknowledged: true } : n
125
- ));
126
- setSummary((prev) => ({
127
- ...prev,
128
- unread: Math.max(0, prev.unread - (notification.is_read ? 0 : 1)),
129
- acknowledged: prev.acknowledged + (notification.is_acknowledged ? 0 : 1),
130
- }));
131
- } else if (result) {
132
- onNotificationClick(notification);
133
- }
134
- }, [handleCTAClick, onNotificationClick]);
135
-
136
- const onMarkAllRead = useCallback(async () => {
137
- const ok = await handleMarkAllRead();
138
- if (!ok) {
139
- return;
140
- }
141
- setNotifications((prev) => prev.map((n) => ({ ...n, is_read: true })));
142
- setSummary((prev) => ({ ...prev, unread: 0 }));
143
- }, [handleMarkAllRead]);
144
-
145
- const onRefresh = useCallback(() => {
146
- setIsRefreshing(true);
147
- loadNotifications(true);
148
- }, [loadNotifications]);
149
-
150
- const onBack = useCallback(() => navigateTo('consent-manager'), [navigateTo]);
151
-
152
- return (
153
- <div className="pc-notification-page">
154
- <button type="button" onClick={onBack} className="pc-notification-back-btn">
155
- <IoChevronBackOutline size={14} />
156
- {t('backToManageConsent')}
157
- </button>
158
-
159
- <div className="pc-notification-stats-grid">
160
- <StatCard value={summary.total} label={statLabels.total} />
161
- <StatCard value={summary.unread} label={statLabels.unread} />
162
- <StatCard value={summary.action_needed} label={statLabels.action_needed} />
163
- <StatCard value={summary.acknowledged} label={statLabels.acknowledged} />
164
- </div>
165
-
166
- <NotificationListPanel
167
- notifications={notifications}
168
- totalCount={totalCount}
169
- activeTab={activeTab}
170
- onTabChange={setActiveTab}
171
- skip={skip}
172
- onSkipChange={setSkip}
173
- isLoading={isLoading}
174
- isRefreshing={isRefreshing}
175
- onRefresh={onRefresh}
176
- onMarkAllRead={onMarkAllRead}
177
- onNotificationClick={onNotificationClick}
178
- onCTAClick={onCTAClick}
179
- />
180
- </div>
181
- );
182
- };
@@ -1,19 +0,0 @@
1
- import { useEffect } from 'react';
2
- import i18n from './lib/i18n';
3
- import ActivitiesList from './components/ActivitiesList';
4
-
5
- export function PrivacyCenterActivityPage() {
6
- useEffect(() => {
7
- if (!i18n.language) {
8
- i18n.changeLanguage('en');
9
- }
10
- }, []);
11
-
12
- return (
13
- <div style={{ width: '100%' }}>
14
- <div style={{ paddingTop: '0.5rem' }}>
15
- <ActivitiesList />
16
- </div>
17
- </div>
18
- );
19
- }