@tantainnovative/ndpr-toolkit 3.0.0 → 3.2.0
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/dist/{PolicyExporter-BIqSVjfC.d.mts → PolicyExporter-Bgi6nz82.d.mts} +93 -1
- package/dist/{PolicyExporter-BNWaPBGU.d.ts → PolicyExporter-BnvuFncj.d.ts} +93 -1
- package/dist/chunk-44W4H2EY.js +2 -0
- package/dist/chunk-BGHQTZAC.js +94 -0
- package/dist/chunk-DQLDX5X6.js +316 -0
- package/dist/chunk-GCQRHMTQ.mjs +144 -0
- package/dist/chunk-JZKH5RMC.js +3 -0
- package/dist/chunk-LU4PFST7.js +144 -0
- package/dist/chunk-SKJCQKFL.mjs +94 -0
- package/dist/chunk-TKBZRULW.mjs +316 -0
- package/dist/chunk-TVW6KBVV.mjs +2 -0
- package/dist/chunk-ZQSX5ZHB.mjs +3 -0
- package/dist/core.d.mts +9 -46
- package/dist/core.d.ts +9 -46
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/hooks.d.mts +2 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/policy-engine-C-tShzZH.d.mts +154 -0
- package/dist/policy-engine-DSQpT55_.d.ts +154 -0
- package/dist/policy-sections-CfNVBLCh.d.mts +54 -0
- package/dist/policy-sections-DqH0iZRf.d.ts +54 -0
- package/dist/policy.d.mts +86 -5
- package/dist/policy.d.ts +86 -5
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets.d.mts +5 -15
- package/dist/presets.d.ts +5 -15
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/sanitize-9mOO_cJW.d.mts +147 -0
- package/dist/sanitize-9mOO_cJW.d.ts +147 -0
- package/dist/useAdaptivePolicyWizard-B9Op2gYM.d.ts +52 -0
- package/dist/useAdaptivePolicyWizard-N4eUM4Tj.d.mts +52 -0
- package/package.json +7 -2
- package/dist/PolicyGenerator-BvcWPbxp.d.mts +0 -96
- package/dist/PolicyGenerator-BzRwtlgn.d.ts +0 -96
- package/dist/chunk-3RGJV3VF.js +0 -7
- package/dist/chunk-7FIUX3ZM.js +0 -89
- package/dist/chunk-ILCNDOBU.js +0 -2
- package/dist/chunk-J6IKAGUP.mjs +0 -89
- package/dist/chunk-KNE4NXCY.mjs +0 -7
- package/dist/chunk-WSHSHIIM.mjs +0 -2
package/dist/policy.d.mts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { P as PolicyGenerator } from './
|
|
3
|
-
import { d as PolicyPreviewProps, e as PolicyExporterProps } from './PolicyExporter-BIqSVjfC.mjs';
|
|
4
|
-
export { P as PolicyExporter, b as PolicyPreview } from './PolicyExporter-BIqSVjfC.mjs';
|
|
1
|
+
import { f as PolicyGeneratorProps, g as PolicyPreviewProps, h as PolicyExporterProps } from './PolicyExporter-Bgi6nz82.mjs';
|
|
2
|
+
export { P as PolicyExporter, b as PolicyGenerator, d as PolicyPreview } from './PolicyExporter-Bgi6nz82.mjs';
|
|
5
3
|
import { U as UsePrivacyPolicyReturn } from './useDefaultPrivacyPolicy-BsYttRey.mjs';
|
|
6
4
|
export { u as useDefaultPrivacyPolicy, a as usePrivacyPolicy } from './useDefaultPrivacyPolicy-BsYttRey.mjs';
|
|
7
5
|
export { D as DEFAULT_POLICY_SECTIONS, a as DEFAULT_POLICY_VARIABLES, c as createBusinessPolicyTemplate, g as generatePolicyText } from './policy-templates-DMsPwOSZ.mjs';
|
|
@@ -10,6 +8,10 @@ export { O as OrganizationInfo, P as PolicySection, b as PolicyVariable } from '
|
|
|
10
8
|
import * as React from 'react';
|
|
11
9
|
import React__default from 'react';
|
|
12
10
|
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
11
|
+
import { P as PolicyDraft, H as HTMLExportOptions, e as PDFExportOptions, f as DOCXExportOptions } from './policy-engine-C-tShzZH.mjs';
|
|
12
|
+
export { C as ComplianceGap, a as ComplianceResult, b as CustomSection, g as DEFAULT_DATA_CATEGORIES, D as DataCategory, I as Industry, O as OrgSize, h as ProcessingPurpose, T as TemplateContext, c as ThirdPartyProcessor, d as createDefaultContext } from './policy-engine-C-tShzZH.mjs';
|
|
13
|
+
export { U as UseAdaptivePolicyWizardOptions, a as UseAdaptivePolicyWizardReturn, u as useAdaptivePolicyWizard } from './useAdaptivePolicyWizard-N4eUM4Tj.mjs';
|
|
14
|
+
export { a as assemblePolicy, e as evaluatePolicyCompliance } from './policy-sections-CfNVBLCh.mjs';
|
|
13
15
|
|
|
14
16
|
interface PolicyProviderProps {
|
|
15
17
|
templates: PolicyTemplate[];
|
|
@@ -34,4 +36,83 @@ interface PolicyContextValue extends UsePrivacyPolicyReturn {
|
|
|
34
36
|
}
|
|
35
37
|
declare function usePolicyCompound(): PolicyContextValue;
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
interface AdaptivePolicyWizardProps {
|
|
40
|
+
adapter?: StorageAdapter<PolicyDraft>;
|
|
41
|
+
onComplete?: (policy: PrivacyPolicy) => void;
|
|
42
|
+
classNames?: Record<string, string>;
|
|
43
|
+
unstyled?: boolean;
|
|
44
|
+
}
|
|
45
|
+
declare const AdaptivePolicyWizard: React__default.FC<AdaptivePolicyWizardProps>;
|
|
46
|
+
|
|
47
|
+
interface PolicyPageProps {
|
|
48
|
+
policy: PrivacyPolicy;
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* PolicyPage renders a full styled privacy policy page.
|
|
53
|
+
* HTML is generated internally by exportHTML from a typed PrivacyPolicy object
|
|
54
|
+
* and does not contain untrusted user input.
|
|
55
|
+
*/
|
|
56
|
+
declare const PolicyPage: React__default.FC<PolicyPageProps>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Export a PrivacyPolicy as a self-contained HTML string.
|
|
60
|
+
*
|
|
61
|
+
* The returned string includes:
|
|
62
|
+
* - An embedded `<style>` block (responsive, dark/light, print-friendly)
|
|
63
|
+
* - An `<article>` wrapper with semantic markup
|
|
64
|
+
* - A `<nav>` table of contents with anchor links
|
|
65
|
+
* - A `<section>` for every included policy section
|
|
66
|
+
* - A metadata footer (org name, effective date, version, generator credit)
|
|
67
|
+
* - Optional custom CSS injection via `options.customCSS`
|
|
68
|
+
*/
|
|
69
|
+
declare function exportHTML(policy: PrivacyPolicy, options?: HTMLExportOptions): string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Export a PrivacyPolicy as a clean Markdown string.
|
|
73
|
+
*
|
|
74
|
+
* Structure:
|
|
75
|
+
* ```
|
|
76
|
+
* # Policy Title
|
|
77
|
+
* _Effective: date | Version: X | Org Name_
|
|
78
|
+
*
|
|
79
|
+
* ## Table of Contents
|
|
80
|
+
* - [Section Title](#anchor)
|
|
81
|
+
*
|
|
82
|
+
* ## 1. Section Title
|
|
83
|
+
* Section content...
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
declare function exportMarkdown(policy: PrivacyPolicy): string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Export a PrivacyPolicy to a PDF Blob using jspdf (optional peer dependency).
|
|
90
|
+
*
|
|
91
|
+
* Features:
|
|
92
|
+
* - Optional cover page with title, organisation, date, version and compliance badge
|
|
93
|
+
* - Optional table of contents page
|
|
94
|
+
* - One section per heading, content reflowed to fit the page
|
|
95
|
+
* - Automatic page breaks
|
|
96
|
+
* - Page header (org name) and footer (page X of Y) on every page
|
|
97
|
+
* - PDF metadata (title, author, subject, keywords)
|
|
98
|
+
*
|
|
99
|
+
* @throws {Error} if the `jspdf` package is not installed
|
|
100
|
+
*/
|
|
101
|
+
declare function exportPDF(policy: PrivacyPolicy, options?: PDFExportOptions): Promise<Blob>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Export a PrivacyPolicy as a Word (.docx) Blob using the `docx` library
|
|
105
|
+
* (optional peer dependency).
|
|
106
|
+
*
|
|
107
|
+
* Features:
|
|
108
|
+
* - Title paragraph with large bold text
|
|
109
|
+
* - Organisation name + version subtitle
|
|
110
|
+
* - Optional table of contents placeholder heading
|
|
111
|
+
* - All included policy sections as Heading 1 + body paragraphs / bullet lists
|
|
112
|
+
* - Running header (org name) and page-number footer on every page
|
|
113
|
+
*
|
|
114
|
+
* @throws {Error} if the `docx` package is not installed
|
|
115
|
+
*/
|
|
116
|
+
declare function exportDOCX(policy: PrivacyPolicy, options?: DOCXExportOptions): Promise<Blob>;
|
|
117
|
+
|
|
118
|
+
export { AdaptivePolicyWizard, Policy, PolicyDraft, PolicyPage, PolicyProvider, type PolicyProviderProps, PolicyTemplate, PrivacyPolicy, StorageAdapter, exportDOCX, exportHTML, exportMarkdown, exportPDF, usePolicyCompound };
|
package/dist/policy.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { P as PolicyGenerator } from './
|
|
3
|
-
import { d as PolicyPreviewProps, e as PolicyExporterProps } from './PolicyExporter-BNWaPBGU.js';
|
|
4
|
-
export { P as PolicyExporter, b as PolicyPreview } from './PolicyExporter-BNWaPBGU.js';
|
|
1
|
+
import { f as PolicyGeneratorProps, g as PolicyPreviewProps, h as PolicyExporterProps } from './PolicyExporter-BnvuFncj.js';
|
|
2
|
+
export { P as PolicyExporter, b as PolicyGenerator, d as PolicyPreview } from './PolicyExporter-BnvuFncj.js';
|
|
5
3
|
import { U as UsePrivacyPolicyReturn } from './useDefaultPrivacyPolicy-C-mG-A5S.js';
|
|
6
4
|
export { u as useDefaultPrivacyPolicy, a as usePrivacyPolicy } from './useDefaultPrivacyPolicy-C-mG-A5S.js';
|
|
7
5
|
export { D as DEFAULT_POLICY_SECTIONS, a as DEFAULT_POLICY_VARIABLES, c as createBusinessPolicyTemplate, g as generatePolicyText } from './policy-templates-CIKcV0i1.js';
|
|
@@ -10,6 +8,10 @@ export { O as OrganizationInfo, P as PolicySection, b as PolicyVariable } from '
|
|
|
10
8
|
import * as React from 'react';
|
|
11
9
|
import React__default from 'react';
|
|
12
10
|
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
11
|
+
import { P as PolicyDraft, H as HTMLExportOptions, e as PDFExportOptions, f as DOCXExportOptions } from './policy-engine-DSQpT55_.js';
|
|
12
|
+
export { C as ComplianceGap, a as ComplianceResult, b as CustomSection, g as DEFAULT_DATA_CATEGORIES, D as DataCategory, I as Industry, O as OrgSize, h as ProcessingPurpose, T as TemplateContext, c as ThirdPartyProcessor, d as createDefaultContext } from './policy-engine-DSQpT55_.js';
|
|
13
|
+
export { U as UseAdaptivePolicyWizardOptions, a as UseAdaptivePolicyWizardReturn, u as useAdaptivePolicyWizard } from './useAdaptivePolicyWizard-B9Op2gYM.js';
|
|
14
|
+
export { a as assemblePolicy, e as evaluatePolicyCompliance } from './policy-sections-DqH0iZRf.js';
|
|
13
15
|
|
|
14
16
|
interface PolicyProviderProps {
|
|
15
17
|
templates: PolicyTemplate[];
|
|
@@ -34,4 +36,83 @@ interface PolicyContextValue extends UsePrivacyPolicyReturn {
|
|
|
34
36
|
}
|
|
35
37
|
declare function usePolicyCompound(): PolicyContextValue;
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
interface AdaptivePolicyWizardProps {
|
|
40
|
+
adapter?: StorageAdapter<PolicyDraft>;
|
|
41
|
+
onComplete?: (policy: PrivacyPolicy) => void;
|
|
42
|
+
classNames?: Record<string, string>;
|
|
43
|
+
unstyled?: boolean;
|
|
44
|
+
}
|
|
45
|
+
declare const AdaptivePolicyWizard: React__default.FC<AdaptivePolicyWizardProps>;
|
|
46
|
+
|
|
47
|
+
interface PolicyPageProps {
|
|
48
|
+
policy: PrivacyPolicy;
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* PolicyPage renders a full styled privacy policy page.
|
|
53
|
+
* HTML is generated internally by exportHTML from a typed PrivacyPolicy object
|
|
54
|
+
* and does not contain untrusted user input.
|
|
55
|
+
*/
|
|
56
|
+
declare const PolicyPage: React__default.FC<PolicyPageProps>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Export a PrivacyPolicy as a self-contained HTML string.
|
|
60
|
+
*
|
|
61
|
+
* The returned string includes:
|
|
62
|
+
* - An embedded `<style>` block (responsive, dark/light, print-friendly)
|
|
63
|
+
* - An `<article>` wrapper with semantic markup
|
|
64
|
+
* - A `<nav>` table of contents with anchor links
|
|
65
|
+
* - A `<section>` for every included policy section
|
|
66
|
+
* - A metadata footer (org name, effective date, version, generator credit)
|
|
67
|
+
* - Optional custom CSS injection via `options.customCSS`
|
|
68
|
+
*/
|
|
69
|
+
declare function exportHTML(policy: PrivacyPolicy, options?: HTMLExportOptions): string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Export a PrivacyPolicy as a clean Markdown string.
|
|
73
|
+
*
|
|
74
|
+
* Structure:
|
|
75
|
+
* ```
|
|
76
|
+
* # Policy Title
|
|
77
|
+
* _Effective: date | Version: X | Org Name_
|
|
78
|
+
*
|
|
79
|
+
* ## Table of Contents
|
|
80
|
+
* - [Section Title](#anchor)
|
|
81
|
+
*
|
|
82
|
+
* ## 1. Section Title
|
|
83
|
+
* Section content...
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
declare function exportMarkdown(policy: PrivacyPolicy): string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Export a PrivacyPolicy to a PDF Blob using jspdf (optional peer dependency).
|
|
90
|
+
*
|
|
91
|
+
* Features:
|
|
92
|
+
* - Optional cover page with title, organisation, date, version and compliance badge
|
|
93
|
+
* - Optional table of contents page
|
|
94
|
+
* - One section per heading, content reflowed to fit the page
|
|
95
|
+
* - Automatic page breaks
|
|
96
|
+
* - Page header (org name) and footer (page X of Y) on every page
|
|
97
|
+
* - PDF metadata (title, author, subject, keywords)
|
|
98
|
+
*
|
|
99
|
+
* @throws {Error} if the `jspdf` package is not installed
|
|
100
|
+
*/
|
|
101
|
+
declare function exportPDF(policy: PrivacyPolicy, options?: PDFExportOptions): Promise<Blob>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Export a PrivacyPolicy as a Word (.docx) Blob using the `docx` library
|
|
105
|
+
* (optional peer dependency).
|
|
106
|
+
*
|
|
107
|
+
* Features:
|
|
108
|
+
* - Title paragraph with large bold text
|
|
109
|
+
* - Organisation name + version subtitle
|
|
110
|
+
* - Optional table of contents placeholder heading
|
|
111
|
+
* - All included policy sections as Heading 1 + body paragraphs / bullet lists
|
|
112
|
+
* - Running header (org name) and page-number footer on every page
|
|
113
|
+
*
|
|
114
|
+
* @throws {Error} if the `docx` package is not installed
|
|
115
|
+
*/
|
|
116
|
+
declare function exportDOCX(policy: PrivacyPolicy, options?: DOCXExportOptions): Promise<Blob>;
|
|
117
|
+
|
|
118
|
+
export { AdaptivePolicyWizard, Policy, PolicyDraft, PolicyPage, PolicyProvider, type PolicyProviderProps, PolicyTemplate, PrivacyPolicy, StorageAdapter, exportDOCX, exportHTML, exportMarkdown, exportPDF, usePolicyCompound };
|
package/dist/policy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkJZKH5RMC_js=require('./chunk-JZKH5RMC.js'),chunkBGHQTZAC_js=require('./chunk-BGHQTZAC.js'),chunkDQLDX5X6_js=require('./chunk-DQLDX5X6.js'),chunkIKEPXHCZ_js=require('./chunk-IKEPXHCZ.js'),chunkLU4PFST7_js=require('./chunk-LU4PFST7.js'),chunk5RSOLEEP_js=require('./chunk-5RSOLEEP.js');require('./chunk-E64TU6IU.js'),require('./chunk-UK656RCG.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var a=react.createContext(null);function z(){let o=react.useContext(a);if(!o)throw new Error("Policy compound components must be wrapped in <Policy.Provider>. Example: <Policy.Provider templates={...}><Policy.Generator /></Policy.Provider>");return o}var i=({templates:o,adapter:p,storageKey:c,useLocalStorage:m,initialPolicy:s,onGenerate:d,children:x})=>{let f=chunkIKEPXHCZ_js.a({templates:o,adapter:p,storageKey:c,useLocalStorage:m,initialPolicy:s,onGenerate:d}),v=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},f),{templates:o});return jsxRuntime.jsx(a.Provider,{value:v,children:x})};var F={Provider:i,Generator:chunkBGHQTZAC_js.a,Preview:chunkBGHQTZAC_js.b,Exporter:chunkBGHQTZAC_js.c};var N=({policy:o,className:p})=>{let c=chunkDQLDX5X6_js.a(o,{includeStyles:true,includePrintCSS:true});return jsxRuntime.jsx("div",{"data-ndpr-component":"policy-page",className:p,dangerouslySetInnerHTML:{__html:c}})};Object.defineProperty(exports,"AdaptivePolicyWizard",{enumerable:true,get:function(){return chunkJZKH5RMC_js.a}});Object.defineProperty(exports,"PolicyExporter",{enumerable:true,get:function(){return chunkBGHQTZAC_js.c}});Object.defineProperty(exports,"PolicyGenerator",{enumerable:true,get:function(){return chunkBGHQTZAC_js.a}});Object.defineProperty(exports,"PolicyPreview",{enumerable:true,get:function(){return chunkBGHQTZAC_js.b}});Object.defineProperty(exports,"exportDOCX",{enumerable:true,get:function(){return chunkDQLDX5X6_js.d}});Object.defineProperty(exports,"exportHTML",{enumerable:true,get:function(){return chunkDQLDX5X6_js.a}});Object.defineProperty(exports,"exportMarkdown",{enumerable:true,get:function(){return chunkDQLDX5X6_js.b}});Object.defineProperty(exports,"exportPDF",{enumerable:true,get:function(){return chunkDQLDX5X6_js.c}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkDQLDX5X6_js.e}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkIKEPXHCZ_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkIKEPXHCZ_js.a}});Object.defineProperty(exports,"DEFAULT_DATA_CATEGORIES",{enumerable:true,get:function(){return chunkLU4PFST7_js.a}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunkLU4PFST7_js.d}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunkLU4PFST7_js.b}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunkLU4PFST7_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunk5RSOLEEP_js.b}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunk5RSOLEEP_js.c}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunk5RSOLEEP_js.d}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunk5RSOLEEP_js.a}});exports.Policy=F;exports.PolicyPage=N;exports.PolicyProvider=i;exports.usePolicyCompound=z;//# sourceMappingURL=policy.js.map
|
|
2
2
|
//# sourceMappingURL=policy.js.map
|
package/dist/policy.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b,a}from'./chunk-
|
|
1
|
+
export{a as AdaptivePolicyWizard}from'./chunk-ZQSX5ZHB.mjs';import {c,b,a as a$1}from'./chunk-SKJCQKFL.mjs';export{c as PolicyExporter,a as PolicyGenerator,b as PolicyPreview}from'./chunk-SKJCQKFL.mjs';import {a as a$4}from'./chunk-TKBZRULW.mjs';export{d as exportDOCX,a as exportHTML,b as exportMarkdown,c as exportPDF,e as useAdaptivePolicyWizard}from'./chunk-TKBZRULW.mjs';import {a as a$2}from'./chunk-6E54NSAO.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-6E54NSAO.mjs';export{a as DEFAULT_DATA_CATEGORIES,d as assemblePolicy,b as createDefaultContext,c as evaluatePolicyCompliance}from'./chunk-GCQRHMTQ.mjs';export{b as DEFAULT_POLICY_SECTIONS,c as DEFAULT_POLICY_VARIABLES,d as createBusinessPolicyTemplate,a as generatePolicyText}from'./chunk-CAB7O3GR.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-SBNAMPAP.mjs';import {b as b$1,a as a$3}from'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var a=createContext(null);function z(){let o=useContext(a);if(!o)throw new Error("Policy compound components must be wrapped in <Policy.Provider>. Example: <Policy.Provider templates={...}><Policy.Generator /></Policy.Provider>");return o}var i=({templates:o,adapter:p,storageKey:c,useLocalStorage:m,initialPolicy:s,onGenerate:d,children:x})=>{let f=a$2({templates:o,adapter:p,storageKey:c,useLocalStorage:m,initialPolicy:s,onGenerate:d}),v=b$1(a$3({},f),{templates:o});return jsx(a.Provider,{value:v,children:x})};var F={Provider:i,Generator:a$1,Preview:b,Exporter:c};var N=({policy:o,className:p})=>{let c=a$4(o,{includeStyles:true,includePrintCSS:true});return jsx("div",{"data-ndpr-component":"policy-page",className:p,dangerouslySetInnerHTML:{__html:c}})};export{F as Policy,N as PolicyPage,i as PolicyProvider,z as usePolicyCompound};//# sourceMappingURL=policy.mjs.map
|
|
2
2
|
//# sourceMappingURL=policy.mjs.map
|
package/dist/presets.d.mts
CHANGED
|
@@ -6,8 +6,8 @@ import { D as DSRFormSubmission, b as DSRRequestFormClassNames } from './DSRRequ
|
|
|
6
6
|
import { c as RequestType } from './dsr-Cm9lzWG7.mjs';
|
|
7
7
|
import { B as BreachFormSubmission, b as BreachReportFormClassNames } from './BreachReportForm-yJ2Zl6gz.mjs';
|
|
8
8
|
import { B as BreachCategory } from './breach-Eu9byel8.mjs';
|
|
9
|
-
import {
|
|
10
|
-
import { P as
|
|
9
|
+
import { c as PrivacyPolicy } from './privacy-Ca6te9Ir.mjs';
|
|
10
|
+
import { P as PolicyDraft } from './policy-engine-C-tShzZH.mjs';
|
|
11
11
|
import { a as DPIAQuestionnaireClassNames } from './DPIAQuestionnaire-BkejviPj.mjs';
|
|
12
12
|
import { c as DPIASection } from './dpia-5OQVA1R_.mjs';
|
|
13
13
|
import { a as LawfulBasisTrackerClassNames } from './LawfulBasisTracker-CBqOxX1D.mjs';
|
|
@@ -49,20 +49,10 @@ interface NDPRBreachReportProps {
|
|
|
49
49
|
declare const NDPRBreachReport: React__default.FC<NDPRBreachReportProps>;
|
|
50
50
|
|
|
51
51
|
interface NDPRPrivacyPolicyProps {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
sections: PolicySection[];
|
|
56
|
-
variables: PolicyVariable[];
|
|
57
|
-
content: string;
|
|
58
|
-
}>;
|
|
59
|
-
classNames?: PolicyGeneratorClassNames;
|
|
52
|
+
adapter?: StorageAdapter<PolicyDraft>;
|
|
53
|
+
onComplete?: (policy: PrivacyPolicy) => void;
|
|
54
|
+
classNames?: Record<string, string>;
|
|
60
55
|
unstyled?: boolean;
|
|
61
|
-
onGenerate?: (policy: {
|
|
62
|
-
sections: PolicySection[];
|
|
63
|
-
variables: PolicyVariable[];
|
|
64
|
-
content: string;
|
|
65
|
-
}) => void;
|
|
66
56
|
}
|
|
67
57
|
declare const NDPRPrivacyPolicy: React__default.FC<NDPRPrivacyPolicyProps>;
|
|
68
58
|
|
package/dist/presets.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import { D as DSRFormSubmission, b as DSRRequestFormClassNames } from './DSRRequ
|
|
|
6
6
|
import { c as RequestType } from './dsr-Cm9lzWG7.js';
|
|
7
7
|
import { B as BreachFormSubmission, b as BreachReportFormClassNames } from './BreachReportForm-DpRrBoxU.js';
|
|
8
8
|
import { B as BreachCategory } from './breach-Eu9byel8.js';
|
|
9
|
-
import {
|
|
10
|
-
import { P as
|
|
9
|
+
import { c as PrivacyPolicy } from './privacy-Ca6te9Ir.js';
|
|
10
|
+
import { P as PolicyDraft } from './policy-engine-DSQpT55_.js';
|
|
11
11
|
import { a as DPIAQuestionnaireClassNames } from './DPIAQuestionnaire-DdSqXG3x.js';
|
|
12
12
|
import { c as DPIASection } from './dpia-5OQVA1R_.js';
|
|
13
13
|
import { a as LawfulBasisTrackerClassNames } from './LawfulBasisTracker-Cg30NbDA.js';
|
|
@@ -49,20 +49,10 @@ interface NDPRBreachReportProps {
|
|
|
49
49
|
declare const NDPRBreachReport: React__default.FC<NDPRBreachReportProps>;
|
|
50
50
|
|
|
51
51
|
interface NDPRPrivacyPolicyProps {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
sections: PolicySection[];
|
|
56
|
-
variables: PolicyVariable[];
|
|
57
|
-
content: string;
|
|
58
|
-
}>;
|
|
59
|
-
classNames?: PolicyGeneratorClassNames;
|
|
52
|
+
adapter?: StorageAdapter<PolicyDraft>;
|
|
53
|
+
onComplete?: (policy: PrivacyPolicy) => void;
|
|
54
|
+
classNames?: Record<string, string>;
|
|
60
55
|
unstyled?: boolean;
|
|
61
|
-
onGenerate?: (policy: {
|
|
62
|
-
sections: PolicySection[];
|
|
63
|
-
variables: PolicyVariable[];
|
|
64
|
-
content: string;
|
|
65
|
-
}) => void;
|
|
66
56
|
}
|
|
67
57
|
declare const NDPRPrivacyPolicy: React__default.FC<NDPRPrivacyPolicyProps>;
|
|
68
58
|
|
package/dist/presets.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkV37BM2LF_js=require('./chunk-V37BM2LF.js'),chunkER7X6E36_js=require('./chunk-ER7X6E36.js'),chunkCL53OI3I_js=require('./chunk-CL53OI3I.js'),chunkUZ5EZOA7_js=require('./chunk-UZ5EZOA7.js'),chunkVDZKGCAF_js=require('./chunk-VDZKGCAF.js');require('./chunk-TDDAYVKK.js'),require('./chunk-IQF726GS.js'),require('./chunk-SWF3YVE5.js');var chunkUOSEH6DC_js=require('./chunk-UOSEH6DC.js'),chunkPEH5GIMN_js=require('./chunk-PEH5GIMN.js'),chunkUNKXYVXY_js=require('./chunk-UNKXYVXY.js'),chunkGVANK6PL_js=require('./chunk-GVANK6PL.js');require('./chunk-EPF7J2FK.js');var chunk3RGJV3VF_js=require('./chunk-3RGJV3VF.js'),chunk5RSOLEEP_js=require('./chunk-5RSOLEEP.js');require('./chunk-E64TU6IU.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var L=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],I=({extraOptions:c=[],options:t,adapter:l,position:p="bottom",classNames:r,unstyled:n,onSave:a})=>{let u=t!=null?t:[...L,...c];return jsxRuntime.jsx(chunkUOSEH6DC_js.a,{options:u,onSave:f=>{l&&l.save(f),a==null||a(f);},position:p,classNames:r,unstyled:n,manageStorage:!l})};var F=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:c=F,adapter:t,classNames:l,unstyled:p,onSubmit:r=()=>{}})=>jsxRuntime.jsx(chunkPEH5GIMN_js.a,{requestTypes:c,onSubmit:a=>{t&&t.save(a),r(a);},classNames:l,unstyled:p});var E=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],M=({categories:c=E,adapter:t,classNames:l,unstyled:p,onSubmit:r=()=>{}})=>jsxRuntime.jsx(chunkGVANK6PL_js.a,{categories:c,onSubmit:a=>{t&&t.save(a),r(a);},classNames:l,unstyled:p});var G=({sections:c=chunk5RSOLEEP_js.b,variables:t=chunk5RSOLEEP_js.c,adapter:l,classNames:p,unstyled:r,onGenerate:n=()=>{}})=>jsxRuntime.jsx(chunk3RGJV3VF_js.a,{sections:c,variables:t,onGenerate:u=>{l&&l.save(u),n(u);},classNames:p,unstyled:r});var V=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],j=({sections:c=V,adapter:t,classNames:l,unstyled:p,onComplete:r=()=>{}})=>{let[n,a]=react.useState({}),[u,y]=react.useState(0),f=(i,q)=>{a(O=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},O),{[i]:q}));},e=()=>{u<c.length-1?y(i=>i+1):(t&&t.save(n),r(n));},s=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/c.length*100);return jsxRuntime.jsx(chunkUNKXYVXY_js.a,{sections:c,answers:n,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:s,progress:o,classNames:l,unstyled:p})};var H=({initialActivities:c=[],adapter:t,classNames:l,unstyled:p})=>{let[r,n]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return c}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkER7X6E36_js.a,{activities:r,onAddActivity:e=>{let s=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`activity-${s}`,createdAt:s,updatedAt:s}),i=[...r,o];n(i),a(i);},onUpdateActivity:(e,s)=>{let o=r.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),s),{updatedAt:Date.now()}):i);n(o),a(o);},onArchiveActivity:e=>{let s=r.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"inactive",updatedAt:Date.now()}):o);n(s),a(s);},classNames:l,unstyled:p})};var K=({initialTransfers:c=[],adapter:t,classNames:l,unstyled:p})=>{let[r,n]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return c}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkCL53OI3I_js.a,{transfers:r,onAddTransfer:e=>{let s=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`transfer-${s}`,createdAt:s,updatedAt:s}),i=[...r,o];n(i),a(i);},onUpdateTransfer:(e,s)=>{let o=r.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),s),{updatedAt:Date.now()}):i);n(o),a(o);},onRemoveTransfer:e=>{let s=r.filter(o=>o.id!==e);n(s),a(s);},classNames:l,unstyled:p})};var te={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},re=({initialData:c,adapter:t,classNames:l,unstyled:p})=>{let[r,n]=react.useState(c!=null?c:te);react.useEffect(()=>{if(!t)return;let e=false;return chunkMQFZHA2D_js.d(null,null,function*(){let o=yield t.load();!e&&o&&n(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkUZ5EZOA7_js.a,{ropa:r,onAddRecord:e=>{let s=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},r),{records:[...r.records,e],lastUpdated:Date.now()});n(s),a(s);},onUpdateRecord:(e,s)=>{let o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},r),{records:r.records.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),s),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});n(o),a(o);},onArchiveRecord:e=>{let s=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},r),{records:r.records.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});n(s),a(s);},classNames:l,unstyled:p})};var oe=l=>{var p=l,{input:c}=p,t=chunkMQFZHA2D_js.c(p,["input"]);let r=chunkVDZKGCAF_js.a(c);return jsxRuntime.jsx(chunkV37BM2LF_js.a,chunkMQFZHA2D_js.a({report:r},t))};exports.NDPRBreachReport=M;exports.NDPRComplianceDashboard=oe;exports.NDPRConsent=I;exports.NDPRCrossBorder=K;exports.NDPRDPIA=j;exports.NDPRLawfulBasis=H;exports.NDPRPrivacyPolicy=G;exports.NDPRROPA=re;exports.NDPRSubjectRights=k;//# sourceMappingURL=presets.js.map
|
|
1
|
+
'use strict';var chunkV37BM2LF_js=require('./chunk-V37BM2LF.js'),chunkER7X6E36_js=require('./chunk-ER7X6E36.js'),chunkCL53OI3I_js=require('./chunk-CL53OI3I.js'),chunkUZ5EZOA7_js=require('./chunk-UZ5EZOA7.js'),chunkVDZKGCAF_js=require('./chunk-VDZKGCAF.js');require('./chunk-TDDAYVKK.js'),require('./chunk-IQF726GS.js'),require('./chunk-SWF3YVE5.js');var chunkUOSEH6DC_js=require('./chunk-UOSEH6DC.js'),chunkPEH5GIMN_js=require('./chunk-PEH5GIMN.js'),chunkUNKXYVXY_js=require('./chunk-UNKXYVXY.js'),chunkGVANK6PL_js=require('./chunk-GVANK6PL.js');require('./chunk-EPF7J2FK.js');var chunkJZKH5RMC_js=require('./chunk-JZKH5RMC.js');require('./chunk-DQLDX5X6.js'),require('./chunk-LU4PFST7.js'),require('./chunk-E64TU6IU.js'),require('./chunk-UK656RCG.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a})=>{let u=t!=null?t:[...q,...d];return jsxRuntime.jsx(chunkUOSEH6DC_js.a,{options:u,onSave:f=>{p&&p.save(f),a==null||a(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkPEH5GIMN_js.a,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkGVANK6PL_js.a,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsxRuntime.jsx(chunkJZKH5RMC_js.a,chunkMQFZHA2D_js.a({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=react.useState({}),[u,y]=react.useState(0),f=(i,T)=>{a(B=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsxRuntime.jsx(chunkUNKXYVXY_js.a,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkER7X6E36_js.a,{activities:s,onAddActivity:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkCL53OI3I_js.a,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(d!=null?d:Z);react.useEffect(()=>{if(!t)return;let e=false;return chunkMQFZHA2D_js.d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkUZ5EZOA7_js.a,{ropa:s,onAddRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=chunkMQFZHA2D_js.c(l,["input"]);let s=chunkVDZKGCAF_js.a(d);return jsxRuntime.jsx(chunkV37BM2LF_js.a,chunkMQFZHA2D_js.a({report:s},t))};exports.NDPRBreachReport=U;exports.NDPRComplianceDashboard=re;exports.NDPRConsent=O;exports.NDPRCrossBorder=V;exports.NDPRDPIA=z;exports.NDPRLawfulBasis=H;exports.NDPRPrivacyPolicy=E;exports.NDPRROPA=ee;exports.NDPRSubjectRights=k;//# sourceMappingURL=presets.js.map
|
|
2
2
|
//# sourceMappingURL=presets.js.map
|
package/dist/presets.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$a}from'./chunk-3UWT64FI.mjs';import {a as a$5}from'./chunk-ELKEZEV5.mjs';import {a as a$7}from'./chunk-4JUDKBA2.mjs';import {a as a$8}from'./chunk-4VVARDN2.mjs';import {a as a$9}from'./chunk-GPJVTGHR.mjs';import'./chunk-TXBZPCGF.mjs';import'./chunk-QKK5S54L.mjs';import'./chunk-PYEX7DFR.mjs';import {a}from'./chunk-7F5F5YWI.mjs';import {a as a$1}from'./chunk-6D3ZUGBB.mjs';import {a as a$4}from'./chunk-V3MXWGXU.mjs';import {a as a$2}from'./chunk-3XAUN5IM.mjs';import'./chunk-FXTZDKDC.mjs';import {a as a$3}from'./chunk-KNE4NXCY.mjs';import {c,b}from'./chunk-CAB7O3GR.mjs';import'./chunk-AYKLAEOU.mjs';import {b as b$1,a as a$6,d,c as c$1}from'./chunk-WWT2ZSNU.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var L=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],I=({extraOptions:c=[],options:t,adapter:l,position:p="bottom",classNames:r,unstyled:n,onSave:a$1})=>{let u=t!=null?t:[...L,...c];return jsx(a,{options:u,onSave:f=>{l&&l.save(f),a$1==null||a$1(f);},position:p,classNames:r,unstyled:n,manageStorage:!l})};var F=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:c=F,adapter:t,classNames:l,unstyled:p,onSubmit:r=()=>{}})=>jsx(a$1,{requestTypes:c,onSubmit:a=>{t&&t.save(a),r(a);},classNames:l,unstyled:p});var E=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],M=({categories:c=E,adapter:t,classNames:l,unstyled:p,onSubmit:r=()=>{}})=>jsx(a$2,{categories:c,onSubmit:a=>{t&&t.save(a),r(a);},classNames:l,unstyled:p});var G=({sections:c$1=b,variables:t=c,adapter:l,classNames:p,unstyled:r,onGenerate:n=()=>{}})=>jsx(a$3,{sections:c$1,variables:t,onGenerate:u=>{l&&l.save(u),n(u);},classNames:p,unstyled:r});var V=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],j=({sections:c=V,adapter:t,classNames:l,unstyled:p,onComplete:r=()=>{}})=>{let[n,a]=useState({}),[u,y]=useState(0),f=(i,q)=>{a(O=>b$1(a$6({},O),{[i]:q}));},e=()=>{u<c.length-1?y(i=>i+1):(t&&t.save(n),r(n));},s=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/c.length*100);return jsx(a$4,{sections:c,answers:n,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:s,progress:o,classNames:l,unstyled:p})};var H=({initialActivities:c=[],adapter:t,classNames:l,unstyled:p})=>{let[r,n]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return c}),a=e=>{t&&t.save(e);};return jsx(a$5,{activities:r,onAddActivity:e=>{let s=Date.now(),o=b$1(a$6({},e),{id:`activity-${s}`,createdAt:s,updatedAt:s}),i=[...r,o];n(i),a(i);},onUpdateActivity:(e,s)=>{let o=r.map(i=>i.id===e?b$1(a$6(a$6({},i),s),{updatedAt:Date.now()}):i);n(o),a(o);},onArchiveActivity:e=>{let s=r.map(o=>o.id===e?b$1(a$6({},o),{status:"inactive",updatedAt:Date.now()}):o);n(s),a(s);},classNames:l,unstyled:p})};var K=({initialTransfers:c=[],adapter:t,classNames:l,unstyled:p})=>{let[r,n]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return c}),a=e=>{t&&t.save(e);};return jsx(a$7,{transfers:r,onAddTransfer:e=>{let s=Date.now(),o=b$1(a$6({},e),{id:`transfer-${s}`,createdAt:s,updatedAt:s}),i=[...r,o];n(i),a(i);},onUpdateTransfer:(e,s)=>{let o=r.map(i=>i.id===e?b$1(a$6(a$6({},i),s),{updatedAt:Date.now()}):i);n(o),a(o);},onRemoveTransfer:e=>{let s=r.filter(o=>o.id!==e);n(s),a(s);},classNames:l,unstyled:p})};var te={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},re=({initialData:c,adapter:t,classNames:l,unstyled:p})=>{let[r,n]=useState(c!=null?c:te);useEffect(()=>{if(!t)return;let e=false;return d(null,null,function*(){let o=yield t.load();!e&&o&&n(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsx(a$8,{ropa:r,onAddRecord:e=>{let s=b$1(a$6({},r),{records:[...r.records,e],lastUpdated:Date.now()});n(s),a(s);},onUpdateRecord:(e,s)=>{let o=b$1(a$6({},r),{records:r.records.map(i=>i.id===e?b$1(a$6(a$6({},i),s),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});n(o),a(o);},onArchiveRecord:e=>{let s=b$1(a$6({},r),{records:r.records.map(o=>o.id===e?b$1(a$6({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});n(s),a(s);},classNames:l,unstyled:p})};var oe=l=>{var p=l,{input:c}=p,t=c$1(p,["input"]);let r=a$9(c);return jsx(a$a,a$6({report:r},t))};export{M as NDPRBreachReport,oe as NDPRComplianceDashboard,I as NDPRConsent,K as NDPRCrossBorder,j as NDPRDPIA,H as NDPRLawfulBasis,G as NDPRPrivacyPolicy,re as NDPRROPA,k as NDPRSubjectRights};//# sourceMappingURL=presets.mjs.map
|
|
1
|
+
import {a as a$a}from'./chunk-3UWT64FI.mjs';import {a as a$6}from'./chunk-ELKEZEV5.mjs';import {a as a$7}from'./chunk-4JUDKBA2.mjs';import {a as a$8}from'./chunk-4VVARDN2.mjs';import {a as a$9}from'./chunk-GPJVTGHR.mjs';import'./chunk-TXBZPCGF.mjs';import'./chunk-QKK5S54L.mjs';import'./chunk-PYEX7DFR.mjs';import {a}from'./chunk-7F5F5YWI.mjs';import {a as a$1}from'./chunk-6D3ZUGBB.mjs';import {a as a$5}from'./chunk-V3MXWGXU.mjs';import {a as a$2}from'./chunk-3XAUN5IM.mjs';import'./chunk-FXTZDKDC.mjs';import {a as a$3}from'./chunk-ZQSX5ZHB.mjs';import'./chunk-TKBZRULW.mjs';import'./chunk-GCQRHMTQ.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-SBNAMPAP.mjs';import {a as a$4,b,d,c}from'./chunk-WWT2ZSNU.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a$1})=>{let u=t!=null?t:[...q,...d];return jsx(a,{options:u,onSave:f=>{p&&p.save(f),a$1==null||a$1(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$1,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$2,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsx(a$3,a$4({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=useState({}),[u,y]=useState(0),f=(i,T)=>{a(B=>b(a$4({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsx(a$5,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$6,{activities:s,onAddActivity:e=>{let r=Date.now(),o=b(a$4({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?b(a$4({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$7,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=b(a$4({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d$1,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(d$1!=null?d$1:Z);useEffect(()=>{if(!t)return;let e=false;return d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsx(a$8,{ropa:s,onAddRecord:e=>{let r=b(a$4({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=b(a$4({},s),{records:s.records.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=b(a$4({},s),{records:s.records.map(o=>o.id===e?b(a$4({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=c(l,["input"]);let s=a$9(d);return jsx(a$a,a$4({report:s},t))};export{U as NDPRBreachReport,re as NDPRComplianceDashboard,O as NDPRConsent,V as NDPRCrossBorder,z as NDPRDPIA,H as NDPRLawfulBasis,E as NDPRPrivacyPolicy,ee as NDPRROPA,k as NDPRSubjectRights};//# sourceMappingURL=presets.mjs.map
|
|
2
2
|
//# sourceMappingURL=presets.mjs.map
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Locale strings for all toolkit components.
|
|
5
|
+
* Pass partial overrides — missing keys fall back to English defaults.
|
|
6
|
+
*/
|
|
7
|
+
interface NDPRLocale {
|
|
8
|
+
consent?: {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
acceptAll?: string;
|
|
12
|
+
rejectAll?: string;
|
|
13
|
+
customize?: string;
|
|
14
|
+
savePreferences?: string;
|
|
15
|
+
selectAll?: string;
|
|
16
|
+
deselectAll?: string;
|
|
17
|
+
required?: string;
|
|
18
|
+
cookieNotice?: string;
|
|
19
|
+
};
|
|
20
|
+
dsr?: {
|
|
21
|
+
title?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
submitRequest?: string;
|
|
24
|
+
reset?: string;
|
|
25
|
+
fullName?: string;
|
|
26
|
+
email?: string;
|
|
27
|
+
phone?: string;
|
|
28
|
+
requestType?: string;
|
|
29
|
+
additionalInfo?: string;
|
|
30
|
+
identityVerification?: string;
|
|
31
|
+
identifierType?: string;
|
|
32
|
+
identifierValue?: string;
|
|
33
|
+
privacyNotice?: string;
|
|
34
|
+
successMessage?: string;
|
|
35
|
+
};
|
|
36
|
+
breach?: {
|
|
37
|
+
title?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
submitReport?: string;
|
|
40
|
+
breachTitle?: string;
|
|
41
|
+
category?: string;
|
|
42
|
+
discoveredAt?: string;
|
|
43
|
+
detailedDescription?: string;
|
|
44
|
+
};
|
|
45
|
+
dpia?: {
|
|
46
|
+
title?: string;
|
|
47
|
+
next?: string;
|
|
48
|
+
previous?: string;
|
|
49
|
+
complete?: string;
|
|
50
|
+
progress?: string;
|
|
51
|
+
};
|
|
52
|
+
policy?: {
|
|
53
|
+
title?: string;
|
|
54
|
+
generate?: string;
|
|
55
|
+
preview?: string;
|
|
56
|
+
export?: string;
|
|
57
|
+
sections?: string;
|
|
58
|
+
variables?: string;
|
|
59
|
+
};
|
|
60
|
+
compliance?: {
|
|
61
|
+
score?: string;
|
|
62
|
+
excellent?: string;
|
|
63
|
+
good?: string;
|
|
64
|
+
needsWork?: string;
|
|
65
|
+
critical?: string;
|
|
66
|
+
recommendations?: string;
|
|
67
|
+
passed?: string;
|
|
68
|
+
gaps?: string;
|
|
69
|
+
};
|
|
70
|
+
common?: {
|
|
71
|
+
loading?: string;
|
|
72
|
+
error?: string;
|
|
73
|
+
save?: string;
|
|
74
|
+
cancel?: string;
|
|
75
|
+
delete?: string;
|
|
76
|
+
edit?: string;
|
|
77
|
+
add?: string;
|
|
78
|
+
back?: string;
|
|
79
|
+
next?: string;
|
|
80
|
+
search?: string;
|
|
81
|
+
noResults?: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare const defaultLocale: Required<{
|
|
86
|
+
[K in keyof NDPRLocale]: Required<NonNullable<NDPRLocale[K]>>;
|
|
87
|
+
}>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Configuration for the NDPR toolkit provider.
|
|
91
|
+
*/
|
|
92
|
+
interface NDPRConfig {
|
|
93
|
+
/** The official name of the organisation */
|
|
94
|
+
organizationName?: string;
|
|
95
|
+
/** Email address of the Data Protection Officer */
|
|
96
|
+
dpoEmail?: string;
|
|
97
|
+
/** NDPC registration number, if registered */
|
|
98
|
+
ndpcRegistrationNumber?: string;
|
|
99
|
+
/** Prefix for localStorage/sessionStorage keys used by toolkit components */
|
|
100
|
+
storageKeyPrefix?: string;
|
|
101
|
+
/** When true, removes all default styles from toolkit components */
|
|
102
|
+
unstyled?: boolean;
|
|
103
|
+
/** Theme overrides applied as CSS custom properties */
|
|
104
|
+
theme?: {
|
|
105
|
+
/** Primary brand colour (e.g. "#0070f3") */
|
|
106
|
+
primary?: string;
|
|
107
|
+
/** Hover state for primary colour */
|
|
108
|
+
primaryHover?: string;
|
|
109
|
+
/** Foreground colour used on primary backgrounds */
|
|
110
|
+
primaryForeground?: string;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* Locale strings for all toolkit components.
|
|
114
|
+
* Pass partial overrides — missing keys fall back to English defaults.
|
|
115
|
+
*/
|
|
116
|
+
locale?: NDPRLocale;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Provides NDPR configuration to all descendant toolkit components.
|
|
120
|
+
*
|
|
121
|
+
* When a `theme` is supplied, the corresponding CSS custom properties
|
|
122
|
+
* (`--ndpr-primary`, `--ndpr-primary-hover`, `--ndpr-primary-foreground`)
|
|
123
|
+
* are set on the wrapping element so components can reference them.
|
|
124
|
+
*/
|
|
125
|
+
declare const NDPRProvider: React__default.FC<NDPRConfig & {
|
|
126
|
+
children: React__default.ReactNode;
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Returns the current NDPR configuration from the nearest `NDPRProvider`.
|
|
130
|
+
* If no provider is found, returns an empty config object.
|
|
131
|
+
*/
|
|
132
|
+
declare function useNDPRConfig(): NDPRConfig;
|
|
133
|
+
/**
|
|
134
|
+
* Returns the resolved locale for the nearest `NDPRProvider`.
|
|
135
|
+
* Merges any partial `locale` prop with the default English strings,
|
|
136
|
+
* so all keys are always present and non-nullable.
|
|
137
|
+
*/
|
|
138
|
+
declare function useNDPRLocale(): typeof defaultLocale;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Sanitizes user input to prevent XSS attacks.
|
|
142
|
+
* Escapes HTML special characters so that data rendered in dashboards
|
|
143
|
+
* or other consumer UIs cannot execute embedded scripts.
|
|
144
|
+
*/
|
|
145
|
+
declare function sanitizeInput(input: string): string;
|
|
146
|
+
|
|
147
|
+
export { type NDPRConfig as N, NDPRProvider as a, type NDPRLocale as b, useNDPRLocale as c, defaultLocale as d, sanitizeInput as s, useNDPRConfig as u };
|