@tantainnovative/ndpr-toolkit 3.4.1 → 3.5.1

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 (177) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/adapters.d.mts +34 -25
  3. package/dist/adapters.d.ts +34 -25
  4. package/dist/breach.d.mts +803 -44
  5. package/dist/breach.d.ts +803 -44
  6. package/dist/breach.js +1 -1
  7. package/dist/breach.mjs +1 -1
  8. package/dist/{chunk-ASLMPY54.js → chunk-3EGQWLJ6.js} +3 -3
  9. package/dist/chunk-B4Z5MBUC.mjs +2 -0
  10. package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
  11. package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
  12. package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
  13. package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
  14. package/dist/{chunk-MLOWRZXO.mjs → chunk-F5TXUA4O.mjs} +3 -3
  15. package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
  16. package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
  17. package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
  18. package/dist/{chunk-NFJ4CB63.mjs → chunk-ID2NYIVE.mjs} +3 -3
  19. package/dist/chunk-J5WCPZLW.js +2 -0
  20. package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
  21. package/dist/chunk-LU7PKE7Y.mjs +2 -0
  22. package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
  23. package/dist/{chunk-4BOEFDDE.js → chunk-ORFC66EA.js} +3 -3
  24. package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
  25. package/dist/chunk-SCWNM4PC.mjs +2 -0
  26. package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
  27. package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
  28. package/dist/chunk-TV4U6AIS.js +2 -0
  29. package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
  30. package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
  31. package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
  32. package/dist/consent.d.mts +648 -84
  33. package/dist/consent.d.ts +648 -84
  34. package/dist/consent.js +1 -1
  35. package/dist/consent.mjs +1 -1
  36. package/dist/core.d.mts +2049 -23
  37. package/dist/core.d.ts +2049 -23
  38. package/dist/core.js +1 -1
  39. package/dist/core.mjs +1 -1
  40. package/dist/cross-border.d.mts +470 -99
  41. package/dist/cross-border.d.ts +470 -99
  42. package/dist/dpia.d.mts +591 -37
  43. package/dist/dpia.d.ts +591 -37
  44. package/dist/dsr.d.mts +654 -37
  45. package/dist/dsr.d.ts +654 -37
  46. package/dist/dsr.js +1 -1
  47. package/dist/dsr.mjs +1 -1
  48. package/dist/hooks.d.mts +2174 -30
  49. package/dist/hooks.d.ts +2174 -30
  50. package/dist/hooks.js +1 -1
  51. package/dist/hooks.mjs +1 -1
  52. package/dist/index.d.mts +4428 -43
  53. package/dist/index.d.ts +4428 -43
  54. package/dist/index.js +1 -1
  55. package/dist/index.mjs +1 -1
  56. package/dist/lawful-basis.d.mts +368 -32
  57. package/dist/lawful-basis.d.ts +368 -32
  58. package/dist/policy.d.mts +1178 -83
  59. package/dist/policy.d.ts +1178 -83
  60. package/dist/policy.js +1 -1
  61. package/dist/policy.mjs +1 -1
  62. package/dist/presets.d.mts +1020 -114
  63. package/dist/presets.d.ts +1020 -114
  64. package/dist/presets.js +1 -1
  65. package/dist/presets.mjs +1 -1
  66. package/dist/ropa.d.mts +396 -31
  67. package/dist/ropa.d.ts +396 -31
  68. package/dist/ropa.js +1 -1
  69. package/dist/ropa.mjs +1 -1
  70. package/dist/server.d.mts +2133 -24
  71. package/dist/server.d.ts +2133 -24
  72. package/dist/server.js +1 -1
  73. package/dist/server.mjs +1 -1
  74. package/dist/unstyled.d.mts +523 -55
  75. package/dist/unstyled.d.ts +523 -55
  76. package/dist/unstyled.js +1 -1
  77. package/dist/unstyled.mjs +1 -1
  78. package/package.json +3 -3
  79. package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
  80. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
  81. package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
  82. package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
  83. package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
  84. package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
  85. package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
  86. package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
  87. package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
  88. package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
  89. package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
  90. package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
  91. package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
  92. package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
  93. package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
  94. package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
  95. package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
  96. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
  97. package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
  98. package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
  99. package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
  100. package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
  101. package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
  102. package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
  103. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
  104. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
  105. package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
  106. package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
  107. package/dist/breach-B_-6lDqS.d.mts +0 -17
  108. package/dist/breach-CzXqSsaY.d.ts +0 -17
  109. package/dist/breach-Eu9byel8.d.mts +0 -185
  110. package/dist/breach-Eu9byel8.d.ts +0 -185
  111. package/dist/chunk-2L7BSG7G.mjs +0 -2
  112. package/dist/chunk-5X32J5IA.mjs +0 -2
  113. package/dist/chunk-7D2OIPHH.mjs +0 -2
  114. package/dist/chunk-JKKRPS4P.js +0 -2
  115. package/dist/chunk-UHTJ6UFW.js +0 -2
  116. package/dist/compliance-score-racQe_E_.d.mts +0 -115
  117. package/dist/compliance-score-racQe_E_.d.ts +0 -115
  118. package/dist/consent-CmVzqZUk.d.mts +0 -99
  119. package/dist/consent-CmVzqZUk.d.ts +0 -99
  120. package/dist/consent-audit-BdByjYlM.d.mts +0 -65
  121. package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
  122. package/dist/cross-border-BBi9rZyO.d.mts +0 -54
  123. package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
  124. package/dist/cross-border-UyT00llA.d.mts +0 -141
  125. package/dist/cross-border-UyT00llA.d.ts +0 -141
  126. package/dist/docx-4n8g4zul.d.mts +0 -64
  127. package/dist/docx-VvcTLYZM.d.ts +0 -64
  128. package/dist/dpia-D82hUrJe.d.ts +0 -15
  129. package/dist/dpia-DQDFw2_l.d.mts +0 -15
  130. package/dist/dpia-c9GiiOq0.d.mts +0 -137
  131. package/dist/dpia-c9GiiOq0.d.ts +0 -137
  132. package/dist/dsr-CIx5sd7e.d.ts +0 -14
  133. package/dist/dsr-XZ_HqTlA.d.mts +0 -14
  134. package/dist/dsr-yKbqX531.d.mts +0 -128
  135. package/dist/dsr-yKbqX531.d.ts +0 -128
  136. package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
  137. package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
  138. package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
  139. package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
  140. package/dist/locale-CxJx2tzn.d.mts +0 -25
  141. package/dist/locale-DSkrtf-c.d.ts +0 -25
  142. package/dist/policy-engine-5qTfp2z4.d.mts +0 -174
  143. package/dist/policy-engine-DzPxskOK.d.ts +0 -174
  144. package/dist/policy-sections-9tCb7VU7.d.ts +0 -56
  145. package/dist/policy-sections-CBWcJv-R.d.mts +0 -56
  146. package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
  147. package/dist/policy-templates-DwYl2329.d.mts +0 -43
  148. package/dist/privacy-Ca6te9Ir.d.mts +0 -138
  149. package/dist/privacy-Ca6te9Ir.d.ts +0 -138
  150. package/dist/ropa-BDTM06tr.d.ts +0 -152
  151. package/dist/ropa-CFHuT7jE.d.mts +0 -152
  152. package/dist/ropa-CyynscU6.d.ts +0 -51
  153. package/dist/ropa-NIgxd8uP.d.mts +0 -51
  154. package/dist/sanitize-CxxwKxAx.d.mts +0 -94
  155. package/dist/sanitize-CxxwKxAx.d.ts +0 -94
  156. package/dist/styling-BMDGQDgS.d.mts +0 -64
  157. package/dist/styling-BaoQtV06.d.ts +0 -64
  158. package/dist/types-DK2CoKOC.d.mts +0 -10
  159. package/dist/types-DK2CoKOC.d.ts +0 -10
  160. package/dist/useAdaptivePolicyWizard-BSLyltzZ.d.mts +0 -52
  161. package/dist/useAdaptivePolicyWizard-CL7C7MTZ.d.ts +0 -52
  162. package/dist/useBreach-CPr86Yan.d.mts +0 -115
  163. package/dist/useBreach-DkVXvtJK.d.ts +0 -115
  164. package/dist/useConsent-DCNkIJHR.d.mts +0 -75
  165. package/dist/useConsent-dOcELSfX.d.ts +0 -75
  166. package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
  167. package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
  168. package/dist/useDPIA-B6180UQn.d.mts +0 -109
  169. package/dist/useDPIA-CTqbNbww.d.ts +0 -109
  170. package/dist/useDSR-WvHk8_iu.d.mts +0 -85
  171. package/dist/useDSR-wH4H6hSM.d.ts +0 -85
  172. package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
  173. package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
  174. package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
  175. package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
  176. package/dist/useROPA-BSSU1rfx.d.ts +0 -76
  177. package/dist/useROPA-C2hjaBTz.d.mts +0 -76
