@tantainnovative/ndpr-toolkit 5.1.1 → 5.1.3

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.
Files changed (111) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +1 -1
  3. package/dist/breach.js +1 -1
  4. package/dist/breach.mjs +1 -1
  5. package/dist/{chunk-BRJKIF7E.mjs → chunk-2ASQQYJR.mjs} +1 -1
  6. package/dist/{chunk-3SIYRGJF.js → chunk-2MGLU3FY.js} +3 -3
  7. package/dist/{chunk-CSE36REY.js → chunk-2OSZT7KI.js} +1 -1
  8. package/dist/{chunk-MAD7QYRK.js → chunk-37VR2MXL.js} +1 -1
  9. package/dist/{chunk-3H6FYU3Z.mjs → chunk-5E56KT7E.mjs} +1 -1
  10. package/dist/{chunk-V5TZJJWU.mjs → chunk-5LJ652AH.mjs} +1 -1
  11. package/dist/{chunk-F5MGMNQF.js → chunk-6KQADEFS.js} +1 -1
  12. package/dist/{chunk-D2UWB5OI.js → chunk-6MO3GS3B.js} +1 -1
  13. package/dist/{chunk-WPH6CJDL.mjs → chunk-6UGLAVRM.mjs} +1 -1
  14. package/dist/{chunk-TTMGFC6C.js → chunk-7563FVMY.js} +1 -1
  15. package/dist/{chunk-SBSYHCPK.mjs → chunk-AS2M5OTX.mjs} +1 -1
  16. package/dist/chunk-BHUJWWCO.js +1 -0
  17. package/dist/{chunk-42UJFTII.js → chunk-C32TMS75.js} +1 -1
  18. package/dist/{chunk-6A6VI7ZP.mjs → chunk-C77CRJLD.mjs} +1 -1
  19. package/dist/{chunk-3I6FYA5C.js → chunk-C7OOUURS.js} +1 -1
  20. package/dist/{chunk-BPMVJOHH.mjs → chunk-CNCEP66F.mjs} +1 -1
  21. package/dist/{chunk-WCTFED27.js → chunk-DRQURLN5.js} +1 -1
  22. package/dist/{chunk-L3FR4PQE.mjs → chunk-EAV4BZKO.mjs} +1 -1
  23. package/dist/{chunk-J7BIJ45O.mjs → chunk-EF5CLD4V.mjs} +1 -1
  24. package/dist/{chunk-4FXRJH37.js → chunk-ERCGW2DJ.js} +1 -1
  25. package/dist/{chunk-UZNWXJ2W.js → chunk-FRHFIEWZ.js} +1 -1
  26. package/dist/{chunk-ELK6VFKC.mjs → chunk-HDPXARLC.mjs} +1 -1
  27. package/dist/{chunk-I2ZBMR7F.mjs → chunk-HMKXK23C.mjs} +1 -1
  28. package/dist/{chunk-YDKWD6MQ.js → chunk-I5ZDNSX5.js} +1 -1
  29. package/dist/{chunk-RDALAH3Y.js → chunk-JVMHWM3I.js} +1 -1
  30. package/dist/{chunk-PSPYIRIF.mjs → chunk-KUI5W44P.mjs} +1 -1
  31. package/dist/{chunk-6YFPDGNB.js → chunk-LP5KXMBY.js} +1 -1
  32. package/dist/{chunk-N72RNTGP.mjs → chunk-MIQQYXTE.mjs} +1 -1
  33. package/dist/{chunk-WVHMY2BV.mjs → chunk-OLTLB5MP.mjs} +1 -1
  34. package/dist/{chunk-FRQFU44F.mjs → chunk-PHA3YMFO.mjs} +1 -1
  35. package/dist/{chunk-ZD2W3YU2.js → chunk-PXUX4FYM.js} +1 -1
  36. package/dist/{chunk-37VFK5SR.js → chunk-QG72X7G4.js} +1 -1
  37. package/dist/{chunk-NBOJ2KGN.mjs → chunk-RW7V7DDR.mjs} +1 -1
  38. package/dist/{chunk-3E4IH7CE.js → chunk-SMEZAQNJ.js} +1 -1
  39. package/dist/{chunk-B2EXRSYG.mjs → chunk-TWWGNFPF.mjs} +1 -1
  40. package/dist/{chunk-ASEUTU45.js → chunk-TYR5PFYD.js} +1 -1
  41. package/dist/{chunk-KH3EQJQE.js → chunk-VEWLYTRA.js} +1 -1
  42. package/dist/{chunk-63WM5PHZ.js → chunk-VTBHDHYK.js} +1 -1
  43. package/dist/{chunk-DK7P5JEG.mjs → chunk-WLZTATLL.mjs} +1 -1
  44. package/dist/chunk-XAB5C2JG.mjs +1 -0
  45. package/dist/{chunk-7RBO42IW.mjs → chunk-YX7DEHPA.mjs} +1 -1
  46. package/dist/{chunk-ZQHGIOYP.mjs → chunk-YZHEEGGK.mjs} +1 -1
  47. package/dist/consent.js +1 -1
  48. package/dist/consent.mjs +1 -1
  49. package/dist/core.d.mts +2 -2
  50. package/dist/core.d.ts +2 -2
  51. package/dist/core.js +1 -1
  52. package/dist/core.mjs +1 -1
  53. package/dist/cross-border-lite.d.mts +1 -1
  54. package/dist/cross-border-lite.d.ts +1 -1
  55. package/dist/cross-border-lite.js +1 -1
  56. package/dist/cross-border-lite.mjs +1 -1
  57. package/dist/cross-border.js +1 -1
  58. package/dist/cross-border.mjs +1 -1
  59. package/dist/dpia.js +1 -1
  60. package/dist/dpia.mjs +1 -1
  61. package/dist/dsr.js +1 -1
  62. package/dist/dsr.mjs +1 -1
  63. package/dist/headless.d.mts +1 -1
  64. package/dist/headless.d.ts +1 -1
  65. package/dist/headless.js +1 -1
  66. package/dist/headless.mjs +1 -1
  67. package/dist/hooks.d.mts +1 -1
  68. package/dist/hooks.d.ts +1 -1
  69. package/dist/hooks.js +1 -1
  70. package/dist/hooks.mjs +1 -1
  71. package/dist/index.d.mts +5 -4
  72. package/dist/index.d.ts +5 -4
  73. package/dist/index.js +1 -1
  74. package/dist/index.mjs +1 -1
  75. package/dist/lawful-basis-lite.d.mts +1 -1
  76. package/dist/lawful-basis-lite.d.ts +1 -1
  77. package/dist/lawful-basis-lite.js +1 -1
  78. package/dist/lawful-basis-lite.mjs +1 -1
  79. package/dist/lawful-basis.d.mts +1 -1
  80. package/dist/lawful-basis.d.ts +1 -1
  81. package/dist/lawful-basis.js +1 -1
  82. package/dist/lawful-basis.mjs +1 -1
  83. package/dist/policy.d.mts +5 -4
  84. package/dist/policy.d.ts +5 -4
  85. package/dist/policy.js +1 -1
  86. package/dist/policy.mjs +1 -1
  87. package/dist/presets-consent.js +1 -1
  88. package/dist/presets-consent.mjs +1 -1
  89. package/dist/presets-dsr.js +1 -1
  90. package/dist/presets-dsr.mjs +1 -1
  91. package/dist/presets-policy.d.mts +1 -1
  92. package/dist/presets-policy.d.ts +1 -1
  93. package/dist/presets-policy.js +1 -1
  94. package/dist/presets-policy.mjs +1 -1
  95. package/dist/presets.d.mts +2 -2
  96. package/dist/presets.d.ts +2 -2
  97. package/dist/presets.js +1 -1
  98. package/dist/presets.mjs +1 -1
  99. package/dist/ropa-lite.js +1 -1
  100. package/dist/ropa-lite.mjs +1 -1
  101. package/dist/ropa.js +1 -1
  102. package/dist/ropa.mjs +1 -1
  103. package/dist/server.d.mts +2 -2
  104. package/dist/server.d.ts +2 -2
  105. package/dist/server.js +1 -1
  106. package/dist/server.mjs +1 -1
  107. package/dist/unstyled.js +1 -1
  108. package/dist/unstyled.mjs +1 -1
  109. package/package.json +11 -6
  110. package/dist/chunk-FC3PTJFL.js +0 -1
  111. package/dist/chunk-IQO3SIAG.mjs +0 -1
