@tantainnovative/ndpr-toolkit 3.2.1 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -4
- package/dist/{DPIAQuestionnaire-BkejviPj.d.mts → DPIAQuestionnaire-VXBoWFMC.d.ts} +3 -3
- package/dist/{DPIAQuestionnaire-DdSqXG3x.d.ts → DPIAQuestionnaire-jkt1Veb6.d.mts} +3 -3
- package/dist/{DSRRequestForm-BY8PogCU.d.mts → DSRRequestForm-D8rPTNmU.d.ts} +2 -2
- package/dist/{DSRRequestForm-CHUg9cZh.d.ts → DSRRequestForm-DRouEr9j.d.mts} +2 -2
- package/dist/{DSRTracker-Dr_aT0pg.d.ts → DSRTracker-Bl__d4df.d.ts} +1 -1
- package/dist/{DSRTracker-C6u_jAaK.d.mts → DSRTracker-CSVDfgQQ.d.mts} +1 -1
- package/dist/{StepIndicator-D9ZATz_O.d.ts → StepIndicator-CgrlokSV.d.ts} +1 -1
- package/dist/{StepIndicator-D-nwRTyo.d.mts → StepIndicator-W8S_QjgO.d.mts} +1 -1
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-25OOUES4.js +2 -0
- package/dist/chunk-2AW7KAZO.mjs +2 -0
- package/dist/chunk-4JKTIR33.mjs +2 -0
- package/dist/chunk-5BUS6AI7.js +2 -0
- package/dist/chunk-5ECDPRSZ.js +7 -0
- package/dist/chunk-5X32J5IA.mjs +2 -0
- package/dist/chunk-6FGCGLH5.mjs +2 -0
- package/dist/chunk-6YN73KR7.mjs +2 -0
- package/dist/chunk-75TJPK2N.mjs +2 -0
- package/dist/{chunk-NXQMU36Z.mjs → chunk-7D2OIPHH.mjs} +2 -2
- package/dist/chunk-C4YM4UMI.js +2 -0
- package/dist/{chunk-EH2I4L7M.mjs → chunk-CDZDT2OS.mjs} +14 -10
- package/dist/chunk-CYU6YUJQ.mjs +81 -0
- package/dist/chunk-DCJK5OZT.mjs +2 -0
- package/dist/chunk-EKHBORAH.js +81 -0
- package/dist/chunk-ENIMJ6SQ.js +2 -0
- package/dist/chunk-FLKJSGR7.mjs +94 -0
- package/dist/chunk-FWLPJ5YI.js +94 -0
- package/dist/chunk-GMLCWGNJ.js +7 -0
- package/dist/chunk-GXLSOZCH.mjs +2 -0
- package/dist/{chunk-NRQELKAE.js → chunk-JKKRPS4P.js} +2 -2
- package/dist/chunk-LETEUS5X.mjs +2 -0
- package/dist/chunk-M2TPT5GB.js +2 -0
- package/dist/chunk-MCWV7S2G.js +2 -0
- package/dist/chunk-NBSVFQ5G.js +2 -0
- package/dist/chunk-OPYQIJKY.js +2 -0
- package/dist/chunk-OYR3L4XS.mjs +7 -0
- package/dist/chunk-QF6XNKU6.mjs +2 -0
- package/dist/{chunk-256APOQM.js → chunk-QJ3JNHO7.js} +2 -2
- package/dist/{chunk-Q7VHB64E.mjs → chunk-QNCGRCAX.mjs} +2 -2
- package/dist/chunk-TI2M7H6R.mjs +7 -0
- package/dist/{chunk-KVOGOLIR.js → chunk-TXXWCB5O.js} +14 -10
- package/dist/{chunk-44W4H2EY.js → chunk-UGY5ZYUG.js} +2 -2
- package/dist/chunk-UO6QPJLH.js +2 -0
- package/dist/chunk-UX6ZZNEM.mjs +3 -0
- package/dist/chunk-XFUEZ3MP.mjs +2 -0
- package/dist/chunk-XHSHPB74.js +2 -0
- package/dist/chunk-XSEZDQLB.js +2 -0
- package/dist/chunk-YCX6BFOQ.js +2 -0
- package/dist/chunk-YURSF2YO.mjs +2 -0
- package/dist/chunk-YZXUAIYN.js +3 -0
- package/dist/chunk-Z6IIMLZU.mjs +2 -0
- package/dist/chunk-ZT7KNFAU.mjs +2 -0
- package/dist/chunk-ZYLDLGFL.js +2 -0
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +25 -9
- package/dist/core.d.ts +25 -9
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.d.mts +70 -3
- package/dist/cross-border.d.ts +70 -3
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/{dpia-B0Pok5us.d.ts → dpia-D82hUrJe.d.ts} +1 -1
- package/dist/{dpia-CUfOmzvX.d.mts → dpia-DQDFw2_l.d.mts} +1 -1
- package/dist/{dpia-5OQVA1R_.d.mts → dpia-c9GiiOq0.d.mts} +2 -2
- package/dist/{dpia-5OQVA1R_.d.ts → dpia-c9GiiOq0.d.ts} +2 -2
- package/dist/dpia.d.mts +9 -9
- package/dist/dpia.d.ts +9 -9
- package/dist/dpia.js +1 -1
- package/dist/dpia.mjs +1 -1
- package/dist/{dsr-D_eTNc4S.d.mts → dsr-CIx5sd7e.d.ts} +2 -2
- package/dist/{dsr-pNtVb1BK.d.ts → dsr-XZ_HqTlA.d.mts} +2 -2
- package/dist/{dsr-Cm9lzWG7.d.mts → dsr-yKbqX531.d.mts} +1 -1
- package/dist/{dsr-Cm9lzWG7.d.ts → dsr-yKbqX531.d.ts} +1 -1
- package/dist/dsr.d.mts +9 -9
- package/dist/dsr.d.ts +9 -9
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +8 -8
- package/dist/hooks.d.ts +8 -8
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lawful-basis.js +1 -1
- package/dist/lawful-basis.mjs +1 -1
- package/dist/{policy-engine-DSQpT55_.d.ts → policy-engine-C6nC2t3a.d.ts} +1 -1
- package/dist/{policy-engine-C-tShzZH.d.mts → policy-engine-DefZcX3R.d.mts} +1 -1
- package/dist/{policy-sections-CfNVBLCh.d.mts → policy-sections-Bylm31kZ.d.mts} +1 -1
- package/dist/{policy-sections-DqH0iZRf.d.ts → policy-sections-DFDPVCCg.d.ts} +1 -1
- package/dist/policy.d.mts +6 -6
- package/dist/policy.d.ts +6 -6
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets.d.mts +5 -5
- package/dist/presets.d.ts +5 -5
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -1
- package/dist/{sanitize-9mOO_cJW.d.mts → sanitize-B0AzEm1D.d.mts} +14 -1
- package/dist/{sanitize-9mOO_cJW.d.ts → sanitize-B0AzEm1D.d.ts} +14 -1
- package/dist/{useAdaptivePolicyWizard-N4eUM4Tj.d.mts → useAdaptivePolicyWizard-A1PyOy6P.d.mts} +1 -1
- package/dist/{useAdaptivePolicyWizard-B9Op2gYM.d.ts → useAdaptivePolicyWizard-LVIKhAxw.d.ts} +1 -1
- package/dist/{useCrossBorderTransfer-BGNZt2lk.d.mts → useCrossBorderTransfer-DixjLjN1.d.mts} +1 -1
- package/dist/{useCrossBorderTransfer-COqjgjsu.d.ts → useCrossBorderTransfer-DvSq06lv.d.ts} +1 -1
- package/dist/{useDPIA-DzWye8JB.d.mts → useDPIA-B6180UQn.d.mts} +9 -5
- package/dist/{useDPIA-Dl16Te3r.d.ts → useDPIA-CTqbNbww.d.ts} +9 -5
- package/dist/{useDSR-C1LksCfP.d.mts → useDSR-WvHk8_iu.d.mts} +2 -2
- package/dist/{useDSR-DZel52O1.d.ts → useDSR-wH4H6hSM.d.ts} +2 -2
- package/dist/{useDefaultPrivacyPolicy-C-mG-A5S.d.ts → useDefaultPrivacyPolicy-DvCbeEl1.d.ts} +5 -1
- package/dist/{useDefaultPrivacyPolicy-BsYttRey.d.mts → useDefaultPrivacyPolicy-ySWU7nc-.d.mts} +5 -1
- package/package.json +7 -5
- package/dist/chunk-2FWCVWKN.js +0 -2
- package/dist/chunk-3DJGO6WG.js +0 -2
- package/dist/chunk-3UWT64FI.mjs +0 -2
- package/dist/chunk-4JUDKBA2.mjs +0 -7
- package/dist/chunk-4XCL62MJ.mjs +0 -2
- package/dist/chunk-555WWZ3W.js +0 -2
- package/dist/chunk-6BXUVS6E.js +0 -81
- package/dist/chunk-6RQGQZT2.js +0 -2
- package/dist/chunk-CL53OI3I.js +0 -7
- package/dist/chunk-E63VPR7U.js +0 -2
- package/dist/chunk-ELKEZEV5.mjs +0 -2
- package/dist/chunk-ER7X6E36.js +0 -2
- package/dist/chunk-FDDI426Y.mjs +0 -2
- package/dist/chunk-FOXZRRMW.mjs +0 -2
- package/dist/chunk-FY5G6DGZ.js +0 -7
- package/dist/chunk-GOD4LA2J.mjs +0 -2
- package/dist/chunk-I23WPZNQ.mjs +0 -94
- package/dist/chunk-IQF726GS.js +0 -2
- package/dist/chunk-IR7VCBWV.mjs +0 -2
- package/dist/chunk-K45S6YQV.mjs +0 -2
- package/dist/chunk-KBAFOVE3.js +0 -2
- package/dist/chunk-KBP26GLC.js +0 -2
- package/dist/chunk-MDWG2KDA.mjs +0 -2
- package/dist/chunk-NN233SGA.mjs +0 -3
- package/dist/chunk-NPI5T6NH.mjs +0 -7
- package/dist/chunk-NUDVUAD4.mjs +0 -81
- package/dist/chunk-PM7O5IGE.mjs +0 -2
- package/dist/chunk-QH6YUVJS.js +0 -2
- package/dist/chunk-QKK5S54L.mjs +0 -2
- package/dist/chunk-QY7PD5XB.js +0 -94
- package/dist/chunk-TVW6KBVV.mjs +0 -2
- package/dist/chunk-UDNRAQLE.js +0 -3
- package/dist/chunk-UNKXYVXY.js +0 -2
- package/dist/chunk-V37BM2LF.js +0 -2
- package/dist/chunk-V3MXWGXU.mjs +0 -2
- package/dist/chunk-VK27WVV3.js +0 -2
- package/dist/chunk-XQ4M5FHC.mjs +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var n={AT:{country:"Austria",isoCode:"AT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},BE:{country:"Belgium",isoCode:"BE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},BG:{country:"Bulgaria",isoCode:"BG",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},HR:{country:"Croatia",isoCode:"HR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},CY:{country:"Cyprus",isoCode:"CY",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},CZ:{country:"Czech Republic",isoCode:"CZ",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},DK:{country:"Denmark",isoCode:"DK",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},EE:{country:"Estonia",isoCode:"EE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},FI:{country:"Finland",isoCode:"FI",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},FR:{country:"France",isoCode:"FR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},DE:{country:"Germany",isoCode:"DE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR with additional national provisions (BDSG).",lastUpdated:"2024-01-01"},GR:{country:"Greece",isoCode:"GR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},HU:{country:"Hungary",isoCode:"HU",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},IE:{country:"Ireland",isoCode:"IE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR. Hosts many multinational data processors.",lastUpdated:"2024-01-01"},IT:{country:"Italy",isoCode:"IT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},LV:{country:"Latvia",isoCode:"LV",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},LT:{country:"Lithuania",isoCode:"LT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},LU:{country:"Luxembourg",isoCode:"LU",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},MT:{country:"Malta",isoCode:"MT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},NL:{country:"Netherlands",isoCode:"NL",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},PL:{country:"Poland",isoCode:"PL",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},PT:{country:"Portugal",isoCode:"PT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},RO:{country:"Romania",isoCode:"RO",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},SK:{country:"Slovakia",isoCode:"SK",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},SI:{country:"Slovenia",isoCode:"SI",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},ES:{country:"Spain",isoCode:"ES",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},SE:{country:"Sweden",isoCode:"SE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},IS:{country:"Iceland",isoCode:"IS",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EEA member; GDPR applies through EEA Agreement.",lastUpdated:"2024-01-01"},LI:{country:"Liechtenstein",isoCode:"LI",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EEA member; GDPR applies through EEA Agreement.",lastUpdated:"2024-01-01"},NO:{country:"Norway",isoCode:"NO",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EEA member; GDPR applies through EEA Agreement.",lastUpdated:"2024-01-01"},GB:{country:"United Kingdom",isoCode:"GB",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Protected by UK GDPR and the Data Protection Act 2018. EU adequacy decision granted post-Brexit.",lastUpdated:"2024-01-01"},US:{country:"United States",isoCode:"US",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"No comprehensive federal data protection law. Adequacy depends on transfer mechanism used (e.g. EU-US Data Privacy Framework, standard contractual clauses). Sector-specific laws exist (HIPAA, CCPA, etc.).",lastUpdated:"2024-01-01"},CA:{country:"Canada",isoCode:"CA",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Protected by PIPEDA (Personal Information Protection and Electronic Documents Act) and provincial privacy laws. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},ZA:{country:"South Africa",isoCode:"ZA",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Protected by POPIA (Protection of Personal Information Act, 2013). Comprehensive data protection framework with an independent Information Regulator.",lastUpdated:"2024-01-01"},GH:{country:"Ghana",isoCode:"GH",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Data Protection Act 2012 (Act 843) establishes a data protection framework. Enforcement capacity is still developing.",lastUpdated:"2024-01-01"},KE:{country:"Kenya",isoCode:"KE",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Data Protection Act 2019 provides a modern framework. The Office of the Data Protection Commissioner is operational but still maturing.",lastUpdated:"2024-01-01"},RW:{country:"Rwanda",isoCode:"RW",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Law No. 058/2021 on the Protection of Personal Data and Privacy. Framework is relatively new.",lastUpdated:"2024-01-01"},EG:{country:"Egypt",isoCode:"EG",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Personal Data Protection Law No. 151 of 2020. Implementation and enforcement are still in early stages.",lastUpdated:"2024-01-01"},TZ:{country:"Tanzania",isoCode:"TZ",adequacyStatus:"not_adequate",recognizedBy:"NDPC",notes:"No comprehensive data protection legislation in force.",lastUpdated:"2024-01-01"},UG:{country:"Uganda",isoCode:"UG",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Data Protection and Privacy Act 2019 provides a framework, but enforcement capacity is limited.",lastUpdated:"2024-01-01"},SN:{country:"Senegal",isoCode:"SN",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Law No. 2008-12 on the Protection of Personal Data. One of the earlier African data protection laws.",lastUpdated:"2024-01-01"},MA:{country:"Morocco",isoCode:"MA",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Law No. 09-08 on the Protection of Individuals with Regard to the Processing of Personal Data (2009). Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},MU:{country:"Mauritius",isoCode:"MU",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Data Protection Act 2017 provides a comprehensive framework modelled on international standards.",lastUpdated:"2024-01-01"},CN:{country:"China",isoCode:"CN",adequacyStatus:"not_adequate",recognizedBy:"NDPC",notes:"Personal Information Protection Law (PIPL) enacted in 2021 but government access provisions and limited independent oversight raise concerns. Transfers require security assessments or standard contracts.",lastUpdated:"2024-01-01"},IN:{country:"India",isoCode:"IN",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Digital Personal Data Protection Act 2023 enacted. Implementation rules and enforcement mechanisms are still being finalized.",lastUpdated:"2024-01-01"},SG:{country:"Singapore",isoCode:"SG",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Personal Data Protection Act 2012 (PDPA) provides a robust framework. Strong enforcement by the PDPC.",lastUpdated:"2024-01-01"},JP:{country:"Japan",isoCode:"JP",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Act on the Protection of Personal Information (APPI). Recognized as adequate by the EU under mutual adequacy arrangement.",lastUpdated:"2024-01-01"},KR:{country:"South Korea",isoCode:"KR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Personal Information Protection Act (PIPA). Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},AE:{country:"United Arab Emirates",isoCode:"AE",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Federal Decree-Law No. 45 of 2021 on Personal Data Protection. DIFC and ADGM free zones have their own data protection regulations with stronger frameworks.",lastUpdated:"2024-01-01"},SA:{country:"Saudi Arabia",isoCode:"SA",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Personal Data Protection Law (Royal Decree M/19, 2021). Framework is new and enforcement is still developing.",lastUpdated:"2024-01-01"},IL:{country:"Israel",isoCode:"IL",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Protection of Privacy Law 5741-1981 and regulations. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},BR:{country:"Brazil",isoCode:"BR",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Lei Geral de Protecao de Dados (LGPD, 2020) provides a comprehensive framework. The ANPD is actively enforcing.",lastUpdated:"2024-01-01"},AR:{country:"Argentina",isoCode:"AR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Personal Data Protection Act No. 25,326. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},AU:{country:"Australia",isoCode:"AU",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Privacy Act 1988 provides protection but does not fully align with GDPR-level standards. Reform efforts are ongoing.",lastUpdated:"2024-01-01"},NZ:{country:"New Zealand",isoCode:"NZ",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Privacy Act 2020 provides a comprehensive framework. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},CH:{country:"Switzerland",isoCode:"CH",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Federal Act on Data Protection (FADP, revised 2023). Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},RU:{country:"Russia",isoCode:"RU",adequacyStatus:"not_adequate",recognizedBy:"NDPC",notes:"Federal Law on Personal Data (No. 152-FZ). Data localization requirements and government access concerns.",lastUpdated:"2024-01-01"}};function u(e){let t=e.trim().toUpperCase();if(n[t])return n[t];let a=e.trim().toLowerCase();for(let o of Object.values(n))if(o.country.toLowerCase()===a)return o}function m(){return Object.values(n).filter(e=>e.adequacyStatus==="adequate")}function q(e){let t=u(e);return t?t.adequacyStatus!=="adequate":true}function p(e){return e==="standard_clauses"||e==="binding_corporate_rules"||e==="ndpc_authorization"}function C(e){return {adequacy_decision:"Adequacy Decision (NDPA Section 41) \u2014 Transfer to a country or territory that the NDPC has determined provides an adequate level of data protection.",standard_clauses:"Standard Contractual Clauses (NDPA Section 42) \u2014 Transfer based on standard contractual clauses approved by the NDPC between the controller/processor and the recipient.",binding_corporate_rules:"Binding Corporate Rules (NDPA Section 43) \u2014 Transfer within a group of undertakings based on binding corporate rules approved by the NDPC.",ndpc_authorization:"NDPC Authorization (NDPA Section 44) \u2014 Transfer authorized by the Nigeria Data Protection Commission under specific conditions.",explicit_consent:"Explicit Consent (NDPA Section 45(a)) \u2014 Transfer based on the explicit and informed consent of the data subject after being informed of the risks.",contract_performance:"Contract Performance (NDPA Section 45(b)) \u2014 Transfer necessary for the performance of a contract between the data subject and the controller.",public_interest:"Public Interest (NDPA Section 45(c)) \u2014 Transfer necessary for important reasons of public interest.",legal_claims:"Legal Claims (NDPA Section 45(d)) \u2014 Transfer necessary for the establishment, exercise, or defense of legal claims.",vital_interests:"Vital Interests (NDPA Section 45(e)) \u2014 Transfer necessary to protect the vital interests of the data subject or other persons."}[e]}function P(e){var o,r;let t=[],a=[];return e.id||t.push("Transfer ID is required."),(!e.destinationCountry||e.destinationCountry.trim()==="")&&t.push("Destination country is required."),(!e.recipientOrganization||e.recipientOrganization.trim()==="")&&t.push("Recipient organization is required."),(!((o=e.recipientContact)!=null&&o.name)||e.recipientContact.name.trim()==="")&&t.push("Recipient contact name is required."),(!((r=e.recipientContact)!=null&&r.email)||e.recipientContact.email.trim()==="")&&t.push("Recipient contact email is required."),(!e.purpose||e.purpose.trim()==="")&&t.push("Purpose of the transfer is required."),e.transferMechanism||t.push("Transfer mechanism is required."),(!e.dataCategories||e.dataCategories.length===0)&&t.push("At least one data category must be specified."),(!e.riskAssessment||e.riskAssessment.trim()==="")&&t.push("Risk assessment summary is required."),(!e.safeguards||e.safeguards.length===0)&&t.push("At least one safeguard must be documented for the transfer."),p(e.transferMechanism)&&(e.ndpcApproval?(e.ndpcApproval.required||a.push("NDPC approval is marked as not required, but the selected transfer mechanism requires NDPC approval."),e.ndpcApproval.required&&!e.ndpcApproval.applied&&t.push("NDPC approval is required but an application has not been submitted."),e.ndpcApproval.applied&&!e.ndpcApproval.approved&&e.status==="active"&&t.push('Transfer is marked as active but NDPC approval has not been granted. Status should be "pending_approval".')):t.push(`NDPC approval documentation is required for transfers using ${l(e.transferMechanism)}.`)),e.tiaCompleted||a.push("A Transfer Impact Assessment (TIA) has not been completed for this transfer."),e.adequacyStatus==="inadequate"&&e.transferMechanism==="adequacy_decision"&&t.push("Cannot rely on adequacy decision (Section 41) when the destination country is marked as inadequate."),e.endDate&&e.startDate>e.endDate&&t.push("Start date must be before end date."),e.includesSensitiveData&&e.riskLevel!=="high"&&a.push("Transfer includes sensitive personal data but the risk level is not set to high. Consider reviewing the risk assessment."),e.reviewDate||a.push("No review date has been set for this transfer. Periodic reviews are recommended."),{isValid:t.length===0,errors:t,warnings:a}}function f(e){var d,c;let t=[],a=[],o=0,y={adequate:0,pending_review:2,unknown:3,inadequate:4}[e.adequacyStatus];o+=y,e.adequacyStatus==="inadequate"?(t.push("Destination country does not have an adequate level of data protection."),a.push("Implement supplementary technical and organizational measures.")):e.adequacyStatus==="unknown"?(t.push("Data protection adequacy of the destination country has not been assessed."),a.push("Conduct an adequacy assessment of the destination country.")):e.adequacyStatus==="pending_review"&&(t.push("Destination country adequacy is currently under review."),a.push("Monitor the adequacy review outcome and plan for contingencies."));let i={adequacy_decision:0,standard_clauses:1,binding_corporate_rules:1,ndpc_authorization:1,contract_performance:2,explicit_consent:2,legal_claims:2,public_interest:2,vital_interests:3}[e.transferMechanism];o+=i,i>=2&&(t.push(`Transfer relies on a derogation mechanism (${l(e.transferMechanism)}), which provides fewer structural safeguards.`),a.push("Consider whether a stronger transfer mechanism (adequacy decision, standard clauses, or BCRs) could be used instead.")),e.includesSensitiveData&&(o+=3,t.push("Transfer includes sensitive personal data, increasing the potential impact of unauthorized access."),a.push("Ensure encryption in transit and at rest, and apply strict access controls.")),e.estimatedDataSubjects&&e.estimatedDataSubjects>1e4?(o+=2,t.push("Large number of data subjects involved increases the scope of potential harm."),a.push("Consider data minimization strategies and ensure robust incident response procedures.")):e.estimatedDataSubjects&&e.estimatedDataSubjects>1e3&&(o+=1,t.push("Moderate number of data subjects involved.")),e.tiaCompleted||(o+=2,t.push("Transfer Impact Assessment has not been completed."),a.push("Complete a Transfer Impact Assessment before proceeding with the transfer.")),p(e.transferMechanism)&&((d=e.ndpcApproval)!=null&&d.approved||(o+=2,t.push("NDPC approval is required but has not been granted."),a.push("Obtain NDPC approval before activating the transfer."))),(((c=e.safeguards)==null?void 0:c.length)||0)<3&&(o+=1,t.push("Limited number of safeguards documented."),a.push("Document additional technical, organizational, and contractual safeguards.")),e.frequency==="continuous"&&(o+=1,t.push("Continuous data transfer increases exposure window."),a.push("Implement real-time monitoring and anomaly detection for the transfer."));let s;return o<=4?s="low":o<=9?s="medium":s="high",{riskLevel:s,riskScore:o,factors:t,recommendations:a}}function l(e){return {adequacy_decision:"Adequacy Decision",standard_clauses:"Standard Contractual Clauses",binding_corporate_rules:"Binding Corporate Rules",ndpc_authorization:"NDPC Authorization",explicit_consent:"Explicit Consent",contract_performance:"Contract Performance",public_interest:"Public Interest",legal_claims:"Legal Claims",vital_interests:"Vital Interests"}[e]}export{n as a,u as b,m as c,q as d,p as e,C as f,P as g,f as h};//# sourceMappingURL=chunk-75TJPK2N.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-75TJPK2N.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function o(i){var a,d;let t=[];return i.id||t.push("Request ID is required"),i.type||t.push("Request type is required"),i.status||t.push("Request status is required"),i.createdAt||t.push("Creation timestamp is required"),(a=i.subject)!=null&&a.name||t.push("Data subject name is required"),(d=i.subject)!=null&&d.email||t.push("Data subject email is required"),{formattedRequest:{requestId:i.id,requestType:i.type,status:i.status,createdDate:new Date(i.createdAt).toISOString(),lastUpdated:i.updatedAt?new Date(i.updatedAt).toISOString():void 0,dueDate:i.dueDate?new Date(i.dueDate).toISOString():void 0,dataSubject:i.subject?{name:i.subject.name,email:i.subject.email,phone:i.subject.phone||"Not provided",identifier:{type:i.subject.identifierType||"Not specified",value:i.subject.identifierValue||"Not provided"}}:void 0,additionalInformation:i.additionalInfo||{},verificationStatus:i.verification?`${i.verification.verified?"Verified":"Not verified"}${i.verification.method?` via ${i.verification.method}`:""}`:"Pending verification",attachments:i.attachments?i.attachments.map(e=>({name:e.name,type:e.type,addedOn:new Date(e.addedAt).toISOString()})):[]},isValid:t.length===0,validationErrors:t}}export{o as a};//# sourceMappingURL=chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
function o(i){var a,d;let t=[];return i.id||t.push("Request ID is required"),i.type||t.push("Request type is required"),i.status||t.push("Request status is required"),i.createdAt||t.push("Creation timestamp is required"),(a=i.subject)!=null&&a.name||t.push("Data subject name is required"),(d=i.subject)!=null&&d.email||t.push("Data subject email is required"),{formattedRequest:{requestId:i.id,requestType:i.type,status:i.status,createdDate:new Date(i.createdAt).toISOString(),lastUpdated:i.updatedAt?new Date(i.updatedAt).toISOString():void 0,dueDate:i.dueDate?new Date(i.dueDate).toISOString():void 0,dataSubject:i.subject?{name:i.subject.name,email:i.subject.email,phone:i.subject.phone||"Not provided",identifier:{type:i.subject.identifierType||"Not specified",value:i.subject.identifierValue||"Not provided"}}:void 0,additionalInformation:i.additionalInfo||{},verificationStatus:i.verification?`${i.verification.verified?"Verified":"Not verified"}${i.verification.method?` via ${i.verification.method}`:""}`:"Pending verification",attachments:i.attachments?i.attachments.map(e=>({name:e.name,type:e.type,addedOn:new Date(e.addedAt).toISOString()})):[]},isValid:t.length===0,validationErrors:t}}export{o as a};//# sourceMappingURL=chunk-7D2OIPHH.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-7D2OIPHH.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var n={AT:{country:"Austria",isoCode:"AT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},BE:{country:"Belgium",isoCode:"BE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},BG:{country:"Bulgaria",isoCode:"BG",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},HR:{country:"Croatia",isoCode:"HR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},CY:{country:"Cyprus",isoCode:"CY",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},CZ:{country:"Czech Republic",isoCode:"CZ",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},DK:{country:"Denmark",isoCode:"DK",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},EE:{country:"Estonia",isoCode:"EE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},FI:{country:"Finland",isoCode:"FI",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},FR:{country:"France",isoCode:"FR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},DE:{country:"Germany",isoCode:"DE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR with additional national provisions (BDSG).",lastUpdated:"2024-01-01"},GR:{country:"Greece",isoCode:"GR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},HU:{country:"Hungary",isoCode:"HU",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},IE:{country:"Ireland",isoCode:"IE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR. Hosts many multinational data processors.",lastUpdated:"2024-01-01"},IT:{country:"Italy",isoCode:"IT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},LV:{country:"Latvia",isoCode:"LV",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},LT:{country:"Lithuania",isoCode:"LT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},LU:{country:"Luxembourg",isoCode:"LU",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},MT:{country:"Malta",isoCode:"MT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},NL:{country:"Netherlands",isoCode:"NL",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},PL:{country:"Poland",isoCode:"PL",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},PT:{country:"Portugal",isoCode:"PT",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},RO:{country:"Romania",isoCode:"RO",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},SK:{country:"Slovakia",isoCode:"SK",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},SI:{country:"Slovenia",isoCode:"SI",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},ES:{country:"Spain",isoCode:"ES",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},SE:{country:"Sweden",isoCode:"SE",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EU member state; protected by GDPR.",lastUpdated:"2024-01-01"},IS:{country:"Iceland",isoCode:"IS",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EEA member; GDPR applies through EEA Agreement.",lastUpdated:"2024-01-01"},LI:{country:"Liechtenstein",isoCode:"LI",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EEA member; GDPR applies through EEA Agreement.",lastUpdated:"2024-01-01"},NO:{country:"Norway",isoCode:"NO",adequacyStatus:"adequate",recognizedBy:"EU",notes:"EEA member; GDPR applies through EEA Agreement.",lastUpdated:"2024-01-01"},GB:{country:"United Kingdom",isoCode:"GB",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Protected by UK GDPR and the Data Protection Act 2018. EU adequacy decision granted post-Brexit.",lastUpdated:"2024-01-01"},US:{country:"United States",isoCode:"US",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"No comprehensive federal data protection law. Adequacy depends on transfer mechanism used (e.g. EU-US Data Privacy Framework, standard contractual clauses). Sector-specific laws exist (HIPAA, CCPA, etc.).",lastUpdated:"2024-01-01"},CA:{country:"Canada",isoCode:"CA",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Protected by PIPEDA (Personal Information Protection and Electronic Documents Act) and provincial privacy laws. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},ZA:{country:"South Africa",isoCode:"ZA",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Protected by POPIA (Protection of Personal Information Act, 2013). Comprehensive data protection framework with an independent Information Regulator.",lastUpdated:"2024-01-01"},GH:{country:"Ghana",isoCode:"GH",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Data Protection Act 2012 (Act 843) establishes a data protection framework. Enforcement capacity is still developing.",lastUpdated:"2024-01-01"},KE:{country:"Kenya",isoCode:"KE",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Data Protection Act 2019 provides a modern framework. The Office of the Data Protection Commissioner is operational but still maturing.",lastUpdated:"2024-01-01"},RW:{country:"Rwanda",isoCode:"RW",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Law No. 058/2021 on the Protection of Personal Data and Privacy. Framework is relatively new.",lastUpdated:"2024-01-01"},EG:{country:"Egypt",isoCode:"EG",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Personal Data Protection Law No. 151 of 2020. Implementation and enforcement are still in early stages.",lastUpdated:"2024-01-01"},TZ:{country:"Tanzania",isoCode:"TZ",adequacyStatus:"not_adequate",recognizedBy:"NDPC",notes:"No comprehensive data protection legislation in force.",lastUpdated:"2024-01-01"},UG:{country:"Uganda",isoCode:"UG",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Data Protection and Privacy Act 2019 provides a framework, but enforcement capacity is limited.",lastUpdated:"2024-01-01"},SN:{country:"Senegal",isoCode:"SN",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Law No. 2008-12 on the Protection of Personal Data. One of the earlier African data protection laws.",lastUpdated:"2024-01-01"},MA:{country:"Morocco",isoCode:"MA",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Law No. 09-08 on the Protection of Individuals with Regard to the Processing of Personal Data (2009). Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},MU:{country:"Mauritius",isoCode:"MU",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Data Protection Act 2017 provides a comprehensive framework modelled on international standards.",lastUpdated:"2024-01-01"},CN:{country:"China",isoCode:"CN",adequacyStatus:"not_adequate",recognizedBy:"NDPC",notes:"Personal Information Protection Law (PIPL) enacted in 2021 but government access provisions and limited independent oversight raise concerns. Transfers require security assessments or standard contracts.",lastUpdated:"2024-01-01"},IN:{country:"India",isoCode:"IN",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Digital Personal Data Protection Act 2023 enacted. Implementation rules and enforcement mechanisms are still being finalized.",lastUpdated:"2024-01-01"},SG:{country:"Singapore",isoCode:"SG",adequacyStatus:"adequate",recognizedBy:"NDPC",notes:"Personal Data Protection Act 2012 (PDPA) provides a robust framework. Strong enforcement by the PDPC.",lastUpdated:"2024-01-01"},JP:{country:"Japan",isoCode:"JP",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Act on the Protection of Personal Information (APPI). Recognized as adequate by the EU under mutual adequacy arrangement.",lastUpdated:"2024-01-01"},KR:{country:"South Korea",isoCode:"KR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Personal Information Protection Act (PIPA). Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},AE:{country:"United Arab Emirates",isoCode:"AE",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Federal Decree-Law No. 45 of 2021 on Personal Data Protection. DIFC and ADGM free zones have their own data protection regulations with stronger frameworks.",lastUpdated:"2024-01-01"},SA:{country:"Saudi Arabia",isoCode:"SA",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Personal Data Protection Law (Royal Decree M/19, 2021). Framework is new and enforcement is still developing.",lastUpdated:"2024-01-01"},IL:{country:"Israel",isoCode:"IL",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Protection of Privacy Law 5741-1981 and regulations. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},BR:{country:"Brazil",isoCode:"BR",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Lei Geral de Protecao de Dados (LGPD, 2020) provides a comprehensive framework. The ANPD is actively enforcing.",lastUpdated:"2024-01-01"},AR:{country:"Argentina",isoCode:"AR",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Personal Data Protection Act No. 25,326. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},AU:{country:"Australia",isoCode:"AU",adequacyStatus:"partially_adequate",recognizedBy:"NDPC",notes:"Privacy Act 1988 provides protection but does not fully align with GDPR-level standards. Reform efforts are ongoing.",lastUpdated:"2024-01-01"},NZ:{country:"New Zealand",isoCode:"NZ",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Privacy Act 2020 provides a comprehensive framework. Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},CH:{country:"Switzerland",isoCode:"CH",adequacyStatus:"adequate",recognizedBy:"EU",notes:"Federal Act on Data Protection (FADP, revised 2023). Recognized as adequate by the EU.",lastUpdated:"2024-01-01"},RU:{country:"Russia",isoCode:"RU",adequacyStatus:"not_adequate",recognizedBy:"NDPC",notes:"Federal Law on Personal Data (No. 152-FZ). Data localization requirements and government access concerns.",lastUpdated:"2024-01-01"}};function u(e){let t=e.trim().toUpperCase();if(n[t])return n[t];let a=e.trim().toLowerCase();for(let o of Object.values(n))if(o.country.toLowerCase()===a)return o}function m(){return Object.values(n).filter(e=>e.adequacyStatus==="adequate")}function q(e){let t=u(e);return t?t.adequacyStatus!=="adequate":true}function p(e){return e==="standard_clauses"||e==="binding_corporate_rules"||e==="ndpc_authorization"}function C(e){return {adequacy_decision:"Adequacy Decision (NDPA Section 41) \u2014 Transfer to a country or territory that the NDPC has determined provides an adequate level of data protection.",standard_clauses:"Standard Contractual Clauses (NDPA Section 42) \u2014 Transfer based on standard contractual clauses approved by the NDPC between the controller/processor and the recipient.",binding_corporate_rules:"Binding Corporate Rules (NDPA Section 43) \u2014 Transfer within a group of undertakings based on binding corporate rules approved by the NDPC.",ndpc_authorization:"NDPC Authorization (NDPA Section 44) \u2014 Transfer authorized by the Nigeria Data Protection Commission under specific conditions.",explicit_consent:"Explicit Consent (NDPA Section 45(a)) \u2014 Transfer based on the explicit and informed consent of the data subject after being informed of the risks.",contract_performance:"Contract Performance (NDPA Section 45(b)) \u2014 Transfer necessary for the performance of a contract between the data subject and the controller.",public_interest:"Public Interest (NDPA Section 45(c)) \u2014 Transfer necessary for important reasons of public interest.",legal_claims:"Legal Claims (NDPA Section 45(d)) \u2014 Transfer necessary for the establishment, exercise, or defense of legal claims.",vital_interests:"Vital Interests (NDPA Section 45(e)) \u2014 Transfer necessary to protect the vital interests of the data subject or other persons."}[e]}function P(e){var o,r;let t=[],a=[];return e.id||t.push("Transfer ID is required."),(!e.destinationCountry||e.destinationCountry.trim()==="")&&t.push("Destination country is required."),(!e.recipientOrganization||e.recipientOrganization.trim()==="")&&t.push("Recipient organization is required."),(!((o=e.recipientContact)!=null&&o.name)||e.recipientContact.name.trim()==="")&&t.push("Recipient contact name is required."),(!((r=e.recipientContact)!=null&&r.email)||e.recipientContact.email.trim()==="")&&t.push("Recipient contact email is required."),(!e.purpose||e.purpose.trim()==="")&&t.push("Purpose of the transfer is required."),e.transferMechanism||t.push("Transfer mechanism is required."),(!e.dataCategories||e.dataCategories.length===0)&&t.push("At least one data category must be specified."),(!e.riskAssessment||e.riskAssessment.trim()==="")&&t.push("Risk assessment summary is required."),(!e.safeguards||e.safeguards.length===0)&&t.push("At least one safeguard must be documented for the transfer."),p(e.transferMechanism)&&(e.ndpcApproval?(e.ndpcApproval.required||a.push("NDPC approval is marked as not required, but the selected transfer mechanism requires NDPC approval."),e.ndpcApproval.required&&!e.ndpcApproval.applied&&t.push("NDPC approval is required but an application has not been submitted."),e.ndpcApproval.applied&&!e.ndpcApproval.approved&&e.status==="active"&&t.push('Transfer is marked as active but NDPC approval has not been granted. Status should be "pending_approval".')):t.push(`NDPC approval documentation is required for transfers using ${l(e.transferMechanism)}.`)),e.tiaCompleted||a.push("A Transfer Impact Assessment (TIA) has not been completed for this transfer."),e.adequacyStatus==="inadequate"&&e.transferMechanism==="adequacy_decision"&&t.push("Cannot rely on adequacy decision (Section 41) when the destination country is marked as inadequate."),e.endDate&&e.startDate>e.endDate&&t.push("Start date must be before end date."),e.includesSensitiveData&&e.riskLevel!=="high"&&a.push("Transfer includes sensitive personal data but the risk level is not set to high. Consider reviewing the risk assessment."),e.reviewDate||a.push("No review date has been set for this transfer. Periodic reviews are recommended."),{isValid:t.length===0,errors:t,warnings:a}}function f(e){var d,c;let t=[],a=[],o=0,y={adequate:0,pending_review:2,unknown:3,inadequate:4}[e.adequacyStatus];o+=y,e.adequacyStatus==="inadequate"?(t.push("Destination country does not have an adequate level of data protection."),a.push("Implement supplementary technical and organizational measures.")):e.adequacyStatus==="unknown"?(t.push("Data protection adequacy of the destination country has not been assessed."),a.push("Conduct an adequacy assessment of the destination country.")):e.adequacyStatus==="pending_review"&&(t.push("Destination country adequacy is currently under review."),a.push("Monitor the adequacy review outcome and plan for contingencies."));let i={adequacy_decision:0,standard_clauses:1,binding_corporate_rules:1,ndpc_authorization:1,contract_performance:2,explicit_consent:2,legal_claims:2,public_interest:2,vital_interests:3}[e.transferMechanism];o+=i,i>=2&&(t.push(`Transfer relies on a derogation mechanism (${l(e.transferMechanism)}), which provides fewer structural safeguards.`),a.push("Consider whether a stronger transfer mechanism (adequacy decision, standard clauses, or BCRs) could be used instead.")),e.includesSensitiveData&&(o+=3,t.push("Transfer includes sensitive personal data, increasing the potential impact of unauthorized access."),a.push("Ensure encryption in transit and at rest, and apply strict access controls.")),e.estimatedDataSubjects&&e.estimatedDataSubjects>1e4?(o+=2,t.push("Large number of data subjects involved increases the scope of potential harm."),a.push("Consider data minimization strategies and ensure robust incident response procedures.")):e.estimatedDataSubjects&&e.estimatedDataSubjects>1e3&&(o+=1,t.push("Moderate number of data subjects involved.")),e.tiaCompleted||(o+=2,t.push("Transfer Impact Assessment has not been completed."),a.push("Complete a Transfer Impact Assessment before proceeding with the transfer.")),p(e.transferMechanism)&&((d=e.ndpcApproval)!=null&&d.approved||(o+=2,t.push("NDPC approval is required but has not been granted."),a.push("Obtain NDPC approval before activating the transfer."))),(((c=e.safeguards)==null?void 0:c.length)||0)<3&&(o+=1,t.push("Limited number of safeguards documented."),a.push("Document additional technical, organizational, and contractual safeguards.")),e.frequency==="continuous"&&(o+=1,t.push("Continuous data transfer increases exposure window."),a.push("Implement real-time monitoring and anomaly detection for the transfer."));let s;return o<=4?s="low":o<=9?s="medium":s="high",{riskLevel:s,riskScore:o,factors:t,recommendations:a}}function l(e){return {adequacy_decision:"Adequacy Decision",standard_clauses:"Standard Contractual Clauses",binding_corporate_rules:"Binding Corporate Rules",ndpc_authorization:"NDPC Authorization",explicit_consent:"Explicit Consent",contract_performance:"Contract Performance",public_interest:"Public Interest",legal_claims:"Legal Claims",vital_interests:"Vital Interests"}[e]}exports.a=n;exports.b=u;exports.c=m;exports.d=q;exports.e=p;exports.f=C;exports.g=P;exports.h=f;//# sourceMappingURL=chunk-C4YM4UMI.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-C4YM4UMI.js.map
|
|
@@ -243,14 +243,14 @@ import {b,d as d$1,c}from'./chunk-GCQRHMTQ.mjs';import {a}from'./chunk-6WIP33TW.
|
|
|
243
243
|
|
|
244
244
|
a { color: inherit; text-decoration: none; }
|
|
245
245
|
}
|
|
246
|
-
`.trim();function ee(r,u){var R;let v=(u==null?void 0:u.includeStyles)!==false,e=(R=u==null?void 0:u.customCSS)!=null?R:"",a=r.sections.filter(d=>d.included),s=M(r.organizationInfo.name||"Organisation"),t=M(r.title||"Privacy Policy"),l=M(r.version||"1.0"),c=r.effectiveDate?new Date(r.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),y=r.lastUpdated?new Date(r.lastUpdated).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):c,C=r.organizationInfo.website?`<a href="${M(r.organizationInfo.website)}" target="_blank" rel="noopener">${M(r.organizationInfo.website)}</a>`:"",x=r.organizationInfo.privacyEmail?`<a href="mailto:${M(r.organizationInfo.privacyEmail)}">${M(r.organizationInfo.privacyEmail)}</a>`:"",
|
|
246
|
+
`.trim();function ee(r,u){var R;let v=(u==null?void 0:u.includeStyles)!==false,e=(R=u==null?void 0:u.customCSS)!=null?R:"",a=r.sections.filter(d=>d.included),s=M(r.organizationInfo.name||"Organisation"),t=M(r.title||"Privacy Policy"),l=M(r.version||"1.0"),c=r.effectiveDate?new Date(r.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),y=r.lastUpdated?new Date(r.lastUpdated).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):c,C=r.organizationInfo.website?`<a href="${M(r.organizationInfo.website)}" target="_blank" rel="noopener">${M(r.organizationInfo.website)}</a>`:"",x=r.organizationInfo.privacyEmail?`<a href="mailto:${M(r.organizationInfo.privacyEmail)}">${M(r.organizationInfo.privacyEmail)}</a>`:"",k=`
|
|
247
247
|
<nav class="policy-toc" aria-label="Table of Contents">
|
|
248
248
|
<h2>Table of Contents</h2>
|
|
249
249
|
<ol>
|
|
250
250
|
${a.map((d,w)=>` <li><a href="#${ce(d.title)}">${M(d.title)}</a></li>`).join(`
|
|
251
251
|
`)}
|
|
252
252
|
</ol>
|
|
253
|
-
</nav>`,
|
|
253
|
+
</nav>`,F=a.map((d,w)=>{let p=ce(d.title),T=d.template||d.defaultContent||"",b=Le(T);return ` <section class="policy-section" id="${p}" aria-labelledby="section-heading-${p}">
|
|
254
254
|
<h2 id="section-heading-${p}">
|
|
255
255
|
<span class="section-number" aria-hidden="true">${w+1}</span>
|
|
256
256
|
${M(d.title)}
|
|
@@ -289,11 +289,11 @@ ${L}
|
|
|
289
289
|
</div>
|
|
290
290
|
</header>
|
|
291
291
|
|
|
292
|
-
${
|
|
292
|
+
${k}
|
|
293
293
|
|
|
294
294
|
<article class="policy-body" aria-label="Policy content">
|
|
295
295
|
|
|
296
|
-
${
|
|
296
|
+
${F}
|
|
297
297
|
|
|
298
298
|
</article>
|
|
299
299
|
|
|
@@ -308,9 +308,13 @@ ${k}
|
|
|
308
308
|
</body>
|
|
309
309
|
</html>`}function Ie(r){return r.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function te(r){let u=r.sections.filter(l=>l.included),v=r.title||"Privacy Policy",e=r.organizationInfo.name||"Organisation",a=r.version||"1.0",s=r.effectiveDate?new Date(r.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),t=[];return t.push(`# ${v}`),t.push(""),t.push(`_Effective: ${s} | Version: ${a} | ${e}_`),t.push(""),r.organizationInfo.website&&t.push(`**Website:** ${r.organizationInfo.website} `),r.organizationInfo.privacyEmail&&t.push(`**Privacy contact:** ${r.organizationInfo.privacyEmail} `),(r.organizationInfo.website||r.organizationInfo.privacyEmail)&&t.push(""),t.push("> This privacy policy is compliant with the **Nigeria Data Protection Act (NDPA) 2023**."),t.push(""),t.push("---"),t.push(""),u.length>0&&(t.push("## Table of Contents"),t.push(""),u.forEach((l,c)=>{let y=Ie(`${c+1} ${l.title}`);t.push(`${c+1}. [${l.title}](#${y})`);}),t.push(""),t.push("---"),t.push("")),u.forEach((l,c)=>{t.push(`## ${c+1}. ${l.title}`),t.push("");let y=(l.template||l.defaultContent||"").trim();if(y){let C=y.split(`
|
|
310
310
|
`);for(let x of C){let D=x.trimEnd();D.startsWith("-")||D.startsWith("\u2022")||D===""?t.push(D.replace(/^•/,"-")):t.push(D);}}t.push(""),t.push("---"),t.push("");}),t.push(`_Generated by **NDPA Toolkit** \u2014 ${e} \u2022 Version ${a}_`),t.push(""),t.join(`
|
|
311
|
-
`)}function oe(r,u){return d(this,null,function*(){var R;let v;try{let d=yield import('jspdf');v=(R=d.jsPDF)!=null?R:d.default;}catch(d){throw new Error(
|
|
312
|
-
|
|
313
|
-
`)
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
311
|
+
`)}function oe(r,u){return d(this,null,function*(){var R;let v;try{let d=yield import('jspdf');v=(R=d.jsPDF)!=null?R:d.default;}catch(d){throw new Error(`[ndpr-toolkit] PDF export requires the "jspdf" package. Install it with:
|
|
312
|
+
pnpm add jspdf
|
|
313
|
+
See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let e=new v({unit:"mm",format:"a4"}),a=e.internal.pageSize.getWidth(),s=e.internal.pageSize.getHeight(),t=20,l=a-t*2,c=t,y=r.organizationInfo.name||"",C=r.title||"Privacy Policy",x=r.version||"1.0",D=r.effectiveDate?new Date(r.effectiveDate).toLocaleDateString():new Date().toLocaleDateString(),k=()=>{e.setFontSize(8),e.setFont("helvetica","italic"),e.setTextColor(150,150,150),e.text(y?`${y} \u2014 ${C}`:C,t,12),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,14,a-t,14),e.setTextColor(0,0,0);},F=d=>{c+d>s-t-10&&(e.addPage(),c=t+8,k());};if((u==null?void 0:u.includeCoverPage)!==false){e.setFillColor(22,163,74),e.rect(0,0,a,12,"F"),e.setFontSize(28),e.setFont("helvetica","bold"),e.setTextColor(22,163,74);let d=e.splitTextToSize(C,l-10),w=72;d.forEach(T=>{e.text(T,a/2,w,{align:"center"}),w+=11;}),e.setDrawColor(22,163,74),e.setLineWidth(.6);let p=w+6;if(e.line(a/2-30,p,a/2+30,p),e.setFontSize(14),e.setFont("helvetica","normal"),e.setTextColor(40,40,40),e.text(y,a/2,p+14,{align:"center"}),e.setFontSize(10),e.setTextColor(100,100,100),e.text(`Effective Date: ${D}`,a/2,p+26,{align:"center"}),e.text(`Version ${x}`,a/2,p+34,{align:"center"}),(u==null?void 0:u.includeComplianceBadge)!==false){let T=p+52,b="Compliant with the Nigeria Data Protection Act (NDPA) 2023";e.setFontSize(8.5),e.setFont("helvetica","bold"),e.setTextColor(255,255,255);let g=e.getTextWidth(b),m=7,_=3.5,H=(a-g-m*2)/2;e.setFillColor(22,163,74),e.roundedRect(H,T-_-1,g+m*2,7+_,2,2,"F"),e.text(b,a/2,T+1.5,{align:"center"}),e.setTextColor(0,0,0);}e.setFillColor(22,163,74),e.rect(0,s-12,a,12,"F"),e.addPage(),c=t+8,k();}let z=r.sections.filter(d=>d.included);(u==null?void 0:u.includeTOC)!==false&&(e.setFontSize(18),e.setFont("helvetica","bold"),e.setTextColor(22,163,74),e.text("Table of Contents",t,c+4),e.setDrawColor(22,163,74),e.setLineWidth(.5),e.line(t,c+8,t+80,c+8),c+=18,e.setFontSize(10.5),e.setFont("helvetica","normal"),e.setTextColor(40,40,40),z.forEach((d,w)=>{F(7);let p=`${w+1}. ${d.title}`;e.text(p,t+4,c),c+=6.5;}),e.addPage(),c=t+8,k()),z.forEach((d,w)=>{F(18),e.setFillColor(22,163,74),e.circle(t+3.5,c-1.5,3.8,"F"),e.setFontSize(8),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text(String(w+1),t+3.5,c-.5,{align:"center"}),e.setFontSize(13),e.setFont("helvetica","bold"),e.setTextColor(22,163,74),e.text(d.title,t+11,c),c+=3,e.setDrawColor(200,200,200),e.setLineWidth(.25),e.line(t+11,c,a-t,c),c+=6;let p=(d.template||d.defaultContent||"").trim();if(p){let T=p.split(`
|
|
314
|
+
`);e.setFontSize(9.5),e.setFont("helvetica","normal"),e.setTextColor(50,50,50),T.forEach(b=>{let g=b.trimEnd();if(g===""){c+=3;return}let m=g.startsWith("-")||g.startsWith("\u2022"),_=m?t+8:t+4,H=m?g.replace(/^[-•]\s*/,""):g,A=l-(m?12:8);e.splitTextToSize(H,A).forEach((X,Z)=>{F(5),m&&Z===0&&(e.setFillColor(22,163,74),e.circle(t+4,c-1,.9,"F")),e.text(X,_,c),c+=5;});});}c+=10;});let L=e.getNumberOfPages();for(let d=1;d<=L;d++)e.setPage(d),e.setFontSize(7.5),e.setFont("helvetica","normal"),e.setTextColor(160,160,160),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,s-12,a-t,s-12),e.text(y?`${y} \u2014 Privacy Policy`:"Privacy Policy",t,s-8),e.text(`Page ${d} of ${L}`,a-t,s-8,{align:"right"}),e.setTextColor(0,0,0);return e.setProperties({title:C,author:y,subject:"Privacy Policy \u2014 NDPA 2023 Compliant",keywords:"privacy policy, NDPA, Nigeria, data protection"}),e.output("blob")})}function re(r,u){return d(this,null,function*(){let v;try{v=yield import('docx');}catch(b){throw new Error(`[ndpr-toolkit] Word export requires the "docx" package. Install it with:
|
|
315
|
+
pnpm add docx
|
|
316
|
+
See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let{Document:e,Paragraph:a,TextRun:s,HeadingLevel:t,Packer:l,Header:c,Footer:y,PageNumber:C,AlignmentType:x,BorderStyle:D,ShadingType:k,TableOfContents:F}=v,z=r.organizationInfo.name||"",L=r.title||"Privacy Policy",R=r.version||"1.0",d=r.effectiveDate?new Date(r.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),w=r.sections.filter(b=>b.included),p=[];if(p.push(new a({children:[new s({text:L,bold:true,size:52,color:"064e3b"})],heading:t.TITLE,spacing:{after:160},alignment:x.CENTER})),p.push(new a({children:[new s({text:`${z}${z?" \u2022 ":""}Version ${R} \u2022 Effective ${d}`,size:20,color:"6b7280",italics:true})],spacing:{after:120},alignment:x.CENTER})),p.push(new a({children:[new s({text:"Compliant with the Nigeria Data Protection Act (NDPA) 2023",size:18,color:"16a34a",bold:true})],spacing:{after:400},alignment:x.CENTER})),p.push(new a({children:[],spacing:{after:200},border:{bottom:{color:"16a34a",style:D.SINGLE,size:6,space:1}}})),(u==null?void 0:u.includeTOC)!==false){if(p.push(new a({children:[new s({text:"Table of Contents",bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200}})),typeof F=="function")try{p.push(new F("Table of Contents",{hyperlink:!0,headingStyleRange:"1-1"}));}catch(b){w.forEach((g,m)=>{p.push(new a({children:[new s({text:`${m+1}. ${g.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});}else w.forEach((b,g)=>{p.push(new a({children:[new s({text:`${g+1}. ${b.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});p.push(new a({children:[],pageBreakBefore:true}));}w.forEach((b,g)=>{p.push(new a({children:[new s({text:`${g+1}. ${b.title}`,bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200},border:{bottom:{color:"dcfce7",style:D.SINGLE,size:4,space:1}}}));let m=(b.template||b.defaultContent||"").trim();m&&m.split(`
|
|
317
|
+
`).forEach(H=>{let A=H.trimEnd();if(A===""){p.push(new a({children:[],spacing:{after:60}}));return}let N=A.startsWith("- ")||A.startsWith("\u2022 "),X=N?A.replace(/^[-•]\s*/,""):A;N?p.push(new a({children:[new s({text:X,size:22})],spacing:{after:80},bullet:{level:0}})):p.push(new a({children:[new s({text:X,size:22})],spacing:{after:100}}));});}),p.push(new a({children:[new s({text:`Generated by NDPA Toolkit \u2014 ${z}${z?" \u2014 ":""}Privacy Policy v${R}`,size:16,color:"9ca3af",italics:true})],spacing:{before:600},alignment:x.CENTER}));let T=new e({title:L,description:"Privacy Policy \u2014 NDPA 2023 Compliant",styles:{paragraphStyles:[{id:"Normal",name:"Normal",run:{font:"Calibri",size:22}}]},sections:[{headers:{default:new c({children:[new a({children:[new s({text:z||"Privacy Policy",size:16,color:"9ca3af"})],alignment:x.RIGHT})]})},footers:{default:new y({children:[new a({children:[new s({text:"Page ",size:16,color:"9ca3af"}),new s({children:[C.CURRENT],size:16,color:"9ca3af"}),new s({text:" of ",size:16,color:"9ca3af"}),new s({children:[C.TOTAL_PAGES],size:16,color:"9ca3af"})],alignment:x.CENTER})]})},children:p}]});return l.toBlob(T)})}var le=10,Me="ndpr_policy_draft",Re=2e3;function de(){return `section_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function pe(){return `draft_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function U(r,u,v){let e=Date.now();return {id:v,title:`Privacy Policy${r.org.name?` \u2014 ${r.org.name}`:""}`,templateId:"adaptive-policy-wizard",organizationInfo:{name:r.org.name,website:r.org.website,privacyEmail:r.org.privacyEmail,address:r.org.address,dpoName:r.org.dpoName,dpoEmail:r.org.dpoEmail,industry:r.org.industry},sections:u,variableValues:{},effectiveDate:e,lastUpdated:e,version:"1.0",applicableFrameworks:["ndpa","ndpr"]}}function ot(r={}){var ne;let{onComplete:u,onComplianceChange:v}=r,e=useRef((ne=r.adapter)!=null?ne:a(Me));r.adapter&&(e.current=r.adapter);let a$2=useRef(pe()),[s,t]=useState(1),[l,c$1]=useState(b),[y,C]=useState([]),[x,D]=useState({}),[k,F]=useState([]),[z,L]=useState(false),[R,d$2]=useState(null),[w,p]=useState(true),T=useRef(false),b$2=useRef(null);useEffect(()=>{let o=false,n=i=>{i&&(a$2.current=i.id,c$1(i.templateContext),C(i.customSections),D(i.sectionOverrides),F(i.sectionOrder),t(i.currentStep),d$2(i.lastSavedAt),L(true));};try{let i=e.current.load();i instanceof Promise?i.then(h=>{o||(n(h),p(!1));},()=>{o||p(!1);}):(n(i),p(!1));}catch(i){o||p(false);}return ()=>{o=true;}},[]);let g=useMemo(()=>{let n=d$1(l).map(f=>x[f.id]?b$1(a$1({},f),{template:x[f.id]}):f),i=y.map(f=>{var E;return {id:f.id,title:f.title,template:(E=x[f.id])!=null?E:f.content,order:f.order,required:false,included:true}}),h=[...n,...i];if(k.length>0){let f=new Map(k.map((E,$)=>[E,$]));return [...h].sort((E,$)=>{let O=f.has(E.id)?f.get(E.id):h.length,W=f.has($.id)?f.get($.id):h.length;return O-W})}return [...h].sort((f,E)=>{var $,O;return (($=f.order)!=null?$:0)-((O=E.order)!=null?O:0)})},[l,y,x,k]),m=useMemo(()=>!l.org.name&&!l.org.privacyEmail?null:U(l,g,a$2.current),[l,g]),_=useMemo(()=>U(b(),[],a$2.current),[]),H=useMemo(()=>c(m!=null?m:_,l),[m,l,_]),A=H.percentage,N=H.gaps,X=useRef({score:-1,gaps:[]});useEffect(()=>{let o=X.current;v&&(A!==o.score||N!==o.gaps)&&v(A,N),X.current={score:A,gaps:N};},[A,N,v]);let Z=useMemo(()=>{switch(s){case 1:return l.org.name.trim().length>0&&l.org.privacyEmail.trim().length>0;case 2:return l.dataCategories.some(o=>o.selected);case 3:return l.purposes.length>0;case 4:return true;default:return false}},[s,l]),me=useCallback(o=>{let n=Math.min(Math.max(1,o),4);n<4&&(T.current=false),t(n);},[]),ue=useCallback(()=>{t(o=>Math.min(o+1,4));},[]),ge=useCallback(()=>{T.current=false,t(o=>Math.max(o-1,1));},[]),fe=useCallback(o=>{c$1(n=>a$1(a$1({},n),o));},[]),he=useCallback(o=>{c$1(n=>b$1(a$1({},n),{org:a$1(a$1({},n.org),o)}));},[]),ye=useCallback(o=>{c$1(n=>b$1(a$1({},n),{dataCategories:n.dataCategories.map(i=>i.id===o?b$1(a$1({},i),{selected:!i.selected}):i)}));},[]),ve=useCallback(o=>{c$1(n=>{let i=o,h=n.purposes.includes(i);return b$1(a$1({},n),{purposes:h?n.purposes.filter(f=>f!==o):[...n.purposes,i]})});},[]),xe=useCallback(o=>{c$1(n=>b$1(a$1({},n),{thirdPartyProcessors:[...n.thirdPartyProcessors,o]}));},[]),be=useCallback(o=>{c$1(n=>b$1(a$1({},n),{thirdPartyProcessors:n.thirdPartyProcessors.filter((i,h)=>h!==o)}));},[]),Pe=useCallback(o=>{C(n=>n.length>=le?n:[...n,b$1(a$1({},o),{id:de(),required:false})]);},[]),Ce=useCallback((o,n)=>{C(i=>i.map(h=>h.id===o?a$1(a$1({},h),n):h));},[]),we=useCallback(o=>{C(n=>n.filter(i=>i.id!==o)),F(n=>n.filter(i=>i!==o)),D(n=>{let i=a$1({},n);return delete i[o],i});},[]),Se=useCallback((o,n)=>{F(i=>{let h=i.length>0?i:g.map(O=>O.id),f=h.indexOf(o);if(f===-1){let O=g.map(Ae=>Ae.id),W=O.indexOf(o);if(W===-1)return i;let K=n==="up"?W-1:W+1;if(K<0||K>=O.length)return O;let j=[...O];return [j[W],j[K]]=[j[K],j[W]],j}let E=n==="up"?f-1:f+1;if(E<0||E>=h.length)return h;let $=[...h];return [$[f],$[E]]=[$[E],$[f]],$});},[g]),De=useCallback((o,n)=>{D(i=>b$1(a$1({},i),{[o]:n}));},[]),Te=useCallback(o=>{let n=N.find(i=>i.requirementId===o);if(n)switch(n.fixType){case "fill_field":{T.current=false;let h=["data-categories-disclosed"],f=["purpose-of-processing"];h.includes(o)?t(2):f.includes(o)?t(3):(t(1));break}case "add_section":{if(!n.suggestedContent)break;C(i=>i.length>=le?i:[...i,{id:de(),title:n.requirement,content:n.suggestedContent,order:999,required:false}]);break}case "add_content":{if(!n.suggestedContent)break;let i="data-subject-rights";D(h=>{var E,$,O;let f=(O=($=h[i])!=null?$:(E=g.find(W=>W.id===i))==null?void 0:E.template)!=null?O:"";return b$1(a$1({},h),{[i]:`${f}
|
|
318
|
+
|
|
319
|
+
${n.suggestedContent}`.trim()})});break}}},[N,g]),Y=useCallback(o=>({id:a$2.current,templateContext:l,customSections:y,sectionOverrides:x,sectionOrder:k,currentStep:o,lastSavedAt:Date.now(),status:"draft"}),[l,y,x,k]),Ee=useCallback(()=>d(null,null,function*(){let o=Y(s);try{yield Promise.resolve(e.current.save(o)),d$2(o.lastSavedAt),L(!0);}catch(n){console.warn("[ndpr-toolkit] Failed to save draft:",n);}}),[Y,s]),$e=useCallback(()=>{Promise.resolve(e.current.remove()).catch(o=>{console.warn("[ndpr-toolkit] Failed to remove draft:",o);}),a$2.current=pe(),T.current=false,c$1(b()),C([]),D({}),F([]),t(1),L(false),d$2(null);},[]);useEffect(()=>{if(!w)return b$2.current&&clearTimeout(b$2.current),b$2.current=setTimeout(()=>{let o=Y(s);Promise.resolve(e.current.save(o)).then(()=>{d$2(o.lastSavedAt),L(true);}).catch(n=>{console.warn("[ndpr-toolkit] Auto-save failed:",n);});},Re),()=>{b$2.current&&clearTimeout(b$2.current);}},[l,y,x,k,s,w,Y]),useEffect(()=>{s===4&&m&&u&&!T.current&&(T.current=true,u(m));},[s,m,u]);let ze=useCallback(o=>d(null,null,function*(){let n=m!=null?m:U(l,g,a$2.current);return oe(n,o)}),[m,l,g]),Oe=useCallback(o=>d(null,null,function*(){let n=m!=null?m:U(l,g,a$2.current);return re(n,o)}),[m,l,g]),ke=useCallback(o=>{let n=m!=null?m:U(l,g,a$2.current);return ee(n,o)},[m,l,g]),Fe=useCallback(()=>{let o=m!=null?m:U(l,g,a$2.current);return te(o)},[m,l,g]);return {currentStep:s,goToStep:me,nextStep:ue,prevStep:ge,canProceed:Z,context:l,updateContext:fe,updateOrg:he,toggleDataCategory:ye,togglePurpose:ve,addProcessor:xe,removeProcessor:be,policy:m,sections:g,customSections:y,addCustomSection:Pe,updateCustomSection:Ce,removeCustomSection:we,reorderSections:Se,editSectionContent:De,sectionOverrides:x,complianceScore:A,complianceResult:H,complianceGaps:N,applyFix:Te,handleExportPDF:ze,handleExportDOCX:Oe,handleExportHTML:ke,handleExportMarkdown:Fe,isDraftSaved:z,lastSavedAt:R,saveDraft:Ee,discardDraft:$e,isLoading:w}}export{ee as a,te as b,oe as c,re as d,ot as e};//# sourceMappingURL=chunk-CDZDT2OS.mjs.map
|
|
320
|
+
//# sourceMappingURL=chunk-CDZDT2OS.mjs.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-DJGS7SSN.mjs';import {a}from'./chunk-AYKLAEOU.mjs';import {useState,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var xe=({breachData:g,initialAssessment:u={},onComplete:w,title:_="Breach Risk Assessment",description:K="Assess the risk level of this data breach to determine notification requirements under NDPA Section 40.",submitButtonText:Z="Complete Assessment",className:ae="",buttonClassName:Q="",classNames:v={},unstyled:n=false,showBreachSummary:l=true,showNotificationRequirements:C=true})=>{let[L,se]=useState(u.confidentialityImpact||3),[I,b]=useState(u.integrityImpact||3),[P,S]=useState(u.availabilityImpact||3),[j,T]=useState(u.harmLikelihood||3),[q,F]=useState(u.harmSeverity||3),[U,E]=useState(u.risksToRightsAndFreedoms!==void 0?u.risksToRightsAndFreedoms:false),[H,M]=useState(u.highRisksToRightsAndFreedoms!==void 0?u.highRisksToRightsAndFreedoms:false),[X,ie]=useState(u.justification||""),[Y,re]=useState(0),[R,h]=useState("low"),[x,f]=useState(false),[y,z]=useState(0),[O,ee]=useState(0),[p,k]=useState(false),[G]=useState(()=>Date.now());useEffect(()=>{let V=L*.2+I*.1+P*.1+j*.3+q*.3;re(Number(V.toFixed(1)));let J;V<2?J="low":V<3?J="medium":V<4?J="high":J="critical",h(J),f(U||J==="high"||J==="critical");let de=g.discoveredAt+4320*60*1e3;z(de);let pe=Date.now(),ge=(de-pe)/(3600*1e3);ee(Number(ge.toFixed(1)));},[L,I,P,j,q,U,g.discoveredAt]);let B=d=>new Date(d).toLocaleString(),s=d=>{d.preventDefault();let D={id:u.id||`assessment_${Date.now()}`,breachId:g.id,assessedAt:Date.now(),assessor:u.assessor||{name:"Assessment User",role:"Data Protection Officer",email:"dpo@example.com"},confidentialityImpact:L,integrityImpact:I,availabilityImpact:P,harmLikelihood:j,harmSeverity:q,overallRiskScore:Y,riskLevel:R,risksToRightsAndFreedoms:U,highRisksToRightsAndFreedoms:H,justification:X};w(D),k(true);},m=d=>{switch(d){case 1:return "Minimal";case 2:return "Low";case 3:return "Moderate";case 4:return "High";case 5:return "Severe";default:return "Unknown"}},N=d=>jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${{low:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",medium:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",high:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200",critical:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}[d]}`,v.riskBadge,n),children:d.charAt(0).toUpperCase()+d.slice(1)});return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${ae}`,v.root,n),children:[jsx("h2",{className:a("text-xl font-bold mb-2",v.title,n),children:_}),jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:K}),l&&jsxs("div",{className:"mb-6 p-4 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsx("h3",{className:"text-lg font-medium mb-2",children:"Breach Summary"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[jsxs("div",{children:[jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Title:"})," ",g.title]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Discovered:"})," ",B(g.discoveredAt)]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Status:"})," ",g.status.charAt(0).toUpperCase()+g.status.slice(1)]})]}),jsxs("div",{children:[jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Data Types:"})," ",g.dataTypes.join(", ")]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Affected Systems:"})," ",g.affectedSystems.join(", ")]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Affected Subjects:"})," ",g.estimatedAffectedSubjects||"Unknown"]})]})]})]}),p?jsxs("div",{children:[jsxs("div",{className:"mb-6 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md",children:[jsx("h3",{className:"text-lg font-medium mb-3",children:"Assessment Results"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{children:[jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Overall Risk Level:"})," ",N(R)]}),jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Risk Score:"})," ",Y," / 5"]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Assessed On:"})," ",B(G)]})]}),jsxs("div",{children:[jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Risks to Rights and Freedoms:"})," ",U?"Yes":"No"]}),jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"High Risks to Rights and Freedoms:"})," ",H?"Yes":"No"]})]})]}),jsxs("div",{className:"mt-3",children:[jsx("p",{className:"text-sm mb-1",children:jsx("span",{className:"font-medium",children:"Justification:"})}),jsx("p",{className:"text-sm bg-white dark:bg-gray-800 p-2 rounded",children:X})]})]}),C&&jsxs("div",{className:a(`mb-6 p-4 rounded-md ${x?O>24?"bg-yellow-50 dark:bg-yellow-900/20":"bg-red-50 dark:bg-red-900/20":"bg-green-50 dark:bg-green-900/20"}`,v.notificationStatus,n),children:[jsx("h3",{className:"text-lg font-medium mb-3",children:"Notification Requirements"}),x?jsxs("div",{children:[jsx("p",{className:`text-sm font-bold mb-2 ${O>24?"text-yellow-800 dark:text-yellow-200":"text-red-800 dark:text-red-200"}`,children:"NDPC Notification Required"}),jsx("p",{className:"text-sm mb-2",children:"Under the NDPA (Section 40), this breach must be reported to the NDPC within 72 hours of discovery."}),jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Notification Deadline:"})," ",B(y)]}),jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Time Remaining:"})," ",jsx("span",{className:O<24?"text-red-600 dark:text-red-400 font-bold":"",children:O>0?`${O} hours`:"Deadline passed"})]}),jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Data Subject Notification:"})," ",H?"Required (NDPA Section 40(4))":"Not required unless directed by NDPC"]})]}):jsxs("div",{children:[jsx("p",{className:"text-sm font-bold mb-2 text-green-800 dark:text-green-200",children:"NDPC Notification Not Required"}),jsx("p",{className:"text-sm mb-2",children:"Based on this assessment, this breach does not need to be reported to the NDPC."}),jsx("p",{className:"text-sm mb-2",children:"However, the breach should still be documented internally for compliance purposes."})]}),jsxs("div",{className:"mt-3 text-sm",children:[jsx("p",{className:"font-medium",children:"Next Steps:"}),jsx("ul",{className:"list-disc pl-5 mt-1",children:x?jsxs(Fragment,{children:[jsx("li",{children:"Prepare a notification report for the NDPC"}),jsx("li",{children:"Document all aspects of the breach and your response"}),H&&jsx("li",{children:"Prepare communications for affected data subjects"}),jsx("li",{children:"Implement measures to mitigate the impact of the breach"})]}):jsxs(Fragment,{children:[jsx("li",{children:"Document the breach and this assessment in your internal records"}),jsx("li",{children:"Implement measures to prevent similar breaches in the future"}),jsx("li",{children:"Review and update security measures as needed"})]})})]})]}),jsx("button",{onClick:()=>k(false),className:a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${Q}`,v.primaryButton||v.submitButton,n),children:"Edit Assessment"})]}):jsx("form",{onSubmit:s,children:jsxs("div",{className:"space-y-6",children:[jsxs("div",{children:[jsx("h3",{className:"text-lg font-semibold mb-3",children:"Impact Assessment"}),jsxs("div",{className:"mb-4",children:[jsxs("label",{htmlFor:"confidentialityImpact",className:"block text-sm font-medium mb-1",children:["Confidentiality Impact (1-5)",jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How much has the confidentiality of data been compromised?"})]}),jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"range",id:"confidentialityImpact",min:"1",max:"5",step:"1",value:L,onChange:d=>se(parseInt(d.target.value)),className:a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",v.slider,n)}),jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(L)," (",L,")"]})]})]}),jsxs("div",{className:"mb-4",children:[jsxs("label",{htmlFor:"integrityImpact",className:"block text-sm font-medium mb-1",children:["Integrity Impact (1-5)",jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How much has the integrity of data been compromised?"})]}),jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"range",id:"integrityImpact",min:"1",max:"5",step:"1",value:I,onChange:d=>b(parseInt(d.target.value)),className:a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",v.slider,n)}),jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(I)," (",I,")"]})]})]}),jsxs("div",{className:"mb-4",children:[jsxs("label",{htmlFor:"availabilityImpact",className:"block text-sm font-medium mb-1",children:["Availability Impact (1-5)",jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How much has the availability of data or systems been compromised?"})]}),jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"range",id:"availabilityImpact",min:"1",max:"5",step:"1",value:P,onChange:d=>S(parseInt(d.target.value)),className:a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",v.slider,n)}),jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(P)," (",P,")"]})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"text-lg font-semibold mb-3",children:"Risk to Data Subjects"}),jsxs("div",{className:"mb-4",children:[jsxs("label",{htmlFor:"harmLikelihood",className:"block text-sm font-medium mb-1",children:["Likelihood of Harm (1-5)",jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How likely is it that data subjects will experience harm?"})]}),jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"range",id:"harmLikelihood",min:"1",max:"5",step:"1",value:j,onChange:d=>T(parseInt(d.target.value)),className:a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",v.slider,n)}),jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(j)," (",j,")"]})]})]}),jsxs("div",{className:"mb-4",children:[jsxs("label",{htmlFor:"harmSeverity",className:"block text-sm font-medium mb-1",children:["Severity of Harm (1-5)",jsx("span",{className:"ml-2 text-sm text-gray-600 dark:text-gray-400",children:"How severe would the harm be to affected data subjects?"})]}),jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"range",id:"harmSeverity",min:"1",max:"5",step:"1",value:q,onChange:d=>F(parseInt(d.target.value)),className:a("w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700",v.slider,n)}),jsxs("span",{className:"ml-3 w-24 text-sm",children:[m(q)," (",q,")"]})]})]}),jsxs("div",{className:"mb-4",children:[jsxs("div",{className:"flex items-center mb-2",children:[jsx("input",{type:"checkbox",id:"risksToRightsAndFreedoms",checked:U,onChange:d=>E(d.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"risksToRightsAndFreedoms",className:"ml-2 text-sm font-medium",children:"This breach poses a risk to the rights and freedoms of data subjects"})]}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 ml-6",children:"Under the NDPA (Section 40), breaches that pose a risk to rights and freedoms must be reported to the NDPC within 72 hours."})]}),jsxs("div",{className:"mb-4",children:[jsxs("div",{className:"flex items-center mb-2",children:[jsx("input",{type:"checkbox",id:"highRisksToRightsAndFreedoms",checked:H,onChange:d=>M(d.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"highRisksToRightsAndFreedoms",className:"ml-2 text-sm font-medium",children:"This breach poses a high risk to the rights and freedoms of data subjects"})]}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 ml-6",children:"Under the NDPA (Section 40(4)), breaches that pose a high risk to rights and freedoms also require notification to affected data subjects without undue delay."})]})]}),jsxs("div",{children:[jsx("h3",{className:"text-lg font-semibold mb-3",children:"Overall Assessment"}),jsxs("div",{className:"mb-4 p-4 bg-gray-50 dark:bg-gray-700 rounded-md",children:[jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsx("span",{className:"font-medium",children:"Overall Risk Score:"}),jsxs("span",{className:a("",v.riskScore,n),children:[Y," / 5"]})]}),jsxs("div",{className:"flex items-center justify-between",children:[jsx("span",{className:"font-medium",children:"Risk Level:"}),N(R)]})]}),jsxs("div",{className:"mb-4",children:[jsxs("label",{htmlFor:"justification",className:"block text-sm font-medium mb-1",children:["Justification for Assessment ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("textarea",{id:"justification",value:X,onChange:d=>ie(d.target.value),rows:4,placeholder:"Explain the reasoning behind your assessment, including any factors that influenced your decision.",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",required:true})]})]}),jsxs("div",{className:"mt-6 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md",children:[jsx("h3",{className:"text-sm font-bold text-blue-800 dark:text-blue-200 mb-2",children:"NDPA Breach Notification Requirements"}),jsx("p",{className:"text-blue-700 dark:text-blue-300 text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. This assessment will determine if notification is required for this breach."})]}),jsx("div",{className:"mt-6",children:jsx("button",{type:"submit",className:a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${Q}`,v.primaryButton||v.submitButton,n),children:Z})})]})})]})};var Se=({breachReports:g,riskAssessments:u,regulatoryNotifications:w,onSelectBreach:_,onRequestAssessment:K,onRequestNotification:Z,title:ae="Breach Notification Manager",description:Q="Manage data breach notifications and track compliance with NDPA Section 40 requirements.",className:v="",buttonClassName:n="",classNames:l={},unstyled:C=false,showBreachDetails:L=true,showNotificationTimeline:se=true,showDeadlineAlerts:I=true})=>{var B;let[b,P]=useState(null),[S,j]=useState(g),[T,q]=useState("all"),[F,U]=useState(""),[E,H]=useState("discoveredAt"),[M,X]=useState("desc");useEffect(()=>{let s=[...g];if(T!=="all"&&(s=s.filter(m=>m.status===T)),F){let m=F.toLowerCase();s=s.filter(N=>N.title.toLowerCase().includes(m)||N.description.toLowerCase().includes(m)||N.affectedSystems.some(d=>d.toLowerCase().includes(m))||N.dataTypes.some(d=>d.toLowerCase().includes(m)));}s.sort((m,N)=>{let d=0;switch(E){case "title":d=m.title.localeCompare(N.title);break;case "discoveredAt":d=m.discoveredAt-N.discoveredAt;break;case "status":d=m.status.localeCompare(N.status);break;case "riskLevel":let D=u.find(V=>V.breachId===m.id),$=u.find(V=>V.breachId===N.id),oe=(D==null?void 0:D.riskLevel)||"unknown",ne=($==null?void 0:$.riskLevel)||"unknown";d=oe.localeCompare(ne);break;default:d=m.discoveredAt-N.discoveredAt;}return M==="asc"?d:-d}),j(s);},[g,T,F,E,M,u]),useEffect(()=>{S.length>0&&(b&&S.some(m=>m.id===b)||P(S[0].id));},[S,b]);let ie=s=>{P(s),_&&_(s);},Y=()=>{b&&K&&K(b);},re=()=>{b&&Z&&Z(b);},R=s=>new Date(s).toLocaleString(),h=b?g.find(s=>s.id===b):null,x=b?u.find(s=>s.breachId===b):null,f=b?w.find(s=>s.breachId===b):null,y=h?z(h,x):null;function z(s,m){let N=a$1(s,m||void 0),d=s.discoveredAt+N.timeframeHours*60*60*1e3;return {ndpcNotificationRequired:N.notificationRequired,ndpcNotificationDeadline:d,dataSubjectNotificationRequired:(m==null?void 0:m.highRisksToRightsAndFreedoms)||false,justification:N.justification}}function O(s){let m=Date.now(),N=(s-m)/(3600*1e3);return Number(N.toFixed(1))}let ee=s=>s?jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${{low:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",medium:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",high:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200",critical:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}[s]}`,l.statusBadge,C),children:s.charAt(0).toUpperCase()+s.slice(1)}):null,p=s=>jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${{ongoing:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",contained:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",resolved:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200"}[s]||"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-200"}`,l.statusBadge,C),children:s.charAt(0).toUpperCase()+s.slice(1)}),k=()=>{if(!h||!y)return null;if(!y.ndpcNotificationRequired)return jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-green-800 dark:text-green-200 font-medium",children:"Notification Not Required"}),jsx("p",{className:"text-xs text-green-700 dark:text-green-300 mt-1",children:"Based on the risk assessment, NDPC notification is not required for this breach."})]});if(f)return jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-green-800 dark:text-green-200 font-medium",children:"Notification Sent"}),jsxs("p",{className:"text-xs text-green-700 dark:text-green-300 mt-1",children:["Notification was sent to the NDPC on ",R(f.sentAt),"."]})]});let s=O(y.ndpcNotificationDeadline);return s<=0?jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium",children:"Notification Deadline Passed"}),jsx("p",{className:"text-xs text-red-700 dark:text-red-300 mt-1",children:"The 72-hour deadline for NDPC notification has passed. Notification should be sent immediately."})]}):s<=24?jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium",children:"Urgent: Notification Due Soon"}),jsxs("p",{className:"text-xs text-red-700 dark:text-red-300 mt-1",children:["Only ",s," hours remaining until the NDPC notification deadline."]})]}):jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium",children:"Notification Required"}),jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:["NDPC notification is required by ",R(y.ndpcNotificationDeadline)," (",s," hours remaining)."]})]})},G=()=>{if(!h)return null;let s=[{title:"Breach Discovered",date:h.discoveredAt,completed:true,description:`Breach was discovered on ${R(h.discoveredAt)}.`},{title:"Risk Assessment",date:x==null?void 0:x.assessedAt,completed:!!x,description:x?`Risk assessment completed on ${R(x.assessedAt)}.`:"Risk assessment has not been completed yet."}];return y!=null&&y.ndpcNotificationRequired&&s.push({title:"NDPC Notification",date:f==null?void 0:f.sentAt,completed:!!f,description:f?`Notification sent to the NDPC on ${R(f.sentAt)}.`:`Notification must be sent to the NDPC by ${R(y.ndpcNotificationDeadline)}.`}),y!=null&&y.dataSubjectNotificationRequired&&s.push({title:"Data Subject Notification",date:void 0,completed:false,description:"Notification to affected data subjects is required but has not been sent yet."}),jsxs("div",{className:a("mt-6",l.timeline,C),children:[jsx("h3",{className:"text-lg font-medium mb-4",children:"Notification Timeline"}),jsx("ol",{className:"relative border-l border-gray-200 dark:border-gray-700",children:s.map((m,N)=>jsxs("li",{className:a("mb-6 ml-4",l.timelineStep,C),children:[jsx("div",{className:`absolute w-3 h-3 rounded-full mt-1.5 -left-1.5 border ${m.completed?"bg-green-500 border-green-500 dark:border-green-500":"bg-gray-200 border-gray-200 dark:bg-gray-700 dark:border-gray-700"}`}),jsx("time",{className:"mb-1 text-sm font-normal leading-none text-gray-600 dark:text-gray-500",children:m.date?R(m.date):"Pending"}),jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:m.title}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:m.description})]},N))})]})};return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${v}`,l.root,C),children:[jsxs("div",{className:a("",l.header,C),children:[jsx("h2",{className:a("text-xl font-bold mb-2",l.title,C),children:ae}),jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:Q})]}),jsxs("div",{className:"mb-6 grid grid-cols-1 md:grid-cols-3 gap-4",children:[jsxs("div",{children:[jsx("label",{htmlFor:"statusFilter",className:"block text-sm font-medium mb-1",children:"Status Filter"}),jsxs("select",{id:"statusFilter",value:T,onChange:s=>q(s.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:[jsx("option",{value:"all",children:"All Statuses"}),jsx("option",{value:"ongoing",children:"Ongoing"}),jsx("option",{value:"contained",children:"Contained"}),jsx("option",{value:"resolved",children:"Resolved"})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"sortBy",className:"block text-sm font-medium mb-1",children:"Sort By"}),jsxs("select",{id:"sortBy",value:E,onChange:s=>H(s.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:[jsx("option",{value:"discoveredAt",children:"Discovery Date"}),jsx("option",{value:"title",children:"Title"}),jsx("option",{value:"status",children:"Status"}),jsx("option",{value:"riskLevel",children:"Risk Level"})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"searchTerm",className:"block text-sm font-medium mb-1",children:"Search"}),jsx("input",{type:"text",id:"searchTerm",value:F,onChange:s=>U(s.target.value),placeholder:"Search breaches...",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[jsxs("div",{className:"md:col-span-1",children:[jsx("h3",{className:"text-lg font-medium mb-3",children:"Breach Reports"}),S.length===0?jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No breach reports found."}):jsx("div",{className:a("space-y-2 max-h-96 overflow-y-auto pr-2",l.breachList,C),children:S.map(s=>{let m=u.find($=>$.breachId===s.id),N=w.find($=>$.breachId===s.id),d=z(s,m),D=null;if(d!=null&&d.ndpcNotificationRequired)if(N)D=jsx("span",{className:"text-xs text-green-600 dark:text-green-400",children:"Notified"});else {let $=O(d.ndpcNotificationDeadline);$<=0?D=jsx("span",{className:"text-xs text-red-600 dark:text-red-400 font-bold",children:"Overdue"}):$<=24?D=jsx("span",{className:"text-xs text-red-600 dark:text-red-400",children:"Urgent"}):D=jsx("span",{className:"text-xs text-yellow-600 dark:text-yellow-400",children:"Required"});}else D=jsx("span",{className:"text-xs text-green-600 dark:text-green-400",children:"Not Required"});return jsxs("div",{className:a(`p-3 rounded-md cursor-pointer ${b===s.id?"bg-[rgb(var(--ndpr-primary)/0.05)] dark:bg-[rgb(var(--ndpr-primary)/0.1)] border border-[rgb(var(--ndpr-primary)/0.2)] dark:border-[rgb(var(--ndpr-primary)/0.3)]":"bg-gray-50 dark:bg-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600"}`,l.breachItem,C),onClick:()=>ie(s.id),children:[jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsx("h4",{className:"font-medium text-sm",children:s.title}),p(s.status)]}),jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:["Discovered: ",new Date(s.discoveredAt).toLocaleDateString()]}),jsxs("div",{className:"flex justify-between items-center mt-2",children:[jsx("div",{children:m&&ee(m.riskLevel)}),jsx("div",{children:D})]})]},s.id)})})]}),jsx("div",{className:a("md:col-span-2",l.detailPanel,C),children:h?jsxs("div",{children:[jsxs("div",{className:"flex justify-between items-start mb-4",children:[jsx("h3",{className:"text-lg font-medium",children:h.title}),p(h.status)]}),I&&jsx("div",{className:"mb-4",children:k()}),L&&jsxs("div",{className:"mb-6",children:[jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[jsxs("div",{children:[jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Discovered:"})," ",R(h.discoveredAt)]}),h.occurredAt&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Occurred:"})," ",R(h.occurredAt)]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Reporter:"})," ",h.reporter.name]})]}),jsxs("div",{children:[jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Affected Systems:"})," ",h.affectedSystems.join(", ")]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Data Types:"})," ",h.dataTypes.join(", ")]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Affected Subjects:"})," ",h.estimatedAffectedSubjects||"Unknown"]})]})]}),jsxs("div",{className:"mb-4",children:[jsx("p",{className:"text-sm font-medium",children:"Description:"}),jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700 p-2 rounded-md mt-1",children:h.description})]}),h.initialActions&&jsxs("div",{children:[jsx("p",{className:"text-sm font-medium",children:"Initial Actions Taken:"}),jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700 p-2 rounded-md mt-1",children:h.initialActions})]})]}),jsxs("div",{className:"mb-6",children:[jsx("h3",{className:"text-lg font-medium mb-3",children:"Risk Assessment"}),x?jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 p-3 rounded-md",children:[jsxs("div",{className:"flex justify-between items-center mb-2",children:[jsx("p",{className:"text-sm font-medium",children:"Risk Level:"}),ee(x.riskLevel)]}),jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Risk Score:"})," ",x.overallRiskScore," / 5"]}),jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Risks to Rights and Freedoms:"})," ",x.risksToRightsAndFreedoms?"Yes":"No"]}),jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"High Risks to Rights and Freedoms:"})," ",x.highRisksToRightsAndFreedoms?"Yes":"No"]}),jsx("p",{className:"text-sm mb-1",children:jsx("span",{className:"font-medium",children:"Justification:"})}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300 bg-white dark:bg-gray-800 p-2 rounded-md",children:x.justification})]}):jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200",children:"Risk assessment has not been conducted yet."}),jsx("button",{onClick:Y,className:`mt-2 px-3 py-1 text-xs bg-yellow-600 text-white rounded hover:bg-yellow-700 ${n}`,children:"Conduct Risk Assessment"})]})]}),jsxs("div",{className:"mb-6",children:[jsx("h3",{className:"text-lg font-medium mb-3",children:"Notification Status"}),f?jsxs("div",{className:"bg-gray-50 dark:bg-gray-700 p-3 rounded-md",children:[jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Notification Sent:"})," ",R(f.sentAt)]}),jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Method:"})," ",f.method.charAt(0).toUpperCase()+f.method.slice(1)]}),f.referenceNumber&&jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"Reference Number:"})," ",f.referenceNumber]}),(f.ndpcContact||f.nitdaContact)&&jsxs("p",{className:"text-sm mb-2",children:[jsx("span",{className:"font-medium",children:"NDPC Contact:"})," ",(B=f.ndpcContact||f.nitdaContact)==null?void 0:B.name]})]}):jsx("div",{children:y!=null&&y.ndpcNotificationRequired?jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200",children:"NDPC notification is required but has not been sent yet."}),jsx("button",{onClick:re,className:`mt-2 px-3 py-1 text-xs bg-yellow-600 text-white rounded hover:bg-yellow-700 ${n}`,children:"Generate Notification"})]}):jsx("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-md",children:jsx("p",{className:"text-sm text-green-800 dark:text-green-200",children:"NDPC notification is not required for this breach."})})})]}),se&&G()]}):jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 dark:bg-gray-700 rounded-md",children:jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Select a breach to view details"})})})]})]})};var Fe=({breachData:g,assessmentData:u,organizationInfo:w,onGenerate:_,title:K="Generate NDPC Notification Report",description:Z="Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements.",generateButtonText:ae="Generate Report",className:Q="",buttonClassName:v="",classNames:n={},unstyled:l=false,showPreview:C=true,allowEditing:L=true,allowDownload:se=true,downloadFormat:I="pdf"})=>{let[b,P]=useState(""),[S,j]=useState(""),[T,q]=useState(""),[F,U]=useState(""),[E,H]=useState("email"),[M,X]=useState(""),[ie,Y]=useState(""),[re,R]=useState(false),[h,x]=useState(false);useEffect(()=>{let p=y();P(p),R(true);},[g,u,w]);let f=p=>new Date(p).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}),y=()=>`
|
|
2
|
+
NDPC DATA BREACH NOTIFICATION
|
|
3
|
+
|
|
4
|
+
Date: ${new Date().toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}
|
|
5
|
+
|
|
6
|
+
Reference: NDPA Section 40 - Breach Notification
|
|
7
|
+
|
|
8
|
+
ORGANIZATION DETAILS
|
|
9
|
+
-------------------
|
|
10
|
+
Organization Name: ${w.name}
|
|
11
|
+
${w.registrationNumber?`Registration Number: ${w.registrationNumber}`:""}
|
|
12
|
+
Address: ${w.address}
|
|
13
|
+
${w.website?`Website: ${w.website}`:""}
|
|
14
|
+
|
|
15
|
+
DATA PROTECTION OFFICER
|
|
16
|
+
----------------------
|
|
17
|
+
Name: ${w.dpoName}
|
|
18
|
+
Email: ${w.dpoEmail}
|
|
19
|
+
${w.dpoPhone?`Phone: ${w.dpoPhone}`:""}
|
|
20
|
+
|
|
21
|
+
BREACH DETAILS
|
|
22
|
+
-------------
|
|
23
|
+
Breach Title: ${g.title}
|
|
24
|
+
Date Discovered: ${f(g.discoveredAt)}
|
|
25
|
+
${g.occurredAt?`Date Occurred: ${f(g.occurredAt)}`:"Date Occurred: Unknown"}
|
|
26
|
+
Status: ${g.status.charAt(0).toUpperCase()+g.status.slice(1)}
|
|
27
|
+
|
|
28
|
+
Description of the Breach:
|
|
29
|
+
${g.description}
|
|
30
|
+
|
|
31
|
+
Affected Systems/Applications:
|
|
32
|
+
${g.affectedSystems.join(", ")}
|
|
33
|
+
|
|
34
|
+
Types of Personal Data Involved:
|
|
35
|
+
${g.dataTypes.join(", ")}
|
|
36
|
+
|
|
37
|
+
Estimated Number of Data Subjects Affected:
|
|
38
|
+
${g.estimatedAffectedSubjects||"Unknown"}
|
|
39
|
+
|
|
40
|
+
RISK ASSESSMENT
|
|
41
|
+
--------------
|
|
42
|
+
${u?`
|
|
43
|
+
Overall Risk Level: ${u.riskLevel.charAt(0).toUpperCase()+u.riskLevel.slice(1)}
|
|
44
|
+
Risk to Rights and Freedoms of Data Subjects: ${u.risksToRightsAndFreedoms?"Yes":"No"}
|
|
45
|
+
High Risk to Rights and Freedoms of Data Subjects: ${u.highRisksToRightsAndFreedoms?"Yes":"No"}
|
|
46
|
+
|
|
47
|
+
Justification for Risk Assessment:
|
|
48
|
+
${u.justification}
|
|
49
|
+
`:"Risk assessment has not been conducted yet."}
|
|
50
|
+
|
|
51
|
+
MEASURES TAKEN
|
|
52
|
+
-------------
|
|
53
|
+
Measures taken or proposed to address the breach:
|
|
54
|
+
${g.initialActions||"To be determined"}
|
|
55
|
+
|
|
56
|
+
Measures taken or proposed to mitigate possible adverse effects:
|
|
57
|
+
[Please specify measures taken to mitigate adverse effects]
|
|
58
|
+
|
|
59
|
+
NOTIFICATION TO DATA SUBJECTS (NDPA Section 40(4))
|
|
60
|
+
----------------------------
|
|
61
|
+
Have data subjects been notified: [Yes/No]
|
|
62
|
+
If yes, date of notification: [Date]
|
|
63
|
+
If no, planned date of notification: [Date]
|
|
64
|
+
Reason for delay (if applicable): [Reason]
|
|
65
|
+
|
|
66
|
+
ADDITIONAL INFORMATION
|
|
67
|
+
---------------------
|
|
68
|
+
[Any additional information relevant to the breach]
|
|
69
|
+
|
|
70
|
+
This notification is made in compliance with the Nigeria Data Protection Act (NDPA), Section 40.
|
|
71
|
+
`,z=p=>{p.preventDefault();let k={id:`notification_${Date.now()}`,breachId:g.id,sentAt:Date.now(),method:E,referenceNumber:M||void 0,ndpcContact:S?{name:S,email:T,phone:F||void 0}:void 0,content:b,attachments:[]};_(k),x(true);},O=()=>{let p,k,G;switch(I){case "html":{p="text/html",k="html",G=`<!DOCTYPE html>
|
|
72
|
+
<html lang="en">
|
|
73
|
+
<head>
|
|
74
|
+
<meta charset="UTF-8">
|
|
75
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
76
|
+
<title>NDPC Breach Notification Report</title>
|
|
77
|
+
<style>body{font-family:monospace;white-space:pre-wrap;max-width:800px;margin:2rem auto;padding:0 1rem;}</style>
|
|
78
|
+
</head>
|
|
79
|
+
<body>${b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</body>
|
|
80
|
+
</html>`;break}case "pdf":p="text/plain",k="pdf.txt",G=b;break;case "docx":p="text/plain",k="docx.txt",G=b;break;default:p="text/plain",k="txt",G=b;}let B=document.createElement("a"),s=new Blob([G],{type:p});B.href=URL.createObjectURL(s),B.download=`NDPC_Breach_Notification_${new Date().toISOString().split("T")[0]}.${k}`,document.body.appendChild(B),B.click(),document.body.removeChild(B);},ee=()=>[{value:"email",label:"Email"},{value:"portal",label:"NDPC Portal"},{value:"letter",label:"Formal Letter"},{value:"other",label:"Other"}].map(k=>jsx("option",{value:k.value,children:k.label},k.value));return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${Q}`,n.root,l),children:[jsxs("div",{className:a("",n.header,l),children:[jsx("h2",{className:a("text-xl font-bold mb-2",n.title,l),children:K}),jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:Z})]}),h?jsxs("div",{children:[jsxs("div",{className:"mb-6 p-4 bg-green-50 dark:bg-green-900/20 rounded-md",children:[jsx("h3",{className:"text-lg font-bold text-green-800 dark:text-green-200 mb-2",children:"Report Generated Successfully"}),jsx("p",{className:"text-green-700 dark:text-green-300",children:"Your NDPC notification report has been generated and is ready for submission. Please review the report carefully before submitting it to the NDPC."})]}),jsxs("div",{className:"mb-6",children:[jsx("h3",{className:"text-lg font-semibold mb-3",children:"Submission Details"}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[jsxs("div",{children:[jsxs("p",{className:a("text-sm",n.field,l),children:[jsx("span",{className:a("font-medium",n.fieldLabel,l),children:"Method:"})," ",jsx("span",{className:a("",n.fieldValue,l),children:E.charAt(0).toUpperCase()+E.slice(1)})]}),S&&jsxs("p",{className:a("text-sm",n.field,l),children:[jsx("span",{className:a("font-medium",n.fieldLabel,l),children:"Contact Name:"})," ",jsx("span",{className:a("",n.fieldValue,l),children:S})]}),T&&jsxs("p",{className:a("text-sm",n.field,l),children:[jsx("span",{className:a("font-medium",n.fieldLabel,l),children:"Contact Email:"})," ",jsx("span",{className:a("",n.fieldValue,l),children:T})]}),F&&jsxs("p",{className:a("text-sm",n.field,l),children:[jsx("span",{className:a("font-medium",n.fieldLabel,l),children:"Contact Phone:"})," ",jsx("span",{className:a("",n.fieldValue,l),children:F})]})]}),jsxs("div",{children:[jsxs("p",{className:a("text-sm",n.field,l),children:[jsx("span",{className:a("font-medium",n.fieldLabel,l),children:"Date Generated:"})," ",jsx("span",{className:a("",n.fieldValue,l),children:f(Date.now())})]}),jsxs("p",{className:a("text-sm",n.field,l),children:[jsx("span",{className:a("font-medium",n.fieldLabel,l),children:"Breach ID:"})," ",jsx("span",{className:a("",n.fieldValue,l),children:g.id})]}),M&&jsxs("p",{className:a("text-sm",n.field,l),children:[jsx("span",{className:a("font-medium",n.fieldLabel,l),children:"Reference Number:"})," ",jsx("span",{className:a("",n.fieldValue,l),children:M})]})]})]})]}),C&&jsxs("div",{className:"mb-6",children:[jsx("h3",{className:"text-lg font-semibold mb-3",children:"Report Preview"}),jsx("div",{className:a("bg-gray-50 dark:bg-gray-700 p-4 rounded-md",n.reportPreview,l),children:jsx("pre",{className:"whitespace-pre-wrap text-sm font-mono text-gray-800 dark:text-gray-200",children:b})})]}),jsxs("div",{className:"flex flex-wrap gap-3",children:[se&&jsxs("button",{onClick:O,className:a(`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${v}`,n.secondaryButton||n.downloadButton,l),children:["Download Report (",I.toUpperCase(),")"]}),jsx("button",{onClick:()=>x(false),className:`px-4 py-2 bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-white rounded hover:bg-gray-300 dark:hover:bg-gray-600 ${v}`,children:"Edit Report"})]})]}):jsx("form",{onSubmit:z,children:jsxs("div",{className:"space-y-6",children:[jsxs("div",{children:[jsx("h3",{className:"text-lg font-semibold mb-3",children:"Notification Method"}),jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"method",className:"block text-sm font-medium mb-1",children:["Method of Submission ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("select",{id:"method",value:E,onChange:p=>H(p.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",required:true,children:ee()})]}),jsxs("div",{children:[jsx("label",{htmlFor:"referenceNumber",className:"block text-sm font-medium mb-1",children:"Reference Number (if available)"}),jsx("input",{type:"text",id:"referenceNumber",value:M,onChange:p=>X(p.target.value),placeholder:"e.g. NDPC/BR/2024/001",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"text-lg font-semibold mb-3",children:"NDPC Contact (if known)"}),jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[jsxs("div",{children:[jsx("label",{htmlFor:"contactName",className:"block text-sm font-medium mb-1",children:"Contact Name"}),jsx("input",{type:"text",id:"contactName",value:S,onChange:p=>j(p.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"contactEmail",className:"block text-sm font-medium mb-1",children:"Contact Email"}),jsx("input",{type:"email",id:"contactEmail",value:T,onChange:p=>q(p.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"contactPhone",className:"block text-sm font-medium mb-1",children:"Contact Phone"}),jsx("input",{type:"tel",id:"contactPhone",value:F,onChange:p=>U(p.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"text-lg font-semibold mb-3",children:"Additional Information"}),jsxs("div",{children:[jsx("label",{htmlFor:"additionalInfo",className:"block text-sm font-medium mb-1",children:"Additional Information to Include"}),jsx("textarea",{id:"additionalInfo",value:ie,onChange:p=>Y(p.target.value),rows:3,placeholder:"Any additional information you want to include in the report",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]}),L&&jsxs("div",{children:[jsx("h3",{className:"text-lg font-semibold mb-3",children:"Report Content"}),jsxs("div",{children:[jsxs("label",{htmlFor:"reportContent",className:"block text-sm font-medium mb-1",children:["Edit Report Content ",jsx("span",{className:"text-red-500",children:"*"})]}),jsx("textarea",{id:"reportContent",value:b,onChange:p=>P(p.target.value),rows:20,className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] font-mono text-sm",required:true})]})]}),jsxs("div",{className:"mt-6 p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md",children:[jsx("h3",{className:"text-sm font-bold text-blue-800 dark:text-blue-200 mb-2",children:"NDPA Breach Notification Requirements"}),jsx("p",{className:"text-blue-700 dark:text-blue-300 text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. This report will help you comply with this requirement."})]}),jsx("div",{className:"mt-6",children:jsx("button",{type:"submit",className:a(`px-6 py-3 bg-[rgb(var(--ndpr-primary))] text-white rounded-md hover:bg-[rgb(var(--ndpr-primary-hover))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))] focus:ring-offset-2 ${v}`,n.primaryButton||n.generateButton,l),children:ae})})]})})]})};export{xe as a,Se as b,Fe as c};//# sourceMappingURL=chunk-CYU6YUJQ.mjs.map
|
|
81
|
+
//# sourceMappingURL=chunk-CYU6YUJQ.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-7D2OIPHH.mjs';import {a as a$2}from'./chunk-6WIP33TW.mjs';import {c,a,b}from'./chunk-WWT2ZSNU.mjs';import {useRef,useState,useEffect,useCallback}from'react';function G(D,o){return o?a$2(D):{load:()=>null,save:()=>{},remove:()=>{}}}function Q({initialRequests:D=[],requestTypes:o,adapter:m,storageKey:O="ndpr_dsr_requests",useLocalStorage:P=true,onSubmit:p,onUpdate:f}){let y=m!=null?m:G(O,P),R=useRef(y);R.current=y;let[r,a$2]=useState(D),[x,l]=useState(true);useEffect(()=>{let e=false;try{let t=R.current.load();t instanceof Promise?t.then(s=>{e||(s&&a$2(s),l(!1));},()=>{e||l(!1);}):(t&&a$2(t),l(!1));}catch(t){e||l(false);}return ()=>{e=true;}},[]);let c$1=useCallback(e=>{Promise.resolve(R.current.save(e)).catch(t=>{console.warn("[ndpr-toolkit] Failed to save DSR requests:",t);});},[]),B=()=>"dsr_"+Date.now()+"_"+Math.random().toString(36).substr(2,9),I=useCallback(e=>{let t=o.find(g=>g.id===e.type),s=(t==null?void 0:t.estimatedCompletionTime)||30,n=Date.now(),i=n+s*24*60*60*1e3,b=e,{createdAt:A}=b,d=c(b,["createdAt"]),q=a({id:B(),status:"pending",createdAt:n,updatedAt:n,dueDate:i},d);return a$2(g=>{let v=[...g,q];return c$1(v),v}),p&&p(q),q},[o,c$1,p]),L=useCallback((e,t)=>{let s=null;return a$2(n=>{let i=n.findIndex(q=>q.id===e);if(i===-1)return n;let A=n[i];s=b(a(a({},A),t),{updatedAt:Date.now()});let d=[...n];return d[i]=s,c$1(d),d}),s&&f&&f(s),s},[c$1,f]),_=useCallback(e=>r.find(t=>t.id===e)||null,[r]),U=useCallback(e=>r.filter(t=>t.status===e),[r]),F=useCallback(e=>r.filter(t=>t.type===e),[r]),E=useCallback(e=>o.find(t=>t.id===e),[o]),K=useCallback(e=>{let{formattedRequest:t}=a$1(e);return t},[]),M=useCallback(()=>{a$2([]),Promise.resolve(R.current.remove()).catch(e=>{console.warn("[ndpr-toolkit] Failed to remove DSR requests:",e);});},[R]);return {requests:r,submitRequest:I,updateRequest:L,getRequest:_,getRequestsByStatus:U,getRequestsByType:F,getRequestType:E,formatRequest:K,clearRequests:M,isLoading:x}}export{Q as a};//# sourceMappingURL=chunk-DCJK5OZT.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-DCJK5OZT.mjs.map
|