package/dist/presets.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- 'use strict';var chunkASLMPY54_js=require('./chunk-ASLMPY54.js'),chunkHGGLW5TE_js=require('./chunk-HGGLW5TE.js'),chunkLSNL4XR5_js=require('./chunk-LSNL4XR5.js'),chunkNQNFS3QI_js=require('./chunk-NQNFS3QI.js'),chunkP6QAFBCV_js=require('./chunk-P6QAFBCV.js');require('./chunk-4BOEFDDE.js'),require('./chunk-Z73T6MWY.js'),require('./chunk-YPKUHSK4.js');var chunkS4GRSNB4_js=require('./chunk-S4GRSNB4.js');require('./chunk-AHSMDPG5.js'),require('./chunk-TDDAYVKK.js'),require('./chunk-C4YM4UMI.js'),require('./chunk-GOU6FU6Y.js');var chunkSUEGUY35_js=require('./chunk-SUEGUY35.js'),chunkZPKVLTSX_js=require('./chunk-ZPKVLTSX.js'),chunk5HL4UBFV_js=require('./chunk-5HL4UBFV.js'),chunkWTJGLNTB_js=require('./chunk-WTJGLNTB.js');require('./chunk-I54CDQGN.js'),require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a})=>{let u=t!=null?t:[...q,...d];return jsxRuntime.jsx(chunkSUEGUY35_js.a,{options:u,onSave:f=>{p&&p.save(f),a==null||a(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkZPKVLTSX_js.a,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkWTJGLNTB_js.a,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsxRuntime.jsx(chunkASLMPY54_js.a,chunkMQFZHA2D_js.a({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{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_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=react.useState({}),[u,y]=react.useState(0),f=(i,T)=>{a(B=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsxRuntime.jsx(chunk5HL4UBFV_js.a,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkLSNL4XR5_js.a,{activities:s,onAddActivity:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkNQNFS3QI_js.a,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(d!=null?d:Z);react.useEffect(()=>{if(!t)return;let e=false;return chunkMQFZHA2D_js.d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkP6QAFBCV_js.a,{ropa:s,onAddRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=chunkMQFZHA2D_js.c(l,["input"]);let s=chunkS4GRSNB4_js.a(d);return jsxRuntime.jsx(chunkHGGLW5TE_js.a,chunkMQFZHA2D_js.a({report:s},t))};exports.NDPRBreachReport=U;exports.NDPRComplianceDashboard=re;exports.NDPRConsent=O;exports.NDPRCrossBorder=V;exports.NDPRDPIA=z;exports.NDPRLawfulBasis=H;exports.NDPRPrivacyPolicy=E;exports.NDPRROPA=ee;exports.NDPRSubjectRights=k;//# sourceMappingURL=presets.js.map
2
+ 'use strict';var chunk3EGQWLJ6_js=require('./chunk-3EGQWLJ6.js'),chunkHGGLW5TE_js=require('./chunk-HGGLW5TE.js'),chunkLSNL4XR5_js=require('./chunk-LSNL4XR5.js'),chunkNQNFS3QI_js=require('./chunk-NQNFS3QI.js'),chunkXNSZ7KUH_js=require('./chunk-XNSZ7KUH.js');require('./chunk-ORFC66EA.js'),require('./chunk-Z73T6MWY.js'),require('./chunk-YPKUHSK4.js');var chunkS4GRSNB4_js=require('./chunk-S4GRSNB4.js');require('./chunk-CPK5D5FY.js'),require('./chunk-TDDAYVKK.js'),require('./chunk-C4YM4UMI.js'),require('./chunk-GOU6FU6Y.js');var chunkXIM7KMD6_js=require('./chunk-XIM7KMD6.js'),chunkZPKVLTSX_js=require('./chunk-ZPKVLTSX.js'),chunk5HL4UBFV_js=require('./chunk-5HL4UBFV.js'),chunkWTJGLNTB_js=require('./chunk-WTJGLNTB.js');require('./chunk-I54CDQGN.js'),require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a})=>{let u=t!=null?t:[...q,...d];return jsxRuntime.jsx(chunkXIM7KMD6_js.a,{options:u,onSave:f=>{p&&p.save(f),a==null||a(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkZPKVLTSX_js.a,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkWTJGLNTB_js.a,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsxRuntime.jsx(chunk3EGQWLJ6_js.a,chunkMQFZHA2D_js.a({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{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_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=react.useState({}),[u,y]=react.useState(0),f=(i,T)=>{a(B=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsxRuntime.jsx(chunk5HL4UBFV_js.a,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkLSNL4XR5_js.a,{activities:s,onAddActivity:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkNQNFS3QI_js.a,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(d!=null?d:Z);react.useEffect(()=>{if(!t)return;let e=false;return chunkMQFZHA2D_js.d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkXNSZ7KUH_js.a,{ropa:s,onAddRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=chunkMQFZHA2D_js.c(l,["input"]);let s=chunkS4GRSNB4_js.a(d);return jsxRuntime.jsx(chunkHGGLW5TE_js.a,chunkMQFZHA2D_js.a({report:s},t))};exports.NDPRBreachReport=U;exports.NDPRComplianceDashboard=re;exports.NDPRConsent=O;exports.NDPRCrossBorder=V;exports.NDPRDPIA=z;exports.NDPRLawfulBasis=H;exports.NDPRPrivacyPolicy=E;exports.NDPRROPA=ee;exports.NDPRSubjectRights=k;//# sourceMappingURL=presets.js.map
3
3
  //# sourceMappingURL=presets.js.map
package/dist/presets.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import {a as a$3}from'./chunk-NFJ4CB63.mjs';import {a as a$a}from'./chunk-RRVKUCFR.mjs';import {a as a$6}from'./chunk-CISJAQ6W.mjs';import {a as a$7}from'./chunk-SYMQJO2W.mjs';import {a as a$8}from'./chunk-VTITKWGX.mjs';import'./chunk-MLOWRZXO.mjs';import'./chunk-JFFOPHU3.mjs';import'./chunk-I557S566.mjs';import {a as a$9}from'./chunk-ABDB7LEV.mjs';import'./chunk-ZLSWOFAY.mjs';import'./chunk-TXBZPCGF.mjs';import'./chunk-75TJPK2N.mjs';import'./chunk-SHMJNRHO.mjs';import {a}from'./chunk-BN77GP4W.mjs';import {a as a$1}from'./chunk-6HZL2WDU.mjs';import {a as a$5}from'./chunk-LJNNPAFU.mjs';import {a as a$2}from'./chunk-KF3EFJEF.mjs';import'./chunk-GKKAK6ES.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {a as a$4,b,d,c}from'./chunk-WWT2ZSNU.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a$1})=>{let u=t!=null?t:[...q,...d];return jsx(a,{options:u,onSave:f=>{p&&p.save(f),a$1==null||a$1(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$1,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$2,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsx(a$3,a$4({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{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_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=useState({}),[u,y]=useState(0),f=(i,T)=>{a(B=>b(a$4({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsx(a$5,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$6,{activities:s,onAddActivity:e=>{let r=Date.now(),o=b(a$4({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?b(a$4({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$7,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=b(a$4({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d$1,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(d$1!=null?d$1:Z);useEffect(()=>{if(!t)return;let e=false;return d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsx(a$8,{ropa:s,onAddRecord:e=>{let r=b(a$4({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=b(a$4({},s),{records:s.records.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=b(a$4({},s),{records:s.records.map(o=>o.id===e?b(a$4({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=c(l,["input"]);let s=a$9(d);return jsx(a$a,a$4({report:s},t))};export{U as NDPRBreachReport,re as NDPRComplianceDashboard,O as NDPRConsent,V as NDPRCrossBorder,z as NDPRDPIA,H as NDPRLawfulBasis,E as NDPRPrivacyPolicy,ee as NDPRROPA,k as NDPRSubjectRights};//# sourceMappingURL=presets.mjs.map
2
+ import {a as a$3}from'./chunk-ID2NYIVE.mjs';import {a as a$a}from'./chunk-RRVKUCFR.mjs';import {a as a$6}from'./chunk-CISJAQ6W.mjs';import {a as a$7}from'./chunk-SYMQJO2W.mjs';import {a as a$8}from'./chunk-QSVVAZVT.mjs';import'./chunk-F5TXUA4O.mjs';import'./chunk-JFFOPHU3.mjs';import'./chunk-I557S566.mjs';import {a as a$9}from'./chunk-ABDB7LEV.mjs';import'./chunk-GRLIPT5V.mjs';import'./chunk-TXBZPCGF.mjs';import'./chunk-75TJPK2N.mjs';import'./chunk-SHMJNRHO.mjs';import {a}from'./chunk-GN5C32JB.mjs';import {a as a$1}from'./chunk-6HZL2WDU.mjs';import {a as a$5}from'./chunk-LJNNPAFU.mjs';import {a as a$2}from'./chunk-KF3EFJEF.mjs';import'./chunk-GKKAK6ES.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {a as a$4,b,d,c}from'./chunk-WWT2ZSNU.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a$1})=>{let u=t!=null?t:[...q,...d];return jsx(a,{options:u,onSave:f=>{p&&p.save(f),a$1==null||a$1(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$1,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$2,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsx(a$3,a$4({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{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_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=useState({}),[u,y]=useState(0),f=(i,T)=>{a(B=>b(a$4({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsx(a$5,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$6,{activities:s,onAddActivity:e=>{let r=Date.now(),o=b(a$4({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?b(a$4({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$7,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=b(a$4({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d$1,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(d$1!=null?d$1:Z);useEffect(()=>{if(!t)return;let e=false;return d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsx(a$8,{ropa:s,onAddRecord:e=>{let r=b(a$4({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=b(a$4({},s),{records:s.records.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=b(a$4({},s),{records:s.records.map(o=>o.id===e?b(a$4({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=c(l,["input"]);let s=a$9(d);return jsx(a$a,a$4({report:s},t))};export{U as NDPRBreachReport,re as NDPRComplianceDashboard,O as NDPRConsent,V as NDPRCrossBorder,z as NDPRDPIA,H as NDPRLawfulBasis,E as NDPRPrivacyPolicy,ee as NDPRROPA,k as NDPRSubjectRights};//# sourceMappingURL=presets.mjs.map
3
3
  //# sourceMappingURL=presets.mjs.map
package/dist/ropa.d.mts CHANGED
@@ -1,31 +1,396 @@
1
- import { b as ROPAManagerProps } from './ROPAManager-BS4eB8Hw.mjs';
2
- export { R as ROPAManager } from './ROPAManager-BS4eB8Hw.mjs';
3
- import { a as UseROPAReturn } from './useROPA-C2hjaBTz.mjs';
4
- export { U as UseROPAOptions, u as useROPA } from './useROPA-C2hjaBTz.mjs';
5
- export { R as ROPAComplianceGap, a as ROPAValidationResult, e as exportROPAToCSV, g as generateROPASummary, i as identifyComplianceGaps, v as validateProcessingRecord } from './ropa-NIgxd8uP.mjs';
6
- import { a as RecordOfProcessingActivities, P as ProcessingRecord } from './ropa-CFHuT7jE.mjs';
7
- export { R as ROPASummary } from './ropa-CFHuT7jE.mjs';
8
- import * as React from 'react';
9
- import React__default from 'react';
10
- import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
11
- import './lawful-basis-Cv1VmDLn.mjs';
12
-
13
- interface ROPAProviderProps {
14
- initialData: RecordOfProcessingActivities;
15
- adapter?: StorageAdapter<RecordOfProcessingActivities>;
16
- onRecordAdd?: (record: ProcessingRecord) => void;
17
- onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
18
- onRecordArchive?: (id: string) => void;
19
- children: React__default.ReactNode;
20
- }
21
- declare const ROPAProvider: React__default.FC<ROPAProviderProps>;
22
-
23
- declare const ROPA: {
24
- Provider: React.FC<ROPAProviderProps>;
25
- Manager: React.FC<ROPAManagerProps>;
26
- };
27
-
28
- type ROPAContextValue = UseROPAReturn;
29
- declare function useROPACompound(): ROPAContextValue;
30
-
31
- export { ProcessingRecord, ROPA, ROPAProvider, type ROPAProviderProps, RecordOfProcessingActivities, StorageAdapter, UseROPAReturn, useROPACompound };
1
+ import * as React_2 from 'react';
2
+ import React__default from 'react';
3
+
4
+ /**
5
+ * Exports the Record of Processing Activities to a CSV string.
6
+ * The CSV includes all key fields from each processing record.
7
+ *
8
+ * @param ropa - The full Record of Processing Activities
9
+ * @returns CSV-formatted string
10
+ */
11
+ export declare function exportROPAToCSV(ropa: RecordOfProcessingActivities): string;
12
+
13
+ /**
14
+ * Generates a summary of the Record of Processing Activities.
15
+ * Provides statistics and identifies records that are due for review.
16
+ *
17
+ * @param ropa - The full Record of Processing Activities
18
+ * @returns Summary statistics for the ROPA
19
+ */
20
+ export declare function generateROPASummary(ropa: RecordOfProcessingActivities): ROPASummary;
21
+
22
+ /**
23
+ * Identifies compliance gaps in the Record of Processing Activities.
24
+ * Finds records that are missing required information per NDPA 2023.
25
+ *
26
+ * @param ropa - The full Record of Processing Activities
27
+ * @returns Array of compliance gaps grouped by record
28
+ */
29
+ export declare function identifyComplianceGaps(ropa: RecordOfProcessingActivities): ROPAComplianceGap[];
30
+
31
+ /**
32
+ * Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
33
+ * Every processing activity must have a documented lawful basis
34
+ */
35
+ /**
36
+ * The six lawful bases for processing personal data per NDPA Section 25(1)
37
+ */
38
+ declare type LawfulBasis = 'consent' | 'contract' | 'legal_obligation' | 'vital_interests' | 'public_interest' | 'legitimate_interests';
39
+
40
+ /**
41
+ * Record of Processing Activities (ROPA) types aligned with NDPA 2023
42
+ * Data controllers must maintain comprehensive records of all processing activities
43
+ */
44
+
45
+ /**
46
+ * Represents a single processing record in the ROPA
47
+ */
48
+ export declare interface ProcessingRecord {
49
+ /** Unique identifier */
50
+ id: string;
51
+ /** Name of the processing activity */
52
+ name: string;
53
+ /** Detailed description of the processing */
54
+ description: string;
55
+ /** Data controller details */
56
+ controllerDetails: {
57
+ name: string;
58
+ contact: string;
59
+ address: string;
60
+ registrationNumber?: string;
61
+ dpoContact?: string;
62
+ };
63
+ /** Joint controller details (if applicable) */
64
+ jointControllerDetails?: {
65
+ name: string;
66
+ contact: string;
67
+ address: string;
68
+ responsibilities: string;
69
+ };
70
+ /** Data processor details (if processing is outsourced) */
71
+ processorDetails?: {
72
+ name: string;
73
+ contact: string;
74
+ address: string;
75
+ contractReference?: string;
76
+ };
77
+ /** Lawful basis for the processing */
78
+ lawfulBasis: LawfulBasis;
79
+ /** Justification for the chosen lawful basis */
80
+ lawfulBasisJustification: string;
81
+ /** Purposes of the processing */
82
+ purposes: string[];
83
+ /** Categories of personal data processed */
84
+ dataCategories: string[];
85
+ /** Categories of sensitive personal data (if any) */
86
+ sensitiveDataCategories?: string[];
87
+ /** Categories of data subjects */
88
+ dataSubjectCategories: string[];
89
+ /** Recipients or categories of recipients */
90
+ recipients: string[];
91
+ /** Cross-border transfer details */
92
+ crossBorderTransfers?: Array<{
93
+ destinationCountry: string;
94
+ countryCode?: string;
95
+ safeguards: string;
96
+ transferMechanism: string;
97
+ }>;
98
+ /** Data retention period */
99
+ retentionPeriod: string;
100
+ /** Justification for the retention period */
101
+ retentionJustification?: string;
102
+ /** Technical and organizational security measures */
103
+ securityMeasures: string[];
104
+ /** Data source (directly from data subject or from third party) */
105
+ dataSource: 'data_subject' | 'third_party' | 'public_source' | 'other';
106
+ /** Third-party source details (if dataSource is 'third_party') */
107
+ thirdPartySourceDetails?: string;
108
+ /** Whether a DPIA is required for this processing */
109
+ dpiaRequired: boolean;
110
+ /** Reference to the DPIA (if conducted) */
111
+ dpiaReference?: string;
112
+ /** Whether automated decision-making is involved */
113
+ automatedDecisionMaking: boolean;
114
+ /** Details of automated decision-making (if applicable) */
115
+ automatedDecisionMakingDetails?: string;
116
+ /** Status of the processing record */
117
+ status: 'active' | 'inactive' | 'archived';
118
+ /** Department or business unit responsible */
119
+ department?: string;
120
+ /** System or application used for processing */
121
+ systemsUsed?: string[];
122
+ /** Timestamp when the record was created */
123
+ createdAt: number;
124
+ /** Timestamp when the record was last updated */
125
+ updatedAt: number;
126
+ /** Timestamp when the record was last reviewed */
127
+ lastReviewedAt?: number;
128
+ /** Next review date */
129
+ nextReviewDate?: number;
130
+ }
131
+
132
+ /**
133
+ * Represents a complete Record of Processing Activities
134
+ */
135
+ export declare interface RecordOfProcessingActivities {
136
+ /** Unique identifier */
137
+ id: string;
138
+ /** Organization name */
139
+ organizationName: string;
140
+ /** Organization contact information */
141
+ organizationContact: string;
142
+ /** Organization address */
143
+ organizationAddress: string;
144
+ /** Data Protection Officer details */
145
+ dpoDetails?: {
146
+ name: string;
147
+ email: string;
148
+ phone?: string;
149
+ };
150
+ /** NDPC registration number */
151
+ ndpcRegistrationNumber?: string;
152
+ /** All processing records */
153
+ records: ProcessingRecord[];
154
+ /** Timestamp when the ROPA was last updated */
155
+ lastUpdated: number;
156
+ /** Version of the ROPA */
157
+ version: string;
158
+ /** Export format options */
159
+ exportFormats?: ('pdf' | 'csv' | 'json' | 'xlsx')[];
160
+ }
161
+
162
+ export declare const ROPA: {
163
+ Provider: React_2.FC<ROPAProviderProps>;
164
+ Manager: React_2.FC<ROPAManagerProps>;
165
+ };
166
+
167
+ /**
168
+ * Compliance gap found in a processing record
169
+ */
170
+ export declare interface ROPAComplianceGap {
171
+ recordId: string;
172
+ recordName: string;
173
+ gaps: string[];
174
+ }
175
+
176
+ declare type ROPAContextValue = UseROPAReturn;
177
+
178
+ /**
179
+ * Record of Processing Activities (ROPA) management component. Implements the NDPA
180
+ * accountability principle, requiring organizations to maintain comprehensive records
181
+ * of all personal data processing activities.
182
+ */
183
+ export declare const ROPAManager: React__default.FC<ROPAManagerProps>;
184
+
185
+ declare interface ROPAManagerClassNames {
186
+ root?: string;
187
+ header?: string;
188
+ title?: string;
189
+ orgInfo?: string;
190
+ summary?: string;
191
+ summaryCard?: string;
192
+ table?: string;
193
+ tableHeader?: string;
194
+ tableRow?: string;
195
+ form?: string;
196
+ input?: string;
197
+ select?: string;
198
+ submitButton?: string;
199
+ /** Alias for submitButton */
200
+ primaryButton?: string;
201
+ statusBadge?: string;
202
+ exportButton?: string;
203
+ /** Alias for exportButton */
204
+ secondaryButton?: string;
205
+ complianceGap?: string;
206
+ }
207
+
208
+ declare interface ROPAManagerProps {
209
+ /**
210
+ * The full Record of Processing Activities
211
+ */
212
+ ropa: RecordOfProcessingActivities;
213
+ /**
214
+ * Callback when a new record is added
215
+ */
216
+ onAddRecord?: (record: ProcessingRecord) => void;
217
+ /**
218
+ * Callback when a record is updated
219
+ */
220
+ onUpdateRecord?: (id: string, updates: Partial<ProcessingRecord>) => void;
221
+ /**
222
+ * Callback when a record is archived
223
+ */
224
+ onArchiveRecord?: (id: string) => void;
225
+ /**
226
+ * Title displayed on the manager
227
+ * @default "Record of Processing Activities (ROPA)"
228
+ */
229
+ title?: string;
230
+ /**
231
+ * Description text
232
+ * @default "Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle."
233
+ */
234
+ description?: string;
235
+ /**
236
+ * Custom CSS class
237
+ */
238
+ className?: string;
239
+ /**
240
+ * Custom CSS class for buttons
241
+ */
242
+ buttonClassName?: string;
243
+ /**
244
+ * Override class names for individual sections of the component.
245
+ * Takes priority over className / buttonClassName.
246
+ */
247
+ classNames?: ROPAManagerClassNames;
248
+ /**
249
+ * When true, all default styling is removed so consumers
250
+ * can style from scratch using classNames.
251
+ */
252
+ unstyled?: boolean;
253
+ }
254
+
255
+ export declare const ROPAProvider: React__default.FC<ROPAProviderProps>;
256
+
257
+ export declare interface ROPAProviderProps {
258
+ initialData: RecordOfProcessingActivities;
259
+ adapter?: StorageAdapter<RecordOfProcessingActivities>;
260
+ onRecordAdd?: (record: ProcessingRecord) => void;
261
+ onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
262
+ onRecordArchive?: (id: string) => void;
263
+ children: React__default.ReactNode;
264
+ }
265
+
266
+ /**
267
+ * Summary statistics for the ROPA
268
+ */
269
+ export declare interface ROPASummary {
270
+ /** Total number of processing records */
271
+ totalRecords: number;
272
+ /** Active processing records */
273
+ activeRecords: number;
274
+ /** Records by lawful basis */
275
+ byLawfulBasis: Record<LawfulBasis, number>;
276
+ /** Records involving sensitive data */
277
+ sensitiveDataRecords: number;
278
+ /** Records involving cross-border transfers */
279
+ crossBorderRecords: number;
280
+ /** Records requiring DPIA */
281
+ dpiaRequiredRecords: number;
282
+ /** Records involving automated decision-making */
283
+ automatedDecisionRecords: number;
284
+ /** Records due for review */
285
+ recordsDueForReview: ProcessingRecord[];
286
+ /** Departments with most processing activities */
287
+ topDepartments: Array<{
288
+ department: string;
289
+ count: number;
290
+ }>;
291
+ /** Last updated timestamp */
292
+ lastUpdated: number;
293
+ }
294
+
295
+ /**
296
+ * Validation result for a processing record
297
+ */
298
+ export declare interface ROPAValidationResult {
299
+ valid: boolean;
300
+ errors: string[];
301
+ }
302
+
303
+ export declare interface StorageAdapter<T = unknown> {
304
+ /** Load persisted data. Called once on hook mount. */
305
+ load(): T | null | Promise<T | null>;
306
+ /** Persist data. Called on every state change. */
307
+ save(data: T): void | Promise<void>;
308
+ /** Clear persisted data. Called on reset. */
309
+ remove(): void | Promise<void>;
310
+ }
311
+
312
+ /**
313
+ * Hook for managing a Record of Processing Activities (ROPA)
314
+ * in compliance with NDPA 2023 requirements.
315
+ *
316
+ * Provides state management and utility functions for maintaining
317
+ * a comprehensive register of all data processing activities.
318
+ */
319
+ export declare function useROPA({ initialData, adapter, onRecordAdd, onRecordUpdate, onRecordArchive, }: UseROPAOptions): UseROPAReturn;
320
+
321
+ export declare function useROPACompound(): ROPAContextValue;
322
+
323
+ export declare interface UseROPAOptions {
324
+ /**
325
+ * Initial ROPA state
326
+ */
327
+ initialData: RecordOfProcessingActivities;
328
+ /**
329
+ * Pluggable storage adapter. When provided, adapter data is loaded on mount
330
+ * and the ROPA is persisted after every mutation. Falls back to initialData
331
+ * when no adapter data is found.
332
+ */
333
+ adapter?: StorageAdapter<RecordOfProcessingActivities>;
334
+ /**
335
+ * Callback when a record is added
336
+ */
337
+ onRecordAdd?: (record: ProcessingRecord) => void;
338
+ /**
339
+ * Callback when a record is updated
340
+ */
341
+ onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
342
+ /**
343
+ * Callback when a record is archived
344
+ */
345
+ onRecordArchive?: (id: string) => void;
346
+ }
347
+
348
+ export declare interface UseROPAReturn {
349
+ /**
350
+ * Current state of the Record of Processing Activities
351
+ */
352
+ ropa: RecordOfProcessingActivities;
353
+ /**
354
+ * Add a new processing record
355
+ */
356
+ addRecord: (record: ProcessingRecord) => void;
357
+ /**
358
+ * Update an existing processing record
359
+ */
360
+ updateRecord: (id: string, updates: Partial<ProcessingRecord>) => void;
361
+ /**
362
+ * Archive a processing record by setting its status to 'archived'
363
+ */
364
+ archiveRecord: (id: string) => void;
365
+ /**
366
+ * Get a single processing record by ID
367
+ */
368
+ getRecord: (id: string) => ProcessingRecord | undefined;
369
+ /**
370
+ * Get a summary of the ROPA including statistics
371
+ */
372
+ getSummary: () => ROPASummary;
373
+ /**
374
+ * Export the ROPA as a CSV string
375
+ */
376
+ exportCSV: () => string;
377
+ /**
378
+ * Identify compliance gaps across all records
379
+ */
380
+ getComplianceGaps: () => ROPAComplianceGap[];
381
+ /**
382
+ * Whether the adapter is still loading data (relevant for async adapters)
383
+ */
384
+ isLoading: boolean;
385
+ }
386
+
387
+ /**
388
+ * Validates a processing record to ensure all required fields are present
389
+ * and properly filled per NDPA 2023 requirements.
390
+ *
391
+ * @param record - The processing record to validate
392
+ * @returns Validation result with any errors found
393
+ */
394
+ export declare function validateProcessingRecord(record: ProcessingRecord): ROPAValidationResult;
395
+
396
+ export { }