@tantainnovative/ndpr-toolkit 1.0.5 → 1.0.6
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 +447 -84
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +35 -0
- package/package.json +52 -70
- package/CHANGELOG.md +0 -16
- package/CNAME +0 -1
- package/CONTRIBUTING.md +0 -87
- package/RELEASE-NOTES-v1.0.0.md +0 -140
- package/RELEASE-NOTES-v1.0.1.md +0 -69
- package/SECURITY.md +0 -21
- package/components.json +0 -21
- package/eslint.config.mjs +0 -16
- package/next-env.d.ts +0 -5
- package/next.config.js +0 -15
- package/next.config.ts +0 -62
- package/packages/ndpr-toolkit/README.md +0 -467
- package/packages/ndpr-toolkit/dist/index.esm.js +0 -2
- package/packages/ndpr-toolkit/dist/index.esm.js.map +0 -1
- package/packages/ndpr-toolkit/dist/index.js +0 -2
- package/packages/ndpr-toolkit/dist/index.js.map +0 -1
- package/packages/ndpr-toolkit/package-lock.json +0 -8197
- package/packages/ndpr-toolkit/package.json +0 -71
- package/packages/ndpr-toolkit/rollup.config.js +0 -34
- package/packages/ndpr-toolkit/src/components/breach/BreachNotificationManager.tsx +0 -701
- package/packages/ndpr-toolkit/src/components/breach/BreachReportForm.tsx +0 -631
- package/packages/ndpr-toolkit/src/components/breach/BreachRiskAssessment.tsx +0 -569
- package/packages/ndpr-toolkit/src/components/breach/RegulatoryReportGenerator.tsx +0 -496
- package/packages/ndpr-toolkit/src/components/consent/ConsentBanner.tsx +0 -270
- package/packages/ndpr-toolkit/src/components/consent/ConsentManager.tsx +0 -217
- package/packages/ndpr-toolkit/src/components/consent/ConsentStorage.tsx +0 -206
- package/packages/ndpr-toolkit/src/components/dpia/DPIAQuestionnaire.tsx +0 -342
- package/packages/ndpr-toolkit/src/components/dpia/DPIAReport.tsx +0 -373
- package/packages/ndpr-toolkit/src/components/dpia/StepIndicator.tsx +0 -174
- package/packages/ndpr-toolkit/src/components/dsr/DSRDashboard.tsx +0 -717
- package/packages/ndpr-toolkit/src/components/dsr/DSRRequestForm.tsx +0 -476
- package/packages/ndpr-toolkit/src/components/dsr/DSRTracker.tsx +0 -620
- package/packages/ndpr-toolkit/src/components/policy/PolicyExporter.tsx +0 -541
- package/packages/ndpr-toolkit/src/components/policy/PolicyGenerator.tsx +0 -454
- package/packages/ndpr-toolkit/src/components/policy/PolicyPreview.tsx +0 -333
- package/packages/ndpr-toolkit/src/hooks/useBreach.ts +0 -409
- package/packages/ndpr-toolkit/src/hooks/useConsent.ts +0 -263
- package/packages/ndpr-toolkit/src/hooks/useDPIA.ts +0 -457
- package/packages/ndpr-toolkit/src/hooks/useDSR.ts +0 -236
- package/packages/ndpr-toolkit/src/hooks/usePrivacyPolicy.ts +0 -428
- package/packages/ndpr-toolkit/src/index.ts +0 -44
- package/packages/ndpr-toolkit/src/setupTests.ts +0 -5
- package/packages/ndpr-toolkit/src/types/breach.ts +0 -283
- package/packages/ndpr-toolkit/src/types/consent.ts +0 -111
- package/packages/ndpr-toolkit/src/types/dpia.ts +0 -236
- package/packages/ndpr-toolkit/src/types/dsr.ts +0 -192
- package/packages/ndpr-toolkit/src/types/index.ts +0 -42
- package/packages/ndpr-toolkit/src/types/privacy.ts +0 -246
- package/packages/ndpr-toolkit/src/utils/breach.ts +0 -122
- package/packages/ndpr-toolkit/src/utils/consent.ts +0 -51
- package/packages/ndpr-toolkit/src/utils/dpia.ts +0 -104
- package/packages/ndpr-toolkit/src/utils/dsr.ts +0 -77
- package/packages/ndpr-toolkit/src/utils/privacy.ts +0 -100
- package/packages/ndpr-toolkit/tsconfig.json +0 -23
- package/postcss.config.mjs +0 -5
- package/public/NDPR TOOLKIT.svg +0 -1
- 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 +0 -1
- package/public/file.svg +0 -1
- package/public/globe.svg +0 -1
- package/public/ndpr-toolkit-logo.svg +0 -108
- package/public/next.svg +0 -1
- package/public/vercel.svg +0 -1
- package/public/window.svg +0 -1
- package/src/app/accessibility.css +0 -70
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +0 -123
- package/src/app/layout.tsx +0 -37
- package/src/app/ndpr-demos/breach/page.tsx +0 -354
- package/src/app/ndpr-demos/consent/page.tsx +0 -366
- package/src/app/ndpr-demos/dpia/page.tsx +0 -495
- package/src/app/ndpr-demos/dsr/page.tsx +0 -280
- package/src/app/ndpr-demos/page.tsx +0 -73
- package/src/app/ndpr-demos/policy/page.tsx +0 -771
- package/src/app/page.tsx +0 -452
- package/src/components/ErrorBoundary.tsx +0 -90
- package/src/components/breach-notification/BreachNotificationForm.tsx +0 -479
- package/src/components/consent/ConsentBanner.tsx +0 -193
- package/src/components/data-subject-rights/DataSubjectRequestForm.tsx +0 -530
- package/src/components/dpia/DPIAQuestionnaire.tsx +0 -523
- package/src/components/privacy-policy/PolicyGenerator.tsx +0 -1062
- package/src/components/privacy-policy/data.ts +0 -98
- package/src/components/privacy-policy/shared/CheckboxField.tsx +0 -38
- package/src/components/privacy-policy/shared/CheckboxGroup.tsx +0 -85
- package/src/components/privacy-policy/shared/FormField.tsx +0 -79
- package/src/components/privacy-policy/shared/StepIndicator.tsx +0 -86
- package/src/components/privacy-policy/steps/CustomSectionsStep.tsx +0 -361
- package/src/components/privacy-policy/steps/DataCollectionStep.tsx +0 -231
- package/src/components/privacy-policy/steps/DataSharingStep.tsx +0 -418
- package/src/components/privacy-policy/steps/OrganizationInfoStep.tsx +0 -202
- package/src/components/privacy-policy/steps/PolicyPreviewStep.tsx +0 -226
- package/src/components/ui/Badge.tsx +0 -46
- package/src/components/ui/Button.tsx +0 -59
- package/src/components/ui/Card.tsx +0 -92
- package/src/components/ui/Checkbox.tsx +0 -57
- package/src/components/ui/FormField.tsx +0 -50
- package/src/components/ui/Input.tsx +0 -38
- package/src/components/ui/Loading.tsx +0 -201
- package/src/components/ui/Select.tsx +0 -42
- package/src/components/ui/TextArea.tsx +0 -38
- package/src/components/ui/label.tsx +0 -24
- package/src/components/ui/switch.tsx +0 -31
- package/src/components/ui/tabs.tsx +0 -66
- package/src/hooks/useConsent.ts +0 -70
- package/src/hooks/useLoadingState.ts +0 -85
- package/src/lib/consentService.ts +0 -144
- package/src/lib/dpiaQuestions.ts +0 -188
- package/src/lib/requestService.ts +0 -79
- package/src/lib/sanitize.ts +0 -108
- package/src/lib/storage.ts +0 -222
- package/src/lib/utils.ts +0 -6
- package/src/types/html-to-docx.d.ts +0 -30
- package/src/types/index.ts +0 -77
- package/tailwind.config.ts +0 -65
- package/tsconfig.json +0 -41
- /package/{packages/ndpr-toolkit/dist → dist}/components/breach/BreachNotificationManager.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/breach/BreachReportForm.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/breach/BreachRiskAssessment.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/breach/RegulatoryReportGenerator.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/consent/ConsentBanner.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/consent/ConsentManager.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/consent/ConsentStorage.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/dpia/DPIAQuestionnaire.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/dpia/DPIAReport.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/dpia/StepIndicator.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/dsr/DSRDashboard.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/dsr/DSRRequestForm.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/dsr/DSRTracker.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/policy/PolicyExporter.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/policy/PolicyGenerator.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/components/policy/PolicyPreview.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/hooks/useBreach.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/hooks/useConsent.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/hooks/useDPIA.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/hooks/useDSR.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/hooks/usePrivacyPolicy.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/index.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/setupTests.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/types/breach.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/types/consent.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/types/dpia.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/types/dsr.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/types/privacy.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/utils/breach.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/utils/consent.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/utils/dpia.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/utils/dsr.d.ts +0 -0
- /package/{packages/ndpr-toolkit/dist → dist}/utils/privacy.d.ts +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export * from './consent';
|
|
2
|
+
export * from './dsr';
|
|
3
|
+
export * from './dpia';
|
|
4
|
+
export * from './breach';
|
|
5
|
+
export * from './privacy';
|
|
6
|
+
export interface NDPRConfig {
|
|
7
|
+
organizationName: string;
|
|
8
|
+
organizationContact: string;
|
|
9
|
+
defaultLanguage?: string;
|
|
10
|
+
enableAnalytics?: boolean;
|
|
11
|
+
consentOptions?: {
|
|
12
|
+
position?: 'top' | 'bottom' | 'center';
|
|
13
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface ErrorResponse {
|
|
17
|
+
error: string;
|
|
18
|
+
message: string;
|
|
19
|
+
details?: Record<string, any>;
|
|
20
|
+
timestamp: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ValidationError {
|
|
23
|
+
field: string;
|
|
24
|
+
message: string;
|
|
25
|
+
code?: string;
|
|
26
|
+
}
|
|
27
|
+
export type EventHandler<T = void> = (data: T) => void | Promise<void>;
|
|
28
|
+
export interface PaginatedResponse<T> {
|
|
29
|
+
data: T[];
|
|
30
|
+
total: number;
|
|
31
|
+
page: number;
|
|
32
|
+
pageSize: number;
|
|
33
|
+
hasNext: boolean;
|
|
34
|
+
hasPrevious: boolean;
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,89 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tantainnovative/ndpr-toolkit",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "A comprehensive toolkit for implementing NDPR-compliant features in web applications",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
6
11
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"lint": "
|
|
11
|
-
"
|
|
12
|
-
"prepare": "husky install",
|
|
13
|
-
"export": "next export",
|
|
14
|
-
"build:static": "next build",
|
|
15
|
-
"deploy": "next build && touch out/.nojekyll && gh-pages -d out",
|
|
16
|
-
"release": "standard-version",
|
|
17
|
-
"release:minor": "standard-version --release-as minor",
|
|
18
|
-
"release:major": "standard-version --release-as major",
|
|
19
|
-
"release:patch": "standard-version --release-as patch"
|
|
12
|
+
"build": "rollup -c",
|
|
13
|
+
"dev": "rollup -c -w",
|
|
14
|
+
"test": "jest",
|
|
15
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
16
|
+
"prepublishOnly": "npm run build"
|
|
20
17
|
},
|
|
21
18
|
"keywords": [
|
|
22
19
|
"ndpr",
|
|
23
|
-
"dpa",
|
|
24
|
-
"nigeria",
|
|
25
20
|
"data-protection",
|
|
26
|
-
"compliance",
|
|
27
21
|
"privacy",
|
|
28
|
-
"
|
|
22
|
+
"compliance",
|
|
23
|
+
"nigeria",
|
|
24
|
+
"consent",
|
|
25
|
+
"dpia",
|
|
26
|
+
"data-subject-rights",
|
|
27
|
+
"breach-notification"
|
|
29
28
|
],
|
|
30
29
|
"author": "Tanta Innovative",
|
|
31
30
|
"license": "MIT",
|
|
32
31
|
"repository": {
|
|
33
32
|
"type": "git",
|
|
34
|
-
"url": "
|
|
33
|
+
"url": "https://github.com/tantainnovative/ndpr-toolkit"
|
|
35
34
|
},
|
|
36
|
-
"
|
|
37
|
-
"
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
38
37
|
},
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
"@radix-ui/react-slot": "^1.2.0",
|
|
43
|
-
"@radix-ui/react-switch": "^1.2.2",
|
|
44
|
-
"@radix-ui/react-tabs": "^1.1.9",
|
|
45
|
-
"@tantainnovative/ndpr-toolkit": "^1.0.1",
|
|
46
|
-
"class-variance-authority": "^0.7.1",
|
|
47
|
-
"clsx": "^2.1.1",
|
|
48
|
-
"docx": "^9.4.1",
|
|
49
|
-
"gray-matter": "^4.0.3",
|
|
50
|
-
"html-to-docx": "^1.8.0",
|
|
51
|
-
"jspdf": "^3.0.1",
|
|
52
|
-
"jspdf-autotable": "^5.0.2",
|
|
53
|
-
"lucide-react": "^0.507.0",
|
|
54
|
-
"next": "15.3.1",
|
|
55
|
-
"next-mdx-remote": "^5.0.0",
|
|
56
|
-
"nextra": "^4.2.17",
|
|
57
|
-
"nextra-theme-docs": "^4.2.17",
|
|
58
|
-
"react": "^19.0.0",
|
|
59
|
-
"react-dom": "^19.0.0",
|
|
60
|
-
"react-markdown": "^10.1.0",
|
|
61
|
-
"tailwind-merge": "^2.6.0",
|
|
62
|
-
"uuid": "^11.1.0"
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
40
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
63
41
|
},
|
|
64
42
|
"devDependencies": {
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
69
|
-
"@testing-library/
|
|
70
|
-
"@testing-library/react": "^
|
|
71
|
-
"@
|
|
72
|
-
"@types/
|
|
73
|
-
"@types/react": "^
|
|
74
|
-
"@types/react-dom": "^
|
|
75
|
-
"@
|
|
76
|
-
"
|
|
77
|
-
"eslint": "^
|
|
78
|
-
"eslint-
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"jest": "^
|
|
82
|
-
"jest-environment-jsdom": "^
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
43
|
+
"@rollup/plugin-commonjs": "^22.0.0",
|
|
44
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
45
|
+
"@rollup/plugin-typescript": "^8.3.2",
|
|
46
|
+
"@testing-library/jest-dom": "^5.17.0",
|
|
47
|
+
"@testing-library/react": "^13.4.0",
|
|
48
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
49
|
+
"@testing-library/user-event": "^14.6.1",
|
|
50
|
+
"@types/jest": "^28.1.6",
|
|
51
|
+
"@types/react": "^18.0.0",
|
|
52
|
+
"@types/react-dom": "^18.0.0",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
54
|
+
"@typescript-eslint/parser": "^5.27.0",
|
|
55
|
+
"eslint": "^8.16.0",
|
|
56
|
+
"eslint-plugin-react": "^7.30.0",
|
|
57
|
+
"eslint-plugin-react-hooks": "^4.5.0",
|
|
58
|
+
"identity-obj-proxy": "^3.0.0",
|
|
59
|
+
"jest": "^28.1.0",
|
|
60
|
+
"jest-environment-jsdom": "^28.1.3",
|
|
61
|
+
"react-test-renderer": "^18.2.0",
|
|
62
|
+
"rollup": "^2.75.5",
|
|
63
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
64
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
65
|
+
"ts-jest": "^28.0.8",
|
|
66
|
+
"typescript": "^4.7.2"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"tslib": "^2.4.0"
|
|
88
70
|
}
|
|
89
71
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
-
|
|
5
|
-
## 1.0.0 (2025-05-02)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
* initial implementation of NDPR-Toolkit with all key components ([b41aeef](https://github.com/tantainnovative/ndpr-toolkit/commit/b41aeefe3184ce69ed09f3d8c0fdacb860a98427))
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### Bug Fixes
|
|
14
|
-
|
|
15
|
-
* resolve ESLint errors for successful build ([3f78939](https://github.com/tantainnovative/ndpr-toolkit/commit/3f7893902cc7ec67913a7e19f6a804d01e69896e))
|
|
16
|
-
* resolve type errors for successful build ([b827186](https://github.com/tantainnovative/ndpr-toolkit/commit/b8271865a77b097f0ce839ad13555b4bfe12fe2e))
|
package/CNAME
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ndprtoolkit.com.ng
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# Contributing to NDPR-Toolkit
|
|
2
|
-
|
|
3
|
-
Thank you for considering contributing to the Nigerian Data Protection Compliance Toolkit! This document outlines the process for contributing to this project.
|
|
4
|
-
|
|
5
|
-
## Code of Conduct
|
|
6
|
-
|
|
7
|
-
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and considerate of others.
|
|
8
|
-
|
|
9
|
-
## How to Contribute
|
|
10
|
-
|
|
11
|
-
### Reporting Bugs
|
|
12
|
-
|
|
13
|
-
If you find a bug, please create an issue in the GitHub repository with the following information:
|
|
14
|
-
|
|
15
|
-
1. A clear, descriptive title
|
|
16
|
-
2. Steps to reproduce the bug
|
|
17
|
-
3. Expected behavior
|
|
18
|
-
4. Actual behavior
|
|
19
|
-
5. Screenshots (if applicable)
|
|
20
|
-
6. Environment information (browser, OS, etc.)
|
|
21
|
-
|
|
22
|
-
### Suggesting Features
|
|
23
|
-
|
|
24
|
-
We welcome feature suggestions! Please create an issue with:
|
|
25
|
-
|
|
26
|
-
1. A clear, descriptive title
|
|
27
|
-
2. Detailed description of the proposed feature
|
|
28
|
-
3. Any relevant examples or mockups
|
|
29
|
-
4. Explanation of why this feature would be useful to the project
|
|
30
|
-
|
|
31
|
-
### Pull Requests
|
|
32
|
-
|
|
33
|
-
We follow a standard GitHub workflow:
|
|
34
|
-
|
|
35
|
-
1. Fork the repository
|
|
36
|
-
2. Create a new branch for your feature or bug fix
|
|
37
|
-
3. Make your changes
|
|
38
|
-
4. Write or update tests as needed
|
|
39
|
-
5. Ensure all tests pass
|
|
40
|
-
6. Commit your changes using conventional commit messages
|
|
41
|
-
7. Push to your fork
|
|
42
|
-
8. Submit a pull request
|
|
43
|
-
|
|
44
|
-
### Commit Message Convention
|
|
45
|
-
|
|
46
|
-
We use conventional commits to automate versioning and changelog generation. Please format your commit messages as follows:
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
<type>(<scope>): <description>
|
|
50
|
-
|
|
51
|
-
[optional body]
|
|
52
|
-
|
|
53
|
-
[optional footer(s)]
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Types include:
|
|
57
|
-
- `feat`: A new feature
|
|
58
|
-
- `fix`: A bug fix
|
|
59
|
-
- `docs`: Documentation changes
|
|
60
|
-
- `style`: Code style changes (formatting, etc.)
|
|
61
|
-
- `refactor`: Code changes that neither fix bugs nor add features
|
|
62
|
-
- `perf`: Performance improvements
|
|
63
|
-
- `test`: Adding or updating tests
|
|
64
|
-
- `chore`: Changes to the build process or auxiliary tools
|
|
65
|
-
|
|
66
|
-
Example:
|
|
67
|
-
```
|
|
68
|
-
feat(consent): add ability to customize consent banner colors
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Development Setup
|
|
72
|
-
|
|
73
|
-
1. Clone your fork of the repository
|
|
74
|
-
2. Install dependencies: `npm install`
|
|
75
|
-
3. Start the development server: `npm run dev`
|
|
76
|
-
4. Make your changes
|
|
77
|
-
5. Run tests: `npm test`
|
|
78
|
-
|
|
79
|
-
## Release Process
|
|
80
|
-
|
|
81
|
-
Releases are managed by the maintainers using semantic versioning. The process is automated through GitHub Actions.
|
|
82
|
-
|
|
83
|
-
## Questions?
|
|
84
|
-
|
|
85
|
-
If you have any questions about contributing, please open an issue with your question.
|
|
86
|
-
|
|
87
|
-
Thank you for contributing to the NDPR-Toolkit!
|
package/RELEASE-NOTES-v1.0.0.md
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
# NDPR Toolkit v1.0.0 Release Notes
|
|
2
|
-
|
|
3
|
-
**Release Date:** May 4, 2025
|
|
4
|
-
**Package:** [@tantainnovative/ndpr-toolkit](https://www.npmjs.com/package/@tantainnovative/ndpr-toolkit)
|
|
5
|
-
**Version:** 1.0.0 (Initial Stable Release)
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
We are excited to announce the official release of the NDPR Toolkit v1.0.0, a comprehensive solution for implementing Nigeria Data Protection Regulation (NDPR) compliance features in web applications. This enterprise-ready toolkit provides a complete set of components, hooks, and utilities to help organizations meet their NDPR compliance obligations efficiently and effectively.
|
|
10
|
-
|
|
11
|
-
## Key Features
|
|
12
|
-
|
|
13
|
-
### 1. Privacy Policy Management
|
|
14
|
-
- **PolicyGenerator**: Create customizable, NDPR-compliant privacy policies with an intuitive form interface
|
|
15
|
-
- **PolicyPreview**: Display generated policies with professional formatting and section navigation
|
|
16
|
-
- **PolicyExporter**: Export policies in multiple formats (PDF, HTML, Markdown) with compliance notices
|
|
17
|
-
|
|
18
|
-
### 2. Consent Management
|
|
19
|
-
- **ConsentBanner**: Implement cookie consent banners with customizable appearance and behavior
|
|
20
|
-
- **ConsentManager**: Track and manage user consent preferences across your application
|
|
21
|
-
- **ConsentStorage**: Securely store and retrieve consent records with built-in persistence
|
|
22
|
-
|
|
23
|
-
### 3. Data Subject Rights (DSR)
|
|
24
|
-
- **DSRRequestForm**: Collect and validate data subject requests with comprehensive form validation
|
|
25
|
-
- **DSRTracker**: Monitor the status and progress of data subject requests
|
|
26
|
-
- **DSRDashboard**: Visualize and manage all data subject requests in one place
|
|
27
|
-
|
|
28
|
-
### 4. Data Protection Impact Assessment (DPIA)
|
|
29
|
-
- **DPIAQuestionnaire**: Guide users through the DPIA process with step-by-step questionnaires
|
|
30
|
-
- **DPIAReport**: Generate comprehensive DPIA reports based on questionnaire responses
|
|
31
|
-
- **StepIndicator**: Track progress through multi-step DPIA processes
|
|
32
|
-
|
|
33
|
-
### 5. Breach Notification
|
|
34
|
-
- **BreachReportForm**: Collect essential information about data breaches
|
|
35
|
-
- **BreachRiskAssessment**: Evaluate the risk level of reported breaches
|
|
36
|
-
- **RegulatoryReportGenerator**: Create NDPR-compliant breach notification reports
|
|
37
|
-
- **BreachNotificationManager**: Manage the entire breach notification workflow
|
|
38
|
-
|
|
39
|
-
## Technical Specifications
|
|
40
|
-
|
|
41
|
-
- **Framework Compatibility**: React 18+
|
|
42
|
-
- **TypeScript Support**: Full TypeScript definitions for all components and utilities
|
|
43
|
-
- **Modular Architecture**: Use only what you need with tree-shakable imports
|
|
44
|
-
- **Customization**: Extensive theming and styling options
|
|
45
|
-
- **Accessibility**: WCAG 2.1 AA compliant components
|
|
46
|
-
- **Performance**: Optimized bundle size with minimal dependencies
|
|
47
|
-
|
|
48
|
-
## Installation
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
# Using npm
|
|
52
|
-
npm install @tantainnovative/ndpr-toolkit
|
|
53
|
-
|
|
54
|
-
# Using yarn
|
|
55
|
-
yarn add @tantainnovative/ndpr-toolkit
|
|
56
|
-
|
|
57
|
-
# Using pnpm
|
|
58
|
-
pnpm add @tantainnovative/ndpr-toolkit
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Usage Example
|
|
62
|
-
|
|
63
|
-
```jsx
|
|
64
|
-
import { ConsentBanner, useConsent } from '@tantainnovative/ndpr-toolkit';
|
|
65
|
-
|
|
66
|
-
function App() {
|
|
67
|
-
const { consent, updateConsent } = useConsent();
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<div className="app">
|
|
71
|
-
<ConsentBanner
|
|
72
|
-
title="Cookie Consent"
|
|
73
|
-
description="We use cookies to enhance your browsing experience."
|
|
74
|
-
cookieCategories={[
|
|
75
|
-
{ id: 'necessary', name: 'Necessary', required: true },
|
|
76
|
-
{ id: 'analytics', name: 'Analytics' },
|
|
77
|
-
{ id: 'marketing', name: 'Marketing' }
|
|
78
|
-
]}
|
|
79
|
-
onAccept={(categories) => updateConsent(categories)}
|
|
80
|
-
onReject={() => updateConsent(['necessary'])}
|
|
81
|
-
/>
|
|
82
|
-
{/* Your app content */}
|
|
83
|
-
</div>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Documentation
|
|
89
|
-
|
|
90
|
-
Comprehensive documentation is available at:
|
|
91
|
-
- [GitHub Repository](https://github.com/tantainnovative/ndpr-toolkit)
|
|
92
|
-
- [Implementation Guides](https://github.com/tantainnovative/ndpr-toolkit/docs)
|
|
93
|
-
- [API Reference](https://github.com/tantainnovative/ndpr-toolkit/docs/api)
|
|
94
|
-
|
|
95
|
-
## Breaking Changes
|
|
96
|
-
|
|
97
|
-
This is the initial stable release, so there are no breaking changes from previous versions.
|
|
98
|
-
|
|
99
|
-
## Bug Fixes
|
|
100
|
-
|
|
101
|
-
- Fixed conditional rendering in policy templates
|
|
102
|
-
- Resolved issues with form validation in DSR components
|
|
103
|
-
- Improved error handling in consent management
|
|
104
|
-
- Fixed accessibility issues in UI components
|
|
105
|
-
|
|
106
|
-
## Performance Improvements
|
|
107
|
-
|
|
108
|
-
- Optimized bundle size with tree-shaking
|
|
109
|
-
- Improved rendering performance of complex forms
|
|
110
|
-
- Reduced memory usage in data management utilities
|
|
111
|
-
|
|
112
|
-
## Security Enhancements
|
|
113
|
-
|
|
114
|
-
- Implemented secure storage for consent records
|
|
115
|
-
- Added data sanitization for all user inputs
|
|
116
|
-
- Enhanced protection against XSS attacks
|
|
117
|
-
|
|
118
|
-
## Upcoming Features
|
|
119
|
-
|
|
120
|
-
We're already working on the next release, which will include:
|
|
121
|
-
- Integration with popular authentication providers
|
|
122
|
-
- Enhanced reporting capabilities
|
|
123
|
-
- Additional export formats
|
|
124
|
-
- Internationalization support
|
|
125
|
-
|
|
126
|
-
## Acknowledgements
|
|
127
|
-
|
|
128
|
-
We would like to thank all contributors and early adopters who provided valuable feedback during the development of this toolkit.
|
|
129
|
-
|
|
130
|
-
## License
|
|
131
|
-
|
|
132
|
-
MIT License - See LICENSE file for details.
|
|
133
|
-
|
|
134
|
-
## Support
|
|
135
|
-
|
|
136
|
-
For enterprise support, please contact support@tantainnovative.com
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
© 2025 Tanta Innovative. All rights reserved.
|
package/RELEASE-NOTES-v1.0.1.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# NDPR Toolkit v1.0.1 Release Notes
|
|
2
|
-
|
|
3
|
-
**Release Date:** May 4, 2025
|
|
4
|
-
**Package:** [@tantainnovative/ndpr-toolkit](https://www.npmjs.com/package/@tantainnovative/ndpr-toolkit)
|
|
5
|
-
**Version:** 1.0.1
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
This release adds React 19 compatibility to the NDPR Toolkit while maintaining support for React 18. The update ensures that the toolkit can be seamlessly integrated into projects using either React version.
|
|
10
|
-
|
|
11
|
-
## What's New
|
|
12
|
-
|
|
13
|
-
### React 19 Compatibility
|
|
14
|
-
|
|
15
|
-
- Updated peer dependencies to support both React 18 and React 19
|
|
16
|
-
- Added installation instructions for React 19 users
|
|
17
|
-
- Maintained full functionality across all components with the newer React version
|
|
18
|
-
|
|
19
|
-
### Installation Notes
|
|
20
|
-
|
|
21
|
-
When using the toolkit with React 19, you may encounter peer dependency warnings with other packages in your project. To resolve these, you can use the `--legacy-peer-deps` flag:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm install @tantainnovative/ndpr-toolkit --legacy-peer-deps
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Alternatively, you can create a `.npmrc` file in your project root with the following content:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
legacy-peer-deps=true
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
This will make npm ignore peer dependency conflicts during installation.
|
|
34
|
-
|
|
35
|
-
## Technical Specifications
|
|
36
|
-
|
|
37
|
-
- **Framework Compatibility**: React 18+ and React 19+
|
|
38
|
-
- **TypeScript Support**: Full TypeScript definitions for all components and utilities
|
|
39
|
-
- **Modular Architecture**: Use only what you need with tree-shakable imports
|
|
40
|
-
- **Customization**: Extensive theming and styling options
|
|
41
|
-
- **Accessibility**: WCAG 2.1 AA compliant components
|
|
42
|
-
- **Performance**: Optimized bundle size with minimal dependencies
|
|
43
|
-
|
|
44
|
-
## Bug Fixes
|
|
45
|
-
|
|
46
|
-
- No bug fixes in this release; this is purely a compatibility update
|
|
47
|
-
|
|
48
|
-
## Documentation Updates
|
|
49
|
-
|
|
50
|
-
- Added React 19 compatibility notes to README.md
|
|
51
|
-
- Updated installation instructions with guidance for handling peer dependency conflicts
|
|
52
|
-
|
|
53
|
-
## Upgrading from v1.0.0
|
|
54
|
-
|
|
55
|
-
This is a drop-in replacement for v1.0.0 with no breaking changes. To upgrade:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm install @tantainnovative/ndpr-toolkit@1.0.1
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Or with peer dependency resolution:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
npm install @tantainnovative/ndpr-toolkit@1.0.1 --legacy-peer-deps
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
© 2025 Tanta Innovative. All rights reserved.
|
package/SECURITY.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
Use this section to tell people about which versions of your project are
|
|
6
|
-
currently being supported with security updates.
|
|
7
|
-
|
|
8
|
-
| Version | Supported |
|
|
9
|
-
| ------- | ------------------ |
|
|
10
|
-
| 5.1.x | :white_check_mark: |
|
|
11
|
-
| 5.0.x | :x: |
|
|
12
|
-
| 4.0.x | :white_check_mark: |
|
|
13
|
-
| < 4.0 | :x: |
|
|
14
|
-
|
|
15
|
-
## Reporting a Vulnerability
|
|
16
|
-
|
|
17
|
-
Use this section to tell people how to report a vulnerability.
|
|
18
|
-
|
|
19
|
-
Tell them where to go, how often they can expect to get an update on a
|
|
20
|
-
reported vulnerability, what to expect if the vulnerability is accepted or
|
|
21
|
-
declined, etc.
|
package/components.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
-
"style": "new-york",
|
|
4
|
-
"rsc": true,
|
|
5
|
-
"tsx": true,
|
|
6
|
-
"tailwind": {
|
|
7
|
-
"config": "",
|
|
8
|
-
"css": "src/app/globals.css",
|
|
9
|
-
"baseColor": "gray",
|
|
10
|
-
"cssVariables": true,
|
|
11
|
-
"prefix": ""
|
|
12
|
-
},
|
|
13
|
-
"aliases": {
|
|
14
|
-
"components": "@/components",
|
|
15
|
-
"utils": "@/lib/utils",
|
|
16
|
-
"ui": "@/components/ui",
|
|
17
|
-
"lib": "@/lib",
|
|
18
|
-
"hooks": "@/hooks"
|
|
19
|
-
},
|
|
20
|
-
"iconLibrary": "lucide"
|
|
21
|
-
}
|
package/eslint.config.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { dirname } from "path";
|
|
2
|
-
import { fileURLToPath } from "url";
|
|
3
|
-
import { FlatCompat } from "@eslint/eslintrc";
|
|
4
|
-
|
|
5
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = dirname(__filename);
|
|
7
|
-
|
|
8
|
-
const compat = new FlatCompat({
|
|
9
|
-
baseDirectory: __dirname,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const eslintConfig = [
|
|
13
|
-
...compat.extends("next/core-web-vitals", "next/typescript"),
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
export default eslintConfig;
|
package/next-env.d.ts
DELETED
package/next.config.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/** @type {import('next').NextConfig} */
|
|
2
|
-
const nextConfig = {
|
|
3
|
-
output: 'export',
|
|
4
|
-
basePath: '',
|
|
5
|
-
images: {
|
|
6
|
-
unoptimized: true,
|
|
7
|
-
},
|
|
8
|
-
eslint: {
|
|
9
|
-
// Warning: This allows production builds to successfully complete even if
|
|
10
|
-
// your project has ESLint errors.
|
|
11
|
-
ignoreDuringBuilds: true,
|
|
12
|
-
},
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
module.exports = nextConfig
|
package/next.config.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { NextConfig } from "next";
|
|
2
|
-
|
|
3
|
-
// Check if we're in development mode
|
|
4
|
-
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
5
|
-
|
|
6
|
-
// Repository name for GitHub Pages
|
|
7
|
-
const REPO_NAME = 'ndpr-toolkit';
|
|
8
|
-
|
|
9
|
-
const nextConfig: NextConfig = {
|
|
10
|
-
reactStrictMode: true,
|
|
11
|
-
|
|
12
|
-
// These settings apply to all environments
|
|
13
|
-
poweredByHeader: false,
|
|
14
|
-
|
|
15
|
-
// Fix for hydration errors
|
|
16
|
-
// This ensures consistent rendering between server and client
|
|
17
|
-
experimental: {
|
|
18
|
-
// Reduce hydration mismatches by making SSR output match client rendering
|
|
19
|
-
scrollRestoration: true,
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
// Optimize fonts to reduce hydration mismatches
|
|
23
|
-
optimizeFonts: true,
|
|
24
|
-
|
|
25
|
-
// Suppress hydration warnings in development
|
|
26
|
-
onDemandEntries: {
|
|
27
|
-
// Keep pages in memory for longer to avoid reloading
|
|
28
|
-
maxInactiveAge: 25 * 1000,
|
|
29
|
-
pagesBufferLength: 5,
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
// Only use static export, basePath and assetPrefix in production
|
|
33
|
-
...(isDevelopment
|
|
34
|
-
? {
|
|
35
|
-
// Development config - no basePath or static export
|
|
36
|
-
}
|
|
37
|
-
: {
|
|
38
|
-
// Production config for GitHub Pages
|
|
39
|
-
output: 'export', // Enable static HTML export
|
|
40
|
-
trailingSlash: true, // Important for GitHub Pages to work correctly with routing
|
|
41
|
-
images: {
|
|
42
|
-
unoptimized: true, // Required for static export
|
|
43
|
-
},
|
|
44
|
-
basePath: `/${REPO_NAME}`,
|
|
45
|
-
assetPrefix: `/${REPO_NAME}`,
|
|
46
|
-
}
|
|
47
|
-
),
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// Add a custom export script to generate a .nojekyll file
|
|
51
|
-
// This prevents GitHub Pages from ignoring files that begin with an underscore
|
|
52
|
-
if (process.env.NODE_ENV === 'production') {
|
|
53
|
-
const { execSync } = require('child_process');
|
|
54
|
-
try {
|
|
55
|
-
execSync('touch out/.nojekyll');
|
|
56
|
-
console.log('Created .nojekyll file');
|
|
57
|
-
} catch (error) {
|
|
58
|
-
console.error('Error creating .nojekyll file:', error);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export default nextConfig;
|