@tantainnovative/ndpr-toolkit 3.4.1 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/adapters.d.mts +34 -25
  3. package/dist/adapters.d.ts +34 -25
  4. package/dist/breach.d.mts +803 -44
  5. package/dist/breach.d.ts +803 -44
  6. package/dist/breach.js +1 -1
  7. package/dist/breach.mjs +1 -1
  8. package/dist/{chunk-ASLMPY54.js → chunk-3EGQWLJ6.js} +3 -3
  9. package/dist/chunk-B4Z5MBUC.mjs +2 -0
  10. package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
  11. package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
  12. package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
  13. package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
  14. package/dist/{chunk-MLOWRZXO.mjs → chunk-F5TXUA4O.mjs} +3 -3
  15. package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
  16. package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
  17. package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
  18. package/dist/{chunk-NFJ4CB63.mjs → chunk-ID2NYIVE.mjs} +3 -3
  19. package/dist/chunk-J5WCPZLW.js +2 -0
  20. package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
  21. package/dist/chunk-LU7PKE7Y.mjs +2 -0
  22. package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
  23. package/dist/{chunk-4BOEFDDE.js → chunk-ORFC66EA.js} +3 -3
  24. package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
  25. package/dist/chunk-SCWNM4PC.mjs +2 -0
  26. package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
  27. package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
  28. package/dist/chunk-TV4U6AIS.js +2 -0
  29. package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
  30. package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
  31. package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
  32. package/dist/consent.d.mts +648 -84
  33. package/dist/consent.d.ts +648 -84
  34. package/dist/consent.js +1 -1
  35. package/dist/consent.mjs +1 -1
  36. package/dist/core.d.mts +2049 -23
  37. package/dist/core.d.ts +2049 -23
  38. package/dist/core.js +1 -1
  39. package/dist/core.mjs +1 -1
  40. package/dist/cross-border.d.mts +470 -99
  41. package/dist/cross-border.d.ts +470 -99
  42. package/dist/dpia.d.mts +591 -37
  43. package/dist/dpia.d.ts +591 -37
  44. package/dist/dsr.d.mts +654 -37
  45. package/dist/dsr.d.ts +654 -37
  46. package/dist/dsr.js +1 -1
  47. package/dist/dsr.mjs +1 -1
  48. package/dist/hooks.d.mts +2174 -30
  49. package/dist/hooks.d.ts +2174 -30
  50. package/dist/hooks.js +1 -1
  51. package/dist/hooks.mjs +1 -1
  52. package/dist/index.d.mts +4428 -43
  53. package/dist/index.d.ts +4428 -43
  54. package/dist/index.js +1 -1
  55. package/dist/index.mjs +1 -1
  56. package/dist/lawful-basis.d.mts +368 -32
  57. package/dist/lawful-basis.d.ts +368 -32
  58. package/dist/policy.d.mts +1178 -83
  59. package/dist/policy.d.ts +1178 -83
  60. package/dist/policy.js +1 -1
  61. package/dist/policy.mjs +1 -1
  62. package/dist/presets.d.mts +1020 -114
  63. package/dist/presets.d.ts +1020 -114
  64. package/dist/presets.js +1 -1
  65. package/dist/presets.mjs +1 -1
  66. package/dist/ropa.d.mts +396 -31
  67. package/dist/ropa.d.ts +396 -31
  68. package/dist/ropa.js +1 -1
  69. package/dist/ropa.mjs +1 -1
  70. package/dist/server.d.mts +2133 -24
  71. package/dist/server.d.ts +2133 -24
  72. package/dist/server.js +1 -1
  73. package/dist/server.mjs +1 -1
  74. package/dist/unstyled.d.mts +523 -55
  75. package/dist/unstyled.d.ts +523 -55
  76. package/dist/unstyled.js +1 -1
  77. package/dist/unstyled.mjs +1 -1
  78. package/package.json +3 -3
  79. package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
  80. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
  81. package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
  82. package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
  83. package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
  84. package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
  85. package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
  86. package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
  87. package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
  88. package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
  89. package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
  90. package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
  91. package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
  92. package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
  93. package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
  94. package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
  95. package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
  96. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
  97. package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
  98. package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
  99. package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
  100. package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
  101. package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
  102. package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
  103. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
  104. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
  105. package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
  106. package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
  107. package/dist/breach-B_-6lDqS.d.mts +0 -17
  108. package/dist/breach-CzXqSsaY.d.ts +0 -17
  109. package/dist/breach-Eu9byel8.d.mts +0 -185
  110. package/dist/breach-Eu9byel8.d.ts +0 -185
  111. package/dist/chunk-2L7BSG7G.mjs +0 -2
  112. package/dist/chunk-5X32J5IA.mjs +0 -2
  113. package/dist/chunk-7D2OIPHH.mjs +0 -2
  114. package/dist/chunk-JKKRPS4P.js +0 -2
  115. package/dist/chunk-UHTJ6UFW.js +0 -2
  116. package/dist/compliance-score-racQe_E_.d.mts +0 -115
  117. package/dist/compliance-score-racQe_E_.d.ts +0 -115
  118. package/dist/consent-CmVzqZUk.d.mts +0 -99
  119. package/dist/consent-CmVzqZUk.d.ts +0 -99
  120. package/dist/consent-audit-BdByjYlM.d.mts +0 -65
  121. package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
  122. package/dist/cross-border-BBi9rZyO.d.mts +0 -54
  123. package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
  124. package/dist/cross-border-UyT00llA.d.mts +0 -141
  125. package/dist/cross-border-UyT00llA.d.ts +0 -141
  126. package/dist/docx-4n8g4zul.d.mts +0 -64
  127. package/dist/docx-VvcTLYZM.d.ts +0 -64
  128. package/dist/dpia-D82hUrJe.d.ts +0 -15
  129. package/dist/dpia-DQDFw2_l.d.mts +0 -15
  130. package/dist/dpia-c9GiiOq0.d.mts +0 -137
  131. package/dist/dpia-c9GiiOq0.d.ts +0 -137
  132. package/dist/dsr-CIx5sd7e.d.ts +0 -14
  133. package/dist/dsr-XZ_HqTlA.d.mts +0 -14
  134. package/dist/dsr-yKbqX531.d.mts +0 -128
  135. package/dist/dsr-yKbqX531.d.ts +0 -128
  136. package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
  137. package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
  138. package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
  139. package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
  140. package/dist/locale-CxJx2tzn.d.mts +0 -25
  141. package/dist/locale-DSkrtf-c.d.ts +0 -25
  142. package/dist/policy-engine-5qTfp2z4.d.mts +0 -174
  143. package/dist/policy-engine-DzPxskOK.d.ts +0 -174
  144. package/dist/policy-sections-9tCb7VU7.d.ts +0 -56
  145. package/dist/policy-sections-CBWcJv-R.d.mts +0 -56
  146. package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
  147. package/dist/policy-templates-DwYl2329.d.mts +0 -43
  148. package/dist/privacy-Ca6te9Ir.d.mts +0 -138
  149. package/dist/privacy-Ca6te9Ir.d.ts +0 -138
  150. package/dist/ropa-BDTM06tr.d.ts +0 -152
  151. package/dist/ropa-CFHuT7jE.d.mts +0 -152
  152. package/dist/ropa-CyynscU6.d.ts +0 -51
  153. package/dist/ropa-NIgxd8uP.d.mts +0 -51
  154. package/dist/sanitize-CxxwKxAx.d.mts +0 -94
  155. package/dist/sanitize-CxxwKxAx.d.ts +0 -94
  156. package/dist/styling-BMDGQDgS.d.mts +0 -64
  157. package/dist/styling-BaoQtV06.d.ts +0 -64
  158. package/dist/types-DK2CoKOC.d.mts +0 -10
  159. package/dist/types-DK2CoKOC.d.ts +0 -10
  160. package/dist/useAdaptivePolicyWizard-BSLyltzZ.d.mts +0 -52
  161. package/dist/useAdaptivePolicyWizard-CL7C7MTZ.d.ts +0 -52
  162. package/dist/useBreach-CPr86Yan.d.mts +0 -115
  163. package/dist/useBreach-DkVXvtJK.d.ts +0 -115
  164. package/dist/useConsent-DCNkIJHR.d.mts +0 -75
  165. package/dist/useConsent-dOcELSfX.d.ts +0 -75
  166. package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
  167. package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
  168. package/dist/useDPIA-B6180UQn.d.mts +0 -109
  169. package/dist/useDPIA-CTqbNbww.d.ts +0 -109
  170. package/dist/useDSR-WvHk8_iu.d.mts +0 -85
  171. package/dist/useDSR-wH4H6hSM.d.ts +0 -85
  172. package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
  173. package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
  174. package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
  175. package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
  176. package/dist/useROPA-BSSU1rfx.d.ts +0 -76
  177. package/dist/useROPA-C2hjaBTz.d.mts +0 -76
