@redacto.io/consent-sdk-react 3.5.0 → 3.6.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 (152) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/LICENSE +176 -0
  3. package/dist/index.d.mts +51 -4
  4. package/dist/index.d.ts +51 -4
  5. package/dist/index.js +1891 -243
  6. package/dist/index.mjs +1890 -243
  7. package/dist/privacy-center.d.mts +566 -0
  8. package/dist/privacy-center.d.ts +566 -0
  9. package/dist/privacy-center.js +17174 -0
  10. package/dist/privacy-center.mjs +17136 -0
  11. package/package.json +47 -3
  12. package/src/RedactoNoticeConsent/RedactoNoticeConsent.test.tsx +201 -118
  13. package/src/RedactoNoticeConsent/RedactoNoticeConsent.tsx +1194 -93
  14. package/src/RedactoNoticeConsent/api/index.ts +335 -206
  15. package/src/RedactoNoticeConsent/api/types.ts +140 -16
  16. package/src/RedactoNoticeConsent/components/DigiLockerCallback.tsx +602 -0
  17. package/src/RedactoNoticeConsent/components/index.ts +7 -0
  18. package/src/RedactoNoticeConsent/injectStyles.ts +11 -0
  19. package/src/RedactoNoticeConsent/language-codes.ts +61 -0
  20. package/src/RedactoNoticeConsent/services/storage.ts +122 -0
  21. package/src/RedactoNoticeConsent/types.ts +2 -0
  22. package/src/RedactoPrivacyCenter/PrivacyCenterActivityPage.tsx +19 -0
  23. package/src/RedactoPrivacyCenter/PrivacyCenterConsentManagerPage.tsx +17 -0
  24. package/src/RedactoPrivacyCenter/PrivacyCenterFormPage.tsx +79 -0
  25. package/src/RedactoPrivacyCenter/PrivacyCenterHomePage.tsx +27 -0
  26. package/src/RedactoPrivacyCenter/PrivacyCenterLayout.tsx +142 -0
  27. package/src/RedactoPrivacyCenter/RedactoPrivacyCenter.tsx +51 -0
  28. package/src/RedactoPrivacyCenter/api/actions.ts +444 -0
  29. package/src/RedactoPrivacyCenter/api/client.ts +413 -0
  30. package/src/RedactoPrivacyCenter/api/config.ts +33 -0
  31. package/src/RedactoPrivacyCenter/api/fetcher.ts +181 -0
  32. package/src/RedactoPrivacyCenter/api/upload.ts +93 -0
  33. package/src/RedactoPrivacyCenter/assets/character.svg +31 -0
  34. package/src/RedactoPrivacyCenter/assets/fileAttach.svg +9 -0
  35. package/src/RedactoPrivacyCenter/assets/greenTick.svg +4 -0
  36. package/src/RedactoPrivacyCenter/assets/mail.svg +3 -0
  37. package/src/RedactoPrivacyCenter/assets/poweredByRedacto.svg +9 -0
  38. package/src/RedactoPrivacyCenter/assets/sentImg.svg +9 -0
  39. package/src/RedactoPrivacyCenter/assets/uploadFileIcon.svg +9 -0
  40. package/src/RedactoPrivacyCenter/components/ActivitiesList.tsx +272 -0
  41. package/src/RedactoPrivacyCenter/components/CaseDetailsModal.tsx +468 -0
  42. package/src/RedactoPrivacyCenter/components/CaseHistory.tsx +433 -0
  43. package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +726 -0
  44. package/src/RedactoPrivacyCenter/components/ConsentManagerColumns.tsx +239 -0
  45. package/src/RedactoPrivacyCenter/components/ConsentManagerConstants.ts +7 -0
  46. package/src/RedactoPrivacyCenter/components/ConsentManagerTableSkeleton.tsx +155 -0
  47. package/src/RedactoPrivacyCenter/components/DataRequest/CorrectionDataSection.tsx +189 -0
  48. package/src/RedactoPrivacyCenter/components/DataRequest/GrievanceDataSection.tsx +118 -0
  49. package/src/RedactoPrivacyCenter/components/DataRequest/NominationDataSection.tsx +66 -0
  50. package/src/RedactoPrivacyCenter/components/DataRequest/PurposeSelectionSection.tsx +305 -0
  51. package/src/RedactoPrivacyCenter/components/Form.tsx +1455 -0
  52. package/src/RedactoPrivacyCenter/components/GrievanceTable.tsx +176 -0
  53. package/src/RedactoPrivacyCenter/components/GrievanceTablePagination.tsx +330 -0
  54. package/src/RedactoPrivacyCenter/components/ModifyConsentModal.tsx +329 -0
  55. package/src/RedactoPrivacyCenter/components/Pagination.tsx +140 -0
  56. package/src/RedactoPrivacyCenter/components/PrivacyCenterLayout.tsx +302 -0
  57. package/src/RedactoPrivacyCenter/components/RequestSubmit.tsx +218 -0
  58. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideBarPC.tsx +475 -0
  59. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideMenuPC.tsx +412 -0
  60. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/constants.tsx +42 -0
  61. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/menuItemsPC.tsx +1 -0
  62. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/types.ts +40 -0
  63. package/src/RedactoPrivacyCenter/components/SideMenuBarPC/utils.ts +38 -0
  64. package/src/RedactoPrivacyCenter/components/ThemeTransitionOverlay.tsx +85 -0
  65. package/src/RedactoPrivacyCenter/components/activitiesColumns.tsx +141 -0
  66. package/src/RedactoPrivacyCenter/components/caseHistoryColumns.tsx +179 -0
  67. package/src/RedactoPrivacyCenter/components/constant.ts +20 -0
  68. package/src/RedactoPrivacyCenter/components/types.ts +68 -0
  69. package/src/RedactoPrivacyCenter/components/utils.tsx +10 -0
  70. package/src/RedactoPrivacyCenter/config/routes.ts +9 -0
  71. package/src/RedactoPrivacyCenter/config/table.ts +25 -0
  72. package/src/RedactoPrivacyCenter/context/AuthContext.tsx +123 -0
  73. package/src/RedactoPrivacyCenter/context/BaseUrlContext.tsx +44 -0
  74. package/src/RedactoPrivacyCenter/context/LocaleContext.tsx +11 -0
  75. package/src/RedactoPrivacyCenter/context/NavigationContext.tsx +64 -0
  76. package/src/RedactoPrivacyCenter/context/OrganizationContext.tsx +30 -0
  77. package/src/RedactoPrivacyCenter/context/PageChromeContext.tsx +60 -0
  78. package/src/RedactoPrivacyCenter/context/theme.tsx +127 -0
  79. package/src/RedactoPrivacyCenter/lib/api.ts +468 -0
  80. package/src/RedactoPrivacyCenter/lib/consent-manager/utils.tsx +63 -0
  81. package/src/RedactoPrivacyCenter/lib/constants.ts +116 -0
  82. package/src/RedactoPrivacyCenter/lib/i18n.ts +81 -0
  83. package/src/RedactoPrivacyCenter/lib/locales.ts +105 -0
  84. package/src/RedactoPrivacyCenter/lib/queries.ts +30 -0
  85. package/src/RedactoPrivacyCenter/lib/types.ts +346 -0
  86. package/src/RedactoPrivacyCenter/lib/useCurrentLanguage.ts +37 -0
  87. package/src/RedactoPrivacyCenter/lib/utils.ts +625 -0
  88. package/src/RedactoPrivacyCenter/locales/as/translation.json +188 -0
  89. package/src/RedactoPrivacyCenter/locales/bho/translation.json +188 -0
  90. package/src/RedactoPrivacyCenter/locales/bn/translation.json +188 -0
  91. package/src/RedactoPrivacyCenter/locales/brx/translation.json +188 -0
  92. package/src/RedactoPrivacyCenter/locales/doi/translation.json +188 -0
  93. package/src/RedactoPrivacyCenter/locales/en/translation.json +188 -0
  94. package/src/RedactoPrivacyCenter/locales/gom/translation.json +188 -0
  95. package/src/RedactoPrivacyCenter/locales/gu/translation.json +188 -0
  96. package/src/RedactoPrivacyCenter/locales/hi/translation.json +188 -0
  97. package/src/RedactoPrivacyCenter/locales/kn/translation.json +188 -0
  98. package/src/RedactoPrivacyCenter/locales/ks/translation.json +188 -0
  99. package/src/RedactoPrivacyCenter/locales/mai/translation.json +188 -0
  100. package/src/RedactoPrivacyCenter/locales/ml/translation.json +188 -0
  101. package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +188 -0
  102. package/src/RedactoPrivacyCenter/locales/mr/translation.json +188 -0
  103. package/src/RedactoPrivacyCenter/locales/ne/translation.json +188 -0
  104. package/src/RedactoPrivacyCenter/locales/or/translation.json +188 -0
  105. package/src/RedactoPrivacyCenter/locales/pa/translation.json +188 -0
  106. package/src/RedactoPrivacyCenter/locales/sa/translation.json +188 -0
  107. package/src/RedactoPrivacyCenter/locales/sat/translation.json +188 -0
  108. package/src/RedactoPrivacyCenter/locales/sd/translation.json +188 -0
  109. package/src/RedactoPrivacyCenter/locales/ta/translation.json +188 -0
  110. package/src/RedactoPrivacyCenter/locales/te/translation.json +188 -0
  111. package/src/RedactoPrivacyCenter/locales/ur/translation.json +188 -0
  112. package/src/RedactoPrivacyCenter/styles/base.css +117 -0
  113. package/src/RedactoPrivacyCenter/styles/injectStyles.ts +1000 -0
  114. package/src/RedactoPrivacyCenter/styles/pcStyles.ts +819 -0
  115. package/src/RedactoPrivacyCenter/styles/responsive.ts +138 -0
  116. package/src/RedactoPrivacyCenter/styles/variables.css +133 -0
  117. package/src/RedactoPrivacyCenter/table/AdvancedTable.tsx +365 -0
  118. package/src/RedactoPrivacyCenter/table/AdvancedTablePagination.tsx +479 -0
  119. package/src/RedactoPrivacyCenter/table/index.ts +2 -0
  120. package/src/RedactoPrivacyCenter/types/images.d.ts +29 -0
  121. package/src/RedactoPrivacyCenter/ui/Footer.tsx +73 -0
  122. package/src/RedactoPrivacyCenter/ui/FormBlockWrapper.tsx +54 -0
  123. package/src/RedactoPrivacyCenter/ui/PCAccordion.tsx +87 -0
  124. package/src/RedactoPrivacyCenter/ui/PCActionIcon.tsx +47 -0
  125. package/src/RedactoPrivacyCenter/ui/PCAvatar.tsx +69 -0
  126. package/src/RedactoPrivacyCenter/ui/PCBadge.tsx +48 -0
  127. package/src/RedactoPrivacyCenter/ui/PCButton.tsx +77 -0
  128. package/src/RedactoPrivacyCenter/ui/PCCheckbox.tsx +55 -0
  129. package/src/RedactoPrivacyCenter/ui/PCCollapse.tsx +97 -0
  130. package/src/RedactoPrivacyCenter/ui/PCEmpty.tsx +35 -0
  131. package/src/RedactoPrivacyCenter/ui/PCInput.tsx +128 -0
  132. package/src/RedactoPrivacyCenter/ui/PCLoader.tsx +30 -0
  133. package/src/RedactoPrivacyCenter/ui/PCModal.tsx +104 -0
  134. package/src/RedactoPrivacyCenter/ui/PCPopover.tsx +175 -0
  135. package/src/RedactoPrivacyCenter/ui/PCSelect.tsx +381 -0
  136. package/src/RedactoPrivacyCenter/ui/PCTable.tsx +137 -0
  137. package/src/RedactoPrivacyCenter/ui/PCText.tsx +39 -0
  138. package/src/RedactoPrivacyCenter/ui/PCTextarea.tsx +43 -0
  139. package/src/RedactoPrivacyCenter/ui/PCTitle.tsx +37 -0
  140. package/src/RedactoPrivacyCenter/ui/PCTooltip.tsx +119 -0
  141. package/src/RedactoPrivacyCenter/ui/SimpleBar.tsx +25 -0
  142. package/src/RedactoPrivacyCenter/ui/StatusBadge.tsx +55 -0
  143. package/src/RedactoPrivacyCenter/ui/ThemeToggle.tsx +70 -0
  144. package/src/RedactoPrivacyCenter/ui/index.ts +18 -0
  145. package/src/RedactoPrivacyCenter/utils/cn.ts +28 -0
  146. package/src/RedactoPrivacyCenter/utils/date.ts +48 -0
  147. package/src/RedactoPrivacyCenter/utils/status.ts +111 -0
  148. package/src/RedactoPrivacyCenter/utils/toast.ts +130 -0
  149. package/src/index.ts +10 -0
  150. package/src/privacy-center.ts +107 -0
  151. package/tsconfig.json +2 -0
  152. package/tsup.config.ts +16 -1
