@tantainnovative/ndpr-toolkit 1.0.2 → 1.0.3
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/.claude/settings.local.json +20 -0
- package/.eslintrc.json +10 -0
- package/.github/workflows/ci.yml +36 -0
- package/.github/workflows/nextjs.yml +104 -0
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +4 -0
- package/.lintstagedrc.js +4 -0
- package/.nvmrc +1 -0
- package/.versionrc +17 -0
- package/CHANGELOG.md +16 -0
- package/CLAUDE.md +90 -0
- package/CNAME +1 -0
- package/CONTRIBUTING.md +87 -0
- package/README.md +84 -447
- package/RELEASE-NOTES-v1.0.0.md +140 -0
- package/RELEASE-NOTES-v1.0.1.md +69 -0
- package/SECURITY.md +21 -0
- package/commitlint.config.js +36 -0
- package/components.json +21 -0
- package/eslint.config.mjs +16 -0
- package/jest.config.js +31 -0
- package/jest.setup.js +15 -0
- package/next.config.js +15 -0
- package/next.config.ts +62 -0
- package/package.json +70 -52
- package/packages/ndpr-toolkit/README.md +467 -0
- package/packages/ndpr-toolkit/jest.config.js +23 -0
- package/packages/ndpr-toolkit/package-lock.json +8197 -0
- package/packages/ndpr-toolkit/package.json +71 -0
- package/packages/ndpr-toolkit/rollup.config.js +34 -0
- package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentBanner.test.tsx +119 -0
- package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentManager.test.tsx +122 -0
- package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentStorage.test.tsx +270 -0
- package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRDashboard.test.tsx +199 -0
- package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRRequestForm.test.tsx +224 -0
- package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRTracker.test.tsx +104 -0
- package/packages/ndpr-toolkit/src/__tests__/hooks/useConsent.test.tsx +161 -0
- package/packages/ndpr-toolkit/src/__tests__/hooks/useDSR.test.tsx +330 -0
- package/packages/ndpr-toolkit/src/__tests__/utils/breach.test.ts +149 -0
- package/packages/ndpr-toolkit/src/__tests__/utils/consent.test.ts +88 -0
- package/packages/ndpr-toolkit/src/__tests__/utils/dpia.test.ts +160 -0
- package/packages/ndpr-toolkit/src/__tests__/utils/dsr.test.ts +110 -0
- package/packages/ndpr-toolkit/src/__tests__/utils/privacy.test.ts +97 -0
- package/packages/ndpr-toolkit/src/components/breach/BreachNotificationManager.tsx +701 -0
- package/packages/ndpr-toolkit/src/components/breach/BreachReportForm.tsx +631 -0
- package/packages/ndpr-toolkit/src/components/breach/BreachRiskAssessment.tsx +569 -0
- package/packages/ndpr-toolkit/src/components/breach/RegulatoryReportGenerator.tsx +496 -0
- package/packages/ndpr-toolkit/src/components/consent/ConsentBanner.tsx +270 -0
- package/packages/ndpr-toolkit/src/components/consent/ConsentManager.tsx +217 -0
- package/packages/ndpr-toolkit/src/components/consent/ConsentStorage.tsx +206 -0
- package/packages/ndpr-toolkit/src/components/dpia/DPIAQuestionnaire.tsx +342 -0
- package/packages/ndpr-toolkit/src/components/dpia/DPIAReport.tsx +373 -0
- package/packages/ndpr-toolkit/src/components/dpia/StepIndicator.tsx +174 -0
- package/packages/ndpr-toolkit/src/components/dsr/DSRDashboard.tsx +717 -0
- package/packages/ndpr-toolkit/src/components/dsr/DSRRequestForm.tsx +476 -0
- package/packages/ndpr-toolkit/src/components/dsr/DSRTracker.tsx +620 -0
- package/packages/ndpr-toolkit/src/components/policy/PolicyExporter.tsx +541 -0
- package/packages/ndpr-toolkit/src/components/policy/PolicyGenerator.tsx +454 -0
- package/packages/ndpr-toolkit/src/components/policy/PolicyPreview.tsx +333 -0
- package/packages/ndpr-toolkit/src/hooks/useBreach.ts +409 -0
- package/packages/ndpr-toolkit/src/hooks/useConsent.ts +263 -0
- package/packages/ndpr-toolkit/src/hooks/useDPIA.ts +457 -0
- package/packages/ndpr-toolkit/src/hooks/useDSR.ts +236 -0
- package/packages/ndpr-toolkit/src/hooks/usePrivacyPolicy.ts +428 -0
- package/{dist/index.d.ts → packages/ndpr-toolkit/src/index.ts} +13 -0
- package/packages/ndpr-toolkit/src/setupTests.ts +5 -0
- package/packages/ndpr-toolkit/src/types/breach.ts +283 -0
- package/packages/ndpr-toolkit/src/types/consent.ts +111 -0
- package/packages/ndpr-toolkit/src/types/dpia.ts +236 -0
- package/packages/ndpr-toolkit/src/types/dsr.ts +192 -0
- package/packages/ndpr-toolkit/src/types/index.ts +42 -0
- package/packages/ndpr-toolkit/src/types/privacy.ts +246 -0
- package/packages/ndpr-toolkit/src/utils/breach.ts +122 -0
- package/packages/ndpr-toolkit/src/utils/consent.ts +51 -0
- package/packages/ndpr-toolkit/src/utils/dpia.ts +104 -0
- package/packages/ndpr-toolkit/src/utils/dsr.ts +77 -0
- package/packages/ndpr-toolkit/src/utils/privacy.ts +100 -0
- package/packages/ndpr-toolkit/tsconfig.json +23 -0
- package/postcss.config.mjs +5 -0
- package/public/NDPR TOOLKIT.svg +1 -0
- package/public/favicon/android-chrome-192x192.png +0 -0
- package/public/favicon/android-chrome-512x512.png +0 -0
- package/public/favicon/apple-touch-icon.png +0 -0
- package/public/favicon/favicon-16x16.png +0 -0
- package/public/favicon/favicon-32x32.png +0 -0
- package/public/favicon/site.webmanifest +1 -0
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/ndpr-toolkit-logo.svg +108 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
- package/src/__tests__/example.test.ts +13 -0
- package/src/__tests__/requestService.test.ts +57 -0
- package/src/app/accessibility.css +70 -0
- package/src/app/docs/components/DocLayout.tsx +267 -0
- package/src/app/docs/components/breach-notification/page.tsx +797 -0
- package/src/app/docs/components/consent-management/page.tsx +576 -0
- package/src/app/docs/components/data-subject-rights/page.tsx +511 -0
- package/src/app/docs/components/dpia-questionnaire/layout.tsx +15 -0
- package/src/app/docs/components/dpia-questionnaire/metadata.ts +31 -0
- package/src/app/docs/components/dpia-questionnaire/page.tsx +666 -0
- package/src/app/docs/components/hooks/page.tsx +305 -0
- package/src/app/docs/components/page.tsx +84 -0
- package/src/app/docs/components/privacy-policy-generator/page.tsx +634 -0
- package/src/app/docs/guides/breach-notification-process/components/BestPractices.tsx +123 -0
- package/src/app/docs/guides/breach-notification-process/components/ImplementationSteps.tsx +328 -0
- package/src/app/docs/guides/breach-notification-process/components/Introduction.tsx +28 -0
- package/src/app/docs/guides/breach-notification-process/components/NotificationTimeline.tsx +91 -0
- package/src/app/docs/guides/breach-notification-process/components/Resources.tsx +118 -0
- package/src/app/docs/guides/breach-notification-process/page.tsx +39 -0
- package/src/app/docs/guides/conducting-dpia/page.tsx +593 -0
- package/src/app/docs/guides/data-subject-requests/page.tsx +666 -0
- package/src/app/docs/guides/managing-consent/page.tsx +738 -0
- package/src/app/docs/guides/ndpr-compliance-checklist/components/ComplianceChecklist.tsx +296 -0
- package/src/app/docs/guides/ndpr-compliance-checklist/components/ImplementationTools.tsx +145 -0
- package/src/app/docs/guides/ndpr-compliance-checklist/components/Introduction.tsx +33 -0
- package/src/app/docs/guides/ndpr-compliance-checklist/components/KeyRequirements.tsx +99 -0
- package/src/app/docs/guides/ndpr-compliance-checklist/components/Resources.tsx +159 -0
- package/src/app/docs/guides/ndpr-compliance-checklist/page.tsx +38 -0
- package/src/app/docs/guides/page.tsx +67 -0
- package/src/app/docs/layout.tsx +15 -0
- package/src/app/docs/metadata.ts +31 -0
- package/src/app/docs/page.tsx +572 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +123 -0
- package/src/app/layout.tsx +37 -0
- package/src/app/ndpr-demos/breach/page.tsx +354 -0
- package/src/app/ndpr-demos/consent/page.tsx +366 -0
- package/src/app/ndpr-demos/dpia/page.tsx +495 -0
- package/src/app/ndpr-demos/dsr/page.tsx +280 -0
- package/src/app/ndpr-demos/page.tsx +73 -0
- package/src/app/ndpr-demos/policy/page.tsx +771 -0
- package/src/app/page.tsx +452 -0
- package/src/components/ErrorBoundary.tsx +90 -0
- package/src/components/breach-notification/BreachNotificationForm.tsx +479 -0
- package/src/components/consent/ConsentBanner.tsx +159 -0
- package/src/components/data-subject-rights/DataSubjectRequestForm.tsx +419 -0
- package/src/components/docs/DocLayout.tsx +289 -0
- package/src/components/docs/index.ts +2 -0
- package/src/components/dpia/DPIAQuestionnaire.tsx +483 -0
- package/src/components/privacy-policy/PolicyGenerator.tsx +1062 -0
- package/src/components/privacy-policy/data.ts +98 -0
- package/src/components/privacy-policy/shared/CheckboxField.tsx +38 -0
- package/src/components/privacy-policy/shared/CheckboxGroup.tsx +85 -0
- package/src/components/privacy-policy/shared/FormField.tsx +79 -0
- package/src/components/privacy-policy/shared/StepIndicator.tsx +86 -0
- package/src/components/privacy-policy/steps/CustomSectionsStep.tsx +335 -0
- package/src/components/privacy-policy/steps/DataCollectionStep.tsx +231 -0
- package/src/components/privacy-policy/steps/DataSharingStep.tsx +418 -0
- package/src/components/privacy-policy/steps/OrganizationInfoStep.tsx +202 -0
- package/src/components/privacy-policy/steps/PolicyPreviewStep.tsx +172 -0
- package/src/components/ui/Badge.tsx +46 -0
- package/src/components/ui/Button.tsx +59 -0
- package/src/components/ui/Card.tsx +92 -0
- package/src/components/ui/Checkbox.tsx +57 -0
- package/src/components/ui/FormField.tsx +50 -0
- package/src/components/ui/Input.tsx +38 -0
- package/src/components/ui/Loading.tsx +201 -0
- package/src/components/ui/Select.tsx +42 -0
- package/src/components/ui/TextArea.tsx +38 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/switch.tsx +31 -0
- package/src/components/ui/tabs.tsx +66 -0
- package/src/hooks/useConsent.ts +64 -0
- package/src/hooks/useLoadingState.ts +85 -0
- package/src/lib/consentService.ts +137 -0
- package/src/lib/dpiaQuestions.ts +148 -0
- package/src/lib/requestService.ts +75 -0
- package/src/lib/sanitize.ts +108 -0
- package/src/lib/storage.ts +222 -0
- package/src/lib/utils.ts +6 -0
- package/src/types/html-to-docx.d.ts +30 -0
- package/src/types/index.ts +72 -0
- package/tailwind.config.ts +65 -0
- package/tsconfig.json +41 -0
- package/dist/components/breach/BreachNotificationManager.d.ts +0 -62
- package/dist/components/breach/BreachReportForm.d.ts +0 -66
- package/dist/components/breach/BreachRiskAssessment.d.ts +0 -50
- package/dist/components/breach/RegulatoryReportGenerator.d.ts +0 -94
- package/dist/components/consent/ConsentBanner.d.ts +0 -79
- package/dist/components/consent/ConsentManager.d.ts +0 -73
- package/dist/components/consent/ConsentStorage.d.ts +0 -41
- package/dist/components/dpia/DPIAQuestionnaire.d.ts +0 -70
- package/dist/components/dpia/DPIAReport.d.ts +0 -40
- package/dist/components/dpia/StepIndicator.d.ts +0 -64
- package/dist/components/dsr/DSRDashboard.d.ts +0 -58
- package/dist/components/dsr/DSRRequestForm.d.ts +0 -74
- package/dist/components/dsr/DSRTracker.d.ts +0 -56
- package/dist/components/policy/PolicyExporter.d.ts +0 -65
- package/dist/components/policy/PolicyGenerator.d.ts +0 -54
- package/dist/components/policy/PolicyPreview.d.ts +0 -71
- package/dist/hooks/useBreach.d.ts +0 -97
- package/dist/hooks/useConsent.d.ts +0 -63
- package/dist/hooks/useDPIA.d.ts +0 -92
- package/dist/hooks/useDSR.d.ts +0 -72
- package/dist/hooks/usePrivacyPolicy.d.ts +0 -87
- package/dist/index.esm.js +0 -2
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/setupTests.d.ts +0 -2
- package/dist/types/breach.d.ts +0 -239
- package/dist/types/consent.d.ts +0 -95
- package/dist/types/dpia.d.ts +0 -196
- package/dist/types/dsr.d.ts +0 -162
- package/dist/types/privacy.d.ts +0 -204
- package/dist/utils/breach.d.ts +0 -14
- package/dist/utils/consent.d.ts +0 -10
- package/dist/utils/dpia.d.ts +0 -12
- package/dist/utils/dsr.d.ts +0 -11
- package/dist/utils/privacy.d.ts +0 -12
|
@@ -1,64 +0,0 @@
|
|
|
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>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DSRRequest, DSRStatus } from '../../types/dsr';
|
|
3
|
-
export interface DSRDashboardProps {
|
|
4
|
-
/**
|
|
5
|
-
* List of DSR requests to display
|
|
6
|
-
*/
|
|
7
|
-
requests: DSRRequest[];
|
|
8
|
-
/**
|
|
9
|
-
* Callback function called when a request is selected
|
|
10
|
-
*/
|
|
11
|
-
onSelectRequest?: (requestId: string) => void;
|
|
12
|
-
/**
|
|
13
|
-
* Callback function called when a request status is updated
|
|
14
|
-
*/
|
|
15
|
-
onUpdateStatus?: (requestId: string, status: DSRStatus) => void;
|
|
16
|
-
/**
|
|
17
|
-
* Callback function called when a request is assigned
|
|
18
|
-
*/
|
|
19
|
-
onAssignRequest?: (requestId: string, assignee: string) => void;
|
|
20
|
-
/**
|
|
21
|
-
* Title displayed on the dashboard
|
|
22
|
-
* @default "Data Subject Request Dashboard"
|
|
23
|
-
*/
|
|
24
|
-
title?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Description text displayed on the dashboard
|
|
27
|
-
* @default "Track and manage data subject requests in compliance with NDPR requirements."
|
|
28
|
-
*/
|
|
29
|
-
description?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Custom CSS class for the dashboard
|
|
32
|
-
*/
|
|
33
|
-
className?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Custom CSS class for the buttons
|
|
36
|
-
*/
|
|
37
|
-
buttonClassName?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Whether to show the request details
|
|
40
|
-
* @default true
|
|
41
|
-
*/
|
|
42
|
-
showRequestDetails?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether to show the request timeline
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
showRequestTimeline?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Whether to show the deadline alerts
|
|
50
|
-
* @default true
|
|
51
|
-
*/
|
|
52
|
-
showDeadlineAlerts?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* List of possible assignees
|
|
55
|
-
*/
|
|
56
|
-
assignees?: string[];
|
|
57
|
-
}
|
|
58
|
-
export declare const DSRDashboard: React.FC<DSRDashboardProps>;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RequestType } from '../../types/dsr';
|
|
3
|
-
export interface DSRRequestFormProps {
|
|
4
|
-
/**
|
|
5
|
-
* Array of request types that can be submitted
|
|
6
|
-
*/
|
|
7
|
-
requestTypes: RequestType[];
|
|
8
|
-
/**
|
|
9
|
-
* Callback function called when form is submitted
|
|
10
|
-
*/
|
|
11
|
-
onSubmit: (formData: any) => void;
|
|
12
|
-
/**
|
|
13
|
-
* Title displayed on the form
|
|
14
|
-
* @default "Submit a Data Subject Request"
|
|
15
|
-
*/
|
|
16
|
-
title?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Description text displayed on the form
|
|
19
|
-
* @default "Use this form to exercise your rights under the Nigeria Data Protection Regulation (NDPR)."
|
|
20
|
-
*/
|
|
21
|
-
description?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Text for the submit button
|
|
24
|
-
* @default "Submit Request"
|
|
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 request has been submitted successfully. You will receive a confirmation email shortly."
|
|
43
|
-
*/
|
|
44
|
-
confirmationMessage?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Whether to require identity verification
|
|
47
|
-
* @default true
|
|
48
|
-
*/
|
|
49
|
-
requireIdentityVerification?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Types of identifiers accepted for verification
|
|
52
|
-
* @default ["email", "account", "customer_id"]
|
|
53
|
-
*/
|
|
54
|
-
identifierTypes?: Array<{
|
|
55
|
-
id: string;
|
|
56
|
-
label: string;
|
|
57
|
-
}>;
|
|
58
|
-
/**
|
|
59
|
-
* Whether to collect additional contact information
|
|
60
|
-
* @default true
|
|
61
|
-
*/
|
|
62
|
-
collectAdditionalContact?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Custom labels for form fields
|
|
65
|
-
*/
|
|
66
|
-
labels?: {
|
|
67
|
-
name?: string;
|
|
68
|
-
email?: string;
|
|
69
|
-
requestType?: string;
|
|
70
|
-
description?: string;
|
|
71
|
-
submit?: string;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
export declare const DSRRequestForm: React.FC<DSRRequestFormProps>;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DSRRequest } from '../../types/dsr';
|
|
3
|
-
export interface DSRTrackerProps {
|
|
4
|
-
/**
|
|
5
|
-
* List of DSR requests to track
|
|
6
|
-
*/
|
|
7
|
-
requests: DSRRequest[];
|
|
8
|
-
/**
|
|
9
|
-
* Callback function called when a request is selected
|
|
10
|
-
*/
|
|
11
|
-
onSelectRequest?: (requestId: string) => void;
|
|
12
|
-
/**
|
|
13
|
-
* Title displayed on the tracker
|
|
14
|
-
* @default "DSR Request Tracker"
|
|
15
|
-
*/
|
|
16
|
-
title?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Description text displayed on the tracker
|
|
19
|
-
* @default "Track the status and progress of data subject requests."
|
|
20
|
-
*/
|
|
21
|
-
description?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Custom CSS class for the tracker
|
|
24
|
-
*/
|
|
25
|
-
className?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Custom CSS class for the buttons
|
|
28
|
-
*/
|
|
29
|
-
buttonClassName?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Whether to show the summary statistics
|
|
32
|
-
* @default true
|
|
33
|
-
*/
|
|
34
|
-
showSummaryStats?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Whether to show the request type breakdown
|
|
37
|
-
* @default true
|
|
38
|
-
*/
|
|
39
|
-
showTypeBreakdown?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Whether to show the status breakdown
|
|
42
|
-
* @default true
|
|
43
|
-
*/
|
|
44
|
-
showStatusBreakdown?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Whether to show the timeline chart
|
|
47
|
-
* @default true
|
|
48
|
-
*/
|
|
49
|
-
showTimelineChart?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Whether to show the overdue requests
|
|
52
|
-
* @default true
|
|
53
|
-
*/
|
|
54
|
-
showOverdueRequests?: boolean;
|
|
55
|
-
}
|
|
56
|
-
export declare const DSRTracker: React.FC<DSRTrackerProps>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface PolicyExporterProps {
|
|
3
|
-
/**
|
|
4
|
-
* The policy content to export
|
|
5
|
-
*/
|
|
6
|
-
content: string;
|
|
7
|
-
/**
|
|
8
|
-
* The policy title
|
|
9
|
-
*/
|
|
10
|
-
title?: string;
|
|
11
|
-
/**
|
|
12
|
-
* The organization name to include in the exported policy
|
|
13
|
-
*/
|
|
14
|
-
organizationName?: string;
|
|
15
|
-
/**
|
|
16
|
-
* The last updated date to include in the exported policy
|
|
17
|
-
*/
|
|
18
|
-
lastUpdated?: Date;
|
|
19
|
-
/**
|
|
20
|
-
* Callback function called when the export is complete
|
|
21
|
-
*/
|
|
22
|
-
onExportComplete?: (format: string, url: string) => void;
|
|
23
|
-
/**
|
|
24
|
-
* Title displayed on the exporter
|
|
25
|
-
* @default "Export Privacy Policy"
|
|
26
|
-
*/
|
|
27
|
-
componentTitle?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Description text displayed on the exporter
|
|
30
|
-
* @default "Export your NDPR-compliant privacy policy in various formats."
|
|
31
|
-
*/
|
|
32
|
-
description?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Custom CSS class for the exporter
|
|
35
|
-
*/
|
|
36
|
-
className?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Custom CSS class for the buttons
|
|
39
|
-
*/
|
|
40
|
-
buttonClassName?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Whether to show the export history
|
|
43
|
-
* @default true
|
|
44
|
-
*/
|
|
45
|
-
showExportHistory?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Whether to include the NDPR compliance notice in the exported policy
|
|
48
|
-
* @default true
|
|
49
|
-
*/
|
|
50
|
-
includeComplianceNotice?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Whether to include the organization logo in the exported policy
|
|
53
|
-
* @default false
|
|
54
|
-
*/
|
|
55
|
-
includeLogo?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* URL of the organization logo
|
|
58
|
-
*/
|
|
59
|
-
logoUrl?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Custom CSS styles for the exported policy
|
|
62
|
-
*/
|
|
63
|
-
customStyles?: string;
|
|
64
|
-
}
|
|
65
|
-
export declare const PolicyExporter: React.FC<PolicyExporterProps>;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PolicySection, PolicyVariable } from '../../types/privacy';
|
|
3
|
-
export interface PolicyGeneratorProps {
|
|
4
|
-
/**
|
|
5
|
-
* List of policy sections
|
|
6
|
-
*/
|
|
7
|
-
sections: PolicySection[];
|
|
8
|
-
/**
|
|
9
|
-
* List of policy variables
|
|
10
|
-
*/
|
|
11
|
-
variables: PolicyVariable[];
|
|
12
|
-
/**
|
|
13
|
-
* Callback function called when the policy is generated
|
|
14
|
-
*/
|
|
15
|
-
onGenerate: (policy: {
|
|
16
|
-
sections: PolicySection[];
|
|
17
|
-
variables: PolicyVariable[];
|
|
18
|
-
content: string;
|
|
19
|
-
}) => void;
|
|
20
|
-
/**
|
|
21
|
-
* Title displayed on the generator
|
|
22
|
-
* @default "NDPR Privacy Policy Generator"
|
|
23
|
-
*/
|
|
24
|
-
title?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Description text displayed on the generator
|
|
27
|
-
* @default "Generate an NDPR-compliant privacy policy for your organization."
|
|
28
|
-
*/
|
|
29
|
-
description?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Custom CSS class for the generator
|
|
32
|
-
*/
|
|
33
|
-
className?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Custom CSS class for the buttons
|
|
36
|
-
*/
|
|
37
|
-
buttonClassName?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Text for the generate button
|
|
40
|
-
* @default "Generate Policy"
|
|
41
|
-
*/
|
|
42
|
-
generateButtonText?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Whether to show a preview of the generated policy
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
showPreview?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Whether to allow editing the policy content
|
|
50
|
-
* @default true
|
|
51
|
-
*/
|
|
52
|
-
allowEditing?: boolean;
|
|
53
|
-
}
|
|
54
|
-
export declare const PolicyGenerator: React.FC<PolicyGeneratorProps>;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PolicySection, PolicyVariable } from '../../types/privacy';
|
|
3
|
-
export interface PolicyPreviewProps {
|
|
4
|
-
/**
|
|
5
|
-
* The policy content to preview
|
|
6
|
-
*/
|
|
7
|
-
content: string;
|
|
8
|
-
/**
|
|
9
|
-
* The policy sections
|
|
10
|
-
*/
|
|
11
|
-
sections?: PolicySection[];
|
|
12
|
-
/**
|
|
13
|
-
* The policy variables
|
|
14
|
-
*/
|
|
15
|
-
variables?: PolicyVariable[];
|
|
16
|
-
/**
|
|
17
|
-
* Callback function called when the policy is exported
|
|
18
|
-
*/
|
|
19
|
-
onExport?: (format: 'pdf' | 'html' | 'markdown' | 'docx') => void;
|
|
20
|
-
/**
|
|
21
|
-
* Callback function called when the policy is edited
|
|
22
|
-
*/
|
|
23
|
-
onEdit?: () => void;
|
|
24
|
-
/**
|
|
25
|
-
* Title displayed on the preview
|
|
26
|
-
* @default "Privacy Policy Preview"
|
|
27
|
-
*/
|
|
28
|
-
title?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Description text displayed on the preview
|
|
31
|
-
* @default "Preview your NDPR-compliant privacy policy before exporting."
|
|
32
|
-
*/
|
|
33
|
-
description?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Custom CSS class for the preview
|
|
36
|
-
*/
|
|
37
|
-
className?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Custom CSS class for the buttons
|
|
40
|
-
*/
|
|
41
|
-
buttonClassName?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Whether to show the export options
|
|
44
|
-
* @default true
|
|
45
|
-
*/
|
|
46
|
-
showExportOptions?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to show the edit button
|
|
49
|
-
* @default true
|
|
50
|
-
*/
|
|
51
|
-
showEditButton?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Whether to show the table of contents
|
|
54
|
-
* @default true
|
|
55
|
-
*/
|
|
56
|
-
showTableOfContents?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Whether to show the policy metadata
|
|
59
|
-
* @default true
|
|
60
|
-
*/
|
|
61
|
-
showMetadata?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* The organization name to display in the policy
|
|
64
|
-
*/
|
|
65
|
-
organizationName?: string;
|
|
66
|
-
/**
|
|
67
|
-
* The last updated date to display in the policy
|
|
68
|
-
*/
|
|
69
|
-
lastUpdated?: Date;
|
|
70
|
-
}
|
|
71
|
-
export declare const PolicyPreview: React.FC<PolicyPreviewProps>;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { BreachReport, BreachCategory, RiskAssessment, NotificationRequirement, RegulatoryNotification } from '../types/breach';
|
|
2
|
-
interface UseBreachOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Available breach categories
|
|
5
|
-
*/
|
|
6
|
-
categories: BreachCategory[];
|
|
7
|
-
/**
|
|
8
|
-
* Initial breach reports
|
|
9
|
-
*/
|
|
10
|
-
initialReports?: BreachReport[];
|
|
11
|
-
/**
|
|
12
|
-
* Storage key for breach data
|
|
13
|
-
* @default "ndpr_breach_data"
|
|
14
|
-
*/
|
|
15
|
-
storageKey?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Whether to use local storage to persist breach data
|
|
18
|
-
* @default true
|
|
19
|
-
*/
|
|
20
|
-
useLocalStorage?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Callback function called when a breach is reported
|
|
23
|
-
*/
|
|
24
|
-
onReport?: (report: BreachReport) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Callback function called when a risk assessment is completed
|
|
27
|
-
*/
|
|
28
|
-
onAssessment?: (assessment: RiskAssessment) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Callback function called when a notification is sent
|
|
31
|
-
*/
|
|
32
|
-
onNotification?: (notification: RegulatoryNotification) => void;
|
|
33
|
-
}
|
|
34
|
-
interface UseBreachReturn {
|
|
35
|
-
/**
|
|
36
|
-
* All breach reports
|
|
37
|
-
*/
|
|
38
|
-
reports: BreachReport[];
|
|
39
|
-
/**
|
|
40
|
-
* All risk assessments
|
|
41
|
-
*/
|
|
42
|
-
assessments: RiskAssessment[];
|
|
43
|
-
/**
|
|
44
|
-
* All regulatory notifications
|
|
45
|
-
*/
|
|
46
|
-
notifications: RegulatoryNotification[];
|
|
47
|
-
/**
|
|
48
|
-
* Submit a new breach report
|
|
49
|
-
*/
|
|
50
|
-
reportBreach: (reportData: Omit<BreachReport, 'id' | 'reportedAt'>) => BreachReport;
|
|
51
|
-
/**
|
|
52
|
-
* Update an existing breach report
|
|
53
|
-
*/
|
|
54
|
-
updateReport: (id: string, updates: Partial<BreachReport>) => BreachReport | null;
|
|
55
|
-
/**
|
|
56
|
-
* Get a breach report by ID
|
|
57
|
-
*/
|
|
58
|
-
getReport: (id: string) => BreachReport | null;
|
|
59
|
-
/**
|
|
60
|
-
* Conduct a risk assessment for a breach
|
|
61
|
-
*/
|
|
62
|
-
assessRisk: (breachId: string, assessmentData: Omit<RiskAssessment, 'id' | 'breachId' | 'assessedAt'>) => RiskAssessment;
|
|
63
|
-
/**
|
|
64
|
-
* Get a risk assessment for a breach
|
|
65
|
-
*/
|
|
66
|
-
getAssessment: (breachId: string) => RiskAssessment | null;
|
|
67
|
-
/**
|
|
68
|
-
* Calculate notification requirements based on a risk assessment
|
|
69
|
-
*/
|
|
70
|
-
calculateNotificationRequirements: (breachId: string) => NotificationRequirement | null;
|
|
71
|
-
/**
|
|
72
|
-
* Send a regulatory notification
|
|
73
|
-
*/
|
|
74
|
-
sendNotification: (breachId: string, notificationData: Omit<RegulatoryNotification, 'id' | 'breachId' | 'sentAt'>) => RegulatoryNotification;
|
|
75
|
-
/**
|
|
76
|
-
* Get a regulatory notification for a breach
|
|
77
|
-
*/
|
|
78
|
-
getNotification: (breachId: string) => RegulatoryNotification | null;
|
|
79
|
-
/**
|
|
80
|
-
* Get breaches that require notification within the next X hours
|
|
81
|
-
*/
|
|
82
|
-
getBreachesRequiringNotification: (hoursThreshold?: number) => Array<{
|
|
83
|
-
report: BreachReport;
|
|
84
|
-
assessment: RiskAssessment;
|
|
85
|
-
requirements: NotificationRequirement;
|
|
86
|
-
hoursRemaining: number;
|
|
87
|
-
}>;
|
|
88
|
-
/**
|
|
89
|
-
* Clear all breach data
|
|
90
|
-
*/
|
|
91
|
-
clearBreachData: () => void;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Hook for managing data breach notifications in compliance with NDPR
|
|
95
|
-
*/
|
|
96
|
-
export declare function useBreach({ categories, initialReports, storageKey, useLocalStorage, onReport, onAssessment, onNotification }: UseBreachOptions): UseBreachReturn;
|
|
97
|
-
export {};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ConsentOption, ConsentSettings, ConsentStorageOptions } from '../types/consent';
|
|
2
|
-
interface UseConsentOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Consent options to present to the user
|
|
5
|
-
*/
|
|
6
|
-
options: ConsentOption[];
|
|
7
|
-
/**
|
|
8
|
-
* Storage options for consent settings
|
|
9
|
-
*/
|
|
10
|
-
storageOptions?: ConsentStorageOptions;
|
|
11
|
-
/**
|
|
12
|
-
* Version of the consent form
|
|
13
|
-
* @default "1.0"
|
|
14
|
-
*/
|
|
15
|
-
version?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Callback function called when consent settings change
|
|
18
|
-
*/
|
|
19
|
-
onChange?: (settings: ConsentSettings) => void;
|
|
20
|
-
}
|
|
21
|
-
interface UseConsentReturn {
|
|
22
|
-
/**
|
|
23
|
-
* Current consent settings
|
|
24
|
-
*/
|
|
25
|
-
settings: ConsentSettings | null;
|
|
26
|
-
/**
|
|
27
|
-
* Whether consent has been given for a specific option
|
|
28
|
-
*/
|
|
29
|
-
hasConsent: (optionId: string) => boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Update consent settings
|
|
32
|
-
*/
|
|
33
|
-
updateConsent: (consents: Record<string, boolean>) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Accept all consent options
|
|
36
|
-
*/
|
|
37
|
-
acceptAll: () => void;
|
|
38
|
-
/**
|
|
39
|
-
* Reject all non-required consent options
|
|
40
|
-
*/
|
|
41
|
-
rejectAll: () => void;
|
|
42
|
-
/**
|
|
43
|
-
* Whether the consent banner should be shown
|
|
44
|
-
*/
|
|
45
|
-
shouldShowBanner: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Whether consent settings are valid
|
|
48
|
-
*/
|
|
49
|
-
isValid: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Validation errors (if any)
|
|
52
|
-
*/
|
|
53
|
-
validationErrors: string[];
|
|
54
|
-
/**
|
|
55
|
-
* Reset consent settings (clear from storage)
|
|
56
|
-
*/
|
|
57
|
-
resetConsent: () => void;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Hook for managing user consent in compliance with NDPR
|
|
61
|
-
*/
|
|
62
|
-
export declare function useConsent({ options, storageOptions, version, onChange }: UseConsentOptions): UseConsentReturn;
|
|
63
|
-
export {};
|
package/dist/hooks/useDPIA.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { DPIAQuestion, DPIASection, DPIAResult } from '../types/dpia';
|
|
2
|
-
interface UseDPIAOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Sections of the DPIA questionnaire
|
|
5
|
-
*/
|
|
6
|
-
sections: DPIASection[];
|
|
7
|
-
/**
|
|
8
|
-
* Initial answers (if resuming a DPIA)
|
|
9
|
-
*/
|
|
10
|
-
initialAnswers?: Record<string, any>;
|
|
11
|
-
/**
|
|
12
|
-
* Storage key for DPIA data
|
|
13
|
-
* @default "ndpr_dpia_data"
|
|
14
|
-
*/
|
|
15
|
-
storageKey?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Whether to use local storage to persist DPIA data
|
|
18
|
-
* @default true
|
|
19
|
-
*/
|
|
20
|
-
useLocalStorage?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Callback function called when the DPIA is completed
|
|
23
|
-
*/
|
|
24
|
-
onComplete?: (result: DPIAResult) => void;
|
|
25
|
-
}
|
|
26
|
-
interface UseDPIAReturn {
|
|
27
|
-
/**
|
|
28
|
-
* Current section index
|
|
29
|
-
*/
|
|
30
|
-
currentSectionIndex: number;
|
|
31
|
-
/**
|
|
32
|
-
* Current section
|
|
33
|
-
*/
|
|
34
|
-
currentSection: DPIASection | null;
|
|
35
|
-
/**
|
|
36
|
-
* All answers
|
|
37
|
-
*/
|
|
38
|
-
answers: Record<string, any>;
|
|
39
|
-
/**
|
|
40
|
-
* Update an answer
|
|
41
|
-
*/
|
|
42
|
-
updateAnswer: (questionId: string, value: any) => void;
|
|
43
|
-
/**
|
|
44
|
-
* Go to the next section
|
|
45
|
-
*/
|
|
46
|
-
nextSection: () => boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Go to the previous section
|
|
49
|
-
*/
|
|
50
|
-
prevSection: () => boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Go to a specific section
|
|
53
|
-
*/
|
|
54
|
-
goToSection: (index: number) => boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Check if the current section is valid
|
|
57
|
-
*/
|
|
58
|
-
isCurrentSectionValid: () => boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Get validation errors for the current section
|
|
61
|
-
*/
|
|
62
|
-
getCurrentSectionErrors: () => Record<string, string>;
|
|
63
|
-
/**
|
|
64
|
-
* Check if the DPIA is complete
|
|
65
|
-
*/
|
|
66
|
-
isComplete: () => boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Complete the DPIA and generate a result
|
|
69
|
-
*/
|
|
70
|
-
completeDPIA: (assessorInfo: {
|
|
71
|
-
name: string;
|
|
72
|
-
role: string;
|
|
73
|
-
email: string;
|
|
74
|
-
}, title: string, processingDescription: string) => DPIAResult;
|
|
75
|
-
/**
|
|
76
|
-
* Get the visible questions for the current section
|
|
77
|
-
*/
|
|
78
|
-
getVisibleQuestions: () => DPIAQuestion[];
|
|
79
|
-
/**
|
|
80
|
-
* Reset the DPIA
|
|
81
|
-
*/
|
|
82
|
-
resetDPIA: () => void;
|
|
83
|
-
/**
|
|
84
|
-
* Progress percentage
|
|
85
|
-
*/
|
|
86
|
-
progress: number;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Hook for conducting Data Protection Impact Assessments in compliance with NDPR
|
|
90
|
-
*/
|
|
91
|
-
export declare function useDPIA({ sections, initialAnswers, storageKey, useLocalStorage, onComplete }: UseDPIAOptions): UseDPIAReturn;
|
|
92
|
-
export {};
|