@tantainnovative/ndpr-toolkit 3.5.0 → 3.5.5
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 +107 -0
- package/README.md +12 -7
- package/dist/adapters.js +1 -2
- package/dist/adapters.mjs +1 -2
- package/dist/breach.d.mts +80 -1
- package/dist/breach.d.ts +80 -1
- package/dist/breach.js +1 -2
- package/dist/breach.mjs +1 -2
- package/dist/{chunk-PATONNTZ.mjs → chunk-3HOXQNCH.mjs} +1 -2
- package/dist/{chunk-MJGOLP5M.js → chunk-3IA3KDII.js} +1 -2
- package/dist/{chunk-M2TPT5GB.js → chunk-3JPDTXGC.js} +1 -2
- package/dist/{chunk-BKRETVJ6.js → chunk-3YTAOT5O.js} +1 -2
- package/dist/{chunk-GOU6FU6Y.js → chunk-4CVBQC66.js} +1 -2
- package/dist/{chunk-E4NCJ7RD.mjs → chunk-4G3SRVRI.mjs} +1 -2
- package/dist/{chunk-6QPRDQZF.js → chunk-4QXTB3L6.js} +1 -2
- package/dist/{chunk-XNSZ7KUH.js → chunk-5GVMKUMP.js} +1 -2
- package/dist/chunk-66NQ5CVY.mjs +1 -0
- package/dist/{chunk-JBSCER34.js → chunk-6NXXQYQL.js} +1 -2
- package/dist/chunk-732C2EVN.js +1 -0
- package/dist/chunk-7BJXI2HI.mjs +1 -0
- package/dist/{chunk-C5QO3SX4.js → chunk-7IFSWCQP.js} +1 -2
- package/dist/{chunk-A4PK7JB2.js → chunk-7ZZO7GVB.js} +1 -2
- package/dist/chunk-AME4HJR4.js +1 -0
- package/dist/chunk-AOHKVFAS.mjs +322 -0
- package/dist/{chunk-HO5M7M4M.js → chunk-B46SJB5V.js} +1 -2
- package/dist/chunk-BFAX7JQA.mjs +1 -0
- package/dist/{chunk-ID2NYIVE.mjs → chunk-BNHQFZHL.mjs} +2 -3
- package/dist/{chunk-RLYTX3MM.js → chunk-BRS52EDT.js} +1 -2
- package/dist/{chunk-OPYQIJKY.js → chunk-C7IDR2IV.js} +1 -2
- package/dist/{chunk-CISJAQ6W.mjs → chunk-COD3RMTL.mjs} +1 -2
- package/dist/chunk-CR2QZTGW.js +1 -0
- package/dist/{chunk-6WIP33TW.mjs → chunk-DBZSN4WP.mjs} +1 -2
- package/dist/{chunk-74Z23WUA.mjs → chunk-EEQALYOY.mjs} +1 -2
- package/dist/chunk-EFIBHKQE.mjs +1 -0
- package/dist/{chunk-GKKAK6ES.mjs → chunk-EWVK45Z3.mjs} +1 -2
- package/dist/{chunk-QSVVAZVT.mjs → chunk-EXEXUAF6.mjs} +1 -2
- package/dist/chunk-EZCGTHQV.js +6 -0
- package/dist/{chunk-SYMQJO2W.mjs → chunk-GTYXVAJX.mjs} +2 -3
- package/dist/{chunk-6FGCGLH5.mjs → chunk-H3XJV2IR.mjs} +1 -2
- package/dist/chunk-HBLGN4SD.js +1 -0
- package/dist/{chunk-MCWV7S2G.js → chunk-HHK5LHEG.js} +1 -2
- package/dist/{chunk-XHROISIF.mjs → chunk-HWHBINVN.mjs} +1 -2
- package/dist/{chunk-3EGQWLJ6.js → chunk-I2LMQWK3.js} +2 -3
- package/dist/{chunk-NQNFS3QI.js → chunk-I3Y4LOSL.js} +4 -5
- package/dist/chunk-ITCY2Z66.mjs +4 -0
- package/dist/{chunk-Z6IIMLZU.mjs → chunk-KDAZQO3N.mjs} +1 -2
- package/dist/{chunk-J5WCPZLW.js → chunk-L2BRFMVS.js} +1 -2
- package/dist/chunk-L2VO3MEJ.js +1 -0
- package/dist/{chunk-R5FW5XUQ.mjs → chunk-LQTARVPU.mjs} +1 -2
- package/dist/{chunk-6TA2MVTU.mjs → chunk-LRRENTT5.mjs} +1 -2
- package/dist/{chunk-LIM64IV2.js → chunk-LVGT3DLT.js} +2 -3
- package/dist/{chunk-TXBZPCGF.mjs → chunk-LWIKDDSU.mjs} +1 -2
- package/dist/chunk-MPBPAEZC.mjs +1 -0
- package/dist/{chunk-Z73T6MWY.js → chunk-N3MQQUQP.js} +39 -35
- package/dist/{chunk-RY3PGVLZ.mjs → chunk-NBZUZYTB.mjs} +1 -2
- package/dist/{chunk-HGGLW5TE.js → chunk-NUWVPRNI.js} +1 -2
- package/dist/chunk-O45PKBZA.mjs +6 -0
- package/dist/chunk-O6CUBNXK.mjs +3 -0
- package/dist/{chunk-7SMLHZ4B.js → chunk-P4LNLCSF.js} +1 -2
- package/dist/{chunk-VWPGIES4.mjs → chunk-PCU6GKBE.mjs} +1 -2
- package/dist/chunk-PGI2LM6P.js +103 -0
- package/dist/{chunk-U62QYKVG.mjs → chunk-PJNKQPQP.mjs} +1 -2
- package/dist/{chunk-LSNL4XR5.js → chunk-PZRQWPWD.js} +1 -2
- package/dist/chunk-Q64735OC.js +144 -0
- package/dist/chunk-QPRYXVH2.js +1 -0
- package/dist/{chunk-MQFZHA2D.js → chunk-RFPLZDIO.js} +1 -2
- package/dist/chunk-RMQ7OLNY.mjs +144 -0
- package/dist/{chunk-2AW7KAZO.mjs → chunk-RPXRPGHL.mjs} +1 -2
- package/dist/chunk-RYREGZVQ.js +1 -0
- package/dist/{chunk-B4Z5MBUC.mjs → chunk-RZ6GC6WN.mjs} +1 -2
- package/dist/chunk-S6COXIZA.js +2 -0
- package/dist/chunk-SFGW37LE.mjs +1 -0
- package/dist/{chunk-3NQQSU4P.js → chunk-SJDDNB6M.js} +1 -2
- package/dist/{chunk-H3EYBSVP.mjs → chunk-TMXK4QKK.mjs} +2 -3
- package/dist/{chunk-P42Z5CFE.js → chunk-TQZWJGJ2.js} +1 -2
- package/dist/{chunk-EPT2K355.mjs → chunk-U5RWJRGA.mjs} +1 -2
- package/dist/{chunk-R3OYAJI6.mjs → chunk-UASG46LP.mjs} +1 -2
- package/dist/{chunk-RXL6CZAI.js → chunk-UAV7V4EM.js} +1 -2
- package/dist/chunk-UI536RU2.js +3 -0
- package/dist/{chunk-7AVN424U.js → chunk-UTFBKL73.js} +1 -2
- package/dist/{chunk-I54CDQGN.js → chunk-UXUMYP4L.js} +1 -2
- package/dist/{chunk-P3PULLYP.mjs → chunk-V7UFP6QU.mjs} +1 -2
- package/dist/{chunk-I4M2AA3N.js → chunk-VJTQXVAF.js} +1 -2
- package/dist/{chunk-ELKB2AFZ.js → chunk-VWED6UTN.js} +1 -2
- package/dist/{chunk-LU7PKE7Y.mjs → chunk-VYAL2TGT.mjs} +1 -2
- package/dist/chunk-W47OSMT6.js +2 -0
- package/dist/chunk-W65ZWTLD.mjs +1 -0
- package/dist/{chunk-5HL4UBFV.js → chunk-WDDCKYWA.js} +1 -2
- package/dist/{chunk-DJGS7SSN.mjs → chunk-WTGKZX7J.mjs} +1 -2
- package/dist/{chunk-TDDAYVKK.js → chunk-WZYCBW2R.js} +1 -2
- package/dist/chunk-X3GCGC3H.mjs +103 -0
- package/dist/chunk-XJO4DH3L.mjs +2 -0
- package/dist/{chunk-LWXZMKC2.js → chunk-XO3VQYTL.js} +7 -8
- package/dist/{chunk-IZCWCE7W.mjs → chunk-XOH4WXOZ.mjs} +1 -2
- package/dist/{chunk-SHMJNRHO.mjs → chunk-XP5PL6K7.mjs} +1 -2
- package/dist/{chunk-CKGJK4D7.mjs → chunk-Y3MKMAFQ.mjs} +2 -3
- package/dist/chunk-YFBDJ4FH.js +1 -0
- package/dist/chunk-YTU4FNM2.mjs +1 -0
- package/dist/{chunk-TV4U6AIS.js → chunk-Z763UI5U.js} +1 -2
- package/dist/chunk-ZHFLBL63.mjs +2 -0
- package/dist/{chunk-RRVKUCFR.mjs → chunk-ZIZL37BG.mjs} +1 -2
- package/dist/{chunk-WWT2ZSNU.mjs → chunk-ZJYULEER.mjs} +1 -2
- package/dist/{chunk-LJNNPAFU.mjs → chunk-ZQZJNKVB.mjs} +1 -2
- package/dist/chunk-ZVOIR4QH.js +4 -0
- package/dist/consent.js +1 -2
- package/dist/consent.mjs +1 -2
- package/dist/core.d.mts +98 -19
- package/dist/core.d.ts +98 -19
- package/dist/core.js +1 -2
- package/dist/core.mjs +1 -2
- package/dist/cross-border.d.mts +36 -14
- package/dist/cross-border.d.ts +36 -14
- package/dist/cross-border.js +1 -2
- package/dist/cross-border.mjs +1 -2
- package/dist/dpia.d.mts +4 -4
- package/dist/dpia.d.ts +4 -4
- package/dist/dpia.js +1 -2
- package/dist/dpia.mjs +1 -2
- package/dist/dsr.d.mts +30 -17
- package/dist/dsr.d.ts +30 -17
- package/dist/dsr.js +1 -2
- package/dist/dsr.mjs +1 -2
- package/dist/hooks.d.mts +113 -20
- package/dist/hooks.d.ts +113 -20
- package/dist/hooks.js +1 -2
- package/dist/hooks.mjs +1 -2
- package/dist/index.d.mts +422 -26
- package/dist/index.d.ts +422 -26
- package/dist/index.js +1 -2
- package/dist/index.mjs +1 -2
- package/dist/lawful-basis.js +1 -2
- package/dist/lawful-basis.mjs +1 -2
- package/dist/policy.js +1 -2
- package/dist/policy.mjs +1 -2
- package/dist/presets.d.mts +54 -5
- package/dist/presets.d.ts +54 -5
- package/dist/presets.js +1 -2
- package/dist/presets.mjs +1 -2
- package/dist/ropa.js +1 -2
- package/dist/ropa.mjs +1 -2
- package/dist/server.d.mts +89 -19
- package/dist/server.d.ts +89 -19
- package/dist/server.js +1 -2
- package/dist/server.mjs +1 -2
- package/dist/styles.css +34 -0
- package/dist/unstyled.d.mts +3 -1
- package/dist/unstyled.d.ts +3 -1
- package/dist/unstyled.js +1 -2
- package/dist/unstyled.mjs +1 -2
- package/package.json +59 -20
- package/dist/chunk-3VQAYQR7.js +0 -7
- package/dist/chunk-6HZL2WDU.mjs +0 -2
- package/dist/chunk-75TJPK2N.mjs +0 -2
- package/dist/chunk-ABDB7LEV.mjs +0 -2
- package/dist/chunk-AYKLAEOU.mjs +0 -2
- package/dist/chunk-C4YM4UMI.js +0 -2
- package/dist/chunk-CKJAECGV.js +0 -2
- package/dist/chunk-CPK5D5FY.js +0 -132
- package/dist/chunk-CWHBCQGT.mjs +0 -2
- package/dist/chunk-E64TU6IU.js +0 -2
- package/dist/chunk-F5TXUA4O.mjs +0 -4
- package/dist/chunk-GN5C32JB.mjs +0 -2
- package/dist/chunk-GRLIPT5V.mjs +0 -132
- package/dist/chunk-I557S566.mjs +0 -15
- package/dist/chunk-JFFOPHU3.mjs +0 -318
- package/dist/chunk-KF3EFJEF.mjs +0 -3
- package/dist/chunk-ORFC66EA.js +0 -4
- package/dist/chunk-S4GRSNB4.js +0 -2
- package/dist/chunk-SCWNM4PC.mjs +0 -2
- package/dist/chunk-SKKOMFXH.js +0 -81
- package/dist/chunk-TCN22KYP.mjs +0 -7
- package/dist/chunk-TUNQUVHU.mjs +0 -81
- package/dist/chunk-VIQUXWJC.js +0 -2
- package/dist/chunk-WTJGLNTB.js +0 -3
- package/dist/chunk-XIM7KMD6.js +0 -2
- package/dist/chunk-YPKUHSK4.js +0 -15
- package/dist/chunk-ZPKVLTSX.js +0 -2
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-IZCWCE7W.mjs.map
|
|
1
|
+
import {a}from'./chunk-SFGW37LE.mjs';import {useState,useCallback,useEffect}from'react';import {jsx,Fragment}from'react/jsx-runtime';var G=({settings:k,storageOptions:O={},onLoad:i,onSave:p,autoSave:v=true,autoLoad:w=true,classNames:u,unstyled:h,children:c})=>{let{storageKey:o="ndpr_consent",storageType:n="localStorage",cookieOptions:l={}}=O,[r,$]=useState(false),S=useCallback(()=>{let e=null;try{if(n==="localStorage"&&typeof window!="undefined"){let t=localStorage.getItem(o);t&&(e=JSON.parse(t));}else if(n==="sessionStorage"&&typeof window!="undefined"){let t=sessionStorage.getItem(o);t&&(e=JSON.parse(t));}else if(n==="cookie"&&typeof document!="undefined"){let s=document.cookie.split(";").find(a=>a.trim().startsWith(`${o}=`));if(s){let a=s.split("=")[1];e=JSON.parse(decodeURIComponent(a));}}$(!0),i&&i(e);}catch(t){console.error("[ndpr-toolkit] Error loading consent settings:",t),$(true),i&&i(null);}return e},[n,o,i]),m=useCallback(e=>{try{let t=JSON.stringify(e);if(n==="localStorage"&&typeof window!="undefined")localStorage.setItem(o,t);else if(n==="sessionStorage"&&typeof window!="undefined")sessionStorage.setItem(o,t);else if(n==="cookie"&&typeof document!="undefined"){let{domain:s,path:a="/",expires:N=365,secure:D=!0,sameSite:E="Lax"}=l,C=new Date;C.setDate(C.getDate()+N);let g=`${o}=${encodeURIComponent(t)}; path=${a}; expires=${C.toUTCString()}`;s&&(g+=`; domain=${s}`),D&&(g+="; secure"),g+=`; samesite=${E}`,document.cookie=g;}return p&&p(e),!0}catch(t){return console.error("[ndpr-toolkit] Error saving consent settings:",t),false}},[n,o,l,p]),x=useCallback(()=>{try{if(n==="localStorage"&&typeof window!="undefined")localStorage.removeItem(o);else if(n==="sessionStorage"&&typeof window!="undefined")sessionStorage.removeItem(o);else if(n==="cookie"&&typeof document!="undefined"){let{domain:e,path:t="/"}=l,s=`${o}=; path=${t}; expires=Thu, 01 Jan 1970 00:00:00 GMT`;e&&(s+=`; domain=${e}`),document.cookie=s;}return !0}catch(e){return console.error("[ndpr-toolkit] Error clearing consent settings:",e),false}},[n,o,l]);useEffect(()=>{w&&!r&&S();},[w,r,S]),useEffect(()=>{v&&r&&m(k);},[k,v,r,m]);let d=a("",u==null?void 0:u.root,h);if(typeof c=="function"){let e=c({loadSettings:S,saveSettings:m,clearSettings:x,loaded:r});return d?jsx("div",{className:d,children:e}):jsx(Fragment,{children:e})}return d?jsx("div",{className:d,children:c}):jsx(Fragment,{children:c})};export{G as a};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
var l=["consent","contract","legal_obligation","vital_interests","public_interest","legitimate_interests"];function h(e){let s=[];return (!e.id||e.id.trim()==="")&&s.push("Record ID is required."),(!e.name||e.name.trim()==="")&&s.push("Processing activity name is required."),(!e.description||e.description.trim()==="")&&s.push("Processing description is required."),e.controllerDetails?((!e.controllerDetails.name||e.controllerDetails.name.trim()==="")&&s.push("Controller name is required."),(!e.controllerDetails.contact||e.controllerDetails.contact.trim()==="")&&s.push("Controller contact is required."),(!e.controllerDetails.address||e.controllerDetails.address.trim()==="")&&s.push("Controller address is required.")):s.push("Controller details are required."),(!e.lawfulBasis||!l.includes(e.lawfulBasis))&&s.push("A valid lawful basis must be specified (NDPA Section 25)."),(!e.lawfulBasisJustification||e.lawfulBasisJustification.trim()==="")&&s.push("Lawful basis justification is required to demonstrate compliance."),(!e.purposes||e.purposes.length===0)&&s.push("At least one processing purpose must be specified."),(!e.dataCategories||e.dataCategories.length===0)&&s.push("At least one data category must be specified."),(!e.dataSubjectCategories||e.dataSubjectCategories.length===0)&&s.push("At least one data subject category must be specified."),(!e.recipients||e.recipients.length===0)&&s.push("At least one recipient or category of recipients must be specified."),(!e.retentionPeriod||e.retentionPeriod.trim()==="")&&s.push("Retention period must be specified."),(!e.securityMeasures||e.securityMeasures.length===0)&&s.push("At least one security measure must be documented."),e.dataSource||s.push("Data source must be specified."),e.dataSource==="third_party"&&(!e.thirdPartySourceDetails||e.thirdPartySourceDetails.trim()==="")&&s.push('Third-party source details are required when data source is "third_party".'),e.automatedDecisionMaking&&(!e.automatedDecisionMakingDetails||e.automatedDecisionMakingDetails.trim()==="")&&s.push("Automated decision-making details are required when automated decision-making is involved."),e.dpiaRequired&&(!e.dpiaReference||e.dpiaReference.trim()==="")&&s.push("DPIA reference is required when DPIA is marked as required."),{valid:s.length===0,errors:s}}function D(e){let s=l.reduce((a,u)=>(a[u]=0,a),{}),o=0,t=0,i=0,n=0,r=0,p=[],d={},m=Date.now();for(let a of e.records)a.lawfulBasis&&l.includes(a.lawfulBasis)&&s[a.lawfulBasis]++,a.status==="active"&&o++,a.sensitiveDataCategories&&a.sensitiveDataCategories.length>0&&t++,a.crossBorderTransfers&&a.crossBorderTransfers.length>0&&i++,a.dpiaRequired&&n++,a.automatedDecisionMaking&&r++,a.nextReviewDate&&a.nextReviewDate<=m&&p.push(a),a.department&&(d[a.department]=(d[a.department]||0)+1);let g=Object.entries(d).map(([a,u])=>({department:a,count:u})).sort((a,u)=>u.count-a.count).slice(0,10);return {totalRecords:e.records.length,activeRecords:o,byLawfulBasis:s,sensitiveDataRecords:t,crossBorderRecords:i,dpiaRequiredRecords:n,automatedDecisionRecords:r,recordsDueForReview:p,topDepartments:g,lastUpdated:e.lastUpdated}}function f(e){return /^[=+\-@\t\r]/.test(e)&&(e="'"+e),e.includes(",")||e.includes('"')||e.includes(`
|
|
2
2
|
`)||e.includes("\r")?`"${e.replace(/"/g,'""')}"`:e}function c(e){return e?new Date(e).toISOString():""}function R(e){let s=["ID","Name","Description","Controller Name","Controller Contact","Lawful Basis","Lawful Basis Justification","Purposes","Data Categories","Sensitive Data Categories","Data Subject Categories","Recipients","Cross-Border Transfers","Retention Period","Security Measures","Data Source","DPIA Required","DPIA Reference","Automated Decision-Making","Status","Department","Systems Used","Created At","Updated At","Last Reviewed At","Next Review Date"],o=e.records.map(i=>{let n=i.crossBorderTransfers?i.crossBorderTransfers.map(r=>`${r.destinationCountry} (${r.transferMechanism}: ${r.safeguards})`).join("; "):"";return [i.id,i.name,i.description,i.controllerDetails.name,i.controllerDetails.contact,i.lawfulBasis,i.lawfulBasisJustification,i.purposes.join("; "),i.dataCategories.join("; "),(i.sensitiveDataCategories||[]).join("; "),i.dataSubjectCategories.join("; "),i.recipients.join("; "),n,i.retentionPeriod,i.securityMeasures.join("; "),i.dataSource,i.dpiaRequired?"Yes":"No",i.dpiaReference||"",i.automatedDecisionMaking?"Yes":"No",i.status,i.department||"",(i.systemsUsed||[]).join("; "),c(i.createdAt),c(i.updatedAt),c(i.lastReviewedAt),c(i.nextReviewDate)].map(r=>f(String(r)))});return [s.map(i=>f(i)).join(","),...o.map(i=>i.join(","))].join(`
|
|
3
|
-
`)}function w(e){let s=[],o=Date.now();for(let t of e.records){let i=[];if((!t.lawfulBasisJustification||t.lawfulBasisJustification.trim()==="")&&i.push("Missing lawful basis justification (NDPA Section 25 requires documented justification)."),(!t.retentionPeriod||t.retentionPeriod.trim()==="")&&i.push("Missing retention period (data must not be kept longer than necessary)."),(!t.securityMeasures||t.securityMeasures.length===0)&&i.push("No security measures documented (NDPA requires appropriate technical and organizational measures)."),t.nextReviewDate&&t.nextReviewDate<=o){let n=Math.ceil((o-t.nextReviewDate)/864e5);i.push(`Review is overdue by ${n} day${n!==1?"s":""}.`);}if(t.dpiaRequired&&(!t.dpiaReference||t.dpiaReference.trim()==="")&&i.push("DPIA is required but no reference to a completed DPIA was provided."),t.automatedDecisionMaking&&(!t.automatedDecisionMakingDetails||t.automatedDecisionMakingDetails.trim()==="")&&i.push("Automated decision-making is flagged but no details are documented."),t.crossBorderTransfers)for(let n of t.crossBorderTransfers)(!n.safeguards||n.safeguards.trim()==="")&&i.push(`Cross-border transfer to ${n.destinationCountry} is missing safeguard documentation.`),(!n.transferMechanism||n.transferMechanism.trim()==="")&&i.push(`Cross-border transfer to ${n.destinationCountry} is missing transfer mechanism.`);t.dataSource==="third_party"&&(!t.thirdPartySourceDetails||t.thirdPartySourceDetails.trim()==="")&&i.push('Data source is "third_party" but no source details are provided.'),(!t.purposes||t.purposes.length===0)&&i.push("No processing purposes specified."),(!t.recipients||t.recipients.length===0)&&i.push("No recipients or categories of recipients specified."),i.length>0&&s.push({recordId:t.id,recordName:t.name,gaps:i});}return s}export{h as a,D as b,R as c,w as d}
|
|
4
|
-
//# sourceMappingURL=chunk-SHMJNRHO.mjs.map
|
|
3
|
+
`)}function w(e){let s=[],o=Date.now();for(let t of e.records){let i=[];if((!t.lawfulBasisJustification||t.lawfulBasisJustification.trim()==="")&&i.push("Missing lawful basis justification (NDPA Section 25 requires documented justification)."),(!t.retentionPeriod||t.retentionPeriod.trim()==="")&&i.push("Missing retention period (data must not be kept longer than necessary)."),(!t.securityMeasures||t.securityMeasures.length===0)&&i.push("No security measures documented (NDPA requires appropriate technical and organizational measures)."),t.nextReviewDate&&t.nextReviewDate<=o){let n=Math.ceil((o-t.nextReviewDate)/864e5);i.push(`Review is overdue by ${n} day${n!==1?"s":""}.`);}if(t.dpiaRequired&&(!t.dpiaReference||t.dpiaReference.trim()==="")&&i.push("DPIA is required but no reference to a completed DPIA was provided."),t.automatedDecisionMaking&&(!t.automatedDecisionMakingDetails||t.automatedDecisionMakingDetails.trim()==="")&&i.push("Automated decision-making is flagged but no details are documented."),t.crossBorderTransfers)for(let n of t.crossBorderTransfers)(!n.safeguards||n.safeguards.trim()==="")&&i.push(`Cross-border transfer to ${n.destinationCountry} is missing safeguard documentation.`),(!n.transferMechanism||n.transferMechanism.trim()==="")&&i.push(`Cross-border transfer to ${n.destinationCountry} is missing transfer mechanism.`);t.dataSource==="third_party"&&(!t.thirdPartySourceDetails||t.thirdPartySourceDetails.trim()==="")&&i.push('Data source is "third_party" but no source details are provided.'),(!t.purposes||t.purposes.length===0)&&i.push("No processing purposes specified."),(!t.recipients||t.recipients.length===0)&&i.push("No recipients or categories of recipients specified."),i.length>0&&s.push({recordId:t.id,recordName:t.name,gaps:i});}return s}export{h as a,D as b,R as c,w as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-RMQ7OLNY.mjs';import {a}from'./chunk-ZJYULEER.mjs';function s(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(e){let n=new Set,o=new RegExp(`${s(a$1)}([^${s("\xBB")}]+)${s("\xBB")}`,"g"),i;for(;(i=o.exec(e))!==null;)n.add(i[1].trim());let r=/\{\{\s*([^}\s]+)\s*\}\}/g;for(;(i=r.exec(e))!==null;)n.add(i[1].trim());return Array.from(n)}function P(e,n){if(typeof e=="string"){let o=e,i=n,r=o,c=/\{\{([^}]+)\}\}/g,d;for(;(d=c.exec(o))!==null;){let t=d[1].trim(),a=i[t]||"";r=r.replace(new RegExp(`\\{\\{\\s*${s(t)}\\s*\\}\\}`,"g"),a);}return r}else {let o=e,i=n,r={},c=[];return o.filter(t=>t.included).sort((t,a)=>(t.order||0)-(a.order||0)).forEach(t=>{let a=t.template||t.customContent||t.defaultContent||"",y=/\{\{([^}]+)\}\}/g,m,h=[];for(;(m=y.exec(a))!==null;)h.push(m[1].trim());h.forEach(l=>{let u="";l in i&&(u=i[l]||""),u||c.push(l),a=a.replace(new RegExp(`\\{\\{\\s*${s(l)}\\s*\\}\\}`,"g"),u);}),r[t.id]=a;}),{fullText:Object.values(r).join(`
|
|
2
2
|
|
|
3
3
|
`),sectionTexts:r,missingVariables:Array.from(new Set(c))}}}var w=[{id:"data-collection",title:"Data Collection",description:"Describes what personal data is collected and how it is obtained.",order:1,required:true,included:true,template:'{{orgName}} ("we", "us", or "our") collects personal data from users of our services at {{website}}. We collect information you provide directly, such as your name, email address, phone number, and any other details you submit through forms or communications. We may also collect data automatically, including IP addresses, browser type, device information, and usage patterns through cookies and similar technologies. All data collection is conducted in accordance with the Nigeria Data Protection Act (NDPA) 2023.',variables:["orgName","website"]},{id:"legal-basis",title:"Legal Basis for Processing",description:"Specifies the lawful basis for processing personal data under the NDPA.",order:2,required:true,included:true,template:`{{orgName}} processes personal data under one or more of the following lawful bases as prescribed by the NDPA 2023:
|
|
4
4
|
|
|
@@ -59,5 +59,4 @@ DPO Email: {{dpoEmail}}
|
|
|
59
59
|
|
|
60
60
|
You also have the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC) if you believe your data protection rights have been violated.
|
|
61
61
|
|
|
62
|
-
This policy is effective as of {{effectiveDate}} and applies to all {{industry}} services provided by {{orgName}}.`,variables:["orgName","address","privacyEmail","website","dpoName","dpoEmail","effectiveDate","industry"]}],v=[{id:"orgName",name:"orgName",description:"The official name of your organisation.",value:"",inputType:"text",required:true},{id:"website",name:"website",description:"Your organisation's website URL.",value:"",inputType:"url",required:true},{id:"privacyEmail",name:"privacyEmail",description:"Email address for privacy-related enquiries.",value:"",inputType:"email",required:true},{id:"dpoName",name:"dpoName",description:"Full name of your Data Protection Officer.",value:"",inputType:"text",required:false},{id:"dpoEmail",name:"dpoEmail",description:"Email address of your Data Protection Officer.",value:"",inputType:"email",required:false},{id:"address",name:"address",description:"Physical address of your organisation.",value:"",inputType:"textarea",required:false},{id:"industry",name:"industry",description:"The industry or sector your organisation operates in.",value:"",inputType:"text",required:false},{id:"effectiveDate",name:"effectiveDate",description:"The date this privacy policy becomes effective.",value:"",inputType:"date",required:false}];function N(){return {sections:w.map(e=>a({},e)),variables:v.map(e=>a({},e))}}export{q as a,P as b,w as c,v as d,N as e}
|
|
63
|
-
//# sourceMappingURL=chunk-CKGJK4D7.mjs.map
|
|
62
|
+
This policy is effective as of {{effectiveDate}} and applies to all {{industry}} services provided by {{orgName}}.`,variables:["orgName","address","privacyEmail","website","dpoName","dpoEmail","effectiveDate","industry"]}],v=[{id:"orgName",name:"orgName",description:"The official name of your organisation.",value:"",inputType:"text",required:true},{id:"website",name:"website",description:"Your organisation's website URL.",value:"",inputType:"url",required:true},{id:"privacyEmail",name:"privacyEmail",description:"Email address for privacy-related enquiries.",value:"",inputType:"email",required:true},{id:"dpoName",name:"dpoName",description:"Full name of your Data Protection Officer.",value:"",inputType:"text",required:false},{id:"dpoEmail",name:"dpoEmail",description:"Email address of your Data Protection Officer.",value:"",inputType:"email",required:false},{id:"address",name:"address",description:"Physical address of your organisation.",value:"",inputType:"textarea",required:false},{id:"industry",name:"industry",description:"The industry or sector your organisation operates in.",value:"",inputType:"text",required:false},{id:"effectiveDate",name:"effectiveDate",description:"The date this privacy policy becomes effective.",value:"",inputType:"date",required:false}];function N(){return {sections:w.map(e=>a({},e)),variables:v.map(e=>a({},e))}}export{q as a,P as b,w as c,v as d,N as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var n={AT:{country:"Austria",isoCode:"AT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},BE:{country:"Belgium",isoCode:"BE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},BG:{country:"Bulgaria",isoCode:"BG",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},HR:{country:"Croatia",isoCode:"HR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},CY:{country:"Cyprus",isoCode:"CY",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},CZ:{country:"Czech Republic",isoCode:"CZ",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},DK:{country:"Denmark",isoCode:"DK",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},EE:{country:"Estonia",isoCode:"EE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},FI:{country:"Finland",isoCode:"FI",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},FR:{country:"France",isoCode:"FR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},DE:{country:"Germany",isoCode:"DE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR with additional national provisions (BDSG).",lastUpdated:"2024-01-01"},GR:{country:"Greece",isoCode:"GR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},HU:{country:"Hungary",isoCode:"HU",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},IE:{country:"Ireland",isoCode:"IE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR. Hosts many multinational data processors.",lastUpdated:"2024-01-01"},IT:{country:"Italy",isoCode:"IT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},LV:{country:"Latvia",isoCode:"LV",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},LT:{country:"Lithuania",isoCode:"LT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},LU:{country:"Luxembourg",isoCode:"LU",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},MT:{country:"Malta",isoCode:"MT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},NL:{country:"Netherlands",isoCode:"NL",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},PL:{country:"Poland",isoCode:"PL",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},PT:{country:"Portugal",isoCode:"PT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},RO:{country:"Romania",isoCode:"RO",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},SK:{country:"Slovakia",isoCode:"SK",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},SI:{country:"Slovenia",isoCode:"SI",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},ES:{country:"Spain",isoCode:"ES",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},SE:{country:"Sweden",isoCode:"SE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},IS:{country:"Iceland",isoCode:"IS",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EEA member; GDPR applies through EEA Agreement.",lastUpdated:"2024-01-01"},LI:{country:"Liechtenstein",isoCode:"LI",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EEA member; GDPR applies through EEA Agreement.",lastUpdated:"2024-01-01"},NO:{country:"Norway",isoCode:"NO",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EEA member; GDPR applies through EEA Agreement.",lastUpdated:"2024-01-01"},GB:{country:"United Kingdom",isoCode:"GB",adequacyStatus:"adequate",recognizedBy:"self-assessment",notes:"Protected by UK GDPR and the Data Protection Act 2018. EU adequacy decision granted post-Brexit.",lastUpdated:"2024-01-01"},US:{country:"United States",isoCode:"US",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"No comprehensive federal data protection law. Adequacy depends on transfer mechanism used (e.g. EU-US Data Privacy Framework, standard contractual clauses). Sector-specific laws exist (HIPAA, CCPA, etc.).",lastUpdated:"2024-01-01"},CA:{country:"Canada",isoCode:"CA",adequacyStatus:"adequate",recognizedBy:"self-assessment",notes:"Protected by PIPEDA (Personal Information Protection and Electronic Documents Act) and provincial privacy laws. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},ZA:{country:"South Africa",isoCode:"ZA",adequacyStatus:"adequate",recognizedBy:"self-assessment",notes:"Protected by POPIA (Protection of Personal Information Act, 2013). Comprehensive data protection framework with an independent Information Regulator.",lastUpdated:"2024-01-01"},GH:{country:"Ghana",isoCode:"GH",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Data Protection Act 2012 (Act 843) establishes a data protection framework. Enforcement capacity is still developing.",lastUpdated:"2024-01-01"},KE:{country:"Kenya",isoCode:"KE",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Data Protection Act 2019 provides a modern framework. The Office of the Data Protection Commissioner is operational but still maturing.",lastUpdated:"2024-01-01"},RW:{country:"Rwanda",isoCode:"RW",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Law No. 058/2021 on the Protection of Personal Data and Privacy. Framework is relatively new.",lastUpdated:"2024-01-01"},EG:{country:"Egypt",isoCode:"EG",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Personal Data Protection Law No. 151 of 2020. Implementation and enforcement are still in early stages.",lastUpdated:"2024-01-01"},TZ:{country:"Tanzania",isoCode:"TZ",adequacyStatus:"not_adequate",recognizedBy:"self-assessment",notes:"No comprehensive data protection legislation in force.",lastUpdated:"2024-01-01"},UG:{country:"Uganda",isoCode:"UG",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Data Protection and Privacy Act 2019 provides a framework, but enforcement capacity is limited.",lastUpdated:"2024-01-01"},SN:{country:"Senegal",isoCode:"SN",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Law No. 2008-12 on the Protection of Personal Data. One of the earlier African data protection laws.",lastUpdated:"2024-01-01"},MA:{country:"Morocco",isoCode:"MA",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Law No. 09-08 on the Protection of Individuals with Regard to the Processing of Personal Data (2009). Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},MU:{country:"Mauritius",isoCode:"MU",adequacyStatus:"adequate",recognizedBy:"self-assessment",notes:"Data Protection Act 2017 provides a comprehensive framework modelled on international standards.",lastUpdated:"2024-01-01"},CN:{country:"China",isoCode:"CN",adequacyStatus:"not_adequate",recognizedBy:"self-assessment",notes:"Personal Information Protection Law (PIPL) enacted in 2021 but government access provisions and limited independent oversight raise concerns. Transfers require security assessments or standard contracts.",lastUpdated:"2024-01-01"},IN:{country:"India",isoCode:"IN",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Digital Personal Data Protection Act 2023 enacted. Implementation rules and enforcement mechanisms are still being finalized.",lastUpdated:"2024-01-01"},SG:{country:"Singapore",isoCode:"SG",adequacyStatus:"adequate",recognizedBy:"self-assessment",notes:"Personal Data Protection Act 2012 (PDPA) provides a robust framework. Strong enforcement by the PDPC.",lastUpdated:"2024-01-01"},JP:{country:"Japan",isoCode:"JP",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Act on the Protection of Personal Information (APPI). Recognized as adequate by the EU under mutual adequacy arrangement.",lastUpdated:"2024-01-01"},KR:{country:"South Korea",isoCode:"KR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Personal Information Protection Act (PIPA). Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},AE:{country:"United Arab Emirates",isoCode:"AE",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Federal Decree-Law No. 45 of 2021 on Personal Data Protection. DIFC and ADGM free zones have their own data protection regulations with stronger frameworks.",lastUpdated:"2024-01-01"},SA:{country:"Saudi Arabia",isoCode:"SA",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Personal Data Protection Law (Royal Decree M/19, 2021). Framework is new and enforcement is still developing.",lastUpdated:"2024-01-01"},IL:{country:"Israel",isoCode:"IL",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Protection of Privacy Law 5741-1981 and regulations. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},BR:{country:"Brazil",isoCode:"BR",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Lei Geral de Protecao de Dados (LGPD, 2020) provides a comprehensive framework. The ANPD is actively enforcing.",lastUpdated:"2024-01-01"},AR:{country:"Argentina",isoCode:"AR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Personal Data Protection Act No. 25,326. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},AU:{country:"Australia",isoCode:"AU",adequacyStatus:"partially_adequate",recognizedBy:"self-assessment",notes:"Privacy Act 1988 provides protection but does not fully align with GDPR-level standards. Reform efforts are ongoing.",lastUpdated:"2024-01-01"},NZ:{country:"New Zealand",isoCode:"NZ",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Privacy Act 2020 provides a comprehensive framework. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},CH:{country:"Switzerland",isoCode:"CH",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Federal Act on Data Protection (FADP, revised 2023). Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},RU:{country:"Russia",isoCode:"RU",adequacyStatus:"not_adequate",recognizedBy:"self-assessment",notes:"Federal Law on Personal Data (No. 152-FZ). Data localization requirements and government access concerns.",lastUpdated:"2024-01-01"}};function y(e){let t=e.trim().toUpperCase();if(n[t])return n[t];let a=e.trim().toLowerCase();for(let s of Object.values(n))if(s.country.toLowerCase()===a)return s}function q(){return Object.values(n).filter(e=>e.adequacyStatus==="adequate")}function g(e){let t=y(e);return t?t.adequacyStatus!=="adequate":true}function u(e){return e==="standard_clauses"||e==="binding_corporate_rules"||e==="ndpc_authorization"}function f(e){return {adequacy_decision:"Adequacy Decision (NDPA Section 42) \u2014 Transfer to a country, region, or specified sector that the NDPC has determined provides an adequate level of data protection.",standard_clauses:"Standard Contractual Clauses (NDPA Section 41(1)(a)) \u2014 Transfer based on contractual clauses that afford adequate protection. The NDPC may approve such clauses under Section 42(4)\u2013(5).",binding_corporate_rules:"Binding Corporate Rules (NDPA Section 41(1)(a)) \u2014 Transfer within a group of undertakings based on binding corporate rules that afford adequate protection. The NDPC may approve BCRs under Section 42(5).",ndpc_authorization:"NDPC-Approved Instrument (NDPA Section 42(5)) \u2014 Transfer authorized by an NDPC-approved code of conduct, certification mechanism, or similar instrument that meets the protection standards of the Act.",explicit_consent:"Explicit Consent (NDPA Section 43(1)(a)) \u2014 Transfer based on the consent of the data subject after being informed of the possible risks due to the absence of adequate protections.",contract_performance:"Contract Performance (NDPA Section 43(1)(b)) \u2014 Transfer necessary for the performance of a contract to which the data subject is a party, or for pre-contractual steps at the data subject's request.",public_interest:"Public Interest (NDPA Section 43(1)(d)) \u2014 Transfer necessary for important reasons of public interest.",legal_claims:"Legal Claims (NDPA Section 43(1)(e)) \u2014 Transfer necessary for the establishment, exercise, or defense of legal claims.",vital_interests:"Vital Interests (NDPA Section 43(1)(f)) \u2014 Transfer necessary to protect the vital interests of a data subject or of other persons where the data subject is physically or legally incapable of giving consent."}[e]}function U(e){var s,r;let t=[],a=[];return e.id||t.push("Transfer ID is required."),(!e.destinationCountry||e.destinationCountry.trim()==="")&&t.push("Destination country is required."),(!e.recipientOrganization||e.recipientOrganization.trim()==="")&&t.push("Recipient organization is required."),(!((s=e.recipientContact)!=null&&s.name)||e.recipientContact.name.trim()==="")&&t.push("Recipient contact name is required."),(!((r=e.recipientContact)!=null&&r.email)||e.recipientContact.email.trim()==="")&&t.push("Recipient contact email is required."),(!e.purpose||e.purpose.trim()==="")&&t.push("Purpose of the transfer is required."),e.transferMechanism||t.push("Transfer mechanism is required."),(!e.dataCategories||e.dataCategories.length===0)&&t.push("At least one data category must be specified."),(!e.riskAssessment||e.riskAssessment.trim()==="")&&t.push("Risk assessment summary is required."),(!e.safeguards||e.safeguards.length===0)&&t.push("At least one safeguard must be documented for the transfer."),u(e.transferMechanism)&&(e.ndpcApproval?(e.ndpcApproval.required||a.push("NDPC approval is marked as not required, but the selected transfer mechanism requires NDPC approval."),e.ndpcApproval.required&&!e.ndpcApproval.applied&&t.push("NDPC approval is required but an application has not been submitted."),e.ndpcApproval.applied&&!e.ndpcApproval.approved&&e.status==="active"&&t.push('Transfer is marked as active but NDPC approval has not been granted. Status should be "pending_approval".')):t.push(`NDPC approval documentation is required for transfers using ${l(e.transferMechanism)}.`)),e.tiaCompleted||a.push("A Transfer Impact Assessment (TIA) has not been completed for this transfer."),e.adequacyStatus==="inadequate"&&e.transferMechanism==="adequacy_decision"&&t.push("Cannot rely on adequacy decision (Section 42) when the destination country is marked as inadequate."),e.endDate&&e.startDate>e.endDate&&t.push("Start date must be before end date."),e.includesSensitiveData&&e.riskLevel!=="high"&&a.push("Transfer includes sensitive personal data but the risk level is not set to high. Consider reviewing the risk assessment."),e.reviewDate||a.push("No review date has been set for this transfer. Periodic reviews are recommended."),{isValid:t.length===0,errors:t,warnings:a}}function b(e){var d,c;let t=[],a=[],s=0,p={adequate:0,pending_review:2,unknown:3,inadequate:4}[e.adequacyStatus];s+=p,e.adequacyStatus==="inadequate"?(t.push("Destination country does not have an adequate level of data protection."),a.push("Implement supplementary technical and organizational measures.")):e.adequacyStatus==="unknown"?(t.push("Data protection adequacy of the destination country has not been assessed."),a.push("Conduct an adequacy assessment of the destination country.")):e.adequacyStatus==="pending_review"&&(t.push("Destination country adequacy is currently under review."),a.push("Monitor the adequacy review outcome and plan for contingencies."));let i={adequacy_decision:0,standard_clauses:1,binding_corporate_rules:1,ndpc_authorization:1,contract_performance:2,explicit_consent:2,legal_claims:2,public_interest:2,vital_interests:3}[e.transferMechanism];s+=i,i>=2&&(t.push(`Transfer relies on a derogation mechanism (${l(e.transferMechanism)}), which provides fewer structural safeguards.`),a.push("Consider whether a stronger transfer mechanism (adequacy decision, standard clauses, or BCRs) could be used instead.")),e.includesSensitiveData&&(s+=3,t.push("Transfer includes sensitive personal data, increasing the potential impact of unauthorized access."),a.push("Ensure encryption in transit and at rest, and apply strict access controls.")),e.estimatedDataSubjects&&e.estimatedDataSubjects>1e4?(s+=2,t.push("Large number of data subjects involved increases the scope of potential harm."),a.push("Consider data minimization strategies and ensure robust incident response procedures.")):e.estimatedDataSubjects&&e.estimatedDataSubjects>1e3&&(s+=1,t.push("Moderate number of data subjects involved.")),e.tiaCompleted||(s+=2,t.push("Transfer Impact Assessment has not been completed."),a.push("Complete a Transfer Impact Assessment before proceeding with the transfer.")),u(e.transferMechanism)&&((d=e.ndpcApproval)!=null&&d.approved||(s+=2,t.push("NDPC approval is required but has not been granted."),a.push("Obtain NDPC approval before activating the transfer."))),(((c=e.safeguards)==null?void 0:c.length)||0)<3&&(s+=1,t.push("Limited number of safeguards documented."),a.push("Document additional technical, organizational, and contractual safeguards.")),e.frequency==="continuous"&&(s+=1,t.push("Continuous data transfer increases exposure window."),a.push("Implement real-time monitoring and anomaly detection for the transfer."));let o;return s<=4?o="low":s<=9?o="medium":o="high",{riskLevel:o,riskScore:s,factors:t,recommendations:a}}function l(e){return {adequacy_decision:"Adequacy Decision",standard_clauses:"Standard Contractual Clauses",binding_corporate_rules:"Binding Corporate Rules",ndpc_authorization:"NDPC Authorization",explicit_consent:"Explicit Consent",contract_performance:"Contract Performance",public_interest:"Public Interest",legal_claims:"Legal Claims",vital_interests:"Vital Interests"}[e]}exports.a=n;exports.b=y;exports.c=q;exports.d=g;exports.e=u;exports.f=f;exports.g=U;exports.h=b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {useRef,useEffect}from'react';var m='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function v(p){let{active:c,onEscape:o,autoFocus:r=true}=p,t=useRef(null),s=useRef(null);return useEffect(()=>{if(!c||(s.current=typeof document!="undefined"?document.activeElement:null,!t.current))return;let i=false,u;r&&(u=setTimeout(()=>{if(i||!t.current)return;let e=t.current.querySelectorAll(m);e.length>0?e[0].focus():(t.current.tabIndex<0&&(t.current.tabIndex=-1),t.current.focus());},0));let l=e=>{if(e.key==="Escape"&&o){o();return}if(e.key!=="Tab"||!t.current)return;let n=t.current.querySelectorAll(m);if(n.length===0)return;let f=n[0],a=n[n.length-1];e.shiftKey?document.activeElement===f&&(e.preventDefault(),a.focus()):document.activeElement===a&&(e.preventDefault(),f.focus());};return document.addEventListener("keydown",l),()=>{i=true,u&&clearTimeout(u),document.removeEventListener("keydown",l);let e=s.current;e&&typeof document!="undefined"&&document.contains(e)&&typeof e.focus=="function"&&e.focus();}},[c,o,r]),t}export{v as a};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
//# sourceMappingURL=chunk-TV4U6AIS.js.map
|
|
1
|
+
'use strict';var chunkLVGT3DLT_js=require('./chunk-LVGT3DLT.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react');function W(e,s){return s?chunkVWED6UTN_js.a(e):{load:()=>null,save:()=>{},remove:()=>{}}}function A({templates:e,initialPolicy:s,adapter:y,storageKey:l="ndpr_privacy_policy",persist:f,useLocalStorage:D,onGenerate:T}){var V;let O=(V=f!=null?f:D)!=null?V:true,w=y!=null?y:W(l,O),c=react.useRef(w);c.current=w;let[n,p]=react.useState(s||null),[o,g]=react.useState(null),[u,S]=react.useState({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),[C,E]=react.useState(true),R=react.useRef(e);R.current=e,react.useEffect(()=>{if(s){E(false);return}let t=false;try{let r=c.current.load(),i=a=>{if(a){if(p(a),a.templateId){let P=R.current.find(b=>b.id===a.templateId);P&&g(P);}a.organizationInfo&&S(a.organizationInfo);}E(!1);};r instanceof Promise?r.then(a=>{t||i(a);},()=>{t||E(!1);}):i(r);}catch(r){t||E(false);}return ()=>{t=true;}},[s]);let k=t=>{Promise.resolve(c.current.save(t)).catch(r=>{console.warn("[ndpr-toolkit] Failed to save policy:",r);});},j=react.useCallback(t=>{let r=e.find(b=>b.id===t);if(!r)return false;g(r);let i=r.sections.map(b=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},b),{customContent:void 0})),a={};Object.keys(r.variables).forEach(b=>{a[b]=r.variables[b].defaultValue||"";});let P=Date.now();return p({id:"policy_"+P+"_"+Math.random().toString(36).substr(2,9),title:"",templateId:r.id,organizationInfo:u,sections:i,variableValues:a,effectiveDate:P,lastUpdated:P,version:"1.0"}),true},[e,u]),I=react.useCallback(t=>{S(r=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},r),t));},[]),F=react.useCallback((t,r)=>{o&&(n?p(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{included:r}):a)})):g(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{included:r}):a)})));},[o,n]),M=react.useCallback((t,r)=>{o&&(n?p(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{customContent:r}):a)})):g(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{sections:i.sections.map(a=>a.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{customContent:r}):a)})));},[o,n]),$=react.useCallback((t,r)=>{n&&p(i=>i&&chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{variableValues:chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i.variableValues),{[t]:r})}));},[n]),B=()=>"policy_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),G=react.useCallback(()=>{if(!o)return null;let t=Date.now(),r={id:(n==null?void 0:n.id)||B(),title:`Privacy Policy for ${u.name}`,templateId:o.id,organizationInfo:u,sections:o.sections.map(i=>{var a;return chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},i),{customContent:(a=n==null?void 0:n.sections.find(P=>P.id===i.id))==null?void 0:a.customContent})}),variableValues:(n==null?void 0:n.variableValues)||{},effectiveDate:t,lastUpdated:t,version:"1.0"};return p(r),k(r),T&&T(r),r},[o,n,u,T]),K=react.useCallback(()=>{if(!n)return {fullText:"",sectionTexts:{},missingVariables:[]};let t=chunkLVGT3DLT_js.b(n.sections,n.organizationInfo);return typeof t=="string"?{fullText:t,sectionTexts:{full:t},missingVariables:[]}:t},[n]),H=react.useCallback(()=>{p(null),g(null),S({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),Promise.resolve(c.current.remove()).catch(t=>{console.warn("[ndpr-toolkit] Failed to remove policy:",t);});},[]),J=react.useCallback(()=>{let t=[];if(o||t.push("No template selected"),u.name||t.push("Organization name is required"),u.website||t.push("Organization website is required"),u.privacyEmail||t.push("Privacy contact email is required"),o){let r=o.sections.filter(a=>a.required),i=(n==null?void 0:n.sections.filter(a=>a.included))||[];r.forEach(a=>{i.some(P=>P.id===a.id)||t.push(`Required section "${a.title}" must be included`);});}return o&&n&&Object.entries(o.variables).forEach(([r,i])=>{i.required&&!n.variableValues[r]&&t.push(`Required variable "${i.name}" must have a value`);}),{valid:t.length===0,errors:t}},[o,u,n]);return {policy:n,selectedTemplate:o,organizationInfo:u,selectTemplate:j,updateOrganizationInfo:I,toggleSection:F,updateSectionContent:M,updateVariableValue:$,generatePolicy:G,getPolicyText:K,resetPolicy:H,isValid:J,isLoading:C}}var _="default-business";function X(e){return e.toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"})}function Y(e){let{sections:s,variables:y}=chunkLVGT3DLT_js.e(),l={};return e&&(e.name&&(l.orgName=e.name),e.email&&(l.privacyEmail=e.email),e.website&&(l.website=e.website),e.address&&(l.address=e.address),e.industry&&(l.industry=e.industry),e.dpoName&&(l.dpoName=e.dpoName),e.dpoEmail&&(l.dpoEmail=e.dpoEmail)),l.effectiveDate||(l.effectiveDate=X(new Date)),{id:_,name:"Default Business Policy",description:"NDPA-compliant privacy policy template for businesses.",organizationType:"business",sections:s,variables:Object.fromEntries(y.map(f=>[f.name,{name:f.name,description:f.description,required:f.required,defaultValue:l[f.name]||f.value||void 0}])),version:"1.0",lastUpdated:Date.now(),ndpaCompliant:true}}function Z(e){if(!e)return {};let s={};return e.name&&(s.name=e.name),e.email&&(s.privacyEmail=e.email),e.website&&(s.website=e.website),e.address&&(s.address=e.address),e.industry&&(s.industry=e.industry),e.dpoName&&(s.dpoName=e.dpoName),e.dpoEmail&&(s.dpoEmail=e.dpoEmail),s}function ce(e={}){var o;let{orgInfo:s,autoGenerate:y=true,storageKey:l,persist:f,useLocalStorage:D,adapter:T}=e,O=(o=f!=null?f:D)!=null?o:true,w=react.useRef(null);w.current===null&&(w.current=Y(s));let c=A({templates:[w.current],adapter:T,storageKey:l,persist:O}),n=react.useRef(false),p=react.useRef(false);return react.useEffect(()=>{if(!y||c.isLoading||n.current)return;if(!T&&O!==false&&typeof window!="undefined"&&typeof window.localStorage!="undefined")try{if(window.localStorage.getItem(l!=null?l:"ndpr_privacy_policy")){n.current=!0,p.current=!0;return}}catch(S){}if(c.policy){n.current=true,p.current=true;return}n.current=true;let u=Z(s);Object.keys(u).length>0&&c.updateOrganizationInfo(u),c.selectedTemplate||c.selectTemplate(_);},[y,c.isLoading]),react.useEffect(()=>{var u;if(!y||p.current||!n.current||!c.selectedTemplate)return;let g=(u=s==null?void 0:s.name)!=null?u:"";g&&c.organizationInfo.name!==g||(p.current=true,c.generatePolicy());},[y,c.selectedTemplate,c.organizationInfo]),c}exports.a=A;exports.b=ce;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$2}from'./chunk-EWVK45Z3.mjs';import {a}from'./chunk-SFGW37LE.mjs';import {a as a$1,b}from'./chunk-ZJYULEER.mjs';import {useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var or=({categories:Me,onSubmit:$e,onValidationError:u,title:Oe="Report a Data Breach",formDescription:Le="Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",submitButtonText:ze="Submit Report",className:G="",buttonClassName:K="",classNames:d={},unstyled:c=false,isSubmitting:f=false,showConfirmation:Ye=true,confirmationMessage:Ue="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:He=true,maxAttachments:x=5,maxFileSize:C=5*1024*1024,allowedFileTypes:S=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:t,onReset:A})=>{var Se,Ae,De,Re,we,Fe,qe,Pe,ke,Te,je;let W=r=>{if(!r)return "";let o=new Date(r),l=s=>String(s).padStart(2,"0");return `${o.getFullYear()}-${l(o.getMonth()+1)}-${l(o.getDate())}T${l(o.getHours())}:${l(o.getMinutes())}`},[D,J]=useState((t==null?void 0:t.title)||""),[R,Q]=useState((t==null?void 0:t.description)||""),[w,X]=useState((t==null?void 0:t.category)||""),[F,V]=useState(W(t==null?void 0:t.discoveredAt)),[q,ee]=useState(W(t==null?void 0:t.occurredAt)),[P,re]=useState(((Se=t==null?void 0:t.reporter)==null?void 0:Se.name)||""),[N,te]=useState(((Ae=t==null?void 0:t.reporter)==null?void 0:Ae.email)||""),[k,ie]=useState(((De=t==null?void 0:t.reporter)==null?void 0:De.department)||""),[T,ae]=useState(((Re=t==null?void 0:t.reporter)==null?void 0:Re.phone)||""),[ne,oe]=useState((t==null?void 0:t.affectedSystems)||[]),[Ze,se]=useState(((we=t==null?void 0:t.affectedSystems)==null?void 0:we.join(", "))||""),[j,de]=useState((t==null?void 0:t.dataTypes)||[]),[h,me]=useState((t==null?void 0:t.estimatedAffectedSubjects)!=null?String(t.estimatedAffectedSubjects):""),[I,ce]=useState((t==null?void 0:t.approximateRecordCount)!=null?String(t.approximateRecordCount):""),[B,pe]=useState(((Fe=t==null?void 0:t.dataSubjectCategories)==null?void 0:Fe.join(", "))||""),[le,ge]=useState((qe=t==null?void 0:t.involvesSensitiveData)!=null?qe:false),[E,be]=useState((t==null?void 0:t.likelyConsequences)||""),[M,fe]=useState((t==null?void 0:t.mitigationMeasures)||""),[$,he]=useState(((Pe=t==null?void 0:t.dpoContact)==null?void 0:Pe.name)||""),[O,ve]=useState(((ke=t==null?void 0:t.dpoContact)==null?void 0:ke.email)||""),[L,Ne]=useState(((Te=t==null?void 0:t.dpoContact)==null?void 0:Te.phone)||""),[z,_e]=useState((je=t==null?void 0:t.isPhasedReport)!=null?je:false),[Y,ye]=useState((t==null?void 0:t.supplementsReportId)||""),[ue,xe]=useState((t==null?void 0:t.status)||"ongoing"),[U,Ce]=useState((t==null?void 0:t.initialActions)||""),[_,H]=useState([]),[Ge,Z]=useState(false),[a$3,v]=useState({}),Ke=()=>{J(""),Q(""),X(""),V(""),ee(""),re(""),te(""),ie(""),ae(""),oe([]),se(""),de([]),me(""),ce(""),pe(""),ge(false),be(""),fe(""),he(""),ve(""),Ne(""),_e(false),ye(""),xe("ongoing"),Ce(""),H([]),Z(false),v({}),A==null||A();},We=r=>{let o=r.target.value;se(o);let l=o.split(",").map(s=>s.trim()).filter(Boolean);oe(l);},Je=r=>{de(o=>o.includes(r)?o.filter(l=>l!==r):[...o,r]);},Qe=r=>{var Ie;let o=r.target.files;if(!o)return;let l=[],s={};if(_.length+o.length>x){s.attachments=`Maximum of ${x} files allowed`,v(g=>a$1(a$1({},g),s));return}for(let g=0;g<o.length;g++){let y=o[g];if(y.size>C){s.attachments=`File ${y.name} exceeds the maximum size of ${C/(1024*1024)}MB`;continue}let Be="."+((Ie=y.name.split(".").pop())==null?void 0:Ie.toLowerCase());if(!S.includes(Be)){s.attachments=`File type ${Be} is not allowed`;continue}l.push(y);}l.length>0&&H(g=>[...g,...l]),Object.keys(s).length>0?v(g=>a$1(a$1({},g),s)):v(g=>b(a$1({},g),{attachments:""}));},Xe=r=>{H(o=>o.filter((l,s)=>s!==r));},Ve=()=>{let r={};return D.trim()||(r.breachTitle="Breach title is required"),R.trim()||(r.description="Description is required"),w||(r.category="Category is required"),F||(r.discoveredAt="Discovery date is required"),P.trim()||(r.reporterName="Reporter name is required"),N.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(N)||(r.reporterEmail="Reporter email is invalid"):r.reporterEmail="Reporter email is required",k.trim()||(r.reporterDepartment="Reporter department is required"),ne.length===0&&(r.affectedSystems="At least one affected system is required"),j.length===0&&(r.dataTypes="At least one data type is required"),h&&isNaN(Number(h))&&(r.estimatedAffectedSubjects="Estimated affected subjects must be a number"),v(r),r},er=r=>{r.preventDefault();let o=Ve();if(Object.keys(o).length>0){u==null||u(o);return}let l={title:a$2(D),description:a$2(R),category:w,discoveredAt:new Date(F).getTime(),occurredAt:q?new Date(q).getTime():void 0,reportedAt:Date.now(),reporter:{name:a$2(P),email:a$2(N),department:a$2(k),phone:T?a$2(T):void 0},affectedSystems:ne.map(s=>a$2(s)),dataTypes:j,estimatedAffectedSubjects:h?Number(h):void 0,approximateRecordCount:I?Number(I):void 0,dataSubjectCategories:B?B.split(",").map(s=>a$2(s.trim())).filter(Boolean):void 0,involvesSensitiveData:le,likelyConsequences:E?a$2(E):void 0,mitigationMeasures:M?a$2(M):void 0,dpoContact:$||O?{name:a$2($),email:a$2(O),phone:L?a$2(L):void 0}:void 0,isPhasedReport:z||void 0,supplementsReportId:Y?a$2(Y):void 0,status:ue,initialActions:U?a$2(U):void 0,attachments:_.map(s=>({name:s.name,type:s.type,size:s.size,file:s}))};$e(l),Ye&&Z(true);};if(Ge)return jsxs("div",{"data-ndpr-component":"breach-report-form",className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${G}`,children:[jsx("h2",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Submitted"}),jsx("p",{className:"ndpr-text-success",children:Ue}),jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-md",children:[jsx("h3",{className:"text-sm font-bold ndpr-text-warning mb-2",children:"Important: Next Steps"}),jsx("p",{className:"ndpr-text-warning text-sm",children:"Under the NDPA (Section 40), data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsx("button",{onClick:()=>Z(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${K}`,children:"Report Another Breach"})]});let rr=[{id:"personal",label:"Personal Information (names, addresses)"},{id:"contact",label:"Contact Information (email, phone)"},{id:"financial",label:"Financial Information (bank details, payment info)"},{id:"health",label:"Health Information"},{id:"identification",label:"Identification Documents (ID cards, passports)"},{id:"login",label:"Login Credentials"},{id:"biometric",label:"Biometric Data"},{id:"children",label:"Children's Data"},{id:"location",label:"Location Data"},{id:"communications",label:"Communications Content"}];return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${G}`,d.root,c),children:[jsx("h2",{className:a("ndpr-section-heading",d.title,c),children:Oe}),jsx("p",{className:"ndpr-card__subtitle",children:Le}),jsx("form",{onSubmit:er,className:a("",d.form,c),children:jsxs("div",{className:"ndpr-form-section",children:[jsxs("div",{className:a("",d.fieldGroup,c),children:[jsx("h3",{className:"ndpr-section-heading",children:"Breach Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"breachTitle",className:a("ndpr-form-field__label",d.label,c),children:["Breach Title/Summary ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"breachTitle",value:D,onChange:r=>J(r.target.value),className:a("ndpr-form-field__input",d.input,c),required:true,"aria-invalid":!!a$3.breachTitle,"aria-describedby":a$3.breachTitle?"breachTitle-error":void 0}),a$3.breachTitle&&jsx("p",{id:"breachTitle-error",role:"alert",className:"ndpr-form-field__error",children:a$3.breachTitle})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"category",className:a("ndpr-form-field__label",d.label,c),children:["Breach Category ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"category",value:w,onChange:r=>X(r.target.value),className:a("ndpr-form-field__input",d.select,c),required:true,"aria-invalid":!!a$3.category,"aria-describedby":a$3.category?"category-error":void 0,children:[jsx("option",{value:"",children:"Select a category"}),Me.map(r=>jsx("option",{value:r.id,children:r.name},r.id))]}),a$3.category&&jsx("p",{id:"category-error",role:"alert",className:"ndpr-form-field__error",children:a$3.category})]}),jsxs("div",{className:"md:col-span-2",children:[jsxs("label",{htmlFor:"description",className:a("ndpr-form-field__label",d.label,c),children:["Detailed Description ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("textarea",{id:"description",value:R,onChange:r=>Q(r.target.value),rows:4,className:a("ndpr-form-field__input",d.textarea,c),required:true,"aria-invalid":!!a$3.description,"aria-describedby":a$3.description?"description-error":void 0}),a$3.description&&jsx("p",{id:"description-error",role:"alert",className:"ndpr-form-field__error",children:a$3.description})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"discoveredAt",className:"ndpr-form-field__label",children:["Date Discovered ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"datetime-local",id:"discoveredAt",value:F,onChange:r=>V(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.discoveredAt,"aria-describedby":a$3.discoveredAt?"discoveredAt-error":void 0}),a$3.discoveredAt&&jsx("p",{id:"discoveredAt-error",role:"alert",className:"ndpr-form-field__error",children:a$3.discoveredAt})]}),jsxs("div",{children:[jsx("label",{htmlFor:"occurredAt",className:"ndpr-form-field__label",children:"Date Occurred (if known)"}),jsx("input",{type:"datetime-local",id:"occurredAt",value:q,onChange:r=>ee(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Reporter Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"reporterName",className:"ndpr-form-field__label",children:["Your Name ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterName",value:P,onChange:r=>re(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterName,"aria-describedby":a$3.reporterName?"reporterName-error":void 0}),a$3.reporterName&&jsx("p",{id:"reporterName-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterName})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterEmail",className:"ndpr-form-field__label",children:["Your Email ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"email",id:"reporterEmail",value:N,onChange:r=>te(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterEmail,"aria-describedby":a$3.reporterEmail?"reporterEmail-error":void 0}),a$3.reporterEmail&&jsx("p",{id:"reporterEmail-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterEmail})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterDepartment",className:"ndpr-form-field__label",children:["Your Department ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterDepartment",value:k,onChange:r=>ie(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterDepartment,"aria-describedby":a$3.reporterDepartment?"reporterDepartment-error":void 0}),a$3.reporterDepartment&&jsx("p",{id:"reporterDepartment-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterDepartment})]}),jsxs("div",{children:[jsx("label",{htmlFor:"reporterPhone",className:"ndpr-form-field__label",children:"Your Phone Number (Optional)"}),jsx("input",{type:"tel",id:"reporterPhone",value:T,onChange:r=>ae(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Impact Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"affectedSystems",className:"ndpr-form-field__label",children:["Affected Systems/Applications ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"affectedSystems",value:Ze,onChange:We,placeholder:"e.g. CRM, Email Server, Website (comma separated)",className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.affectedSystems,"aria-describedby":a$3.affectedSystems?"affectedSystems-error":void 0}),a$3.affectedSystems&&jsx("p",{id:"affectedSystems-error",role:"alert",className:"ndpr-form-field__error",children:a$3.affectedSystems})]}),jsxs("div",{children:[jsx("label",{htmlFor:"estimatedAffectedSubjects",className:"ndpr-form-field__label",children:"Estimated Number of Affected Data Subjects"}),jsx("input",{type:"text",id:"estimatedAffectedSubjects",value:h,onChange:r=>me(r.target.value),placeholder:"e.g. 100",className:"ndpr-form-field__input","aria-invalid":!!a$3.estimatedAffectedSubjects,"aria-describedby":a$3.estimatedAffectedSubjects?"estimatedAffectedSubjects-error":void 0}),a$3.estimatedAffectedSubjects&&jsx("p",{id:"estimatedAffectedSubjects-error",role:"alert",className:"ndpr-form-field__error",children:a$3.estimatedAffectedSubjects})]}),jsxs("fieldset",{className:"md:col-span-2","aria-invalid":!!a$3.dataTypes,"aria-describedby":a$3.dataTypes?"dataTypes-error":void 0,children:[jsxs("legend",{className:"ndpr-form-field__label",children:["Types of Data Involved ",jsx("span",{className:"ndpr-form-field__required","aria-hidden":"true",children:"*"}),jsx("span",{className:"sr-only",children:"(required)"})]}),jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:rr.map(r=>jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"checkbox",id:`dataType_${r.id}`,checked:j.includes(r.id),onChange:()=>Je(r.id),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:`dataType_${r.id}`,className:"ml-2 text-sm ndpr-text-muted",children:r.label})]},r.id))}),a$3.dataTypes&&jsx("p",{id:"dataTypes-error",role:"alert",className:"ndpr-form-field__error",children:a$3.dataTypes})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"status",className:"ndpr-form-field__label",children:["Current Status ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"status",value:ue,onChange:r=>xe(r.target.value),className:a("ndpr-form-field__input",d.select,c),required:true,children:[jsx("option",{value:"ongoing",children:"Ongoing (breach is still active)"}),jsx("option",{value:"contained",children:"Contained (breach is stopped but not resolved)"}),jsx("option",{value:"resolved",children:"Resolved (breach is fully addressed)"})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"approximateRecordCount",className:"ndpr-form-field__label",children:"Approximate Number of Records Concerned"}),jsx("input",{type:"text",id:"approximateRecordCount",value:I,onChange:r=>ce(r.target.value),placeholder:"e.g. 5000",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dataSubjectCategories",className:"ndpr-form-field__label",children:"Categories of Data Subjects Affected"}),jsx("input",{type:"text",id:"dataSubjectCategories",value:B,onChange:r=>pe(r.target.value),placeholder:"e.g. customers, employees, minors",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Comma-separated. Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{className:"md:col-span-2 flex items-center",children:[jsx("input",{id:"involvesSensitiveData",type:"checkbox",checked:le,onChange:r=>ge(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"involvesSensitiveData",className:"ml-2 text-sm ndpr-text-muted",children:"Sensitive personal data (NDPA Section 30) is involved"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"likelyConsequences",className:"ndpr-form-field__label",children:"Likely Consequences for Data Subjects"}),jsx("textarea",{id:"likelyConsequences",value:E,onChange:r=>be(r.target.value),placeholder:"e.g. identity theft, financial loss, reputational damage, discrimination",rows:3,className:a("ndpr-form-field__input",d.textarea,c)}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required content for NDPC report and Section 40(3) communications to data subjects."})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"mitigationMeasures",className:"ndpr-form-field__label",children:"Mitigation Measures"}),jsx("textarea",{id:"mitigationMeasures",value:M,onChange:r=>fe(r.target.value),placeholder:"Measures taken or proposed to mitigate possible adverse effects (NDPA Section 40(3))",rows:3,className:a("ndpr-form-field__input",d.textarea,c)})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("h4",{className:"ndpr-section-heading text-sm mt-4",children:"Data Protection Officer (NDPC contact)"}),jsx("p",{className:"text-xs ndpr-text-muted mb-2",children:"Defaults to organisation-level DPO if left blank."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoName",className:"ndpr-form-field__label",children:"DPO Name"}),jsx("input",{type:"text",id:"dpoName",value:$,onChange:r=>he(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoEmail",className:"ndpr-form-field__label",children:"DPO Email"}),jsx("input",{type:"email",id:"dpoEmail",value:O,onChange:r=>ve(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoPhone",className:"ndpr-form-field__label",children:"DPO Phone"}),jsx("input",{type:"tel",id:"dpoPhone",value:L,onChange:r=>Ne(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2 flex items-center mt-2",children:[jsx("input",{id:"isPhasedReport",type:"checkbox",checked:z,onChange:r=>_e(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"isPhasedReport",className:"ml-2 text-sm ndpr-text-muted",children:"This is a phased / interim report (Section 40(2) \u2014 complete info not yet available)"})]}),z&&jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"supplementsReportId",className:"ndpr-form-field__label",children:"Supplements Report ID (if applicable)"}),jsx("input",{type:"text",id:"supplementsReportId",value:Y,onChange:r=>ye(r.target.value),placeholder:"Prior report ID this report supplements",className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"initialActions",className:"ndpr-form-field__label",children:"Initial Actions Taken"}),jsx("textarea",{id:"initialActions",value:U,onChange:r=>Ce(r.target.value),placeholder:"Describe any immediate actions that have been taken to address the breach",rows:3,className:a("ndpr-form-field__input",d.textarea,c)})]})]})]}),He&&jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Attachments"}),jsxs("div",{className:"ndpr-form-field",children:[jsx("label",{className:"ndpr-form-field__label",children:"Upload Supporting Files (Optional)"}),jsxs("p",{className:"text-xs ndpr-text-muted mb-2",children:["Max ",x," files, ",C/(1024*1024),"MB each. Allowed types: ",S.join(", ")]}),jsx("input",{type:"file",onChange:Qe,multiple:true,className:"ndpr-form-field__input",accept:S.join(",")}),a$3.attachments&&jsx("p",{id:"attachments-error",role:"alert",className:"ndpr-form-field__error",children:a$3.attachments})]}),_.length>0&&jsxs("div",{className:"ndpr-form-field",children:[jsx("h4",{className:"ndpr-form-field__label",children:"Attached Files:"}),jsx("ul",{className:"ndpr-form-section",children:_.map((r,o)=>jsxs("li",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded",children:[jsxs("div",{className:"flex items-center",children:[jsx("svg",{className:"w-4 h-4 ndpr-text-muted mr-2",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"})}),jsx("span",{className:"text-sm ndpr-text-muted",children:r.name}),jsxs("span",{className:"ml-2 text-xs ndpr-text-muted",children:["(",(r.size/1024).toFixed(1)," KB)"]})]}),jsxs("button",{type:"button",onClick:()=>Xe(o),"aria-label":`Remove attachment ${r.name}`,className:"text-red-500 hover:ndpr-text-destructive p-2 min-w-[44px] min-h-[44px] flex items-center justify-center",children:[jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),jsx("span",{className:"sr-only",children:"Remove"})]})]},o))})]})]}),jsxs("div",{className:a("ndpr-alert ndpr-alert--info",d.notice,c),children:[jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsx("p",{className:"ndpr-text-info text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxs("div",{className:"mt-6 relative flex gap-3",children:[f&&d.loadingOverlay&&jsx("div",{className:d.loadingOverlay}),jsx("button",{type:"submit",disabled:f,className:a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${K} ${f?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c),children:f?"Submitting...":ze}),jsx("button",{type:"button",onClick:Ke,disabled:f,className:a("px-6 py-3 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 rounded-md hover:bg-gray-300 dark:hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2",void 0,c),children:"Reset"})]})]})})]})};
|
|
2
|
+
export{or as a};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-RRVKUCFR.mjs.map
|
|
1
|
+
import {a}from'./chunk-SFGW37LE.mjs';import {jsxs,jsx}from'react/jsx-runtime';var f={consent:"Consent",dsr:"Data Subject Rights",dpia:"DPIA",breach:"Breach Notification",policy:"Privacy Policy",lawfulBasis:"Lawful Basis",crossBorder:"Cross-Border",ropa:"ROPA"},p={critical:"rgb(var(--ndpr-destructive))","needs-work":"rgb(var(--ndpr-warning))",good:"rgb(var(--ndpr-primary))",excellent:"rgb(var(--ndpr-success))"},m={critical:"Critical","needs-work":"Needs Work",good:"Good",excellent:"Excellent"},C={critical:"Critical",high:"High",medium:"Medium",low:"Low"},h=({score:t,rating:o,classNames:e,unstyled:l})=>{let r=p[o],i=2*Math.PI*40,g=i*(1-t/100);return jsxs("div",{className:a("relative inline-flex items-center justify-center",e==null?void 0:e.scoreCircle,l),role:"img","aria-label":`Compliance score: ${t} out of 100, rated ${m[o]}`,children:[jsxs("svg",{width:"120",height:"120",viewBox:"0 0 100 100","aria-hidden":"true",children:[jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"rgba(0,0,0,0.08)",strokeWidth:"8"}),jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:r,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:g,transform:"rotate(-90 50 50)",style:{transition:"stroke-dashoffset 0.4s ease"}})]}),jsx("span",{className:a("absolute text-2xl font-bold tabular-nums",e==null?void 0:e.scoreValue,l),style:{color:r},children:t})]})},x=({rating:t,className:o,unstyled:e})=>{let l=p[t];return jsx("span",{className:a("inline-block px-3 py-1 rounded-full text-sm font-semibold",o,e),style:{backgroundColor:`${l.replace("rgb(","rgba(").replace(")",", 0.12)")}`,color:l,border:`1px solid ${l.replace("rgb(","rgba(").replace(")",", 0.3)")}`},role:"status","aria-live":"polite",children:m[t]})},R=({moduleKey:t,module:o,classNames:e,unstyled:l})=>{var b;let r=o.score>=90?"excellent":o.score>=70?"good":o.score>=40?"needs-work":"critical",i=p[r];Math.round(o.score/100*(o.gaps.length+Math.round(o.score/100*5)));let u=o.gaps.length,c=(b=f[t])!=null?b:t;return jsxs("div",{className:a("rounded-lg border p-4 flex flex-col gap-2",e==null?void 0:e.moduleCard,l),style:{borderColor:`${i.replace("rgb(","rgba(").replace(")",", 0.25)")}`,backgroundColor:`${i.replace("rgb(","rgba(").replace(")",", 0.04)")}`},children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("span",{className:a("text-sm font-semibold truncate",e==null?void 0:e.moduleTitle,l),children:c}),jsx("span",{className:a("text-lg font-bold tabular-nums",e==null?void 0:e.moduleScore,l),style:{color:i},role:"status","aria-label":`${c} score: ${o.score}`,children:o.score})]}),jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{backgroundColor:"rgba(0,0,0,0.08)"},role:"progressbar","aria-valuenow":o.score,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${c} compliance score: ${o.score}%`,children:jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${o.score}%`,backgroundColor:i}})}),u>0&&jsxs("p",{className:a("ndpr-form-field__hint",e==null?void 0:e.moduleGaps,l),children:[u," gap",u!==1?"s":""," to address"]})]})},y=({rec:t,classNames:o,unstyled:e})=>{var i,g;let r=(i={critical:p.critical,high:p["needs-work"],medium:p.good,low:p.excellent}[t.priority])!=null?i:p.good;return jsxs("div",{"data-testid":"recommendation-item",className:a("flex gap-3 p-3 rounded-lg border border-gray-100 dark:border-gray-700 bg-white dark:bg-gray-800",o==null?void 0:o.recommendationItem,e),children:[jsx("span",{className:a("mt-0.5 shrink-0 inline-block px-2 py-0.5 rounded text-xs font-bold uppercase tracking-wide",o==null?void 0:o.recommendationPriority,e),style:{backgroundColor:`${r.replace("rgb(","rgba(").replace(")",", 0.12)")}`,color:r},children:(g=C[t.priority])!=null?g:t.priority}),jsxs("div",{className:"min-w-0 flex-1",children:[jsx("p",{className:a("text-sm font-medium ndpr-text-foreground",o==null?void 0:o.recommendationTitle,e),children:t.label}),jsx("p",{className:"mt-0.5 text-xs ndpr-text-muted leading-relaxed",children:t.recommendation}),jsxs("p",{className:"mt-1 text-xs text-gray-400 dark:text-gray-500",children:[t.ndpaSection," \u2022 Effort: ",t.effort]})]})]})},P=({report:t,title:o="NDPA Compliance Dashboard",showRecommendations:e=true,maxRecommendations:l=5,classNames:r,unstyled:i=false})=>{let g=t.recommendations.slice(0,l),u=Object.entries(t.modules);return jsxs("div",{"data-ndpr-component":"compliance-dashboard",className:a("w-full rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 shadow-sm p-6 flex flex-col gap-8",r==null?void 0:r.root,i),children:[jsxs("div",{className:a("flex flex-col sm:flex-row items-start sm:items-center gap-6",r==null?void 0:r.header,i),children:[jsx(h,{score:t.score,rating:t.rating,classNames:{scoreCircle:r==null?void 0:r.scoreCircle,scoreValue:r==null?void 0:r.scoreValue},unstyled:i}),jsxs("div",{className:"flex flex-col gap-2",children:[jsx("h2",{className:"text-xl font-bold ndpr-text-foreground leading-tight",children:o}),jsx(x,{rating:t.rating,className:r==null?void 0:r.ratingBadge,unstyled:i}),jsxs("p",{className:"ndpr-form-field__hint",children:["Generated on"," ",new Date(t.generatedAt).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})]})]})]}),jsx("div",{className:a("grid grid-cols-2 sm:grid-cols-2 md:grid-cols-4 gap-3",r==null?void 0:r.modulesGrid,i),children:u.map(([c,b])=>jsx(R,{moduleKey:c,module:b,classNames:{moduleCard:r==null?void 0:r.moduleCard,moduleTitle:r==null?void 0:r.moduleTitle,moduleScore:r==null?void 0:r.moduleScore,moduleGaps:r==null?void 0:r.moduleGaps},unstyled:i},c))}),e&&g.length>0&&jsxs("div",{className:a("flex flex-col gap-3",r==null?void 0:r.recommendationsSection,i),children:[jsx("h3",{className:"text-base font-semibold ndpr-text-foreground",children:"Recommendations"}),g.map(c=>jsx(y,{rec:c,classNames:{recommendationItem:r==null?void 0:r.recommendationItem,recommendationPriority:r==null?void 0:r.recommendationPriority,recommendationTitle:r==null?void 0:r.recommendationTitle},unstyled:i},`${c.module}-${c.key}`))]})]})};export{P as a};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
var o=Object.defineProperty,p=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;var j=(a,c,b)=>c in a?o(a,c,{enumerable:true,configurable:true,writable:true,value:b}):a[c]=b,r=(a,c)=>{for(var b in c||(c={}))k.call(c,b)&&j(a,b,c[b]);if(f)for(var b of f(c))l.call(c,b)&&j(a,b,c[b]);return a},s=(a,c)=>p(a,q(c));var t=(a,c)=>{var b={};for(var d in a)k.call(a,d)&&c.indexOf(d)<0&&(b[d]=a[d]);if(a!=null&&f)for(var d of f(a))c.indexOf(d)<0&&l.call(a,d)&&(b[d]=a[d]);return b};var u=(a,c,b)=>new Promise((d,i)=>{var m=e=>{try{g(b.next(e));}catch(h){i(h);}},n=e=>{try{g(b.throw(e));}catch(h){i(h);}},g=e=>e.done?d(e.value):Promise.resolve(e.value).then(m,n);g((b=b.apply(a,c)).next());});export{r as a,s as b,t as c,u as d}
|
|
2
|
-
//# sourceMappingURL=chunk-WWT2ZSNU.mjs.map
|
|
1
|
+
var o=Object.defineProperty,p=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var f=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;var j=(a,c,b)=>c in a?o(a,c,{enumerable:true,configurable:true,writable:true,value:b}):a[c]=b,r=(a,c)=>{for(var b in c||(c={}))k.call(c,b)&&j(a,b,c[b]);if(f)for(var b of f(c))l.call(c,b)&&j(a,b,c[b]);return a},s=(a,c)=>p(a,q(c));var t=(a,c)=>{var b={};for(var d in a)k.call(a,d)&&c.indexOf(d)<0&&(b[d]=a[d]);if(a!=null&&f)for(var d of f(a))c.indexOf(d)<0&&l.call(a,d)&&(b[d]=a[d]);return b};var u=(a,c,b)=>new Promise((d,i)=>{var m=e=>{try{g(b.next(e));}catch(h){i(h);}},n=e=>{try{g(b.throw(e));}catch(h){i(h);}},g=e=>e.done?d(e.value):Promise.resolve(e.value).then(m,n);g((b=b.apply(a,c)).next());});export{r as a,s as b,t as c,u as d};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-LJNNPAFU.mjs.map
|
|
1
|
+
import {a}from'./chunk-SFGW37LE.mjs';import {jsxs,jsx}from'react/jsx-runtime';var R=({sections:v,answers:y,onAnswerChange:u,currentSectionIndex:o,onNextSection:$,onPrevSection:B,validationErrors:P={},readOnly:s=false,className:A="",buttonClassName:_="",nextButtonText:C="Next",prevButtonText:w="Previous",submitButtonText:I="Submit",showProgress:D=true,progress:c,classNames:f={},unstyled:Q=false})=>{let m=v[o],S=o===v.length-1,t=(e,a$1)=>{let d=a$1?f[a$1]:void 0;return !d&&a$1==="nextButton"&&(d=f.primaryButton),!d&&a$1==="prevButton"&&(d=f.secondaryButton),a(e,d,Q)},L=e=>e.showWhen?e.showWhen.every(a=>{let d=y[a.questionId];switch(a.operator){case "equals":return d===a.value;case "contains":return Array.isArray(d)?d.includes(String(a.value)):false;case "greaterThan":return typeof d=="number"&&typeof a.value=="number"?d>a.value:false;case "lessThan":return typeof d=="number"&&typeof a.value=="number"?d<a.value:false;default:return true}}):true,b=e=>t("ndpr-form-field__input","input"),T=e=>{if(!L(e))return null;let a=P[e.id],d=y[e.id],l=typeof d=="boolean"?String(d):d,h=e.guidance?`${e.id}-guidance`:void 0,N=a?`${e.id}-error`:void 0,p=[h,N].filter(Boolean).join(" ")||void 0;return jsxs("div",{className:t("ndpr-form-field","question"),children:[jsxs("label",{htmlFor:e.id,className:t("ndpr-form-field__label","questionText"),children:[e.text,e.required&&jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),e.guidance&&jsx("p",{id:h,className:t("ndpr-form-field__hint","guidance"),children:e.guidance}),e.type==="text"&&jsx("input",{type:"text",id:e.id,value:l||"",onChange:r=>u(e.id,r.target.value),disabled:s,className:b(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0}),e.type==="textarea"&&jsx("textarea",{id:e.id,value:l||"",onChange:r=>u(e.id,r.target.value),disabled:s,rows:4,className:b(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0}),e.type==="select"&&e.options&&jsxs("select",{id:e.id,value:l||"",onChange:r=>u(e.id,r.target.value),disabled:s,className:b(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0,children:[jsx("option",{value:"",children:"Select an option"}),e.options.map(r=>jsx("option",{value:r.value,children:r.label},r.value))]}),e.type==="radio"&&e.options&&jsx("div",{className:t("ndpr-form-field__option-group","radioGroup"),role:"radiogroup","aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0,children:e.options.map(r=>jsxs("div",{className:t("ndpr-form-field__checkbox-row","radioOption"),children:[jsx("input",{type:"radio",id:`${e.id}_${r.value}`,name:e.id,value:r.value,checked:l===r.value,onChange:()=>u(e.id,r.value),disabled:s,className:"ndpr-form-field__radio"}),jsxs("label",{htmlFor:`${e.id}_${r.value}`,className:"ndpr-form-field__label",children:[r.label,r.riskLevel&&jsxs("span",{className:r.riskLevel==="low"?"ndpr-badge ndpr-badge--success":r.riskLevel==="medium"?"ndpr-badge ndpr-badge--warning":"ndpr-badge ndpr-badge--destructive",children:[r.riskLevel.charAt(0).toUpperCase()+r.riskLevel.slice(1)," Risk"]})]})]},r.value))}),e.type==="checkbox"&&e.options&&jsx("div",{className:"ndpr-form-field__option-group",role:"group","aria-label":e.text,"aria-describedby":p,"aria-invalid":a?true:void 0,children:e.options.map(r=>jsxs("div",{className:"ndpr-form-field__checkbox-row",children:[jsx("input",{type:"checkbox",id:`${e.id}_${r.value}`,value:r.value,checked:Array.isArray(l)?l.includes(r.value):false,onChange:g=>{let x=Array.isArray(l)?[...l]:[];g.target.checked?u(e.id,[...x,r.value]):u(e.id,x.filter(V=>V!==r.value));},disabled:s,className:"ndpr-form-field__checkbox"}),jsx("label",{htmlFor:`${e.id}_${r.value}`,className:"ndpr-form-field__label",children:r.label})]},r.value))}),e.type==="scale"&&jsxs("div",{className:"ndpr-form-field",children:[jsx("div",{className:"ndpr-form-field__hint",style:{display:"flex",justifyContent:"space-between"},children:e.scaleLabels&&Object.entries(e.scaleLabels).map(([r,g])=>jsx("span",{style:{width:`${100/Object.keys(e.scaleLabels||{}).length}%`,textAlign:"center"},children:g},r))}),jsx("input",{type:"range",id:e.id,min:e.minValue||1,max:e.maxValue||5,value:typeof l=="number"?l:e.minValue||1,onChange:r=>u(e.id,parseInt(r.target.value,10)),disabled:s,className:"ndpr-form-field__range","aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0}),jsxs("div",{className:"ndpr-form-field__hint",style:{textAlign:"center"},children:["Selected value: ",l||e.minValue||1]})]}),a&&jsx("p",{id:N,className:"ndpr-form-field__error",role:"alert",children:a})]},e.id)};return m?jsxs("div",{"data-ndpr-component":"dpia-questionnaire",className:`${t("ndpr-card","root")} ${A}`,children:[D&&jsxs("div",{className:t("ndpr-card__header","header"),style:{flexDirection:"column",alignItems:"stretch",gap:"var(--ndpr-space-2)"},children:[jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"var(--ndpr-font-size-sm)",color:"rgb(var(--ndpr-muted-foreground))"},children:[jsxs("span",{children:["Section ",o+1," of ",v.length]}),jsx("span",{children:c!==void 0?`${c}% Complete`:""})]}),jsx("div",{className:t("ndpr-progress","progressBar"),role:"progressbar","aria-valuenow":c!==void 0?c:Math.round((o+1)/v.length*100),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Questionnaire progress",children:jsx("div",{className:"ndpr-progress__bar",style:{width:`${c!==void 0?c:(o+1)/v.length*100}%`}})})]}),jsx("h2",{className:t("ndpr-card__title","title"),children:m.title}),m.description&&jsx("p",{className:t("ndpr-card__subtitle","sectionTitle"),children:m.description}),jsx("div",{className:t("ndpr-card__body","section"),children:m.questions.map(e=>T(e))}),jsxs("div",{className:t("ndpr-card__footer","navigation"),style:{justifyContent:"space-between"},children:[jsx("button",{type:"button",onClick:B,disabled:o===0||s,className:`${t("ndpr-button ndpr-button--secondary","prevButton")} ${_}`,children:w}),jsx("button",{type:"button",onClick:$,disabled:s,className:`${t("ndpr-button ndpr-button--primary","nextButton")} ${_}`,children:S?I:C})]})]}):jsx("div",{children:"No section found."})};export{R as a};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use strict';var o="Generated for guidance only. Not legal advice \u2014 verify with your DPO or counsel.",t="This document is generated by @tantainnovative/ndpr-toolkit for guidance purposes only. It is not legal advice and does not constitute a formal compliance opinion. NDPA 2023 section references reflect the gazetted text and may evolve as the Nigeria Data Protection Commission (NDPC) issues further regulations, directives, or guidance under Section 61 / Section 62. Verify the current position with your Data Protection Officer or qualified Nigerian privacy counsel before acting on this output.";function i(e="Important Notice"){return `${e}
|
|
2
|
+
${"=".repeat(e.length)}
|
|
3
|
+
${t}
|
|
4
|
+
`}exports.a=o;exports.b=t;exports.c=i;
|
package/dist/consent.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var
|
|
3
|
-
//# sourceMappingURL=consent.js.map
|
|
2
|
+
'use strict';var chunkSJDDNB6M_js=require('./chunk-SJDDNB6M.js'),chunkBRS52EDT_js=require('./chunk-BRS52EDT.js'),chunk732C2EVN_js=require('./chunk-732C2EVN.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkP4LNLCSF_js=require('./chunk-P4LNLCSF.js');require('./chunk-L2VO3MEJ.js'),require('./chunk-7ZZO7GVB.js');var chunkB46SJB5V_js=require('./chunk-B46SJB5V.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var v=react.createContext(null);function p(){let t=react.useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let C=chunkP4LNLCSF_js.a({options:t,adapter:n,version:s,onChange:r}),o=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},C),{options:t});return jsxRuntime.jsx(v.Provider,{value:o,children:c})};var P=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,C]=react.useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsxRuntime.jsx("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsxRuntime.jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>C(a=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{[o.id]:i.target.checked})),disabled:o.required,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxRuntime.jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxRuntime.jsxs("label",{htmlFor:`consent-${o.id}`,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsxRuntime.jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsxRuntime.jsx("p",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var R=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var S=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:C}=p();return jsxRuntime.jsx("button",{onClick:()=>{if(r)c(r);else {let i={};C.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:P,AcceptButton:R,RejectButton:S,SaveButton:y,Banner:chunk732C2EVN_js.a,Settings:chunkBRS52EDT_js.a,Storage:chunkSJDDNB6M_js.a};Object.defineProperty(exports,"ConsentStorage",{enumerable:true,get:function(){return chunkSJDDNB6M_js.a}});Object.defineProperty(exports,"ConsentManager",{enumerable:true,get:function(){return chunkBRS52EDT_js.a}});Object.defineProperty(exports,"ConsentBanner",{enumerable:true,get:function(){return chunk732C2EVN_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,"useConsent",{enumerable:true,get:function(){return chunkP4LNLCSF_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,"resolveClass",{enumerable:true,get:function(){return chunkAME4HJR4_js.a}});exports.Consent=I;exports.ConsentAcceptButton=R;exports.ConsentOptionList=P;exports.ConsentProvider=g;exports.ConsentRejectButton=S;exports.ConsentSaveButton=y;exports.useConsentCompound=p;
|
package/dist/consent.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {a}from'./chunk-
|
|
3
|
-
//# sourceMappingURL=consent.mjs.map
|
|
2
|
+
import {a}from'./chunk-XOH4WXOZ.mjs';export{a as ConsentStorage}from'./chunk-XOH4WXOZ.mjs';import {a as a$1}from'./chunk-U5RWJRGA.mjs';export{a as ConsentManager}from'./chunk-U5RWJRGA.mjs';import {a as a$2}from'./chunk-BFAX7JQA.mjs';export{a as ConsentBanner}from'./chunk-BFAX7JQA.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';import {a as a$3}from'./chunk-PCU6GKBE.mjs';export{a as useConsent}from'./chunk-PCU6GKBE.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-UASG46LP.mjs';export{a as validateConsent,b as validateConsentOptions}from'./chunk-PJNKQPQP.mjs';import {a as a$5}from'./chunk-SFGW37LE.mjs';export{a as resolveClass}from'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import {b,a as a$4}from'./chunk-ZJYULEER.mjs';import {createContext,useContext,useState}from'react';import {jsx,jsxs}from'react/jsx-runtime';var v=createContext(null);function p(){let t=useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let C=a$3({options:t,adapter:n,version:s,onChange:r}),o=b(a$4({},C),{options:t});return jsx(v.Provider,{value:o,children:c})};var P=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,C]=useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsx("div",{className:a$5("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxs("div",{className:a$5("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>C(a=>b(a$4({},a),{[o.id]:i.target.checked})),disabled:o.required,className:a$5("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxs("label",{htmlFor:`consent-${o.id}`,className:a$5("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsx("p",{className:a$5("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var R=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var S=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:C}=p();return jsx("button",{onClick:()=>{if(r)c(r);else {let i={};C.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:P,AcceptButton:R,RejectButton:S,SaveButton:y,Banner:a$2,Settings:a$1,Storage:a};export{I as Consent,R as ConsentAcceptButton,P as ConsentOptionList,g as ConsentProvider,S as ConsentRejectButton,y as ConsentSaveButton,p as useConsentCompound};
|
package/dist/core.d.mts
CHANGED
|
@@ -137,10 +137,51 @@ export declare interface BreachReport {
|
|
|
137
137
|
affectedSystems: string[];
|
|
138
138
|
/** Types of data involved in the breach */
|
|
139
139
|
dataTypes: string[];
|
|
140
|
-
/** Whether sensitive personal data is involved (NDPA Section
|
|
140
|
+
/** Whether sensitive personal data is involved (NDPA Section 30) */
|
|
141
141
|
involvesSensitiveData?: boolean;
|
|
142
142
|
/** Estimated number of data subjects affected */
|
|
143
143
|
estimatedAffectedSubjects?: number;
|
|
144
|
+
/**
|
|
145
|
+
* Approximate number of personal data RECORDS concerned (distinct from subject count).
|
|
146
|
+
* Required content under NDPA Section 40(1)(a) and Section 40(2).
|
|
147
|
+
*/
|
|
148
|
+
approximateRecordCount?: number;
|
|
149
|
+
/**
|
|
150
|
+
* Categories of data subjects affected (e.g. customers, employees, minors, patients).
|
|
151
|
+
* Required content under NDPA Section 40(1)(a) and Section 40(2).
|
|
152
|
+
*/
|
|
153
|
+
dataSubjectCategories?: string[];
|
|
154
|
+
/**
|
|
155
|
+
* Likely consequences of the breach for affected data subjects (e.g. identity theft,
|
|
156
|
+
* financial loss, reputational damage). Reported to the NDPC and, where applicable,
|
|
157
|
+
* communicated to data subjects under Section 40(3).
|
|
158
|
+
*/
|
|
159
|
+
likelyConsequences?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Measures taken or proposed to mitigate adverse effects of the breach.
|
|
162
|
+
* Required content for Section 40(3) communications to data subjects.
|
|
163
|
+
*/
|
|
164
|
+
mitigationMeasures?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Whether this is a phased / interim report submitted before full investigation
|
|
167
|
+
* is complete. The NDPC permits phased reporting where complete information is
|
|
168
|
+
* not available within 72 hours.
|
|
169
|
+
*/
|
|
170
|
+
isPhasedReport?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* ID of the prior phased report this report supplements, if any.
|
|
173
|
+
*/
|
|
174
|
+
supplementsReportId?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Data Protection Officer contact details. The DPO is the named contact point
|
|
177
|
+
* for the NDPC per NDPA Section 32(3)(c). Required content in the regulatory
|
|
178
|
+
* report (Section 40(2)).
|
|
179
|
+
*/
|
|
180
|
+
dpoContact?: {
|
|
181
|
+
name: string;
|
|
182
|
+
email: string;
|
|
183
|
+
phone?: string;
|
|
184
|
+
};
|
|
144
185
|
/** Whether the breach is ongoing or contained */
|
|
145
186
|
status: 'ongoing' | 'contained' | 'resolved';
|
|
146
187
|
/** Initial actions taken to address the breach */
|
|
@@ -796,20 +837,25 @@ export declare interface DsrSubmissionValidationResult {
|
|
|
796
837
|
}
|
|
797
838
|
|
|
798
839
|
/**
|
|
799
|
-
* Data Subject Rights types aligned with NDPA 2023 Part
|
|
840
|
+
* Data Subject Rights types aligned with NDPA 2023 Part VI (Sections 34-38)
|
|
841
|
+
* and the related provisions in Part V (Section 27 — information to the data subject)
|
|
842
|
+
* and Part X (Section 46 — complaint to the Commission).
|
|
843
|
+
*
|
|
844
|
+
* Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
|
|
800
845
|
*/
|
|
801
846
|
/**
|
|
802
|
-
* Types of data subject requests per NDPA Part
|
|
803
|
-
* - 'information': Right to be informed (Section
|
|
804
|
-
* - 'access': Right of access (Section
|
|
805
|
-
* - 'rectification': Right to rectification (Section
|
|
806
|
-
* - 'erasure': Right to erasure (Section
|
|
807
|
-
* - 'restriction': Right to restrict processing (Section
|
|
808
|
-
* - 'portability': Right to data portability (Section
|
|
809
|
-
* - 'objection': Right to object (Section
|
|
810
|
-
* - 'automated_decision_making': Rights
|
|
847
|
+
* Types of data subject requests per NDPA Part VI
|
|
848
|
+
* - 'information': Right to be informed (Section 27 — provision of information; Section 34(1)(a))
|
|
849
|
+
* - 'access': Right of access / confirmation + data copy (Section 34(1)(a)–(b))
|
|
850
|
+
* - 'rectification': Right to rectification (Section 34(1)(c))
|
|
851
|
+
* - 'erasure': Right to erasure (Section 34(1)(d), Section 34(2))
|
|
852
|
+
* - 'restriction': Right to restrict processing (Section 34(1)(e))
|
|
853
|
+
* - 'portability': Right to data portability (Section 38)
|
|
854
|
+
* - 'objection': Right to object (Section 36)
|
|
855
|
+
* - 'automated_decision_making': Rights re. automated decisions / profiling (Section 37)
|
|
856
|
+
* - 'withdraw_consent': Right to withdraw consent (Section 35)
|
|
811
857
|
*/
|
|
812
|
-
export declare type DSRType = 'information' | 'access' | 'rectification' | 'erasure' | 'restriction' | 'portability' | 'objection' | 'automated_decision_making';
|
|
858
|
+
export declare type DSRType = 'information' | 'access' | 'rectification' | 'erasure' | 'restriction' | 'portability' | 'objection' | 'automated_decision_making' | 'withdraw_consent';
|
|
813
859
|
|
|
814
860
|
export declare type EffortLevel = 'low' | 'medium' | 'high';
|
|
815
861
|
|
|
@@ -986,11 +1032,13 @@ declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'educa
|
|
|
986
1032
|
|
|
987
1033
|
/**
|
|
988
1034
|
* Returns whether NDPC approval is required for a given transfer mechanism.
|
|
989
|
-
*
|
|
990
|
-
*
|
|
1035
|
+
* Under NDPA Section 42(5), the Commission may approve binding corporate rules,
|
|
1036
|
+
* codes of conduct, certification mechanisms, or similar instruments. Standard
|
|
1037
|
+
* contractual clauses are one of the appropriate safeguards under Section 41(1)(a)
|
|
1038
|
+
* and the Commission may approve them per Section 42(4).
|
|
991
1039
|
*
|
|
992
1040
|
* @param mechanism The transfer mechanism
|
|
993
|
-
* @returns Whether NDPC approval is required
|
|
1041
|
+
* @returns Whether NDPC approval is typically required
|
|
994
1042
|
*/
|
|
995
1043
|
export declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
|
|
996
1044
|
|
|
@@ -1048,6 +1096,23 @@ export declare interface LawfulBasisValidationResult {
|
|
|
1048
1096
|
warnings: string[];
|
|
1049
1097
|
}
|
|
1050
1098
|
|
|
1099
|
+
/**
|
|
1100
|
+
* Full disclaimer suitable for PDF/DOCX footers and exported artifacts.
|
|
1101
|
+
*/
|
|
1102
|
+
export declare const LEGAL_DISCLAIMER_LONG: string;
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* Short disclaimer suitable for component captions and dashboard footers.
|
|
1106
|
+
* One line, no markdown.
|
|
1107
|
+
*/
|
|
1108
|
+
export declare const LEGAL_DISCLAIMER_SHORT = "Generated for guidance only. Not legal advice \u2014 verify with your DPO or counsel.";
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Returns the long disclaimer wrapped with a leading heading suitable for
|
|
1112
|
+
* embedding at the foot of an exported document.
|
|
1113
|
+
*/
|
|
1114
|
+
export declare function legalDisclaimerBlock(heading?: string): string;
|
|
1115
|
+
|
|
1051
1116
|
/**
|
|
1052
1117
|
* Represents a Legitimate Interest Assessment (LIA)
|
|
1053
1118
|
* Required when the lawful basis is 'legitimate_interests'
|
|
@@ -1697,7 +1762,9 @@ export declare interface RequestType {
|
|
|
1697
1762
|
/** Description of what this request type entails */
|
|
1698
1763
|
description: string;
|
|
1699
1764
|
/**
|
|
1700
|
-
* NDPA section reference
|
|
1765
|
+
* NDPA 2023 section reference for this right
|
|
1766
|
+
* (e.g., "Section 34(1)(a)" for access, "Section 38" for portability).
|
|
1767
|
+
* Used for display purposes only — verify the exact subsection with counsel.
|
|
1701
1768
|
*/
|
|
1702
1769
|
ndpaSection?: string;
|
|
1703
1770
|
/**
|
|
@@ -1815,6 +1882,15 @@ export declare function sanitizeInput(input: string): string;
|
|
|
1815
1882
|
*/
|
|
1816
1883
|
export declare type SensitiveDataCondition = 'explicit_consent' | 'employment_law' | 'vital_interests_incapable' | 'nonprofit_legitimate' | 'publicly_available' | 'legal_claims' | 'substantial_public_interest' | 'health_purposes' | 'public_health' | 'archiving_research';
|
|
1817
1884
|
|
|
1885
|
+
export declare interface StorageAdapter<T = unknown> {
|
|
1886
|
+
/** Load persisted data. Called once on hook mount. */
|
|
1887
|
+
load(): T | null | Promise<T | null>;
|
|
1888
|
+
/** Persist data. Called on every state change. */
|
|
1889
|
+
save(data: T): void | Promise<void>;
|
|
1890
|
+
/** Clear persisted data. Called on reset. */
|
|
1891
|
+
remove(): void | Promise<void>;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1818
1894
|
/** Full context used to generate an adaptive privacy policy. */
|
|
1819
1895
|
export declare interface TemplateContext {
|
|
1820
1896
|
/** Organisation details, extended with industry and size. */
|
|
@@ -1894,8 +1970,11 @@ export declare interface TransferImpactAssessment {
|
|
|
1894
1970
|
}
|
|
1895
1971
|
|
|
1896
1972
|
/**
|
|
1897
|
-
* Cross-Border Data Transfer types aligned with NDPA 2023 Part
|
|
1898
|
-
* Personal data may only be transferred outside Nigeria under
|
|
1973
|
+
* Cross-Border Data Transfer types aligned with NDPA 2023 Part VIII (Sections 41-43).
|
|
1974
|
+
* Personal data may only be transferred outside Nigeria under the bases listed in
|
|
1975
|
+
* Section 41(1), where Section 42 defines adequacy and Section 43 lists derogations.
|
|
1976
|
+
*
|
|
1977
|
+
* Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
|
|
1899
1978
|
*/
|
|
1900
1979
|
/**
|
|
1901
1980
|
* Transfer mechanisms recognized under the NDPA
|
|
@@ -2006,7 +2085,7 @@ export declare interface ValidateDsrSubmissionOptions {
|
|
|
2006
2085
|
/**
|
|
2007
2086
|
* Allowed request types. When provided, the payload's `requestType`
|
|
2008
2087
|
* must be one of these — useful for locking the server to a specific
|
|
2009
|
-
* set of supported NDPA Part
|
|
2088
|
+
* set of supported NDPA Part VI §34-38 (plus §35, §36, §37) data-subject rights.
|
|
2010
2089
|
*/
|
|
2011
2090
|
allowedRequestTypes?: string[];
|
|
2012
2091
|
}
|