@tantainnovative/ndpr-toolkit 3.11.0 → 3.13.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 (141) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/dist/breach.d.mts +7 -1
  3. package/dist/breach.d.ts +7 -1
  4. package/dist/breach.js +1 -1
  5. package/dist/breach.mjs +1 -1
  6. package/dist/chunk-37VFK5SR.js +6 -0
  7. package/dist/chunk-3E4IH7CE.js +1 -0
  8. package/dist/chunk-3H6FYU3Z.mjs +93 -0
  9. package/dist/chunk-3I6FYA5C.js +103 -0
  10. package/dist/chunk-3SIYRGJF.js +93 -0
  11. package/dist/chunk-3XU6FL2I.js +1 -0
  12. package/dist/chunk-42JPSNVV.mjs +6 -0
  13. package/dist/chunk-42UJFTII.js +1 -0
  14. package/dist/chunk-737EMUUC.mjs +1 -0
  15. package/dist/chunk-7FXNGGMO.js +1 -0
  16. package/dist/chunk-B2EXRSYG.mjs +1 -0
  17. package/dist/chunk-BGV2AKT7.mjs +1 -0
  18. package/dist/chunk-BL5W472Q.js +1 -0
  19. package/dist/chunk-BPMVJOHH.mjs +1 -0
  20. package/dist/chunk-ELK6VFKC.mjs +2 -0
  21. package/dist/chunk-F5MGMNQF.js +2 -0
  22. package/dist/chunk-FRQFU44F.mjs +1 -0
  23. package/dist/{chunk-WYH3OA5L.mjs → chunk-I2ZBMR7F.mjs} +1 -1
  24. package/dist/chunk-J7BIJ45O.mjs +103 -0
  25. package/dist/{chunk-US2VGJ7I.js → chunk-KH3EQJQE.js} +1 -1
  26. package/dist/{chunk-IPWX5I5P.mjs → chunk-L3FR4PQE.mjs} +1 -1
  27. package/dist/chunk-N72RNTGP.mjs +6 -0
  28. package/dist/chunk-NB6SKG76.mjs +1 -0
  29. package/dist/chunk-NUIRMJKQ.mjs +2 -0
  30. package/dist/chunk-O2WEABB3.js +1 -0
  31. package/dist/chunk-PXDSPF5B.js +2 -0
  32. package/dist/chunk-QGUOFGVJ.js +2 -0
  33. package/dist/chunk-RBKFNCGO.mjs +1 -0
  34. package/dist/chunk-TTMGFC6C.js +1 -0
  35. package/dist/{chunk-TWJHEIQH.js → chunk-UZNWXJ2W.js} +1 -1
  36. package/dist/chunk-V5TZJJWU.mjs +1 -0
  37. package/dist/chunk-WCTFED27.js +1 -0
  38. package/dist/chunk-WHQ4PEYS.mjs +2 -0
  39. package/dist/chunk-WKUC65HL.mjs +1 -0
  40. package/dist/chunk-WMISQDSV.js +1 -0
  41. package/dist/{chunk-MTSZ7GL6.mjs → chunk-WVHMY2BV.mjs} +1 -1
  42. package/dist/chunk-XYGGUGTO.js +6 -0
  43. package/dist/chunk-YDKWD6MQ.js +1 -0
  44. package/dist/chunk-Z2M5VJX2.mjs +1 -0
  45. package/dist/{chunk-D3DVVJCT.js → chunk-ZD2W3YU2.js} +1 -1
  46. package/dist/chunk-ZM5DLFCZ.js +1 -0
  47. package/dist/chunk-ZQHGIOYP.mjs +1 -0
  48. package/dist/consent.js +1 -1
  49. package/dist/consent.mjs +1 -1
  50. package/dist/core.d.mts +62 -0
  51. package/dist/core.d.ts +62 -0
  52. package/dist/core.js +1 -1
  53. package/dist/core.mjs +1 -1
  54. package/dist/cross-border-lite.js +1 -1
  55. package/dist/cross-border-lite.mjs +1 -1
  56. package/dist/cross-border.js +1 -1
  57. package/dist/cross-border.mjs +1 -1
  58. package/dist/dpia.js +1 -1
  59. package/dist/dpia.mjs +1 -1
  60. package/dist/dsr.js +1 -1
  61. package/dist/dsr.mjs +1 -1
  62. package/dist/headless.d.mts +24 -3
  63. package/dist/headless.d.ts +24 -3
  64. package/dist/headless.js +1 -1
  65. package/dist/headless.mjs +1 -1
  66. package/dist/hooks.d.mts +24 -3
  67. package/dist/hooks.d.ts +24 -3
  68. package/dist/hooks.js +1 -1
  69. package/dist/hooks.mjs +1 -1
  70. package/dist/index.d.mts +93 -4
  71. package/dist/index.d.ts +93 -4
  72. package/dist/index.js +1 -1
  73. package/dist/index.mjs +1 -1
  74. package/dist/lawful-basis-lite.js +1 -1
  75. package/dist/lawful-basis-lite.mjs +1 -1
  76. package/dist/lawful-basis.js +1 -1
  77. package/dist/lawful-basis.mjs +1 -1
  78. package/dist/policy.js +1 -1
  79. package/dist/policy.mjs +1 -1
  80. package/dist/presets-consent.js +1 -1
  81. package/dist/presets-consent.mjs +1 -1
  82. package/dist/presets-dsr.js +1 -1
  83. package/dist/presets-dsr.mjs +1 -1
  84. package/dist/presets-policy.d.mts +23 -0
  85. package/dist/presets-policy.d.ts +23 -0
  86. package/dist/presets-policy.js +1 -1
  87. package/dist/presets-policy.mjs +1 -1
  88. package/dist/presets.d.mts +230 -1
  89. package/dist/presets.d.ts +230 -1
  90. package/dist/presets.js +1 -1
  91. package/dist/presets.mjs +1 -1
  92. package/dist/ropa-lite.js +1 -1
  93. package/dist/ropa-lite.mjs +1 -1
  94. package/dist/ropa.d.mts +24 -3
  95. package/dist/ropa.d.ts +24 -3
  96. package/dist/ropa.js +1 -1
  97. package/dist/ropa.mjs +1 -1
  98. package/dist/server.d.mts +62 -0
  99. package/dist/server.d.ts +62 -0
  100. package/dist/server.js +1 -1
  101. package/dist/server.mjs +1 -1
  102. package/dist/styles.css +2 -0
  103. package/dist/unstyled.js +1 -1
  104. package/dist/unstyled.mjs +1 -1
  105. package/package.json +1 -1
  106. package/dist/chunk-25TNTLHJ.mjs +0 -1
  107. package/dist/chunk-3JPDTXGC.js +0 -1
  108. package/dist/chunk-43OQNS2J.mjs +0 -6
  109. package/dist/chunk-5AECGMEB.js +0 -1
  110. package/dist/chunk-5EKQX6GM.mjs +0 -1
  111. package/dist/chunk-5GVMKUMP.js +0 -1
  112. package/dist/chunk-6GM2PBTF.js +0 -2
  113. package/dist/chunk-73BMSK67.js +0 -1
  114. package/dist/chunk-COD3RMTL.mjs +0 -1
  115. package/dist/chunk-EKNWO4DK.js +0 -1
  116. package/dist/chunk-EXEXUAF6.mjs +0 -1
  117. package/dist/chunk-EZCGTHQV.js +0 -6
  118. package/dist/chunk-FMJ6ICLJ.js +0 -1
  119. package/dist/chunk-G7JKRYM5.mjs +0 -1
  120. package/dist/chunk-GEP52QFH.mjs +0 -1
  121. package/dist/chunk-IB3KSUPZ.mjs +0 -1
  122. package/dist/chunk-JWAN5J4Y.js +0 -1
  123. package/dist/chunk-KY6WYHWB.mjs +0 -2
  124. package/dist/chunk-NDKDKDDX.js +0 -1
  125. package/dist/chunk-O2RDZGM2.js +0 -2
  126. package/dist/chunk-O45PKBZA.mjs +0 -6
  127. package/dist/chunk-OLEUIYE2.mjs +0 -1
  128. package/dist/chunk-PGI2LM6P.js +0 -103
  129. package/dist/chunk-PZRQWPWD.js +0 -1
  130. package/dist/chunk-Q4CSVWSS.mjs +0 -1
  131. package/dist/chunk-QMAVEHOR.js +0 -1
  132. package/dist/chunk-RBMLGRDN.mjs +0 -1
  133. package/dist/chunk-RPXRPGHL.mjs +0 -1
  134. package/dist/chunk-SSH4U4TJ.js +0 -6
  135. package/dist/chunk-TDHH7GS2.mjs +0 -2
  136. package/dist/chunk-WDDCKYWA.js +0 -1
  137. package/dist/chunk-WKTKTLMF.js +0 -1
  138. package/dist/chunk-X3GCGC3H.mjs +0 -103
  139. package/dist/chunk-XN2UYZXH.mjs +0 -93
  140. package/dist/chunk-YWCBI7SI.js +0 -93
  141. package/dist/chunk-ZQZJNKVB.mjs +0 -1
