@tantainnovative/ndpr-toolkit 3.11.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +110 -0
- package/dist/breach.d.mts +7 -1
- package/dist/breach.d.ts +7 -1
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-37VFK5SR.js +6 -0
- package/dist/chunk-3E4IH7CE.js +1 -0
- package/dist/chunk-3H6FYU3Z.mjs +93 -0
- package/dist/chunk-3I6FYA5C.js +103 -0
- package/dist/chunk-3SIYRGJF.js +93 -0
- package/dist/chunk-3XU6FL2I.js +1 -0
- package/dist/chunk-42JPSNVV.mjs +6 -0
- package/dist/chunk-42UJFTII.js +1 -0
- package/dist/chunk-737EMUUC.mjs +1 -0
- package/dist/chunk-7FXNGGMO.js +1 -0
- package/dist/chunk-B2EXRSYG.mjs +1 -0
- package/dist/chunk-BGV2AKT7.mjs +1 -0
- package/dist/chunk-BL5W472Q.js +1 -0
- package/dist/chunk-BPMVJOHH.mjs +1 -0
- package/dist/chunk-ELK6VFKC.mjs +2 -0
- package/dist/chunk-F5MGMNQF.js +2 -0
- package/dist/chunk-FRQFU44F.mjs +1 -0
- package/dist/{chunk-WYH3OA5L.mjs → chunk-I2ZBMR7F.mjs} +1 -1
- package/dist/chunk-J7BIJ45O.mjs +103 -0
- package/dist/{chunk-US2VGJ7I.js → chunk-KH3EQJQE.js} +1 -1
- package/dist/{chunk-IPWX5I5P.mjs → chunk-L3FR4PQE.mjs} +1 -1
- package/dist/chunk-N72RNTGP.mjs +6 -0
- package/dist/chunk-NB6SKG76.mjs +1 -0
- package/dist/chunk-NUIRMJKQ.mjs +2 -0
- package/dist/chunk-O2WEABB3.js +1 -0
- package/dist/chunk-PXDSPF5B.js +2 -0
- package/dist/chunk-QGUOFGVJ.js +2 -0
- package/dist/chunk-RBKFNCGO.mjs +1 -0
- package/dist/chunk-TTMGFC6C.js +1 -0
- package/dist/{chunk-TWJHEIQH.js → chunk-UZNWXJ2W.js} +1 -1
- package/dist/chunk-V5TZJJWU.mjs +1 -0
- package/dist/chunk-WCTFED27.js +1 -0
- package/dist/chunk-WHQ4PEYS.mjs +2 -0
- package/dist/chunk-WKUC65HL.mjs +1 -0
- package/dist/chunk-WMISQDSV.js +1 -0
- package/dist/{chunk-MTSZ7GL6.mjs → chunk-WVHMY2BV.mjs} +1 -1
- package/dist/chunk-XYGGUGTO.js +6 -0
- package/dist/chunk-YDKWD6MQ.js +1 -0
- package/dist/chunk-Z2M5VJX2.mjs +1 -0
- package/dist/{chunk-D3DVVJCT.js → chunk-ZD2W3YU2.js} +1 -1
- package/dist/chunk-ZM5DLFCZ.js +1 -0
- package/dist/chunk-ZQHGIOYP.mjs +1 -0
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +62 -0
- package/dist/core.d.ts +62 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border-lite.js +1 -1
- package/dist/cross-border-lite.mjs +1 -1
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/dpia.js +1 -1
- package/dist/dpia.mjs +1 -1
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/headless.d.mts +24 -3
- package/dist/headless.d.ts +24 -3
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/hooks.d.mts +24 -3
- package/dist/hooks.d.ts +24 -3
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +93 -4
- package/dist/index.d.ts +93 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lawful-basis-lite.js +1 -1
- package/dist/lawful-basis-lite.mjs +1 -1
- package/dist/lawful-basis.js +1 -1
- package/dist/lawful-basis.mjs +1 -1
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets-consent.js +1 -1
- package/dist/presets-consent.mjs +1 -1
- package/dist/presets-dsr.js +1 -1
- package/dist/presets-dsr.mjs +1 -1
- package/dist/presets-policy.d.mts +23 -0
- package/dist/presets-policy.d.ts +23 -0
- package/dist/presets-policy.js +1 -1
- package/dist/presets-policy.mjs +1 -1
- package/dist/presets.d.mts +230 -1
- package/dist/presets.d.ts +230 -1
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/ropa-lite.js +1 -1
- package/dist/ropa-lite.mjs +1 -1
- package/dist/ropa.d.mts +24 -3
- package/dist/ropa.d.ts +24 -3
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -1
- package/dist/server.d.mts +62 -0
- package/dist/server.d.ts +62 -0
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/styles.css +2 -0
- package/dist/unstyled.js +1 -1
- package/dist/unstyled.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-25TNTLHJ.mjs +0 -1
- package/dist/chunk-3JPDTXGC.js +0 -1
- package/dist/chunk-43OQNS2J.mjs +0 -6
- package/dist/chunk-5AECGMEB.js +0 -1
- package/dist/chunk-5EKQX6GM.mjs +0 -1
- package/dist/chunk-5GVMKUMP.js +0 -1
- package/dist/chunk-6GM2PBTF.js +0 -2
- package/dist/chunk-73BMSK67.js +0 -1
- package/dist/chunk-COD3RMTL.mjs +0 -1
- package/dist/chunk-EKNWO4DK.js +0 -1
- package/dist/chunk-EXEXUAF6.mjs +0 -1
- package/dist/chunk-EZCGTHQV.js +0 -6
- package/dist/chunk-FMJ6ICLJ.js +0 -1
- package/dist/chunk-G7JKRYM5.mjs +0 -1
- package/dist/chunk-GEP52QFH.mjs +0 -1
- package/dist/chunk-IB3KSUPZ.mjs +0 -1
- package/dist/chunk-JWAN5J4Y.js +0 -1
- package/dist/chunk-KY6WYHWB.mjs +0 -2
- package/dist/chunk-NDKDKDDX.js +0 -1
- package/dist/chunk-O2RDZGM2.js +0 -2
- package/dist/chunk-O45PKBZA.mjs +0 -6
- package/dist/chunk-OLEUIYE2.mjs +0 -1
- package/dist/chunk-PGI2LM6P.js +0 -103
- package/dist/chunk-PZRQWPWD.js +0 -1
- package/dist/chunk-Q4CSVWSS.mjs +0 -1
- package/dist/chunk-QMAVEHOR.js +0 -1
- package/dist/chunk-RBMLGRDN.mjs +0 -1
- package/dist/chunk-RPXRPGHL.mjs +0 -1
- package/dist/chunk-SSH4U4TJ.js +0 -6
- package/dist/chunk-TDHH7GS2.mjs +0 -2
- package/dist/chunk-WDDCKYWA.js +0 -1
- package/dist/chunk-WKTKTLMF.js +0 -1
- package/dist/chunk-X3GCGC3H.mjs +0 -103
- package/dist/chunk-XN2UYZXH.mjs +0 -93
- package/dist/chunk-YWCBI7SI.js +0 -93
- package/dist/chunk-ZQZJNKVB.mjs +0 -1
package/dist/chunk-EZCGTHQV.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),S=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var S__default=/*#__PURE__*/_interopDefault(S);var j=({result:a,sections:m,showFullReport:g=true,allowPrint:u=true,allowExport:v=true,onExport:f,className:N="",buttonClassName:x="",classNames:b={},unstyled:y=false})=>{let o=S.useMemo(()=>new Date().toLocaleDateString(),[]),d=(r,s)=>{let i=s?b[s]:void 0;return !i&&s==="printButton"&&(i=b.primaryButton),chunkAME4HJR4_js.a(r,i,y)},l=r=>new Date(r).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),w=r=>{let s=a.answers[r];return s==null?"Not answered":typeof s=="boolean"?s?"Yes":"No":Array.isArray(s)?s.join(", "):String(s)},k=()=>{window.print();},C=r=>{f&&f(r);},R=r=>jsxRuntime.jsx("span",{className:d(`px-2 py-1 rounded text-xs font-medium ${{low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--warning",critical:"ndpr-badge ndpr-badge--destructive"}[r]}`,"riskBadge"),children:r.charAt(0).toUpperCase()+r.slice(1)});return jsxRuntime.jsxs("div",{"data-ndpr-component":"dpia-report",className:`${d("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 print:shadow-none print:p-0","root")} ${N}`,children:[jsxRuntime.jsxs("div",{className:d("mb-8 border-b border-gray-200 dark:border-gray-700 pb-6 print:pb-4","header"),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h1",{className:d("ndpr-card__title","title"),children:"Data Protection Impact Assessment Report"}),jsxRuntime.jsx("h2",{className:"text-xl ndpr-text-muted mb-4",children:a.title})]}),(u||v)&&jsxRuntime.jsxs("div",{className:"flex space-x-2 print:hidden",children:[u&&jsxRuntime.jsx("button",{onClick:k,className:`${d("px-3 py-1 bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-white rounded hover:bg-gray-300 dark:hover:bg-gray-600","printButton")} ${x}`,children:jsxRuntime.jsxs("span",{className:"flex items-center",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"})}),"Print"]})}),v&&jsxRuntime.jsx("div",{className:"relative inline-block",children:jsxRuntime.jsx("button",{onClick:()=>C("pdf"),className:`px-3 py-1 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${x}`,children:jsxRuntime.jsxs("span",{className:"flex items-center",children:[jsxRuntime.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Export PDF"]})})})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Assessor:"})," ",a.assessor.name,", ",a.assessor.role]}),jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Contact:"})," ",a.assessor.email]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Started:"})," ",l(a.startedAt)]}),jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Completed:"})," ",a.completedAt?l(a.completedAt):"In progress"]}),jsxRuntime.jsxs("p",{className:"ndpr-form-field__hint",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Next review:"})," ",a.reviewDate?l(a.reviewDate):"Not scheduled"]})]})]})]}),jsxRuntime.jsxs("div",{className:d("mb-8","summary"),children:[jsxRuntime.jsx("h2",{className:"ndpr-section-heading",children:"Executive Summary"}),jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsxs("div",{className:"flex items-center mb-2",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"font-medium mr-2",children:"Overall Risk Level:"}),R(a.overallRiskLevel)]}),jsxRuntime.jsxs("div",{className:d("mb-2","conclusion"),children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Conclusion:"})," ",a.conclusion]}),jsxRuntime.jsxs("div",{role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Can Proceed:"})," ",a.canProceed?"Yes":"No"]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-medium ndpr-text-foreground mb-2",children:"Processing Activity Description"}),jsxRuntime.jsx("p",{className:"ndpr-text-muted mb-4",children:a.processingDescription}),a.recommendations&&a.recommendations.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"font-medium ndpr-text-foreground mb-2",children:"Key Recommendations"}),jsxRuntime.jsx("ul",{className:"list-disc pl-5 ndpr-text-muted",children:a.recommendations.map((r,s)=>jsxRuntime.jsx("li",{className:d("","recommendation"),children:r},s))})]})]})]}),jsxRuntime.jsxs("div",{className:"mb-8",children:[jsxRuntime.jsx("h2",{className:"ndpr-section-heading",children:"Identified Risks"}),a.risks.length===0?jsxRuntime.jsx("p",{className:"ndpr-text-muted",children:"No risks identified."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:d("min-w-full divide-y divide-gray-200 dark:divide-gray-700","riskTable"),children:[jsxRuntime.jsx("thead",{className:"ndpr-panel",children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Risk"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Likelihood"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Impact"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Risk Level"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Mitigated"})]})}),jsxRuntime.jsx("tbody",{className:"ndpr-table",children:a.risks.map(r=>jsxRuntime.jsxs("tr",{className:d("","riskRow"),children:[jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:r.description}),jsxRuntime.jsxs("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:[r.likelihood," / 5"]}),jsxRuntime.jsxs("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:[r.impact," / 5"]}),jsxRuntime.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:R(r.level)}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:r.mitigated?jsxRuntime.jsx("span",{className:"ndpr-text-success",children:"Yes"}):jsxRuntime.jsx("span",{className:"ndpr-text-destructive",children:"No"})})]},r.id))})]})})]}),g&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:"ndpr-section-heading",children:"Full Assessment Details"}),m.map(r=>{let s=r.questions.filter(i=>a.answers[i.id]!==void 0);return s.length===0?null:jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium ndpr-text-foreground mb-2",children:r.title}),jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",children:[jsxRuntime.jsx("thead",{className:"ndpr-panel",children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Question"}),jsxRuntime.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Answer"})]})}),jsxRuntime.jsx("tbody",{className:"ndpr-table",children:s.map(i=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:i.text}),jsxRuntime.jsx("td",{className:"px-6 py-4 whitespace-normal text-sm ndpr-text-muted",children:w(i.id)})]},i.id))})]})})]},r.id)})]}),jsxRuntime.jsxs("div",{className:"mt-8 pt-4 border-t border-gray-200 dark:border-gray-700 text-sm ndpr-text-muted",children:[jsxRuntime.jsx("p",{children:"This DPIA was conducted in accordance with NDPA 2023 Section 28."}),jsxRuntime.jsxs("p",{children:["DPIA Report Version: ",a.version]}),jsxRuntime.jsxs("p",{children:["Generated on: ",o]}),jsxRuntime.jsx("p",{className:"mt-2 italic",role:"note",children:chunkZVOIR4QH_js.a})]})]})};var H=({steps:a,onStepClick:m,clickable:g=true,orientation:u="horizontal",className:v="",activeStepClassName:f="",completedStepClassName:N="",incompleteStepClassName:x="",classNames:b={},unstyled:y=false})=>{let o=(n,p)=>chunkAME4HJR4_js.a(n,p?b[p]:void 0,y),d=n=>{g&&m&&m(n);},l=u==="vertical";return jsxRuntime.jsx("div",{"data-ndpr-component":"dpia-step-indicator",role:"navigation","aria-label":"Step progress",className:`${o(l?"flex flex-col space-y-4":"flex items-center justify-between","root")} ${v}`,children:a.map((n,p)=>{let w=p===a.length-1,k=n.active?o(`font-medium ${f||"ndpr-text-primary"}`,"label"):n.completed?o(N||"ndpr-text-success","label"):o(x||"ndpr-card__subtitle","label"),C=n.active?o("flex items-center justify-center w-8 h-8 rounded-full bg-[rgb(var(--ndpr-primary)/0.1)] dark:bg-[rgb(var(--ndpr-primary)/0.2)] ndpr-text-primary border-2 border-[rgb(var(--ndpr-primary))] dark:border-[rgb(var(--ndpr-primary))]","stepActive"):n.completed?o("flex items-center justify-center w-8 h-8 rounded-full bg-green-100 dark:bg-green-900 ndpr-text-success border-2 border-green-600 dark:border-green-400","stepCompleted"):o("flex items-center justify-center w-8 h-8 rounded-full bg-gray-100 dark:bg-gray-700 ndpr-text-muted border-2 border-gray-300 dark:border-gray-600","stepPending");return jsxRuntime.jsxs(S__default.default.Fragment,{children:[jsxRuntime.jsxs("div",{className:o(`${l?"flex items-start":"flex flex-col items-center"} ${g?"cursor-pointer":""}`,"step"),onClick:()=>d(n.id),"aria-current":n.active?"step":void 0,children:[jsxRuntime.jsx("div",{className:`
|
|
2
|
-
flex items-center justify-center
|
|
3
|
-
${l?"mr-4":""}
|
|
4
|
-
`,children:jsxRuntime.jsx("div",{className:C,children:n.icon?n.icon:n.completed?jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):jsxRuntime.jsx("span",{children:p+1})})}),jsxRuntime.jsxs("div",{className:`
|
|
5
|
-
${l?"flex-1":"mt-2 text-center"}
|
|
6
|
-
`,children:[jsxRuntime.jsx("div",{className:`text-sm font-medium ${k}`,children:n.label}),n.description&&jsxRuntime.jsx("div",{className:"ndpr-form-field__hint",children:n.description})]})]}),!w&&jsxRuntime.jsx("div",{className:o(l?"ml-4 h-8 border-l-2 border-gray-300 dark:border-gray-600":"w-full border-t-2 border-gray-300 dark:border-gray-600 hidden sm:block","connector")})]},n.id)})})};exports.a=j;exports.b=H;
|
package/dist/chunk-FMJ6ICLJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var e={consent:{title:"A M\u1ECDy\xEC \xC0\u1E63\xEDr\xED R\u1EB9",description:"A \u0144 lo k\xFAk\xEC \xE0ti \xE0w\u1ECDn \xECm\u1ECD\u0300-\u1EB9\u0300r\u1ECD t\xF3 j\u1ECDra l\xE1ti p\xE8s\xE8 i\u1E63\u1EB9\u0301 wa \xE0ti l\xE1ti m\xFA \xECr\xEDr\xED r\u1EB9 d\xE1ra s\xED i. A \u0144 gba \xECfoh\xF9n\u1E63\u1ECD\u0300kan r\u1EB9 g\u1EB9\u0301g\u1EB9\u0301 b\xED Abala 25-26 ti \xD2fin \xCCd\xE1\xE0b\xF2b\xF2 D\xE1t\xE0 ti N\xE0\xECj\xEDr\xED\xE0.",acceptAll:"Gba Gbogbo",rejectAll:"K\u1ECD Gbogbo",customize:"\u1E62\xE0t\xFAn\u1E63e",savePreferences:"T\u1ECD\u0301j\xFA \xC0\u1E63\xE0y\xE0n",selectAll:"Yan Gbogbo",deselectAll:"Y\u1ECD Gbogbo K\xFAr\xF2",required:"K\xF2 \u1E62e Y\u1EB9ra F\xFAn",cookieNotice:'N\xEDpa t\xEDt\u1EB9 "Gba Gbogbo", o foh\xF9n \u1E63\u1ECD\u0300kan p\u1EB9\u0300l\xFA l\xEDlo gbogbo k\xFAk\xEC. \u1E62\xE0b\u1EB9\u0300w\xF2 \xCCl\xE0n\xE0 K\xFAk\xEC wa l\xE1ti k\u1EB9\u0301k\u1ECD\u0300\u1ECD\u0301 s\xEDi.'},dsr:{title:"Fi \xCCb\xE9\xE8r\xE8 On\xED-d\xE1t\xE0 S\xEDl\u1EB9\u0300",description:"Lo f\u1ECD\u0301\u1ECD\u0300m\xF9 y\xEC\xED l\xE1ti lo \xE0w\u1ECDn \u1EB9\u0300t\u1ECD\u0301 r\u1EB9 l\xE1b\u1EB9\u0301 \xD2fin \xCCd\xE1\xE0b\xF2b\xF2 D\xE1t\xE0 ti N\xE0\xECj\xEDr\xED\xE0 (NDPA), Ap\xE1 K\u1EB9f\xE0, Abala 34-38.",submitRequest:"Fi \xCCb\xE9\xE8r\xE8 S\xEDl\u1EB9\u0300",reset:"T\xFAn B\u1EB9\u0300r\u1EB9\u0300",fullName:"Or\xFAk\u1ECD K\xEDk\xFAn",email:"\xC0d\xEDr\u1EB9\u0301s\xEC \xCDme\xE8l\xEC",phone:"N\u1ECD\u0301mb\xE0 F\xF3\xF2n\xF9 (\xC0\u1E63\xE0y\xE0n)",requestType:"Ir\xFA \xCCb\xE9\xE8r\xE8",additionalInfo:"\xC0l\xE0y\xE9 \xC0fik\xFAn",identityVerification:"\xCCd\xE1nil\xF3j\xFA \xCCd\xE1nim\u1ECD\u0300",identifierType:"Ir\xFA \xCCd\xE1nim\u1ECD\u0300",identifierValue:"Iye \xCCd\xE1nim\u1ECD\u0300",privacyNotice:"\xC0w\u1ECDn \xECr\xF2y\xECn t\xED o b\xE1 p\xE8s\xE8 n\xEDn\xFA f\u1ECD\u0301\u1ECD\u0300m\xF9 y\xEC\xED ni a \xF3 l\xF2 f\xFAn \xE8te \u1E63\xED\u1E63e \xE0b\xF3j\xFAt\xF3 \xECb\xE9\xE8r\xE8 on\xED-d\xE1t\xE0 r\u1EB9 n\xECkan.",successMessage:"A ti fi \xECb\xE9\xE8r\xE8 r\u1EB9 s\xEDl\u1EB9\u0300 d\xE1rad\xE1ra."},breach:{title:"\u1E62e \xCCr\xF2y\xECn \xCCr\xFAfin D\xE1t\xE0",description:"Lo f\u1ECD\u0301\u1ECD\u0300m\xF9 y\xEC\xED l\xE1ti \u1E63e \xECr\xF2y\xECn \xECr\xFAfin d\xE1t\xE0 t\xED a fura s\xED t\xE0b\xED t\xED a ti fidi r\u1EB9\u0300 m\xFAl\u1EB9\u0300 g\u1EB9\u0301g\u1EB9\u0301 b\xED Abala 40 ti NDPA.",submitReport:"Fi \xCCr\xF2y\xECn S\xEDl\u1EB9\u0300",breachTitle:"\xC0k\u1ECDl\xE9/\xC0k\xF3p\u1ECD\u0300 \xCCr\xFAfin",category:"\u1EB8\u0300ka",discoveredAt:"\u1ECCj\u1ECD\u0301 T\xED A R\xED I",detailedDescription:"\xC0l\xE0y\xE9 K\xEDk\xFAn"},dpia:{title:"\xCCgb\xE9l\xE9w\u1ECD\u0300n Ipa \xCCd\xE1\xE0b\xF2b\xF2 D\xE1t\xE0",next:"T\u1EB9\u0300l\xE9",previous:"S\u1EB9\u0301y\xECn",complete:"Par\xED \xCCgb\xE9l\xE9w\u1ECD\u0300n",progress:"\xCCl\u1ECDs\xEDw\xE1j\xFA"},policy:{title:"Ol\xF9pil\u1EB9\u0300\u1E63\u1EB9\u0300 \xCCl\xE0n\xE0 \xC0\u1E63\xEDr\xED",generate:"\u1E62\u1EB9\u0300d\xE1 \xCCl\xE0n\xE0",preview:"\xC0y\u1EB9\u0300w\xF2",export:"Gb\xE9 J\xE1de",sections:"\xC0w\u1ECDn Abala",variables:"\xC0w\u1ECDn On\xEDy\xEDpad\xE0"},compliance:{score:"\xC0m\xEC \xCCb\xE1mu",excellent:"K\xF2 L\xE8 D\xE1ra Ju",good:"\xD3 D\xE1ra",needsWork:"N\xEDl\xF2 \xC0t\xFAn\u1E63e",critical:"P\xE0t\xE0k\xEC Gan",recommendations:"\xC0w\u1ECDn \xC0b\xE1",passed:"K\u1ECDj\xE1",gaps:"\xC0w\u1ECDn \xC0\xECp\xE9"},common:{loading:"\u0143 gb\xE9y\u1EB9\u0300w\xF2...",error:"\xC0\u1E63\xEC\u1E63e kan \u1E63\u1EB9l\u1EB9\u0300",save:"T\u1ECD\u0301j\xFA",cancel:"Fagil\xE9",delete:"Pa r\u1EB9\u0301",edit:"\u1E62\xE0t\xFAn\u1E63e",add:"Fik\xFAn",back:"Pad\xE0",next:"T\u1EB9\u0300l\xE9",search:"W\xE1",noResults:"K\xF2 s\xED \xE8s\xEC kankan"}};var i={consent:{title:"Any\u1ECB Na-akwanyere Nzuzo G\u1ECB \xD9gw\xF9",description:"Any\u1ECB na-eji kuki na tekn\u1ECDl\u1ECDj\u1ECB nd\u1ECB yiri ya enyere \u1ECDr\u1EE5 any\u1ECB aka ma melite ah\u1EE5m\u1ECBhe g\u1ECB. A na-anak\u1ECDta nkwenye g\u1ECB d\u1ECBka iwu NDPA Ngalaba 25-26 si kwuo.",acceptAll:"Nabata Niile",rejectAll:"J\u1EE5 Niile",customize:"Hazie",savePreferences:"Chekwaa Nh\u1ECDr\u1ECD",selectAll:"H\u1ECDr\u1ECD Niile",deselectAll:"Wep\u1EE5 Niile",required:"Ach\u1ECDr\u1ECD",cookieNotice:'Site na \u1ECBp\u1ECB "Nabata Niile", \u1ECB kwenyere na iji kuki niile. Gaa na Am\u1EE5ma Kuki any\u1ECB \u1ECBm\u1EE5takwu.'},dsr:{title:"Tinye Ar\u1ECBr\u1ECB\u1ECD Onye Nwe Data",description:"Jiri f\u1ECD\u1ECDm\u1EE5 a mee ka ikike g\u1ECB n'okpuru Iwu Nchedo Data nke Na\u1ECBjir\u1ECBa (NDPA), Nkebi Isii, Ngalaba 34-38 r\u1EE5\u1ECD \u1ECDr\u1EE5.",submitRequest:"Tinye Ar\u1ECBr\u1ECB\u1ECD",reset:"Maliteghar\u1ECBa",fullName:"Aha Zuru Oke",email:"Adrees\u1ECB Email",phone:"N\u1ECDmb\xE0 Ekwent\u1ECB (Nh\u1ECDr\u1ECD)",requestType:"\u1EE4d\u1ECB Ar\u1ECBr\u1ECB\u1ECD",additionalInfo:"Ozi Nd\u1ECB \u1ECCz\u1ECD",identityVerification:"Nyocha Njirimara",identifierType:"\u1EE4d\u1ECB Njirimara",identifierValue:"Uru Njirimara",privacyNotice:"A ga-eji ozi \u1ECB nyere na f\u1ECD\u1ECDm\u1EE5 a naan\u1ECB maka ebumnuche nke ilek\u1ECDta ar\u1ECBr\u1ECB\u1ECD onye nwe data g\u1ECB.",successMessage:"Etinyela ar\u1ECBr\u1ECB\u1ECD g\u1ECB nke \u1ECDma."},breach:{title:"K\u1ECD\u1ECD Mwap\u1EE5 Data",description:"Jiri f\u1ECD\u1ECDm\u1EE5 a k\u1ECD\u1ECD mwap\u1EE5 data a na-echere ma \u1ECD b\u1EE5 nke e gosip\u1EE5tara d\u1ECBka iwu NDPA Ngalaba 40 si kwuo.",submitReport:"Tinye Ak\u1EE5k\u1ECD",breachTitle:"Isiokwu/Nch\u1ECBk\u1ECDta Mwap\u1EE5",category:"Udi",discoveredAt:"\u1EE4b\u1ECDch\u1ECB A Ch\u1ECDp\u1EE5tara",detailedDescription:"Nk\u1ECDwa Zuru Oke"},dpia:{title:"Nyocha Mmet\u1EE5ta Nchedo Data",next:"\u1ECCz\u1ECD",previous:"Az\u1EE5",complete:"Mechaa Nyocha",progress:"\u1ECCganihu"},policy:{title:"Ngwa Mmep\u1EE5ta Am\u1EE5ma Nzuzo",generate:"Mep\u1EE5ta Am\u1EE5ma",preview:"Lelee",export:"Bup\u1EE5ta",sections:"Ngalaba",variables:"Mgbanwe"},compliance:{score:"Akara Ndabere",excellent:"Kachas\u1ECB Mma",good:"\u1ECC D\u1ECB Mma",needsWork:"Ch\u1ECDr\u1ECD Mmezighar\u1ECB",critical:"D\u1ECB Oke Mkpa",recommendations:"Nd\u1EE5m\u1ECDd\u1EE5",passed:"Gafere",gaps:"Oghere"},common:{loading:"Na-ebugo...",error:"Mperi mere",save:"Chekwaa",cancel:"Kagbuo",delete:"Hichap\u1EE5",edit:"Dezie",add:"Tinye",back:"Laghachi",next:"\u1ECCz\u1ECD",search:"Ch\u1ECD\u1ECD",noResults:"Enwegh\u1ECB nsonaaz\u1EE5"}};var t={consent:{title:"Muna Daraja Sirrin Ka",description:"Muna amfani da kukis da fasahohi irin su don samar da ayyukanmu da inganta kwarewar ka. Ana tattara yardar ka bisa ga Sashe na 25-26 na Dokar Kare Bayanan Nijeriya.",acceptAll:"Kar\u0253i Duka",rejectAll:"\u0198i Duka",customize:"Gyara Za\u0253i",savePreferences:"Ajiye Za\u0253u\u0253\u0253uka",selectAll:"Za\u0253i Duka",deselectAll:"Cire Duka",required:"Wajibi Ne",cookieNotice:'Ta hanyar danna "Kar\u0253i Duka", ka yarda da amfani da dukkan kukis. Ziyarci Manufar Kukis don \u0199arin bayani.'},dsr:{title:"\u0198addamar da Bu\u0199atar Mai Bayanan",description:"Yi amfani da wannan fom don aiwatar da ha\u0199\u0199o\u0199in ka a \u0199ar\u0199ashin Dokar Kare Bayanan Nijeriya (NDPA), Bangare na Shida, Sashe 34-38.",submitRequest:"\u0198addamar da Bu\u0199ata",reset:"Sake Saiti",fullName:"Sunan Cikakke",email:"Adireshin Imel",phone:"Lambar Waya (Na Za\u0253i)",requestType:"Nau'in Bu\u0199ata",additionalInfo:"\u0198arin Bayani",identityVerification:"Tabbatar da Ainihi",identifierType:"Nau'in Ganewa",identifierValue:"Darajar Ganewa",privacyNotice:"Za a yi amfani da bayanan da ka bayar a cikin wannan fom ne kawai don sarrafa bu\u0199atar mai bayanan ka.",successMessage:"An \u0199addamar da bu\u0199atar ka cikin nasara."},breach:{title:"Bayar da Rahoton Karya Bayanan",description:"Yi amfani da wannan fom don bayar da rahoton zargin ko tabbatar da karya bayanan bisa ga Sashe na 40 na NDPA.",submitReport:"\u0198addamar da Rahoto",breachTitle:"Taken/Ta\u0199aitaccen Karya",category:"Rukunin",discoveredAt:"Ranar da Aka Gano",detailedDescription:"Cikakken Bayani"},dpia:{title:"Tantance Tasirin Kare Bayanan",next:"Na Gaba",previous:"Na Baya",complete:"Kammala Tantancewa",progress:"Ci Gaba"},policy:{title:"Mai \u0198ir\u0199irar Manufar Sirri",generate:"\u0198ir\u0199iri Manufa",preview:"Duba",export:"Fitar",sections:"Sassa",variables:"Masu Canjin"},compliance:{score:"Makin Bin Doka",excellent:"Kyakkyawa Sosai",good:"Mai Kyau",needsWork:"Yana Bu\u0199atar Gyara",critical:"Mai Muhimmanci",recommendations:"Shawarwari",passed:"Ya Wuce",gaps:"Gi\u0253i"},common:{loading:"Ana lodawa...",error:"Kuskure ya faru",save:"Ajiye",cancel:"Soke",delete:"Goge",edit:"Gyara",add:"\u0198ara",back:"Komawa",next:"Na Gaba",search:"Bincika",noResults:"Ba a sami sakamako ba"}};var o={consent:{title:"Your Privacy Dey Important to Us",description:"We dey use cookies and technologies wey dey similar to give you beta service and make your experience sweet. We dey collect your consent as NDPA Sections 25-26 talk am.",acceptAll:"Accept Everything",rejectAll:"Reject Everything",customize:"Choose Wetin You Want",savePreferences:"Save Your Choice",selectAll:"Select Everything",deselectAll:"Remove Everything",required:"E Dey Required",cookieNotice:'If you click "Accept Everything", you don agree say we fit use all the cookies. Check our Cookie Policy to sabi more.'},dsr:{title:"Send Data Subject Request",description:"Use this form take exercise your rights under the Nigeria Data Protection Act (NDPA), Part VI, Sections 34-38.",submitRequest:"Send Your Request",reset:"Start Again",fullName:"Your Full Name",email:"Email Address",phone:"Phone Number (If You Want)",requestType:"Type of Request",additionalInfo:"Any Other Information",identityVerification:"Verify Your Identity",identifierType:"Type of ID",identifierValue:"ID Value",privacyNotice:"The information wey you give for this form, na only for processing your data subject request we go use am.",successMessage:"We don receive your request successfully."},breach:{title:"Report Data Breach",description:"Use this form report any data breach wey you suspect or wey don happen, as NDPA Section 40 talk am.",submitReport:"Send Report",breachTitle:"Breach Title/Summary",category:"Category",discoveredAt:"Date Wey You Discover Am",detailedDescription:"Full Gist About Wetin Happen"},dpia:{title:"Data Protection Impact Assessment",next:"Next",previous:"Go Back",complete:"Finish Assessment",progress:"Progress"},policy:{title:"Privacy Policy Generator",generate:"Create Policy",preview:"Preview",export:"Export",sections:"Sections",variables:"Variables"},compliance:{score:"Compliance Score",excellent:"E Dey Excellent",good:"E Good",needsWork:"E Need Work",critical:"E Dey Critical",recommendations:"Wetin We Recommend",passed:"E Pass",gaps:"Gaps"},common:{loading:"E dey load...",error:"Error don happen",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",back:"Go Back",next:"Next",search:"Search",noResults:"We no find any result"}};exports.a=e;exports.b=i;exports.c=t;exports.d=o;
|
package/dist/chunk-G7JKRYM5.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-SFGW37LE.mjs';import {b,a as a$1}from'./chunk-ZJYULEER.mjs';import {useState,useRef,useEffect,useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var G=({options:g,settings:d,onSave:S,title:l="Manage Your Privacy Settings",description:R="Update your consent preferences at any time. Required cookies cannot be disabled as they are necessary for the website to function. Consent management is provided in accordance with NDPA Sections 25-26.",saveButtonText:M="Save Preferences",resetButtonText:w="Reset to Defaults",version:_="1.0",className:f="",buttonClassName:v="",primaryButtonClassName:T="",secondaryButtonClassName:$="",classNames:n,unstyled:e,showSuccessMessage:k=true,successMessage:D="Your preferences have been saved.",successMessageDuration:P=3e3})=>{let[u,c]=useState({}),[q,b$1]=useState(false),p=useRef(null);useEffect(()=>()=>{p.current&&clearTimeout(p.current);},[]);let x=useMemo(()=>g.map(t=>`${t.id}:${t.defaultValue?"1":"0"}`).join("|"),[g]);useEffect(()=>{if(d&&d.consents)c(d.consents);else {let t={};g.forEach(o=>{t[o.id]=o.defaultValue||false;}),c(t);}},[x,d]);let y=(t,o)=>{c(s=>b(a$1({},s),{[t]:o}));},E=()=>{let t={consents:u,timestamp:Date.now(),version:_,method:"manager",hasInteracted:true};S(t),k&&(b$1(true),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{b$1(false);},P));},I=()=>{let t={};g.forEach(o=>{t[o.id]=o.defaultValue||false;}),c(t);},L=`ndpr-consent-manager__button ndpr-consent-manager__button--primary ${v} ${T}`.trim(),V=`ndpr-consent-manager__button ndpr-consent-manager__button--secondary ${v} ${$}`.trim(),F=(n==null?void 0:n.primaryButton)||(n==null?void 0:n.saveButton)||L,O=(n==null?void 0:n.secondaryButton)||(n==null?void 0:n.resetButton)||V,Y=`ndpr-consent-manager${f?` ${f}`:""}`;return jsxs("div",{"data-ndpr-component":"consent-manager",className:a(Y,n==null?void 0:n.root,e),children:[jsx("h2",{className:a("ndpr-consent-manager__title",n==null?void 0:n.title,e),children:l}),jsx("p",{className:a("ndpr-consent-manager__description",n==null?void 0:n.description,e),children:R}),jsx("div",{className:a("ndpr-consent-manager__options-list",n==null?void 0:n.optionsList,e),children:g.map(t=>{let o=`consent-manager-${t.id}`;return jsxs("div",{className:a("ndpr-consent-manager__option",n==null?void 0:n.optionItem,e),children:[jsxs("div",{className:e?"":"ndpr-consent-manager__option-info",children:[jsx("h3",{className:e?"":"ndpr-consent-manager__option-label",children:t.label}),jsx("p",{className:e?"":"ndpr-consent-manager__option-description",children:t.description})]}),jsxs("label",{htmlFor:o,className:e?"":"ndpr-consent-manager__toggle-wrapper",children:[jsx("input",{id:o,type:"checkbox",className:e?"":"ndpr-consent-manager__toggle-input",checked:u[t.id]||false,onChange:s=>y(t.id,s.target.checked),disabled:t.required}),jsx("span",{"aria-hidden":"true",className:a("ndpr-consent-manager__toggle",n==null?void 0:n.toggle,e)}),jsxs("span",{className:e?"":"ndpr-consent-manager__toggle-status",children:[u[t.id]?"Enabled":"Disabled",t.required&&jsx("span",{className:e?"":"ndpr-consent-manager__required-marker",children:"(Required)"})]})]})]},t.id)})}),q&&jsx("div",{className:e?"":"ndpr-consent-manager__success","aria-live":"polite",role:"status",children:D}),jsxs("div",{className:e?"":"ndpr-consent-manager__buttons",children:[jsx("button",{onClick:E,className:a(F,n==null?void 0:n.saveButton,e),children:M}),jsx("button",{onClick:I,className:a(O,n==null?void 0:n.resetButton,e),children:w})]}),jsxs("div",{className:e?"":"ndpr-consent-manager__meta",children:[jsxs("p",{children:["Last updated: ",d?new Date(d.timestamp).toLocaleString():"Never"]}),jsxs("p",{children:["Version: ",_]})]})]})};export{G as a};
|
package/dist/chunk-GEP52QFH.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-TDHH7GS2.mjs';import {b}from'./chunk-CWY2FMIC.mjs';import {c,b as b$1,a as a$1}from'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsx}from'react/jsx-runtime';var u=d=>{var o=d,{template:e,templateOverrides:r,initialContext:t}=o,l=c(o,["template","templateOverrides","initialContext"]);let n=useMemo(()=>{if(t)return t;if(e)return b(e,r)},[t,e,r]);return jsx(a,b$1(a$1({},l),{initialContext:n}))};export{u as a};
|
package/dist/chunk-IB3KSUPZ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-VPNK7OID.mjs';import {a as a$1}from'./chunk-DBZSN4WP.mjs';import {a,b}from'./chunk-ZJYULEER.mjs';import {useRef,useState,useEffect,useCallback}from'react';function K(f,R){return R?a$1(f):{load:()=>null,save:()=>{},remove:()=>{}}}function G({initialRequests:f=[],requestTypes:R,adapter:p,storageKey:T="ndpr_dsr_requests",useLocalStorage:h=true,onSubmit:g,onUpdate:m}){let y=p!=null?p:K(T,h),a$1=useRef(y);a$1.current=y;let[n,i]=useState(f),[k,l]=useState(true);useEffect(()=>{let e=false;try{let t=a$1.current.load();t instanceof Promise?t.then(s=>{e||(s&&i(s),l(!1));},()=>{e||l(!1);}):(t&&i(t),l(!1));}catch(t){e||l(false);}return ()=>{e=true;}},[]);let c=useCallback(e=>{Promise.resolve(a$1.current.save(e)).catch(t=>{console.warn("[ndpr-toolkit] Failed to save DSR requests:",t);});},[]),x=()=>"dsr_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),P=useCallback(e=>{let t=R.find(o=>o.id===e.type),s=(t==null?void 0:t.estimatedCompletionTime)||30,r=Date.now(),d=r+s*24*60*60*1e3,q=a({id:x(),status:"pending",createdAt:r,updatedAt:r,dueDate:d},e);return i(o=>{let S=[...o,q];return c(S),S}),g&&g(q),q},[R,c,g]),B=useCallback((e,t)=>{let s=null;return i(r=>{let d=r.findIndex(S=>S.id===e);if(d===-1)return r;let q=r[d];s=b(a(a({},q),t),{updatedAt:Date.now()});let o=[...r];return o[d]=s,c(o),o}),s&&m&&m(s),s},[c,m]),C=useCallback(e=>n.find(t=>t.id===e)||null,[n]),I=useCallback(e=>n.filter(t=>t.status===e),[n]),L=useCallback(e=>n.filter(t=>t.type===e),[n]),O=useCallback(e=>R.find(t=>t.id===e),[R]),_=useCallback(e=>{let{formattedRequest:t}=b$1(e);return t},[]),U=useCallback(()=>{i([]),Promise.resolve(a$1.current.remove()).catch(e=>{console.warn("[ndpr-toolkit] Failed to remove DSR requests:",e);});},[a$1]);return {requests:n,submitRequest:P,updateRequest:B,getRequest:C,getRequestsByStatus:I,getRequestsByType:L,getRequestType:O,formatRequest:_,clearRequests:U,isLoading:k}}export{G as a};
|
package/dist/chunk-JWAN5J4Y.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunk6GM2PBTF_js=require('./chunk-6GM2PBTF.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var u=d=>{var o=d,{template:e,templateOverrides:r,initialContext:t}=o,l=chunkRFPLZDIO_js.c(o,["template","templateOverrides","initialContext"]);let n=react.useMemo(()=>{if(t)return t;if(e)return chunkNUOHT3LO_js.b(e,r)},[t,e,r]);return jsxRuntime.jsx(chunk6GM2PBTF_js.a,chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},l),{initialContext:n}))};exports.a=u;
|
package/dist/chunk-KY6WYHWB.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-EWVK45Z3.mjs';import {c}from'./chunk-25TNTLHJ.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 fr=({categories:Ze,onSubmit:Ge,onValidationError:u,title:x,formDescription:C,submitButtonText:S,className:Q="",buttonClassName:X="",classNames:d={},unstyled:c$1=false,isSubmitting:f=false,showConfirmation:Ke=true,confirmationMessage:We="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:Je=true,maxAttachments:A=5,maxFileSize:D=5*1024*1024,allowedFileTypes:R=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:t,onReset:w})=>{var we,Fe,qe,Pe,ke,je,Te,Ie,Ee,Be,Me,$e,Oe,Le;let F=c(),Qe=(we=x!=null?x:F.breach.title)!=null?we:"Report a Data Breach",Xe=(Fe=C!=null?C:F.breach.description)!=null?Fe:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",Ve=(qe=S!=null?S:F.breach.submitReport)!=null?qe:"Submit Report",V=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())}`},[q,ee]=useState((t==null?void 0:t.title)||""),[P,re]=useState((t==null?void 0:t.description)||""),[k,te]=useState((t==null?void 0:t.category)||""),[j,ie]=useState(V(t==null?void 0:t.discoveredAt)),[T,ae]=useState(V(t==null?void 0:t.occurredAt)),[I,ne]=useState(((Pe=t==null?void 0:t.reporter)==null?void 0:Pe.name)||""),[N,oe]=useState(((ke=t==null?void 0:t.reporter)==null?void 0:ke.email)||""),[E,se]=useState(((je=t==null?void 0:t.reporter)==null?void 0:je.department)||""),[B,de]=useState(((Te=t==null?void 0:t.reporter)==null?void 0:Te.phone)||""),[me,ce]=useState((t==null?void 0:t.affectedSystems)||[]),[er,pe]=useState(((Ie=t==null?void 0:t.affectedSystems)==null?void 0:Ie.join(", "))||""),[M,le]=useState((t==null?void 0:t.dataTypes)||[]),[h,ge]=useState((t==null?void 0:t.estimatedAffectedSubjects)!=null?String(t.estimatedAffectedSubjects):""),[$,be]=useState((t==null?void 0:t.approximateRecordCount)!=null?String(t.approximateRecordCount):""),[O,fe]=useState(((Ee=t==null?void 0:t.dataSubjectCategories)==null?void 0:Ee.join(", "))||""),[he,ve]=useState((Be=t==null?void 0:t.involvesSensitiveData)!=null?Be:false),[L,Ne]=useState((t==null?void 0:t.likelyConsequences)||""),[z,_e]=useState((t==null?void 0:t.mitigationMeasures)||""),[Y,ye]=useState(((Me=t==null?void 0:t.dpoContact)==null?void 0:Me.name)||""),[U,ue]=useState((($e=t==null?void 0:t.dpoContact)==null?void 0:$e.email)||""),[H,xe]=useState(((Oe=t==null?void 0:t.dpoContact)==null?void 0:Oe.phone)||""),[Z,Ce]=useState((Le=t==null?void 0:t.isPhasedReport)!=null?Le:false),[G,Se]=useState((t==null?void 0:t.supplementsReportId)||""),[Ae,De]=useState((t==null?void 0:t.status)||"ongoing"),[K,Re]=useState((t==null?void 0:t.initialActions)||""),[_,W]=useState([]),[rr,J]=useState(false),[a$3,v]=useState({}),tr=()=>{ee(""),re(""),te(""),ie(""),ae(""),ne(""),oe(""),se(""),de(""),ce([]),pe(""),le([]),ge(""),be(""),fe(""),ve(false),Ne(""),_e(""),ye(""),ue(""),xe(""),Ce(false),Se(""),De("ongoing"),Re(""),W([]),J(false),v({}),w==null||w();},ir=r=>{let o=r.target.value;pe(o);let l=o.split(",").map(s=>s.trim()).filter(Boolean);ce(l);},ar=r=>{le(o=>o.includes(r)?o.filter(l=>l!==r):[...o,r]);},nr=r=>{var ze;let o=r.target.files;if(!o)return;let l=[],s={};if(_.length+o.length>A){s.attachments=`Maximum of ${A} 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>D){s.attachments=`File ${y.name} exceeds the maximum size of ${D/(1024*1024)}MB`;continue}let Ye="."+((ze=y.name.split(".").pop())==null?void 0:ze.toLowerCase());if(!R.includes(Ye)){s.attachments=`File type ${Ye} is not allowed`;continue}l.push(y);}l.length>0&&W(g=>[...g,...l]),Object.keys(s).length>0?v(g=>a$1(a$1({},g),s)):v(g=>b(a$1({},g),{attachments:""}));},or=r=>{W(o=>o.filter((l,s)=>s!==r));},sr=()=>{let r={};return q.trim()||(r.breachTitle="Breach title is required"),P.trim()||(r.description="Description is required"),k||(r.category="Category is required"),j||(r.discoveredAt="Discovery date is required"),I.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",E.trim()||(r.reporterDepartment="Reporter department is required"),me.length===0&&(r.affectedSystems="At least one affected system is required"),M.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},dr=r=>{r.preventDefault();let o=sr();if(Object.keys(o).length>0){u==null||u(o);return}let l={title:a$2(q),description:a$2(P),category:k,discoveredAt:new Date(j).getTime(),occurredAt:T?new Date(T).getTime():void 0,reportedAt:Date.now(),reporter:{name:a$2(I),email:a$2(N),department:a$2(E),phone:B?a$2(B):void 0},affectedSystems:me.map(s=>a$2(s)),dataTypes:M,estimatedAffectedSubjects:h?Number(h):void 0,approximateRecordCount:$?Number($):void 0,dataSubjectCategories:O?O.split(",").map(s=>a$2(s.trim())).filter(Boolean):void 0,involvesSensitiveData:he,likelyConsequences:L?a$2(L):void 0,mitigationMeasures:z?a$2(z):void 0,dpoContact:Y||U?{name:a$2(Y),email:a$2(U),phone:H?a$2(H):void 0}:void 0,isPhasedReport:Z||void 0,supplementsReportId:G?a$2(G):void 0,status:Ae,initialActions:K?a$2(K):void 0,attachments:_.map(s=>({name:s.name,type:s.type,size:s.size,file:s}))};Ge(l),Ke&&J(true);};if(rr)return jsxs("div",{"data-ndpr-component":"breach-report-form",className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${Q}`,children:[jsx("h2",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Submitted"}),jsx("p",{className:"ndpr-text-success",children:We}),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:()=>J(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${X}`,children:"Report Another Breach"})]});let mr=[{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 ${Q}`,d.root,c$1),children:[jsx("h2",{className:a("ndpr-section-heading",d.title,c$1),children:Qe}),jsx("p",{className:"ndpr-card__subtitle",children:Xe}),jsx("form",{onSubmit:dr,className:a("",d.form,c$1),children:jsxs("div",{className:"ndpr-form-section",children:[jsxs("div",{className:a("",d.fieldGroup,c$1),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$1),children:["Breach Title/Summary ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"breachTitle",value:q,onChange:r=>ee(r.target.value),className:a("ndpr-form-field__input",d.input,c$1),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$1),children:["Breach Category ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"category",value:k,onChange:r=>te(r.target.value),className:a("ndpr-form-field__input",d.select,c$1),required:true,"aria-invalid":!!a$3.category,"aria-describedby":a$3.category?"category-error":void 0,children:[jsx("option",{value:"",children:"Select a category"}),Ze.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$1),children:["Detailed Description ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("textarea",{id:"description",value:P,onChange:r=>re(r.target.value),rows:4,className:a("ndpr-form-field__input",d.textarea,c$1),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:j,onChange:r=>ie(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:T,onChange:r=>ae(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:I,onChange:r=>ne(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=>oe(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:E,onChange:r=>se(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:B,onChange:r=>de(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:er,onChange:ir,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=>ge(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:mr.map(r=>jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"checkbox",id:`dataType_${r.id}`,checked:M.includes(r.id),onChange:()=>ar(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:Ae,onChange:r=>De(r.target.value),className:a("ndpr-form-field__input",d.select,c$1),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:$,onChange:r=>be(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:O,onChange:r=>fe(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:he,onChange:r=>ve(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:L,onChange:r=>Ne(r.target.value),placeholder:"e.g. identity theft, financial loss, reputational damage, discrimination",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)}),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:z,onChange:r=>_e(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$1)})]}),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:Y,onChange:r=>ye(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:U,onChange:r=>ue(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:H,onChange:r=>xe(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=>Ce(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:G,onChange:r=>Se(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:K,onChange:r=>Re(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$1)})]})]})]}),Je&&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 ",A," files, ",D/(1024*1024),"MB each. Allowed types: ",R.join(", ")]}),jsx("input",{type:"file",onChange:nr,multiple:true,className:"ndpr-form-field__input",accept:R.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:()=>or(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$1),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 ${X} ${f?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c$1),children:f?"Submitting...":Ve}),jsx("button",{type:"button",onClick:tr,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$1),children:"Reset"})]})]})})]})};
|
|
2
|
-
export{fr as a};
|
package/dist/chunk-NDKDKDDX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkWKTKTLMF_js=require('./chunk-WKTKTLMF.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var d=react.createContext({}),s=class extends react.Component{constructor(e){super(e);this.reset=()=>{this.setState({error:null});};this.state={error:null};}static getDerivedStateFromError(e){return {error:e}}componentDidCatch(e,r){var a,t;(t=(a=this.props).onError)==null||t.call(a,e,r);}render(){let{error:e}=this.state;if(e){let{fallback:r}=this.props;return typeof r=="function"?r(e,this.reset):r!==void 0?r:jsxRuntime.jsxs("div",{role:"alert",style:{padding:"16px",border:"1px solid #e53e3e",borderRadius:"4px",backgroundColor:"#fff5f5",color:"#c53030"},children:[jsxRuntime.jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"16px"},children:"Something went wrong"}),jsxRuntime.jsx("p",{style:{margin:0,fontSize:"14px"},children:e.message})]})}return this.props.children}},E=a=>{var t=a,{children:o,fallback:p,onError:e}=t,r=chunkRFPLZDIO_js.c(t,["children","fallback","onError"]);let l=react.useMemo(()=>{if(!r.theme)return;let n={};return r.theme.primary&&(n["--ndpr-primary"]=r.theme.primary),r.theme.primaryHover&&(n["--ndpr-primary-hover"]=r.theme.primaryHover),r.theme.primaryForeground&&(n["--ndpr-primary-foreground"]=r.theme.primaryForeground),Object.keys(n).length>0?n:void 0},[r.theme]);return jsxRuntime.jsx(d.Provider,{value:r,children:jsxRuntime.jsx(s,{fallback:p,onError:e,children:l?jsxRuntime.jsx("div",{style:l,children:o}):o})})};function v(){return react.useContext(d)}function D(){let{locale:o}=react.useContext(d);return react.useMemo(()=>chunkWKTKTLMF_js.b(o),[o])}exports.a=E;exports.b=v;exports.c=D;
|
package/dist/chunk-O2RDZGM2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkNDKDKDDX_js=require('./chunk-NDKDKDDX.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var fr=({categories:Ze,onSubmit:Ge,onValidationError:u,title:x,formDescription:C,submitButtonText:S,className:Q="",buttonClassName:X="",classNames:d={},unstyled:c=false,isSubmitting:f=false,showConfirmation:Ke=true,confirmationMessage:We="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:Je=true,maxAttachments:A=5,maxFileSize:D=5*1024*1024,allowedFileTypes:R=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:t,onReset:w})=>{var we,Fe,qe,Pe,ke,je,Te,Ie,Ee,Be,Me,$e,Oe,Le;let F=chunkNDKDKDDX_js.c(),Qe=(we=x!=null?x:F.breach.title)!=null?we:"Report a Data Breach",Xe=(Fe=C!=null?C:F.breach.description)!=null?Fe:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",Ve=(qe=S!=null?S:F.breach.submitReport)!=null?qe:"Submit Report",V=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())}`},[q,ee]=react.useState((t==null?void 0:t.title)||""),[P,re]=react.useState((t==null?void 0:t.description)||""),[k,te]=react.useState((t==null?void 0:t.category)||""),[j,ie]=react.useState(V(t==null?void 0:t.discoveredAt)),[T,ae]=react.useState(V(t==null?void 0:t.occurredAt)),[I,ne]=react.useState(((Pe=t==null?void 0:t.reporter)==null?void 0:Pe.name)||""),[N,oe]=react.useState(((ke=t==null?void 0:t.reporter)==null?void 0:ke.email)||""),[E,se]=react.useState(((je=t==null?void 0:t.reporter)==null?void 0:je.department)||""),[B,de]=react.useState(((Te=t==null?void 0:t.reporter)==null?void 0:Te.phone)||""),[me,ce]=react.useState((t==null?void 0:t.affectedSystems)||[]),[er,pe]=react.useState(((Ie=t==null?void 0:t.affectedSystems)==null?void 0:Ie.join(", "))||""),[M,le]=react.useState((t==null?void 0:t.dataTypes)||[]),[h,ge]=react.useState((t==null?void 0:t.estimatedAffectedSubjects)!=null?String(t.estimatedAffectedSubjects):""),[$,be]=react.useState((t==null?void 0:t.approximateRecordCount)!=null?String(t.approximateRecordCount):""),[O,fe]=react.useState(((Ee=t==null?void 0:t.dataSubjectCategories)==null?void 0:Ee.join(", "))||""),[he,ve]=react.useState((Be=t==null?void 0:t.involvesSensitiveData)!=null?Be:false),[L,Ne]=react.useState((t==null?void 0:t.likelyConsequences)||""),[z,_e]=react.useState((t==null?void 0:t.mitigationMeasures)||""),[Y,ye]=react.useState(((Me=t==null?void 0:t.dpoContact)==null?void 0:Me.name)||""),[U,ue]=react.useState((($e=t==null?void 0:t.dpoContact)==null?void 0:$e.email)||""),[H,xe]=react.useState(((Oe=t==null?void 0:t.dpoContact)==null?void 0:Oe.phone)||""),[Z,Ce]=react.useState((Le=t==null?void 0:t.isPhasedReport)!=null?Le:false),[G,Se]=react.useState((t==null?void 0:t.supplementsReportId)||""),[Ae,De]=react.useState((t==null?void 0:t.status)||"ongoing"),[K,Re]=react.useState((t==null?void 0:t.initialActions)||""),[_,W]=react.useState([]),[rr,J]=react.useState(false),[a,v]=react.useState({}),tr=()=>{ee(""),re(""),te(""),ie(""),ae(""),ne(""),oe(""),se(""),de(""),ce([]),pe(""),le([]),ge(""),be(""),fe(""),ve(false),Ne(""),_e(""),ye(""),ue(""),xe(""),Ce(false),Se(""),De("ongoing"),Re(""),W([]),J(false),v({}),w==null||w();},ir=r=>{let o=r.target.value;pe(o);let l=o.split(",").map(s=>s.trim()).filter(Boolean);ce(l);},ar=r=>{le(o=>o.includes(r)?o.filter(l=>l!==r):[...o,r]);},nr=r=>{var ze;let o=r.target.files;if(!o)return;let l=[],s={};if(_.length+o.length>A){s.attachments=`Maximum of ${A} files allowed`,v(g=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},g),s));return}for(let g=0;g<o.length;g++){let y=o[g];if(y.size>D){s.attachments=`File ${y.name} exceeds the maximum size of ${D/(1024*1024)}MB`;continue}let Ye="."+((ze=y.name.split(".").pop())==null?void 0:ze.toLowerCase());if(!R.includes(Ye)){s.attachments=`File type ${Ye} is not allowed`;continue}l.push(y);}l.length>0&&W(g=>[...g,...l]),Object.keys(s).length>0?v(g=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},g),s)):v(g=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},g),{attachments:""}));},or=r=>{W(o=>o.filter((l,s)=>s!==r));},sr=()=>{let r={};return q.trim()||(r.breachTitle="Breach title is required"),P.trim()||(r.description="Description is required"),k||(r.category="Category is required"),j||(r.discoveredAt="Discovery date is required"),I.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",E.trim()||(r.reporterDepartment="Reporter department is required"),me.length===0&&(r.affectedSystems="At least one affected system is required"),M.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},dr=r=>{r.preventDefault();let o=sr();if(Object.keys(o).length>0){u==null||u(o);return}let l={title:chunkUXUMYP4L_js.a(q),description:chunkUXUMYP4L_js.a(P),category:k,discoveredAt:new Date(j).getTime(),occurredAt:T?new Date(T).getTime():void 0,reportedAt:Date.now(),reporter:{name:chunkUXUMYP4L_js.a(I),email:chunkUXUMYP4L_js.a(N),department:chunkUXUMYP4L_js.a(E),phone:B?chunkUXUMYP4L_js.a(B):void 0},affectedSystems:me.map(s=>chunkUXUMYP4L_js.a(s)),dataTypes:M,estimatedAffectedSubjects:h?Number(h):void 0,approximateRecordCount:$?Number($):void 0,dataSubjectCategories:O?O.split(",").map(s=>chunkUXUMYP4L_js.a(s.trim())).filter(Boolean):void 0,involvesSensitiveData:he,likelyConsequences:L?chunkUXUMYP4L_js.a(L):void 0,mitigationMeasures:z?chunkUXUMYP4L_js.a(z):void 0,dpoContact:Y||U?{name:chunkUXUMYP4L_js.a(Y),email:chunkUXUMYP4L_js.a(U),phone:H?chunkUXUMYP4L_js.a(H):void 0}:void 0,isPhasedReport:Z||void 0,supplementsReportId:G?chunkUXUMYP4L_js.a(G):void 0,status:Ae,initialActions:K?chunkUXUMYP4L_js.a(K):void 0,attachments:_.map(s=>({name:s.name,type:s.type,size:s.size,file:s}))};Ge(l),Ke&&J(true);};if(rr)return jsxRuntime.jsxs("div",{"data-ndpr-component":"breach-report-form",className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${Q}`,children:[jsxRuntime.jsx("h2",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Submitted"}),jsxRuntime.jsx("p",{className:"ndpr-text-success",children:We}),jsxRuntime.jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-md",children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold ndpr-text-warning mb-2",children:"Important: Next Steps"}),jsxRuntime.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."})]}),jsxRuntime.jsx("button",{onClick:()=>J(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${X}`,children:"Report Another Breach"})]});let mr=[{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 jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${Q}`,d.root,c),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",d.title,c),children:Qe}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:Xe}),jsxRuntime.jsx("form",{onSubmit:dr,className:chunkAME4HJR4_js.a("",d.form,c),children:jsxRuntime.jsxs("div",{className:"ndpr-form-section",children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",d.fieldGroup,c),children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Breach Information"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"breachTitle",className:chunkAME4HJR4_js.a("ndpr-form-field__label",d.label,c),children:["Breach Title/Summary ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"breachTitle",value:q,onChange:r=>ee(r.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.input,c),required:true,"aria-invalid":!!a.breachTitle,"aria-describedby":a.breachTitle?"breachTitle-error":void 0}),a.breachTitle&&jsxRuntime.jsx("p",{id:"breachTitle-error",role:"alert",className:"ndpr-form-field__error",children:a.breachTitle})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"category",className:chunkAME4HJR4_js.a("ndpr-form-field__label",d.label,c),children:["Breach Category ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsxs("select",{id:"category",value:k,onChange:r=>te(r.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.select,c),required:true,"aria-invalid":!!a.category,"aria-describedby":a.category?"category-error":void 0,children:[jsxRuntime.jsx("option",{value:"",children:"Select a category"}),Ze.map(r=>jsxRuntime.jsx("option",{value:r.id,children:r.name},r.id))]}),a.category&&jsxRuntime.jsx("p",{id:"category-error",role:"alert",className:"ndpr-form-field__error",children:a.category})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsxs("label",{htmlFor:"description",className:chunkAME4HJR4_js.a("ndpr-form-field__label",d.label,c),children:["Detailed Description ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("textarea",{id:"description",value:P,onChange:r=>re(r.target.value),rows:4,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c),required:true,"aria-invalid":!!a.description,"aria-describedby":a.description?"description-error":void 0}),a.description&&jsxRuntime.jsx("p",{id:"description-error",role:"alert",className:"ndpr-form-field__error",children:a.description})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"discoveredAt",className:"ndpr-form-field__label",children:["Date Discovered ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"datetime-local",id:"discoveredAt",value:j,onChange:r=>ie(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.discoveredAt,"aria-describedby":a.discoveredAt?"discoveredAt-error":void 0}),a.discoveredAt&&jsxRuntime.jsx("p",{id:"discoveredAt-error",role:"alert",className:"ndpr-form-field__error",children:a.discoveredAt})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"occurredAt",className:"ndpr-form-field__label",children:"Date Occurred (if known)"}),jsxRuntime.jsx("input",{type:"datetime-local",id:"occurredAt",value:T,onChange:r=>ae(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Reporter Information"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterName",className:"ndpr-form-field__label",children:["Your Name ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"reporterName",value:I,onChange:r=>ne(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.reporterName,"aria-describedby":a.reporterName?"reporterName-error":void 0}),a.reporterName&&jsxRuntime.jsx("p",{id:"reporterName-error",role:"alert",className:"ndpr-form-field__error",children:a.reporterName})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterEmail",className:"ndpr-form-field__label",children:["Your Email ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"email",id:"reporterEmail",value:N,onChange:r=>oe(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.reporterEmail,"aria-describedby":a.reporterEmail?"reporterEmail-error":void 0}),a.reporterEmail&&jsxRuntime.jsx("p",{id:"reporterEmail-error",role:"alert",className:"ndpr-form-field__error",children:a.reporterEmail})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterDepartment",className:"ndpr-form-field__label",children:["Your Department ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"reporterDepartment",value:E,onChange:r=>se(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.reporterDepartment,"aria-describedby":a.reporterDepartment?"reporterDepartment-error":void 0}),a.reporterDepartment&&jsxRuntime.jsx("p",{id:"reporterDepartment-error",role:"alert",className:"ndpr-form-field__error",children:a.reporterDepartment})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"reporterPhone",className:"ndpr-form-field__label",children:"Your Phone Number (Optional)"}),jsxRuntime.jsx("input",{type:"tel",id:"reporterPhone",value:B,onChange:r=>de(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Impact Information"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"affectedSystems",className:"ndpr-form-field__label",children:["Affected Systems/Applications ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"affectedSystems",value:er,onChange:ir,placeholder:"e.g. CRM, Email Server, Website (comma separated)",className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.affectedSystems,"aria-describedby":a.affectedSystems?"affectedSystems-error":void 0}),a.affectedSystems&&jsxRuntime.jsx("p",{id:"affectedSystems-error",role:"alert",className:"ndpr-form-field__error",children:a.affectedSystems})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"estimatedAffectedSubjects",className:"ndpr-form-field__label",children:"Estimated Number of Affected Data Subjects"}),jsxRuntime.jsx("input",{type:"text",id:"estimatedAffectedSubjects",value:h,onChange:r=>ge(r.target.value),placeholder:"e.g. 100",className:"ndpr-form-field__input","aria-invalid":!!a.estimatedAffectedSubjects,"aria-describedby":a.estimatedAffectedSubjects?"estimatedAffectedSubjects-error":void 0}),a.estimatedAffectedSubjects&&jsxRuntime.jsx("p",{id:"estimatedAffectedSubjects-error",role:"alert",className:"ndpr-form-field__error",children:a.estimatedAffectedSubjects})]}),jsxRuntime.jsxs("fieldset",{className:"md:col-span-2","aria-invalid":!!a.dataTypes,"aria-describedby":a.dataTypes?"dataTypes-error":void 0,children:[jsxRuntime.jsxs("legend",{className:"ndpr-form-field__label",children:["Types of Data Involved ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required","aria-hidden":"true",children:"*"}),jsxRuntime.jsx("span",{className:"sr-only",children:"(required)"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:mr.map(r=>jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"checkbox",id:`dataType_${r.id}`,checked:M.includes(r.id),onChange:()=>ar(r.id),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:`dataType_${r.id}`,className:"ml-2 text-sm ndpr-text-muted",children:r.label})]},r.id))}),a.dataTypes&&jsxRuntime.jsx("p",{id:"dataTypes-error",role:"alert",className:"ndpr-form-field__error",children:a.dataTypes})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"status",className:"ndpr-form-field__label",children:["Current Status ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsxs("select",{id:"status",value:Ae,onChange:r=>De(r.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.select,c),required:true,children:[jsxRuntime.jsx("option",{value:"ongoing",children:"Ongoing (breach is still active)"}),jsxRuntime.jsx("option",{value:"contained",children:"Contained (breach is stopped but not resolved)"}),jsxRuntime.jsx("option",{value:"resolved",children:"Resolved (breach is fully addressed)"})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"approximateRecordCount",className:"ndpr-form-field__label",children:"Approximate Number of Records Concerned"}),jsxRuntime.jsx("input",{type:"text",id:"approximateRecordCount",value:$,onChange:r=>be(r.target.value),placeholder:"e.g. 5000",className:"ndpr-form-field__input"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required for the NDPC report (NDPA Section 40(2))."})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dataSubjectCategories",className:"ndpr-form-field__label",children:"Categories of Data Subjects Affected"}),jsxRuntime.jsx("input",{type:"text",id:"dataSubjectCategories",value:O,onChange:r=>fe(r.target.value),placeholder:"e.g. customers, employees, minors",className:"ndpr-form-field__input"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Comma-separated. Required for the NDPC report (NDPA Section 40(2))."})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2 flex items-center",children:[jsxRuntime.jsx("input",{id:"involvesSensitiveData",type:"checkbox",checked:he,onChange:r=>ve(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:"involvesSensitiveData",className:"ml-2 text-sm ndpr-text-muted",children:"Sensitive personal data (NDPA Section 30) is involved"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"likelyConsequences",className:"ndpr-form-field__label",children:"Likely Consequences for Data Subjects"}),jsxRuntime.jsx("textarea",{id:"likelyConsequences",value:L,onChange:r=>Ne(r.target.value),placeholder:"e.g. identity theft, financial loss, reputational damage, discrimination",rows:3,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c)}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required content for NDPC report and Section 40(3) communications to data subjects."})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"mitigationMeasures",className:"ndpr-form-field__label",children:"Mitigation Measures"}),jsxRuntime.jsx("textarea",{id:"mitigationMeasures",value:z,onChange:r=>_e(r.target.value),placeholder:"Measures taken or proposed to mitigate possible adverse effects (NDPA Section 40(3))",rows:3,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c)})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("h4",{className:"ndpr-section-heading text-sm mt-4",children:"Data Protection Officer (NDPC contact)"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mb-2",children:"Defaults to organisation-level DPO if left blank."})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpoName",className:"ndpr-form-field__label",children:"DPO Name"}),jsxRuntime.jsx("input",{type:"text",id:"dpoName",value:Y,onChange:r=>ye(r.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpoEmail",className:"ndpr-form-field__label",children:"DPO Email"}),jsxRuntime.jsx("input",{type:"email",id:"dpoEmail",value:U,onChange:r=>ue(r.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpoPhone",className:"ndpr-form-field__label",children:"DPO Phone"}),jsxRuntime.jsx("input",{type:"tel",id:"dpoPhone",value:H,onChange:r=>xe(r.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2 flex items-center mt-2",children:[jsxRuntime.jsx("input",{id:"isPhasedReport",type:"checkbox",checked:Z,onChange:r=>Ce(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.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&&jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"supplementsReportId",className:"ndpr-form-field__label",children:"Supplements Report ID (if applicable)"}),jsxRuntime.jsx("input",{type:"text",id:"supplementsReportId",value:G,onChange:r=>Se(r.target.value),placeholder:"Prior report ID this report supplements",className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"initialActions",className:"ndpr-form-field__label",children:"Initial Actions Taken"}),jsxRuntime.jsx("textarea",{id:"initialActions",value:K,onChange:r=>Re(r.target.value),placeholder:"Describe any immediate actions that have been taken to address the breach",rows:3,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c)})]})]})]}),Je&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Attachments"}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsx("label",{className:"ndpr-form-field__label",children:"Upload Supporting Files (Optional)"}),jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-muted mb-2",children:["Max ",A," files, ",D/(1024*1024),"MB each. Allowed types: ",R.join(", ")]}),jsxRuntime.jsx("input",{type:"file",onChange:nr,multiple:true,className:"ndpr-form-field__input",accept:R.join(",")}),a.attachments&&jsxRuntime.jsx("p",{id:"attachments-error",role:"alert",className:"ndpr-form-field__error",children:a.attachments})]}),_.length>0&&jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsx("h4",{className:"ndpr-form-field__label",children:"Attached Files:"}),jsxRuntime.jsx("ul",{className:"ndpr-form-section",children:_.map((r,o)=>jsxRuntime.jsxs("li",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.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:jsxRuntime.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"})}),jsxRuntime.jsx("span",{className:"text-sm ndpr-text-muted",children:r.name}),jsxRuntime.jsxs("span",{className:"ml-2 text-xs ndpr-text-muted",children:["(",(r.size/1024).toFixed(1)," KB)"]})]}),jsxRuntime.jsxs("button",{type:"button",onClick:()=>or(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:[jsxRuntime.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:jsxRuntime.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"})}),jsxRuntime.jsx("span",{className:"sr-only",children:"Remove"})]})]},o))})]})]}),jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-alert ndpr-alert--info",d.notice,c),children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsxRuntime.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."})]}),jsxRuntime.jsxs("div",{className:"mt-6 relative flex gap-3",children:[f&&d.loadingOverlay&&jsxRuntime.jsx("div",{className:d.loadingOverlay}),jsxRuntime.jsx("button",{type:"submit",disabled:f,className:chunkAME4HJR4_js.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 ${X} ${f?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c),children:f?"Submitting...":Ve}),jsxRuntime.jsx("button",{type:"button",onClick:tr,disabled:f,className:chunkAME4HJR4_js.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
|
-
exports.a=fr;
|
package/dist/chunk-O45PKBZA.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-ITCY2Z66.mjs';import {a as a$1}from'./chunk-SFGW37LE.mjs';import S,{useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var j=({result:a$2,sections:m,showFullReport:g=true,allowPrint:u=true,allowExport:v=true,onExport:f,className:N="",buttonClassName:x="",classNames:b={},unstyled:y=false})=>{let o=useMemo(()=>new Date().toLocaleDateString(),[]),d=(r,s)=>{let i=s?b[s]:void 0;return !i&&s==="printButton"&&(i=b.primaryButton),a$1(r,i,y)},l=r=>new Date(r).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),w=r=>{let s=a$2.answers[r];return s==null?"Not answered":typeof s=="boolean"?s?"Yes":"No":Array.isArray(s)?s.join(", "):String(s)},k=()=>{window.print();},C=r=>{f&&f(r);},R=r=>jsx("span",{className:d(`px-2 py-1 rounded text-xs font-medium ${{low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--warning",critical:"ndpr-badge ndpr-badge--destructive"}[r]}`,"riskBadge"),children:r.charAt(0).toUpperCase()+r.slice(1)});return jsxs("div",{"data-ndpr-component":"dpia-report",className:`${d("bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 print:shadow-none print:p-0","root")} ${N}`,children:[jsxs("div",{className:d("mb-8 border-b border-gray-200 dark:border-gray-700 pb-6 print:pb-4","header"),children:[jsxs("div",{className:"flex justify-between items-start",children:[jsxs("div",{children:[jsx("h1",{className:d("ndpr-card__title","title"),children:"Data Protection Impact Assessment Report"}),jsx("h2",{className:"text-xl ndpr-text-muted mb-4",children:a$2.title})]}),(u||v)&&jsxs("div",{className:"flex space-x-2 print:hidden",children:[u&&jsx("button",{onClick:k,className:`${d("px-3 py-1 bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-white rounded hover:bg-gray-300 dark:hover:bg-gray-600","printButton")} ${x}`,children:jsxs("span",{className:"flex items-center",children:[jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"})}),"Print"]})}),v&&jsx("div",{className:"relative inline-block",children:jsx("button",{onClick:()=>C("pdf"),className:`px-3 py-1 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${x}`,children:jsxs("span",{className:"flex items-center",children:[jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Export PDF"]})})})]})]}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-4",children:[jsxs("div",{children:[jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Assessor:"})," ",a$2.assessor.name,", ",a$2.assessor.role]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Contact:"})," ",a$2.assessor.email]})]}),jsxs("div",{children:[jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Started:"})," ",l(a$2.startedAt)]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Completed:"})," ",a$2.completedAt?l(a$2.completedAt):"In progress"]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Next review:"})," ",a$2.reviewDate?l(a$2.reviewDate):"Not scheduled"]})]})]})]}),jsxs("div",{className:d("mb-8","summary"),children:[jsx("h2",{className:"ndpr-section-heading",children:"Executive Summary"}),jsxs("div",{className:"ndpr-panel",children:[jsxs("div",{className:"flex items-center mb-2",role:"status","aria-live":"polite",children:[jsx("span",{className:"font-medium mr-2",children:"Overall Risk Level:"}),R(a$2.overallRiskLevel)]}),jsxs("div",{className:d("mb-2","conclusion"),children:[jsx("span",{className:"font-medium",children:"Conclusion:"})," ",a$2.conclusion]}),jsxs("div",{role:"status","aria-live":"polite",children:[jsx("span",{className:"font-medium",children:"Can Proceed:"})," ",a$2.canProceed?"Yes":"No"]})]}),jsxs("div",{children:[jsx("h3",{className:"font-medium ndpr-text-foreground mb-2",children:"Processing Activity Description"}),jsx("p",{className:"ndpr-text-muted mb-4",children:a$2.processingDescription}),a$2.recommendations&&a$2.recommendations.length>0&&jsxs("div",{children:[jsx("h3",{className:"font-medium ndpr-text-foreground mb-2",children:"Key Recommendations"}),jsx("ul",{className:"list-disc pl-5 ndpr-text-muted",children:a$2.recommendations.map((r,s)=>jsx("li",{className:d("","recommendation"),children:r},s))})]})]})]}),jsxs("div",{className:"mb-8",children:[jsx("h2",{className:"ndpr-section-heading",children:"Identified Risks"}),a$2.risks.length===0?jsx("p",{className:"ndpr-text-muted",children:"No risks identified."}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:d("min-w-full divide-y divide-gray-200 dark:divide-gray-700","riskTable"),children:[jsx("thead",{className:"ndpr-panel",children:jsxs("tr",{children:[jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Risk"}),jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Likelihood"}),jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Impact"}),jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Risk Level"}),jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Mitigated"})]})}),jsx("tbody",{className:"ndpr-table",children:a$2.risks.map(r=>jsxs("tr",{className:d("","riskRow"),children:[jsx("td",{className:"ndpr-table__cell",children:r.description}),jsxs("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:[r.likelihood," / 5"]}),jsxs("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:[r.impact," / 5"]}),jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:R(r.level)}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:r.mitigated?jsx("span",{className:"ndpr-text-success",children:"Yes"}):jsx("span",{className:"ndpr-text-destructive",children:"No"})})]},r.id))})]})})]}),g&&jsxs("div",{children:[jsx("h2",{className:"ndpr-section-heading",children:"Full Assessment Details"}),m.map(r=>{let s=r.questions.filter(i=>a$2.answers[i.id]!==void 0);return s.length===0?null:jsxs("div",{className:"mb-6",children:[jsx("h3",{className:"text-lg font-medium ndpr-text-foreground mb-2",children:r.title}),jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",children:[jsx("thead",{className:"ndpr-panel",children:jsxs("tr",{children:[jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Question"}),jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium ndpr-text-muted uppercase tracking-wider",children:"Answer"})]})}),jsx("tbody",{className:"ndpr-table",children:s.map(i=>jsxs("tr",{children:[jsx("td",{className:"ndpr-table__cell",children:i.text}),jsx("td",{className:"px-6 py-4 whitespace-normal text-sm ndpr-text-muted",children:w(i.id)})]},i.id))})]})})]},r.id)})]}),jsxs("div",{className:"mt-8 pt-4 border-t border-gray-200 dark:border-gray-700 text-sm ndpr-text-muted",children:[jsx("p",{children:"This DPIA was conducted in accordance with NDPA 2023 Section 28."}),jsxs("p",{children:["DPIA Report Version: ",a$2.version]}),jsxs("p",{children:["Generated on: ",o]}),jsx("p",{className:"mt-2 italic",role:"note",children:a})]})]})};var H=({steps:a,onStepClick:m,clickable:g=true,orientation:u="horizontal",className:v="",activeStepClassName:f="",completedStepClassName:N="",incompleteStepClassName:x="",classNames:b={},unstyled:y=false})=>{let o=(n,p)=>a$1(n,p?b[p]:void 0,y),d=n=>{g&&m&&m(n);},l=u==="vertical";return jsx("div",{"data-ndpr-component":"dpia-step-indicator",role:"navigation","aria-label":"Step progress",className:`${o(l?"flex flex-col space-y-4":"flex items-center justify-between","root")} ${v}`,children:a.map((n,p)=>{let w=p===a.length-1,k=n.active?o(`font-medium ${f||"ndpr-text-primary"}`,"label"):n.completed?o(N||"ndpr-text-success","label"):o(x||"ndpr-card__subtitle","label"),C=n.active?o("flex items-center justify-center w-8 h-8 rounded-full bg-[rgb(var(--ndpr-primary)/0.1)] dark:bg-[rgb(var(--ndpr-primary)/0.2)] ndpr-text-primary border-2 border-[rgb(var(--ndpr-primary))] dark:border-[rgb(var(--ndpr-primary))]","stepActive"):n.completed?o("flex items-center justify-center w-8 h-8 rounded-full bg-green-100 dark:bg-green-900 ndpr-text-success border-2 border-green-600 dark:border-green-400","stepCompleted"):o("flex items-center justify-center w-8 h-8 rounded-full bg-gray-100 dark:bg-gray-700 ndpr-text-muted border-2 border-gray-300 dark:border-gray-600","stepPending");return jsxs(S.Fragment,{children:[jsxs("div",{className:o(`${l?"flex items-start":"flex flex-col items-center"} ${g?"cursor-pointer":""}`,"step"),onClick:()=>d(n.id),"aria-current":n.active?"step":void 0,children:[jsx("div",{className:`
|
|
2
|
-
flex items-center justify-center
|
|
3
|
-
${l?"mr-4":""}
|
|
4
|
-
`,children:jsx("div",{className:C,children:n.icon?n.icon:n.completed?jsx("svg",{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:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):jsx("span",{children:p+1})})}),jsxs("div",{className:`
|
|
5
|
-
${l?"flex-1":"mt-2 text-center"}
|
|
6
|
-
`,children:[jsx("div",{className:`text-sm font-medium ${k}`,children:n.label}),n.description&&jsx("div",{className:"ndpr-form-field__hint",children:n.description})]})]}),!w&&jsx("div",{className:o(l?"ml-4 h-8 border-l-2 border-gray-300 dark:border-gray-600":"w-full border-t-2 border-gray-300 dark:border-gray-600 hidden sm:block","connector")})]},n.id)})})};export{j as a,H as b};
|
package/dist/chunk-OLEUIYE2.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-WYH3OA5L.mjs';import {jsx}from'react/jsx-runtime';var p=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],f=({extraOptions:a$1=[],options:t,adapter:n,position:o="bottom",classNames:l,unstyled:d,onSave:s,copy:e})=>{let m=t!=null?t:[...p,...a$1];return jsx(a,{options:m,onSave:i=>{n&&n.save(i),s==null||s(i);},position:o,classNames:l,unstyled:d,manageStorage:!n,title:e==null?void 0:e.title,description:e==null?void 0:e.description,acceptAllButtonText:e==null?void 0:e.acceptAll,rejectAllButtonText:e==null?void 0:e.rejectAll,customizeButtonText:e==null?void 0:e.customize,saveButtonText:e==null?void 0:e.save})};export{f as a};
|
package/dist/chunk-PGI2LM6P.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
'use strict';var chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var we=({breachData:l,initialAssessment:f={},onComplete:k,title:J="Breach Risk Assessment",description:K="Assess the risk level of this data breach to determine notification requirements under NDPA Section 40.",submitButtonText:Q="Complete Assessment",className:se="",buttonClassName:Z="",classNames:b={},unstyled:d=false,showBreachSummary:c=true,showNotificationRequirements:S=true})=>{let[L,ae]=react.useState(f.confidentialityImpact||3),[B,h]=react.useState(f.integrityImpact||3),[I,D]=react.useState(f.availabilityImpact||3),[E,T]=react.useState(f.harmLikelihood||3),[O,F]=react.useState(f.harmSeverity||3),[U,j]=react.useState(f.risksToRightsAndFreedoms!==void 0?f.risksToRightsAndFreedoms:false),[H,M]=react.useState(f.highRisksToRightsAndFreedoms!==void 0?f.highRisksToRightsAndFreedoms:false),[X,ie]=react.useState(f.justification||""),[Y,re]=react.useState(0),[C,v]=react.useState("low"),[x,g]=react.useState(false),[R,z]=react.useState(0),[q,ee]=react.useState(0),[u,w]=react.useState(false),[$]=react.useState(()=>Date.now());react.useEffect(()=>{let W=L*.2+B*.1+I*.1+E*.3+O*.3;re(Number(W.toFixed(1)));let V;W<2?V="low":W<3?V="medium":W<4?V="high":V="critical",v(V),g(U||V==="high"||V==="critical");let de=l.discoveredAt+4320*60*1e3;z(de);let fe=Date.now(),Ne=(de-fe)/(3600*1e3);ee(Number(Ne.toFixed(1)));},[L,B,I,E,O,U,l.discoveredAt]);let P=r=>new Date(r).toLocaleString(),a=r=>{r.preventDefault();let y={id:f.id||`assessment_${Date.now()}`,breachId:l.id,assessedAt:Date.now(),assessor:f.assessor||{name:"Assessment User",role:"Data Protection Officer",email:"dpo@example.com"},confidentialityImpact:L,integrityImpact:B,availabilityImpact:I,harmLikelihood:E,harmSeverity:O,overallRiskScore:Y,riskLevel:C,risksToRightsAndFreedoms:U,highRisksToRightsAndFreedoms:H,justification:X};k(y),w(true);},m=r=>{switch(r){case 1:return "Minimal";case 2:return "Low";case 3:return "Moderate";case 4:return "High";case 5:return "Severe";default:return "Unknown"}},N=r=>jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${{low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--warning",critical:"ndpr-badge ndpr-badge--destructive"}[r]}`,b.riskBadge,d),children:r.charAt(0).toUpperCase()+r.slice(1)});return jsxRuntime.jsxs("div",{"data-ndpr-component":"breach-risk-assessment",className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${se}`,b.root,d),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",b.title,d),children:J}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:K}),c&&jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-2",children:"Breach Summary"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Title:"})," ",l.title]}),jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Discovered:"})," ",P(l.discoveredAt)]}),jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Status:"})," ",l.status.charAt(0).toUpperCase()+l.status.slice(1)]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Data Types:"})," ",l.dataTypes.join(", ")]}),jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Affected Systems:"})," ",l.affectedSystems.join(", ")]}),jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Affected Subjects:"})," ",l.estimatedAffectedSubjects||"Unknown"]})]})]})]}),u?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--info",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Assessment Results"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Overall Risk Level:"})," ",N(C)]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risk Score:"})," ",Y," / 5"]}),jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Assessed On:"})," ",P($)]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risks to Rights and Freedoms:"})," ",U?"Yes":"No"]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"High Risks to Rights and Freedoms:"})," ",H?"Yes":"No"]})]})]}),jsxRuntime.jsxs("div",{className:"mt-3",children:[jsxRuntime.jsx("p",{className:"text-sm mb-1",children:jsxRuntime.jsx("span",{className:"font-medium",children:"Justification:"})}),jsxRuntime.jsx("p",{className:"text-sm bg-white dark:bg-gray-800 p-2 rounded",children:X})]})]}),S&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`mb-6 p-4 rounded-md ${x?q>24?"ndpr-alert ndpr-alert--warning":"ndpr-alert ndpr-alert--destructive":"ndpr-alert ndpr-alert--success"}`,b.notificationStatus,d),children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Notification Requirements"}),x?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:`text-sm font-bold mb-2 ${q>24?"ndpr-text-warning":"ndpr-text-destructive"}`,children:"NDPC Notification Required"}),jsxRuntime.jsx("p",{className:"text-sm mb-2",children:"Under the NDPA (Section 40), this breach must be reported to the NDPC within 72 hours of discovery."}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Notification Deadline:"})," ",P(R)]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Time Remaining:"})," ",jsxRuntime.jsx("span",{className:q<24?"ndpr-text-destructive font-bold":"",children:q>0?`${q} hours`:"Deadline passed"})]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Data Subject Notification:"})," ",H?"Required (NDPA Section 40(4))":"Not required unless directed by NDPC"]})]}):jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-bold mb-2 ndpr-text-success",children:"NDPC Notification Not Required"}),jsxRuntime.jsx("p",{className:"text-sm mb-2",children:"Based on this assessment, this breach does not need to be reported to the NDPC."}),jsxRuntime.jsx("p",{className:"text-sm mb-2",children:"However, the breach should still be documented internally for compliance purposes."})]}),jsxRuntime.jsxs("div",{className:"mt-3 text-sm",children:[jsxRuntime.jsx("p",{className:"font-medium",children:"Next Steps:"}),jsxRuntime.jsx("ul",{className:"list-disc pl-5 mt-1",children:x?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("li",{children:"Prepare a notification report for the NDPC"}),jsxRuntime.jsx("li",{children:"Document all aspects of the breach and your response"}),H&&jsxRuntime.jsx("li",{children:"Prepare communications for affected data subjects"}),jsxRuntime.jsx("li",{children:"Implement measures to mitigate the impact of the breach"})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("li",{children:"Document the breach and this assessment in your internal records"}),jsxRuntime.jsx("li",{children:"Implement measures to prevent similar breaches in the future"}),jsxRuntime.jsx("li",{children:"Review and update security measures as needed"})]})})]})]}),jsxRuntime.jsx("button",{onClick:()=>w(false),className:chunkAME4HJR4_js.a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${Z}`,b.primaryButton||b.submitButton,d),children:"Edit Assessment"})]}):jsxRuntime.jsx("form",{onSubmit:a,children:jsxRuntime.jsxs("div",{className:"ndpr-form-section",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Impact Assessment"}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsxs("label",{htmlFor:"confidentialityImpact",className:"ndpr-form-field__label",children:["Confidentiality Impact (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm ndpr-text-muted",children:"How much has the confidentiality of data been compromised?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"confidentialityImpact",min:"1",max:"5",step:"1",value:L,onChange:r=>ae(parseInt(r.target.value)),className:chunkAME4HJR4_js.a("ndpr-form-field__range",b.slider,d)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(L)," (",L,")"]})]})]}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsxs("label",{htmlFor:"integrityImpact",className:"ndpr-form-field__label",children:["Integrity Impact (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm ndpr-text-muted",children:"How much has the integrity of data been compromised?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"integrityImpact",min:"1",max:"5",step:"1",value:B,onChange:r=>h(parseInt(r.target.value)),className:chunkAME4HJR4_js.a("ndpr-form-field__range",b.slider,d)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(B)," (",B,")"]})]})]}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsxs("label",{htmlFor:"availabilityImpact",className:"ndpr-form-field__label",children:["Availability Impact (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm ndpr-text-muted",children:"How much has the availability of data or systems been compromised?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"availabilityImpact",min:"1",max:"5",step:"1",value:I,onChange:r=>D(parseInt(r.target.value)),className:chunkAME4HJR4_js.a("ndpr-form-field__range",b.slider,d)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(I)," (",I,")"]})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Risk to Data Subjects"}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsxs("label",{htmlFor:"harmLikelihood",className:"ndpr-form-field__label",children:["Likelihood of Harm (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm ndpr-text-muted",children:"How likely is it that data subjects will experience harm?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"harmLikelihood",min:"1",max:"5",step:"1",value:E,onChange:r=>T(parseInt(r.target.value)),className:chunkAME4HJR4_js.a("ndpr-form-field__range",b.slider,d)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(E)," (",E,")"]})]})]}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsxs("label",{htmlFor:"harmSeverity",className:"ndpr-form-field__label",children:["Severity of Harm (1-5)",jsxRuntime.jsx("span",{className:"ml-2 text-sm ndpr-text-muted",children:"How severe would the harm be to affected data subjects?"})]}),jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"range",id:"harmSeverity",min:"1",max:"5",step:"1",value:O,onChange:r=>F(parseInt(r.target.value)),className:chunkAME4HJR4_js.a("ndpr-form-field__range",b.slider,d)}),jsxRuntime.jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(O)," (",O,")"]})]})]}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsxs("div",{className:"flex items-center mb-2",children:[jsxRuntime.jsx("input",{type:"checkbox",id:"risksToRightsAndFreedoms",checked:U,onChange:r=>j(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:"risksToRightsAndFreedoms",className:"ml-2 text-sm font-medium",children:"This breach poses a risk to the rights and freedoms of data subjects"})]}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted ml-6",children:"Under the NDPA (Section 40), breaches that pose a risk to rights and freedoms must be reported to the NDPC within 72 hours."})]}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsxs("div",{className:"flex items-center mb-2",children:[jsxRuntime.jsx("input",{type:"checkbox",id:"highRisksToRightsAndFreedoms",checked:H,onChange:r=>M(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:"highRisksToRightsAndFreedoms",className:"ml-2 text-sm font-medium",children:"This breach poses a high risk to the rights and freedoms of data subjects"})]}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted ml-6",children:"Under the NDPA (Section 40(4)), breaches that pose a high risk to rights and freedoms also require notification to affected data subjects without undue delay."})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Overall Assessment"}),jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Overall Risk Score:"}),jsxRuntime.jsxs("span",{className:chunkAME4HJR4_js.a("",b.riskScore,d),children:[Y," / 5"]})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risk Level:"}),N(C)]})]}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsxs("label",{htmlFor:"justification",className:"ndpr-form-field__label",children:["Justification for Assessment ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("textarea",{id:"justification",value:X,onChange:r=>ie(r.target.value),rows:4,placeholder:"Explain the reasoning behind your assessment, including any factors that influenced your decision.",className:"ndpr-form-field__input",required:true})]})]}),jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--info",children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsxRuntime.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. This assessment will determine if notification is required for this breach."})]}),jsxRuntime.jsx("div",{className:"mt-6",children:jsxRuntime.jsx("button",{type:"submit",className:chunkAME4HJR4_js.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 ${Z}`,b.primaryButton||b.submitButton,d),children:Q})})]})})]})};var Pe=({breachReports:l,riskAssessments:f,regulatoryNotifications:k,onSelectBreach:J,onRequestAssessment:K,onRequestNotification:Q,title:se="Breach Notification Manager",description:Z="Manage data breach notifications and track compliance with NDPA Section 40 requirements.",className:b="",buttonClassName:d="",classNames:c={},unstyled:S=false,showBreachDetails:L=true,showNotificationTimeline:ae=true,showDeadlineAlerts:B=true})=>{var P;let[h,I]=react.useState(null),[D,E]=react.useState(l),[T,O]=react.useState("all"),[F,U]=react.useState(""),[j,H]=react.useState("discoveredAt"),[M,X]=react.useState("desc");react.useEffect(()=>{let a=[...l];if(T!=="all"&&(a=a.filter(m=>m.status===T)),F){let m=F.toLowerCase();a=a.filter(N=>N.title.toLowerCase().includes(m)||N.description.toLowerCase().includes(m)||N.affectedSystems.some(r=>r.toLowerCase().includes(m))||N.dataTypes.some(r=>r.toLowerCase().includes(m)));}a.sort((m,N)=>{let r=0;switch(j){case "title":r=m.title.localeCompare(N.title);break;case "discoveredAt":r=m.discoveredAt-N.discoveredAt;break;case "status":r=m.status.localeCompare(N.status);break;case "riskLevel":let y=f.find(W=>W.breachId===m.id),_=f.find(W=>W.breachId===N.id),ne=(y==null?void 0:y.riskLevel)||"unknown",oe=(_==null?void 0:_.riskLevel)||"unknown";r=ne.localeCompare(oe);break;default:r=m.discoveredAt-N.discoveredAt;}return M==="asc"?r:-r}),E(a);},[l,T,F,j,M,f]),react.useEffect(()=>{D.length>0&&(h&&D.some(m=>m.id===h)||I(D[0].id));},[D,h]);let ie=a=>{I(a),J&&J(a);},Y=()=>{h&&K&&K(h);},re=()=>{h&&Q&&Q(h);},C=a=>new Date(a).toLocaleString(),v=h?l.find(a=>a.id===h):null,x=h?f.find(a=>a.breachId===h):null,g=h?k.find(a=>a.breachId===h):null,R=v?z(v,x):null;function z(a,m){let N=chunk3YTAOT5O_js.a(a,m||void 0),r=a.discoveredAt+N.timeframeHours*60*60*1e3;return {ndpcNotificationRequired:N.notificationRequired,ndpcNotificationDeadline:r,dataSubjectNotificationRequired:(m==null?void 0:m.highRisksToRightsAndFreedoms)||false,justification:N.justification}}function q(a){let m=Date.now(),N=(a-m)/(3600*1e3);return Number(N.toFixed(1))}let ee=a=>a?jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${{low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--warning",critical:"ndpr-badge ndpr-badge--destructive"}[a]}`,c.statusBadge,S),children:a.charAt(0).toUpperCase()+a.slice(1)}):null,u=a=>jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${{ongoing:"ndpr-badge ndpr-badge--destructive",contained:"ndpr-badge ndpr-badge--warning",resolved:"ndpr-badge ndpr-badge--success"}[a]||"ndpr-badge ndpr-badge--neutral"}`,c.statusBadge,S),children:a.charAt(0).toUpperCase()+a.slice(1)}),w=()=>{if(!v||!R)return null;if(!R.ndpcNotificationRequired)return jsxRuntime.jsxs("div",{"data-ndpr-component":"breach-notification-manager",className:"ndpr-alert ndpr-alert--success",children:[jsxRuntime.jsx("p",{className:"text-sm ndpr-text-success font-medium",children:"Notification Not Required"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-success mt-1",children:"Based on the risk assessment, NDPC notification is not required for this breach."})]});if(g)return jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--success",children:[jsxRuntime.jsx("p",{className:"text-sm ndpr-text-success font-medium",children:"Notification Sent"}),jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-success mt-1",children:["Notification was sent to the NDPC on ",C(g.sentAt),"."]})]});let a=q(R.ndpcNotificationDeadline);return a<=0?jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--destructive",children:[jsxRuntime.jsx("p",{className:"text-sm ndpr-text-destructive font-medium",children:"Notification Deadline Passed"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-destructive mt-1",children:"The 72-hour deadline for NDPC notification has passed. Notification should be sent immediately."})]}):a<=24?jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--destructive",children:[jsxRuntime.jsx("p",{className:"text-sm ndpr-text-destructive font-medium",children:"Urgent: Notification Due Soon"}),jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["Only ",a," hours remaining until the NDPC notification deadline."]})]}):jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--warning",children:[jsxRuntime.jsx("p",{className:"text-sm ndpr-text-warning font-medium",children:"Notification Required"}),jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-warning mt-1",children:["NDPC notification is required by ",C(R.ndpcNotificationDeadline)," (",a," hours remaining)."]})]})},$=()=>{if(!v)return null;let a=[{title:"Breach Discovered",date:v.discoveredAt,completed:true,description:`Breach was discovered on ${C(v.discoveredAt)}.`},{title:"Risk Assessment",date:x==null?void 0:x.assessedAt,completed:!!x,description:x?`Risk assessment completed on ${C(x.assessedAt)}.`:"Risk assessment has not been completed yet."}];return R!=null&&R.ndpcNotificationRequired&&a.push({title:"NDPC Notification",date:g==null?void 0:g.sentAt,completed:!!g,description:g?`Notification sent to the NDPC on ${C(g.sentAt)}.`:`Notification must be sent to the NDPC by ${C(R.ndpcNotificationDeadline)}.`}),R!=null&&R.dataSubjectNotificationRequired&&a.push({title:"Data Subject Notification",date:void 0,completed:false,description:"Notification to affected data subjects is required but has not been sent yet."}),jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("mt-6",c.timeline,S),children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-4",children:"Notification Timeline"}),jsxRuntime.jsx("ol",{className:"relative border-l border-gray-200 dark:border-gray-700",children:a.map((m,N)=>jsxRuntime.jsxs("li",{className:chunkAME4HJR4_js.a("mb-6 ml-4",c.timelineStep,S),children:[jsxRuntime.jsx("div",{className:`absolute w-3 h-3 rounded-full mt-1.5 -left-1.5 border ${m.completed?"bg-green-500 border-green-500 dark:border-green-500":"bg-gray-200 border-gray-200 dark:bg-gray-700 dark:border-gray-700"}`}),jsxRuntime.jsx("time",{className:"mb-1 text-sm font-normal leading-none ndpr-text-muted",children:m.date?C(m.date):"Pending"}),jsxRuntime.jsx("h4",{className:"ndpr-section-heading",children:m.title}),jsxRuntime.jsx("p",{className:"ndpr-form-field__hint",children:m.description})]},N))})]})};return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${b}`,c.root,S),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",c.header,S),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",c.title,S),children:se}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:Z})]}),jsxRuntime.jsxs("div",{className:"mb-6 grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"statusFilter",className:"ndpr-form-field__label",children:"Status Filter"}),jsxRuntime.jsxs("select",{id:"statusFilter",value:T,onChange:a=>O(a.target.value),className:"ndpr-form-field__input",children:[jsxRuntime.jsx("option",{value:"all",children:"All Statuses"}),jsxRuntime.jsx("option",{value:"ongoing",children:"Ongoing"}),jsxRuntime.jsx("option",{value:"contained",children:"Contained"}),jsxRuntime.jsx("option",{value:"resolved",children:"Resolved"})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"sortBy",className:"ndpr-form-field__label",children:"Sort By"}),jsxRuntime.jsxs("select",{id:"sortBy",value:j,onChange:a=>H(a.target.value),className:"ndpr-form-field__input",children:[jsxRuntime.jsx("option",{value:"discoveredAt",children:"Discovery Date"}),jsxRuntime.jsx("option",{value:"title",children:"Title"}),jsxRuntime.jsx("option",{value:"status",children:"Status"}),jsxRuntime.jsx("option",{value:"riskLevel",children:"Risk Level"})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"searchTerm",className:"ndpr-form-field__label",children:"Search"}),jsxRuntime.jsx("input",{type:"text",id:"searchTerm",value:F,onChange:a=>U(a.target.value),placeholder:"Search breaches...",className:"ndpr-form-field__input"})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[jsxRuntime.jsxs("div",{className:"md:col-span-1",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Breach Reports"}),D.length===0?jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:"No breach reports found."}):jsxRuntime.jsx("div",{className:chunkAME4HJR4_js.a("space-y-2 max-h-96 overflow-y-auto pr-2",c.breachList,S),children:D.map(a=>{let m=f.find(_=>_.breachId===a.id),N=k.find(_=>_.breachId===a.id),r=z(a,m),y=null;if(r!=null&&r.ndpcNotificationRequired)if(N)y=jsxRuntime.jsx("span",{className:"text-xs ndpr-text-success",children:"Notified"});else {let _=q(r.ndpcNotificationDeadline);_<=0?y=jsxRuntime.jsx("span",{className:"text-xs ndpr-text-destructive font-bold",children:"Overdue"}):_<=24?y=jsxRuntime.jsx("span",{className:"text-xs ndpr-text-destructive",children:"Urgent"}):y=jsxRuntime.jsx("span",{className:"text-xs ndpr-text-warning",children:"Required"});}else y=jsxRuntime.jsx("span",{className:"text-xs ndpr-text-success",children:"Not Required"});return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`p-3 rounded-md cursor-pointer ${h===a.id?"ndpr-alert ndpr-alert--info":"ndpr-panel"}`,c.breachItem,S),onClick:()=>ie(a.id),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx("h4",{className:"font-medium text-sm",children:a.title}),u(a.status)]}),jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-muted mb-1",children:["Discovered: ",new Date(a.discoveredAt).toLocaleDateString()]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center mt-2",children:[jsxRuntime.jsx("div",{children:m&&ee(m.riskLevel)}),jsxRuntime.jsx("div",{children:y})]})]},a.id)})})]}),jsxRuntime.jsx("div",{className:chunkAME4HJR4_js.a("md:col-span-2",c.detailPanel,S),children:v?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-4",children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:v.title}),u(v.status)]}),B&&jsxRuntime.jsx("div",{className:"ndpr-form-field",children:w()}),L&&jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Discovered:"})," ",C(v.discoveredAt)]}),v.occurredAt&&jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Occurred:"})," ",C(v.occurredAt)]}),jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Reporter:"})," ",v.reporter.name]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Affected Systems:"})," ",v.affectedSystems.join(", ")]}),jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Data Types:"})," ",v.dataTypes.join(", ")]}),jsxRuntime.jsxs("p",{className:"ndpr-text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Affected Subjects:"})," ",v.estimatedAffectedSubjects||"Unknown"]})]})]}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsx("p",{className:"ndpr-text-sm ndpr-font-medium",children:"Description:"}),jsxRuntime.jsx("p",{className:"ndpr-panel",children:v.description})]}),v.initialActions&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"ndpr-text-sm ndpr-font-medium",children:"Initial Actions Taken:"}),jsxRuntime.jsx("p",{className:"ndpr-panel",children:v.initialActions})]})]}),jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Risk Assessment"}),x?jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-2",children:[jsxRuntime.jsx("p",{className:"ndpr-text-sm ndpr-font-medium",children:"Risk Level:"}),ee(x.riskLevel)]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risk Score:"})," ",x.overallRiskScore," / 5"]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Risks to Rights and Freedoms:"})," ",x.risksToRightsAndFreedoms?"Yes":"No"]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"High Risks to Rights and Freedoms:"})," ",x.highRisksToRightsAndFreedoms?"Yes":"No"]}),jsxRuntime.jsx("p",{className:"text-sm mb-1",children:jsxRuntime.jsx("span",{className:"font-medium",children:"Justification:"})}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted bg-white dark:bg-gray-800 p-2 rounded-md",children:x.justification})]}):jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--warning",children:[jsxRuntime.jsx("p",{className:"text-sm ndpr-text-warning",children:"Risk assessment has not been conducted yet."}),jsxRuntime.jsx("button",{onClick:Y,className:`mt-2 px-3 py-1 text-xs bg-yellow-600 text-white rounded hover:bg-yellow-700 ${d}`,children:"Conduct Risk Assessment"})]})]}),jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Notification Status"}),g?jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Notification Sent:"})," ",C(g.sentAt)]}),jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Method:"})," ",g.method.charAt(0).toUpperCase()+g.method.slice(1)]}),g.referenceNumber&&jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Reference Number:"})," ",g.referenceNumber]}),(g.ndpcContact||g.nitdaContact)&&jsxRuntime.jsxs("p",{className:"text-sm mb-2",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"NDPC Contact:"})," ",(P=g.ndpcContact||g.nitdaContact)==null?void 0:P.name]})]}):jsxRuntime.jsx("div",{children:R!=null&&R.ndpcNotificationRequired?jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--warning",children:[jsxRuntime.jsx("p",{className:"text-sm ndpr-text-warning",children:"NDPC notification is required but has not been sent yet."}),jsxRuntime.jsx("button",{onClick:re,className:`mt-2 px-3 py-1 text-xs bg-yellow-600 text-white rounded hover:bg-yellow-700 ${d}`,children:"Generate Notification"})]}):jsxRuntime.jsx("div",{className:"ndpr-alert ndpr-alert--success",children:jsxRuntime.jsx("p",{className:"text-sm ndpr-text-success",children:"NDPC notification is not required for this breach."})})})]}),ae&&$()]}):jsxRuntime.jsx("div",{className:"ndpr-empty-state",children:jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:"Select a breach to view details"})})})]})]})};var Le=({breachData:l,assessmentData:f,organizationInfo:k,onGenerate:J,title:K="Generate NDPC Notification Report",description:Q="Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements.",generateButtonText:se="Generate Report",className:Z="",buttonClassName:b="",classNames:d={},unstyled:c=false,showPreview:S=true,allowEditing:L=true,allowDownload:ae=true,downloadFormat:B="pdf"})=>{let[h,I]=react.useState(""),[D,E]=react.useState(""),[T,O]=react.useState(""),[F,U]=react.useState(""),[j,H]=react.useState("email"),[M,X]=react.useState(""),[ie,Y]=react.useState(""),[re,C]=react.useState(false),[v,x]=react.useState(false);react.useEffect(()=>{let u=R();I(u),C(true);},[l,f,k]);let g=u=>new Date(u).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),R=()=>{var m,N,r,y,_,ne;let w=new Date().toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),$=((m=l.dpoContact)==null?void 0:m.name)||k.dpoName,P=((N=l.dpoContact)==null?void 0:N.email)||k.dpoEmail,a=((r=l.dpoContact)==null?void 0:r.phone)||k.dpoPhone;return `
|
|
2
|
-
NDPC DATA BREACH NOTIFICATION
|
|
3
|
-
|
|
4
|
-
Date: ${w}
|
|
5
|
-
${l.isPhasedReport?"Report Type: PHASED / INTERIM REPORT":"Report Type: Full Report"}
|
|
6
|
-
${l.supplementsReportId?`Supplements Report ID: ${l.supplementsReportId}`:""}
|
|
7
|
-
|
|
8
|
-
Reference: NDPA Section 40 - Personal Data Breaches
|
|
9
|
-
|
|
10
|
-
ORGANIZATION DETAILS
|
|
11
|
-
-------------------
|
|
12
|
-
Organization Name: ${k.name}
|
|
13
|
-
${k.registrationNumber?`Registration Number: ${k.registrationNumber}`:""}
|
|
14
|
-
Address: ${k.address}
|
|
15
|
-
${k.website?`Website: ${k.website}`:""}
|
|
16
|
-
|
|
17
|
-
DATA PROTECTION OFFICER (Section 32 contact point)
|
|
18
|
-
----------------------
|
|
19
|
-
Name: ${$}
|
|
20
|
-
Email: ${P}
|
|
21
|
-
${a?`Phone: ${a}`:""}
|
|
22
|
-
|
|
23
|
-
BREACH DETAILS
|
|
24
|
-
-------------
|
|
25
|
-
Breach Title: ${l.title}
|
|
26
|
-
Date Discovered: ${g(l.discoveredAt)}
|
|
27
|
-
${l.occurredAt?`Date Occurred: ${g(l.occurredAt)}`:"Date Occurred: Unknown"}
|
|
28
|
-
Status: ${l.status.charAt(0).toUpperCase()+l.status.slice(1)}
|
|
29
|
-
|
|
30
|
-
Nature of the Personal Data Breach (Section 40(2)):
|
|
31
|
-
${l.description}
|
|
32
|
-
|
|
33
|
-
Affected Systems/Applications:
|
|
34
|
-
${l.affectedSystems.join(", ")}
|
|
35
|
-
|
|
36
|
-
Types of Personal Data Involved:
|
|
37
|
-
${l.dataTypes.join(", ")}
|
|
38
|
-
${l.involvesSensitiveData?"Sensitive personal data (Section 30) involved: YES":""}
|
|
39
|
-
|
|
40
|
-
Categories of Data Subjects Affected (Section 40(2)):
|
|
41
|
-
${((y=l.dataSubjectCategories)==null?void 0:y.join(", "))||"[Not specified \u2014 required by NDPC]"}
|
|
42
|
-
|
|
43
|
-
Approximate Number of Data Subjects Affected:
|
|
44
|
-
${(_=l.estimatedAffectedSubjects)!=null?_:"Unknown"}
|
|
45
|
-
|
|
46
|
-
Approximate Number of Personal Data Records Concerned (Section 40(2)):
|
|
47
|
-
${(ne=l.approximateRecordCount)!=null?ne:"Unknown"}
|
|
48
|
-
|
|
49
|
-
RISK ASSESSMENT
|
|
50
|
-
--------------
|
|
51
|
-
${f?`
|
|
52
|
-
Overall Risk Level: ${f.riskLevel.charAt(0).toUpperCase()+f.riskLevel.slice(1)}
|
|
53
|
-
Risk to Rights and Freedoms of Data Subjects: ${f.risksToRightsAndFreedoms?"Yes":"No"}
|
|
54
|
-
High Risk to Rights and Freedoms of Data Subjects: ${f.highRisksToRightsAndFreedoms?"Yes":"No"}
|
|
55
|
-
|
|
56
|
-
Justification for Risk Assessment:
|
|
57
|
-
${f.justification}
|
|
58
|
-
`:"Risk assessment has not been conducted yet."}
|
|
59
|
-
|
|
60
|
-
LIKELY CONSEQUENCES OF THE BREACH (Section 40(3))
|
|
61
|
-
--------------------------------
|
|
62
|
-
${l.likelyConsequences||"[Please describe likely consequences for affected data subjects \u2014 identity theft, financial loss, discrimination, etc.]"}
|
|
63
|
-
|
|
64
|
-
MEASURES TAKEN OR PROPOSED
|
|
65
|
-
-------------
|
|
66
|
-
Measures taken to address the breach:
|
|
67
|
-
${l.initialActions||"To be determined"}
|
|
68
|
-
|
|
69
|
-
Measures taken or proposed to mitigate possible adverse effects (Section 40(3)):
|
|
70
|
-
${l.mitigationMeasures||"[Please specify mitigation measures]"}
|
|
71
|
-
|
|
72
|
-
NOTIFICATION TO DATA SUBJECTS (Section 40(3))
|
|
73
|
-
----------------------------
|
|
74
|
-
Have data subjects been notified: [Yes/No]
|
|
75
|
-
If yes, date of notification: [Date]
|
|
76
|
-
If no, planned date of notification: [Date]
|
|
77
|
-
Reason for delay (if applicable): [Reason]
|
|
78
|
-
|
|
79
|
-
${l.isPhasedReport?`PHASED REPORT NOTE
|
|
80
|
-
---------------------
|
|
81
|
-
This report is submitted in phases under NDPA Section 40(2) because complete
|
|
82
|
-
information was not available within 72 hours of discovery. A supplementary
|
|
83
|
-
report will be filed once additional facts are confirmed.
|
|
84
|
-
`:""}
|
|
85
|
-
ADDITIONAL INFORMATION
|
|
86
|
-
---------------------
|
|
87
|
-
[Any additional information relevant to the breach]
|
|
88
|
-
|
|
89
|
-
This notification is made in compliance with the Nigeria Data Protection Act (NDPA), Section 40.
|
|
90
|
-
|
|
91
|
-
IMPORTANT NOTICE
|
|
92
|
-
---------------------
|
|
93
|
-
${chunkZVOIR4QH_js.b}
|
|
94
|
-
`},z=u=>{u.preventDefault();let w={id:`notification_${Date.now()}`,breachId:l.id,sentAt:Date.now(),method:j,referenceNumber:M||void 0,ndpcContact:D?{name:D,email:T,phone:F||void 0}:void 0,content:h,attachments:[]};J(w),x(true);},q=()=>{let u,w,$;switch(B){case "html":{u="text/html",w="html",$=`<!DOCTYPE html>
|
|
95
|
-
<html lang="en">
|
|
96
|
-
<head>
|
|
97
|
-
<meta charset="UTF-8">
|
|
98
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
99
|
-
<title>NDPC Breach Notification Report</title>
|
|
100
|
-
<style>body{font-family:monospace;white-space:pre-wrap;max-width:800px;margin:2rem auto;padding:0 1rem;}</style>
|
|
101
|
-
</head>
|
|
102
|
-
<body>${h.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</body>
|
|
103
|
-
</html>`;break}case "pdf":u="text/plain",w="pdf.txt",$=h;break;case "docx":u="text/plain",w="docx.txt",$=h;break;default:u="text/plain",w="txt",$=h;}let P=document.createElement("a"),a=new Blob([$],{type:u});P.href=URL.createObjectURL(a),P.download=`NDPC_Breach_Notification_${new Date().toISOString().split("T")[0]}.${w}`,document.body.appendChild(P),P.click(),document.body.removeChild(P);},ee=()=>[{value:"email",label:"Email"},{value:"portal",label:"NDPC Portal"},{value:"letter",label:"Formal Letter"},{value:"other",label:"Other"}].map(w=>jsxRuntime.jsx("option",{value:w.value,children:w.label},w.value));return jsxRuntime.jsxs("div",{"data-ndpr-component":"regulatory-report-generator",className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${Z}`,d.root,c),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",d.header,c),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",d.title,c),children:K}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:Q})]}),v?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--success",children:[jsxRuntime.jsx("h3",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Generated Successfully"}),jsxRuntime.jsx("p",{className:"ndpr-text-success",children:"Your NDPC notification report has been generated and is ready for submission. Please review the report carefully before submitting it to the NDPC."})]}),jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Submission Details"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:chunkAME4HJR4_js.a("ndpr-text-sm",d.field,c),children:[jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("font-medium",d.fieldLabel,c),children:"Method:"})," ",jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("",d.fieldValue,c),children:j.charAt(0).toUpperCase()+j.slice(1)})]}),D&&jsxRuntime.jsxs("p",{className:chunkAME4HJR4_js.a("ndpr-text-sm",d.field,c),children:[jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("font-medium",d.fieldLabel,c),children:"Contact Name:"})," ",jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("",d.fieldValue,c),children:D})]}),T&&jsxRuntime.jsxs("p",{className:chunkAME4HJR4_js.a("ndpr-text-sm",d.field,c),children:[jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("font-medium",d.fieldLabel,c),children:"Contact Email:"})," ",jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("",d.fieldValue,c),children:T})]}),F&&jsxRuntime.jsxs("p",{className:chunkAME4HJR4_js.a("ndpr-text-sm",d.field,c),children:[jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("font-medium",d.fieldLabel,c),children:"Contact Phone:"})," ",jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("",d.fieldValue,c),children:F})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:chunkAME4HJR4_js.a("ndpr-text-sm",d.field,c),children:[jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("font-medium",d.fieldLabel,c),children:"Date Generated:"})," ",jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("",d.fieldValue,c),children:g(Date.now())})]}),jsxRuntime.jsxs("p",{className:chunkAME4HJR4_js.a("ndpr-text-sm",d.field,c),children:[jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("font-medium",d.fieldLabel,c),children:"Breach ID:"})," ",jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("",d.fieldValue,c),children:l.id})]}),M&&jsxRuntime.jsxs("p",{className:chunkAME4HJR4_js.a("ndpr-text-sm",d.field,c),children:[jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("font-medium",d.fieldLabel,c),children:"Reference Number:"})," ",jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a("",d.fieldValue,c),children:M})]})]})]})]}),S&&jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Report Preview"}),jsxRuntime.jsx("div",{className:chunkAME4HJR4_js.a("ndpr-panel",d.reportPreview,c),children:jsxRuntime.jsx("pre",{className:"whitespace-pre-wrap text-sm font-mono text-gray-800 dark:text-gray-200",children:h})})]}),jsxRuntime.jsxs("div",{className:"ndpr-card__footer",children:[ae&&jsxRuntime.jsxs("button",{onClick:q,className:chunkAME4HJR4_js.a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${b}`,d.secondaryButton||d.downloadButton,c),children:["Download Report (",B.toUpperCase(),")"]}),jsxRuntime.jsx("button",{onClick:()=>x(false),className:`px-4 py-2 bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-white rounded hover:bg-gray-300 dark:hover:bg-gray-600 ${b}`,children:"Edit Report"})]})]}):jsxRuntime.jsx("form",{onSubmit:z,children:jsxRuntime.jsxs("div",{className:"ndpr-form-section",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Notification Method"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"method",className:"ndpr-form-field__label",children:["Method of Submission ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("select",{id:"method",value:j,onChange:u=>H(u.target.value),className:"ndpr-form-field__input",required:true,children:ee()})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"referenceNumber",className:"ndpr-form-field__label",children:"Reference Number (if available)"}),jsxRuntime.jsx("input",{type:"text",id:"referenceNumber",value:M,onChange:u=>X(u.target.value),placeholder:"e.g. NDPC/BR/2024/001",className:"ndpr-form-field__input"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"NDPC Contact (if known)"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"contactName",className:"ndpr-form-field__label",children:"Contact Name"}),jsxRuntime.jsx("input",{type:"text",id:"contactName",value:D,onChange:u=>E(u.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"contactEmail",className:"ndpr-form-field__label",children:"Contact Email"}),jsxRuntime.jsx("input",{type:"email",id:"contactEmail",value:T,onChange:u=>O(u.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"contactPhone",className:"ndpr-form-field__label",children:"Contact Phone"}),jsxRuntime.jsx("input",{type:"tel",id:"contactPhone",value:F,onChange:u=>U(u.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Additional Information"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"additionalInfo",className:"ndpr-form-field__label",children:"Additional Information to Include"}),jsxRuntime.jsx("textarea",{id:"additionalInfo",value:ie,onChange:u=>Y(u.target.value),rows:3,placeholder:"Any additional information you want to include in the report",className:"ndpr-form-field__input"})]})]}),L&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Report Content"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reportContent",className:"ndpr-form-field__label",children:["Edit Report Content ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("textarea",{id:"reportContent",value:h,onChange:u=>I(u.target.value),rows:20,className:"ndpr-form-field__input ndpr-form-field__input--mono",required:true})]})]}),jsxRuntime.jsxs("div",{className:"ndpr-alert ndpr-alert--info",children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsxRuntime.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. This report will help you comply with this requirement."}),jsxRuntime.jsx("p",{className:"ndpr-text-muted text-xs mt-2 italic",role:"note",children:chunkZVOIR4QH_js.a})]}),jsxRuntime.jsx("div",{className:"mt-6",children:jsxRuntime.jsx("button",{type:"submit",className:chunkAME4HJR4_js.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 ${b}`,d.primaryButton||d.generateButton,c),children:se})})]})})]})};exports.a=we;exports.b=Pe;exports.c=Le;
|