@tantainnovative/ndpr-toolkit 3.10.2 → 3.10.4

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 (107) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +16 -16
  3. package/dist/breach.js +1 -1
  4. package/dist/breach.mjs +1 -1
  5. package/dist/{chunk-EEQALYOY.mjs → chunk-25TNTLHJ.mjs} +1 -1
  6. package/dist/{chunk-GTYXVAJX.mjs → chunk-43OQNS2J.mjs} +3 -3
  7. package/dist/chunk-5EKQX6GM.mjs +1 -0
  8. package/dist/{chunk-W7OLQRJP.js → chunk-6GM2PBTF.js} +1 -1
  9. package/dist/{chunk-Q64735OC.js → chunk-6LJHLE6G.js} +8 -8
  10. package/dist/{chunk-TMXK4QKK.mjs → chunk-6N5SJO4T.mjs} +1 -1
  11. package/dist/{chunk-EFIBHKQE.mjs → chunk-7RBO42IW.mjs} +1 -1
  12. package/dist/{chunk-RMQ7OLNY.mjs → chunk-BIJSMSUU.mjs} +8 -8
  13. package/dist/chunk-CNM6G5IA.js +1 -0
  14. package/dist/{chunk-UKLU6BQF.mjs → chunk-CWY2FMIC.mjs} +1 -1
  15. package/dist/{chunk-LVGT3DLT.js → chunk-D2ZKDQVL.js} +1 -1
  16. package/dist/chunk-D3DVVJCT.js +1 -0
  17. package/dist/{chunk-V3RYHNHN.js → chunk-EKNWO4DK.js} +1 -1
  18. package/dist/chunk-FMJ6ICLJ.js +1 -0
  19. package/dist/{chunk-R7545FP4.mjs → chunk-GEP52QFH.mjs} +1 -1
  20. package/dist/chunk-IPWX5I5P.mjs +2 -0
  21. package/dist/chunk-IVSNHT24.mjs +0 -0
  22. package/dist/{chunk-N3MQQUQP.js → chunk-JS7SYL5P.js} +0 -0
  23. package/dist/chunk-JWAN5J4Y.js +1 -0
  24. package/dist/{chunk-2MIQXECH.mjs → chunk-KE2FZH2V.mjs} +1 -1
  25. package/dist/chunk-KY6WYHWB.mjs +2 -0
  26. package/dist/{chunk-XO3VQYTL.js → chunk-M6VSZEFM.js} +2 -2
  27. package/dist/chunk-MOHBL6LX.mjs +1 -0
  28. package/dist/{chunk-EFIWANHF.mjs → chunk-MTSZ7GL6.mjs} +1 -1
  29. package/dist/{chunk-Y3MKMAFQ.mjs → chunk-NBQQ2GN3.mjs} +1 -1
  30. package/dist/{chunk-UAV7V4EM.js → chunk-NDKDKDDX.js} +1 -1
  31. package/dist/{chunk-3GRGYT3P.js → chunk-NUOHT3LO.js} +1 -1
  32. package/dist/chunk-O2RDZGM2.js +2 -0
  33. package/dist/{chunk-LTPSN2SU.mjs → chunk-OLEUIYE2.mjs} +1 -1
  34. package/dist/{chunk-HXWHL4BD.js → chunk-QHW4UKGJ.js} +2 -2
  35. package/dist/{chunk-HWHBINVN.mjs → chunk-RBMLGRDN.mjs} +1 -1
  36. package/dist/{chunk-Z763UI5U.js → chunk-RC3XFXTJ.js} +1 -1
  37. package/dist/{chunk-QPRYXVH2.js → chunk-RDALAH3Y.js} +1 -1
  38. package/dist/{chunk-I3Y4LOSL.js → chunk-SSH4U4TJ.js} +3 -3
  39. package/dist/{chunk-ATFUSHC2.mjs → chunk-TDHH7GS2.mjs} +1 -1
  40. package/dist/chunk-TWJHEIQH.js +2 -0
  41. package/dist/{chunk-XS3Z4UT7.js → chunk-US2VGJ7I.js} +1 -1
  42. package/dist/{chunk-VYAL2TGT.mjs → chunk-UVXS7KRV.mjs} +1 -1
  43. package/dist/{chunk-7IFSWCQP.js → chunk-WKTKTLMF.js} +1 -1
  44. package/dist/chunk-WYH3OA5L.mjs +1 -0
  45. package/dist/consent.js +1 -1
  46. package/dist/consent.mjs +1 -1
  47. package/dist/core.d.mts +2 -2
  48. package/dist/core.d.ts +2 -2
  49. package/dist/core.js +1 -1
  50. package/dist/core.mjs +1 -1
  51. package/dist/cross-border-lite.js +1 -1
  52. package/dist/cross-border-lite.mjs +1 -1
  53. package/dist/cross-border.d.mts +3 -3
  54. package/dist/cross-border.d.ts +3 -3
  55. package/dist/cross-border.js +1 -1
  56. package/dist/cross-border.mjs +1 -1
  57. package/dist/dpia.d.mts +3 -3
  58. package/dist/dpia.d.ts +3 -3
  59. package/dist/dsr.d.mts +1 -1
  60. package/dist/dsr.d.ts +1 -1
  61. package/dist/dsr.js +1 -1
  62. package/dist/dsr.mjs +1 -1
  63. package/dist/headless.d.mts +3 -3
  64. package/dist/headless.d.ts +3 -3
  65. package/dist/headless.js +1 -1
  66. package/dist/headless.mjs +1 -1
  67. package/dist/hooks.d.mts +3 -3
  68. package/dist/hooks.d.ts +3 -3
  69. package/dist/hooks.js +1 -1
  70. package/dist/hooks.mjs +1 -1
  71. package/dist/index.d.mts +7 -7
  72. package/dist/index.d.ts +7 -7
  73. package/dist/index.js +1 -1
  74. package/dist/index.mjs +1 -1
  75. package/dist/policy.js +1 -1
  76. package/dist/policy.mjs +1 -1
  77. package/dist/presets-consent.js +1 -1
  78. package/dist/presets-consent.mjs +1 -1
  79. package/dist/presets-dsr.js +1 -1
  80. package/dist/presets-dsr.mjs +1 -1
  81. package/dist/presets-policy.js +1 -1
  82. package/dist/presets-policy.mjs +1 -1
  83. package/dist/presets.d.mts +1 -1
  84. package/dist/presets.d.ts +1 -1
  85. package/dist/presets.js +1 -1
  86. package/dist/presets.mjs +1 -1
  87. package/dist/server.d.mts +2 -2
  88. package/dist/server.d.ts +2 -2
  89. package/dist/server.js +1 -1
  90. package/dist/server.mjs +1 -1
  91. package/dist/unstyled.d.mts +1 -1
  92. package/dist/unstyled.d.ts +1 -1
  93. package/dist/unstyled.js +1 -1
  94. package/dist/unstyled.mjs +1 -1
  95. package/package.json +34 -1
  96. package/dist/chunk-4QXTB3L6.js +0 -1
  97. package/dist/chunk-5IOC3VAW.js +0 -1
  98. package/dist/chunk-732C2EVN.js +0 -1
  99. package/dist/chunk-AOHKVFAS.mjs +0 -322
  100. package/dist/chunk-BFAX7JQA.mjs +0 -1
  101. package/dist/chunk-LQTARVPU.mjs +0 -1
  102. package/dist/chunk-RYREGZVQ.js +0 -1
  103. package/dist/chunk-S6COXIZA.js +0 -2
  104. package/dist/chunk-W47OSMT6.js +0 -2
  105. package/dist/chunk-W65ZWTLD.mjs +0 -1
  106. package/dist/chunk-XJO4DH3L.mjs +0 -2
  107. package/dist/chunk-ZHFLBL63.mjs +0 -2
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkNDKDKDDX_js=require('./chunk-NDKDKDDX.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var Tr=({requestTypes:y,onSubmit:nr,onValidationError:F,title:T,description:C,submitButtonText:$,className:q="",buttonClassName:dr="",showConfirmation:pr=true,confirmationMessage:ar="Your request has been submitted successfully. You will receive a confirmation email shortly.",requireIdentityVerification:O=true,identifierTypes:D=[{id:"email",label:"Email Address"},{id:"account",label:"Account Number"},{id:"customer_id",label:"Customer ID"}],collectAdditionalContact:ur=true,labels:v={},classNames:r,unstyled:e=false,isSubmitting:A=false,defaultValues:p,onReset:I})=>{var W,J,K,Q,X,V,N,s,rr;if(!Array.isArray(y))throw new Error("[ndpr-toolkit] <DSRRequestForm requestTypes={...} /> requires an array of RequestType[]. See https://ndprtoolkit.com.ng/docs/components/dsr#requesttypes \u2014 or use the `<NDPRSubjectRights />` preset which ships sensible defaults.");let x=chunkNDKDKDDX_js.c(),br=(W=T!=null?T:x.dsr.title)!=null?W:"Submit a Data Subject Request",fr=(J=C!=null?C:x.dsr.description)!=null?J:"Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part VI.",lr=(K=$!=null?$:x.dsr.submitRequest)!=null?K:"Submit Request",[c,z]=react.useState((p==null?void 0:p.requestType)||""),[P,B]=react.useState(((Q=p==null?void 0:p.dataSubject)==null?void 0:Q.fullName)||""),[S,M]=react.useState(((X=p==null?void 0:p.dataSubject)==null?void 0:X.email)||""),[k,Z]=react.useState(((V=p==null?void 0:p.dataSubject)==null?void 0:V.phone)||""),[G,L]=react.useState(((N=p==null?void 0:p.dataSubject)==null?void 0:N.identifierType)||((s=D[0])==null?void 0:s.id)||""),[w,Y]=react.useState(((rr=p==null?void 0:p.dataSubject)==null?void 0:rr.identifierValue)||""),[l,j]=react.useState((p==null?void 0:p.additionalInfo)||{}),[_r,E]=react.useState(false),[d,H]=react.useState({}),mr=()=>{var i;z(""),B(""),M(""),Z(""),L(((i=D[0])==null?void 0:i.id)||""),Y(""),j({}),E(false),H({}),I==null||I();},a=y.find(i=>i.id===c),gr=i=>{z(i.target.value),j({});},h=(i,b)=>{j(_=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},_),{[i]:b}));},vr=()=>{let i={};return P.trim()||(i.fullName="Full name is required"),S.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(S)||(i.email="Email is invalid"):i.email="Email is required",c||(i.requestType="Please select a request type"),O&&!w.trim()&&(i.identifierValue="Identifier value is required"),a!=null&&a.requiresAdditionalInfo&&a.additionalFields&&a.additionalFields.forEach(b=>{b.required&&!l[b.id]&&(i[`additional_${b.id}`]=`${b.label} is required`);}),H(i),i},hr=i=>{i.preventDefault();let b=vr();if(Object.keys(b).length>0){F==null||F(b);return}let _=Object.keys(l).length>0?Object.fromEntries(Object.entries(l).map(([u,m])=>[u,typeof m=="string"?chunkUXUMYP4L_js.a(m):m])):void 0,R={requestType:c,dataSubject:{fullName:chunkUXUMYP4L_js.a(P),email:chunkUXUMYP4L_js.a(S),phone:k?chunkUXUMYP4L_js.a(k):void 0,identifierType:G,identifierValue:chunkUXUMYP4L_js.a(w)},additionalInfo:_,submittedAt:Date.now()};nr(R),pr&&E(true);},U=`ndpr-dsr-form__button ndpr-dsr-form__button--primary ${dr}`.trim(),qr="ndpr-dsr-form__button ndpr-dsr-form__button--secondary";return _r?jsxRuntime.jsxs("div",{"data-ndpr-component":"dsr-request-form","data-ndpr-state":"submitted",className:chunkAME4HJR4_js.a(`ndpr-dsr-form__success${q?` ${q}`:""}`,r==null?void 0:r.successMessage,e),"aria-live":"polite",children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-dsr-form__success-title",r==null?void 0:r.title,e),children:"Request Submitted"}),jsxRuntime.jsx("p",{className:chunkAME4HJR4_js.a("ndpr-dsr-form__success-body",r==null?void 0:r.description,e),children:ar}),jsxRuntime.jsx("button",{onClick:()=>E(false),className:chunkAME4HJR4_js.a(U,(r==null?void 0:r.primaryButton)||(r==null?void 0:r.submitButton),e),children:"Submit Another Request"})]}):jsxRuntime.jsxs("div",{"data-ndpr-component":"dsr-request-form",className:chunkAME4HJR4_js.a(`ndpr-dsr-form${q?` ${q}`:""}`,r==null?void 0:r.root,e),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-dsr-form__title",r==null?void 0:r.title,e),children:br}),jsxRuntime.jsx("p",{className:chunkAME4HJR4_js.a("ndpr-dsr-form__description",r==null?void 0:r.description,e),children:fr}),jsxRuntime.jsx("form",{onSubmit:hr,className:chunkAME4HJR4_js.a("",r==null?void 0:r.form,e),children:jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-dsr-form__sections",r==null?void 0:r.fieldGroup,e),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:e?"":"ndpr-form-section__heading",children:"Personal Information"}),jsxRuntime.jsxs("div",{className:e?"":"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"fullName",className:chunkAME4HJR4_js.a("ndpr-form-field__label",r==null?void 0:r.label,e),children:[v.name||"Full Name"," ",jsxRuntime.jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"fullName",value:P,onChange:i=>B(i.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",r==null?void 0:r.input,e),required:true,"aria-required":"true","aria-invalid":!!d.fullName,"aria-describedby":d.fullName?"fullName-error":void 0}),d.fullName&&jsxRuntime.jsx("p",{id:"fullName-error",role:"alert",className:e?"":"ndpr-form-field__error",children:d.fullName})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"email",className:chunkAME4HJR4_js.a("ndpr-form-field__label",r==null?void 0:r.label,e),children:[v.email||"Email Address"," ",jsxRuntime.jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"email",id:"email",value:S,onChange:i=>M(i.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",r==null?void 0:r.input,e),required:true,"aria-required":"true","aria-invalid":!!d.email,"aria-describedby":d.email?"email-error":void 0}),d.email&&jsxRuntime.jsx("p",{id:"email-error",role:"alert",className:e?"":"ndpr-form-field__error",children:d.email})]}),ur&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"phone",className:chunkAME4HJR4_js.a("ndpr-form-field__label",r==null?void 0:r.label,e),children:"Phone Number (Optional)"}),jsxRuntime.jsx("input",{type:"tel",id:"phone",value:k,onChange:i=>Z(i.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",r==null?void 0:r.input,e)})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:e?"":"ndpr-form-section__heading",children:"Request Details"}),jsxRuntime.jsxs("div",{className:e?"":"ndpr-form-field",children:[jsxRuntime.jsxs("label",{htmlFor:"requestType",className:chunkAME4HJR4_js.a("ndpr-form-field__label",r==null?void 0:r.label,e),children:[v.requestType||"Request Type"," ",jsxRuntime.jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsxs("select",{id:"requestType",value:c,onChange:gr,className:chunkAME4HJR4_js.a("ndpr-form-field__select",r==null?void 0:r.select,e),required:true,"aria-required":"true","aria-invalid":!!d.requestType,"aria-describedby":d.requestType?"requestType-error":void 0,children:[jsxRuntime.jsx("option",{value:"",children:"Select a request type"}),y.map(i=>jsxRuntime.jsx("option",{value:i.id,children:i.name},i.id))]}),d.requestType&&jsxRuntime.jsx("p",{id:"requestType-error",role:"alert",className:e?"":"ndpr-form-field__error",children:d.requestType})]}),a&&jsxRuntime.jsxs("div",{className:e?"":"ndpr-dsr-form__type-info",children:[jsxRuntime.jsx("p",{children:a.description}),jsxRuntime.jsxs("p",{children:["Estimated completion time: ",a.estimatedCompletionTime," ",a.estimatedCompletionTime===1?"day":"days"]})]}),jsxRuntime.jsxs("div",{className:e?"":"ndpr-form-field",children:[jsxRuntime.jsx("label",{htmlFor:"requestDescription",className:chunkAME4HJR4_js.a("ndpr-form-field__label",r==null?void 0:r.label,e),children:v.description||"Additional Information"}),jsxRuntime.jsx("textarea",{id:"requestDescription",className:chunkAME4HJR4_js.a("ndpr-form-field__textarea",r==null?void 0:r.textarea,e),rows:4,placeholder:"Please provide any additional details that might help us process your request"})]})]}),O&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:e?"":"ndpr-form-section__heading",children:"Identity Verification"}),jsxRuntime.jsx("p",{className:e?"":"ndpr-form-section__hint",children:"To protect your privacy, we need to verify your identity before processing your request."}),jsxRuntime.jsxs("div",{className:e?"":"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"identifierType",className:chunkAME4HJR4_js.a("ndpr-form-field__label",r==null?void 0:r.label,e),children:["Identifier Type ",jsxRuntime.jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("select",{id:"identifierType",value:G,onChange:i=>L(i.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__select",r==null?void 0:r.select,e),required:true,"aria-required":"true",children:D.map(i=>jsxRuntime.jsx("option",{value:i.id,children:i.label},i.id))})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"identifierValue",className:chunkAME4HJR4_js.a("ndpr-form-field__label",r==null?void 0:r.label,e),children:["Identifier Value ",jsxRuntime.jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"identifierValue",value:w,onChange:i=>Y(i.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",r==null?void 0:r.input,e),required:true,"aria-required":"true","aria-invalid":!!d.identifierValue,"aria-describedby":d.identifierValue?"identifierValue-error":void 0}),d.identifierValue&&jsxRuntime.jsx("p",{id:"identifierValue-error",role:"alert",className:e?"":"ndpr-form-field__error",children:d.identifierValue})]})]})]}),(a==null?void 0:a.requiresAdditionalInfo)&&a.additionalFields&&a.additionalFields.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:e?"":"ndpr-form-section__heading",children:"Additional Information"}),jsxRuntime.jsx("div",{className:e?"":"ndpr-form-section",children:a.additionalFields.map(i=>{var b,_,R;return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:i.id,className:chunkAME4HJR4_js.a("ndpr-form-field__label",r==null?void 0:r.label,e),children:[i.label," ",i.required&&jsxRuntime.jsx("span",{className:e?"":"ndpr-form-field__required",children:"*"})]}),i.type==="text"&&jsxRuntime.jsx("input",{type:"text",id:i.id,value:String((b=l[i.id])!=null?b:""),onChange:u=>h(i.id,u.target.value),placeholder:i.placeholder,className:chunkAME4HJR4_js.a("ndpr-form-field__input",r==null?void 0:r.input,e),required:i.required,"aria-required":i.required||void 0,"aria-invalid":!!d[`additional_${i.id}`],"aria-describedby":d[`additional_${i.id}`]?`additional-${i.id}-error`:void 0}),i.type==="textarea"&&jsxRuntime.jsx("textarea",{id:i.id,value:String((_=l[i.id])!=null?_:""),onChange:u=>h(i.id,u.target.value),placeholder:i.placeholder,className:chunkAME4HJR4_js.a("ndpr-form-field__textarea",r==null?void 0:r.textarea,e),rows:4,required:i.required,"aria-required":i.required||void 0,"aria-invalid":!!d[`additional_${i.id}`],"aria-describedby":d[`additional_${i.id}`]?`additional-${i.id}-error`:void 0}),i.type==="select"&&i.options&&jsxRuntime.jsxs("select",{id:i.id,value:String((R=l[i.id])!=null?R:""),onChange:u=>h(i.id,u.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__select",r==null?void 0:r.select,e),required:i.required,"aria-required":i.required||void 0,"aria-invalid":!!d[`additional_${i.id}`],"aria-describedby":d[`additional_${i.id}`]?`additional-${i.id}-error`:void 0,children:[jsxRuntime.jsx("option",{value:"",children:i.placeholder||"Select an option"}),i.options.map(u=>jsxRuntime.jsx("option",{value:u,children:u},u))]}),i.type==="checkbox"&&jsxRuntime.jsxs("div",{className:e?"":"ndpr-form-field__checkbox-row",children:[jsxRuntime.jsx("input",{type:"checkbox",id:i.id,checked:!!l[i.id],onChange:u=>h(i.id,u.target.checked),className:e?"":"ndpr-form-field__checkbox",required:i.required,"aria-required":i.required||void 0,"aria-invalid":!!d[`additional_${i.id}`],"aria-describedby":d[`additional_${i.id}`]?`additional-${i.id}-error`:void 0}),jsxRuntime.jsx("label",{htmlFor:i.id,className:chunkAME4HJR4_js.a("ndpr-form-field__label",r==null?void 0:r.label,e),children:i.placeholder||i.label})]}),i.type==="file"&&jsxRuntime.jsx("input",{type:"file",id:i.id,onChange:u=>{var ir;let m=(ir=u.target.files)==null?void 0:ir[0];m&&h(i.id,m.name);},className:chunkAME4HJR4_js.a("ndpr-form-field__input",r==null?void 0:r.input,e),required:i.required,"aria-required":i.required||void 0,"aria-invalid":!!d[`additional_${i.id}`],"aria-describedby":d[`additional_${i.id}`]?`additional-${i.id}-error`:void 0}),d[`additional_${i.id}`]&&jsxRuntime.jsx("p",{id:`additional-${i.id}-error`,role:"alert",className:e?"":"ndpr-form-field__error",children:d[`additional_${i.id}`]})]},i.id)})})]}),jsxRuntime.jsxs("div",{className:e?"":"ndpr-dsr-form__notice",children:[jsxRuntime.jsx("h3",{className:e?"":"ndpr-dsr-form__notice-title",children:"Privacy Notice"}),jsxRuntime.jsx("p",{className:e?"":"ndpr-dsr-form__notice-body",children:"The information you provide in this form will be used solely for the purpose of processing your data subject request. We will retain this information for as long as necessary to fulfill your request and to comply with our legal obligations. For more information, please refer to our Privacy Policy."})]}),jsxRuntime.jsxs("div",{className:e?"":"ndpr-dsr-form__actions",children:[A&&(r==null?void 0:r.loadingOverlay)&&jsxRuntime.jsx("div",{className:r.loadingOverlay}),jsxRuntime.jsx("button",{type:"submit",disabled:A,className:chunkAME4HJR4_js.a(U,(r==null?void 0:r.primaryButton)||(r==null?void 0:r.submitButton),e),children:A?"Submitting...":v.submit||lr}),jsxRuntime.jsx("button",{type:"button",onClick:mr,className:chunkAME4HJR4_js.a(qr,void 0,e),children:"Reset"})]})]})})]})};
2
+ exports.a=Tr;
@@ -1 +1 @@
1
- 'use strict';var chunkW47OSMT6_js=require('./chunk-W47OSMT6.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),jsxRuntime=require('react/jsx-runtime');var q=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 34(1)(a)\u2013(b)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 34(1)(c)",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 34(1)(d), Section 34(2)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 38",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 34(1)(e)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 36",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"withdraw_consent",name:"Withdraw My Consent",description:"Withdraw consent previously given for processing",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],C=({requestTypes:R=q,adapter:s,classNames:y,unstyled:S,onSubmit:u=()=>{},submitTo:n,submitOptions:e,onSubmitError:t,onSubmitSuccess:r})=>jsxRuntime.jsx(chunkW47OSMT6_js.a,{requestTypes:R,onSubmit:a=>chunkRFPLZDIO_js.d(null,null,function*(){var d,c;if(n){let h=typeof(e==null?void 0:e.headers)=="function"?e.headers():(d=e==null?void 0:e.headers)!=null?d:{};try{let o=yield fetch(n,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},h),credentials:(c=e==null?void 0:e.credentials)!=null?c:"same-origin",body:JSON.stringify(a)});if(!o.ok)t==null||t({response:o});else if(r){let l;try{let i=yield o.clone().text();i&&(l=JSON.parse(i));}catch(i){}r({response:o,data:a,body:l});}}catch(o){t==null||t({error:o});}}else s&&s.save(a);u(a);}),classNames:y,unstyled:S});exports.a=C;
1
+ 'use strict';var chunkTWJHEIQH_js=require('./chunk-TWJHEIQH.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),jsxRuntime=require('react/jsx-runtime');var q=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 34(1)(a)\u2013(b)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 34(1)(c)",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 34(1)(d), Section 34(2)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 38",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 34(1)(e)",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 36",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"withdraw_consent",name:"Withdraw My Consent",description:"Withdraw consent previously given for processing",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],C=({requestTypes:R=q,adapter:s,classNames:y,unstyled:S,onSubmit:u=()=>{},submitTo:n,submitOptions:e,onSubmitError:t,onSubmitSuccess:r})=>jsxRuntime.jsx(chunkTWJHEIQH_js.a,{requestTypes:R,onSubmit:a=>chunkRFPLZDIO_js.d(null,null,function*(){var d,c;if(n){let h=typeof(e==null?void 0:e.headers)=="function"?e.headers():(d=e==null?void 0:e.headers)!=null?d:{};try{let o=yield fetch(n,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},h),credentials:(c=e==null?void 0:e.credentials)!=null?c:"same-origin",body:JSON.stringify(a)});if(!o.ok)t==null||t({response:o});else if(r){let l;try{let i=yield o.clone().text();i&&(l=JSON.parse(i));}catch(i){}r({response:o,data:a,body:l});}}catch(o){t==null||t({error:o});}}else s&&s.save(a);u(a);}),classNames:y,unstyled:S});exports.a=C;
@@ -1 +1 @@
1
- import {b as b$1,e}from'./chunk-Y3MKMAFQ.mjs';import {a as a$1}from'./chunk-DBZSN4WP.mjs';import {b,a}from'./chunk-ZJYULEER.mjs';import {useRef,useState,useEffect,useCallback}from'react';function W(e,s){return s?a$1(e):{load:()=>null,save:()=>{},remove:()=>{}}}function A({templates:e,initialPolicy:s,adapter:y,storageKey:l="ndpr_privacy_policy",persist:f,useLocalStorage:D,onGenerate:T}){var V;let O=(V=f!=null?f:D)!=null?V:true,w=y!=null?y:W(l,O),c=useRef(w);c.current=w;let[n,p]=useState(s||null),[o,g]=useState(null),[u,S]=useState({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),[C,E]=useState(true),R=useRef(e);R.current=e,useEffect(()=>{if(s){E(false);return}let t=false;try{let r=c.current.load(),i=a=>{if(a){if(p(a),a.templateId){let P=R.current.find(b=>b.id===a.templateId);P&&g(P);}a.organizationInfo&&S(a.organizationInfo);}E(!1);};r instanceof Promise?r.then(a=>{t||i(a);},()=>{t||E(!1);}):i(r);}catch(r){t||E(false);}return ()=>{t=true;}},[s]);let k=t=>{Promise.resolve(c.current.save(t)).catch(r=>{console.warn("[ndpr-toolkit] Failed to save policy:",r);});},j=useCallback(t=>{let r=e.find(b=>b.id===t);if(!r)return false;g(r);let i=r.sections.map(b$1=>b(a({},b$1),{customContent:void 0})),a$1={};Object.keys(r.variables).forEach(b=>{a$1[b]=r.variables[b].defaultValue||"";});let P=Date.now();return p({id:"policy_"+P+"_"+Math.random().toString(36).substr(2,9),title:"",templateId:r.id,organizationInfo:u,sections:i,variableValues:a$1,effectiveDate:P,lastUpdated:P,version:"1.0"}),true},[e,u]),I=useCallback(t=>{S(r=>a(a({},r),t));},[]),F=useCallback((t,r)=>{o&&(n?p(i=>i&&b(a({},i),{sections:i.sections.map(a$1=>a$1.id===t?b(a({},a$1),{included:r}):a$1)})):g(i=>i&&b(a({},i),{sections:i.sections.map(a$1=>a$1.id===t?b(a({},a$1),{included:r}):a$1)})));},[o,n]),M=useCallback((t,r)=>{o&&(n?p(i=>i&&b(a({},i),{sections:i.sections.map(a$1=>a$1.id===t?b(a({},a$1),{customContent:r}):a$1)})):g(i=>i&&b(a({},i),{sections:i.sections.map(a$1=>a$1.id===t?b(a({},a$1),{customContent:r}):a$1)})));},[o,n]),$=useCallback((t,r)=>{n&&p(i=>i&&b(a({},i),{variableValues:b(a({},i.variableValues),{[t]:r})}));},[n]),B=()=>"policy_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),G=useCallback(()=>{if(!o)return null;let t=Date.now(),r={id:(n==null?void 0:n.id)||B(),title:`Privacy Policy for ${u.name}`,templateId:o.id,organizationInfo:u,sections:o.sections.map(i=>{var a$1;return b(a({},i),{customContent:(a$1=n==null?void 0:n.sections.find(P=>P.id===i.id))==null?void 0:a$1.customContent})}),variableValues:(n==null?void 0:n.variableValues)||{},effectiveDate:t,lastUpdated:t,version:"1.0"};return p(r),k(r),T&&T(r),r},[o,n,u,T]),K=useCallback(()=>{if(!n)return {fullText:"",sectionTexts:{},missingVariables:[]};let t=b$1(n.sections,n.organizationInfo);return typeof t=="string"?{fullText:t,sectionTexts:{full:t},missingVariables:[]}:t},[n]),H=useCallback(()=>{p(null),g(null),S({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),Promise.resolve(c.current.remove()).catch(t=>{console.warn("[ndpr-toolkit] Failed to remove policy:",t);});},[]),J=useCallback(()=>{let t=[];if(o||t.push("No template selected"),u.name||t.push("Organization name is required"),u.website||t.push("Organization website is required"),u.privacyEmail||t.push("Privacy contact email is required"),o){let r=o.sections.filter(a=>a.required),i=(n==null?void 0:n.sections.filter(a=>a.included))||[];r.forEach(a=>{i.some(P=>P.id===a.id)||t.push(`Required section "${a.title}" must be included`);});}return o&&n&&Object.entries(o.variables).forEach(([r,i])=>{i.required&&!n.variableValues[r]&&t.push(`Required variable "${i.name}" must have a value`);}),{valid:t.length===0,errors:t}},[o,u,n]);return {policy:n,selectedTemplate:o,organizationInfo:u,selectTemplate:j,updateOrganizationInfo:I,toggleSection:F,updateSectionContent:M,updateVariableValue:$,generatePolicy:G,getPolicyText:K,resetPolicy:H,isValid:J,isLoading:C}}var _="default-business";function X(e){return e.toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"})}function Y(e$1){let{sections:s,variables:y}=e(),l={};return e$1&&(e$1.name&&(l.orgName=e$1.name),e$1.email&&(l.privacyEmail=e$1.email),e$1.website&&(l.website=e$1.website),e$1.address&&(l.address=e$1.address),e$1.industry&&(l.industry=e$1.industry),e$1.dpoName&&(l.dpoName=e$1.dpoName),e$1.dpoEmail&&(l.dpoEmail=e$1.dpoEmail)),l.effectiveDate||(l.effectiveDate=X(new Date)),{id:_,name:"Default Business Policy",description:"NDPA-compliant privacy policy template for businesses.",organizationType:"business",sections:s,variables:Object.fromEntries(y.map(f=>[f.name,{name:f.name,description:f.description,required:f.required,defaultValue:l[f.name]||f.value||void 0}])),version:"1.0",lastUpdated:Date.now(),ndpaCompliant:true}}function Z(e){if(!e)return {};let s={};return e.name&&(s.name=e.name),e.email&&(s.privacyEmail=e.email),e.website&&(s.website=e.website),e.address&&(s.address=e.address),e.industry&&(s.industry=e.industry),e.dpoName&&(s.dpoName=e.dpoName),e.dpoEmail&&(s.dpoEmail=e.dpoEmail),s}function ce(e={}){var o;let{orgInfo:s,autoGenerate:y=true,storageKey:l,persist:f,useLocalStorage:D,adapter:T}=e,O=(o=f!=null?f:D)!=null?o:true,w=useRef(null);w.current===null&&(w.current=Y(s));let c=A({templates:[w.current],adapter:T,storageKey:l,persist:O}),n=useRef(false),p=useRef(false);return useEffect(()=>{if(!y||c.isLoading||n.current)return;if(!T&&O!==false&&typeof window!="undefined"&&typeof window.localStorage!="undefined")try{if(window.localStorage.getItem(l!=null?l:"ndpr_privacy_policy")){n.current=!0,p.current=!0;return}}catch(S){}if(c.policy){n.current=true,p.current=true;return}n.current=true;let u=Z(s);Object.keys(u).length>0&&c.updateOrganizationInfo(u),c.selectedTemplate||c.selectTemplate(_);},[y,c.isLoading]),useEffect(()=>{var u;if(!y||p.current||!n.current||!c.selectedTemplate)return;let g=(u=s==null?void 0:s.name)!=null?u:"";g&&c.organizationInfo.name!==g||(p.current=true,c.generatePolicy());},[y,c.selectedTemplate,c.organizationInfo]),c}export{A as a,ce as b};
1
+ import {b as b$1,e}from'./chunk-NBQQ2GN3.mjs';import {a as a$1}from'./chunk-DBZSN4WP.mjs';import {b,a}from'./chunk-ZJYULEER.mjs';import {useRef,useState,useEffect,useCallback}from'react';function W(e,s){return s?a$1(e):{load:()=>null,save:()=>{},remove:()=>{}}}function A({templates:e,initialPolicy:s,adapter:y,storageKey:l="ndpr_privacy_policy",persist:f,useLocalStorage:D,onGenerate:T}){var V;let O=(V=f!=null?f:D)!=null?V:true,w=y!=null?y:W(l,O),c=useRef(w);c.current=w;let[n,p]=useState(s||null),[o,g]=useState(null),[u,S]=useState({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),[C,E]=useState(true),R=useRef(e);R.current=e,useEffect(()=>{if(s){E(false);return}let t=false;try{let r=c.current.load(),i=a=>{if(a){if(p(a),a.templateId){let P=R.current.find(b=>b.id===a.templateId);P&&g(P);}a.organizationInfo&&S(a.organizationInfo);}E(!1);};r instanceof Promise?r.then(a=>{t||i(a);},()=>{t||E(!1);}):i(r);}catch(r){t||E(false);}return ()=>{t=true;}},[s]);let k=t=>{Promise.resolve(c.current.save(t)).catch(r=>{console.warn("[ndpr-toolkit] Failed to save policy:",r);});},j=useCallback(t=>{let r=e.find(b=>b.id===t);if(!r)return false;g(r);let i=r.sections.map(b$1=>b(a({},b$1),{customContent:void 0})),a$1={};Object.keys(r.variables).forEach(b=>{a$1[b]=r.variables[b].defaultValue||"";});let P=Date.now();return p({id:"policy_"+P+"_"+Math.random().toString(36).substr(2,9),title:"",templateId:r.id,organizationInfo:u,sections:i,variableValues:a$1,effectiveDate:P,lastUpdated:P,version:"1.0"}),true},[e,u]),I=useCallback(t=>{S(r=>a(a({},r),t));},[]),F=useCallback((t,r)=>{o&&(n?p(i=>i&&b(a({},i),{sections:i.sections.map(a$1=>a$1.id===t?b(a({},a$1),{included:r}):a$1)})):g(i=>i&&b(a({},i),{sections:i.sections.map(a$1=>a$1.id===t?b(a({},a$1),{included:r}):a$1)})));},[o,n]),M=useCallback((t,r)=>{o&&(n?p(i=>i&&b(a({},i),{sections:i.sections.map(a$1=>a$1.id===t?b(a({},a$1),{customContent:r}):a$1)})):g(i=>i&&b(a({},i),{sections:i.sections.map(a$1=>a$1.id===t?b(a({},a$1),{customContent:r}):a$1)})));},[o,n]),$=useCallback((t,r)=>{n&&p(i=>i&&b(a({},i),{variableValues:b(a({},i.variableValues),{[t]:r})}));},[n]),B=()=>"policy_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),G=useCallback(()=>{if(!o)return null;let t=Date.now(),r={id:(n==null?void 0:n.id)||B(),title:`Privacy Policy for ${u.name}`,templateId:o.id,organizationInfo:u,sections:o.sections.map(i=>{var a$1;return b(a({},i),{customContent:(a$1=n==null?void 0:n.sections.find(P=>P.id===i.id))==null?void 0:a$1.customContent})}),variableValues:(n==null?void 0:n.variableValues)||{},effectiveDate:t,lastUpdated:t,version:"1.0"};return p(r),k(r),T&&T(r),r},[o,n,u,T]),K=useCallback(()=>{if(!n)return {fullText:"",sectionTexts:{},missingVariables:[]};let t=b$1(n.sections,n.organizationInfo);return typeof t=="string"?{fullText:t,sectionTexts:{full:t},missingVariables:[]}:t},[n]),H=useCallback(()=>{p(null),g(null),S({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),Promise.resolve(c.current.remove()).catch(t=>{console.warn("[ndpr-toolkit] Failed to remove policy:",t);});},[]),J=useCallback(()=>{let t=[];if(o||t.push("No template selected"),u.name||t.push("Organization name is required"),u.website||t.push("Organization website is required"),u.privacyEmail||t.push("Privacy contact email is required"),o){let r=o.sections.filter(a=>a.required),i=(n==null?void 0:n.sections.filter(a=>a.included))||[];r.forEach(a=>{i.some(P=>P.id===a.id)||t.push(`Required section "${a.title}" must be included`);});}return o&&n&&Object.entries(o.variables).forEach(([r,i])=>{i.required&&!n.variableValues[r]&&t.push(`Required variable "${i.name}" must have a value`);}),{valid:t.length===0,errors:t}},[o,u,n]);return {policy:n,selectedTemplate:o,organizationInfo:u,selectTemplate:j,updateOrganizationInfo:I,toggleSection:F,updateSectionContent:M,updateVariableValue:$,generatePolicy:G,getPolicyText:K,resetPolicy:H,isValid:J,isLoading:C}}var _="default-business";function X(e){return e.toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"})}function Y(e$1){let{sections:s,variables:y}=e(),l={};return e$1&&(e$1.name&&(l.orgName=e$1.name),e$1.email&&(l.privacyEmail=e$1.email),e$1.website&&(l.website=e$1.website),e$1.address&&(l.address=e$1.address),e$1.industry&&(l.industry=e$1.industry),e$1.dpoName&&(l.dpoName=e$1.dpoName),e$1.dpoEmail&&(l.dpoEmail=e$1.dpoEmail)),l.effectiveDate||(l.effectiveDate=X(new Date)),{id:_,name:"Default Business Policy",description:"NDPA-compliant privacy policy template for businesses.",organizationType:"business",sections:s,variables:Object.fromEntries(y.map(f=>[f.name,{name:f.name,description:f.description,required:f.required,defaultValue:l[f.name]||f.value||void 0}])),version:"1.0",lastUpdated:Date.now(),ndpaCompliant:true}}function Z(e){if(!e)return {};let s={};return e.name&&(s.name=e.name),e.email&&(s.privacyEmail=e.email),e.website&&(s.website=e.website),e.address&&(s.address=e.address),e.industry&&(s.industry=e.industry),e.dpoName&&(s.dpoName=e.dpoName),e.dpoEmail&&(s.dpoEmail=e.dpoEmail),s}function ce(e={}){var o;let{orgInfo:s,autoGenerate:y=true,storageKey:l,persist:f,useLocalStorage:D,adapter:T}=e,O=(o=f!=null?f:D)!=null?o:true,w=useRef(null);w.current===null&&(w.current=Y(s));let c=A({templates:[w.current],adapter:T,storageKey:l,persist:O}),n=useRef(false),p=useRef(false);return useEffect(()=>{if(!y||c.isLoading||n.current)return;if(!T&&O!==false&&typeof window!="undefined"&&typeof window.localStorage!="undefined")try{if(window.localStorage.getItem(l!=null?l:"ndpr_privacy_policy")){n.current=!0,p.current=!0;return}}catch(S){}if(c.policy){n.current=true,p.current=true;return}n.current=true;let u=Z(s);Object.keys(u).length>0&&c.updateOrganizationInfo(u),c.selectedTemplate||c.selectTemplate(_);},[y,c.isLoading]),useEffect(()=>{var u;if(!y||p.current||!n.current||!c.selectedTemplate)return;let g=(u=s==null?void 0:s.name)!=null?u:"";g&&c.organizationInfo.name!==g||(p.current=true,c.generatePolicy());},[y,c.selectedTemplate,c.organizationInfo]),c}export{A as a,ce as b};
@@ -1 +1 @@
1
- 'use strict';var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js');var i={consent:{title:"We Value Your Privacy",description:"We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26.",acceptAll:"Accept All",rejectAll:"Reject All",customize:"Customize",savePreferences:"Save Preferences",selectAll:"Select All",deselectAll:"Deselect All",required:"Required",cookieNotice:'By clicking "Accept All", you agree to the use of ALL cookies. Visit our Cookie Policy to learn more.'},dsr:{title:"Submit a Data Subject Request",description:"Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part IV, Sections 29-36.",submitRequest:"Submit Request",reset:"Reset",fullName:"Full Name",email:"Email Address",phone:"Phone Number (Optional)",requestType:"Request Type",additionalInfo:"Additional Information",identityVerification:"Identity Verification",identifierType:"Identifier Type",identifierValue:"Identifier Value",privacyNotice:"The information you provide in this form will be used solely for the purpose of processing your data subject request.",successMessage:"Your request has been submitted successfully."},breach:{title:"Report a Data Breach",description:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40.",submitReport:"Submit Report",breachTitle:"Breach Title/Summary",category:"Category",discoveredAt:"Date Discovered",detailedDescription:"Detailed Description"},dpia:{title:"Data Protection Impact Assessment",next:"Next",previous:"Previous",complete:"Complete Assessment",progress:"Progress"},policy:{title:"Privacy Policy Generator",generate:"Generate Policy",preview:"Preview",export:"Export",sections:"Sections",variables:"Variables"},compliance:{score:"Compliance Score",excellent:"Excellent",good:"Good",needsWork:"Needs Work",critical:"Critical",recommendations:"Recommendations",passed:"Passed",gaps:"Gaps"},common:{loading:"Loading...",error:"An error occurred",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",back:"Back",next:"Next",search:"Search",noResults:"No results found"}};function a(e){if(!e)return i;let r=chunkRFPLZDIO_js.a({},i);for(let t of Object.keys(e))e[t]&&(r[t]=chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},i[t]),e[t]));return r}exports.a=i;exports.b=a;
1
+ 'use strict';var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js');var i={consent:{title:"We Value Your Privacy",description:"We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26.",acceptAll:"Accept All",rejectAll:"Reject All",customize:"Customize",savePreferences:"Save Preferences",selectAll:"Select All",deselectAll:"Deselect All",required:"Required",cookieNotice:'By clicking "Accept All", you agree to the use of ALL cookies. Visit our Cookie Policy to learn more.'},dsr:{title:"Submit a Data Subject Request",description:"Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part VI, Sections 34-38.",submitRequest:"Submit Request",reset:"Reset",fullName:"Full Name",email:"Email Address",phone:"Phone Number (Optional)",requestType:"Request Type",additionalInfo:"Additional Information",identityVerification:"Identity Verification",identifierType:"Identifier Type",identifierValue:"Identifier Value",privacyNotice:"The information you provide in this form will be used solely for the purpose of processing your data subject request.",successMessage:"Your request has been submitted successfully."},breach:{title:"Report a Data Breach",description:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40.",submitReport:"Submit Report",breachTitle:"Breach Title/Summary",category:"Category",discoveredAt:"Date Discovered",detailedDescription:"Detailed Description"},dpia:{title:"Data Protection Impact Assessment",next:"Next",previous:"Previous",complete:"Complete Assessment",progress:"Progress"},policy:{title:"Privacy Policy Generator",generate:"Generate Policy",preview:"Preview",export:"Export",sections:"Sections",variables:"Variables"},compliance:{score:"Compliance Score",excellent:"Excellent",good:"Good",needsWork:"Needs Work",critical:"Critical",recommendations:"Recommendations",passed:"Passed",gaps:"Gaps"},common:{loading:"Loading...",error:"An error occurred",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",back:"Back",next:"Next",search:"Search",noResults:"No results found"}};function a(e){if(!e)return i;let r=chunkRFPLZDIO_js.a({},i);for(let t of Object.keys(e))e[t]&&(r[t]=chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},i[t]),e[t]));return r}exports.a=i;exports.b=a;
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-YTU4FNM2.mjs';import {c}from'./chunk-25TNTLHJ.mjs';import {a as a$2}from'./chunk-SFGW37LE.mjs';import {a as a$1,b}from'./chunk-ZJYULEER.mjs';import {useState,useRef,useEffect,useCallback}from'react';import {createPortal}from'react-dom';import {jsx,jsxs}from'react/jsx-runtime';var Vn=({options:d,onSave:bn,title:A,description:y,acceptAllButtonText:P,rejectAllButtonText:E,customizeButtonText:D,saveButtonText:z,position:pn="bottom",variant:a$3="bar",zIndex:x=9999,version:C="1.0",show:h,manageStorage:L=true,storageKey:w="ndpr_consent",className:V="",buttonClassName:j="",primaryButtonClassName:ln="",secondaryButtonClassName:fn="",classNames:n,unstyled:o,onAnalytics:k})=>{var U,X,Z,T,m,N,nn,tn,en;let c$1=c(),gn=(U=A!=null?A:c$1.consent.title)!=null?U:"We Value Your Privacy",vn=(X=y!=null?y:c$1.consent.description)!=null?X:"We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26.",_n=(Z=P!=null?P:c$1.consent.acceptAll)!=null?Z:"Accept All",Cn=(T=E!=null?E:c$1.consent.rejectAll)!=null?T:"Reject All",hn=(m=D!=null?D:c$1.consent.customize)!=null?m:"Customize",an=(N=z!=null?z:c$1.consent.savePreferences)!=null?N:"Save Preferences",kn=(nn=c$1.consent.selectAll)!=null?nn:"Select All",Sn=(tn=c$1.consent.deselectAll)!=null?tn:"Deselect All",[b$1,u]=useState(false),[f,I]=useState(false),[S,B]=useState({}),[s,Bn]=useState(false),Rn=a({active:b$1}),$=useRef(null),q=useRef(false);useEffect(()=>{Bn(true);},[]);let p=useCallback((t,e)=>{k==null||k(a$1({action:t,timestamp:Date.now(),version:C},e!==void 0?{categories:e}:{}));},[k,C]);useEffect(()=>{let t={};if(d.forEach(e=>{t[e.id]=e.defaultValue||false;}),B(t),h===void 0)if(!L)u(true);else {let e=localStorage.getItem(w);if(e)try{JSON.parse(e).version!==C?u(!0):u(!1);}catch(G){u(true);}else u(true);}else u(h);},[d,w,C,L]),useEffect(()=>{h!==void 0&&u(h);},[h]);let An=()=>{let t={};d.forEach(e=>{t[e.id]=true;}),p("accepted_all",t),H(t);},J=()=>{let t={};d.forEach(e=>{t[e.id]=e.required||false;}),p("rejected_all",t),H(t);},yn=(t,e)=>{B(G=>b(a$1({},G),{[t]:e}));},Pn=()=>{let t={};d.forEach(e=>{t[e.id]=true;}),B(t);},En=()=>{let t={};d.forEach(e=>{t[e.id]=e.required||false;}),B(t);},W=d.length>0&&d.every(t=>S[t.id]),Dn=()=>{p("customized",S),H(S);},H=t=>{let e={consents:t,timestamp:Date.now(),version:C,method:f?"customize":"banner",hasInteracted:true};L&&localStorage.setItem(w,JSON.stringify(e)),bn(e),u(false),I(false);};if(useEffect(()=>{if(!b$1)return;let t=e=>{e.key==="Escape"&&(p("dismissed"),J());};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[b$1,p,d,f]),useEffect(()=>{b$1&&!q.current&&(q.current=true,p("shown")),b$1||(q.current=false);},[b$1,p]),useEffect(()=>{if(f&&$.current){let t=$.current;t.style.maxHeight="0px",t.style.opacity="0",t.offsetHeight,t.style.maxHeight=`${t.scrollHeight}px`,t.style.opacity="1";}},[f]),!b$1)return null;let g=a$3==="modal"?"center":pn,Y=g==="inline",O=g==="center",v=["ndpr-consent-banner"];a$3!=="bar"&&v.push(`ndpr-consent-banner--${a$3}`),g==="top"?v.push("ndpr-consent-banner--top"):g==="bottom"?v.push("ndpr-consent-banner--bottom"):g==="inline"&&v.push("ndpr-consent-banner--inline"),V&&v.push(V);let zn=v.join(" "),K=`ndpr-consent-banner__button ndpr-consent-banner__button--primary ${j} ${ln}`.trim(),Ln=`ndpr-consent-banner__button ndpr-consent-banner__button--secondary ${j} ${fn}`.trim(),wn=`ndpr-consent-banner__button ndpr-consent-banner__button--ghost ${j}`.trim(),jn=(n==null?void 0:n.primaryButton)||(n==null?void 0:n.acceptButton)||K,Q=(n==null?void 0:n.secondaryButton)||(n==null?void 0:n.rejectButton)||Ln,In=(n==null?void 0:n.customizeButton)||wn,$n=(n==null?void 0:n.saveButton)||K,F=jsx("div",{ref:Rn,tabIndex:-1,"data-ndpr-component":"consent-banner","data-ndpr-variant":a$3,"data-ndpr-position":g,className:a$2(zn,n==null?void 0:n.root,o),style:!Y&&!O?{zIndex:x}:void 0,role:"dialog","aria-modal":O||void 0,"aria-labelledby":"consent-banner-title","aria-describedby":"consent-banner-description",children:jsxs("div",{className:a$2("ndpr-consent-banner__container",n==null?void 0:n.container,o),children:[jsx("h2",{id:"consent-banner-title",className:a$2("ndpr-consent-banner__title",n==null?void 0:n.title,o),children:gn}),jsx("p",{id:"consent-banner-description",className:a$2("ndpr-consent-banner__description",n==null?void 0:n.description,o),children:vn}),f&&jsxs("div",{ref:$,className:a$2("ndpr-consent-banner__customize-panel",n==null?void 0:n.customizePanel,o),children:[jsx("div",{className:o?"":"ndpr-consent-banner__select-all-row",children:jsx("button",{type:"button",onClick:W?En:Pn,className:a$2("ndpr-consent-banner__select-all-button",n==null?void 0:n.selectAllButton,o),children:W?Sn:kn})}),jsx("div",{className:a$2("ndpr-consent-banner__options-list",n==null?void 0:n.optionsList,o),children:d.map(t=>jsxs("div",{className:a$2("ndpr-consent-banner__option",n==null?void 0:n.optionItem,o),children:[jsx("input",{id:`consent-${t.id}`,type:"checkbox",checked:S[t.id]||false,onChange:e=>yn(t.id,e.target.checked),disabled:t.required,className:a$2("ndpr-consent-banner__option-checkbox",n==null?void 0:n.optionCheckbox,o)}),jsxs("div",{className:o?"":"ndpr-consent-banner__option-text",children:[jsxs("label",{htmlFor:`consent-${t.id}`,className:a$2("ndpr-consent-banner__option-label",n==null?void 0:n.optionLabel,o),children:[t.label,t.required&&jsx("span",{className:o?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsx("p",{className:a$2("ndpr-consent-banner__option-description",n==null?void 0:n.optionDescription,o),children:t.description})]})]},t.id))}),jsxs("div",{className:a$2("ndpr-consent-banner__buttons",n==null?void 0:n.buttonGroup,o),children:[jsx("button",{onClick:Dn,className:a$2($n,n==null?void 0:n.saveButton,o),children:an}),jsx("button",{onClick:()=>I(false),className:a$2(Q,n==null?void 0:n.rejectButton,o),children:(en=c$1.common.back)!=null?en:"Back"})]})]}),!f&&jsxs("div",{className:a$2("ndpr-consent-banner__buttons",n==null?void 0:n.buttonGroup,o),children:[jsx("button",{onClick:An,className:a$2(jn,n==null?void 0:n.acceptButton,o),children:_n}),jsx("button",{onClick:J,className:a$2(Q,n==null?void 0:n.rejectButton,o),children:Cn}),jsx("button",{onClick:()=>I(true),className:a$2(In,n==null?void 0:n.customizeButton,o),children:hn})]}),jsx("div",{className:a$2("ndpr-consent-banner__footer-text",void 0,o),children:'By clicking "Accept All", you agree to the use of ALL cookies. Visit our Cookie Policy to learn more.'})]})});if(Y)return F;if(O){let t=jsx("div",{className:o?"":"ndpr-consent-banner__overlay",style:{zIndex:x},children:F});return s?createPortal(t,document.body):null}return s?createPortal(F,document.body):null};export{Vn 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'),chunkBRS52EDT_js=require('./chunk-BRS52EDT.js'),chunk732C2EVN_js=require('./chunk-732C2EVN.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkP4LNLCSF_js=require('./chunk-P4LNLCSF.js');require('./chunk-L2VO3MEJ.js'),require('./chunk-7ZZO7GVB.js');var chunkB46SJB5V_js=require('./chunk-B46SJB5V.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var v=react.createContext(null);function p(){let t=react.useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let C=chunkP4LNLCSF_js.a({options:t,adapter:n,version:s,onChange:r}),o=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},C),{options:t});return jsxRuntime.jsx(v.Provider,{value:o,children:c})};var P=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,C]=react.useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsxRuntime.jsx("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsxRuntime.jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>C(a=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{[o.id]:i.target.checked})),disabled:o.required,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxRuntime.jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxRuntime.jsxs("label",{htmlFor:`consent-${o.id}`,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsxRuntime.jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsxRuntime.jsx("p",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var R=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var S=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:C}=p();return jsxRuntime.jsx("button",{onClick:()=>{if(r)c(r);else {let i={};C.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:P,AcceptButton:R,RejectButton:S,SaveButton:y,Banner:chunk732C2EVN_js.a,Settings:chunkBRS52EDT_js.a,Storage:chunkSJDDNB6M_js.a};Object.defineProperty(exports,"ConsentStorage",{enumerable:true,get:function(){return chunkSJDDNB6M_js.a}});Object.defineProperty(exports,"ConsentManager",{enumerable:true,get:function(){return chunkBRS52EDT_js.a}});Object.defineProperty(exports,"ConsentBanner",{enumerable:true,get:function(){return chunk732C2EVN_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkP4LNLCSF_js.a}});Object.defineProperty(exports,"validateConsent",{enumerable:true,get:function(){return chunkB46SJB5V_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkB46SJB5V_js.b}});Object.defineProperty(exports,"resolveClass",{enumerable:true,get:function(){return chunkAME4HJR4_js.a}});exports.Consent=I;exports.ConsentAcceptButton=R;exports.ConsentOptionList=P;exports.ConsentProvider=g;exports.ConsentRejectButton=S;exports.ConsentSaveButton=y;exports.useConsentCompound=p;
2
+ 'use strict';var chunkSJDDNB6M_js=require('./chunk-SJDDNB6M.js'),chunkBRS52EDT_js=require('./chunk-BRS52EDT.js'),chunkD3DVVJCT_js=require('./chunk-D3DVVJCT.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkP4LNLCSF_js=require('./chunk-P4LNLCSF.js');require('./chunk-L2VO3MEJ.js'),require('./chunk-7ZZO7GVB.js');var chunkB46SJB5V_js=require('./chunk-B46SJB5V.js');require('./chunk-NDKDKDDX.js'),require('./chunk-WKTKTLMF.js');var chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var v=react.createContext(null);function p(){let t=react.useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let C=chunkP4LNLCSF_js.a({options:t,adapter:n,version:s,onChange:r}),o=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},C),{options:t});return jsxRuntime.jsx(v.Provider,{value:o,children:c})};var P=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,C]=react.useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsxRuntime.jsx("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsxRuntime.jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>C(a=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},a),{[o.id]:i.target.checked})),disabled:o.required,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxRuntime.jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxRuntime.jsxs("label",{htmlFor:`consent-${o.id}`,className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsxRuntime.jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsxRuntime.jsx("p",{className:chunkAME4HJR4_js.a("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var R=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var S=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsxRuntime.jsx("button",{onClick:r,className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:C}=p();return jsxRuntime.jsx("button",{onClick:()=>{if(r)c(r);else {let i={};C.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:chunkAME4HJR4_js.a("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:P,AcceptButton:R,RejectButton:S,SaveButton:y,Banner:chunkD3DVVJCT_js.a,Settings:chunkBRS52EDT_js.a,Storage:chunkSJDDNB6M_js.a};Object.defineProperty(exports,"ConsentStorage",{enumerable:true,get:function(){return chunkSJDDNB6M_js.a}});Object.defineProperty(exports,"ConsentManager",{enumerable:true,get:function(){return chunkBRS52EDT_js.a}});Object.defineProperty(exports,"ConsentBanner",{enumerable:true,get:function(){return chunkD3DVVJCT_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkP4LNLCSF_js.a}});Object.defineProperty(exports,"validateConsent",{enumerable:true,get:function(){return chunkB46SJB5V_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkB46SJB5V_js.b}});Object.defineProperty(exports,"resolveClass",{enumerable:true,get:function(){return chunkAME4HJR4_js.a}});exports.Consent=I;exports.ConsentAcceptButton=R;exports.ConsentOptionList=P;exports.ConsentProvider=g;exports.ConsentRejectButton=S;exports.ConsentSaveButton=y;exports.useConsentCompound=p;
package/dist/consent.mjs CHANGED
@@ -1,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-U5RWJRGA.mjs';export{a as ConsentManager}from'./chunk-U5RWJRGA.mjs';import {a as a$2}from'./chunk-BFAX7JQA.mjs';export{a as ConsentBanner}from'./chunk-BFAX7JQA.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';import {a as a$3}from'./chunk-PCU6GKBE.mjs';export{a as useConsent}from'./chunk-PCU6GKBE.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-UASG46LP.mjs';export{a as validateConsent,b as validateConsentOptions}from'./chunk-PJNKQPQP.mjs';import {a as a$5}from'./chunk-SFGW37LE.mjs';export{a as resolveClass}from'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import {b,a as a$4}from'./chunk-ZJYULEER.mjs';import {createContext,useContext,useState}from'react';import {jsx,jsxs}from'react/jsx-runtime';var v=createContext(null);function p(){let t=useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let C=a$3({options:t,adapter:n,version:s,onChange:r}),o=b(a$4({},C),{options:t});return jsx(v.Provider,{value:o,children:c})};var P=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,C]=useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsx("div",{className:a$5("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxs("div",{className:a$5("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>C(a=>b(a$4({},a),{[o.id]:i.target.checked})),disabled:o.required,className:a$5("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxs("label",{htmlFor:`consent-${o.id}`,className:a$5("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsx("p",{className:a$5("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var R=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var S=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:C}=p();return jsx("button",{onClick:()=>{if(r)c(r);else {let i={};C.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:P,AcceptButton:R,RejectButton:S,SaveButton:y,Banner:a$2,Settings:a$1,Storage:a};export{I as Consent,R as ConsentAcceptButton,P as ConsentOptionList,g as ConsentProvider,S as ConsentRejectButton,y as ConsentSaveButton,p as useConsentCompound};
2
+ import {a}from'./chunk-XOH4WXOZ.mjs';export{a as ConsentStorage}from'./chunk-XOH4WXOZ.mjs';import {a as a$1}from'./chunk-U5RWJRGA.mjs';export{a as ConsentManager}from'./chunk-U5RWJRGA.mjs';import {a as a$2}from'./chunk-WYH3OA5L.mjs';export{a as ConsentBanner}from'./chunk-WYH3OA5L.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';import {a as a$3}from'./chunk-PCU6GKBE.mjs';export{a as useConsent}from'./chunk-PCU6GKBE.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-UASG46LP.mjs';export{a as validateConsent,b as validateConsentOptions}from'./chunk-PJNKQPQP.mjs';import'./chunk-25TNTLHJ.mjs';import'./chunk-RBMLGRDN.mjs';import {a as a$5}from'./chunk-SFGW37LE.mjs';export{a as resolveClass}from'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import {b,a as a$4}from'./chunk-ZJYULEER.mjs';import {createContext,useContext,useState}from'react';import {jsx,jsxs}from'react/jsx-runtime';var v=createContext(null);function p(){let t=useContext(v);if(!t)throw new Error("Consent compound components must be wrapped in <Consent.Provider>. Example: <Consent.Provider options={...}><Consent.Banner /></Consent.Provider>");return t}var g=({options:t,adapter:n,version:s,onChange:r,children:c})=>{let C=a$3({options:t,adapter:n,version:s,onChange:r}),o=b(a$4({},C),{options:t});return jsx(v.Provider,{value:o,children:c})};var P=({classNames:t,unstyled:n})=>{let{options:s,settings:r}=p(),[c,C]=useState(()=>{let o={};return s.forEach(i=>{var a,_;o[i.id]=(_=(a=r==null?void 0:r.consents[i.id])!=null?a:i.defaultValue)!=null?_:false;}),o});return jsx("div",{className:a$5("ndpr-consent-banner__options-list",t==null?void 0:t.root,n),"data-ndpr-component":"consent-option-list",children:s.map(o=>jsxs("div",{className:a$5("ndpr-consent-banner__option",t==null?void 0:t.optionItem,n),children:[jsx("input",{id:`consent-${o.id}`,type:"checkbox",checked:c[o.id]||false,onChange:i=>C(a=>b(a$4({},a),{[o.id]:i.target.checked})),disabled:o.required,className:a$5("ndpr-consent-banner__option-checkbox",t==null?void 0:t.optionCheckbox,n),"aria-label":o.label}),jsxs("div",{className:n?"":"ndpr-consent-banner__option-text",children:[jsxs("label",{htmlFor:`consent-${o.id}`,className:a$5("ndpr-consent-banner__option-label",t==null?void 0:t.optionLabel,n),children:[o.label,o.required&&jsx("span",{className:n?"":"ndpr-consent-banner__required-marker",children:" *"})]}),jsx("p",{className:a$5("ndpr-consent-banner__option-description",t==null?void 0:t.optionDescription,n),children:o.description})]})]},o.id))})};var R=({children:t,className:n,unstyled:s})=>{let{acceptAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-accept-button",children:t!=null?t:"Accept All"})};var S=({children:t,className:n,unstyled:s})=>{let{rejectAll:r}=p();return jsx("button",{onClick:r,className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--secondary",n,s),"data-ndpr-component":"consent-reject-button",children:t!=null?t:"Reject All"})};var y=({children:t,className:n,unstyled:s,consents:r})=>{let{updateConsent:c,options:C}=p();return jsx("button",{onClick:()=>{if(r)c(r);else {let i={};C.forEach(a=>{i[a.id]=a.required||false;}),c(i);}},className:a$5("ndpr-consent-banner__button ndpr-consent-banner__button--primary",n,s),"data-ndpr-component":"consent-save-button",children:t!=null?t:"Save Preferences"})};var I={Provider:g,OptionList:P,AcceptButton:R,RejectButton:S,SaveButton:y,Banner:a$2,Settings:a$1,Storage:a};export{I as Consent,R as ConsentAcceptButton,P as ConsentOptionList,g as ConsentProvider,S as ConsentRejectButton,y as ConsentSaveButton,p as useConsentCompound};
package/dist/core.d.mts CHANGED
@@ -593,7 +593,7 @@ export declare const defaultLocale: Required<{
593
593
  }>;
594
594
 
595
595
  /**
596
- * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
596
+ * Data Protection Impact Assessment types aligned with NDPA 2023 Section 28
597
597
  * A DPIA is required when processing is likely to result in high risk to data subjects
598
598
  */
599
599
  /**
@@ -672,7 +672,7 @@ export declare interface DPIAResult {
672
672
  version: string;
673
673
  /**
674
674
  * Whether prior consultation with NDPC is required
675
- * Per NDPA Section 39, consultation is required when DPIA indicates high residual risk
675
+ * Per NDPA Section 28(2), consultation is required when DPIA indicates high residual risk
676
676
  */
677
677
  ndpcConsultationRequired?: boolean;
678
678
  /** Date when NDPC consultation was initiated */
package/dist/core.d.ts CHANGED
@@ -593,7 +593,7 @@ export declare const defaultLocale: Required<{
593
593
  }>;
594
594
 
595
595
  /**
596
- * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
596
+ * Data Protection Impact Assessment types aligned with NDPA 2023 Section 28
597
597
  * A DPIA is required when processing is likely to result in high risk to data subjects
598
598
  */
599
599
  /**
@@ -672,7 +672,7 @@ export declare interface DPIAResult {
672
672
  version: string;
673
673
  /**
674
674
  * Whether prior consultation with NDPC is required
675
- * Per NDPA Section 39, consultation is required when DPIA indicates high residual risk
675
+ * Per NDPA Section 28(2), consultation is required when DPIA indicates high residual risk
676
676
  */
677
677
  ndpcConsultationRequired?: boolean;
678
678
  /** Date when NDPC consultation was initiated */
package/dist/core.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkUAV7V4EM_js=require('./chunk-UAV7V4EM.js'),chunk4QXTB3L6_js=require('./chunk-4QXTB3L6.js'),chunk3GRGYT3P_js=require('./chunk-3GRGYT3P.js'),chunk7IFSWCQP_js=require('./chunk-7IFSWCQP.js'),chunkQPRYXVH2_js=require('./chunk-QPRYXVH2.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkLVGT3DLT_js=require('./chunk-LVGT3DLT.js'),chunkQ64735OC_js=require('./chunk-Q64735OC.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'),chunkB46SJB5V_js=require('./chunk-B46SJB5V.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkL2BRFMVS_js=require('./chunk-L2BRFMVS.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"NDPRProvider",{enumerable:true,get:function(){return chunkUAV7V4EM_js.a}});Object.defineProperty(exports,"useNDPRConfig",{enumerable:true,get:function(){return chunkUAV7V4EM_js.b}});Object.defineProperty(exports,"useNDPRLocale",{enumerable:true,get:function(){return chunkUAV7V4EM_js.c}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunk4QXTB3L6_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunk4QXTB3L6_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunk4QXTB3L6_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunk4QXTB3L6_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunk3GRGYT3P_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunk3GRGYT3P_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunk3GRGYT3P_js.b}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunk7IFSWCQP_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunk7IFSWCQP_js.b}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunkQPRYXVH2_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 chunkLVGT3DLT_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkLVGT3DLT_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkLVGT3DLT_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkLVGT3DLT_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkLVGT3DLT_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunkQ64735OC_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunkQ64735OC_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunkQ64735OC_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,"validateConsent",{enumerable:true,get:function(){return chunkB46SJB5V_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkB46SJB5V_js.b}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkL2BRFMVS_js.b}});Object.defineProperty(exports,"validateDsrSubmission",{enumerable:true,get:function(){return chunkL2BRFMVS_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}});
1
+ 'use strict';var chunkFMJ6ICLJ_js=require('./chunk-FMJ6ICLJ.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'),chunkB46SJB5V_js=require('./chunk-B46SJB5V.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkL2BRFMVS_js=require('./chunk-L2BRFMVS.js'),chunkNDKDKDDX_js=require('./chunk-NDKDKDDX.js'),chunkWKTKTLMF_js=require('./chunk-WKTKTLMF.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunkFMJ6ICLJ_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunkFMJ6ICLJ_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunkFMJ6ICLJ_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunkFMJ6ICLJ_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,"validateConsent",{enumerable:true,get:function(){return chunkB46SJB5V_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkB46SJB5V_js.b}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkL2BRFMVS_js.b}});Object.defineProperty(exports,"validateDsrSubmission",{enumerable:true,get:function(){return chunkL2BRFMVS_js.a}});Object.defineProperty(exports,"NDPRProvider",{enumerable:true,get:function(){return chunkNDKDKDDX_js.a}});Object.defineProperty(exports,"useNDPRConfig",{enumerable:true,get:function(){return chunkNDKDKDDX_js.b}});Object.defineProperty(exports,"useNDPRLocale",{enumerable:true,get:function(){return chunkNDKDKDDX_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunkWKTKTLMF_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunkWKTKTLMF_js.b}});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}});
package/dist/core.mjs CHANGED
@@ -1 +1 @@
1
- export{a as NDPRProvider,b as useNDPRConfig,c as useNDPRLocale}from'./chunk-EEQALYOY.mjs';export{c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-LQTARVPU.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-UKLU6BQF.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-HWHBINVN.mjs';export{a as getComplianceScore}from'./chunk-EFIBHKQE.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-Y3MKMAFQ.mjs';export{c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-RMQ7OLNY.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{a as validateConsent,b as validateConsentOptions}from'./chunk-PJNKQPQP.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequest,a as validateDsrSubmission}from'./chunk-RZ6GC6WN.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';import'./chunk-ZJYULEER.mjs';
1
+ export{c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-5EKQX6GM.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{a as validateConsent,b as validateConsentOptions}from'./chunk-PJNKQPQP.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequest,a as validateDsrSubmission}from'./chunk-RZ6GC6WN.mjs';export{a as NDPRProvider,b as useNDPRConfig,c as useNDPRLocale}from'./chunk-25TNTLHJ.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-RBMLGRDN.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';import'./chunk-ZJYULEER.mjs';
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var _={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))"},x={adequate:"Adequate",inadequate:"Inadequate",pending_review:"Pending Review",unknown:"Unknown"},B={active:"Active",suspended:"Suspended",terminated:"Terminated",pending_approval:"Pending Approval"},M={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"},w={low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--destructive"},L=new Set(["standard_clauses","binding_corporate_rules","ndpc_authorization"]),q=({transfers:c,title:T="Cross-Border Data Transfer Manager",description:y="Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VI (Sections 41-45).",className:S="",classNames:r,unstyled:a,showSummary:k=true,showRiskAlerts:R=true,onTransferClick:l})=>{let f=react.useMemo(()=>[...c].sort((e,o)=>o.updatedAt-e.updatedAt),[c]),n=react.useMemo(()=>{var b,h,C;let e=0,o=0,s=0,m=0,v=0;for(let p of c){let u=p.status==="active";u&&(e+=1),(p.status==="pending_approval"||(b=p.ndpcApproval)!=null&&b.required&&!((h=p.ndpcApproval)!=null&&h.approved))&&(o+=1),p.riskLevel==="high"&&u&&(s+=1),!p.tiaCompleted&&u&&(m+=1),((C=p.ndpcApproval)!=null&&C.required||L.has(p.transferMechanism))&&(v+=1);}return {totalActiveTransfers:e,pendingApproval:o,highRiskTransfers:s,missingTIA:m,ndpcApprovalRequired:v}},[c]),g=typeof l=="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 ${S}`,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:T}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:y})]}),k&&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))}),R&&(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"}),f.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:f.map(e=>{let o=g?()=>l(e):void 0;return jsxRuntime.jsxs("tr",{className:chunkAME4HJR4_js.a(`border-t border-gray-100 dark:border-gray-700 ${g?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,r==null?void 0:r.tableRow,a),role:g?"button":void 0,tabIndex:g?0:void 0,"aria-label":g?`View transfer to ${e.destinationCountry}`:void 0,onClick:o,onKeyDown:g?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:_[e.transferMechanism]}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:x[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 ${w[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 ${M[e.status]}`,r==null?void 0:r.statusBadge,a),children:B[e.status]})})]},e.id)})})]})})]})};exports.CrossBorderTransferManagerLite=q;
2
+ 'use strict';var chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var _={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))"},x={adequate:"Adequate",inadequate:"Inadequate",pending_review:"Pending Review",unknown:"Unknown"},B={active:"Active",suspended:"Suspended",terminated:"Terminated",pending_approval:"Pending Approval"},M={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"},w={low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--destructive"},L=new Set(["standard_clauses","binding_corporate_rules","ndpc_authorization"]),q=({transfers:c,title:T="Cross-Border Data Transfer Manager",description:y="Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VIII (Sections 41-43).",className:S="",classNames:r,unstyled:a,showSummary:k=true,showRiskAlerts:R=true,onTransferClick:l})=>{let f=react.useMemo(()=>[...c].sort((e,o)=>o.updatedAt-e.updatedAt),[c]),n=react.useMemo(()=>{var b,h,C;let e=0,o=0,s=0,m=0,v=0;for(let p of c){let u=p.status==="active";u&&(e+=1),(p.status==="pending_approval"||(b=p.ndpcApproval)!=null&&b.required&&!((h=p.ndpcApproval)!=null&&h.approved))&&(o+=1),p.riskLevel==="high"&&u&&(s+=1),!p.tiaCompleted&&u&&(m+=1),((C=p.ndpcApproval)!=null&&C.required||L.has(p.transferMechanism))&&(v+=1);}return {totalActiveTransfers:e,pendingApproval:o,highRiskTransfers:s,missingTIA:m,ndpcApprovalRequired:v}},[c]),g=typeof l=="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 ${S}`,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:T}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:y})]}),k&&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))}),R&&(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"}),f.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:f.map(e=>{let o=g?()=>l(e):void 0;return jsxRuntime.jsxs("tr",{className:chunkAME4HJR4_js.a(`border-t border-gray-100 dark:border-gray-700 ${g?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,r==null?void 0:r.tableRow,a),role:g?"button":void 0,tabIndex:g?0:void 0,"aria-label":g?`View transfer to ${e.destinationCountry}`:void 0,onClick:o,onKeyDown:g?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:_[e.transferMechanism]}),jsxRuntime.jsx("td",{className:"py-2 pr-4",children:x[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 ${w[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 ${M[e.status]}`,r==null?void 0:r.statusBadge,a),children:B[e.status]})})]},e.id)})})]})})]})};exports.CrossBorderTransferManagerLite=q;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {a}from'./chunk-SFGW37LE.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var _={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))"},x={adequate:"Adequate",inadequate:"Inadequate",pending_review:"Pending Review",unknown:"Unknown"},B={active:"Active",suspended:"Suspended",terminated:"Terminated",pending_approval:"Pending Approval"},M={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"},w={low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--destructive"},L=new Set(["standard_clauses","binding_corporate_rules","ndpc_authorization"]),q=({transfers:c,title:T="Cross-Border Data Transfer Manager",description:y="Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VI (Sections 41-45).",className:S="",classNames:r,unstyled:a$1,showSummary:k=true,showRiskAlerts:R=true,onTransferClick:l})=>{let f=useMemo(()=>[...c].sort((e,o)=>o.updatedAt-e.updatedAt),[c]),n=useMemo(()=>{var b,h,C;let e=0,o=0,s=0,m=0,v=0;for(let p of c){let u=p.status==="active";u&&(e+=1),(p.status==="pending_approval"||(b=p.ndpcApproval)!=null&&b.required&&!((h=p.ndpcApproval)!=null&&h.approved))&&(o+=1),p.riskLevel==="high"&&u&&(s+=1),!p.tiaCompleted&&u&&(m+=1),((C=p.ndpcApproval)!=null&&C.required||L.has(p.transferMechanism))&&(v+=1);}return {totalActiveTransfers:e,pendingApproval:o,highRiskTransfers:s,missingTIA:m,ndpcApprovalRequired:v}},[c]),g=typeof l=="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 ${S}`,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:T}),jsx("p",{className:"ndpr-card__subtitle",children:y})]}),k&&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))}),R&&(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"}),f.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:f.map(e=>{let o=g?()=>l(e):void 0;return jsxs("tr",{className:a(`border-t border-gray-100 dark:border-gray-700 ${g?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,r==null?void 0:r.tableRow,a$1),role:g?"button":void 0,tabIndex:g?0:void 0,"aria-label":g?`View transfer to ${e.destinationCountry}`:void 0,onClick:o,onKeyDown:g?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:_[e.transferMechanism]}),jsx("td",{className:"py-2 pr-4",children:x[e.adequacyStatus]}),jsx("td",{className:"py-2 pr-4",children:jsxs("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${w[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 ${M[e.status]}`,r==null?void 0:r.statusBadge,a$1),children:B[e.status]})})]},e.id)})})]})})]})};export{q as CrossBorderTransferManagerLite};
2
+ import {a}from'./chunk-SFGW37LE.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var _={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))"},x={adequate:"Adequate",inadequate:"Inadequate",pending_review:"Pending Review",unknown:"Unknown"},B={active:"Active",suspended:"Suspended",terminated:"Terminated",pending_approval:"Pending Approval"},M={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"},w={low:"ndpr-badge ndpr-badge--success",medium:"ndpr-badge ndpr-badge--warning",high:"ndpr-badge ndpr-badge--destructive"},L=new Set(["standard_clauses","binding_corporate_rules","ndpc_authorization"]),q=({transfers:c,title:T="Cross-Border Data Transfer Manager",description:y="Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VIII (Sections 41-43).",className:S="",classNames:r,unstyled:a$1,showSummary:k=true,showRiskAlerts:R=true,onTransferClick:l})=>{let f=useMemo(()=>[...c].sort((e,o)=>o.updatedAt-e.updatedAt),[c]),n=useMemo(()=>{var b,h,C;let e=0,o=0,s=0,m=0,v=0;for(let p of c){let u=p.status==="active";u&&(e+=1),(p.status==="pending_approval"||(b=p.ndpcApproval)!=null&&b.required&&!((h=p.ndpcApproval)!=null&&h.approved))&&(o+=1),p.riskLevel==="high"&&u&&(s+=1),!p.tiaCompleted&&u&&(m+=1),((C=p.ndpcApproval)!=null&&C.required||L.has(p.transferMechanism))&&(v+=1);}return {totalActiveTransfers:e,pendingApproval:o,highRiskTransfers:s,missingTIA:m,ndpcApprovalRequired:v}},[c]),g=typeof l=="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 ${S}`,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:T}),jsx("p",{className:"ndpr-card__subtitle",children:y})]}),k&&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))}),R&&(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"}),f.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:f.map(e=>{let o=g?()=>l(e):void 0;return jsxs("tr",{className:a(`border-t border-gray-100 dark:border-gray-700 ${g?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,r==null?void 0:r.tableRow,a$1),role:g?"button":void 0,tabIndex:g?0:void 0,"aria-label":g?`View transfer to ${e.destinationCountry}`:void 0,onClick:o,onKeyDown:g?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:_[e.transferMechanism]}),jsx("td",{className:"py-2 pr-4",children:x[e.adequacyStatus]}),jsx("td",{className:"py-2 pr-4",children:jsxs("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${w[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 ${M[e.status]}`,r==null?void 0:r.statusBadge,a$1),children:B[e.status]})})]},e.id)})})]})})]})};export{q as CrossBorderTransferManagerLite};
@@ -183,7 +183,7 @@ export declare interface CrossBorderTransfer {
183
183
  }