@@ -0,0 +1,468 @@
1
+ import { useTranslation } from 'react-i18next';
2
+ import { PCModal, PCTitle, PCText, PCButton, PCBadge, PCTable } from '../ui';
3
+ import { pcStyles } from '../styles/pcStyles';
4
+ import { formatDate } from './utils';
5
+ import type { CaseDetailsModalProps } from './types';
6
+
7
+ const getVar = (varName: string): string => `var(${varName})`;
8
+ const getCaseStatusVariant = (status: string): 'success' | 'error' | 'warning' | 'info' | 'secondary' => {
9
+ const n = status.toLowerCase().replace(/_/g, '');
10
+ if (n === 'completed') return 'success';
11
+ if (n === 'rejected' || n === 'declined') return 'error';
12
+ if (n === 'processing' || n === 'inprogress' || n === 'expired') return 'warning';
13
+ if (n === 'initiated') return 'info';
14
+ return 'secondary';
15
+ };
16
+ const formatCaseStatus = (s: string) =>
17
+ s.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase());
18
+
19
+ export default function CaseDetailsModal({
20
+ isOpen,
21
+ onClose,
22
+ selectedCase,
23
+ }: CaseDetailsModalProps) {
24
+ const { t } = useTranslation();
25
+
26
+ if (!selectedCase) return null;
27
+
28
+ const { request_details } = selectedCase;
29
+
30
+ return (
31
+ <PCModal
32
+ isOpen={isOpen}
33
+ onClose={onClose}
34
+ size="lg"
35
+ title={
36
+ <div style={{ minWidth: 0, flex: 1, paddingRight: getVar('--pc-spacing-sm') }}>
37
+ <PCTitle as="h4" style={{ fontSize: pcStyles.textBase.fontSize, color: getVar('--pc-text-primary') }}>
38
+ {t('caseDetails')}
39
+ </PCTitle>
40
+ <PCText
41
+ size="xs"
42
+ color="secondary"
43
+ style={{
44
+ marginTop: pcStyles.mtXs.marginTop,
45
+ wordBreak: 'break-all',
46
+ }}
47
+ >
48
+ {t('caseID')}: <span style={{ fontWeight: pcStyles.fontWeightMedium.fontWeight, color: getVar('--pc-text-primary') }}>
49
+ {selectedCase.case_id}
50
+ </span>
51
+ </PCText>
52
+ </div>
53
+ }
54
+ >
55
+ <div style={{ ...pcStyles.flex, ...pcStyles.flexCol, height: '100%' }}>
56
+ <div
57
+ className="pc-case-details-content"
58
+ style={{
59
+ ...pcStyles.flex,
60
+ ...pcStyles.flexCol,
61
+ gap: pcStyles.gapLg.gap,
62
+ padding: pcStyles.pLg.padding,
63
+ ...pcStyles.overflowYAuto,
64
+ maxHeight: 'calc(80vh - 140px)',
65
+ }}
66
+ >
67
+ {/* Basic Information Grid */}
68
+ <div
69
+ className="pc-case-details-grid"
70
+ style={{
71
+ display: 'grid',
72
+ gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))',
73
+ gap: pcStyles.gapMd.gap,
74
+ }}
75
+ >
76
+ <div>
77
+ <PCText
78
+ size="xs"
79
+ weight="medium"
80
+ color="secondary"
81
+ style={{ marginBottom: pcStyles.mbXs.marginBottom }}
82
+ >
83
+ {t('requestType')}
84
+ </PCText>
85
+ <PCText
86
+ size="sm"
87
+ weight="medium"
88
+ style={{
89
+ textTransform: 'capitalize',
90
+ color: getVar('--pc-text-primary'),
91
+ }}
92
+ >
93
+ {selectedCase.request_type_display || selectedCase.request_type.replace('_', ' ')}
94
+ </PCText>
95
+ </div>
96
+ <div>
97
+ <PCText
98
+ size="xs"
99
+ weight="medium"
100
+ color="secondary"
101
+ style={{ marginBottom: pcStyles.mbXs.marginBottom }}
102
+ >
103
+ {t('status')}
104
+ </PCText>
105
+ <PCBadge
106
+ variant={getCaseStatusVariant(selectedCase.status)}
107
+ size="sm"
108
+ className="pc-status-badge"
109
+ >
110
+ {selectedCase.status_display || formatCaseStatus(selectedCase.status)}
111
+ </PCBadge>
112
+ </div>
113
+ <div>
114
+ <PCText
115
+ size="xs"
116
+ weight="medium"
117
+ color="secondary"
118
+ style={{ marginBottom: pcStyles.mbXs.marginBottom }}
119
+ >
120
+ {t('createdAt')}
121
+ </PCText>
122
+ <PCText
123
+ size="sm"
124
+ weight="medium"
125
+ style={{ color: getVar('--pc-text-primary') }}
126
+ >
127
+ {formatDate(selectedCase.created_at)}
128
+ </PCText>
129
+ </div>
130
+ {selectedCase.completed_at && (
131
+ <div>
132
+ <PCText
133
+ size="xs"
134
+ weight="medium"
135
+ color="secondary"
136
+ style={{ marginBottom: pcStyles.mbXs.marginBottom }}
137
+ >
138
+ {t('completedAt')}
139
+ </PCText>
140
+ <PCText
141
+ size="sm"
142
+ weight="medium"
143
+ style={{ color: getVar('--pc-text-primary') }}
144
+ >
145
+ {formatDate(selectedCase.completed_at)}
146
+ </PCText>
147
+ </div>
148
+ )}
149
+ </div>
150
+
151
+ {/* Description Section */}
152
+ {(selectedCase.description_display || selectedCase.description) && (
153
+ <div
154
+ style={{
155
+ backgroundColor: getVar('--pc-bg-secondary'),
156
+ padding: pcStyles.pMd.padding,
157
+ borderRadius: pcStyles.borderRadiusLg,
158
+ border: `1px solid ${getVar('--pc-border-color')}`,
159
+ }}
160
+ >
161
+ <PCText
162
+ size="sm"
163
+ weight="semibold"
164
+ style={{
165
+ marginBottom: pcStyles.mbSm.marginBottom,
166
+ color: getVar('--pc-text-primary'),
167
+ }}
168
+ >
169
+ {t('description')}
170
+ </PCText>
171
+ <PCText
172
+ size="sm"
173
+ color="secondary"
174
+ style={{ lineHeight: '1.6' }}
175
+ >
176
+ {selectedCase.description_display || selectedCase.description}
177
+ </PCText>
178
+ </div>
179
+ )}
180
+
181
+ {/* Request Specifics Section */}
182
+ {request_details && (
183
+ <div style={{ ...pcStyles.flex, ...pcStyles.flexCol, gap: pcStyles.gapLg.gap }}>
184
+ <PCTitle
185
+ as="h6"
186
+ style={{
187
+ fontSize: pcStyles.textSm.fontSize,
188
+ fontWeight: pcStyles.fontWeightBold.fontWeight,
189
+ textTransform: 'uppercase',
190
+ letterSpacing: '0.05em',
191
+ color: getVar('--pc-text-secondary'),
192
+ marginBottom: pcStyles.mbXs.marginBottom,
193
+ }}
194
+ >
195
+ {t('requestSpecifics')}
196
+ </PCTitle>
197
+
198
+ {/* Purposes Section */}
199
+ {request_details.purposes && request_details.purposes.length > 0 && (
200
+ <div>
201
+ <PCText
202
+ weight="semibold"
203
+ style={{
204
+ marginBottom: pcStyles.mbMd.marginBottom,
205
+ color: getVar('--pc-text-primary'),
206
+ }}
207
+ >
208
+ {t('purposesInvolved')}
209
+ </PCText>
210
+ <ul
211
+ style={{
212
+ listStyleType: 'none',
213
+ paddingLeft: 0,
214
+ ...pcStyles.flex,
215
+ ...pcStyles.flexCol,
216
+ gap: pcStyles.gapMd.gap,
217
+ }}
218
+ >
219
+ {request_details.purposes.map((p: any, idx: number) => (
220
+ <li
221
+ key={idx}
222
+ style={{
223
+ padding: pcStyles.pMd.padding,
224
+ backgroundColor: getVar('--pc-bg-secondary'),
225
+ borderRadius: pcStyles.borderRadiusMd,
226
+ border: `1px solid ${getVar('--pc-border-color')}`,
227
+ }}
228
+ >
229
+ <div
230
+ style={{
231
+ fontWeight: pcStyles.fontWeightSemibold.fontWeight,
232
+ color: getVar('--pc-text-primary'),
233
+ marginBottom: pcStyles.mbXs.marginBottom,
234
+ }}
235
+ >
236
+ {p.purpose?.name}
237
+ </div>
238
+ {p.purpose?.description && (
239
+ <div
240
+ style={{
241
+ color: getVar('--pc-text-secondary'),
242
+ fontSize: pcStyles.textSm.fontSize,
243
+ marginBottom: pcStyles.mbSm.marginBottom,
244
+ lineHeight: '1.5',
245
+ }}
246
+ >
247
+ {p.purpose.description}
248
+ </div>
249
+ )}
250
+ {p.purpose?.data_elements && p.purpose.data_elements.some((de: any) => de.selected) && (
251
+ <div
252
+ style={{
253
+ marginTop: pcStyles.mtSm.marginTop,
254
+ ...pcStyles.flex,
255
+ flexWrap: 'wrap',
256
+ gap: pcStyles.gapSm.gap
257
+ }}
258
+ >
259
+ {p.purpose.data_elements
260
+ .filter((de: any) => de.selected)
261
+ .map((de: any, dIdx: number) => (
262
+ <PCBadge key={dIdx} variant="secondary" size="sm" className="pc-status-badge">
263
+ {de.name}
264
+ </PCBadge>
265
+ ))}
266
+ </div>
267
+ )}
268
+ </li>
269
+ ))}
270
+ </ul>
271
+ </div>
272
+ )}
273
+
274
+ {/* Correction Data Table */}
275
+ {request_details.correction_data && request_details.correction_data.length > 0 && (
276
+ <div>
277
+ <PCText
278
+ weight="semibold"
279
+ style={{
280
+ marginBottom: pcStyles.mbMd.marginBottom,
281
+ fontSize: pcStyles.textSm.fontSize,
282
+ color: getVar('--pc-text-primary'),
283
+ }}
284
+ >
285
+ {t('dataToCorrect')}
286
+ </PCText>
287
+ <div style={{ ...pcStyles.overflowXAuto }}>
288
+ <div
289
+ style={{
290
+ minWidth: '100%',
291
+ border: `1px solid ${getVar('--pc-border-color')}`,
292
+ borderRadius: pcStyles.borderRadiusLg,
293
+ overflow: 'hidden',
294
+ backgroundColor: getVar('--pc-bg-primary'),
295
+ }}
296
+ >
297
+ <PCTable style={{ width: '100%', fontSize: pcStyles.textXs.fontSize }}>
298
+ <PCTable.Header style={{ backgroundColor: getVar('--pc-bg-secondary') }}>
299
+ <PCTable.Row>
300
+ <PCTable.Head
301
+ style={{
302
+ padding: '0.75rem 1rem',
303
+ whiteSpace: 'nowrap',
304
+ color: getVar('--pc-text-secondary'),
305
+ fontWeight: pcStyles.fontWeightSemibold.fontWeight,
306
+ fontSize: pcStyles.textSm.fontSize,
307
+ }}
308
+ >
309
+ {t('field')}
310
+ </PCTable.Head>
311
+ <PCTable.Head
312
+ style={{
313
+ padding: '0.75rem 1rem',
314
+ whiteSpace: 'nowrap',
315
+ color: getVar('--pc-text-secondary'),
316
+ fontWeight: pcStyles.fontWeightSemibold.fontWeight,
317
+ fontSize: pcStyles.textSm.fontSize,
318
+ }}
319
+ >
320
+ {t('currentValue')}
321
+ </PCTable.Head>
322
+ <PCTable.Head
323
+ style={{
324
+ padding: '0.75rem 1rem',
325
+ whiteSpace: 'nowrap',
326
+ color: getVar('--pc-text-secondary'),
327
+ fontWeight: pcStyles.fontWeightSemibold.fontWeight,
328
+ fontSize: pcStyles.textSm.fontSize,
329
+ }}
330
+ >
331
+ {t('newValue')}
332
+ </PCTable.Head>
333
+ </PCTable.Row>
334
+ </PCTable.Header>
335
+ <PCTable.Body>
336
+ {request_details.correction_data.map((item: any, idx: number) => (
337
+ <PCTable.Row
338
+ key={idx}
339
+ style={{
340
+ borderBottom: `1px solid ${getVar('--pc-border-color')}`,
341
+ }}
342
+ >
343
+ <PCTable.Cell
344
+ style={{
345
+ padding: '0.75rem 1rem',
346
+ fontWeight: pcStyles.fontWeightMedium.fontWeight,
347
+ color: getVar('--pc-text-primary'),
348
+ }}
349
+ >
350
+ {item.name}
351
+ </PCTable.Cell>
352
+ <PCTable.Cell
353
+ style={{
354
+ padding: '0.75rem 1rem',
355
+ color: getVar('--pc-text-secondary'),
356
+ wordBreak: 'break-word',
357
+ }}
358
+ >
359
+ {item.curr_value || '-'}
360
+ </PCTable.Cell>
361
+ <PCTable.Cell
362
+ style={{
363
+ padding: '0.75rem 1rem',
364
+ color: getVar('--pc-text-secondary'),
365
+ wordBreak: 'break-word',
366
+ }}
367
+ >
368
+ {item.new_value || '-'}
369
+ </PCTable.Cell>
370
+ </PCTable.Row>
371
+ ))}
372
+ </PCTable.Body>
373
+ </PCTable>
374
+ </div>
375
+ </div>
376
+ </div>
377
+ )}
378
+
379
+ {/* Nomination Data */}
380
+ {request_details.nomination_data && (
381
+ <div>
382
+ <PCText
383
+ weight="semibold"
384
+ style={{
385
+ marginBottom: pcStyles.mbMd.marginBottom,
386
+ color: getVar('--pc-text-primary'),
387
+ }}
388
+ >
389
+ {t('nomination')}
390
+ </PCText>
391
+ <div
392
+ style={{
393
+ backgroundColor: getVar('--pc-bg-secondary'),
394
+ padding: pcStyles.pMd.padding,
395
+ borderRadius: pcStyles.borderRadiusMd,
396
+ border: `1px solid ${getVar('--pc-border-color')}`,
397
+ ...pcStyles.flex,
398
+ ...pcStyles.flexCol,
399
+ gap: pcStyles.gapSm.gap,
400
+ }}
401
+ >
402
+ <div>
403
+ <PCText size="xs" weight="medium" color="secondary">
404
+ {t('nomineeEmail')}
405
+ </PCText>
406
+ <PCText size="sm" style={{ color: getVar('--pc-text-primary') }}>
407
+ {request_details.nomination_data.nominee_email || '-'}
408
+ </PCText>
409
+ </div>
410
+ <div>
411
+ <PCText size="xs" weight="medium" color="secondary">
412
+ {t('nomineeMobile')}
413
+ </PCText>
414
+ <PCText size="sm" style={{ color: getVar('--pc-text-primary') }}>
415
+ {request_details.nomination_data.nominee_mobile || '-'}
416
+ </PCText>
417
+ </div>
418
+ </div>
419
+ </div>
420
+ )}
421
+
422
+ {/* Grievance Types */}
423
+ {request_details.grievance_types && request_details.grievance_types.length > 0 && (
424
+ <div>
425
+ <PCText
426
+ weight="semibold"
427
+ style={{
428
+ marginBottom: pcStyles.mbMd.marginBottom,
429
+ color: getVar('--pc-text-primary'),
430
+ }}
431
+ >
432
+ {t('grievanceTypes')}
433
+ </PCText>
434
+ <div style={{ ...pcStyles.flex, flexWrap: 'wrap', gap: pcStyles.gapSm.gap }}>
435
+ {request_details.grievance_types.map((g: any, idx: number) => (
436
+ <PCBadge key={idx} variant="secondary" size="sm" className="pc-status-badge">
437
+ {g.grievance?.replace('_', ' ')}
438
+ </PCBadge>
439
+ ))}
440
+ </div>
441
+ </div>
442
+ )}
443
+ </div>
444
+ )}
445
+ </div>
446
+
447
+ {/* Footer */}
448
+ <div
449
+ style={{
450
+ padding: `${getVar('--pc-spacing-md')} ${getVar('--pc-spacing-lg')}`,
451
+ ...pcStyles.flex,
452
+ ...pcStyles.justifyEnd,
453
+ backgroundColor: 'transparent',
454
+ marginTop: 'auto',
455
+ }}
456
+ >
457
+ <PCButton
458
+ variant="outline"
459
+ onClick={onClose}
460
+ size="sm"
461
+ >
462
+ {t('close')}
463
+ </PCButton>
464
+ </div>
465
+ </div>
466
+ </PCModal>
467
+ );
468
+ }