@@ -1,2 +1,2 @@
1
- import {a as a$2}from'./chunk-EWVK45Z3.mjs';import {a}from'./chunk-SFGW37LE.mjs';import {c}from'./chunk-FRQFU44F.mjs';import {a as a$1,b}from'./chunk-ZJYULEER.mjs';import {useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var fr=({categories:Ze,onSubmit:Ge,onValidationError:u,title:x,description:C,submitButtonText:S,className:Q="",buttonClassName:X="",classNames:d={},unstyled:c$1=false,isSubmitting:f=false,showConfirmation:Ke=true,confirmationMessage:We="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:Je=true,maxAttachments:D=5,maxFileSize:A=5*1024*1024,allowedFileTypes:R=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:t,onReset:w})=>{var we,Fe,qe,Pe,ke,je,Te,Ie,Be,Ee,Me,$e,Oe,Le;let F=c(),Qe=(we=x!=null?x:F.breach.title)!=null?we:"Report a Data Breach",Xe=(Fe=C!=null?C:F.breach.description)!=null?Fe:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",Ve=(qe=S!=null?S:F.breach.submitReport)!=null?qe:"Submit Report",V=r=>{if(!r)return "";let o=new Date(r),l=s=>String(s).padStart(2,"0");return `${o.getFullYear()}-${l(o.getMonth()+1)}-${l(o.getDate())}T${l(o.getHours())}:${l(o.getMinutes())}`},[q,ee]=useState((t==null?void 0:t.title)||""),[P,re]=useState((t==null?void 0:t.description)||""),[k,te]=useState((t==null?void 0:t.category)||""),[j,ie]=useState(V(t==null?void 0:t.discoveredAt)),[T,ae]=useState(V(t==null?void 0:t.occurredAt)),[I,ne]=useState(((Pe=t==null?void 0:t.reporter)==null?void 0:Pe.name)||""),[N,oe]=useState(((ke=t==null?void 0:t.reporter)==null?void 0:ke.email)||""),[B,se]=useState(((je=t==null?void 0:t.reporter)==null?void 0:je.department)||""),[E,de]=useState(((Te=t==null?void 0:t.reporter)==null?void 0:Te.phone)||""),[me,ce]=useState((t==null?void 0:t.affectedSystems)||[]),[er,pe]=useState(((Ie=t==null?void 0:t.affectedSystems)==null?void 0:Ie.join(", "))||""),[M,le]=useState((t==null?void 0:t.dataTypes)||[]),[h,ge]=useState((t==null?void 0:t.estimatedAffectedSubjects)!=null?String(t.estimatedAffectedSubjects):""),[$,be]=useState((t==null?void 0:t.approximateRecordCount)!=null?String(t.approximateRecordCount):""),[O,fe]=useState(((Be=t==null?void 0:t.dataSubjectCategories)==null?void 0:Be.join(", "))||""),[he,ve]=useState((Ee=t==null?void 0:t.involvesSensitiveData)!=null?Ee:false),[L,Ne]=useState((t==null?void 0:t.likelyConsequences)||""),[z,_e]=useState((t==null?void 0:t.mitigationMeasures)||""),[Y,ye]=useState(((Me=t==null?void 0:t.dpoContact)==null?void 0:Me.name)||""),[U,ue]=useState((($e=t==null?void 0:t.dpoContact)==null?void 0:$e.email)||""),[H,xe]=useState(((Oe=t==null?void 0:t.dpoContact)==null?void 0:Oe.phone)||""),[Z,Ce]=useState((Le=t==null?void 0:t.isPhasedReport)!=null?Le:false),[G,Se]=useState((t==null?void 0:t.supplementsReportId)||""),[De,Ae]=useState((t==null?void 0:t.status)||"ongoing"),[K,Re]=useState((t==null?void 0:t.initialActions)||""),[_,W]=useState([]),[rr,J]=useState(false),[a$3,v]=useState({}),tr=()=>{ee(""),re(""),te(""),ie(""),ae(""),ne(""),oe(""),se(""),de(""),ce([]),pe(""),le([]),ge(""),be(""),fe(""),ve(false),Ne(""),_e(""),ye(""),ue(""),xe(""),Ce(false),Se(""),Ae("ongoing"),Re(""),W([]),J(false),v({}),w==null||w();},ir=r=>{let o=r.target.value;pe(o);let l=o.split(",").map(s=>s.trim()).filter(Boolean);ce(l);},ar=r=>{le(o=>o.includes(r)?o.filter(l=>l!==r):[...o,r]);},nr=r=>{var ze;let o=r.target.files;if(!o)return;let l=[],s={};if(_.length+o.length>D){s.attachments=`Maximum of ${D} files allowed`,v(g=>a$1(a$1({},g),s));return}for(let g=0;g<o.length;g++){let y=o[g];if(y.size>A){s.attachments=`File ${y.name} exceeds the maximum size of ${A/(1024*1024)}MB`;continue}let Ye="."+((ze=y.name.split(".").pop())==null?void 0:ze.toLowerCase());if(!R.includes(Ye)){s.attachments=`File type ${Ye} is not allowed`;continue}l.push(y);}l.length>0&&W(g=>[...g,...l]),Object.keys(s).length>0?v(g=>a$1(a$1({},g),s)):v(g=>b(a$1({},g),{attachments:""}));},or=r=>{W(o=>o.filter((l,s)=>s!==r));},sr=()=>{let r={};return q.trim()||(r.breachTitle="Breach title is required"),P.trim()||(r.description="Description is required"),k||(r.category="Category is required"),j||(r.discoveredAt="Discovery date is required"),I.trim()||(r.reporterName="Reporter name is required"),N.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(N)||(r.reporterEmail="Reporter email is invalid"):r.reporterEmail="Reporter email is required",B.trim()||(r.reporterDepartment="Reporter department is required"),me.length===0&&(r.affectedSystems="At least one affected system is required"),M.length===0&&(r.dataTypes="At least one data type is required"),h&&isNaN(Number(h))&&(r.estimatedAffectedSubjects="Estimated affected subjects must be a number"),v(r),r},dr=r=>{r.preventDefault();let o=sr();if(Object.keys(o).length>0){u==null||u(o);return}let l={title:a$2(q),description:a$2(P),category:k,discoveredAt:new Date(j).getTime(),occurredAt:T?new Date(T).getTime():void 0,reportedAt:Date.now(),reporter:{name:a$2(I),email:a$2(N),department:a$2(B),phone:E?a$2(E):void 0},affectedSystems:me.map(s=>a$2(s)),dataTypes:M,estimatedAffectedSubjects:h?Number(h):void 0,approximateRecordCount:$?Number($):void 0,dataSubjectCategories:O?O.split(",").map(s=>a$2(s.trim())).filter(Boolean):void 0,involvesSensitiveData:he,likelyConsequences:L?a$2(L):void 0,mitigationMeasures:z?a$2(z):void 0,dpoContact:Y||U?{name:a$2(Y),email:a$2(U),phone:H?a$2(H):void 0}:void 0,isPhasedReport:Z||void 0,supplementsReportId:G?a$2(G):void 0,status:De,initialActions:K?a$2(K):void 0,attachments:_.map(s=>({name:s.name,type:s.type,size:s.size,file:s}))};Ge(l),Ke&&J(true);};if(rr)return jsxs("div",{"data-ndpr-component":"breach-report-form",className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${Q}`,children:[jsx("h2",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Submitted"}),jsx("p",{className:"ndpr-text-success",children:We}),jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-md",children:[jsx("h3",{className:"text-sm font-bold ndpr-text-warning mb-2",children:"Important: Next Steps"}),jsx("p",{className:"ndpr-text-warning text-sm",children:"Under the NDPA (Section 40), data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsx("button",{onClick:()=>J(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${X}`,children:"Report Another Breach"})]});let mr=[{id:"personal",label:"Personal Information (names, addresses)"},{id:"contact",label:"Contact Information (email, phone)"},{id:"financial",label:"Financial Information (bank details, payment info)"},{id:"health",label:"Health Information"},{id:"identification",label:"Identification Documents (ID cards, passports)"},{id:"login",label:"Login Credentials"},{id:"biometric",label:"Biometric Data"},{id:"children",label:"Children's Data"},{id:"location",label:"Location Data"},{id:"communications",label:"Communications Content"}];return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${Q}`,d.root,c$1),children:[jsx("h2",{className:a("ndpr-section-heading",d.title,c$1),children:Qe}),jsx("p",{className:"ndpr-card__subtitle",children:Xe}),jsx("form",{onSubmit:dr,className:a("",d.form,c$1),children:jsxs("div",{className:"ndpr-form-section",children:[jsxs("div",{className:a("",d.fieldGroup,c$1),children:[jsx("h3",{className:"ndpr-section-heading",children:"Breach Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"breachTitle",className:a("ndpr-form-field__label",d.label,c$1),children:["Breach Title/Summary ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"breachTitle",value:q,onChange:r=>ee(r.target.value),className:a("ndpr-form-field__input",d.input,c$1),required:true,"aria-invalid":!!a$3.breachTitle,"aria-describedby":a$3.breachTitle?"breachTitle-error":void 0}),a$3.breachTitle&&jsx("p",{id:"breachTitle-error",role:"alert",className:"ndpr-form-field__error",children:a$3.breachTitle})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"category",className:a("ndpr-form-field__label",d.label,c$1),children:["Breach Category ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"category",value:k,onChange:r=>te(r.target.value),className:a("ndpr-form-field__input",d.select,c$1),required:true,"aria-invalid":!!a$3.category,"aria-describedby":a$3.category?"category-error":void 0,children:[jsx("option",{value:"",children:"Select a category"}),Ze.map(r=>jsx("option",{value:r.id,children:r.name},r.id))]}),a$3.category&&jsx("p",{id:"category-error",role:"alert",className:"ndpr-form-field__error",children:a$3.category})]}),jsxs("div",{className:"md:col-span-2",children:[jsxs("label",{htmlFor:"description",className:a("ndpr-form-field__label",d.label,c$1),children:["Detailed Description ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("textarea",{id:"description",value:P,onChange:r=>re(r.target.value),rows:4,className:a("ndpr-form-field__input",d.textarea,c$1),required:true,"aria-invalid":!!a$3.description,"aria-describedby":a$3.description?"description-error":void 0}),a$3.description&&jsx("p",{id:"description-error",role:"alert",className:"ndpr-form-field__error",children:a$3.description})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"discoveredAt",className:"ndpr-form-field__label",children:["Date Discovered ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"datetime-local",id:"discoveredAt",value:j,onChange:r=>ie(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.discoveredAt,"aria-describedby":a$3.discoveredAt?"discoveredAt-error":void 0}),a$3.discoveredAt&&jsx("p",{id:"discoveredAt-error",role:"alert",className:"ndpr-form-field__error",children:a$3.discoveredAt})]}),jsxs("div",{children:[jsx("label",{htmlFor:"occurredAt",className:"ndpr-form-field__label",children:"Date Occurred (if known)"}),jsx("input",{type:"datetime-local",id:"occurredAt",value:T,onChange:r=>ae(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Reporter Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"reporterName",className:"ndpr-form-field__label",children:["Your Name ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterName",value:I,onChange:r=>ne(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterName,"aria-describedby":a$3.reporterName?"reporterName-error":void 0}),a$3.reporterName&&jsx("p",{id:"reporterName-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterName})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterEmail",className:"ndpr-form-field__label",children:["Your Email ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"email",id:"reporterEmail",value:N,onChange:r=>oe(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterEmail,"aria-describedby":a$3.reporterEmail?"reporterEmail-error":void 0}),a$3.reporterEmail&&jsx("p",{id:"reporterEmail-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterEmail})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterDepartment",className:"ndpr-form-field__label",children:["Your Department ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterDepartment",value:B,onChange:r=>se(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterDepartment,"aria-describedby":a$3.reporterDepartment?"reporterDepartment-error":void 0}),a$3.reporterDepartment&&jsx("p",{id:"reporterDepartment-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterDepartment})]}),jsxs("div",{children:[jsx("label",{htmlFor:"reporterPhone",className:"ndpr-form-field__label",children:"Your Phone Number (Optional)"}),jsx("input",{type:"tel",id:"reporterPhone",value:E,onChange:r=>de(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Impact Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"affectedSystems",className:"ndpr-form-field__label",children:["Affected Systems/Applications ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"affectedSystems",value:er,onChange:ir,placeholder:"e.g. CRM, Email Server, Website (comma separated)",className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.affectedSystems,"aria-describedby":a$3.affectedSystems?"affectedSystems-error":void 0}),a$3.affectedSystems&&jsx("p",{id:"affectedSystems-error",role:"alert",className:"ndpr-form-field__error",children:a$3.affectedSystems})]}),jsxs("div",{children:[jsx("label",{htmlFor:"estimatedAffectedSubjects",className:"ndpr-form-field__label",children:"Estimated Number of Affected Data Subjects"}),jsx("input",{type:"text",id:"estimatedAffectedSubjects",value:h,onChange:r=>ge(r.target.value),placeholder:"e.g. 100",className:"ndpr-form-field__input","aria-invalid":!!a$3.estimatedAffectedSubjects,"aria-describedby":a$3.estimatedAffectedSubjects?"estimatedAffectedSubjects-error":void 0}),a$3.estimatedAffectedSubjects&&jsx("p",{id:"estimatedAffectedSubjects-error",role:"alert",className:"ndpr-form-field__error",children:a$3.estimatedAffectedSubjects})]}),jsxs("fieldset",{className:"md:col-span-2","aria-invalid":!!a$3.dataTypes,"aria-describedby":a$3.dataTypes?"dataTypes-error":void 0,children:[jsxs("legend",{className:"ndpr-form-field__label",children:["Types of Data Involved ",jsx("span",{className:"ndpr-form-field__required","aria-hidden":"true",children:"*"}),jsx("span",{className:"sr-only",children:"(required)"})]}),jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:mr.map(r=>jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"checkbox",id:`dataType_${r.id}`,checked:M.includes(r.id),onChange:()=>ar(r.id),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:`dataType_${r.id}`,className:"ml-2 text-sm ndpr-text-muted",children:r.label})]},r.id))}),a$3.dataTypes&&jsx("p",{id:"dataTypes-error",role:"alert",className:"ndpr-form-field__error",children:a$3.dataTypes})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"status",className:"ndpr-form-field__label",children:["Current Status ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"status",value:De,onChange:r=>Ae(r.target.value),className:a("ndpr-form-field__input",d.select,c$1),required:true,children:[jsx("option",{value:"ongoing",children:"Ongoing (breach is still active)"}),jsx("option",{value:"contained",children:"Contained (breach is stopped but not resolved)"}),jsx("option",{value:"resolved",children:"Resolved (breach is fully addressed)"})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"approximateRecordCount",className:"ndpr-form-field__label",children:"Approximate Number of Records Concerned"}),jsx("input",{type:"text",id:"approximateRecordCount",value:$,onChange:r=>be(r.target.value),placeholder:"e.g. 5000",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dataSubjectCategories",className:"ndpr-form-field__label",children:"Categories of Data Subjects Affected"}),jsx("input",{type:"text",id:"dataSubjectCategories",value:O,onChange:r=>fe(r.target.value),placeholder:"e.g. customers, employees, minors",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Comma-separated. Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{className:"md:col-span-2 flex items-center",children:[jsx("input",{id:"involvesSensitiveData",type:"checkbox",checked:he,onChange:r=>ve(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"involvesSensitiveData",className:"ml-2 text-sm ndpr-text-muted",children:"Sensitive personal data (NDPA Section 30) is involved"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"likelyConsequences",className:"ndpr-form-field__label",children:"Likely Consequences for Data Subjects"}),jsx("textarea",{id:"likelyConsequences",value:L,onChange:r=>Ne(r.target.value),placeholder:"e.g. identity theft, financial loss, reputational damage, discrimination",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required content for NDPC report and Section 40(3) communications to data subjects."})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"mitigationMeasures",className:"ndpr-form-field__label",children:"Mitigation Measures"}),jsx("textarea",{id:"mitigationMeasures",value:z,onChange:r=>_e(r.target.value),placeholder:"Measures taken or proposed to mitigate possible adverse effects (NDPA Section 40(3))",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("h4",{className:"ndpr-section-heading text-sm mt-4",children:"Data Protection Officer (NDPC contact)"}),jsx("p",{className:"text-xs ndpr-text-muted mb-2",children:"Defaults to organisation-level DPO if left blank."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoName",className:"ndpr-form-field__label",children:"DPO Name"}),jsx("input",{type:"text",id:"dpoName",value:Y,onChange:r=>ye(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoEmail",className:"ndpr-form-field__label",children:"DPO Email"}),jsx("input",{type:"email",id:"dpoEmail",value:U,onChange:r=>ue(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoPhone",className:"ndpr-form-field__label",children:"DPO Phone"}),jsx("input",{type:"tel",id:"dpoPhone",value:H,onChange:r=>xe(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2 flex items-center mt-2",children:[jsx("input",{id:"isPhasedReport",type:"checkbox",checked:Z,onChange:r=>Ce(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"isPhasedReport",className:"ml-2 text-sm ndpr-text-muted",children:"This is a phased / interim report (Section 40(2) \u2014 complete info not yet available)"})]}),Z&&jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"supplementsReportId",className:"ndpr-form-field__label",children:"Supplements Report ID (if applicable)"}),jsx("input",{type:"text",id:"supplementsReportId",value:G,onChange:r=>Se(r.target.value),placeholder:"Prior report ID this report supplements",className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"initialActions",className:"ndpr-form-field__label",children:"Initial Actions Taken"}),jsx("textarea",{id:"initialActions",value:K,onChange:r=>Re(r.target.value),placeholder:"Describe any immediate actions that have been taken to address the breach",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)})]})]})]}),Je&&jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Attachments"}),jsxs("div",{className:"ndpr-form-field",children:[jsx("label",{htmlFor:"breach-attachments",className:"ndpr-form-field__label",children:"Upload Supporting Files (Optional)"}),jsxs("p",{className:"text-xs ndpr-text-muted mb-2",children:["Max ",D," files, ",A/(1024*1024),"MB each. Allowed types: ",R.join(", ")]}),jsx("input",{id:"breach-attachments",type:"file",onChange:nr,multiple:true,className:"ndpr-form-field__input",accept:R.join(",")}),a$3.attachments&&jsx("p",{id:"attachments-error",role:"alert",className:"ndpr-form-field__error",children:a$3.attachments})]}),_.length>0&&jsxs("div",{className:"ndpr-form-field",children:[jsx("h4",{className:"ndpr-form-field__label",children:"Attached Files:"}),jsx("ul",{className:"ndpr-form-section",children:_.map((r,o)=>jsxs("li",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded",children:[jsxs("div",{className:"flex items-center",children:[jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4 ndpr-text-muted mr-2",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"})}),jsx("span",{className:"text-sm ndpr-text-muted",children:r.name}),jsxs("span",{className:"ml-2 text-xs ndpr-text-muted",children:["(",(r.size/1024).toFixed(1)," KB)"]})]}),jsxs("button",{type:"button",onClick:()=>or(o),"aria-label":`Remove attachment ${r.name}`,className:"text-red-500 hover:ndpr-text-destructive p-2 min-w-[44px] min-h-[44px] flex items-center justify-center",children:[jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),jsx("span",{className:"sr-only",children:"Remove"})]})]},o))})]})]}),jsxs("div",{className:a("ndpr-alert ndpr-alert--info",d.notice,c$1),children:[jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsx("p",{className:"ndpr-text-info text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxs("div",{className:"mt-6 relative flex gap-3",children:[f&&d.loadingOverlay&&jsx("div",{className:d.loadingOverlay}),jsx("button",{type:"submit",disabled:f,className:a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${X} ${f?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c$1),children:f?"Submitting...":Ve}),jsx("button",{type:"button",onClick:tr,disabled:f,className:a("px-6 py-3 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 rounded-md hover:bg-gray-300 dark:hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2",void 0,c$1),children:"Reset"})]})]})})]})};
1
+ import {a as a$2}from'./chunk-EWVK45Z3.mjs';import {a}from'./chunk-SFGW37LE.mjs';import {c}from'./chunk-PHA3YMFO.mjs';import {a as a$1,b}from'./chunk-ZJYULEER.mjs';import {useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';var fr=({categories:Ze,onSubmit:Ge,onValidationError:u,title:x,description:C,submitButtonText:S,className:Q="",buttonClassName:X="",classNames:d={},unstyled:c$1=false,isSubmitting:f=false,showConfirmation:Ke=true,confirmationMessage:We="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:Je=true,maxAttachments:D=5,maxFileSize:A=5*1024*1024,allowedFileTypes:R=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:t,onReset:w})=>{var we,Fe,qe,Pe,ke,je,Te,Ie,Be,Ee,Me,$e,Oe,Le;let F=c(),Qe=(we=x!=null?x:F.breach.title)!=null?we:"Report a Data Breach",Xe=(Fe=C!=null?C:F.breach.description)!=null?Fe:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",Ve=(qe=S!=null?S:F.breach.submitReport)!=null?qe:"Submit Report",V=r=>{if(!r)return "";let o=new Date(r),l=s=>String(s).padStart(2,"0");return `${o.getFullYear()}-${l(o.getMonth()+1)}-${l(o.getDate())}T${l(o.getHours())}:${l(o.getMinutes())}`},[q,ee]=useState((t==null?void 0:t.title)||""),[P,re]=useState((t==null?void 0:t.description)||""),[k,te]=useState((t==null?void 0:t.category)||""),[j,ie]=useState(V(t==null?void 0:t.discoveredAt)),[T,ae]=useState(V(t==null?void 0:t.occurredAt)),[I,ne]=useState(((Pe=t==null?void 0:t.reporter)==null?void 0:Pe.name)||""),[N,oe]=useState(((ke=t==null?void 0:t.reporter)==null?void 0:ke.email)||""),[B,se]=useState(((je=t==null?void 0:t.reporter)==null?void 0:je.department)||""),[E,de]=useState(((Te=t==null?void 0:t.reporter)==null?void 0:Te.phone)||""),[me,ce]=useState((t==null?void 0:t.affectedSystems)||[]),[er,pe]=useState(((Ie=t==null?void 0:t.affectedSystems)==null?void 0:Ie.join(", "))||""),[M,le]=useState((t==null?void 0:t.dataTypes)||[]),[h,ge]=useState((t==null?void 0:t.estimatedAffectedSubjects)!=null?String(t.estimatedAffectedSubjects):""),[$,be]=useState((t==null?void 0:t.approximateRecordCount)!=null?String(t.approximateRecordCount):""),[O,fe]=useState(((Be=t==null?void 0:t.dataSubjectCategories)==null?void 0:Be.join(", "))||""),[he,ve]=useState((Ee=t==null?void 0:t.involvesSensitiveData)!=null?Ee:false),[L,Ne]=useState((t==null?void 0:t.likelyConsequences)||""),[z,_e]=useState((t==null?void 0:t.mitigationMeasures)||""),[Y,ye]=useState(((Me=t==null?void 0:t.dpoContact)==null?void 0:Me.name)||""),[U,ue]=useState((($e=t==null?void 0:t.dpoContact)==null?void 0:$e.email)||""),[H,xe]=useState(((Oe=t==null?void 0:t.dpoContact)==null?void 0:Oe.phone)||""),[Z,Ce]=useState((Le=t==null?void 0:t.isPhasedReport)!=null?Le:false),[G,Se]=useState((t==null?void 0:t.supplementsReportId)||""),[De,Ae]=useState((t==null?void 0:t.status)||"ongoing"),[K,Re]=useState((t==null?void 0:t.initialActions)||""),[_,W]=useState([]),[rr,J]=useState(false),[a$3,v]=useState({}),tr=()=>{ee(""),re(""),te(""),ie(""),ae(""),ne(""),oe(""),se(""),de(""),ce([]),pe(""),le([]),ge(""),be(""),fe(""),ve(false),Ne(""),_e(""),ye(""),ue(""),xe(""),Ce(false),Se(""),Ae("ongoing"),Re(""),W([]),J(false),v({}),w==null||w();},ir=r=>{let o=r.target.value;pe(o);let l=o.split(",").map(s=>s.trim()).filter(Boolean);ce(l);},ar=r=>{le(o=>o.includes(r)?o.filter(l=>l!==r):[...o,r]);},nr=r=>{var ze;let o=r.target.files;if(!o)return;let l=[],s={};if(_.length+o.length>D){s.attachments=`Maximum of ${D} files allowed`,v(g=>a$1(a$1({},g),s));return}for(let g=0;g<o.length;g++){let y=o[g];if(y.size>A){s.attachments=`File ${y.name} exceeds the maximum size of ${A/(1024*1024)}MB`;continue}let Ye="."+((ze=y.name.split(".").pop())==null?void 0:ze.toLowerCase());if(!R.includes(Ye)){s.attachments=`File type ${Ye} is not allowed`;continue}l.push(y);}l.length>0&&W(g=>[...g,...l]),Object.keys(s).length>0?v(g=>a$1(a$1({},g),s)):v(g=>b(a$1({},g),{attachments:""}));},or=r=>{W(o=>o.filter((l,s)=>s!==r));},sr=()=>{let r={};return q.trim()||(r.breachTitle="Breach title is required"),P.trim()||(r.description="Description is required"),k||(r.category="Category is required"),j||(r.discoveredAt="Discovery date is required"),I.trim()||(r.reporterName="Reporter name is required"),N.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(N)||(r.reporterEmail="Reporter email is invalid"):r.reporterEmail="Reporter email is required",B.trim()||(r.reporterDepartment="Reporter department is required"),me.length===0&&(r.affectedSystems="At least one affected system is required"),M.length===0&&(r.dataTypes="At least one data type is required"),h&&isNaN(Number(h))&&(r.estimatedAffectedSubjects="Estimated affected subjects must be a number"),v(r),r},dr=r=>{r.preventDefault();let o=sr();if(Object.keys(o).length>0){u==null||u(o);return}let l={title:a$2(q),description:a$2(P),category:k,discoveredAt:new Date(j).getTime(),occurredAt:T?new Date(T).getTime():void 0,reportedAt:Date.now(),reporter:{name:a$2(I),email:a$2(N),department:a$2(B),phone:E?a$2(E):void 0},affectedSystems:me.map(s=>a$2(s)),dataTypes:M,estimatedAffectedSubjects:h?Number(h):void 0,approximateRecordCount:$?Number($):void 0,dataSubjectCategories:O?O.split(",").map(s=>a$2(s.trim())).filter(Boolean):void 0,involvesSensitiveData:he,likelyConsequences:L?a$2(L):void 0,mitigationMeasures:z?a$2(z):void 0,dpoContact:Y||U?{name:a$2(Y),email:a$2(U),phone:H?a$2(H):void 0}:void 0,isPhasedReport:Z||void 0,supplementsReportId:G?a$2(G):void 0,status:De,initialActions:K?a$2(K):void 0,attachments:_.map(s=>({name:s.name,type:s.type,size:s.size,file:s}))};Ge(l),Ke&&J(true);};if(rr)return jsxs("div",{"data-ndpr-component":"breach-report-form",className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${Q}`,children:[jsx("h2",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Submitted"}),jsx("p",{className:"ndpr-text-success",children:We}),jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-md",children:[jsx("h3",{className:"text-sm font-bold ndpr-text-warning mb-2",children:"Important: Next Steps"}),jsx("p",{className:"ndpr-text-warning text-sm",children:"Under the NDPA (Section 40), data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsx("button",{onClick:()=>J(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${X}`,children:"Report Another Breach"})]});let mr=[{id:"personal",label:"Personal Information (names, addresses)"},{id:"contact",label:"Contact Information (email, phone)"},{id:"financial",label:"Financial Information (bank details, payment info)"},{id:"health",label:"Health Information"},{id:"identification",label:"Identification Documents (ID cards, passports)"},{id:"login",label:"Login Credentials"},{id:"biometric",label:"Biometric Data"},{id:"children",label:"Children's Data"},{id:"location",label:"Location Data"},{id:"communications",label:"Communications Content"}];return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${Q}`,d.root,c$1),children:[jsx("h2",{className:a("ndpr-section-heading",d.title,c$1),children:Qe}),jsx("p",{className:"ndpr-card__subtitle",children:Xe}),jsx("form",{onSubmit:dr,className:a("",d.form,c$1),children:jsxs("div",{className:"ndpr-form-section",children:[jsxs("div",{className:a("",d.fieldGroup,c$1),children:[jsx("h3",{className:"ndpr-section-heading",children:"Breach Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"breachTitle",className:a("ndpr-form-field__label",d.label,c$1),children:["Breach Title/Summary ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"breachTitle",value:q,onChange:r=>ee(r.target.value),className:a("ndpr-form-field__input",d.input,c$1),required:true,"aria-invalid":!!a$3.breachTitle,"aria-describedby":a$3.breachTitle?"breachTitle-error":void 0}),a$3.breachTitle&&jsx("p",{id:"breachTitle-error",role:"alert",className:"ndpr-form-field__error",children:a$3.breachTitle})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"category",className:a("ndpr-form-field__label",d.label,c$1),children:["Breach Category ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"category",value:k,onChange:r=>te(r.target.value),className:a("ndpr-form-field__input",d.select,c$1),required:true,"aria-invalid":!!a$3.category,"aria-describedby":a$3.category?"category-error":void 0,children:[jsx("option",{value:"",children:"Select a category"}),Ze.map(r=>jsx("option",{value:r.id,children:r.name},r.id))]}),a$3.category&&jsx("p",{id:"category-error",role:"alert",className:"ndpr-form-field__error",children:a$3.category})]}),jsxs("div",{className:"md:col-span-2",children:[jsxs("label",{htmlFor:"description",className:a("ndpr-form-field__label",d.label,c$1),children:["Detailed Description ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("textarea",{id:"description",value:P,onChange:r=>re(r.target.value),rows:4,className:a("ndpr-form-field__input",d.textarea,c$1),required:true,"aria-invalid":!!a$3.description,"aria-describedby":a$3.description?"description-error":void 0}),a$3.description&&jsx("p",{id:"description-error",role:"alert",className:"ndpr-form-field__error",children:a$3.description})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"discoveredAt",className:"ndpr-form-field__label",children:["Date Discovered ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"datetime-local",id:"discoveredAt",value:j,onChange:r=>ie(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.discoveredAt,"aria-describedby":a$3.discoveredAt?"discoveredAt-error":void 0}),a$3.discoveredAt&&jsx("p",{id:"discoveredAt-error",role:"alert",className:"ndpr-form-field__error",children:a$3.discoveredAt})]}),jsxs("div",{children:[jsx("label",{htmlFor:"occurredAt",className:"ndpr-form-field__label",children:"Date Occurred (if known)"}),jsx("input",{type:"datetime-local",id:"occurredAt",value:T,onChange:r=>ae(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Reporter Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"reporterName",className:"ndpr-form-field__label",children:["Your Name ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterName",value:I,onChange:r=>ne(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterName,"aria-describedby":a$3.reporterName?"reporterName-error":void 0}),a$3.reporterName&&jsx("p",{id:"reporterName-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterName})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterEmail",className:"ndpr-form-field__label",children:["Your Email ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"email",id:"reporterEmail",value:N,onChange:r=>oe(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterEmail,"aria-describedby":a$3.reporterEmail?"reporterEmail-error":void 0}),a$3.reporterEmail&&jsx("p",{id:"reporterEmail-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterEmail})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterDepartment",className:"ndpr-form-field__label",children:["Your Department ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterDepartment",value:B,onChange:r=>se(r.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.reporterDepartment,"aria-describedby":a$3.reporterDepartment?"reporterDepartment-error":void 0}),a$3.reporterDepartment&&jsx("p",{id:"reporterDepartment-error",role:"alert",className:"ndpr-form-field__error",children:a$3.reporterDepartment})]}),jsxs("div",{children:[jsx("label",{htmlFor:"reporterPhone",className:"ndpr-form-field__label",children:"Your Phone Number (Optional)"}),jsx("input",{type:"tel",id:"reporterPhone",value:E,onChange:r=>de(r.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Impact Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"affectedSystems",className:"ndpr-form-field__label",children:["Affected Systems/Applications ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"affectedSystems",value:er,onChange:ir,placeholder:"e.g. CRM, Email Server, Website (comma separated)",className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$3.affectedSystems,"aria-describedby":a$3.affectedSystems?"affectedSystems-error":void 0}),a$3.affectedSystems&&jsx("p",{id:"affectedSystems-error",role:"alert",className:"ndpr-form-field__error",children:a$3.affectedSystems})]}),jsxs("div",{children:[jsx("label",{htmlFor:"estimatedAffectedSubjects",className:"ndpr-form-field__label",children:"Estimated Number of Affected Data Subjects"}),jsx("input",{type:"text",id:"estimatedAffectedSubjects",value:h,onChange:r=>ge(r.target.value),placeholder:"e.g. 100",className:"ndpr-form-field__input","aria-invalid":!!a$3.estimatedAffectedSubjects,"aria-describedby":a$3.estimatedAffectedSubjects?"estimatedAffectedSubjects-error":void 0}),a$3.estimatedAffectedSubjects&&jsx("p",{id:"estimatedAffectedSubjects-error",role:"alert",className:"ndpr-form-field__error",children:a$3.estimatedAffectedSubjects})]}),jsxs("fieldset",{className:"md:col-span-2","aria-invalid":!!a$3.dataTypes,"aria-describedby":a$3.dataTypes?"dataTypes-error":void 0,children:[jsxs("legend",{className:"ndpr-form-field__label",children:["Types of Data Involved ",jsx("span",{className:"ndpr-form-field__required","aria-hidden":"true",children:"*"}),jsx("span",{className:"sr-only",children:"(required)"})]}),jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:mr.map(r=>jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"checkbox",id:`dataType_${r.id}`,checked:M.includes(r.id),onChange:()=>ar(r.id),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:`dataType_${r.id}`,className:"ml-2 text-sm ndpr-text-muted",children:r.label})]},r.id))}),a$3.dataTypes&&jsx("p",{id:"dataTypes-error",role:"alert",className:"ndpr-form-field__error",children:a$3.dataTypes})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"status",className:"ndpr-form-field__label",children:["Current Status ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"status",value:De,onChange:r=>Ae(r.target.value),className:a("ndpr-form-field__input",d.select,c$1),required:true,children:[jsx("option",{value:"ongoing",children:"Ongoing (breach is still active)"}),jsx("option",{value:"contained",children:"Contained (breach is stopped but not resolved)"}),jsx("option",{value:"resolved",children:"Resolved (breach is fully addressed)"})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"approximateRecordCount",className:"ndpr-form-field__label",children:"Approximate Number of Records Concerned"}),jsx("input",{type:"text",id:"approximateRecordCount",value:$,onChange:r=>be(r.target.value),placeholder:"e.g. 5000",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dataSubjectCategories",className:"ndpr-form-field__label",children:"Categories of Data Subjects Affected"}),jsx("input",{type:"text",id:"dataSubjectCategories",value:O,onChange:r=>fe(r.target.value),placeholder:"e.g. customers, employees, minors",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Comma-separated. Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{className:"md:col-span-2 flex items-center",children:[jsx("input",{id:"involvesSensitiveData",type:"checkbox",checked:he,onChange:r=>ve(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"involvesSensitiveData",className:"ml-2 text-sm ndpr-text-muted",children:"Sensitive personal data (NDPA Section 30) is involved"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"likelyConsequences",className:"ndpr-form-field__label",children:"Likely Consequences for Data Subjects"}),jsx("textarea",{id:"likelyConsequences",value:L,onChange:r=>Ne(r.target.value),placeholder:"e.g. identity theft, financial loss, reputational damage, discrimination",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required content for NDPC report and Section 40(3) communications to data subjects."})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"mitigationMeasures",className:"ndpr-form-field__label",children:"Mitigation Measures"}),jsx("textarea",{id:"mitigationMeasures",value:z,onChange:r=>_e(r.target.value),placeholder:"Measures taken or proposed to mitigate possible adverse effects (NDPA Section 40(3))",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("h4",{className:"ndpr-section-heading text-sm mt-4",children:"Data Protection Officer (NDPC contact)"}),jsx("p",{className:"text-xs ndpr-text-muted mb-2",children:"Defaults to organisation-level DPO if left blank."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoName",className:"ndpr-form-field__label",children:"DPO Name"}),jsx("input",{type:"text",id:"dpoName",value:Y,onChange:r=>ye(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoEmail",className:"ndpr-form-field__label",children:"DPO Email"}),jsx("input",{type:"email",id:"dpoEmail",value:U,onChange:r=>ue(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoPhone",className:"ndpr-form-field__label",children:"DPO Phone"}),jsx("input",{type:"tel",id:"dpoPhone",value:H,onChange:r=>xe(r.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2 flex items-center mt-2",children:[jsx("input",{id:"isPhasedReport",type:"checkbox",checked:Z,onChange:r=>Ce(r.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"isPhasedReport",className:"ml-2 text-sm ndpr-text-muted",children:"This is a phased / interim report (Section 40(2) \u2014 complete info not yet available)"})]}),Z&&jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"supplementsReportId",className:"ndpr-form-field__label",children:"Supplements Report ID (if applicable)"}),jsx("input",{type:"text",id:"supplementsReportId",value:G,onChange:r=>Se(r.target.value),placeholder:"Prior report ID this report supplements",className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"initialActions",className:"ndpr-form-field__label",children:"Initial Actions Taken"}),jsx("textarea",{id:"initialActions",value:K,onChange:r=>Re(r.target.value),placeholder:"Describe any immediate actions that have been taken to address the breach",rows:3,className:a("ndpr-form-field__input",d.textarea,c$1)})]})]})]}),Je&&jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Attachments"}),jsxs("div",{className:"ndpr-form-field",children:[jsx("label",{htmlFor:"breach-attachments",className:"ndpr-form-field__label",children:"Upload Supporting Files (Optional)"}),jsxs("p",{className:"text-xs ndpr-text-muted mb-2",children:["Max ",D," files, ",A/(1024*1024),"MB each. Allowed types: ",R.join(", ")]}),jsx("input",{id:"breach-attachments",type:"file",onChange:nr,multiple:true,className:"ndpr-form-field__input",accept:R.join(",")}),a$3.attachments&&jsx("p",{id:"attachments-error",role:"alert",className:"ndpr-form-field__error",children:a$3.attachments})]}),_.length>0&&jsxs("div",{className:"ndpr-form-field",children:[jsx("h4",{className:"ndpr-form-field__label",children:"Attached Files:"}),jsx("ul",{className:"ndpr-form-section",children:_.map((r,o)=>jsxs("li",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded",children:[jsxs("div",{className:"flex items-center",children:[jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4 ndpr-text-muted mr-2",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"})}),jsx("span",{className:"text-sm ndpr-text-muted",children:r.name}),jsxs("span",{className:"ml-2 text-xs ndpr-text-muted",children:["(",(r.size/1024).toFixed(1)," KB)"]})]}),jsxs("button",{type:"button",onClick:()=>or(o),"aria-label":`Remove attachment ${r.name}`,className:"text-red-500 hover:ndpr-text-destructive p-2 min-w-[44px] min-h-[44px] flex items-center justify-center",children:[jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),jsx("span",{className:"sr-only",children:"Remove"})]})]},o))})]})]}),jsxs("div",{className:a("ndpr-alert ndpr-alert--info",d.notice,c$1),children:[jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsx("p",{className:"ndpr-text-info text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxs("div",{className:"mt-6 relative flex gap-3",children:[f&&d.loadingOverlay&&jsx("div",{className:d.loadingOverlay}),jsx("button",{type:"submit",disabled:f,className:a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${X} ${f?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c$1),children:f?"Submitting...":Ve}),jsx("button",{type:"button",onClick:tr,disabled:f,className:a("px-6 py-3 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 rounded-md hover:bg-gray-300 dark:hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2",void 0,c$1),children:"Reset"})]})]})})]})};
2
2
  export{fr as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-YX7DEHPA.mjs';import {useMemo}from'react';function r({input:e}){let p=JSON.stringify(e);return useMemo(()=>a(e),[p])}export{r as a};
@@ -1 +1 @@
1
- var m=["critical","high","medium","low"];function p(e){let i=new Date(e).getTime();if(isNaN(i))return 1/0;let t=(Date.now()-i)/(1e3*60*60*24*30.44);return Math.max(0,t)}function u(e){if(e.length===0)return 100;let i=e.filter(t=>t.pass).length;return Math.round(i/e.length*100)}function f(e){return [{key:"hasConsentMechanism",label:"Consent collection mechanism",priority:"critical",effort:"high",recommendation:"Implement a clear, affirmative consent collection mechanism before processing personal data.",ndpaSection:"Section 25",pass:e.hasConsentMechanism},{key:"hasPurposeSpecification",label:"Purpose specification at collection",priority:"critical",effort:"medium",recommendation:"Specify and communicate the purpose of data collection at the point of consent.",ndpaSection:"Section 25",pass:e.hasPurposeSpecification},{key:"hasWithdrawalMechanism",label:"Consent withdrawal mechanism",priority:"high",effort:"medium",recommendation:"Provide a simple mechanism for data subjects to withdraw consent at any time.",ndpaSection:"Section 26",pass:e.hasWithdrawalMechanism},{key:"hasMinorProtection",label:"Minor (child) data protection controls",priority:"high",effort:"high",recommendation:"Implement age-verification and parental-consent controls for processing data of minors.",ndpaSection:"Section 26",pass:e.hasMinorProtection},{key:"consentRecordsRetained",label:"Consent records retained",priority:"medium",effort:"low",recommendation:"Retain records of all consents obtained, including what was agreed to and when.",ndpaSection:"Section 25",pass:e.consentRecordsRetained}]}function g(e){let i=e.responseTimelineDays<=30;return [{key:"hasRequestMechanism",label:"DSR submission mechanism",priority:"critical",effort:"high",recommendation:"Implement a formal channel (e.g. a web form or email address) for data subjects to submit requests.",ndpaSection:"Section 34",pass:e.hasRequestMechanism},{key:"supportsAccess",label:"Right of access supported",priority:"high",effort:"medium",recommendation:"Enable data subjects to request and receive a copy of their personal data.",ndpaSection:"Section 34(1)(a)\u2013(b)",pass:e.supportsAccess},{key:"supportsRectification",label:"Right to rectification supported",priority:"high",effort:"medium",recommendation:"Allow data subjects to request correction of inaccurate or incomplete personal data.",ndpaSection:"Section 34(1)(c)",pass:e.supportsRectification},{key:"supportsErasure",label:"Right to erasure supported",priority:"high",effort:"high",recommendation:"Implement processes to delete personal data upon valid erasure requests.",ndpaSection:"Section 34(1)(d), Section 34(2)",pass:e.supportsErasure},{key:"supportsPortability",label:"Right to data portability supported",priority:"medium",effort:"high",recommendation:"Provide personal data in a structured, machine-readable format upon request.",ndpaSection:"Section 38",pass:e.supportsPortability},{key:"supportsObjection",label:"Right to object supported",priority:"medium",effort:"medium",recommendation:"Honour objections to processing where no compelling legitimate grounds override the data subject's interests.",ndpaSection:"Section 36",pass:e.supportsObjection},{key:"responseTimeline",label:"DSR response within 30 days",priority:"high",effort:"medium",recommendation:"Reduce DSR response time to 30 days or less per NDPC guidance (GAID 2025).",ndpaSection:"Section 34 (NDPC GAID 2025 timeline guidance)",pass:i}]}function y(e){return [{key:"conductedForHighRisk",label:"DPIA conducted for high-risk processing",priority:"critical",effort:"high",recommendation:"Conduct a Data Protection Impact Assessment before undertaking high-risk processing activities.",ndpaSection:"Section 28",pass:e.conductedForHighRisk},{key:"documentedRisks",label:"Risks documented in DPIA",priority:"high",effort:"medium",recommendation:"Document identified risks to data subjects' rights and freedoms within the DPIA.",ndpaSection:"Section 28",pass:e.documentedRisks},{key:"mitigationMeasures",label:"Mitigation measures documented",priority:"high",effort:"medium",recommendation:"Document mitigation measures and residual risk acceptance within the DPIA.",ndpaSection:"Section 28",pass:e.mitigationMeasures}]}function b(e){return [{key:"hasNotificationProcess",label:"Breach notification process in place",priority:"critical",effort:"high",recommendation:"Establish a documented breach notification process covering detection, assessment, and reporting.",ndpaSection:"Section 40",pass:e.hasNotificationProcess},{key:"notifiesWithin72Hours",label:"NDPC notified within 72 hours",priority:"critical",effort:"medium",recommendation:"Ensure the NDPC is notified of qualifying breaches within 72 hours of discovery.",ndpaSection:"Section 40",pass:e.notifiesWithin72Hours},{key:"hasRiskAssessment",label:"Breach risk assessment performed",priority:"high",effort:"medium",recommendation:"Perform a risk assessment for every identified breach to determine notification obligations.",ndpaSection:"Section 40",pass:e.hasRiskAssessment},{key:"hasRecordKeeping",label:"Breach records maintained",priority:"medium",effort:"low",recommendation:"Maintain a breach register documenting all incidents, assessments, and actions taken.",ndpaSection:"Section 40",pass:e.hasRecordKeeping}]}function S(e){let t=p(e.lastUpdated)<=13;return [{key:"hasPrivacyPolicy",label:"Privacy policy exists",priority:"critical",effort:"high",recommendation:"Draft and publish a comprehensive privacy policy that satisfies NDPA requirements.",ndpaSection:"Section 27",pass:e.hasPrivacyPolicy},{key:"isPubliclyAccessible",label:"Privacy policy publicly accessible",priority:"high",effort:"low",recommendation:"Make the privacy policy easily accessible to data subjects on your website or app.",ndpaSection:"Section 27",pass:e.isPubliclyAccessible},{key:"policyUpToDate",label:"Privacy policy reviewed within 13 months",priority:"medium",effort:"medium",recommendation:"Review and update the privacy policy at least annually to reflect current practices.",ndpaSection:"Section 27",pass:t},{key:"coversAllSections",label:"Privacy policy covers all required sections",priority:"high",effort:"medium",recommendation:"Ensure the privacy policy addresses all NDPA-mandated disclosures including lawful basis, retention, and subject rights.",ndpaSection:"Section 27",pass:e.coversAllSections}]}function R(e){return [{key:"documentedForAllProcessing",label:"Lawful basis documented for all processing",priority:"critical",effort:"high",recommendation:"Identify and document a valid lawful basis for every processing activity before it begins.",ndpaSection:"Section 25(1)",pass:e.documentedForAllProcessing},{key:"hasLegitimateInterestAssessment",label:"Legitimate interest assessment completed",priority:"medium",effort:"medium",recommendation:"Complete a Legitimate Interest Assessment (LIA) where legitimate interests is the chosen lawful basis.",ndpaSection:"Section 25(1)",pass:e.hasLegitimateInterestAssessment}]}function v(e){return [{key:"hasTransferMechanisms",label:"Transfer mechanisms in place",priority:"critical",effort:"high",recommendation:"Implement appropriate transfer mechanisms (SCCs, BCRs, adequacy decisions, or Section 43 derogations) for all cross-border transfers.",ndpaSection:"Section 41",pass:e.hasTransferMechanisms},{key:"adequacyAssessed",label:"Adequacy of destination country assessed",priority:"high",effort:"medium",recommendation:"Assess whether the destination country provides an adequate level of data protection before transferring.",ndpaSection:"Section 42",pass:e.adequacyAssessed},{key:"ndpcApprovalObtained",label:"NDPC approval obtained where required",priority:"high",effort:"high",recommendation:"Obtain NDPC approval (e.g. for binding corporate rules, codes of conduct, or certification mechanisms) for transfers to countries without adequacy decisions where required.",ndpaSection:"Section 42(5)",pass:e.ndpcApprovalObtained}]}function w(e){let t=p(e.lastReviewed)<=6;return [{key:"maintained",label:"Record of Processing Activities maintained",priority:"critical",effort:"high",recommendation:"Create and maintain a comprehensive Record of Processing Activities (ROPA) as required by the NDPA.",ndpaSection:"Section 29",pass:e.maintained},{key:"includesAllProcessing",label:"ROPA includes all processing activities",priority:"high",effort:"medium",recommendation:"Ensure the ROPA captures every processing activity across all departments and systems.",ndpaSection:"Section 29",pass:e.includesAllProcessing},{key:"ropaUpToDate",label:"ROPA reviewed within 6 months",priority:"medium",effort:"low",recommendation:"Review and update the ROPA at least every six months to reflect changes in processing activities.",ndpaSection:"Section 29",pass:t}]}var k=[{name:"consent",weight:.2,ndpaSections:["Section 25","Section 26"],evaluate:e=>f(e.consent)},{name:"dsr",weight:.15,ndpaSections:["Section 34","Section 35","Section 36","Section 37","Section 38"],evaluate:e=>g(e.dsr)},{name:"breach",weight:.15,ndpaSections:["Section 40"],evaluate:e=>b(e.breach)},{name:"policy",weight:.12,ndpaSections:["Section 27"],evaluate:e=>S(e.policy)},{name:"dpia",weight:.12,ndpaSections:["Section 28"],evaluate:e=>y(e.dpia)},{name:"lawfulBasis",weight:.1,ndpaSections:["Section 25(1)"],evaluate:e=>R(e.lawfulBasis)},{name:"crossBorder",weight:.08,ndpaSections:["Section 41","Section 42","Section 43"],evaluate:e=>v(e.crossBorder)},{name:"ropa",weight:.08,ndpaSections:["Section 29"],evaluate:e=>w(e.ropa)}];function P(e){return e>=90?"excellent":e>=70?"good":e>=40?"needs-work":"critical"}function C(e){let i={},t=[],s=0;for(let o of k){let a=o.evaluate(e),c=u(a),l=c*o.weight;s+=l;let d=[];for(let n of a)n.pass||(d.push(n.label),t.push({module:o.name,key:n.key,label:n.label,priority:n.priority,effort:n.effort,recommendation:n.recommendation,ndpaSection:n.ndpaSection}));i[o.name]={name:o.name,score:c,maxScore:100,weightedScore:Math.round(l*100)/100,ndpaSections:o.ndpaSections,gaps:d};}t.sort((o,a)=>m.indexOf(o.priority)-m.indexOf(a.priority));let r=Math.round(s),h=[{section:"Section 25",title:"Consent and lawful basis for processing"},{section:"Section 26",title:"Withdrawal of consent and minor protection"},{section:"Section 27",title:"Privacy notice requirements"},{section:"Section 28",title:"Data Protection Impact Assessment (including Section 28(2) NDPC consultation)"},{section:"Section 29",title:"Records of processing activities"},{section:"Section 34",title:"Data subject rights (access, rectification, erasure, restriction)"},{section:"Section 35",title:"Right to withdraw consent"},{section:"Section 36",title:"Right to object"},{section:"Section 37",title:"Rights related to automated decision-making"},{section:"Section 38",title:"Right to data portability"},{section:"Section 40",title:"Data breach notification"},{section:"Section 41",title:"Cross-border transfer mechanisms (SCCs / BCRs)"},{section:"Section 42",title:"Cross-border adequacy decisions"},{section:"Section 43",title:"Cross-border transfer derogations"}];return {score:r,rating:P(r),modules:i,recommendations:t,regulatoryReferences:h,generatedAt:new Date().toISOString()}}export{C as a};
1
+ var m=["critical","high","medium","low"];function p(e){let i=new Date(e).getTime();if(isNaN(i))return 1/0;let t=(Date.now()-i)/(1e3*60*60*24*30.44);return Math.max(0,t)}function u(e){if(e.length===0)return 100;let i=e.filter(t=>t.pass).length;return Math.round(i/e.length*100)}function f(e){return [{key:"hasConsentMechanism",label:"Consent collection mechanism",priority:"critical",effort:"high",recommendation:"Implement a clear, affirmative consent collection mechanism before processing personal data.",ndpaSection:"Section 25",pass:e.hasConsentMechanism},{key:"hasPurposeSpecification",label:"Purpose specification at collection",priority:"critical",effort:"medium",recommendation:"Specify and communicate the purpose of data collection at the point of consent.",ndpaSection:"Section 25",pass:e.hasPurposeSpecification},{key:"hasWithdrawalMechanism",label:"Consent withdrawal mechanism",priority:"high",effort:"medium",recommendation:"Provide a simple mechanism for data subjects to withdraw consent at any time.",ndpaSection:"Section 26",pass:e.hasWithdrawalMechanism},{key:"hasMinorProtection",label:"Minor (child) data protection controls",priority:"high",effort:"high",recommendation:"Implement age-verification and parental-consent controls for processing data of minors.",ndpaSection:"Section 31",pass:e.hasMinorProtection},{key:"consentRecordsRetained",label:"Consent records retained",priority:"medium",effort:"low",recommendation:"Retain records of all consents obtained, including what was agreed to and when.",ndpaSection:"Section 25",pass:e.consentRecordsRetained}]}function g(e){let i=e.responseTimelineDays<=30;return [{key:"hasRequestMechanism",label:"DSR submission mechanism",priority:"critical",effort:"high",recommendation:"Implement a formal channel (e.g. a web form or email address) for data subjects to submit requests.",ndpaSection:"Section 34",pass:e.hasRequestMechanism},{key:"supportsAccess",label:"Right of access supported",priority:"high",effort:"medium",recommendation:"Enable data subjects to request and receive a copy of their personal data.",ndpaSection:"Section 34(1)(a)\u2013(b)",pass:e.supportsAccess},{key:"supportsRectification",label:"Right to rectification supported",priority:"high",effort:"medium",recommendation:"Allow data subjects to request correction of inaccurate or incomplete personal data.",ndpaSection:"Section 34(1)(c)",pass:e.supportsRectification},{key:"supportsErasure",label:"Right to erasure supported",priority:"high",effort:"high",recommendation:"Implement processes to delete personal data upon valid erasure requests.",ndpaSection:"Section 34(1)(d), Section 34(2)",pass:e.supportsErasure},{key:"supportsPortability",label:"Right to data portability supported",priority:"medium",effort:"high",recommendation:"Provide personal data in a structured, machine-readable format upon request.",ndpaSection:"Section 38",pass:e.supportsPortability},{key:"supportsObjection",label:"Right to object supported",priority:"medium",effort:"medium",recommendation:"Honour objections to processing where no compelling legitimate grounds override the data subject's interests.",ndpaSection:"Section 36",pass:e.supportsObjection},{key:"responseTimeline",label:"DSR response within 30 days",priority:"high",effort:"medium",recommendation:"Reduce DSR response time to 30 days or less per NDPC guidance (GAID 2025).",ndpaSection:"Section 34 (NDPC GAID 2025 timeline guidance)",pass:i}]}function y(e){return [{key:"conductedForHighRisk",label:"DPIA conducted for high-risk processing",priority:"critical",effort:"high",recommendation:"Conduct a Data Protection Impact Assessment before undertaking high-risk processing activities.",ndpaSection:"Section 28",pass:e.conductedForHighRisk},{key:"documentedRisks",label:"Risks documented in DPIA",priority:"high",effort:"medium",recommendation:"Document identified risks to data subjects' rights and freedoms within the DPIA.",ndpaSection:"Section 28",pass:e.documentedRisks},{key:"mitigationMeasures",label:"Mitigation measures documented",priority:"high",effort:"medium",recommendation:"Document mitigation measures and residual risk acceptance within the DPIA.",ndpaSection:"Section 28",pass:e.mitigationMeasures}]}function b(e){return [{key:"hasNotificationProcess",label:"Breach notification process in place",priority:"critical",effort:"high",recommendation:"Establish a documented breach notification process covering detection, assessment, and reporting.",ndpaSection:"Section 40",pass:e.hasNotificationProcess},{key:"notifiesWithin72Hours",label:"NDPC notified within 72 hours",priority:"critical",effort:"medium",recommendation:"Ensure the NDPC is notified of qualifying breaches within 72 hours of discovery.",ndpaSection:"Section 40",pass:e.notifiesWithin72Hours},{key:"hasRiskAssessment",label:"Breach risk assessment performed",priority:"high",effort:"medium",recommendation:"Perform a risk assessment for every identified breach to determine notification obligations.",ndpaSection:"Section 40",pass:e.hasRiskAssessment},{key:"hasRecordKeeping",label:"Breach records maintained",priority:"medium",effort:"low",recommendation:"Maintain a breach register documenting all incidents, assessments, and actions taken.",ndpaSection:"Section 40",pass:e.hasRecordKeeping}]}function S(e){let t=p(e.lastUpdated)<=13;return [{key:"hasPrivacyPolicy",label:"Privacy policy exists",priority:"critical",effort:"high",recommendation:"Draft and publish a comprehensive privacy policy that satisfies NDPA requirements.",ndpaSection:"Section 27",pass:e.hasPrivacyPolicy},{key:"isPubliclyAccessible",label:"Privacy policy publicly accessible",priority:"high",effort:"low",recommendation:"Make the privacy policy easily accessible to data subjects on your website or app.",ndpaSection:"Section 27",pass:e.isPubliclyAccessible},{key:"policyUpToDate",label:"Privacy policy reviewed within 13 months",priority:"medium",effort:"medium",recommendation:"Review and update the privacy policy at least annually to reflect current practices.",ndpaSection:"Section 27",pass:t},{key:"coversAllSections",label:"Privacy policy covers all required sections",priority:"high",effort:"medium",recommendation:"Ensure the privacy policy addresses all NDPA-mandated disclosures including lawful basis, retention, and subject rights.",ndpaSection:"Section 27",pass:e.coversAllSections}]}function R(e){return [{key:"documentedForAllProcessing",label:"Lawful basis documented for all processing",priority:"critical",effort:"high",recommendation:"Identify and document a valid lawful basis for every processing activity before it begins.",ndpaSection:"Section 25(1)",pass:e.documentedForAllProcessing},{key:"hasLegitimateInterestAssessment",label:"Legitimate interest assessment completed",priority:"medium",effort:"medium",recommendation:"Complete a Legitimate Interest Assessment (LIA) where legitimate interests is the chosen lawful basis.",ndpaSection:"Section 25(1)",pass:e.hasLegitimateInterestAssessment}]}function v(e){return [{key:"hasTransferMechanisms",label:"Transfer mechanisms in place",priority:"critical",effort:"high",recommendation:"Implement appropriate transfer mechanisms (SCCs, BCRs, adequacy decisions, or Section 43 derogations) for all cross-border transfers.",ndpaSection:"Section 41",pass:e.hasTransferMechanisms},{key:"adequacyAssessed",label:"Adequacy of destination country assessed",priority:"high",effort:"medium",recommendation:"Assess whether the destination country provides an adequate level of data protection before transferring.",ndpaSection:"Section 42",pass:e.adequacyAssessed},{key:"ndpcApprovalObtained",label:"NDPC approval obtained where required",priority:"high",effort:"high",recommendation:"Obtain NDPC approval (e.g. for binding corporate rules, codes of conduct, or certification mechanisms) for transfers to countries without adequacy decisions where required.",ndpaSection:"Section 42(5)",pass:e.ndpcApprovalObtained}]}function w(e){let t=p(e.lastReviewed)<=6;return [{key:"maintained",label:"Record of Processing Activities maintained",priority:"critical",effort:"high",recommendation:"Create and maintain a comprehensive Record of Processing Activities (ROPA) as required by the NDPA.",ndpaSection:"Section 29",pass:e.maintained},{key:"includesAllProcessing",label:"ROPA includes all processing activities",priority:"high",effort:"medium",recommendation:"Ensure the ROPA captures every processing activity across all departments and systems.",ndpaSection:"Section 29",pass:e.includesAllProcessing},{key:"ropaUpToDate",label:"ROPA reviewed within 6 months",priority:"medium",effort:"low",recommendation:"Review and update the ROPA at least every six months to reflect changes in processing activities.",ndpaSection:"Section 29",pass:t}]}var k=[{name:"consent",weight:.2,ndpaSections:["Section 25","Section 26"],evaluate:e=>f(e.consent)},{name:"dsr",weight:.15,ndpaSections:["Section 34","Section 35","Section 36","Section 37","Section 38"],evaluate:e=>g(e.dsr)},{name:"breach",weight:.15,ndpaSections:["Section 40"],evaluate:e=>b(e.breach)},{name:"policy",weight:.12,ndpaSections:["Section 27"],evaluate:e=>S(e.policy)},{name:"dpia",weight:.12,ndpaSections:["Section 28"],evaluate:e=>y(e.dpia)},{name:"lawfulBasis",weight:.1,ndpaSections:["Section 25(1)"],evaluate:e=>R(e.lawfulBasis)},{name:"crossBorder",weight:.08,ndpaSections:["Section 41","Section 42","Section 43"],evaluate:e=>v(e.crossBorder)},{name:"ropa",weight:.08,ndpaSections:["Section 29"],evaluate:e=>w(e.ropa)}];function P(e){return e>=90?"excellent":e>=70?"good":e>=40?"needs-work":"critical"}function C(e){let i={},t=[],s=0;for(let o of k){let a=o.evaluate(e),c=u(a),l=c*o.weight;s+=l;let d=[];for(let n of a)n.pass||(d.push(n.label),t.push({module:o.name,key:n.key,label:n.label,priority:n.priority,effort:n.effort,recommendation:n.recommendation,ndpaSection:n.ndpaSection}));i[o.name]={name:o.name,score:c,maxScore:100,weightedScore:Math.round(l*100)/100,ndpaSections:o.ndpaSections,gaps:d};}t.sort((o,a)=>m.indexOf(o.priority)-m.indexOf(a.priority));let r=Math.round(s),h=[{section:"Section 25",title:"Consent and lawful basis for processing"},{section:"Section 26",title:"Withdrawal of consent and minor protection"},{section:"Section 27",title:"Privacy notice requirements"},{section:"Section 28",title:"Data Protection Impact Assessment (including Section 28(2) NDPC consultation)"},{section:"Section 29",title:"Records of processing activities"},{section:"Section 34",title:"Data subject rights (access, rectification, erasure, restriction)"},{section:"Section 35",title:"Right to withdraw consent"},{section:"Section 36",title:"Right to object"},{section:"Section 37",title:"Rights related to automated decision-making"},{section:"Section 38",title:"Right to data portability"},{section:"Section 40",title:"Data breach notification"},{section:"Section 41",title:"Cross-border transfer mechanisms (SCCs / BCRs)"},{section:"Section 42",title:"Cross-border adequacy decisions"},{section:"Section 43",title:"Cross-border transfer derogations"}];return {score:r,rating:P(r),modules:i,recommendations:t,regulatoryReferences:h,generatedAt:new Date().toISOString()}}export{C as a};
@@ -1 +1 @@
1
- import {a}from'./chunk-SFGW37LE.mjs';import {c}from'./chunk-FRQFU44F.mjs';import {jsxs,jsx}from'react/jsx-runtime';var K=({sections:v,answers:k,onAnswerChange:c$1,currentSectionIndex:o,onNextSection:S,onPrevSection:L,validationErrors:R={},readOnly:t=false,className:V="",buttonClassName:$="",nextButtonText:m,prevButtonText:b,submitButtonText:g,showProgress:j=true,progress:u,classNames:y={},unstyled:B=false})=>{var P,x,A;let _=c(),F=(P=m!=null?m:_.dpia.next)!=null?P:"Next",z=(x=b!=null?b:_.dpia.previous)!=null?x:"Previous",E=(A=g!=null?g:_.dpia.submit)!=null?A:"Submit",f=v[o],G=o===v.length-1,l=(e,r)=>{let d=r?y[r]:void 0;return !d&&r==="nextButton"&&(d=y.primaryButton),!d&&r==="prevButton"&&(d=y.secondaryButton),a(e,d,B)},W=e=>e.showWhen?e.showWhen.every(r=>{let d=k[r.questionId];switch(r.operator){case "equals":return d===r.value;case "contains":return Array.isArray(d)?d.includes(String(r.value)):false;case "greaterThan":return typeof d=="number"&&typeof r.value=="number"?d>r.value:false;case "lessThan":return typeof d=="number"&&typeof r.value=="number"?d<r.value:false;default:return true}}):true,h=e=>l("ndpr-form-field__input","input"),M=e=>{if(!W(e))return null;let r=R[e.id],d=k[e.id],s=typeof d=="boolean"?String(d):d,C=e.guidance?`${e.id}-guidance`:void 0,w=r?`${e.id}-error`:void 0,p=[C,w].filter(Boolean).join(" ")||void 0;return jsxs("div",{className:l("ndpr-form-field","question"),children:[jsxs("label",{htmlFor:e.id,className:l("ndpr-form-field__label","questionText"),children:[e.text,e.required&&jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),e.guidance&&jsx("p",{id:C,className:l("ndpr-form-field__hint","guidance"),children:e.guidance}),e.type==="text"&&jsx("input",{type:"text",id:e.id,value:s||"",onChange:a=>c$1(e.id,a.target.value),disabled:t,className:h(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0}),e.type==="textarea"&&jsx("textarea",{id:e.id,value:s||"",onChange:a=>c$1(e.id,a.target.value),disabled:t,rows:4,className:h(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0}),e.type==="select"&&e.options&&jsxs("select",{id:e.id,value:s||"",onChange:a=>c$1(e.id,a.target.value),disabled:t,className:h(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0,children:[jsx("option",{value:"",children:"Select an option"}),e.options.map(a=>jsx("option",{value:a.value,children:a.label},a.value))]}),e.type==="radio"&&e.options&&jsx("div",{className:l("ndpr-form-field__option-group","radioGroup"),role:"radiogroup","aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0,children:e.options.map(a=>jsxs("div",{className:l("ndpr-form-field__checkbox-row","radioOption"),children:[jsx("input",{type:"radio",id:`${e.id}_${a.value}`,name:e.id,value:a.value,checked:s===a.value,onChange:()=>c$1(e.id,a.value),disabled:t,className:"ndpr-form-field__radio"}),jsxs("label",{htmlFor:`${e.id}_${a.value}`,className:"ndpr-form-field__label",children:[a.label,a.riskLevel&&jsxs("span",{className:a.riskLevel==="low"?"ndpr-badge ndpr-badge--success":a.riskLevel==="medium"?"ndpr-badge ndpr-badge--warning":"ndpr-badge ndpr-badge--destructive",children:[a.riskLevel.charAt(0).toUpperCase()+a.riskLevel.slice(1)," Risk"]})]})]},a.value))}),e.type==="checkbox"&&e.options&&jsx("div",{className:"ndpr-form-field__option-group",role:"group","aria-label":e.text,"aria-describedby":p,"aria-invalid":r?true:void 0,children:e.options.map(a=>jsxs("div",{className:"ndpr-form-field__checkbox-row",children:[jsx("input",{type:"checkbox",id:`${e.id}_${a.value}`,value:a.value,checked:Array.isArray(s)?s.includes(a.value):false,onChange:N=>{let D=Array.isArray(s)?[...s]:[];N.target.checked?c$1(e.id,[...D,a.value]):c$1(e.id,D.filter(U=>U!==a.value));},disabled:t,className:"ndpr-form-field__checkbox"}),jsx("label",{htmlFor:`${e.id}_${a.value}`,className:"ndpr-form-field__label",children:a.label})]},a.value))}),e.type==="scale"&&jsxs("div",{className:"ndpr-form-field",children:[jsx("div",{className:"ndpr-form-field__hint",style:{display:"flex",justifyContent:"space-between"},children:e.scaleLabels&&Object.entries(e.scaleLabels).map(([a,N])=>jsx("span",{style:{width:`${100/Object.keys(e.scaleLabels||{}).length}%`,textAlign:"center"},children:N},a))}),jsx("input",{type:"range",id:e.id,min:e.minValue||1,max:e.maxValue||5,value:typeof s=="number"?s:e.minValue||1,onChange:a=>c$1(e.id,parseInt(a.target.value,10)),disabled:t,className:"ndpr-form-field__range","aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0}),jsxs("div",{className:"ndpr-form-field__hint",style:{textAlign:"center"},children:["Selected value: ",s||e.minValue||1]})]}),r&&jsx("p",{id:w,className:"ndpr-form-field__error",role:"alert",children:r})]},e.id)};return f?jsxs("div",{"data-ndpr-component":"dpia-questionnaire",className:`${l("ndpr-card","root")} ${V}`,children:[j&&jsxs("div",{className:l("ndpr-card__header","header"),style:{flexDirection:"column",alignItems:"stretch",gap:"var(--ndpr-space-2)"},children:[jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"var(--ndpr-font-size-sm)",color:"rgb(var(--ndpr-muted-foreground))"},children:[jsxs("span",{children:["Section ",o+1," of ",v.length]}),jsx("span",{children:u!==void 0?`${u}% Complete`:""})]}),jsx("div",{className:l("ndpr-progress","progressBar"),role:"progressbar","aria-valuenow":u!==void 0?u:Math.round((o+1)/v.length*100),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Questionnaire progress",children:jsx("div",{className:"ndpr-progress__bar",style:{width:`${u!==void 0?u:(o+1)/v.length*100}%`}})})]}),jsx("h2",{className:l("ndpr-card__title","title"),"aria-live":"polite",children:f.title}),f.description&&jsx("p",{className:l("ndpr-card__subtitle","sectionTitle"),children:f.description}),jsx("div",{className:l("ndpr-card__body","section"),children:f.questions.map(e=>M(e))}),jsxs("div",{className:l("ndpr-card__footer","navigation"),style:{justifyContent:"space-between"},children:[jsx("button",{type:"button",onClick:L,disabled:o===0||t,className:`${l("ndpr-button ndpr-button--secondary","prevButton")} ${$}`,children:z}),jsx("button",{type:"button",onClick:S,disabled:t,className:`${l("ndpr-button ndpr-button--primary","nextButton")} ${$}`,children:G?E:F})]})]}):jsx("div",{children:"No section found."})};export{K as a};
1
+ import {a}from'./chunk-SFGW37LE.mjs';import {c}from'./chunk-PHA3YMFO.mjs';import {jsxs,jsx}from'react/jsx-runtime';var K=({sections:v,answers:k,onAnswerChange:c$1,currentSectionIndex:o,onNextSection:S,onPrevSection:L,validationErrors:R={},readOnly:t=false,className:V="",buttonClassName:$="",nextButtonText:m,prevButtonText:b,submitButtonText:g,showProgress:j=true,progress:u,classNames:y={},unstyled:B=false})=>{var P,x,A;let _=c(),F=(P=m!=null?m:_.dpia.next)!=null?P:"Next",z=(x=b!=null?b:_.dpia.previous)!=null?x:"Previous",E=(A=g!=null?g:_.dpia.submit)!=null?A:"Submit",f=v[o],G=o===v.length-1,l=(e,r)=>{let d=r?y[r]:void 0;return !d&&r==="nextButton"&&(d=y.primaryButton),!d&&r==="prevButton"&&(d=y.secondaryButton),a(e,d,B)},W=e=>e.showWhen?e.showWhen.every(r=>{let d=k[r.questionId];switch(r.operator){case "equals":return d===r.value;case "contains":return Array.isArray(d)?d.includes(String(r.value)):false;case "greaterThan":return typeof d=="number"&&typeof r.value=="number"?d>r.value:false;case "lessThan":return typeof d=="number"&&typeof r.value=="number"?d<r.value:false;default:return true}}):true,h=e=>l("ndpr-form-field__input","input"),M=e=>{if(!W(e))return null;let r=R[e.id],d=k[e.id],s=typeof d=="boolean"?String(d):d,C=e.guidance?`${e.id}-guidance`:void 0,w=r?`${e.id}-error`:void 0,p=[C,w].filter(Boolean).join(" ")||void 0;return jsxs("div",{className:l("ndpr-form-field","question"),children:[jsxs("label",{htmlFor:e.id,className:l("ndpr-form-field__label","questionText"),children:[e.text,e.required&&jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),e.guidance&&jsx("p",{id:C,className:l("ndpr-form-field__hint","guidance"),children:e.guidance}),e.type==="text"&&jsx("input",{type:"text",id:e.id,value:s||"",onChange:a=>c$1(e.id,a.target.value),disabled:t,className:h(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0}),e.type==="textarea"&&jsx("textarea",{id:e.id,value:s||"",onChange:a=>c$1(e.id,a.target.value),disabled:t,rows:4,className:h(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0}),e.type==="select"&&e.options&&jsxs("select",{id:e.id,value:s||"",onChange:a=>c$1(e.id,a.target.value),disabled:t,className:h(),"aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0,children:[jsx("option",{value:"",children:"Select an option"}),e.options.map(a=>jsx("option",{value:a.value,children:a.label},a.value))]}),e.type==="radio"&&e.options&&jsx("div",{className:l("ndpr-form-field__option-group","radioGroup"),role:"radiogroup","aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0,children:e.options.map(a=>jsxs("div",{className:l("ndpr-form-field__checkbox-row","radioOption"),children:[jsx("input",{type:"radio",id:`${e.id}_${a.value}`,name:e.id,value:a.value,checked:s===a.value,onChange:()=>c$1(e.id,a.value),disabled:t,className:"ndpr-form-field__radio"}),jsxs("label",{htmlFor:`${e.id}_${a.value}`,className:"ndpr-form-field__label",children:[a.label,a.riskLevel&&jsxs("span",{className:a.riskLevel==="low"?"ndpr-badge ndpr-badge--success":a.riskLevel==="medium"?"ndpr-badge ndpr-badge--warning":"ndpr-badge ndpr-badge--destructive",children:[a.riskLevel.charAt(0).toUpperCase()+a.riskLevel.slice(1)," Risk"]})]})]},a.value))}),e.type==="checkbox"&&e.options&&jsx("div",{className:"ndpr-form-field__option-group",role:"group","aria-label":e.text,"aria-describedby":p,"aria-invalid":r?true:void 0,children:e.options.map(a=>jsxs("div",{className:"ndpr-form-field__checkbox-row",children:[jsx("input",{type:"checkbox",id:`${e.id}_${a.value}`,value:a.value,checked:Array.isArray(s)?s.includes(a.value):false,onChange:N=>{let D=Array.isArray(s)?[...s]:[];N.target.checked?c$1(e.id,[...D,a.value]):c$1(e.id,D.filter(U=>U!==a.value));},disabled:t,className:"ndpr-form-field__checkbox"}),jsx("label",{htmlFor:`${e.id}_${a.value}`,className:"ndpr-form-field__label",children:a.label})]},a.value))}),e.type==="scale"&&jsxs("div",{className:"ndpr-form-field",children:[jsx("div",{className:"ndpr-form-field__hint",style:{display:"flex",justifyContent:"space-between"},children:e.scaleLabels&&Object.entries(e.scaleLabels).map(([a,N])=>jsx("span",{style:{width:`${100/Object.keys(e.scaleLabels||{}).length}%`,textAlign:"center"},children:N},a))}),jsx("input",{type:"range",id:e.id,min:e.minValue||1,max:e.maxValue||5,value:typeof s=="number"?s:e.minValue||1,onChange:a=>c$1(e.id,parseInt(a.target.value,10)),disabled:t,className:"ndpr-form-field__range","aria-required":e.required||void 0,"aria-describedby":p,"aria-invalid":r?true:void 0}),jsxs("div",{className:"ndpr-form-field__hint",style:{textAlign:"center"},children:["Selected value: ",s||e.minValue||1]})]}),r&&jsx("p",{id:w,className:"ndpr-form-field__error",role:"alert",children:r})]},e.id)};return f?jsxs("div",{"data-ndpr-component":"dpia-questionnaire",className:`${l("ndpr-card","root")} ${V}`,children:[j&&jsxs("div",{className:l("ndpr-card__header","header"),style:{flexDirection:"column",alignItems:"stretch",gap:"var(--ndpr-space-2)"},children:[jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"var(--ndpr-font-size-sm)",color:"rgb(var(--ndpr-muted-foreground))"},children:[jsxs("span",{children:["Section ",o+1," of ",v.length]}),jsx("span",{children:u!==void 0?`${u}% Complete`:""})]}),jsx("div",{className:l("ndpr-progress","progressBar"),role:"progressbar","aria-valuenow":u!==void 0?u:Math.round((o+1)/v.length*100),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Questionnaire progress",children:jsx("div",{className:"ndpr-progress__bar",style:{width:`${u!==void 0?u:(o+1)/v.length*100}%`}})})]}),jsx("h2",{className:l("ndpr-card__title","title"),"aria-live":"polite",children:f.title}),f.description&&jsx("p",{className:l("ndpr-card__subtitle","sectionTitle"),children:f.description}),jsx("div",{className:l("ndpr-card__body","section"),children:f.questions.map(e=>M(e))}),jsxs("div",{className:l("ndpr-card__footer","navigation"),style:{justifyContent:"space-between"},children:[jsx("button",{type:"button",onClick:L,disabled:o===0||t,className:`${l("ndpr-button ndpr-button--secondary","prevButton")} ${$}`,children:z}),jsx("button",{type:"button",onClick:S,disabled:t,className:`${l("ndpr-button ndpr-button--primary","nextButton")} ${$}`,children:G?E:F})]})]}):jsx("div",{children:"No section found."})};export{K as a};
package/dist/consent.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkSJDDNB6M_js=require('./chunk-SJDDNB6M.js'),chunk42UJFTII_js=require('./chunk-42UJFTII.js'),chunkZD2W3YU2_js=require('./chunk-ZD2W3YU2.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js');require('./chunk-L2VO3MEJ.js'),require('./chunk-C2KEXHRX.js');var chunkDKLJ5DYN_js=require('./chunk-DKLJ5DYN.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var v=react.createContext(null);function p(){let t=react.useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let d=chunkQKXGVT2Q_js.a({options:t,adapter:n,version:s,onChange:r}),o=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},d),{options:t});return jsxRuntime.jsx(v.Provider,{value:o,children:c})};var S=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,d]=react.useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsxRuntime.jsx("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsxRuntime.jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>d(a=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{[o.id]:i.target.checked})),disabled:o.required,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxRuntime.jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxRuntime.jsxs("label",{htmlFor:`consent-${o.id}`,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsxRuntime.jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsxRuntime.jsx("p",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var P=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var R=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:d}=p();return jsxRuntime.jsx("button",{onClick:()=>{if(r)c(r);else {let i={};d.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:S,AcceptButton:P,RejectButton:R,SaveButton:y,Banner:chunkZD2W3YU2_js.a,Settings:chunk42UJFTII_js.a,Storage:chunkSJDDNB6M_js.a};Object.defineProperty(exports,"ConsentStorage",{enumerable:true,get:function(){return chunkSJDDNB6M_js.a}});Object.defineProperty(exports,"ConsentManager",{enumerable:true,get:function(){return chunk42UJFTII_js.a}});Object.defineProperty(exports,"ConsentBanner",{enumerable:true,get:function(){return chunkZD2W3YU2_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.b}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.a}});Object.defineProperty(exports,"resolveClass",{enumerable:true,get:function(){return chunkAME4HJR4_js.a}});exports.Consent=I;exports.ConsentAcceptButton=P;exports.ConsentOptionList=S;exports.ConsentProvider=g;exports.ConsentRejectButton=R;exports.ConsentSaveButton=y;exports.useConsentCompound=p;
2
+ 'use strict';var chunkSJDDNB6M_js=require('./chunk-SJDDNB6M.js'),chunkC32TMS75_js=require('./chunk-C32TMS75.js'),chunkPXUX4FYM_js=require('./chunk-PXUX4FYM.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js');require('./chunk-L2VO3MEJ.js'),require('./chunk-C2KEXHRX.js');var chunkDKLJ5DYN_js=require('./chunk-DKLJ5DYN.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-I5ZDNSX5.js'),require('./chunk-7563FVMY.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var v=react.createContext(null);function p(){let t=react.useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let d=chunkQKXGVT2Q_js.a({options:t,adapter:n,version:s,onChange:r}),o=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},d),{options:t});return jsxRuntime.jsx(v.Provider,{value:o,children:c})};var S=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,d]=react.useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsxRuntime.jsx("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsxRuntime.jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>d(a=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{[o.id]:i.target.checked})),disabled:o.required,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxRuntime.jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxRuntime.jsxs("label",{htmlFor:`consent-${o.id}`,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsxRuntime.jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsxRuntime.jsx("p",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var P=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var R=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:d}=p();return jsxRuntime.jsx("button",{onClick:()=>{if(r)c(r);else {let i={};d.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:S,AcceptButton:P,RejectButton:R,SaveButton:y,Banner:chunkPXUX4FYM_js.a,Settings:chunkC32TMS75_js.a,Storage:chunkSJDDNB6M_js.a};Object.defineProperty(exports,"ConsentStorage",{enumerable:true,get:function(){return chunkSJDDNB6M_js.a}});Object.defineProperty(exports,"ConsentManager",{enumerable:true,get:function(){return chunkC32TMS75_js.a}});Object.defineProperty(exports,"ConsentBanner",{enumerable:true,get:function(){return chunkPXUX4FYM_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.b}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.a}});Object.defineProperty(exports,"resolveClass",{enumerable:true,get:function(){return chunkAME4HJR4_js.a}});exports.Consent=I;exports.ConsentAcceptButton=P;exports.ConsentOptionList=S;exports.ConsentProvider=g;exports.ConsentRejectButton=R;exports.ConsentSaveButton=y;exports.useConsentCompound=p;
package/dist/consent.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a}from'./chunk-XOH4WXOZ.mjs';export{a as ConsentStorage}from'./chunk-XOH4WXOZ.mjs';import {a as a$1}from'./chunk-BPMVJOHH.mjs';export{a as ConsentManager}from'./chunk-BPMVJOHH.mjs';import {a as a$2}from'./chunk-I2ZBMR7F.mjs';export{a as ConsentBanner}from'./chunk-I2ZBMR7F.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';import {a as a$3}from'./chunk-PQ5IPUJN.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';export{b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-R3ZKV2J7.mjs';import {a as a$5}from'./chunk-SFGW37LE.mjs';export{a as resolveClass}from'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-DBZSN4WP.mjs';import {b,a as a$4}from'./chunk-ZJYULEER.mjs';import {createContext,useContext,useState}from'react';import {jsx,jsxs}from'react/jsx-runtime';var v=createContext(null);function p(){let t=useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let d=a$3({options:t,adapter:n,version:s,onChange:r}),o=b(a$4({},d),{options:t});return jsx(v.Provider,{value:o,children:c})};var S=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,d]=useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsx("div",{className:a$5("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxs("div",{className:a$5("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>d(a=>b(a$4({},a),{[o.id]:i.target.checked})),disabled:o.required,className:a$5("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxs("label",{htmlFor:`consent-${o.id}`,className:a$5("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsx("p",{className:a$5("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var P=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var R=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:d}=p();return jsx("button",{onClick:()=>{if(r)c(r);else {let i={};d.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:S,AcceptButton:P,RejectButton:R,SaveButton:y,Banner:a$2,Settings:a$1,Storage:a};export{I as Consent,P as ConsentAcceptButton,S as ConsentOptionList,g as ConsentProvider,R as ConsentRejectButton,y as ConsentSaveButton,p as useConsentCompound};
2
+ import {a}from'./chunk-XOH4WXOZ.mjs';export{a as ConsentStorage}from'./chunk-XOH4WXOZ.mjs';import {a as a$1}from'./chunk-CNCEP66F.mjs';export{a as ConsentManager}from'./chunk-CNCEP66F.mjs';import {a as a$2}from'./chunk-HMKXK23C.mjs';export{a as ConsentBanner}from'./chunk-HMKXK23C.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';import {a as a$3}from'./chunk-PQ5IPUJN.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';export{b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-R3ZKV2J7.mjs';import {a as a$5}from'./chunk-SFGW37LE.mjs';export{a as resolveClass}from'./chunk-SFGW37LE.mjs';import'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-DBZSN4WP.mjs';import {b,a as a$4}from'./chunk-ZJYULEER.mjs';import {createContext,useContext,useState}from'react';import {jsx,jsxs}from'react/jsx-runtime';var v=createContext(null);function p(){let t=useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let d=a$3({options:t,adapter:n,version:s,onChange:r}),o=b(a$4({},d),{options:t});return jsx(v.Provider,{value:o,children:c})};var S=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,d]=useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsx("div",{className:a$5("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxs("div",{className:a$5("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>d(a=>b(a$4({},a),{[o.id]:i.target.checked})),disabled:o.required,className:a$5("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxs("label",{htmlFor:`consent-${o.id}`,className:a$5("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsx("p",{className:a$5("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var P=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var R=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:d}=p();return jsx("button",{onClick:()=>{if(r)c(r);else {let i={};d.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:S,AcceptButton:P,RejectButton:R,SaveButton:y,Banner:a$2,Settings:a$1,Storage:a};export{I as Consent,P as ConsentAcceptButton,S as ConsentOptionList,g as ConsentProvider,R as ConsentRejectButton,y as ConsentSaveButton,p as useConsentCompound};
package/dist/core.d.mts CHANGED
@@ -37,7 +37,7 @@ export declare const arabicLocale: Required<{
37
37
  * - `hasCrossBorderTransfer` → Cross-Border Transfers (NDPA Part VI)
38
38
  * - `hasAutomatedDecisions` → Automated Decision-Making (NDPA §37)
39
39
  *
40
- * Section text uses `«TODO: fieldName»` markers (see {@link UNFILLED_PREFIX})
40
+ * Section text uses `«TODO: fieldName»` markers (the `UNFILLED_PREFIX` constant)
41
41
  * for any required org-info field that's empty in the context. Pair with
42
42
  * {@link findUnfilledTokens} to surface those before publishing.
43
43
  *
@@ -2006,7 +2006,7 @@ export declare function sanitizeInput(input: string): string;
2006
2006
 
2007
2007
  /**
2008
2008
  * Additional conditions required for processing sensitive personal data
2009
- * per NDPA Section 27
2009
+ * per NDPA Section 30
2010
2010
  */
2011
2011
  export declare type SensitiveDataCondition = 'explicit_consent' | 'employment_law' | 'vital_interests_incapable' | 'nonprofit_legitimate' | 'publicly_available' | 'legal_claims' | 'substantial_public_interest' | 'health_purposes' | 'public_health' | 'archiving_research';
2012
2012
 
package/dist/core.d.ts CHANGED
@@ -37,7 +37,7 @@ export declare const arabicLocale: Required<{
37
37
  * - `hasCrossBorderTransfer` → Cross-Border Transfers (NDPA Part VI)
38
38
  * - `hasAutomatedDecisions` → Automated Decision-Making (NDPA §37)
39
39
  *
40
- * Section text uses `«TODO: fieldName»` markers (see {@link UNFILLED_PREFIX})
40
+ * Section text uses `«TODO: fieldName»` markers (the `UNFILLED_PREFIX` constant)
41
41
  * for any required org-info field that's empty in the context. Pair with
42
42
  * {@link findUnfilledTokens} to surface those before publishing.
43
43
  *
@@ -2006,7 +2006,7 @@ export declare function sanitizeInput(input: string): string;
2006
2006
 
2007
2007
  /**
2008
2008
  * Additional conditions required for processing sensitive personal data
2009
- * per NDPA Section 27
2009
+ * per NDPA Section 30
2010
2010
  */
2011
2011
  export declare type SensitiveDataCondition = 'explicit_consent' | 'employment_law' | 'vital_interests_incapable' | 'nonprofit_legitimate' | 'publicly_available' | 'legal_claims' | 'substantial_public_interest' | 'health_purposes' | 'public_health' | 'archiving_research';
2012
2012
 
package/dist/core.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunk6YFPDGNB_js=require('./chunk-6YFPDGNB.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkRDALAH3Y_js=require('./chunk-RDALAH3Y.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkDKLJ5DYN_js=require('./chunk-DKLJ5DYN.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkYDKWD6MQ_js=require('./chunk-YDKWD6MQ.js'),chunkTTMGFC6C_js=require('./chunk-TTMGFC6C.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"arabicLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.e}});Object.defineProperty(exports,"frenchLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.f}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunk6YFPDGNB_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunkRDALAH3Y_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.b}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.a}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"NDPRProvider",{enumerable:true,get:function(){return chunkYDKWD6MQ_js.a}});Object.defineProperty(exports,"useNDPRConfig",{enumerable:true,get:function(){return chunkYDKWD6MQ_js.b}});Object.defineProperty(exports,"useNDPRLocale",{enumerable:true,get:function(){return chunkYDKWD6MQ_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunkTTMGFC6C_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunkTTMGFC6C_js.b}});
1
+ 'use strict';var chunkLP5KXMBY_js=require('./chunk-LP5KXMBY.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkJVMHWM3I_js=require('./chunk-JVMHWM3I.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkDKLJ5DYN_js=require('./chunk-DKLJ5DYN.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkI5ZDNSX5_js=require('./chunk-I5ZDNSX5.js'),chunk7563FVMY_js=require('./chunk-7563FVMY.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"arabicLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.e}});Object.defineProperty(exports,"frenchLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.f}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunkJVMHWM3I_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.b}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.a}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"NDPRProvider",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.a}});Object.defineProperty(exports,"useNDPRConfig",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.b}});Object.defineProperty(exports,"useNDPRLocale",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.b}});
package/dist/core.mjs CHANGED
@@ -1 +1 @@
1
- export{e as arabicLocale,f as frenchLocale,c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-PSPYIRIF.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{a as getComplianceScore}from'./chunk-7RBO42IW.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-R3ZKV2J7.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as NDPRProvider,b as useNDPRConfig,c as useNDPRLocale}from'./chunk-FRQFU44F.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-V5TZJJWU.mjs';import'./chunk-ZJYULEER.mjs';
1
+ export{e as arabicLocale,f as frenchLocale,c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-KUI5W44P.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{a as getComplianceScore}from'./chunk-YX7DEHPA.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-R3ZKV2J7.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as NDPRProvider,b as useNDPRConfig,c as useNDPRLocale}from'./chunk-PHA3YMFO.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-5LJ652AH.mjs';import'./chunk-ZJYULEER.mjs';
@@ -94,7 +94,7 @@ export declare interface CrossBorderTransfer {
94
94
  }
95
95
 
96
96
  /**
97
- * Read-only, lightweight variant of {@link CrossBorderTransferManager}. Renders the
97
+ * Read-only, lightweight variant of the full `CrossBorderTransferManager`. Renders the
98
98
  * list + summary view without pulling in the full adequacy dataset, and exposes
99
99
  * no add/edit/delete affordances.
100
100
  */
@@ -94,7 +94,7 @@ export declare interface CrossBorderTransfer {
94
94
  }
95
95
 
96
96
  /**
97
- * Read-only, lightweight variant of {@link CrossBorderTransferManager}. Renders the
97
+ * Read-only, lightweight variant of the full `CrossBorderTransferManager`. Renders the
98
98
  * list + summary view without pulling in the full adequacy dataset, and exposes
99
99
  * no add/edit/delete affordances.
100
100
  */
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),chunkYDKWD6MQ_js=require('./chunk-YDKWD6MQ.js');require('./chunk-TTMGFC6C.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var q={adequacy_decision:"Adequacy Decision (Section 41)",standard_clauses:"Standard Contractual Clauses (Section 42)",binding_corporate_rules:"Binding Corporate Rules (Section 43)",ndpc_authorization:"NDPC Authorization (Section 44)",explicit_consent:"Explicit Consent (Section 45(a))",contract_performance:"Contract Performance (Section 45(b))",public_interest:"Public Interest (Section 45(c))",legal_claims:"Legal Claims (Section 45(d))",vital_interests:"Vital Interests (Section 45(e))"},P={adequate:"Adequate",inadequate:"Inadequate",pending_review:"Pending Review",unknown:"Unknown"},D={active:"Active",suspended:"Suspended",terminated:"Terminated",pending_approval:"Pending Approval"},I={active:"ndpr-badge ndpr-badge--success",suspended:"ndpr-badge ndpr-badge--warning",terminated:"ndpr-badge ndpr-badge--neutral",pending_approval:"ndpr-badge ndpr-badge--info"},E={low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--destructive"},$=new Set(["standard_clauses","binding_corporate_rules","ndpc_authorization"]),H=({transfers:g,title:u,description:l,className:x="",classNames:r,unstyled:a,showSummary:B=true,showRiskAlerts:M=true,onTransferClick:m})=>{var h,C;let v=chunkYDKWD6MQ_js.c(),w=(h=u!=null?u:v.crossBorder.title)!=null?h:"Cross-Border Data Transfer Manager",L=(C=l!=null?l:v.crossBorder.description)!=null?C:"Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VIII (Sections 41-43).",b=react.useMemo(()=>[...g].sort((e,o)=>o.updatedAt-e.updatedAt),[g]),n=react.useMemo(()=>{var y,S,k;let e=0,o=0,s=0,A=0,T=0;for(let p of g){let f=p.status==="active";f&&(e+=1),(p.status==="pending_approval"||(y=p.ndpcApproval)!=null&&y.required&&!((S=p.ndpcApproval)!=null&&S.approved))&&(o+=1),p.riskLevel==="high"&&f&&(s+=1),!p.tiaCompleted&&f&&(A+=1),((k=p.ndpcApproval)!=null&&k.required||$.has(p.transferMechanism))&&(T+=1);}return {totalActiveTransfers:e,pendingApproval:o,highRiskTransfers:s,missingTIA:A,ndpcApprovalRequired:T}},[g]),c=typeof m=="function";return jsxRuntime.jsxs("div",{"data-ndpr-component":"cross-border-transfer-manager-lite",className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${x}`,r==null?void 0:r.root,a),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",r==null?void 0:r.header,a),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",r==null?void 0:r.title,a),children:w}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:L})]}),B&&jsxRuntime.jsx("div",{role:"status","aria-label":"Transfer compliance summary",className:chunkAME4HJR4_js.a("mb-6 grid grid-cols-2 md:grid-cols-4 gap-4",r==null?void 0:r.summary,a),children:[["info",n.totalActiveTransfers,"Active Transfers"],["info",n.pendingApproval,"Pending Approval"],["destructive",n.highRiskTransfers,"High Risk"],["warning",n.missingTIA,"Missing TIA"]].map(([e,o,s])=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`ndpr-alert ndpr-alert--${e}`,r==null?void 0:r.summaryCard,a),children:[jsxRuntime.jsx("p",{className:`ndpr-stat__value ndpr-text-${e}`,children:o}),jsxRuntime.jsx("p",{className:`text-sm ndpr-text-${e}`,children:s})]},s))}),M&&(n.highRiskTransfers>0||n.ndpcApprovalRequired>0)&&jsxRuntime.jsxs("div",{role:"alert","aria-label":"Cross-border transfer risk alerts",className:chunkAME4HJR4_js.a("mb-6 ndpr-alert ndpr-alert--warning",r==null?void 0:r.riskAlert,a),children:[jsxRuntime.jsx("p",{className:"text-sm font-medium ndpr-text-warning mb-1",children:"Risk alerts"}),jsxRuntime.jsxs("ul",{className:"list-disc list-inside text-sm ndpr-text-warning",children:[n.highRiskTransfers>0&&jsxRuntime.jsxs("li",{children:[n.highRiskTransfers," high-risk active transfer",n.highRiskTransfers===1?"":"s"," require enhanced safeguards."]}),n.ndpcApprovalRequired>0&&jsxRuntime.jsxs("li",{children:[n.ndpcApprovalRequired," transfer",n.ndpcApprovalRequired===1?"":"s"," use a mechanism that typically requires NDPC approval."]})]})]}),jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Transfers"}),b.length===0?jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:"No cross-border transfers found."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:chunkAME4HJR4_js.a("w-full text-left text-sm",r==null?void 0:r.table,a),"aria-label":"Cross-border transfers",children:[jsxRuntime.jsx("thead",{className:chunkAME4HJR4_js.a("ndpr-text-muted",r==null?void 0:r.tableHeader,a),children:jsxRuntime.jsx("tr",{children:["Destination","Recipient","Mechanism","Adequacy","Risk","Status"].map(e=>jsxRuntime.jsx("th",{className:"py-2 pr-4 font-medium",children:e},e))})}),jsxRuntime.jsx("tbody",{children:b.map(e=>{let o=c?()=>m(e):void 0;return jsxRuntime.jsxs("tr",{className:chunkAME4HJR4_js.a(`border-t border-gray-100 dark:border-gray-700 ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,r==null?void 0:r.tableRow,a),role:c?"button":void 0,tabIndex:c?0:void 0,"aria-label":c?`View transfer to ${e.destinationCountry}`:void 0,onClick:o,onKeyDown:c?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),o());}:void 0,children:[jsxRuntime.jsxs("td",{className:"py-2 pr-4",children:[jsxRuntime.jsx("div",{className:"font-medium",children:e.destinationCountry}),e.destinationCountryCode&&jsxRuntime.jsx("div",{className:"text-xs ndpr-text-muted",children:e.destinationCountryCode})]}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:e.recipientOrganization}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:q[e.transferMechanism]}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:P[e.adequacyStatus]}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:jsxRuntime.jsxs("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${E[e.riskLevel]}`,r==null?void 0:r.riskBadge,a),children:[e.riskLevel.charAt(0).toUpperCase()+e.riskLevel.slice(1)," Risk"]})}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${I[e.status]}`,r==null?void 0:r.statusBadge,a),children:D[e.status]})})]},e.id)})})]})})]})};exports.CrossBorderTransferManagerLite=H;
2
+ 'use strict';var chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),chunkI5ZDNSX5_js=require('./chunk-I5ZDNSX5.js');require('./chunk-7563FVMY.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var q={adequacy_decision:"Adequacy Decision (Section 42)",standard_clauses:"Standard Contractual Clauses (Section 41(1)(a))",binding_corporate_rules:"Binding Corporate Rules (Section 41(1)(a))",ndpc_authorization:"NDPC Authorization (Section 42(5))",explicit_consent:"Explicit Consent (Section 43(1)(a))",contract_performance:"Contract Performance (Section 43(1)(b))",public_interest:"Public Interest (Section 43(1)(d))",legal_claims:"Legal Claims (Section 43(1)(e))",vital_interests:"Vital Interests (Section 43(1)(f))"},P={adequate:"Adequate",inadequate:"Inadequate",pending_review:"Pending Review",unknown:"Unknown"},D={active:"Active",suspended:"Suspended",terminated:"Terminated",pending_approval:"Pending Approval"},I={active:"ndpr-badge ndpr-badge--success",suspended:"ndpr-badge ndpr-badge--warning",terminated:"ndpr-badge ndpr-badge--neutral",pending_approval:"ndpr-badge ndpr-badge--info"},E={low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--destructive"},$=new Set(["standard_clauses","binding_corporate_rules","ndpc_authorization"]),H=({transfers:g,title:u,description:l,className:x="",classNames:r,unstyled:a,showSummary:B=true,showRiskAlerts:M=true,onTransferClick:m})=>{var h,C;let v=chunkI5ZDNSX5_js.c(),w=(h=u!=null?u:v.crossBorder.title)!=null?h:"Cross-Border Data Transfer Manager",L=(C=l!=null?l:v.crossBorder.description)!=null?C:"Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VIII (Sections 41-43).",b=react.useMemo(()=>[...g].sort((e,o)=>o.updatedAt-e.updatedAt),[g]),n=react.useMemo(()=>{var y,S,k;let e=0,o=0,s=0,A=0,T=0;for(let p of g){let f=p.status==="active";f&&(e+=1),(p.status==="pending_approval"||(y=p.ndpcApproval)!=null&&y.required&&!((S=p.ndpcApproval)!=null&&S.approved))&&(o+=1),p.riskLevel==="high"&&f&&(s+=1),!p.tiaCompleted&&f&&(A+=1),((k=p.ndpcApproval)!=null&&k.required||$.has(p.transferMechanism))&&(T+=1);}return {totalActiveTransfers:e,pendingApproval:o,highRiskTransfers:s,missingTIA:A,ndpcApprovalRequired:T}},[g]),c=typeof m=="function";return jsxRuntime.jsxs("div",{"data-ndpr-component":"cross-border-transfer-manager-lite",className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${x}`,r==null?void 0:r.root,a),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",r==null?void 0:r.header,a),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",r==null?void 0:r.title,a),children:w}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:L})]}),B&&jsxRuntime.jsx("div",{role:"status","aria-label":"Transfer compliance summary",className:chunkAME4HJR4_js.a("mb-6 grid grid-cols-2 md:grid-cols-4 gap-4",r==null?void 0:r.summary,a),children:[["info",n.totalActiveTransfers,"Active Transfers"],["info",n.pendingApproval,"Pending Approval"],["destructive",n.highRiskTransfers,"High Risk"],["warning",n.missingTIA,"Missing TIA"]].map(([e,o,s])=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`ndpr-alert ndpr-alert--${e}`,r==null?void 0:r.summaryCard,a),children:[jsxRuntime.jsx("p",{className:`ndpr-stat__value ndpr-text-${e}`,children:o}),jsxRuntime.jsx("p",{className:`text-sm ndpr-text-${e}`,children:s})]},s))}),M&&(n.highRiskTransfers>0||n.ndpcApprovalRequired>0)&&jsxRuntime.jsxs("div",{role:"alert","aria-label":"Cross-border transfer risk alerts",className:chunkAME4HJR4_js.a("mb-6 ndpr-alert ndpr-alert--warning",r==null?void 0:r.riskAlert,a),children:[jsxRuntime.jsx("p",{className:"text-sm font-medium ndpr-text-warning mb-1",children:"Risk alerts"}),jsxRuntime.jsxs("ul",{className:"list-disc list-inside text-sm ndpr-text-warning",children:[n.highRiskTransfers>0&&jsxRuntime.jsxs("li",{children:[n.highRiskTransfers," high-risk active transfer",n.highRiskTransfers===1?"":"s"," require enhanced safeguards."]}),n.ndpcApprovalRequired>0&&jsxRuntime.jsxs("li",{children:[n.ndpcApprovalRequired," transfer",n.ndpcApprovalRequired===1?"":"s"," use a mechanism that typically requires NDPC approval."]})]})]}),jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Transfers"}),b.length===0?jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:"No cross-border transfers found."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:chunkAME4HJR4_js.a("w-full text-left text-sm",r==null?void 0:r.table,a),"aria-label":"Cross-border transfers",children:[jsxRuntime.jsx("thead",{className:chunkAME4HJR4_js.a("ndpr-text-muted",r==null?void 0:r.tableHeader,a),children:jsxRuntime.jsx("tr",{children:["Destination","Recipient","Mechanism","Adequacy","Risk","Status"].map(e=>jsxRuntime.jsx("th",{className:"py-2 pr-4 font-medium",children:e},e))})}),jsxRuntime.jsx("tbody",{children:b.map(e=>{let o=c?()=>m(e):void 0;return jsxRuntime.jsxs("tr",{className:chunkAME4HJR4_js.a(`border-t border-gray-100 dark:border-gray-700 ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,r==null?void 0:r.tableRow,a),role:c?"button":void 0,tabIndex:c?0:void 0,"aria-label":c?`View transfer to ${e.destinationCountry}`:void 0,onClick:o,onKeyDown:c?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),o());}:void 0,children:[jsxRuntime.jsxs("td",{className:"py-2 pr-4",children:[jsxRuntime.jsx("div",{className:"font-medium",children:e.destinationCountry}),e.destinationCountryCode&&jsxRuntime.jsx("div",{className:"text-xs ndpr-text-muted",children:e.destinationCountryCode})]}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:e.recipientOrganization}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:q[e.transferMechanism]}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:P[e.adequacyStatus]}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:jsxRuntime.jsxs("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${E[e.riskLevel]}`,r==null?void 0:r.riskBadge,a),children:[e.riskLevel.charAt(0).toUpperCase()+e.riskLevel.slice(1)," Risk"]})}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${I[e.status]}`,r==null?void 0:r.statusBadge,a),children:D[e.status]})})]},e.id)})})]})})]})};exports.CrossBorderTransferManagerLite=H;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a}from'./chunk-SFGW37LE.mjs';import {c}from'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var q={adequacy_decision:"Adequacy Decision (Section 41)",standard_clauses:"Standard Contractual Clauses (Section 42)",binding_corporate_rules:"Binding Corporate Rules (Section 43)",ndpc_authorization:"NDPC Authorization (Section 44)",explicit_consent:"Explicit Consent (Section 45(a))",contract_performance:"Contract Performance (Section 45(b))",public_interest:"Public Interest (Section 45(c))",legal_claims:"Legal Claims (Section 45(d))",vital_interests:"Vital Interests (Section 45(e))"},P={adequate:"Adequate",inadequate:"Inadequate",pending_review:"Pending Review",unknown:"Unknown"},D={active:"Active",suspended:"Suspended",terminated:"Terminated",pending_approval:"Pending Approval"},I={active:"ndpr-badge ndpr-badge--success",suspended:"ndpr-badge ndpr-badge--warning",terminated:"ndpr-badge ndpr-badge--neutral",pending_approval:"ndpr-badge ndpr-badge--info"},E={low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--destructive"},$=new Set(["standard_clauses","binding_corporate_rules","ndpc_authorization"]),H=({transfers:g,title:u,description:l,className:x="",classNames:r,unstyled:a$1,showSummary:B=true,showRiskAlerts:M=true,onTransferClick:m})=>{var h,C;let v=c(),w=(h=u!=null?u:v.crossBorder.title)!=null?h:"Cross-Border Data Transfer Manager",L=(C=l!=null?l:v.crossBorder.description)!=null?C:"Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VIII (Sections 41-43).",b=useMemo(()=>[...g].sort((e,o)=>o.updatedAt-e.updatedAt),[g]),n=useMemo(()=>{var y,S,k;let e=0,o=0,s=0,A=0,T=0;for(let p of g){let f=p.status==="active";f&&(e+=1),(p.status==="pending_approval"||(y=p.ndpcApproval)!=null&&y.required&&!((S=p.ndpcApproval)!=null&&S.approved))&&(o+=1),p.riskLevel==="high"&&f&&(s+=1),!p.tiaCompleted&&f&&(A+=1),((k=p.ndpcApproval)!=null&&k.required||$.has(p.transferMechanism))&&(T+=1);}return {totalActiveTransfers:e,pendingApproval:o,highRiskTransfers:s,missingTIA:A,ndpcApprovalRequired:T}},[g]),c$1=typeof m=="function";return jsxs("div",{"data-ndpr-component":"cross-border-transfer-manager-lite",className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${x}`,r==null?void 0:r.root,a$1),children:[jsxs("div",{className:a("",r==null?void 0:r.header,a$1),children:[jsx("h2",{className:a("ndpr-section-heading",r==null?void 0:r.title,a$1),children:w}),jsx("p",{className:"ndpr-card__subtitle",children:L})]}),B&&jsx("div",{role:"status","aria-label":"Transfer compliance summary",className:a("mb-6 grid grid-cols-2 md:grid-cols-4 gap-4",r==null?void 0:r.summary,a$1),children:[["info",n.totalActiveTransfers,"Active Transfers"],["info",n.pendingApproval,"Pending Approval"],["destructive",n.highRiskTransfers,"High Risk"],["warning",n.missingTIA,"Missing TIA"]].map(([e,o,s])=>jsxs("div",{className:a(`ndpr-alert ndpr-alert--${e}`,r==null?void 0:r.summaryCard,a$1),children:[jsx("p",{className:`ndpr-stat__value ndpr-text-${e}`,children:o}),jsx("p",{className:`text-sm ndpr-text-${e}`,children:s})]},s))}),M&&(n.highRiskTransfers>0||n.ndpcApprovalRequired>0)&&jsxs("div",{role:"alert","aria-label":"Cross-border transfer risk alerts",className:a("mb-6 ndpr-alert ndpr-alert--warning",r==null?void 0:r.riskAlert,a$1),children:[jsx("p",{className:"text-sm font-medium ndpr-text-warning mb-1",children:"Risk alerts"}),jsxs("ul",{className:"list-disc list-inside text-sm ndpr-text-warning",children:[n.highRiskTransfers>0&&jsxs("li",{children:[n.highRiskTransfers," high-risk active transfer",n.highRiskTransfers===1?"":"s"," require enhanced safeguards."]}),n.ndpcApprovalRequired>0&&jsxs("li",{children:[n.ndpcApprovalRequired," transfer",n.ndpcApprovalRequired===1?"":"s"," use a mechanism that typically requires NDPC approval."]})]})]}),jsx("h3",{className:"text-lg font-medium mb-3",children:"Transfers"}),b.length===0?jsx("p",{className:"ndpr-card__subtitle",children:"No cross-border transfers found."}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:a("w-full text-left text-sm",r==null?void 0:r.table,a$1),"aria-label":"Cross-border transfers",children:[jsx("thead",{className:a("ndpr-text-muted",r==null?void 0:r.tableHeader,a$1),children:jsx("tr",{children:["Destination","Recipient","Mechanism","Adequacy","Risk","Status"].map(e=>jsx("th",{className:"py-2 pr-4 font-medium",children:e},e))})}),jsx("tbody",{children:b.map(e=>{let o=c$1?()=>m(e):void 0;return jsxs("tr",{className:a(`border-t border-gray-100 dark:border-gray-700 ${c$1?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,r==null?void 0:r.tableRow,a$1),role:c$1?"button":void 0,tabIndex:c$1?0:void 0,"aria-label":c$1?`View transfer to ${e.destinationCountry}`:void 0,onClick:o,onKeyDown:c$1?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),o());}:void 0,children:[jsxs("td",{className:"py-2 pr-4",children:[jsx("div",{className:"font-medium",children:e.destinationCountry}),e.destinationCountryCode&&jsx("div",{className:"text-xs ndpr-text-muted",children:e.destinationCountryCode})]}),jsx("td",{className:"py-2 pr-4",children:e.recipientOrganization}),jsx("td",{className:"py-2 pr-4",children:q[e.transferMechanism]}),jsx("td",{className:"py-2 pr-4",children:P[e.adequacyStatus]}),jsx("td",{className:"py-2 pr-4",children:jsxs("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${E[e.riskLevel]}`,r==null?void 0:r.riskBadge,a$1),children:[e.riskLevel.charAt(0).toUpperCase()+e.riskLevel.slice(1)," Risk"]})}),jsx("td",{className:"py-2 pr-4",children:jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${I[e.status]}`,r==null?void 0:r.statusBadge,a$1),children:D[e.status]})})]},e.id)})})]})})]})};export{H as CrossBorderTransferManagerLite};
2
+ import {a}from'./chunk-SFGW37LE.mjs';import {c}from'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var q={adequacy_decision:"Adequacy Decision (Section 42)",standard_clauses:"Standard Contractual Clauses (Section 41(1)(a))",binding_corporate_rules:"Binding Corporate Rules (Section 41(1)(a))",ndpc_authorization:"NDPC Authorization (Section 42(5))",explicit_consent:"Explicit Consent (Section 43(1)(a))",contract_performance:"Contract Performance (Section 43(1)(b))",public_interest:"Public Interest (Section 43(1)(d))",legal_claims:"Legal Claims (Section 43(1)(e))",vital_interests:"Vital Interests (Section 43(1)(f))"},P={adequate:"Adequate",inadequate:"Inadequate",pending_review:"Pending Review",unknown:"Unknown"},D={active:"Active",suspended:"Suspended",terminated:"Terminated",pending_approval:"Pending Approval"},I={active:"ndpr-badge ndpr-badge--success",suspended:"ndpr-badge ndpr-badge--warning",terminated:"ndpr-badge ndpr-badge--neutral",pending_approval:"ndpr-badge ndpr-badge--info"},E={low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--destructive"},$=new Set(["standard_clauses","binding_corporate_rules","ndpc_authorization"]),H=({transfers:g,title:u,description:l,className:x="",classNames:r,unstyled:a$1,showSummary:B=true,showRiskAlerts:M=true,onTransferClick:m})=>{var h,C;let v=c(),w=(h=u!=null?u:v.crossBorder.title)!=null?h:"Cross-Border Data Transfer Manager",L=(C=l!=null?l:v.crossBorder.description)!=null?C:"Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VIII (Sections 41-43).",b=useMemo(()=>[...g].sort((e,o)=>o.updatedAt-e.updatedAt),[g]),n=useMemo(()=>{var y,S,k;let e=0,o=0,s=0,A=0,T=0;for(let p of g){let f=p.status==="active";f&&(e+=1),(p.status==="pending_approval"||(y=p.ndpcApproval)!=null&&y.required&&!((S=p.ndpcApproval)!=null&&S.approved))&&(o+=1),p.riskLevel==="high"&&f&&(s+=1),!p.tiaCompleted&&f&&(A+=1),((k=p.ndpcApproval)!=null&&k.required||$.has(p.transferMechanism))&&(T+=1);}return {totalActiveTransfers:e,pendingApproval:o,highRiskTransfers:s,missingTIA:A,ndpcApprovalRequired:T}},[g]),c$1=typeof m=="function";return jsxs("div",{"data-ndpr-component":"cross-border-transfer-manager-lite",className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${x}`,r==null?void 0:r.root,a$1),children:[jsxs("div",{className:a("",r==null?void 0:r.header,a$1),children:[jsx("h2",{className:a("ndpr-section-heading",r==null?void 0:r.title,a$1),children:w}),jsx("p",{className:"ndpr-card__subtitle",children:L})]}),B&&jsx("div",{role:"status","aria-label":"Transfer compliance summary",className:a("mb-6 grid grid-cols-2 md:grid-cols-4 gap-4",r==null?void 0:r.summary,a$1),children:[["info",n.totalActiveTransfers,"Active Transfers"],["info",n.pendingApproval,"Pending Approval"],["destructive",n.highRiskTransfers,"High Risk"],["warning",n.missingTIA,"Missing TIA"]].map(([e,o,s])=>jsxs("div",{className:a(`ndpr-alert ndpr-alert--${e}`,r==null?void 0:r.summaryCard,a$1),children:[jsx("p",{className:`ndpr-stat__value ndpr-text-${e}`,children:o}),jsx("p",{className:`text-sm ndpr-text-${e}`,children:s})]},s))}),M&&(n.highRiskTransfers>0||n.ndpcApprovalRequired>0)&&jsxs("div",{role:"alert","aria-label":"Cross-border transfer risk alerts",className:a("mb-6 ndpr-alert ndpr-alert--warning",r==null?void 0:r.riskAlert,a$1),children:[jsx("p",{className:"text-sm font-medium ndpr-text-warning mb-1",children:"Risk alerts"}),jsxs("ul",{className:"list-disc list-inside text-sm ndpr-text-warning",children:[n.highRiskTransfers>0&&jsxs("li",{children:[n.highRiskTransfers," high-risk active transfer",n.highRiskTransfers===1?"":"s"," require enhanced safeguards."]}),n.ndpcApprovalRequired>0&&jsxs("li",{children:[n.ndpcApprovalRequired," transfer",n.ndpcApprovalRequired===1?"":"s"," use a mechanism that typically requires NDPC approval."]})]})]}),jsx("h3",{className:"text-lg font-medium mb-3",children:"Transfers"}),b.length===0?jsx("p",{className:"ndpr-card__subtitle",children:"No cross-border transfers found."}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:a("w-full text-left text-sm",r==null?void 0:r.table,a$1),"aria-label":"Cross-border transfers",children:[jsx("thead",{className:a("ndpr-text-muted",r==null?void 0:r.tableHeader,a$1),children:jsx("tr",{children:["Destination","Recipient","Mechanism","Adequacy","Risk","Status"].map(e=>jsx("th",{className:"py-2 pr-4 font-medium",children:e},e))})}),jsx("tbody",{children:b.map(e=>{let o=c$1?()=>m(e):void 0;return jsxs("tr",{className:a(`border-t border-gray-100 dark:border-gray-700 ${c$1?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,r==null?void 0:r.tableRow,a$1),role:c$1?"button":void 0,tabIndex:c$1?0:void 0,"aria-label":c$1?`View transfer to ${e.destinationCountry}`:void 0,onClick:o,onKeyDown:c$1?s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),o());}:void 0,children:[jsxs("td",{className:"py-2 pr-4",children:[jsx("div",{className:"font-medium",children:e.destinationCountry}),e.destinationCountryCode&&jsx("div",{className:"text-xs ndpr-text-muted",children:e.destinationCountryCode})]}),jsx("td",{className:"py-2 pr-4",children:e.recipientOrganization}),jsx("td",{className:"py-2 pr-4",children:q[e.transferMechanism]}),jsx("td",{className:"py-2 pr-4",children:P[e.adequacyStatus]}),jsx("td",{className:"py-2 pr-4",children:jsxs("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${E[e.riskLevel]}`,r==null?void 0:r.riskBadge,a$1),children:[e.riskLevel.charAt(0).toUpperCase()+e.riskLevel.slice(1)," Risk"]})}),jsx("td",{className:"py-2 pr-4",children:jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${I[e.status]}`,r==null?void 0:r.statusBadge,a$1),children:D[e.status]})})]},e.id)})})]})})]})};export{H as CrossBorderTransferManagerLite};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkCSE36REY_js=require('./chunk-CSE36REY.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js');require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var s=react.createContext(null);function A(){let r=react.useContext(s);if(!r)throw new Error("CrossBorder compound components must be wrapped in <CrossBorder.Provider>. Example: <CrossBorder.Provider><CrossBorder.Manager /></CrossBorder.Provider>");return r}var t=({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f,children:i})=>{let m=chunkHHK5LHEG_js.a({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f});return jsxRuntime.jsx(s.Provider,{value:m,children:i})};var q={Provider:t,Manager:chunkCSE36REY_js.a};Object.defineProperty(exports,"CrossBorderTransferManager",{enumerable:true,get:function(){return chunkCSE36REY_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"COUNTRY_ADEQUACY_MAP",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.a}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getAdequateCountries",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.c}});Object.defineProperty(exports,"getCountryAdequacy",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.b}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"requiresNDPCApproval",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.d}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});exports.CrossBorder=q;exports.CrossBorderProvider=t;exports.useCrossBorderCompound=A;
2
+ 'use strict';var chunk2OSZT7KI_js=require('./chunk-2OSZT7KI.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js');require('./chunk-AME4HJR4.js'),require('./chunk-I5ZDNSX5.js'),require('./chunk-7563FVMY.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var s=react.createContext(null);function A(){let r=react.useContext(s);if(!r)throw new Error("CrossBorder compound components must be wrapped in <CrossBorder.Provider>. Example: <CrossBorder.Provider><CrossBorder.Manager /></CrossBorder.Provider>");return r}var t=({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f,children:i})=>{let m=chunkHHK5LHEG_js.a({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f});return jsxRuntime.jsx(s.Provider,{value:m,children:i})};var q={Provider:t,Manager:chunk2OSZT7KI_js.a};Object.defineProperty(exports,"CrossBorderTransferManager",{enumerable:true,get:function(){return chunk2OSZT7KI_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"COUNTRY_ADEQUACY_MAP",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.a}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getAdequateCountries",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.c}});Object.defineProperty(exports,"getCountryAdequacy",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.b}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"requiresNDPCApproval",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.d}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});exports.CrossBorder=q;exports.CrossBorderProvider=t;exports.useCrossBorderCompound=A;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a}from'./chunk-WPH6CJDL.mjs';export{a as CrossBorderTransferManager}from'./chunk-WPH6CJDL.mjs';import {a as a$1}from'./chunk-KDAZQO3N.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as COUNTRY_ADEQUACY_MAP,h as assessTransferRisk,c as getAdequateCountries,b as getCountryAdequacy,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,d as requiresNDPCApproval,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var s=createContext(null);function A(){let r=useContext(s);if(!r)throw new Error("CrossBorder compound components must be wrapped in <CrossBorder.Provider>. Example: <CrossBorder.Provider><CrossBorder.Manager /></CrossBorder.Provider>");return r}var t=({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(s.Provider,{value:m,children:i})};var q={Provider:t,Manager:a};export{q as CrossBorder,t as CrossBorderProvider,A as useCrossBorderCompound};
2
+ import {a}from'./chunk-6UGLAVRM.mjs';export{a as CrossBorderTransferManager}from'./chunk-6UGLAVRM.mjs';import {a as a$1}from'./chunk-KDAZQO3N.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as COUNTRY_ADEQUACY_MAP,h as assessTransferRisk,c as getAdequateCountries,b as getCountryAdequacy,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,d as requiresNDPCApproval,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var s=createContext(null);function A(){let r=useContext(s);if(!r)throw new Error("CrossBorder compound components must be wrapped in <CrossBorder.Provider>. Example: <CrossBorder.Provider><CrossBorder.Manager /></CrossBorder.Provider>");return r}var t=({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(s.Provider,{value:m,children:i})};var q={Provider:t,Manager:a};export{q as CrossBorder,t as CrossBorderProvider,A as useCrossBorderCompound};
package/dist/dpia.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunk37VFK5SR_js=require('./chunk-37VFK5SR.js'),chunkWCTFED27_js=require('./chunk-WCTFED27.js'),chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js');require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var n=react.createContext(null);function v(){let o=react.useContext(n);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 i=({sections:o,initialAnswers:a,adapter:m,storageKey:A,useLocalStorage:I,onComplete:D,children:d})=>{let u=chunkJLQT3W3E_js.a({sections:o,initialAnswers:a,adapter:m,storageKey:A,useLocalStorage:I,onComplete:D}),f=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},u),{sections:o});return jsxRuntime.jsx(n.Provider,{value:f,children:d})};var C={Provider:i,Questionnaire:chunkWCTFED27_js.a,Report:chunk37VFK5SR_js.a,StepIndicator:chunk37VFK5SR_js.b};Object.defineProperty(exports,"DPIAReport",{enumerable:true,get:function(){return chunk37VFK5SR_js.a}});Object.defineProperty(exports,"StepIndicator",{enumerable:true,get:function(){return chunk37VFK5SR_js.b}});Object.defineProperty(exports,"DPIAQuestionnaire",{enumerable:true,get:function(){return chunkWCTFED27_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});exports.DPIA=C;exports.DPIAProvider=i;exports.useDPIACompound=v;
2
+ 'use strict';var chunkQG72X7G4_js=require('./chunk-QG72X7G4.js'),chunkDRQURLN5_js=require('./chunk-DRQURLN5.js'),chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js');require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-I5ZDNSX5.js'),require('./chunk-7563FVMY.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var n=react.createContext(null);function v(){let o=react.useContext(n);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 i=({sections:o,initialAnswers:a,adapter:m,storageKey:A,useLocalStorage:I,onComplete:D,children:d})=>{let u=chunkJLQT3W3E_js.a({sections:o,initialAnswers:a,adapter:m,storageKey:A,useLocalStorage:I,onComplete:D}),f=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},u),{sections:o});return jsxRuntime.jsx(n.Provider,{value:f,children:d})};var C={Provider:i,Questionnaire:chunkDRQURLN5_js.a,Report:chunkQG72X7G4_js.a,StepIndicator:chunkQG72X7G4_js.b};Object.defineProperty(exports,"DPIAReport",{enumerable:true,get:function(){return chunkQG72X7G4_js.a}});Object.defineProperty(exports,"StepIndicator",{enumerable:true,get:function(){return chunkQG72X7G4_js.b}});Object.defineProperty(exports,"DPIAQuestionnaire",{enumerable:true,get:function(){return chunkDRQURLN5_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});exports.DPIA=C;exports.DPIAProvider=i;exports.useDPIACompound=v;
package/dist/dpia.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {b,a}from'./chunk-N72RNTGP.mjs';export{a as DPIAReport,b as StepIndicator}from'./chunk-N72RNTGP.mjs';import {a as a$1}from'./chunk-ZQHGIOYP.mjs';export{a as DPIAQuestionnaire}from'./chunk-ZQHGIOYP.mjs';import {a as a$2}from'./chunk-I3V3ITN7.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-DBZSN4WP.mjs';import {b as b$1,a as a$3}from'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var n=createContext(null);function v(){let o=useContext(n);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 i=({sections:o,initialAnswers:a,adapter:m,storageKey:A,useLocalStorage:I,onComplete:D,children:d})=>{let u=a$2({sections:o,initialAnswers:a,adapter:m,storageKey:A,useLocalStorage:I,onComplete:D}),f=b$1(a$3({},u),{sections:o});return jsx(n.Provider,{value:f,children:d})};var C={Provider:i,Questionnaire:a$1,Report:a,StepIndicator:b};export{C as DPIA,i as DPIAProvider,v as useDPIACompound};
2
+ import {b,a}from'./chunk-MIQQYXTE.mjs';export{a as DPIAReport,b as StepIndicator}from'./chunk-MIQQYXTE.mjs';import {a as a$1}from'./chunk-YZHEEGGK.mjs';export{a as DPIAQuestionnaire}from'./chunk-YZHEEGGK.mjs';import {a as a$2}from'./chunk-I3V3ITN7.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-DBZSN4WP.mjs';import {b as b$1,a as a$3}from'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var n=createContext(null);function v(){let o=useContext(n);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 i=({sections:o,initialAnswers:a,adapter:m,storageKey:A,useLocalStorage:I,onComplete:D,children:d})=>{let u=a$2({sections:o,initialAnswers:a,adapter:m,storageKey:A,useLocalStorage:I,onComplete:D}),f=b$1(a$3({},u),{sections:o});return jsx(n.Provider,{value:f,children:d})};var C={Provider:i,Questionnaire:a$1,Report:a,StepIndicator:b};export{C as DPIA,i as DPIAProvider,v as useDPIACompound};
package/dist/dsr.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkASEUTU45_js=require('./chunk-ASEUTU45.js'),chunkUZNWXJ2W_js=require('./chunk-UZNWXJ2W.js');require('./chunk-UXUMYP4L.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js');require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var p=react.createContext(null);function P(){let e=react.useContext(p);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 R=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n,children:i})=>{let f=chunkTVA6D6S4_js.a({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n}),x=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},f),{requestTypes:e});return jsxRuntime.jsx(p.Provider,{value:x,children:i})};var C={Provider:R,Form:chunkUZNWXJ2W_js.a,Dashboard:chunkASEUTU45_js.a,Tracker:chunkASEUTU45_js.b};Object.defineProperty(exports,"DSRDashboard",{enumerable:true,get:function(){return chunkASEUTU45_js.a}});Object.defineProperty(exports,"DSRTracker",{enumerable:true,get:function(){return chunkASEUTU45_js.b}});Object.defineProperty(exports,"DSRRequestForm",{enumerable:true,get:function(){return chunkUZNWXJ2W_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});exports.DSR=C;exports.DSRProvider=R;exports.useDSRCompound=P;
2
+ 'use strict';var chunkTYR5PFYD_js=require('./chunk-TYR5PFYD.js'),chunkFRHFIEWZ_js=require('./chunk-FRHFIEWZ.js');require('./chunk-UXUMYP4L.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js');require('./chunk-AME4HJR4.js'),require('./chunk-I5ZDNSX5.js'),require('./chunk-7563FVMY.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var p=react.createContext(null);function P(){let e=react.useContext(p);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 R=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n,children:i})=>{let f=chunkTVA6D6S4_js.a({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n}),x=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},f),{requestTypes:e});return jsxRuntime.jsx(p.Provider,{value:x,children:i})};var C={Provider:R,Form:chunkFRHFIEWZ_js.a,Dashboard:chunkTYR5PFYD_js.a,Tracker:chunkTYR5PFYD_js.b};Object.defineProperty(exports,"DSRDashboard",{enumerable:true,get:function(){return chunkTYR5PFYD_js.a}});Object.defineProperty(exports,"DSRTracker",{enumerable:true,get:function(){return chunkTYR5PFYD_js.b}});Object.defineProperty(exports,"DSRRequestForm",{enumerable:true,get:function(){return chunkFRHFIEWZ_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});exports.DSR=C;exports.DSRProvider=R;exports.useDSRCompound=P;
package/dist/dsr.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {b,a}from'./chunk-SBSYHCPK.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-SBSYHCPK.mjs';import {a as a$1}from'./chunk-L3FR4PQE.mjs';export{a as DSRRequestForm}from'./chunk-L3FR4PQE.mjs';import'./chunk-EWVK45Z3.mjs';import {a as a$2}from'./chunk-ZSRO4L3C.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-DBZSN4WP.mjs';import {b as b$1,a as a$3}from'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null);function P(){let e=useContext(p);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 R=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n,children:i})=>{let f=a$2({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n}),x=b$1(a$3({},f),{requestTypes:e});return jsx(p.Provider,{value:x,children:i})};var C={Provider:R,Form:a$1,Dashboard:a,Tracker:b};export{C as DSR,R as DSRProvider,P as useDSRCompound};
2
+ import {b,a}from'./chunk-AS2M5OTX.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-AS2M5OTX.mjs';import {a as a$1}from'./chunk-EAV4BZKO.mjs';export{a as DSRRequestForm}from'./chunk-EAV4BZKO.mjs';import'./chunk-EWVK45Z3.mjs';import {a as a$2}from'./chunk-ZSRO4L3C.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-DBZSN4WP.mjs';import {b as b$1,a as a$3}from'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null);function P(){let e=useContext(p);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 R=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n,children:i})=>{let f=a$2({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n}),x=b$1(a$3({},f),{requestTypes:e});return jsx(p.Provider,{value:x,children:i})};var C={Provider:R,Form:a$1,Dashboard:a,Tracker:b};export{C as DSR,R as DSRProvider,P as useDSRCompound};
@@ -1444,7 +1444,7 @@ export declare interface ROPASummary {
1444
1444
 
1445
1445
  /**
1446
1446
  * Additional conditions required for processing sensitive personal data
1447
- * per NDPA Section 27
1447
+ * per NDPA Section 30
1448
1448
  */
1449
1449
  declare type SensitiveDataCondition = 'explicit_consent' | 'employment_law' | 'vital_interests_incapable' | 'nonprofit_legitimate' | 'publicly_available' | 'legal_claims' | 'substantial_public_interest' | 'health_purposes' | 'public_health' | 'archiving_research';
1450
1450