@tantainnovative/ndpr-toolkit 5.3.0 → 5.5.0
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 +14 -0
- package/README.md +51 -7
- package/bin/ndpr.mjs +141 -0
- package/dist/breach.d.mts +9 -0
- package/dist/breach.d.ts +9 -0
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-5ZMYNOMR.mjs +2 -0
- package/dist/chunk-JXK5RUR3.mjs +2 -0
- package/dist/chunk-LHQG25Y2.js +2 -0
- package/dist/chunk-OW4GO3JF.js +1 -0
- package/dist/chunk-Q5KB2DN3.mjs +1 -0
- package/dist/chunk-SZXHNJGG.mjs +1 -0
- package/dist/chunk-WJSUVPYX.mjs +1 -0
- package/dist/chunk-WKY26JLT.js +1 -0
- package/dist/chunk-XCKX2WKD.js +2 -0
- package/dist/chunk-Y346CURW.js +1 -0
- package/dist/core.d.mts +76 -0
- package/dist/core.d.ts +76 -0
- package/dist/core.js +1 -1
- package/dist/core.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.d.mts +85 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/presets.d.mts +2 -0
- package/dist/presets.d.ts +2 -0
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/server.d.mts +320 -0
- package/dist/server.d.ts +320 -0
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/package.json +5 -1
- package/dist/chunk-6MO3GS3B.js +0 -2
- package/dist/chunk-GYLUTVKB.js +0 -1
- package/dist/chunk-KOHFQIV4.mjs +0 -1
- package/dist/chunk-NKFTLFPD.mjs +0 -1
- package/dist/chunk-OXFULQTE.js +0 -1
- package/dist/chunk-WLZTATLL.mjs +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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
|
+
## [5.5.0](https://github.com/mr-tanta/ndpr-toolkit/compare/v5.4.0...v5.5.0) (2026-05-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **cli:** add ndpr audit CLI compliance gate ([8a8bdc5](https://github.com/mr-tanta/ndpr-toolkit/commit/8a8bdc53ddc322a8d92a90fd86353a4a22df9cdc))
|
|
11
|
+
|
|
12
|
+
## [5.4.0](https://github.com/mr-tanta/ndpr-toolkit/compare/v5.3.0...v5.4.0) (2026-05-30)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **breach:** show live NDPC notification readiness in BreachReportForm ([86e2394](https://github.com/mr-tanta/ndpr-toolkit/commit/86e23943756680ad64bd939e60edb896884680c2))
|
|
18
|
+
|
|
5
19
|
## [5.3.0](https://github.com/mr-tanta/ndpr-toolkit/compare/v5.2.0...v5.3.0) (2026-05-30)
|
|
6
20
|
|
|
7
21
|
|
package/README.md
CHANGED
|
@@ -9,16 +9,18 @@
|
|
|
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.
|
|
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 registration 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
|
-
**[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)** | **[
|
|
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.
|
|
19
|
+
> **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).
|
|
20
20
|
>
|
|
21
|
-
> **
|
|
21
|
+
> **NDPC GAID 2025 utilities (5.2–5.4):** `classifyDCPMI` (DCPMI registration tier + fee), `generateComplianceAuditReturn` (CAR initial-audit + 72-hour 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.
|
|
22
|
+
>
|
|
23
|
+
> **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).
|
|
22
24
|
|
|
23
25
|
<p align="center">
|
|
24
26
|
<img src="https://raw.githubusercontent.com/mr-tanta/ndpr-toolkit/v5.0.0/public/screenshots/hero.png" alt="NDPA Toolkit — NDPA Compliance Made Beautiful" width="800" />
|
|
@@ -274,7 +276,7 @@ const { hasConsent, acceptAll, rejectAll, shouldShowBanner } = useConsent({ opti
|
|
|
274
276
|
|
|
275
277
|
### Server — strictly RSC-safe, zero React
|
|
276
278
|
|
|
277
|
-
The recommended entry for backend and serverless contexts. Pure validators, generators, scoring, locales, and
|
|
279
|
+
The recommended entry for backend and serverless contexts. Pure validators, generators, scoring, locales, adapters, the aggregate compliance audit (`runNdprAudit`), and the GAID 2025 utilities (`classifyDCPMI`, `generateComplianceAuditReturn`, `assessBreachNotification`) — no React in the import graph. Safe to call from a Next.js Server Component, Edge Function, NestJS controller, or Cloudflare Worker.
|
|
278
280
|
|
|
279
281
|
```ts
|
|
280
282
|
import {
|
|
@@ -534,6 +536,48 @@ The content checklist (`notificationToCommission`) maps each item to its source
|
|
|
534
536
|
|
|
535
537
|
---
|
|
536
538
|
|
|
539
|
+
## Compliance Audit CLI
|
|
540
|
+
|
|
541
|
+
The package ships an `ndpr` binary. `ndpr audit` scores a compliance config against the toolkit's engine — the compliance score plus the GAID 2025 DCPMI, CAR, and breach-notification checks — and **exits non-zero when the audit fails**, so you can drop it into CI as a compliance gate.
|
|
542
|
+
|
|
543
|
+
```bash
|
|
544
|
+
# with the toolkit installed in your project, the `ndpr` bin is on your PATH:
|
|
545
|
+
npx ndpr audit --init # writes ndpr.audit.json
|
|
546
|
+
npx ndpr audit # run the audit (exit 1 on failure)
|
|
547
|
+
npx ndpr audit --min-score 80
|
|
548
|
+
npx ndpr audit --json # machine-readable result
|
|
549
|
+
|
|
550
|
+
# standalone (no install), use the scoped package name:
|
|
551
|
+
npx @tantainnovative/ndpr-toolkit audit --init
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
```text
|
|
555
|
+
NDPA 2023 Compliance Audit
|
|
556
|
+
Generated 2026-05-31
|
|
557
|
+
|
|
558
|
+
Compliance score: 82/100 (good) — minimum 70
|
|
559
|
+
|
|
560
|
+
✓ Overall compliance score
|
|
561
|
+
82/100 (good); minimum 70.
|
|
562
|
+
! Minor (child) data protection controls (Section 31)
|
|
563
|
+
Implement age-verification and parental-consent controls for processing data of minors.
|
|
564
|
+
✓ DCPMI registration (GAID 2025)
|
|
565
|
+
Not a Data Controller/Processor of Major Importance by volume.
|
|
566
|
+
|
|
567
|
+
2 passed, 3 warning(s), 0 failed
|
|
568
|
+
Verdict: PASS
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
The config is `{ minScore?, compliance, dcpmi?, car?, breaches? }`. Critical NDPA gaps and overdue breach notifications hard-fail the audit; high-priority gaps and approaching CAR deadlines warn. In a GitHub Action:
|
|
572
|
+
|
|
573
|
+
```yaml
|
|
574
|
+
- run: npx ndpr audit --min-score 80
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
The same logic is exposed programmatically — `runNdprAudit(input, options?)` and `formatNdprAuditReport(result)` from `@tantainnovative/ndpr-toolkit/server` (pure, React-free). See [the audit CLI guide](https://ndprtoolkit.com.ng/docs/guides/audit-cli).
|
|
578
|
+
|
|
579
|
+
---
|
|
580
|
+
|
|
537
581
|
## Backend Integration
|
|
538
582
|
|
|
539
583
|
### CLI scaffolder
|
|
@@ -647,7 +691,7 @@ Override individual strings via `mergeLocale(base, partial)`. Component prop ove
|
|
|
647
691
|
| Consent Management | `/consent` | Sections 25–26 | `ConsentBanner`, `ConsentManager`, `Consent.*`, `useConsent` |
|
|
648
692
|
| Data Subject Rights | `/dsr` | Part VI §34–38 | `DSRRequestForm`, `DSRDashboard`, `useDSR` |
|
|
649
693
|
| DPIA | `/dpia` | Section 28 | `DPIAQuestionnaire`, `DPIAReport`, `useDPIA` |
|
|
650
|
-
| Breach Notification | `/breach` | Section 40 | `BreachReportForm
|
|
694
|
+
| Breach Notification | `/breach` | Section 40 | `BreachReportForm` (live readiness panel), `BreachRiskAssessment`, `useBreach`, `useBreachNotificationAssessment` |
|
|
651
695
|
| Privacy Policy | `/policy` | Section 27 | `PolicyGenerator`, `PolicyPreview`, `PolicyExporter` |
|
|
652
696
|
| Lawful Basis | `/lawful-basis` | Section 25 | `LawfulBasisTracker`, `useLawfulBasis` |
|
|
653
697
|
| Cross-Border Transfers | `/cross-border` | Part VIII §41–43 | `CrossBorderTransferManager`, `useCrossBorderTransfer` |
|
|
@@ -726,7 +770,7 @@ Each component exports its `ClassNames` TypeScript interface for autocomplete. F
|
|
|
726
770
|
| Path | What you get | Dependencies | RSC-safe |
|
|
727
771
|
|------|-------------|--------------|:--------:|
|
|
728
772
|
| `.` (default) | Everything | `react`, optional Radix peers for `/presets` | No |
|
|
729
|
-
| `/server` | **Pure validators, generators, scoring, locales, adapters, types — zero React** | `tslib` | **Yes** |
|
|
773
|
+
| `/server` | **Pure validators, generators, scoring, the `ndpr audit` engine + GAID 2025 utilities, locales, adapters, types — zero React** | `tslib` | **Yes** |
|
|
730
774
|
| `/core` | Types, utility functions, NDPRProvider | `react`[^core] | Partial |
|
|
731
775
|
| `/hooks` | React hooks for all 8 modules | `react` | No |
|
|
732
776
|
| `/headless` | **Alias of `/hooks`** — identical exports under a more discoverable name (3.10.0) | `react` | No |
|
package/bin/ndpr.mjs
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// ndpr — NDPA 2023 compliance CLI.
|
|
3
|
+
// `ndpr audit` scores a compliance config against the toolkit's engine
|
|
4
|
+
// (compliance score + GAID 2025 DCPMI / CAR / breach checks) and exits
|
|
5
|
+
// non-zero when the audit fails — drop it into CI as a compliance gate.
|
|
6
|
+
|
|
7
|
+
import { readFileSync, writeFileSync, existsSync } from 'node:fs';
|
|
8
|
+
import { resolve } from 'node:path';
|
|
9
|
+
import { createRequire } from 'node:module';
|
|
10
|
+
|
|
11
|
+
const require = createRequire(import.meta.url);
|
|
12
|
+
const pkg = require('../package.json');
|
|
13
|
+
|
|
14
|
+
const DEFAULT_CONFIG_NAMES = ['ndpr.audit.json', 'ndpr.config.json'];
|
|
15
|
+
|
|
16
|
+
const STARTER_CONFIG = {
|
|
17
|
+
minScore: 70,
|
|
18
|
+
compliance: {
|
|
19
|
+
consent: { hasConsentMechanism: true, hasPurposeSpecification: true, hasWithdrawalMechanism: true, hasMinorProtection: false, consentRecordsRetained: true },
|
|
20
|
+
dsr: { hasRequestMechanism: true, supportsAccess: true, supportsRectification: true, supportsErasure: false, supportsPortability: false, supportsObjection: false, responseTimelineDays: 30 },
|
|
21
|
+
dpia: { conductedForHighRisk: true, documentedRisks: true, mitigationMeasures: true },
|
|
22
|
+
breach: { hasNotificationProcess: true, notifiesWithin72Hours: true, hasRiskAssessment: true, hasRecordKeeping: true },
|
|
23
|
+
policy: { hasPrivacyPolicy: true, isPubliclyAccessible: true, lastUpdated: '2026-01-01', coversAllSections: true },
|
|
24
|
+
lawfulBasis: { documentedForAllProcessing: true, hasLegitimateInterestAssessment: false },
|
|
25
|
+
crossBorder: { hasTransferMechanisms: true, adequacyAssessed: true, ndpcApprovalObtained: false },
|
|
26
|
+
ropa: { maintained: true, includesAllProcessing: true, lastReviewed: '2026-01-01' },
|
|
27
|
+
},
|
|
28
|
+
dcpmi: { dataSubjectsInSixMonths: 0 },
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
function parseArgs(argv) {
|
|
32
|
+
const args = { _: [], flags: {} };
|
|
33
|
+
for (let i = 0; i < argv.length; i++) {
|
|
34
|
+
const a = argv[i];
|
|
35
|
+
if (a.startsWith('--')) {
|
|
36
|
+
const key = a.slice(2);
|
|
37
|
+
const next = argv[i + 1];
|
|
38
|
+
if (next !== undefined && !next.startsWith('--')) { args.flags[key] = next; i++; }
|
|
39
|
+
else args.flags[key] = true;
|
|
40
|
+
} else {
|
|
41
|
+
args._.push(a);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return args;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const HELP = `ndpr ${pkg.version} — NDPA 2023 compliance CLI
|
|
48
|
+
|
|
49
|
+
Usage:
|
|
50
|
+
ndpr audit [options] Run a compliance audit and exit non-zero on failure
|
|
51
|
+
ndpr --help Show this help
|
|
52
|
+
ndpr --version Print the version
|
|
53
|
+
|
|
54
|
+
Options for "audit":
|
|
55
|
+
--config <path> Path to the audit config JSON
|
|
56
|
+
(default: ./ndpr.audit.json or ./ndpr.config.json)
|
|
57
|
+
--min-score <n> Minimum overall compliance score to pass (default 70)
|
|
58
|
+
--json Output the full result as JSON
|
|
59
|
+
--no-color Disable coloured output
|
|
60
|
+
--init Write a starter ndpr.audit.json and exit
|
|
61
|
+
|
|
62
|
+
Config shape: { minScore?, compliance, dcpmi?, car?, breaches? }
|
|
63
|
+
See https://ndprtoolkit.com.ng/docs/guides/audit-cli`;
|
|
64
|
+
|
|
65
|
+
function findConfig(explicit) {
|
|
66
|
+
if (explicit) return resolve(process.cwd(), explicit);
|
|
67
|
+
for (const name of DEFAULT_CONFIG_NAMES) {
|
|
68
|
+
const p = resolve(process.cwd(), name);
|
|
69
|
+
if (existsSync(p)) return p;
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async function main() {
|
|
75
|
+
const argv = process.argv.slice(2);
|
|
76
|
+
const args = parseArgs(argv);
|
|
77
|
+
const command = args._[0] ?? (args.flags.help || args.flags.version ? null : 'audit');
|
|
78
|
+
|
|
79
|
+
if (args.flags.version) { process.stdout.write(`${pkg.version}\n`); return 0; }
|
|
80
|
+
if (args.flags.help || command === 'help') { process.stdout.write(`${HELP}\n`); return 0; }
|
|
81
|
+
|
|
82
|
+
if (command !== 'audit') {
|
|
83
|
+
process.stderr.write(`Unknown command: ${command}\n\n${HELP}\n`);
|
|
84
|
+
return 2;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (args.flags.init) {
|
|
88
|
+
const out = resolve(process.cwd(), 'ndpr.audit.json');
|
|
89
|
+
if (existsSync(out)) { process.stderr.write(`Refusing to overwrite existing ${out}\n`); return 1; }
|
|
90
|
+
writeFileSync(out, JSON.stringify(STARTER_CONFIG, null, 2) + '\n');
|
|
91
|
+
process.stdout.write(`Wrote starter config to ${out}\n`);
|
|
92
|
+
return 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const configPath = findConfig(typeof args.flags.config === 'string' ? args.flags.config : undefined);
|
|
96
|
+
if (!configPath) {
|
|
97
|
+
process.stderr.write('No audit config found. Create one with "ndpr audit --init" or pass --config <path>.\n');
|
|
98
|
+
return 2;
|
|
99
|
+
}
|
|
100
|
+
if (!existsSync(configPath)) {
|
|
101
|
+
process.stderr.write(`Config not found: ${configPath}\n`);
|
|
102
|
+
return 2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
let config;
|
|
106
|
+
try {
|
|
107
|
+
config = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
108
|
+
} catch (err) {
|
|
109
|
+
process.stderr.write(`Failed to parse ${configPath}: ${err.message}\n`);
|
|
110
|
+
return 2;
|
|
111
|
+
}
|
|
112
|
+
if (!config || typeof config.compliance !== 'object') {
|
|
113
|
+
process.stderr.write(`Config ${configPath} must contain a "compliance" object.\n`);
|
|
114
|
+
return 2;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const { runNdprAudit, formatNdprAuditReport } = await import('@tantainnovative/ndpr-toolkit/server');
|
|
118
|
+
|
|
119
|
+
const minScore = args.flags['min-score'] !== undefined ? Number(args.flags['min-score']) : config.minScore;
|
|
120
|
+
const options = { ...(config.options ?? {}) };
|
|
121
|
+
if (minScore !== undefined && !Number.isNaN(minScore)) options.minScore = minScore;
|
|
122
|
+
|
|
123
|
+
const result = runNdprAudit(
|
|
124
|
+
{ compliance: config.compliance, dcpmi: config.dcpmi, car: config.car, breaches: config.breaches },
|
|
125
|
+
options,
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
if (args.flags.json) {
|
|
129
|
+
process.stdout.write(JSON.stringify(result, null, 2) + '\n');
|
|
130
|
+
} else {
|
|
131
|
+
const color = !args.flags['no-color'] && process.stdout.isTTY === true;
|
|
132
|
+
process.stdout.write(formatNdprAuditReport(result, { color }) + '\n');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return result.passed ? 0 : 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
main().then(
|
|
139
|
+
(code) => process.exit(code),
|
|
140
|
+
(err) => { process.stderr.write(`ndpr: ${err?.stack || err}\n`); process.exit(2); },
|
|
141
|
+
);
|
package/dist/breach.d.mts
CHANGED
|
@@ -332,6 +332,8 @@ export declare interface BreachReportFormClassNames {
|
|
|
332
332
|
notice?: string;
|
|
333
333
|
/** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
|
|
334
334
|
loadingOverlay?: string;
|
|
335
|
+
/** Live NDPC-notification completeness panel */
|
|
336
|
+
completeness?: string;
|
|
335
337
|
}
|
|
336
338
|
|
|
337
339
|
declare interface BreachReportFormProps {
|
|
@@ -425,6 +427,13 @@ declare interface BreachReportFormProps {
|
|
|
425
427
|
* change the `key` prop from the parent.
|
|
426
428
|
*/
|
|
427
429
|
onReset?: () => void;
|
|
430
|
+
/**
|
|
431
|
+
* Show a live NDPC-notification readiness panel that scores the form against
|
|
432
|
+
* the NDPA S. 40 / GAID 2025 Article 33 mandated content and the 72-hour
|
|
433
|
+
* deadline as the user fills it in.
|
|
434
|
+
* @default true
|
|
435
|
+
*/
|
|
436
|
+
showCompleteness?: boolean;
|
|
428
437
|
}
|
|
429
438
|
|
|
430
439
|
/**
|
package/dist/breach.d.ts
CHANGED
|
@@ -332,6 +332,8 @@ export declare interface BreachReportFormClassNames {
|
|
|
332
332
|
notice?: string;
|
|
333
333
|
/** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
|
|
334
334
|
loadingOverlay?: string;
|
|
335
|
+
/** Live NDPC-notification completeness panel */
|
|
336
|
+
completeness?: string;
|
|
335
337
|
}
|
|
336
338
|
|
|
337
339
|
declare interface BreachReportFormProps {
|
|
@@ -425,6 +427,13 @@ declare interface BreachReportFormProps {
|
|
|
425
427
|
* change the `key` prop from the parent.
|
|
426
428
|
*/
|
|
427
429
|
onReset?: () => void;
|
|
430
|
+
/**
|
|
431
|
+
* Show a live NDPC-notification readiness panel that scores the form against
|
|
432
|
+
* the NDPA S. 40 / GAID 2025 Article 33 mandated content and the 72-hour
|
|
433
|
+
* deadline as the user fills it in.
|
|
434
|
+
* @default true
|
|
435
|
+
*/
|
|
436
|
+
showCompleteness?: boolean;
|
|
428
437
|
}
|
|
429
438
|
|
|
430
439
|
/**
|
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'),chunkLHQG25Y2_js=require('./chunk-LHQG25Y2.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:chunkLHQG25Y2_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 chunkLHQG25Y2_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-5ZMYNOMR.mjs';export{a as BreachReportForm}from'./chunk-5ZMYNOMR.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,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:C=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())}`},[S,ae]=useState((r==null?void 0:r.title)||""),[D,ne]=useState((r==null?void 0:r.description)||""),[A,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)),[T,me]=useState(((Te=r==null?void 0:r.reporter)==null?void 0:Te.name)||""),[R,ce]=useState(((Ie=r==null?void 0:r.reporter)==null?void 0:Ie.email)||""),[I,le]=useState(((Be=r==null?void 0:r.reporter)==null?void 0:Be.department)||""),[B,pe]=useState(((Ee=r==null?void 0:r.reporter)==null?void 0:Ee.phone)||""),[E,ge]=useState((r==null?void 0:r.affectedSystems)||[]),[nt,fe]=useState(((Me=r==null?void 0:r.affectedSystems)==null?void 0:Me.join(", "))||""),[w,be]=useState((r==null?void 0:r.dataTypes)||[]),[b$1,he]=useState((r==null?void 0:r.estimatedAffectedSubjects)!=null?String(r.estimatedAffectedSubjects):""),[N,ve]=useState((r==null?void 0:r.approximateRecordCount)!=null?String(r.approximateRecordCount):""),[u,Ne]=useState((($e=r==null?void 0:r.dataSubjectCategories)==null?void 0:$e.join(", "))||""),[P,ue]=useState((Oe=r==null?void 0:r.involvesSensitiveData)!=null?Oe:false),[F,ye]=useState((r==null?void 0:r.likelyConsequences)||""),[k,_e]=useState((r==null?void 0:r.mitigationMeasures)||""),[y,xe]=useState(((Le=r==null?void 0:r.dpoContact)==null?void 0:Le.name)||""),[_,Ce]=useState(((ze=r==null?void 0:r.dpoContact)==null?void 0:ze.email)||""),[M,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"),[q,we]=useState((r==null?void 0:r.initialActions)||""),[O,V]=useState([]),[ot,ee]=useState(false),[a$4,j]=useState({}),g=useMemo(()=>{let t={id:"",title:S,description:D,category:A,discoveredAt:h?new Date(h).getTime():NaN,occurredAt:v?new Date(v).getTime():void 0,reportedAt:0,reporter:{name:T,email:R,department:I,phone:B||void 0},affectedSystems:E,dataTypes:w,estimatedAffectedSubjects:b$1?Number(b$1):void 0,approximateRecordCount:N?Number(N):void 0,dataSubjectCategories:u?u.split(",").map(o=>o.trim()).filter(Boolean):void 0,involvesSensitiveData:P,likelyConsequences:F||void 0,mitigationMeasures:k||void 0,dpoContact:y||_?{name:y,email:_,phone:M||void 0}:void 0,status:$,initialActions:q||void 0};return a(t,{highRisk:P})},[S,D,A,h,v,E,w,b$1,N,u,P,F,k,y,_,$,q]),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),j({}),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`,j(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?j(f=>a$2(a$2({},f),s)):j(f=>b(a$2({},f),{attachments:""}));},pt=t=>{V(o=>o.filter((p,s)=>s!==t));},gt=()=>{let t={};return S.trim()||(t.breachTitle="Breach title is required"),D.trim()||(t.description="Description is required"),A||(t.category="Category is required"),h||(t.discoveredAt="Discovery date is required"),T.trim()||(t.reporterName="Reporter name is required"),R.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(R)||(t.reporterEmail="Reporter email is invalid"):t.reporterEmail="Reporter email is required",I.trim()||(t.reporterDepartment="Reporter department is required"),E.length===0&&(t.affectedSystems="At least one affected system is required"),w.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"),j(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(S),description:a$3(D),category:A,discoveredAt:new Date(h).getTime(),occurredAt:v?new Date(v).getTime():void 0,reportedAt:Date.now(),reporter:{name:a$3(T),email:a$3(R),department:a$3(I),phone:B?a$3(B):void 0},affectedSystems:E.map(s=>a$3(s)),dataTypes:w,estimatedAffectedSubjects:b$1?Number(b$1):void 0,approximateRecordCount:N?Number(N):void 0,dataSubjectCategories:u?u.split(",").map(s=>a$3(s.trim())).filter(Boolean):void 0,involvesSensitiveData:P,likelyConsequences:F?a$3(F):void 0,mitigationMeasures:k?a$3(k):void 0,dpoContact:y||_?{name:a$3(y),email:a$3(_),phone:M?a$3(M):void 0}:void 0,isPhasedReport:Q||void 0,supplementsReportId:X?a$3(X):void 0,status:$,initialActions:q?a$3(q):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:S,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:A,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:D,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:T,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:R,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:I,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:B,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:w.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:N,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:u,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:P,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:F,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:k,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:y,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:_,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:M,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:q,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:[C&&d.loadingOverlay&&jsx("div",{className:d.loadingOverlay}),jsx("button",{type:"submit",disabled:C,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} ${C?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c$1),children:C?"Submitting...":at}),jsx("button",{type:"button",onClick:dt,disabled:C,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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {c,d}from'./chunk-SZXHNJGG.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,u;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 registration (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=((u=e.breaches)!=null?u:[]).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,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:C=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())}`},[S,ae]=react.useState((r==null?void 0:r.title)||""),[D,ne]=react.useState((r==null?void 0:r.description)||""),[A,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)),[T,me]=react.useState(((Te=r==null?void 0:r.reporter)==null?void 0:Te.name)||""),[R,ce]=react.useState(((Ie=r==null?void 0:r.reporter)==null?void 0:Ie.email)||""),[I,le]=react.useState(((Be=r==null?void 0:r.reporter)==null?void 0:Be.department)||""),[B,pe]=react.useState(((Ee=r==null?void 0:r.reporter)==null?void 0:Ee.phone)||""),[E,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(", "))||""),[w,be]=react.useState((r==null?void 0:r.dataTypes)||[]),[b,he]=react.useState((r==null?void 0:r.estimatedAffectedSubjects)!=null?String(r.estimatedAffectedSubjects):""),[N,ve]=react.useState((r==null?void 0:r.approximateRecordCount)!=null?String(r.approximateRecordCount):""),[u,Ne]=react.useState((($e=r==null?void 0:r.dataSubjectCategories)==null?void 0:$e.join(", "))||""),[P,ue]=react.useState((Oe=r==null?void 0:r.involvesSensitiveData)!=null?Oe:false),[F,ye]=react.useState((r==null?void 0:r.likelyConsequences)||""),[k,_e]=react.useState((r==null?void 0:r.mitigationMeasures)||""),[y,xe]=react.useState(((Le=r==null?void 0:r.dpoContact)==null?void 0:Le.name)||""),[_,Ce]=react.useState(((ze=r==null?void 0:r.dpoContact)==null?void 0:ze.email)||""),[M,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"),[q,we]=react.useState((r==null?void 0:r.initialActions)||""),[O,V]=react.useState([]),[ot,ee]=react.useState(false),[a,j]=react.useState({}),g=react.useMemo(()=>{let t={id:"",title:S,description:D,category:A,discoveredAt:h?new Date(h).getTime():NaN,occurredAt:v?new Date(v).getTime():void 0,reportedAt:0,reporter:{name:T,email:R,department:I,phone:B||void 0},affectedSystems:E,dataTypes:w,estimatedAffectedSubjects:b?Number(b):void 0,approximateRecordCount:N?Number(N):void 0,dataSubjectCategories:u?u.split(",").map(o=>o.trim()).filter(Boolean):void 0,involvesSensitiveData:P,likelyConsequences:F||void 0,mitigationMeasures:k||void 0,dpoContact:y||_?{name:y,email:_,phone:M||void 0}:void 0,status:$,initialActions:q||void 0};return chunkY346CURW_js.a(t,{highRisk:P})},[S,D,A,h,v,E,w,b,N,u,P,F,k,y,_,$,q]),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),j({}),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`,j(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?j(f=>chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},f),s)):j(f=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},f),{attachments:""}));},pt=t=>{V(o=>o.filter((p,s)=>s!==t));},gt=()=>{let t={};return S.trim()||(t.breachTitle="Breach title is required"),D.trim()||(t.description="Description is required"),A||(t.category="Category is required"),h||(t.discoveredAt="Discovery date is required"),T.trim()||(t.reporterName="Reporter name is required"),R.trim()?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(R)||(t.reporterEmail="Reporter email is invalid"):t.reporterEmail="Reporter email is required",I.trim()||(t.reporterDepartment="Reporter department is required"),E.length===0&&(t.affectedSystems="At least one affected system is required"),w.length===0&&(t.dataTypes="At least one data type is required"),b&&isNaN(Number(b))&&(t.estimatedAffectedSubjects="Estimated affected subjects must be a number"),j(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(S),description:chunkUXUMYP4L_js.a(D),category:A,discoveredAt:new Date(h).getTime(),occurredAt:v?new Date(v).getTime():void 0,reportedAt:Date.now(),reporter:{name:chunkUXUMYP4L_js.a(T),email:chunkUXUMYP4L_js.a(R),department:chunkUXUMYP4L_js.a(I),phone:B?chunkUXUMYP4L_js.a(B):void 0},affectedSystems:E.map(s=>chunkUXUMYP4L_js.a(s)),dataTypes:w,estimatedAffectedSubjects:b?Number(b):void 0,approximateRecordCount:N?Number(N):void 0,dataSubjectCategories:u?u.split(",").map(s=>chunkUXUMYP4L_js.a(s.trim())).filter(Boolean):void 0,involvesSensitiveData:P,likelyConsequences:F?chunkUXUMYP4L_js.a(F):void 0,mitigationMeasures:k?chunkUXUMYP4L_js.a(k):void 0,dpoContact:y||_?{name:chunkUXUMYP4L_js.a(y),email:chunkUXUMYP4L_js.a(_),phone:M?chunkUXUMYP4L_js.a(M):void 0}:void 0,isPhasedReport:Q||void 0,supplementsReportId:X?chunkUXUMYP4L_js.a(X):void 0,status:$,initialActions:q?chunkUXUMYP4L_js.a(q):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:S,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:A,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:D,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:T,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:R,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:I,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:B,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:w.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:N,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:u,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:P,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:F,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:k,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:y,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:_,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:M,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:q,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:[C&&d.loadingOverlay&&jsxRuntime.jsx("div",{className:d.loadingOverlay}),jsxRuntime.jsx("button",{type:"submit",disabled:C,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} ${C?"opacity-50 cursor-not-allowed":""}`,d.primaryButton||d.submitButton,c),children:C?"Submitting...":at}),jsxRuntime.jsx("button",{type:"button",onClick:dt,disabled:C,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
|
+
'use strict';var chunkWKY26JLT_js=require('./chunk-WKY26JLT.js'),chunk7TTXS7JX_js=require('./chunk-7TTXS7JX.js'),chunkY346CURW_js=require('./chunk-Y346CURW.js'),react=require('react');function u(t,e){return react.useMemo(()=>chunkY346CURW_js.a(t,e),[t,e])}function M({input:t}){let e=JSON.stringify(t);return react.useMemo(()=>chunk7TTXS7JX_js.a(t),[e])}function D(t,e){return react.useMemo(()=>chunkWKY26JLT_js.c(t,e),[t.dataSubjectsInSixMonths,t.isDesignated,e])}function P(t,e){return react.useMemo(()=>chunkWKY26JLT_js.d(t,e),[t.commencementDate,t.asOf,t.tier,e])}exports.a=u;exports.b=M;exports.c=D;exports.d=P;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c,d}from'./chunk-SZXHNJGG.mjs';import {a as a$1}from'./chunk-6A7M4CGJ.mjs';import {a}from'./chunk-WJSUVPYX.mjs';import {useMemo}from'react';function u(t,e){return useMemo(()=>a(t,e),[t,e])}function M({input:t}){let e=JSON.stringify(t);return useMemo(()=>a$1(t),[e])}function D(t,e){return useMemo(()=>c(t,e),[t.dataSubjectsInSixMonths,t.isDesignated,e])}function P(t,e){return useMemo(()=>d(t,e),[t.commencementDate,t.asOf,t.tier,e])}export{u as a,M as b,D as c,P as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-ZJYULEER.mjs';var N={ohl:200,ehl:1e3,uhl:5e3},x={UHL:25e4,EHL:1e5,OHL:1e4};function T(e,i={}){let t=a(a({},N),i.thresholds),a$1=a(a({},x),i.fees),r=e==null?void 0:e.dataSubjectsInSixMonths,l=typeof r=="number"&&r>0?Math.floor(r):0,n;l>t.uhl?n="UHL":l>=t.ehl?n="EHL":l>=t.ohl?n="OHL":e!=null&&e.isDesignated?n="listed":n="none";let s=n!=="none",c=n==="UHL"||n==="EHL"||n==="OHL"?a$1[n]:0,o=[];return n==="listed"&&o.push("Designated as a DCPMI below the volume tiers \u2014 confirm the applicable registration tier and fee with the NDPC."),s&&o.push(n==="OHL"?"OHL organisations renew their NDPC registration annually and file Compliance Audit Returns (CAR) each year.":"Register once with the NDPC, then file Compliance Audit Returns (CAR) annually."),o.push("Thresholds, fees, and filing dates follow the NDPC GAID 2025 baseline and can change \u2014 verify against current NDPC guidance before relying on them."),{tier:n,isDCPMI:s,annualFeeNGN:c,registration:{required:s,renewsAnnually:n==="OHL"},compliance:{auditReturnsAnnual:s,initialAuditWithinMonths:15},notes:o,dataSubjectsConsidered:l}}function O(e){return String(e).padStart(2,"0")}function y(e){let[i,t,a]=e.split("-").map(Number);return new Date(Date.UTC(i,t-1,a))}function H(e){return e.toISOString().slice(0,10)}function S(e,i){let[t,a,r]=e.split("-").map(Number);return H(new Date(Date.UTC(t,a-1+i,r)))}function R(){return new Date().toISOString().slice(0,10)}function U(e,i={}){var f,C,b,g,p,M,I;let t=(f=e.asOf)!=null?f:R(),a=(C=i.initialAuditWithinMonths)!=null?C:15,r=(g=(b=i.annualDeadline)==null?void 0:b.month)!=null?g:3,l=(M=(p=i.annualDeadline)==null?void 0:p.day)!=null?M:31,n=(I=i.deadlineOverrides)!=null?I:{},s=e.tier===void 0?true:e.tier!=="none",c=S(e.commencementDate,a),o=P=>{var A;return (A=n[P])!=null?A:`${P}-${O(r)}-${O(l)}`},h=Number(t.slice(0,4)),D=o(h);t>D&&(h+=1,D=o(h));let L=Math.round((y(D).getTime()-y(t).getTime())/864e5),m=t>=c,u=[];return s?(u.push("File the Compliance Audit Return with the NDPC via the NDPC Information Management Portal (NIMP)."),m&&u.push("The initial compliance-audit window has elapsed \u2014 ensure the initial audit has been conducted.")):u.push("Compliance Audit Returns apply only to Data Controllers/Processors of Major Importance."),u.push("Filing deadlines follow the NDPC GAID 2025 baseline and can be extended \u2014 verify the current deadline with the NDPC."),{applicable:s,schedule:{commencementDate:e.commencementDate,initialAuditWithinMonths:a,initialAuditDueDate:c,nextFilingDeadline:D,filingYear:h},status:{initialAuditDue:m,daysUntilNextDeadline:L},notes:u,asOf:t}}export{N as a,x as b,T as c,U as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=e=>typeof e=="string"&&e.trim().length>0,m=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0,C=e=>Array.isArray(e)&&e.length>0,R=e=>!!e&&t(e.name)&&t(e.email);function M(e,n={}){var p,N,D,S,y;let s=(p=n.asOf)!=null?p:Date.now(),k=(N=n.deadlineHours)!=null?N:72,d=e.discoveredAt+k*36e5,o=n.notification,f=!!o,u=o==null?void 0:o.sentAt,c=(f?u:s)>d,h={deadline:d,hoursSinceDiscovery:Math.round((s-e.discoveredAt)/36e5),notified:f,notifiedAt:u,withinDeadline:!c,hoursRemaining:Math.round((d-s)/36e5),overdue:c,requiresDelayJustification:c},b=[{id:"circumstances",label:"Description of the circumstances of the breach",section:"GAID 2025 Art. 33(5)(a)",satisfied:t(e.description)},{id:"occurrence",label:"Date or time period of the breach",section:"GAID 2025 Art. 33(5)(b)",satisfied:m(e.occurredAt)},{id:"personalInfo",label:"Description of the personal data involved",section:"GAID 2025 Art. 33(5)(c)",satisfied:C(e.dataTypes)},{id:"riskOfHarm",label:"Assessment of the risk of harm to data subjects",section:"GAID 2025 Art. 33(5)(d)",satisfied:t(e.likelyConsequences)},{id:"numberAtRisk",label:"Estimated number of data subjects at risk of significant harm",section:"GAID 2025 Art. 33(5)(e)",satisfied:m(e.estimatedAffectedSubjects)},{id:"mitigation",label:"Steps taken to reduce the risk of harm",section:"GAID 2025 Art. 33(5)(f)",satisfied:t(e.mitigationMeasures)},{id:"notifySteps",label:"Steps taken to notify affected data subjects",section:"GAID 2025 Art. 33(5)(g)",satisfied:t(e.initialActions)},{id:"contactPoint",label:"Name and contact details of a contact point",section:"GAID 2025 Art. 33(5)(h)",satisfied:R(e.dpoContact)},{id:"dataSubjectCategories",label:"Categories of data subjects concerned",section:"NDPA 2023 S. 40(2)",satisfied:C(e.dataSubjectCategories)},{id:"recordCount",label:"Approximate number of personal data records concerned",section:"NDPA 2023 S. 40(2)",satisfied:m(e.approximateRecordCount)}],l=(y=(S=n.highRisk)!=null?S:(D=n.assessment)==null?void 0:D.highRisksToRightsAndFreedoms)!=null?y:false,A=l?[{id:"dsNature",label:"Nature and context of the breach in plain language",section:"NDPA 2023 S. 40(3)",satisfied:t(e.description)},{id:"dsConsequences",label:"Likely consequences of the breach",section:"NDPA 2023 S. 40(3)",satisfied:t(e.likelyConsequences)},{id:"dsMeasures",label:"Safeguards and measures data subjects can take",section:"NDPA 2023 S. 40(3)",satisfied:t(e.mitigationMeasures)},{id:"dsContact",label:"Contact point for data subjects",section:"NDPA 2023 S. 40(3)",satisfied:R(e.dpoContact)}]:[],r=[...b,...A],B=r.filter(i=>i.satisfied).length,j=Math.round(B/r.length*100),g=r.filter(i=>!i.satisfied).map(i=>i.label),I=g.length===0,a=[];for(let i of r.filter(P=>!P.satisfied))a.push(`Add: ${i.label} (${i.section}).`);return c?a.push("The 72-hour notification deadline has passed \u2014 notify the NDPC now and state the reasons for the delay; phased reporting is permitted where complete details are not yet available (NDPA S. 40(2))."):f||a.push(`${Math.max(0,h.hoursRemaining)} hour(s) remain to notify the NDPC within the 72-hour window (NDPA S. 40(2)).`),l&&a.push("High risk to data subjects \u2014 communicate the breach to affected data subjects immediately, in plain and clear language (NDPA S. 40(3))."),{complete:I,completeness:j,notificationToCommission:b,dataSubjectCommunication:A,dataSubjectCommunicationRequired:l,timing:h,missing:g,recommendations:a,asOf:s}}export{M as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js');var N={ohl:200,ehl:1e3,uhl:5e3},x={UHL:25e4,EHL:1e5,OHL:1e4};function T(e,i={}){let t=chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},N),i.thresholds),a=chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},x),i.fees),r=e==null?void 0:e.dataSubjectsInSixMonths,l=typeof r=="number"&&r>0?Math.floor(r):0,n;l>t.uhl?n="UHL":l>=t.ehl?n="EHL":l>=t.ohl?n="OHL":e!=null&&e.isDesignated?n="listed":n="none";let s=n!=="none",c=n==="UHL"||n==="EHL"||n==="OHL"?a[n]:0,o=[];return n==="listed"&&o.push("Designated as a DCPMI below the volume tiers \u2014 confirm the applicable registration tier and fee with the NDPC."),s&&o.push(n==="OHL"?"OHL organisations renew their NDPC registration annually and file Compliance Audit Returns (CAR) each year.":"Register once with the NDPC, then file Compliance Audit Returns (CAR) annually."),o.push("Thresholds, fees, and filing dates follow the NDPC GAID 2025 baseline and can change \u2014 verify against current NDPC guidance before relying on them."),{tier:n,isDCPMI:s,annualFeeNGN:c,registration:{required:s,renewsAnnually:n==="OHL"},compliance:{auditReturnsAnnual:s,initialAuditWithinMonths:15},notes:o,dataSubjectsConsidered:l}}function O(e){return String(e).padStart(2,"0")}function y(e){let[i,t,a]=e.split("-").map(Number);return new Date(Date.UTC(i,t-1,a))}function H(e){return e.toISOString().slice(0,10)}function S(e,i){let[t,a,r]=e.split("-").map(Number);return H(new Date(Date.UTC(t,a-1+i,r)))}function R(){return new Date().toISOString().slice(0,10)}function U(e,i={}){var f,C,b,g,p,M,I;let t=(f=e.asOf)!=null?f:R(),a=(C=i.initialAuditWithinMonths)!=null?C:15,r=(g=(b=i.annualDeadline)==null?void 0:b.month)!=null?g:3,l=(M=(p=i.annualDeadline)==null?void 0:p.day)!=null?M:31,n=(I=i.deadlineOverrides)!=null?I:{},s=e.tier===void 0?true:e.tier!=="none",c=S(e.commencementDate,a),o=P=>{var A;return (A=n[P])!=null?A:`${P}-${O(r)}-${O(l)}`},h=Number(t.slice(0,4)),D=o(h);t>D&&(h+=1,D=o(h));let L=Math.round((y(D).getTime()-y(t).getTime())/864e5),m=t>=c,u=[];return s?(u.push("File the Compliance Audit Return with the NDPC via the NDPC Information Management Portal (NIMP)."),m&&u.push("The initial compliance-audit window has elapsed \u2014 ensure the initial audit has been conducted.")):u.push("Compliance Audit Returns apply only to Data Controllers/Processors of Major Importance."),u.push("Filing deadlines follow the NDPC GAID 2025 baseline and can be extended \u2014 verify the current deadline with the NDPC."),{applicable:s,schedule:{commencementDate:e.commencementDate,initialAuditWithinMonths:a,initialAuditDueDate:c,nextFilingDeadline:D,filingYear:h},status:{initialAuditDue:m,daysUntilNextDeadline:L},notes:u,asOf:t}}exports.a=N;exports.b=x;exports.c=T;exports.d=U;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var chunkWKY26JLT_js=require('./chunk-WKY26JLT.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,u;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=chunkWKY26JLT_js.c(e.dcpmi,c.dcpmiOptions),a.push({id:"dcpmi",label:"DCPMI registration (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=chunkWKY26JLT_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=((u=e.breaches)!=null?u:[]).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 t=e=>typeof e=="string"&&e.trim().length>0,m=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0,C=e=>Array.isArray(e)&&e.length>0,R=e=>!!e&&t(e.name)&&t(e.email);function M(e,n={}){var p,N,D,S,y;let s=(p=n.asOf)!=null?p:Date.now(),k=(N=n.deadlineHours)!=null?N:72,d=e.discoveredAt+k*36e5,o=n.notification,f=!!o,u=o==null?void 0:o.sentAt,c=(f?u:s)>d,h={deadline:d,hoursSinceDiscovery:Math.round((s-e.discoveredAt)/36e5),notified:f,notifiedAt:u,withinDeadline:!c,hoursRemaining:Math.round((d-s)/36e5),overdue:c,requiresDelayJustification:c},b=[{id:"circumstances",label:"Description of the circumstances of the breach",section:"GAID 2025 Art. 33(5)(a)",satisfied:t(e.description)},{id:"occurrence",label:"Date or time period of the breach",section:"GAID 2025 Art. 33(5)(b)",satisfied:m(e.occurredAt)},{id:"personalInfo",label:"Description of the personal data involved",section:"GAID 2025 Art. 33(5)(c)",satisfied:C(e.dataTypes)},{id:"riskOfHarm",label:"Assessment of the risk of harm to data subjects",section:"GAID 2025 Art. 33(5)(d)",satisfied:t(e.likelyConsequences)},{id:"numberAtRisk",label:"Estimated number of data subjects at risk of significant harm",section:"GAID 2025 Art. 33(5)(e)",satisfied:m(e.estimatedAffectedSubjects)},{id:"mitigation",label:"Steps taken to reduce the risk of harm",section:"GAID 2025 Art. 33(5)(f)",satisfied:t(e.mitigationMeasures)},{id:"notifySteps",label:"Steps taken to notify affected data subjects",section:"GAID 2025 Art. 33(5)(g)",satisfied:t(e.initialActions)},{id:"contactPoint",label:"Name and contact details of a contact point",section:"GAID 2025 Art. 33(5)(h)",satisfied:R(e.dpoContact)},{id:"dataSubjectCategories",label:"Categories of data subjects concerned",section:"NDPA 2023 S. 40(2)",satisfied:C(e.dataSubjectCategories)},{id:"recordCount",label:"Approximate number of personal data records concerned",section:"NDPA 2023 S. 40(2)",satisfied:m(e.approximateRecordCount)}],l=(y=(S=n.highRisk)!=null?S:(D=n.assessment)==null?void 0:D.highRisksToRightsAndFreedoms)!=null?y:false,A=l?[{id:"dsNature",label:"Nature and context of the breach in plain language",section:"NDPA 2023 S. 40(3)",satisfied:t(e.description)},{id:"dsConsequences",label:"Likely consequences of the breach",section:"NDPA 2023 S. 40(3)",satisfied:t(e.likelyConsequences)},{id:"dsMeasures",label:"Safeguards and measures data subjects can take",section:"NDPA 2023 S. 40(3)",satisfied:t(e.mitigationMeasures)},{id:"dsContact",label:"Contact point for data subjects",section:"NDPA 2023 S. 40(3)",satisfied:R(e.dpoContact)}]:[],r=[...b,...A],B=r.filter(i=>i.satisfied).length,j=Math.round(B/r.length*100),g=r.filter(i=>!i.satisfied).map(i=>i.label),I=g.length===0,a=[];for(let i of r.filter(P=>!P.satisfied))a.push(`Add: ${i.label} (${i.section}).`);return c?a.push("The 72-hour notification deadline has passed \u2014 notify the NDPC now and state the reasons for the delay; phased reporting is permitted where complete details are not yet available (NDPA S. 40(2))."):f||a.push(`${Math.max(0,h.hoursRemaining)} hour(s) remain to notify the NDPC within the 72-hour window (NDPA S. 40(2)).`),l&&a.push("High risk to data subjects \u2014 communicate the breach to affected data subjects immediately, in plain and clear language (NDPA S. 40(3))."),{complete:I,completeness:j,notificationToCommission:b,dataSubjectCommunication:A,dataSubjectCommunicationRequired:l,timing:h,missing:g,recommendations:a,asOf:s}}exports.a=M;
|