@tantainnovative/ndpr-toolkit 2.2.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.
- package/README.md +26 -11
- package/dist/breach.d.mts +94 -6
- package/dist/breach.d.ts +94 -6
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-2XFAV267.mjs +2 -0
- package/dist/chunk-32UIWTGD.js +72 -0
- package/dist/chunk-4JUDKBA2.mjs +7 -0
- package/dist/chunk-4VVARDN2.mjs +2 -0
- package/dist/chunk-5RSOLEEP.js +63 -0
- package/dist/chunk-AYKLAEOU.mjs +2 -0
- package/dist/chunk-BGHQTZAC.js +94 -0
- package/dist/chunk-BZTTQS4A.mjs +7 -0
- package/dist/chunk-CAB7O3GR.mjs +63 -0
- package/dist/chunk-CL53OI3I.js +7 -0
- package/dist/chunk-E64TU6IU.js +2 -0
- package/dist/chunk-EKVTLHBQ.js +2 -0
- package/dist/chunk-ELKEZEV5.mjs +2 -0
- package/dist/chunk-EPF7J2FK.js +3 -0
- package/dist/chunk-ER7X6E36.js +2 -0
- package/dist/chunk-FXTZDKDC.mjs +3 -0
- package/dist/chunk-IBEKLDBY.mjs +2 -0
- package/dist/chunk-ILCNDOBU.js +2 -0
- package/dist/chunk-K3GMTMQ6.js +2 -0
- package/dist/chunk-MJGOLP5M.js +2 -0
- package/dist/chunk-NW4A3JW6.mjs +2 -0
- package/dist/chunk-P3PULLYP.mjs +2 -0
- package/dist/chunk-SKJCQKFL.mjs +94 -0
- package/dist/chunk-TCJCE6WN.js +2 -0
- package/dist/chunk-UZ5EZOA7.js +2 -0
- package/dist/chunk-WSHSHIIM.mjs +2 -0
- package/dist/chunk-XMYUYQH7.mjs +72 -0
- package/dist/chunk-ZNTMZ6NM.js +7 -0
- package/dist/consent-audit-BdByjYlM.d.mts +65 -0
- package/dist/consent-audit-DhbfMR0n.d.ts +65 -0
- package/dist/consent.d.mts +55 -8
- package/dist/consent.d.ts +55 -8
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +52 -2
- package/dist/core.d.ts +52 -2
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{cross-border-entry-CtX8_o-_.d.ts → cross-border-entry-BrWVPly6.d.ts} +7 -0
- package/dist/{cross-border-entry-BfF7jw5o.d.mts → cross-border-entry-cCTvpwnT.d.mts} +7 -0
- package/dist/cross-border.d.mts +1 -1
- package/dist/cross-border.d.ts +1 -1
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/dpia.d.mts +14 -0
- package/dist/dpia.d.ts +14 -0
- package/dist/dpia.js +1 -1
- package/dist/dpia.mjs +1 -1
- package/dist/dsr.d.mts +60 -5
- package/dist/dsr.d.ts +60 -5
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +11 -10
- package/dist/index.d.ts +11 -10
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{lawful-basis-entry-BeSX7u0U.d.ts → lawful-basis-entry-15qjKcNO.d.ts} +6 -0
- package/dist/{lawful-basis-entry-CMPPM9Rh.d.mts → lawful-basis-entry-CxZrofwG.d.mts} +6 -0
- package/dist/lawful-basis.d.mts +1 -1
- package/dist/lawful-basis.d.ts +1 -1
- package/dist/lawful-basis.js +1 -1
- package/dist/lawful-basis.mjs +1 -1
- package/dist/{policy-dmsRlqgM.d.ts → policy-D2_jh5-T.d.ts} +15 -5
- package/dist/{policy-kZN23hrR.d.mts → policy-E0fXZkda.d.mts} +15 -5
- package/dist/policy-templates-CIKcV0i1.d.ts +36 -0
- package/dist/policy-templates-DMsPwOSZ.d.mts +36 -0
- package/dist/policy.d.mts +3 -3
- package/dist/policy.d.ts +3 -3
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/{ropa-entry-DIEQ9WFs.d.ts → ropa-entry-B0D7X1GV.d.ts} +10 -1
- package/dist/{ropa-entry-CZJ91ymk.d.mts → ropa-entry-DiOThOc2.d.mts} +10 -1
- package/dist/ropa.d.mts +1 -1
- package/dist/ropa.d.ts +1 -1
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -1
- package/dist/styles.css +40 -28
- package/dist/styles.d.ts +1 -0
- package/dist/{usePrivacyPolicy-CfySfBLS.d.ts → useDefaultPrivacyPolicy-B7kTHbZh.d.ts} +39 -2
- package/dist/{usePrivacyPolicy-Dit2sFuV.d.mts → useDefaultPrivacyPolicy-CUluF_ic.d.mts} +39 -2
- package/package.json +9 -7
- package/dist/chunk-4RGDNVR5.mjs +0 -72
- package/dist/chunk-6LM3RAFO.js +0 -7
- package/dist/chunk-7DNQSOER.js +0 -2
- package/dist/chunk-A7DRHSDQ.mjs +0 -2
- package/dist/chunk-DB3JH4DS.mjs +0 -2
- package/dist/chunk-FC6EG34C.js +0 -72
- package/dist/chunk-FDB6KZUD.mjs +0 -2
- package/dist/chunk-FZUCKGIM.mjs +0 -7
- package/dist/chunk-G3JNFZPT.js +0 -2
- package/dist/chunk-HXCRMA4J.mjs +0 -2
- package/dist/chunk-IC7VOOKJ.mjs +0 -2
- package/dist/chunk-ICUZG6CD.mjs +0 -2
- package/dist/chunk-IW5PHOG7.mjs +0 -7
- package/dist/chunk-IWUUVRLJ.js +0 -2
- package/dist/chunk-JKEAPTYP.js +0 -7
- package/dist/chunk-N52S64SU.js +0 -2
- package/dist/chunk-PM7CMTMB.js +0 -4
- package/dist/chunk-SKAMVXBI.mjs +0 -94
- package/dist/chunk-UYP64PV7.mjs +0 -4
- package/dist/chunk-VURIXCGY.js +0 -2
- package/dist/chunk-VXRY3V42.js +0 -94
- package/dist/chunk-YBPHGEL2.js +0 -2
- package/dist/consent-DCc5zjXI.d.mts +0 -24
- package/dist/consent-DLWb5ota.d.ts +0 -24
- package/dist/privacy-9FcJceMr.d.mts +0 -15
- package/dist/privacy-BXz7O2ej.d.ts +0 -15
package/README.md
CHANGED
|
@@ -141,15 +141,30 @@ import { ConsentBanner } from '@tantainnovative/ndpr-toolkit/consent';
|
|
|
141
141
|
|
|
142
142
|
### classNames Reference
|
|
143
143
|
|
|
144
|
-
| Component |
|
|
145
|
-
|
|
146
|
-
| ConsentBanner | root, title, acceptButton, rejectButton,
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
|
|
152
|
-
|
|
144
|
+
| Component | Keys | All classNames |
|
|
145
|
+
|-----------|------|----------------|
|
|
146
|
+
| ConsentBanner | 14 | root, container, title, description, optionsList, optionItem, optionCheckbox, optionLabel, optionDescription, buttonGroup, acceptButton, rejectButton, customizeButton, saveButton |
|
|
147
|
+
| ConsentManager | 9 | root, header, title, description, optionsList, optionItem, toggle, saveButton, resetButton |
|
|
148
|
+
| ConsentStorage | 1 | root |
|
|
149
|
+
| DSRRequestForm | 11 | root, title, description, form, fieldGroup, label, input, select, textarea, submitButton, successMessage |
|
|
150
|
+
| DSRDashboard | 8 | root, header, title, filters, requestList, requestItem, statusBadge, detailPanel |
|
|
151
|
+
| DSRTracker | 9 | root, header, title, stats, statCard, table, tableHeader, tableRow, statusBadge |
|
|
152
|
+
| DPIAQuestionnaire | 15 | root, header, title, section, sectionTitle, question, questionText, guidance, input, radioGroup, radioOption, navigation, nextButton, prevButton, progressBar |
|
|
153
|
+
| DPIAReport | 10 | root, header, title, summary, riskBadge, riskTable, riskRow, recommendation, conclusion, printButton |
|
|
154
|
+
| StepIndicator | 7 | root, step, stepActive, stepCompleted, stepPending, connector, label |
|
|
155
|
+
| BreachReportForm | 10 | root, title, form, fieldGroup, label, input, select, textarea, submitButton, notice |
|
|
156
|
+
| BreachRiskAssessment | 8 | root, header, title, slider, riskBadge, riskScore, notificationStatus, submitButton |
|
|
157
|
+
| BreachNotificationManager | 9 | root, header, title, breachList, breachItem, statusBadge, timeline, timelineStep, detailPanel |
|
|
158
|
+
| RegulatoryReportGenerator | 9 | root, header, title, reportPreview, field, fieldLabel, fieldValue, generateButton, downloadButton |
|
|
159
|
+
| PolicyGenerator | 10 | root, header, title, description, sectionList, sectionItem, form, input, generateButton, complianceNotice |
|
|
160
|
+
| PolicyPreview | 9 | root, header, title, description, content, section, sectionTitle, sectionContent, complianceNotice |
|
|
161
|
+
| PolicyExporter | 9 | root, header, title, description, formatSelector, formatOption, exportButton, complianceNotice, preview |
|
|
162
|
+
| LawfulBasisTracker | 15 | root, header, title, summary, summaryCard, table, tableHeader, tableRow, form, input, select, submitButton, statusBadge, complianceScore, gapAlert |
|
|
163
|
+
| CrossBorderTransferManager | 15 | root, header, title, summary, summaryCard, transferList, transferItem, form, input, select, submitButton, riskBadge, statusBadge, detailPanel, approvalStatus |
|
|
164
|
+
| ROPAManager | 16 | root, header, title, orgInfo, summary, summaryCard, table, tableHeader, tableRow, form, input, select, submitButton, statusBadge, exportButton, complianceGap |
|
|
165
|
+
| **All 19 components** | **169** | |
|
|
166
|
+
|
|
167
|
+
Every component follows the same pattern. Pass `classNames` to override specific sections, or set `unstyled` to strip all default styles. Each component exports its ClassNames TypeScript interface for autocomplete support.
|
|
153
168
|
|
|
154
169
|
---
|
|
155
170
|
|
|
@@ -309,7 +324,7 @@ const { transfers, addTransfer, getSummary } = useCrossBorderTransfer({
|
|
|
309
324
|
|
|
310
325
|
### 8. Record of Processing Activities (ROPA)
|
|
311
326
|
|
|
312
|
-
**NDPC Regulatory Guidance** -- Maintain comprehensive records of all processing activities for audit readiness.
|
|
327
|
+
**NDPA Section 28(2) & NDPC Regulatory Guidance** -- Maintain comprehensive records of all processing activities for audit readiness and regulatory accountability.
|
|
313
328
|
|
|
314
329
|
```typescript
|
|
315
330
|
import { ROPAManager, useROPA, generateROPASummary, exportROPAToCSV } from '@tantainnovative/ndpr-toolkit/ropa';
|
|
@@ -329,7 +344,7 @@ const { ropa, addRecord, getSummary } = useROPA({
|
|
|
329
344
|
|
|
330
345
|
| Path | What you get | Dependencies |
|
|
331
346
|
|------|-------------|--------------|
|
|
332
|
-
| `/core` | Types + utility functions | `tslib
|
|
347
|
+
| `/core` | Types + utility functions | `tslib` |
|
|
333
348
|
| `/hooks` | React hooks for all 8 modules | `react` |
|
|
334
349
|
| `/consent` | Consent components + hook + utils | `react`, Radix, Tailwind |
|
|
335
350
|
| `/dsr` | DSR components + hook + utils | `react`, Radix, Tailwind |
|
package/dist/breach.d.mts
CHANGED
|
@@ -4,6 +4,47 @@ export { N as NotificationRequirement } from './breach-Eu9byel8.mjs';
|
|
|
4
4
|
export { u as useBreach } from './useBreach-BBSoIcZO.mjs';
|
|
5
5
|
export { c as calculateBreachSeverity } from './breach-B_-6lDqS.mjs';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Represents the data submitted by the breach report form.
|
|
9
|
+
*/
|
|
10
|
+
interface BreachFormSubmission {
|
|
11
|
+
/** Title/summary of the breach */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Detailed description of the breach */
|
|
14
|
+
description: string;
|
|
15
|
+
/** Breach category identifier */
|
|
16
|
+
category: string;
|
|
17
|
+
/** Timestamp (ms) when the breach was discovered */
|
|
18
|
+
discoveredAt: number;
|
|
19
|
+
/** Timestamp (ms) when the breach occurred (if known) */
|
|
20
|
+
occurredAt?: number;
|
|
21
|
+
/** Timestamp (ms) when the form was submitted */
|
|
22
|
+
reportedAt: number;
|
|
23
|
+
/** Person reporting the breach */
|
|
24
|
+
reporter: {
|
|
25
|
+
name: string;
|
|
26
|
+
email: string;
|
|
27
|
+
department: string;
|
|
28
|
+
phone?: string;
|
|
29
|
+
};
|
|
30
|
+
/** Systems or applications affected by the breach */
|
|
31
|
+
affectedSystems: string[];
|
|
32
|
+
/** Types of data involved in the breach */
|
|
33
|
+
dataTypes: string[];
|
|
34
|
+
/** Estimated number of affected data subjects */
|
|
35
|
+
estimatedAffectedSubjects?: number;
|
|
36
|
+
/** Current status of the breach */
|
|
37
|
+
status: 'ongoing' | 'contained' | 'resolved';
|
|
38
|
+
/** Initial actions taken to address the breach */
|
|
39
|
+
initialActions?: string;
|
|
40
|
+
/** File attachments included with the report */
|
|
41
|
+
attachments: Array<{
|
|
42
|
+
name: string;
|
|
43
|
+
type: string;
|
|
44
|
+
size: number;
|
|
45
|
+
file: File;
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
7
48
|
interface BreachReportFormClassNames {
|
|
8
49
|
root?: string;
|
|
9
50
|
title?: string;
|
|
@@ -14,7 +55,11 @@ interface BreachReportFormClassNames {
|
|
|
14
55
|
select?: string;
|
|
15
56
|
textarea?: string;
|
|
16
57
|
submitButton?: string;
|
|
58
|
+
/** Alias for submitButton */
|
|
59
|
+
primaryButton?: string;
|
|
17
60
|
notice?: string;
|
|
61
|
+
/** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
|
|
62
|
+
loadingOverlay?: string;
|
|
18
63
|
}
|
|
19
64
|
interface BreachReportFormProps {
|
|
20
65
|
/**
|
|
@@ -24,7 +69,11 @@ interface BreachReportFormProps {
|
|
|
24
69
|
/**
|
|
25
70
|
* Callback function called when form is submitted
|
|
26
71
|
*/
|
|
27
|
-
onSubmit: (
|
|
72
|
+
onSubmit: (data: BreachFormSubmission) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Callback function called when form validation fails
|
|
75
|
+
*/
|
|
76
|
+
onValidationError?: (errors: Record<string, string>) => void;
|
|
28
77
|
/**
|
|
29
78
|
* Title displayed on the form
|
|
30
79
|
* @default "Report a Data Breach"
|
|
@@ -32,7 +81,7 @@ interface BreachReportFormProps {
|
|
|
32
81
|
title?: string;
|
|
33
82
|
/**
|
|
34
83
|
* Description text displayed on the form
|
|
35
|
-
* @default "Use this form to report a suspected or confirmed data breach. All fields marked with * are required."
|
|
84
|
+
* @default "Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required."
|
|
36
85
|
*/
|
|
37
86
|
formDescription?: string;
|
|
38
87
|
/**
|
|
@@ -56,6 +105,11 @@ interface BreachReportFormProps {
|
|
|
56
105
|
* Remove all default styles, only applying classNames overrides
|
|
57
106
|
*/
|
|
58
107
|
unstyled?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Whether the form is currently submitting.
|
|
110
|
+
* When true, the submit button is disabled and shows "Submitting..." text.
|
|
111
|
+
*/
|
|
112
|
+
isSubmitting?: boolean;
|
|
59
113
|
/**
|
|
60
114
|
* Whether to show a confirmation message after submission
|
|
61
115
|
* @default true
|
|
@@ -86,7 +140,22 @@ interface BreachReportFormProps {
|
|
|
86
140
|
* @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
|
|
87
141
|
*/
|
|
88
142
|
allowedFileTypes?: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Default values to pre-fill form fields.
|
|
145
|
+
* Useful for editing existing breach reports or pre-populating known data.
|
|
146
|
+
*/
|
|
147
|
+
defaultValues?: Partial<BreachFormSubmission>;
|
|
148
|
+
/**
|
|
149
|
+
* Callback fired when the form is reset via the Reset button.
|
|
150
|
+
* To fully remount the component (clearing all internal state),
|
|
151
|
+
* change the `key` prop from the parent.
|
|
152
|
+
*/
|
|
153
|
+
onReset?: () => void;
|
|
89
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Breach report form component. Implements NDPA Section 40 breach notification requirements,
|
|
157
|
+
* enabling organizations to document and report data breaches within the mandated 72-hour window.
|
|
158
|
+
*/
|
|
90
159
|
declare const BreachReportForm: React.FC<BreachReportFormProps>;
|
|
91
160
|
|
|
92
161
|
interface BreachRiskAssessmentClassNames {
|
|
@@ -98,6 +167,8 @@ interface BreachRiskAssessmentClassNames {
|
|
|
98
167
|
riskScore?: string;
|
|
99
168
|
notificationStatus?: string;
|
|
100
169
|
submitButton?: string;
|
|
170
|
+
/** Alias for submitButton */
|
|
171
|
+
primaryButton?: string;
|
|
101
172
|
}
|
|
102
173
|
interface BreachRiskAssessmentProps {
|
|
103
174
|
/**
|
|
@@ -119,7 +190,7 @@ interface BreachRiskAssessmentProps {
|
|
|
119
190
|
title?: string;
|
|
120
191
|
/**
|
|
121
192
|
* Description text displayed on the assessment form
|
|
122
|
-
* @default "Assess the risk level of this data breach to determine notification requirements."
|
|
193
|
+
* @default "Assess the risk level of this data breach to determine notification requirements under NDPA Section 40."
|
|
123
194
|
*/
|
|
124
195
|
description?: string;
|
|
125
196
|
/**
|
|
@@ -154,6 +225,10 @@ interface BreachRiskAssessmentProps {
|
|
|
154
225
|
*/
|
|
155
226
|
showNotificationRequirements?: boolean;
|
|
156
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Breach risk assessment component. Implements NDPA Section 40 requirements for assessing
|
|
230
|
+
* breach severity and determining whether NDPC notification is required within 72 hours.
|
|
231
|
+
*/
|
|
157
232
|
declare const BreachRiskAssessment: React.FC<BreachRiskAssessmentProps>;
|
|
158
233
|
|
|
159
234
|
interface BreachNotificationManagerClassNames {
|
|
@@ -199,7 +274,7 @@ interface BreachNotificationManagerProps {
|
|
|
199
274
|
title?: string;
|
|
200
275
|
/**
|
|
201
276
|
* Description text displayed on the manager
|
|
202
|
-
* @default "Manage data breach notifications and track compliance with NDPA requirements."
|
|
277
|
+
* @default "Manage data breach notifications and track compliance with NDPA Section 40 requirements."
|
|
203
278
|
*/
|
|
204
279
|
description?: string;
|
|
205
280
|
/**
|
|
@@ -234,6 +309,11 @@ interface BreachNotificationManagerProps {
|
|
|
234
309
|
*/
|
|
235
310
|
showDeadlineAlerts?: boolean;
|
|
236
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* Breach notification management component. Implements NDPA Section 40 requirements for
|
|
314
|
+
* managing breach notifications, tracking 72-hour NDPC reporting deadlines, and coordinating
|
|
315
|
+
* data subject notifications.
|
|
316
|
+
*/
|
|
237
317
|
declare const BreachNotificationManager: React.FC<BreachNotificationManagerProps>;
|
|
238
318
|
|
|
239
319
|
interface RegulatoryReportGeneratorClassNames {
|
|
@@ -245,7 +325,11 @@ interface RegulatoryReportGeneratorClassNames {
|
|
|
245
325
|
fieldLabel?: string;
|
|
246
326
|
fieldValue?: string;
|
|
247
327
|
generateButton?: string;
|
|
328
|
+
/** Alias for generateButton */
|
|
329
|
+
primaryButton?: string;
|
|
248
330
|
downloadButton?: string;
|
|
331
|
+
/** Alias for downloadButton */
|
|
332
|
+
secondaryButton?: string;
|
|
249
333
|
}
|
|
250
334
|
interface OrganizationInfo {
|
|
251
335
|
/**
|
|
@@ -301,7 +385,7 @@ interface RegulatoryReportGeneratorProps {
|
|
|
301
385
|
title?: string;
|
|
302
386
|
/**
|
|
303
387
|
* Description text displayed on the generator form
|
|
304
|
-
* @default "Generate a report for submission to the NDPC in compliance with
|
|
388
|
+
* @default "Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements."
|
|
305
389
|
*/
|
|
306
390
|
description?: string;
|
|
307
391
|
/**
|
|
@@ -346,6 +430,10 @@ interface RegulatoryReportGeneratorProps {
|
|
|
346
430
|
*/
|
|
347
431
|
downloadFormat?: 'pdf' | 'docx' | 'html';
|
|
348
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* Regulatory report generator component. Implements NDPA Section 40 requirements for
|
|
435
|
+
* generating formal breach notification reports for submission to the NDPC.
|
|
436
|
+
*/
|
|
349
437
|
declare const RegulatoryReportGenerator: React.FC<RegulatoryReportGeneratorProps>;
|
|
350
438
|
|
|
351
|
-
export { BreachCategory, BreachNotificationManager, type BreachNotificationManagerClassNames, BreachReport, BreachReportForm, type BreachReportFormClassNames, BreachRiskAssessment, type BreachRiskAssessmentClassNames, RegulatoryNotification, RegulatoryReportGenerator, type RegulatoryReportGeneratorClassNames, RiskAssessment };
|
|
439
|
+
export { BreachCategory, type BreachFormSubmission, BreachNotificationManager, type BreachNotificationManagerClassNames, BreachReport, BreachReportForm, type BreachReportFormClassNames, BreachRiskAssessment, type BreachRiskAssessmentClassNames, RegulatoryNotification, RegulatoryReportGenerator, type RegulatoryReportGeneratorClassNames, RiskAssessment };
|
package/dist/breach.d.ts
CHANGED
|
@@ -4,6 +4,47 @@ export { N as NotificationRequirement } from './breach-Eu9byel8.js';
|
|
|
4
4
|
export { u as useBreach } from './useBreach-lFLbSyAN.js';
|
|
5
5
|
export { c as calculateBreachSeverity } from './breach-CzXqSsaY.js';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Represents the data submitted by the breach report form.
|
|
9
|
+
*/
|
|
10
|
+
interface BreachFormSubmission {
|
|
11
|
+
/** Title/summary of the breach */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Detailed description of the breach */
|
|
14
|
+
description: string;
|
|
15
|
+
/** Breach category identifier */
|
|
16
|
+
category: string;
|
|
17
|
+
/** Timestamp (ms) when the breach was discovered */
|
|
18
|
+
discoveredAt: number;
|
|
19
|
+
/** Timestamp (ms) when the breach occurred (if known) */
|
|
20
|
+
occurredAt?: number;
|
|
21
|
+
/** Timestamp (ms) when the form was submitted */
|
|
22
|
+
reportedAt: number;
|
|
23
|
+
/** Person reporting the breach */
|
|
24
|
+
reporter: {
|
|
25
|
+
name: string;
|
|
26
|
+
email: string;
|
|
27
|
+
department: string;
|
|
28
|
+
phone?: string;
|
|
29
|
+
};
|
|
30
|
+
/** Systems or applications affected by the breach */
|
|
31
|
+
affectedSystems: string[];
|
|
32
|
+
/** Types of data involved in the breach */
|
|
33
|
+
dataTypes: string[];
|
|
34
|
+
/** Estimated number of affected data subjects */
|
|
35
|
+
estimatedAffectedSubjects?: number;
|
|
36
|
+
/** Current status of the breach */
|
|
37
|
+
status: 'ongoing' | 'contained' | 'resolved';
|
|
38
|
+
/** Initial actions taken to address the breach */
|
|
39
|
+
initialActions?: string;
|
|
40
|
+
/** File attachments included with the report */
|
|
41
|
+
attachments: Array<{
|
|
42
|
+
name: string;
|
|
43
|
+
type: string;
|
|
44
|
+
size: number;
|
|
45
|
+
file: File;
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
7
48
|
interface BreachReportFormClassNames {
|
|
8
49
|
root?: string;
|
|
9
50
|
title?: string;
|
|
@@ -14,7 +55,11 @@ interface BreachReportFormClassNames {
|
|
|
14
55
|
select?: string;
|
|
15
56
|
textarea?: string;
|
|
16
57
|
submitButton?: string;
|
|
58
|
+
/** Alias for submitButton */
|
|
59
|
+
primaryButton?: string;
|
|
17
60
|
notice?: string;
|
|
61
|
+
/** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
|
|
62
|
+
loadingOverlay?: string;
|
|
18
63
|
}
|
|
19
64
|
interface BreachReportFormProps {
|
|
20
65
|
/**
|
|
@@ -24,7 +69,11 @@ interface BreachReportFormProps {
|
|
|
24
69
|
/**
|
|
25
70
|
* Callback function called when form is submitted
|
|
26
71
|
*/
|
|
27
|
-
onSubmit: (
|
|
72
|
+
onSubmit: (data: BreachFormSubmission) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Callback function called when form validation fails
|
|
75
|
+
*/
|
|
76
|
+
onValidationError?: (errors: Record<string, string>) => void;
|
|
28
77
|
/**
|
|
29
78
|
* Title displayed on the form
|
|
30
79
|
* @default "Report a Data Breach"
|
|
@@ -32,7 +81,7 @@ interface BreachReportFormProps {
|
|
|
32
81
|
title?: string;
|
|
33
82
|
/**
|
|
34
83
|
* Description text displayed on the form
|
|
35
|
-
* @default "Use this form to report a suspected or confirmed data breach. All fields marked with * are required."
|
|
84
|
+
* @default "Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required."
|
|
36
85
|
*/
|
|
37
86
|
formDescription?: string;
|
|
38
87
|
/**
|
|
@@ -56,6 +105,11 @@ interface BreachReportFormProps {
|
|
|
56
105
|
* Remove all default styles, only applying classNames overrides
|
|
57
106
|
*/
|
|
58
107
|
unstyled?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Whether the form is currently submitting.
|
|
110
|
+
* When true, the submit button is disabled and shows "Submitting..." text.
|
|
111
|
+
*/
|
|
112
|
+
isSubmitting?: boolean;
|
|
59
113
|
/**
|
|
60
114
|
* Whether to show a confirmation message after submission
|
|
61
115
|
* @default true
|
|
@@ -86,7 +140,22 @@ interface BreachReportFormProps {
|
|
|
86
140
|
* @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
|
|
87
141
|
*/
|
|
88
142
|
allowedFileTypes?: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Default values to pre-fill form fields.
|
|
145
|
+
* Useful for editing existing breach reports or pre-populating known data.
|
|
146
|
+
*/
|
|
147
|
+
defaultValues?: Partial<BreachFormSubmission>;
|
|
148
|
+
/**
|
|
149
|
+
* Callback fired when the form is reset via the Reset button.
|
|
150
|
+
* To fully remount the component (clearing all internal state),
|
|
151
|
+
* change the `key` prop from the parent.
|
|
152
|
+
*/
|
|
153
|
+
onReset?: () => void;
|
|
89
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Breach report form component. Implements NDPA Section 40 breach notification requirements,
|
|
157
|
+
* enabling organizations to document and report data breaches within the mandated 72-hour window.
|
|
158
|
+
*/
|
|
90
159
|
declare const BreachReportForm: React.FC<BreachReportFormProps>;
|
|
91
160
|
|
|
92
161
|
interface BreachRiskAssessmentClassNames {
|
|
@@ -98,6 +167,8 @@ interface BreachRiskAssessmentClassNames {
|
|
|
98
167
|
riskScore?: string;
|
|
99
168
|
notificationStatus?: string;
|
|
100
169
|
submitButton?: string;
|
|
170
|
+
/** Alias for submitButton */
|
|
171
|
+
primaryButton?: string;
|
|
101
172
|
}
|
|
102
173
|
interface BreachRiskAssessmentProps {
|
|
103
174
|
/**
|
|
@@ -119,7 +190,7 @@ interface BreachRiskAssessmentProps {
|
|
|
119
190
|
title?: string;
|
|
120
191
|
/**
|
|
121
192
|
* Description text displayed on the assessment form
|
|
122
|
-
* @default "Assess the risk level of this data breach to determine notification requirements."
|
|
193
|
+
* @default "Assess the risk level of this data breach to determine notification requirements under NDPA Section 40."
|
|
123
194
|
*/
|
|
124
195
|
description?: string;
|
|
125
196
|
/**
|
|
@@ -154,6 +225,10 @@ interface BreachRiskAssessmentProps {
|
|
|
154
225
|
*/
|
|
155
226
|
showNotificationRequirements?: boolean;
|
|
156
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Breach risk assessment component. Implements NDPA Section 40 requirements for assessing
|
|
230
|
+
* breach severity and determining whether NDPC notification is required within 72 hours.
|
|
231
|
+
*/
|
|
157
232
|
declare const BreachRiskAssessment: React.FC<BreachRiskAssessmentProps>;
|
|
158
233
|
|
|
159
234
|
interface BreachNotificationManagerClassNames {
|
|
@@ -199,7 +274,7 @@ interface BreachNotificationManagerProps {
|
|
|
199
274
|
title?: string;
|
|
200
275
|
/**
|
|
201
276
|
* Description text displayed on the manager
|
|
202
|
-
* @default "Manage data breach notifications and track compliance with NDPA requirements."
|
|
277
|
+
* @default "Manage data breach notifications and track compliance with NDPA Section 40 requirements."
|
|
203
278
|
*/
|
|
204
279
|
description?: string;
|
|
205
280
|
/**
|
|
@@ -234,6 +309,11 @@ interface BreachNotificationManagerProps {
|
|
|
234
309
|
*/
|
|
235
310
|
showDeadlineAlerts?: boolean;
|
|
236
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* Breach notification management component. Implements NDPA Section 40 requirements for
|
|
314
|
+
* managing breach notifications, tracking 72-hour NDPC reporting deadlines, and coordinating
|
|
315
|
+
* data subject notifications.
|
|
316
|
+
*/
|
|
237
317
|
declare const BreachNotificationManager: React.FC<BreachNotificationManagerProps>;
|
|
238
318
|
|
|
239
319
|
interface RegulatoryReportGeneratorClassNames {
|
|
@@ -245,7 +325,11 @@ interface RegulatoryReportGeneratorClassNames {
|
|
|
245
325
|
fieldLabel?: string;
|
|
246
326
|
fieldValue?: string;
|
|
247
327
|
generateButton?: string;
|
|
328
|
+
/** Alias for generateButton */
|
|
329
|
+
primaryButton?: string;
|
|
248
330
|
downloadButton?: string;
|
|
331
|
+
/** Alias for downloadButton */
|
|
332
|
+
secondaryButton?: string;
|
|
249
333
|
}
|
|
250
334
|
interface OrganizationInfo {
|
|
251
335
|
/**
|
|
@@ -301,7 +385,7 @@ interface RegulatoryReportGeneratorProps {
|
|
|
301
385
|
title?: string;
|
|
302
386
|
/**
|
|
303
387
|
* Description text displayed on the generator form
|
|
304
|
-
* @default "Generate a report for submission to the NDPC in compliance with
|
|
388
|
+
* @default "Generate a report for submission to the NDPC in compliance with NDPA Section 40 breach notification requirements."
|
|
305
389
|
*/
|
|
306
390
|
description?: string;
|
|
307
391
|
/**
|
|
@@ -346,6 +430,10 @@ interface RegulatoryReportGeneratorProps {
|
|
|
346
430
|
*/
|
|
347
431
|
downloadFormat?: 'pdf' | 'docx' | 'html';
|
|
348
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* Regulatory report generator component. Implements NDPA Section 40 requirements for
|
|
435
|
+
* generating formal breach notification reports for submission to the NDPC.
|
|
436
|
+
*/
|
|
349
437
|
declare const RegulatoryReportGenerator: React.FC<RegulatoryReportGeneratorProps>;
|
|
350
438
|
|
|
351
|
-
export { BreachCategory, BreachNotificationManager, type BreachNotificationManagerClassNames, BreachReport, BreachReportForm, type BreachReportFormClassNames, BreachRiskAssessment, type BreachRiskAssessmentClassNames, RegulatoryNotification, RegulatoryReportGenerator, type RegulatoryReportGeneratorClassNames, RiskAssessment };
|
|
439
|
+
export { BreachCategory, type BreachFormSubmission, BreachNotificationManager, type BreachNotificationManagerClassNames, BreachReport, BreachReportForm, type BreachReportFormClassNames, BreachRiskAssessment, type BreachRiskAssessmentClassNames, RegulatoryNotification, RegulatoryReportGenerator, type RegulatoryReportGeneratorClassNames, RiskAssessment };
|
package/dist/breach.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk32UIWTGD_js=require('./chunk-32UIWTGD.js'),chunkLI6WJ3LZ_js=require('./chunk-LI6WJ3LZ.js'),chunkRYZEIDNR_js=require('./chunk-RYZEIDNR.js');require('./chunk-EPF7J2FK.js'),require('./chunk-E64TU6IU.js'),require('./chunk-MQFZHA2D.js');Object.defineProperty(exports,"BreachNotificationManager",{enumerable:true,get:function(){return chunk32UIWTGD_js.c}});Object.defineProperty(exports,"BreachReportForm",{enumerable:true,get:function(){return chunk32UIWTGD_js.a}});Object.defineProperty(exports,"BreachRiskAssessment",{enumerable:true,get:function(){return chunk32UIWTGD_js.b}});Object.defineProperty(exports,"RegulatoryReportGenerator",{enumerable:true,get:function(){return chunk32UIWTGD_js.d}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkLI6WJ3LZ_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunkRYZEIDNR_js.a}});//# sourceMappingURL=breach.js.map
|
|
2
2
|
//# sourceMappingURL=breach.js.map
|
package/dist/breach.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{c as BreachNotificationManager,a as BreachReportForm,b as BreachRiskAssessment,d as RegulatoryReportGenerator}from'./chunk-
|
|
1
|
+
export{c as BreachNotificationManager,a as BreachReportForm,b as BreachRiskAssessment,d as RegulatoryReportGenerator}from'./chunk-XMYUYQH7.mjs';export{a as useBreach}from'./chunk-OITITR6K.mjs';export{a as calculateBreachSeverity}from'./chunk-RGYK4VAY.mjs';import'./chunk-FXTZDKDC.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-WWT2ZSNU.mjs';//# sourceMappingURL=breach.mjs.map
|
|
2
2
|
//# sourceMappingURL=breach.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a,d}from'./chunk-CAB7O3GR.mjs';import {b,a as a$1}from'./chunk-WWT2ZSNU.mjs';import {useState,useEffect}from'react';function O({templates:y,initialPolicy:c,storageKey:f="ndpr_privacy_policy",useLocalStorage:m=true,onGenerate:g}){let[n,u]=useState(c||null),[a$2,p]=useState(null),[d,P]=useState({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""});useEffect(()=>{if(m&&typeof window!="undefined"&&!c)try{let i=localStorage.getItem(f);if(i){let{policy:o,template:e,organizationInfo:t}=JSON.parse(i);if(o&&u(o),e){let s=y.find(x=>x.id===e.id);s&&p(s);}t&&P(t);}}catch(i){console.error("Error loading privacy policy data:",i);}},[f,m,c,y]),useEffect(()=>{if(m&&typeof window!="undefined")try{localStorage.setItem(f,JSON.stringify({policy:n,template:a$2,organizationInfo:d}));}catch(i){console.error("Error saving privacy policy data:",i);}},[n,a$2,d,f,m]);let V=i=>{let o=y.find(s=>s.id===i);if(!o)return false;p(o);o.sections.map(s=>b(a$1({},s),{customContent:void 0}));return Object.keys(o.variables).forEach(s=>{o.variables[s].defaultValue||"";}),true},h=i=>{P(o=>a$1(a$1({},o),i));},w=(i,o)=>{a$2&&(n?u(e=>e&&b(a$1({},e),{sections:e.sections.map(t=>t.id===i?b(a$1({},t),{included:o}):t)})):p(e=>e&&b(a$1({},e),{sections:e.sections.map(t=>t.id===i?b(a$1({},t),{included:o}):t)})));},z=(i,o)=>{a$2&&(n?u(e=>e&&b(a$1({},e),{sections:e.sections.map(t=>t.id===i?b(a$1({},t),{customContent:o}):t)})):p(e=>e&&b(a$1({},e),{sections:e.sections.map(t=>t.id===i?b(a$1({},t),{customContent:o}):t)})));},E=(i,o)=>{n&&u(e=>e&&b(a$1({},e),{variableValues:b(a$1({},e.variableValues),{[i]:o})}));},S=()=>"policy_"+Date.now()+"_"+Math.random().toString(36).substr(2,9);return {policy:n,selectedTemplate:a$2,organizationInfo:d,selectTemplate:V,updateOrganizationInfo:h,toggleSection:w,updateSectionContent:z,updateVariableValue:E,generatePolicy:()=>{if(!a$2)throw new Error("No template selected");let i=Date.now(),o={id:(n==null?void 0:n.id)||S(),title:`Privacy Policy for ${d.name}`,templateId:a$2.id,organizationInfo:d,sections:a$2.sections.map(e=>{var t;return b(a$1({},e),{customContent:(t=n==null?void 0:n.sections.find(s=>s.id===e.id))==null?void 0:t.customContent})}),variableValues:(n==null?void 0:n.variableValues)||{},effectiveDate:i,lastUpdated:i,version:"1.0"};return u(o),g&&g(o),o},getPolicyText:()=>{if(!n)return {fullText:"",sectionTexts:{},missingVariables:[]};let i=a(n.sections,n.organizationInfo);return typeof i=="string"?{fullText:i,sectionTexts:{full:i},missingVariables:[]}:i},resetPolicy:()=>{u(null),p(null),P({name:"",website:"",privacyEmail:"",address:"",privacyPhone:"",dpoName:"",dpoEmail:"",industry:""}),m&&typeof window!="undefined"&&localStorage.removeItem(f);},isValid:()=>{let i=[];if(a$2||i.push("No template selected"),d.name||i.push("Organization name is required"),d.website||i.push("Organization website is required"),d.privacyEmail||i.push("Privacy contact email is required"),a$2){let o=a$2.sections.filter(t=>t.required),e=(n==null?void 0:n.sections.filter(t=>t.included))||[];o.forEach(t=>{e.some(s=>s.id===t.id)||i.push(`Required section "${t.title}" must be included`);});}return a$2&&n&&Object.entries(a$2.variables).forEach(([o,e])=>{e.required&&!n.variableValues[o]&&i.push(`Required variable "${e.name}" must have a value`);}),{valid:i.length===0,errors:i}}}}function J(y={}){let{orgInfo:c,storageKey:f,useLocalStorage:m}=y,{sections:g,variables:n}=d();if(c)for(let a of n)c.name&&a.name==="orgName"&&(a.value=c.name),c.email&&a.name==="privacyEmail"&&(a.value=c.email),c.dpoName&&a.name==="dpoName"&&(a.value=c.dpoName);let u={id:"default-business",name:"Default Business Policy",description:"NDPA-compliant privacy policy template for businesses.",organizationType:"business",sections:g,variables:Object.fromEntries(n.map(a=>[a.name,{name:a.name,description:a.description,required:a.required,defaultValue:a.value||void 0}])),version:"1.0",lastUpdated:Date.now(),ndpaCompliant:true};return O({templates:[u],storageKey:f,useLocalStorage:m})}export{O as a,J as b};//# sourceMappingURL=chunk-2XFAV267.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-2XFAV267.mjs.map
|