184
184
 
185
185
  /**
186
- * Cross-border data transfer management component. Implements NDPA Sections 41-45 requirements
186
+ * Cross-border data transfer management component. Implements NDPA Sections 41-43 requirements
187
187
  * for managing international data transfers, including adequacy decisions, standard contractual
188
188
  * clauses, and NDPC authorization.
189
189
  */
@@ -237,7 +237,7 @@ declare interface CrossBorderTransferManagerProps {
237
237
  title?: string;
238
238
  /**
239
239
  * Description text displayed on the manager
240
- * @default "Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VI (Sections 41-45)."
240
+ * @default "Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VIII (Sections 41-43)."
241
241
  */
242
242
  description?: string;
243
243
  /**
@@ -405,7 +405,7 @@ export declare interface TransferValidationResult {
405
405
  export declare function useCrossBorderCompound(): CrossBorderContextValue;
406
406
 
407
407
  /**
408
- * Hook for managing cross-border data transfers in compliance with NDPA Part VI (Sections 41-45)
408
+ * Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43)
409
409
  */
410
410
  export declare function useCrossBorderTransfer({ initialTransfers, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
411
411
 
@@ -183,7 +183,7 @@ export declare interface CrossBorderTransfer {
183
183
  }
184
184
 
185
185
  /**
186
- * Cross-border data transfer management component. Implements NDPA Sections 41-45 requirements
186
+ * Cross-border data transfer management component. Implements NDPA Sections 41-43 requirements
187
187
  * for managing international data transfers, including adequacy decisions, standard contractual
188
188
  * clauses, and NDPC authorization.
189
189
  */
@@ -237,7 +237,7 @@ declare interface CrossBorderTransferManagerProps {
237
237
  title?: string;
238
238
  /**
239
239
  * Description text displayed on the manager
240
- * @default "Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VI (Sections 41-45)."
240
+ * @default "Manage and document cross-border personal data transfers in compliance with NDPA 2023 Part VIII (Sections 41-43)."
241
241
  */
242
242
  description?: string;
243
243
  /**
@@ -405,7 +405,7 @@ export declare interface TransferValidationResult {
405
405
  export declare function useCrossBorderCompound(): CrossBorderContextValue;
406
406
 
407
407
  /**
408
- * Hook for managing cross-border data transfers in compliance with NDPA Part VI (Sections 41-45)
408
+ * Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43)
409
409
  */
410
410
  export declare function useCrossBorderTransfer({ initialTransfers, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
411
411
 
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkI3Y4LOSL_js=require('./chunk-I3Y4LOSL.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js');require('./chunk-AME4HJR4.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:chunkI3Y4LOSL_js.a};Object.defineProperty(exports,"CrossBorderTransferManager",{enumerable:true,get:function(){return chunkI3Y4LOSL_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 chunkSSH4U4TJ_js=require('./chunk-SSH4U4TJ.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js');require('./chunk-AME4HJR4.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:chunkSSH4U4TJ_js.a};Object.defineProperty(exports,"CrossBorderTransferManager",{enumerable:true,get:function(){return chunkSSH4U4TJ_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-GTYXVAJX.mjs';export{a as CrossBorderTransferManager}from'./chunk-GTYXVAJX.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-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-43OQNS2J.mjs';export{a as CrossBorderTransferManager}from'./chunk-43OQNS2J.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-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.d.mts CHANGED
@@ -43,7 +43,7 @@ export declare interface DPIAProviderProps {
43
43
  }
44
44
 
45
45
  /**
46
- * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
46
+ * Data Protection Impact Assessment types aligned with NDPA 2023 Section 28
47
47
  * A DPIA is required when processing is likely to result in high risk to data subjects
48
48
  */
49
49
  /**
@@ -206,7 +206,7 @@ declare interface DPIAQuestionnaireProps {
206
206
  }
207
207
 
208
208
  /**
209
- * DPIA report component. Implements NDPA Sections 38-39 requirements for documenting
209
+ * DPIA report component. Implements NDPA Section 28 requirements for documenting
210
210
  * and presenting Data Protection Impact Assessment findings, risks, and recommendations.
211
211
  */
212
212
  export declare const DPIAReport: React__default.FC<DPIAReportProps>;
@@ -322,7 +322,7 @@ export declare interface DPIAResult {
322
322
  version: string;
323
323
  /**
324
324
  * Whether prior consultation with NDPC is required
325
- * Per NDPA Section 39, consultation is required when DPIA indicates high residual risk
325
+ * Per NDPA Section 28(2), consultation is required when DPIA indicates high residual risk
326
326
  */
327
327
  ndpcConsultationRequired?: boolean;
328
328
  /** Date when NDPC consultation was initiated */
package/dist/dpia.d.ts CHANGED
@@ -43,7 +43,7 @@ export declare interface DPIAProviderProps {
43
43
  }
44
44
 
45
45
  /**
46
- * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
46
+ * Data Protection Impact Assessment types aligned with NDPA 2023 Section 28
47
47
  * A DPIA is required when processing is likely to result in high risk to data subjects
48
48
  */
49
49
  /**
@@ -206,7 +206,7 @@ declare interface DPIAQuestionnaireProps {
206
206
  }
207
207
 
208
208
  /**
209
- * DPIA report component. Implements NDPA Sections 38-39 requirements for documenting
209
+ * DPIA report component. Implements NDPA Section 28 requirements for documenting
210
210
  * and presenting Data Protection Impact Assessment findings, risks, and recommendations.
211
211
  */
212
212
  export declare const DPIAReport: React__default.FC<DPIAReportProps>;
@@ -322,7 +322,7 @@ export declare interface DPIAResult {
322
322
  version: string;
323
323
  /**
324
324
  * Whether prior consultation with NDPC is required
325
- * Per NDPA Section 39, consultation is required when DPIA indicates high residual risk
325
+ * Per NDPA Section 28(2), consultation is required when DPIA indicates high residual risk
326
326
  */
327
327
  ndpcConsultationRequired?: boolean;
328
328
  /** Date when NDPC consultation was initiated */
package/dist/dsr.d.mts CHANGED
@@ -242,7 +242,7 @@ declare interface DSRRequestFormProps {
242
242
  title?: string;
243
243
  /**
244
244
  * Description text displayed on the form
245
- * @default "Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part IV, Sections 29-36."
245
+ * @default "Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part VI, Sections 34-38."
246
246
  */
247
247
  description?: string;
248
248
  /**
package/dist/dsr.d.ts CHANGED
@@ -242,7 +242,7 @@ declare interface DSRRequestFormProps {
242
242
  title?: string;
243
243
  /**
244
244
  * Description text displayed on the form
245
- * @default "Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part IV, Sections 29-36."
245
+ * @default "Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part VI, Sections 34-38."
246
246
  */
247
247
  description?: string;
248
248
  /**
package/dist/dsr.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkCR2QZTGW_js=require('./chunk-CR2QZTGW.js'),chunkW47OSMT6_js=require('./chunk-W47OSMT6.js');require('./chunk-UXUMYP4L.js');var chunkHBLGN4SD_js=require('./chunk-HBLGN4SD.js'),chunkL2BRFMVS_js=require('./chunk-L2BRFMVS.js');require('./chunk-AME4HJR4.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var 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 m=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:i,children:n})=>{let f=chunkHBLGN4SD_js.a({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:i}),x=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},f),{requestTypes:e});return jsxRuntime.jsx(p.Provider,{value:x,children:n})};var C={Provider:m,Form:chunkW47OSMT6_js.a,Dashboard:chunkCR2QZTGW_js.a,Tracker:chunkCR2QZTGW_js.b};Object.defineProperty(exports,"DSRDashboard",{enumerable:true,get:function(){return chunkCR2QZTGW_js.a}});Object.defineProperty(exports,"DSRTracker",{enumerable:true,get:function(){return chunkCR2QZTGW_js.b}});Object.defineProperty(exports,"DSRRequestForm",{enumerable:true,get:function(){return chunkW47OSMT6_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkHBLGN4SD_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkL2BRFMVS_js.b}});Object.defineProperty(exports,"validateDsrSubmission",{enumerable:true,get:function(){return chunkL2BRFMVS_js.a}});exports.DSR=C;exports.DSRProvider=m;exports.useDSRCompound=P;
2
+ 'use strict';var chunkCR2QZTGW_js=require('./chunk-CR2QZTGW.js'),chunkTWJHEIQH_js=require('./chunk-TWJHEIQH.js');require('./chunk-UXUMYP4L.js');var chunkHBLGN4SD_js=require('./chunk-HBLGN4SD.js'),chunkL2BRFMVS_js=require('./chunk-L2BRFMVS.js');require('./chunk-NDKDKDDX.js'),require('./chunk-WKTKTLMF.js'),require('./chunk-AME4HJR4.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var 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 m=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:i,children:n})=>{let f=chunkHBLGN4SD_js.a({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:i}),x=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},f),{requestTypes:e});return jsxRuntime.jsx(p.Provider,{value:x,children:n})};var C={Provider:m,Form:chunkTWJHEIQH_js.a,Dashboard:chunkCR2QZTGW_js.a,Tracker:chunkCR2QZTGW_js.b};Object.defineProperty(exports,"DSRDashboard",{enumerable:true,get:function(){return chunkCR2QZTGW_js.a}});Object.defineProperty(exports,"DSRTracker",{enumerable:true,get:function(){return chunkCR2QZTGW_js.b}});Object.defineProperty(exports,"DSRRequestForm",{enumerable:true,get:function(){return chunkTWJHEIQH_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkHBLGN4SD_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkL2BRFMVS_js.b}});Object.defineProperty(exports,"validateDsrSubmission",{enumerable:true,get:function(){return chunkL2BRFMVS_js.a}});exports.DSR=C;exports.DSRProvider=m;exports.useDSRCompound=P;
package/dist/dsr.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {b,a}from'./chunk-66NQ5CVY.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-66NQ5CVY.mjs';import {a as a$1}from'./chunk-XJO4DH3L.mjs';export{a as DSRRequestForm}from'./chunk-XJO4DH3L.mjs';import'./chunk-EWVK45Z3.mjs';import {a as a$2}from'./chunk-MPBPAEZC.mjs';export{a as useDSR}from'./chunk-MPBPAEZC.mjs';export{b as formatDSRRequest,a as validateDsrSubmission}from'./chunk-RZ6GC6WN.mjs';import'./chunk-SFGW37LE.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 m=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:i,children:n})=>{let f=a$2({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:i}),x=b$1(a$3({},f),{requestTypes:e});return jsx(p.Provider,{value:x,children:n})};var C={Provider:m,Form:a$1,Dashboard:a,Tracker:b};export{C as DSR,m as DSRProvider,P as useDSRCompound};
2
+ import {b,a}from'./chunk-66NQ5CVY.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-66NQ5CVY.mjs';import {a as a$1}from'./chunk-IPWX5I5P.mjs';export{a as DSRRequestForm}from'./chunk-IPWX5I5P.mjs';import'./chunk-EWVK45Z3.mjs';import {a as a$2}from'./chunk-MPBPAEZC.mjs';export{a as useDSR}from'./chunk-MPBPAEZC.mjs';export{b as formatDSRRequest,a as validateDsrSubmission}from'./chunk-RZ6GC6WN.mjs';import'./chunk-25TNTLHJ.mjs';import'./chunk-RBMLGRDN.mjs';import'./chunk-SFGW37LE.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 m=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:i,children:n})=>{let f=a$2({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:d,onSubmit:u,onUpdate:i}),x=b$1(a$3({},f),{requestTypes:e});return jsx(p.Provider,{value:x,children:n})};var C={Provider:m,Form:a$1,Dashboard:a,Tracker:b};export{C as DSR,m as DSRProvider,P as useDSRCompound};
@@ -532,7 +532,7 @@ export declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
532
532
  export declare type DPIAAnswerValue = string | number | boolean | string[];
533
533
 
534
534
  /**
535
- * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
535
+ * Data Protection Impact Assessment types aligned with NDPA 2023 Section 28
536
536
  * A DPIA is required when processing is likely to result in high risk to data subjects
537
537
  */
538
538
  /**
@@ -611,7 +611,7 @@ export declare interface DPIAResult {
611
611
  version: string;
612
612
  /**
613
613
  * Whether prior consultation with NDPC is required
614
- * Per NDPA Section 39, consultation is required when DPIA indicates high residual risk
614
+ * Per NDPA Section 28(2), consultation is required when DPIA indicates high residual risk
615
615
  */
616
616
  ndpcConsultationRequired?: boolean;
617
617
  /** Date when NDPC consultation was initiated */
@@ -1761,7 +1761,7 @@ declare interface UseConsentReturn {
1761
1761
  }
1762
1762
 
1763
1763
  /**
1764
- * Hook for managing cross-border data transfers in compliance with NDPA Part VI (Sections 41-45)
1764
+ * Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43)
1765
1765
  */
1766
1766
  export declare function useCrossBorderTransfer({ initialTransfers, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
1767
1767
 
@@ -532,7 +532,7 @@ export declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
532
532
  export declare type DPIAAnswerValue = string | number | boolean | string[];
533
533
 
534
534
  /**
535
- * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
535
+ * Data Protection Impact Assessment types aligned with NDPA 2023 Section 28
536
536
  * A DPIA is required when processing is likely to result in high risk to data subjects
537
537
  */
538
538
  /**
@@ -611,7 +611,7 @@ export declare interface DPIAResult {
611
611
  version: string;
612
612
  /**
613
613
  * Whether prior consultation with NDPC is required
614
- * Per NDPA Section 39, consultation is required when DPIA indicates high residual risk
614
+ * Per NDPA Section 28(2), consultation is required when DPIA indicates high residual risk
615
615
  */
616
616
  ndpcConsultationRequired?: boolean;
617
617
  /** Date when NDPC consultation was initiated */
@@ -1761,7 +1761,7 @@ declare interface UseConsentReturn {
1761
1761
  }
1762
1762
 
1763
1763
  /**
1764
- * Hook for managing cross-border data transfers in compliance with NDPA Part VI (Sections 41-45)
1764
+ * Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43)
1765
1765
  */
1766
1766
  export declare function useCrossBorderTransfer({ initialTransfers, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
1767
1767