package/dist/presets.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkEKNWO4DK_js=require('./chunk-EKNWO4DK.js'),chunkUS2VGJ7I_js=require('./chunk-US2VGJ7I.js'),chunkJWAN5J4Y_js=require('./chunk-JWAN5J4Y.js');require('./chunk-6GM2PBTF.js');var chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkO2RDZGM2_js=require('./chunk-O2RDZGM2.js'),chunkPZRQWPWD_js=require('./chunk-PZRQWPWD.js'),chunkSSH4U4TJ_js=require('./chunk-SSH4U4TJ.js'),chunk5GVMKUMP_js=require('./chunk-5GVMKUMP.js');require('./chunk-NUOHT3LO.js'),require('./chunk-QHW4UKGJ.js'),require('./chunk-JS7SYL5P.js');var chunkRDALAH3Y_js=require('./chunk-RDALAH3Y.js');require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js'),require('./chunk-D3DVVJCT.js'),require('./chunk-L2VO3MEJ.js'),require('./chunk-TWJHEIQH.js'),require('./chunk-UXUMYP4L.js'),require('./chunk-NDKDKDDX.js'),require('./chunk-WKTKTLMF.js');var chunkWDDCKYWA_js=require('./chunk-WDDCKYWA.js');require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var L=[{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"}],I=({categories:c=L,adapter:r,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsxRuntime.jsx(chunkO2RDZGM2_js.a,{categories:c,onSubmit:d=>{r&&r.save(d),o(d);},classNames:u,unstyled:p});var k=[{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"}]}]}],_=({sections:c=k,adapter:r,classNames:u,unstyled:p,onComplete:o=()=>{}})=>{let[n,d]=react.useState({}),[m,P]=react.useState(0),h=(a,C)=>{d(S=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},S),{[a]:C}));},e=()=>{m<c.length-1?P(a=>a+1):(r&&r.save(n),o(n));},t=()=>{m>0&&P(a=>a-1);},s=Math.round((m+1)/c.length*100);return jsxRuntime.jsx(chunkWDDCKYWA_js.a,{sections:c,answers:n,onAnswerChange:h,currentSectionIndex:m,onNextSection:e,onPrevSection:t,progress:s,classNames:u,unstyled:p})};var M=({initialActivities:c=[],adapter:r,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(r){let e=r.load();if(e&&!(e instanceof Promise))return e}return c});react.useEffect(()=>{if(!r)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let t=yield r.load();!e&&t&&n(t);}catch(t){}}),()=>{e=true;}},[r]);let d=e=>{r&&r.save(e);};return jsxRuntime.jsx(chunkPZRQWPWD_js.a,{activities:o,onAddActivity:e=>{let t=Date.now(),s=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,s];n(a),d(a);},onUpdateActivity:(e,t)=>{let s=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(s),d(s);},onArchiveActivity:e=>{let t=o.map(s=>s.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},s),{status:"inactive",updatedAt:Date.now()}):s);n(t),d(t);},classNames:u,unstyled:p})};var z=({initialTransfers:c=[],adapter:r,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(r){let e=r.load();if(e&&!(e instanceof Promise))return e}return c});react.useEffect(()=>{if(!r)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let t=yield r.load();!e&&t&&n(t);}catch(t){}}),()=>{e=true;}},[r]);let d=e=>{r&&r.save(e);};return jsxRuntime.jsx(chunkSSH4U4TJ_js.a,{transfers:o,onAddTransfer:e=>{let t=Date.now(),s=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,s];n(a),d(a);},onUpdateTransfer:(e,t)=>{let s=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(s),d(s);},onRemoveTransfer:e=>{let t=o.filter(s=>s.id!==e);n(t),d(t);},classNames:u,unstyled:p})};var $={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},G=({initialData:c,adapter:r,classNames:u,unstyled:p})=>{let[o,n]=react.useState(c!=null?c:$);react.useEffect(()=>{if(!r)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){let s=yield r.load();!e&&s&&n(s);}),()=>{e=true;}},[r]);let d=e=>{r&&r.save(e);};return jsxRuntime.jsx(chunk5GVMKUMP_js.a,{ropa:o,onAddRecord:e=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:[...o.records,e],lastUpdated:Date.now()});n(t),d(t);},onUpdateRecord:(e,t)=>{let s=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:o.records.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a),lastUpdated:Date.now()});n(s),d(s);},onArchiveRecord:e=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:o.records.map(s=>s.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},s),{status:"archived",updatedAt:Date.now()}):s),lastUpdated:Date.now()});n(t),d(t);},classNames:u,unstyled:p})};var J=u=>{var p=u,{input:c}=p,r=chunkRFPLZDIO_js.c(p,["input"]);let o=chunkRDALAH3Y_js.a(c);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:o},r))};Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunkEKNWO4DK_js.a}});Object.defineProperty(exports,"NDPRSubjectRights",{enumerable:true,get:function(){return chunkUS2VGJ7I_js.a}});Object.defineProperty(exports,"NDPRPrivacyPolicy",{enumerable:true,get:function(){return chunkJWAN5J4Y_js.a}});exports.NDPRBreachReport=I;exports.NDPRComplianceDashboard=J;exports.NDPRCrossBorder=z;exports.NDPRDPIA=_;exports.NDPRLawfulBasis=M;exports.NDPRROPA=G;
2
+ 'use strict';var chunkZM5DLFCZ_js=require('./chunk-ZM5DLFCZ.js'),chunkKH3EQJQE_js=require('./chunk-KH3EQJQE.js'),chunk3E4IH7CE_js=require('./chunk-3E4IH7CE.js');require('./chunk-F5MGMNQF.js');var chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkQGUOFGVJ_js=require('./chunk-QGUOFGVJ.js'),chunk7FXNGGMO_js=require('./chunk-7FXNGGMO.js'),chunkXYGGUGTO_js=require('./chunk-XYGGUGTO.js'),chunkBL5W472Q_js=require('./chunk-BL5W472Q.js');require('./chunk-NUOHT3LO.js'),require('./chunk-QHW4UKGJ.js'),require('./chunk-JS7SYL5P.js');var chunkRDALAH3Y_js=require('./chunk-RDALAH3Y.js');require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js'),require('./chunk-ZD2W3YU2.js'),require('./chunk-L2VO3MEJ.js'),require('./chunk-UZNWXJ2W.js'),require('./chunk-UXUMYP4L.js');var chunkWCTFED27_js=require('./chunk-WCTFED27.js');require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var J=[{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"}],Q=({categories:o=J,adapter:c,classNames:i,unstyled:A,onSubmit:h=()=>{},copy:e,formDescription:P,description:n,submitTo:l,submitOptions:s,onSubmitError:p,onSubmitSuccess:m})=>{var t,r;let f=react.useRef(false);react.useEffect(()=>{process.env.NODE_ENV!=="production"&&P!==void 0&&n===void 0&&!f.current&&(f.current=true,console.warn("[ndpr-toolkit/breach] NDPRBreachReportProps.formDescription is deprecated; rename to 'description'. Will be removed in 4.0."));},[P,n]);let R=d=>chunkRFPLZDIO_js.d(null,null,function*(){var u,D;if(l){let C=typeof(s==null?void 0:s.headers)=="function"?s.headers():(u=s==null?void 0:s.headers)!=null?u:{};try{let N=yield fetch(l,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},C),credentials:(D=s==null?void 0:s.credentials)!=null?D:"same-origin",body:JSON.stringify(d)});if(!N.ok)p==null||p({response:N});else if(m){let B;try{let y=yield N.clone().text();y&&(B=JSON.parse(y));}catch(y){}m({response:N,data:d,body:B});}}catch(N){p==null||p({error:N});}}else c&&c.save(d);h(d);}),g=(r=(t=e==null?void 0:e.description)!=null?t:n)!=null?r:P;return jsxRuntime.jsx(chunkQGUOFGVJ_js.a,{categories:o,onSubmit:R,classNames:i,unstyled:A,title:e==null?void 0:e.title,formDescription:g,submitButtonText:e==null?void 0:e.submitButton})};var G=[{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"}]}]}],H=({sections:o=G,adapter:c,classNames:i,unstyled:A,onComplete:h=()=>{},copy:e,submitTo:P,submitOptions:n,onSubmitError:l,onSubmitSuccess:s})=>{let[p,m]=react.useState({}),[f,R]=react.useState(0),g=(D,C)=>{m(N=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},N),{[D]:C}));},t=D=>chunkRFPLZDIO_js.d(null,null,function*(){var C,N;if(P){let B=typeof(n==null?void 0:n.headers)=="function"?n.headers():(C=n==null?void 0:n.headers)!=null?C:{};try{let y=yield fetch(P,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},B),credentials:(N=n==null?void 0:n.credentials)!=null?N:"same-origin",body:JSON.stringify(D)});if(!y.ok)l==null||l({response:y});else if(s){let b;try{let x=yield y.clone().text();x&&(b=JSON.parse(x));}catch(x){}s({response:y,data:D,body:b});}}catch(y){l==null||l({error:y});}}else c&&c.save(D);h(D);}),r=()=>{f<o.length-1?R(D=>D+1):t(p);},d=()=>{f>0&&R(D=>D-1);},u=Math.round((f+1)/o.length*100);return jsxRuntime.jsx(chunkWCTFED27_js.a,{sections:o,answers:p,onAnswerChange:g,currentSectionIndex:f,onNextSection:r,onPrevSection:d,progress:u,classNames:i,unstyled:A,submitButtonText:e==null?void 0:e.submitButton,nextButtonText:e==null?void 0:e.nextButton,prevButtonText:e==null?void 0:e.prevButton})};var Z=({initialData:o,initialActivities:c,adapter:i,classNames:A,unstyled:h,copy:e})=>{var g;let P=react.useRef(false);react.useEffect(()=>{process.env.NODE_ENV!=="production"&&c!==void 0&&o===void 0&&!P.current&&(P.current=true,console.warn("[ndpr-toolkit/lawful-basis] NDPRLawfulBasisProps.initialActivities is deprecated; rename to 'initialData'. Will be removed in 4.0."));},[c,o]);let n=(g=o!=null?o:c)!=null?g:[],[l,s]=react.useState(()=>{if(i){let t=i.load();if(t&&!(t instanceof Promise))return t}return n});react.useEffect(()=>{if(!i)return;let t=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let r=yield i.load();!t&&r&&s(r);}catch(r){}}),()=>{t=true;}},[i]);let p=t=>{i&&i.save(t);};return jsxRuntime.jsx(chunk7FXNGGMO_js.a,{activities:l,onAddActivity:t=>{let r=Date.now(),d=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{id:`activity-${r}`,createdAt:r,updatedAt:r}),u=[...l,d];s(u),p(u);},onUpdateActivity:(t,r)=>{let d=l.map(u=>u.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},u),r),{updatedAt:Date.now()}):u);s(d),p(d);},onArchiveActivity:t=>{let r=l.map(d=>d.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},d),{status:"inactive",updatedAt:Date.now()}):d);s(r),p(r);},classNames:A,unstyled:h,title:e==null?void 0:e.title,description:e==null?void 0:e.description})};var se=({initialData:o,initialTransfers:c,adapter:i,classNames:A,unstyled:h,copy:e})=>{var g;let P=react.useRef(false);react.useEffect(()=>{process.env.NODE_ENV!=="production"&&c!==void 0&&o===void 0&&!P.current&&(P.current=true,console.warn("[ndpr-toolkit/cross-border] NDPRCrossBorderProps.initialTransfers is deprecated; rename to 'initialData'. Will be removed in 4.0."));},[c,o]);let n=(g=o!=null?o:c)!=null?g:[],[l,s]=react.useState(()=>{if(i){let t=i.load();if(t&&!(t instanceof Promise))return t}return n});react.useEffect(()=>{if(!i)return;let t=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let r=yield i.load();!t&&r&&s(r);}catch(r){}}),()=>{t=true;}},[i]);let p=t=>{i&&i.save(t);};return jsxRuntime.jsx(chunkXYGGUGTO_js.a,{transfers:l,onAddTransfer:t=>{let r=Date.now(),d=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),u=[...l,d];s(u),p(u);},onUpdateTransfer:(t,r)=>{let d=l.map(u=>u.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},u),r),{updatedAt:Date.now()}):u);s(d),p(d);},onRemoveTransfer:t=>{let r=l.filter(d=>d.id!==t);s(r),p(r);},classNames:A,unstyled:h,title:e==null?void 0:e.title,description:e==null?void 0:e.description})};var ne={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},de=({initialData:o,adapter:c,classNames:i,unstyled:A,copy:h})=>{let[e,P]=react.useState(o!=null?o:ne);react.useEffect(()=>{if(!c)return;let m=false;return chunkRFPLZDIO_js.d(null,null,function*(){let R=yield c.load();!m&&R&&P(R);}),()=>{m=true;}},[c]);let n=m=>{c&&c.save(m);};return jsxRuntime.jsx(chunkBL5W472Q_js.a,{ropa:e,onAddRecord:m=>{let f=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{records:[...e.records,m],lastUpdated:Date.now()});P(f),n(f);},onUpdateRecord:(m,f)=>{let R=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{records:e.records.map(g=>g.id===m?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},g),f),{updatedAt:Date.now()}):g),lastUpdated:Date.now()});P(R),n(R);},onArchiveRecord:m=>{let f=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{records:e.records.map(R=>R.id===m?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},R),{status:"archived",updatedAt:Date.now()}):R),lastUpdated:Date.now()});P(f),n(f);},classNames:i,unstyled:A,title:h==null?void 0:h.title,description:h==null?void 0:h.description})};var le=i=>{var A=i,{input:o}=A,c=chunkRFPLZDIO_js.c(A,["input"]);let h=chunkRDALAH3Y_js.a(o);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:h},c))};Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunkZM5DLFCZ_js.a}});Object.defineProperty(exports,"NDPRSubjectRights",{enumerable:true,get:function(){return chunkKH3EQJQE_js.a}});Object.defineProperty(exports,"NDPRPrivacyPolicy",{enumerable:true,get:function(){return chunk3E4IH7CE_js.a}});exports.NDPRBreachReport=Q;exports.NDPRComplianceDashboard=le;exports.NDPRCrossBorder=se;exports.NDPRDPIA=H;exports.NDPRLawfulBasis=Z;exports.NDPRROPA=de;
package/dist/presets.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{a as NDPRConsent}from'./chunk-OLEUIYE2.mjs';export{a as NDPRSubjectRights}from'./chunk-MTSZ7GL6.mjs';export{a as NDPRPrivacyPolicy}from'./chunk-GEP52QFH.mjs';import'./chunk-TDHH7GS2.mjs';import {a as a$7}from'./chunk-ZIZL37BG.mjs';import {a}from'./chunk-KY6WYHWB.mjs';import {a as a$2}from'./chunk-COD3RMTL.mjs';import {a as a$4}from'./chunk-43OQNS2J.mjs';import {a as a$5}from'./chunk-EXEXUAF6.mjs';import'./chunk-CWY2FMIC.mjs';import'./chunk-KE2FZH2V.mjs';import'./chunk-IVSNHT24.mjs';import {a as a$6}from'./chunk-7RBO42IW.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';import'./chunk-WYH3OA5L.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-IPWX5I5P.mjs';import'./chunk-EWVK45Z3.mjs';import'./chunk-25TNTLHJ.mjs';import'./chunk-RBMLGRDN.mjs';import {a as a$1}from'./chunk-ZQZJNKVB.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import {d,b,a as a$3,c}from'./chunk-ZJYULEER.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var L=[{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"}],I=({categories:c=L,adapter:r,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsx(a,{categories:c,onSubmit:d=>{r&&r.save(d),o(d);},classNames:u,unstyled:p});var k=[{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"}]}]}],_=({sections:c=k,adapter:r,classNames:u,unstyled:p,onComplete:o=()=>{}})=>{let[n,d]=useState({}),[m,P]=useState(0),h=(a,C)=>{d(S=>b(a$3({},S),{[a]:C}));},e=()=>{m<c.length-1?P(a=>a+1):(r&&r.save(n),o(n));},t=()=>{m>0&&P(a=>a-1);},s=Math.round((m+1)/c.length*100);return jsx(a$1,{sections:c,answers:n,onAnswerChange:h,currentSectionIndex:m,onNextSection:e,onPrevSection:t,progress:s,classNames:u,unstyled:p})};var M=({initialActivities:c=[],adapter:r,classNames:u,unstyled:p})=>{let[o,n]=useState(()=>{if(r){let e=r.load();if(e&&!(e instanceof Promise))return e}return c});useEffect(()=>{if(!r)return;let e=false;return d(null,null,function*(){try{let t=yield r.load();!e&&t&&n(t);}catch(t){}}),()=>{e=true;}},[r]);let d$1=e=>{r&&r.save(e);};return jsx(a$2,{activities:o,onAddActivity:e=>{let t=Date.now(),s=b(a$3({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,s];n(a),d$1(a);},onUpdateActivity:(e,t)=>{let s=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(s),d$1(s);},onArchiveActivity:e=>{let t=o.map(s=>s.id===e?b(a$3({},s),{status:"inactive",updatedAt:Date.now()}):s);n(t),d$1(t);},classNames:u,unstyled:p})};var z=({initialTransfers:c=[],adapter:r,classNames:u,unstyled:p})=>{let[o,n]=useState(()=>{if(r){let e=r.load();if(e&&!(e instanceof Promise))return e}return c});useEffect(()=>{if(!r)return;let e=false;return d(null,null,function*(){try{let t=yield r.load();!e&&t&&n(t);}catch(t){}}),()=>{e=true;}},[r]);let d$1=e=>{r&&r.save(e);};return jsx(a$4,{transfers:o,onAddTransfer:e=>{let t=Date.now(),s=b(a$3({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,s];n(a),d$1(a);},onUpdateTransfer:(e,t)=>{let s=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(s),d$1(s);},onRemoveTransfer:e=>{let t=o.filter(s=>s.id!==e);n(t),d$1(t);},classNames:u,unstyled:p})};var $={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},G=({initialData:c,adapter:r,classNames:u,unstyled:p})=>{let[o,n]=useState(c!=null?c:$);useEffect(()=>{if(!r)return;let e=false;return d(null,null,function*(){let s=yield r.load();!e&&s&&n(s);}),()=>{e=true;}},[r]);let d$1=e=>{r&&r.save(e);};return jsx(a$5,{ropa:o,onAddRecord:e=>{let t=b(a$3({},o),{records:[...o.records,e],lastUpdated:Date.now()});n(t),d$1(t);},onUpdateRecord:(e,t)=>{let s=b(a$3({},o),{records:o.records.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a),lastUpdated:Date.now()});n(s),d$1(s);},onArchiveRecord:e=>{let t=b(a$3({},o),{records:o.records.map(s=>s.id===e?b(a$3({},s),{status:"archived",updatedAt:Date.now()}):s),lastUpdated:Date.now()});n(t),d$1(t);},classNames:u,unstyled:p})};var J=u=>{var p=u,{input:c$1}=p,r=c(p,["input"]);let o=a$6(c$1);return jsx(a$7,a$3({report:o},r))};export{I as NDPRBreachReport,J as NDPRComplianceDashboard,z as NDPRCrossBorder,_ as NDPRDPIA,M as NDPRLawfulBasis,G as NDPRROPA};
2
+ export{a as NDPRConsent}from'./chunk-737EMUUC.mjs';export{a as NDPRSubjectRights}from'./chunk-WVHMY2BV.mjs';export{a as NDPRPrivacyPolicy}from'./chunk-B2EXRSYG.mjs';import'./chunk-ELK6VFKC.mjs';import {a as a$7}from'./chunk-ZIZL37BG.mjs';import {a}from'./chunk-NUIRMJKQ.mjs';import {a as a$2}from'./chunk-RBKFNCGO.mjs';import {a as a$4}from'./chunk-42JPSNVV.mjs';import {a as a$5}from'./chunk-Z2M5VJX2.mjs';import'./chunk-CWY2FMIC.mjs';import'./chunk-KE2FZH2V.mjs';import'./chunk-IVSNHT24.mjs';import {a as a$6}from'./chunk-7RBO42IW.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';import'./chunk-I2ZBMR7F.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-L3FR4PQE.mjs';import'./chunk-EWVK45Z3.mjs';import {a as a$1}from'./chunk-ZQHGIOYP.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-DBZSN4WP.mjs';import {d,b,a as a$3,c}from'./chunk-ZJYULEER.mjs';import {useRef,useEffect,useState}from'react';import {jsx}from'react/jsx-runtime';var J=[{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"}],Q=({categories:o=J,adapter:c,classNames:i,unstyled:A,onSubmit:h=()=>{},copy:e,formDescription:P,description:n,submitTo:l,submitOptions:s,onSubmitError:p,onSubmitSuccess:m})=>{var t,r;let f=useRef(false);useEffect(()=>{process.env.NODE_ENV!=="production"&&P!==void 0&&n===void 0&&!f.current&&(f.current=true,console.warn("[ndpr-toolkit/breach] NDPRBreachReportProps.formDescription is deprecated; rename to 'description'. Will be removed in 4.0."));},[P,n]);let R=d$1=>d(null,null,function*(){var u,D;if(l){let C=typeof(s==null?void 0:s.headers)=="function"?s.headers():(u=s==null?void 0:s.headers)!=null?u:{};try{let N=yield fetch(l,{method:"POST",headers:a$3({"Content-Type":"application/json"},C),credentials:(D=s==null?void 0:s.credentials)!=null?D:"same-origin",body:JSON.stringify(d$1)});if(!N.ok)p==null||p({response:N});else if(m){let B;try{let y=yield N.clone().text();y&&(B=JSON.parse(y));}catch(y){}m({response:N,data:d$1,body:B});}}catch(N){p==null||p({error:N});}}else c&&c.save(d$1);h(d$1);}),g=(r=(t=e==null?void 0:e.description)!=null?t:n)!=null?r:P;return jsx(a,{categories:o,onSubmit:R,classNames:i,unstyled:A,title:e==null?void 0:e.title,formDescription:g,submitButtonText:e==null?void 0:e.submitButton})};var G=[{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"}]}]}],H=({sections:o=G,adapter:c,classNames:i,unstyled:A,onComplete:h=()=>{},copy:e,submitTo:P,submitOptions:n,onSubmitError:l,onSubmitSuccess:s})=>{let[p,m]=useState({}),[f,R]=useState(0),g=(D,C)=>{m(N=>b(a$3({},N),{[D]:C}));},t=D=>d(null,null,function*(){var C,N;if(P){let B=typeof(n==null?void 0:n.headers)=="function"?n.headers():(C=n==null?void 0:n.headers)!=null?C:{};try{let y=yield fetch(P,{method:"POST",headers:a$3({"Content-Type":"application/json"},B),credentials:(N=n==null?void 0:n.credentials)!=null?N:"same-origin",body:JSON.stringify(D)});if(!y.ok)l==null||l({response:y});else if(s){let b;try{let x=yield y.clone().text();x&&(b=JSON.parse(x));}catch(x){}s({response:y,data:D,body:b});}}catch(y){l==null||l({error:y});}}else c&&c.save(D);h(D);}),r=()=>{f<o.length-1?R(D=>D+1):t(p);},d$1=()=>{f>0&&R(D=>D-1);},u=Math.round((f+1)/o.length*100);return jsx(a$1,{sections:o,answers:p,onAnswerChange:g,currentSectionIndex:f,onNextSection:r,onPrevSection:d$1,progress:u,classNames:i,unstyled:A,submitButtonText:e==null?void 0:e.submitButton,nextButtonText:e==null?void 0:e.nextButton,prevButtonText:e==null?void 0:e.prevButton})};var Z=({initialData:o,initialActivities:c,adapter:i,classNames:A,unstyled:h,copy:e})=>{var g;let P=useRef(false);useEffect(()=>{process.env.NODE_ENV!=="production"&&c!==void 0&&o===void 0&&!P.current&&(P.current=true,console.warn("[ndpr-toolkit/lawful-basis] NDPRLawfulBasisProps.initialActivities is deprecated; rename to 'initialData'. Will be removed in 4.0."));},[c,o]);let n=(g=o!=null?o:c)!=null?g:[],[l,s]=useState(()=>{if(i){let t=i.load();if(t&&!(t instanceof Promise))return t}return n});useEffect(()=>{if(!i)return;let t=false;return d(null,null,function*(){try{let r=yield i.load();!t&&r&&s(r);}catch(r){}}),()=>{t=true;}},[i]);let p=t=>{i&&i.save(t);};return jsx(a$2,{activities:l,onAddActivity:t=>{let r=Date.now(),d=b(a$3({},t),{id:`activity-${r}`,createdAt:r,updatedAt:r}),u=[...l,d];s(u),p(u);},onUpdateActivity:(t,r)=>{let d=l.map(u=>u.id===t?b(a$3(a$3({},u),r),{updatedAt:Date.now()}):u);s(d),p(d);},onArchiveActivity:t=>{let r=l.map(d=>d.id===t?b(a$3({},d),{status:"inactive",updatedAt:Date.now()}):d);s(r),p(r);},classNames:A,unstyled:h,title:e==null?void 0:e.title,description:e==null?void 0:e.description})};var se=({initialData:o,initialTransfers:c,adapter:i,classNames:A,unstyled:h,copy:e})=>{var g;let P=useRef(false);useEffect(()=>{process.env.NODE_ENV!=="production"&&c!==void 0&&o===void 0&&!P.current&&(P.current=true,console.warn("[ndpr-toolkit/cross-border] NDPRCrossBorderProps.initialTransfers is deprecated; rename to 'initialData'. Will be removed in 4.0."));},[c,o]);let n=(g=o!=null?o:c)!=null?g:[],[l,s]=useState(()=>{if(i){let t=i.load();if(t&&!(t instanceof Promise))return t}return n});useEffect(()=>{if(!i)return;let t=false;return d(null,null,function*(){try{let r=yield i.load();!t&&r&&s(r);}catch(r){}}),()=>{t=true;}},[i]);let p=t=>{i&&i.save(t);};return jsx(a$4,{transfers:l,onAddTransfer:t=>{let r=Date.now(),d=b(a$3({},t),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),u=[...l,d];s(u),p(u);},onUpdateTransfer:(t,r)=>{let d=l.map(u=>u.id===t?b(a$3(a$3({},u),r),{updatedAt:Date.now()}):u);s(d),p(d);},onRemoveTransfer:t=>{let r=l.filter(d=>d.id!==t);s(r),p(r);},classNames:A,unstyled:h,title:e==null?void 0:e.title,description:e==null?void 0:e.description})};var ne={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},de=({initialData:o,adapter:c,classNames:i,unstyled:A,copy:h})=>{let[e,P]=useState(o!=null?o:ne);useEffect(()=>{if(!c)return;let m=false;return d(null,null,function*(){let R=yield c.load();!m&&R&&P(R);}),()=>{m=true;}},[c]);let n=m=>{c&&c.save(m);};return jsx(a$5,{ropa:e,onAddRecord:m=>{let f=b(a$3({},e),{records:[...e.records,m],lastUpdated:Date.now()});P(f),n(f);},onUpdateRecord:(m,f)=>{let R=b(a$3({},e),{records:e.records.map(g=>g.id===m?b(a$3(a$3({},g),f),{updatedAt:Date.now()}):g),lastUpdated:Date.now()});P(R),n(R);},onArchiveRecord:m=>{let f=b(a$3({},e),{records:e.records.map(R=>R.id===m?b(a$3({},R),{status:"archived",updatedAt:Date.now()}):R),lastUpdated:Date.now()});P(f),n(f);},classNames:i,unstyled:A,title:h==null?void 0:h.title,description:h==null?void 0:h.description})};var le=i=>{var A=i,{input:o}=A,c$1=c(A,["input"]);let h=a$6(o);return jsx(a$7,a$3({report:h},c$1))};export{Q as NDPRBreachReport,le as NDPRComplianceDashboard,se as NDPRCrossBorder,H as NDPRDPIA,Z as NDPRLawfulBasis,de as NDPRROPA};
package/dist/ropa-lite.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var _={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},w=["consent","contract","legal_obligation","vital_interests","public_interest","legitimate_interests"],P={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--warning",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},L={active:"Active",inactive:"Inactive",archived:"Archived"};function D(s){return s?new Date(s).toLocaleDateString():"N/A"}function O(s){return !!s.nextReviewDate&&s.nextReviewDate<=Date.now()}var S=({records:s,title:x="Record of Processing Activities (ROPA)",description:R="Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",className:y="",classNames:t,unstyled:n,showSummary:h=true,showComplianceGaps:A=true,onRecordClick:l})=>{let u=react.useMemo(()=>({id:"lite",organizationName:"",organizationContact:"",organizationAddress:"",records:s,lastUpdated:0,version:"0"}),[s]),d=react.useMemo(()=>chunk4CVBQC66_js.b(u),[u]),m=react.useMemo(()=>chunk4CVBQC66_js.d(u),[u]);return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${y}`,t==null?void 0:t.root,n),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",t==null?void 0:t.header,n),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",t==null?void 0:t.title,n),children:x}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:R})]}),h&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("mb-6",t==null?void 0:t.summary,n),children:[jsxRuntime.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[["p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center","ndpr-text-info","Total Records",d.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",d.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",d.crossBorderRecords,false],["p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center","ndpr-text-warning","Records with Gaps",m.length,true]].map(([a,o,p,c,g])=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(a,t==null?void 0:t.summaryCard,n),children:[jsxRuntime.jsx("p",{className:g?chunkAME4HJR4_js.a(`ndpr-stat__value ${o}`,t==null?void 0:t.complianceScore,n):`ndpr-stat__value ${o}`,children:c}),jsxRuntime.jsx("p",{className:`text-xs ${o}`,children:p})]},p))}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"By Lawful Basis"}),w.map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:_[a]}),jsxRuntime.jsx("span",{className:"font-medium",children:d.byLawfulBasis[a]||0})]},a))]}),jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",d.sensitiveDataRecords,false],["DPIA Required",d.dpiaRequiredRecords,false],["Automated Decisions",d.automatedDecisionRecords,false],["Due for Review",d.recordsDueForReview.length,d.recordsDueForReview.length>0]].map(([a,o,p])=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:a}),jsxRuntime.jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:o})]},a))]}),d.topDepartments.length>0&&jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),d.topDepartments.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:a.department}),jsxRuntime.jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]})]}),A&&m.length>0&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md mb-6",t==null?void 0:t.gapAlert,n),role:"status","aria-live":"polite",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium ndpr-text-destructive mb-2",children:"Compliance Gaps Detected"}),m.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"mb-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:a.recordName}),jsxRuntime.jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((o,p)=>jsxRuntime.jsx("li",{className:"text-xs ndpr-text-destructive",children:o},p))})]},a.recordId)),m.length>5&&jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["...and ",m.length-5," more record(s) with gaps."]})]}),s.length===0?jsxRuntime.jsx("p",{className:"ndpr-empty-state",children:"No processing records found."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:chunkAME4HJR4_js.a("w-full text-sm text-left",t==null?void 0:t.table,n),children:[jsxRuntime.jsx("thead",{className:chunkAME4HJR4_js.a("ndpr-table__head",t==null?void 0:t.tableHeader,n),children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Name"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Data Categories"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Retention"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Last Reviewed"})]})}),jsxRuntime.jsx("tbody",{children:s.map(a=>{let o=O(a),p=m.some(g=>g.recordId===a.id),c=!!l;return jsxRuntime.jsxs("tr",{onClick:c?()=>l==null?void 0:l(a):void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),l==null||l(a));}:void 0,className:chunkAME4HJR4_js.a(`border-b dark:border-gray-600 ${o?"bg-red-50 dark:bg-red-900/10":p?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,t==null?void 0:t.tableRow,n),children:[jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium",children:a.name}),a.department&&jsxRuntime.jsx("p",{className:"ndpr-form-field__hint",children:a.department}),o&&jsxRuntime.jsx("span",{className:"text-xs ndpr-text-destructive font-medium",children:"Review Overdue"})]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("span",{className:"ndpr-badge ndpr-badge--info",children:_[a.lawfulBasis]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:a.dataCategories.join(", ")})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:a.retentionPeriod||"N/A"}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${P[a.status]}`,t==null?void 0:t.statusBadge,n),children:L[a.status]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:D(a.lastReviewedAt)})]},a.id)})})]})})]})};Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});exports.ROPAManagerLite=S;
2
+ 'use strict';var chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),chunkYDKWD6MQ_js=require('./chunk-YDKWD6MQ.js');require('./chunk-TTMGFC6C.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var w={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},B=["consent","contract","legal_obligation","vital_interests","public_interest","legitimate_interests"],k={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--warning",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},N={active:"Active",inactive:"Inactive",archived:"Archived"};function C(o){return o?new Date(o).toLocaleDateString():"N/A"}function G(o){return !!o.nextReviewDate&&o.nextReviewDate<=Date.now()}var I=({records:o,title:b,description:v,className:P="",classNames:t,unstyled:i,showSummary:L=true,showComplianceGaps:D=true,onRecordClick:l})=>{var y,h;let R=chunkYDKWD6MQ_js.c(),O=(y=b!=null?b:R.ropa.title)!=null?y:"Record of Processing Activities (ROPA)",S=(h=v!=null?v:R.ropa.description)!=null?h:"Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",u=react.useMemo(()=>({id:"lite",organizationName:"",organizationContact:"",organizationAddress:"",records:o,lastUpdated:0,version:"0"}),[o]),d=react.useMemo(()=>chunk4CVBQC66_js.b(u),[u]),g=react.useMemo(()=>chunk4CVBQC66_js.d(u),[u]);return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${P}`,t==null?void 0:t.root,i),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",t==null?void 0:t.header,i),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",t==null?void 0:t.title,i),children:O}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:S})]}),L&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("mb-6",t==null?void 0:t.summary,i),children:[jsxRuntime.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[["p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center","ndpr-text-info","Total Records",d.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",d.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",d.crossBorderRecords,false],["p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center","ndpr-text-warning","Records with Gaps",g.length,true]].map(([a,s,p,c,m])=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(a,t==null?void 0:t.summaryCard,i),children:[jsxRuntime.jsx("p",{className:m?chunkAME4HJR4_js.a(`ndpr-stat__value ${s}`,t==null?void 0:t.complianceScore,i):`ndpr-stat__value ${s}`,children:c}),jsxRuntime.jsx("p",{className:`text-xs ${s}`,children:p})]},p))}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"By Lawful Basis"}),B.map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:w[a]}),jsxRuntime.jsx("span",{className:"font-medium",children:d.byLawfulBasis[a]||0})]},a))]}),jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",d.sensitiveDataRecords,false],["DPIA Required",d.dpiaRequiredRecords,false],["Automated Decisions",d.automatedDecisionRecords,false],["Due for Review",d.recordsDueForReview.length,d.recordsDueForReview.length>0]].map(([a,s,p])=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:a}),jsxRuntime.jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:s})]},a))]}),d.topDepartments.length>0&&jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),d.topDepartments.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:a.department}),jsxRuntime.jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]})]}),D&&g.length>0&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md mb-6",t==null?void 0:t.gapAlert,i),role:"status","aria-live":"polite",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium ndpr-text-destructive mb-2",children:"Compliance Gaps Detected"}),g.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"mb-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:a.recordName}),jsxRuntime.jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((s,p)=>jsxRuntime.jsx("li",{className:"text-xs ndpr-text-destructive",children:s},p))})]},a.recordId)),g.length>5&&jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["...and ",g.length-5," more record(s) with gaps."]})]}),o.length===0?jsxRuntime.jsx("p",{className:"ndpr-empty-state",children:"No processing records found."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:chunkAME4HJR4_js.a("w-full text-sm text-left",t==null?void 0:t.table,i),children:[jsxRuntime.jsx("thead",{className:chunkAME4HJR4_js.a("ndpr-table__head",t==null?void 0:t.tableHeader,i),children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Name"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Data Categories"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Retention"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Last Reviewed"})]})}),jsxRuntime.jsx("tbody",{children:o.map(a=>{let s=G(a),p=g.some(m=>m.recordId===a.id),c=!!l;return jsxRuntime.jsxs("tr",{onClick:c?()=>l==null?void 0:l(a):void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),l==null||l(a));}:void 0,className:chunkAME4HJR4_js.a(`border-b dark:border-gray-600 ${s?"bg-red-50 dark:bg-red-900/10":p?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,t==null?void 0:t.tableRow,i),children:[jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium",children:a.name}),a.department&&jsxRuntime.jsx("p",{className:"ndpr-form-field__hint",children:a.department}),s&&jsxRuntime.jsx("span",{className:"text-xs ndpr-text-destructive font-medium",children:"Review Overdue"})]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("span",{className:"ndpr-badge ndpr-badge--info",children:w[a.lawfulBasis]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:a.dataCategories.join(", ")})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:a.retentionPeriod||"N/A"}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${k[a.status]}`,t==null?void 0:t.statusBadge,i),children:N[a.status]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:C(a.lastReviewedAt)})]},a.id)})})]})})]})};Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});exports.ROPAManagerLite=I;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {b,d}from'./chunk-XP5PL6K7.mjs';export{b as generateROPASummary,d as identifyComplianceGaps}from'./chunk-XP5PL6K7.mjs';import {a}from'./chunk-SFGW37LE.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var _={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},w=["consent","contract","legal_obligation","vital_interests","public_interest","legitimate_interests"],P={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--warning",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},L={active:"Active",inactive:"Inactive",archived:"Archived"};function D(s){return s?new Date(s).toLocaleDateString():"N/A"}function O(s){return !!s.nextReviewDate&&s.nextReviewDate<=Date.now()}var S=({records:s,title:x="Record of Processing Activities (ROPA)",description:R="Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",className:y="",classNames:t,unstyled:n,showSummary:h=true,showComplianceGaps:A=true,onRecordClick:l})=>{let u=useMemo(()=>({id:"lite",organizationName:"",organizationContact:"",organizationAddress:"",records:s,lastUpdated:0,version:"0"}),[s]),d$1=useMemo(()=>b(u),[u]),m=useMemo(()=>d(u),[u]);return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${y}`,t==null?void 0:t.root,n),children:[jsxs("div",{className:a("",t==null?void 0:t.header,n),children:[jsx("h2",{className:a("ndpr-section-heading",t==null?void 0:t.title,n),children:x}),jsx("p",{className:"ndpr-card__subtitle",children:R})]}),h&&jsxs("div",{className:a("mb-6",t==null?void 0:t.summary,n),children:[jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[["p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center","ndpr-text-info","Total Records",d$1.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",d$1.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",d$1.crossBorderRecords,false],["p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center","ndpr-text-warning","Records with Gaps",m.length,true]].map(([a$1,o,p,c,g])=>jsxs("div",{className:a(a$1,t==null?void 0:t.summaryCard,n),children:[jsx("p",{className:g?a(`ndpr-stat__value ${o}`,t==null?void 0:t.complianceScore,n):`ndpr-stat__value ${o}`,children:c}),jsx("p",{className:`text-xs ${o}`,children:p})]},p))}),jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"By Lawful Basis"}),w.map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:_[a]}),jsx("span",{className:"font-medium",children:d$1.byLawfulBasis[a]||0})]},a))]}),jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",d$1.sensitiveDataRecords,false],["DPIA Required",d$1.dpiaRequiredRecords,false],["Automated Decisions",d$1.automatedDecisionRecords,false],["Due for Review",d$1.recordsDueForReview.length,d$1.recordsDueForReview.length>0]].map(([a,o,p])=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:a}),jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:o})]},a))]}),d$1.topDepartments.length>0&&jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),d$1.topDepartments.slice(0,5).map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:a.department}),jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]})]}),A&&m.length>0&&jsxs("div",{className:a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md mb-6",t==null?void 0:t.gapAlert,n),role:"status","aria-live":"polite",children:[jsx("p",{className:"text-sm font-medium ndpr-text-destructive mb-2",children:"Compliance Gaps Detected"}),m.slice(0,5).map(a=>jsxs("div",{className:"mb-2",children:[jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:a.recordName}),jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((o,p)=>jsx("li",{className:"text-xs ndpr-text-destructive",children:o},p))})]},a.recordId)),m.length>5&&jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["...and ",m.length-5," more record(s) with gaps."]})]}),s.length===0?jsx("p",{className:"ndpr-empty-state",children:"No processing records found."}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:a("w-full text-sm text-left",t==null?void 0:t.table,n),children:[jsx("thead",{className:a("ndpr-table__head",t==null?void 0:t.tableHeader,n),children:jsxs("tr",{children:[jsx("th",{className:"ndpr-table__cell",children:"Name"}),jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsx("th",{className:"ndpr-table__cell",children:"Data Categories"}),jsx("th",{className:"ndpr-table__cell",children:"Retention"}),jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsx("th",{className:"ndpr-table__cell",children:"Last Reviewed"})]})}),jsx("tbody",{children:s.map(a$1=>{let o=O(a$1),p=m.some(g=>g.recordId===a$1.id),c=!!l;return jsxs("tr",{onClick:c?()=>l==null?void 0:l(a$1):void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),l==null||l(a$1));}:void 0,className:a(`border-b dark:border-gray-600 ${o?"bg-red-50 dark:bg-red-900/10":p?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,t==null?void 0:t.tableRow,n),children:[jsx("td",{className:"ndpr-table__cell",children:jsxs("div",{children:[jsx("p",{className:"font-medium",children:a$1.name}),a$1.department&&jsx("p",{className:"ndpr-form-field__hint",children:a$1.department}),o&&jsx("span",{className:"text-xs ndpr-text-destructive font-medium",children:"Review Overdue"})]})}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:"ndpr-badge ndpr-badge--info",children:_[a$1.lawfulBasis]})}),jsx("td",{className:"ndpr-table__cell",children:jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:a$1.dataCategories.join(", ")})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:a$1.retentionPeriod||"N/A"}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${P[a$1.status]}`,t==null?void 0:t.statusBadge,n),children:L[a$1.status]})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:D(a$1.lastReviewedAt)})]},a$1.id)})})]})})]})};export{S as ROPAManagerLite};
2
+ import {b,d}from'./chunk-XP5PL6K7.mjs';export{b as generateROPASummary,d as identifyComplianceGaps}from'./chunk-XP5PL6K7.mjs';import {a}from'./chunk-SFGW37LE.mjs';import {c}from'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var w={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},B=["consent","contract","legal_obligation","vital_interests","public_interest","legitimate_interests"],k={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--warning",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},N={active:"Active",inactive:"Inactive",archived:"Archived"};function C(o){return o?new Date(o).toLocaleDateString():"N/A"}function G(o){return !!o.nextReviewDate&&o.nextReviewDate<=Date.now()}var I=({records:o,title:b$1,description:v,className:P="",classNames:t,unstyled:i,showSummary:L=true,showComplianceGaps:D=true,onRecordClick:l})=>{var y,h;let R=c(),O=(y=b$1!=null?b$1:R.ropa.title)!=null?y:"Record of Processing Activities (ROPA)",S=(h=v!=null?v:R.ropa.description)!=null?h:"Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",u=useMemo(()=>({id:"lite",organizationName:"",organizationContact:"",organizationAddress:"",records:o,lastUpdated:0,version:"0"}),[o]),d$1=useMemo(()=>b(u),[u]),g=useMemo(()=>d(u),[u]);return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${P}`,t==null?void 0:t.root,i),children:[jsxs("div",{className:a("",t==null?void 0:t.header,i),children:[jsx("h2",{className:a("ndpr-section-heading",t==null?void 0:t.title,i),children:O}),jsx("p",{className:"ndpr-card__subtitle",children:S})]}),L&&jsxs("div",{className:a("mb-6",t==null?void 0:t.summary,i),children:[jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[["p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center","ndpr-text-info","Total Records",d$1.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",d$1.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",d$1.crossBorderRecords,false],["p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center","ndpr-text-warning","Records with Gaps",g.length,true]].map(([a$1,s,p,c,m])=>jsxs("div",{className:a(a$1,t==null?void 0:t.summaryCard,i),children:[jsx("p",{className:m?a(`ndpr-stat__value ${s}`,t==null?void 0:t.complianceScore,i):`ndpr-stat__value ${s}`,children:c}),jsx("p",{className:`text-xs ${s}`,children:p})]},p))}),jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"By Lawful Basis"}),B.map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:w[a]}),jsx("span",{className:"font-medium",children:d$1.byLawfulBasis[a]||0})]},a))]}),jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",d$1.sensitiveDataRecords,false],["DPIA Required",d$1.dpiaRequiredRecords,false],["Automated Decisions",d$1.automatedDecisionRecords,false],["Due for Review",d$1.recordsDueForReview.length,d$1.recordsDueForReview.length>0]].map(([a,s,p])=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:a}),jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:s})]},a))]}),d$1.topDepartments.length>0&&jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),d$1.topDepartments.slice(0,5).map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:a.department}),jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]})]}),D&&g.length>0&&jsxs("div",{className:a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md mb-6",t==null?void 0:t.gapAlert,i),role:"status","aria-live":"polite",children:[jsx("p",{className:"text-sm font-medium ndpr-text-destructive mb-2",children:"Compliance Gaps Detected"}),g.slice(0,5).map(a=>jsxs("div",{className:"mb-2",children:[jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:a.recordName}),jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((s,p)=>jsx("li",{className:"text-xs ndpr-text-destructive",children:s},p))})]},a.recordId)),g.length>5&&jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["...and ",g.length-5," more record(s) with gaps."]})]}),o.length===0?jsx("p",{className:"ndpr-empty-state",children:"No processing records found."}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:a("w-full text-sm text-left",t==null?void 0:t.table,i),children:[jsx("thead",{className:a("ndpr-table__head",t==null?void 0:t.tableHeader,i),children:jsxs("tr",{children:[jsx("th",{className:"ndpr-table__cell",children:"Name"}),jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsx("th",{className:"ndpr-table__cell",children:"Data Categories"}),jsx("th",{className:"ndpr-table__cell",children:"Retention"}),jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsx("th",{className:"ndpr-table__cell",children:"Last Reviewed"})]})}),jsx("tbody",{children:o.map(a$1=>{let s=G(a$1),p=g.some(m=>m.recordId===a$1.id),c=!!l;return jsxs("tr",{onClick:c?()=>l==null?void 0:l(a$1):void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),l==null||l(a$1));}:void 0,className:a(`border-b dark:border-gray-600 ${s?"bg-red-50 dark:bg-red-900/10":p?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,t==null?void 0:t.tableRow,i),children:[jsx("td",{className:"ndpr-table__cell",children:jsxs("div",{children:[jsx("p",{className:"font-medium",children:a$1.name}),a$1.department&&jsx("p",{className:"ndpr-form-field__hint",children:a$1.department}),s&&jsx("span",{className:"text-xs ndpr-text-destructive font-medium",children:"Review Overdue"})]})}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:"ndpr-badge ndpr-badge--info",children:w[a$1.lawfulBasis]})}),jsx("td",{className:"ndpr-table__cell",children:jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:a$1.dataCategories.join(", ")})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:a$1.retentionPeriod||"N/A"}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${k[a$1.status]}`,t==null?void 0:t.statusBadge,i),children:N[a$1.status]})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:C(a$1.lastReviewedAt)})]},a$1.id)})})]})})]})};export{I as ROPAManagerLite};
package/dist/ropa.d.mts CHANGED
@@ -382,17 +382,38 @@ export declare interface UseROPAReturn {
382
382
  */
383
383
  getRecord: (id: string) => ProcessingRecord | undefined;
384
384
  /**
385
- * Get a summary of the ROPA including statistics
385
+ * Get a summary of the ROPA including statistics.
386
+ * @deprecated Use the cached `summary` field instead — it is memoised on
387
+ * `ropa` so consumers don't pay the recompute cost on every call.
386
388
  */
387
389
  getSummary: () => ROPASummary;
388
390
  /**
389
- * Export the ROPA as a CSV string
391
+ * Export the ROPA as a CSV string.
392
+ * @deprecated Use the cached `csv` field instead — it is memoised on
393
+ * `ropa` so consumers don't pay the recompute cost on every call.
390
394
  */
391
395
  exportCSV: () => string;
392
396
  /**
393
- * Identify compliance gaps across all records
397
+ * Identify compliance gaps across all records.
398
+ * @deprecated Use the cached `complianceGaps` field instead — it is
399
+ * memoised on `ropa` so consumers don't pay the recompute cost on every call.
394
400
  */
395
401
  getComplianceGaps: () => ROPAComplianceGap[];
402
+ /**
403
+ * Memoised ROPA summary. Recomputed only when `ropa` changes.
404
+ * Prefer this over `getSummary()` to avoid redundant recomputation.
405
+ */
406
+ summary: ROPASummary;
407
+ /**
408
+ * Memoised CSV export string. Recomputed only when `ropa` changes.
409
+ * Prefer this over `exportCSV()` to avoid redundant recomputation.
410
+ */
411
+ csv: string;
412
+ /**
413
+ * Memoised compliance gap list. Recomputed only when `ropa` changes.
414
+ * Prefer this over `getComplianceGaps()` to avoid redundant recomputation.
415
+ */
416
+ complianceGaps: ROPAComplianceGap[];
396
417
  /**
397
418
  * Whether the adapter is still loading data (relevant for async adapters)
398
419
  */
package/dist/ropa.d.ts CHANGED
@@ -382,17 +382,38 @@ export declare interface UseROPAReturn {
382
382
  */
383
383
  getRecord: (id: string) => ProcessingRecord | undefined;
384
384
  /**
385
- * Get a summary of the ROPA including statistics
385
+ * Get a summary of the ROPA including statistics.
386
+ * @deprecated Use the cached `summary` field instead — it is memoised on
387
+ * `ropa` so consumers don't pay the recompute cost on every call.
386
388
  */
387
389
  getSummary: () => ROPASummary;
388
390
  /**
389
- * Export the ROPA as a CSV string
391
+ * Export the ROPA as a CSV string.
392
+ * @deprecated Use the cached `csv` field instead — it is memoised on
393
+ * `ropa` so consumers don't pay the recompute cost on every call.
390
394
  */
391
395
  exportCSV: () => string;
392
396
  /**
393
- * Identify compliance gaps across all records
397
+ * Identify compliance gaps across all records.
398
+ * @deprecated Use the cached `complianceGaps` field instead — it is
399
+ * memoised on `ropa` so consumers don't pay the recompute cost on every call.
394
400
  */
395
401
  getComplianceGaps: () => ROPAComplianceGap[];
402
+ /**
403
+ * Memoised ROPA summary. Recomputed only when `ropa` changes.
404
+ * Prefer this over `getSummary()` to avoid redundant recomputation.
405
+ */
406
+ summary: ROPASummary;
407
+ /**
408
+ * Memoised CSV export string. Recomputed only when `ropa` changes.
409
+ * Prefer this over `exportCSV()` to avoid redundant recomputation.
410
+ */
411
+ csv: string;
412
+ /**
413
+ * Memoised compliance gap list. Recomputed only when `ropa` changes.
414
+ * Prefer this over `getComplianceGaps()` to avoid redundant recomputation.
415
+ */
416
+ complianceGaps: ROPAComplianceGap[];
396
417
  /**
397
418
  * Whether the adapter is still loading data (relevant for async adapters)
398
419
  */
package/dist/ropa.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunk5GVMKUMP_js=require('./chunk-5GVMKUMP.js'),chunk3JPDTXGC_js=require('./chunk-3JPDTXGC.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js');require('./chunk-AME4HJR4.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var t=react.createContext(null);function u(){let r=react.useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=chunk3JPDTXGC_js.a({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsxRuntime.jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:chunk5GVMKUMP_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunk5GVMKUMP_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunk3JPDTXGC_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});exports.ROPA=v;exports.ROPAProvider=p;exports.useROPACompound=u;
2
+ 'use strict';var chunkBL5W472Q_js=require('./chunk-BL5W472Q.js'),chunkO2WEABB3_js=require('./chunk-O2WEABB3.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js');require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var t=react.createContext(null);function u(){let r=react.useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=chunkO2WEABB3_js.a({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsxRuntime.jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:chunkBL5W472Q_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkBL5W472Q_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkO2WEABB3_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});exports.ROPA=v;exports.ROPAProvider=p;exports.useROPACompound=u;
package/dist/ropa.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a}from'./chunk-EXEXUAF6.mjs';export{a as ROPAManager}from'./chunk-EXEXUAF6.mjs';import {a as a$1}from'./chunk-RPXRPGHL.mjs';export{a as useROPA}from'./chunk-RPXRPGHL.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var t=createContext(null);function u(){let r=useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=a$1({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:a};export{v as ROPA,p as ROPAProvider,u as useROPACompound};
2
+ import {a}from'./chunk-Z2M5VJX2.mjs';export{a as ROPAManager}from'./chunk-Z2M5VJX2.mjs';import {a as a$1}from'./chunk-WKUC65HL.mjs';export{a as useROPA}from'./chunk-WKUC65HL.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var t=createContext(null);function u(){let r=useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=a$1({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:a};export{v as ROPA,p as ROPAProvider,u as useROPACompound};
package/dist/server.d.mts CHANGED
@@ -1505,6 +1505,12 @@ export declare interface NDPRLocale {
1505
1505
  deselectAll?: string;
1506
1506
  required?: string;
1507
1507
  cookieNotice?: string;
1508
+ /** ConsentManager component title */
1509
+ managerTitle?: string;
1510
+ /** ConsentManager component description */
1511
+ managerDescription?: string;
1512
+ /** ConsentManager reset button */
1513
+ resetToDefaults?: string;
1508
1514
  };
1509
1515
  dsr?: {
1510
1516
  title?: string;
@@ -1521,6 +1527,14 @@ export declare interface NDPRLocale {
1521
1527
  identifierValue?: string;
1522
1528
  privacyNotice?: string;
1523
1529
  successMessage?: string;
1530
+ /** DSRDashboard component title */
1531
+ dashboardTitle?: string;
1532
+ /** DSRDashboard component description */
1533
+ dashboardDescription?: string;
1534
+ /** DSRTracker component title */
1535
+ trackerTitle?: string;
1536
+ /** DSRTracker component description */
1537
+ trackerDescription?: string;
1524
1538
  };
1525
1539
  breach?: {
1526
1540
  title?: string;
@@ -1530,6 +1544,18 @@ export declare interface NDPRLocale {
1530
1544
  category?: string;
1531
1545
  discoveredAt?: string;
1532
1546
  detailedDescription?: string;
1547
+ /** BreachRiskAssessment component title */
1548
+ riskAssessmentTitle?: string;
1549
+ /** BreachRiskAssessment component description */
1550
+ riskAssessmentDescription?: string;
1551
+ /** BreachNotificationManager component title */
1552
+ notificationManagerTitle?: string;
1553
+ /** BreachNotificationManager component description */
1554
+ notificationManagerDescription?: string;
1555
+ /** RegulatoryReportGenerator component title */
1556
+ regulatoryReportTitle?: string;
1557
+ /** RegulatoryReportGenerator component description */
1558
+ regulatoryReportDescription?: string;
1533
1559
  };
1534
1560
  dpia?: {
1535
1561
  title?: string;
@@ -1537,6 +1563,10 @@ export declare interface NDPRLocale {
1537
1563
  previous?: string;
1538
1564
  complete?: string;
1539
1565
  progress?: string;
1566
+ /** DPIAQuestionnaire submit button (last section) */
1567
+ submit?: string;
1568
+ /** DPIAReport main report title */
1569
+ reportTitle?: string;
1540
1570
  };
1541
1571
  policy?: {
1542
1572
  title?: string;
@@ -1545,6 +1575,38 @@ export declare interface NDPRLocale {
1545
1575
  export?: string;
1546
1576
  sections?: string;
1547
1577
  variables?: string;
1578
+ /** PolicyGenerator component title */
1579
+ generatorTitle?: string;
1580
+ /** PolicyGenerator component description */
1581
+ generatorDescription?: string;
1582
+ /** PolicyPreview component title */
1583
+ previewTitle?: string;
1584
+ /** PolicyPreview component description */
1585
+ previewDescription?: string;
1586
+ /** PolicyExporter component title */
1587
+ exporterTitle?: string;
1588
+ /** PolicyExporter component description */
1589
+ exporterDescription?: string;
1590
+ /** AdaptivePolicyWizard heading */
1591
+ wizardTitle?: string;
1592
+ };
1593
+ lawfulBasis?: {
1594
+ /** LawfulBasisTracker title */
1595
+ title?: string;
1596
+ /** LawfulBasisTracker description */
1597
+ description?: string;
1598
+ };
1599
+ crossBorder?: {
1600
+ /** CrossBorderTransferManager title */
1601
+ title?: string;
1602
+ /** CrossBorderTransferManager description */
1603
+ description?: string;
1604
+ };
1605
+ ropa?: {
1606
+ /** ROPAManager title */
1607
+ title?: string;
1608
+ /** ROPAManager description */
1609
+ description?: string;
1548
1610
  };
1549
1611
  compliance?: {
1550
1612
  score?: string;
package/dist/server.d.ts CHANGED
@@ -1505,6 +1505,12 @@ export declare interface NDPRLocale {
1505
1505
  deselectAll?: string;
1506
1506
  required?: string;
1507
1507
  cookieNotice?: string;
1508
+ /** ConsentManager component title */
1509
+ managerTitle?: string;
1510
+ /** ConsentManager component description */
1511
+ managerDescription?: string;
1512
+ /** ConsentManager reset button */
1513
+ resetToDefaults?: string;
1508
1514
  };
1509
1515
  dsr?: {
1510
1516
  title?: string;
@@ -1521,6 +1527,14 @@ export declare interface NDPRLocale {
1521
1527
  identifierValue?: string;
1522
1528
  privacyNotice?: string;
1523
1529
  successMessage?: string;
1530
+ /** DSRDashboard component title */
1531
+ dashboardTitle?: string;
1532
+ /** DSRDashboard component description */
1533
+ dashboardDescription?: string;
1534
+ /** DSRTracker component title */
1535
+ trackerTitle?: string;
1536
+ /** DSRTracker component description */
1537
+ trackerDescription?: string;
1524
1538
  };
1525
1539
  breach?: {
1526
1540
  title?: string;
@@ -1530,6 +1544,18 @@ export declare interface NDPRLocale {
1530
1544
  category?: string;
1531
1545
  discoveredAt?: string;
1532
1546
  detailedDescription?: string;
1547
+ /** BreachRiskAssessment component title */
1548
+ riskAssessmentTitle?: string;
1549
+ /** BreachRiskAssessment component description */
1550
+ riskAssessmentDescription?: string;
1551
+ /** BreachNotificationManager component title */
1552
+ notificationManagerTitle?: string;
1553
+ /** BreachNotificationManager component description */
1554
+ notificationManagerDescription?: string;
1555
+ /** RegulatoryReportGenerator component title */
1556
+ regulatoryReportTitle?: string;
1557
+ /** RegulatoryReportGenerator component description */
1558
+ regulatoryReportDescription?: string;
1533
1559
  };
1534
1560
  dpia?: {
1535
1561
  title?: string;
@@ -1537,6 +1563,10 @@ export declare interface NDPRLocale {
1537
1563
  previous?: string;
1538
1564
  complete?: string;
1539
1565
  progress?: string;
1566
+ /** DPIAQuestionnaire submit button (last section) */
1567
+ submit?: string;
1568
+ /** DPIAReport main report title */
1569
+ reportTitle?: string;
1540
1570
  };
1541
1571
  policy?: {
1542
1572
  title?: string;
@@ -1545,6 +1575,38 @@ export declare interface NDPRLocale {
1545
1575
  export?: string;
1546
1576
  sections?: string;
1547
1577
  variables?: string;
1578
+ /** PolicyGenerator component title */
1579
+ generatorTitle?: string;
1580
+ /** PolicyGenerator component description */
1581
+ generatorDescription?: string;
1582
+ /** PolicyPreview component title */
1583
+ previewTitle?: string;
1584
+ /** PolicyPreview component description */
1585
+ previewDescription?: string;
1586
+ /** PolicyExporter component title */
1587
+ exporterTitle?: string;
1588
+ /** PolicyExporter component description */
1589
+ exporterDescription?: string;
1590
+ /** AdaptivePolicyWizard heading */
1591
+ wizardTitle?: string;
1592
+ };
1593
+ lawfulBasis?: {
1594
+ /** LawfulBasisTracker title */
1595
+ title?: string;
1596
+ /** LawfulBasisTracker description */
1597
+ description?: string;
1598
+ };
1599
+ crossBorder?: {
1600
+ /** CrossBorderTransferManager title */
1601
+ title?: string;
1602
+ /** CrossBorderTransferManager description */
1603
+ description?: string;
1604
+ };
1605
+ ropa?: {
1606
+ /** ROPAManager title */
1607
+ title?: string;
1608
+ /** ROPAManager description */
1609
+ description?: string;
1548
1610
  };
1549
1611
  compliance?: {
1550
1612
  score?: string;
package/dist/server.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkR3CU7DTT_js=require('./chunk-R3CU7DTT.js'),chunkFMJ6ICLJ_js=require('./chunk-FMJ6ICLJ.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkJS7SYL5P_js=require('./chunk-JS7SYL5P.js'),chunkRDALAH3Y_js=require('./chunk-RDALAH3Y.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkC2KEXHRX_js=require('./chunk-C2KEXHRX.js'),chunkB46SJB5V_js=require('./chunk-B46SJB5V.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkOZHUINWS_js=require('./chunk-OZHUINWS.js'),chunkWKTKTLMF_js=require('./chunk-WKTKTLMF.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"apiAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.a}});Object.defineProperty(exports,"composeAdapters",{enumerable:true,get:function(){return chunkR3CU7DTT_js.c}});Object.defineProperty(exports,"memoryAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.b}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunkFMJ6ICLJ_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunkFMJ6ICLJ_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunkFMJ6ICLJ_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunkFMJ6ICLJ_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"exportDOCX",{enumerable:true,get:function(){return chunkJS7SYL5P_js.d}});Object.defineProperty(exports,"exportHTML",{enumerable:true,get:function(){return chunkJS7SYL5P_js.a}});Object.defineProperty(exports,"exportMarkdown",{enumerable:true,get:function(){return chunkJS7SYL5P_js.b}});Object.defineProperty(exports,"exportPDF",{enumerable:true,get:function(){return chunkJS7SYL5P_js.c}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunkRDALAH3Y_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"DEFAULT_DATA_CATEGORIES",{enumerable:true,get:function(){return chunk6LJHLE6G_js.d}});Object.defineProperty(exports,"UNFILLED_PREFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.a}});Object.defineProperty(exports,"UNFILLED_SUFFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"cookieAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.b}});Object.defineProperty(exports,"sessionStorageAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.a}});Object.defineProperty(exports,"validateConsent",{enumerable:true,get:function(){return chunkB46SJB5V_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkB46SJB5V_js.b}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkOZHUINWS_js.b}});Object.defineProperty(exports,"validateDsrSubmission",{enumerable:true,get:function(){return chunkOZHUINWS_js.a}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunkWKTKTLMF_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunkWKTKTLMF_js.b}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"localStorageAdapter",{enumerable:true,get:function(){return chunkVWED6UTN_js.a}});
1
+ 'use strict';var chunkR3CU7DTT_js=require('./chunk-R3CU7DTT.js'),chunk3XU6FL2I_js=require('./chunk-3XU6FL2I.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkJS7SYL5P_js=require('./chunk-JS7SYL5P.js'),chunkRDALAH3Y_js=require('./chunk-RDALAH3Y.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkC2KEXHRX_js=require('./chunk-C2KEXHRX.js'),chunkB46SJB5V_js=require('./chunk-B46SJB5V.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkOZHUINWS_js=require('./chunk-OZHUINWS.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkTTMGFC6C_js=require('./chunk-TTMGFC6C.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"apiAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.a}});Object.defineProperty(exports,"composeAdapters",{enumerable:true,get:function(){return chunkR3CU7DTT_js.c}});Object.defineProperty(exports,"memoryAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.b}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunk3XU6FL2I_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunk3XU6FL2I_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunk3XU6FL2I_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunk3XU6FL2I_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"exportDOCX",{enumerable:true,get:function(){return chunkJS7SYL5P_js.d}});Object.defineProperty(exports,"exportHTML",{enumerable:true,get:function(){return chunkJS7SYL5P_js.a}});Object.defineProperty(exports,"exportMarkdown",{enumerable:true,get:function(){return chunkJS7SYL5P_js.b}});Object.defineProperty(exports,"exportPDF",{enumerable:true,get:function(){return chunkJS7SYL5P_js.c}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunkRDALAH3Y_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"DEFAULT_DATA_CATEGORIES",{enumerable:true,get:function(){return chunk6LJHLE6G_js.d}});Object.defineProperty(exports,"UNFILLED_PREFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.a}});Object.defineProperty(exports,"UNFILLED_SUFFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"cookieAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.b}});Object.defineProperty(exports,"sessionStorageAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.a}});Object.defineProperty(exports,"validateConsent",{enumerable:true,get:function(){return chunkB46SJB5V_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkB46SJB5V_js.b}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkOZHUINWS_js.b}});Object.defineProperty(exports,"validateDsrSubmission",{enumerable:true,get:function(){return chunkOZHUINWS_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunkTTMGFC6C_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunkTTMGFC6C_js.b}});Object.defineProperty(exports,"localStorageAdapter",{enumerable:true,get:function(){return chunkVWED6UTN_js.a}});
package/dist/server.mjs CHANGED
@@ -1 +1 @@
1
- export{a as apiAdapter,c as composeAdapters,b as memoryAdapter}from'./chunk-7PMPKVY3.mjs';export{c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-5EKQX6GM.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{d as exportDOCX,a as exportHTML,b as exportMarkdown,c as exportPDF}from'./chunk-IVSNHT24.mjs';export{a as getComplianceScore}from'./chunk-7RBO42IW.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{d as DEFAULT_DATA_CATEGORIES,a as UNFILLED_PREFIX,b as UNFILLED_SUFFIX,c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as cookieAdapter,a as sessionStorageAdapter}from'./chunk-XC3DLYEG.mjs';export{a as validateConsent,b as validateConsentOptions}from'./chunk-PJNKQPQP.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequest,a as validateDsrSubmission}from'./chunk-VPNK7OID.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-RBMLGRDN.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as localStorageAdapter}from'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
1
+ export{a as apiAdapter,c as composeAdapters,b as memoryAdapter}from'./chunk-7PMPKVY3.mjs';export{c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-BGV2AKT7.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{d as exportDOCX,a as exportHTML,b as exportMarkdown,c as exportPDF}from'./chunk-IVSNHT24.mjs';export{a as getComplianceScore}from'./chunk-7RBO42IW.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{d as DEFAULT_DATA_CATEGORIES,a as UNFILLED_PREFIX,b as UNFILLED_SUFFIX,c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as cookieAdapter,a as sessionStorageAdapter}from'./chunk-XC3DLYEG.mjs';export{a as validateConsent,b as validateConsentOptions}from'./chunk-PJNKQPQP.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequest,a as validateDsrSubmission}from'./chunk-VPNK7OID.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-V5TZJJWU.mjs';export{a as localStorageAdapter}from'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
package/dist/styles.css CHANGED
@@ -389,6 +389,7 @@
389
389
  align-items: center;
390
390
  justify-content: center;
391
391
  padding: var(--ndpr-space-2) var(--ndpr-space-4);
392
+ min-height: 44px;
392
393
  border: 1px solid transparent;
393
394
  border-radius: var(--ndpr-radius);
394
395
  font-size: var(--ndpr-font-size-sm);
@@ -1203,6 +1204,7 @@
1203
1204
  justify-content: center;
1204
1205
  gap: var(--ndpr-space-2);
1205
1206
  padding: var(--ndpr-space-2) var(--ndpr-space-4);
1207
+ min-height: 44px;
1206
1208
  border: 1px solid transparent;
1207
1209
  border-radius: var(--ndpr-radius);
1208
1210
  font-size: var(--ndpr-font-size-sm);
package/dist/unstyled.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunk73BMSK67_js=require('./chunk-73BMSK67.js'),chunkD3DVVJCT_js=require('./chunk-D3DVVJCT.js');require('./chunk-L2VO3MEJ.js');var chunkTWJHEIQH_js=require('./chunk-TWJHEIQH.js');require('./chunk-UXUMYP4L.js'),require('./chunk-NDKDKDDX.js'),require('./chunk-WKTKTLMF.js'),require('./chunk-AME4HJR4.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),P=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var P__default=/*#__PURE__*/_interopDefault(P);function e(C,R){let n=d=>{var s=d,{unstyled:l=true}=s,c=chunkRFPLZDIO_js.c(s,["unstyled"]);return P__default.default.createElement(C,chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},c),{unstyled:l}))};return n.displayName=R,n}var u=e(chunkD3DVVJCT_js.a,"UnstyledConsentBanner"),y=e(chunk73BMSK67_js.a,"UnstyledConsentManager"),S=e(chunkTWJHEIQH_js.a,"UnstyledDSRRequestForm");exports.ConsentBanner=u;exports.ConsentManager=y;exports.DSRRequestForm=S;
2
+ 'use strict';var chunk42UJFTII_js=require('./chunk-42UJFTII.js'),chunkZD2W3YU2_js=require('./chunk-ZD2W3YU2.js');require('./chunk-L2VO3MEJ.js');var chunkUZNWXJ2W_js=require('./chunk-UZNWXJ2W.js');require('./chunk-UXUMYP4L.js'),require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),P=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var P__default=/*#__PURE__*/_interopDefault(P);function e(C,R){let n=d=>{var s=d,{unstyled:l=true}=s,c=chunkRFPLZDIO_js.c(s,["unstyled"]);return P__default.default.createElement(C,chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},c),{unstyled:l}))};return n.displayName=R,n}var u=e(chunkZD2W3YU2_js.a,"UnstyledConsentBanner"),y=e(chunk42UJFTII_js.a,"UnstyledConsentManager"),S=e(chunkUZNWXJ2W_js.a,"UnstyledDSRRequestForm");exports.ConsentBanner=u;exports.ConsentManager=y;exports.DSRRequestForm=S;
package/dist/unstyled.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a as a$2}from'./chunk-G7JKRYM5.mjs';import {a as a$1}from'./chunk-WYH3OA5L.mjs';import'./chunk-YTU4FNM2.mjs';import {a as a$3}from'./chunk-IPWX5I5P.mjs';import'./chunk-EWVK45Z3.mjs';import'./chunk-25TNTLHJ.mjs';import'./chunk-RBMLGRDN.mjs';import'./chunk-SFGW37LE.mjs';import {c,b,a}from'./chunk-ZJYULEER.mjs';import P from'react';function e(C,R){let n=d=>{var s=d,{unstyled:l=true}=s,c$1=c(s,["unstyled"]);return P.createElement(C,b(a({},c$1),{unstyled:l}))};return n.displayName=R,n}var u=e(a$1,"UnstyledConsentBanner"),y=e(a$2,"UnstyledConsentManager"),S=e(a$3,"UnstyledDSRRequestForm");export{u as ConsentBanner,y as ConsentManager,S as DSRRequestForm};
2
+ import {a as a$2}from'./chunk-BPMVJOHH.mjs';import {a as a$1}from'./chunk-I2ZBMR7F.mjs';import'./chunk-YTU4FNM2.mjs';import {a as a$3}from'./chunk-L3FR4PQE.mjs';import'./chunk-EWVK45Z3.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import {c,b,a}from'./chunk-ZJYULEER.mjs';import P from'react';function e(C,R){let n=d=>{var s=d,{unstyled:l=true}=s,c$1=c(s,["unstyled"]);return P.createElement(C,b(a({},c$1),{unstyled:l}))};return n.displayName=R,n}var u=e(a$1,"UnstyledConsentBanner"),y=e(a$2,"UnstyledConsentManager"),S=e(a$3,"UnstyledDSRRequestForm");export{u as ConsentBanner,y as ConsentManager,S as DSRRequestForm};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tantainnovative/ndpr-toolkit",
3
- "version": "3.11.0",
3
+ "version": "3.13.0",
4
4
  "private": false,
5
5
  "description": "Nigeria Data Protection Toolkit — enterprise-grade compliance components for the Nigeria Data Protection Act (NDPA) 2023",
6
6
  "pnpm": {