@tantainnovative/ndpr-toolkit 3.3.1 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +542 -0
- package/README.md +80 -38
- package/dist/{ConsentBanner-CDRT0o2k.d.mts → ConsentBanner-F5ayys5K.d.mts} +10 -0
- package/dist/{ConsentBanner-Vxyt8SCX.d.ts → ConsentBanner-VqIPophc.d.ts} +10 -0
- package/dist/{styling-B7CBzYG7.d.ts → ConsentManager-C7I3PDe8.d.mts} +2 -62
- package/dist/{styling-uJLsBbER.d.mts → ConsentManager-CQ2IZtUU.d.ts} +2 -62
- package/dist/{sanitize-B0AzEm1D.d.mts → NDPRProvider-DYFb8xEl.d.ts} +2 -94
- package/dist/{sanitize-B0AzEm1D.d.ts → NDPRProvider-U3QNu6MA.d.mts} +2 -94
- package/dist/adapters.js +1 -1
- package/dist/adapters.mjs +1 -1
- package/dist/breach.js +2 -1
- package/dist/breach.mjs +2 -1
- package/dist/chunk-2L7BSG7G.mjs +2 -0
- package/dist/chunk-3NQQSU4P.js +2 -0
- package/dist/chunk-3VQAYQR7.js +7 -0
- package/dist/chunk-4BOEFDDE.js +4 -0
- package/dist/chunk-5HL4UBFV.js +2 -0
- package/dist/chunk-6HZL2WDU.mjs +2 -0
- package/dist/chunk-6QPRDQZF.js +2 -0
- package/dist/chunk-74Z23WUA.mjs +2 -0
- package/dist/chunk-AHSMDPG5.js +132 -0
- package/dist/chunk-ASLMPY54.js +3 -0
- package/dist/chunk-BN77GP4W.mjs +2 -0
- package/dist/chunk-C5QO3SX4.js +2 -0
- package/dist/chunk-CISJAQ6W.mjs +2 -0
- package/dist/chunk-DUY6F3GT.mjs +94 -0
- package/dist/chunk-EHAZIKDX.js +81 -0
- package/dist/chunk-EPT2K355.mjs +2 -0
- package/dist/chunk-HGGLW5TE.js +2 -0
- package/dist/chunk-HQSU7LGM.js +94 -0
- package/dist/chunk-I557S566.mjs +15 -0
- package/dist/chunk-IZCWCE7W.mjs +2 -0
- package/dist/chunk-JBSCER34.js +2 -0
- package/dist/chunk-JFFOPHU3.mjs +318 -0
- package/dist/chunk-KF3EFJEF.mjs +3 -0
- package/dist/chunk-LJNNPAFU.mjs +2 -0
- package/dist/{chunk-UXMGBIX6.js → chunk-LSCMXAPY.mjs} +4 -4
- package/dist/chunk-LSNL4XR5.js +2 -0
- package/dist/chunk-MLOWRZXO.mjs +4 -0
- package/dist/chunk-NFJ4CB63.mjs +3 -0
- package/dist/chunk-NQNFS3QI.js +7 -0
- package/dist/{chunk-ZEOQYWOE.mjs → chunk-P2YV6DR3.js} +4 -4
- package/dist/chunk-P6QAFBCV.js +2 -0
- package/dist/chunk-R5FW5XUQ.mjs +2 -0
- package/dist/chunk-RLYTX3MM.js +2 -0
- package/dist/chunk-RRVKUCFR.mjs +2 -0
- package/dist/chunk-RXL6CZAI.js +2 -0
- package/dist/chunk-RY3PGVLZ.mjs +2 -0
- package/dist/chunk-SUEGUY35.js +2 -0
- package/dist/chunk-SYMQJO2W.mjs +7 -0
- package/dist/chunk-TCN22KYP.mjs +7 -0
- package/dist/chunk-UHTJ6UFW.js +2 -0
- package/dist/chunk-VTITKWGX.mjs +2 -0
- package/dist/chunk-WH6ZMUOS.mjs +81 -0
- package/dist/chunk-WTJGLNTB.js +3 -0
- package/dist/chunk-XHROISIF.mjs +2 -0
- package/dist/chunk-YPKUHSK4.js +15 -0
- package/dist/chunk-Z73T6MWY.js +318 -0
- package/dist/chunk-ZLSWOFAY.mjs +132 -0
- package/dist/chunk-ZPKVLTSX.js +2 -0
- package/dist/consent.d.mts +6 -4
- package/dist/consent.d.ts +6 -4
- package/dist/consent.js +2 -1
- package/dist/consent.mjs +2 -1
- package/dist/core.d.mts +6 -29
- package/dist/core.d.ts +6 -29
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.js +2 -1
- package/dist/cross-border.mjs +2 -1
- package/dist/docx-4n8g4zul.d.mts +64 -0
- package/dist/docx-VvcTLYZM.d.ts +64 -0
- package/dist/dpia.js +2 -1
- package/dist/dpia.mjs +2 -1
- package/dist/dsr.js +2 -1
- package/dist/dsr.mjs +2 -1
- package/dist/hooks.d.mts +3 -3
- package/dist/hooks.d.ts +3 -3
- package/dist/hooks.js +2 -1
- package/dist/hooks.mjs +2 -1
- package/dist/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/dist/lawful-basis.js +2 -1
- package/dist/lawful-basis.mjs +2 -1
- package/dist/locale-CxJx2tzn.d.mts +25 -0
- package/dist/locale-DSkrtf-c.d.ts +25 -0
- package/dist/{policy-engine-DefZcX3R.d.mts → policy-engine-5qTfp2z4.d.mts} +21 -1
- package/dist/{policy-engine-C6nC2t3a.d.ts → policy-engine-DzPxskOK.d.ts} +21 -1
- package/dist/{policy-sections-DFDPVCCg.d.ts → policy-sections-9tCb7VU7.d.ts} +4 -2
- package/dist/{policy-sections-Bylm31kZ.d.mts → policy-sections-CBWcJv-R.d.mts} +4 -2
- package/dist/{policy-templates-CIKcV0i1.d.ts → policy-templates-DhLwq4R-.d.ts} +8 -1
- package/dist/{policy-templates-DMsPwOSZ.d.mts → policy-templates-DwYl2329.d.mts} +8 -1
- package/dist/policy.d.mts +36 -71
- package/dist/policy.d.ts +36 -71
- package/dist/policy.js +2 -1
- package/dist/policy.mjs +2 -1
- package/dist/presets.d.mts +2 -2
- package/dist/presets.d.ts +2 -2
- package/dist/presets.js +2 -1
- package/dist/presets.mjs +2 -1
- package/dist/ropa.js +2 -1
- package/dist/ropa.mjs +2 -1
- package/dist/sanitize-CxxwKxAx.d.mts +94 -0
- package/dist/sanitize-CxxwKxAx.d.ts +94 -0
- package/dist/server.d.mts +24 -0
- package/dist/server.d.ts +24 -0
- package/dist/server.js +2 -0
- package/dist/server.mjs +2 -0
- package/dist/styles.css +1423 -31
- package/dist/styling-BMDGQDgS.d.mts +64 -0
- package/dist/styling-BaoQtV06.d.ts +64 -0
- package/dist/unstyled.d.mts +52 -19
- package/dist/unstyled.d.ts +52 -19
- package/dist/unstyled.js +2 -1
- package/dist/unstyled.mjs +2 -1
- package/dist/{useAdaptivePolicyWizard-A1PyOy6P.d.mts → useAdaptivePolicyWizard-BSLyltzZ.d.mts} +1 -1
- package/dist/{useAdaptivePolicyWizard-LVIKhAxw.d.ts → useAdaptivePolicyWizard-CL7C7MTZ.d.ts} +1 -1
- package/dist/{useDefaultPrivacyPolicy-ySWU7nc-.d.mts → useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts} +30 -9
- package/dist/{useDefaultPrivacyPolicy-DvCbeEl1.d.ts → useDefaultPrivacyPolicy-DkOqMg2e.d.ts} +30 -9
- package/package.json +14 -2
- package/dist/chunk-25OOUES4.js +0 -2
- package/dist/chunk-4JKTIR33.mjs +0 -2
- package/dist/chunk-5BUS6AI7.js +0 -2
- package/dist/chunk-5ECDPRSZ.js +0 -7
- package/dist/chunk-6YN73KR7.mjs +0 -2
- package/dist/chunk-CDZDT2OS.mjs +0 -320
- package/dist/chunk-CWUPGY3M.mjs +0 -3
- package/dist/chunk-CYU6YUJQ.mjs +0 -81
- package/dist/chunk-EKHBORAH.js +0 -81
- package/dist/chunk-ENIMJ6SQ.js +0 -2
- package/dist/chunk-FLKJSGR7.mjs +0 -94
- package/dist/chunk-FWLPJ5YI.js +0 -94
- package/dist/chunk-GCQRHMTQ.mjs +0 -144
- package/dist/chunk-GMLCWGNJ.js +0 -7
- package/dist/chunk-GXLSOZCH.mjs +0 -2
- package/dist/chunk-LETEUS5X.mjs +0 -2
- package/dist/chunk-LU4PFST7.js +0 -144
- package/dist/chunk-NBSVFQ5G.js +0 -2
- package/dist/chunk-OYR3L4XS.mjs +0 -7
- package/dist/chunk-QF6XNKU6.mjs +0 -2
- package/dist/chunk-QJ3JNHO7.js +0 -2
- package/dist/chunk-QNCGRCAX.mjs +0 -2
- package/dist/chunk-SAA7UVI2.js +0 -3
- package/dist/chunk-TI2M7H6R.mjs +0 -7
- package/dist/chunk-TXXWCB5O.js +0 -320
- package/dist/chunk-UGY5ZYUG.js +0 -2
- package/dist/chunk-UO6QPJLH.js +0 -2
- package/dist/chunk-UX6ZZNEM.mjs +0 -3
- package/dist/chunk-XFUEZ3MP.mjs +0 -2
- package/dist/chunk-XHSHPB74.js +0 -2
- package/dist/chunk-YCX6BFOQ.js +0 -2
- package/dist/chunk-YURSF2YO.mjs +0 -2
- package/dist/chunk-YZXUAIYN.js +0 -3
- package/dist/chunk-ZT7KNFAU.mjs +0 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';var chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),I=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var I__default=/*#__PURE__*/_interopDefault(I);var B=({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=I.useMemo(()=>new Date().toLocaleDateString(),[]),d=(r,s)=>{let i=s?b[s]:void 0;return !i&&s==="printButton"&&(i=b.primaryButton),chunkE64TU6IU_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 the Nigeria Data Protection Act (NDPA) 2023."}),jsxRuntime.jsxs("p",{children:["DPIA Report Version: ",a.version]}),jsxRuntime.jsxs("p",{children:["Generated on: ",o]})]})]})};var M=({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)=>chunkE64TU6IU_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(I__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=B;exports.b=M;//# sourceMappingURL=chunk-3VQAYQR7.js.map
|
|
7
|
+
//# sourceMappingURL=chunk-3VQAYQR7.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use strict';var chunkZ73T6MWY_js=require('./chunk-Z73T6MWY.js'),chunkYPKUHSK4_js=require('./chunk-YPKUHSK4.js'),chunkAHSMDPG5_js=require('./chunk-AHSMDPG5.js'),chunkELKB2AFZ_js=require('./chunk-ELKB2AFZ.js'),chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react');var nt=10,Rt="ndpr_policy_draft",_t=2e3;function st(){return `section_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function it(){return `draft_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function w(u,A,M){let S=Date.now();return {id:M,title:`Privacy Policy${u.org.name?` \u2014 ${u.org.name}`:""}`,templateId:"adaptive-policy-wizard",organizationInfo:{name:u.org.name,website:u.org.website,privacyEmail:u.org.privacyEmail,address:u.org.address,dpoName:u.org.dpoName,dpoEmail:u.org.dpoEmail,industry:u.org.industry},sections:A,variableValues:{},effectiveDate:S,lastUpdated:S,version:"1.0",applicableFrameworks:["ndpa","ndpr"]}}function Ut(u={}){var K;let{onComplete:A,onComplianceChange:M}=u,S=react.useRef((K=u.adapter)!=null?K:chunkELKB2AFZ_js.a(Rt));u.adapter&&(S.current=u.adapter);let f=react.useRef(it()),[P,y]=react.useState(1),[n,v]=react.useState(chunkYPKUHSK4_js.b),[b,O]=react.useState([]),[x,I]=react.useState({}),[E,$]=react.useState([]),[at,q]=react.useState(false),[ct,z]=react.useState(null),[N,U]=react.useState(true),T=react.useRef(false),R=react.useRef(null);react.useEffect(()=>{let t=false,e=r=>{r&&(f.current=r.id,v(r.templateContext),O(r.customSections),I(r.sectionOverrides),$(r.sectionOrder),y(r.currentStep),z(r.lastSavedAt),q(true));};try{let r=S.current.load();r instanceof Promise?r.then(i=>{t||(e(i),U(!1));},()=>{t||U(!1);}):(e(r),U(!1));}catch(r){t||U(false);}return ()=>{t=true;}},[]);let l=react.useMemo(()=>{let e=chunkAHSMDPG5_js.c(n).map(o=>x[o.id]?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{template:x[o.id]}):o),r=b.map(o=>{var d;return {id:o.id,title:o.title,template:(d=x[o.id])!=null?d:o.content,order:o.order,required:false,included:true}}),i=[...e,...r];if(E.length>0){let o=new Map(E.map((d,p)=>[d,p]));return [...i].sort((d,p)=>{let m=o.has(d.id)?o.get(d.id):i.length,C=o.has(p.id)?o.get(p.id):i.length;return m-C})}return [...i].sort((o,d)=>{var p,m;return ((p=o.order)!=null?p:0)-((m=d.order)!=null?m:0)})},[n,b,x,E]),s=react.useMemo(()=>!n.org.name&&!n.org.privacyEmail?null:w(n,l,f.current),[n,l]),Y=react.useMemo(()=>w(chunkYPKUHSK4_js.b(),[],f.current),[]),V=react.useMemo(()=>chunkYPKUHSK4_js.c(s!=null?s:Y,n),[s,n,Y]),_=V.percentage,D=V.gaps,j=react.useRef({score:-1,gaps:[]});react.useEffect(()=>{let t=j.current;M&&(_!==t.score||D!==t.gaps)&&M(_,D),j.current={score:_,gaps:D};},[_,D,M]);let dt=react.useMemo(()=>{switch(P){case 1:return n.org.name.trim().length>0&&n.org.privacyEmail.trim().length>0;case 2:return n.dataCategories.some(t=>t.selected);case 3:return n.purposes.length>0;case 4:return true;default:return false}},[P,n]),lt=react.useCallback(t=>{let e=Math.min(Math.max(1,t),4);e<4&&(T.current=false),y(e);},[]),pt=react.useCallback(()=>{y(t=>Math.min(t+1,4));},[]),ut=react.useCallback(()=>{T.current=false,y(t=>Math.max(t-1,1));},[]),mt=react.useCallback(t=>{v(e=>chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},e),t));},[]),gt=react.useCallback(t=>{v(e=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{org:chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},e.org),t)}));},[]),ft=react.useCallback(t=>{v(e=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{dataCategories:e.dataCategories.map(r=>r.id===t?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},r),{selected:!r.selected}):r)}));},[]),Pt=react.useCallback(t=>{v(e=>{let r=t,i=e.purposes.includes(r);return chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{purposes:i?e.purposes.filter(o=>o!==t):[...e.purposes,r]})});},[]),yt=react.useCallback(t=>{v(e=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{thirdPartyProcessors:[...e.thirdPartyProcessors,t]}));},[]),Ct=react.useCallback(t=>{v(e=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{thirdPartyProcessors:e.thirdPartyProcessors.filter((r,i)=>i!==t)}));},[]),St=react.useCallback(t=>{O(e=>e.length>=nt?e:[...e,chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},t),{id:st(),required:false})]);},[]),vt=react.useCallback((t,e)=>{O(r=>r.map(i=>i.id===t?chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),e):i));},[]),xt=react.useCallback(t=>{O(e=>e.filter(r=>r.id!==t)),$(e=>e.filter(r=>r!==t)),I(e=>{let r=chunkMQFZHA2D_js.a({},e);return delete r[t],r});},[]),ht=react.useCallback((t,e)=>{$(r=>{let i=r.length>0?r:l.map(m=>m.id),o=i.indexOf(t);if(o===-1){let m=l.map(It=>It.id),C=m.indexOf(t);if(C===-1)return r;let G=e==="up"?C-1:C+1;if(G<0||G>=m.length)return m;let k=[...m];return [k[C],k[G]]=[k[G],k[C]],k}let d=e==="up"?o-1:o+1;if(d<0||d>=i.length)return i;let p=[...i];return [p[o],p[d]]=[p[d],p[o]],p});},[l]),Dt=react.useCallback((t,e)=>{I(r=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},r),{[t]:e}));},[]),bt=react.useCallback(t=>{let e=D.find(r=>r.requirementId===t);if(e)switch(e.fixType){case "fill_field":{T.current=false;let i=["data-categories-disclosed"],o=["purpose-of-processing"];i.includes(t)?y(2):o.includes(t)?y(3):(y(1));break}case "add_section":{if(!e.suggestedContent)break;O(r=>r.length>=nt?r:[...r,{id:st(),title:e.requirement,content:e.suggestedContent,order:999,required:false}]);break}case "add_content":{if(!e.suggestedContent)break;let r="data-subject-rights";I(i=>{var d,p,m;let o=(m=(p=i[r])!=null?p:(d=l.find(C=>C.id===r))==null?void 0:d.template)!=null?m:"";return chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},i),{[r]:`${o}
|
|
2
|
+
|
|
3
|
+
${e.suggestedContent}`.trim()})});break}}},[D,l]),X=react.useCallback(t=>({id:f.current,templateContext:n,customSections:b,sectionOverrides:x,sectionOrder:E,currentStep:t,lastSavedAt:Date.now(),status:"draft"}),[n,b,x,E]),Ot=react.useCallback(()=>chunkMQFZHA2D_js.d(null,null,function*(){let t=X(P);try{yield Promise.resolve(S.current.save(t)),z(t.lastSavedAt),q(!0);}catch(e){console.warn("[ndpr-toolkit] Failed to save draft:",e);}}),[X,P]),Et=react.useCallback(()=>{Promise.resolve(S.current.remove()).catch(t=>{console.warn("[ndpr-toolkit] Failed to remove draft:",t);}),f.current=it(),T.current=false,v(chunkYPKUHSK4_js.b()),O([]),I({}),$([]),y(1),q(false),z(null);},[]);react.useEffect(()=>{if(!N)return R.current&&clearTimeout(R.current),R.current=setTimeout(()=>{let t=X(P);Promise.resolve(S.current.save(t)).then(()=>{z(t.lastSavedAt),q(true);}).catch(e=>{console.warn("[ndpr-toolkit] Auto-save failed:",e);});},_t),()=>{R.current&&clearTimeout(R.current);}},[n,b,x,E,P,N,X]),react.useEffect(()=>{P===4&&s&&A&&!T.current&&(T.current=true,A(s));},[P,s,A]);let Tt=react.useCallback(t=>chunkMQFZHA2D_js.d(null,null,function*(){let e=s!=null?s:w(n,l,f.current);return chunkZ73T6MWY_js.c(e,t)}),[s,n,l]),wt=react.useCallback(t=>chunkMQFZHA2D_js.d(null,null,function*(){let e=s!=null?s:w(n,l,f.current);return chunkZ73T6MWY_js.d(e,t)}),[s,n,l]),At=react.useCallback(t=>{let e=s!=null?s:w(n,l,f.current);return chunkZ73T6MWY_js.a(e,t)},[s,n,l]),Mt=react.useCallback(()=>{let t=s!=null?s:w(n,l,f.current);return chunkZ73T6MWY_js.b(t)},[s,n,l]);return {currentStep:P,goToStep:lt,nextStep:pt,prevStep:ut,canProceed:dt,context:n,updateContext:mt,updateOrg:gt,toggleDataCategory:ft,togglePurpose:Pt,addProcessor:yt,removeProcessor:Ct,policy:s,sections:l,customSections:b,addCustomSection:St,updateCustomSection:vt,removeCustomSection:xt,reorderSections:ht,editSectionContent:Dt,sectionOverrides:x,complianceScore:_,complianceResult:V,complianceGaps:D,applyFix:bt,handleExportPDF:Tt,handleExportDOCX:wt,handleExportHTML:At,handleExportMarkdown:Mt,isDraftSaved:at,lastSavedAt:ct,saveDraft:Ot,discardDraft:Et,isLoading:N}}exports.a=Ut;//# sourceMappingURL=chunk-4BOEFDDE.js.map
|
|
4
|
+
//# sourceMappingURL=chunk-4BOEFDDE.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),jsxRuntime=require('react/jsx-runtime');var R=({sections:v,answers:y,onAnswerChange:u,currentSectionIndex:o,onNextSection:$,onPrevSection:B,validationErrors:P={},readOnly:s=false,className:A="",buttonClassName:_="",nextButtonText:C="Next",prevButtonText:w="Previous",submitButtonText:I="Submit",showProgress:D=true,progress:c,classNames:f={},unstyled:Q=false})=>{let m=v[o],S=o===v.length-1,t=(e,a)=>{let d=a?f[a]:void 0;return !d&&a==="nextButton"&&(d=f.primaryButton),!d&&a==="prevButton"&&(d=f.secondaryButton),chunkE64TU6IU_js.a(e,d,Q)},L=e=>e.showWhen?e.showWhen.every(a=>{let d=y[a.questionId];switch(a.operator){case "equals":return d===a.value;case "contains":return Array.isArray(d)?d.includes(String(a.value)):false;case "greaterThan":return typeof d=="number"&&typeof a.value=="number"?d>a.value:false;case "lessThan":return typeof d=="number"&&typeof a.value=="number"?d<a.value:false;default:return true}}):true,b=e=>t("ndpr-form-field__input","input"),T=e=>{if(!L(e))return null;let a=P[e.id],d=y[e.id],l=typeof d=="boolean"?String(d):d,h=e.guidance?`${e.id}-guidance`:void 0,N=a?`${e.id}-error`:void 0,p=[h,N].filter(Boolean).join(" ")||void 0;return jsxRuntime.jsxs("div",{className:t("ndpr-form-field","question"),children:[jsxRuntime.jsxs("label",{htmlFor:e.id,className:t("ndpr-form-field__label","questionText"),children:[e.text,e.required&&jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),e.guidance&&jsxRuntime.jsx("p",{id:h,className:t("ndpr-form-field__hint","guidance"),children:e.guidance}),e.type==="text"&&jsxRuntime.jsx("input",{type:"text",id:e.id,value:l||"",onChange:r=>u(e.id,r.target.value),disabled:s,className:b(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0}),e.type==="textarea"&&jsxRuntime.jsx("textarea",{id:e.id,value:l||"",onChange:r=>u(e.id,r.target.value),disabled:s,rows:4,className:b(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0}),e.type==="select"&&e.options&&jsxRuntime.jsxs("select",{id:e.id,value:l||"",onChange:r=>u(e.id,r.target.value),disabled:s,className:b(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0,children:[jsxRuntime.jsx("option",{value:"",children:"Select an option"}),e.options.map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value))]}),e.type==="radio"&&e.options&&jsxRuntime.jsx("div",{className:t("ndpr-form-field__option-group","radioGroup"),role:"radiogroup","aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0,children:e.options.map(r=>jsxRuntime.jsxs("div",{className:t("ndpr-form-field__checkbox-row","radioOption"),children:[jsxRuntime.jsx("input",{type:"radio",id:`${e.id}_${r.value}`,name:e.id,value:r.value,checked:l===r.value,onChange:()=>u(e.id,r.value),disabled:s,className:"ndpr-form-field__radio"}),jsxRuntime.jsxs("label",{htmlFor:`${e.id}_${r.value}`,className:"ndpr-form-field__label",children:[r.label,r.riskLevel&&jsxRuntime.jsxs("span",{className:r.riskLevel==="low"?"ndpr-badge ndpr-badge--success":r.riskLevel==="medium"?"ndpr-badge ndpr-badge--warning":"ndpr-badge ndpr-badge--destructive",children:[r.riskLevel.charAt(0).toUpperCase()+r.riskLevel.slice(1)," Risk"]})]})]},r.value))}),e.type==="checkbox"&&e.options&&jsxRuntime.jsx("div",{className:"ndpr-form-field__option-group",role:"group","aria-label":e.text,"aria-describedby":p,"aria-invalid":a?true:void 0,children:e.options.map(r=>jsxRuntime.jsxs("div",{className:"ndpr-form-field__checkbox-row",children:[jsxRuntime.jsx("input",{type:"checkbox",id:`${e.id}_${r.value}`,value:r.value,checked:Array.isArray(l)?l.includes(r.value):false,onChange:g=>{let x=Array.isArray(l)?[...l]:[];g.target.checked?u(e.id,[...x,r.value]):u(e.id,x.filter(V=>V!==r.value));},disabled:s,className:"ndpr-form-field__checkbox"}),jsxRuntime.jsx("label",{htmlFor:`${e.id}_${r.value}`,className:"ndpr-form-field__label",children:r.label})]},r.value))}),e.type==="scale"&&jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsx("div",{className:"ndpr-form-field__hint",style:{display:"flex",justifyContent:"space-between"},children:e.scaleLabels&&Object.entries(e.scaleLabels).map(([r,g])=>jsxRuntime.jsx("span",{style:{width:`${100/Object.keys(e.scaleLabels||{}).length}%`,textAlign:"center"},children:g},r))}),jsxRuntime.jsx("input",{type:"range",id:e.id,min:e.minValue||1,max:e.maxValue||5,value:typeof l=="number"?l:e.minValue||1,onChange:r=>u(e.id,parseInt(r.target.value,10)),disabled:s,className:"ndpr-form-field__range","aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":a?true:void 0}),jsxRuntime.jsxs("div",{className:"ndpr-form-field__hint",style:{textAlign:"center"},children:["Selected value: ",l||e.minValue||1]})]}),a&&jsxRuntime.jsx("p",{id:N,className:"ndpr-form-field__error",role:"alert",children:a})]},e.id)};return m?jsxRuntime.jsxs("div",{"data-ndpr-component":"dpia-questionnaire",className:`${t("ndpr-card","root")} ${A}`,children:[D&&jsxRuntime.jsxs("div",{className:t("ndpr-card__header","header"),style:{flexDirection:"column",alignItems:"stretch",gap:"var(--ndpr-space-2)"},children:[jsxRuntime.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"var(--ndpr-font-size-sm)",color:"rgb(var(--ndpr-muted-foreground))"},children:[jsxRuntime.jsxs("span",{children:["Section ",o+1," of ",v.length]}),jsxRuntime.jsx("span",{children:c!==void 0?`${c}% Complete`:""})]}),jsxRuntime.jsx("div",{className:t("ndpr-progress","progressBar"),role:"progressbar","aria-valuenow":c!==void 0?c:Math.round((o+1)/v.length*100),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Questionnaire progress",children:jsxRuntime.jsx("div",{className:"ndpr-progress__bar",style:{width:`${c!==void 0?c:(o+1)/v.length*100}%`}})})]}),jsxRuntime.jsx("h2",{className:t("ndpr-card__title","title"),children:m.title}),m.description&&jsxRuntime.jsx("p",{className:t("ndpr-card__subtitle","sectionTitle"),children:m.description}),jsxRuntime.jsx("div",{className:t("ndpr-card__body","section"),children:m.questions.map(e=>T(e))}),jsxRuntime.jsxs("div",{className:t("ndpr-card__footer","navigation"),style:{justifyContent:"space-between"},children:[jsxRuntime.jsx("button",{type:"button",onClick:B,disabled:o===0||s,className:`${t("ndpr-button ndpr-button--secondary","prevButton")} ${_}`,children:w}),jsxRuntime.jsx("button",{type:"button",onClick:$,disabled:s,className:`${t("ndpr-button ndpr-button--primary","nextButton")} ${_}`,children:S?I:C})]})]}):jsxRuntime.jsx("div",{children:"No section found."})};exports.a=R;//# sourceMappingURL=chunk-5HL4UBFV.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-5HL4UBFV.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$2}from'./chunk-GKKAK6ES.mjs';import {a}from'./chunk-AYKLAEOU.mjs';import {b,a as a$1}from'./chunk-WWT2ZSNU.mjs';import {useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var gi=({requestTypes:P,onSubmit:V,onValidationError:y,title:N="Submit a Data Subject Request",description:s="Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part IV, Sections 29-36.",submitButtonText:ii="Submit Request",className:q="",buttonClassName:ri="",showConfirmation:ei=true,confirmationMessage:ti="Your request has been submitted successfully. You will receive a confirmation email shortly.",requireIdentityVerification:k=true,identifierTypes:F=[{id:"email",label:"Email Address"},{id:"account",label:"Account Number"},{id:"customer_id",label:"Customer ID"}],collectAdditionalContact:oi=true,labels:v={},classNames:i,unstyled:e=false,isSubmitting:T=false,defaultValues:p,onReset:C})=>{var Y,H,L,U,W,J;let[c,j]=useState((p==null?void 0:p.requestType)||""),[$,w]=useState(((Y=p==null?void 0:p.dataSubject)==null?void 0:Y.fullName)||""),[S,E]=useState(((H=p==null?void 0:p.dataSubject)==null?void 0:H.email)||""),[I,B]=useState(((L=p==null?void 0:p.dataSubject)==null?void 0:L.phone)||""),[O,z]=useState(((U=p==null?void 0:p.dataSubject)==null?void 0:U.identifierType)||((W=F[0])==null?void 0:W.id)||""),[x,M]=useState(((J=p==null?void 0:p.dataSubject)==null?void 0:J.identifierValue)||""),[_,A]=useState((p==null?void 0:p.additionalInfo)||{}),[ni,D]=useState(false),[d,Z]=useState({}),di=()=>{var r;j(""),w(""),E(""),B(""),z(((r=F[0])==null?void 0:r.id)||""),M(""),A({}),D(false),Z({}),C==null||C();},a$3=P.find(r=>r.id===c),pi=r=>{j(r.target.value),A({});},h=(r,b$1)=>{A(l=>b(a$1({},l),{[r]:b$1}));},ai=()=>{let r={};return $.trim()||(r.fullName="Full name is required"),S.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(S)||(r.email="Email is invalid"):r.email="Email is required",c||(r.requestType="Please select a request type"),k&&!x.trim()&&(r.identifierValue="Identifier value is required"),a$3!=null&&a$3.requiresAdditionalInfo&&a$3.additionalFields&&a$3.additionalFields.forEach(b=>{b.required&&!_[b.id]&&(r[`additional_${b.id}`]=`${b.label} is required`);}),Z(r),r},ui=r=>{r.preventDefault();let b=ai();if(Object.keys(b).length>0){y==null||y(b);return}let l=Object.keys(_).length>0?Object.fromEntries(Object.entries(_).map(([u,m])=>[u,typeof m=="string"?a$2(m):m])):void 0,R={requestType:c,dataSubject:{fullName:a$2($),email:a$2(S),phone:I?a$2(I):void 0,identifierType:O,identifierValue:a$2(x)},additionalInfo:l,submittedAt:Date.now()};V(R),ei&&D(true);},G=`ndpr-dsr-form__button ndpr-dsr-form__button--primary ${ri}`.trim(),bi="ndpr-dsr-form__button ndpr-dsr-form__button--secondary";return ni?jsxs("div",{"data-ndpr-component":"dsr-request-form","data-ndpr-state":"submitted",className:a(`ndpr-dsr-form__success${q?` ${q}`:""}`,i==null?void 0:i.successMessage,e),"aria-live":"polite",children:[jsx("h2",{className:a("ndpr-dsr-form__success-title",i==null?void 0:i.title,e),children:"Request Submitted"}),jsx("p",{className:a("ndpr-dsr-form__success-body",i==null?void 0:i.description,e),children:ti}),jsx("button",{onClick:()=>D(false),className:a(G,(i==null?void 0:i.primaryButton)||(i==null?void 0:i.submitButton),e),children:"Submit Another Request"})]}):jsxs("div",{"data-ndpr-component":"dsr-request-form",className:a(`ndpr-dsr-form${q?` ${q}`:""}`,i==null?void 0:i.root,e),children:[jsx("h2",{className:a("ndpr-dsr-form__title",i==null?void 0:i.title,e),children:N}),jsx("p",{className:a("ndpr-dsr-form__description",i==null?void 0:i.description,e),children:s}),jsx("form",{onSubmit:ui,className:a("",i==null?void 0:i.form,e),children:jsxs("div",{className:a("ndpr-dsr-form__sections",i==null?void 0:i.fieldGroup,e),children:[jsxs("div",{children:[jsx("h3",{className:e?"":"ndpr-form-section__heading",children:"Personal Information"}),jsxs("div",{className:e?"":"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"fullName",className:a("ndpr-form-field__label",i==null?void 0:i.label,e),children:[v.name||"Full Name"," ",jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"fullName",value:$,onChange:r=>w(r.target.value),className:a("ndpr-form-field__input",i==null?void 0:i.input,e),required:true,"aria-required":"true","aria-invalid":!!d.fullName,"aria-describedby":d.fullName?"fullName-error":void 0}),d.fullName&&jsx("p",{id:"fullName-error",role:"alert",className:e?"":"ndpr-form-field__error",children:d.fullName})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"email",className:a("ndpr-form-field__label",i==null?void 0:i.label,e),children:[v.email||"Email Address"," ",jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"email",id:"email",value:S,onChange:r=>E(r.target.value),className:a("ndpr-form-field__input",i==null?void 0:i.input,e),required:true,"aria-required":"true","aria-invalid":!!d.email,"aria-describedby":d.email?"email-error":void 0}),d.email&&jsx("p",{id:"email-error",role:"alert",className:e?"":"ndpr-form-field__error",children:d.email})]}),oi&&jsxs("div",{children:[jsx("label",{htmlFor:"phone",className:a("ndpr-form-field__label",i==null?void 0:i.label,e),children:"Phone Number (Optional)"}),jsx("input",{type:"tel",id:"phone",value:I,onChange:r=>B(r.target.value),className:a("ndpr-form-field__input",i==null?void 0:i.input,e)})]})]})]}),jsxs("div",{children:[jsx("h3",{className:e?"":"ndpr-form-section__heading",children:"Request Details"}),jsxs("div",{className:e?"":"ndpr-form-field",children:[jsxs("label",{htmlFor:"requestType",className:a("ndpr-form-field__label",i==null?void 0:i.label,e),children:[v.requestType||"Request Type"," ",jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"requestType",value:c,onChange:pi,className:a("ndpr-form-field__select",i==null?void 0:i.select,e),required:true,"aria-required":"true","aria-invalid":!!d.requestType,"aria-describedby":d.requestType?"requestType-error":void 0,children:[jsx("option",{value:"",children:"Select a request type"}),P.map(r=>jsx("option",{value:r.id,children:r.name},r.id))]}),d.requestType&&jsx("p",{id:"requestType-error",role:"alert",className:e?"":"ndpr-form-field__error",children:d.requestType})]}),a$3&&jsxs("div",{className:e?"":"ndpr-dsr-form__type-info",children:[jsx("p",{children:a$3.description}),jsxs("p",{children:["Estimated completion time: ",a$3.estimatedCompletionTime," ",a$3.estimatedCompletionTime===1?"day":"days"]})]}),jsxs("div",{className:e?"":"ndpr-form-field",children:[jsx("label",{htmlFor:"requestDescription",className:a("ndpr-form-field__label",i==null?void 0:i.label,e),children:v.description||"Additional Information"}),jsx("textarea",{id:"requestDescription",className:a("ndpr-form-field__textarea",i==null?void 0:i.textarea,e),rows:4,placeholder:"Please provide any additional details that might help us process your request"})]})]}),k&&jsxs("div",{children:[jsx("h3",{className:e?"":"ndpr-form-section__heading",children:"Identity Verification"}),jsx("p",{className:e?"":"ndpr-form-section__hint",children:"To protect your privacy, we need to verify your identity before processing your request."}),jsxs("div",{className:e?"":"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"identifierType",className:a("ndpr-form-field__label",i==null?void 0:i.label,e),children:["Identifier Type ",jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsx("select",{id:"identifierType",value:O,onChange:r=>z(r.target.value),className:a("ndpr-form-field__select",i==null?void 0:i.select,e),required:true,"aria-required":"true",children:F.map(r=>jsx("option",{value:r.id,children:r.label},r.id))})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"identifierValue",className:a("ndpr-form-field__label",i==null?void 0:i.label,e),children:["Identifier Value ",jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"identifierValue",value:x,onChange:r=>M(r.target.value),className:a("ndpr-form-field__input",i==null?void 0:i.input,e),required:true,"aria-required":"true","aria-invalid":!!d.identifierValue,"aria-describedby":d.identifierValue?"identifierValue-error":void 0}),d.identifierValue&&jsx("p",{id:"identifierValue-error",role:"alert",className:e?"":"ndpr-form-field__error",children:d.identifierValue})]})]})]}),(a$3==null?void 0:a$3.requiresAdditionalInfo)&&a$3.additionalFields&&a$3.additionalFields.length>0&&jsxs("div",{children:[jsx("h3",{className:e?"":"ndpr-form-section__heading",children:"Additional Information"}),jsx("div",{className:e?"":"ndpr-form-section",children:a$3.additionalFields.map(r=>{var b,l,R;return jsxs("div",{children:[jsxs("label",{htmlFor:r.id,className:a("ndpr-form-field__label",i==null?void 0:i.label,e),children:[r.label," ",r.required&&jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),r.type==="text"&&jsx("input",{type:"text",id:r.id,value:String((b=_[r.id])!=null?b:""),onChange:u=>h(r.id,u.target.value),placeholder:r.placeholder,className:a("ndpr-form-field__input",i==null?void 0:i.input,e),required:r.required,"aria-required":r.required||void 0,"aria-invalid":!!d[`additional_${r.id}`],"aria-describedby":d[`additional_${r.id}`]?`additional-${r.id}-error`:void 0}),r.type==="textarea"&&jsx("textarea",{id:r.id,value:String((l=_[r.id])!=null?l:""),onChange:u=>h(r.id,u.target.value),placeholder:r.placeholder,className:a("ndpr-form-field__textarea",i==null?void 0:i.textarea,e),rows:4,required:r.required,"aria-required":r.required||void 0,"aria-invalid":!!d[`additional_${r.id}`],"aria-describedby":d[`additional_${r.id}`]?`additional-${r.id}-error`:void 0}),r.type==="select"&&r.options&&jsxs("select",{id:r.id,value:String((R=_[r.id])!=null?R:""),onChange:u=>h(r.id,u.target.value),className:a("ndpr-form-field__select",i==null?void 0:i.select,e),required:r.required,"aria-required":r.required||void 0,"aria-invalid":!!d[`additional_${r.id}`],"aria-describedby":d[`additional_${r.id}`]?`additional-${r.id}-error`:void 0,children:[jsx("option",{value:"",children:r.placeholder||"Select an option"}),r.options.map(u=>jsx("option",{value:u,children:u},u))]}),r.type==="checkbox"&&jsxs("div",{className:e?"":"ndpr-form-field__checkbox-row",children:[jsx("input",{type:"checkbox",id:r.id,checked:!!_[r.id],onChange:u=>h(r.id,u.target.checked),className:e?"":"ndpr-form-field__checkbox",required:r.required,"aria-required":r.required||void 0,"aria-invalid":!!d[`additional_${r.id}`],"aria-describedby":d[`additional_${r.id}`]?`additional-${r.id}-error`:void 0}),jsx("label",{htmlFor:r.id,className:a("ndpr-form-field__label",i==null?void 0:i.label,e),children:r.placeholder||r.label})]}),r.type==="file"&&jsx("input",{type:"file",id:r.id,onChange:u=>{var K;let m=(K=u.target.files)==null?void 0:K[0];m&&h(r.id,m.name);},className:a("ndpr-form-field__input",i==null?void 0:i.input,e),required:r.required,"aria-required":r.required||void 0,"aria-invalid":!!d[`additional_${r.id}`],"aria-describedby":d[`additional_${r.id}`]?`additional-${r.id}-error`:void 0}),d[`additional_${r.id}`]&&jsx("p",{id:`additional-${r.id}-error`,role:"alert",className:e?"":"ndpr-form-field__error",children:d[`additional_${r.id}`]})]},r.id)})})]}),jsxs("div",{className:e?"":"ndpr-dsr-form__notice",children:[jsx("h3",{className:e?"":"ndpr-dsr-form__notice-title",children:"Privacy Notice"}),jsx("p",{className:e?"":"ndpr-dsr-form__notice-body",children:"The information you provide in this form will be used solely for the purpose of processing your data subject request. We will retain this information for as long as necessary to fulfill your request and to comply with our legal obligations. For more information, please refer to our Privacy Policy."})]}),jsxs("div",{className:e?"":"ndpr-dsr-form__actions",children:[T&&(i==null?void 0:i.loadingOverlay)&&jsx("div",{className:i.loadingOverlay}),jsx("button",{type:"submit",disabled:T,className:a(G,(i==null?void 0:i.primaryButton)||(i==null?void 0:i.submitButton),e),children:T?"Submitting...":v.submit||ii}),jsx("button",{type:"button",onClick:di,className:a(bi,void 0,e),children:"Reset"})]})]})})]})};export{gi as a};//# sourceMappingURL=chunk-6HZL2WDU.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-6HZL2WDU.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
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\u1EB9rin, Abala 29-36.",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 An\u1ECD, Ngalaba 29-36 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 Hu\u0257u, Sashe 29-36.",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 IV, Sections 29-36.",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;//# sourceMappingURL=chunk-6QPRDQZF.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-6QPRDQZF.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'./chunk-XHROISIF.mjs';import {c}from'./chunk-WWT2ZSNU.mjs';import {createContext,useMemo,useContext,Component}from'react';import {jsx,jsxs}from'react/jsx-runtime';var d=createContext({}),s=class extends 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:jsxs("div",{role:"alert",style:{padding:"16px",border:"1px solid #e53e3e",borderRadius:"4px",backgroundColor:"#fff5f5",color:"#c53030"},children:[jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"16px"},children:"Something went wrong"}),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=c(t,["children","fallback","onError"]);let l=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 jsx(d.Provider,{value:r,children:jsx(s,{fallback:p,onError:e,children:l?jsx("div",{style:l,children:o}):o})})};function v(){return useContext(d)}function D(){let{locale:o}=useContext(d);return useMemo(()=>b(o),[o])}export{E as a,v as b,D as c};//# sourceMappingURL=chunk-74Z23WUA.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-74Z23WUA.mjs.map
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
'use strict';var p="\xABTODO: ",I="\xBB";function s(e){return `${p}${e}\xBB`}function i(e,t,n,o,a){return {id:e,title:t,template:n,order:o,required:a,included:true}}function h(e){return e.filter(t=>t.selected)}function g(e){return {service_delivery:"Service Delivery \u2014 to provide, maintain, and improve the services you have requested from us",marketing:"Marketing \u2014 to send promotional communications where you have opted in to receive them",analytics:"Analytics \u2014 to analyse usage patterns and improve user experience",research:"Research \u2014 to conduct research and development for service improvement",legal_compliance:"Legal Compliance \u2014 to meet our obligations under Nigerian law, including the NDPA 2023",fraud_prevention:"Fraud Prevention \u2014 to detect, prevent, and respond to fraud, security threats, and abuse"}[e]}function f(e,t){let n=e.org.name||s("orgName"),o=e.org.website||s("website"),a=new Date().toISOString().slice(0,10);return i("introduction","Introduction & Scope",`This Privacy Policy explains how ${n} ("we", "us", or "our") collects, uses, stores, and protects personal data when you use our services and visit our website at ${o}. This policy is issued in compliance with the Nigeria Data Protection Act (NDPA) 2023 and the Nigeria Data Protection Regulation (NDPR). It applies to all personal data processed by ${n}, whether collected online or offline.
|
|
2
|
+
|
|
3
|
+
Effective Date: ${a}.
|
|
4
|
+
|
|
5
|
+
We are committed to protecting your privacy and ensuring that your personal data is handled responsibly and in accordance with applicable data protection legislation.`,t,true)}function m(e,t){let n=e.org.name||s("orgName"),o=h(e.dataCategories),a={identity:"Identity & Contact Information",financial:"Financial Information",behavioral:"Technical & Behavioral Data",sensitive:"Sensitive / Special-Category Data",children:"Children's Data"},r="",c=["identity","financial","behavioral","sensitive","children"];for(let d of c){let u=o.filter(l=>l.group===d);if(u.length>0){r+=`
|
|
6
|
+
${a[d]}:
|
|
7
|
+
`;for(let l of u)r+=`- ${l.label}: ${l.dataPoints.join(", ")}.
|
|
8
|
+
`;}}return r===""&&(r=`
|
|
9
|
+
- Personal data categories have not yet been specified.
|
|
10
|
+
`),i("data-collection","Data We Collect",`${n} collects the following categories of personal data in the course of providing our services. Data may be collected directly from you (e.g. through forms, account registration, or correspondence) or automatically (e.g. through cookies, server logs, and similar technologies).
|
|
11
|
+
`+r+`
|
|
12
|
+
We only collect personal data that is adequate, relevant, and limited to what is necessary for the purposes described in this policy, in accordance with the NDPA 2023.`,t,true)}function y(e,t){let n=e.org.name||s("orgName"),o=[];return (e.purposes.includes("service_delivery")||e.purposes.length===0)&&(o.push("- Consent: where you have given clear, informed, and voluntary consent for specific processing activities (NDPA Section 25)."),o.push("- Contract: where processing is necessary for the performance of a contract to which you are a party, or to take pre-contractual steps at your request (NDPA Section 25).")),e.purposes.includes("legal_compliance")&&o.push("- Legal Obligation: where processing is required for compliance with a legal obligation to which we are subject under Nigerian law."),e.purposes.includes("fraud_prevention")&&o.push("- Legitimate Interest: where processing is necessary for our legitimate interests (such as fraud prevention and network security), provided those interests are not overridden by your rights and freedoms (NDPA Section 25)."),e.purposes.includes("research")&&o.push("- Public Interest / Research: where processing is necessary for scientific or historical research purposes, or statistical purposes, subject to appropriate safeguards."),o.length===0&&(o.push("- Consent: where you have given clear, informed, and voluntary consent for specific processing activities (NDPA Section 25)."),o.push("- Contract: where processing is necessary for the performance of a contract to which you are a party (NDPA Section 25).")),i("legal-basis","Legal Basis for Processing",`${n} processes personal data under one or more of the following lawful bases as prescribed by the Nigeria Data Protection Act (NDPA) 2023:
|
|
13
|
+
|
|
14
|
+
`+o.join(`
|
|
15
|
+
`)+`
|
|
16
|
+
|
|
17
|
+
We will always inform you of the specific legal basis applicable to each processing activity at the time of data collection.`,t,true)}function b(e,t){let o=(e.purposes.length>0?e.purposes:["service_delivery"]).map(a=>`- ${g(a)}`).join(`
|
|
18
|
+
`);return i("data-usage","How We Use Your Data",`We process the personal data we collect for the following purposes:
|
|
19
|
+
|
|
20
|
+
`+o+`
|
|
21
|
+
|
|
22
|
+
We will not process your personal data for purposes incompatible with those stated above without providing you with prior notice and, where required by the NDPA, obtaining your consent.`,t,true)}function w(e,t){let n=e.org.name||s("orgName"),o=e.thirdPartyProcessors,a;return o.length>0?a=`We share personal data with the following third-party processors under data processing agreements that comply with the NDPA 2023:
|
|
23
|
+
|
|
24
|
+
| Processor | Purpose | Country |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
`+o.map(c=>`| ${c.name} | ${c.purpose} | ${c.country} |`).join(`
|
|
27
|
+
`)+`
|
|
28
|
+
|
|
29
|
+
All processors are contractually required to implement appropriate technical and organisational measures to protect personal data.`:a="We do not currently share your personal data with third-party processors. Should this change, we will update this policy and, where required, obtain your consent before any sharing takes place.",i("data-sharing","Data Sharing & Disclosure",`${n} does not sell personal data under any circumstances.
|
|
30
|
+
|
|
31
|
+
`+a+`
|
|
32
|
+
|
|
33
|
+
We may also disclose personal data where required by law, regulation, or valid legal process, including requests from Nigerian regulatory and law enforcement authorities.`,t,true)}function v(e,t){let n=e.org.privacyEmail||s("privacyEmail");return i("data-subject-rights","Your Rights as a Data Subject",`Under the Nigeria Data Protection Act (NDPA) 2023, you are entitled to the following rights regarding your personal data:
|
|
34
|
+
|
|
35
|
+
1. Right of Access \u2014 You may request confirmation of whether we process your personal data and obtain a copy of that data (NDPA Section 34).
|
|
36
|
+
2. Right to Rectification \u2014 You may request correction of inaccurate or incomplete personal data we hold about you (NDPA Section 35).
|
|
37
|
+
3. Right to Erasure \u2014 You may request deletion of your personal data where there is no compelling legal reason for its continued processing (NDPA Section 36).
|
|
38
|
+
4. Right to Data Portability \u2014 You may request to receive your personal data in a structured, commonly used, and machine-readable format (NDPA Section 38).
|
|
39
|
+
5. Right to Restrict Processing \u2014 You may request that we limit the processing of your personal data in certain circumstances (NDPA Section 37).
|
|
40
|
+
6. Right to Object \u2014 You may object to the processing of your personal data where processing is based on legitimate interest or is carried out for direct marketing purposes (NDPA Section 37).
|
|
41
|
+
|
|
42
|
+
You also have the right to withdraw your consent at any time, without affecting the lawfulness of processing carried out prior to withdrawal.
|
|
43
|
+
|
|
44
|
+
To exercise any of these rights, please contact us at ${n}. We will respond to your request within 30 days, as required by the NDPA. If you are unsatisfied with our response, you have the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC).`,t,true)}function P(e,t){let n=e.org.privacyEmail||s("privacyEmail"),o=e.org.industry,a="";return o==="fintech"?a=`
|
|
45
|
+
- Compliance with Payment Card Industry Data Security Standard (PCI-DSS) for cardholder data protection.
|
|
46
|
+
- End-to-end encryption of financial transactions.
|
|
47
|
+
- Multi-factor authentication for account access.`:o==="healthcare"?a=`
|
|
48
|
+
- HIPAA-aligned safeguards for health information, including access controls and audit logging.
|
|
49
|
+
- Segregation of medical data from other personal data.
|
|
50
|
+
- Role-based access controls restricting health data to authorised personnel.`:o==="ecommerce"?a=`
|
|
51
|
+
- PCI-DSS compliant payment processing.
|
|
52
|
+
- Secure checkout and tokenisation of payment credentials.`:o==="government"&&(a=`
|
|
53
|
+
- Compliance with Nigeria's Cybercrimes Act 2015 requirements.
|
|
54
|
+
- Government-grade access controls and audit trails.`),i("data-security","Data Security Measures",`We implement appropriate technical and organisational measures to protect personal data against unauthorised access, alteration, disclosure, or destruction. These measures include:
|
|
55
|
+
|
|
56
|
+
- Encryption of personal data in transit (TLS 1.2+) and at rest (AES-256).
|
|
57
|
+
- Access controls and least-privilege principles for all systems handling personal data.
|
|
58
|
+
- Regular security assessments, penetration testing, and vulnerability scanning.
|
|
59
|
+
- Staff training on data protection obligations and information security best practices.
|
|
60
|
+
- Incident response procedures aligned with NDPA breach notification requirements (72-hour notification to NDPC).`+a+`
|
|
61
|
+
|
|
62
|
+
While we employ industry-standard safeguards, no method of electronic transmission or storage is entirely secure. If you become aware of any security incident affecting your data, please contact us immediately at ${n}.`,t,true)}function D(e,t){let n=e.org.name||s("orgName"),o=e.org.privacyEmail||s("privacyEmail"),a=[];e.org.address&&a.push(`Address: ${e.org.address}`),e.org.website&&a.push(`Website: ${e.org.website}`);let r=[];e.org.dpoName&&r.push(`Data Protection Officer: ${e.org.dpoName}`),e.org.dpoEmail&&r.push(`DPO Email: ${e.org.dpoEmail}`);let c=r.length>0?`
|
|
63
|
+
|
|
64
|
+
${r.join(`
|
|
65
|
+
`)}`:"";return i("contact-info","Contact Information",`If you have questions, concerns, or requests regarding this privacy policy or our data protection practices, please contact us:
|
|
66
|
+
|
|
67
|
+
Organisation: ${n}
|
|
68
|
+
Email: ${o}`+(a.length>0?`
|
|
69
|
+
${a.join(`
|
|
70
|
+
`)}`:"")+c+`
|
|
71
|
+
|
|
72
|
+
You also have the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC) if you believe your data protection rights have been infringed.
|
|
73
|
+
|
|
74
|
+
Nigeria Data Protection Commission
|
|
75
|
+
Website: https://ndpc.gov.ng
|
|
76
|
+
Email: info@ndpc.gov.ng`,t,true)}function S(e){return i("children-data-protection","Children's Data Protection",`We recognise the importance of protecting the privacy of children. In accordance with Section 31 of the NDPA 2023, we implement the following safeguards when processing children's personal data:
|
|
77
|
+
|
|
78
|
+
- We do not knowingly collect personal data from children under the age of 13 without verifiable parental or guardian consent.
|
|
79
|
+
- Where we process data of children between the ages of 13 and 17, we obtain consent from a parent or guardian, taking into account the child's age and maturity.
|
|
80
|
+
- Parents and guardians may request access to, correction of, or deletion of their child's personal data at any time by contacting us.
|
|
81
|
+
- We limit the collection of children's data to what is strictly necessary for the service provided and do not use it for marketing or profiling.
|
|
82
|
+
- A Data Protection Impact Assessment (DPIA) is conducted before any new processing activity involving children's data.
|
|
83
|
+
|
|
84
|
+
If we discover that we have inadvertently collected personal data from a child without appropriate consent, we will delete that data promptly.`,e,true)}function N(e){return i("sensitive-data-processing","Sensitive / Special-Category Data",`Certain categories of personal data are considered sensitive under the NDPA 2023 and require additional safeguards. Sensitive data includes information relating to health, biometric identifiers, ethnic origin, religious or political beliefs, and genetic data.
|
|
85
|
+
|
|
86
|
+
We process sensitive personal data only where:
|
|
87
|
+
|
|
88
|
+
- You have given explicit consent for the specific processing purpose.
|
|
89
|
+
- Processing is necessary to protect your vital interests or those of another person.
|
|
90
|
+
- Processing is required for the establishment, exercise, or defence of legal claims.
|
|
91
|
+
- Processing is necessary for reasons of substantial public interest under Nigerian law.
|
|
92
|
+
|
|
93
|
+
Enhanced security measures are applied to all sensitive data, including additional encryption, strict access controls, and enhanced audit logging. Sensitive data is stored separately from other personal data where technically feasible.`,e,true)}function C(e,t){let n=e.thirdPartyProcessors.filter(a=>a.country.toLowerCase()!=="nigeria"),o="";return n.length>0&&(o=`
|
|
94
|
+
|
|
95
|
+
We currently transfer personal data to the following jurisdictions: ${Array.from(new Set(n.map(r=>r.country))).join(", ")}. Each transfer is subject to the safeguards described above.`),i("cross-border-transfers","Cross-Border Data Transfers",`Where we transfer personal data outside Nigeria, we do so in strict compliance with Sections 43 and 44 of the NDPA 2023. We ensure that any cross-border transfer of personal data is subject to one or more of the following safeguards:
|
|
96
|
+
|
|
97
|
+
- The receiving country has been assessed by the NDPC as providing an adequate level of data protection.
|
|
98
|
+
- We have put in place appropriate contractual safeguards, such as Standard Contractual Clauses approved by the NDPC.
|
|
99
|
+
- You have provided explicit consent to the transfer after being informed of the associated risks.
|
|
100
|
+
- The transfer is necessary for the performance of a contract between you and us, or for pre-contractual steps taken at your request.
|
|
101
|
+
- The NDPC has granted an administrative authorisation for the transfer.`+o,t,true)}function A(e){return i("automated-decision-making","Automated Decision-Making & Profiling",`In accordance with Section 39 of the NDPA 2023, we inform you of any automated decision-making processes, including profiling, that produce legal effects or similarly significant effects on you.
|
|
102
|
+
|
|
103
|
+
Where we use automated decision-making:
|
|
104
|
+
|
|
105
|
+
- We will inform you that automated processing is being used and provide meaningful information about the logic involved.
|
|
106
|
+
- You have the right to request human intervention in any automated decision.
|
|
107
|
+
- You have the right to express your point of view and contest the decision.
|
|
108
|
+
- We will carry out regular reviews of automated decision-making systems to ensure fairness, accuracy, and absence of bias.
|
|
109
|
+
- We will not base automated decisions solely on sensitive personal data unless you have given explicit consent or the processing is authorised by Nigerian law.
|
|
110
|
+
|
|
111
|
+
You may object to automated decision-making at any time by contacting us using the details provided in this policy.`,e,true)}function q(e,t){let n=e.org.name||s("orgName"),o=e.org.industry,a="";return o==="fintech"?a=`
|
|
112
|
+
|
|
113
|
+
Financial transaction records are retained for a minimum of six (6) years in compliance with the Central Bank of Nigeria (CBN) guidelines and the Money Laundering (Prevention and Prohibition) Act.`:o==="healthcare"?a=`
|
|
114
|
+
|
|
115
|
+
Medical and health records are retained for a minimum of ten (10) years after the last date of treatment, or longer where required by applicable health regulations.`:o==="ecommerce"?a=`
|
|
116
|
+
|
|
117
|
+
Order and transaction records are retained for six (6) years in accordance with Nigerian tax and commercial law requirements.`:o==="education"&&(a=`
|
|
118
|
+
|
|
119
|
+
Student academic records may be retained indefinitely for verification purposes. Other personal data is retained only for the duration of enrolment plus five (5) years.`),i("data-retention","Data Retention Schedule",`${n} retains personal data only for as long as necessary to fulfil the purposes for which it was collected, or as required by applicable Nigerian law. Our retention periods are determined based on the following criteria:
|
|
120
|
+
|
|
121
|
+
- The nature and sensitivity of the personal data.
|
|
122
|
+
- The purposes for which the data is processed.
|
|
123
|
+
- Legal, regulatory, and contractual obligations (including NDPA 2023 requirements).
|
|
124
|
+
- Legitimate business needs such as maintaining records for audits, dispute resolution, and regulatory examinations.
|
|
125
|
+
|
|
126
|
+
General retention periods:
|
|
127
|
+
- Account data: retained for the duration of your relationship with us, plus three (3) years.
|
|
128
|
+
- Communication records: retained for two (2) years from the date of correspondence.
|
|
129
|
+
- Analytics and usage data: retained in identifiable form for twelve (12) months, then aggregated or anonymised.`+a+`
|
|
130
|
+
|
|
131
|
+
When personal data is no longer required, it is securely deleted or irreversibly anonymised in accordance with our internal data retention and disposal policy.`,t,true)}function T(e){let t=1,n=[];return n.push(f(e,t++)),n.push(m(e,t++)),n.push(y(e,t++)),n.push(b(e,t++)),n.push(w(e,t++)),n.push(v(e,t++)),n.push(P(e,t++)),n.push(D(e,t++)),e.hasChildrenData&&n.push(S(t++)),e.hasSensitiveData&&n.push(N(t++)),e.hasCrossBorderTransfer&&n.push(C(e,t++)),e.hasAutomatedDecisions&&n.push(A(t++)),n.push(q(e,t++)),n}exports.a=p;exports.b=I;exports.c=T;//# sourceMappingURL=chunk-AHSMDPG5.js.map
|
|
132
|
+
//# sourceMappingURL=chunk-AHSMDPG5.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
'use strict';var chunk4BOEFDDE_js=require('./chunk-4BOEFDDE.js'),chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),Gr=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Gr__default=/*#__PURE__*/_interopDefault(Gr);var vr=["Organization","Data Collection","Processing","Review & Export"],lr=({currentStep:d,classNames:p,unstyled:r})=>jsxRuntime.jsx("nav",{"data-ndpr-component":"policy-step-indicator","aria-label":"Policy wizard progress",className:chunkE64TU6IU_js.a("w-full flex items-center justify-between px-2 py-4",p==null?void 0:p.root,r),children:vr.map((e,n)=>{let t=n+1,i=t<d,u=t===d,l=n===vr.length-1;return jsxRuntime.jsxs(Gr__default.default.Fragment,{children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex flex-col items-center gap-1",p==null?void 0:p.stepWrapper,r),children:[jsxRuntime.jsx("div",{"aria-current":u?"step":void 0,"aria-label":`Step ${t}: ${e}${i?" (completed)":u?" (current)":""}`,className:chunkE64TU6IU_js.a(["flex items-center justify-center rounded-full border-2 font-semibold transition-all",i?"w-8 h-8 bg-[rgb(var(--ndpr-primary))] border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))]":u?"w-9 h-9 bg-[rgb(var(--ndpr-primary))] border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] shadow-md":"w-8 h-8 bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-600 text-gray-400 dark:text-gray-500"].join(" "),i?p==null?void 0:p.stepCompleted:u?p==null?void 0:p.stepCurrent:p==null?void 0:p.stepUpcoming,r),children:i?jsxRuntime.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):jsxRuntime.jsx("span",{className:"text-xs leading-none",children:t})}),jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(["text-xs font-medium hidden sm:block",i||u?"text-[rgb(var(--ndpr-primary))]":"ndpr-card__subtitle"].join(" "),p==null?void 0:p.stepLabel,r),children:e})]}),!l&&jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a(["flex-1 h-0.5 mx-2",i?"bg-[rgb(var(--ndpr-primary))]":"bg-gray-200 dark:bg-gray-700"].join(" "),p==null?void 0:p.connector,r),"aria-hidden":"true"})]},t)})});var $="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 ndpr-text-foreground focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] text-sm",Vr="block text-sm font-medium ndpr-text-muted mb-1",A=({id:d,label:p,required:r,description:e,children:n,classNames:t,unstyled:i})=>{let u=e?`${d}-desc`:void 0;return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex flex-col",t==null?void 0:t.field,i),children:[jsxRuntime.jsxs("label",{htmlFor:d,className:chunkE64TU6IU_js.a(Vr,t==null?void 0:t.label,i),children:[p,r&&jsxRuntime.jsx("span",{className:"text-red-500 ml-0.5","aria-hidden":"true",children:"*"})]}),e&&jsxRuntime.jsx("p",{id:u,className:"text-xs ndpr-text-muted mb-1",children:e}),n]})},fr=({context:d,onUpdateOrg:p,classNames:r,unstyled:e})=>{var i,u,b;let n=Gr.useId(),t=d.org;return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-step-about",className:chunkE64TU6IU_js.a("ndpr-form-section",r==null?void 0:r.root,e),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",r==null?void 0:r.heading,e),children:"Organisation Details"}),jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",r==null?void 0:r.subheading,e),children:["Tell us about your organisation. Fields marked ",jsxRuntime.jsx("span",{className:"text-red-500","aria-hidden":"true",children:"*"})," are required."]})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("grid grid-cols-1 md:grid-cols-2 gap-4",r==null?void 0:r.grid,e),children:[jsxRuntime.jsx(A,{id:`${n}-org-name`,label:"Organisation Name",required:true,classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-org-name`,type:"text",value:t.name,onChange:l=>p({name:l.target.value}),placeholder:"Acme Corporation",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e),"aria-required":"true"})}),jsxRuntime.jsx(A,{id:`${n}-website`,label:"Website",required:true,classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-website`,type:"url",value:t.website,onChange:l=>p({website:l.target.value}),placeholder:"https://example.com",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e),"aria-required":"true"})}),jsxRuntime.jsx(A,{id:`${n}-privacy-email`,label:"Privacy Contact Email",required:true,classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-privacy-email`,type:"email",value:t.privacyEmail,onChange:l=>p({privacyEmail:l.target.value}),placeholder:"privacy@example.com",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e),"aria-required":"true"})}),jsxRuntime.jsx(A,{id:`${n}-industry`,label:"Industry",classNames:r,unstyled:e,children:jsxRuntime.jsxs("select",{id:`${n}-industry`,value:t.industry,onChange:l=>p({industry:l.target.value}),className:chunkE64TU6IU_js.a($,r==null?void 0:r.select,e),children:[jsxRuntime.jsx("option",{value:"fintech",children:"Fintech"}),jsxRuntime.jsx("option",{value:"healthcare",children:"Healthcare"}),jsxRuntime.jsx("option",{value:"ecommerce",children:"E-commerce"}),jsxRuntime.jsx("option",{value:"saas",children:"SaaS"}),jsxRuntime.jsx("option",{value:"education",children:"Education"}),jsxRuntime.jsx("option",{value:"government",children:"Government"}),jsxRuntime.jsx("option",{value:"other",children:"Other"})]})}),jsxRuntime.jsx(A,{id:`${n}-dpo-name`,label:"Data Protection Officer (DPO) Name",classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-dpo-name`,type:"text",value:(i=t.dpoName)!=null?i:"",onChange:l=>p({dpoName:l.target.value}),placeholder:"Jane Smith",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e)})}),jsxRuntime.jsx(A,{id:`${n}-dpo-email`,label:"DPO Email",classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-dpo-email`,type:"email",value:(u=t.dpoEmail)!=null?u:"",onChange:l=>p({dpoEmail:l.target.value}),placeholder:"dpo@example.com",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e)})}),jsxRuntime.jsx(A,{id:`${n}-address`,label:"Registered Address",classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-address`,type:"text",value:(b=t.address)!=null?b:"",onChange:l=>p({address:l.target.value}),placeholder:"1 Victoria Island, Lagos, Nigeria",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e)})}),jsxRuntime.jsx(A,{id:`${n}-org-size`,label:"Organisation Size",classNames:r,unstyled:e,children:jsxRuntime.jsxs("select",{id:`${n}-org-size`,value:t.orgSize,onChange:l=>p({orgSize:l.target.value}),className:chunkE64TU6IU_js.a($,r==null?void 0:r.select,e),children:[jsxRuntime.jsx("option",{value:"startup",children:"Startup (1\u201350 employees)"}),jsxRuntime.jsx("option",{value:"midsize",children:"Mid-size (51\u2013500 employees)"}),jsxRuntime.jsx("option",{value:"enterprise",children:"Enterprise (500+ employees)"})]})}),jsxRuntime.jsx(A,{id:`${n}-country`,label:"Country of Operation",classNames:r,unstyled:e,children:jsxRuntime.jsx("input",{id:`${n}-country`,type:"text",value:t.country,onChange:l=>p({country:l.target.value}),placeholder:"Nigeria",className:chunkE64TU6IU_js.a($,r==null?void 0:r.input,e)})})]})]})};var Xr={identity:"Identity",financial:"Financial",behavioral:"Behavioural",sensitive:"Sensitive",children:"Children"},Yr=["identity","financial","behavioral","sensitive","children"],Jr=["sensitive","children"],xr=({categories:d,onToggle:p,classNames:r,unstyled:e})=>{let n=Yr.reduce((t,i)=>{let u=d.filter(b=>b.group===i);return u.length>0&&(t[i]=u),t},{});return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-step-data",className:chunkE64TU6IU_js.a("space-y-8",r==null?void 0:r.root,e),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",r==null?void 0:r.heading,e),children:"Data Categories"}),jsxRuntime.jsx("p",{id:"data-categories-desc",className:chunkE64TU6IU_js.a("ndpr-form-field__hint",r==null?void 0:r.subheading,e),children:"Select the categories of personal data your organisation collects. You must select at least one."})]}),Object.entries(n).map(([t,i])=>{let u=Jr.includes(t);return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("space-y-3",r==null?void 0:r.group,e),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center gap-2",r==null?void 0:r.groupHeader,e),children:[jsxRuntime.jsx("h3",{className:chunkE64TU6IU_js.a("text-sm font-semibold uppercase tracking-wide ndpr-text-muted",r==null?void 0:r.groupTitle,e),children:Xr[t]}),u&&jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("text-xs font-medium ndpr-text-warning bg-amber-50 dark:bg-amber-900/20 px-2 py-0.5 rounded-full",r==null?void 0:r.sensitiveTag,e),children:"Sensitive"})]}),u&&jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("text-xs ndpr-text-warning",r==null?void 0:r.sensitiveWarning,e),children:t==="children"?"Processing children's data requires parental consent under NDPA Section 31 and imposes heightened obligations.":"Sensitive/special-category data requires explicit consent and additional safeguards under NDPA Section 30."}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",r==null?void 0:r.cardsGrid,e),children:i.map(b=>jsxRuntime.jsx("button",{type:"button",onClick:()=>p(b.id),"aria-pressed":b.selected,className:chunkE64TU6IU_js.a(["text-left rounded-lg border p-4 transition-all cursor-pointer focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",b.selected?"bg-[rgb(var(--ndpr-primary))]/5 border-[rgb(var(--ndpr-primary))] dark:bg-[rgb(var(--ndpr-primary))]/10":"bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"].join(" "),r==null?void 0:r.card,e),children:jsxRuntime.jsxs("div",{className:"flex items-start gap-3",children:[jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a(["mt-0.5 w-4 h-4 rounded border-2 flex-shrink-0 flex items-center justify-center",b.selected?"bg-[rgb(var(--ndpr-primary))] border-[rgb(var(--ndpr-primary))]":"border-gray-300 dark:border-gray-600"].join(" "),r==null?void 0:r.checkbox,e),"aria-hidden":"true",children:b.selected&&jsxRuntime.jsx("svg",{className:"w-2.5 h-2.5 text-[rgb(var(--ndpr-primary-foreground))]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("text-sm font-medium ndpr-text-foreground",r==null?void 0:r.cardLabel,e),children:b.label}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted mt-1 leading-relaxed",r==null?void 0:r.cardDataPoints,e),children:b.dataPoints.join(", ")})]})]})},b.id))})]},t)})]})};var Qr=[{value:"service_delivery",label:"Service Delivery",description:"Processing required to deliver the core product or service."},{value:"marketing",label:"Marketing & Communications",description:"Sending promotional messages, newsletters or offers."},{value:"analytics",label:"Analytics & Insights",description:"Analysing usage patterns to improve the product."},{value:"research",label:"Research & Development",description:"Using data to develop new features or products."},{value:"legal_compliance",label:"Legal Compliance",description:"Meeting statutory, regulatory or contractual obligations."},{value:"fraud_prevention",label:"Fraud Prevention & Security",description:"Detecting and preventing fraudulent activity."}],dr="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 ndpr-text-foreground focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] text-sm",pr="ndpr-card ndpr-card--compact",gr=({id:d,checked:p,onChange:r})=>jsxRuntime.jsx("button",{id:d,type:"button",role:"switch","aria-checked":p,onClick:()=>r(!p),className:["relative inline-flex h-6 w-11 flex-shrink-0 rounded-full border-2 border-transparent cursor-pointer transition-colors focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",p?"bg-[rgb(var(--ndpr-primary))]":"bg-gray-200 dark:bg-gray-600"].join(" "),children:jsxRuntime.jsx("span",{"aria-hidden":"true",className:["pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition-transform",p?"translate-x-5":"translate-x-0"].join(" ")})}),hr=({context:d,onTogglePurpose:p,onUpdateContext:r,onAddProcessor:e,onRemoveProcessor:n,classNames:t,unstyled:i})=>{let u=Gr.useId(),[b,l]=Gr.useState({name:"",purpose:"",country:""}),[C,g]=Gr.useState(false),a=()=>{let{name:v,purpose:c,country:S}=b;!v.trim()||!c.trim()||!S.trim()||(e({name:v.trim(),purpose:c.trim(),country:S.trim()}),l({name:"",purpose:"",country:""}),g(false));};return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-step-processing",className:chunkE64TU6IU_js.a("ndpr-form-section",t==null?void 0:t.root,i),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",t==null?void 0:t.heading,i),children:"Processing Details"}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",t==null?void 0:t.subheading,i),children:"Define how and why you process personal data."})]}),jsxRuntime.jsxs("section",{className:chunkE64TU6IU_js.a(pr,t==null?void 0:t.section,i),"aria-labelledby":"purposes-heading",children:[jsxRuntime.jsx("h3",{id:"purposes-heading",className:chunkE64TU6IU_js.a("text-base font-semibold ndpr-text-foreground",t==null?void 0:t.sectionTitle,i),children:"Processing Purposes"}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",t==null?void 0:t.sectionDescription,i),children:"Select all purposes for which you process personal data. At least one is required."}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("space-y-3",t==null?void 0:t.purposeList,i),children:Qr.map(v=>{let c=d.purposes.includes(v.value),S=`${u}-purpose-${v.value}`,B=`${u}-purpose-desc-${v.value}`;return jsxRuntime.jsxs("label",{htmlFor:S,className:chunkE64TU6IU_js.a("flex items-start gap-3 cursor-pointer group",t==null?void 0:t.purposeItem,i),children:[jsxRuntime.jsx("input",{id:S,type:"checkbox",checked:c,onChange:()=>p(v.value),"aria-describedby":B,className:chunkE64TU6IU_js.a("mt-0.5 h-4 w-4 rounded border-gray-300 dark:border-gray-600 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))] cursor-pointer",t==null?void 0:t.purposeCheckbox,i)}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("text-sm font-medium ndpr-text-foreground",t==null?void 0:t.purposeLabel,i),children:v.label}),jsxRuntime.jsx("p",{id:B,className:chunkE64TU6IU_js.a("ndpr-form-field__hint",t==null?void 0:t.purposeDescription,i),children:v.description})]})]},v.value)})})]}),jsxRuntime.jsxs("section",{className:chunkE64TU6IU_js.a(pr,t==null?void 0:t.section,i),"aria-labelledby":"thirdparty-heading",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsx("h3",{id:"thirdparty-heading",className:chunkE64TU6IU_js.a("text-base font-semibold ndpr-text-foreground",t==null?void 0:t.sectionTitle,i),children:"Third-Party Data Sharing"}),jsxRuntime.jsx(gr,{id:`${u}-thirdparty-toggle`,checked:d.thirdPartyProcessors.length>0||C,onChange:v=>{v?g(true):(d.thirdPartyProcessors.forEach((c,S)=>n(0)),g(false));}})]}),(d.thirdPartyProcessors.length>0||C)&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("ndpr-form-section",t==null?void 0:t.processorSection,i),children:[d.thirdPartyProcessors.length>0&&jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("overflow-x-auto",t==null?void 0:t.processorTable,i),children:jsxRuntime.jsxs("table",{className:"w-full text-sm",children:[jsxRuntime.jsx("thead",{children:jsxRuntime.jsxs("tr",{className:chunkE64TU6IU_js.a("text-left text-xs font-medium ndpr-text-muted border-b border-gray-200 dark:border-gray-700",t==null?void 0:t.tableHeader,i),children:[jsxRuntime.jsx("th",{className:"pb-2 pr-4",children:"Name"}),jsxRuntime.jsx("th",{className:"pb-2 pr-4",children:"Purpose"}),jsxRuntime.jsx("th",{className:"pb-2 pr-4",children:"Country"}),jsxRuntime.jsx("th",{className:"pb-2"})]})}),jsxRuntime.jsx("tbody",{className:"divide-y divide-gray-100 dark:divide-gray-700",children:d.thirdPartyProcessors.map((v,c)=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("td",{className:chunkE64TU6IU_js.a("py-2 pr-4 ndpr-text-foreground",t==null?void 0:t.tableCell,i),children:v.name}),jsxRuntime.jsx("td",{className:chunkE64TU6IU_js.a("py-2 pr-4 ndpr-text-muted",t==null?void 0:t.tableCell,i),children:v.purpose}),jsxRuntime.jsx("td",{className:chunkE64TU6IU_js.a("py-2 pr-4 ndpr-text-muted",t==null?void 0:t.tableCell,i),children:v.country}),jsxRuntime.jsx("td",{className:"py-2",children:jsxRuntime.jsx("button",{type:"button",onClick:()=>n(c),className:chunkE64TU6IU_js.a("text-red-500 hover:ndpr-text-destructive dark:hover:text-red-300 text-xs font-medium",t==null?void 0:t.removeButton,i),"aria-label":`Remove ${v.name}`,children:"Remove"})})]},c))})]})}),C?jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("grid grid-cols-1 sm:grid-cols-3 gap-3 items-end",t==null?void 0:t.processorForm,i),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:`${u}-proc-name`,className:"block text-xs font-medium ndpr-text-muted mb-1",children:"Processor Name"}),jsxRuntime.jsx("input",{id:`${u}-proc-name`,type:"text",placeholder:"Processor name",value:b.name,onChange:v=>l(c=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},c),{name:v.target.value})),"aria-required":"true",className:chunkE64TU6IU_js.a(dr,t==null?void 0:t.input,i)})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:`${u}-proc-purpose`,className:"block text-xs font-medium ndpr-text-muted mb-1",children:"Purpose"}),jsxRuntime.jsx("input",{id:`${u}-proc-purpose`,type:"text",placeholder:"Purpose",value:b.purpose,onChange:v=>l(c=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},c),{purpose:v.target.value})),"aria-required":"true",className:chunkE64TU6IU_js.a(dr,t==null?void 0:t.input,i)})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:`${u}-proc-country`,className:"block text-xs font-medium ndpr-text-muted mb-1",children:"Country"}),jsxRuntime.jsx("input",{id:`${u}-proc-country`,type:"text",placeholder:"Country",value:b.country,onChange:v=>l(c=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},c),{country:v.target.value})),"aria-required":"true",className:chunkE64TU6IU_js.a(dr,t==null?void 0:t.input,i)})]}),jsxRuntime.jsxs("div",{className:"sm:col-span-3 flex gap-2",children:[jsxRuntime.jsx("button",{type:"button",onClick:a,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--primary ndpr-button--sm",t==null?void 0:t.addButton,i),children:"Add Processor"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>g(false),className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--secondary ndpr-button--sm",t==null?void 0:t.cancelButton,i),children:"Cancel"})]})]}):jsxRuntime.jsxs("button",{type:"button",onClick:()=>g(true),className:chunkE64TU6IU_js.a("flex items-center gap-1 text-sm text-[rgb(var(--ndpr-primary))] hover:underline font-medium",t==null?void 0:t.addLink,i),children:[jsxRuntime.jsx("span",{"aria-hidden":"true",children:"+"})," Add processor"]})]})]}),jsxRuntime.jsxs("section",{className:chunkE64TU6IU_js.a(pr,t==null?void 0:t.section,i),"aria-labelledby":"disclosures-heading",children:[jsxRuntime.jsx("h3",{id:"disclosures-heading",className:chunkE64TU6IU_js.a("text-base font-semibold ndpr-text-foreground",t==null?void 0:t.sectionTitle,i),children:"Additional Disclosures"}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("ndpr-form-section",t==null?void 0:t.disclosureList,i),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-start justify-between gap-4",t==null?void 0:t.disclosureItem,i),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{id:`${u}-cross-border-label`,className:chunkE64TU6IU_js.a("text-sm font-medium ndpr-text-foreground",t==null?void 0:t.disclosureLabel,i),children:"Cross-border Data Transfers"}),jsxRuntime.jsx("p",{id:`${u}-cross-border-desc`,className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted mt-0.5",t==null?void 0:t.disclosureDescription,i),children:"Do you transfer personal data outside Nigeria? This triggers NDPA Chapter 6 obligations."})]}),jsxRuntime.jsx(gr,{id:`${u}-cross-border-toggle`,checked:d.hasCrossBorderTransfer,onChange:v=>r({hasCrossBorderTransfer:v})})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-start justify-between gap-4",t==null?void 0:t.disclosureItem,i),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{id:`${u}-automated-label`,className:chunkE64TU6IU_js.a("text-sm font-medium ndpr-text-foreground",t==null?void 0:t.disclosureLabel,i),children:"Automated Decision-Making / Profiling"}),jsxRuntime.jsx("p",{id:`${u}-automated-desc`,className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted mt-0.5",t==null?void 0:t.disclosureDescription,i),children:"Do you use algorithms or automated systems to make decisions about individuals? Requires disclosure under NDPA Section 37."})]}),jsxRuntime.jsx(gr,{id:`${u}-automated-toggle`,checked:d.hasAutomatedDecisions,onChange:v=>r({hasAutomatedDecisions:v})})]})]})]})]})};var Cr=({section:d,index:p,isCustom:r,isEditing:e,editedContent:n,onEdit:t,onSaveEdit:i,onCancelEdit:u,onMoveUp:b,onMoveDown:l,onDelete:C,classNames:g,unstyled:a})=>{let[v,c]=Gr.useState(n!=null?n:d.template);return Gr.useEffect(()=>{n!==void 0&&c(n);},[n]),Gr.useEffect(()=>{e&&c(n!=null?n:d.template);},[e,n,d.template]),jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-section-card",className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 space-y-3",g==null?void 0:g.root,a),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-start justify-between gap-2",g==null?void 0:g.header,a),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center gap-3 min-w-0",g==null?void 0:g.titleRow,a),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("flex-shrink-0 w-7 h-7 rounded-full bg-gray-100 dark:bg-gray-700 ndpr-text-muted text-xs font-semibold flex items-center justify-center",g==null?void 0:g.sectionNumber,a),"aria-hidden":"true",children:p+1}),jsxRuntime.jsxs("h4",{className:chunkE64TU6IU_js.a("text-sm font-semibold ndpr-text-foreground truncate",g==null?void 0:g.sectionTitle,a),children:[d.title,r&&jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("ml-2 text-xs font-normal ndpr-text-muted bg-gray-100 dark:bg-gray-700 px-1.5 py-0.5 rounded",g==null?void 0:g.customBadge,a),children:"Custom"})]})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center gap-1 flex-shrink-0",g==null?void 0:g.actions,a),children:[b&&jsxRuntime.jsx("button",{type:"button",onClick:b,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--icon",g==null?void 0:g.moveButton,a),"aria-label":`Move "${d.title}" up`,children:jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})}),l&&jsxRuntime.jsx("button",{type:"button",onClick:l,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--icon",g==null?void 0:g.moveButton,a),"aria-label":`Move "${d.title}" down`,children:jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}),!e&&jsxRuntime.jsx("button",{type:"button",onClick:t,className:chunkE64TU6IU_js.a("p-1.5 text-gray-400 hover:text-[rgb(var(--ndpr-primary))] rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",g==null?void 0:g.editButton,a),"aria-label":`Edit "${d.title}"`,children:jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),r&&C&&jsxRuntime.jsx("button",{type:"button",onClick:C,className:chunkE64TU6IU_js.a("p-1.5 text-gray-400 hover:text-red-500 dark:hover:text-red-400 rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",g==null?void 0:g.deleteButton,a),"aria-label":`Delete "${d.title}"`,children:jsxRuntime.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]}),e?jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("space-y-2",g==null?void 0:g.editArea,a),children:[jsxRuntime.jsx("textarea",{value:v,onChange:S=>c(S.target.value),rows:8,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 ndpr-text-foreground focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] text-sm font-mono resize-y",g==null?void 0:g.textarea,a),"aria-label":`Edit content for ${d.title}`}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex gap-2",g==null?void 0:g.editActions,a),children:[jsxRuntime.jsx("button",{type:"button",onClick:()=>i(v),className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--primary ndpr-button--sm",g==null?void 0:g.saveButton,a),children:"Save"}),jsxRuntime.jsx("button",{type:"button",onClick:u,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--secondary ndpr-button--sm",g==null?void 0:g.cancelButton,a),children:"Cancel"})]})]}):jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("text-sm ndpr-text-muted leading-relaxed line-clamp-4 whitespace-pre-wrap",g==null?void 0:g.content,a),children:d.template})]})};var kr="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 ndpr-text-foreground focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] text-sm",wr=({onAdd:d,nextOrder:p,classNames:r,unstyled:e})=>{let n=Gr.useId(),[t,i]=Gr.useState(""),[u,b]=Gr.useState(""),[l,C]=Gr.useState(""),g=()=>{if(!t.trim()){C("Section title is required.");return}if(!u.trim()){C("Section content is required.");return}C(""),d({title:t.trim(),content:u.trim(),order:p}),i(""),b("");};return jsxRuntime.jsxs("div",{"data-ndpr-component":"custom-section-form",className:chunkE64TU6IU_js.a("ndpr-card ndpr-card--compact",r==null?void 0:r.root,e),children:[jsxRuntime.jsx("h4",{className:chunkE64TU6IU_js.a("ndpr-section-heading",r==null?void 0:r.heading,e),children:"Add Custom Section"}),l&&jsxRuntime.jsx("p",{role:"alert",className:chunkE64TU6IU_js.a("text-xs ndpr-text-destructive",r==null?void 0:r.error,e),children:l}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("space-y-3",r==null?void 0:r.fields,e),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:`${n}-custom-section-title`,className:chunkE64TU6IU_js.a("block text-xs font-medium ndpr-text-muted mb-1",r==null?void 0:r.label,e),children:["Section Title ",jsxRuntime.jsx("span",{className:"text-red-500","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsx("input",{id:`${n}-custom-section-title`,type:"text",value:t,onChange:a=>{i(a.target.value),l&&C("");},placeholder:"e.g. Cookie Policy",className:chunkE64TU6IU_js.a(kr,r==null?void 0:r.input,e),"aria-required":"true"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:`${n}-custom-section-content`,className:chunkE64TU6IU_js.a("block text-xs font-medium ndpr-text-muted mb-1",r==null?void 0:r.label,e),children:["Content ",jsxRuntime.jsx("span",{className:"text-red-500","aria-hidden":"true",children:"*"})]}),jsxRuntime.jsx("textarea",{id:`${n}-custom-section-content`,value:u,onChange:a=>{b(a.target.value),l&&C("");},placeholder:"Write the section content here...",rows:5,className:chunkE64TU6IU_js.a(`${kr} resize-y`,r==null?void 0:r.textarea,e),"aria-required":"true"})]})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("flex items-center gap-2",r==null?void 0:r.footer,e),children:jsxRuntime.jsx("button",{type:"button",onClick:g,className:chunkE64TU6IU_js.a("ndpr-button ndpr-button--primary ndpr-button--sm",r==null?void 0:r.addButton,e),children:"Add Section"})})]})};var Sr={compliant:{bg:"ndpr-alert ndpr-alert--success",text:"ndpr-text-success",border:"border-green-200 dark:border-green-700"},nearly_compliant:{bg:"bg-amber-50 dark:bg-amber-900/20",text:"ndpr-text-warning",border:"border-amber-200 dark:border-amber-700"},not_compliant:{bg:"ndpr-alert ndpr-alert--destructive",text:"ndpr-text-destructive",border:"border-red-200 dark:border-red-700"}},sr={compliant:"Compliant",nearly_compliant:"Nearly Compliant",not_compliant:"Not Compliant"},N=({icon:d,label:p,description:r,actionLabel:e,loading:n,onClick:t,classNames:i,unstyled:u})=>jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 flex flex-col gap-3",i==null?void 0:i.formatCard,u),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center gap-3",i==null?void 0:i.formatHeader,u),children:[jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("w-10 h-10 rounded-lg bg-gray-100 dark:bg-gray-700 flex items-center justify-center flex-shrink-0",i==null?void 0:i.formatIcon,u),"aria-hidden":"true",children:d}),jsxRuntime.jsxs("div",{className:"min-w-0",children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-section-heading",i==null?void 0:i.formatLabel,u),children:p}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",i==null?void 0:i.formatDescription,u),children:r})]})]}),jsxRuntime.jsx("button",{type:"button",onClick:t,disabled:n,className:chunkE64TU6IU_js.a("w-full px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm font-medium disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-2",i==null?void 0:i.formatButton,u),children:n?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("svg",{className:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4l3-3-3-3v4a10 10 0 100 10l-1.73-3A8 8 0 014 12z"})]}),"Generating\u2026"]}):e})]}),mr=({complianceResult:d,onExportPDF:p,onExportDOCX:r,onExportHTML:e,onExportMarkdown:n,classNames:t,unstyled:i})=>{var c;let[u,b]=Gr.useState(false),[l,C]=Gr.useState(false),g=(c=Sr[d.rating])!=null?c:Sr.not_compliant,a=()=>chunkMQFZHA2D_js.d(null,null,function*(){b(true);try{yield p();}finally{b(false);}}),v=()=>chunkMQFZHA2D_js.d(null,null,function*(){C(true);try{yield r();}finally{C(false);}});return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-export-panel",className:chunkE64TU6IU_js.a("ndpr-form-section",t==null?void 0:t.root,i),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`rounded-lg border p-4 flex items-center gap-4 ${g.bg} ${g.border}`,t==null?void 0:t.complianceSummary,i),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`text-3xl font-bold ${g.text}`,t==null?void 0:t.complianceScore,i),"aria-label":`Compliance score: ${d.percentage}%`,children:[d.percentage,"%"]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-sm font-semibold ${g.text}`,t==null?void 0:t.complianceRating,i),children:sr[d.rating]}),jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted mt-0.5",t==null?void 0:t.complianceDetail,i),children:[d.score," / ",d.maxScore," points \u2022"," ",d.gaps.length," gap",d.gaps.length!==1?"s":""," remaining"]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:chunkE64TU6IU_js.a("ndpr-section-heading",t==null?void 0:t.formatsHeading,i),children:"Export Format"}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("grid grid-cols-1 sm:grid-cols-2 gap-3",t==null?void 0:t.formatsGrid,i),children:[jsxRuntime.jsx(N,{icon:jsxRuntime.jsx("svg",{className:"w-5 h-5 text-red-500",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm-1 7V3.5L18.5 9H13zm-3 7v-1h4v1h-4zm0-3v-1h4v1h-4zm-2-5h8v1H8v-1z"})}),label:"PDF",description:"Professional formatted document, ideal for publishing.",actionLabel:"Download PDF",loading:u,onClick:a,classNames:t,unstyled:i}),jsxRuntime.jsx(N,{icon:jsxRuntime.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm-1 7V3.5L18.5 9H13zm-5 8v-5h1.5l1 3 1-3H13v5h-1v-3.5l-.75 2.25h-.5L10 13.5V17H9zm5-1.5h.75c.55 0 .75-.25.75-.75 0-.4-.2-.65-.75-.65H14V15.5zm1 1.5h-2v-4h2c1.1 0 1.75.6 1.75 1.5 0 .55-.25.95-.65 1.15.5.2.8.65.8 1.2 0 1-.65 1.65-1.9 1.65V17zm-.25-1c.6 0 .9-.25.9-.75 0-.45-.3-.75-.9-.75H14V16h.75z"})}),label:"DOCX",description:"Editable Word document for further customisation.",actionLabel:"Download DOCX",loading:l,onClick:v,classNames:t,unstyled:i}),jsxRuntime.jsx(N,{icon:jsxRuntime.jsxs("svg",{className:"w-5 h-5 text-orange-500",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15H9V8h2v9zm4 0h-2V8h2v9z"}),jsxRuntime.jsx("path",{d:"M9.5 6.5h1v1h-1zm4 0h1v1h-1z"}),jsxRuntime.jsx("path",{d:"M5 5h14v2H5zm0 12h14v2H5z"})]}),label:"HTML",description:"Copy-ready HTML to embed on your website.",actionLabel:"Copy HTML",onClick:e,classNames:t,unstyled:i}),jsxRuntime.jsx(N,{icon:jsxRuntime.jsx("svg",{className:"w-5 h-5 ndpr-text-muted",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M3 5h18v2H3V5zm0 4h12v2H3V9zm0 4h18v2H3v-2zm0 4h12v2H3v-2z"})}),label:"Markdown",description:"Plain-text format for documentation or Git repos.",actionLabel:"Copy Markdown",onClick:n,classNames:t,unstyled:i})]})]})]})};var Lr=({sections:d,customSections:p,sectionOverrides:r,complianceResult:e,onEditSection:n,onAddCustomSection:t,onRemoveCustomSection:i,onReorderSection:u,onExportPDF:b,onExportDOCX:l,onExportHTML:C,onExportMarkdown:g,classNames:a,unstyled:v})=>{let[c,S]=Gr.useState(null),[B,J]=Gr.useState(false),Z=new Set(p.map(h=>h.id)),or=(h,D)=>{n(h,D),S(null);},er=d.length>0?Math.max(...d.map(h=>{var D;return (D=h.order)!=null?D:0}))+1:1;return jsxRuntime.jsxs("div",{"data-ndpr-component":"policy-step-review",className:chunkE64TU6IU_js.a("ndpr-form-section",a==null?void 0:a.root,v),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",a==null?void 0:a.heading,v),children:"Review & Export"}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",a==null?void 0:a.subheading,v),children:"Review your generated policy sections, reorder or edit content, then export."})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("space-y-3",a==null?void 0:a.sectionList,v),"aria-live":"polite",children:d.map((h,D)=>jsxRuntime.jsx(Cr,{section:r[h.id]?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},h),{template:r[h.id]}):h,index:D,isCustom:Z.has(h.id),isEditing:c===h.id,editedContent:r[h.id],onEdit:()=>S(h.id),onSaveEdit:ir=>or(h.id,ir),onCancelEdit:()=>S(null),onMoveUp:D>0?()=>u(h.id,"up"):void 0,onMoveDown:D<d.length-1?()=>u(h.id,"down"):void 0,onDelete:Z.has(h.id)?()=>i(h.id):void 0,classNames:a,unstyled:v},h.id))}),!B&&jsxRuntime.jsxs("button",{type:"button",onClick:()=>J(true),className:chunkE64TU6IU_js.a("flex items-center gap-2 text-sm text-[rgb(var(--ndpr-primary))] hover:underline font-medium",a==null?void 0:a.addSectionButton,v),children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("w-5 h-5 rounded-full border-2 border-[rgb(var(--ndpr-primary))] flex items-center justify-center text-xs font-bold leading-none",a==null?void 0:a.addSectionIcon,v),"aria-hidden":"true",children:"+"}),"Add Custom Section"]}),B&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("space-y-2",a==null?void 0:a.customFormWrapper,v),children:[jsxRuntime.jsx(wr,{onAdd:h=>{t(h),J(false);},nextOrder:er,classNames:a,unstyled:v}),jsxRuntime.jsx("button",{type:"button",onClick:()=>J(false),className:chunkE64TU6IU_js.a("text-sm ndpr-text-muted hover:underline",a==null?void 0:a.cancelCustomForm,v),children:"Cancel"})]}),jsxRuntime.jsx("hr",{className:chunkE64TU6IU_js.a("border-gray-200 dark:border-gray-700",a==null?void 0:a.divider,v)}),jsxRuntime.jsx(mr,{complianceResult:e,onExportPDF:b,onExportDOCX:l,onExportHTML:C,onExportMarkdown:g,classNames:a,unstyled:v})]})};var Dr={compliant:{stroke:"stroke-green-500 dark:stroke-green-400",text:"ndpr-text-success"},nearly_compliant:{stroke:"stroke-amber-500 dark:stroke-amber-400",text:"ndpr-text-warning"},not_compliant:{stroke:"stroke-red-500 dark:stroke-red-400",text:"ndpr-text-destructive"}},tt={compliant:"Compliant",nearly_compliant:"Nearly Compliant",not_compliant:"Not Compliant"},Fr=({score:d,maxScore:p,rating:r,classNames:e,unstyled:n})=>{var C,g;let t=p>0?Math.round(d/p*100):0,i=(C=Dr[r])!=null?C:Dr.not_compliant,u=36,b=2*Math.PI*u,l=b-t/100*b;return jsxRuntime.jsxs("div",{"data-ndpr-component":"compliance-score-ring",className:chunkE64TU6IU_js.a("flex flex-col items-center gap-2",e==null?void 0:e.root,n),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("relative w-24 h-24",e==null?void 0:e.svgWrapper,n),children:[jsxRuntime.jsxs("svg",{className:"w-24 h-24 -rotate-90",viewBox:"0 0 96 96","aria-hidden":"true",children:[jsxRuntime.jsx("circle",{cx:"48",cy:"48",r:u,fill:"none",className:"stroke-gray-200 dark:stroke-gray-700",strokeWidth:"8"}),jsxRuntime.jsx("circle",{cx:"48",cy:"48",r:u,fill:"none",className:i.stroke,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:l,style:{transition:"stroke-dashoffset 0.5s ease-out"}})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("absolute inset-0 flex flex-col items-center justify-center",e==null?void 0:e.centerText,n),children:jsxRuntime.jsxs("span",{className:chunkE64TU6IU_js.a(`text-xl font-bold leading-none ${i.text}`,e==null?void 0:e.scoreValue,n),"aria-label":`${t}% compliance score`,children:[t,"%"]})})]}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-xs font-semibold text-center ${i.text}`,e==null?void 0:e.ratingLabel,n),children:(g=tt[r])!=null?g:r}),jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-xs ndpr-text-muted text-center",e==null?void 0:e.scoreDetail,n),children:[d," / ",p," pts"]})]})};var et={critical:"ndpr-text-destructive",important:"ndpr-text-warning",recommended:"ndpr-text-info"},Er=({gap:d,isPassed:p,onFix:r,classNames:e,unstyled:n})=>{let[t,i]=Gr.useState(false);return jsxRuntime.jsxs("div",{"data-ndpr-component":"compliance-requirement-item",className:chunkE64TU6IU_js.a("border-b border-gray-100 dark:border-gray-700 last:border-0 py-2",e==null?void 0:e.root,n),children:[jsxRuntime.jsxs("button",{type:"button",onClick:()=>!p&&i(u=>!u),className:chunkE64TU6IU_js.a("w-full flex items-start gap-2 text-left group",e==null?void 0:e.row,n),"aria-expanded":p?void 0:t,"aria-disabled":p,children:[jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(["mt-0.5 flex-shrink-0 w-4 h-4 rounded-full flex items-center justify-center",p?"bg-green-500":d.severity==="critical"?"bg-red-500":d.severity==="important"?"bg-amber-500":"bg-blue-400"].join(" "),e==null?void 0:e.statusIcon,n),"aria-hidden":"true",children:p?jsxRuntime.jsx("svg",{className:"w-2.5 h-2.5 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}):jsxRuntime.jsx("svg",{className:"w-2.5 h-2.5 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),jsxRuntime.jsxs("div",{className:"flex-1 min-w-0",children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between gap-1",children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-xs font-medium ${p?"ndpr-text-muted":"ndpr-text-foreground"}`,e==null?void 0:e.requirementLabel,n),children:d.requirement}),!p&&jsxRuntime.jsx("svg",{className:`flex-shrink-0 w-3 h-3 text-gray-400 transition-transform ${t?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),jsxRuntime.jsxs("p",{className:chunkE64TU6IU_js.a("text-xs text-gray-400 dark:text-gray-500 mt-0.5",e==null?void 0:e.ndpaSection,n),children:["NDPA ",d.ndpaSection]})]})]}),!p&&t&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("mt-2 ml-6 space-y-2",e==null?void 0:e.detail,n),children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-xs ${et[d.severity]}`,e==null?void 0:e.message,n),children:d.message}),jsxRuntime.jsx("button",{type:"button",onClick:()=>{r(d.requirementId),i(false);},className:chunkE64TU6IU_js.a("text-xs font-medium px-3 py-1 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded hover:bg-[rgb(var(--ndpr-primary-hover))]",e==null?void 0:e.fixButton,n),children:d.fixLabel})]})]})};function nt(d,p){let r=p.map(t=>({gap:{requirementId:t,requirement:t.split("-").map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" "),ndpaSection:"\u2014",severity:"recommended",message:"",fixType:"fill_field",fixLabel:""},isPassed:true})),e=d.map(t=>({gap:t,isPassed:false})),n={critical:0,important:1,recommended:2};return e.sort((t,i)=>n[t.gap.severity]-n[i.gap.severity]),[...e,...r]}var $r=({complianceResult:d,onFix:p,classNames:r,unstyled:e})=>{let[n,t]=Gr.useState(false),i=nt(d.gaps,d.passed);return jsxRuntime.jsxs("aside",{"data-ndpr-component":"compliance-checker-sidebar",className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",r==null?void 0:r.root,e),"aria-label":"NDPA compliance checker",children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center justify-between px-4 py-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50",r==null?void 0:r.header,e),children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("ndpr-section-heading",r==null?void 0:r.title,e),children:"NDPA Compliance"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>t(u=>!u),className:chunkE64TU6IU_js.a("p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 rounded hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",r==null?void 0:r.collapseButton,e),"aria-expanded":!n,"aria-label":n?"Expand compliance checker":"Collapse compliance checker",children:jsxRuntime.jsx("svg",{className:`w-4 h-4 transition-transform ${n?"-rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})})]}),!n&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 space-y-4",r==null?void 0:r.body,e),children:[jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("flex justify-center",r==null?void 0:r.ringWrapper,e),children:jsxRuntime.jsx(Fr,{score:d.score,maxScore:d.maxScore,rating:d.rating,classNames:r,unstyled:e})}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("grid grid-cols-3 gap-2 text-center",r==null?void 0:r.statsRow,e),children:[{count:d.gaps.filter(u=>u.severity==="critical").length,label:"Critical",color:"ndpr-text-destructive"},{count:d.gaps.filter(u=>u.severity==="important").length,label:"Important",color:"ndpr-text-warning"},{count:d.passed.length,label:"Passed",color:"ndpr-text-success"}].map(({count:u,label:b,color:l})=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a(`text-base font-bold ${l}`,r==null?void 0:r.statValue,e),children:u}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",r==null?void 0:r.statLabel,e),children:b})]},b))}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("overflow-y-auto max-h-80",r==null?void 0:r.requirementsList,e),children:i.length===0?jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("ndpr-empty-state",r==null?void 0:r.emptyState,e),children:"No requirements to display."}):i.map(({gap:u,isPassed:b})=>jsxRuntime.jsx(Er,{gap:u,isPassed:b,onFix:p,classNames:r,unstyled:e},u.requirementId))})]})]})};function dt(d){let p=Date.now()-d;return p<1e4?"just now":p<6e4?`${Math.floor(p/1e3)}s ago`:p<36e5?`${Math.floor(p/6e4)}m ago`:new Date(d).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}var Ir=({lastSavedAt:d,isSaving:p,hasError:r,classNames:e,unstyled:n})=>{let t="idle";if(p?t="saving":r?t="error":d!==null&&(t="saved"),t==="idle")return null;let i=t==="saving"?"Saving\u2026":t==="error"?"Unable to save":`Draft saved ${d?dt(d):""}`;return jsxRuntime.jsxs("div",{"data-ndpr-component":"draft-save-indicator",role:"status","aria-live":"polite","aria-atomic":"true",className:chunkE64TU6IU_js.a(`flex items-center gap-1.5 ${t==="error"?"text-red-500 dark:text-red-400":t==="saving"?"ndpr-card__subtitle":"ndpr-text-success"}`,e==null?void 0:e.root,n),children:[t==="saving"&&jsxRuntime.jsxs("svg",{className:"animate-spin w-3 h-3 flex-shrink-0",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4l3-3-3-3v4a10 10 0 100 10l-1.73-3A8 8 0 014 12z"})]}),t==="saved"&&jsxRuntime.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})}),t==="error"&&jsxRuntime.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:jsxRuntime.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"})}),jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a("text-xs font-medium",e==null?void 0:e.text,n),children:i})]})};var mo=({adapter:d,onComplete:p,classNames:r,unstyled:e})=>{let{currentStep:n,nextStep:t,prevStep:i,canProceed:u,context:b,updateOrg:l,updateContext:C,toggleDataCategory:g,togglePurpose:a,addProcessor:v,removeProcessor:c,sections:S,customSections:B,sectionOverrides:J,editSectionContent:Z,addCustomSection:or,removeCustomSection:er,reorderSections:h,complianceResult:D,applyFix:ir,handleExportPDF:Tr,handleExportDOCX:_r,handleExportHTML:Mr,handleExportMarkdown:Br,lastSavedAt:zr,isLoading:jr}=chunk4BOEFDDE_js.a({adapter:d,onComplete:p}),nr=(F,K)=>{let O=URL.createObjectURL(F),H=document.createElement("a");H.href=O,H.download=K,H.click(),URL.revokeObjectURL(O);},qr=()=>chunkMQFZHA2D_js.d(null,null,function*(){let F=yield Tr();nr(F,"privacy-policy.pdf");}),Or=()=>chunkMQFZHA2D_js.d(null,null,function*(){let F=yield _r();nr(F,"privacy-policy.docx");}),Hr=()=>{let F=Mr();navigator.clipboard.writeText(F).catch(()=>{let K=new Blob([F],{type:"text/html"}),O=URL.createObjectURL(K),H=window.open(O,"_blank");H?H.addEventListener("load",()=>URL.revokeObjectURL(O)):URL.revokeObjectURL(O);});},Wr=()=>{let F=Br();navigator.clipboard.writeText(F).catch(()=>{let K=new Blob([F],{type:"text/markdown"});nr(K,"privacy-policy.md");});};return jr?jsxRuntime.jsxs("div",{"data-ndpr-component":"adaptive-policy-wizard",className:chunkE64TU6IU_js.a("flex items-center justify-center min-h-64 text-gray-400 dark:text-gray-500",r==null?void 0:r.root,e),"aria-busy":"true","aria-label":"Loading policy wizard",children:[jsxRuntime.jsxs("svg",{className:"animate-spin w-6 h-6 mr-2",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[jsxRuntime.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsxRuntime.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4l3-3-3-3v4a10 10 0 100 10l-1.73-3A8 8 0 014 12z"})]}),jsxRuntime.jsx("span",{className:"ndpr-text-sm",children:"Loading\u2026"})]}):jsxRuntime.jsx("div",{"data-ndpr-component":"adaptive-policy-wizard",className:chunkE64TU6IU_js.a("min-h-screen bg-gray-50 dark:bg-gray-900",r==null?void 0:r.root,e),children:jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",r==null?void 0:r.container,e),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center justify-between mb-6",r==null?void 0:r.topBar,e),children:[jsxRuntime.jsx("h1",{className:chunkE64TU6IU_js.a("text-2xl font-bold ndpr-text-foreground",r==null?void 0:r.wizardTitle,e),children:"Privacy Policy Builder"}),jsxRuntime.jsx(Ir,{lastSavedAt:zr,isSaving:false,hasError:false,classNames:r,unstyled:e})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg px-4 mb-6",r==null?void 0:r.stepIndicatorWrapper,e),children:jsxRuntime.jsx(lr,{currentStep:n,classNames:r,unstyled:e})}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex flex-col lg:flex-row gap-6 items-start",r==null?void 0:r.panels,e),children:[jsxRuntime.jsxs("main",{"aria-live":"polite",className:chunkE64TU6IU_js.a("flex-1 min-w-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-6",r==null?void 0:r.mainPanel,e),children:[n===1&&jsxRuntime.jsx(fr,{context:b,onUpdateOrg:l,classNames:r,unstyled:e}),n===2&&jsxRuntime.jsx(xr,{categories:b.dataCategories,onToggle:g,classNames:r,unstyled:e}),n===3&&jsxRuntime.jsx(hr,{context:b,onTogglePurpose:a,onUpdateContext:C,onAddProcessor:v,onRemoveProcessor:c,classNames:r,unstyled:e}),n===4&&jsxRuntime.jsx(Lr,{sections:S,customSections:B,sectionOverrides:J,complianceResult:D,onEditSection:Z,onAddCustomSection:or,onRemoveCustomSection:er,onReorderSection:h,onExportPDF:qr,onExportDOCX:Or,onExportHTML:Hr,onExportMarkdown:Wr,classNames:r,unstyled:e}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-center justify-between mt-8 pt-4 border-t border-gray-200 dark:border-gray-700",r==null?void 0:r.navigation,e),children:[jsxRuntime.jsx("button",{type:"button",onClick:i,disabled:n===1,className:chunkE64TU6IU_js.a("px-4 py-2 bg-gray-200 dark:bg-gray-700 ndpr-text-foreground rounded-md text-sm font-medium disabled:opacity-40 disabled:cursor-not-allowed hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors",r==null?void 0:r.backButton,e),children:"Back"}),jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:jsxRuntime.jsxs("span",{className:chunkE64TU6IU_js.a("ndpr-form-field__hint",r==null?void 0:r.stepCounter,e),children:["Step ",n," of 4"]})}),n<4?jsxRuntime.jsx("button",{type:"button",onClick:t,disabled:!u,className:chunkE64TU6IU_js.a("px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm font-medium disabled:opacity-40 disabled:cursor-not-allowed transition-colors",r==null?void 0:r.nextButton,e),children:"Next"}):jsxRuntime.jsx("span",{})]})]}),jsxRuntime.jsx("aside",{className:chunkE64TU6IU_js.a("w-full lg:w-80 flex-shrink-0",r==null?void 0:r.sidebarWrapper,e),children:jsxRuntime.jsx($r,{complianceResult:D,onFix:ir,classNames:r,unstyled:e})})]})]})})};
|
|
2
|
+
exports.a=mo;//# sourceMappingURL=chunk-ASLMPY54.js.map
|
|
3
|
+
//# sourceMappingURL=chunk-ASLMPY54.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-AYKLAEOU.mjs';import {a,b}from'./chunk-WWT2ZSNU.mjs';import {useState,useRef,useEffect,useCallback}from'react';import {createPortal}from'react-dom';import {jsx,jsxs}from'react/jsx-runtime';var xn=({options:d,onSave:X,title:Z="We Value Your Privacy",description:m="We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26.",acceptAllButtonText:N="Accept All",rejectAllButtonText:nn="Reject All",customizeButtonText:tn="Customize",saveButtonText:en="Save Preferences",position:on="bottom",variant:y="bar",zIndex:s=9999,version:h="1.0",show:C,manageStorage:R=true,storageKey:L="ndpr_consent",className:H="",buttonClassName:z="",primaryButtonClassName:rn="",secondaryButtonClassName:dn="",classNames:n,unstyled:o,onAnalytics:k})=>{let[c,u]=useState(false),[b$1,D]=useState(false),[S,E]=useState({}),[O,cn]=useState(false),l=useRef(null),P=useRef(null),w=useRef(false);useEffect(()=>{cn(true);},[]);let p=useCallback((t,e)=>{k==null||k(a({action:t,timestamp:Date.now(),version:h},e!==void 0?{categories:e}:{}));},[k,h]);useEffect(()=>{let t={};if(d.forEach(e=>{t[e.id]=e.defaultValue||false;}),E(t),C===void 0)if(!R)u(true);else {let e=localStorage.getItem(L);if(e)try{JSON.parse(e).version!==h?u(!0):u(!1);}catch(B){u(true);}else u(true);}else u(C);},[d,L,h,R]),useEffect(()=>{C!==void 0&&u(C);},[C]);let un=()=>{let t={};d.forEach(e=>{t[e.id]=true;}),p("accepted_all",t),T(t);},F=()=>{let t={};d.forEach(e=>{t[e.id]=e.required||false;}),p("rejected_all",t),T(t);},bn=(t,e)=>{E(B=>b(a({},B),{[t]:e}));},ln=()=>{let t={};d.forEach(e=>{t[e.id]=true;}),E(t);},pn=()=>{let t={};d.forEach(e=>{t[e.id]=e.required||false;}),E(t);},M=d.length>0&&d.every(t=>S[t.id]),fn=()=>{p("customized",S),T(S);},T=t=>{let e={consents:t,timestamp:Date.now(),version:h,method:b$1?"customize":"banner",hasInteracted:true};R&&localStorage.setItem(L,JSON.stringify(e)),X(e),u(false),D(false);};if(useEffect(()=>{if(!c)return;let t=e=>{e.key==="Escape"&&(p("dismissed"),F());};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[c,p,d,b$1]),useEffect(()=>{c&&!w.current&&(w.current=true,p("shown")),c||(w.current=false);},[c,p]),useEffect(()=>{if(!c||!l.current)return;let t='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',B=setTimeout(()=>{if(!l.current)return;let f=l.current.querySelectorAll(t);f.length>0?f[0].focus():l.current.focus();},0),J=f=>{if(f.key!=="Tab"||!l.current)return;let x=l.current.querySelectorAll(t);if(x.length===0)return;let W=x[0],Y=x[x.length-1];f.shiftKey?document.activeElement===W&&(f.preventDefault(),Y.focus()):document.activeElement===Y&&(f.preventDefault(),W.focus());};return document.addEventListener("keydown",J),()=>{clearTimeout(B),document.removeEventListener("keydown",J);}},[c,b$1]),useEffect(()=>{if(b$1&&P.current){let t=P.current;t.style.maxHeight="0px",t.style.opacity="0",t.offsetHeight,t.style.maxHeight=`${t.scrollHeight}px`,t.style.opacity="1";}},[b$1]),!c)return null;let a$2=y==="modal"?"center":on,G=a$2==="inline",j=a$2==="center",_=["ndpr-consent-banner"];y!=="bar"&&_.push(`ndpr-consent-banner--${y}`),a$2==="top"?_.push("ndpr-consent-banner--top"):a$2==="bottom"?_.push("ndpr-consent-banner--bottom"):a$2==="inline"&&_.push("ndpr-consent-banner--inline"),H&&_.push(H);let gn=_.join(" "),K=`ndpr-consent-banner__button ndpr-consent-banner__button--primary ${z} ${rn}`.trim(),vn=`ndpr-consent-banner__button ndpr-consent-banner__button--secondary ${z} ${dn}`.trim(),an=`ndpr-consent-banner__button ndpr-consent-banner__button--ghost ${z}`.trim(),_n=(n==null?void 0:n.primaryButton)||(n==null?void 0:n.acceptButton)||K,V=(n==null?void 0:n.secondaryButton)||(n==null?void 0:n.rejectButton)||vn,hn=(n==null?void 0:n.customizeButton)||an,Cn=(n==null?void 0:n.saveButton)||K,I=jsx("div",{ref:l,tabIndex:-1,"data-ndpr-component":"consent-banner","data-ndpr-variant":y,"data-ndpr-position":a$2,className:a$1(gn,n==null?void 0:n.root,o),style:!G&&!j?{zIndex:s}:void 0,role:"dialog","aria-modal":j||void 0,"aria-labelledby":"consent-banner-title","aria-describedby":"consent-banner-description",children:jsxs("div",{className:a$1("ndpr-consent-banner__container",n==null?void 0:n.container,o),children:[jsx("h2",{id:"consent-banner-title",className:a$1("ndpr-consent-banner__title",n==null?void 0:n.title,o),children:Z}),jsx("p",{id:"consent-banner-description",className:a$1("ndpr-consent-banner__description",n==null?void 0:n.description,o),children:m}),b$1&&jsxs("div",{ref:P,className:a$1("ndpr-consent-banner__customize-panel",n==null?void 0:n.customizePanel,o),children:[jsx("div",{className:o?"":"ndpr-consent-banner__select-all-row",children:jsx("button",{type:"button",onClick:M?pn:ln,className:a$1("ndpr-consent-banner__select-all-button",n==null?void 0:n.selectAllButton,o),children:M?"Deselect All":"Select All"})}),jsx("div",{className:a$1("ndpr-consent-banner__options-list",n==null?void 0:n.optionsList,o),children:d.map(t=>jsxs("div",{className:a$1("ndpr-consent-banner__option",n==null?void 0:n.optionItem,o),children:[jsx("input",{id:`consent-${t.id}`,type:"checkbox",checked:S[t.id]||false,onChange:e=>bn(t.id,e.target.checked),disabled:t.required,className:a$1("ndpr-consent-banner__option-checkbox",n==null?void 0:n.optionCheckbox,o)}),jsxs("div",{className:o?"":"ndpr-consent-banner__option-text",children:[jsxs("label",{htmlFor:`consent-${t.id}`,className:a$1("ndpr-consent-banner__option-label",n==null?void 0:n.optionLabel,o),children:[t.label,t.required&&jsx("span",{className:o?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsx("p",{className:a$1("ndpr-consent-banner__option-description",n==null?void 0:n.optionDescription,o),children:t.description})]})]},t.id))}),jsxs("div",{className:a$1("ndpr-consent-banner__buttons",n==null?void 0:n.buttonGroup,o),children:[jsx("button",{onClick:fn,className:a$1(Cn,n==null?void 0:n.saveButton,o),children:en}),jsx("button",{onClick:()=>D(false),className:a$1(V,n==null?void 0:n.rejectButton,o),children:"Back"})]})]}),!b$1&&jsxs("div",{className:a$1("ndpr-consent-banner__buttons",n==null?void 0:n.buttonGroup,o),children:[jsx("button",{onClick:un,className:a$1(_n,n==null?void 0:n.acceptButton,o),children:N}),jsx("button",{onClick:F,className:a$1(V,n==null?void 0:n.rejectButton,o),children:nn}),jsx("button",{onClick:()=>D(true),className:a$1(hn,n==null?void 0:n.customizeButton,o),children:tn})]}),jsx("div",{className:a$1("ndpr-consent-banner__footer-text",void 0,o),children:'By clicking "Accept All", you agree to the use of ALL cookies. Visit our Cookie Policy to learn more.'})]})});if(G)return I;if(j){let t=jsx("div",{className:o?"":"ndpr-consent-banner__overlay",style:{zIndex:s},children:I});return O?createPortal(t,document.body):null}return O?createPortal(I,document.body):null};export{xn as a};//# sourceMappingURL=chunk-BN77GP4W.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-BN77GP4W.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js');var i={consent:{title:"We Value Your Privacy",description:"We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26.",acceptAll:"Accept All",rejectAll:"Reject All",customize:"Customize",savePreferences:"Save Preferences",selectAll:"Select All",deselectAll:"Deselect All",required:"Required",cookieNotice:'By clicking "Accept All", you agree to the use of ALL cookies. Visit our Cookie Policy to learn more.'},dsr:{title:"Submit a Data Subject Request",description:"Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part IV, Sections 29-36.",submitRequest:"Submit Request",reset:"Reset",fullName:"Full Name",email:"Email Address",phone:"Phone Number (Optional)",requestType:"Request Type",additionalInfo:"Additional Information",identityVerification:"Identity Verification",identifierType:"Identifier Type",identifierValue:"Identifier Value",privacyNotice:"The information you provide in this form will be used solely for the purpose of processing your data subject request.",successMessage:"Your request has been submitted successfully."},breach:{title:"Report a Data Breach",description:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40.",submitReport:"Submit Report",breachTitle:"Breach Title/Summary",category:"Category",discoveredAt:"Date Discovered",detailedDescription:"Detailed Description"},dpia:{title:"Data Protection Impact Assessment",next:"Next",previous:"Previous",complete:"Complete Assessment",progress:"Progress"},policy:{title:"Privacy Policy Generator",generate:"Generate Policy",preview:"Preview",export:"Export",sections:"Sections",variables:"Variables"},compliance:{score:"Compliance Score",excellent:"Excellent",good:"Good",needsWork:"Needs Work",critical:"Critical",recommendations:"Recommendations",passed:"Passed",gaps:"Gaps"},common:{loading:"Loading...",error:"An error occurred",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",back:"Back",next:"Next",search:"Search",noResults:"No results found"}};function a(e){if(!e)return i;let r=chunkMQFZHA2D_js.a({},i);for(let t of Object.keys(e))e[t]&&(r[t]=chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i[t]),e[t]));return r}exports.a=i;exports.b=a;//# sourceMappingURL=chunk-C5QO3SX4.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-C5QO3SX4.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {d,c,a as a$1,b as b$1}from'./chunk-TXBZPCGF.mjs';import {a as a$2}from'./chunk-AYKLAEOU.mjs';import {b,a}from'./chunk-WWT2ZSNU.mjs';import {useState,useMemo,useCallback}from'react';import {jsx,jsxs}from'react/jsx-runtime';var q={name:"",description:"",lawfulBasis:"consent",lawfulBasisJustification:"",dataCategories:"",involvesSensitiveData:false,sensitiveDataCondition:"",dataSubjectCategories:"",purposes:"",retentionPeriod:"",retentionJustification:"",recipients:"",crossBorderTransfer:false,reviewDate:"",liaPurposeTest:"",liaNecessityTest:"",liaBalancingTest:"",liaSafeguards:"",liaConclusion:""},Q=[{value:"consent",label:"Consent"},{value:"contract",label:"Contract"},{value:"legal_obligation",label:"Legal Obligation"},{value:"vital_interests",label:"Vital Interests"},{value:"public_interest",label:"Public Interest"},{value:"legitimate_interests",label:"Legitimate Interests"}],X=[{value:"explicit_consent",label:"Explicit Consent"},{value:"employment_law",label:"Employment Law"},{value:"vital_interests_incapable",label:"Vital Interests (Incapable)"},{value:"nonprofit_legitimate",label:"Nonprofit Legitimate Activities"},{value:"publicly_available",label:"Publicly Available Data"},{value:"legal_claims",label:"Legal Claims"},{value:"substantial_public_interest",label:"Substantial Public Interest"},{value:"health_purposes",label:"Health Purposes"},{value:"public_health",label:"Public Health"},{value:"archiving_research",label:"Archiving / Research"}],ye=({activities:g,onAddActivity:L,onUpdateActivity:F,onArchiveActivity:I,title:Z="Lawful Basis Tracker",description:ee="Document and track the lawful basis for each processing activity as required by NDPA 2023 Section 25.",className:te="",buttonClassName:m="",showSummary:ie=true,showComplianceGaps:re=true,classNames:i,unstyled:o})=>{let[x,f]=useState("list"),[a$3,w]=useState(q),[b$2,j]=useState(null),[J,ae]=useState(null),[A,ne]=useState("all"),[B,oe]=useState("all"),[S,de]=useState(""),[c$1,C]=useState([]),V=useMemo(()=>{let e=[...g];if(A!=="all"&&(e=e.filter(l=>l.status===A)),B!=="all"&&(e=e.filter(l=>l.lawfulBasis===B)),S){let l=S.toLowerCase();e=e.filter(p=>p.name.toLowerCase().includes(l)||p.description.toLowerCase().includes(l)||p.purposes.some(N=>N.toLowerCase().includes(l)));}return e.sort((l,p)=>p.updatedAt-l.updatedAt),e},[g,A,B,S]),y=useCallback(e=>new Date(e).toLocaleDateString(),[]),P=useMemo(()=>d(g),[g]),h=useMemo(()=>c(g),[g]),D=useCallback(e=>e.split(",").map(l=>l.trim()).filter(l=>l.length>0),[]),le=useCallback(()=>{w(q),j(null),C([]),f("form");},[]),M=useCallback(e=>{w({name:e.name,description:e.description,lawfulBasis:e.lawfulBasis,lawfulBasisJustification:e.lawfulBasisJustification,dataCategories:e.dataCategories.join(", "),involvesSensitiveData:e.involvesSensitiveData,sensitiveDataCondition:e.sensitiveDataCondition||"",dataSubjectCategories:e.dataSubjectCategories.join(", "),purposes:e.purposes.join(", "),retentionPeriod:e.retentionPeriod,retentionJustification:e.retentionJustification||"",recipients:(e.recipients||[]).join(", "),crossBorderTransfer:e.crossBorderTransfer,reviewDate:e.reviewDate?new Date(e.reviewDate).toISOString().split("T")[0]:"",liaPurposeTest:"",liaNecessityTest:"",liaBalancingTest:"",liaSafeguards:"",liaConclusion:""}),j(e.id),C([]),f("form");},[]),se=useCallback(()=>{let e={name:a$3.name,description:a$3.description,lawfulBasis:a$3.lawfulBasis,lawfulBasisJustification:a$3.lawfulBasisJustification,dataCategories:D(a$3.dataCategories),involvesSensitiveData:a$3.involvesSensitiveData,sensitiveDataCondition:a$3.sensitiveDataCondition||void 0,dataSubjectCategories:D(a$3.dataSubjectCategories),purposes:D(a$3.purposes),retentionPeriod:a$3.retentionPeriod,retentionJustification:a$3.retentionJustification||void 0,recipients:a$3.recipients?D(a$3.recipients):void 0,crossBorderTransfer:a$3.crossBorderTransfer,reviewDate:a$3.reviewDate?new Date(a$3.reviewDate).getTime():void 0,status:"active"},l=b(a({},e),{id:b$2||"temp",createdAt:Date.now(),updatedAt:Date.now()}),p=a$1(l);if(!p.isValid){C(p.errors);return}b$2&&F?F(b$2,e):L&&L(e),w(q),j(null),C([]),f("list");},[a$3,b$2,F,L,D]),G=useCallback(e=>{I&&I(e);},[I]),pe=useCallback(e=>{ae(e),f("detail");},[]),n=useMemo(()=>J?g.find(e=>e.id===J):null,[g,J]),H=useCallback(e=>{let l={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--neutral",under_review:"ndpr-badge ndpr-badge--warning",archived:"ndpr-badge ndpr-badge--destructive"},p={active:"Active",inactive:"Inactive",under_review:"Under Review",archived:"Archived"};return jsx("span",{className:a$2(`px-2 py-1 rounded text-xs font-medium ${l[e]}`,i==null?void 0:i.statusBadge,o),children:p[e]})},[i==null?void 0:i.statusBadge,o]),U=useCallback(e=>{let l={consent:"ndpr-badge ndpr-badge--info",contract:"ndpr-badge ndpr-badge--info",legal_obligation:"ndpr-badge ndpr-badge--info",vital_interests:"ndpr-badge ndpr-badge--destructive",public_interest:"ndpr-badge ndpr-badge--warning",legitimate_interests:"bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200"},p={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"};return jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${l[e]}`,children:p[e]})},[]),Y=useCallback(e=>e.dpoApproval?e.dpoApproval.approved?jsx("span",{className:"ndpr-badge ndpr-badge--success",children:"Approved"}):jsx("span",{className:"ndpr-badge ndpr-badge--warning",children:"Pending Approval"}):jsx("span",{className:"px-2 py-1 rounded text-xs font-medium bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400",children:"No DPO Review"}),[]),ue=()=>jsxs("div",{"data-ndpr-component":"lawful-basis-tracker",className:a$2("grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",i==null?void 0:i.summary,o),role:"status","aria-label":"Compliance summary",children:[jsxs("div",{className:a$2("ndpr-alert ndpr-alert--info",i==null?void 0:i.summaryCard,o),children:[jsx("p",{className:"ndpr-stat__value ndpr-text-info",children:P.totalActivities}),jsx("p",{className:"text-sm ndpr-text-info",children:"Total Activities"})]}),jsxs("div",{className:a$2("bg-orange-50 dark:bg-orange-900/20 p-4 rounded-lg",i==null?void 0:i.summaryCard,o),children:[jsx("p",{className:"ndpr-stat__value ndpr-text-warning",children:P.sensitiveDataActivities}),jsx("p",{className:"text-sm ndpr-text-warning",children:"Sensitive Data"})]}),jsxs("div",{className:a$2("ndpr-alert ndpr-alert--info",i==null?void 0:i.summaryCard,o),children:[jsx("p",{className:"ndpr-stat__value ndpr-text-info",children:P.crossBorderActivities}),jsx("p",{className:"text-sm ndpr-text-info",children:"Cross-Border Transfers"})]}),jsxs("div",{className:a$2("ndpr-alert ndpr-alert--destructive",i==null?void 0:i.summaryCard,o),children:[jsx("p",{className:"ndpr-stat__value ndpr-text-destructive",children:P.activitiesWithoutApproval.length}),jsx("p",{className:"text-sm ndpr-text-destructive",children:"Pending Approval"})]})]}),R=useMemo(()=>h.filter(e=>e.severity==="high"),[h]),E=useMemo(()=>h.filter(e=>e.severity==="medium"),[h]),ce=()=>h.length===0?jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-4 rounded-lg mb-6",role:"status","aria-label":"No compliance gaps",children:[jsx("p",{className:"text-sm ndpr-text-success font-medium",children:"No compliance gaps detected."}),jsx("p",{className:"text-xs ndpr-text-success mt-1",children:"All processing activities appear to be properly documented."})]}):jsxs("div",{className:"mb-6",role:"status","aria-label":`${h.length} compliance gaps detected`,children:[R.length>0&&jsxs("div",{className:a$2("bg-red-50 dark:bg-red-900/20 p-4 rounded-lg mb-3",i==null?void 0:i.gapAlert,o),children:[jsxs("p",{className:"text-sm ndpr-text-destructive font-medium mb-2",children:["High Priority (",R.length,")"]}),jsx("ul",{className:"space-y-1",children:R.map((e,l)=>jsx("li",{className:"text-xs ndpr-text-destructive",children:e.description},l))})]}),E.length>0&&jsxs("div",{className:a$2("ndpr-alert ndpr-alert--warning",i==null?void 0:i.gapAlert,o),children:[jsxs("p",{className:"text-sm ndpr-text-warning font-medium mb-2",children:["Medium Priority (",E.length,")"]}),jsx("ul",{className:"space-y-1",children:E.map((e,l)=>jsx("li",{className:"text-xs ndpr-text-warning",children:e.description},l))})]})]}),W=useCallback(()=>{f("list"),C([]);},[]),ge=useCallback(()=>{f("list");},[]),s=useCallback((e,l)=>{w(p=>b(a({},p),{[e]:l}));},[]),ve=useCallback(e=>{w(l=>b(a({},l),{involvesSensitiveData:e,sensitiveDataCondition:e?l.sensitiveDataCondition:""}));},[]),me=()=>jsxs("div",{className:a$2("",i==null?void 0:i.form,o),children:[jsxs("div",{className:a$2("flex justify-between items-center mb-4",i==null?void 0:i.header,o),children:[jsx("h3",{className:"ndpr-section-heading",children:b$2?"Edit Processing Activity":"New Processing Activity"}),jsx("button",{onClick:W,className:`px-4 py-2 ndpr-text-muted bg-gray-100 dark:bg-gray-700 rounded hover:bg-gray-200 dark:hover:bg-gray-600 ${m}`,children:"Cancel"})]}),c$1.length>0&&jsxs("div",{id:"form-errors",className:"bg-red-50 dark:bg-red-900/20 p-4 rounded-lg mb-4",role:"alert",children:[jsx("p",{className:"text-sm ndpr-text-destructive font-medium mb-2",children:"Please correct the following errors:"}),jsx("ul",{className:"list-disc list-inside space-y-1",children:c$1.map((e,l)=>jsx("li",{className:"text-xs ndpr-text-destructive",children:e},l))})]}),jsxs("div",{className:"ndpr-form-section",children:[jsxs("div",{children:[jsx("label",{htmlFor:"activityName",className:"ndpr-form-field__label",children:"Activity Name *"}),jsx("input",{type:"text",id:"activityName",value:a$3.name,onChange:e=>s("name",e.target.value),placeholder:"e.g., Customer Account Management","aria-required":"true","aria-describedby":c$1.length>0?"form-errors":void 0,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"activityDescription",className:"ndpr-form-field__label",children:"Description *"}),jsx("textarea",{id:"activityDescription",value:a$3.description,onChange:e=>s("description",e.target.value),placeholder:"Describe what processing is performed...",rows:3,"aria-required":"true","aria-describedby":c$1.length>0?"form-errors":void 0,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"lawfulBasis",className:"ndpr-form-field__label",children:"Lawful Basis (NDPA Section 25) *"}),jsx("select",{id:"lawfulBasis",value:a$3.lawfulBasis,onChange:e=>s("lawfulBasis",e.target.value),"aria-required":"true",className:a$2("ndpr-form-field__input",i==null?void 0:i.select,o),children:Q.map(e=>jsx("option",{value:e.value,children:e.label},e.value))}),jsx("p",{className:"mt-1 text-xs ndpr-text-muted",children:b$1(a$3.lawfulBasis)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"justification",className:"ndpr-form-field__label",children:"Lawful Basis Justification *"}),jsx("textarea",{id:"justification",value:a$3.lawfulBasisJustification,onChange:e=>s("lawfulBasisJustification",e.target.value),placeholder:"Document why this lawful basis applies to this processing activity...",rows:3,"aria-required":"true","aria-describedby":c$1.length>0?"form-errors":void 0,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),a$3.lawfulBasis==="legitimate_interests"&&jsxs("div",{className:"border border-indigo-200 dark:border-indigo-800 rounded-lg p-4 bg-indigo-50 dark:bg-indigo-900/20",children:[jsx("h4",{className:"text-sm font-semibold text-indigo-800 dark:text-indigo-200 mb-3",children:"Legitimate Interest Assessment (LIA)"}),jsx("p",{className:"text-xs text-indigo-600 dark:text-indigo-300 mb-4",children:"NDPA Section 25(1)(f) requires a balancing test when relying on legitimate interests."}),jsxs("div",{className:"ndpr-form-section",children:[jsxs("div",{children:[jsx("label",{htmlFor:"liaPurpose",className:"ndpr-form-field__label",children:"Purpose Test"}),jsx("textarea",{id:"liaPurpose",value:a$3.liaPurposeTest,onChange:e=>s("liaPurposeTest",e.target.value),placeholder:"Describe the legitimate interest being pursued...",rows:2,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"liaNecessity",className:"ndpr-form-field__label",children:"Necessity Test"}),jsx("textarea",{id:"liaNecessity",value:a$3.liaNecessityTest,onChange:e=>s("liaNecessityTest",e.target.value),placeholder:"Explain why this processing is necessary for the stated purpose...",rows:2,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"liaBalancing",className:"ndpr-form-field__label",children:"Balancing Test"}),jsx("textarea",{id:"liaBalancing",value:a$3.liaBalancingTest,onChange:e=>s("liaBalancingTest",e.target.value),placeholder:"Assess the impact on data subjects' rights and interests...",rows:2,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"liaSafeguards",className:"ndpr-form-field__label",children:"Safeguards"}),jsx("input",{type:"text",id:"liaSafeguards",value:a$3.liaSafeguards,onChange:e=>s("liaSafeguards",e.target.value),placeholder:"List safeguards (comma-separated)...",className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"liaConclusion",className:"ndpr-form-field__label",children:"Conclusion"}),jsx("textarea",{id:"liaConclusion",value:a$3.liaConclusion,onChange:e=>s("liaConclusion",e.target.value),placeholder:"State your overall conclusion...",rows:2,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dataCategories",className:"ndpr-form-field__label",children:"Data Categories *"}),jsx("input",{type:"text",id:"dataCategories",value:a$3.dataCategories,onChange:e=>s("dataCategories",e.target.value),placeholder:"e.g., Name, Email, Phone Number (comma-separated)","aria-required":"true","aria-describedby":c$1.length>0?"form-errors":void 0,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsx("div",{children:jsxs("label",{className:"flex items-center space-x-2",children:[jsx("input",{type:"checkbox",checked:a$3.involvesSensitiveData,onChange:e=>ve(e.target.checked),className:"rounded border-gray-300 dark:border-gray-600 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("span",{className:"ndpr-text-sm ndpr-font-medium",children:"Involves Sensitive Personal Data (NDPA Section 27)"})]})}),a$3.involvesSensitiveData&&jsxs("div",{children:[jsx("label",{htmlFor:"sensitiveCondition",className:"ndpr-form-field__label",children:"Sensitive Data Condition (NDPA Section 27) *"}),jsxs("select",{id:"sensitiveCondition",value:a$3.sensitiveDataCondition,onChange:e=>s("sensitiveDataCondition",e.target.value),"aria-required":"true",className:a$2("ndpr-form-field__input",i==null?void 0:i.select,o),children:[jsx("option",{value:"",children:"Select a condition..."}),X.map(e=>jsx("option",{value:e.value,children:e.label},e.value))]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dataSubjectCategories",className:"ndpr-form-field__label",children:"Data Subject Categories *"}),jsx("input",{type:"text",id:"dataSubjectCategories",value:a$3.dataSubjectCategories,onChange:e=>s("dataSubjectCategories",e.target.value),placeholder:"e.g., Customers, Employees, Vendors (comma-separated)","aria-required":"true","aria-describedby":c$1.length>0?"form-errors":void 0,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"purposes",className:"ndpr-form-field__label",children:"Processing Purposes *"}),jsx("input",{type:"text",id:"purposes",value:a$3.purposes,onChange:e=>s("purposes",e.target.value),placeholder:"e.g., Account management, Service delivery (comma-separated)","aria-required":"true","aria-describedby":c$1.length>0?"form-errors":void 0,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsx("label",{htmlFor:"retentionPeriod",className:"ndpr-form-field__label",children:"Retention Period *"}),jsx("input",{type:"text",id:"retentionPeriod",value:a$3.retentionPeriod,onChange:e=>s("retentionPeriod",e.target.value),placeholder:"e.g., 3 years after account closure","aria-required":"true","aria-describedby":c$1.length>0?"form-errors":void 0,className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{children:[jsx("label",{htmlFor:"retentionJustification",className:"ndpr-form-field__label",children:"Retention Justification"}),jsx("input",{type:"text",id:"retentionJustification",value:a$3.retentionJustification,onChange:e=>s("retentionJustification",e.target.value),placeholder:"Reason for the retention period",className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"recipients",className:"ndpr-form-field__label",children:"Recipients"}),jsx("input",{type:"text",id:"recipients",value:a$3.recipients,onChange:e=>s("recipients",e.target.value),placeholder:"e.g., Payment processor, Cloud provider (comma-separated)",className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsx("div",{children:jsxs("label",{className:"flex items-center space-x-2",children:[jsx("input",{type:"checkbox",checked:a$3.crossBorderTransfer,onChange:e=>s("crossBorderTransfer",e.target.checked),className:"rounded border-gray-300 dark:border-gray-600 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("span",{className:"ndpr-text-sm ndpr-font-medium",children:"Involves Cross-Border Transfer Outside Nigeria"})]})}),jsxs("div",{children:[jsx("label",{htmlFor:"reviewDate",className:"ndpr-form-field__label",children:"Next Review Date"}),jsx("input",{type:"date",id:"reviewDate",value:a$3.reviewDate,onChange:e=>s("reviewDate",e.target.value),className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsxs("div",{className:"flex justify-end space-x-3 pt-4",children:[jsx("button",{onClick:W,className:`px-4 py-2 ndpr-text-muted bg-gray-100 dark:bg-gray-700 rounded hover:bg-gray-200 dark:hover:bg-gray-600 ${m}`,children:"Cancel"}),jsx("button",{onClick:se,className:a$2(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${m}`,(i==null?void 0:i.primaryButton)||(i==null?void 0:i.submitButton),o),children:b$2?"Update Activity":"Create Activity"})]})]})]}),fe=()=>{var l;if(!n)return jsx("div",{className:"ndpr-empty-state",children:jsx("p",{className:"ndpr-card__subtitle",children:"Activity not found."})});let e=a$1(n);return jsxs("div",{children:[jsxs("div",{className:"flex justify-between items-start mb-4",children:[jsxs("div",{children:[jsx("button",{onClick:ge,className:"text-sm ndpr-text-primary hover:underline mb-2","aria-label":"Back to activities list",children:"Back to list"}),jsx("h3",{className:"ndpr-section-heading",children:n.name})]}),jsxs("div",{className:"ndpr-card__footer",children:[U(n.lawfulBasis),H(n.status),Y(n)]})]}),e.warnings.length>0&&jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md mb-4",children:[jsx("p",{className:"text-sm ndpr-text-warning font-medium mb-1",children:"Warnings"}),jsx("ul",{className:"list-disc list-inside space-y-1",children:e.warnings.map((p,N)=>jsx("li",{className:"text-xs ndpr-text-warning",children:p},N))})]}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[jsxs("div",{children:[jsxs("p",{className:"ndpr-text-sm",children:[jsx("span",{className:"font-medium",children:"Description:"})," ",n.description]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Lawful Basis:"})," ",b$1(n.lawfulBasis)]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Justification:"})," ",n.lawfulBasisJustification]})]}),jsxs("div",{children:[jsxs("p",{className:"ndpr-text-sm",children:[jsx("span",{className:"font-medium",children:"Data Categories:"})," ",n.dataCategories.join(", ")]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Data Subject Categories:"})," ",n.dataSubjectCategories.join(", ")]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Purposes:"})," ",n.purposes.join(", ")]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Retention Period:"})," ",n.retentionPeriod,n.retentionJustification&&jsxs("span",{className:"ndpr-card__subtitle",children:[" ","(",n.retentionJustification,")"]})]})]})]}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[jsxs("div",{children:[jsxs("p",{className:"ndpr-text-sm",children:[jsx("span",{className:"font-medium",children:"Sensitive Data:"})," ",n.involvesSensitiveData?"Yes":"No",n.sensitiveDataCondition&&jsxs("span",{children:[" ","(Condition:"," ",((l=X.find(p=>p.value===n.sensitiveDataCondition))==null?void 0:l.label)||n.sensitiveDataCondition,")"]})]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Cross-Border Transfer:"})," ",n.crossBorderTransfer?"Yes":"No"]}),n.recipients&&n.recipients.length>0&&jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Recipients:"})," ",n.recipients.join(", ")]})]}),jsxs("div",{children:[jsxs("p",{className:"ndpr-text-sm",children:[jsx("span",{className:"font-medium",children:"Created:"})," ",y(n.createdAt)]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Last Updated:"})," ",y(n.updatedAt)]}),n.reviewDate&&jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Next Review:"})," ",y(n.reviewDate),n.reviewDate<Date.now()&&jsx("span",{className:"ndpr-text-destructive font-medium",children:" (Overdue)"})]})]})]}),n.dpoApproval&&jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 p-4 rounded-md mb-6",children:[jsx("h4",{className:"ndpr-section-heading",children:"DPO Approval"}),jsxs("p",{className:"ndpr-text-sm",children:[jsx("span",{className:"font-medium",children:"Status:"})," ",n.dpoApproval.approved?"Approved":"Not Approved"]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Approved By:"})," ",n.dpoApproval.approvedBy]}),jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Date:"})," ",y(n.dpoApproval.approvedAt)]}),n.dpoApproval.notes&&jsxs("p",{className:"ndpr-form-field__hint",children:[jsx("span",{className:"font-medium",children:"Notes:"})," ",n.dpoApproval.notes]})]}),jsxs("div",{className:"flex space-x-3",children:[jsx("button",{onClick:()=>M(n),"aria-label":`Edit ${n.name}`,className:`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${m}`,children:"Edit"}),n.status!=="archived"&&jsx("button",{onClick:()=>G(n.id),"aria-label":`Archive ${n.name}`,className:`px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700 ${m}`,children:"Archive"})]})]})},be=()=>jsxs("div",{children:[jsxs("div",{className:"mb-6 grid grid-cols-1 md:grid-cols-4 gap-4",children:[jsxs("div",{children:[jsx("label",{htmlFor:"basisFilter",className:"ndpr-form-field__label",children:"Lawful Basis"}),jsxs("select",{id:"basisFilter",value:B,onChange:e=>oe(e.target.value),"aria-label":"Filter by lawful basis",className:a$2("ndpr-form-field__input",i==null?void 0:i.select,o),children:[jsx("option",{value:"all",children:"All Bases"}),Q.map(e=>jsx("option",{value:e.value,children:e.label},e.value))]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"statusFilterSelect",className:"ndpr-form-field__label",children:"Status"}),jsxs("select",{id:"statusFilterSelect",value:A,onChange:e=>ne(e.target.value),"aria-label":"Filter by status",className:a$2("ndpr-form-field__input",i==null?void 0:i.select,o),children:[jsx("option",{value:"all",children:"All Statuses"}),jsx("option",{value:"active",children:"Active"}),jsx("option",{value:"inactive",children:"Inactive"}),jsx("option",{value:"under_review",children:"Under Review"}),jsx("option",{value:"archived",children:"Archived"})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"searchInput",className:"ndpr-form-field__label",children:"Search"}),jsx("input",{type:"text",id:"searchInput",value:S,onChange:e=>de(e.target.value),placeholder:"Search activities...",className:a$2("ndpr-form-field__input",i==null?void 0:i.input,o)})]}),jsx("div",{className:"flex items-end",children:jsx("button",{onClick:le,className:a$2(`w-full px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${m}`,(i==null?void 0:i.primaryButton)||(i==null?void 0:i.submitButton),o),children:"Add Activity"})})]}),V.length===0?jsx("div",{className:"flex items-center justify-center h-32 bg-gray-50 dark:bg-gray-700 rounded-md",children:jsx("p",{className:"ndpr-card__subtitle",children:"No processing activities found."})}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:a$2("w-full text-sm text-left",i==null?void 0:i.table,o),children:[jsx("thead",{className:a$2("ndpr-table__head",i==null?void 0:i.tableHeader,o),children:jsxs("tr",{children:[jsx("th",{className:"ndpr-table__cell",children:"Activity"}),jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsx("th",{className:"ndpr-table__cell",children:"DPO Approval"}),jsx("th",{className:"ndpr-table__cell",children:"Sensitive Data"}),jsx("th",{className:"ndpr-table__cell",children:"Last Updated"}),jsx("th",{className:"ndpr-table__cell",children:"Actions"})]})}),jsx("tbody",{children:V.map(e=>jsxs("tr",{className:a$2("border-b border-gray-200 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700",i==null?void 0:i.tableRow,o),children:[jsxs("td",{className:"ndpr-table__cell",children:[jsx("button",{onClick:()=>pe(e.id),className:"font-medium ndpr-text-primary hover:underline text-left",children:e.name}),jsx("p",{className:"text-xs ndpr-text-muted mt-1 truncate max-w-xs",children:e.description})]}),jsx("td",{className:"ndpr-table__cell",children:U(e.lawfulBasis)}),jsx("td",{className:"ndpr-table__cell",children:H(e.status)}),jsx("td",{className:"ndpr-table__cell",children:Y(e)}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:`text-xs ${e.involvesSensitiveData?"ndpr-text-warning font-medium":"ndpr-card__subtitle"}`,children:e.involvesSensitiveData?"Yes":"No"})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:y(e.updatedAt)}),jsx("td",{className:"ndpr-table__cell",children:jsxs("div",{className:"ndpr-card__footer",children:[jsx("button",{onClick:()=>M(e),"aria-label":`Edit ${e.name}`,className:"text-xs ndpr-text-primary hover:underline",children:"Edit"}),e.status!=="archived"&&jsx("button",{onClick:()=>G(e.id),"aria-label":`Archive ${e.name}`,className:"text-xs ndpr-text-muted hover:underline",children:"Archive"})]})})]},e.id))})]})})]});return jsxs("div",{className:a$2(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${te}`,i==null?void 0:i.root,o),children:[jsx("h2",{className:a$2("ndpr-section-heading",i==null?void 0:i.title,o),children:Z}),jsx("p",{className:"ndpr-card__subtitle",children:ee}),ie&&x==="list"&&ue(),re&&x==="list"&&ce(),x==="list"&&be(),x==="form"&&me(),x==="detail"&&fe()]})};export{ye as a};//# sourceMappingURL=chunk-CISJAQ6W.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-CISJAQ6W.mjs.map
|