@tantainnovative/ndpr-toolkit 1.0.9 → 2.1.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 (218) hide show
  1. package/README.md +295 -124
  2. package/dist/breach-BpSBPrdk.d.mts +185 -0
  3. package/dist/breach-BpSBPrdk.d.ts +185 -0
  4. package/dist/breach-D5zJYNph.d.mts +17 -0
  5. package/dist/breach-D7NgrdMX.d.ts +17 -0
  6. package/dist/breach.d.mts +275 -0
  7. package/dist/breach.d.ts +275 -0
  8. package/dist/breach.js +2 -0
  9. package/dist/breach.js.map +1 -0
  10. package/dist/breach.mjs +2 -0
  11. package/dist/breach.mjs.map +1 -0
  12. package/dist/chunk-2SYNHRP6.mjs +2 -0
  13. package/dist/chunk-2SYNHRP6.mjs.map +1 -0
  14. package/dist/chunk-2XHD22J7.mjs +7 -0
  15. package/dist/chunk-2XHD22J7.mjs.map +1 -0
  16. package/dist/chunk-4A354HL3.js +2 -0
  17. package/dist/chunk-4A354HL3.js.map +1 -0
  18. package/dist/chunk-4DKT6IB6.js +94 -0
  19. package/dist/chunk-4DKT6IB6.js.map +1 -0
  20. package/dist/chunk-5ZBO2UPH.js +2 -0
  21. package/dist/chunk-5ZBO2UPH.js.map +1 -0
  22. package/dist/chunk-6JFTAYXV.mjs +2 -0
  23. package/dist/chunk-6JFTAYXV.mjs.map +1 -0
  24. package/dist/chunk-6JVYYLS7.js +2 -0
  25. package/dist/chunk-6JVYYLS7.js.map +1 -0
  26. package/dist/chunk-6SGG6WPA.mjs +2 -0
  27. package/dist/chunk-6SGG6WPA.mjs.map +1 -0
  28. package/dist/chunk-AQEGDEQM.js +7 -0
  29. package/dist/chunk-AQEGDEQM.js.map +1 -0
  30. package/dist/chunk-C2IJWCZQ.mjs +2 -0
  31. package/dist/chunk-C2IJWCZQ.mjs.map +1 -0
  32. package/dist/chunk-CMZTI7SG.js +2 -0
  33. package/dist/chunk-CMZTI7SG.js.map +1 -0
  34. package/dist/chunk-DB3JH4DS.mjs +2 -0
  35. package/dist/chunk-DB3JH4DS.mjs.map +1 -0
  36. package/dist/chunk-EWOZKYLY.mjs +2 -0
  37. package/dist/chunk-EWOZKYLY.mjs.map +1 -0
  38. package/dist/chunk-FFW7RUAG.mjs +94 -0
  39. package/dist/chunk-FFW7RUAG.mjs.map +1 -0
  40. package/dist/chunk-FK3CSFLJ.js +2 -0
  41. package/dist/chunk-FK3CSFLJ.js.map +1 -0
  42. package/dist/chunk-GIV2OHE6.mjs +2 -0
  43. package/dist/chunk-GIV2OHE6.mjs.map +1 -0
  44. package/dist/chunk-GMLNWS2N.mjs +2 -0
  45. package/dist/chunk-GMLNWS2N.mjs.map +1 -0
  46. package/dist/chunk-IQF726GS.js +2 -0
  47. package/dist/chunk-IQF726GS.js.map +1 -0
  48. package/dist/chunk-IWUUVRLJ.js +2 -0
  49. package/dist/chunk-IWUUVRLJ.js.map +1 -0
  50. package/dist/chunk-JUN6YPLL.mjs +72 -0
  51. package/dist/chunk-JUN6YPLL.mjs.map +1 -0
  52. package/dist/chunk-L3FKTBGV.js +72 -0
  53. package/dist/chunk-L3FKTBGV.js.map +1 -0
  54. package/dist/chunk-L52PDW6O.mjs +2 -0
  55. package/dist/chunk-L52PDW6O.mjs.map +1 -0
  56. package/dist/chunk-LI6WJ3LZ.js +2 -0
  57. package/dist/chunk-LI6WJ3LZ.js.map +1 -0
  58. package/dist/chunk-LXRXDTPI.js +2 -0
  59. package/dist/chunk-LXRXDTPI.js.map +1 -0
  60. package/dist/chunk-MQFZHA2D.js +2 -0
  61. package/dist/chunk-MQFZHA2D.js.map +1 -0
  62. package/dist/chunk-OITITR6K.mjs +2 -0
  63. package/dist/chunk-OITITR6K.mjs.map +1 -0
  64. package/dist/chunk-PDJGTQMY.mjs +2 -0
  65. package/dist/chunk-PDJGTQMY.mjs.map +1 -0
  66. package/dist/chunk-PGSA2O5P.mjs +2 -0
  67. package/dist/chunk-PGSA2O5P.mjs.map +1 -0
  68. package/dist/chunk-PM7CMTMB.js +4 -0
  69. package/dist/chunk-PM7CMTMB.js.map +1 -0
  70. package/dist/chunk-PYEX7DFR.mjs +4 -0
  71. package/dist/chunk-PYEX7DFR.mjs.map +1 -0
  72. package/dist/chunk-QKK5S54L.mjs +2 -0
  73. package/dist/chunk-QKK5S54L.mjs.map +1 -0
  74. package/dist/chunk-RB26MIRI.js +2 -0
  75. package/dist/chunk-RB26MIRI.js.map +1 -0
  76. package/dist/chunk-RGYK4VAY.mjs +2 -0
  77. package/dist/chunk-RGYK4VAY.mjs.map +1 -0
  78. package/dist/chunk-RHWW5FDP.js +16 -0
  79. package/dist/chunk-RHWW5FDP.js.map +1 -0
  80. package/dist/chunk-RYZEIDNR.js +2 -0
  81. package/dist/chunk-RYZEIDNR.js.map +1 -0
  82. package/dist/chunk-SLNMKGQ2.mjs +2 -0
  83. package/dist/chunk-SLNMKGQ2.mjs.map +1 -0
  84. package/dist/chunk-SSGJREE3.js +2 -0
  85. package/dist/chunk-SSGJREE3.js.map +1 -0
  86. package/dist/chunk-SWF3YVE5.js +4 -0
  87. package/dist/chunk-SWF3YVE5.js.map +1 -0
  88. package/dist/chunk-T44JQT2O.mjs +2 -0
  89. package/dist/chunk-T44JQT2O.mjs.map +1 -0
  90. package/dist/chunk-TDDAYVKK.js +2 -0
  91. package/dist/chunk-TDDAYVKK.js.map +1 -0
  92. package/dist/chunk-TXBZPCGF.mjs +2 -0
  93. package/dist/chunk-TXBZPCGF.mjs.map +1 -0
  94. package/dist/chunk-U2CGMEWB.js +2 -0
  95. package/dist/chunk-U2CGMEWB.js.map +1 -0
  96. package/dist/chunk-UUWVBENC.js +2 -0
  97. package/dist/chunk-UUWVBENC.js.map +1 -0
  98. package/dist/chunk-UYP64PV7.mjs +4 -0
  99. package/dist/chunk-UYP64PV7.mjs.map +1 -0
  100. package/dist/chunk-VMJBW3EF.mjs +2 -0
  101. package/dist/chunk-VMJBW3EF.mjs.map +1 -0
  102. package/dist/chunk-WW3X3ELF.js +2 -0
  103. package/dist/chunk-WW3X3ELF.js.map +1 -0
  104. package/dist/chunk-WWT2ZSNU.mjs +2 -0
  105. package/dist/chunk-WWT2ZSNU.mjs.map +1 -0
  106. package/dist/chunk-XMKA6GVK.mjs +16 -0
  107. package/dist/chunk-XMKA6GVK.mjs.map +1 -0
  108. package/dist/chunk-Y34DQYS7.js +2 -0
  109. package/dist/chunk-Y34DQYS7.js.map +1 -0
  110. package/dist/chunk-ZU73VG3X.js +2 -0
  111. package/dist/chunk-ZU73VG3X.js.map +1 -0
  112. package/dist/consent-CmVzqZUk.d.mts +99 -0
  113. package/dist/consent-CmVzqZUk.d.ts +99 -0
  114. package/dist/consent-DCc5zjXI.d.mts +24 -0
  115. package/dist/consent-DLWb5ota.d.ts +24 -0
  116. package/dist/consent.d.mts +197 -0
  117. package/dist/consent.d.ts +197 -0
  118. package/dist/consent.js +2 -0
  119. package/dist/consent.js.map +1 -0
  120. package/dist/consent.mjs +2 -0
  121. package/dist/consent.mjs.map +1 -0
  122. package/dist/core.d.mts +14 -0
  123. package/dist/core.d.ts +14 -0
  124. package/dist/core.js +2 -0
  125. package/dist/core.js.map +1 -0
  126. package/dist/core.mjs +2 -0
  127. package/dist/core.mjs.map +1 -0
  128. package/dist/cross-border-BrIy1ieh.d.mts +192 -0
  129. package/dist/cross-border-BrIy1ieh.d.ts +192 -0
  130. package/dist/cross-border.d.mts +58 -0
  131. package/dist/cross-border.d.ts +58 -0
  132. package/dist/cross-border.js +2 -0
  133. package/dist/cross-border.js.map +1 -0
  134. package/dist/cross-border.mjs +2 -0
  135. package/dist/cross-border.mjs.map +1 -0
  136. package/dist/dpia-B9ZZJG5a.d.mts +15 -0
  137. package/dist/dpia-fdtTd2DI.d.ts +15 -0
  138. package/dist/dpia-vWfE_9bO.d.mts +137 -0
  139. package/dist/dpia-vWfE_9bO.d.ts +137 -0
  140. package/dist/dpia.d.mts +179 -0
  141. package/dist/dpia.d.ts +179 -0
  142. package/dist/dpia.js +2 -0
  143. package/dist/dpia.js.map +1 -0
  144. package/dist/dpia.mjs +2 -0
  145. package/dist/dpia.mjs.map +1 -0
  146. package/dist/dsr-jq5NUEdz.d.ts +14 -0
  147. package/dist/dsr-pQzQ3H1O.d.mts +128 -0
  148. package/dist/dsr-pQzQ3H1O.d.ts +128 -0
  149. package/dist/dsr-whPkiI0_.d.mts +14 -0
  150. package/dist/dsr.d.mts +192 -0
  151. package/dist/dsr.d.ts +192 -0
  152. package/dist/dsr.js +2 -0
  153. package/dist/dsr.js.map +1 -0
  154. package/dist/dsr.mjs +2 -0
  155. package/dist/dsr.mjs.map +1 -0
  156. package/dist/hooks.d.mts +17 -0
  157. package/dist/hooks.d.ts +17 -0
  158. package/dist/hooks.js +2 -0
  159. package/dist/hooks.js.map +1 -0
  160. package/dist/hooks.mjs +2 -0
  161. package/dist/hooks.mjs.map +1 -0
  162. package/dist/index.d.mts +31 -448
  163. package/dist/index.d.ts +31 -448
  164. package/dist/index.js +1 -190
  165. package/dist/index.js.map +1 -1
  166. package/dist/index.mjs +1 -190
  167. package/dist/index.mjs.map +1 -1
  168. package/dist/lawful-basis-CWtvDG1x.d.mts +112 -0
  169. package/dist/lawful-basis-CWtvDG1x.d.ts +112 -0
  170. package/dist/lawful-basis-D-oXFizg.d.mts +57 -0
  171. package/dist/lawful-basis-v04AhbK2.d.ts +57 -0
  172. package/dist/lawful-basis.d.mts +55 -0
  173. package/dist/lawful-basis.d.ts +55 -0
  174. package/dist/lawful-basis.js +2 -0
  175. package/dist/lawful-basis.js.map +1 -0
  176. package/dist/lawful-basis.mjs +2 -0
  177. package/dist/lawful-basis.mjs.map +1 -0
  178. package/dist/policy.d.mts +195 -0
  179. package/dist/policy.d.ts +195 -0
  180. package/dist/policy.js +2 -0
  181. package/dist/policy.js.map +1 -0
  182. package/dist/policy.mjs +2 -0
  183. package/dist/policy.mjs.map +1 -0
  184. package/dist/privacy-9FcJceMr.d.mts +15 -0
  185. package/dist/privacy-BXz7O2ej.d.ts +15 -0
  186. package/dist/privacy-Ca6te9Ir.d.mts +138 -0
  187. package/dist/privacy-Ca6te9Ir.d.ts +138 -0
  188. package/dist/ropa-BebGfqKQ.d.ts +200 -0
  189. package/dist/ropa-Rb4dsFSz.d.mts +200 -0
  190. package/dist/ropa.d.mts +45 -0
  191. package/dist/ropa.d.ts +45 -0
  192. package/dist/ropa.js +2 -0
  193. package/dist/ropa.js.map +1 -0
  194. package/dist/ropa.mjs +2 -0
  195. package/dist/ropa.mjs.map +1 -0
  196. package/dist/unstyled.d.mts +4 -4
  197. package/dist/unstyled.d.ts +4 -4
  198. package/dist/unstyled.js +1 -1
  199. package/dist/unstyled.js.map +1 -1
  200. package/dist/unstyled.mjs +1 -1
  201. package/dist/unstyled.mjs.map +1 -1
  202. package/dist/useBreach-DRKnexsk.d.mts +99 -0
  203. package/dist/useBreach-DuT0N0K1.d.ts +99 -0
  204. package/dist/useConsent-D0pAfTlb.d.ts +65 -0
  205. package/dist/useConsent-DOt2Njst.d.mts +65 -0
  206. package/dist/useCrossBorderTransfer-D4FQYfFt.d.ts +66 -0
  207. package/dist/useCrossBorderTransfer-TVnY8_UX.d.mts +66 -0
  208. package/dist/useDPIA-DFDHBLSa.d.ts +94 -0
  209. package/dist/useDPIA-FqPofFaV.d.mts +94 -0
  210. package/dist/useDSR-DAqqOBXb.d.ts +74 -0
  211. package/dist/useDSR-OXM5Q9rf.d.mts +74 -0
  212. package/dist/useLawfulBasis-DNQ8YszQ.d.mts +68 -0
  213. package/dist/useLawfulBasis-RILM_xsx.d.ts +68 -0
  214. package/dist/usePrivacyPolicy-CfySfBLS.d.ts +89 -0
  215. package/dist/usePrivacyPolicy-Dit2sFuV.d.mts +89 -0
  216. package/dist/useROPA-Bcs6cRdi.d.ts +64 -0
  217. package/dist/useROPA-nmcSiUYv.d.mts +64 -0
  218. package/package.json +162 -35
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../packages/ndpr-toolkit/src/components/dsr/DSRRequestForm.tsx","../packages/ndpr-toolkit/src/components/dsr/DSRDashboard.tsx","../packages/ndpr-toolkit/src/components/dsr/DSRTracker.tsx"],"names":["DSRRequestForm","requestTypes","onSubmit","title","description","submitButtonText","className","buttonClassName","showConfirmation","confirmationMessage","requireIdentityVerification","identifierTypes","collectAdditionalContact","labels","_a","selectedRequestType","setSelectedRequestType","useState","fullName","setFullName","email","setEmail","phone","setPhone","identifierType","setIdentifierType","identifierValue","setIdentifierValue","additionalInfo","setAdditionalInfo","isSubmitted","setIsSubmitted","errors","setErrors","selectedType","type","handleRequestTypeChange","e","handleAdditionalInfoChange","id","value","prev","__spreadProps","__spreadValues","validateForm","newErrors","field","handleSubmit","formData","React","option","file","DSRDashboard","requests","onSelectRequest","onUpdateStatus","onAssignRequest","showRequestDetails","showRequestTimeline","showDeadlineAlerts","assignees","selectedRequestId","setSelectedRequestId","filteredRequests","setFilteredRequests","statusFilter","setStatusFilter","typeFilter","setTypeFilter","searchTerm","setSearchTerm","sortBy","setSortBy","sortDirection","setSortDirection","assignee","setAssignee","useEffect","filtered","request","term","a","b","comparison","handleSelectRequest","requestId","handleUpdateStatus","status","handleAssignRequest","formatDate","timestamp","calculateDaysRemaining","dueDate","now","remaining","selectedRequest","renderTypeBadge","colorClasses","typeLabels","renderStatusBadge","renderDeadlineAlert","daysRemaining","renderRequestTimeline","timeline","item","index","renderTypeOptions","renderStatusOptions","renderStatusUpdateOptions","deadlineStatus","name","formatDSRRequest","DSRTracker","showSummaryStats","showTypeBreakdown","showStatusBreakdown","showTimelineChart","showOverdueRequests","selectedTimeframe","setSelectedTimeframe","overdueRequests","setOverdueRequests","upcomingDeadlines","setUpcomingDeadlines","overdue","upcoming","calculateAverageResponseTime","completedRequests","totalDays","sum","responseTime","calculateComplianceRate","compliantRequests","countRequestsByType","counts","countRequestsByStatus","renderSummaryStats","totalRequests","pendingRequests","averageResponseTime","complianceRate","renderTypeBreakdown","typeCounts","sortedTypes","countA","countB","count","percentage","renderStatusBreakdown","statusCounts","statusOrder","statusColors","renderTimelineChart","requestsByMonth","date","monthKey","displayMonths","maxCount","formatMonth","year","month","height","renderOverdueRequests","renderUpcomingDeadlines"],"mappings":"oPAuFO,IAAMA,EAAAA,CAAgD,CAAC,CAC5D,YAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,MAAAC,CAAAA,CAAQ,+BAAA,CACR,WAAA,CAAAC,CAAAA,CAAc,qFAAA,CACd,gBAAA,CAAAC,CAAAA,CAAmB,gBAAA,CACnB,UAAAC,CAAAA,CAAY,EAAA,CACZ,eAAA,CAAAC,CAAAA,CAAkB,EAAA,CAClB,gBAAA,CAAAC,CAAAA,CAAmB,IAAA,CACnB,oBAAAC,CAAAA,CAAsB,8FAAA,CACtB,2BAAA,CAAAC,CAAAA,CAA8B,IAAA,CAC9B,eAAA,CAAAC,CAAAA,CAAkB,CAChB,CAAE,EAAA,CAAI,OAAA,CAAS,KAAA,CAAO,eAAgB,CAAA,CACtC,CAAE,EAAA,CAAI,UAAW,KAAA,CAAO,gBAAiB,CAAA,CACzC,CAAE,EAAA,CAAI,aAAA,CAAe,KAAA,CAAO,aAAc,CAC5C,CAAA,CACA,wBAAA,CAAAC,CAAAA,CAA2B,IAAA,CAC3B,MAAA,CAAAC,CAAAA,CAAS,EACX,IAAM,CAzGN,IAAAC,CAAAA,CA0GE,GAAM,CAACC,CAAAA,CAAqBC,CAAsB,CAAA,CAAIC,UAAAA,CAAiB,EAAE,CAAA,CACnE,CAACC,CAAAA,CAAUC,CAAW,CAAA,CAAIF,UAAAA,CAAiB,EAAE,CAAA,CAC7C,CAACG,CAAAA,CAAOC,CAAQ,CAAA,CAAIJ,UAAAA,CAAiB,EAAE,CAAA,CACvC,CAACK,CAAAA,CAAOC,CAAQ,CAAA,CAAIN,UAAAA,CAAiB,EAAE,CAAA,CACvC,CAACO,CAAAA,CAAgBC,CAAiB,CAAA,CAAIR,UAAAA,CAAAA,CAAAA,CAAiBH,CAAAA,CAAAH,CAAAA,CAAgB,CAAC,CAA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AA,CAAQ,aAAW,CAAA,CACjCA,kBAAAA,CAAA,cAAC,QAAA,CAAA,CAAO,KAAA,CAAM,QAAA,CAAA,CAAS,cAAY,CAAA,CACnCA,kBAAAA,CAAA,aAAA,CAAC,QAAA,CAAA,CAAO,MAAM,QAAA,CAAA,CAAS,cAAY,CAAA,CACnCA,kBAAAA,CAAA,aAAA,CAAC,QAAA,CAAA,CAAO,KAAA,CAAM,KAAA,CAAA,CAAM,UAAQ,CAC9B,CACF,CACF,CAAA,CAGCgE,CAAAA,EAAoBuB,CAAAA,EAAmB,CAGxCvF,kBAAAA,CAAA,cAAC,KAAA,CAAA,CAAI,SAAA,CAAU,uCAAA,CAAA,CAEbA,kBAAAA,CAAA,aAAA,CAAC,KAAA,CAAA,IAAA,CAEEiE,CAAAA,EAAqB2B,CAAAA,GAGrB1B,CAAAA,EAAuBiC,CAAAA,EAC1B,CAAA,CAGAnG,kBAAAA,CAAA,aAAA,CAAC,KAAA,CAAA,IAAA,CAEEmE,CAAAA,EAAqBoC,GAAoB,CAGzCnC,CAAAA,EAAuB6C,CAAAA,EAAsB,CAG7C7C,CAAAA,EAAuB8C,CAAAA,EAC1B,CACF,CACF,CAEJ","file":"chunk-6JVYYLS7.js","sourcesContent":["import React, { useState } from 'react';\nimport { RequestType } from '../../types/dsr';\n\nexport interface DSRRequestFormProps {\n /**\n * Array of request types that can be submitted\n */\n requestTypes: RequestType[];\n \n /**\n * Callback function called when form is submitted\n */\n onSubmit: (formData: any) => void;\n \n /**\n * Title displayed on the form\n * @default \"Submit a Data Subject Request\"\n */\n title?: string;\n \n /**\n * Description text displayed on the form\n * @default \"Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA).\"\n */\n description?: string;\n \n /**\n * Text for the submit button\n * @default \"Submit Request\"\n */\n submitButtonText?: string;\n \n /**\n * Custom CSS class for the form\n */\n className?: string;\n \n /**\n * Custom CSS class for the submit button\n */\n buttonClassName?: string;\n \n /**\n * Whether to show a confirmation message after submission\n * @default true\n */\n showConfirmation?: boolean;\n \n /**\n * Confirmation message to display after submission\n * @default \"Your request has been submitted successfully. You will receive a confirmation email shortly.\"\n */\n confirmationMessage?: string;\n \n /**\n * Whether to require identity verification\n * @default true\n */\n requireIdentityVerification?: boolean;\n \n /**\n * Types of identifiers accepted for verification\n * @default [\"email\", \"account\", \"customer_id\"]\n */\n identifierTypes?: Array<{\n id: string;\n label: string;\n }>;\n \n /**\n * Whether to collect additional contact information\n * @default true\n */\n collectAdditionalContact?: boolean;\n\n /**\n * Custom labels for form fields\n */\n labels?: {\n name?: string;\n email?: string;\n requestType?: string;\n description?: string;\n submit?: string;\n };\n}\n\nexport const DSRRequestForm: React.FC<DSRRequestFormProps> = ({\n requestTypes,\n onSubmit,\n title = \"Submit a Data Subject Request\",\n description = \"Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA).\",\n submitButtonText = \"Submit Request\",\n className = \"\",\n buttonClassName = \"\",\n showConfirmation = true,\n confirmationMessage = \"Your request has been submitted successfully. You will receive a confirmation email shortly.\",\n requireIdentityVerification = true,\n identifierTypes = [\n { id: \"email\", label: \"Email Address\" },\n { id: \"account\", label: \"Account Number\" },\n { id: \"customer_id\", label: \"Customer ID\" }\n ],\n collectAdditionalContact = true,\n labels = {}\n}) => {\n const [selectedRequestType, setSelectedRequestType] = useState<string>(\"\");\n const [fullName, setFullName] = useState<string>(\"\");\n const [email, setEmail] = useState<string>(\"\");\n const [phone, setPhone] = useState<string>(\"\");\n const [identifierType, setIdentifierType] = useState<string>(identifierTypes[0]?.id || \"\");\n const [identifierValue, setIdentifierValue] = useState<string>(\"\");\n const [additionalInfo, setAdditionalInfo] = useState<Record<string, any>>({});\n const [isSubmitted, setIsSubmitted] = useState<boolean>(false);\n const [errors, setErrors] = useState<Record<string, string>>({});\n \n const selectedType = requestTypes.find(type => type.id === selectedRequestType);\n \n const handleRequestTypeChange = (e: React.ChangeEvent<HTMLSelectElement>) => {\n setSelectedRequestType(e.target.value);\n setAdditionalInfo({});\n };\n \n const handleAdditionalInfoChange = (id: string, value: any) => {\n setAdditionalInfo(prev => ({\n ...prev,\n [id]: value\n }));\n };\n \n const validateForm = () => {\n const newErrors: Record<string, string> = {};\n \n if (!fullName.trim()) {\n newErrors.fullName = \"Full name is required\";\n }\n \n if (!email.trim()) {\n newErrors.email = \"Email is required\";\n } else if (!/\\S+@\\S+\\.\\S+/.test(email)) {\n newErrors.email = \"Email is invalid\";\n }\n \n if (!selectedRequestType) {\n newErrors.requestType = \"Please select a request type\";\n }\n \n if (requireIdentityVerification && !identifierValue.trim()) {\n newErrors.identifierValue = \"Identifier value is required\";\n }\n \n // Validate additional fields if required\n if (selectedType?.requiresAdditionalInfo && selectedType.additionalFields) {\n selectedType.additionalFields.forEach(field => {\n if (field.required && !additionalInfo[field.id]) {\n newErrors[`additional_${field.id}`] = `${field.label} is required`;\n }\n });\n }\n \n setErrors(newErrors);\n return Object.keys(newErrors).length === 0;\n };\n \n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n \n if (!validateForm()) {\n return;\n }\n \n const formData = {\n requestType: selectedRequestType,\n dataSubject: {\n fullName,\n email,\n phone: phone || undefined,\n identifierType,\n identifierValue\n },\n additionalInfo: Object.keys(additionalInfo).length > 0 ? additionalInfo : undefined,\n submittedAt: Date.now()\n };\n \n onSubmit(formData);\n \n if (showConfirmation) {\n setIsSubmitted(true);\n }\n };\n \n if (isSubmitted) {\n return (\n <div className={`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${className}`}>\n <h2 className=\"text-lg font-bold text-green-800 dark:text-green-200 mb-2\">Request Submitted</h2>\n <p className=\"text-green-700 dark:text-green-300\">{confirmationMessage}</p>\n <button\n onClick={() => setIsSubmitted(false)}\n className={`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${buttonClassName}`}\n >\n Submit Another Request\n </button>\n </div>\n );\n }\n \n return (\n <div className={`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${className}`}>\n <h2 className=\"text-xl font-bold mb-2\">{title}</h2>\n <p className=\"mb-6 text-gray-600 dark:text-gray-300\">{description}</p>\n \n <form onSubmit={handleSubmit}>\n <div className=\"space-y-4\">\n {/* Personal Information */}\n <div>\n <h3 className=\"text-lg font-semibold mb-3\">Personal Information</h3>\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <div>\n <label htmlFor=\"fullName\" className=\"block text-sm font-medium mb-1\">\n {labels.name || \"Full Name\"} <span className=\"text-red-500\">*</span>\n </label>\n <input\n type=\"text\"\n id=\"fullName\"\n value={fullName}\n onChange={e => setFullName(e.target.value)}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n required\n />\n {errors.fullName && <p className=\"mt-1 text-sm text-red-500\">{errors.fullName}</p>}\n </div>\n \n <div>\n <label htmlFor=\"email\" className=\"block text-sm font-medium mb-1\">\n {labels.email || \"Email Address\"} <span className=\"text-red-500\">*</span>\n </label>\n <input\n type=\"email\"\n id=\"email\"\n value={email}\n onChange={e => setEmail(e.target.value)}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n required\n />\n {errors.email && <p className=\"mt-1 text-sm text-red-500\">{errors.email}</p>}\n </div>\n \n {collectAdditionalContact && (\n <div>\n <label htmlFor=\"phone\" className=\"block text-sm font-medium mb-1\">\n Phone Number (Optional)\n </label>\n <input\n type=\"tel\"\n id=\"phone\"\n value={phone}\n onChange={e => setPhone(e.target.value)}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n />\n </div>\n )}\n </div>\n </div>\n \n {/* Request Type */}\n <div>\n <h3 className=\"text-lg font-semibold mb-3\">Request Details</h3>\n <div className=\"mb-4\">\n <label htmlFor=\"requestType\" className=\"block text-sm font-medium mb-1\">\n {labels.requestType || \"Request Type\"} <span className=\"text-red-500\">*</span>\n </label>\n <select\n id=\"requestType\"\n value={selectedRequestType}\n onChange={handleRequestTypeChange}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n required\n >\n <option value=\"\">Select a request type</option>\n {requestTypes.map(type => (\n <option key={type.id} value={type.id}>\n {type.name}\n </option>\n ))}\n </select>\n {errors.requestType && <p className=\"mt-1 text-sm text-red-500\">{errors.requestType}</p>}\n </div>\n \n {selectedType && (\n <div className=\"mb-4 p-3 bg-gray-50 dark:bg-gray-700 rounded-md\">\n <p className=\"text-sm text-gray-600 dark:text-gray-300 mb-2\">{selectedType.description}</p>\n <p className=\"text-sm text-gray-500 dark:text-gray-400\">\n Estimated completion time: {selectedType.estimatedCompletionTime} {selectedType.estimatedCompletionTime === 1 ? 'day' : 'days'}\n </p>\n </div>\n )}\n \n <div className=\"mb-4\">\n <label htmlFor=\"requestDescription\" className=\"block text-sm font-medium mb-1\">\n {labels.description || \"Additional Information\"}\n </label>\n <textarea\n id=\"requestDescription\"\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n rows={4}\n placeholder=\"Please provide any additional details that might help us process your request\"\n />\n </div>\n </div>\n \n {/* Identity Verification */}\n {requireIdentityVerification && (\n <div>\n <h3 className=\"text-lg font-semibold mb-3\">Identity Verification</h3>\n <p className=\"text-sm text-gray-600 dark:text-gray-300 mb-3\">\n To protect your privacy, we need to verify your identity before processing your request.\n </p>\n \n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <div>\n <label htmlFor=\"identifierType\" className=\"block text-sm font-medium mb-1\">\n Identifier Type <span className=\"text-red-500\">*</span>\n </label>\n <select\n id=\"identifierType\"\n value={identifierType}\n onChange={e => setIdentifierType(e.target.value)}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n required\n >\n {identifierTypes.map(type => (\n <option key={type.id} value={type.id}>\n {type.label}\n </option>\n ))}\n </select>\n </div>\n \n <div>\n <label htmlFor=\"identifierValue\" className=\"block text-sm font-medium mb-1\">\n Identifier Value <span className=\"text-red-500\">*</span>\n </label>\n <input\n type=\"text\"\n id=\"identifierValue\"\n value={identifierValue}\n onChange={e => setIdentifierValue(e.target.value)}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n required\n />\n {errors.identifierValue && <p className=\"mt-1 text-sm text-red-500\">{errors.identifierValue}</p>}\n </div>\n </div>\n </div>\n )}\n \n {/* Additional Information */}\n {selectedType?.requiresAdditionalInfo && selectedType.additionalFields && selectedType.additionalFields.length > 0 && (\n <div>\n <h3 className=\"text-lg font-semibold mb-3\">Additional Information</h3>\n <div className=\"space-y-4\">\n {selectedType.additionalFields.map(field => (\n <div key={field.id}>\n <label htmlFor={field.id} className=\"block text-sm font-medium mb-1\">\n {field.label} {field.required && <span className=\"text-red-500\">*</span>}\n </label>\n \n {field.type === 'text' && (\n <input\n type=\"text\"\n id={field.id}\n value={additionalInfo[field.id] || ''}\n onChange={e => handleAdditionalInfoChange(field.id, e.target.value)}\n placeholder={field.placeholder}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n required={field.required}\n />\n )}\n \n {field.type === 'textarea' && (\n <textarea\n id={field.id}\n value={additionalInfo[field.id] || ''}\n onChange={e => handleAdditionalInfoChange(field.id, e.target.value)}\n placeholder={field.placeholder}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n rows={4}\n required={field.required}\n />\n )}\n \n {field.type === 'select' && field.options && (\n <select\n id={field.id}\n value={additionalInfo[field.id] || ''}\n onChange={e => handleAdditionalInfoChange(field.id, e.target.value)}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n required={field.required}\n >\n <option value=\"\">{field.placeholder || 'Select an option'}</option>\n {field.options.map(option => (\n <option key={option} value={option}>\n {option}\n </option>\n ))}\n </select>\n )}\n \n {field.type === 'checkbox' && (\n <div className=\"flex items-start\">\n <div className=\"flex items-center h-5\">\n <input\n type=\"checkbox\"\n id={field.id}\n checked={!!additionalInfo[field.id]}\n onChange={e => handleAdditionalInfoChange(field.id, e.target.checked)}\n className=\"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500\"\n required={field.required}\n />\n </div>\n <div className=\"ml-3 text-sm\">\n <label htmlFor={field.id} className=\"text-gray-700 dark:text-gray-300\">\n {field.placeholder || field.label}\n </label>\n </div>\n </div>\n )}\n \n {field.type === 'file' && (\n <input\n type=\"file\"\n id={field.id}\n onChange={e => {\n const file = e.target.files?.[0];\n if (file) {\n handleAdditionalInfoChange(field.id, file);\n }\n }}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n required={field.required}\n />\n )}\n \n {errors[`additional_${field.id}`] && (\n <p className=\"mt-1 text-sm text-red-500\">{errors[`additional_${field.id}`]}</p>\n )}\n </div>\n ))}\n </div>\n </div>\n )}\n \n {/* Privacy Notice */}\n <div className=\"mt-6 p-4 bg-gray-50 dark:bg-gray-700 rounded-md\">\n <h3 className=\"text-sm font-semibold mb-2\">Privacy Notice</h3>\n <p className=\"text-xs text-gray-600 dark:text-gray-300\">\n The information you provide in this form will be used solely for the purpose of processing your data subject request.\n We will retain this information for as long as necessary to fulfill your request and to comply with our legal obligations.\n For more information, please refer to our Privacy Policy.\n </p>\n </div>\n \n {/* Submit Button */}\n <div className=\"mt-6\">\n <button\n type=\"submit\"\n className={`px-6 py-3 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 ${buttonClassName}`}\n >\n {labels.submit || submitButtonText}\n </button>\n </div>\n </div>\n </form>\n </div>\n );\n};\n","import React, { useState, useEffect } from 'react';\nimport { DSRRequest, DSRStatus, DSRType } from '../../types/dsr';\nimport { formatDSRRequest } from '../../utils/dsr';\n\nexport interface DSRDashboardProps {\n /**\n * List of DSR requests to display\n */\n requests: DSRRequest[];\n \n /**\n * Callback function called when a request is selected\n */\n onSelectRequest?: (requestId: string) => void;\n \n /**\n * Callback function called when a request status is updated\n */\n onUpdateStatus?: (requestId: string, status: DSRStatus) => void;\n \n /**\n * Callback function called when a request is assigned\n */\n onAssignRequest?: (requestId: string, assignee: string) => void;\n \n /**\n * Title displayed on the dashboard\n * @default \"Data Subject Request Dashboard\"\n */\n title?: string;\n \n /**\n * Description text displayed on the dashboard\n * @default \"Track and manage data subject requests in compliance with NDPA requirements.\"\n */\n description?: string;\n \n /**\n * Custom CSS class for the dashboard\n */\n className?: string;\n \n /**\n * Custom CSS class for the buttons\n */\n buttonClassName?: string;\n \n /**\n * Whether to show the request details\n * @default true\n */\n showRequestDetails?: boolean;\n \n /**\n * Whether to show the request timeline\n * @default true\n */\n showRequestTimeline?: boolean;\n \n /**\n * Whether to show the deadline alerts\n * @default true\n */\n showDeadlineAlerts?: boolean;\n \n /**\n * List of possible assignees\n */\n assignees?: string[];\n}\n\nexport const DSRDashboard: React.FC<DSRDashboardProps> = ({\n requests,\n onSelectRequest,\n onUpdateStatus,\n onAssignRequest,\n title = \"Data Subject Request Dashboard\",\n description = \"Track and manage data subject requests in compliance with NDPA requirements.\",\n className = \"\",\n buttonClassName = \"\",\n showRequestDetails = true,\n showRequestTimeline = true,\n showDeadlineAlerts = true,\n assignees = []\n}) => {\n const [selectedRequestId, setSelectedRequestId] = useState<string | null>(null);\n const [filteredRequests, setFilteredRequests] = useState<DSRRequest[]>(requests);\n const [statusFilter, setStatusFilter] = useState<string>('all');\n const [typeFilter, setTypeFilter] = useState<string>('all');\n const [searchTerm, setSearchTerm] = useState<string>('');\n const [sortBy, setSortBy] = useState<string>('createdAt');\n const [sortDirection, setSortDirection] = useState<'asc' | 'desc'>('desc');\n const [assignee, setAssignee] = useState<string>('');\n \n // Update filtered requests when filters change\n useEffect(() => {\n let filtered = [...requests];\n \n // Apply status filter\n if (statusFilter !== 'all') {\n filtered = filtered.filter(request => request.status === statusFilter);\n }\n \n // Apply type filter\n if (typeFilter !== 'all') {\n filtered = filtered.filter(request => request.type === typeFilter);\n }\n \n // Apply search filter\n if (searchTerm) {\n const term = searchTerm.toLowerCase();\n filtered = filtered.filter(request => \n request.subject.name.toLowerCase().includes(term) ||\n request.subject.email.toLowerCase().includes(term) ||\n (request.description && request.description.toLowerCase().includes(term))\n );\n }\n \n // Apply sorting\n filtered.sort((a, b) => {\n let comparison = 0;\n \n switch (sortBy) {\n case 'createdAt':\n comparison = a.createdAt - b.createdAt;\n break;\n case 'dueDate':\n comparison = (a.dueDate || 0) - (b.dueDate || 0);\n break;\n case 'type':\n comparison = a.type.localeCompare(b.type);\n break;\n case 'status':\n comparison = a.status.localeCompare(b.status);\n break;\n default:\n comparison = a.createdAt - b.createdAt;\n }\n \n return sortDirection === 'asc' ? comparison : -comparison;\n });\n \n setFilteredRequests(filtered);\n }, [requests, statusFilter, typeFilter, searchTerm, sortBy, sortDirection]);\n \n // Select the first request if none is selected\n useEffect(() => {\n if (filteredRequests.length > 0 && !selectedRequestId) {\n setSelectedRequestId(filteredRequests[0].id);\n }\n }, [filteredRequests, selectedRequestId]);\n \n // Handle request selection\n const handleSelectRequest = (requestId: string) => {\n setSelectedRequestId(requestId);\n if (onSelectRequest) {\n onSelectRequest(requestId);\n }\n };\n \n // Handle status update\n const handleUpdateStatus = (status: DSRStatus) => {\n if (selectedRequestId && onUpdateStatus) {\n onUpdateStatus(selectedRequestId, status);\n }\n };\n \n // Handle request assignment\n const handleAssignRequest = () => {\n if (selectedRequestId && assignee && onAssignRequest) {\n onAssignRequest(selectedRequestId, assignee);\n setAssignee('');\n }\n };\n \n // Format a date from timestamp\n const formatDate = (timestamp: number): string => {\n return new Date(timestamp).toLocaleDateString();\n };\n \n // Calculate days remaining until deadline\n const calculateDaysRemaining = (dueDate: number): number => {\n const now = Date.now();\n const remaining = (dueDate - now) / (24 * 60 * 60 * 1000);\n return Math.ceil(remaining);\n };\n \n // Get the selected request\n const selectedRequest = selectedRequestId \n ? requests.find(request => request.id === selectedRequestId) \n : null;\n \n // Render type badge\n const renderTypeBadge = (type: DSRType) => {\n const colorClasses: Record<DSRType, string> = {\n information: 'bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-200',\n access: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200',\n rectification: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200',\n erasure: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200',\n restriction: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200',\n portability: 'bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200',\n objection: 'bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200',\n automated_decision_making: 'bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200'\n };\n\n const typeLabels: Record<DSRType, string> = {\n information: 'Information',\n access: 'Access',\n rectification: 'Rectification',\n erasure: 'Erasure',\n restriction: 'Restriction',\n portability: 'Portability',\n objection: 'Objection',\n automated_decision_making: 'Automated Decision-Making'\n };\n\n return (\n <span className={`px-2 py-1 rounded text-xs font-medium ${colorClasses[type]}`}>\n {typeLabels[type]}\n </span>\n );\n };\n \n // Render status badge\n const renderStatusBadge = (status: DSRStatus) => {\n const colorClasses = {\n pending: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200',\n inProgress: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200',\n completed: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200',\n rejected: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200',\n awaitingVerification: 'bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200'\n };\n \n return (\n <span className={`px-2 py-1 rounded text-xs font-medium ${colorClasses[status]}`}>\n {status === 'inProgress' ? 'In Progress' : \n status === 'awaitingVerification' ? 'Awaiting Verification' : \n status.charAt(0).toUpperCase() + status.slice(1)}\n </span>\n );\n };\n \n // Render deadline alert\n const renderDeadlineAlert = (request: DSRRequest) => {\n if (!request.dueDate) return null;\n \n const daysRemaining = calculateDaysRemaining(request.dueDate);\n \n if (daysRemaining <= 0) {\n return (\n <div className=\"bg-red-50 dark:bg-red-900/20 p-3 rounded-md\">\n <p className=\"text-sm text-red-800 dark:text-red-200 font-medium\">\n Deadline Passed\n </p>\n <p className=\"text-xs text-red-700 dark:text-red-300 mt-1\">\n The response deadline has passed. Immediate action is required.\n </p>\n </div>\n );\n }\n \n if (daysRemaining <= 3) {\n return (\n <div className=\"bg-red-50 dark:bg-red-900/20 p-3 rounded-md\">\n <p className=\"text-sm text-red-800 dark:text-red-200 font-medium\">\n Urgent: Deadline Approaching\n </p>\n <p className=\"text-xs text-red-700 dark:text-red-300 mt-1\">\n Only {daysRemaining} day{daysRemaining !== 1 ? 's' : ''} remaining until the response deadline.\n </p>\n </div>\n );\n }\n \n if (daysRemaining <= 7) {\n return (\n <div className=\"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md\">\n <p className=\"text-sm text-yellow-800 dark:text-yellow-200 font-medium\">\n Deadline Approaching\n </p>\n <p className=\"text-xs text-yellow-700 dark:text-yellow-300 mt-1\">\n {daysRemaining} days remaining until the response deadline.\n </p>\n </div>\n );\n }\n \n return (\n <div className=\"bg-green-50 dark:bg-green-900/20 p-3 rounded-md\">\n <p className=\"text-sm text-green-800 dark:text-green-200 font-medium\">\n Deadline Tracking\n </p>\n <p className=\"text-xs text-green-700 dark:text-green-300 mt-1\">\n {daysRemaining} days remaining until the response deadline.\n </p>\n </div>\n );\n };\n \n // Render request timeline\n const renderRequestTimeline = (request: DSRRequest) => {\n const timeline = [\n {\n title: 'Request Received',\n date: request.createdAt,\n completed: true,\n description: `Request was received on ${formatDate(request.createdAt)}.`\n }\n ];\n \n if (request.verifiedAt) {\n timeline.push({\n title: 'Identity Verified',\n date: request.verifiedAt,\n completed: true,\n description: `Data subject's identity was verified on ${formatDate(request.verifiedAt)}.`\n });\n } else if (request.status === 'awaitingVerification') {\n timeline.push({\n title: 'Identity Verification',\n date: Date.now(),\n completed: false,\n description: 'Awaiting verification of data subject\\'s identity.'\n });\n }\n \n if (request.status === 'inProgress' || request.status === 'completed' || request.status === 'rejected') {\n timeline.push({\n title: 'Processing Started',\n date: request.updatedAt,\n completed: true,\n description: `Request processing started on ${formatDate(request.updatedAt)}.`\n });\n }\n \n if (request.status === 'completed') {\n timeline.push({\n title: 'Request Completed',\n date: request.completedAt || Date.now(),\n completed: true,\n description: `Request was completed on ${formatDate(request.completedAt || Date.now())}.`\n });\n } else if (request.status === 'rejected') {\n timeline.push({\n title: 'Request Rejected',\n date: request.completedAt || Date.now(),\n completed: true,\n description: `Request was rejected on ${formatDate(request.completedAt || Date.now())}.${request.rejectionReason ? ` Reason: ${request.rejectionReason}` : ''}`\n });\n }\n \n if (request.dueDate) {\n timeline.push({\n title: 'Response Deadline',\n date: request.dueDate,\n completed: Date.now() > request.dueDate,\n description: `Response is due by ${formatDate(request.dueDate)}.`\n });\n }\n \n return (\n <div className=\"mt-6\">\n <h3 className=\"text-lg font-medium mb-4\">Request Timeline</h3>\n <ol className=\"relative border-l border-gray-200 dark:border-gray-700\">\n {timeline.map((item, index) => (\n <li key={index} className=\"mb-6 ml-4\">\n <div className={`absolute w-3 h-3 rounded-full mt-1.5 -left-1.5 border ${\n item.completed \n ? 'bg-green-500 border-green-500 dark:border-green-500' \n : 'bg-gray-200 border-gray-200 dark:bg-gray-700 dark:border-gray-700'\n }`}></div>\n <time className=\"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500\">\n {item.date ? formatDate(item.date) : 'Pending'}\n </time>\n <h4 className=\"text-sm font-semibold text-gray-900 dark:text-white\">\n {item.title}\n </h4>\n <p className=\"text-xs text-gray-500 dark:text-gray-400\">\n {item.description}\n </p>\n </li>\n ))}\n </ol>\n </div>\n );\n };\n \n // Render the type filter options\n const renderTypeOptions = () => {\n const options = [\n { value: 'all', label: 'All Types' },\n { value: 'information', label: 'Information (NDPA Section 29)' },\n { value: 'access', label: 'Access (NDPA Section 30)' },\n { value: 'rectification', label: 'Rectification (NDPA Section 31)' },\n { value: 'erasure', label: 'Erasure (NDPA Section 32)' },\n { value: 'restriction', label: 'Restriction (NDPA Section 33)' },\n { value: 'portability', label: 'Portability (NDPA Section 34)' },\n { value: 'objection', label: 'Objection (NDPA Section 35)' },\n { value: 'automated_decision_making', label: 'Automated Decision-Making (NDPA Section 36)' }\n ];\n \n return options.map(option => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ));\n };\n \n // Render the status filter options\n const renderStatusOptions = () => {\n const options = [\n { value: 'all', label: 'All Statuses' },\n { value: 'pending', label: 'Pending' },\n { value: 'awaitingVerification', label: 'Awaiting Verification' },\n { value: 'inProgress', label: 'In Progress' },\n { value: 'completed', label: 'Completed' },\n { value: 'rejected', label: 'Rejected' }\n ];\n \n return options.map(option => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ));\n };\n \n // Render the status update options\n const renderStatusUpdateOptions = () => {\n const options = [\n { value: 'pending', label: 'Pending' },\n { value: 'awaitingVerification', label: 'Awaiting Verification' },\n { value: 'inProgress', label: 'In Progress' },\n { value: 'completed', label: 'Completed' },\n { value: 'rejected', label: 'Rejected' }\n ];\n \n return options.map(option => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ));\n };\n \n return (\n <div className={`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${className}`}>\n <h2 className=\"text-xl font-bold mb-2\">{title}</h2>\n <p className=\"mb-6 text-gray-600 dark:text-gray-300\">{description}</p>\n \n {/* Filters and Search */}\n <div className=\"mb-6 grid grid-cols-1 md:grid-cols-4 gap-4\">\n <div>\n <label htmlFor=\"statusFilter\" className=\"block text-sm font-medium mb-1\">\n Status Filter\n </label>\n <select\n id=\"statusFilter\"\n value={statusFilter}\n onChange={e => setStatusFilter(e.target.value)}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n >\n {renderStatusOptions()}\n </select>\n </div>\n \n <div>\n <label htmlFor=\"typeFilter\" className=\"block text-sm font-medium mb-1\">\n Request Type Filter\n </label>\n <select\n id=\"typeFilter\"\n value={typeFilter}\n onChange={e => setTypeFilter(e.target.value)}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n >\n {renderTypeOptions()}\n </select>\n </div>\n \n <div>\n <label htmlFor=\"sortBy\" className=\"block text-sm font-medium mb-1\">\n Sort By\n </label>\n <select\n id=\"sortBy\"\n value={sortBy}\n onChange={e => setSortBy(e.target.value)}\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n >\n <option value=\"createdAt\">Date Received</option>\n <option value=\"dueDate\">Due Date</option>\n <option value=\"type\">Request Type</option>\n <option value=\"status\">Status</option>\n </select>\n </div>\n \n <div>\n <label htmlFor=\"searchTerm\" className=\"block text-sm font-medium mb-1\">\n Search\n </label>\n <input\n type=\"text\"\n id=\"searchTerm\"\n value={searchTerm}\n onChange={e => setSearchTerm(e.target.value)}\n placeholder=\"Search requests...\"\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n />\n </div>\n </div>\n \n {/* Request List and Details */}\n <div className=\"grid grid-cols-1 md:grid-cols-3 gap-6\">\n {/* Request List */}\n <div className=\"md:col-span-1\">\n <h3 className=\"text-lg font-medium mb-3\">DSR Requests</h3>\n \n {filteredRequests.length === 0 ? (\n <p className=\"text-gray-500 dark:text-gray-400 text-sm\">\n No data subject requests found.\n </p>\n ) : (\n <div className=\"space-y-2 max-h-96 overflow-y-auto pr-2\">\n {filteredRequests.map(request => {\n // Calculate days remaining for the list item\n const daysRemaining = request.dueDate ? calculateDaysRemaining(request.dueDate) : null;\n \n // Determine deadline status for the list item\n let deadlineStatus = null;\n if (daysRemaining !== null) {\n if (daysRemaining <= 0) {\n deadlineStatus = (\n <span className=\"text-xs text-red-600 dark:text-red-400 font-bold\">\n Overdue\n </span>\n );\n } else if (daysRemaining <= 3) {\n deadlineStatus = (\n <span className=\"text-xs text-red-600 dark:text-red-400\">\n Urgent\n </span>\n );\n } else if (daysRemaining <= 7) {\n deadlineStatus = (\n <span className=\"text-xs text-yellow-600 dark:text-yellow-400\">\n Soon\n </span>\n );\n }\n }\n \n return (\n <div\n key={request.id}\n className={`p-3 rounded-md cursor-pointer ${\n selectedRequestId === request.id \n ? 'bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800' \n : 'bg-gray-50 dark:bg-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600'\n }`}\n onClick={() => handleSelectRequest(request.id)}\n >\n <div className=\"flex justify-between items-start mb-1\">\n <h4 className=\"font-medium text-sm\">{request.subject.name}</h4>\n {renderTypeBadge(request.type)}\n </div>\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mb-1\">\n {request.subject.email}\n </p>\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mb-1\">\n Received: {formatDate(request.createdAt)}\n </p>\n <div className=\"flex justify-between items-center mt-2\">\n <div>\n {renderStatusBadge(request.status)}\n </div>\n <div>\n {deadlineStatus}\n </div>\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n \n {/* Request Details */}\n <div className=\"md:col-span-2\">\n {selectedRequest ? (\n <div>\n <div className=\"flex justify-between items-start mb-4\">\n <h3 className=\"text-lg font-medium\">{selectedRequest.subject.name}</h3>\n <div className=\"flex space-x-2\">\n {renderTypeBadge(selectedRequest.type)}\n {renderStatusBadge(selectedRequest.status)}\n </div>\n </div>\n \n {/* Deadline Alert */}\n {showDeadlineAlerts && selectedRequest.dueDate && (\n <div className=\"mb-4\">\n {renderDeadlineAlert(selectedRequest)}\n </div>\n )}\n \n {/* Request Details */}\n {showRequestDetails && (\n <div className=\"mb-6\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4\">\n <div>\n <p className=\"text-sm\"><span className=\"font-medium\">Email:</span> {selectedRequest.subject.email}</p>\n {selectedRequest.subject.phone && (\n <p className=\"text-sm\"><span className=\"font-medium\">Phone:</span> {selectedRequest.subject.phone}</p>\n )}\n <p className=\"text-sm\"><span className=\"font-medium\">Received:</span> {formatDate(selectedRequest.createdAt)}</p>\n </div>\n <div>\n <p className=\"text-sm\">\n <span className=\"font-medium\">Request Type:</span> {\n ({\n information: 'Information',\n access: 'Access',\n rectification: 'Rectification',\n erasure: 'Erasure',\n restriction: 'Restriction',\n portability: 'Portability',\n objection: 'Objection',\n automated_decision_making: 'Automated Decision-Making'\n } as Record<string, string>)[selectedRequest.type] || selectedRequest.type\n }\n </p>\n <p className=\"text-sm\">\n <span className=\"font-medium\">Status:</span> {\n selectedRequest.status === 'inProgress' ? 'In Progress' : \n selectedRequest.status === 'awaitingVerification' ? 'Awaiting Verification' : \n selectedRequest.status.charAt(0).toUpperCase() + selectedRequest.status.slice(1)\n }\n </p>\n {selectedRequest.dueDate && (\n <p className=\"text-sm\">\n <span className=\"font-medium\">Due Date:</span> {formatDate(selectedRequest.dueDate)}\n </p>\n )}\n </div>\n </div>\n \n {selectedRequest.description && (\n <div className=\"mb-4\">\n <p className=\"text-sm font-medium\">Request Details:</p>\n <p className=\"text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700 p-2 rounded-md mt-1\">\n {selectedRequest.description}\n </p>\n </div>\n )}\n \n {selectedRequest.additionalInfo && (\n <div>\n <p className=\"text-sm font-medium\">Additional Information:</p>\n <p className=\"text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700 p-2 rounded-md mt-1\">\n {typeof selectedRequest.additionalInfo === 'object' ? \n JSON.stringify(selectedRequest.additionalInfo, null, 2) : \n String(selectedRequest.additionalInfo || 'No additional information provided')}\n </p>\n </div>\n )}\n </div>\n )}\n \n {/* Request Management */}\n <div className=\"mb-6 grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Status Update */}\n <div>\n <h3 className=\"text-md font-medium mb-2\">Update Status</h3>\n <div className=\"flex space-x-2\">\n <select\n value={selectedRequest.status}\n onChange={e => handleUpdateStatus(e.target.value as DSRStatus)}\n className=\"flex-grow px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n >\n {renderStatusUpdateOptions()}\n </select>\n <button\n onClick={() => handleUpdateStatus(selectedRequest.status)}\n className={`px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 ${buttonClassName}`}\n >\n Update\n </button>\n </div>\n </div>\n \n {/* Assign Request */}\n {assignees.length > 0 && (\n <div>\n <h3 className=\"text-md font-medium mb-2\">Assign Request</h3>\n <div className=\"flex space-x-2\">\n <select\n value={assignee}\n onChange={e => setAssignee(e.target.value)}\n className=\"flex-grow px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n >\n <option value=\"\">Select Assignee</option>\n {assignees.map(name => (\n <option key={name} value={name}>{name}</option>\n ))}\n </select>\n <button\n onClick={handleAssignRequest}\n disabled={!assignee}\n className={`px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:bg-gray-300 disabled:text-gray-500 ${buttonClassName}`}\n >\n Assign\n </button>\n </div>\n </div>\n )}\n </div>\n \n {/* Request Summary */}\n <div className=\"mb-6\">\n <h3 className=\"text-lg font-medium mb-3\">Request Summary</h3>\n <div className=\"bg-gray-50 dark:bg-gray-700 p-3 rounded-md\">\n <pre className=\"whitespace-pre-wrap text-sm font-mono text-gray-800 dark:text-gray-200\">\n <pre>\n {JSON.stringify(formatDSRRequest(selectedRequest), null, 2)}\n </pre>\n </pre>\n </div>\n </div>\n \n {/* Request Timeline */}\n {showRequestTimeline && renderRequestTimeline(selectedRequest)}\n </div>\n ) : (\n <div className=\"flex items-center justify-center h-64 bg-gray-50 dark:bg-gray-700 rounded-md\">\n <p className=\"text-gray-500 dark:text-gray-400\">\n Select a request to view details\n </p>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n};\n","import React, { useState, useEffect } from 'react';\nimport { DSRRequest, DSRStatus, DSRType } from '../../types/dsr';\n\nexport interface DSRTrackerProps {\n /**\n * List of DSR requests to track\n */\n requests: DSRRequest[];\n \n /**\n * Callback function called when a request is selected\n */\n onSelectRequest?: (requestId: string) => void;\n \n /**\n * Title displayed on the tracker\n * @default \"DSR Request Tracker\"\n */\n title?: string;\n \n /**\n * Description text displayed on the tracker\n * @default \"Track the status and progress of data subject requests.\"\n */\n description?: string;\n \n /**\n * Custom CSS class for the tracker\n */\n className?: string;\n \n /**\n * Custom CSS class for the buttons\n */\n buttonClassName?: string;\n \n /**\n * Whether to show the summary statistics\n * @default true\n */\n showSummaryStats?: boolean;\n \n /**\n * Whether to show the request type breakdown\n * @default true\n */\n showTypeBreakdown?: boolean;\n \n /**\n * Whether to show the status breakdown\n * @default true\n */\n showStatusBreakdown?: boolean;\n \n /**\n * Whether to show the timeline chart\n * @default true\n */\n showTimelineChart?: boolean;\n \n /**\n * Whether to show the overdue requests\n * @default true\n */\n showOverdueRequests?: boolean;\n}\n\nexport const DSRTracker: React.FC<DSRTrackerProps> = ({\n requests,\n onSelectRequest,\n title = \"DSR Request Tracker\",\n description = \"Track the status and progress of data subject requests.\",\n className = \"\",\n buttonClassName = \"\",\n showSummaryStats = true,\n showTypeBreakdown = true,\n showStatusBreakdown = true,\n showTimelineChart = true,\n showOverdueRequests = true\n}) => {\n const [selectedTimeframe, setSelectedTimeframe] = useState<'7days' | '30days' | '90days' | 'all'>('30days');\n const [filteredRequests, setFilteredRequests] = useState<DSRRequest[]>(requests);\n const [overdueRequests, setOverdueRequests] = useState<DSRRequest[]>([]);\n const [upcomingDeadlines, setUpcomingDeadlines] = useState<DSRRequest[]>([]);\n \n // Filter requests based on selected timeframe\n useEffect(() => {\n const now = Date.now();\n let filtered: DSRRequest[];\n \n switch (selectedTimeframe) {\n case '7days':\n filtered = requests.filter(request => (now - request.createdAt) <= 7 * 24 * 60 * 60 * 1000);\n break;\n case '30days':\n filtered = requests.filter(request => (now - request.createdAt) <= 30 * 24 * 60 * 60 * 1000);\n break;\n case '90days':\n filtered = requests.filter(request => (now - request.createdAt) <= 90 * 24 * 60 * 60 * 1000);\n break;\n default:\n filtered = [...requests];\n }\n \n setFilteredRequests(filtered);\n \n // Find overdue requests\n const overdue = filtered.filter(request => \n request.dueDate && \n now > request.dueDate && \n request.status !== 'completed' && \n request.status !== 'rejected'\n );\n setOverdueRequests(overdue);\n \n // Find upcoming deadlines (due in the next 7 days)\n const upcoming = filtered.filter(request => \n request.dueDate && \n now < request.dueDate && \n (request.dueDate - now) <= 7 * 24 * 60 * 60 * 1000 &&\n request.status !== 'completed' && \n request.status !== 'rejected'\n );\n setUpcomingDeadlines(upcoming);\n }, [requests, selectedTimeframe]);\n \n // Handle request selection\n const handleSelectRequest = (requestId: string) => {\n if (onSelectRequest) {\n onSelectRequest(requestId);\n }\n };\n \n // Format a date from timestamp\n const formatDate = (timestamp: number): string => {\n return new Date(timestamp).toLocaleDateString();\n };\n \n // Calculate days remaining until deadline\n const calculateDaysRemaining = (dueDate: number): number => {\n const now = Date.now();\n const remaining = (dueDate - now) / (24 * 60 * 60 * 1000);\n return Math.ceil(remaining);\n };\n \n // Calculate average response time in days\n const calculateAverageResponseTime = (): number | null => {\n const completedRequests = filteredRequests.filter(request => \n request.status === 'completed' && request.completedAt && request.createdAt\n );\n \n if (completedRequests.length === 0) {\n return null;\n }\n \n const totalDays = completedRequests.reduce((sum, request) => {\n const responseTime = ((request.completedAt || 0) - request.createdAt) / (24 * 60 * 60 * 1000);\n return sum + responseTime;\n }, 0);\n \n return Number((totalDays / completedRequests.length).toFixed(1));\n };\n \n // Calculate compliance rate (percentage of requests completed within deadline)\n const calculateComplianceRate = (): number | null => {\n const completedRequests = filteredRequests.filter(request => \n (request.status === 'completed' || request.status === 'rejected') && \n request.completedAt && \n request.dueDate\n );\n \n if (completedRequests.length === 0) {\n return null;\n }\n \n const compliantRequests = completedRequests.filter(request => \n (request.completedAt || 0) <= (request.dueDate || 0)\n );\n \n return Math.round((compliantRequests.length / completedRequests.length) * 100);\n };\n \n // Count requests by type\n const countRequestsByType = (): Record<DSRType, number> => {\n const counts: Partial<Record<DSRType, number>> = {};\n \n filteredRequests.forEach(request => {\n counts[request.type] = (counts[request.type] || 0) + 1;\n });\n \n return {\n information: counts.information || 0,\n access: counts.access || 0,\n rectification: counts.rectification || 0,\n erasure: counts.erasure || 0,\n restriction: counts.restriction || 0,\n portability: counts.portability || 0,\n objection: counts.objection || 0,\n automated_decision_making: counts.automated_decision_making || 0\n };\n };\n \n // Count requests by status\n const countRequestsByStatus = (): Record<DSRStatus, number> => {\n const counts: Partial<Record<DSRStatus, number>> = {};\n \n filteredRequests.forEach(request => {\n counts[request.status] = (counts[request.status] || 0) + 1;\n });\n \n return {\n pending: counts.pending || 0,\n awaitingVerification: counts.awaitingVerification || 0,\n inProgress: counts.inProgress || 0,\n completed: counts.completed || 0,\n rejected: counts.rejected || 0\n };\n };\n \n // Render type badge\n const renderTypeBadge = (type: DSRType) => {\n const colorClasses: Record<DSRType, string> = {\n information: 'bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-200',\n access: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200',\n rectification: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200',\n erasure: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200',\n restriction: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200',\n portability: 'bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200',\n objection: 'bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200',\n automated_decision_making: 'bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200'\n };\n\n const typeLabels: Record<DSRType, string> = {\n information: 'Information',\n access: 'Access',\n rectification: 'Rectification',\n erasure: 'Erasure',\n restriction: 'Restriction',\n portability: 'Portability',\n objection: 'Objection',\n automated_decision_making: 'Automated Decision-Making'\n };\n\n return (\n <span className={`px-2 py-1 rounded text-xs font-medium ${colorClasses[type]}`}>\n {typeLabels[type]}\n </span>\n );\n };\n \n // Render status badge\n const renderStatusBadge = (status: DSRStatus) => {\n const colorClasses = {\n pending: 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200',\n inProgress: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200',\n completed: 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200',\n rejected: 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200',\n awaitingVerification: 'bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200'\n };\n \n return (\n <span className={`px-2 py-1 rounded text-xs font-medium ${colorClasses[status]}`}>\n {status === 'inProgress' ? 'In Progress' : \n status === 'awaitingVerification' ? 'Awaiting Verification' : \n status.charAt(0).toUpperCase() + status.slice(1)}\n </span>\n );\n };\n \n // Render the summary statistics\n const renderSummaryStats = () => {\n const totalRequests = filteredRequests.length;\n const pendingRequests = filteredRequests.filter(request => \n request.status !== 'completed' && request.status !== 'rejected'\n ).length;\n const completedRequests = filteredRequests.filter(request => \n request.status === 'completed' || request.status === 'rejected'\n ).length;\n const averageResponseTime = calculateAverageResponseTime();\n const complianceRate = calculateComplianceRate();\n \n return (\n <div className=\"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6\">\n <div className=\"bg-white dark:bg-gray-700 p-4 rounded-lg shadow\">\n <h4 className=\"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1\">Total Requests</h4>\n <p className=\"text-2xl font-bold\">{totalRequests}</p>\n </div>\n \n <div className=\"bg-white dark:bg-gray-700 p-4 rounded-lg shadow\">\n <h4 className=\"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1\">Pending Requests</h4>\n <p className=\"text-2xl font-bold\">{pendingRequests}</p>\n </div>\n \n <div className=\"bg-white dark:bg-gray-700 p-4 rounded-lg shadow\">\n <h4 className=\"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1\">Avg. Response Time</h4>\n <p className=\"text-2xl font-bold\">{averageResponseTime !== null ? `${averageResponseTime} days` : 'N/A'}</p>\n </div>\n \n <div className=\"bg-white dark:bg-gray-700 p-4 rounded-lg shadow\">\n <h4 className=\"text-sm font-medium text-gray-500 dark:text-gray-400 mb-1\">Compliance Rate</h4>\n <p className=\"text-2xl font-bold\">{complianceRate !== null ? `${complianceRate}%` : 'N/A'}</p>\n </div>\n </div>\n );\n };\n \n // Render the type breakdown\n const renderTypeBreakdown = () => {\n const typeCounts = countRequestsByType();\n const totalRequests = filteredRequests.length;\n \n // Sort types by count (descending)\n const sortedTypes = Object.entries(typeCounts)\n .sort(([, countA], [, countB]) => countB - countA)\n .map(([type]) => type as DSRType);\n \n return (\n <div className=\"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6\">\n <h3 className=\"text-lg font-medium mb-4\">Request Types</h3>\n \n {totalRequests === 0 ? (\n <p className=\"text-gray-500 dark:text-gray-400 text-sm\">\n No data available for the selected timeframe.\n </p>\n ) : (\n <div className=\"space-y-4\">\n {sortedTypes.map(type => {\n const count = typeCounts[type];\n const percentage = Math.round((count / totalRequests) * 100);\n \n return (\n <div key={type}>\n <div className=\"flex justify-between items-center mb-1\">\n <div className=\"flex items-center\">\n {renderTypeBadge(type)}\n <span className=\"ml-2 text-sm\">{count} requests</span>\n </div>\n <span className=\"text-sm font-medium\">{percentage}%</span>\n </div>\n <div className=\"w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2.5\">\n <div \n className=\"bg-blue-600 h-2.5 rounded-full\" \n style={{ width: `${percentage}%` }}\n ></div>\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n };\n \n // Render the status breakdown\n const renderStatusBreakdown = () => {\n const statusCounts = countRequestsByStatus();\n const totalRequests = filteredRequests.length;\n \n // Define the order of statuses\n const statusOrder: DSRStatus[] = ['pending', 'awaitingVerification', 'inProgress', 'completed', 'rejected'];\n \n // Define colors for each status\n const statusColors: Record<DSRStatus, string> = {\n pending: 'bg-yellow-500',\n awaitingVerification: 'bg-purple-500',\n inProgress: 'bg-blue-500',\n completed: 'bg-green-500',\n rejected: 'bg-red-500'\n };\n \n return (\n <div className=\"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6\">\n <h3 className=\"text-lg font-medium mb-4\">Request Status</h3>\n \n {totalRequests === 0 ? (\n <p className=\"text-gray-500 dark:text-gray-400 text-sm\">\n No data available for the selected timeframe.\n </p>\n ) : (\n <div>\n <div className=\"flex h-4 mb-2\">\n {statusOrder.map(status => {\n const count = statusCounts[status];\n const percentage = (count / totalRequests) * 100;\n \n return percentage > 0 ? (\n <div \n key={status}\n className={`${statusColors[status]} first:rounded-l-full last:rounded-r-full`}\n style={{ width: `${percentage}%` }}\n title={`${status}: ${count} (${Math.round(percentage)}%)`}\n ></div>\n ) : null;\n })}\n </div>\n \n <div className=\"grid grid-cols-2 md:grid-cols-5 gap-2 mt-4\">\n {statusOrder.map(status => {\n const count = statusCounts[status];\n const percentage = Math.round((count / totalRequests) * 100);\n \n return (\n <div key={status} className=\"flex items-center\">\n <div className={`w-3 h-3 rounded-full ${statusColors[status]} mr-2`}></div>\n <div>\n <p className=\"text-xs font-medium\">\n {status === 'inProgress' ? 'In Progress' : \n status === 'awaitingVerification' ? 'Awaiting Verification' : \n status.charAt(0).toUpperCase() + status.slice(1)}\n </p>\n <p className=\"text-xs text-gray-500 dark:text-gray-400\">{count} ({percentage}%)</p>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n )}\n </div>\n );\n };\n \n // Render the timeline chart (simplified version)\n const renderTimelineChart = () => {\n // Group requests by month\n const requestsByMonth: Record<string, number> = {};\n \n filteredRequests.forEach(request => {\n const date = new Date(request.createdAt);\n const monthKey = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}`;\n \n requestsByMonth[monthKey] = (requestsByMonth[monthKey] || 0) + 1;\n });\n \n // Sort months chronologically\n const sortedMonths = Object.keys(requestsByMonth).sort();\n \n // Get the last 6 months (or all if less than 6)\n const displayMonths = sortedMonths.slice(-6);\n \n // Find the maximum count for scaling\n const maxCount = Math.max(...Object.values(requestsByMonth).filter(count => count > 0), 1);\n \n // Format month for display\n const formatMonth = (monthKey: string): string => {\n const [year, month] = monthKey.split('-');\n return `${month}/${year.slice(2)}`;\n };\n \n return (\n <div className=\"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6\">\n <h3 className=\"text-lg font-medium mb-4\">Request Timeline</h3>\n \n {displayMonths.length === 0 ? (\n <p className=\"text-gray-500 dark:text-gray-400 text-sm\">\n No data available for the selected timeframe.\n </p>\n ) : (\n <div className=\"h-40\">\n <div className=\"flex h-32 items-end justify-between space-x-2\">\n {displayMonths.map(month => {\n const count = requestsByMonth[month];\n const height = `${(count / maxCount) * 100}%`;\n \n return (\n <div key={month} className=\"flex flex-col items-center flex-1\">\n <div \n className=\"w-full bg-blue-500 rounded-t\"\n style={{ height }}\n title={`${formatMonth(month)}: ${count} requests`}\n ></div>\n </div>\n );\n })}\n </div>\n \n <div className=\"flex justify-between mt-2\">\n {displayMonths.map(month => (\n <div key={month} className=\"text-xs text-center\">\n {formatMonth(month)}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n };\n \n // Render overdue requests\n const renderOverdueRequests = () => {\n return (\n <div className=\"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6\">\n <h3 className=\"text-lg font-medium mb-4\">Overdue Requests</h3>\n \n {overdueRequests.length === 0 ? (\n <p className=\"text-gray-500 dark:text-gray-400 text-sm\">\n No overdue requests.\n </p>\n ) : (\n <div className=\"space-y-2 max-h-60 overflow-y-auto\">\n {overdueRequests.map(request => (\n <div \n key={request.id}\n className=\"p-3 bg-red-50 dark:bg-red-900/20 rounded-md cursor-pointer hover:bg-red-100 dark:hover:bg-red-900/30\"\n onClick={() => handleSelectRequest(request.id)}\n >\n <div className=\"flex justify-between items-start mb-1\">\n <h4 className=\"font-medium text-sm\">{request.subject.name}</h4>\n {renderTypeBadge(request.type)}\n </div>\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mb-1\">\n {request.subject.email}\n </p>\n <div className=\"flex justify-between items-center\">\n <p className=\"text-xs text-gray-500 dark:text-gray-400\">\n Due: {formatDate(request.dueDate || 0)}\n </p>\n <p className=\"text-xs font-bold text-red-600 dark:text-red-400\">\n Overdue by {Math.abs(calculateDaysRemaining(request.dueDate || 0))} days\n </p>\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n );\n };\n \n // Render upcoming deadlines\n const renderUpcomingDeadlines = () => {\n return (\n <div className=\"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6\">\n <h3 className=\"text-lg font-medium mb-4\">Upcoming Deadlines</h3>\n \n {upcomingDeadlines.length === 0 ? (\n <p className=\"text-gray-500 dark:text-gray-400 text-sm\">\n No upcoming deadlines in the next 7 days.\n </p>\n ) : (\n <div className=\"space-y-2 max-h-60 overflow-y-auto\">\n {upcomingDeadlines.map(request => {\n const daysRemaining = calculateDaysRemaining(request.dueDate || 0);\n \n return (\n <div \n key={request.id}\n className=\"p-3 bg-yellow-50 dark:bg-yellow-900/20 rounded-md cursor-pointer hover:bg-yellow-100 dark:hover:bg-yellow-900/30\"\n onClick={() => handleSelectRequest(request.id)}\n >\n <div className=\"flex justify-between items-start mb-1\">\n <h4 className=\"font-medium text-sm\">{request.subject.name}</h4>\n {renderTypeBadge(request.type)}\n </div>\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mb-1\">\n {request.subject.email}\n </p>\n <div className=\"flex justify-between items-center\">\n <p className=\"text-xs text-gray-500 dark:text-gray-400\">\n Due: {formatDate(request.dueDate || 0)}\n </p>\n <p className={`text-xs font-bold ${\n daysRemaining <= 3 \n ? 'text-red-600 dark:text-red-400' \n : 'text-yellow-600 dark:text-yellow-400'\n }`}>\n Due in {daysRemaining} days\n </p>\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n };\n \n return (\n <div className={`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${className}`}>\n <div className=\"flex flex-col md:flex-row md:justify-between md:items-center mb-6\">\n <div>\n <h2 className=\"text-xl font-bold mb-2\">{title}</h2>\n <p className=\"text-gray-600 dark:text-gray-300\">{description}</p>\n </div>\n \n <div className=\"mt-4 md:mt-0\">\n <label htmlFor=\"timeframe\" className=\"block text-sm font-medium mb-1\">\n Timeframe\n </label>\n <select\n id=\"timeframe\"\n value={selectedTimeframe}\n onChange={e => setSelectedTimeframe(e.target.value as '7days' | '30days' | '90days' | 'all')}\n className=\"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500\"\n >\n <option value=\"7days\">Last 7 Days</option>\n <option value=\"30days\">Last 30 Days</option>\n <option value=\"90days\">Last 90 Days</option>\n <option value=\"all\">All Time</option>\n </select>\n </div>\n </div>\n \n {/* Summary Statistics */}\n {showSummaryStats && renderSummaryStats()}\n \n {/* Main Content */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-6\">\n {/* Left Column */}\n <div>\n {/* Type Breakdown */}\n {showTypeBreakdown && renderTypeBreakdown()}\n \n {/* Status Breakdown */}\n {showStatusBreakdown && renderStatusBreakdown()}\n </div>\n \n {/* Right Column */}\n <div>\n {/* Timeline Chart */}\n {showTimelineChart && renderTimelineChart()}\n \n {/* Overdue Requests */}\n {showOverdueRequests && renderOverdueRequests()}\n \n {/* Upcoming Deadlines */}\n {showOverdueRequests && renderUpcomingDeadlines()}\n </div>\n </div>\n </div>\n );\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import {b,d,c,a as a$1}from'./chunk-PYEX7DFR.mjs';import {a,b as b$1}from'./chunk-WWT2ZSNU.mjs';import e,{useState,useMemo,useEffect}from'react';var P=[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_interest",label:"Public Interest (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}],Q=[{value:"active",label:"Active"},{value:"inactive",label:"Inactive"},{value:"archived",label:"Archived"}],ve=[{value:"data_subject",label:"Directly from Data Subject"},{value:"third_party",label:"Third Party"},{value:"public_source",label:"Public Source"},{value:"other",label:"Other"}];function fe(){let s=Date.now();return {id:`proc_${s}_${Math.random().toString(36).substring(2,11)}`,name:"",description:"",controllerDetails:{name:"",contact:"",address:""},lawfulBasis:"consent",lawfulBasisJustification:"",purposes:[],dataCategories:[],dataSubjectCategories:[],recipients:[],retentionPeriod:"",securityMeasures:[],dataSource:"data_subject",dpiaRequired:false,automatedDecisionMaking:false,status:"active",createdAt:s,updatedAt:s}}function X(s){return s?new Date(s).toLocaleDateString():"N/A"}var he=({ropa:s,onAddRecord:h,onUpdateRecord:k,onArchiveRecord:w,title:Y="Record of Processing Activities (ROPA)",description:Z="Maintain a comprehensive record of all data processing activities as required by the NDPA 2023.",className:R="",buttonClassName:D=""})=>{let[m,c$1]=useState("list"),[f,ee]=useState(""),[y,te]=useState("all"),[N,re]=useState("all"),[a$2,g]=useState(null),[A,x]=useState([]),[F,B]=useState(""),[I,M]=useState(""),[L,j]=useState(""),[O,_]=useState(""),[E,T]=useState(""),[U,$]=useState(""),[J,q]=useState(""),i=useMemo(()=>b(s),[s]),b$2=useMemo(()=>d(s),[s]),V=useMemo(()=>{let r=[...s.records];if(y!=="all"&&(r=r.filter(t=>t.status===y)),N!=="all"&&(r=r.filter(t=>t.lawfulBasis===N)),f){let t=f.toLowerCase();r=r.filter(l=>l.name.toLowerCase().includes(t)||l.description.toLowerCase().includes(t)||l.dataCategories.some(n=>n.toLowerCase().includes(t))||l.department&&l.department.toLowerCase().includes(t));}return r},[s.records,y,N,f]);useEffect(()=>{a$2&&(B(a$2.purposes.join(", ")),M(a$2.dataCategories.join(", ")),j((a$2.sensitiveDataCategories||[]).join(", ")),_(a$2.dataSubjectCategories.join(", ")),T(a$2.recipients.join(", ")),$(a$2.securityMeasures.join(", ")),q((a$2.systemsUsed||[]).join(", ")));},[a$2==null?void 0:a$2.id]);let ae=()=>{let r=fe();r.controllerDetails.name=s.organizationName,r.controllerDetails.contact=s.organizationContact,r.controllerDetails.address=s.organizationAddress,s.ndpcRegistrationNumber&&(r.controllerDetails.registrationNumber=s.ndpcRegistrationNumber),s.dpoDetails&&(r.controllerDetails.dpoContact=s.dpoDetails.email),g(r),x([]),c$1("form");},se=r=>{g(a({},r)),x([]),c$1("form");},u=r=>r.split(",").map(t=>t.trim()).filter(t=>t.length>0),le=()=>{if(!a$2)return;let r=b$1(a({},a$2),{purposes:u(F),dataCategories:u(I),sensitiveDataCategories:u(L),dataSubjectCategories:u(O),recipients:u(E),securityMeasures:u(U),systemsUsed:u(J),updatedAt:Date.now()});r.sensitiveDataCategories&&r.sensitiveDataCategories.length===0&&(r.sensitiveDataCategories=void 0),r.systemsUsed&&r.systemsUsed.length===0&&(r.systemsUsed=void 0);let t=a$1(r);if(!t.valid){x(t.errors);return}s.records.find(n=>n.id===r.id)?k==null||k(r.id,r):h==null||h(r),g(null),x([]),c$1("list");},oe=r=>{w==null||w(r);},de=()=>{let r=c(s),t=new Blob([r],{type:"text/csv;charset=utf-8;"}),l=URL.createObjectURL(t),n=document.createElement("a");n.href=l,n.download=`ropa_${s.organizationName.replace(/\s+/g,"_").toLowerCase()}_${new Date().toISOString().slice(0,10)}.csv`,n.click(),setTimeout(()=>URL.revokeObjectURL(l),100);},z=()=>{g(null),x([]),c$1("list");},o=(r,t)=>{a$2&&g(l=>l&&b$1(a({},l),{[r]:t}));},C=(r,t)=>{a$2&&g(l=>l&&b$1(a({},l),{controllerDetails:b$1(a({},l.controllerDetails),{[r]:t})}));},ie=r=>!!r.nextReviewDate&&r.nextReviewDate<=Date.now(),ne=r=>{let t={active:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",inactive:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},l={active:"Active",inactive:"Inactive",archived:"Archived"};return e.createElement("span",{className:`px-2 py-1 rounded text-xs font-medium ${t[r]}`},l[r])},ue=r=>e.createElement("span",{className:"px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200"},{consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"}[r]),me=()=>e.createElement("div",{className:"mb-6 p-4 bg-gray-50 dark:bg-gray-700 rounded-md"},e.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4"},e.createElement("div",null,e.createElement("p",{className:"text-sm font-medium text-gray-500 dark:text-gray-400"},"Organization"),e.createElement("p",{className:"text-sm font-semibold"},s.organizationName)),s.dpoDetails&&e.createElement("div",null,e.createElement("p",{className:"text-sm font-medium text-gray-500 dark:text-gray-400"},"Data Protection Officer"),e.createElement("p",{className:"text-sm font-semibold"},s.dpoDetails.name),e.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400"},s.dpoDetails.email)),s.ndpcRegistrationNumber&&e.createElement("div",null,e.createElement("p",{className:"text-sm font-medium text-gray-500 dark:text-gray-400"},"NDPC Registration No."),e.createElement("p",{className:"text-sm font-semibold"},s.ndpcRegistrationNumber))),e.createElement("div",{className:"mt-2 text-xs text-gray-500 dark:text-gray-400"},"Version ",s.version," | Last Updated: ",X(s.lastUpdated))),ce=()=>e.createElement("div",{className:"mb-6"},e.createElement("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4"},e.createElement("div",{className:"p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center"},e.createElement("p",{className:"text-2xl font-bold text-blue-700 dark:text-blue-300"},i.totalRecords),e.createElement("p",{className:"text-xs text-blue-600 dark:text-blue-400"},"Total Records")),e.createElement("div",{className:"p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center"},e.createElement("p",{className:"text-2xl font-bold text-green-700 dark:text-green-300"},i.activeRecords),e.createElement("p",{className:"text-xs text-green-600 dark:text-green-400"},"Active")),e.createElement("div",{className:"p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center"},e.createElement("p",{className:"text-2xl font-bold text-purple-700 dark:text-purple-300"},i.crossBorderRecords),e.createElement("p",{className:"text-xs text-purple-600 dark:text-purple-400"},"Cross-Border")),e.createElement("div",{className:"p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center"},e.createElement("p",{className:"text-2xl font-bold text-orange-700 dark:text-orange-300"},b$2.length),e.createElement("p",{className:"text-xs text-orange-600 dark:text-orange-400"},"Records with Gaps"))),e.createElement("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4"},e.createElement("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md"},e.createElement("p",{className:"text-sm font-medium mb-2"},"By Lawful Basis"),P.map(r=>e.createElement("div",{key:r.value,className:"flex justify-between text-xs mb-1"},e.createElement("span",{className:"text-gray-600 dark:text-gray-400"},r.label.split(" (")[0]),e.createElement("span",{className:"font-medium"},i.byLawfulBasis[r.value]||0)))),e.createElement("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md"},e.createElement("p",{className:"text-sm font-medium mb-2"},"Risk Indicators"),e.createElement("div",{className:"flex justify-between text-xs mb-1"},e.createElement("span",{className:"text-gray-600 dark:text-gray-400"},"Sensitive Data"),e.createElement("span",{className:"font-medium"},i.sensitiveDataRecords)),e.createElement("div",{className:"flex justify-between text-xs mb-1"},e.createElement("span",{className:"text-gray-600 dark:text-gray-400"},"DPIA Required"),e.createElement("span",{className:"font-medium"},i.dpiaRequiredRecords)),e.createElement("div",{className:"flex justify-between text-xs mb-1"},e.createElement("span",{className:"text-gray-600 dark:text-gray-400"},"Automated Decisions"),e.createElement("span",{className:"font-medium"},i.automatedDecisionRecords)),e.createElement("div",{className:"flex justify-between text-xs mb-1"},e.createElement("span",{className:"text-gray-600 dark:text-gray-400"},"Due for Review"),e.createElement("span",{className:`font-medium ${i.recordsDueForReview.length>0?"text-red-600 dark:text-red-400":""}`},i.recordsDueForReview.length))),i.topDepartments.length>0&&e.createElement("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md"},e.createElement("p",{className:"text-sm font-medium mb-2"},"Top Departments"),i.topDepartments.slice(0,5).map(r=>e.createElement("div",{key:r.department,className:"flex justify-between text-xs mb-1"},e.createElement("span",{className:"text-gray-600 dark:text-gray-400"},r.department),e.createElement("span",{className:"font-medium"},r.count))))),b$2.length>0&&e.createElement("div",{className:"p-3 bg-red-50 dark:bg-red-900/20 rounded-md"},e.createElement("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-2"},"Compliance Gaps Detected"),b$2.slice(0,5).map(r=>e.createElement("div",{key:r.recordId,className:"mb-2"},e.createElement("p",{className:"text-xs font-medium text-red-700 dark:text-red-300"},r.recordName),e.createElement("ul",{className:"list-disc list-inside"},r.gaps.map((t,l)=>e.createElement("li",{key:l,className:"text-xs text-red-600 dark:text-red-400"},t))))),b$2.length>5&&e.createElement("p",{className:"text-xs text-red-600 dark:text-red-400 mt-1"},"...and ",b$2.length-5," more record(s) with gaps."))),ge=()=>e.createElement("div",null,e.createElement("div",{className:"mb-4 grid grid-cols-1 md:grid-cols-4 gap-4"},e.createElement("div",null,e.createElement("label",{htmlFor:"ropaSearch",className:"block text-sm font-medium mb-1"},"Search"),e.createElement("input",{type:"text",id:"ropaSearch",value:f,onChange:r=>ee(r.target.value),placeholder:"Search records...",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})),e.createElement("div",null,e.createElement("label",{htmlFor:"ropaStatusFilter",className:"block text-sm font-medium mb-1"},"Status"),e.createElement("select",{id:"ropaStatusFilter",value:y,onChange:r=>te(r.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"},e.createElement("option",{value:"all"},"All Statuses"),Q.map(r=>e.createElement("option",{key:r.value,value:r.value},r.label)))),e.createElement("div",null,e.createElement("label",{htmlFor:"ropaBasisFilter",className:"block text-sm font-medium mb-1"},"Lawful Basis"),e.createElement("select",{id:"ropaBasisFilter",value:N,onChange:r=>re(r.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"},e.createElement("option",{value:"all"},"All Bases"),P.map(r=>e.createElement("option",{key:r.value,value:r.value},r.label.split(" (")[0])))),e.createElement("div",{className:"flex items-end space-x-2"},e.createElement("button",{onClick:ae,className:`px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 text-sm ${D}`},"Add Record"),e.createElement("button",{onClick:de,className:`px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700 text-sm ${D}`},"Export CSV"))),V.length===0?e.createElement("p",{className:"text-gray-500 dark:text-gray-400 text-sm text-center py-8"},"No processing records found."):e.createElement("div",{className:"overflow-x-auto"},e.createElement("table",{className:"w-full text-sm text-left"},e.createElement("thead",{className:"text-xs uppercase bg-gray-50 dark:bg-gray-700"},e.createElement("tr",null,e.createElement("th",{className:"px-4 py-3"},"Name"),e.createElement("th",{className:"px-4 py-3"},"Lawful Basis"),e.createElement("th",{className:"px-4 py-3"},"Data Categories"),e.createElement("th",{className:"px-4 py-3"},"Status"),e.createElement("th",{className:"px-4 py-3"},"Last Reviewed"),e.createElement("th",{className:"px-4 py-3"},"Actions"))),e.createElement("tbody",null,V.map(r=>{let t=ie(r),l=b$2.some(n=>n.recordId===r.id);return e.createElement("tr",{key:r.id,className:`border-b dark:border-gray-600 ${t?"bg-red-50 dark:bg-red-900/10":l?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} hover:bg-gray-50 dark:hover:bg-gray-700`},e.createElement("td",{className:"px-4 py-3"},e.createElement("div",null,e.createElement("p",{className:"font-medium"},r.name),r.department&&e.createElement("p",{className:"text-xs text-gray-500 dark:text-gray-400"},r.department),t&&e.createElement("span",{className:"text-xs text-red-600 dark:text-red-400 font-medium"},"Review Overdue"))),e.createElement("td",{className:"px-4 py-3"},ue(r.lawfulBasis)),e.createElement("td",{className:"px-4 py-3"},e.createElement("p",{className:"text-xs text-gray-600 dark:text-gray-300 max-w-xs truncate"},r.dataCategories.join(", "))),e.createElement("td",{className:"px-4 py-3"},ne(r.status)),e.createElement("td",{className:"px-4 py-3 text-xs text-gray-500 dark:text-gray-400"},X(r.lastReviewedAt)),e.createElement("td",{className:"px-4 py-3"},e.createElement("div",{className:"flex space-x-2"},e.createElement("button",{onClick:()=>se(r),className:"text-blue-600 dark:text-blue-400 hover:underline text-xs"},"Edit"),r.status!=="archived"&&e.createElement("button",{onClick:()=>oe(r.id),className:"text-gray-600 dark:text-gray-400 hover:underline text-xs"},"Archive"))))}))))),be=()=>{if(!a$2)return null;let r=!s.records.find(t=>t.id===a$2.id);return e.createElement("div",null,e.createElement("div",{className:"flex justify-between items-center mb-4"},e.createElement("h3",{className:"text-lg font-medium"},r?"Add Processing Record":"Edit Processing Record"),e.createElement("button",{onClick:z,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 text-sm"},"Cancel")),A.length>0&&e.createElement("div",{className:"mb-4 p-3 bg-red-50 dark:bg-red-900/20 rounded-md"},e.createElement("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1"},"Please fix the following errors:"),e.createElement("ul",{className:"list-disc list-inside"},A.map((t,l)=>e.createElement("li",{key:l,className:"text-xs text-red-600 dark:text-red-400"},t)))),e.createElement("div",{className:"space-y-6"},e.createElement("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4"},e.createElement("legend",{className:"text-sm font-medium px-2"},"Basic Information"),e.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4"},e.createElement("div",null,e.createElement("label",{htmlFor:"recordName",className:"block text-sm font-medium mb-1"},"Activity Name *"),e.createElement("input",{type:"text",id:"recordName",value:a$2.name,onChange:t=>o("name",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Customer Account Management"})),e.createElement("div",null,e.createElement("label",{htmlFor:"recordDepartment",className:"block text-sm font-medium mb-1"},"Department"),e.createElement("input",{type:"text",id:"recordDepartment",value:a$2.department||"",onChange:t=>o("department",t.target.value||void 0),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Marketing"})),e.createElement("div",{className:"md:col-span-2"},e.createElement("label",{htmlFor:"recordDescription",className:"block text-sm font-medium mb-1"},"Description *"),e.createElement("textarea",{id:"recordDescription",value:a$2.description,onChange:t=>o("description",t.target.value),rows:3,className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Describe what personal data processing is performed..."})),e.createElement("div",null,e.createElement("label",{htmlFor:"recordStatus",className:"block text-sm font-medium mb-1"},"Status *"),e.createElement("select",{id:"recordStatus",value:a$2.status,onChange:t=>o("status",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"},Q.map(t=>e.createElement("option",{key:t.value,value:t.value},t.label)))))),e.createElement("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4"},e.createElement("legend",{className:"text-sm font-medium px-2"},"Controller Details"),e.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4"},e.createElement("div",null,e.createElement("label",{htmlFor:"controllerName",className:"block text-sm font-medium mb-1"},"Controller Name *"),e.createElement("input",{type:"text",id:"controllerName",value:a$2.controllerDetails.name,onChange:t=>C("name",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})),e.createElement("div",null,e.createElement("label",{htmlFor:"controllerContact",className:"block text-sm font-medium mb-1"},"Controller Contact *"),e.createElement("input",{type:"text",id:"controllerContact",value:a$2.controllerDetails.contact,onChange:t=>C("contact",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})),e.createElement("div",{className:"md:col-span-2"},e.createElement("label",{htmlFor:"controllerAddress",className:"block text-sm font-medium mb-1"},"Controller Address *"),e.createElement("input",{type:"text",id:"controllerAddress",value:a$2.controllerDetails.address,onChange:t=>C("address",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})))),e.createElement("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4"},e.createElement("legend",{className:"text-sm font-medium px-2"},"Lawful Basis (NDPA Section 25)"),e.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4"},e.createElement("div",null,e.createElement("label",{htmlFor:"lawfulBasis",className:"block text-sm font-medium mb-1"},"Lawful Basis *"),e.createElement("select",{id:"lawfulBasis",value:a$2.lawfulBasis,onChange:t=>o("lawfulBasis",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"},P.map(t=>e.createElement("option",{key:t.value,value:t.value},t.label)))),e.createElement("div",null,e.createElement("label",{htmlFor:"lawfulBasisJustification",className:"block text-sm font-medium mb-1"},"Justification *"),e.createElement("textarea",{id:"lawfulBasisJustification",value:a$2.lawfulBasisJustification,onChange:t=>o("lawfulBasisJustification",t.target.value),rows:2,className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Explain why this lawful basis applies..."})))),e.createElement("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4"},e.createElement("legend",{className:"text-sm font-medium px-2"},"Data Details"),e.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4"},e.createElement("div",null,e.createElement("label",{htmlFor:"purposes",className:"block text-sm font-medium mb-1"},"Purposes * (comma-separated)"),e.createElement("input",{type:"text",id:"purposes",value:F,onChange:t=>B(t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Account management, Service delivery"})),e.createElement("div",null,e.createElement("label",{htmlFor:"dataCategories",className:"block text-sm font-medium mb-1"},"Data Categories * (comma-separated)"),e.createElement("input",{type:"text",id:"dataCategories",value:I,onChange:t=>M(t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Name, Email, Phone number"})),e.createElement("div",null,e.createElement("label",{htmlFor:"sensitiveData",className:"block text-sm font-medium mb-1"},"Sensitive Data Categories (comma-separated)"),e.createElement("input",{type:"text",id:"sensitiveData",value:L,onChange:t=>j(t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Health data, Biometric data"})),e.createElement("div",null,e.createElement("label",{htmlFor:"subjectCategories",className:"block text-sm font-medium mb-1"},"Data Subject Categories * (comma-separated)"),e.createElement("input",{type:"text",id:"subjectCategories",value:O,onChange:t=>_(t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Customers, Employees"})),e.createElement("div",null,e.createElement("label",{htmlFor:"recipients",className:"block text-sm font-medium mb-1"},"Recipients * (comma-separated)"),e.createElement("input",{type:"text",id:"recipients",value:E,onChange:t=>T(t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Payment processors, Cloud service providers"})),e.createElement("div",null,e.createElement("label",{htmlFor:"dataSource",className:"block text-sm font-medium mb-1"},"Data Source *"),e.createElement("select",{id:"dataSource",value:a$2.dataSource,onChange:t=>o("dataSource",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"},ve.map(t=>e.createElement("option",{key:t.value,value:t.value},t.label)))),a$2.dataSource==="third_party"&&e.createElement("div",{className:"md:col-span-2"},e.createElement("label",{htmlFor:"thirdPartyDetails",className:"block text-sm font-medium mb-1"},"Third-Party Source Details *"),e.createElement("input",{type:"text",id:"thirdPartyDetails",value:a$2.thirdPartySourceDetails||"",onChange:t=>o("thirdPartySourceDetails",t.target.value||void 0),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Describe the third-party data source..."})))),e.createElement("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4"},e.createElement("legend",{className:"text-sm font-medium px-2"},"Retention and Security"),e.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4"},e.createElement("div",null,e.createElement("label",{htmlFor:"retentionPeriod",className:"block text-sm font-medium mb-1"},"Retention Period *"),e.createElement("input",{type:"text",id:"retentionPeriod",value:a$2.retentionPeriod,onChange:t=>o("retentionPeriod",t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., 5 years after account closure"})),e.createElement("div",null,e.createElement("label",{htmlFor:"retentionJustification",className:"block text-sm font-medium mb-1"},"Retention Justification"),e.createElement("input",{type:"text",id:"retentionJustification",value:a$2.retentionJustification||"",onChange:t=>o("retentionJustification",t.target.value||void 0),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Why this retention period is necessary..."})),e.createElement("div",{className:"md:col-span-2"},e.createElement("label",{htmlFor:"securityMeasures",className:"block text-sm font-medium mb-1"},"Security Measures * (comma-separated)"),e.createElement("input",{type:"text",id:"securityMeasures",value:U,onChange:t=>$(t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., Encryption at rest, Access controls, Audit logging"})),e.createElement("div",null,e.createElement("label",{htmlFor:"systemsUsed",className:"block text-sm font-medium mb-1"},"Systems Used (comma-separated)"),e.createElement("input",{type:"text",id:"systemsUsed",value:J,onChange:t=>q(t.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., CRM, ERP, Cloud Storage"})))),e.createElement("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4"},e.createElement("legend",{className:"text-sm font-medium px-2"},"Risk Indicators"),e.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4"},e.createElement("div",{className:"flex items-center space-x-2"},e.createElement("input",{type:"checkbox",id:"dpiaRequired",checked:a$2.dpiaRequired,onChange:t=>o("dpiaRequired",t.target.checked),className:"rounded border-gray-300 dark:border-gray-600"}),e.createElement("label",{htmlFor:"dpiaRequired",className:"text-sm font-medium"},"DPIA Required")),a$2.dpiaRequired&&e.createElement("div",null,e.createElement("label",{htmlFor:"dpiaReference",className:"block text-sm font-medium mb-1"},"DPIA Reference *"),e.createElement("input",{type:"text",id:"dpiaReference",value:a$2.dpiaReference||"",onChange:t=>o("dpiaReference",t.target.value||void 0),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Reference to the completed DPIA"})),e.createElement("div",{className:"flex items-center space-x-2"},e.createElement("input",{type:"checkbox",id:"automatedDecisionMaking",checked:a$2.automatedDecisionMaking,onChange:t=>o("automatedDecisionMaking",t.target.checked),className:"rounded border-gray-300 dark:border-gray-600"}),e.createElement("label",{htmlFor:"automatedDecisionMaking",className:"text-sm font-medium"},"Automated Decision-Making")),a$2.automatedDecisionMaking&&e.createElement("div",null,e.createElement("label",{htmlFor:"automatedDecisionMakingDetails",className:"block text-sm font-medium mb-1"},"Automated Decision-Making Details *"),e.createElement("textarea",{id:"automatedDecisionMakingDetails",value:a$2.automatedDecisionMakingDetails||"",onChange:t=>o("automatedDecisionMakingDetails",t.target.value||void 0),rows:2,className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Describe the automated decision-making process..."})))),e.createElement("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4"},e.createElement("legend",{className:"text-sm font-medium px-2"},"Review Schedule"),e.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4"},e.createElement("div",null,e.createElement("label",{htmlFor:"nextReviewDate",className:"block text-sm font-medium mb-1"},"Next Review Date"),e.createElement("input",{type:"date",id:"nextReviewDate",value:a$2.nextReviewDate?new Date(a$2.nextReviewDate).toISOString().slice(0,10):"",onChange:t=>o("nextReviewDate",t.target.value?new Date(t.target.value).getTime():void 0),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})))),e.createElement("div",{className:"flex justify-end space-x-3"},e.createElement("button",{onClick:z,className:"px-4 py-2 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-700 text-sm"},"Cancel"),e.createElement("button",{onClick:le,className:`px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 text-sm ${D}`},r?"Add Record":"Save Changes"))))},pe=()=>e.createElement("div",{className:"flex space-x-4 mb-6 border-b border-gray-200 dark:border-gray-600"},e.createElement("button",{onClick:()=>c$1("list"),className:`pb-2 text-sm font-medium ${m==="list"?"border-b-2 border-blue-500 text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"}`},"Processing Records"),e.createElement("button",{onClick:()=>c$1("summary"),className:`pb-2 text-sm font-medium ${m==="summary"?"border-b-2 border-blue-500 text-blue-600 dark:text-blue-400":"text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"}`},"Compliance Summary"));return e.createElement("div",{className:`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${R}`},e.createElement("h2",{className:"text-xl font-bold mb-2"},Y),e.createElement("p",{className:"mb-6 text-gray-600 dark:text-gray-300"},Z),me(),m!=="form"&&pe(),m==="list"&&ge(),m==="summary"&&ce(),m==="form"&&be())};export{he as a};//# sourceMappingURL=chunk-6SGG6WPA.mjs.map
2
+ //# sourceMappingURL=chunk-6SGG6WPA.mjs.map