@tantainnovative/ndpr-toolkit 4.0.0 → 5.0.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.
- package/CHANGELOG.md +123 -0
- package/dist/chunk-4FXRJH37.js +1 -0
- package/dist/{chunk-3XU6FL2I.js → chunk-6YFPDGNB.js} +1 -1
- package/dist/{chunk-WMISQDSV.js → chunk-ASEUTU45.js} +1 -1
- package/dist/chunk-BRJKIF7E.mjs +1 -0
- package/dist/{chunk-XYGGUGTO.js → chunk-CSE36REY.js} +4 -4
- package/dist/chunk-DKLJ5DYN.js +1 -0
- package/dist/chunk-FRMVSG4N.mjs +1 -0
- package/dist/chunk-MAD7QYRK.js +1 -0
- package/dist/chunk-NBOJ2KGN.mjs +1 -0
- package/dist/chunk-PQ5IPUJN.mjs +1 -0
- package/dist/{chunk-BGV2AKT7.mjs → chunk-PSPYIRIF.mjs} +1 -1
- package/dist/chunk-QKXGVT2Q.js +1 -0
- package/dist/chunk-R2ZZMATR.js +1 -0
- package/dist/chunk-R3ZKV2J7.mjs +1 -0
- package/dist/chunk-RRVML7CU.mjs +1 -0
- package/dist/{chunk-NB6SKG76.mjs → chunk-SBSYHCPK.mjs} +1 -1
- package/dist/chunk-TLIHFGIJ.js +1 -0
- package/dist/{chunk-5F2IAUWJ.js → chunk-TVA6D6S4.js} +1 -1
- package/dist/{chunk-42JPSNVV.mjs → chunk-WPH6CJDL.mjs} +4 -4
- package/dist/{chunk-GUERZD4O.mjs → chunk-ZSRO4L3C.mjs} +1 -1
- package/dist/consent.d.mts +59 -19
- package/dist/consent.d.ts +59 -19
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +124 -69
- package/dist/core.d.ts +124 -69
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.d.mts +7 -6
- package/dist/cross-border.d.ts +7 -6
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/dsr.d.mts +86 -54
- package/dist/dsr.d.ts +86 -54
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/headless.d.mts +23 -9
- package/dist/headless.d.ts +23 -9
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/hooks.d.mts +23 -9
- package/dist/hooks.d.ts +23 -9
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +144 -95
- package/dist/index.d.ts +144 -95
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lawful-basis.d.mts +6 -6
- package/dist/lawful-basis.d.ts +6 -6
- package/dist/lawful-basis.js +1 -1
- package/dist/lawful-basis.mjs +1 -1
- package/dist/presets.d.mts +87 -2
- package/dist/presets.d.ts +87 -2
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/ropa-lite.d.mts +4 -1
- package/dist/ropa-lite.d.ts +4 -1
- package/dist/ropa-lite.js +1 -1
- package/dist/ropa-lite.mjs +1 -1
- package/dist/ropa.d.mts +16 -16
- package/dist/ropa.d.ts +16 -16
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -1
- package/dist/server.d.mts +123 -68
- package/dist/server.d.ts +123 -68
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/styles.css +18 -16
- package/package.json +1 -1
- package/dist/chunk-7FXNGGMO.js +0 -1
- package/dist/chunk-B46SJB5V.js +0 -1
- package/dist/chunk-BL5W472Q.js +0 -1
- package/dist/chunk-HOAC5VUF.js +0 -1
- package/dist/chunk-IHNAFXDM.mjs +0 -1
- package/dist/chunk-O2WEABB3.js +0 -1
- package/dist/chunk-OZHUINWS.js +0 -1
- package/dist/chunk-PJNKQPQP.mjs +0 -1
- package/dist/chunk-RBKFNCGO.mjs +0 -1
- package/dist/chunk-VPNK7OID.mjs +0 -1
- package/dist/chunk-WKUC65HL.mjs +0 -1
- package/dist/chunk-Z2M5VJX2.mjs +0 -1
package/dist/presets.d.ts
CHANGED
|
@@ -444,6 +444,87 @@ declare interface DPIAQuestionnaireClassNames {
|
|
|
444
444
|
progressBar?: string;
|
|
445
445
|
}
|
|
446
446
|
|
|
447
|
+
/**
|
|
448
|
+
* Represents the result of a completed DPIA
|
|
449
|
+
*/
|
|
450
|
+
declare interface DPIAResult {
|
|
451
|
+
/** Unique identifier for the DPIA */
|
|
452
|
+
id: string;
|
|
453
|
+
/** Title of the DPIA */
|
|
454
|
+
title: string;
|
|
455
|
+
/** Description of the processing activity being assessed */
|
|
456
|
+
processingDescription: string;
|
|
457
|
+
/** Timestamp when the DPIA was started */
|
|
458
|
+
startedAt: number;
|
|
459
|
+
/** Timestamp when the DPIA was completed */
|
|
460
|
+
completedAt?: number;
|
|
461
|
+
/** Person responsible for conducting the DPIA */
|
|
462
|
+
assessor: {
|
|
463
|
+
name: string;
|
|
464
|
+
role: string;
|
|
465
|
+
email: string;
|
|
466
|
+
};
|
|
467
|
+
/** Answers to all questions in the DPIA */
|
|
468
|
+
answers: Record<string, string | number | boolean | string[]>;
|
|
469
|
+
/** Risks identified in the DPIA */
|
|
470
|
+
risks: DPIARisk[];
|
|
471
|
+
/** Overall risk level of the processing activity */
|
|
472
|
+
overallRiskLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
473
|
+
/** Whether the DPIA concluded that the processing can proceed */
|
|
474
|
+
canProceed: boolean;
|
|
475
|
+
/** Reasons why the processing can or cannot proceed */
|
|
476
|
+
conclusion: string;
|
|
477
|
+
/** Recommendations for the processing activity */
|
|
478
|
+
recommendations?: string[];
|
|
479
|
+
/** Next review date for the DPIA */
|
|
480
|
+
reviewDate?: number;
|
|
481
|
+
/** Version of the DPIA questionnaire used */
|
|
482
|
+
version: string;
|
|
483
|
+
/**
|
|
484
|
+
* Whether prior consultation with NDPC is required
|
|
485
|
+
* Per NDPA Section 28(2), consultation is required when DPIA indicates high residual risk
|
|
486
|
+
*/
|
|
487
|
+
ndpcConsultationRequired?: boolean;
|
|
488
|
+
/** Date when NDPC consultation was initiated */
|
|
489
|
+
ndpcConsultationDate?: number;
|
|
490
|
+
/** Reference number from NDPC consultation */
|
|
491
|
+
ndpcConsultationReference?: string;
|
|
492
|
+
/**
|
|
493
|
+
* The lawful basis for the processing activity being assessed
|
|
494
|
+
*/
|
|
495
|
+
lawfulBasis?: string;
|
|
496
|
+
/**
|
|
497
|
+
* Whether this DPIA involves cross-border data transfers
|
|
498
|
+
*/
|
|
499
|
+
involvesCrossBorderTransfer?: boolean;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Represents a risk identified in the DPIA
|
|
504
|
+
*/
|
|
505
|
+
declare interface DPIARisk {
|
|
506
|
+
/** Unique identifier for the risk */
|
|
507
|
+
id: string;
|
|
508
|
+
/** Description of the risk */
|
|
509
|
+
description: string;
|
|
510
|
+
/** Likelihood of the risk occurring (1-5) */
|
|
511
|
+
likelihood: number;
|
|
512
|
+
/** Impact if the risk occurs (1-5) */
|
|
513
|
+
impact: number;
|
|
514
|
+
/** Overall risk score (likelihood * impact) */
|
|
515
|
+
score: number;
|
|
516
|
+
/** Risk level based on the score */
|
|
517
|
+
level: 'low' | 'medium' | 'high' | 'critical';
|
|
518
|
+
/** Measures to mitigate the risk */
|
|
519
|
+
mitigationMeasures?: string[];
|
|
520
|
+
/** Whether the risk has been mitigated */
|
|
521
|
+
mitigated: boolean;
|
|
522
|
+
/** Residual risk score after mitigation */
|
|
523
|
+
residualScore?: number;
|
|
524
|
+
/** Questions that identified this risk */
|
|
525
|
+
relatedQuestionIds: string[];
|
|
526
|
+
}
|
|
527
|
+
|
|
447
528
|
/**
|
|
448
529
|
* Represents a section in the DPIA questionnaire
|
|
449
530
|
*/
|
|
@@ -765,7 +846,11 @@ export declare interface NDPRDPIAProps {
|
|
|
765
846
|
adapter?: StorageAdapter<DPIAAnswerMap>;
|
|
766
847
|
classNames?: DPIAQuestionnaireClassNames;
|
|
767
848
|
unstyled?: boolean;
|
|
768
|
-
|
|
849
|
+
/**
|
|
850
|
+
* Fired when the questionnaire is submitted, with the full `DPIAResult`
|
|
851
|
+
* including risks, overall risk level, conclusion, and recommendations.
|
|
852
|
+
*/
|
|
853
|
+
onResult?: (result: DPIAResult) => void;
|
|
769
854
|
/**
|
|
770
855
|
* UX copy overrides — see {@link NDPRDPIACopy}.
|
|
771
856
|
*/
|
|
@@ -778,7 +863,7 @@ export declare interface NDPRDPIAProps {
|
|
|
778
863
|
* - the questionnaire does NOT require an `adapter`
|
|
779
864
|
* - on completion, the toolkit POSTs the JSON-serialised `DPIAAnswerMap`
|
|
780
865
|
* to this URL (with `Content-Type: application/json`)
|
|
781
|
-
* - your `
|
|
866
|
+
* - your `onResult` callback still fires (after the POST resolves)
|
|
782
867
|
* - submit failures are surfaced via `onSubmitError`
|
|
783
868
|
*
|
|
784
869
|
* @example
|
package/dist/presets.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var chunk63WM5PHZ_js=require('./chunk-63WM5PHZ.js'),chunkKH3EQJQE_js=require('./chunk-KH3EQJQE.js'),chunk3E4IH7CE_js=require('./chunk-3E4IH7CE.js');require('./chunk-F5MGMNQF.js');var chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkD2UWB5OI_js=require('./chunk-D2UWB5OI.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'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var W=[{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"}],Y=({categories:c=W,adapter:s,classNames:R,unstyled:h,onSubmit:a=()=>{},copy:r,description:l,submitTo:o,submitOptions:i,onSubmitError:m,onSubmitSuccess:v})=>{var t;let f=n=>chunkRFPLZDIO_js.d(null,null,function*(){var p,N;if(o){let w=typeof(i==null?void 0:i.headers)=="function"?i.headers():(p=i==null?void 0:i.headers)!=null?p:{};try{let A=yield fetch(o,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},w),credentials:(N=i==null?void 0:i.credentials)!=null?N:"same-origin",body:JSON.stringify(n)});if(!A.ok)m==null||m({response:A});else if(v){let P;try{let D=yield A.clone().text();D&&(P=JSON.parse(D));}catch(D){}v({response:A,data:n,body:P});}}catch(A){m==null||m({error:A});}}else s&&s.save(n);a(n);}),e=(t=r==null?void 0:r.description)!=null?t:l;return jsxRuntime.jsx(chunkD2UWB5OI_js.a,{categories:c,onSubmit:f,classNames:R,unstyled:h,title:r==null?void 0:r.title,description:e,submitButtonText:r==null?void 0:r.submitButton})};var J=[{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"}]}]}],Q=({sections:c=J,adapter:s,classNames:R,unstyled:h,onComplete:a=()=>{},copy:r,submitTo:l,submitOptions:o,onSubmitError:i,onSubmitSuccess:m})=>{let[v,f]=react.useState({}),[e,t]=react.useState(0),n=(P,D)=>{f(C=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},C),{[P]:D}));},p=P=>chunkRFPLZDIO_js.d(null,null,function*(){var D,C;if(l){let F=typeof(o==null?void 0:o.headers)=="function"?o.headers():(D=o==null?void 0:o.headers)!=null?D:{};try{let y=yield fetch(l,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},F),credentials:(C=o==null?void 0:o.credentials)!=null?C:"same-origin",body:JSON.stringify(P)});if(!y.ok)i==null||i({response:y});else if(m){let x;try{let B=yield y.clone().text();B&&(x=JSON.parse(B));}catch(B){}m({response:y,data:P,body:x});}}catch(y){i==null||i({error:y});}}else s&&s.save(P);a(P);}),N=()=>{e<c.length-1?t(P=>P+1):p(v);},w=()=>{e>0&&t(P=>P-1);},A=Math.round((e+1)/c.length*100);return jsxRuntime.jsx(chunkWCTFED27_js.a,{sections:c,answers:v,onAnswerChange:n,currentSectionIndex:e,onNextSection:N,onPrevSection:w,progress:A,classNames:R,unstyled:h,submitButtonText:r==null?void 0:r.submitButton,nextButtonText:r==null?void 0:r.nextButton,prevButtonText:r==null?void 0:r.prevButton})};var H=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let r=c!=null?c:[],[l,o]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return r});react.useEffect(()=>{if(!s)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let t=yield s.load();!e&&t&&o(t);}catch(t){}}),()=>{e=true;}},[s]);let i=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunk7FXNGGMO_js.a,{activities:l,onAddActivity:e=>{let t=Date.now(),n=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),p=[...l,n];o(p),i(p);},onUpdateActivity:(e,t)=>{let n=l.map(p=>p.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},p),t),{updatedAt:Date.now()}):p);o(n),i(n);},onArchiveActivity:e=>{let t=l.map(n=>n.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},n),{status:"inactive",updatedAt:Date.now()}):n);o(t),i(t);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var E=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let r=c!=null?c:[],[l,o]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return r});react.useEffect(()=>{if(!s)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let t=yield s.load();!e&&t&&o(t);}catch(t){}}),()=>{e=true;}},[s]);let i=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunkXYGGUGTO_js.a,{transfers:l,onAddTransfer:e=>{let t=Date.now(),n=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),p=[...l,n];o(p),i(p);},onUpdateTransfer:(e,t)=>{let n=l.map(p=>p.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},p),t),{updatedAt:Date.now()}):p);o(n),i(n);},onRemoveTransfer:e=>{let t=l.filter(n=>n.id!==e);o(t),i(t);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var se={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},oe=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let[r,l]=react.useState(c!=null?c:se);react.useEffect(()=>{if(!s)return;let f=false;return chunkRFPLZDIO_js.d(null,null,function*(){let t=yield s.load();!f&&t&&l(t);}),()=>{f=true;}},[s]);let o=f=>{s&&s.save(f);};return jsxRuntime.jsx(chunkBL5W472Q_js.a,{ropa:r,onAddRecord:f=>{let e=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{records:[...r.records,f],lastUpdated:Date.now()});l(e),o(e);},onUpdateRecord:(f,e)=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{records:r.records.map(n=>n.id===f?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},n),e),{updatedAt:Date.now()}):n),lastUpdated:Date.now()});l(t),o(t);},onArchiveRecord:f=>{let e=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{records:r.records.map(t=>t.id===f?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{status:"archived",updatedAt:Date.now()}):t),lastUpdated:Date.now()});l(e),o(e);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var ie=R=>{var h=R,{input:c}=h,s=chunkRFPLZDIO_js.c(h,["input"]);let a=chunkRDALAH3Y_js.a(c);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:a},s))};Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunk63WM5PHZ_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=Y;exports.NDPRComplianceDashboard=ie;exports.NDPRCrossBorder=E;exports.NDPRDPIA=Q;exports.NDPRLawfulBasis=H;exports.NDPRROPA=oe;
|
|
2
|
+
'use strict';var chunk63WM5PHZ_js=require('./chunk-63WM5PHZ.js'),chunkKH3EQJQE_js=require('./chunk-KH3EQJQE.js'),chunk3E4IH7CE_js=require('./chunk-3E4IH7CE.js');require('./chunk-F5MGMNQF.js');var chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkD2UWB5OI_js=require('./chunk-D2UWB5OI.js'),chunk4FXRJH37_js=require('./chunk-4FXRJH37.js'),chunkCSE36REY_js=require('./chunk-CSE36REY.js'),chunkMAD7QYRK_js=require('./chunk-MAD7QYRK.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'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.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'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var W=[{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"}],Y=({categories:p=W,adapter:o,classNames:P,unstyled:h,onSubmit:a=()=>{},copy:r,description:c,submitTo:s,submitOptions:i,onSubmitError:f,onSubmitSuccess:R})=>{var e;let d=n=>chunkRFPLZDIO_js.d(null,null,function*(){var u,N;if(s){let C=typeof(i==null?void 0:i.headers)=="function"?i.headers():(u=i==null?void 0:i.headers)!=null?u:{};try{let A=yield fetch(s,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},C),credentials:(N=i==null?void 0:i.credentials)!=null?N:"same-origin",body:JSON.stringify(n)});if(!A.ok)f==null||f({response:A});else if(R){let v;try{let D=yield A.clone().text();D&&(v=JSON.parse(D));}catch(D){}R({response:A,data:n,body:v});}}catch(A){f==null||f({error:A});}}else o&&o.save(n);a(n);}),t=(e=r==null?void 0:r.description)!=null?e:c;return jsxRuntime.jsx(chunkD2UWB5OI_js.a,{categories:p,onSubmit:d,classNames:P,unstyled:h,title:r==null?void 0:r.title,description:t,submitButtonText:r==null?void 0:r.submitButton})};var j=[{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"}]}]}];function J(p,o){let P=[],h=s=>{let i=o[s.id];if(i!=null&&s.riskLevel)if(["select","radio","checkbox"].includes(s.type)&&s.options)(Array.isArray(i)?i:[i]).forEach(R=>{var t;let d=(t=s.options)==null?void 0:t.find(e=>e.value===R);if(d!=null&&d.riskLevel){let e=d.riskLevel,n=e==="low"?1:e==="medium"?3:5,u=e==="low"?1:e==="medium"?3:5;P.push({id:`risk_${P.length+1}`,description:`${s.text} - ${d.label}`,likelihood:n,impact:u,score:n*u,level:e,mitigated:false,relatedQuestionIds:[s.id]});}});else {let f=s.riskLevel,R=f==="low"?1:f==="medium"?3:5,d=f==="low"?1:f==="medium"?3:5;P.push({id:`risk_${P.length+1}`,description:s.text,likelihood:R,impact:d,score:R*d,level:f,mitigated:false,relatedQuestionIds:[s.id]});}};p.forEach(s=>s.questions.forEach(h));let a=Date.now(),r={id:`dpia_${a}`,title:"",processingDescription:"",startedAt:a,completedAt:a,assessor:{name:"",role:"",email:""},answers:o,risks:P,overallRiskLevel:"low",canProceed:true,conclusion:"",version:"1.0"},c=chunkTQZWJGJ2_js.a(r);return r.overallRiskLevel=c.overallRiskLevel,r.canProceed=c.canProceed,r.conclusion=c.canProceed?"Based on the assessment, the processing can proceed with appropriate safeguards.":"Based on the assessment, the processing should not proceed without further mitigation measures.",r.recommendations=c.recommendations,r}var V=({sections:p=j,adapter:o,classNames:P,unstyled:h,onResult:a,copy:r,submitTo:c,submitOptions:s,onSubmitError:i,onSubmitSuccess:f})=>{let[R,d]=react.useState({}),[t,e]=react.useState(0),n=(v,D)=>{d(w=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},w),{[v]:D}));},u=v=>chunkRFPLZDIO_js.d(null,null,function*(){var D,w;if(c){let q=typeof(s==null?void 0:s.headers)=="function"?s.headers():(D=s==null?void 0:s.headers)!=null?D:{};try{let y=yield fetch(c,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},q),credentials:(w=s==null?void 0:s.credentials)!=null?w:"same-origin",body:JSON.stringify(v)});if(!y.ok)i==null||i({response:y});else if(f){let x;try{let B=yield y.clone().text();B&&(x=JSON.parse(B));}catch(B){}f({response:y,data:v,body:x});}}catch(y){i==null||i({error:y});}}else o&&o.save(v);a==null||a(J(p,v));}),N=()=>{t<p.length-1?e(v=>v+1):u(R);},C=()=>{t>0&&e(v=>v-1);},A=Math.round((t+1)/p.length*100);return jsxRuntime.jsx(chunkWCTFED27_js.a,{sections:p,answers:R,onAnswerChange:n,currentSectionIndex:t,onNextSection:N,onPrevSection:C,progress:A,classNames:P,unstyled:h,submitButtonText:r==null?void 0:r.submitButton,nextButtonText:r==null?void 0:r.nextButton,prevButtonText:r==null?void 0:r.prevButton})};var X=({initialData:p,adapter:o,classNames:P,unstyled:h,copy:a})=>{let r=p!=null?p:[],[c,s]=react.useState(()=>{if(o){let t=o.load();if(t&&!(t instanceof Promise))return t}return r});react.useEffect(()=>{if(!o)return;let t=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let e=yield o.load();!t&&e&&s(e);}catch(e){}}),()=>{t=true;}},[o]);let i=t=>{o&&o.save(t);};return jsxRuntime.jsx(chunk4FXRJH37_js.a,{activities:c,onAdd:t=>{let e=Date.now(),n=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{id:`activity-${e}`,createdAt:e,updatedAt:e}),u=[...c,n];s(u),i(u);},onUpdate:(t,e)=>{let n=c.map(u=>u.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},u),e),{updatedAt:Date.now()}):u);s(n),i(n);},onArchive:t=>{let e=c.map(n=>n.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},n),{status:"inactive",updatedAt:Date.now()}):n);s(e),i(e);},classNames:P,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var te=({initialData:p,adapter:o,classNames:P,unstyled:h,copy:a})=>{let r=p!=null?p:[],[c,s]=react.useState(()=>{if(o){let t=o.load();if(t&&!(t instanceof Promise))return t}return r});react.useEffect(()=>{if(!o)return;let t=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let e=yield o.load();!t&&e&&s(e);}catch(e){}}),()=>{t=true;}},[o]);let i=t=>{o&&o.save(t);};return jsxRuntime.jsx(chunkCSE36REY_js.a,{transfers:c,onAdd:t=>{let e=Date.now(),n=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{id:`transfer-${e}`,createdAt:e,updatedAt:e}),u=[...c,n];s(u),i(u);},onUpdate:(t,e)=>{let n=c.map(u=>u.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},u),e),{updatedAt:Date.now()}):u);s(n),i(n);},onArchive:t=>{let e=c.filter(n=>n.id!==t);s(e),i(e);},classNames:P,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var ae={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ie=({initialData:p,adapter:o,classNames:P,unstyled:h,copy:a})=>{let[r,c]=react.useState(p!=null?p:ae);react.useEffect(()=>{if(!o)return;let d=false;return chunkRFPLZDIO_js.d(null,null,function*(){let e=yield o.load();!d&&e&&c(e);}),()=>{d=true;}},[o]);let s=d=>{o&&o.save(d);};return jsxRuntime.jsx(chunkMAD7QYRK_js.a,{ropa:r,onAdd:d=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{records:[...r.records,d],lastUpdated:Date.now()});c(t),s(t);},onUpdate:(d,t)=>{let e=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{records:r.records.map(n=>n.id===d?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},n),t),{updatedAt:Date.now()}):n),lastUpdated:Date.now()});c(e),s(e);},onArchive:d=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{records:r.records.map(e=>e.id===d?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{status:"archived",updatedAt:Date.now()}):e),lastUpdated:Date.now()});c(t),s(t);},classNames:P,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var de=P=>{var h=P,{input:p}=h,o=chunkRFPLZDIO_js.c(h,["input"]);let a=chunkRDALAH3Y_js.a(p);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:a},o))};Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunk63WM5PHZ_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=Y;exports.NDPRComplianceDashboard=de;exports.NDPRCrossBorder=te;exports.NDPRDPIA=V;exports.NDPRLawfulBasis=X;exports.NDPRROPA=ie;
|
package/dist/presets.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{a as NDPRConsent}from'./chunk-6A6VI7ZP.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-DK7P5JEG.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 {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var W=[{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"}],Y=({categories:c=W,adapter:s,classNames:R,unstyled:h,onSubmit:a$1=()=>{},copy:r,description:l,submitTo:o,submitOptions:i,onSubmitError:m,onSubmitSuccess:v})=>{var t;let f=n=>d(null,null,function*(){var p,N;if(o){let w=typeof(i==null?void 0:i.headers)=="function"?i.headers():(p=i==null?void 0:i.headers)!=null?p:{};try{let A=yield fetch(o,{method:"POST",headers:a$3({"Content-Type":"application/json"},w),credentials:(N=i==null?void 0:i.credentials)!=null?N:"same-origin",body:JSON.stringify(n)});if(!A.ok)m==null||m({response:A});else if(v){let P;try{let D=yield A.clone().text();D&&(P=JSON.parse(D));}catch(D){}v({response:A,data:n,body:P});}}catch(A){m==null||m({error:A});}}else s&&s.save(n);a$1(n);}),e=(t=r==null?void 0:r.description)!=null?t:l;return jsx(a,{categories:c,onSubmit:f,classNames:R,unstyled:h,title:r==null?void 0:r.title,description:e,submitButtonText:r==null?void 0:r.submitButton})};var J=[{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"}]}]}],Q=({sections:c=J,adapter:s,classNames:R,unstyled:h,onComplete:a=()=>{},copy:r,submitTo:l,submitOptions:o,onSubmitError:i,onSubmitSuccess:m})=>{let[v,f]=useState({}),[e,t]=useState(0),n=(P,D)=>{f(C=>b(a$3({},C),{[P]:D}));},p=P=>d(null,null,function*(){var D,C;if(l){let F=typeof(o==null?void 0:o.headers)=="function"?o.headers():(D=o==null?void 0:o.headers)!=null?D:{};try{let y=yield fetch(l,{method:"POST",headers:a$3({"Content-Type":"application/json"},F),credentials:(C=o==null?void 0:o.credentials)!=null?C:"same-origin",body:JSON.stringify(P)});if(!y.ok)i==null||i({response:y});else if(m){let x;try{let B=yield y.clone().text();B&&(x=JSON.parse(B));}catch(B){}m({response:y,data:P,body:x});}}catch(y){i==null||i({error:y});}}else s&&s.save(P);a(P);}),N=()=>{e<c.length-1?t(P=>P+1):p(v);},w=()=>{e>0&&t(P=>P-1);},A=Math.round((e+1)/c.length*100);return jsx(a$1,{sections:c,answers:v,onAnswerChange:n,currentSectionIndex:e,onNextSection:N,onPrevSection:w,progress:A,classNames:R,unstyled:h,submitButtonText:r==null?void 0:r.submitButton,nextButtonText:r==null?void 0:r.nextButton,prevButtonText:r==null?void 0:r.prevButton})};var H=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let r=c!=null?c:[],[l,o]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return r});useEffect(()=>{if(!s)return;let e=false;return d(null,null,function*(){try{let t=yield s.load();!e&&t&&o(t);}catch(t){}}),()=>{e=true;}},[s]);let i=e=>{s&&s.save(e);};return jsx(a$2,{activities:l,onAddActivity:e=>{let t=Date.now(),n=b(a$3({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),p=[...l,n];o(p),i(p);},onUpdateActivity:(e,t)=>{let n=l.map(p=>p.id===e?b(a$3(a$3({},p),t),{updatedAt:Date.now()}):p);o(n),i(n);},onArchiveActivity:e=>{let t=l.map(n=>n.id===e?b(a$3({},n),{status:"inactive",updatedAt:Date.now()}):n);o(t),i(t);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var E=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let r=c!=null?c:[],[l,o]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return r});useEffect(()=>{if(!s)return;let e=false;return d(null,null,function*(){try{let t=yield s.load();!e&&t&&o(t);}catch(t){}}),()=>{e=true;}},[s]);let i=e=>{s&&s.save(e);};return jsx(a$4,{transfers:l,onAddTransfer:e=>{let t=Date.now(),n=b(a$3({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),p=[...l,n];o(p),i(p);},onUpdateTransfer:(e,t)=>{let n=l.map(p=>p.id===e?b(a$3(a$3({},p),t),{updatedAt:Date.now()}):p);o(n),i(n);},onRemoveTransfer:e=>{let t=l.filter(n=>n.id!==e);o(t),i(t);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var se={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},oe=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let[r,l]=useState(c!=null?c:se);useEffect(()=>{if(!s)return;let f=false;return d(null,null,function*(){let t=yield s.load();!f&&t&&l(t);}),()=>{f=true;}},[s]);let o=f=>{s&&s.save(f);};return jsx(a$5,{ropa:r,onAddRecord:f=>{let e=b(a$3({},r),{records:[...r.records,f],lastUpdated:Date.now()});l(e),o(e);},onUpdateRecord:(f,e)=>{let t=b(a$3({},r),{records:r.records.map(n=>n.id===f?b(a$3(a$3({},n),e),{updatedAt:Date.now()}):n),lastUpdated:Date.now()});l(t),o(t);},onArchiveRecord:f=>{let e=b(a$3({},r),{records:r.records.map(t=>t.id===f?b(a$3({},t),{status:"archived",updatedAt:Date.now()}):t),lastUpdated:Date.now()});l(e),o(e);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var ie=R=>{var h=R,{input:c$1}=h,s=c(h,["input"]);let a=a$6(c$1);return jsx(a$7,a$3({report:a},s))};export{Y as NDPRBreachReport,ie as NDPRComplianceDashboard,E as NDPRCrossBorder,Q as NDPRDPIA,H as NDPRLawfulBasis,oe as NDPRROPA};
|
|
2
|
+
export{a as NDPRConsent}from'./chunk-6A6VI7ZP.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-DK7P5JEG.mjs';import {a as a$2}from'./chunk-NBOJ2KGN.mjs';import {a as a$4}from'./chunk-WPH6CJDL.mjs';import {a as a$5}from'./chunk-BRJKIF7E.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 {a as a$8}from'./chunk-LRRENTT5.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 {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var W=[{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"}],Y=({categories:p=W,adapter:o,classNames:P,unstyled:h,onSubmit:a$1=()=>{},copy:r,description:c,submitTo:s,submitOptions:i,onSubmitError:f,onSubmitSuccess:R})=>{var e;let d$1=n=>d(null,null,function*(){var u,N;if(s){let C=typeof(i==null?void 0:i.headers)=="function"?i.headers():(u=i==null?void 0:i.headers)!=null?u:{};try{let A=yield fetch(s,{method:"POST",headers:a$3({"Content-Type":"application/json"},C),credentials:(N=i==null?void 0:i.credentials)!=null?N:"same-origin",body:JSON.stringify(n)});if(!A.ok)f==null||f({response:A});else if(R){let v;try{let D=yield A.clone().text();D&&(v=JSON.parse(D));}catch(D){}R({response:A,data:n,body:v});}}catch(A){f==null||f({error:A});}}else o&&o.save(n);a$1(n);}),t=(e=r==null?void 0:r.description)!=null?e:c;return jsx(a,{categories:p,onSubmit:d$1,classNames:P,unstyled:h,title:r==null?void 0:r.title,description:t,submitButtonText:r==null?void 0:r.submitButton})};var j=[{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"}]}]}];function J(p,o){let P=[],h=s=>{let i=o[s.id];if(i!=null&&s.riskLevel)if(["select","radio","checkbox"].includes(s.type)&&s.options)(Array.isArray(i)?i:[i]).forEach(R=>{var t;let d=(t=s.options)==null?void 0:t.find(e=>e.value===R);if(d!=null&&d.riskLevel){let e=d.riskLevel,n=e==="low"?1:e==="medium"?3:5,u=e==="low"?1:e==="medium"?3:5;P.push({id:`risk_${P.length+1}`,description:`${s.text} - ${d.label}`,likelihood:n,impact:u,score:n*u,level:e,mitigated:false,relatedQuestionIds:[s.id]});}});else {let f=s.riskLevel,R=f==="low"?1:f==="medium"?3:5,d=f==="low"?1:f==="medium"?3:5;P.push({id:`risk_${P.length+1}`,description:s.text,likelihood:R,impact:d,score:R*d,level:f,mitigated:false,relatedQuestionIds:[s.id]});}};p.forEach(s=>s.questions.forEach(h));let a=Date.now(),r={id:`dpia_${a}`,title:"",processingDescription:"",startedAt:a,completedAt:a,assessor:{name:"",role:"",email:""},answers:o,risks:P,overallRiskLevel:"low",canProceed:true,conclusion:"",version:"1.0"},c=a$8(r);return r.overallRiskLevel=c.overallRiskLevel,r.canProceed=c.canProceed,r.conclusion=c.canProceed?"Based on the assessment, the processing can proceed with appropriate safeguards.":"Based on the assessment, the processing should not proceed without further mitigation measures.",r.recommendations=c.recommendations,r}var V=({sections:p=j,adapter:o,classNames:P,unstyled:h,onResult:a,copy:r,submitTo:c,submitOptions:s,onSubmitError:i,onSubmitSuccess:f})=>{let[R,d$1]=useState({}),[t,e]=useState(0),n=(v,D)=>{d$1(w=>b(a$3({},w),{[v]:D}));},u=v=>d(null,null,function*(){var D,w;if(c){let q=typeof(s==null?void 0:s.headers)=="function"?s.headers():(D=s==null?void 0:s.headers)!=null?D:{};try{let y=yield fetch(c,{method:"POST",headers:a$3({"Content-Type":"application/json"},q),credentials:(w=s==null?void 0:s.credentials)!=null?w:"same-origin",body:JSON.stringify(v)});if(!y.ok)i==null||i({response:y});else if(f){let x;try{let B=yield y.clone().text();B&&(x=JSON.parse(B));}catch(B){}f({response:y,data:v,body:x});}}catch(y){i==null||i({error:y});}}else o&&o.save(v);a==null||a(J(p,v));}),N=()=>{t<p.length-1?e(v=>v+1):u(R);},C=()=>{t>0&&e(v=>v-1);},A=Math.round((t+1)/p.length*100);return jsx(a$1,{sections:p,answers:R,onAnswerChange:n,currentSectionIndex:t,onNextSection:N,onPrevSection:C,progress:A,classNames:P,unstyled:h,submitButtonText:r==null?void 0:r.submitButton,nextButtonText:r==null?void 0:r.nextButton,prevButtonText:r==null?void 0:r.prevButton})};var X=({initialData:p,adapter:o,classNames:P,unstyled:h,copy:a})=>{let r=p!=null?p:[],[c,s]=useState(()=>{if(o){let t=o.load();if(t&&!(t instanceof Promise))return t}return r});useEffect(()=>{if(!o)return;let t=false;return d(null,null,function*(){try{let e=yield o.load();!t&&e&&s(e);}catch(e){}}),()=>{t=true;}},[o]);let i=t=>{o&&o.save(t);};return jsx(a$2,{activities:c,onAdd:t=>{let e=Date.now(),n=b(a$3({},t),{id:`activity-${e}`,createdAt:e,updatedAt:e}),u=[...c,n];s(u),i(u);},onUpdate:(t,e)=>{let n=c.map(u=>u.id===t?b(a$3(a$3({},u),e),{updatedAt:Date.now()}):u);s(n),i(n);},onArchive:t=>{let e=c.map(n=>n.id===t?b(a$3({},n),{status:"inactive",updatedAt:Date.now()}):n);s(e),i(e);},classNames:P,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var te=({initialData:p,adapter:o,classNames:P,unstyled:h,copy:a})=>{let r=p!=null?p:[],[c,s]=useState(()=>{if(o){let t=o.load();if(t&&!(t instanceof Promise))return t}return r});useEffect(()=>{if(!o)return;let t=false;return d(null,null,function*(){try{let e=yield o.load();!t&&e&&s(e);}catch(e){}}),()=>{t=true;}},[o]);let i=t=>{o&&o.save(t);};return jsx(a$4,{transfers:c,onAdd:t=>{let e=Date.now(),n=b(a$3({},t),{id:`transfer-${e}`,createdAt:e,updatedAt:e}),u=[...c,n];s(u),i(u);},onUpdate:(t,e)=>{let n=c.map(u=>u.id===t?b(a$3(a$3({},u),e),{updatedAt:Date.now()}):u);s(n),i(n);},onArchive:t=>{let e=c.filter(n=>n.id!==t);s(e),i(e);},classNames:P,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var ae={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ie=({initialData:p,adapter:o,classNames:P,unstyled:h,copy:a})=>{let[r,c]=useState(p!=null?p:ae);useEffect(()=>{if(!o)return;let d$1=false;return d(null,null,function*(){let e=yield o.load();!d$1&&e&&c(e);}),()=>{d$1=true;}},[o]);let s=d=>{o&&o.save(d);};return jsx(a$5,{ropa:r,onAdd:d=>{let t=b(a$3({},r),{records:[...r.records,d],lastUpdated:Date.now()});c(t),s(t);},onUpdate:(d,t)=>{let e=b(a$3({},r),{records:r.records.map(n=>n.id===d?b(a$3(a$3({},n),t),{updatedAt:Date.now()}):n),lastUpdated:Date.now()});c(e),s(e);},onArchive:d=>{let t=b(a$3({},r),{records:r.records.map(e=>e.id===d?b(a$3({},e),{status:"archived",updatedAt:Date.now()}):e),lastUpdated:Date.now()});c(t),s(t);},classNames:P,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var de=P=>{var h=P,{input:p}=h,o=c(h,["input"]);let a=a$6(p);return jsx(a$7,a$3({report:a},o))};export{Y as NDPRBreachReport,de as NDPRComplianceDashboard,te as NDPRCrossBorder,V as NDPRDPIA,X as NDPRLawfulBasis,ie as NDPRROPA};
|
package/dist/ropa-lite.d.mts
CHANGED
|
@@ -175,7 +175,10 @@ export declare interface ROPAManagerLiteClassNames {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
export declare interface ROPAManagerLiteProps {
|
|
178
|
-
|
|
178
|
+
/**
|
|
179
|
+
* Full Record of Processing Activities — matches the full `ROPAManager` API.
|
|
180
|
+
*/
|
|
181
|
+
ropa: RecordOfProcessingActivities;
|
|
179
182
|
title?: string;
|
|
180
183
|
description?: string;
|
|
181
184
|
className?: string;
|
package/dist/ropa-lite.d.ts
CHANGED
|
@@ -175,7 +175,10 @@ export declare interface ROPAManagerLiteClassNames {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
export declare interface ROPAManagerLiteProps {
|
|
178
|
-
|
|
178
|
+
/**
|
|
179
|
+
* Full Record of Processing Activities — matches the full `ROPAManager` API.
|
|
180
|
+
*/
|
|
181
|
+
ropa: RecordOfProcessingActivities;
|
|
179
182
|
title?: string;
|
|
180
183
|
description?: string;
|
|
181
184
|
className?: string;
|
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'),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(
|
|
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(i){return i?new Date(i).toLocaleDateString():"N/A"}function G(i){return !!i.nextReviewDate&&i.nextReviewDate<=Date.now()}var I=({ropa:i,title:u,description:b,className:P="",classNames:t,unstyled:d,showSummary:L=true,showComplianceGaps:D=true,onRecordClick:l})=>{var R,y;let _=chunkYDKWD6MQ_js.c(),O=(R=u!=null?u:_.ropa.title)!=null?R:"Record of Processing Activities (ROPA)",S=(y=b!=null?b:_.ropa.description)!=null?y:"Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",x=i.records,s=react.useMemo(()=>chunk4CVBQC66_js.b(i),[i]),g=react.useMemo(()=>chunk4CVBQC66_js.d(i),[i]);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,d),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",t==null?void 0:t.header,d),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",t==null?void 0:t.title,d),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,d),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",s.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",s.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",s.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(([r,o,p,c,m])=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(r,t==null?void 0:t.summaryCard,d),children:[jsxRuntime.jsx("p",{className:m?chunkAME4HJR4_js.a(`ndpr-stat__value ${o}`,t==null?void 0:t.complianceScore,d):`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"}),B.map(r=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:w[r]}),jsxRuntime.jsx("span",{className:"font-medium",children:s.byLawfulBasis[r]||0})]},r))]}),jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",s.sensitiveDataRecords,false],["DPIA Required",s.dpiaRequiredRecords,false],["Automated Decisions",s.automatedDecisionRecords,false],["Due for Review",s.recordsDueForReview.length,s.recordsDueForReview.length>0]].map(([r,o,p])=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:r}),jsxRuntime.jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:o})]},r))]}),s.topDepartments.length>0&&jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),s.topDepartments.slice(0,5).map(r=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:r.department}),jsxRuntime.jsx("span",{className:"font-medium",children:r.count})]},r.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,d),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(r=>jsxRuntime.jsxs("div",{className:"mb-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:r.recordName}),jsxRuntime.jsx("ul",{className:"list-disc list-inside",children:r.gaps.map((o,p)=>jsxRuntime.jsx("li",{className:"text-xs ndpr-text-destructive",children:o},p))})]},r.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."]})]}),x.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,d),children:[jsxRuntime.jsx("thead",{className:chunkAME4HJR4_js.a("ndpr-table__head",t==null?void 0:t.tableHeader,d),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:x.map(r=>{let o=G(r),p=g.some(m=>m.recordId===r.id),c=!!l;return jsxRuntime.jsxs("tr",{onClick:c?()=>l==null?void 0:l(r):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(r));}: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,d),children:[jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium",children:r.name}),r.department&&jsxRuntime.jsx("p",{className:"ndpr-form-field__hint",children:r.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:w[r.lawfulBasis]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:r.dataCategories.join(", ")})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:r.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[r.status]}`,t==null?void 0:t.statusBadge,d),children:N[r.status]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:C(r.lastReviewedAt)})]},r.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;
|
package/dist/ropa-lite.mjs
CHANGED
|
@@ -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 {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(
|
|
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(i){return i?new Date(i).toLocaleDateString():"N/A"}function G(i){return !!i.nextReviewDate&&i.nextReviewDate<=Date.now()}var I=({ropa:i,title:u,description:b$1,className:P="",classNames:t,unstyled:d$1,showSummary:L=true,showComplianceGaps:D=true,onRecordClick:l})=>{var R,y;let _=c(),O=(R=u!=null?u:_.ropa.title)!=null?R:"Record of Processing Activities (ROPA)",S=(y=b$1!=null?b$1:_.ropa.description)!=null?y:"Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",x=i.records,s=useMemo(()=>b(i),[i]),g=useMemo(()=>d(i),[i]);return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${P}`,t==null?void 0:t.root,d$1),children:[jsxs("div",{className:a("",t==null?void 0:t.header,d$1),children:[jsx("h2",{className:a("ndpr-section-heading",t==null?void 0:t.title,d$1),children:O}),jsx("p",{className:"ndpr-card__subtitle",children:S})]}),L&&jsxs("div",{className:a("mb-6",t==null?void 0:t.summary,d$1),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",s.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",s.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",s.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(([r,o,p,c,m])=>jsxs("div",{className:a(r,t==null?void 0:t.summaryCard,d$1),children:[jsx("p",{className:m?a(`ndpr-stat__value ${o}`,t==null?void 0:t.complianceScore,d$1):`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"}),B.map(r=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:w[r]}),jsx("span",{className:"font-medium",children:s.byLawfulBasis[r]||0})]},r))]}),jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",s.sensitiveDataRecords,false],["DPIA Required",s.dpiaRequiredRecords,false],["Automated Decisions",s.automatedDecisionRecords,false],["Due for Review",s.recordsDueForReview.length,s.recordsDueForReview.length>0]].map(([r,o,p])=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:r}),jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:o})]},r))]}),s.topDepartments.length>0&&jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),s.topDepartments.slice(0,5).map(r=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:r.department}),jsx("span",{className:"font-medium",children:r.count})]},r.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,d$1),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(r=>jsxs("div",{className:"mb-2",children:[jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:r.recordName}),jsx("ul",{className:"list-disc list-inside",children:r.gaps.map((o,p)=>jsx("li",{className:"text-xs ndpr-text-destructive",children:o},p))})]},r.recordId)),g.length>5&&jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["...and ",g.length-5," more record(s) with gaps."]})]}),x.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,d$1),children:[jsx("thead",{className:a("ndpr-table__head",t==null?void 0:t.tableHeader,d$1),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:x.map(r=>{let o=G(r),p=g.some(m=>m.recordId===r.id),c=!!l;return jsxs("tr",{onClick:c?()=>l==null?void 0:l(r):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(r));}: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,d$1),children:[jsx("td",{className:"ndpr-table__cell",children:jsxs("div",{children:[jsx("p",{className:"font-medium",children:r.name}),r.department&&jsx("p",{className:"ndpr-form-field__hint",children:r.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:w[r.lawfulBasis]})}),jsx("td",{className:"ndpr-table__cell",children:jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:r.dataCategories.join(", ")})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:r.retentionPeriod||"N/A"}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${k[r.status]}`,t==null?void 0:t.statusBadge,d$1),children:N[r.status]})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:C(r.lastReviewedAt)})]},r.id)})})]})})]})};export{I as ROPAManagerLite};
|
package/dist/ropa.d.mts
CHANGED
|
@@ -211,17 +211,17 @@ declare interface ROPAManagerProps {
|
|
|
211
211
|
*/
|
|
212
212
|
ropa: RecordOfProcessingActivities;
|
|
213
213
|
/**
|
|
214
|
-
* Callback when a new record is added
|
|
214
|
+
* Callback when a new record is added.
|
|
215
215
|
*/
|
|
216
|
-
|
|
216
|
+
onAdd?: (record: ProcessingRecord) => void;
|
|
217
217
|
/**
|
|
218
|
-
* Callback when a record is updated
|
|
218
|
+
* Callback when a record is updated.
|
|
219
219
|
*/
|
|
220
|
-
|
|
220
|
+
onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
|
|
221
221
|
/**
|
|
222
|
-
* Callback when a record is archived
|
|
222
|
+
* Callback when a record is archived.
|
|
223
223
|
*/
|
|
224
|
-
|
|
224
|
+
onArchive?: (id: string) => void;
|
|
225
225
|
/**
|
|
226
226
|
* Title displayed on the manager
|
|
227
227
|
* @default "Record of Processing Activities (ROPA)"
|
|
@@ -257,9 +257,9 @@ export declare const ROPAProvider: React__default.FC<ROPAProviderProps>;
|
|
|
257
257
|
export declare interface ROPAProviderProps {
|
|
258
258
|
initialData: RecordOfProcessingActivities;
|
|
259
259
|
adapter?: StorageAdapter<RecordOfProcessingActivities>;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
onAdd?: (record: ProcessingRecord) => void;
|
|
261
|
+
onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
|
|
262
|
+
onArchive?: (id: string) => void;
|
|
263
263
|
children: React__default.ReactNode;
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -331,7 +331,7 @@ export declare interface StorageAdapter<T = unknown> {
|
|
|
331
331
|
* }
|
|
332
332
|
* ```
|
|
333
333
|
*/
|
|
334
|
-
export declare function useROPA({ initialData, adapter,
|
|
334
|
+
export declare function useROPA({ initialData, adapter, onAdd, onUpdate, onArchive, }: UseROPAOptions): UseROPAReturn;
|
|
335
335
|
|
|
336
336
|
export declare function useROPACompound(): ROPAContextValue;
|
|
337
337
|
|
|
@@ -347,17 +347,17 @@ export declare interface UseROPAOptions {
|
|
|
347
347
|
*/
|
|
348
348
|
adapter?: StorageAdapter<RecordOfProcessingActivities>;
|
|
349
349
|
/**
|
|
350
|
-
* Callback when a record is added
|
|
350
|
+
* Callback when a record is added.
|
|
351
351
|
*/
|
|
352
|
-
|
|
352
|
+
onAdd?: (record: ProcessingRecord) => void;
|
|
353
353
|
/**
|
|
354
|
-
* Callback when a record is updated
|
|
354
|
+
* Callback when a record is updated.
|
|
355
355
|
*/
|
|
356
|
-
|
|
356
|
+
onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
|
|
357
357
|
/**
|
|
358
|
-
* Callback when a record is archived
|
|
358
|
+
* Callback when a record is archived.
|
|
359
359
|
*/
|
|
360
|
-
|
|
360
|
+
onArchive?: (id: string) => void;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
export declare interface UseROPAReturn {
|
package/dist/ropa.d.ts
CHANGED
|
@@ -211,17 +211,17 @@ declare interface ROPAManagerProps {
|
|
|
211
211
|
*/
|
|
212
212
|
ropa: RecordOfProcessingActivities;
|
|
213
213
|
/**
|
|
214
|
-
* Callback when a new record is added
|
|
214
|
+
* Callback when a new record is added.
|
|
215
215
|
*/
|
|
216
|
-
|
|
216
|
+
onAdd?: (record: ProcessingRecord) => void;
|
|
217
217
|
/**
|
|
218
|
-
* Callback when a record is updated
|
|
218
|
+
* Callback when a record is updated.
|
|
219
219
|
*/
|
|
220
|
-
|
|
220
|
+
onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
|
|
221
221
|
/**
|
|
222
|
-
* Callback when a record is archived
|
|
222
|
+
* Callback when a record is archived.
|
|
223
223
|
*/
|
|
224
|
-
|
|
224
|
+
onArchive?: (id: string) => void;
|
|
225
225
|
/**
|
|
226
226
|
* Title displayed on the manager
|
|
227
227
|
* @default "Record of Processing Activities (ROPA)"
|
|
@@ -257,9 +257,9 @@ export declare const ROPAProvider: React__default.FC<ROPAProviderProps>;
|
|
|
257
257
|
export declare interface ROPAProviderProps {
|
|
258
258
|
initialData: RecordOfProcessingActivities;
|
|
259
259
|
adapter?: StorageAdapter<RecordOfProcessingActivities>;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
onAdd?: (record: ProcessingRecord) => void;
|
|
261
|
+
onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
|
|
262
|
+
onArchive?: (id: string) => void;
|
|
263
263
|
children: React__default.ReactNode;
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -331,7 +331,7 @@ export declare interface StorageAdapter<T = unknown> {
|
|
|
331
331
|
* }
|
|
332
332
|
* ```
|
|
333
333
|
*/
|
|
334
|
-
export declare function useROPA({ initialData, adapter,
|
|
334
|
+
export declare function useROPA({ initialData, adapter, onAdd, onUpdate, onArchive, }: UseROPAOptions): UseROPAReturn;
|
|
335
335
|
|
|
336
336
|
export declare function useROPACompound(): ROPAContextValue;
|
|
337
337
|
|
|
@@ -347,17 +347,17 @@ export declare interface UseROPAOptions {
|
|
|
347
347
|
*/
|
|
348
348
|
adapter?: StorageAdapter<RecordOfProcessingActivities>;
|
|
349
349
|
/**
|
|
350
|
-
* Callback when a record is added
|
|
350
|
+
* Callback when a record is added.
|
|
351
351
|
*/
|
|
352
|
-
|
|
352
|
+
onAdd?: (record: ProcessingRecord) => void;
|
|
353
353
|
/**
|
|
354
|
-
* Callback when a record is updated
|
|
354
|
+
* Callback when a record is updated.
|
|
355
355
|
*/
|
|
356
|
-
|
|
356
|
+
onUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
|
|
357
357
|
/**
|
|
358
|
-
* Callback when a record is archived
|
|
358
|
+
* Callback when a record is archived.
|
|
359
359
|
*/
|
|
360
|
-
|
|
360
|
+
onArchive?: (id: string) => void;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
export declare interface UseROPAReturn {
|
package/dist/ropa.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var
|
|
2
|
+
'use strict';var chunkMAD7QYRK_js=require('./chunk-MAD7QYRK.js'),chunkTLIHFGIJ_js=require('./chunk-TLIHFGIJ.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,onAdd:P,onUpdate:n,onArchive:a,children:s})=>{let R=chunkTLIHFGIJ_js.a({initialData:r,adapter:i,onAdd:P,onUpdate:n,onArchive:a});return jsxRuntime.jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:chunkMAD7QYRK_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkMAD7QYRK_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkTLIHFGIJ_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-
|
|
2
|
+
import {a}from'./chunk-BRJKIF7E.mjs';export{a as ROPAManager}from'./chunk-BRJKIF7E.mjs';import {a as a$1}from'./chunk-FRMVSG4N.mjs';export{a as useROPA}from'./chunk-FRMVSG4N.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,onAdd:P,onUpdate:n,onArchive:a,children:s})=>{let R=a$1({initialData:r,adapter:i,onAdd:P,onUpdate:n,onArchive: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};
|