@tantainnovative/ndpr-toolkit 3.0.0 → 3.2.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/dist/{PolicyExporter-BIqSVjfC.d.mts → PolicyExporter-Bgi6nz82.d.mts} +93 -1
- package/dist/{PolicyExporter-BNWaPBGU.d.ts → PolicyExporter-BnvuFncj.d.ts} +93 -1
- package/dist/adapters.js +1 -1
- package/dist/adapters.mjs +1 -1
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-256APOQM.js +2 -0
- package/dist/chunk-2FWCVWKN.js +2 -0
- package/dist/chunk-3DJGO6WG.js +2 -0
- package/dist/chunk-44W4H2EY.js +2 -0
- package/dist/chunk-4XCL62MJ.mjs +2 -0
- package/dist/chunk-555WWZ3W.js +2 -0
- package/dist/chunk-6BXUVS6E.js +81 -0
- package/dist/{chunk-KHRBU5K7.js → chunk-6RQGQZT2.js} +2 -2
- package/dist/chunk-6TA2MVTU.mjs +2 -0
- package/dist/chunk-6WIP33TW.mjs +2 -0
- package/dist/{chunk-2ORDHJRD.js → chunk-7AVN424U.js} +2 -2
- package/dist/{chunk-5VMHKNJY.js → chunk-7SMLHZ4B.js} +2 -2
- package/dist/chunk-A4PK7JB2.js +2 -0
- package/dist/chunk-ABDB7LEV.mjs +2 -0
- package/dist/chunk-BKRETVJ6.js +2 -0
- package/dist/chunk-CWUPGY3M.mjs +3 -0
- package/dist/chunk-DJGS7SSN.mjs +2 -0
- package/dist/{chunk-SVCRYM4I.mjs → chunk-E4NCJ7RD.mjs} +2 -2
- package/dist/chunk-E63VPR7U.js +2 -0
- package/dist/chunk-EH2I4L7M.mjs +316 -0
- package/dist/chunk-ELKB2AFZ.js +2 -0
- package/dist/chunk-FDDI426Y.mjs +2 -0
- package/dist/chunk-FOXZRRMW.mjs +2 -0
- package/dist/chunk-GCQRHMTQ.mjs +144 -0
- package/dist/chunk-GKKAK6ES.mjs +3 -0
- package/dist/chunk-GOD4LA2J.mjs +2 -0
- package/dist/{chunk-SWF3YVE5.js → chunk-GOU6FU6Y.js} +3 -3
- package/dist/chunk-HO5M7M4M.js +2 -0
- package/dist/chunk-I23WPZNQ.mjs +94 -0
- package/dist/chunk-I4M2AA3N.js +2 -0
- package/dist/chunk-I54CDQGN.js +3 -0
- package/dist/{chunk-6D3ZUGBB.mjs → chunk-IR7VCBWV.mjs} +2 -2
- package/dist/{chunk-4VVARDN2.mjs → chunk-K45S6YQV.mjs} +2 -2
- package/dist/chunk-KBAFOVE3.js +2 -0
- package/dist/{chunk-P7BSBCB3.js → chunk-KBP26GLC.js} +2 -2
- package/dist/chunk-KVOGOLIR.js +316 -0
- package/dist/chunk-LU4PFST7.js +144 -0
- package/dist/chunk-MDWG2KDA.mjs +2 -0
- package/dist/chunk-NN233SGA.mjs +3 -0
- package/dist/chunk-NRQELKAE.js +2 -0
- package/dist/chunk-NUDVUAD4.mjs +81 -0
- package/dist/chunk-NXQMU36Z.mjs +2 -0
- package/dist/chunk-P42Z5CFE.js +2 -0
- package/dist/chunk-PATONNTZ.mjs +2 -0
- package/dist/{chunk-WLSW4Z4W.mjs → chunk-PM7O5IGE.mjs} +2 -2
- package/dist/chunk-Q7VHB64E.mjs +2 -0
- package/dist/{chunk-PEH5GIMN.js → chunk-QH6YUVJS.js} +2 -2
- package/dist/chunk-QY7PD5XB.js +94 -0
- package/dist/chunk-R3OYAJI6.mjs +2 -0
- package/dist/chunk-S4GRSNB4.js +2 -0
- package/dist/chunk-SAA7UVI2.js +3 -0
- package/dist/{chunk-PYEX7DFR.mjs → chunk-SHMJNRHO.mjs} +3 -3
- package/dist/chunk-TVW6KBVV.mjs +2 -0
- package/dist/chunk-U62QYKVG.mjs +2 -0
- package/dist/chunk-UDNRAQLE.js +3 -0
- package/dist/{chunk-5RSOLEEP.js → chunk-UXMGBIX6.js} +4 -4
- package/dist/{chunk-UZ5EZOA7.js → chunk-VK27WVV3.js} +2 -2
- package/dist/{chunk-G26I6MP5.mjs → chunk-VWPGIES4.mjs} +2 -2
- package/dist/{chunk-NPLXE43Q.mjs → chunk-XQ4M5FHC.mjs} +2 -2
- package/dist/{chunk-CAB7O3GR.mjs → chunk-ZEOQYWOE.mjs} +4 -4
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +9 -46
- package/dist/core.d.ts +9 -46
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/dpia.js +1 -1
- package/dist/dpia.mjs +1 -1
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +2 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lawful-basis.js +1 -1
- package/dist/lawful-basis.mjs +1 -1
- package/dist/policy-engine-C-tShzZH.d.mts +154 -0
- package/dist/policy-engine-DSQpT55_.d.ts +154 -0
- package/dist/policy-sections-CfNVBLCh.d.mts +54 -0
- package/dist/policy-sections-DqH0iZRf.d.ts +54 -0
- package/dist/policy.d.mts +86 -5
- package/dist/policy.d.ts +86 -5
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets.d.mts +5 -15
- package/dist/presets.d.ts +5 -15
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -1
- package/dist/sanitize-9mOO_cJW.d.mts +147 -0
- package/dist/sanitize-9mOO_cJW.d.ts +147 -0
- package/dist/useAdaptivePolicyWizard-B9Op2gYM.d.ts +52 -0
- package/dist/useAdaptivePolicyWizard-N4eUM4Tj.d.mts +52 -0
- package/package.json +9 -3
- package/dist/PolicyGenerator-BvcWPbxp.d.mts +0 -96
- package/dist/PolicyGenerator-BzRwtlgn.d.ts +0 -96
- package/dist/chunk-27NYSWUG.mjs +0 -2
- package/dist/chunk-2SYNHRP6.mjs +0 -2
- package/dist/chunk-2W7ARAW2.js +0 -2
- package/dist/chunk-3F34NACG.js +0 -2
- package/dist/chunk-3RGJV3VF.js +0 -7
- package/dist/chunk-3V23O4ZJ.js +0 -2
- package/dist/chunk-3XAUN5IM.mjs +0 -3
- package/dist/chunk-6E54NSAO.mjs +0 -2
- package/dist/chunk-7F5F5YWI.mjs +0 -2
- package/dist/chunk-7FIUX3ZM.js +0 -89
- package/dist/chunk-CMZTI7SG.js +0 -2
- package/dist/chunk-EPF7J2FK.js +0 -3
- package/dist/chunk-FR7ZYZXB.js +0 -2
- package/dist/chunk-FXTZDKDC.mjs +0 -3
- package/dist/chunk-GIV2OHE6.mjs +0 -2
- package/dist/chunk-GPJVTGHR.mjs +0 -2
- package/dist/chunk-GVANK6PL.js +0 -3
- package/dist/chunk-HNZK7LY3.mjs +0 -2
- package/dist/chunk-IKEPXHCZ.js +0 -2
- package/dist/chunk-ILCNDOBU.js +0 -2
- package/dist/chunk-IQQW52EF.js +0 -2
- package/dist/chunk-ISSGO2YT.mjs +0 -72
- package/dist/chunk-J6IKAGUP.mjs +0 -89
- package/dist/chunk-KNE4NXCY.mjs +0 -7
- package/dist/chunk-LFNA6WYQ.mjs +0 -2
- package/dist/chunk-PGSA2O5P.mjs +0 -2
- package/dist/chunk-RGYK4VAY.mjs +0 -2
- package/dist/chunk-RSUDIFZV.mjs +0 -2
- package/dist/chunk-RYZEIDNR.js +0 -2
- package/dist/chunk-SBNAMPAP.mjs +0 -2
- package/dist/chunk-SSGJREE3.js +0 -2
- package/dist/chunk-U6VWHC46.js +0 -72
- package/dist/chunk-UK656RCG.js +0 -2
- package/dist/chunk-UOSEH6DC.js +0 -2
- package/dist/chunk-VDZKGCAF.js +0 -2
- package/dist/chunk-WSHSHIIM.mjs +0 -2
- package/dist/chunk-XSK4BSZJ.mjs +0 -2
- package/dist/chunk-Y34DQYS7.js +0 -2
- package/dist/chunk-YJCGEOLO.mjs +0 -2
- package/dist/chunk-ZCZ5RRZO.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkSWF3YVE5_js=require('./chunk-SWF3YVE5.js'),chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var I=[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_interest",label:"Public Interest (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}],N=[{value:"active",label:"Active"},{value:"inactive",label:"Inactive"},{value:"archived",label:"Archived"}],ke=[{value:"data_subject",label:"Directly from Data Subject"},{value:"third_party",label:"Third Party"},{value:"public_source",label:"Public Source"},{value:"other",label:"Other"}];function we(){let l=Date.now();return {id:`proc_${l}_${Math.random().toString(36).substring(2,11)}`,name:"",description:"",controllerDetails:{name:"",contact:"",address:""},lawfulBasis:"consent",lawfulBasisJustification:"",purposes:[],dataCategories:[],dataSubjectCategories:[],recipients:[],retentionPeriod:"",securityMeasures:[],dataSource:"data_subject",dpiaRequired:false,automatedDecisionMaking:false,status:"active",createdAt:l,updatedAt:l}}function ee(l){return l?new Date(l).toLocaleDateString():"N/A"}var Pe=({ropa:l,onAddRecord:R,onUpdateRecord:S,onArchiveRecord:P,title:te="Record of Processing Activities (ROPA)",description:re="Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",className:ae="",buttonClassName:A="",classNames:e,unstyled:d})=>{let[b,v]=react.useState("list"),[w,ie]=react.useState(""),[C,oe]=react.useState("all"),[D,de]=react.useState("all"),[n,x]=react.useState(null),[M,h]=react.useState([]),[O,L]=react.useState(""),[j,_]=react.useState(""),[E,T]=react.useState(""),[U,$]=react.useState(""),[J,q]=react.useState(""),[V,G]=react.useState(""),[z,H]=react.useState(""),c=react.useMemo(()=>chunkSWF3YVE5_js.b(l),[l]),f=react.useMemo(()=>chunkSWF3YVE5_js.d(l),[l]),W=react.useMemo(()=>{let a=[...l.records];if(C!=="all"&&(a=a.filter(r=>r.status===C)),D!=="all"&&(a=a.filter(r=>r.lawfulBasis===D)),w){let r=w.toLowerCase();a=a.filter(u=>u.name.toLowerCase().includes(r)||u.description.toLowerCase().includes(r)||u.dataCategories.some(p=>p.toLowerCase().includes(r))||u.department&&u.department.toLowerCase().includes(r));}return a},[l.records,C,D,w]);react.useEffect(()=>{n&&(L(n.purposes.join(", ")),_(n.dataCategories.join(", ")),T((n.sensitiveDataCategories||[]).join(", ")),$(n.dataSubjectCategories.join(", ")),q(n.recipients.join(", ")),G(n.securityMeasures.join(", ")),H((n.systemsUsed||[]).join(", ")));},[n==null?void 0:n.id]);let ne=()=>{let a=we();a.controllerDetails.name=l.organizationName,a.controllerDetails.contact=l.organizationContact,a.controllerDetails.address=l.organizationAddress,l.ndpcRegistrationNumber&&(a.controllerDetails.registrationNumber=l.ndpcRegistrationNumber),l.dpoDetails&&(a.controllerDetails.dpoContact=l.dpoDetails.email),x(a),h([]),v("form");},le=a=>{x(chunkMQFZHA2D_js.a({},a)),h([]),v("form");},m=a=>a.split(",").map(r=>r.trim()).filter(r=>r.length>0),ue=()=>{if(!n)return;let a=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},n),{purposes:m(O),dataCategories:m(j),sensitiveDataCategories:m(E),dataSubjectCategories:m(U),recipients:m(J),securityMeasures:m(V),systemsUsed:m(z),updatedAt:Date.now()});a.sensitiveDataCategories&&a.sensitiveDataCategories.length===0&&(a.sensitiveDataCategories=void 0),a.systemsUsed&&a.systemsUsed.length===0&&(a.systemsUsed=void 0);let r=chunkSWF3YVE5_js.a(a);if(!r.valid){h(r.errors);return}l.records.find(p=>p.id===a.id)?S==null||S(a.id,a):R==null||R(a),x(null),h([]),v("list");},ge=a=>{P==null||P(a);},se=()=>{let a=chunkSWF3YVE5_js.c(l),r=new Blob([a],{type:"text/csv;charset=utf-8;"}),u=URL.createObjectURL(r),p=document.createElement("a");p.href=u,p.download=`ropa_${l.organizationName.replace(/\s+/g,"_").toLowerCase()}_${new Date().toISOString().slice(0,10)}.csv`,p.click(),setTimeout(()=>URL.revokeObjectURL(u),100);},K=()=>{x(null),h([]),v("list");},g=(a,r)=>{n&&x(u=>u&&chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},u),{[a]:r}));},B=(a,r)=>{n&&x(u=>u&&chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},u),{controllerDetails:chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},u.controllerDetails),{[a]:r})}));},ce=a=>!!a.nextReviewDate&&a.nextReviewDate<=Date.now(),pe=a=>{let r={active:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",inactive:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},u={active:"Active",inactive:"Inactive",archived:"Archived"};return jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(`px-2 py-1 rounded text-xs font-medium ${r[a]}`,e==null?void 0:e.statusBadge,d),children:u[a]})},me=a=>jsxRuntime.jsx("span",{className:"px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",children:{consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"}[a]}),be=()=>jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("mb-6 p-4 bg-gray-50 dark:bg-gray-700 rounded-md",e==null?void 0:e.orgInfo,d),children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Organization"}),jsxRuntime.jsx("p",{className:"text-sm font-semibold",children:l.organizationName})]}),l.dpoDetails&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Data Protection Officer"}),jsxRuntime.jsx("p",{className:"text-sm font-semibold",children:l.dpoDetails.name}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:l.dpoDetails.email})]}),l.ndpcRegistrationNumber&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"NDPC Registration No."}),jsxRuntime.jsx("p",{className:"text-sm font-semibold",children:l.ndpcRegistrationNumber})]})]}),jsxRuntime.jsxs("div",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:["Version ",l.version," | Last Updated: ",ee(l.lastUpdated)]})]}),ve=()=>jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("mb-6",e==null?void 0:e.summary,d),children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d),children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold text-blue-700 dark:text-blue-300",children:c.totalRecords}),jsxRuntime.jsx("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:"Total Records"})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d),children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold text-green-700 dark:text-green-300",children:c.activeRecords}),jsxRuntime.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"Active"})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d),children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold text-purple-700 dark:text-purple-300",children:c.crossBorderRecords}),jsxRuntime.jsx("p",{className:"text-xs text-purple-600 dark:text-purple-400",children:"Cross-Border"})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d),children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold text-orange-700 dark:text-orange-300",children:f.length}),jsxRuntime.jsx("p",{className:"text-xs text-orange-600 dark:text-orange-400",children:"Records with Gaps"})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2",children:"By Lawful Basis"}),I.map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:a.label.split(" (")[0]}),jsxRuntime.jsx("span",{className:"font-medium",children:c.byLawfulBasis[a.value]||0})]},a.value))]}),jsxRuntime.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2",children:"Risk Indicators"}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Sensitive Data"}),jsxRuntime.jsx("span",{className:"font-medium",children:c.sensitiveDataRecords})]}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"DPIA Required"}),jsxRuntime.jsx("span",{className:"font-medium",children:c.dpiaRequiredRecords})]}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Automated Decisions"}),jsxRuntime.jsx("span",{className:"font-medium",children:c.automatedDecisionRecords})]}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Due for Review"}),jsxRuntime.jsx("span",{className:`font-medium ${c.recordsDueForReview.length>0?"text-red-600 dark:text-red-400":""}`,children:c.recordsDueForReview.length})]})]}),c.topDepartments.length>0&&jsxRuntime.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2",children:"Top Departments"}),c.topDepartments.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:a.department}),jsxRuntime.jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]}),f.length>0&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md",e==null?void 0:e.complianceGap,d),children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-2",children:"Compliance Gaps Detected"}),f.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"mb-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium text-red-700 dark:text-red-300",children:a.recordName}),jsxRuntime.jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((r,u)=>jsxRuntime.jsx("li",{className:"text-xs text-red-600 dark:text-red-400",children:r},u))})]},a.recordId)),f.length>5&&jsxRuntime.jsxs("p",{className:"text-xs text-red-600 dark:text-red-400 mt-1",children:["...and ",f.length-5," more record(s) with gaps."]})]})]}),xe=()=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"mb-4 grid grid-cols-1 md:grid-cols-4 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"ropaSearch",className:"block text-sm font-medium mb-1",children:"Search"}),jsxRuntime.jsx("input",{type:"text",id:"ropaSearch",value:w,onChange:a=>ie(a.target.value),placeholder:"Search records...",className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"ropaStatusFilter",className:"block text-sm font-medium mb-1",children:"Status"}),jsxRuntime.jsxs("select",{id:"ropaStatusFilter",value:C,onChange:a=>oe(a.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:[jsxRuntime.jsx("option",{value:"all",children:"All Statuses"}),N.map(a=>jsxRuntime.jsx("option",{value:a.value,children:a.label},a.value))]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"ropaBasisFilter",className:"block text-sm font-medium mb-1",children:"Lawful Basis"}),jsxRuntime.jsxs("select",{id:"ropaBasisFilter",value:D,onChange:a=>de(a.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:[jsxRuntime.jsx("option",{value:"all",children:"All Bases"}),I.map(a=>jsxRuntime.jsx("option",{value:a.value,children:a.label.split(" (")[0]},a.value))]})]}),jsxRuntime.jsxs("div",{className:"flex items-end space-x-2",children:[jsxRuntime.jsx("button",{onClick:ne,className:chunkE64TU6IU_js.a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm ${A}`,(e==null?void 0:e.primaryButton)||(e==null?void 0:e.submitButton),d),children:"Add Record"}),jsxRuntime.jsx("button",{onClick:se,className:chunkE64TU6IU_js.a(`px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700 text-sm ${A}`,(e==null?void 0:e.secondaryButton)||(e==null?void 0:e.exportButton),d),children:"Export CSV"})]})]}),W.length===0?jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm text-center py-8",children:"No processing records found."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:chunkE64TU6IU_js.a("w-full text-sm text-left",e==null?void 0:e.table,d),children:[jsxRuntime.jsx("thead",{className:chunkE64TU6IU_js.a("text-xs uppercase bg-gray-50 dark:bg-gray-700",e==null?void 0:e.tableHeader,d),children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Name"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Lawful Basis"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Data Categories"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Status"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Last Reviewed"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Actions"})]})}),jsxRuntime.jsx("tbody",{children:W.map(a=>{let r=ce(a),u=f.some(p=>p.recordId===a.id);return jsxRuntime.jsxs("tr",{className:chunkE64TU6IU_js.a(`border-b dark:border-gray-600 ${r?"bg-red-50 dark:bg-red-900/10":u?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} hover:bg-gray-50 dark:hover:bg-gray-700`,e==null?void 0:e.tableRow,d),children:[jsxRuntime.jsx("td",{className:"px-4 py-3",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium",children:a.name}),a.department&&jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:a.department}),r&&jsxRuntime.jsx("span",{className:"text-xs text-red-600 dark:text-red-400 font-medium",children:"Review Overdue"})]})}),jsxRuntime.jsx("td",{className:"px-4 py-3",children:me(a.lawfulBasis)}),jsxRuntime.jsx("td",{className:"px-4 py-3",children:jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300 max-w-xs truncate",children:a.dataCategories.join(", ")})}),jsxRuntime.jsx("td",{className:"px-4 py-3",children:pe(a.status)}),jsxRuntime.jsx("td",{className:"px-4 py-3 text-xs text-gray-600 dark:text-gray-400",children:ee(a.lastReviewedAt)}),jsxRuntime.jsx("td",{className:"px-4 py-3",children:jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx("button",{onClick:()=>le(a),className:"text-[rgb(var(--ndpr-primary))] dark:text-[rgb(var(--ndpr-primary))] hover:underline text-xs",children:"Edit"}),a.status!=="archived"&&jsxRuntime.jsx("button",{onClick:()=>ge(a.id),className:"text-gray-600 dark:text-gray-400 hover:underline text-xs",children:"Archive"})]})})]},a.id)})})]})})]}),fe=()=>{if(!n)return null;let a=!l.records.find(r=>r.id===n.id);return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("",e==null?void 0:e.form,d),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex justify-between items-center mb-4",e==null?void 0:e.header,d),children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium",children:a?"Add Processing Record":"Edit Processing Record"}),jsxRuntime.jsx("button",{onClick:K,className:"text-gray-600 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 text-sm",children:"Cancel"})]}),M.length>0&&jsxRuntime.jsxs("div",{className:"mb-4 p-3 bg-red-50 dark:bg-red-900/20 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Please fix the following errors:"}),jsxRuntime.jsx("ul",{className:"list-disc list-inside",children:M.map((r,u)=>jsxRuntime.jsx("li",{className:"text-xs text-red-600 dark:text-red-400",children:r},u))})]}),jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Basic Information"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"recordName",className:"block text-sm font-medium mb-1",children:"Activity Name *"}),jsxRuntime.jsx("input",{type:"text",id:"recordName",value:n.name,onChange:r=>g("name",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Customer Account Management"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"recordDepartment",className:"block text-sm font-medium mb-1",children:"Department"}),jsxRuntime.jsx("input",{type:"text",id:"recordDepartment",value:n.department||"",onChange:r=>g("department",r.target.value||void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Marketing"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"recordDescription",className:"block text-sm font-medium mb-1",children:"Description *"}),jsxRuntime.jsx("textarea",{id:"recordDescription",value:n.description,onChange:r=>g("description",r.target.value),rows:3,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Describe what personal data processing is performed..."})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"recordStatus",className:"block text-sm font-medium mb-1",children:"Status *"}),jsxRuntime.jsx("select",{id:"recordStatus",value:n.status,onChange:r=>g("status",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:N.map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value))})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Controller Details"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"controllerName",className:"block text-sm font-medium mb-1",children:"Controller Name *"}),jsxRuntime.jsx("input",{type:"text",id:"controllerName",value:n.controllerDetails.name,onChange:r=>B("name",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"controllerContact",className:"block text-sm font-medium mb-1",children:"Controller Contact *"}),jsxRuntime.jsx("input",{type:"text",id:"controllerContact",value:n.controllerDetails.contact,onChange:r=>B("contact",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"controllerAddress",className:"block text-sm font-medium mb-1",children:"Controller Address *"}),jsxRuntime.jsx("input",{type:"text",id:"controllerAddress",value:n.controllerDetails.address,onChange:r=>B("address",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Lawful Basis (NDPA Section 25)"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"lawfulBasis",className:"block text-sm font-medium mb-1",children:"Lawful Basis *"}),jsxRuntime.jsx("select",{id:"lawfulBasis",value:n.lawfulBasis,onChange:r=>g("lawfulBasis",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:I.map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value))})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"lawfulBasisJustification",className:"block text-sm font-medium mb-1",children:"Justification *"}),jsxRuntime.jsx("textarea",{id:"lawfulBasisJustification",value:n.lawfulBasisJustification,onChange:r=>g("lawfulBasisJustification",r.target.value),rows:2,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Explain why this lawful basis applies..."})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Data Details"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"purposes",className:"block text-sm font-medium mb-1",children:"Purposes * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"purposes",value:O,onChange:r=>L(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Account management, Service delivery"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dataCategories",className:"block text-sm font-medium mb-1",children:"Data Categories * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"dataCategories",value:j,onChange:r=>_(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Name, Email, Phone number"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"sensitiveData",className:"block text-sm font-medium mb-1",children:"Sensitive Data Categories (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"sensitiveData",value:E,onChange:r=>T(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Health data, Biometric data"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"subjectCategories",className:"block text-sm font-medium mb-1",children:"Data Subject Categories * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"subjectCategories",value:U,onChange:r=>$(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Customers, Employees"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"recipients",className:"block text-sm font-medium mb-1",children:"Recipients * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"recipients",value:J,onChange:r=>q(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Payment processors, Cloud service providers"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dataSource",className:"block text-sm font-medium mb-1",children:"Data Source *"}),jsxRuntime.jsx("select",{id:"dataSource",value:n.dataSource,onChange:r=>g("dataSource",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:ke.map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value))})]}),n.dataSource==="third_party"&&jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"thirdPartyDetails",className:"block text-sm font-medium mb-1",children:"Third-Party Source Details *"}),jsxRuntime.jsx("input",{type:"text",id:"thirdPartyDetails",value:n.thirdPartySourceDetails||"",onChange:r=>g("thirdPartySourceDetails",r.target.value||void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Describe the third-party data source..."})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Retention and Security"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"retentionPeriod",className:"block text-sm font-medium mb-1",children:"Retention Period *"}),jsxRuntime.jsx("input",{type:"text",id:"retentionPeriod",value:n.retentionPeriod,onChange:r=>g("retentionPeriod",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., 5 years after account closure"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"retentionJustification",className:"block text-sm font-medium mb-1",children:"Retention Justification"}),jsxRuntime.jsx("input",{type:"text",id:"retentionJustification",value:n.retentionJustification||"",onChange:r=>g("retentionJustification",r.target.value||void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Why this retention period is necessary..."})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"securityMeasures",className:"block text-sm font-medium mb-1",children:"Security Measures * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"securityMeasures",value:V,onChange:r=>G(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Encryption at rest, Access controls, Audit logging"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"systemsUsed",className:"block text-sm font-medium mb-1",children:"Systems Used (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"systemsUsed",value:z,onChange:r=>H(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., CRM, ERP, Cloud Storage"})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Risk Indicators"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("input",{type:"checkbox",id:"dpiaRequired",checked:n.dpiaRequired,onChange:r=>g("dpiaRequired",r.target.checked),className:"rounded border-gray-300 dark:border-gray-600"}),jsxRuntime.jsx("label",{htmlFor:"dpiaRequired",className:"text-sm font-medium",children:"DPIA Required"})]}),n.dpiaRequired&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpiaReference",className:"block text-sm font-medium mb-1",children:"DPIA Reference *"}),jsxRuntime.jsx("input",{type:"text",id:"dpiaReference",value:n.dpiaReference||"",onChange:r=>g("dpiaReference",r.target.value||void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Reference to the completed DPIA"})]}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("input",{type:"checkbox",id:"automatedDecisionMaking",checked:n.automatedDecisionMaking,onChange:r=>g("automatedDecisionMaking",r.target.checked),className:"rounded border-gray-300 dark:border-gray-600"}),jsxRuntime.jsx("label",{htmlFor:"automatedDecisionMaking",className:"text-sm font-medium",children:"Automated Decision-Making"})]}),n.automatedDecisionMaking&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"automatedDecisionMakingDetails",className:"block text-sm font-medium mb-1",children:"Automated Decision-Making Details *"}),jsxRuntime.jsx("textarea",{id:"automatedDecisionMakingDetails",value:n.automatedDecisionMakingDetails||"",onChange:r=>g("automatedDecisionMakingDetails",r.target.value||void 0),rows:2,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Describe the automated decision-making process..."})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Review Schedule"}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"nextReviewDate",className:"block text-sm font-medium mb-1",children:"Next Review Date"}),jsxRuntime.jsx("input",{type:"date",id:"nextReviewDate",value:n.nextReviewDate?new Date(n.nextReviewDate).toISOString().slice(0,10):"",onChange:r=>g("nextReviewDate",r.target.value?new Date(r.target.value).getTime():void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]})})]}),jsxRuntime.jsxs("div",{className:"flex justify-end space-x-3",children:[jsxRuntime.jsx("button",{onClick:K,className:"px-4 py-2 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-700 text-sm",children:"Cancel"}),jsxRuntime.jsx("button",{onClick:ue,className:chunkE64TU6IU_js.a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm ${A}`,(e==null?void 0:e.primaryButton)||(e==null?void 0:e.submitButton),d),children:a?"Add Record":"Save Changes"})]})]})]})},ye=()=>jsxRuntime.jsxs("div",{className:"flex space-x-4 mb-6 border-b border-gray-200 dark:border-gray-600",children:[jsxRuntime.jsx("button",{onClick:()=>v("list"),className:`pb-2 text-sm font-medium ${b==="list"?"border-b-2 border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary))] dark:text-[rgb(var(--ndpr-primary))]":"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"}`,children:"Processing Records"}),jsxRuntime.jsx("button",{onClick:()=>v("summary"),className:`pb-2 text-sm font-medium ${b==="summary"?"border-b-2 border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary))] dark:text-[rgb(var(--ndpr-primary))]":"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"}`,children:"Compliance Summary"})]});return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${ae}`,e==null?void 0:e.root,d),children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("text-xl font-bold mb-2",e==null?void 0:e.title,d),children:te}),jsxRuntime.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:re}),be(),b!=="form"&&ye(),b==="list"&&xe(),b==="summary"&&ve(),b==="form"&&fe()]})};exports.a=Pe;//# sourceMappingURL=chunk-UZ5EZOA7.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
'use strict';var chunkGOU6FU6Y_js=require('./chunk-GOU6FU6Y.js'),chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var I=[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_interest",label:"Public Interest (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}],N=[{value:"active",label:"Active"},{value:"inactive",label:"Inactive"},{value:"archived",label:"Archived"}],ke=[{value:"data_subject",label:"Directly from Data Subject"},{value:"third_party",label:"Third Party"},{value:"public_source",label:"Public Source"},{value:"other",label:"Other"}];function we(){let l=Date.now();return {id:`proc_${l}_${Math.random().toString(36).substring(2,11)}`,name:"",description:"",controllerDetails:{name:"",contact:"",address:""},lawfulBasis:"consent",lawfulBasisJustification:"",purposes:[],dataCategories:[],dataSubjectCategories:[],recipients:[],retentionPeriod:"",securityMeasures:[],dataSource:"data_subject",dpiaRequired:false,automatedDecisionMaking:false,status:"active",createdAt:l,updatedAt:l}}function ee(l){return l?new Date(l).toLocaleDateString():"N/A"}var Pe=({ropa:l,onAddRecord:R,onUpdateRecord:S,onArchiveRecord:P,title:te="Record of Processing Activities (ROPA)",description:re="Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",className:ae="",buttonClassName:A="",classNames:e,unstyled:d})=>{let[b,v]=react.useState("list"),[w,ie]=react.useState(""),[C,oe]=react.useState("all"),[D,de]=react.useState("all"),[n,x]=react.useState(null),[M,h]=react.useState([]),[O,L]=react.useState(""),[j,_]=react.useState(""),[E,T]=react.useState(""),[U,$]=react.useState(""),[J,q]=react.useState(""),[V,G]=react.useState(""),[z,H]=react.useState(""),c=react.useMemo(()=>chunkGOU6FU6Y_js.b(l),[l]),f=react.useMemo(()=>chunkGOU6FU6Y_js.d(l),[l]),W=react.useMemo(()=>{let a=[...l.records];if(C!=="all"&&(a=a.filter(r=>r.status===C)),D!=="all"&&(a=a.filter(r=>r.lawfulBasis===D)),w){let r=w.toLowerCase();a=a.filter(u=>u.name.toLowerCase().includes(r)||u.description.toLowerCase().includes(r)||u.dataCategories.some(p=>p.toLowerCase().includes(r))||u.department&&u.department.toLowerCase().includes(r));}return a},[l.records,C,D,w]);react.useEffect(()=>{n&&(L(n.purposes.join(", ")),_(n.dataCategories.join(", ")),T((n.sensitiveDataCategories||[]).join(", ")),$(n.dataSubjectCategories.join(", ")),q(n.recipients.join(", ")),G(n.securityMeasures.join(", ")),H((n.systemsUsed||[]).join(", ")));},[n==null?void 0:n.id]);let ne=()=>{let a=we();a.controllerDetails.name=l.organizationName,a.controllerDetails.contact=l.organizationContact,a.controllerDetails.address=l.organizationAddress,l.ndpcRegistrationNumber&&(a.controllerDetails.registrationNumber=l.ndpcRegistrationNumber),l.dpoDetails&&(a.controllerDetails.dpoContact=l.dpoDetails.email),x(a),h([]),v("form");},le=a=>{x(chunkMQFZHA2D_js.a({},a)),h([]),v("form");},m=a=>a.split(",").map(r=>r.trim()).filter(r=>r.length>0),ue=()=>{if(!n)return;let a=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},n),{purposes:m(O),dataCategories:m(j),sensitiveDataCategories:m(E),dataSubjectCategories:m(U),recipients:m(J),securityMeasures:m(V),systemsUsed:m(z),updatedAt:Date.now()});a.sensitiveDataCategories&&a.sensitiveDataCategories.length===0&&(a.sensitiveDataCategories=void 0),a.systemsUsed&&a.systemsUsed.length===0&&(a.systemsUsed=void 0);let r=chunkGOU6FU6Y_js.a(a);if(!r.valid){h(r.errors);return}l.records.find(p=>p.id===a.id)?S==null||S(a.id,a):R==null||R(a),x(null),h([]),v("list");},ge=a=>{P==null||P(a);},se=()=>{let a=chunkGOU6FU6Y_js.c(l),r=new Blob([a],{type:"text/csv;charset=utf-8;"}),u=URL.createObjectURL(r),p=document.createElement("a");p.href=u,p.download=`ropa_${l.organizationName.replace(/\s+/g,"_").toLowerCase()}_${new Date().toISOString().slice(0,10)}.csv`,p.click(),setTimeout(()=>URL.revokeObjectURL(u),100);},K=()=>{x(null),h([]),v("list");},g=(a,r)=>{n&&x(u=>u&&chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},u),{[a]:r}));},B=(a,r)=>{n&&x(u=>u&&chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},u),{controllerDetails:chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},u.controllerDetails),{[a]:r})}));},ce=a=>!!a.nextReviewDate&&a.nextReviewDate<=Date.now(),pe=a=>{let r={active:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",inactive:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},u={active:"Active",inactive:"Inactive",archived:"Archived"};return jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(`px-2 py-1 rounded text-xs font-medium ${r[a]}`,e==null?void 0:e.statusBadge,d),children:u[a]})},me=a=>jsxRuntime.jsx("span",{className:"px-2 py-1 rounded text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",children:{consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"}[a]}),be=()=>jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("mb-6 p-4 bg-gray-50 dark:bg-gray-700 rounded-md",e==null?void 0:e.orgInfo,d),children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Organization"}),jsxRuntime.jsx("p",{className:"text-sm font-semibold",children:l.organizationName})]}),l.dpoDetails&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Data Protection Officer"}),jsxRuntime.jsx("p",{className:"text-sm font-semibold",children:l.dpoDetails.name}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:l.dpoDetails.email})]}),l.ndpcRegistrationNumber&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"NDPC Registration No."}),jsxRuntime.jsx("p",{className:"text-sm font-semibold",children:l.ndpcRegistrationNumber})]})]}),jsxRuntime.jsxs("div",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:["Version ",l.version," | Last Updated: ",ee(l.lastUpdated)]})]}),ve=()=>jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("mb-6",e==null?void 0:e.summary,d),children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d),children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold text-blue-700 dark:text-blue-300",children:c.totalRecords}),jsxRuntime.jsx("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:"Total Records"})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d),children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold text-green-700 dark:text-green-300",children:c.activeRecords}),jsxRuntime.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:"Active"})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d),children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold text-purple-700 dark:text-purple-300",children:c.crossBorderRecords}),jsxRuntime.jsx("p",{className:"text-xs text-purple-600 dark:text-purple-400",children:"Cross-Border"})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center",e==null?void 0:e.summaryCard,d),children:[jsxRuntime.jsx("p",{className:"text-2xl font-bold text-orange-700 dark:text-orange-300",children:f.length}),jsxRuntime.jsx("p",{className:"text-xs text-orange-600 dark:text-orange-400",children:"Records with Gaps"})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2",children:"By Lawful Basis"}),I.map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:a.label.split(" (")[0]}),jsxRuntime.jsx("span",{className:"font-medium",children:c.byLawfulBasis[a.value]||0})]},a.value))]}),jsxRuntime.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2",children:"Risk Indicators"}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Sensitive Data"}),jsxRuntime.jsx("span",{className:"font-medium",children:c.sensitiveDataRecords})]}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"DPIA Required"}),jsxRuntime.jsx("span",{className:"font-medium",children:c.dpiaRequiredRecords})]}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Automated Decisions"}),jsxRuntime.jsx("span",{className:"font-medium",children:c.automatedDecisionRecords})]}),jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Due for Review"}),jsxRuntime.jsx("span",{className:`font-medium ${c.recordsDueForReview.length>0?"text-red-600 dark:text-red-400":""}`,children:c.recordsDueForReview.length})]})]}),c.topDepartments.length>0&&jsxRuntime.jsxs("div",{className:"p-3 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium mb-2",children:"Top Departments"}),c.topDepartments.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:a.department}),jsxRuntime.jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]}),f.length>0&&jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md",e==null?void 0:e.complianceGap,d),children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-2",children:"Compliance Gaps Detected"}),f.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"mb-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium text-red-700 dark:text-red-300",children:a.recordName}),jsxRuntime.jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((r,u)=>jsxRuntime.jsx("li",{className:"text-xs text-red-600 dark:text-red-400",children:r},u))})]},a.recordId)),f.length>5&&jsxRuntime.jsxs("p",{className:"text-xs text-red-600 dark:text-red-400 mt-1",children:["...and ",f.length-5," more record(s) with gaps."]})]})]}),xe=()=>jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"mb-4 grid grid-cols-1 md:grid-cols-4 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"ropaSearch",className:"block text-sm font-medium mb-1",children:"Search"}),jsxRuntime.jsx("input",{type:"text",id:"ropaSearch",value:w,onChange:a=>ie(a.target.value),placeholder:"Search records...",className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"ropaStatusFilter",className:"block text-sm font-medium mb-1",children:"Status"}),jsxRuntime.jsxs("select",{id:"ropaStatusFilter",value:C,onChange:a=>oe(a.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:[jsxRuntime.jsx("option",{value:"all",children:"All Statuses"}),N.map(a=>jsxRuntime.jsx("option",{value:a.value,children:a.label},a.value))]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"ropaBasisFilter",className:"block text-sm font-medium mb-1",children:"Lawful Basis"}),jsxRuntime.jsxs("select",{id:"ropaBasisFilter",value:D,onChange:a=>de(a.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:[jsxRuntime.jsx("option",{value:"all",children:"All Bases"}),I.map(a=>jsxRuntime.jsx("option",{value:a.value,children:a.label.split(" (")[0]},a.value))]})]}),jsxRuntime.jsxs("div",{className:"flex items-end space-x-2",children:[jsxRuntime.jsx("button",{onClick:ne,className:chunkE64TU6IU_js.a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm ${A}`,(e==null?void 0:e.primaryButton)||(e==null?void 0:e.submitButton),d),children:"Add Record"}),jsxRuntime.jsx("button",{onClick:se,className:chunkE64TU6IU_js.a(`px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700 text-sm ${A}`,(e==null?void 0:e.secondaryButton)||(e==null?void 0:e.exportButton),d),children:"Export CSV"})]})]}),W.length===0?jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm text-center py-8",children:"No processing records found."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:chunkE64TU6IU_js.a("w-full text-sm text-left",e==null?void 0:e.table,d),children:[jsxRuntime.jsx("thead",{className:chunkE64TU6IU_js.a("text-xs uppercase bg-gray-50 dark:bg-gray-700",e==null?void 0:e.tableHeader,d),children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Name"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Lawful Basis"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Data Categories"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Status"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Last Reviewed"}),jsxRuntime.jsx("th",{className:"px-4 py-3",children:"Actions"})]})}),jsxRuntime.jsx("tbody",{children:W.map(a=>{let r=ce(a),u=f.some(p=>p.recordId===a.id);return jsxRuntime.jsxs("tr",{className:chunkE64TU6IU_js.a(`border-b dark:border-gray-600 ${r?"bg-red-50 dark:bg-red-900/10":u?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} hover:bg-gray-50 dark:hover:bg-gray-700`,e==null?void 0:e.tableRow,d),children:[jsxRuntime.jsx("td",{className:"px-4 py-3",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium",children:a.name}),a.department&&jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:a.department}),r&&jsxRuntime.jsx("span",{className:"text-xs text-red-600 dark:text-red-400 font-medium",children:"Review Overdue"})]})}),jsxRuntime.jsx("td",{className:"px-4 py-3",children:me(a.lawfulBasis)}),jsxRuntime.jsx("td",{className:"px-4 py-3",children:jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300 max-w-xs truncate",children:a.dataCategories.join(", ")})}),jsxRuntime.jsx("td",{className:"px-4 py-3",children:pe(a.status)}),jsxRuntime.jsx("td",{className:"px-4 py-3 text-xs text-gray-600 dark:text-gray-400",children:ee(a.lastReviewedAt)}),jsxRuntime.jsx("td",{className:"px-4 py-3",children:jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx("button",{onClick:()=>le(a),className:"text-[rgb(var(--ndpr-primary))] dark:text-[rgb(var(--ndpr-primary))] hover:underline text-xs",children:"Edit"}),a.status!=="archived"&&jsxRuntime.jsx("button",{onClick:()=>ge(a.id),className:"text-gray-600 dark:text-gray-400 hover:underline text-xs",children:"Archive"})]})})]},a.id)})})]})})]}),fe=()=>{if(!n)return null;let a=!l.records.find(r=>r.id===n.id);return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("",e==null?void 0:e.form,d),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex justify-between items-center mb-4",e==null?void 0:e.header,d),children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium",children:a?"Add Processing Record":"Edit Processing Record"}),jsxRuntime.jsx("button",{onClick:K,className:"text-gray-600 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 text-sm",children:"Cancel"})]}),M.length>0&&jsxRuntime.jsxs("div",{className:"mb-4 p-3 bg-red-50 dark:bg-red-900/20 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Please fix the following errors:"}),jsxRuntime.jsx("ul",{className:"list-disc list-inside",children:M.map((r,u)=>jsxRuntime.jsx("li",{className:"text-xs text-red-600 dark:text-red-400",children:r},u))})]}),jsxRuntime.jsxs("div",{className:"space-y-6",children:[jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Basic Information"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"recordName",className:"block text-sm font-medium mb-1",children:"Activity Name *"}),jsxRuntime.jsx("input",{type:"text",id:"recordName",value:n.name,onChange:r=>g("name",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Customer Account Management"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"recordDepartment",className:"block text-sm font-medium mb-1",children:"Department"}),jsxRuntime.jsx("input",{type:"text",id:"recordDepartment",value:n.department||"",onChange:r=>g("department",r.target.value||void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Marketing"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"recordDescription",className:"block text-sm font-medium mb-1",children:"Description *"}),jsxRuntime.jsx("textarea",{id:"recordDescription",value:n.description,onChange:r=>g("description",r.target.value),rows:3,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Describe what personal data processing is performed..."})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"recordStatus",className:"block text-sm font-medium mb-1",children:"Status *"}),jsxRuntime.jsx("select",{id:"recordStatus",value:n.status,onChange:r=>g("status",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:N.map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value))})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Controller Details"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"controllerName",className:"block text-sm font-medium mb-1",children:"Controller Name *"}),jsxRuntime.jsx("input",{type:"text",id:"controllerName",value:n.controllerDetails.name,onChange:r=>B("name",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"controllerContact",className:"block text-sm font-medium mb-1",children:"Controller Contact *"}),jsxRuntime.jsx("input",{type:"text",id:"controllerContact",value:n.controllerDetails.contact,onChange:r=>B("contact",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"controllerAddress",className:"block text-sm font-medium mb-1",children:"Controller Address *"}),jsxRuntime.jsx("input",{type:"text",id:"controllerAddress",value:n.controllerDetails.address,onChange:r=>B("address",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Lawful Basis (NDPA Section 25)"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"lawfulBasis",className:"block text-sm font-medium mb-1",children:"Lawful Basis *"}),jsxRuntime.jsx("select",{id:"lawfulBasis",value:n.lawfulBasis,onChange:r=>g("lawfulBasis",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:I.map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value))})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"lawfulBasisJustification",className:"block text-sm font-medium mb-1",children:"Justification *"}),jsxRuntime.jsx("textarea",{id:"lawfulBasisJustification",value:n.lawfulBasisJustification,onChange:r=>g("lawfulBasisJustification",r.target.value),rows:2,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Explain why this lawful basis applies..."})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Data Details"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"purposes",className:"block text-sm font-medium mb-1",children:"Purposes * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"purposes",value:O,onChange:r=>L(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Account management, Service delivery"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dataCategories",className:"block text-sm font-medium mb-1",children:"Data Categories * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"dataCategories",value:j,onChange:r=>_(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Name, Email, Phone number"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"sensitiveData",className:"block text-sm font-medium mb-1",children:"Sensitive Data Categories (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"sensitiveData",value:E,onChange:r=>T(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Health data, Biometric data"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"subjectCategories",className:"block text-sm font-medium mb-1",children:"Data Subject Categories * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"subjectCategories",value:U,onChange:r=>$(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Customers, Employees"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"recipients",className:"block text-sm font-medium mb-1",children:"Recipients * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"recipients",value:J,onChange:r=>q(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Payment processors, Cloud service providers"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dataSource",className:"block text-sm font-medium mb-1",children:"Data Source *"}),jsxRuntime.jsx("select",{id:"dataSource",value:n.dataSource,onChange:r=>g("dataSource",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.select,d),children:ke.map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value))})]}),n.dataSource==="third_party"&&jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"thirdPartyDetails",className:"block text-sm font-medium mb-1",children:"Third-Party Source Details *"}),jsxRuntime.jsx("input",{type:"text",id:"thirdPartyDetails",value:n.thirdPartySourceDetails||"",onChange:r=>g("thirdPartySourceDetails",r.target.value||void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Describe the third-party data source..."})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Retention and Security"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"retentionPeriod",className:"block text-sm font-medium mb-1",children:"Retention Period *"}),jsxRuntime.jsx("input",{type:"text",id:"retentionPeriod",value:n.retentionPeriod,onChange:r=>g("retentionPeriod",r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., 5 years after account closure"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"retentionJustification",className:"block text-sm font-medium mb-1",children:"Retention Justification"}),jsxRuntime.jsx("input",{type:"text",id:"retentionJustification",value:n.retentionJustification||"",onChange:r=>g("retentionJustification",r.target.value||void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Why this retention period is necessary..."})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"securityMeasures",className:"block text-sm font-medium mb-1",children:"Security Measures * (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"securityMeasures",value:V,onChange:r=>G(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., Encryption at rest, Access controls, Audit logging"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"systemsUsed",className:"block text-sm font-medium mb-1",children:"Systems Used (comma-separated)"}),jsxRuntime.jsx("input",{type:"text",id:"systemsUsed",value:z,onChange:r=>H(r.target.value),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"e.g., CRM, ERP, Cloud Storage"})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Risk Indicators"}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("input",{type:"checkbox",id:"dpiaRequired",checked:n.dpiaRequired,onChange:r=>g("dpiaRequired",r.target.checked),className:"rounded border-gray-300 dark:border-gray-600"}),jsxRuntime.jsx("label",{htmlFor:"dpiaRequired",className:"text-sm font-medium",children:"DPIA Required"})]}),n.dpiaRequired&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpiaReference",className:"block text-sm font-medium mb-1",children:"DPIA Reference *"}),jsxRuntime.jsx("input",{type:"text",id:"dpiaReference",value:n.dpiaReference||"",onChange:r=>g("dpiaReference",r.target.value||void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Reference to the completed DPIA"})]}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("input",{type:"checkbox",id:"automatedDecisionMaking",checked:n.automatedDecisionMaking,onChange:r=>g("automatedDecisionMaking",r.target.checked),className:"rounded border-gray-300 dark:border-gray-600"}),jsxRuntime.jsx("label",{htmlFor:"automatedDecisionMaking",className:"text-sm font-medium",children:"Automated Decision-Making"})]}),n.automatedDecisionMaking&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"automatedDecisionMakingDetails",className:"block text-sm font-medium mb-1",children:"Automated Decision-Making Details *"}),jsxRuntime.jsx("textarea",{id:"automatedDecisionMakingDetails",value:n.automatedDecisionMakingDetails||"",onChange:r=>g("automatedDecisionMakingDetails",r.target.value||void 0),rows:2,className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d),placeholder:"Describe the automated decision-making process..."})]})]})]}),jsxRuntime.jsxs("fieldset",{className:"border border-gray-200 dark:border-gray-600 rounded-md p-4",children:[jsxRuntime.jsx("legend",{className:"text-sm font-medium px-2",children:"Review Schedule"}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"nextReviewDate",className:"block text-sm font-medium mb-1",children:"Next Review Date"}),jsxRuntime.jsx("input",{type:"date",id:"nextReviewDate",value:n.nextReviewDate?new Date(n.nextReviewDate).toISOString().slice(0,10):"",onChange:r=>g("nextReviewDate",r.target.value?new Date(r.target.value).getTime():void 0),className:chunkE64TU6IU_js.a("w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",e==null?void 0:e.input,d)})]})})]}),jsxRuntime.jsxs("div",{className:"flex justify-end space-x-3",children:[jsxRuntime.jsx("button",{onClick:K,className:"px-4 py-2 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-700 text-sm",children:"Cancel"}),jsxRuntime.jsx("button",{onClick:ue,className:chunkE64TU6IU_js.a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] text-sm ${A}`,(e==null?void 0:e.primaryButton)||(e==null?void 0:e.submitButton),d),children:a?"Add Record":"Save Changes"})]})]})]})},ye=()=>jsxRuntime.jsxs("div",{className:"flex space-x-4 mb-6 border-b border-gray-200 dark:border-gray-600",children:[jsxRuntime.jsx("button",{onClick:()=>v("list"),className:`pb-2 text-sm font-medium ${b==="list"?"border-b-2 border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary))] dark:text-[rgb(var(--ndpr-primary))]":"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"}`,children:"Processing Records"}),jsxRuntime.jsx("button",{onClick:()=>v("summary"),className:`pb-2 text-sm font-medium ${b==="summary"?"border-b-2 border-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary))] dark:text-[rgb(var(--ndpr-primary))]":"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300"}`,children:"Compliance Summary"})]});return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${ae}`,e==null?void 0:e.root,d),children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("text-xl font-bold mb-2",e==null?void 0:e.title,d),children:te}),jsxRuntime.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:re}),be(),b!=="form"&&ye(),b==="list"&&xe(),b==="summary"&&ve(),b==="form"&&fe()]})};exports.a=Pe;//# sourceMappingURL=chunk-VK27WVV3.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-VK27WVV3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$2,b}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {a as a$2,b}from'./chunk-R3OYAJI6.mjs';import {a}from'./chunk-U62QYKVG.mjs';import {a as a$1}from'./chunk-6WIP33TW.mjs';import {useRef,useState,useEffect,useCallback}from'react';function F(n){if(!n)return a$1("ndpr_consent");let{storageKey:o="ndpr_consent",storageType:i="localStorage"}=n;return i==="sessionStorage"?a$2(o):i==="cookie"?b(o,n.cookieOptions):a$1(o)}function k(n,o,i,r,a$1,g,l){if(n){i(n);let{valid:s,errors:c}=a(n);r(s),a$1(c),g(!(s&&n.version===o));}else g(true);l(false);}function z({options:n,adapter:o,storageOptions:i,version:r="1.0",onChange:a$1}){let g=o!=null?o:F(i),l=useRef(g);l.current=g;let[s,c]=useState(null),[y,d]=useState(false),[E,C]=useState(false),[w,S]=useState([]),[I,v]=useState(true);useEffect(()=>{let e=false;try{let t=l.current.load();t instanceof Promise?t.then(m=>{e||k(m,r,c,C,S,d,v);},()=>{e||(d(!0),v(!1));}):k(t,r,c,C,S,d,v);}catch(t){e||(d(true),v(false));}return ()=>{e=true;}},[r]);let h=useCallback(e=>{let{valid:t,errors:m}=a(e);C(t),S(m),a$1==null||a$1(e),Promise.resolve(l.current.save(e)).catch(P=>{console.warn("[ndpr-toolkit] Failed to save consent:",P);});},[a$1]),f=useCallback(e=>{let t={consents:e,timestamp:Date.now(),version:r,method:"explicit",hasInteracted:true};c(t),h(t),d(false);},[r,h]),L=useCallback(()=>{let e={};n.forEach(t=>{e[t.id]=true;}),f(e);},[n,f]),U=useCallback(()=>{let e={};n.forEach(t=>{e[t.id]=t.required||false;}),f(e);},[n,f]),V=useCallback(e=>!!(s!=null&&s.consents[e]),[s]),j=useCallback(()=>{c(null),d(true),C(false),S([]),Promise.resolve(l.current.remove()).catch(e=>{console.warn("[ndpr-toolkit] Failed to remove consent:",e);});},[]);return {settings:s,hasConsent:V,updateConsent:f,acceptAll:L,rejectAll:U,shouldShowBanner:y,isValid:E,validationErrors:w,resetConsent:j,isLoading:I}}export{z as a};//# sourceMappingURL=chunk-VWPGIES4.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-VWPGIES4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {c}from'./chunk-QKK5S54L.mjs';import {a as a$1}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import {c}from'./chunk-QKK5S54L.mjs';import {a as a$1}from'./chunk-6WIP33TW.mjs';import {b,a}from'./chunk-WWT2ZSNU.mjs';import {useRef,useState,useEffect,useCallback}from'react';function j(m,l){return l?a$1(m):{load:()=>null,save:()=>{},remove:()=>{}}}function Q({initialTransfers:m=[],adapter:l,storageKey:R="ndpr_cross_border_transfers",useLocalStorage:q=true,onAdd:g,onUpdate:C,onRemove:B}={}){let y=l!=null?l:j(R,q),v=useRef(y);v.current=y;let[i,u]=useState(m),[x,T]=useState(true);useEffect(()=>{let e=false;try{let r=v.current.load();r instanceof Promise?r.then(t=>{e||(t&&u(t),T(!1));},()=>{e||T(!1);}):(r&&u(r),T(!1));}catch(r){e||T(false);}return ()=>{e=true;}},[]);let f=useCallback(e=>{Promise.resolve(v.current.save(e)).catch(r=>{console.warn("[ndpr-toolkit] Failed to save cross-border transfers:",r);});},[]),M=()=>"cbt_"+Date.now()+"_"+Math.random().toString(36).substring(2,11),D=useCallback(e=>{let r=Date.now(),t=b(a({},e),{id:M(),createdAt:r,updatedAt:r});return u(a=>{let n=[...a,t];return f(n),n}),g&&g(t),t},[g,f]),k=useCallback((e,r)=>{let t=null;return u(a$1=>{let n=a$1.findIndex(A=>A.id===e);if(n===-1)return a$1;t=b(a(a({},a$1[n]),r),{updatedAt:Date.now()});let o=[...a$1];return o[n]=t,f(o),o}),t&&C&&C(t),t},[C,f]),I=useCallback(e=>{let r=false;return u(t=>{if(t.findIndex(o=>o.id===e)===-1)return t;r=true;let n=t.filter(o=>o.id!==e);return f(n),n}),r&&B&&B(e),r},[B,f]),L=useCallback(e=>i.find(r=>r.id===e)||null,[i]),U=useCallback(()=>{let e=Date.now(),r=i.filter(s=>s.status==="active"),t=["adequacy_decision","standard_clauses","binding_corporate_rules","ndpc_authorization","explicit_consent","contract_performance","public_interest","legal_claims","vital_interests"],a={};for(let s of t)a[s]=r.filter(c=>c.transferMechanism===s).length;let n=["adequate","inadequate","pending_review","unknown"],o={};for(let s of n)o[s]=r.filter(c=>c.adequacyStatus===s).length;let A=i.filter(s=>{var c,b;return s.status==="pending_approval"||((c=s.ndpcApproval)==null?void 0:c.required)&&!((b=s.ndpcApproval)!=null&&b.approved)}),P=720*60*60*1e3,V=i.filter(s=>s.reviewDate&&s.reviewDate<=e+P&&s.status==="active"),F=i.filter(s=>!s.tiaCompleted&&s.status==="active"),z=i.filter(s=>s.riskLevel==="high"&&s.status==="active");return {totalActiveTransfers:r.length,byMechanism:a,byAdequacy:o,pendingApproval:A,dueForReview:V,missingTIA:F,highRiskTransfers:z,lastUpdated:e}},[i]),O=useCallback(e=>c(e),[]);return {transfers:i,addTransfer:D,updateTransfer:k,removeTransfer:I,getTransfer:L,getSummary:U,validateTransfer:O,isLoading:x}}export{Q as a};//# sourceMappingURL=chunk-XQ4M5FHC.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-XQ4M5FHC.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {a}from'./chunk-WWT2ZSNU.mjs';function
|
|
1
|
+
import {a}from'./chunk-WWT2ZSNU.mjs';function m(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w(t,u){if(typeof t=="string"){let a=t,o=u,r=a,n=/\{\{([^}]+)\}\}/g,c;for(;(c=n.exec(a))!==null;){let e=c[1].trim(),i=o[e]||"";r=r.replace(new RegExp(`\\{\\{\\s*${m(e)}\\s*\\}\\}`,"g"),i);}return r}else {let a=t,o=u,r={},n=[];return a.filter(e=>e.included).sort((e,i)=>(e.order||0)-(i.order||0)).forEach(e=>{let i=e.template||e.customContent||e.defaultContent||"",h=/\{\{([^}]+)\}\}/g,p,g=[];for(;(p=h.exec(i))!==null;)g.push(p[1].trim());g.forEach(s=>{let l="";s in o&&(l=o[s]||""),l||n.push(s),i=i.replace(new RegExp(`\\{\\{\\s*${m(s)}\\s*\\}\\}`,"g"),l);}),r[e.id]=i;}),{fullText:Object.values(r).join(`
|
|
2
2
|
|
|
3
|
-
`),sectionTexts:r,missingVariables:Array.from(new Set(n))}}}var
|
|
3
|
+
`),sectionTexts:r,missingVariables:Array.from(new Set(n))}}}var y=[{id:"data-collection",title:"Data Collection",description:"Describes what personal data is collected and how it is obtained.",order:1,required:true,included:true,template:'{{orgName}} ("we", "us", or "our") collects personal data from users of our services at {{website}}. We collect information you provide directly, such as your name, email address, phone number, and any other details you submit through forms or communications. We may also collect data automatically, including IP addresses, browser type, device information, and usage patterns through cookies and similar technologies. All data collection is conducted in accordance with the Nigeria Data Protection Act (NDPA) 2023.',variables:["orgName","website"]},{id:"legal-basis",title:"Legal Basis for Processing",description:"Specifies the lawful basis for processing personal data under the NDPA.",order:2,required:true,included:true,template:`{{orgName}} processes personal data under one or more of the following lawful bases as prescribed by the NDPA 2023:
|
|
4
4
|
|
|
5
5
|
- Consent: where you have given clear, informed, and voluntary consent for a specific purpose.
|
|
6
6
|
- Contract: where processing is necessary to fulfil a contract with you or to take steps at your request before entering a contract.
|
|
@@ -59,5 +59,5 @@ DPO Email: {{dpoEmail}}
|
|
|
59
59
|
|
|
60
60
|
You also have the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC) if you believe your data protection rights have been violated.
|
|
61
61
|
|
|
62
|
-
This policy is effective as of {{effectiveDate}} and applies to all {{industry}} services provided by {{orgName}}.`,variables:["orgName","address","privacyEmail","website","dpoName","dpoEmail","effectiveDate","industry"]}],
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
This policy is effective as of {{effectiveDate}} and applies to all {{industry}} services provided by {{orgName}}.`,variables:["orgName","address","privacyEmail","website","dpoName","dpoEmail","effectiveDate","industry"]}],f=[{id:"orgName",name:"orgName",description:"The official name of your organisation.",value:"",inputType:"text",required:true},{id:"website",name:"website",description:"Your organisation's website URL.",value:"",inputType:"url",required:true},{id:"privacyEmail",name:"privacyEmail",description:"Email address for privacy-related enquiries.",value:"",inputType:"email",required:true},{id:"dpoName",name:"dpoName",description:"Full name of your Data Protection Officer.",value:"",inputType:"text",required:false},{id:"dpoEmail",name:"dpoEmail",description:"Email address of your Data Protection Officer.",value:"",inputType:"email",required:false},{id:"address",name:"address",description:"Physical address of your organisation.",value:"",inputType:"textarea",required:false},{id:"industry",name:"industry",description:"The industry or sector your organisation operates in.",value:"",inputType:"text",required:false},{id:"effectiveDate",name:"effectiveDate",description:"The date this privacy policy becomes effective.",value:"",inputType:"date",required:false}];function b(){return {sections:y.map(t=>a({},t)),variables:f.map(t=>a({},t))}}export{w as a,y as b,f as c,b as d};//# sourceMappingURL=chunk-ZEOQYWOE.mjs.map
|
|
63
|
+
//# sourceMappingURL=chunk-ZEOQYWOE.mjs.map
|
package/dist/consent.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk256APOQM_js=require('./chunk-256APOQM.js'),chunk555WWZ3W_js=require('./chunk-555WWZ3W.js'),chunkMJGOLP5M_js=require('./chunk-MJGOLP5M.js'),chunk7SMLHZ4B_js=require('./chunk-7SMLHZ4B.js');require('./chunk-A4PK7JB2.js');var chunkHO5M7M4M_js=require('./chunk-HO5M7M4M.js'),chunkE64TU6IU_js=require('./chunk-E64TU6IU.js');require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var R=react.createContext(null);function s(){let t=react.useContext(R);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var x=({options:t,adapter:e,version:p,onChange:r,children:c})=>{let d=chunk7SMLHZ4B_js.a({options:t,adapter:e,version:p,onChange:r}),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},d),{options:t});return jsxRuntime.jsx(R.Provider,{value:o,children:c})};var v=({classNames:t,unstyled:e})=>{let{options:p,settings:r}=s(),[c,d]=react.useState(()=>{let o={};return p.forEach(a=>{var i,A;o[a.id]=(A=(i=r==null?void 0:r.consents[a.id])!=null?i:a.defaultValue)!=null?A:false;}),o});return jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("space-y-3",t==null?void 0:t.root,e),"data-ndpr-component":"consent-option-list",children:p.map(o=>jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex items-start",t==null?void 0:t.optionItem,e),children:[jsxRuntime.jsx("div",{className:"flex items-center h-5",children:jsxRuntime.jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:a=>d(i=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},i),{[o.id]:a.target.checked})),disabled:o.required,className:chunkE64TU6IU_js.a("h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]",t==null?void 0:t.optionCheckbox,e),"aria-label":o.label})}),jsxRuntime.jsxs("div",{className:"ml-3 text-sm",children:[jsxRuntime.jsxs("label",{htmlFor:`consent-${o.id}`,className:chunkE64TU6IU_js.a("font-medium",t==null?void 0:t.optionLabel,e),children:[o.label," ",o.required&&jsxRuntime.jsx("span",{className:"text-red-500",children:"*"})]}),jsxRuntime.jsx("p",{className:chunkE64TU6IU_js.a("text-gray-600 dark:text-gray-400",t==null?void 0:t.optionDescription,e),children:o.description})]})]},o.id))})};var b=({children:t,className:e,unstyled:p})=>{let{acceptAll:r}=s();return jsxRuntime.jsx("button",{onClick:r,className:chunkE64TU6IU_js.a("px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded hover:bg-[rgb(var(--ndpr-primary-hover))]",e,p),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var y=({children:t,className:e,unstyled:p})=>{let{rejectAll:r}=s();return jsxRuntime.jsx("button",{onClick:r,className:chunkE64TU6IU_js.a("px-4 py-2 bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-white rounded hover:bg-gray-300 dark:hover:bg-gray-600",e,p),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var B=({children:t,className:e,unstyled:p,consents:r})=>{let{updateConsent:c,options:d}=s();return jsxRuntime.jsx("button",{onClick:()=>{if(r)c(r);else {let a={};d.forEach(i=>{a[i.id]=i.required||false;}),c(a);}},className:chunkE64TU6IU_js.a("px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded hover:bg-[rgb(var(--ndpr-primary-hover))]",e,p),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var D={Provider:x,OptionList:v,AcceptButton:b,RejectButton:y,SaveButton:B,Banner:chunk555WWZ3W_js.a,Settings:chunk256APOQM_js.a,Storage:chunk256APOQM_js.b};Object.defineProperty(exports,"ConsentManager",{enumerable:true,get:function(){return chunk256APOQM_js.a}});Object.defineProperty(exports,"ConsentStorage",{enumerable:true,get:function(){return chunk256APOQM_js.b}});Object.defineProperty(exports,"ConsentBanner",{enumerable:true,get:function(){return chunk555WWZ3W_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunkMJGOLP5M_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunkMJGOLP5M_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunkMJGOLP5M_js.b}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunk7SMLHZ4B_js.a}});Object.defineProperty(exports,"validateConsent",{enumerable:true,get:function(){return chunkHO5M7M4M_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkHO5M7M4M_js.b}});Object.defineProperty(exports,"resolveClass",{enumerable:true,get:function(){return chunkE64TU6IU_js.a}});exports.Consent=D;exports.ConsentAcceptButton=b;exports.ConsentOptionList=v;exports.ConsentProvider=x;exports.ConsentRejectButton=y;exports.ConsentSaveButton=B;exports.useConsentCompound=s;//# sourceMappingURL=consent.js.map
|
|
2
2
|
//# sourceMappingURL=consent.js.map
|
package/dist/consent.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b as b$1,a}from'./chunk-
|
|
1
|
+
import {b as b$1,a}from'./chunk-Q7VHB64E.mjs';export{a as ConsentManager,b as ConsentStorage}from'./chunk-Q7VHB64E.mjs';import {a as a$1}from'./chunk-4XCL62MJ.mjs';export{a as ConsentBanner}from'./chunk-4XCL62MJ.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-P3PULLYP.mjs';import {a as a$2}from'./chunk-VWPGIES4.mjs';export{a as useConsent}from'./chunk-VWPGIES4.mjs';import'./chunk-R3OYAJI6.mjs';export{a as validateConsent,b as validateConsentOptions}from'./chunk-U62QYKVG.mjs';import {a as a$4}from'./chunk-AYKLAEOU.mjs';export{a as resolveClass}from'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {b as b$2,a as a$3}from'./chunk-WWT2ZSNU.mjs';import {createContext,useContext,useState}from'react';import {jsx,jsxs}from'react/jsx-runtime';var R=createContext(null);function s(){let t=useContext(R);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var x=({options:t,adapter:e,version:p,onChange:r,children:c})=>{let d=a$2({options:t,adapter:e,version:p,onChange:r}),o=b$2(a$3({},d),{options:t});return jsx(R.Provider,{value:o,children:c})};var v=({classNames:t,unstyled:e})=>{let{options:p,settings:r}=s(),[c,d]=useState(()=>{let o={};return p.forEach(a=>{var i,A;o[a.id]=(A=(i=r==null?void 0:r.consents[a.id])!=null?i:a.defaultValue)!=null?A:false;}),o});return jsx("div",{className:a$4("space-y-3",t==null?void 0:t.root,e),"data-ndpr-component":"consent-option-list",children:p.map(o=>jsxs("div",{className:a$4("flex items-start",t==null?void 0:t.optionItem,e),children:[jsx("div",{className:"flex items-center h-5",children:jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:a=>d(i=>b$2(a$3({},i),{[o.id]:a.target.checked})),disabled:o.required,className:a$4("h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]",t==null?void 0:t.optionCheckbox,e),"aria-label":o.label})}),jsxs("div",{className:"ml-3 text-sm",children:[jsxs("label",{htmlFor:`consent-${o.id}`,className:a$4("font-medium",t==null?void 0:t.optionLabel,e),children:[o.label," ",o.required&&jsx("span",{className:"text-red-500",children:"*"})]}),jsx("p",{className:a$4("text-gray-600 dark:text-gray-400",t==null?void 0:t.optionDescription,e),children:o.description})]})]},o.id))})};var b=({children:t,className:e,unstyled:p})=>{let{acceptAll:r}=s();return jsx("button",{onClick:r,className:a$4("px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded hover:bg-[rgb(var(--ndpr-primary-hover))]",e,p),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var y=({children:t,className:e,unstyled:p})=>{let{rejectAll:r}=s();return jsx("button",{onClick:r,className:a$4("px-4 py-2 bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-white rounded hover:bg-gray-300 dark:hover:bg-gray-600",e,p),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var B=({children:t,className:e,unstyled:p,consents:r})=>{let{updateConsent:c,options:d}=s();return jsx("button",{onClick:()=>{if(r)c(r);else {let a={};d.forEach(i=>{a[i.id]=i.required||false;}),c(a);}},className:a$4("px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-[rgb(var(--ndpr-primary-foreground))] rounded hover:bg-[rgb(var(--ndpr-primary-hover))]",e,p),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var D={Provider:x,OptionList:v,AcceptButton:b,RejectButton:y,SaveButton:B,Banner:a$1,Settings:a,Storage:b$1};export{D as Consent,b as ConsentAcceptButton,v as ConsentOptionList,x as ConsentProvider,y as ConsentRejectButton,B as ConsentSaveButton,s as useConsentCompound};//# sourceMappingURL=consent.mjs.map
|
|
2
2
|
//# sourceMappingURL=consent.mjs.map
|
package/dist/core.d.mts
CHANGED
|
@@ -9,59 +9,22 @@ export { P as ProcessingRecord, R as ROPASummary, a as RecordOfProcessingActivit
|
|
|
9
9
|
export { L as LawfulBasisComplianceGap, a as LawfulBasisValidationResult, b as assessComplianceGaps, g as generateLawfulBasisSummary, c as getLawfulBasisDescription, v as validateProcessingActivity } from './lawful-basis-C2eGaoHM.mjs';
|
|
10
10
|
export { T as TransferRiskResult, a as TransferValidationResult, b as assessTransferRisk, g as getTransferMechanismDescription, i as isNDPCApprovalRequired, v as validateTransfer } from './cross-border-BBi9rZyO.mjs';
|
|
11
11
|
export { R as ROPAComplianceGap, a as ROPAValidationResult, e as exportROPAToCSV, g as generateROPASummary, i as identifyComplianceGaps, v as validateProcessingRecord } from './ropa-NIgxd8uP.mjs';
|
|
12
|
-
import
|
|
12
|
+
import { b as NDPRLocale, d as defaultLocale } from './sanitize-9mOO_cJW.mjs';
|
|
13
|
+
export { N as NDPRConfig, a as NDPRProvider, s as sanitizeInput, u as useNDPRConfig, c as useNDPRLocale } from './sanitize-9mOO_cJW.mjs';
|
|
13
14
|
export { C as ConsentAuditEntry, a as appendAuditEntry, c as createAuditEntry, g as getAuditLog, v as validateConsent, b as validateConsentOptions } from './consent-audit-BdByjYlM.mjs';
|
|
14
15
|
export { f as formatDSRRequest } from './dsr-D_eTNc4S.mjs';
|
|
15
16
|
export { a as assessDPIARisk } from './dpia-CUfOmzvX.mjs';
|
|
16
17
|
export { c as calculateBreachSeverity } from './breach-B_-6lDqS.mjs';
|
|
17
18
|
export { D as DEFAULT_POLICY_SECTIONS, a as DEFAULT_POLICY_VARIABLES, c as createBusinessPolicyTemplate, g as generatePolicyText } from './policy-templates-DMsPwOSZ.mjs';
|
|
19
|
+
export { C as ComplianceGap, a as ComplianceResult, b as CustomSection, D as DataCategory, P as PolicyDraft, T as TemplateContext, c as ThirdPartyProcessor, d as createDefaultContext } from './policy-engine-C-tShzZH.mjs';
|
|
20
|
+
export { a as assemblePolicy, e as evaluatePolicyCompliance } from './policy-sections-CfNVBLCh.mjs';
|
|
18
21
|
export { C as ComplianceInput, a as ComplianceRating, b as ComplianceReport, E as EffortLevel, M as ModuleScore, R as Recommendation, c as RecommendationPriority, d as RegulatoryReference, g as getComplianceScore } from './compliance-score-racQe_E_.mjs';
|
|
22
|
+
import 'react';
|
|
19
23
|
|
|
20
24
|
/**
|
|
21
|
-
*
|
|
25
|
+
* Deep merges a partial locale with the default English locale.
|
|
26
|
+
* Any missing keys fall back to English.
|
|
22
27
|
*/
|
|
23
|
-
|
|
24
|
-
/** The official name of the organisation */
|
|
25
|
-
organizationName?: string;
|
|
26
|
-
/** Email address of the Data Protection Officer */
|
|
27
|
-
dpoEmail?: string;
|
|
28
|
-
/** NDPC registration number, if registered */
|
|
29
|
-
ndpcRegistrationNumber?: string;
|
|
30
|
-
/** Prefix for localStorage/sessionStorage keys used by toolkit components */
|
|
31
|
-
storageKeyPrefix?: string;
|
|
32
|
-
/** When true, removes all default styles from toolkit components */
|
|
33
|
-
unstyled?: boolean;
|
|
34
|
-
/** Theme overrides applied as CSS custom properties */
|
|
35
|
-
theme?: {
|
|
36
|
-
/** Primary brand colour (e.g. "#0070f3") */
|
|
37
|
-
primary?: string;
|
|
38
|
-
/** Hover state for primary colour */
|
|
39
|
-
primaryHover?: string;
|
|
40
|
-
/** Foreground colour used on primary backgrounds */
|
|
41
|
-
primaryForeground?: string;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Provides NDPR configuration to all descendant toolkit components.
|
|
46
|
-
*
|
|
47
|
-
* When a `theme` is supplied, the corresponding CSS custom properties
|
|
48
|
-
* (`--ndpr-primary`, `--ndpr-primary-hover`, `--ndpr-primary-foreground`)
|
|
49
|
-
* are set on the wrapping element so components can reference them.
|
|
50
|
-
*/
|
|
51
|
-
declare const NDPRProvider: React__default.FC<NDPRConfig & {
|
|
52
|
-
children: React__default.ReactNode;
|
|
53
|
-
}>;
|
|
54
|
-
/**
|
|
55
|
-
* Returns the current NDPR configuration from the nearest `NDPRProvider`.
|
|
56
|
-
* If no provider is found, returns an empty config object.
|
|
57
|
-
*/
|
|
58
|
-
declare function useNDPRConfig(): NDPRConfig;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Sanitizes user input to prevent XSS attacks.
|
|
62
|
-
* Escapes HTML special characters so that data rendered in dashboards
|
|
63
|
-
* or other consumer UIs cannot execute embedded scripts.
|
|
64
|
-
*/
|
|
65
|
-
declare function sanitizeInput(input: string): string;
|
|
28
|
+
declare function mergeLocale(partial?: NDPRLocale): typeof defaultLocale;
|
|
66
29
|
|
|
67
|
-
export {
|
|
30
|
+
export { NDPRLocale, defaultLocale, mergeLocale };
|
package/dist/core.d.ts
CHANGED
|
@@ -9,59 +9,22 @@ export { P as ProcessingRecord, R as ROPASummary, a as RecordOfProcessingActivit
|
|
|
9
9
|
export { L as LawfulBasisComplianceGap, a as LawfulBasisValidationResult, b as assessComplianceGaps, g as generateLawfulBasisSummary, c as getLawfulBasisDescription, v as validateProcessingActivity } from './lawful-basis-BEyI0kGg.js';
|
|
10
10
|
export { T as TransferRiskResult, a as TransferValidationResult, b as assessTransferRisk, g as getTransferMechanismDescription, i as isNDPCApprovalRequired, v as validateTransfer } from './cross-border-Dy-U9Hu6.js';
|
|
11
11
|
export { R as ROPAComplianceGap, a as ROPAValidationResult, e as exportROPAToCSV, g as generateROPASummary, i as identifyComplianceGaps, v as validateProcessingRecord } from './ropa-CyynscU6.js';
|
|
12
|
-
import
|
|
12
|
+
import { b as NDPRLocale, d as defaultLocale } from './sanitize-9mOO_cJW.js';
|
|
13
|
+
export { N as NDPRConfig, a as NDPRProvider, s as sanitizeInput, u as useNDPRConfig, c as useNDPRLocale } from './sanitize-9mOO_cJW.js';
|
|
13
14
|
export { C as ConsentAuditEntry, a as appendAuditEntry, c as createAuditEntry, g as getAuditLog, v as validateConsent, b as validateConsentOptions } from './consent-audit-DhbfMR0n.js';
|
|
14
15
|
export { f as formatDSRRequest } from './dsr-pNtVb1BK.js';
|
|
15
16
|
export { a as assessDPIARisk } from './dpia-B0Pok5us.js';
|
|
16
17
|
export { c as calculateBreachSeverity } from './breach-CzXqSsaY.js';
|
|
17
18
|
export { D as DEFAULT_POLICY_SECTIONS, a as DEFAULT_POLICY_VARIABLES, c as createBusinessPolicyTemplate, g as generatePolicyText } from './policy-templates-CIKcV0i1.js';
|
|
19
|
+
export { C as ComplianceGap, a as ComplianceResult, b as CustomSection, D as DataCategory, P as PolicyDraft, T as TemplateContext, c as ThirdPartyProcessor, d as createDefaultContext } from './policy-engine-DSQpT55_.js';
|
|
20
|
+
export { a as assemblePolicy, e as evaluatePolicyCompliance } from './policy-sections-DqH0iZRf.js';
|
|
18
21
|
export { C as ComplianceInput, a as ComplianceRating, b as ComplianceReport, E as EffortLevel, M as ModuleScore, R as Recommendation, c as RecommendationPriority, d as RegulatoryReference, g as getComplianceScore } from './compliance-score-racQe_E_.js';
|
|
22
|
+
import 'react';
|
|
19
23
|
|
|
20
24
|
/**
|
|
21
|
-
*
|
|
25
|
+
* Deep merges a partial locale with the default English locale.
|
|
26
|
+
* Any missing keys fall back to English.
|
|
22
27
|
*/
|
|
23
|
-
|
|
24
|
-
/** The official name of the organisation */
|
|
25
|
-
organizationName?: string;
|
|
26
|
-
/** Email address of the Data Protection Officer */
|
|
27
|
-
dpoEmail?: string;
|
|
28
|
-
/** NDPC registration number, if registered */
|
|
29
|
-
ndpcRegistrationNumber?: string;
|
|
30
|
-
/** Prefix for localStorage/sessionStorage keys used by toolkit components */
|
|
31
|
-
storageKeyPrefix?: string;
|
|
32
|
-
/** When true, removes all default styles from toolkit components */
|
|
33
|
-
unstyled?: boolean;
|
|
34
|
-
/** Theme overrides applied as CSS custom properties */
|
|
35
|
-
theme?: {
|
|
36
|
-
/** Primary brand colour (e.g. "#0070f3") */
|
|
37
|
-
primary?: string;
|
|
38
|
-
/** Hover state for primary colour */
|
|
39
|
-
primaryHover?: string;
|
|
40
|
-
/** Foreground colour used on primary backgrounds */
|
|
41
|
-
primaryForeground?: string;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Provides NDPR configuration to all descendant toolkit components.
|
|
46
|
-
*
|
|
47
|
-
* When a `theme` is supplied, the corresponding CSS custom properties
|
|
48
|
-
* (`--ndpr-primary`, `--ndpr-primary-hover`, `--ndpr-primary-foreground`)
|
|
49
|
-
* are set on the wrapping element so components can reference them.
|
|
50
|
-
*/
|
|
51
|
-
declare const NDPRProvider: React__default.FC<NDPRConfig & {
|
|
52
|
-
children: React__default.ReactNode;
|
|
53
|
-
}>;
|
|
54
|
-
/**
|
|
55
|
-
* Returns the current NDPR configuration from the nearest `NDPRProvider`.
|
|
56
|
-
* If no provider is found, returns an empty config object.
|
|
57
|
-
*/
|
|
58
|
-
declare function useNDPRConfig(): NDPRConfig;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Sanitizes user input to prevent XSS attacks.
|
|
62
|
-
* Escapes HTML special characters so that data rendered in dashboards
|
|
63
|
-
* or other consumer UIs cannot execute embedded scripts.
|
|
64
|
-
*/
|
|
65
|
-
declare function sanitizeInput(input: string): string;
|
|
28
|
+
declare function mergeLocale(partial?: NDPRLocale): typeof defaultLocale;
|
|
66
29
|
|
|
67
|
-
export {
|
|
30
|
+
export { NDPRLocale, defaultLocale, mergeLocale };
|
package/dist/core.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk44W4H2EY_js=require('./chunk-44W4H2EY.js'),chunkS4GRSNB4_js=require('./chunk-S4GRSNB4.js'),chunkTDDAYVKK_js=require('./chunk-TDDAYVKK.js'),chunkIQF726GS_js=require('./chunk-IQF726GS.js'),chunkGOU6FU6Y_js=require('./chunk-GOU6FU6Y.js'),chunkMJGOLP5M_js=require('./chunk-MJGOLP5M.js'),chunkHO5M7M4M_js=require('./chunk-HO5M7M4M.js'),chunkNRQELKAE_js=require('./chunk-NRQELKAE.js'),chunkP42Z5CFE_js=require('./chunk-P42Z5CFE.js'),chunkBKRETVJ6_js=require('./chunk-BKRETVJ6.js'),chunkI54CDQGN_js=require('./chunk-I54CDQGN.js'),chunkLU4PFST7_js=require('./chunk-LU4PFST7.js'),chunkUXMGBIX6_js=require('./chunk-UXMGBIX6.js');require('./chunk-MQFZHA2D.js');Object.defineProperty(exports,"NDPRProvider",{enumerable:true,get:function(){return chunk44W4H2EY_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunk44W4H2EY_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunk44W4H2EY_js.b}});Object.defineProperty(exports,"useNDPRConfig",{enumerable:true,get:function(){return chunk44W4H2EY_js.d}});Object.defineProperty(exports,"useNDPRLocale",{enumerable:true,get:function(){return chunk44W4H2EY_js.e}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunkS4GRSNB4_js.a}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkTDDAYVKK_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkTDDAYVKK_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkTDDAYVKK_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkTDDAYVKK_js.a}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkIQF726GS_js.d}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkIQF726GS_js.b}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkIQF726GS_js.a}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkIQF726GS_js.c}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunkMJGOLP5M_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunkMJGOLP5M_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunkMJGOLP5M_js.b}});Object.defineProperty(exports,"validateConsent",{enumerable:true,get:function(){return chunkHO5M7M4M_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkHO5M7M4M_js.b}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkNRQELKAE_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkP42Z5CFE_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunkBKRETVJ6_js.a}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkI54CDQGN_js.a}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunkLU4PFST7_js.d}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunkLU4PFST7_js.b}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunkLU4PFST7_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkUXMGBIX6_js.b}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkUXMGBIX6_js.c}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkUXMGBIX6_js.d}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkUXMGBIX6_js.a}});//# sourceMappingURL=core.js.map
|
|
2
2
|
//# sourceMappingURL=core.js.map
|
package/dist/core.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{c as NDPRProvider,a as defaultLocale,b as mergeLocale,d as useNDPRConfig,e as useNDPRLocale}from'./chunk-TVW6KBVV.mjs';export{a as getComplianceScore}from'./chunk-ABDB7LEV.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-TXBZPCGF.mjs';export{d as assessTransferRisk,b as getTransferMechanismDescription,a as isNDPCApprovalRequired,c as validateTransfer}from'./chunk-QKK5S54L.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-SHMJNRHO.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-P3PULLYP.mjs';export{a as validateConsent,b as validateConsentOptions}from'./chunk-U62QYKVG.mjs';export{a as formatDSRRequest}from'./chunk-NXQMU36Z.mjs';export{a as assessDPIARisk}from'./chunk-6TA2MVTU.mjs';export{a as calculateBreachSeverity}from'./chunk-DJGS7SSN.mjs';export{a as sanitizeInput}from'./chunk-GKKAK6ES.mjs';export{d as assemblePolicy,b as createDefaultContext,c as evaluatePolicyCompliance}from'./chunk-GCQRHMTQ.mjs';export{b as DEFAULT_POLICY_SECTIONS,c as DEFAULT_POLICY_VARIABLES,d as createBusinessPolicyTemplate,a as generatePolicyText}from'./chunk-ZEOQYWOE.mjs';import'./chunk-WWT2ZSNU.mjs';//# sourceMappingURL=core.mjs.map
|
|
2
2
|
//# sourceMappingURL=core.mjs.map
|
package/dist/cross-border.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkCL53OI3I_js=require('./chunk-CL53OI3I.js'),
|
|
1
|
+
'use strict';var chunkCL53OI3I_js=require('./chunk-CL53OI3I.js'),chunkKBP26GLC_js=require('./chunk-KBP26GLC.js'),chunkIQF726GS_js=require('./chunk-IQF726GS.js');require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js'),require('./chunk-MQFZHA2D.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var t=react.createContext(null);function P(){let r=react.useContext(t);if(!r)throw new Error("CrossBorder compound components must be wrapped in <CrossBorder.Provider>. Example: <CrossBorder.Provider><CrossBorder.Manager /></CrossBorder.Provider>");return r}var e=({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f,children:i})=>{let m=chunkKBP26GLC_js.a({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f});return jsxRuntime.jsx(t.Provider,{value:m,children:i})};var y={Provider:e,Manager:chunkCL53OI3I_js.a};Object.defineProperty(exports,"CrossBorderTransferManager",{enumerable:true,get:function(){return chunkCL53OI3I_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkKBP26GLC_js.a}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkIQF726GS_js.d}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkIQF726GS_js.b}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkIQF726GS_js.a}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkIQF726GS_js.c}});exports.CrossBorder=y;exports.CrossBorderProvider=e;exports.useCrossBorderCompound=P;//# sourceMappingURL=cross-border.js.map
|
|
2
2
|
//# sourceMappingURL=cross-border.js.map
|
package/dist/cross-border.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a}from'./chunk-4JUDKBA2.mjs';export{a as CrossBorderTransferManager}from'./chunk-4JUDKBA2.mjs';import {a as a$1}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-4JUDKBA2.mjs';export{a as CrossBorderTransferManager}from'./chunk-4JUDKBA2.mjs';import {a as a$1}from'./chunk-XQ4M5FHC.mjs';export{a as useCrossBorderTransfer}from'./chunk-XQ4M5FHC.mjs';export{d as assessTransferRisk,b as getTransferMechanismDescription,a as isNDPCApprovalRequired,c as validateTransfer}from'./chunk-QKK5S54L.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var t=createContext(null);function P(){let r=useContext(t);if(!r)throw new Error("CrossBorder compound components must be wrapped in <CrossBorder.Provider>. Example: <CrossBorder.Provider><CrossBorder.Manager /></CrossBorder.Provider>");return r}var e=({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f,children:i})=>{let m=a$1({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f});return jsx(t.Provider,{value:m,children:i})};var y={Provider:e,Manager:a};export{y as CrossBorder,e as CrossBorderProvider,P as useCrossBorderCompound};//# sourceMappingURL=cross-border.mjs.map
|
|
2
2
|
//# sourceMappingURL=cross-border.mjs.map
|
package/dist/dpia.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkFY5G6DGZ_js=require('./chunk-FY5G6DGZ.js'),chunkUNKXYVXY_js=require('./chunk-UNKXYVXY.js'),
|
|
1
|
+
'use strict';var chunkFY5G6DGZ_js=require('./chunk-FY5G6DGZ.js'),chunkUNKXYVXY_js=require('./chunk-UNKXYVXY.js'),chunkKBAFOVE3_js=require('./chunk-KBAFOVE3.js'),chunkP42Z5CFE_js=require('./chunk-P42Z5CFE.js');require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var i=react.createContext(null);function v(){let o=react.useContext(i);if(!o)throw new Error("DPIA compound components must be wrapped in <DPIA.Provider>. Example: <DPIA.Provider sections={...}><DPIA.Questionnaire /></DPIA.Provider>");return o}var p=({sections:o,initialAnswers:a,adapter:m,storageKey:I,useLocalStorage:A,onComplete:d,children:D})=>{let u=chunkKBAFOVE3_js.a({sections:o,initialAnswers:a,adapter:m,storageKey:I,useLocalStorage:A,onComplete:d}),c=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},u),{sections:o});return jsxRuntime.jsx(i.Provider,{value:c,children:D})};var y={Provider:p,Questionnaire:chunkUNKXYVXY_js.a,Report:chunkFY5G6DGZ_js.a,StepIndicator:chunkFY5G6DGZ_js.b};Object.defineProperty(exports,"DPIAReport",{enumerable:true,get:function(){return chunkFY5G6DGZ_js.a}});Object.defineProperty(exports,"StepIndicator",{enumerable:true,get:function(){return chunkFY5G6DGZ_js.b}});Object.defineProperty(exports,"DPIAQuestionnaire",{enumerable:true,get:function(){return chunkUNKXYVXY_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkKBAFOVE3_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkP42Z5CFE_js.a}});exports.DPIA=y;exports.DPIAProvider=p;exports.useDPIACompound=v;//# sourceMappingURL=dpia.js.map
|
|
2
2
|
//# sourceMappingURL=dpia.js.map
|
package/dist/dpia.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b,a}from'./chunk-NPI5T6NH.mjs';export{a as DPIAReport,b as StepIndicator}from'./chunk-NPI5T6NH.mjs';import {a as a$1}from'./chunk-V3MXWGXU.mjs';export{a as DPIAQuestionnaire}from'./chunk-V3MXWGXU.mjs';import {a as a$2}from'./chunk-
|
|
1
|
+
import {b,a}from'./chunk-NPI5T6NH.mjs';export{a as DPIAReport,b as StepIndicator}from'./chunk-NPI5T6NH.mjs';import {a as a$1}from'./chunk-V3MXWGXU.mjs';export{a as DPIAQuestionnaire}from'./chunk-V3MXWGXU.mjs';import {a as a$2}from'./chunk-GOD4LA2J.mjs';export{a as useDPIA}from'./chunk-GOD4LA2J.mjs';export{a as assessDPIARisk}from'./chunk-6TA2MVTU.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {b as b$1,a as a$3}from'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var i=createContext(null);function v(){let o=useContext(i);if(!o)throw new Error("DPIA compound components must be wrapped in <DPIA.Provider>. Example: <DPIA.Provider sections={...}><DPIA.Questionnaire /></DPIA.Provider>");return o}var p=({sections:o,initialAnswers:a,adapter:m,storageKey:I,useLocalStorage:A,onComplete:d,children:D})=>{let u=a$2({sections:o,initialAnswers:a,adapter:m,storageKey:I,useLocalStorage:A,onComplete:d}),c=b$1(a$3({},u),{sections:o});return jsx(i.Provider,{value:c,children:D})};var y={Provider:p,Questionnaire:a$1,Report:a,StepIndicator:b};export{y as DPIA,p as DPIAProvider,v as useDPIACompound};//# sourceMappingURL=dpia.mjs.map
|
|
2
2
|
//# sourceMappingURL=dpia.mjs.map
|
package/dist/dsr.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk2FWCVWKN_js=require('./chunk-2FWCVWKN.js'),chunkQH6YUVJS_js=require('./chunk-QH6YUVJS.js'),chunk3DJGO6WG_js=require('./chunk-3DJGO6WG.js'),chunkNRQELKAE_js=require('./chunk-NRQELKAE.js');require('./chunk-I54CDQGN.js'),require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var R=react.createContext(null);function v(){let e=react.useContext(R);if(!e)throw new Error("DSR compound components must be wrapped in <DSR.Provider>. Example: <DSR.Provider requestTypes={...}><DSR.Form /></DSR.Provider>");return e}var s=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:n,children:i})=>{let f=chunk3DJGO6WG_js.a({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:n}),x=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},f),{requestTypes:e});return jsxRuntime.jsx(R.Provider,{value:x,children:i})};var C={Provider:s,Form:chunkQH6YUVJS_js.a,Dashboard:chunk2FWCVWKN_js.a,Tracker:chunk2FWCVWKN_js.b};Object.defineProperty(exports,"DSRDashboard",{enumerable:true,get:function(){return chunk2FWCVWKN_js.a}});Object.defineProperty(exports,"DSRTracker",{enumerable:true,get:function(){return chunk2FWCVWKN_js.b}});Object.defineProperty(exports,"DSRRequestForm",{enumerable:true,get:function(){return chunkQH6YUVJS_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunk3DJGO6WG_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkNRQELKAE_js.a}});exports.DSR=C;exports.DSRProvider=s;exports.useDSRCompound=v;//# sourceMappingURL=dsr.js.map
|
|
2
2
|
//# sourceMappingURL=dsr.js.map
|
package/dist/dsr.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b,a}from'./chunk-
|
|
1
|
+
import {b,a}from'./chunk-MDWG2KDA.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-MDWG2KDA.mjs';import {a as a$1}from'./chunk-IR7VCBWV.mjs';export{a as DSRRequestForm}from'./chunk-IR7VCBWV.mjs';import {a as a$2}from'./chunk-FOXZRRMW.mjs';export{a as useDSR}from'./chunk-FOXZRRMW.mjs';export{a as formatDSRRequest}from'./chunk-NXQMU36Z.mjs';import'./chunk-GKKAK6ES.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {b as b$1,a as a$3}from'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var R=createContext(null);function v(){let e=useContext(R);if(!e)throw new Error("DSR compound components must be wrapped in <DSR.Provider>. Example: <DSR.Provider requestTypes={...}><DSR.Form /></DSR.Provider>");return e}var s=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:n,children:i})=>{let f=a$2({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:n}),x=b$1(a$3({},f),{requestTypes:e});return jsx(R.Provider,{value:x,children:i})};var C={Provider:s,Form:a$1,Dashboard:a,Tracker:b};export{C as DSR,s as DSRProvider,v as useDSRCompound};//# sourceMappingURL=dsr.mjs.map
|
|
2
2
|
//# sourceMappingURL=dsr.mjs.map
|
package/dist/hooks.d.mts
CHANGED
|
@@ -15,10 +15,12 @@ export { u as useLawfulBasis } from './useLawfulBasis-CKJ-kw84.mjs';
|
|
|
15
15
|
export { u as useCrossBorderTransfer } from './useCrossBorderTransfer-BGNZt2lk.mjs';
|
|
16
16
|
export { U as UseROPAOptions, a as UseROPAReturn, u as useROPA } from './useROPA-C2hjaBTz.mjs';
|
|
17
17
|
import { C as ComplianceInput, b as ComplianceReport } from './compliance-score-racQe_E_.mjs';
|
|
18
|
+
export { U as UseAdaptivePolicyWizardOptions, a as UseAdaptivePolicyWizardReturn, u as useAdaptivePolicyWizard } from './useAdaptivePolicyWizard-N4eUM4Tj.mjs';
|
|
18
19
|
import './types-DK2CoKOC.mjs';
|
|
19
20
|
import './lawful-basis-C2eGaoHM.mjs';
|
|
20
21
|
import './cross-border-BBi9rZyO.mjs';
|
|
21
22
|
import './ropa-NIgxd8uP.mjs';
|
|
23
|
+
import './policy-engine-C-tShzZH.mjs';
|
|
22
24
|
|
|
23
25
|
interface UseComplianceScoreOptions {
|
|
24
26
|
input: ComplianceInput;
|