@tantainnovative/ndpr-toolkit 2.4.0 → 2.4.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.
@@ -1,438 +0,0 @@
1
- import React from 'react';
2
- import { B as BreachCategory, a as BreachReport, b as RiskAssessment, R as RegulatoryNotification } from './breach-Eu9byel8.js';
3
- import './useBreach-lFLbSyAN.js';
4
- import './breach-CzXqSsaY.js';
5
-
6
- /**
7
- * Represents the data submitted by the breach report form.
8
- */
9
- interface BreachFormSubmission {
10
- /** Title/summary of the breach */
11
- title: string;
12
- /** Detailed description of the breach */
13
- description: string;
14
- /** Breach category identifier */
15
- category: string;
16
- /** Timestamp (ms) when the breach was discovered */
17
- discoveredAt: number;
18
- /** Timestamp (ms) when the breach occurred (if known) */
19
- occurredAt?: number;
20
- /** Timestamp (ms) when the form was submitted */
21
- reportedAt: number;
22
- /** Person reporting the breach */
23
- reporter: {
24
- name: string;
25
- email: string;
26
- department: string;
27
- phone?: string;
28
- };
29
- /** Systems or applications affected by the breach */
30
- affectedSystems: string[];
31
- /** Types of data involved in the breach */
32
- dataTypes: string[];
33
- /** Estimated number of affected data subjects */
34
- estimatedAffectedSubjects?: number;
35
- /** Current status of the breach */
36
- status: 'ongoing' | 'contained' | 'resolved';
37
- /** Initial actions taken to address the breach */
38
- initialActions?: string;
39
- /** File attachments included with the report */
40
- attachments: Array<{
41
- name: string;
42
- type: string;
43
- size: number;
44
- file: File;
45
- }>;
46
- }
47
- interface BreachReportFormClassNames {
48
- root?: string;
49
- title?: string;
50
- form?: string;
51
- fieldGroup?: string;
52
- label?: string;
53
- input?: string;
54
- select?: string;
55
- textarea?: string;
56
- submitButton?: string;
57
- /** Alias for submitButton */
58
- primaryButton?: string;
59
- notice?: string;
60
- /** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
61
- loadingOverlay?: string;
62
- }
63
- interface BreachReportFormProps {
64
- /**
65
- * Available breach categories
66
- */
67
- categories: BreachCategory[];
68
- /**
69
- * Callback function called when form is submitted
70
- */
71
- onSubmit: (data: BreachFormSubmission) => void;
72
- /**
73
- * Callback function called when form validation fails
74
- */
75
- onValidationError?: (errors: Record<string, string>) => void;
76
- /**
77
- * Title displayed on the form
78
- * @default "Report a Data Breach"
79
- */
80
- title?: string;
81
- /**
82
- * Description text displayed on the form
83
- * @default "Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required."
84
- */
85
- formDescription?: string;
86
- /**
87
- * Text for the submit button
88
- * @default "Submit Report"
89
- */
90
- submitButtonText?: string;
91
- /**
92
- * Custom CSS class for the form
93
- */
94
- className?: string;
95
- /**
96
- * Custom CSS class for the submit button
97
- */
98
- buttonClassName?: string;
99
- /**
100
- * Override class names for individual elements
101
- */
102
- classNames?: BreachReportFormClassNames;
103
- /**
104
- * Remove all default styles, only applying classNames overrides
105
- */
106
- unstyled?: boolean;
107
- /**
108
- * Whether the form is currently submitting.
109
- * When true, the submit button is disabled and shows "Submitting..." text.
110
- */
111
- isSubmitting?: boolean;
112
- /**
113
- * Whether to show a confirmation message after submission
114
- * @default true
115
- */
116
- showConfirmation?: boolean;
117
- /**
118
- * Confirmation message to display after submission
119
- * @default "Your breach report has been submitted successfully. The data protection team has been notified."
120
- */
121
- confirmationMessage?: string;
122
- /**
123
- * Whether to allow file attachments
124
- * @default true
125
- */
126
- allowAttachments?: boolean;
127
- /**
128
- * Maximum number of attachments allowed
129
- * @default 5
130
- */
131
- maxAttachments?: number;
132
- /**
133
- * Maximum file size for attachments (in bytes)
134
- * @default 5242880 (5MB)
135
- */
136
- maxFileSize?: number;
137
- /**
138
- * Allowed file types for attachments
139
- * @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
140
- */
141
- allowedFileTypes?: string[];
142
- /**
143
- * Default values to pre-fill form fields.
144
- * Useful for editing existing breach reports or pre-populating known data.
145
- */
146
- defaultValues?: Partial<BreachFormSubmission>;
147
- /**
148
- * Callback fired when the form is reset via the Reset button.
149
- * To fully remount the component (clearing all internal state),
150
- * change the `key` prop from the parent.
151
- */
152
- onReset?: () => void;
153
- }
154
- /**
155
- * Breach report form component. Implements NDPA Section 40 breach notification requirements,
156
- * enabling organizations to document and report data breaches within the mandated 72-hour window.
157
- */
158
- declare const BreachReportForm: React.FC<BreachReportFormProps>;
159
-
160
- interface BreachRiskAssessmentClassNames {
161
- root?: string;
162
- header?: string;
163
- title?: string;
164
- slider?: string;
165
- riskBadge?: string;
166
- riskScore?: string;
167
- notificationStatus?: string;
168
- submitButton?: string;
169
- /** Alias for submitButton */
170
- primaryButton?: string;
171
- }
172
- interface BreachRiskAssessmentProps {
173
- /**
174
- * The breach data to assess
175
- */
176
- breachData: BreachReport;
177
- /**
178
- * Initial assessment data (if editing an existing assessment)
179
- */
180
- initialAssessment?: Partial<RiskAssessment>;
181
- /**
182
- * Callback function called when assessment is completed
183
- */
184
- onComplete: (assessment: RiskAssessment) => void;
185
- /**
186
- * Title displayed on the assessment form
187
- * @default "Breach Risk Assessment"
188
- */
189
- title?: string;
190
- /**
191
- * Description text displayed on the assessment form
192
- * @default "Assess the risk level of this data breach to determine notification requirements under NDPA Section 40."
193
- */
194
- description?: string;
195
- /**
196
- * Text for the submit button
197
- * @default "Complete Assessment"
198
- */
199
- submitButtonText?: string;
200
- /**
201
- * Custom CSS class for the form
202
- */
203
- className?: string;
204
- /**
205
- * Custom CSS class for the submit button
206
- */
207
- buttonClassName?: string;
208
- /**
209
- * Override class names for individual elements
210
- */
211
- classNames?: BreachRiskAssessmentClassNames;
212
- /**
213
- * Remove all default styles, only applying classNames overrides
214
- */
215
- unstyled?: boolean;
216
- /**
217
- * Whether to show the breach summary
218
- * @default true
219
- */
220
- showBreachSummary?: boolean;
221
- /**
222
- * Whether to show notification requirements after assessment
223
- * @default true
224
- */
225
- showNotificationRequirements?: boolean;
226
- }
227
- /**
228
- * Breach risk assessment component. Implements NDPA Section 40 requirements for assessing
229
- * breach severity and determining whether NDPC notification is required within 72 hours.
230
- */
231
- declare const BreachRiskAssessment: React.FC<BreachRiskAssessmentProps>;
232
-
233
- interface BreachNotificationManagerClassNames {
234
- root?: string;
235
- header?: string;
236
- title?: string;
237
- breachList?: string;
238
- breachItem?: string;
239
- statusBadge?: string;
240
- timeline?: string;
241
- timelineStep?: string;
242
- detailPanel?: string;
243
- }
244
- interface BreachNotificationManagerProps {
245
- /**
246
- * List of breach reports to manage
247
- */
248
- breachReports: BreachReport[];
249
- /**
250
- * List of risk assessments
251
- */
252
- riskAssessments: RiskAssessment[];
253
- /**
254
- * List of regulatory notifications
255
- */
256
- regulatoryNotifications: RegulatoryNotification[];
257
- /**
258
- * Callback function called when a breach is selected
259
- */
260
- onSelectBreach?: (breachId: string) => void;
261
- /**
262
- * Callback function called when a risk assessment is requested
263
- */
264
- onRequestAssessment?: (breachId: string) => void;
265
- /**
266
- * Callback function called when a notification is requested
267
- */
268
- onRequestNotification?: (breachId: string) => void;
269
- /**
270
- * Title displayed on the manager
271
- * @default "Breach Notification Manager"
272
- */
273
- title?: string;
274
- /**
275
- * Description text displayed on the manager
276
- * @default "Manage data breach notifications and track compliance with NDPA Section 40 requirements."
277
- */
278
- description?: string;
279
- /**
280
- * Custom CSS class for the manager
281
- */
282
- className?: string;
283
- /**
284
- * Custom CSS class for the buttons
285
- */
286
- buttonClassName?: string;
287
- /**
288
- * Override class names for individual elements
289
- */
290
- classNames?: BreachNotificationManagerClassNames;
291
- /**
292
- * Remove all default styles, only applying classNames overrides
293
- */
294
- unstyled?: boolean;
295
- /**
296
- * Whether to show the breach details
297
- * @default true
298
- */
299
- showBreachDetails?: boolean;
300
- /**
301
- * Whether to show the notification timeline
302
- * @default true
303
- */
304
- showNotificationTimeline?: boolean;
305
- /**
306
- * Whether to show the deadline alerts
307
- * @default true
308
- */
309
- showDeadlineAlerts?: boolean;
310
- }
311
- /**
312
- * Breach notification management component. Implements NDPA Section 40 requirements for
313
- * managing breach notifications, tracking 72-hour NDPC reporting deadlines, and coordinating
314
- * data subject notifications.
315
- */
316
- declare const BreachNotificationManager: React.FC<BreachNotificationManagerProps>;
317
-
318
- interface RegulatoryReportGeneratorClassNames {
319
- root?: string;
320
- header?: string;
321
- title?: string;
322
- reportPreview?: string;
323
- field?: string;
324
- fieldLabel?: string;
325
- fieldValue?: string;
326
- generateButton?: string;
327
- /** Alias for generateButton */
328
- primaryButton?: string;
329
- downloadButton?: string;
330
- /** Alias for downloadButton */
331
- secondaryButton?: string;
332
- }
333
- interface OrganizationInfo {
334
- /**
335
- * Name of the organization
336
- */
337
- name: string;
338
- /**
339
- * Registration number or business ID
340
- */
341
- registrationNumber?: string;
342
- /**
343
- * Physical address of the organization
344
- */
345
- address: string;
346
- /**
347
- * Website URL
348
- */
349
- website?: string;
350
- /**
351
- * Name of the Data Protection Officer
352
- */
353
- dpoName: string;
354
- /**
355
- * Email of the Data Protection Officer
356
- */
357
- dpoEmail: string;
358
- /**
359
- * Phone number of the Data Protection Officer
360
- */
361
- dpoPhone?: string;
362
- }
363
- interface RegulatoryReportGeneratorProps {
364
- /**
365
- * The breach data to include in the report
366
- */
367
- breachData: BreachReport;
368
- /**
369
- * The risk assessment data
370
- */
371
- assessmentData?: RiskAssessment;
372
- /**
373
- * Organization information to include in the report
374
- */
375
- organizationInfo: OrganizationInfo;
376
- /**
377
- * Callback function called when the report is generated
378
- */
379
- onGenerate: (report: RegulatoryNotification) => void;
380
- /**
381
- * Title displayed on the generator form
382
- * @default "Generate NDPC Notification Report"
383
- */
384
- title?: string;
385
- /**
386
- * Description text displayed on the generator form
387
- * @default "Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements."
388
- */
389
- description?: string;
390
- /**
391
- * Text for the generate button
392
- * @default "Generate Report"
393
- */
394
- generateButtonText?: string;
395
- /**
396
- * Custom CSS class for the form
397
- */
398
- className?: string;
399
- /**
400
- * Custom CSS class for the buttons
401
- */
402
- buttonClassName?: string;
403
- /**
404
- * Override class names for individual elements
405
- */
406
- classNames?: RegulatoryReportGeneratorClassNames;
407
- /**
408
- * Remove all default styles, only applying classNames overrides
409
- */
410
- unstyled?: boolean;
411
- /**
412
- * Whether to show a preview of the generated report
413
- * @default true
414
- */
415
- showPreview?: boolean;
416
- /**
417
- * Whether to allow editing the report content
418
- * @default true
419
- */
420
- allowEditing?: boolean;
421
- /**
422
- * Whether to allow downloading the report
423
- * @default true
424
- */
425
- allowDownload?: boolean;
426
- /**
427
- * Format for downloading the report
428
- * @default "pdf"
429
- */
430
- downloadFormat?: 'pdf' | 'docx' | 'html';
431
- }
432
- /**
433
- * Regulatory report generator component. Implements NDPA Section 40 requirements for
434
- * generating formal breach notification reports for submission to the NDPC.
435
- */
436
- declare const RegulatoryReportGenerator: React.FC<RegulatoryReportGeneratorProps>;
437
-
438
- export { type BreachFormSubmission as B, RegulatoryReportGenerator as R, BreachNotificationManager as a, type BreachNotificationManagerClassNames as b, BreachReportForm as c, type BreachReportFormClassNames as d, BreachRiskAssessment as e, type BreachRiskAssessmentClassNames as f, type RegulatoryReportGeneratorClassNames as g };