package/dist/breach.d.ts CHANGED
@@ -1,44 +1,803 @@
1
- import { c as BreachReportFormProps } from './BreachReportForm-DpRrBoxU.js';
2
- export { B as BreachFormSubmission, a as BreachReportForm, b as BreachReportFormClassNames } from './BreachReportForm-DpRrBoxU.js';
3
- import { e as BreachRiskAssessmentProps, f as BreachNotificationManagerProps, g as RegulatoryReportGeneratorProps } from './RegulatoryReportGenerator-BUYgzTTT.js';
4
- export { B as BreachNotificationManager, a as BreachNotificationManagerClassNames, b as BreachRiskAssessment, c as BreachRiskAssessmentClassNames, R as RegulatoryReportGenerator, d as RegulatoryReportGeneratorClassNames } from './RegulatoryReportGenerator-BUYgzTTT.js';
5
- import { U as UseBreachReturn } from './useBreach-DkVXvtJK.js';
6
- export { u as useBreach } from './useBreach-DkVXvtJK.js';
7
- export { c as calculateBreachSeverity } from './breach-CzXqSsaY.js';
8
- import { B as BreachCategory, a as BreachReport, b as RiskAssessment, R as RegulatoryNotification } from './breach-Eu9byel8.js';
9
- export { N as NotificationRequirement } from './breach-Eu9byel8.js';
10
- import * as React from 'react';
11
- import React__default from 'react';
12
- import { S as StorageAdapter } from './types-DK2CoKOC.js';
13
-
14
- interface BreachProviderProps {
15
- categories: BreachCategory[];
16
- adapter?: StorageAdapter<{
17
- reports: BreachReport[];
18
- assessments: RiskAssessment[];
19
- notifications: RegulatoryNotification[];
20
- }>;
21
- storageKey?: string;
22
- useLocalStorage?: boolean;
23
- initialReports?: BreachReport[];
24
- onReport?: (report: BreachReport) => void;
25
- onAssessment?: (assessment: RiskAssessment) => void;
26
- onNotification?: (notification: RegulatoryNotification) => void;
27
- children: React__default.ReactNode;
28
- }
29
- declare const BreachProvider: React__default.FC<BreachProviderProps>;
30
-
31
- declare const Breach: {
32
- Provider: React.FC<BreachProviderProps>;
33
- ReportForm: React.FC<BreachReportFormProps>;
34
- RiskAssessment: React.FC<BreachRiskAssessmentProps>;
35
- NotificationManager: React.FC<BreachNotificationManagerProps>;
36
- ReportGenerator: React.FC<RegulatoryReportGeneratorProps>;
37
- };
38
-
39
- interface BreachContextValue extends UseBreachReturn {
40
- categories: BreachCategory[];
41
- }
42
- declare function useBreachCompound(): BreachContextValue;
43
-
44
- export { Breach, BreachCategory, BreachProvider, type BreachProviderProps, BreachReport, RegulatoryNotification, RiskAssessment, StorageAdapter, useBreachCompound };
1
+ import * as React_2 from 'react';
2
+ import React__default from 'react';
3
+
4
+ export declare const Breach: {
5
+ Provider: React_2.FC<BreachProviderProps>;
6
+ ReportForm: React_2.FC<BreachReportFormProps>;
7
+ RiskAssessment: React_2.FC<BreachRiskAssessmentProps>;
8
+ NotificationManager: React_2.FC<BreachNotificationManagerProps>;
9
+ ReportGenerator: React_2.FC<RegulatoryReportGeneratorProps>;
10
+ };
11
+
12
+ /**
13
+ * Breach notification types aligned with NDPA 2023 Section 40
14
+ * Data controllers must notify the NDPC within 72 hours of becoming aware of a breach
15
+ * Data subjects must be notified without undue delay when breach is likely to result in high risk
16
+ */
17
+ /**
18
+ * Represents a data breach category
19
+ */
20
+ export declare interface BreachCategory {
21
+ /** Unique identifier for the category */
22
+ id: string;
23
+ /** Display name for the category */
24
+ name: string;
25
+ /** Description of this breach category */
26
+ description: string;
27
+ /** Default severity level for this category */
28
+ defaultSeverity: 'low' | 'medium' | 'high' | 'critical';
29
+ }
30
+
31
+ declare type BreachCompositeState = {
32
+ reports: BreachReport[];
33
+ assessments: RiskAssessment[];
34
+ notifications: RegulatoryNotification[];
35
+ };
36
+
37
+ declare interface BreachContextValue extends UseBreachReturn {
38
+ categories: BreachCategory[];
39
+ }
40
+
41
+ /**
42
+ * Represents the data submitted by the breach report form.
43
+ */
44
+ export declare interface BreachFormSubmission {
45
+ /** Title/summary of the breach */
46
+ title: string;
47
+ /** Detailed description of the breach */
48
+ description: string;
49
+ /** Breach category identifier */
50
+ category: string;
51
+ /** Timestamp (ms) when the breach was discovered */
52
+ discoveredAt: number;
53
+ /** Timestamp (ms) when the breach occurred (if known) */
54
+ occurredAt?: number;
55
+ /** Timestamp (ms) when the form was submitted */
56
+ reportedAt: number;
57
+ /** Person reporting the breach */
58
+ reporter: {
59
+ name: string;
60
+ email: string;
61
+ department: string;
62
+ phone?: string;
63
+ };
64
+ /** Systems or applications affected by the breach */
65
+ affectedSystems: string[];
66
+ /** Types of data involved in the breach */
67
+ dataTypes: string[];
68
+ /** Estimated number of affected data subjects */
69
+ estimatedAffectedSubjects?: number;
70
+ /** Current status of the breach */
71
+ status: 'ongoing' | 'contained' | 'resolved';
72
+ /** Initial actions taken to address the breach */
73
+ initialActions?: string;
74
+ /** File attachments included with the report */
75
+ attachments: Array<{
76
+ name: string;
77
+ type: string;
78
+ size: number;
79
+ file: File;
80
+ }>;
81
+ }
82
+
83
+ /**
84
+ * Breach notification management component. Implements NDPA Section 40 requirements for
85
+ * managing breach notifications, tracking 72-hour NDPC reporting deadlines, and coordinating
86
+ * data subject notifications.
87
+ */
88
+ export declare const BreachNotificationManager: React__default.FC<BreachNotificationManagerProps>;
89
+
90
+ export declare interface BreachNotificationManagerClassNames {
91
+ root?: string;
92
+ header?: string;
93
+ title?: string;
94
+ breachList?: string;
95
+ breachItem?: string;
96
+ statusBadge?: string;
97
+ timeline?: string;
98
+ timelineStep?: string;
99
+ detailPanel?: string;
100
+ }
101
+
102
+ declare interface BreachNotificationManagerProps {
103
+ /**
104
+ * List of breach reports to manage
105
+ */
106
+ breachReports: BreachReport[];
107
+ /**
108
+ * List of risk assessments
109
+ */
110
+ riskAssessments: RiskAssessment[];
111
+ /**
112
+ * List of regulatory notifications
113
+ */
114
+ regulatoryNotifications: RegulatoryNotification[];
115
+ /**
116
+ * Callback function called when a breach is selected
117
+ */
118
+ onSelectBreach?: (breachId: string) => void;
119
+ /**
120
+ * Callback function called when a risk assessment is requested
121
+ */
122
+ onRequestAssessment?: (breachId: string) => void;
123
+ /**
124
+ * Callback function called when a notification is requested
125
+ */
126
+ onRequestNotification?: (breachId: string) => void;
127
+ /**
128
+ * Title displayed on the manager
129
+ * @default "Breach Notification Manager"
130
+ */
131
+ title?: string;
132
+ /**
133
+ * Description text displayed on the manager
134
+ * @default "Manage data breach notifications and track compliance with NDPA Section 40 requirements."
135
+ */
136
+ description?: string;
137
+ /**
138
+ * Custom CSS class for the manager
139
+ */
140
+ className?: string;
141
+ /**
142
+ * Custom CSS class for the buttons
143
+ */
144
+ buttonClassName?: string;
145
+ /**
146
+ * Override class names for individual elements
147
+ */
148
+ classNames?: BreachNotificationManagerClassNames;
149
+ /**
150
+ * Remove all default styles, only applying classNames overrides
151
+ */
152
+ unstyled?: boolean;
153
+ /**
154
+ * Whether to show the breach details
155
+ * @default true
156
+ */
157
+ showBreachDetails?: boolean;
158
+ /**
159
+ * Whether to show the notification timeline
160
+ * @default true
161
+ */
162
+ showNotificationTimeline?: boolean;
163
+ /**
164
+ * Whether to show the deadline alerts
165
+ * @default true
166
+ */
167
+ showDeadlineAlerts?: boolean;
168
+ }
169
+
170
+ export declare const BreachProvider: React__default.FC<BreachProviderProps>;
171
+
172
+ export declare interface BreachProviderProps {
173
+ categories: BreachCategory[];
174
+ adapter?: StorageAdapter<{
175
+ reports: BreachReport[];
176
+ assessments: RiskAssessment[];
177
+ notifications: RegulatoryNotification[];
178
+ }>;
179
+ storageKey?: string;
180
+ useLocalStorage?: boolean;
181
+ initialReports?: BreachReport[];
182
+ onReport?: (report: BreachReport) => void;
183
+ onAssessment?: (assessment: RiskAssessment) => void;
184
+ onNotification?: (notification: RegulatoryNotification) => void;
185
+ children: React__default.ReactNode;
186
+ }
187
+
188
+ /**
189
+ * Represents a data breach report
190
+ */
191
+ export declare interface BreachReport {
192
+ /** Unique identifier for the breach report */
193
+ id: string;
194
+ /** Title/summary of the breach */
195
+ title: string;
196
+ /** Detailed description of the breach */
197
+ description: string;
198
+ /** Category of the breach */
199
+ category: string;
200
+ /** Timestamp when the breach was discovered */
201
+ discoveredAt: number;
202
+ /** Timestamp when the breach occurred (if known) */
203
+ occurredAt?: number;
204
+ /** Timestamp when the breach was reported internally */
205
+ reportedAt: number;
206
+ /** Person who reported the breach */
207
+ reporter: {
208
+ name: string;
209
+ email: string;
210
+ department: string;
211
+ phone?: string;
212
+ };
213
+ /** Systems or data affected by the breach */
214
+ affectedSystems: string[];
215
+ /** Types of data involved in the breach */
216
+ dataTypes: string[];
217
+ /** Whether sensitive personal data is involved (NDPA Section 27) */
218
+ involvesSensitiveData?: boolean;
219
+ /** Estimated number of data subjects affected */
220
+ estimatedAffectedSubjects?: number;
221
+ /** Whether the breach is ongoing or contained */
222
+ status: 'ongoing' | 'contained' | 'resolved';
223
+ /** Initial actions taken to address the breach */
224
+ initialActions?: string;
225
+ /** Attachments related to the breach */
226
+ attachments?: Array<{
227
+ id: string;
228
+ name: string;
229
+ type: string;
230
+ url: string;
231
+ addedAt: number;
232
+ }>;
233
+ }
234
+
235
+ /**
236
+ * Breach report form component. Implements NDPA Section 40 breach notification requirements,
237
+ * enabling organizations to document and report data breaches within the mandated 72-hour window.
238
+ */
239
+ export declare const BreachReportForm: React__default.FC<BreachReportFormProps>;
240
+
241
+ export declare interface BreachReportFormClassNames {
242
+ root?: string;
243
+ title?: string;
244
+ form?: string;
245
+ fieldGroup?: string;
246
+ label?: string;
247
+ input?: string;
248
+ select?: string;
249
+ textarea?: string;
250
+ submitButton?: string;
251
+ /** Alias for submitButton */
252
+ primaryButton?: string;
253
+ notice?: string;
254
+ /** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
255
+ loadingOverlay?: string;
256
+ }
257
+
258
+ declare interface BreachReportFormProps {
259
+ /**
260
+ * Available breach categories
261
+ */
262
+ categories: BreachCategory[];
263
+ /**
264
+ * Callback function called when form is submitted
265
+ */
266
+ onSubmit: (data: BreachFormSubmission) => void;
267
+ /**
268
+ * Callback function called when form validation fails
269
+ */
270
+ onValidationError?: (errors: Record<string, string>) => void;
271
+ /**
272
+ * Title displayed on the form
273
+ * @default "Report a Data Breach"
274
+ */
275
+ title?: string;
276
+ /**
277
+ * Description text displayed on the form
278
+ * @default "Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required."
279
+ */
280
+ formDescription?: string;
281
+ /**
282
+ * Text for the submit button
283
+ * @default "Submit Report"
284
+ */
285
+ submitButtonText?: string;
286
+ /**
287
+ * Custom CSS class for the form
288
+ */
289
+ className?: string;
290
+ /**
291
+ * Custom CSS class for the submit button
292
+ */
293
+ buttonClassName?: string;
294
+ /**
295
+ * Override class names for individual elements
296
+ */
297
+ classNames?: BreachReportFormClassNames;
298
+ /**
299
+ * Remove all default styles, only applying classNames overrides
300
+ */
301
+ unstyled?: boolean;
302
+ /**
303
+ * Whether the form is currently submitting.
304
+ * When true, the submit button is disabled and shows "Submitting..." text.
305
+ */
306
+ isSubmitting?: boolean;
307
+ /**
308
+ * Whether to show a confirmation message after submission
309
+ * @default true
310
+ */
311
+ showConfirmation?: boolean;
312
+ /**
313
+ * Confirmation message to display after submission
314
+ * @default "Your breach report has been submitted successfully. The data protection team has been notified."
315
+ */
316
+ confirmationMessage?: string;
317
+ /**
318
+ * Whether to allow file attachments
319
+ * @default true
320
+ */
321
+ allowAttachments?: boolean;
322
+ /**
323
+ * Maximum number of attachments allowed
324
+ * @default 5
325
+ */
326
+ maxAttachments?: number;
327
+ /**
328
+ * Maximum file size for attachments (in bytes)
329
+ * @default 5242880 (5MB)
330
+ */
331
+ maxFileSize?: number;
332
+ /**
333
+ * Allowed file types for attachments
334
+ * @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
335
+ */
336
+ allowedFileTypes?: string[];
337
+ /**
338
+ * Default values to pre-fill form fields.
339
+ * Useful for editing existing breach reports or pre-populating known data.
340
+ */
341
+ defaultValues?: Partial<BreachFormSubmission>;
342
+ /**
343
+ * Callback fired when the form is reset via the Reset button.
344
+ * To fully remount the component (clearing all internal state),
345
+ * change the `key` prop from the parent.
346
+ */
347
+ onReset?: () => void;
348
+ }
349
+
350
+ /**
351
+ * Breach risk assessment component. Implements NDPA Section 40 requirements for assessing
352
+ * breach severity and determining whether NDPC notification is required within 72 hours.
353
+ */
354
+ export declare const BreachRiskAssessment: React__default.FC<BreachRiskAssessmentProps>;
355
+
356
+ export declare interface BreachRiskAssessmentClassNames {
357
+ root?: string;
358
+ header?: string;
359
+ title?: string;
360
+ slider?: string;
361
+ riskBadge?: string;
362
+ riskScore?: string;
363
+ notificationStatus?: string;
364
+ submitButton?: string;
365
+ /** Alias for submitButton */
366
+ primaryButton?: string;
367
+ }
368
+
369
+ declare interface BreachRiskAssessmentProps {
370
+ /**
371
+ * The breach data to assess
372
+ */
373
+ breachData: BreachReport;
374
+ /**
375
+ * Initial assessment data (if editing an existing assessment)
376
+ */
377
+ initialAssessment?: Partial<RiskAssessment>;
378
+ /**
379
+ * Callback function called when assessment is completed
380
+ */
381
+ onComplete: (assessment: RiskAssessment) => void;
382
+ /**
383
+ * Title displayed on the assessment form
384
+ * @default "Breach Risk Assessment"
385
+ */
386
+ title?: string;
387
+ /**
388
+ * Description text displayed on the assessment form
389
+ * @default "Assess the risk level of this data breach to determine notification requirements under NDPA Section 40."
390
+ */
391
+ description?: string;
392
+ /**
393
+ * Text for the submit button
394
+ * @default "Complete Assessment"
395
+ */
396
+ submitButtonText?: string;
397
+ /**
398
+ * Custom CSS class for the form
399
+ */
400
+ className?: string;
401
+ /**
402
+ * Custom CSS class for the submit button
403
+ */
404
+ buttonClassName?: string;
405
+ /**
406
+ * Override class names for individual elements
407
+ */
408
+ classNames?: BreachRiskAssessmentClassNames;
409
+ /**
410
+ * Remove all default styles, only applying classNames overrides
411
+ */
412
+ unstyled?: boolean;
413
+ /**
414
+ * Whether to show the breach summary
415
+ * @default true
416
+ */
417
+ showBreachSummary?: boolean;
418
+ /**
419
+ * Whether to show notification requirements after assessment
420
+ * @default true
421
+ */
422
+ showNotificationRequirements?: boolean;
423
+ }
424
+
425
+ /**
426
+ * Calculates the severity of a data breach based on various factors
427
+ * @param report The breach report
428
+ * @param assessment The risk assessment (if available)
429
+ * @returns The calculated severity and notification requirements
430
+ */
431
+ export declare function calculateBreachSeverity(report: BreachReport, assessment?: RiskAssessment): {
432
+ severityLevel: 'low' | 'medium' | 'high' | 'critical';
433
+ notificationRequired: boolean;
434
+ urgentNotificationRequired: boolean;
435
+ timeframeHours: number;
436
+ justification: string;
437
+ };
438
+
439
+ /**
440
+ * Represents notification requirements for a data breach per NDPA Section 40
441
+ */
442
+ export declare interface NotificationRequirement {
443
+ /**
444
+ * Whether NDPC notification is required
445
+ * Per NDPA Section 40, notification to NDPC is required for all breaches
446
+ * that pose a risk to data subjects' rights and freedoms
447
+ */
448
+ ndpcNotificationRequired: boolean;
449
+ /**
450
+ * Deadline for NDPC notification (72 hours from discovery)
451
+ * NDPA Section 40(1)
452
+ */
453
+ ndpcNotificationDeadline: number;
454
+ /**
455
+ * Whether data subject notification is required
456
+ * Per NDPA Section 40(4), required when breach is likely to result in
457
+ * high risk to rights and freedoms of data subjects
458
+ */
459
+ dataSubjectNotificationRequired: boolean;
460
+ /** Justification for the notification decision */
461
+ justification: string;
462
+ /**
463
+ * @deprecated Use ndpcNotificationRequired instead. Kept for backward compatibility.
464
+ */
465
+ nitdaNotificationRequired?: boolean;
466
+ /**
467
+ * @deprecated Use ndpcNotificationDeadline instead. Kept for backward compatibility.
468
+ */
469
+ nitdaNotificationDeadline?: number;
470
+ }
471
+
472
+ declare interface OrganizationInfo {
473
+ /**
474
+ * Name of the organization
475
+ */
476
+ name: string;
477
+ /**
478
+ * Registration number or business ID
479
+ */
480
+ registrationNumber?: string;
481
+ /**
482
+ * Physical address of the organization
483
+ */
484
+ address: string;
485
+ /**
486
+ * Website URL
487
+ */
488
+ website?: string;
489
+ /**
490
+ * Name of the Data Protection Officer
491
+ */
492
+ dpoName: string;
493
+ /**
494
+ * Email of the Data Protection Officer
495
+ */
496
+ dpoEmail: string;
497
+ /**
498
+ * Phone number of the Data Protection Officer
499
+ */
500
+ dpoPhone?: string;
501
+ }
502
+
503
+ /**
504
+ * Represents a notification sent to the NDPC (Nigeria Data Protection Commission)
505
+ */
506
+ export declare interface RegulatoryNotification {
507
+ /** Unique identifier for the notification */
508
+ id: string;
509
+ /** ID of the breach this notification is for */
510
+ breachId: string;
511
+ /** Timestamp when the notification was sent */
512
+ sentAt: number;
513
+ /** Method used to send the notification */
514
+ method: 'email' | 'portal' | 'letter' | 'other';
515
+ /** Reference number assigned by the NDPC (if available) */
516
+ referenceNumber?: string;
517
+ /** Contact person at the NDPC */
518
+ ndpcContact?: {
519
+ name: string;
520
+ email: string;
521
+ phone?: string;
522
+ };
523
+ /** Content of the notification */
524
+ content: string;
525
+ /** Attachments included with the notification */
526
+ attachments?: Array<{
527
+ id: string;
528
+ name: string;
529
+ type: string;
530
+ url: string;
531
+ }>;
532
+ /** Follow-up communications with the NDPC */
533
+ followUps?: Array<{
534
+ timestamp: number;
535
+ direction: 'sent' | 'received';
536
+ content: string;
537
+ attachments?: Array<{
538
+ id: string;
539
+ name: string;
540
+ type: string;
541
+ url: string;
542
+ }>;
543
+ }>;
544
+ /**
545
+ * @deprecated Use ndpcContact instead. Kept for backward compatibility.
546
+ */
547
+ nitdaContact?: {
548
+ name: string;
549
+ email: string;
550
+ phone?: string;
551
+ };
552
+ }
553
+
554
+ /**
555
+ * Regulatory report generator component. Implements NDPA Section 40 requirements for
556
+ * generating formal breach notification reports for submission to the NDPC.
557
+ */
558
+ export declare const RegulatoryReportGenerator: React__default.FC<RegulatoryReportGeneratorProps>;
559
+
560
+ export declare interface RegulatoryReportGeneratorClassNames {
561
+ root?: string;
562
+ header?: string;
563
+ title?: string;
564
+ reportPreview?: string;
565
+ field?: string;
566
+ fieldLabel?: string;
567
+ fieldValue?: string;
568
+ generateButton?: string;
569
+ /** Alias for generateButton */
570
+ primaryButton?: string;
571
+ downloadButton?: string;
572
+ /** Alias for downloadButton */
573
+ secondaryButton?: string;
574
+ }
575
+
576
+ declare interface RegulatoryReportGeneratorProps {
577
+ /**
578
+ * The breach data to include in the report
579
+ */
580
+ breachData: BreachReport;
581
+ /**
582
+ * The risk assessment data
583
+ */
584
+ assessmentData?: RiskAssessment;
585
+ /**
586
+ * Organization information to include in the report
587
+ */
588
+ organizationInfo: OrganizationInfo;
589
+ /**
590
+ * Callback function called when the report is generated
591
+ */
592
+ onGenerate: (report: RegulatoryNotification) => void;
593
+ /**
594
+ * Title displayed on the generator form
595
+ * @default "Generate NDPC Notification Report"
596
+ */
597
+ title?: string;
598
+ /**
599
+ * Description text displayed on the generator form
600
+ * @default "Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements."
601
+ */
602
+ description?: string;
603
+ /**
604
+ * Text for the generate button
605
+ * @default "Generate Report"
606
+ */
607
+ generateButtonText?: string;
608
+ /**
609
+ * Custom CSS class for the form
610
+ */
611
+ className?: string;
612
+ /**
613
+ * Custom CSS class for the buttons
614
+ */
615
+ buttonClassName?: string;
616
+ /**
617
+ * Override class names for individual elements
618
+ */
619
+ classNames?: RegulatoryReportGeneratorClassNames;
620
+ /**
621
+ * Remove all default styles, only applying classNames overrides
622
+ */
623
+ unstyled?: boolean;
624
+ /**
625
+ * Whether to show a preview of the generated report
626
+ * @default true
627
+ */
628
+ showPreview?: boolean;
629
+ /**
630
+ * Whether to allow editing the report content
631
+ * @default true
632
+ */
633
+ allowEditing?: boolean;
634
+ /**
635
+ * Whether to allow downloading the report
636
+ * @default true
637
+ */
638
+ allowDownload?: boolean;
639
+ /**
640
+ * Format for downloading the report
641
+ * @default "pdf"
642
+ */
643
+ downloadFormat?: 'pdf' | 'docx' | 'html';
644
+ }
645
+
646
+ /**
647
+ * Represents a risk assessment for a data breach
648
+ */
649
+ export declare interface RiskAssessment {
650
+ /** Unique identifier for the risk assessment */
651
+ id: string;
652
+ /** ID of the breach this assessment is for */
653
+ breachId: string;
654
+ /** Timestamp when the assessment was conducted */
655
+ assessedAt: number;
656
+ /** Person who conducted the assessment */
657
+ assessor: {
658
+ name: string;
659
+ role: string;
660
+ email: string;
661
+ };
662
+ /** Confidentiality impact (1-5) */
663
+ confidentialityImpact: number;
664
+ /** Integrity impact (1-5) */
665
+ integrityImpact: number;
666
+ /** Availability impact (1-5) */
667
+ availabilityImpact: number;
668
+ /** Likelihood of harm to data subjects (1-5) */
669
+ harmLikelihood: number;
670
+ /** Severity of potential harm to data subjects (1-5) */
671
+ harmSeverity: number;
672
+ /** Overall risk score */
673
+ overallRiskScore: number;
674
+ /** Risk level based on the overall score */
675
+ riskLevel: 'low' | 'medium' | 'high' | 'critical';
676
+ /** Whether the breach is likely to result in a risk to rights and freedoms */
677
+ risksToRightsAndFreedoms: boolean;
678
+ /** Whether the breach is likely to result in a high risk to rights and freedoms */
679
+ highRisksToRightsAndFreedoms: boolean;
680
+ /** Justification for the risk assessment */
681
+ justification: string;
682
+ }
683
+
684
+ export declare interface StorageAdapter<T = unknown> {
685
+ /** Load persisted data. Called once on hook mount. */
686
+ load(): T | null | Promise<T | null>;
687
+ /** Persist data. Called on every state change. */
688
+ save(data: T): void | Promise<void>;
689
+ /** Clear persisted data. Called on reset. */
690
+ remove(): void | Promise<void>;
691
+ }
692
+
693
+ /**
694
+ * Hook for managing data breach notifications in compliance with the NDPA (Section 40)
695
+ */
696
+ export declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
697
+
698
+ export declare function useBreachCompound(): BreachContextValue;
699
+
700
+ declare interface UseBreachOptions {
701
+ /**
702
+ * Available breach categories
703
+ */
704
+ categories: BreachCategory[];
705
+ /**
706
+ * Initial breach reports
707
+ */
708
+ initialReports?: BreachReport[];
709
+ /**
710
+ * Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
711
+ */
712
+ adapter?: StorageAdapter<BreachCompositeState>;
713
+ /**
714
+ * Storage key for breach data
715
+ * @default "ndpr_breach_data"
716
+ * @deprecated Use adapter instead
717
+ */
718
+ storageKey?: string;
719
+ /**
720
+ * Whether to use local storage to persist breach data
721
+ * @default true
722
+ * @deprecated Use adapter instead
723
+ */
724
+ useLocalStorage?: boolean;
725
+ /**
726
+ * Callback function called when a breach is reported
727
+ */
728
+ onReport?: (report: BreachReport) => void;
729
+ /**
730
+ * Callback function called when a risk assessment is completed
731
+ */
732
+ onAssessment?: (assessment: RiskAssessment) => void;
733
+ /**
734
+ * Callback function called when a notification is sent
735
+ */
736
+ onNotification?: (notification: RegulatoryNotification) => void;
737
+ }
738
+
739
+ declare interface UseBreachReturn {
740
+ /**
741
+ * All breach reports
742
+ */
743
+ reports: BreachReport[];
744
+ /**
745
+ * All risk assessments
746
+ */
747
+ assessments: RiskAssessment[];
748
+ /**
749
+ * All regulatory notifications
750
+ */
751
+ notifications: RegulatoryNotification[];
752
+ /**
753
+ * Submit a new breach report
754
+ */
755
+ reportBreach: (reportData: Omit<BreachReport, 'id' | 'reportedAt'>) => BreachReport;
756
+ /**
757
+ * Update an existing breach report
758
+ */
759
+ updateReport: (id: string, updates: Partial<BreachReport>) => BreachReport | null;
760
+ /**
761
+ * Get a breach report by ID
762
+ */
763
+ getReport: (id: string) => BreachReport | null;
764
+ /**
765
+ * Conduct a risk assessment for a breach
766
+ */
767
+ assessRisk: (breachId: string, assessmentData: Omit<RiskAssessment, 'id' | 'breachId' | 'assessedAt'>) => RiskAssessment;
768
+ /**
769
+ * Get a risk assessment for a breach
770
+ */
771
+ getAssessment: (breachId: string) => RiskAssessment | null;
772
+ /**
773
+ * Calculate notification requirements based on a risk assessment
774
+ */
775
+ calculateNotificationRequirements: (breachId: string) => NotificationRequirement | null;
776
+ /**
777
+ * Send a regulatory notification
778
+ */
779
+ sendNotification: (breachId: string, notificationData: Omit<RegulatoryNotification, 'id' | 'breachId' | 'sentAt'>) => RegulatoryNotification;
780
+ /**
781
+ * Get a regulatory notification for a breach
782
+ */
783
+ getNotification: (breachId: string) => RegulatoryNotification | null;
784
+ /**
785
+ * Get breaches that require notification within the next X hours
786
+ */
787
+ getBreachesRequiringNotification: (hoursThreshold?: number) => Array<{
788
+ report: BreachReport;
789
+ assessment: RiskAssessment;
790
+ requirements: NotificationRequirement;
791
+ hoursRemaining: number;
792
+ }>;
793
+ /**
794
+ * Clear all breach data
795
+ */
796
+ clearBreachData: () => void;
797
+ /**
798
+ * Whether the adapter is still loading data (relevant for async adapters)
799
+ */
800
+ isLoading: boolean;
801
+ }
802
+
803
+ export { }