@tantainnovative/ndpr-toolkit 5.7.3 → 5.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +49 -20
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-5JS3L4XF.js +1 -0
- package/dist/chunk-C6F5JJV6.mjs +1 -0
- package/dist/chunk-CUUM5U6W.js +2 -0
- package/dist/chunk-H5WABWMB.mjs +1 -0
- package/dist/chunk-ISCFIAKJ.js +2 -0
- package/dist/chunk-J5JG3K7E.js +1 -0
- package/dist/chunk-JNEQIRM5.mjs +1 -0
- package/dist/chunk-L5Z77INN.mjs +2 -0
- package/dist/chunk-TSA2C2YC.js +1 -0
- package/dist/chunk-UFQLC3KP.mjs +1 -0
- package/dist/chunk-WCC4EHKU.js +1 -0
- package/dist/chunk-YSCHSH6V.mjs +2 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- 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/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/package.json +6 -5
- package/dist/chunk-5ZMYNOMR.mjs +0 -2
- package/dist/chunk-6XG2OPON.js +0 -1
- package/dist/chunk-C5UYAOYX.mjs +0 -1
- package/dist/chunk-GF3ISEOU.js +0 -1
- package/dist/chunk-GNQC46WR.mjs +0 -1
- package/dist/chunk-HCZDQWHY.js +0 -2
- package/dist/chunk-LHQG25Y2.js +0 -2
- package/dist/chunk-ME77GU4Q.mjs +0 -2
- package/dist/chunk-OMDZJIJE.mjs +0 -1
- package/dist/chunk-PP4A2CUI.js +0 -1
- package/dist/chunk-T32YQT4Y.js +0 -1
- package/dist/chunk-Z6CH7TNQ.mjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## Changelog taxonomy
|
|
6
|
+
|
|
7
|
+
- **Features**: additive public APIs, components, hooks, routes, adapters, CLI behavior, or documented capabilities.
|
|
8
|
+
- **Bug Fixes**: corrections to shipped behavior, validation, packaging, security hardening, or regressions.
|
|
9
|
+
- **Documentation**: docs, examples, release guidance, legal citation wording, or site content that does not change package behavior.
|
|
10
|
+
- **Compliance Rule Changes**: changes to NDPA/NDPC/GAID assumptions, default thresholds, filing deadlines, citation mappings, scoring semantics, or compliance-sensitive validator behavior. These entries should name the affected source and module, and should say whether users need to re-run audits, update config, refresh evidence, or seek legal review.
|
|
11
|
+
|
|
12
|
+
Compliance-impacting examples:
|
|
13
|
+
|
|
14
|
+
- `Documentation`: clarify a citation block or add a stronger "not legal advice" notice.
|
|
15
|
+
- `Bug Fixes`: correct a false positive in `assessBreachNotification`.
|
|
16
|
+
- `Features`: add a new optional GAID check behind explicit config.
|
|
17
|
+
- `Compliance Rule Changes`: update DCPMI thresholds, CAR deadlines, breach notification content assumptions, or compliance score weights because NDPC guidance changed.
|
|
18
|
+
|
|
19
|
+
## [5.7.4](https://github.com/mr-tanta/ndpr-toolkit/compare/v5.7.3...v5.7.4) (2026-06-27)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
|
|
24
|
+
* clarify NDPA Toolkit / NDPA 2023 positioning while preserving NDPR package compatibility
|
|
25
|
+
* add the NDPR vs NDPA naming guide and link it from README and docs navigation
|
|
26
|
+
* update site, docs, recipes, and component metadata to lead with NDPA Toolkit while retaining NDPR search/package context
|
|
27
|
+
|
|
5
28
|
## [5.7.3](https://github.com/mr-tanta/ndpr-toolkit/compare/v5.7.2...v5.7.3) (2026-06-26)
|
|
6
29
|
|
|
7
30
|
|
package/README.md
CHANGED
|
@@ -9,23 +9,29 @@
|
|
|
9
9
|
[](https://github.com/mr-tanta/ndpr-toolkit/actions/workflows/ci.yml)
|
|
10
10
|
[](https://bundlephobia.com/package/@tantainnovative/ndpr-toolkit)
|
|
11
11
|
|
|
12
|
-
v5 ships **zero-config presets**, **pluggable storage adapters**, **compound components**, **structured-error validators**, a **compliance score engine**, and **seven shipped locales** (en, yo, ig, ha, pcm, ar, fr) — eight production-ready modules covering consent, data subject rights, DPIA, breach notification, privacy policies, lawful basis, cross-border transfers, and ROPA. **5.2–5.5 add an NDPC GAID 2025 layer**: a DCPMI
|
|
12
|
+
v5 ships **zero-config presets**, **pluggable storage adapters**, **compound components**, **structured-error validators**, a **compliance score engine**, and **seven shipped locales** (en, yo, ig, ha, pcm, ar, fr) — eight production-ready modules covering consent, data subject rights, DPIA, breach notification, privacy policies, lawful basis, cross-border transfers, and ROPA. **5.2–5.5 add an NDPC GAID 2025 layer**: a DCPMI designation classifier, a Compliance Audit Returns scheduler, a Section 40 / Article 33 breach-notification checker (wired live into `BreachReportForm`), and an **`ndpr audit` CLI** that gates compliance in CI.
|
|
13
13
|
|
|
14
14
|
**[Documentation](https://ndprtoolkit.com.ng)** | **[Live Demos](https://ndprtoolkit.com.ng/ndpr-demos)** | **[npm](https://www.npmjs.com/package/@tantainnovative/ndpr-toolkit)** | **[Blog](https://ndprtoolkit.com.ng/blog)** | **[Latest Release](https://github.com/mr-tanta/ndpr-toolkit/releases/latest)**
|
|
15
15
|
|
|
16
16
|
[](https://stackblitz.com/github/mr-tanta/ndpr-toolkit/tree/main/examples/nextjs-app)
|
|
17
17
|
[](https://codesandbox.io/p/github/mr-tanta/ndpr-toolkit/main/examples/nextjs-app)
|
|
18
18
|
|
|
19
|
-
> **What's new in 5.7.
|
|
19
|
+
> **What's new in 5.7.4:** The docs now lead with **NDPA Toolkit** / **NDPA 2023 compliance** while preserving the `@tantainnovative/ndpr-toolkit` package name for compatibility, legacy imports, and search continuity.
|
|
20
20
|
>
|
|
21
21
|
> **What's new in 5.5:** The **`ndpr audit` CLI** scores a compliance config against the toolkit engine (compliance score + GAID 2025 DCPMI / CAR / breach checks) and exits non-zero on failure — a drop-in CI gate. The same logic is exported as `runNdprAudit` / `formatNdprAuditReport` from `/server`. See the [audit CLI guide](https://ndprtoolkit.com.ng/docs/guides/audit-cli).
|
|
22
22
|
>
|
|
23
|
-
> **NDPC GAID 2025 utilities (5.2–5.4):** `classifyDCPMI` (DCPMI
|
|
23
|
+
> **NDPC GAID 2025 utilities (5.2–5.4):** `classifyDCPMI` (DCPMI designation tier + fee estimate), `generateComplianceAuditReturn` (CAR initial-audit + annual filing schedule), and `assessBreachNotification` (Section 40 / Article 33 notification completeness) — each pure, React-free, and exposed as a hook. `BreachReportForm` now renders a live NDPC-notification readiness panel as it's filled in.
|
|
24
24
|
>
|
|
25
25
|
> **Earlier highlights:** Structured-result validators are the only shape — `{ field, code, message }[]` with stable codes; uniform `onAdd` / `onUpdate` / `onArchive` callbacks; `NDPRDPIA.onResult(result)` (5.0). Arabic + French locales with RTL-correct CSS (4.1.0). React 17 dropped; `^18 || ^19` (4.0.0). Full history in the [CHANGELOG](https://github.com/mr-tanta/ndpr-toolkit/blob/main/CHANGELOG.md).
|
|
26
26
|
|
|
27
|
+
> **Legal source transparency:** See [Legal Basis & Citations](https://ndprtoolkit.com.ng/docs/guides/legal-basis-and-citations) for NDPA 2023 module references, NDPC GAID 2025 DCPMI/CAR utility references, and audit CLI boundaries, plus the linked governance policy for regulatory changes.
|
|
28
|
+
>
|
|
29
|
+
> **Naming note:** The npm package remains `@tantainnovative/ndpr-toolkit` for compatibility and search continuity, but current legal positioning is **NDPA Toolkit** / **NDPA 2023 compliance**. See [NDPR vs NDPA Naming](https://ndprtoolkit.com.ng/docs/guides/ndpr-vs-ndpa-naming).
|
|
30
|
+
>
|
|
31
|
+
> **Compliance updates:** Watch [GitHub Releases](https://github.com/mr-tanta/ndpr-toolkit/releases) or npm version updates for compliance-impacting changes. Release notes call out NDPA/NDPC/GAID rule changes separately from features, bug fixes, and docs. The toolkit is implementation support, not legal advice; verify current NDPC guidance before relying on outputs for regulated filings or audit evidence.
|
|
32
|
+
|
|
27
33
|
<p align="center">
|
|
28
|
-
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/
|
|
34
|
+
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/main/public/screenshots/hero.png" alt="NDPA Toolkit — NDPA Compliance Made Beautiful" width="800" />
|
|
29
35
|
</p>
|
|
30
36
|
|
|
31
37
|
---
|
|
@@ -75,7 +81,7 @@ import { cookieAdapter, apiAdapter, composeAdapters, localStorageAdapter } from
|
|
|
75
81
|
The full SSR pattern (cookie read server-side → banner hydrates already-resolved, no flash) is in the [Server-Side Storage guide](https://ndprtoolkit.com.ng/docs/guides/server-side-storage).
|
|
76
82
|
|
|
77
83
|
<p align="center">
|
|
78
|
-
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/
|
|
84
|
+
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/main/public/screenshots/consent-demo.png" alt="Consent Management Demo — interactive consent banner with state inspector" width="800" />
|
|
79
85
|
<br />
|
|
80
86
|
<em>Interactive consent demo with configurable position, theme, storage, and real-time state inspector</em>
|
|
81
87
|
</p>
|
|
@@ -87,13 +93,16 @@ The full SSR pattern (cookie read server-side → banner hydrates already-resolv
|
|
|
87
93
|
The toolkit is used by Nigerian software, operations, education, laboratory, and compliance teams, including:
|
|
88
94
|
|
|
89
95
|
- [Perkflow Inc](https://perkflow.io)
|
|
90
|
-
- [Finlab Nigeria](https://
|
|
96
|
+
- [Finlab Nigeria](https://ndprtoolkit.com.ng/case-studies#finlab-nigeria-privacy-readiness)
|
|
91
97
|
- [Burtech Products](https://burtechproducts.com)
|
|
92
98
|
- [Chibek Instruments](https://chibek.com)
|
|
93
99
|
- NGtaxkit
|
|
94
|
-
- [Tanta Innovative](https://
|
|
100
|
+
- [Tanta Innovative](https://ndprtoolkit.com.ng/case-studies#tanta-innovative-internal-compliance)
|
|
95
101
|
|
|
96
|
-
Only teams approved for public listing are included here and on the docs site.
|
|
102
|
+
Only teams approved for public listing are included here and on the docs site. See the
|
|
103
|
+
[case studies and implementation stories](https://ndprtoolkit.com.ng/case-studies) for
|
|
104
|
+
approved proof assets; they describe implementation paths and modules used without claiming
|
|
105
|
+
legal certification, regulator approval, or unapproved business metrics.
|
|
97
106
|
|
|
98
107
|
---
|
|
99
108
|
|
|
@@ -468,11 +477,11 @@ import { NDPRComplianceDashboard } from '@tantainnovative/ndpr-toolkit/presets';
|
|
|
468
477
|
|
|
469
478
|
---
|
|
470
479
|
|
|
471
|
-
## DCPMI & Compliance Audit Returns
|
|
480
|
+
## DCPMI Designation & Compliance Audit Returns
|
|
472
481
|
|
|
473
|
-
Two pure utilities for the NDPC **General Application and Implementation Directive (GAID) 2025** registration regime — no React, safe to run server-side or in CI.
|
|
482
|
+
Two pure utilities for the NDPC **General Application and Implementation Directive (GAID) 2025** registration regime — no React, safe to run server-side or in CI. DCPMI here is a designation/classification utility, not a ninth NDPA module or a substitute for DPCO-led registration.
|
|
474
483
|
|
|
475
|
-
`classifyDCPMI()` derives an organisation's **Data Controller/Processor of Major Importance** tier from the number of data subjects processed in a six-month window, with its annual registration fee and filing obligations:
|
|
484
|
+
`classifyDCPMI()` derives an organisation's **Data Controller/Processor of Major Importance** designation tier from the number of data subjects processed in a six-month window, with its annual registration fee estimate and filing obligations:
|
|
476
485
|
|
|
477
486
|
```ts
|
|
478
487
|
import { classifyDCPMI } from '@tantainnovative/ndpr-toolkit/core';
|
|
@@ -614,7 +623,7 @@ Compliance score: 82/100 (good) — minimum 70
|
|
|
614
623
|
82/100 (good); minimum 70.
|
|
615
624
|
! Minor (child) data protection controls (Section 31)
|
|
616
625
|
Implement age-verification and parental-consent controls for processing data of minors.
|
|
617
|
-
✓ DCPMI
|
|
626
|
+
✓ DCPMI designation (GAID 2025)
|
|
618
627
|
Not a Data Controller/Processor of Major Importance by volume.
|
|
619
628
|
|
|
620
629
|
2 passed, 3 warning(s), 0 failed
|
|
@@ -645,18 +654,38 @@ Detects Next.js (App Router or Pages Router) or Express, prompts for your ORM (P
|
|
|
645
654
|
|
|
646
655
|
### Backend recipes
|
|
647
656
|
|
|
648
|
-
`@tantainnovative/ndpr-recipes` is a
|
|
657
|
+
`@tantainnovative/ndpr-recipes` is the companion npm package for production backend templates. Install it as a pinned source package, copy the files you need into your app, and adapt them to your auth, tenancy, database, and audit-log conventions:
|
|
658
|
+
|
|
659
|
+
```bash
|
|
660
|
+
pnpm add @tantainnovative/ndpr-toolkit
|
|
661
|
+
pnpm add -D @tantainnovative/ndpr-recipes
|
|
662
|
+
```
|
|
663
|
+
|
|
664
|
+
See the [Production Recipes guide](https://ndprtoolkit.com.ng/docs/guides/production-recipes) for the recommended handoff path.
|
|
649
665
|
|
|
650
666
|
| Recipe | What you get |
|
|
651
667
|
|--------|-------------|
|
|
652
|
-
| `prisma/schema.prisma` |
|
|
668
|
+
| `prisma/schema.prisma` | NDPA compliance tables for consent, DSR, breach, ROPA, DPIA, and audit logs |
|
|
653
669
|
| `src/adapters/prisma-consent.ts` | Prisma `StorageAdapter<ConsentSettings>` |
|
|
654
670
|
| `src/adapters/drizzle-consent.ts` | Drizzle `StorageAdapter<ConsentSettings>` |
|
|
655
|
-
| `src/nextjs/app-router/` | Consent, DSR, Breach, ROPA, compliance route handlers |
|
|
656
|
-
| `src/express/` | Full
|
|
671
|
+
| `src/nextjs/app-router/` | Consent, DSR, Breach, DPIA, ROPA, compliance route handlers; consent, breach, DPIA, and ROPA validate before writes |
|
|
672
|
+
| `src/express/` | Full NDPA compliance router with consent, DSR, DPIA, breach, ROPA routes; breach, DPIA, and ROPA validate before writes |
|
|
657
673
|
| `src/nextjs/app-router/middleware.ts` | Next.js consent gate middleware |
|
|
658
674
|
|
|
659
|
-
Copy
|
|
675
|
+
Copy from `node_modules/@tantainnovative/ndpr-recipes` for a pinned version, or [browse the recipes on GitHub](https://github.com/mr-tanta/ndpr-toolkit/tree/main/packages/ndpr-recipes).
|
|
676
|
+
|
|
677
|
+
The runnable examples cover the first production handoff paths:
|
|
678
|
+
|
|
679
|
+
| Example | What it demonstrates |
|
|
680
|
+
|---------|----------------------|
|
|
681
|
+
| [`examples/nextjs-app`](./examples/nextjs-app) | App Router consent endpoint that validates with `validateConsentStructured`, stores the current consent snapshot, and appends consent audit events. |
|
|
682
|
+
| [`examples/dsr-backend-reference`](./examples/dsr-backend-reference) | DSR intake endpoint with server validation, Prisma persistence, reference IDs, 30-day target dates, and best-effort confirmation email. |
|
|
683
|
+
|
|
684
|
+
The ROPA recipes now enforce the toolkit's production completeness checks before persistence. Include controller details, lawful-basis justification, data-subject categories, recipients, retention, security measures, and `dpiaReference` when `dpiaRequired` is true.
|
|
685
|
+
|
|
686
|
+
The breach recipes validate incident intake dates, reporter email, affected systems, data types, and lifecycle update values before persistence. Create/detail responses include `ndpcReadiness` from `assessBreachNotification` so DPO workflows can see missing GAID 2025 Article 33 notification content and 72-hour deadline status.
|
|
687
|
+
|
|
688
|
+
The DPIA recipes now provide maintained Next.js and Express persistence routes for `DPIARecord`, with validation for project metadata, `dpiaData`, risk level, score, status, and audit-log writes before records are created, updated, or deleted.
|
|
660
689
|
|
|
661
690
|
---
|
|
662
691
|
|
|
@@ -666,13 +695,13 @@ Every module has an interactive demo. No signup, no setup — try them instantly
|
|
|
666
695
|
|
|
667
696
|
<p align="center">
|
|
668
697
|
<a href="https://ndprtoolkit.com.ng/ndpr-demos">
|
|
669
|
-
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/
|
|
698
|
+
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/main/public/screenshots/demos-overview.png" alt="8 interactive live demos — zero setup required" width="800" />
|
|
670
699
|
</a>
|
|
671
700
|
</p>
|
|
672
701
|
|
|
673
702
|
<p align="center">
|
|
674
|
-
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/
|
|
675
|
-
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/
|
|
703
|
+
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/main/public/screenshots/dsr-demo.png" alt="Data Subject Rights — 8 rights with request tracking" width="400" />
|
|
704
|
+
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/main/public/screenshots/breach-demo.png" alt="Breach Notification — 72-hour countdown with step-by-step workflow" width="400" />
|
|
676
705
|
</p>
|
|
677
706
|
|
|
678
707
|
<p align="center">
|
package/dist/breach.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var chunkC7OOUURS_js=require('./chunk-C7OOUURS.js'),
|
|
2
|
+
'use strict';var chunkC7OOUURS_js=require('./chunk-C7OOUURS.js'),chunkCUUM5U6W_js=require('./chunk-CUUM5U6W.js'),chunkEHQVTFYO_js=require('./chunk-EHQVTFYO.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js');require('./chunk-Y346CURW.js'),require('./chunk-UXUMYP4L.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-I5ZDNSX5.js'),require('./chunk-7563FVMY.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var c=react.createContext(null);function P(){let e=react.useContext(c);if(!e)throw new Error("Breach compound components must be wrapped in <Breach.Provider>. Example: <Breach.Provider categories={...}><Breach.ReportForm /></Breach.Provider>");return e}var p=({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u,children:d})=>{let y=chunkEHQVTFYO_js.a({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u}),l=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},y),{categories:e});return jsxRuntime.jsx(c.Provider,{value:l,children:d})};var A={Provider:p,ReportForm:chunkCUUM5U6W_js.a,RiskAssessment:chunkC7OOUURS_js.a,NotificationManager:chunkC7OOUURS_js.b,ReportGenerator:chunkC7OOUURS_js.c};Object.defineProperty(exports,"BreachNotificationManager",{enumerable:true,get:function(){return chunkC7OOUURS_js.b}});Object.defineProperty(exports,"BreachRiskAssessment",{enumerable:true,get:function(){return chunkC7OOUURS_js.a}});Object.defineProperty(exports,"RegulatoryReportGenerator",{enumerable:true,get:function(){return chunkC7OOUURS_js.c}});Object.defineProperty(exports,"BreachReportForm",{enumerable:true,get:function(){return chunkCUUM5U6W_js.a}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkEHQVTFYO_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});exports.Breach=A;exports.BreachProvider=p;exports.useBreachCompound=P;
|
package/dist/breach.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {c as c$1,b,a}from'./chunk-EF5CLD4V.mjs';export{b as BreachNotificationManager,a as BreachRiskAssessment,c as RegulatoryReportGenerator}from'./chunk-EF5CLD4V.mjs';import {a as a$1}from'./chunk-
|
|
2
|
+
import {c as c$1,b,a}from'./chunk-EF5CLD4V.mjs';export{b as BreachNotificationManager,a as BreachRiskAssessment,c as RegulatoryReportGenerator}from'./chunk-EF5CLD4V.mjs';import {a as a$1}from'./chunk-YSCHSH6V.mjs';export{a as BreachReportForm}from'./chunk-YSCHSH6V.mjs';import {a as a$2}from'./chunk-RFXGD5NE.mjs';export{a as useBreach}from'./chunk-RFXGD5NE.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';import'./chunk-WJSUVPYX.mjs';import'./chunk-EWVK45Z3.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-DBZSN4WP.mjs';import {b as b$1,a as a$3}from'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var c=createContext(null);function P(){let e=useContext(c);if(!e)throw new Error("Breach compound components must be wrapped in <Breach.Provider>. Example: <Breach.Provider categories={...}><Breach.ReportForm /></Breach.Provider>");return e}var p=({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u,children:d})=>{let y=a$2({categories:e,adapter:m,storageKey:h,useLocalStorage:B,initialReports:f,onReport:R,onAssessment:x,onNotification:u}),l=b$1(a$3({},y),{categories:e});return jsx(c.Provider,{value:l,children:d})};var A={Provider:p,ReportForm:a$1,RiskAssessment:a,NotificationManager:b,ReportGenerator:c$1};export{A as Breach,p as BreachProvider,P as useBreachCompound};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkUSD363RW_js=require('./chunk-USD363RW.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react');function H(T,l){return l?chunkVWED6UTN_js.a(T):{load:()=>null,save:()=>{},remove:()=>{}}}function X({initialTransfers:T=[],adapter:l,storageKey:x="ndpr_cross_border_transfers",useLocalStorage:M=true,onAdd:v,onUpdate:C,onRemove:B}={}){let S=l!=null?l:H(x,M),A=react.useRef(S);A.current=S;let[a,D]=react.useState(T),[k,p]=react.useState(true),m=react.useRef(T),o=react.useCallback(r=>{m.current=r,D(r);},[]);react.useEffect(()=>{let r=false;try{let e=A.current.load();e instanceof Promise?e.then(t=>{r||(t&&o(t),p(!1));},()=>{r||p(!1);}):(e&&o(e),p(!1));}catch(e){r||p(false);}return ()=>{r=true;}},[o]);let f=react.useCallback(r=>{Promise.resolve(A.current.save(r)).catch(e=>{console.warn("[ndpr-toolkit] Failed to save cross-border transfers:",e);});},[]),I=()=>"cbt_"+Date.now()+"_"+Math.random().toString(36).substring(2,11),L=react.useCallback(r=>{let e=Date.now(),t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{id:I(),createdAt:e,updatedAt:e}),n=[...m.current,t];return o(n),f(n),v&&v(t),t},[v,o,f]),U=react.useCallback((r,e)=>{let t=m.current,n=t.findIndex(h=>h.id===r);if(n===-1)return null;let i=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},t[n]),e),{updatedAt:Date.now()}),c=[...t];return c[n]=i,o(c),f(c),C&&C(i),i},[C,o,f]),O=react.useCallback(r=>{let e=m.current;if(e.findIndex(i=>i.id===r)===-1)return;let n=e.filter(i=>i.id!==r);o(n),f(n),B&&B(r);},[B,o,f]),P=react.useCallback(r=>a.find(e=>e.id===r)||null,[a]),V=react.useCallback(()=>{let r=Date.now(),e=a.filter(s=>s.status==="active"),t=["adequacy_decision","standard_clauses","binding_corporate_rules","ndpc_authorization","explicit_consent","contract_performance","public_interest","legal_claims","vital_interests"],n={};for(let s of t)n[s]=e.filter(u=>u.transferMechanism===s).length;let i=["adequate","inadequate","pending_review","unknown"],c={};for(let s of i)c[s]=e.filter(u=>u.adequacyStatus===s).length;let h=a.filter(s=>{var u,_;return s.status==="pending_approval"||((u=s.ndpcApproval)==null?void 0:u.required)&&!((_=s.ndpcApproval)!=null&&_.approved)}),z=720*60*60*1e3,E=a.filter(s=>s.reviewDate&&s.reviewDate<=r+z&&s.status==="active"),K=a.filter(s=>!s.tiaCompleted&&s.status==="active"),j=a.filter(s=>s.riskLevel==="high"&&s.status==="active");return {totalActiveTransfers:e.length,byMechanism:n,byAdequacy:c,pendingApproval:h,dueForReview:E,missingTIA:K,highRiskTransfers:j,lastUpdated:r}},[a]),F=react.useCallback(r=>chunkUSD363RW_js.h(r),[]);return {transfers:a,addTransfer:L,updateTransfer:U,removeTransfer:O,getTransfer:P,getSummary:V,validateTransfer:F,isLoading:k}}exports.a=X;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d,a as a$1}from'./chunk-LWIKDDSU.mjs';import {a as a$2}from'./chunk-DBZSN4WP.mjs';import {b,a}from'./chunk-ZJYULEER.mjs';import {useRef,useState,useCallback,useEffect}from'react';function M(u,a){return a?a$2(u):{load:()=>null,save:()=>{},remove:()=>{}}}function H({initialActivities:u=[],adapter:a$2,storageKey:x="ndpr_lawful_basis_activities",useLocalStorage:_=true,onAdd:g,onUpdate:A,onRemove:y}={}){let w=a$2!=null?a$2:M(x,_),f=useRef(w);f.current=w;let[o,h]=useState(u),[O,l]=useState(true),v=useRef(u),s=useCallback(t=>{v.current=t,h(t);},[]);useEffect(()=>{let t=false;try{let i=f.current.load();i instanceof Promise?i.then(e=>{t||(e&&s(e),l(!1));},()=>{t||l(!1);}):(i&&s(i),l(!1));}catch(i){t||l(false);}return ()=>{t=true;}},[s]);let n=useCallback(t=>{Promise.resolve(f.current.save(t)).catch(i=>{console.warn("[ndpr-toolkit] Failed to save lawful basis activities:",i);});},[]),D=()=>"lb_"+Date.now()+"_"+Math.random().toString(36).substring(2,11),I=useCallback(t=>{let i=Date.now(),e=b(a({},t),{id:D(),createdAt:i,updatedAt:i}),c=[...v.current,e];return s(c),n(c),g&&g(e),e},[g,s,n]),U=useCallback((t,i)=>{let e=v.current,c=e.findIndex(F=>F.id===t);if(c===-1)return null;let m=b(a(a({},e[c]),i),{id:e[c].id,updatedAt:Date.now()}),P=[...e];return P[c]=m,s(P),n(P),A&&A(m),m},[A,s,n]),V=useCallback(t=>{let i=v.current.filter(e=>e.id!==t);s(i),n(i),y&&y(t);},[y,s,n]),k=useCallback(t=>o.find(i=>i.id===t)||null,[o]),C=useCallback(()=>d(o),[o]),E=useCallback(t=>a$1(t),[]);return {activities:o,addActivity:I,updateActivity:U,removeActivity:V,getActivity:k,getSummary:C,validateActivity:E,isLoading:O}}export{H as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkY346CURW_js=require('./chunk-Y346CURW.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),chunkI5ZDNSX5_js=require('./chunk-I5ZDNSX5.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var Ct=({categories:Je,onSubmit:Qe,onValidationError:z,title:Y,description:H,submitButtonText:U,className:te="",buttonClassName:re="",classNames:d={},unstyled:c=false,isSubmitting:S=false,showConfirmation:Xe=true,confirmationMessage:Ve="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:et=true,maxAttachments:G=5,maxFileSize:Z=5*1024*1024,allowedFileTypes:K=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:r,onReset:W,showCompleteness:tt=true})=>{var ke,qe,je,Te,Ie,Be,Ee,Me,$e,Oe,Le,ze,Ye,He;let J=chunkI5ZDNSX5_js.c(),rt=(ke=Y!=null?Y:J.breach.title)!=null?ke:"Report a Data Breach",it=(qe=H!=null?H:J.breach.description)!=null?qe:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",at=(je=U!=null?U:J.breach.submitReport)!=null?je:"Submit Report",ie=t=>{if(!t)return "";let o=new Date(t),p=s=>String(s).padStart(2,"0");return `${o.getFullYear()}-${p(o.getMonth()+1)}-${p(o.getDate())}T${p(o.getHours())}:${p(o.getMinutes())}`},[D,ae]=react.useState((r==null?void 0:r.title)||""),[A,ne]=react.useState((r==null?void 0:r.description)||""),[R,oe]=react.useState((r==null?void 0:r.category)||""),[h,se]=react.useState(ie(r==null?void 0:r.discoveredAt)),[v,de]=react.useState(ie(r==null?void 0:r.occurredAt)),[w,me]=react.useState(((Te=r==null?void 0:r.reporter)==null?void 0:Te.name)||""),[N,ce]=react.useState(((Ie=r==null?void 0:r.reporter)==null?void 0:Ie.email)||""),[P,le]=react.useState(((Be=r==null?void 0:r.reporter)==null?void 0:Be.department)||""),[F,pe]=react.useState(((Ee=r==null?void 0:r.reporter)==null?void 0:Ee.phone)||""),[M,ge]=react.useState((r==null?void 0:r.affectedSystems)||[]),[nt,fe]=react.useState(((Me=r==null?void 0:r.affectedSystems)==null?void 0:Me.join(", "))||""),[k,be]=react.useState((r==null?void 0:r.dataTypes)||[]),[b,he]=react.useState((r==null?void 0:r.estimatedAffectedSubjects)!=null?String(r.estimatedAffectedSubjects):""),[u,ve]=react.useState((r==null?void 0:r.approximateRecordCount)!=null?String(r.approximateRecordCount):""),[y,Ne]=react.useState((($e=r==null?void 0:r.dataSubjectCategories)==null?void 0:$e.join(", "))||""),[q,ue]=react.useState((Oe=r==null?void 0:r.involvesSensitiveData)!=null?Oe:false),[j,ye]=react.useState((r==null?void 0:r.likelyConsequences)||""),[T,_e]=react.useState((r==null?void 0:r.mitigationMeasures)||""),[_,xe]=react.useState(((Le=r==null?void 0:r.dpoContact)==null?void 0:Le.name)||""),[x,Ce]=react.useState(((ze=r==null?void 0:r.dpoContact)==null?void 0:ze.email)||""),[I,Se]=react.useState(((Ye=r==null?void 0:r.dpoContact)==null?void 0:Ye.phone)||""),[Q,De]=react.useState((He=r==null?void 0:r.isPhasedReport)!=null?He:false),[X,Ae]=react.useState((r==null?void 0:r.supplementsReportId)||""),[$,Re]=react.useState((r==null?void 0:r.status)||"ongoing"),[B,we]=react.useState((r==null?void 0:r.initialActions)||""),[O,V]=react.useState([]),[ot,ee]=react.useState(false),[a,E]=react.useState({}),g=react.useMemo(()=>{let t={id:"",title:D,description:A,category:R,discoveredAt:h?new Date(h).getTime():NaN,occurredAt:v?new Date(v).getTime():void 0,reportedAt:0,reporter:{name:w,email:N,department:P,phone:F||void 0},affectedSystems:M,dataTypes:k,estimatedAffectedSubjects:b?Number(b):void 0,approximateRecordCount:u?Number(u):void 0,dataSubjectCategories:y?y.split(",").map(o=>o.trim()).filter(Boolean):void 0,involvesSensitiveData:q,likelyConsequences:j||void 0,mitigationMeasures:T||void 0,dpoContact:_||x?{name:_,email:x,phone:I||void 0}:void 0,status:$,initialActions:B||void 0};return chunkY346CURW_js.a(t,{highRisk:q})},[D,A,R,h,v,w,N,P,F,M,k,b,u,y,q,j,T,_,x,I,$,B]),Pe=[...g.notificationToCommission,...g.dataSubjectCommunication],Fe=Pe.length,st=Fe-g.missing.length,dt=()=>{ae(""),ne(""),oe(""),se(""),de(""),me(""),ce(""),le(""),pe(""),ge([]),fe(""),be([]),he(""),ve(""),Ne(""),ue(false),ye(""),_e(""),xe(""),Ce(""),Se(""),De(false),Ae(""),Re("ongoing"),we(""),V([]),ee(false),E({}),W==null||W();},mt=t=>{let o=t.target.value;fe(o);let p=o.split(",").map(s=>s.trim()).filter(Boolean);ge(p);},ct=t=>{be(o=>o.includes(t)?o.filter(p=>p!==t):[...o,t]);},lt=t=>{var Ue;let o=t.target.files;if(!o)return;let p=[],s={};if(O.length+o.length>G){s.attachments=`Maximum of ${G} files allowed`,E(f=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},f),s));return}for(let f=0;f<o.length;f++){let L=o[f];if(L.size>Z){s.attachments=`File ${L.name} exceeds the maximum size of ${Z/(1024*1024)}MB`;continue}let Ge="."+((Ue=L.name.split(".").pop())==null?void 0:Ue.toLowerCase());if(!K.includes(Ge)){s.attachments=`File type ${Ge} is not allowed`;continue}p.push(L);}p.length>0&&V(f=>[...f,...p]),Object.keys(s).length>0?E(f=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},f),s)):E(f=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},f),{attachments:""}));},pt=t=>{V(o=>o.filter((p,s)=>s!==t));},gt=()=>{let t={};return D.trim()||(t.breachTitle="Breach title is required"),A.trim()||(t.description="Description is required"),R||(t.category="Category is required"),h||(t.discoveredAt="Discovery date is required"),w.trim()||(t.reporterName="Reporter name is required"),N.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(N)||(t.reporterEmail="Reporter email is invalid"):t.reporterEmail="Reporter email is required",P.trim()||(t.reporterDepartment="Reporter department is required"),M.length===0&&(t.affectedSystems="At least one affected system is required"),k.length===0&&(t.dataTypes="At least one data type is required"),b&&isNaN(Number(b))&&(t.estimatedAffectedSubjects="Estimated affected subjects must be a number"),E(t),t},ft=t=>{t.preventDefault();let o=gt();if(Object.keys(o).length>0){z==null||z(o);return}let p={title:chunkUXUMYP4L_js.a(D),description:chunkUXUMYP4L_js.a(A),category:R,discoveredAt:new Date(h).getTime(),occurredAt:v?new Date(v).getTime():void 0,reportedAt:Date.now(),reporter:{name:chunkUXUMYP4L_js.a(w),email:chunkUXUMYP4L_js.a(N),department:chunkUXUMYP4L_js.a(P),phone:F?chunkUXUMYP4L_js.a(F):void 0},affectedSystems:M.map(s=>chunkUXUMYP4L_js.a(s)),dataTypes:k,estimatedAffectedSubjects:b?Number(b):void 0,approximateRecordCount:u?Number(u):void 0,dataSubjectCategories:y?y.split(",").map(s=>chunkUXUMYP4L_js.a(s.trim())).filter(Boolean):void 0,involvesSensitiveData:q,likelyConsequences:j?chunkUXUMYP4L_js.a(j):void 0,mitigationMeasures:T?chunkUXUMYP4L_js.a(T):void 0,dpoContact:_||x?{name:chunkUXUMYP4L_js.a(_),email:chunkUXUMYP4L_js.a(x),phone:I?chunkUXUMYP4L_js.a(I):void 0}:void 0,isPhasedReport:Q||void 0,supplementsReportId:X?chunkUXUMYP4L_js.a(X):void 0,status:$,initialActions:B?chunkUXUMYP4L_js.a(B):void 0,attachments:O.map(s=>({name:s.name,type:s.type,size:s.size,file:s}))};Qe(p),Xe&&ee(true);};if(ot)return jsxRuntime.jsxs("div",{"data-ndpr-component":"breach-report-form",className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${te}`,children:[jsxRuntime.jsx("h2",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Submitted"}),jsxRuntime.jsx("p",{className:"ndpr-text-success",children:Ve}),jsxRuntime.jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-md",children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold ndpr-text-warning mb-2",children:"Important: Next Steps"}),jsxRuntime.jsx("p",{className:"ndpr-text-warning text-sm",children:"Under the NDPA (Section 40), data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxRuntime.jsx("button",{onClick:()=>ee(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${re}`,children:"Report Another Breach"})]});let bt=[{id:"personal",label:"Personal Information (names, addresses)"},{id:"contact",label:"Contact Information (email, phone)"},{id:"financial",label:"Financial Information (bank details, payment info)"},{id:"health",label:"Health Information"},{id:"identification",label:"Identification Documents (ID cards, passports)"},{id:"login",label:"Login Credentials"},{id:"biometric",label:"Biometric Data"},{id:"children",label:"Children's Data"},{id:"location",label:"Location Data"},{id:"communications",label:"Communications Content"}];return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${te}`,d.root,c),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",d.title,c),children:rt}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:it}),tt&&jsxRuntime.jsxs("div",{"data-ndpr-section":"breach-completeness",className:chunkAME4HJR4_js.a("ndpr-alert ndpr-alert--info mb-4",d.completeness,c),children:[jsxRuntime.jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold ndpr-text-info",children:"NDPC notification readiness"}),jsxRuntime.jsxs("span",{className:"text-sm font-semibold ndpr-text-info",children:[g.completeness,"%"]})]}),jsxRuntime.jsx("div",{role:"progressbar","aria-valuenow":g.completeness,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Breach notification completeness",className:"h-2 w-full rounded bg-gray-200 dark:bg-gray-700 overflow-hidden mb-2",children:jsxRuntime.jsx("div",{className:"h-full bg-[rgb(var(--ndpr-primary))]",style:{width:`${g.completeness}%`}})}),jsxRuntime.jsxs("p",{className:"text-sm ndpr-text-info",children:[st," of ",Fe," mandated items provided (GAID 2025 Art. 33(5) / NDPA S. 40(2))."]}),Number.isFinite(g.timing.deadline)?g.timing.overdue?jsxRuntime.jsxs("p",{className:"text-sm ndpr-text-warning mt-1",children:["72-hour deadline passed ",Math.abs(g.timing.hoursRemaining),"h ago \u2014 notify the NDPC now and state the reason for the delay (NDPA S. 40(2))."]}):jsxRuntime.jsxs("p",{className:"text-sm ndpr-text-info mt-1",children:[Math.max(0,g.timing.hoursRemaining),"h remaining to notify the NDPC (72-hour window, NDPA S. 40(2))."]}):jsxRuntime.jsx("p",{className:"text-sm ndpr-text-muted mt-1",children:"Set the discovery date to start the 72-hour clock."}),g.dataSubjectCommunicationRequired&&jsxRuntime.jsx("p",{className:"text-sm ndpr-text-warning mt-1",children:"High risk: affected data subjects must be notified in plain, clear language (NDPA S. 40(3))."}),g.missing.length>0&&jsxRuntime.jsxs("details",{className:"mt-2",children:[jsxRuntime.jsxs("summary",{className:"text-sm ndpr-text-info cursor-pointer",children:[g.missing.length," item(s) still needed"]}),jsxRuntime.jsx("ul",{className:"mt-1 list-disc pl-5",children:Pe.filter(t=>!t.satisfied).map(t=>jsxRuntime.jsxs("li",{className:"text-xs ndpr-text-muted",children:[t.label," ",jsxRuntime.jsxs("span",{className:"opacity-70",children:["(",t.section,")"]})]},t.id))})]})]}),jsxRuntime.jsx("form",{onSubmit:ft,className:chunkAME4HJR4_js.a("",d.form,c),children:jsxRuntime.jsxs("div",{className:"ndpr-form-section",children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",d.fieldGroup,c),children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Breach Information"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"breachTitle",className:chunkAME4HJR4_js.a("ndpr-form-field__label",d.label,c),children:["Breach Title/Summary ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"breachTitle",value:D,onChange:t=>ae(t.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.input,c),required:true,"aria-invalid":!!a.breachTitle,"aria-describedby":a.breachTitle?"breachTitle-error":void 0}),a.breachTitle&&jsxRuntime.jsx("p",{id:"breachTitle-error",role:"alert",className:"ndpr-form-field__error",children:a.breachTitle})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"category",className:chunkAME4HJR4_js.a("ndpr-form-field__label",d.label,c),children:["Breach Category ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsxs("select",{id:"category",value:R,onChange:t=>oe(t.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.select,c),required:true,"aria-invalid":!!a.category,"aria-describedby":a.category?"category-error":void 0,children:[jsxRuntime.jsx("option",{value:"",children:"Select a category"}),Je.map(t=>jsxRuntime.jsx("option",{value:t.id,children:t.name},t.id))]}),a.category&&jsxRuntime.jsx("p",{id:"category-error",role:"alert",className:"ndpr-form-field__error",children:a.category})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsxs("label",{htmlFor:"description",className:chunkAME4HJR4_js.a("ndpr-form-field__label",d.label,c),children:["Detailed Description ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("textarea",{id:"description",value:A,onChange:t=>ne(t.target.value),rows:4,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c),required:true,"aria-invalid":!!a.description,"aria-describedby":a.description?"description-error":void 0}),a.description&&jsxRuntime.jsx("p",{id:"description-error",role:"alert",className:"ndpr-form-field__error",children:a.description})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"discoveredAt",className:"ndpr-form-field__label",children:["Date Discovered ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"datetime-local",id:"discoveredAt",value:h,onChange:t=>se(t.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.discoveredAt,"aria-describedby":a.discoveredAt?"discoveredAt-error":void 0}),a.discoveredAt&&jsxRuntime.jsx("p",{id:"discoveredAt-error",role:"alert",className:"ndpr-form-field__error",children:a.discoveredAt})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"occurredAt",className:"ndpr-form-field__label",children:"Date Occurred (if known)"}),jsxRuntime.jsx("input",{type:"datetime-local",id:"occurredAt",value:v,onChange:t=>de(t.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Reporter Information"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterName",className:"ndpr-form-field__label",children:["Your Name ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"reporterName",value:w,onChange:t=>me(t.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.reporterName,"aria-describedby":a.reporterName?"reporterName-error":void 0}),a.reporterName&&jsxRuntime.jsx("p",{id:"reporterName-error",role:"alert",className:"ndpr-form-field__error",children:a.reporterName})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterEmail",className:"ndpr-form-field__label",children:["Your Email ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"email",id:"reporterEmail",value:N,onChange:t=>ce(t.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.reporterEmail,"aria-describedby":a.reporterEmail?"reporterEmail-error":void 0}),a.reporterEmail&&jsxRuntime.jsx("p",{id:"reporterEmail-error",role:"alert",className:"ndpr-form-field__error",children:a.reporterEmail})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"reporterDepartment",className:"ndpr-form-field__label",children:["Your Department ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"reporterDepartment",value:P,onChange:t=>le(t.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.reporterDepartment,"aria-describedby":a.reporterDepartment?"reporterDepartment-error":void 0}),a.reporterDepartment&&jsxRuntime.jsx("p",{id:"reporterDepartment-error",role:"alert",className:"ndpr-form-field__error",children:a.reporterDepartment})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"reporterPhone",className:"ndpr-form-field__label",children:"Your Phone Number (Optional)"}),jsxRuntime.jsx("input",{type:"tel",id:"reporterPhone",value:F,onChange:t=>pe(t.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Impact Information"}),jsxRuntime.jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"affectedSystems",className:"ndpr-form-field__label",children:["Affected Systems/Applications ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsx("input",{type:"text",id:"affectedSystems",value:nt,onChange:mt,placeholder:"e.g. CRM, Email Server, Website (comma separated)",className:"ndpr-form-field__input",required:true,"aria-invalid":!!a.affectedSystems,"aria-describedby":a.affectedSystems?"affectedSystems-error":void 0}),a.affectedSystems&&jsxRuntime.jsx("p",{id:"affectedSystems-error",role:"alert",className:"ndpr-form-field__error",children:a.affectedSystems})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"estimatedAffectedSubjects",className:"ndpr-form-field__label",children:"Estimated Number of Affected Data Subjects"}),jsxRuntime.jsx("input",{type:"text",id:"estimatedAffectedSubjects",value:b,onChange:t=>he(t.target.value),placeholder:"e.g. 100",className:"ndpr-form-field__input","aria-invalid":!!a.estimatedAffectedSubjects,"aria-describedby":a.estimatedAffectedSubjects?"estimatedAffectedSubjects-error":void 0}),a.estimatedAffectedSubjects&&jsxRuntime.jsx("p",{id:"estimatedAffectedSubjects-error",role:"alert",className:"ndpr-form-field__error",children:a.estimatedAffectedSubjects})]}),jsxRuntime.jsxs("fieldset",{className:"md:col-span-2","aria-invalid":!!a.dataTypes,"aria-describedby":a.dataTypes?"dataTypes-error":void 0,children:[jsxRuntime.jsxs("legend",{className:"ndpr-form-field__label",children:["Types of Data Involved ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required","aria-hidden":"true",children:"*"}),jsxRuntime.jsx("span",{className:"sr-only",children:"(required)"})]}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:bt.map(t=>jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("input",{type:"checkbox",id:`dataType_${t.id}`,checked:k.includes(t.id),onChange:()=>ct(t.id),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:`dataType_${t.id}`,className:"ml-2 text-sm ndpr-text-muted",children:t.label})]},t.id))}),a.dataTypes&&jsxRuntime.jsx("p",{id:"dataTypes-error",role:"alert",className:"ndpr-form-field__error",children:a.dataTypes})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("label",{htmlFor:"status",className:"ndpr-form-field__label",children:["Current Status ",jsxRuntime.jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxRuntime.jsxs("select",{id:"status",value:$,onChange:t=>Re(t.target.value),className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.select,c),required:true,children:[jsxRuntime.jsx("option",{value:"ongoing",children:"Ongoing (breach is still active)"}),jsxRuntime.jsx("option",{value:"contained",children:"Contained (breach is stopped but not resolved)"}),jsxRuntime.jsx("option",{value:"resolved",children:"Resolved (breach is fully addressed)"})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"approximateRecordCount",className:"ndpr-form-field__label",children:"Approximate Number of Records Concerned"}),jsxRuntime.jsx("input",{type:"text",id:"approximateRecordCount",value:u,onChange:t=>ve(t.target.value),placeholder:"e.g. 5000",className:"ndpr-form-field__input"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required for the NDPC report (NDPA Section 40(2))."})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dataSubjectCategories",className:"ndpr-form-field__label",children:"Categories of Data Subjects Affected"}),jsxRuntime.jsx("input",{type:"text",id:"dataSubjectCategories",value:y,onChange:t=>Ne(t.target.value),placeholder:"e.g. customers, employees, minors",className:"ndpr-form-field__input"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Comma-separated. Required for the NDPC report (NDPA Section 40(2))."})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2 flex items-center",children:[jsxRuntime.jsx("input",{id:"involvesSensitiveData",type:"checkbox",checked:q,onChange:t=>ue(t.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:"involvesSensitiveData",className:"ml-2 text-sm ndpr-text-muted",children:"Sensitive personal data (NDPA Section 30) is involved"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"likelyConsequences",className:"ndpr-form-field__label",children:"Likely Consequences for Data Subjects"}),jsxRuntime.jsx("textarea",{id:"likelyConsequences",value:j,onChange:t=>ye(t.target.value),placeholder:"e.g. identity theft, financial loss, reputational damage, discrimination",rows:3,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c)}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required content for NDPC report and Section 40(3) communications to data subjects."})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"mitigationMeasures",className:"ndpr-form-field__label",children:"Mitigation Measures"}),jsxRuntime.jsx("textarea",{id:"mitigationMeasures",value:T,onChange:t=>_e(t.target.value),placeholder:"Measures taken or proposed to mitigate possible adverse effects (NDPA Section 40(3))",rows:3,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c)})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("h4",{className:"ndpr-section-heading text-sm mt-4",children:"Data Protection Officer (NDPC contact)"}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mb-2",children:"Defaults to organisation-level DPO if left blank."})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpoName",className:"ndpr-form-field__label",children:"DPO Name"}),jsxRuntime.jsx("input",{type:"text",id:"dpoName",value:_,onChange:t=>xe(t.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpoEmail",className:"ndpr-form-field__label",children:"DPO Email"}),jsxRuntime.jsx("input",{type:"email",id:"dpoEmail",value:x,onChange:t=>Ce(t.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"dpoPhone",className:"ndpr-form-field__label",children:"DPO Phone"}),jsxRuntime.jsx("input",{type:"tel",id:"dpoPhone",value:I,onChange:t=>Se(t.target.value),className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2 flex items-center mt-2",children:[jsxRuntime.jsx("input",{id:"isPhasedReport",type:"checkbox",checked:Q,onChange:t=>De(t.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsxRuntime.jsx("label",{htmlFor:"isPhasedReport",className:"ml-2 text-sm ndpr-text-muted",children:"This is a phased / interim report (Section 40(2) \u2014 complete info not yet available)"})]}),Q&&jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"supplementsReportId",className:"ndpr-form-field__label",children:"Supplements Report ID (if applicable)"}),jsxRuntime.jsx("input",{type:"text",id:"supplementsReportId",value:X,onChange:t=>Ae(t.target.value),placeholder:"Prior report ID this report supplements",className:"ndpr-form-field__input"})]}),jsxRuntime.jsxs("div",{className:"md:col-span-2",children:[jsxRuntime.jsx("label",{htmlFor:"initialActions",className:"ndpr-form-field__label",children:"Initial Actions Taken"}),jsxRuntime.jsx("textarea",{id:"initialActions",value:B,onChange:t=>we(t.target.value),placeholder:"Describe any immediate actions that have been taken to address the breach",rows:3,className:chunkAME4HJR4_js.a("ndpr-form-field__input",d.textarea,c)})]})]})]}),et&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"ndpr-section-heading",children:"Attachments"}),jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsx("label",{htmlFor:"breach-attachments",className:"ndpr-form-field__label",children:"Upload Supporting Files (Optional)"}),jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-muted mb-2",children:["Max ",G," files, ",Z/(1024*1024),"MB each. Allowed types: ",K.join(", ")]}),jsxRuntime.jsx("input",{id:"breach-attachments",type:"file",onChange:lt,multiple:true,className:"ndpr-form-field__input",accept:K.join(",")}),a.attachments&&jsxRuntime.jsx("p",{id:"attachments-error",role:"alert",className:"ndpr-form-field__error",children:a.attachments})]}),O.length>0&&jsxRuntime.jsxs("div",{className:"ndpr-form-field",children:[jsxRuntime.jsx("h4",{className:"ndpr-form-field__label",children:"Attached Files:"}),jsxRuntime.jsx("ul",{className:"ndpr-form-section",children:O.map((t,o)=>jsxRuntime.jsxs("li",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4 ndpr-text-muted mr-2",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"})}),jsxRuntime.jsx("span",{className:"text-sm ndpr-text-muted",children:t.name}),jsxRuntime.jsxs("span",{className:"ml-2 text-xs ndpr-text-muted",children:["(",(t.size/1024).toFixed(1)," KB)"]})]}),jsxRuntime.jsxs("button",{type:"button",onClick:()=>pt(o),"aria-label":`Remove attachment ${t.name}`,className:"text-red-500 hover:ndpr-text-destructive p-2 min-w-[44px] min-h-[44px] flex items-center justify-center",children:[jsxRuntime.jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),jsxRuntime.jsx("span",{className:"sr-only",children:"Remove"})]})]},o))})]})]}),jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-alert ndpr-alert--info",d.notice,c),children:[jsxRuntime.jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsxRuntime.jsx("p",{className:"ndpr-text-info text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxRuntime.jsxs("div",{className:"mt-6 relative flex gap-3",children:[S&&d.loadingOverlay&&jsxRuntime.jsx("div",{className:d.loadingOverlay}),jsxRuntime.jsx("button",{type:"submit",disabled:S,className:chunkAME4HJR4_js.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 ${re} ${S?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c),children:S?"Submitting...":at}),jsxRuntime.jsx("button",{type:"button",onClick:dt,disabled:S,className:chunkAME4HJR4_js.a("px-6 py-3 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 rounded-md hover:bg-gray-300 dark:hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2",void 0,c),children:"Reset"})]})]})})]})};
|
|
2
|
+
exports.a=Ct;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b as b$1}from'./chunk-RRVML7CU.mjs';import {a as a$1}from'./chunk-DBZSN4WP.mjs';import {a,b}from'./chunk-ZJYULEER.mjs';import {useRef,useState,useCallback,useEffect}from'react';function j(d,a){return a?a$1(d):{load:()=>null,save:()=>{},remove:()=>{}}}function J({initialRequests:d=[],requestTypes:a$1,adapter:f,storageKey:h="ndpr_dsr_requests",useLocalStorage:k=false,onSubmit:p,onUpdate:g}){let y=f!=null?f:j(h,k),q=useRef(y);q.current=y;let[n,P]=useState(d),[x,c]=useState(true),m=useRef(d),u=useCallback(e=>{m.current=e,P(e);},[]);useEffect(()=>{let e=false;try{let t=q.current.load();t instanceof Promise?t.then(r=>{e||(r&&u(r),c(!1));},()=>{e||c(!1);}):(t&&u(t),c(!1));}catch(t){e||c(false);}return ()=>{e=true;}},[u]);let S=useCallback(e=>{Promise.resolve(q.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),C=useCallback(e=>{let t=a$1.find(K=>K.id===e.type),r=(t==null?void 0:t.estimatedCompletionTime)||30,R=Date.now(),i=R+r*24*60*60*1e3,o=a({id:B(),status:"pending",createdAt:R,updatedAt:R,dueDate:i},e),l=[...m.current,o];return u(l),S(l),p&&p(o),o},[a$1,u,S,p]),I=useCallback((e,t)=>{let r=m.current,R=r.findIndex(l=>l.id===e);if(R===-1)return null;let i=b(a(a({},r[R]),t),{updatedAt:Date.now()}),o=[...r];return o[R]=i,u(o),S(o),g&&g(i),i},[u,S,g]),L=useCallback(e=>n.find(t=>t.id===e)||null,[n]),O=useCallback(e=>n.filter(t=>t.status===e),[n]),_=useCallback(e=>n.filter(t=>t.type===e),[n]),U=useCallback(e=>a$1.find(t=>t.id===e),[a$1]),F=useCallback(e=>{let{formattedRequest:t}=b$1(e);return t},[]),E=useCallback(()=>{u([]),Promise.resolve(q.current.remove()).catch(e=>{console.warn("[ndpr-toolkit] Failed to remove DSR requests:",e);});},[u]);return {requests:n,submitRequest:C,updateRequest:I,getRequest:L,getRequestsByStatus:O,getRequestsByType:_,getRequestType:U,formatRequest:F,clearRequests:E,isLoading:x}}export{J as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkVFRGCBJY_js=require('./chunk-VFRGCBJY.js'),chunk7TTXS7JX_js=require('./chunk-7TTXS7JX.js'),chunkY346CURW_js=require('./chunk-Y346CURW.js');var b=e=>`\u20A6${e.toLocaleString("en-NG")}`;function P(e,c={}){var m,d;let r=(m=c.minScore)!=null?m:70,i=chunk7TTXS7JX_js.a(e.compliance),a=[];a.push({id:"compliance-score",label:"Overall compliance score",status:i.score>=r?"pass":"fail",detail:`${i.score}/100 (${i.rating}); minimum ${r}.`});for(let t of i.recommendations)t.priority!=="critical"&&t.priority!=="high"||a.push({id:`gap:${t.module}:${t.key}`,label:`${t.label} (${t.ndpaSection})`,status:t.priority==="critical"?"fail":"warn",detail:t.recommendation});let n;e.dcpmi&&(n=chunkVFRGCBJY_js.c(e.dcpmi,c.dcpmiOptions),a.push({id:"dcpmi",label:"DCPMI designation (GAID 2025)",status:n.tier==="listed"?"warn":"pass",detail:n.isDCPMI?`${n.tier} \u2014 ${b(n.annualFeeNGN)}/yr; ${n.registration.renewsAnnually?"renew registration annually":"register once + file CAR annually"}.`:"Not a Data Controller/Processor of Major Importance by volume."}));let s;if(e.car){s=chunkVFRGCBJY_js.d(e.car,c.carOptions);let t=s.status.daysUntilNextDeadline;a.push({id:"car",label:"Compliance Audit Returns (NDPC GAID 2025)",status:s.applicable&&(s.status.initialAuditDue||t<=30)?"warn":"pass",detail:s.applicable?`Next filing ${s.schedule.nextFilingDeadline} (${t} day(s)); initial audit due ${s.schedule.initialAuditDueDate}.`:"CAR does not apply (not a DCPMI)."});}let p=((d=e.breaches)!=null?d:[]).map(t=>({id:t.id,title:t.title,assessment:chunkY346CURW_js.a(t,c.breachOptions)}));for(let t of p){let o=t.assessment,C=o.timing.overdue?"fail":o.complete?"pass":"warn",A=Number.isFinite(o.timing.deadline)?o.timing.overdue?`${Math.abs(o.timing.hoursRemaining)}h overdue`:`${Math.max(0,o.timing.hoursRemaining)}h remaining`:"discovery date not set";a.push({id:`breach:${t.id}`,label:`Breach notification \u2014 ${t.title} (NDPA S. 40)`,status:C,detail:`${o.completeness}% complete; ${A}.`});}let l={pass:a.filter(t=>t.status==="pass").length,warn:a.filter(t=>t.status==="warn").length,fail:a.filter(t=>t.status==="fail").length};return {passed:i.score>=r&&l.fail===0,score:i.score,rating:i.rating,minScore:r,checks:a,compliance:i,dcpmi:n,car:s,breaches:p,summary:l,generatedAt:new Date().toISOString().slice(0,10)}}var $={pass:"\u2713",warn:"!",fail:"\u2717"},R={pass:"\x1B[32m",warn:"\x1B[33m",fail:"\x1B[31m"},y="\x1B[0m";function w(e,c={}){let r=(a,n)=>c.color?`${R[a]}${n}${y}`:n,i=[];i.push("NDPA 2023 Compliance Audit"),i.push(`Generated ${e.generatedAt}`),i.push(""),i.push(`Compliance score: ${e.score}/100 (${e.rating}) \u2014 minimum ${e.minScore}`),i.push("");for(let a of e.checks)i.push(`${r(a.status,$[a.status])} ${a.label}`),i.push(` ${a.detail}`);return i.push(""),i.push(`${e.summary.pass} passed, ${e.summary.warn} warning(s), ${e.summary.fail} failed`),i.push(r(e.passed?"pass":"fail",`Verdict: ${e.passed?"PASS":"FAIL"}`)),i.join(`
|
|
2
|
+
`)}exports.a=P;exports.b=w;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkVFRGCBJY_js=require('./chunk-VFRGCBJY.js'),chunk7TTXS7JX_js=require('./chunk-7TTXS7JX.js'),chunkY346CURW_js=require('./chunk-Y346CURW.js'),react=require('react');function I(e,t){return react.useMemo(()=>chunkY346CURW_js.a(e,t),[e,t])}function A({input:e}){let t=JSON.stringify(e);return react.useMemo(()=>chunk7TTXS7JX_js.a(e),[t])}function B(e,t){let{dataSubjectsInSixMonths:i,isDesignated:o}=e;return react.useMemo(()=>chunkVFRGCBJY_js.c({dataSubjectsInSixMonths:i,isDesignated:o},t),[i,o,t])}function S(e,t){let{commencementDate:i,asOf:o,tier:n}=e;return react.useMemo(()=>chunkVFRGCBJY_js.d({commencementDate:i,asOf:o,tier:n},t),[i,o,n,t])}exports.a=I;exports.b=A;exports.c=B;exports.d=S;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {h}from'./chunk-K5WLRGDN.mjs';import {a as a$1}from'./chunk-DBZSN4WP.mjs';import {b,a}from'./chunk-ZJYULEER.mjs';import {useRef,useState,useCallback,useEffect}from'react';function H(T,l){return l?a$1(T):{load:()=>null,save:()=>{},remove:()=>{}}}function X({initialTransfers:T=[],adapter:l,storageKey:x="ndpr_cross_border_transfers",useLocalStorage:M=true,onAdd:v,onUpdate:C,onRemove:B}={}){let S=l!=null?l:H(x,M),A=useRef(S);A.current=S;let[a$1,D]=useState(T),[k,p]=useState(true),m=useRef(T),o=useCallback(r=>{m.current=r,D(r);},[]);useEffect(()=>{let r=false;try{let e=A.current.load();e instanceof Promise?e.then(t=>{r||(t&&o(t),p(!1));},()=>{r||p(!1);}):(e&&o(e),p(!1));}catch(e){r||p(false);}return ()=>{r=true;}},[o]);let f=useCallback(r=>{Promise.resolve(A.current.save(r)).catch(e=>{console.warn("[ndpr-toolkit] Failed to save cross-border transfers:",e);});},[]),I=()=>"cbt_"+Date.now()+"_"+Math.random().toString(36).substring(2,11),L=useCallback(r=>{let e=Date.now(),t=b(a({},r),{id:I(),createdAt:e,updatedAt:e}),n=[...m.current,t];return o(n),f(n),v&&v(t),t},[v,o,f]),U=useCallback((r,e)=>{let t=m.current,n=t.findIndex(h=>h.id===r);if(n===-1)return null;let i=b(a(a({},t[n]),e),{updatedAt:Date.now()}),c=[...t];return c[n]=i,o(c),f(c),C&&C(i),i},[C,o,f]),O=useCallback(r=>{let e=m.current;if(e.findIndex(i=>i.id===r)===-1)return;let n=e.filter(i=>i.id!==r);o(n),f(n),B&&B(r);},[B,o,f]),P=useCallback(r=>a$1.find(e=>e.id===r)||null,[a$1]),V=useCallback(()=>{let r=Date.now(),e=a$1.filter(s=>s.status==="active"),t=["adequacy_decision","standard_clauses","binding_corporate_rules","ndpc_authorization","explicit_consent","contract_performance","public_interest","legal_claims","vital_interests"],n={};for(let s of t)n[s]=e.filter(u=>u.transferMechanism===s).length;let i=["adequate","inadequate","pending_review","unknown"],c={};for(let s of i)c[s]=e.filter(u=>u.adequacyStatus===s).length;let h=a$1.filter(s=>{var u,_;return s.status==="pending_approval"||((u=s.ndpcApproval)==null?void 0:u.required)&&!((_=s.ndpcApproval)!=null&&_.approved)}),z=720*60*60*1e3,E=a$1.filter(s=>s.reviewDate&&s.reviewDate<=r+z&&s.status==="active"),K=a$1.filter(s=>!s.tiaCompleted&&s.status==="active"),j=a$1.filter(s=>s.riskLevel==="high"&&s.status==="active");return {totalActiveTransfers:e.length,byMechanism:n,byAdequacy:c,pendingApproval:h,dueForReview:E,missingTIA:K,highRiskTransfers:j,lastUpdated:r}},[a$1]),F=useCallback(r=>h(r),[]);return {transfers:a$1,addTransfer:L,updateTransfer:U,removeTransfer:O,getTransfer:P,getSummary:V,validateTransfer:F,isLoading:k}}export{X as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {c,d}from'./chunk-MGXWQW5I.mjs';import {a}from'./chunk-6A7M4CGJ.mjs';import {a as a$1}from'./chunk-WJSUVPYX.mjs';var b=e=>`\u20A6${e.toLocaleString("en-NG")}`;function P(e,c$1={}){var m,d$1;let r=(m=c$1.minScore)!=null?m:70,i=a(e.compliance),a$2=[];a$2.push({id:"compliance-score",label:"Overall compliance score",status:i.score>=r?"pass":"fail",detail:`${i.score}/100 (${i.rating}); minimum ${r}.`});for(let t of i.recommendations)t.priority!=="critical"&&t.priority!=="high"||a$2.push({id:`gap:${t.module}:${t.key}`,label:`${t.label} (${t.ndpaSection})`,status:t.priority==="critical"?"fail":"warn",detail:t.recommendation});let n;e.dcpmi&&(n=c(e.dcpmi,c$1.dcpmiOptions),a$2.push({id:"dcpmi",label:"DCPMI designation (GAID 2025)",status:n.tier==="listed"?"warn":"pass",detail:n.isDCPMI?`${n.tier} \u2014 ${b(n.annualFeeNGN)}/yr; ${n.registration.renewsAnnually?"renew registration annually":"register once + file CAR annually"}.`:"Not a Data Controller/Processor of Major Importance by volume."}));let s;if(e.car){s=d(e.car,c$1.carOptions);let t=s.status.daysUntilNextDeadline;a$2.push({id:"car",label:"Compliance Audit Returns (NDPC GAID 2025)",status:s.applicable&&(s.status.initialAuditDue||t<=30)?"warn":"pass",detail:s.applicable?`Next filing ${s.schedule.nextFilingDeadline} (${t} day(s)); initial audit due ${s.schedule.initialAuditDueDate}.`:"CAR does not apply (not a DCPMI)."});}let p=((d$1=e.breaches)!=null?d$1:[]).map(t=>({id:t.id,title:t.title,assessment:a$1(t,c$1.breachOptions)}));for(let t of p){let o=t.assessment,C=o.timing.overdue?"fail":o.complete?"pass":"warn",A=Number.isFinite(o.timing.deadline)?o.timing.overdue?`${Math.abs(o.timing.hoursRemaining)}h overdue`:`${Math.max(0,o.timing.hoursRemaining)}h remaining`:"discovery date not set";a$2.push({id:`breach:${t.id}`,label:`Breach notification \u2014 ${t.title} (NDPA S. 40)`,status:C,detail:`${o.completeness}% complete; ${A}.`});}let l={pass:a$2.filter(t=>t.status==="pass").length,warn:a$2.filter(t=>t.status==="warn").length,fail:a$2.filter(t=>t.status==="fail").length};return {passed:i.score>=r&&l.fail===0,score:i.score,rating:i.rating,minScore:r,checks:a$2,compliance:i,dcpmi:n,car:s,breaches:p,summary:l,generatedAt:new Date().toISOString().slice(0,10)}}var $={pass:"\u2713",warn:"!",fail:"\u2717"},R={pass:"\x1B[32m",warn:"\x1B[33m",fail:"\x1B[31m"},y="\x1B[0m";function w(e,c={}){let r=(a,n)=>c.color?`${R[a]}${n}${y}`:n,i=[];i.push("NDPA 2023 Compliance Audit"),i.push(`Generated ${e.generatedAt}`),i.push(""),i.push(`Compliance score: ${e.score}/100 (${e.rating}) \u2014 minimum ${e.minScore}`),i.push("");for(let a of e.checks)i.push(`${r(a.status,$[a.status])} ${a.label}`),i.push(` ${a.detail}`);return i.push(""),i.push(`${e.summary.pass} passed, ${e.summary.warn} warning(s), ${e.summary.fail} failed`),i.push(r(e.passed?"pass":"fail",`Verdict: ${e.passed?"PASS":"FAIL"}`)),i.join(`
|
|
2
|
+
`)}export{P as a,w as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react');function j(d,a){return a?chunkVWED6UTN_js.a(d):{load:()=>null,save:()=>{},remove:()=>{}}}function J({initialRequests:d=[],requestTypes:a,adapter:f,storageKey:h="ndpr_dsr_requests",useLocalStorage:k=false,onSubmit:p,onUpdate:g}){let y=f!=null?f:j(h,k),q=react.useRef(y);q.current=y;let[n,P]=react.useState(d),[x,c]=react.useState(true),m=react.useRef(d),u=react.useCallback(e=>{m.current=e,P(e);},[]);react.useEffect(()=>{let e=false;try{let t=q.current.load();t instanceof Promise?t.then(r=>{e||(r&&u(r),c(!1));},()=>{e||c(!1);}):(t&&u(t),c(!1));}catch(t){e||c(false);}return ()=>{e=true;}},[u]);let S=react.useCallback(e=>{Promise.resolve(q.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),C=react.useCallback(e=>{let t=a.find(K=>K.id===e.type),r=(t==null?void 0:t.estimatedCompletionTime)||30,R=Date.now(),i=R+r*24*60*60*1e3,o=chunkRFPLZDIO_js.a({id:B(),status:"pending",createdAt:R,updatedAt:R,dueDate:i},e),l=[...m.current,o];return u(l),S(l),p&&p(o),o},[a,u,S,p]),I=react.useCallback((e,t)=>{let r=m.current,R=r.findIndex(l=>l.id===e);if(R===-1)return null;let i=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},r[R]),t),{updatedAt:Date.now()}),o=[...r];return o[R]=i,u(o),S(o),g&&g(i),i},[u,S,g]),L=react.useCallback(e=>n.find(t=>t.id===e)||null,[n]),O=react.useCallback(e=>n.filter(t=>t.status===e),[n]),_=react.useCallback(e=>n.filter(t=>t.type===e),[n]),U=react.useCallback(e=>a.find(t=>t.id===e),[a]),F=react.useCallback(e=>{let{formattedRequest:t}=chunkR2ZZMATR_js.b(e);return t},[]),E=react.useCallback(()=>{u([]),Promise.resolve(q.current.remove()).catch(e=>{console.warn("[ndpr-toolkit] Failed to remove DSR requests:",e);});},[u]);return {requests:n,submitRequest:C,updateRequest:I,getRequest:L,getRequestsByStatus:O,getRequestsByType:_,getRequestType:U,formatRequest:F,clearRequests:E,isLoading:x}}exports.a=J;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c,d}from'./chunk-MGXWQW5I.mjs';import {a as a$1}from'./chunk-6A7M4CGJ.mjs';import {a}from'./chunk-WJSUVPYX.mjs';import {useMemo}from'react';function I(e,t){return useMemo(()=>a(e,t),[e,t])}function A({input:e}){let t=JSON.stringify(e);return useMemo(()=>a$1(e),[t])}function B(e,t){let{dataSubjectsInSixMonths:i,isDesignated:o}=e;return useMemo(()=>c({dataSubjectsInSixMonths:i,isDesignated:o},t),[i,o,t])}function S(e,t){let{commencementDate:i,asOf:o,tier:n}=e;return useMemo(()=>d({commencementDate:i,asOf:o,tier:n},t),[i,o,n,t])}export{I as a,A as b,B as c,S as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react');function M(u,a){return a?chunkVWED6UTN_js.a(u):{load:()=>null,save:()=>{},remove:()=>{}}}function H({initialActivities:u=[],adapter:a,storageKey:x="ndpr_lawful_basis_activities",useLocalStorage:_=true,onAdd:g,onUpdate:A,onRemove:y}={}){let w=a!=null?a:M(x,_),f=react.useRef(w);f.current=w;let[o,h]=react.useState(u),[O,l]=react.useState(true),v=react.useRef(u),s=react.useCallback(t=>{v.current=t,h(t);},[]);react.useEffect(()=>{let t=false;try{let i=f.current.load();i instanceof Promise?i.then(e=>{t||(e&&s(e),l(!1));},()=>{t||l(!1);}):(i&&s(i),l(!1));}catch(i){t||l(false);}return ()=>{t=true;}},[s]);let n=react.useCallback(t=>{Promise.resolve(f.current.save(t)).catch(i=>{console.warn("[ndpr-toolkit] Failed to save lawful basis activities:",i);});},[]),D=()=>"lb_"+Date.now()+"_"+Math.random().toString(36).substring(2,11),I=react.useCallback(t=>{let i=Date.now(),e=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{id:D(),createdAt:i,updatedAt:i}),c=[...v.current,e];return s(c),n(c),g&&g(e),e},[g,s,n]),U=react.useCallback((t,i)=>{let e=v.current,c=e.findIndex(F=>F.id===t);if(c===-1)return null;let m=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},e[c]),i),{id:e[c].id,updatedAt:Date.now()}),P=[...e];return P[c]=m,s(P),n(P),A&&A(m),m},[A,s,n]),V=react.useCallback(t=>{let i=v.current.filter(e=>e.id!==t);s(i),n(i),y&&y(t);},[y,s,n]),k=react.useCallback(t=>o.find(i=>i.id===t)||null,[o]),C=react.useCallback(()=>chunkWZYCBW2R_js.d(o),[o]),E=react.useCallback(t=>chunkWZYCBW2R_js.a(t),[]);return {activities:o,addActivity:I,updateActivity:U,removeActivity:V,getActivity:k,getSummary:C,validateActivity:E,isLoading:O}}exports.a=H;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'./chunk-WJSUVPYX.mjs';import {a as a$3}from'./chunk-EWVK45Z3.mjs';import {a as a$1}from'./chunk-SFGW37LE.mjs';import {c}from'./chunk-PHA3YMFO.mjs';import {a as a$2,b}from'./chunk-ZJYULEER.mjs';import {useState,useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var Ct=({categories:Je,onSubmit:Qe,onValidationError:z,title:Y,description:H,submitButtonText:U,className:te="",buttonClassName:re="",classNames:d={},unstyled:c$1=false,isSubmitting:S=false,showConfirmation:Xe=true,confirmationMessage:Ve="Your breach report has been submitted successfully. The data protection team has been notified.",allowAttachments:et=true,maxAttachments:G=5,maxFileSize:Z=5*1024*1024,allowedFileTypes:K=[".pdf",".jpg",".jpeg",".png",".doc",".docx",".xls",".xlsx",".txt"],defaultValues:r,onReset:W,showCompleteness:tt=true})=>{var ke,qe,je,Te,Ie,Be,Ee,Me,$e,Oe,Le,ze,Ye,He;let J=c(),rt=(ke=Y!=null?Y:J.breach.title)!=null?ke:"Report a Data Breach",it=(qe=H!=null?H:J.breach.description)!=null?qe:"Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required.",at=(je=U!=null?U:J.breach.submitReport)!=null?je:"Submit Report",ie=t=>{if(!t)return "";let o=new Date(t),p=s=>String(s).padStart(2,"0");return `${o.getFullYear()}-${p(o.getMonth()+1)}-${p(o.getDate())}T${p(o.getHours())}:${p(o.getMinutes())}`},[D,ae]=useState((r==null?void 0:r.title)||""),[A,ne]=useState((r==null?void 0:r.description)||""),[R,oe]=useState((r==null?void 0:r.category)||""),[h,se]=useState(ie(r==null?void 0:r.discoveredAt)),[v,de]=useState(ie(r==null?void 0:r.occurredAt)),[w,me]=useState(((Te=r==null?void 0:r.reporter)==null?void 0:Te.name)||""),[N,ce]=useState(((Ie=r==null?void 0:r.reporter)==null?void 0:Ie.email)||""),[P,le]=useState(((Be=r==null?void 0:r.reporter)==null?void 0:Be.department)||""),[F,pe]=useState(((Ee=r==null?void 0:r.reporter)==null?void 0:Ee.phone)||""),[M,ge]=useState((r==null?void 0:r.affectedSystems)||[]),[nt,fe]=useState(((Me=r==null?void 0:r.affectedSystems)==null?void 0:Me.join(", "))||""),[k,be]=useState((r==null?void 0:r.dataTypes)||[]),[b$1,he]=useState((r==null?void 0:r.estimatedAffectedSubjects)!=null?String(r.estimatedAffectedSubjects):""),[u,ve]=useState((r==null?void 0:r.approximateRecordCount)!=null?String(r.approximateRecordCount):""),[y,Ne]=useState((($e=r==null?void 0:r.dataSubjectCategories)==null?void 0:$e.join(", "))||""),[q,ue]=useState((Oe=r==null?void 0:r.involvesSensitiveData)!=null?Oe:false),[j,ye]=useState((r==null?void 0:r.likelyConsequences)||""),[T,_e]=useState((r==null?void 0:r.mitigationMeasures)||""),[_,xe]=useState(((Le=r==null?void 0:r.dpoContact)==null?void 0:Le.name)||""),[x,Ce]=useState(((ze=r==null?void 0:r.dpoContact)==null?void 0:ze.email)||""),[I,Se]=useState(((Ye=r==null?void 0:r.dpoContact)==null?void 0:Ye.phone)||""),[Q,De]=useState((He=r==null?void 0:r.isPhasedReport)!=null?He:false),[X,Ae]=useState((r==null?void 0:r.supplementsReportId)||""),[$,Re]=useState((r==null?void 0:r.status)||"ongoing"),[B,we]=useState((r==null?void 0:r.initialActions)||""),[O,V]=useState([]),[ot,ee]=useState(false),[a$4,E]=useState({}),g=useMemo(()=>{let t={id:"",title:D,description:A,category:R,discoveredAt:h?new Date(h).getTime():NaN,occurredAt:v?new Date(v).getTime():void 0,reportedAt:0,reporter:{name:w,email:N,department:P,phone:F||void 0},affectedSystems:M,dataTypes:k,estimatedAffectedSubjects:b$1?Number(b$1):void 0,approximateRecordCount:u?Number(u):void 0,dataSubjectCategories:y?y.split(",").map(o=>o.trim()).filter(Boolean):void 0,involvesSensitiveData:q,likelyConsequences:j||void 0,mitigationMeasures:T||void 0,dpoContact:_||x?{name:_,email:x,phone:I||void 0}:void 0,status:$,initialActions:B||void 0};return a(t,{highRisk:q})},[D,A,R,h,v,w,N,P,F,M,k,b$1,u,y,q,j,T,_,x,I,$,B]),Pe=[...g.notificationToCommission,...g.dataSubjectCommunication],Fe=Pe.length,st=Fe-g.missing.length,dt=()=>{ae(""),ne(""),oe(""),se(""),de(""),me(""),ce(""),le(""),pe(""),ge([]),fe(""),be([]),he(""),ve(""),Ne(""),ue(false),ye(""),_e(""),xe(""),Ce(""),Se(""),De(false),Ae(""),Re("ongoing"),we(""),V([]),ee(false),E({}),W==null||W();},mt=t=>{let o=t.target.value;fe(o);let p=o.split(",").map(s=>s.trim()).filter(Boolean);ge(p);},ct=t=>{be(o=>o.includes(t)?o.filter(p=>p!==t):[...o,t]);},lt=t=>{var Ue;let o=t.target.files;if(!o)return;let p=[],s={};if(O.length+o.length>G){s.attachments=`Maximum of ${G} files allowed`,E(f=>a$2(a$2({},f),s));return}for(let f=0;f<o.length;f++){let L=o[f];if(L.size>Z){s.attachments=`File ${L.name} exceeds the maximum size of ${Z/(1024*1024)}MB`;continue}let Ge="."+((Ue=L.name.split(".").pop())==null?void 0:Ue.toLowerCase());if(!K.includes(Ge)){s.attachments=`File type ${Ge} is not allowed`;continue}p.push(L);}p.length>0&&V(f=>[...f,...p]),Object.keys(s).length>0?E(f=>a$2(a$2({},f),s)):E(f=>b(a$2({},f),{attachments:""}));},pt=t=>{V(o=>o.filter((p,s)=>s!==t));},gt=()=>{let t={};return D.trim()||(t.breachTitle="Breach title is required"),A.trim()||(t.description="Description is required"),R||(t.category="Category is required"),h||(t.discoveredAt="Discovery date is required"),w.trim()||(t.reporterName="Reporter name is required"),N.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(N)||(t.reporterEmail="Reporter email is invalid"):t.reporterEmail="Reporter email is required",P.trim()||(t.reporterDepartment="Reporter department is required"),M.length===0&&(t.affectedSystems="At least one affected system is required"),k.length===0&&(t.dataTypes="At least one data type is required"),b$1&&isNaN(Number(b$1))&&(t.estimatedAffectedSubjects="Estimated affected subjects must be a number"),E(t),t},ft=t=>{t.preventDefault();let o=gt();if(Object.keys(o).length>0){z==null||z(o);return}let p={title:a$3(D),description:a$3(A),category:R,discoveredAt:new Date(h).getTime(),occurredAt:v?new Date(v).getTime():void 0,reportedAt:Date.now(),reporter:{name:a$3(w),email:a$3(N),department:a$3(P),phone:F?a$3(F):void 0},affectedSystems:M.map(s=>a$3(s)),dataTypes:k,estimatedAffectedSubjects:b$1?Number(b$1):void 0,approximateRecordCount:u?Number(u):void 0,dataSubjectCategories:y?y.split(",").map(s=>a$3(s.trim())).filter(Boolean):void 0,involvesSensitiveData:q,likelyConsequences:j?a$3(j):void 0,mitigationMeasures:T?a$3(T):void 0,dpoContact:_||x?{name:a$3(_),email:a$3(x),phone:I?a$3(I):void 0}:void 0,isPhasedReport:Q||void 0,supplementsReportId:X?a$3(X):void 0,status:$,initialActions:B?a$3(B):void 0,attachments:O.map(s=>({name:s.name,type:s.type,size:s.size,file:s}))};Qe(p),Xe&&ee(true);};if(ot)return jsxs("div",{"data-ndpr-component":"breach-report-form",className:`p-4 bg-green-50 dark:bg-green-900/20 rounded-md ${te}`,children:[jsx("h2",{className:"text-lg font-bold ndpr-text-success mb-2",children:"Report Submitted"}),jsx("p",{className:"ndpr-text-success",children:Ve}),jsxs("div",{className:"mt-4 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-md",children:[jsx("h3",{className:"text-sm font-bold ndpr-text-warning mb-2",children:"Important: Next Steps"}),jsx("p",{className:"ndpr-text-warning text-sm",children:"Under the NDPA (Section 40), data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsx("button",{onClick:()=>ee(false),className:`mt-4 px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700 ${re}`,children:"Report Another Breach"})]});let bt=[{id:"personal",label:"Personal Information (names, addresses)"},{id:"contact",label:"Contact Information (email, phone)"},{id:"financial",label:"Financial Information (bank details, payment info)"},{id:"health",label:"Health Information"},{id:"identification",label:"Identification Documents (ID cards, passports)"},{id:"login",label:"Login Credentials"},{id:"biometric",label:"Biometric Data"},{id:"children",label:"Children's Data"},{id:"location",label:"Location Data"},{id:"communications",label:"Communications Content"}];return jsxs("div",{className:a$1(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${te}`,d.root,c$1),children:[jsx("h2",{className:a$1("ndpr-section-heading",d.title,c$1),children:rt}),jsx("p",{className:"ndpr-card__subtitle",children:it}),tt&&jsxs("div",{"data-ndpr-section":"breach-completeness",className:a$1("ndpr-alert ndpr-alert--info mb-4",d.completeness,c$1),children:[jsxs("div",{className:"flex items-center justify-between mb-2",children:[jsx("h3",{className:"text-sm font-bold ndpr-text-info",children:"NDPC notification readiness"}),jsxs("span",{className:"text-sm font-semibold ndpr-text-info",children:[g.completeness,"%"]})]}),jsx("div",{role:"progressbar","aria-valuenow":g.completeness,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Breach notification completeness",className:"h-2 w-full rounded bg-gray-200 dark:bg-gray-700 overflow-hidden mb-2",children:jsx("div",{className:"h-full bg-[rgb(var(--ndpr-primary))]",style:{width:`${g.completeness}%`}})}),jsxs("p",{className:"text-sm ndpr-text-info",children:[st," of ",Fe," mandated items provided (GAID 2025 Art. 33(5) / NDPA S. 40(2))."]}),Number.isFinite(g.timing.deadline)?g.timing.overdue?jsxs("p",{className:"text-sm ndpr-text-warning mt-1",children:["72-hour deadline passed ",Math.abs(g.timing.hoursRemaining),"h ago \u2014 notify the NDPC now and state the reason for the delay (NDPA S. 40(2))."]}):jsxs("p",{className:"text-sm ndpr-text-info mt-1",children:[Math.max(0,g.timing.hoursRemaining),"h remaining to notify the NDPC (72-hour window, NDPA S. 40(2))."]}):jsx("p",{className:"text-sm ndpr-text-muted mt-1",children:"Set the discovery date to start the 72-hour clock."}),g.dataSubjectCommunicationRequired&&jsx("p",{className:"text-sm ndpr-text-warning mt-1",children:"High risk: affected data subjects must be notified in plain, clear language (NDPA S. 40(3))."}),g.missing.length>0&&jsxs("details",{className:"mt-2",children:[jsxs("summary",{className:"text-sm ndpr-text-info cursor-pointer",children:[g.missing.length," item(s) still needed"]}),jsx("ul",{className:"mt-1 list-disc pl-5",children:Pe.filter(t=>!t.satisfied).map(t=>jsxs("li",{className:"text-xs ndpr-text-muted",children:[t.label," ",jsxs("span",{className:"opacity-70",children:["(",t.section,")"]})]},t.id))})]})]}),jsx("form",{onSubmit:ft,className:a$1("",d.form,c$1),children:jsxs("div",{className:"ndpr-form-section",children:[jsxs("div",{className:a$1("",d.fieldGroup,c$1),children:[jsx("h3",{className:"ndpr-section-heading",children:"Breach Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"breachTitle",className:a$1("ndpr-form-field__label",d.label,c$1),children:["Breach Title/Summary ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"breachTitle",value:D,onChange:t=>ae(t.target.value),className:a$1("ndpr-form-field__input",d.input,c$1),required:true,"aria-invalid":!!a$4.breachTitle,"aria-describedby":a$4.breachTitle?"breachTitle-error":void 0}),a$4.breachTitle&&jsx("p",{id:"breachTitle-error",role:"alert",className:"ndpr-form-field__error",children:a$4.breachTitle})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"category",className:a$1("ndpr-form-field__label",d.label,c$1),children:["Breach Category ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"category",value:R,onChange:t=>oe(t.target.value),className:a$1("ndpr-form-field__input",d.select,c$1),required:true,"aria-invalid":!!a$4.category,"aria-describedby":a$4.category?"category-error":void 0,children:[jsx("option",{value:"",children:"Select a category"}),Je.map(t=>jsx("option",{value:t.id,children:t.name},t.id))]}),a$4.category&&jsx("p",{id:"category-error",role:"alert",className:"ndpr-form-field__error",children:a$4.category})]}),jsxs("div",{className:"md:col-span-2",children:[jsxs("label",{htmlFor:"description",className:a$1("ndpr-form-field__label",d.label,c$1),children:["Detailed Description ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("textarea",{id:"description",value:A,onChange:t=>ne(t.target.value),rows:4,className:a$1("ndpr-form-field__input",d.textarea,c$1),required:true,"aria-invalid":!!a$4.description,"aria-describedby":a$4.description?"description-error":void 0}),a$4.description&&jsx("p",{id:"description-error",role:"alert",className:"ndpr-form-field__error",children:a$4.description})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"discoveredAt",className:"ndpr-form-field__label",children:["Date Discovered ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"datetime-local",id:"discoveredAt",value:h,onChange:t=>se(t.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$4.discoveredAt,"aria-describedby":a$4.discoveredAt?"discoveredAt-error":void 0}),a$4.discoveredAt&&jsx("p",{id:"discoveredAt-error",role:"alert",className:"ndpr-form-field__error",children:a$4.discoveredAt})]}),jsxs("div",{children:[jsx("label",{htmlFor:"occurredAt",className:"ndpr-form-field__label",children:"Date Occurred (if known)"}),jsx("input",{type:"datetime-local",id:"occurredAt",value:v,onChange:t=>de(t.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Reporter Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"reporterName",className:"ndpr-form-field__label",children:["Your Name ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterName",value:w,onChange:t=>me(t.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$4.reporterName,"aria-describedby":a$4.reporterName?"reporterName-error":void 0}),a$4.reporterName&&jsx("p",{id:"reporterName-error",role:"alert",className:"ndpr-form-field__error",children:a$4.reporterName})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterEmail",className:"ndpr-form-field__label",children:["Your Email ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"email",id:"reporterEmail",value:N,onChange:t=>ce(t.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$4.reporterEmail,"aria-describedby":a$4.reporterEmail?"reporterEmail-error":void 0}),a$4.reporterEmail&&jsx("p",{id:"reporterEmail-error",role:"alert",className:"ndpr-form-field__error",children:a$4.reporterEmail})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"reporterDepartment",className:"ndpr-form-field__label",children:["Your Department ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"reporterDepartment",value:P,onChange:t=>le(t.target.value),className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$4.reporterDepartment,"aria-describedby":a$4.reporterDepartment?"reporterDepartment-error":void 0}),a$4.reporterDepartment&&jsx("p",{id:"reporterDepartment-error",role:"alert",className:"ndpr-form-field__error",children:a$4.reporterDepartment})]}),jsxs("div",{children:[jsx("label",{htmlFor:"reporterPhone",className:"ndpr-form-field__label",children:"Your Phone Number (Optional)"}),jsx("input",{type:"tel",id:"reporterPhone",value:F,onChange:t=>pe(t.target.value),className:"ndpr-form-field__input"})]})]})]}),jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Impact Information"}),jsxs("div",{className:"ndpr-form-grid ndpr-form-grid--2",children:[jsxs("div",{children:[jsxs("label",{htmlFor:"affectedSystems",className:"ndpr-form-field__label",children:["Affected Systems/Applications ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsx("input",{type:"text",id:"affectedSystems",value:nt,onChange:mt,placeholder:"e.g. CRM, Email Server, Website (comma separated)",className:"ndpr-form-field__input",required:true,"aria-invalid":!!a$4.affectedSystems,"aria-describedby":a$4.affectedSystems?"affectedSystems-error":void 0}),a$4.affectedSystems&&jsx("p",{id:"affectedSystems-error",role:"alert",className:"ndpr-form-field__error",children:a$4.affectedSystems})]}),jsxs("div",{children:[jsx("label",{htmlFor:"estimatedAffectedSubjects",className:"ndpr-form-field__label",children:"Estimated Number of Affected Data Subjects"}),jsx("input",{type:"text",id:"estimatedAffectedSubjects",value:b$1,onChange:t=>he(t.target.value),placeholder:"e.g. 100",className:"ndpr-form-field__input","aria-invalid":!!a$4.estimatedAffectedSubjects,"aria-describedby":a$4.estimatedAffectedSubjects?"estimatedAffectedSubjects-error":void 0}),a$4.estimatedAffectedSubjects&&jsx("p",{id:"estimatedAffectedSubjects-error",role:"alert",className:"ndpr-form-field__error",children:a$4.estimatedAffectedSubjects})]}),jsxs("fieldset",{className:"md:col-span-2","aria-invalid":!!a$4.dataTypes,"aria-describedby":a$4.dataTypes?"dataTypes-error":void 0,children:[jsxs("legend",{className:"ndpr-form-field__label",children:["Types of Data Involved ",jsx("span",{className:"ndpr-form-field__required","aria-hidden":"true",children:"*"}),jsx("span",{className:"sr-only",children:"(required)"})]}),jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:bt.map(t=>jsxs("div",{className:"flex items-center",children:[jsx("input",{type:"checkbox",id:`dataType_${t.id}`,checked:k.includes(t.id),onChange:()=>ct(t.id),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:`dataType_${t.id}`,className:"ml-2 text-sm ndpr-text-muted",children:t.label})]},t.id))}),a$4.dataTypes&&jsx("p",{id:"dataTypes-error",role:"alert",className:"ndpr-form-field__error",children:a$4.dataTypes})]}),jsxs("div",{children:[jsxs("label",{htmlFor:"status",className:"ndpr-form-field__label",children:["Current Status ",jsx("span",{className:"ndpr-form-field__required",children:"*"})]}),jsxs("select",{id:"status",value:$,onChange:t=>Re(t.target.value),className:a$1("ndpr-form-field__input",d.select,c$1),required:true,children:[jsx("option",{value:"ongoing",children:"Ongoing (breach is still active)"}),jsx("option",{value:"contained",children:"Contained (breach is stopped but not resolved)"}),jsx("option",{value:"resolved",children:"Resolved (breach is fully addressed)"})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"approximateRecordCount",className:"ndpr-form-field__label",children:"Approximate Number of Records Concerned"}),jsx("input",{type:"text",id:"approximateRecordCount",value:u,onChange:t=>ve(t.target.value),placeholder:"e.g. 5000",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dataSubjectCategories",className:"ndpr-form-field__label",children:"Categories of Data Subjects Affected"}),jsx("input",{type:"text",id:"dataSubjectCategories",value:y,onChange:t=>Ne(t.target.value),placeholder:"e.g. customers, employees, minors",className:"ndpr-form-field__input"}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Comma-separated. Required for the NDPC report (NDPA Section 40(2))."})]}),jsxs("div",{className:"md:col-span-2 flex items-center",children:[jsx("input",{id:"involvesSensitiveData",type:"checkbox",checked:q,onChange:t=>ue(t.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"involvesSensitiveData",className:"ml-2 text-sm ndpr-text-muted",children:"Sensitive personal data (NDPA Section 30) is involved"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"likelyConsequences",className:"ndpr-form-field__label",children:"Likely Consequences for Data Subjects"}),jsx("textarea",{id:"likelyConsequences",value:j,onChange:t=>ye(t.target.value),placeholder:"e.g. identity theft, financial loss, reputational damage, discrimination",rows:3,className:a$1("ndpr-form-field__input",d.textarea,c$1)}),jsx("p",{className:"text-xs ndpr-text-muted mt-1",children:"Required content for NDPC report and Section 40(3) communications to data subjects."})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"mitigationMeasures",className:"ndpr-form-field__label",children:"Mitigation Measures"}),jsx("textarea",{id:"mitigationMeasures",value:T,onChange:t=>_e(t.target.value),placeholder:"Measures taken or proposed to mitigate possible adverse effects (NDPA Section 40(3))",rows:3,className:a$1("ndpr-form-field__input",d.textarea,c$1)})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("h4",{className:"ndpr-section-heading text-sm mt-4",children:"Data Protection Officer (NDPC contact)"}),jsx("p",{className:"text-xs ndpr-text-muted mb-2",children:"Defaults to organisation-level DPO if left blank."})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoName",className:"ndpr-form-field__label",children:"DPO Name"}),jsx("input",{type:"text",id:"dpoName",value:_,onChange:t=>xe(t.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoEmail",className:"ndpr-form-field__label",children:"DPO Email"}),jsx("input",{type:"email",id:"dpoEmail",value:x,onChange:t=>Ce(t.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{children:[jsx("label",{htmlFor:"dpoPhone",className:"ndpr-form-field__label",children:"DPO Phone"}),jsx("input",{type:"tel",id:"dpoPhone",value:I,onChange:t=>Se(t.target.value),className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2 flex items-center mt-2",children:[jsx("input",{id:"isPhasedReport",type:"checkbox",checked:Q,onChange:t=>De(t.target.checked),className:"h-4 w-4 rounded border-gray-300 text-[rgb(var(--ndpr-primary))] focus:ring-[rgb(var(--ndpr-ring))]"}),jsx("label",{htmlFor:"isPhasedReport",className:"ml-2 text-sm ndpr-text-muted",children:"This is a phased / interim report (Section 40(2) \u2014 complete info not yet available)"})]}),Q&&jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"supplementsReportId",className:"ndpr-form-field__label",children:"Supplements Report ID (if applicable)"}),jsx("input",{type:"text",id:"supplementsReportId",value:X,onChange:t=>Ae(t.target.value),placeholder:"Prior report ID this report supplements",className:"ndpr-form-field__input"})]}),jsxs("div",{className:"md:col-span-2",children:[jsx("label",{htmlFor:"initialActions",className:"ndpr-form-field__label",children:"Initial Actions Taken"}),jsx("textarea",{id:"initialActions",value:B,onChange:t=>we(t.target.value),placeholder:"Describe any immediate actions that have been taken to address the breach",rows:3,className:a$1("ndpr-form-field__input",d.textarea,c$1)})]})]})]}),et&&jsxs("div",{children:[jsx("h3",{className:"ndpr-section-heading",children:"Attachments"}),jsxs("div",{className:"ndpr-form-field",children:[jsx("label",{htmlFor:"breach-attachments",className:"ndpr-form-field__label",children:"Upload Supporting Files (Optional)"}),jsxs("p",{className:"text-xs ndpr-text-muted mb-2",children:["Max ",G," files, ",Z/(1024*1024),"MB each. Allowed types: ",K.join(", ")]}),jsx("input",{id:"breach-attachments",type:"file",onChange:lt,multiple:true,className:"ndpr-form-field__input",accept:K.join(",")}),a$4.attachments&&jsx("p",{id:"attachments-error",role:"alert",className:"ndpr-form-field__error",children:a$4.attachments})]}),O.length>0&&jsxs("div",{className:"ndpr-form-field",children:[jsx("h4",{className:"ndpr-form-field__label",children:"Attached Files:"}),jsx("ul",{className:"ndpr-form-section",children:O.map((t,o)=>jsxs("li",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded",children:[jsxs("div",{className:"flex items-center",children:[jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4 ndpr-text-muted mr-2",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"})}),jsx("span",{className:"text-sm ndpr-text-muted",children:t.name}),jsxs("span",{className:"ml-2 text-xs ndpr-text-muted",children:["(",(t.size/1024).toFixed(1)," KB)"]})]}),jsxs("button",{type:"button",onClick:()=>pt(o),"aria-label":`Remove attachment ${t.name}`,className:"text-red-500 hover:ndpr-text-destructive p-2 min-w-[44px] min-h-[44px] flex items-center justify-center",children:[jsx("svg",{"aria-hidden":"true",focusable:"false",className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),jsx("span",{className:"sr-only",children:"Remove"})]})]},o))})]})]}),jsxs("div",{className:a$1("ndpr-alert ndpr-alert--info",d.notice,c$1),children:[jsx("h3",{className:"text-sm font-bold ndpr-text-info mb-2",children:"NDPA Breach Notification Requirements"}),jsx("p",{className:"ndpr-text-info text-sm",children:"Under the Nigeria Data Protection Act (NDPA), Section 40, data breaches that pose a risk to the rights and freedoms of data subjects must be reported to the NDPC within 72 hours of discovery. The data protection team will assess this breach and determine if notification is required."})]}),jsxs("div",{className:"mt-6 relative flex gap-3",children:[S&&d.loadingOverlay&&jsx("div",{className:d.loadingOverlay}),jsx("button",{type:"submit",disabled:S,className:a$1(`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 ${re} ${S?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c$1),children:S?"Submitting...":at}),jsx("button",{type:"button",onClick:dt,disabled:S,className:a$1("px-6 py-3 bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 rounded-md hover:bg-gray-300 dark:hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2",void 0,c$1),children:"Reset"})]})]})})]})};
|
|
2
|
+
export{Ct as a};
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkLP5KXMBY_js=require('./chunk-LP5KXMBY.js'),chunk6GG3XWI6_js=require('./chunk-6GG3XWI6.js'),
|
|
1
|
+
'use strict';var chunkLP5KXMBY_js=require('./chunk-LP5KXMBY.js'),chunk6GG3XWI6_js=require('./chunk-6GG3XWI6.js'),chunkISCFIAKJ_js=require('./chunk-ISCFIAKJ.js'),chunkVFRGCBJY_js=require('./chunk-VFRGCBJY.js'),chunk7TTXS7JX_js=require('./chunk-7TTXS7JX.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkY346CURW_js=require('./chunk-Y346CURW.js'),chunkF54TBNVF_js=require('./chunk-F54TBNVF.js'),chunkCIEWD57T_js=require('./chunk-CIEWD57T.js'),chunkUSD363RW_js=require('./chunk-USD363RW.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkLP3R2BBL_js=require('./chunk-LP3R2BBL.js'),chunkPEUAA5EC_js=require('./chunk-PEUAA5EC.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkI5ZDNSX5_js=require('./chunk-I5ZDNSX5.js'),chunk7563FVMY_js=require('./chunk-7563FVMY.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"arabicLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.e}});Object.defineProperty(exports,"frenchLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.f}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunk6GG3XWI6_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunk6GG3XWI6_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunk6GG3XWI6_js.b}});Object.defineProperty(exports,"formatNdprAuditReport",{enumerable:true,get:function(){return chunkISCFIAKJ_js.b}});Object.defineProperty(exports,"runNdprAudit",{enumerable:true,get:function(){return chunkISCFIAKJ_js.a}});Object.defineProperty(exports,"DEFAULT_DCPMI_FEES_NGN",{enumerable:true,get:function(){return chunkVFRGCBJY_js.b}});Object.defineProperty(exports,"DEFAULT_DCPMI_THRESHOLDS",{enumerable:true,get:function(){return chunkVFRGCBJY_js.a}});Object.defineProperty(exports,"classifyDCPMI",{enumerable:true,get:function(){return chunkVFRGCBJY_js.c}});Object.defineProperty(exports,"generateComplianceAuditReturn",{enumerable:true,get:function(){return chunkVFRGCBJY_js.d}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunk7TTXS7JX_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"assessBreachNotification",{enumerable:true,get:function(){return chunkY346CURW_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkF54TBNVF_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkF54TBNVF_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkF54TBNVF_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkF54TBNVF_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkF54TBNVF_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunkCIEWD57T_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunkCIEWD57T_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunkCIEWD57T_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkUSD363RW_js.i}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkUSD363RW_js.g}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkUSD363RW_js.f}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkUSD363RW_js.h}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkLP3R2BBL_js.b}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkLP3R2BBL_js.a}});Object.defineProperty(exports,"KNOWN_COOKIES",{enumerable:true,get:function(){return chunkPEUAA5EC_js.a}});Object.defineProperty(exports,"scanCookies",{enumerable:true,get:function(){return chunkPEUAA5EC_js.b}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"NDPRProvider",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.a}});Object.defineProperty(exports,"useNDPRConfig",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.b}});Object.defineProperty(exports,"useNDPRLocale",{enumerable:true,get:function(){return chunkI5ZDNSX5_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.b}});
|
package/dist/core.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as arabicLocale,f as frenchLocale,c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-KUI5W44P.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-4QQJEO3F.mjs';export{b as formatNdprAuditReport,a as runNdprAudit}from'./chunk-
|
|
1
|
+
export{e as arabicLocale,f as frenchLocale,c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-KUI5W44P.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-4QQJEO3F.mjs';export{b as formatNdprAuditReport,a as runNdprAudit}from'./chunk-L5Z77INN.mjs';export{b as DEFAULT_DCPMI_FEES_NGN,a as DEFAULT_DCPMI_THRESHOLDS,c as classifyDCPMI,d as generateComplianceAuditReturn}from'./chunk-MGXWQW5I.mjs';export{a as getComplianceScore}from'./chunk-6A7M4CGJ.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{a as assessBreachNotification}from'./chunk-WJSUVPYX.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-UZBRO7WP.mjs';export{c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-3ELNTFUX.mjs';export{i as assessTransferRisk,g as getTransferMechanismDescription,f as isNDPCApprovalRequired,h as validateTransfer}from'./chunk-K5WLRGDN.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-QX6RIR6I.mjs';export{a as KNOWN_COOKIES,b as scanCookies}from'./chunk-ZY4RCV5C.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as NDPRProvider,b as useNDPRConfig,c as useNDPRLocale}from'./chunk-PHA3YMFO.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-5LJ652AH.mjs';import'./chunk-ZJYULEER.mjs';
|
package/dist/cross-border.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var chunk55EAP4U7_js=require('./chunk-55EAP4U7.js'),
|
|
2
|
+
'use strict';var chunk55EAP4U7_js=require('./chunk-55EAP4U7.js'),chunk5JS3L4XF_js=require('./chunk-5JS3L4XF.js'),chunkUSD363RW_js=require('./chunk-USD363RW.js');require('./chunk-AME4HJR4.js'),require('./chunk-I5ZDNSX5.js'),require('./chunk-7563FVMY.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var s=react.createContext(null);function R(){let r=react.useContext(s);if(!r)throw new Error("CrossBorder compound components must be wrapped in <CrossBorder.Provider>. Example: <CrossBorder.Provider><CrossBorder.Manager /></CrossBorder.Provider>");return r}var t=({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f,children:i})=>{let m=chunk5JS3L4XF_js.a({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f});return jsxRuntime.jsx(s.Provider,{value:m,children:i})};var M={Provider:t,Manager:chunk55EAP4U7_js.a};Object.defineProperty(exports,"CrossBorderTransferManager",{enumerable:true,get:function(){return chunk55EAP4U7_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunk5JS3L4XF_js.a}});Object.defineProperty(exports,"COUNTRY_ADEQUACY_MAP",{enumerable:true,get:function(){return chunkUSD363RW_js.a}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkUSD363RW_js.i}});Object.defineProperty(exports,"getAdequateCountries",{enumerable:true,get:function(){return chunkUSD363RW_js.c}});Object.defineProperty(exports,"getCountryAdequacy",{enumerable:true,get:function(){return chunkUSD363RW_js.b}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkUSD363RW_js.g}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkUSD363RW_js.f}});Object.defineProperty(exports,"requiresNDPCApproval",{enumerable:true,get:function(){return chunkUSD363RW_js.e}});Object.defineProperty(exports,"toAdequacyStatus",{enumerable:true,get:function(){return chunkUSD363RW_js.d}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkUSD363RW_js.h}});exports.CrossBorder=M;exports.CrossBorderProvider=t;exports.useCrossBorderCompound=R;
|
package/dist/cross-border.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {a}from'./chunk-7E5A7YVH.mjs';export{a as CrossBorderTransferManager}from'./chunk-7E5A7YVH.mjs';import {a as a$1}from'./chunk-
|
|
2
|
+
import {a}from'./chunk-7E5A7YVH.mjs';export{a as CrossBorderTransferManager}from'./chunk-7E5A7YVH.mjs';import {a as a$1}from'./chunk-JNEQIRM5.mjs';export{a as useCrossBorderTransfer}from'./chunk-JNEQIRM5.mjs';export{a as COUNTRY_ADEQUACY_MAP,i as assessTransferRisk,c as getAdequateCountries,b as getCountryAdequacy,g as getTransferMechanismDescription,f as isNDPCApprovalRequired,e as requiresNDPCApproval,d as toAdequacyStatus,h as validateTransfer}from'./chunk-K5WLRGDN.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var s=createContext(null);function R(){let r=useContext(s);if(!r)throw new Error("CrossBorder compound components must be wrapped in <CrossBorder.Provider>. Example: <CrossBorder.Provider><CrossBorder.Manager /></CrossBorder.Provider>");return r}var t=({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f,children:i})=>{let m=a$1({adapter:r,storageKey:d,useLocalStorage:a,initialTransfers:n,onAdd:p,onUpdate:C,onRemove:f});return jsx(s.Provider,{value:m,children:i})};var M={Provider:t,Manager:a};export{M as CrossBorder,t as CrossBorderProvider,R as useCrossBorderCompound};
|
package/dist/dsr.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var chunkTYR5PFYD_js=require('./chunk-TYR5PFYD.js'),chunkCHUOSZST_js=require('./chunk-CHUOSZST.js');require('./chunk-UXUMYP4L.js');var
|
|
2
|
+
'use strict';var chunkTYR5PFYD_js=require('./chunk-TYR5PFYD.js'),chunkCHUOSZST_js=require('./chunk-CHUOSZST.js');require('./chunk-UXUMYP4L.js');var chunkTSA2C2YC_js=require('./chunk-TSA2C2YC.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js');require('./chunk-AME4HJR4.js'),require('./chunk-I5ZDNSX5.js'),require('./chunk-7563FVMY.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var p=react.createContext(null);function P(){let e=react.useContext(p);if(!e)throw new Error("DSR compound components must be wrapped in <DSR.Provider>. Example: <DSR.Provider requestTypes={...}><DSR.Form /></DSR.Provider>");return e}var R=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n,children:i})=>{let f=chunkTSA2C2YC_js.a({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n}),x=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},f),{requestTypes:e});return jsxRuntime.jsx(p.Provider,{value:x,children:i})};var C={Provider:R,Form:chunkCHUOSZST_js.a,Dashboard:chunkTYR5PFYD_js.a,Tracker:chunkTYR5PFYD_js.b};Object.defineProperty(exports,"DSRDashboard",{enumerable:true,get:function(){return chunkTYR5PFYD_js.a}});Object.defineProperty(exports,"DSRTracker",{enumerable:true,get:function(){return chunkTYR5PFYD_js.b}});Object.defineProperty(exports,"DSRRequestForm",{enumerable:true,get:function(){return chunkCHUOSZST_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTSA2C2YC_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});exports.DSR=C;exports.DSRProvider=R;exports.useDSRCompound=P;
|
package/dist/dsr.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {b,a}from'./chunk-AS2M5OTX.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-AS2M5OTX.mjs';import {a as a$1}from'./chunk-OMACLDXI.mjs';export{a as DSRRequestForm}from'./chunk-OMACLDXI.mjs';import'./chunk-EWVK45Z3.mjs';import {a as a$2}from'./chunk-
|
|
2
|
+
import {b,a}from'./chunk-AS2M5OTX.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-AS2M5OTX.mjs';import {a as a$1}from'./chunk-OMACLDXI.mjs';export{a as DSRRequestForm}from'./chunk-OMACLDXI.mjs';import'./chunk-EWVK45Z3.mjs';import {a as a$2}from'./chunk-H5WABWMB.mjs';export{a as useDSR}from'./chunk-H5WABWMB.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-DBZSN4WP.mjs';import {b as b$1,a as a$3}from'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null);function P(){let e=useContext(p);if(!e)throw new Error("DSR compound components must be wrapped in <DSR.Provider>. Example: <DSR.Provider requestTypes={...}><DSR.Form /></DSR.Provider>");return e}var R=({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n,children:i})=>{let f=a$2({requestTypes:e,adapter:S,storageKey:D,useLocalStorage:u,onSubmit:d,onUpdate:n}),x=b$1(a$3({},f),{requestTypes:e});return jsx(p.Provider,{value:x,children:i})};var C={Provider:R,Form:a$1,Dashboard:a,Tracker:b};export{C as DSR,R as DSRProvider,P as useDSRCompound};
|