@tantainnovative/ndpr-toolkit 1.0.3 → 1.0.5
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/next-env.d.ts +5 -0
- package/package.json +1 -1
- package/packages/ndpr-toolkit/dist/components/breach/BreachNotificationManager.d.ts +62 -0
- package/packages/ndpr-toolkit/dist/components/breach/BreachReportForm.d.ts +66 -0
- package/packages/ndpr-toolkit/dist/components/breach/BreachRiskAssessment.d.ts +50 -0
- package/packages/ndpr-toolkit/dist/components/breach/RegulatoryReportGenerator.d.ts +94 -0
- package/packages/ndpr-toolkit/dist/components/consent/ConsentBanner.d.ts +79 -0
- package/packages/ndpr-toolkit/dist/components/consent/ConsentManager.d.ts +73 -0
- package/packages/ndpr-toolkit/dist/components/consent/ConsentStorage.d.ts +41 -0
- package/packages/ndpr-toolkit/dist/components/dpia/DPIAQuestionnaire.d.ts +70 -0
- package/packages/ndpr-toolkit/dist/components/dpia/DPIAReport.d.ts +40 -0
- package/packages/ndpr-toolkit/dist/components/dpia/StepIndicator.d.ts +64 -0
- package/packages/ndpr-toolkit/dist/components/dsr/DSRDashboard.d.ts +58 -0
- package/packages/ndpr-toolkit/dist/components/dsr/DSRRequestForm.d.ts +74 -0
- package/packages/ndpr-toolkit/dist/components/dsr/DSRTracker.d.ts +56 -0
- package/packages/ndpr-toolkit/dist/components/policy/PolicyExporter.d.ts +65 -0
- package/packages/ndpr-toolkit/dist/components/policy/PolicyGenerator.d.ts +54 -0
- package/packages/ndpr-toolkit/dist/components/policy/PolicyPreview.d.ts +71 -0
- package/packages/ndpr-toolkit/dist/hooks/useBreach.d.ts +97 -0
- package/packages/ndpr-toolkit/dist/hooks/useConsent.d.ts +63 -0
- package/packages/ndpr-toolkit/dist/hooks/useDPIA.d.ts +92 -0
- package/packages/ndpr-toolkit/dist/hooks/useDSR.d.ts +72 -0
- package/packages/ndpr-toolkit/dist/hooks/usePrivacyPolicy.d.ts +87 -0
- package/packages/ndpr-toolkit/dist/index.d.ts +31 -0
- package/packages/ndpr-toolkit/dist/index.esm.js +2 -0
- package/packages/ndpr-toolkit/dist/index.esm.js.map +1 -0
- package/packages/ndpr-toolkit/dist/index.js +2 -0
- package/packages/ndpr-toolkit/dist/index.js.map +1 -0
- package/packages/ndpr-toolkit/dist/setupTests.d.ts +2 -0
- package/packages/ndpr-toolkit/dist/types/breach.d.ts +239 -0
- package/packages/ndpr-toolkit/dist/types/consent.d.ts +95 -0
- package/packages/ndpr-toolkit/dist/types/dpia.d.ts +196 -0
- package/packages/ndpr-toolkit/dist/types/dsr.d.ts +162 -0
- package/packages/ndpr-toolkit/dist/types/privacy.d.ts +204 -0
- package/packages/ndpr-toolkit/dist/utils/breach.d.ts +14 -0
- package/packages/ndpr-toolkit/dist/utils/consent.d.ts +10 -0
- package/packages/ndpr-toolkit/dist/utils/dpia.d.ts +12 -0
- package/packages/ndpr-toolkit/dist/utils/dsr.d.ts +11 -0
- package/packages/ndpr-toolkit/dist/utils/privacy.d.ts +12 -0
- package/src/components/consent/ConsentBanner.tsx +82 -48
- package/src/components/data-subject-rights/DataSubjectRequestForm.tsx +240 -129
- package/src/components/dpia/DPIAQuestionnaire.tsx +162 -122
- package/src/components/privacy-policy/PolicyGenerator.tsx +5 -5
- package/src/components/privacy-policy/steps/CustomSectionsStep.tsx +103 -77
- package/src/components/privacy-policy/steps/PolicyPreviewStep.tsx +117 -63
- package/src/hooks/useConsent.ts +16 -10
- package/src/lib/consentService.ts +44 -37
- package/src/lib/dpiaQuestions.ts +139 -99
- package/src/lib/requestService.ts +21 -17
- package/src/types/index.ts +13 -8
- package/.claude/settings.local.json +0 -20
- package/.eslintrc.json +0 -10
- package/.github/workflows/ci.yml +0 -36
- package/.github/workflows/nextjs.yml +0 -104
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -4
- package/.lintstagedrc.js +0 -4
- package/.nvmrc +0 -1
- package/.versionrc +0 -17
- package/CLAUDE.md +0 -90
- package/commitlint.config.js +0 -36
- package/jest.config.js +0 -31
- package/jest.setup.js +0 -15
- package/packages/ndpr-toolkit/jest.config.js +0 -23
- package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentBanner.test.tsx +0 -119
- package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentManager.test.tsx +0 -122
- package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentStorage.test.tsx +0 -270
- package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRDashboard.test.tsx +0 -199
- package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRRequestForm.test.tsx +0 -224
- package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRTracker.test.tsx +0 -104
- package/packages/ndpr-toolkit/src/__tests__/hooks/useConsent.test.tsx +0 -161
- package/packages/ndpr-toolkit/src/__tests__/hooks/useDSR.test.tsx +0 -330
- package/packages/ndpr-toolkit/src/__tests__/utils/breach.test.ts +0 -149
- package/packages/ndpr-toolkit/src/__tests__/utils/consent.test.ts +0 -88
- package/packages/ndpr-toolkit/src/__tests__/utils/dpia.test.ts +0 -160
- package/packages/ndpr-toolkit/src/__tests__/utils/dsr.test.ts +0 -110
- package/packages/ndpr-toolkit/src/__tests__/utils/privacy.test.ts +0 -97
- package/src/__tests__/example.test.ts +0 -13
- package/src/__tests__/requestService.test.ts +0 -57
- package/src/app/docs/components/DocLayout.tsx +0 -267
- package/src/app/docs/components/breach-notification/page.tsx +0 -797
- package/src/app/docs/components/consent-management/page.tsx +0 -576
- package/src/app/docs/components/data-subject-rights/page.tsx +0 -511
- package/src/app/docs/components/dpia-questionnaire/layout.tsx +0 -15
- package/src/app/docs/components/dpia-questionnaire/metadata.ts +0 -31
- package/src/app/docs/components/dpia-questionnaire/page.tsx +0 -666
- package/src/app/docs/components/hooks/page.tsx +0 -305
- package/src/app/docs/components/page.tsx +0 -84
- package/src/app/docs/components/privacy-policy-generator/page.tsx +0 -634
- package/src/app/docs/guides/breach-notification-process/components/BestPractices.tsx +0 -123
- package/src/app/docs/guides/breach-notification-process/components/ImplementationSteps.tsx +0 -328
- package/src/app/docs/guides/breach-notification-process/components/Introduction.tsx +0 -28
- package/src/app/docs/guides/breach-notification-process/components/NotificationTimeline.tsx +0 -91
- package/src/app/docs/guides/breach-notification-process/components/Resources.tsx +0 -118
- package/src/app/docs/guides/breach-notification-process/page.tsx +0 -39
- package/src/app/docs/guides/conducting-dpia/page.tsx +0 -593
- package/src/app/docs/guides/data-subject-requests/page.tsx +0 -666
- package/src/app/docs/guides/managing-consent/page.tsx +0 -738
- package/src/app/docs/guides/ndpr-compliance-checklist/components/ComplianceChecklist.tsx +0 -296
- package/src/app/docs/guides/ndpr-compliance-checklist/components/ImplementationTools.tsx +0 -145
- package/src/app/docs/guides/ndpr-compliance-checklist/components/Introduction.tsx +0 -33
- package/src/app/docs/guides/ndpr-compliance-checklist/components/KeyRequirements.tsx +0 -99
- package/src/app/docs/guides/ndpr-compliance-checklist/components/Resources.tsx +0 -159
- package/src/app/docs/guides/ndpr-compliance-checklist/page.tsx +0 -38
- package/src/app/docs/guides/page.tsx +0 -67
- package/src/app/docs/layout.tsx +0 -15
- package/src/app/docs/metadata.ts +0 -31
- package/src/app/docs/page.tsx +0 -572
- package/src/components/docs/DocLayout.tsx +0 -289
- package/src/components/docs/index.ts +0 -2
package/next-env.d.ts
ADDED
package/package.json
CHANGED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BreachReport, RiskAssessment, RegulatoryNotification } from '../../types/breach';
|
|
3
|
+
export interface BreachNotificationManagerProps {
|
|
4
|
+
/**
|
|
5
|
+
* List of breach reports to manage
|
|
6
|
+
*/
|
|
7
|
+
breachReports: BreachReport[];
|
|
8
|
+
/**
|
|
9
|
+
* List of risk assessments
|
|
10
|
+
*/
|
|
11
|
+
riskAssessments: RiskAssessment[];
|
|
12
|
+
/**
|
|
13
|
+
* List of regulatory notifications
|
|
14
|
+
*/
|
|
15
|
+
regulatoryNotifications: RegulatoryNotification[];
|
|
16
|
+
/**
|
|
17
|
+
* Callback function called when a breach is selected
|
|
18
|
+
*/
|
|
19
|
+
onSelectBreach?: (breachId: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Callback function called when a risk assessment is requested
|
|
22
|
+
*/
|
|
23
|
+
onRequestAssessment?: (breachId: string) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Callback function called when a notification is requested
|
|
26
|
+
*/
|
|
27
|
+
onRequestNotification?: (breachId: string) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Title displayed on the manager
|
|
30
|
+
* @default "Breach Notification Manager"
|
|
31
|
+
*/
|
|
32
|
+
title?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Description text displayed on the manager
|
|
35
|
+
* @default "Manage data breach notifications and track compliance with NDPR requirements."
|
|
36
|
+
*/
|
|
37
|
+
description?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Custom CSS class for the manager
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Custom CSS class for the buttons
|
|
44
|
+
*/
|
|
45
|
+
buttonClassName?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether to show the breach details
|
|
48
|
+
* @default true
|
|
49
|
+
*/
|
|
50
|
+
showBreachDetails?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether to show the notification timeline
|
|
53
|
+
* @default true
|
|
54
|
+
*/
|
|
55
|
+
showNotificationTimeline?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether to show the deadline alerts
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
showDeadlineAlerts?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare const BreachNotificationManager: React.FC<BreachNotificationManagerProps>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BreachCategory } from '../../types/breach';
|
|
3
|
+
export interface BreachReportFormProps {
|
|
4
|
+
/**
|
|
5
|
+
* Available breach categories
|
|
6
|
+
*/
|
|
7
|
+
categories: BreachCategory[];
|
|
8
|
+
/**
|
|
9
|
+
* Callback function called when form is submitted
|
|
10
|
+
*/
|
|
11
|
+
onSubmit: (formData: any) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Title displayed on the form
|
|
14
|
+
* @default "Report a Data Breach"
|
|
15
|
+
*/
|
|
16
|
+
title?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Description text displayed on the form
|
|
19
|
+
* @default "Use this form to report a suspected or confirmed data breach. All fields marked with * are required."
|
|
20
|
+
*/
|
|
21
|
+
formDescription?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Text for the submit button
|
|
24
|
+
* @default "Submit Report"
|
|
25
|
+
*/
|
|
26
|
+
submitButtonText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Custom CSS class for the form
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Custom CSS class for the submit button
|
|
33
|
+
*/
|
|
34
|
+
buttonClassName?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to show a confirmation message after submission
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
showConfirmation?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Confirmation message to display after submission
|
|
42
|
+
* @default "Your breach report has been submitted successfully. The data protection team has been notified."
|
|
43
|
+
*/
|
|
44
|
+
confirmationMessage?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to allow file attachments
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
allowAttachments?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Maximum number of attachments allowed
|
|
52
|
+
* @default 5
|
|
53
|
+
*/
|
|
54
|
+
maxAttachments?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Maximum file size for attachments (in bytes)
|
|
57
|
+
* @default 5242880 (5MB)
|
|
58
|
+
*/
|
|
59
|
+
maxFileSize?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Allowed file types for attachments
|
|
62
|
+
* @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
|
|
63
|
+
*/
|
|
64
|
+
allowedFileTypes?: string[];
|
|
65
|
+
}
|
|
66
|
+
export declare const BreachReportForm: React.FC<BreachReportFormProps>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BreachReport, RiskAssessment } from '../../types/breach';
|
|
3
|
+
export interface BreachRiskAssessmentProps {
|
|
4
|
+
/**
|
|
5
|
+
* The breach data to assess
|
|
6
|
+
*/
|
|
7
|
+
breachData: BreachReport;
|
|
8
|
+
/**
|
|
9
|
+
* Initial assessment data (if editing an existing assessment)
|
|
10
|
+
*/
|
|
11
|
+
initialAssessment?: Partial<RiskAssessment>;
|
|
12
|
+
/**
|
|
13
|
+
* Callback function called when assessment is completed
|
|
14
|
+
*/
|
|
15
|
+
onComplete: (assessment: RiskAssessment) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Title displayed on the assessment form
|
|
18
|
+
* @default "Breach Risk Assessment"
|
|
19
|
+
*/
|
|
20
|
+
title?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Description text displayed on the assessment form
|
|
23
|
+
* @default "Assess the risk level of this data breach to determine notification requirements."
|
|
24
|
+
*/
|
|
25
|
+
description?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Text for the submit button
|
|
28
|
+
* @default "Complete Assessment"
|
|
29
|
+
*/
|
|
30
|
+
submitButtonText?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Custom CSS class for the form
|
|
33
|
+
*/
|
|
34
|
+
className?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Custom CSS class for the submit button
|
|
37
|
+
*/
|
|
38
|
+
buttonClassName?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to show the breach summary
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
showBreachSummary?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Whether to show notification requirements after assessment
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
showNotificationRequirements?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export declare const BreachRiskAssessment: React.FC<BreachRiskAssessmentProps>;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BreachReport, RiskAssessment, RegulatoryNotification } from '../../types/breach';
|
|
3
|
+
export interface OrganizationInfo {
|
|
4
|
+
/**
|
|
5
|
+
* Name of the organization
|
|
6
|
+
*/
|
|
7
|
+
name: string;
|
|
8
|
+
/**
|
|
9
|
+
* Registration number or business ID
|
|
10
|
+
*/
|
|
11
|
+
registrationNumber?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Physical address of the organization
|
|
14
|
+
*/
|
|
15
|
+
address: string;
|
|
16
|
+
/**
|
|
17
|
+
* Website URL
|
|
18
|
+
*/
|
|
19
|
+
website?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Name of the Data Protection Officer
|
|
22
|
+
*/
|
|
23
|
+
dpoName: string;
|
|
24
|
+
/**
|
|
25
|
+
* Email of the Data Protection Officer
|
|
26
|
+
*/
|
|
27
|
+
dpoEmail: string;
|
|
28
|
+
/**
|
|
29
|
+
* Phone number of the Data Protection Officer
|
|
30
|
+
*/
|
|
31
|
+
dpoPhone?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface RegulatoryReportGeneratorProps {
|
|
34
|
+
/**
|
|
35
|
+
* The breach data to include in the report
|
|
36
|
+
*/
|
|
37
|
+
breachData: BreachReport;
|
|
38
|
+
/**
|
|
39
|
+
* The risk assessment data
|
|
40
|
+
*/
|
|
41
|
+
assessmentData?: RiskAssessment;
|
|
42
|
+
/**
|
|
43
|
+
* Organization information to include in the report
|
|
44
|
+
*/
|
|
45
|
+
organizationInfo: OrganizationInfo;
|
|
46
|
+
/**
|
|
47
|
+
* Callback function called when the report is generated
|
|
48
|
+
*/
|
|
49
|
+
onGenerate: (report: RegulatoryNotification) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Title displayed on the generator form
|
|
52
|
+
* @default "Generate NITDA Notification Report"
|
|
53
|
+
*/
|
|
54
|
+
title?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Description text displayed on the generator form
|
|
57
|
+
* @default "Generate a report for submission to NITDA in compliance with the NDPR breach notification requirements."
|
|
58
|
+
*/
|
|
59
|
+
description?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Text for the generate button
|
|
62
|
+
* @default "Generate Report"
|
|
63
|
+
*/
|
|
64
|
+
generateButtonText?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Custom CSS class for the form
|
|
67
|
+
*/
|
|
68
|
+
className?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Custom CSS class for the buttons
|
|
71
|
+
*/
|
|
72
|
+
buttonClassName?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Whether to show a preview of the generated report
|
|
75
|
+
* @default true
|
|
76
|
+
*/
|
|
77
|
+
showPreview?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Whether to allow editing the report content
|
|
80
|
+
* @default true
|
|
81
|
+
*/
|
|
82
|
+
allowEditing?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Whether to allow downloading the report
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
|
+
allowDownload?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Format for downloading the report
|
|
90
|
+
* @default "pdf"
|
|
91
|
+
*/
|
|
92
|
+
downloadFormat?: 'pdf' | 'docx' | 'html';
|
|
93
|
+
}
|
|
94
|
+
export declare const RegulatoryReportGenerator: React.FC<RegulatoryReportGeneratorProps>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConsentOption, ConsentSettings } from '../../types/consent';
|
|
3
|
+
export interface ConsentBannerProps {
|
|
4
|
+
/**
|
|
5
|
+
* Array of consent options to display
|
|
6
|
+
*/
|
|
7
|
+
options: ConsentOption[];
|
|
8
|
+
/**
|
|
9
|
+
* Callback function called when user saves their consent choices
|
|
10
|
+
*/
|
|
11
|
+
onSave: (settings: ConsentSettings) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Title displayed on the banner
|
|
14
|
+
* @default "We Value Your Privacy"
|
|
15
|
+
*/
|
|
16
|
+
title?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Description text displayed on the banner
|
|
19
|
+
* @default "We use cookies and similar technologies to provide our services and enhance your experience."
|
|
20
|
+
*/
|
|
21
|
+
description?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Text for the accept all button
|
|
24
|
+
* @default "Accept All"
|
|
25
|
+
*/
|
|
26
|
+
acceptAllButtonText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Text for the reject all button
|
|
29
|
+
* @default "Reject All"
|
|
30
|
+
*/
|
|
31
|
+
rejectAllButtonText?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Text for the customize button
|
|
34
|
+
* @default "Customize"
|
|
35
|
+
*/
|
|
36
|
+
customizeButtonText?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Text for the save button
|
|
39
|
+
* @default "Save Preferences"
|
|
40
|
+
*/
|
|
41
|
+
saveButtonText?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Position of the banner
|
|
44
|
+
* @default "bottom"
|
|
45
|
+
*/
|
|
46
|
+
position?: 'top' | 'bottom' | 'center';
|
|
47
|
+
/**
|
|
48
|
+
* Version of the consent form
|
|
49
|
+
* @default "1.0"
|
|
50
|
+
*/
|
|
51
|
+
version?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Whether to show the banner
|
|
54
|
+
* If not provided, the banner will be shown if no consent has been saved
|
|
55
|
+
*/
|
|
56
|
+
show?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Storage key for consent settings
|
|
59
|
+
* @default "ndpr_consent"
|
|
60
|
+
*/
|
|
61
|
+
storageKey?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Custom CSS class for the banner
|
|
64
|
+
*/
|
|
65
|
+
className?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Custom CSS class for the buttons
|
|
68
|
+
*/
|
|
69
|
+
buttonClassName?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Custom CSS class for the primary button
|
|
72
|
+
*/
|
|
73
|
+
primaryButtonClassName?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Custom CSS class for the secondary button
|
|
76
|
+
*/
|
|
77
|
+
secondaryButtonClassName?: string;
|
|
78
|
+
}
|
|
79
|
+
export declare const ConsentBanner: React.FC<ConsentBannerProps>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConsentOption, ConsentSettings } from '../../types/consent';
|
|
3
|
+
export interface ConsentManagerProps {
|
|
4
|
+
/**
|
|
5
|
+
* Array of consent options to display
|
|
6
|
+
*/
|
|
7
|
+
options: ConsentOption[];
|
|
8
|
+
/**
|
|
9
|
+
* Current consent settings
|
|
10
|
+
*/
|
|
11
|
+
settings?: ConsentSettings;
|
|
12
|
+
/**
|
|
13
|
+
* Callback function called when user saves their consent choices
|
|
14
|
+
*/
|
|
15
|
+
onSave: (settings: ConsentSettings) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Title displayed in the manager
|
|
18
|
+
* @default "Manage Your Privacy Settings"
|
|
19
|
+
*/
|
|
20
|
+
title?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Description text displayed in the manager
|
|
23
|
+
* @default "Update your consent preferences at any time. Required cookies cannot be disabled as they are necessary for the website to function."
|
|
24
|
+
*/
|
|
25
|
+
description?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Text for the save button
|
|
28
|
+
* @default "Save Preferences"
|
|
29
|
+
*/
|
|
30
|
+
saveButtonText?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Text for the reset button
|
|
33
|
+
* @default "Reset to Defaults"
|
|
34
|
+
*/
|
|
35
|
+
resetButtonText?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Version of the consent form
|
|
38
|
+
* @default "1.0"
|
|
39
|
+
*/
|
|
40
|
+
version?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Custom CSS class for the manager
|
|
43
|
+
*/
|
|
44
|
+
className?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Custom CSS class for the buttons
|
|
47
|
+
*/
|
|
48
|
+
buttonClassName?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Custom CSS class for the primary button
|
|
51
|
+
*/
|
|
52
|
+
primaryButtonClassName?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Custom CSS class for the secondary button
|
|
55
|
+
*/
|
|
56
|
+
secondaryButtonClassName?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Whether to show a success message after saving
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
showSuccessMessage?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Success message to display after saving
|
|
64
|
+
* @default "Your preferences have been saved."
|
|
65
|
+
*/
|
|
66
|
+
successMessage?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Duration to show the success message (in milliseconds)
|
|
69
|
+
* @default 3000
|
|
70
|
+
*/
|
|
71
|
+
successMessageDuration?: number;
|
|
72
|
+
}
|
|
73
|
+
export declare const ConsentManager: React.FC<ConsentManagerProps>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConsentSettings, ConsentStorageOptions } from '../../types/consent';
|
|
3
|
+
export interface ConsentStorageProps {
|
|
4
|
+
/**
|
|
5
|
+
* Current consent settings
|
|
6
|
+
*/
|
|
7
|
+
settings: ConsentSettings;
|
|
8
|
+
/**
|
|
9
|
+
* Storage options for consent settings
|
|
10
|
+
*/
|
|
11
|
+
storageOptions?: ConsentStorageOptions;
|
|
12
|
+
/**
|
|
13
|
+
* Callback function called when settings are loaded from storage
|
|
14
|
+
*/
|
|
15
|
+
onLoad?: (settings: ConsentSettings | null) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Callback function called when settings are saved to storage
|
|
18
|
+
*/
|
|
19
|
+
onSave?: (settings: ConsentSettings) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to automatically save settings to storage
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
autoSave?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to automatically load settings from storage on mount
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
autoLoad?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Children to render
|
|
32
|
+
* Can be either React nodes or a render prop function that receives storage methods
|
|
33
|
+
*/
|
|
34
|
+
children?: React.ReactNode | ((props: {
|
|
35
|
+
loadSettings: () => ConsentSettings | null;
|
|
36
|
+
saveSettings: (settings: ConsentSettings) => void;
|
|
37
|
+
clearSettings: () => void;
|
|
38
|
+
loaded: boolean;
|
|
39
|
+
}) => React.ReactNode);
|
|
40
|
+
}
|
|
41
|
+
export declare const ConsentStorage: ({ settings, storageOptions, onLoad, onSave, autoSave, autoLoad, children }: ConsentStorageProps) => React.ReactElement | null;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DPIASection } from '../../types/dpia';
|
|
3
|
+
export interface DPIAQuestionnaireProps {
|
|
4
|
+
/**
|
|
5
|
+
* Sections of the DPIA questionnaire
|
|
6
|
+
*/
|
|
7
|
+
sections: DPIASection[];
|
|
8
|
+
/**
|
|
9
|
+
* Current answers to the questionnaire
|
|
10
|
+
*/
|
|
11
|
+
answers: Record<string, any>;
|
|
12
|
+
/**
|
|
13
|
+
* Callback function called when an answer is updated
|
|
14
|
+
*/
|
|
15
|
+
onAnswerChange: (questionId: string, value: any) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Current section index
|
|
18
|
+
*/
|
|
19
|
+
currentSectionIndex: number;
|
|
20
|
+
/**
|
|
21
|
+
* Callback function called when user navigates to the next section
|
|
22
|
+
*/
|
|
23
|
+
onNextSection?: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Callback function called when user navigates to the previous section
|
|
26
|
+
*/
|
|
27
|
+
onPrevSection?: () => void;
|
|
28
|
+
/**
|
|
29
|
+
* Validation errors for the current section
|
|
30
|
+
*/
|
|
31
|
+
validationErrors?: Record<string, string>;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the questionnaire is in read-only mode
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
readOnly?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Custom CSS class for the questionnaire
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Custom CSS class for the buttons
|
|
43
|
+
*/
|
|
44
|
+
buttonClassName?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Text for the next button
|
|
47
|
+
* @default "Next"
|
|
48
|
+
*/
|
|
49
|
+
nextButtonText?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Text for the previous button
|
|
52
|
+
* @default "Previous"
|
|
53
|
+
*/
|
|
54
|
+
prevButtonText?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Text for the submit button (shown on the last section)
|
|
57
|
+
* @default "Submit"
|
|
58
|
+
*/
|
|
59
|
+
submitButtonText?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Whether to show a progress indicator
|
|
62
|
+
* @default true
|
|
63
|
+
*/
|
|
64
|
+
showProgress?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Current progress percentage (0-100)
|
|
67
|
+
*/
|
|
68
|
+
progress?: number;
|
|
69
|
+
}
|
|
70
|
+
export declare const DPIAQuestionnaire: React.FC<DPIAQuestionnaireProps>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DPIAResult, DPIASection } from '../../types/dpia';
|
|
3
|
+
export interface DPIAReportProps {
|
|
4
|
+
/**
|
|
5
|
+
* The DPIA result to display
|
|
6
|
+
*/
|
|
7
|
+
result: DPIAResult;
|
|
8
|
+
/**
|
|
9
|
+
* The sections of the DPIA questionnaire
|
|
10
|
+
*/
|
|
11
|
+
sections: DPIASection[];
|
|
12
|
+
/**
|
|
13
|
+
* Whether to show the full report or just a summary
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
showFullReport?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to allow printing the report
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
allowPrint?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to allow exporting the report as PDF
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
allowExport?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Callback function called when the report is exported
|
|
29
|
+
*/
|
|
30
|
+
onExport?: (format: 'pdf' | 'docx' | 'html') => void;
|
|
31
|
+
/**
|
|
32
|
+
* Custom CSS class for the report container
|
|
33
|
+
*/
|
|
34
|
+
className?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Custom CSS class for the buttons
|
|
37
|
+
*/
|
|
38
|
+
buttonClassName?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const DPIAReport: React.FC<DPIAReportProps>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Step {
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier for the step
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* Display label for the step
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Optional description for the step
|
|
13
|
+
*/
|
|
14
|
+
description?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the step is completed
|
|
17
|
+
*/
|
|
18
|
+
completed: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the step is the current active step
|
|
21
|
+
*/
|
|
22
|
+
active: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Optional icon for the step
|
|
25
|
+
*/
|
|
26
|
+
icon?: React.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
export interface StepIndicatorProps {
|
|
29
|
+
/**
|
|
30
|
+
* Array of steps to display
|
|
31
|
+
*/
|
|
32
|
+
steps: Step[];
|
|
33
|
+
/**
|
|
34
|
+
* Callback function called when a step is clicked
|
|
35
|
+
*/
|
|
36
|
+
onStepClick?: (stepId: string) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the steps are clickable
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
|
+
clickable?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Orientation of the step indicator
|
|
44
|
+
* @default "horizontal"
|
|
45
|
+
*/
|
|
46
|
+
orientation?: 'horizontal' | 'vertical';
|
|
47
|
+
/**
|
|
48
|
+
* Custom CSS class for the container
|
|
49
|
+
*/
|
|
50
|
+
className?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Custom CSS class for the active step
|
|
53
|
+
*/
|
|
54
|
+
activeStepClassName?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Custom CSS class for completed steps
|
|
57
|
+
*/
|
|
58
|
+
completedStepClassName?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Custom CSS class for incomplete steps
|
|
61
|
+
*/
|
|
62
|
+
incompleteStepClassName?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare const StepIndicator: React.FC<StepIndicatorProps>;
|