@tantainnovative/ndpr-toolkit 3.7.0 → 3.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +200 -0
  2. package/README.md +146 -1
  3. package/dist/{chunk-SJRIOZ4K.mjs → chunk-EFIWANHF.mjs} +1 -1
  4. package/dist/chunk-GQYBS3A7.mjs +0 -0
  5. package/dist/chunk-OZCNFB5C.js +1 -0
  6. package/dist/{chunk-RXZFYBUJ.js → chunk-XS3Z4UT7.js} +1 -1
  7. package/dist/core.js +1 -1
  8. package/dist/core.mjs +1 -1
  9. package/dist/cross-border-lite.d.mts +141 -0
  10. package/dist/cross-border-lite.d.ts +141 -0
  11. package/dist/cross-border-lite.js +2 -0
  12. package/dist/cross-border-lite.mjs +2 -0
  13. package/dist/dsr.js +1 -1
  14. package/dist/dsr.mjs +1 -1
  15. package/dist/headless.d.mts +2391 -0
  16. package/dist/headless.d.ts +2391 -0
  17. package/dist/headless.js +2 -0
  18. package/dist/headless.mjs +2 -0
  19. package/dist/hooks.js +1 -1
  20. package/dist/hooks.mjs +1 -1
  21. package/dist/index.d.mts +123 -0
  22. package/dist/index.d.ts +123 -0
  23. package/dist/index.js +1 -1
  24. package/dist/index.mjs +1 -1
  25. package/dist/lawful-basis-lite.d.mts +153 -0
  26. package/dist/lawful-basis-lite.d.ts +153 -0
  27. package/dist/lawful-basis-lite.js +2 -0
  28. package/dist/lawful-basis-lite.mjs +2 -0
  29. package/dist/presets-dsr.d.mts +25 -0
  30. package/dist/presets-dsr.d.ts +25 -0
  31. package/dist/presets-dsr.js +1 -1
  32. package/dist/presets-dsr.mjs +1 -1
  33. package/dist/presets.d.mts +25 -0
  34. package/dist/presets.d.ts +25 -0
  35. package/dist/presets.js +1 -1
  36. package/dist/presets.mjs +1 -1
  37. package/dist/ropa-lite.d.mts +218 -0
  38. package/dist/ropa-lite.d.ts +218 -0
  39. package/dist/ropa-lite.js +2 -0
  40. package/dist/ropa-lite.mjs +2 -0
  41. package/dist/server.js +1 -1
  42. package/dist/server.mjs +1 -1
  43. package/package.json +3 -2
@@ -0,0 +1,153 @@
1
+ import React__default from 'react';
2
+
3
+ /**
4
+ * Analyzes all processing activities and returns compliance gaps including
5
+ * missing DPO approval, overdue reviews, undocumented justifications,
6
+ * missing LIA for legitimate interests, and other documentation issues.
7
+ *
8
+ * @param activities Array of processing activities to analyze
9
+ * @returns Array of identified compliance gaps
10
+ */
11
+ export declare function assessComplianceGaps(activities: ProcessingActivity[]): LawfulBasisComplianceGap[];
12
+
13
+ /**
14
+ * Generates a summary of all lawful basis documentation across processing activities.
15
+ *
16
+ * @param activities Array of processing activities to summarize
17
+ * @returns LawfulBasisSummary with counts, breakdowns, and flagged activities
18
+ */
19
+ export declare function generateLawfulBasisSummary(activities: ProcessingActivity[]): LawfulBasisSummary;
20
+
21
+ /**
22
+ * Compliance gap identified across processing activities
23
+ */
24
+ export declare interface LawfulBasisComplianceGap {
25
+ activityId: string;
26
+ activityName: string;
27
+ type: 'missing_approval' | 'overdue_review' | 'missing_justification' | 'missing_lia' | 'missing_sensitive_condition' | 'missing_retention' | 'missing_data_categories' | 'missing_purposes';
28
+ severity: 'high' | 'medium' | 'low';
29
+ description: string;
30
+ }
31
+
32
+ /**
33
+ * Summary of all lawful basis documentation for compliance reporting
34
+ */
35
+ export declare interface LawfulBasisSummary {
36
+ /** Total number of processing activities */
37
+ totalActivities: number;
38
+ /** Breakdown by lawful basis */
39
+ byBasis: Record<LawfulBasisType, number>;
40
+ /** Number of activities involving sensitive data */
41
+ sensitiveDataActivities: number;
42
+ /** Number of activities involving cross-border transfers */
43
+ crossBorderActivities: number;
44
+ /** Activities due for review */
45
+ activitiesDueForReview: ProcessingActivity[];
46
+ /** Activities without DPO approval */
47
+ activitiesWithoutApproval: ProcessingActivity[];
48
+ /** Last updated timestamp */
49
+ lastUpdated: number;
50
+ }
51
+
52
+ export declare const LawfulBasisTrackerLite: React__default.FC<LawfulBasisTrackerLiteProps>;
53
+
54
+ export declare interface LawfulBasisTrackerLiteClassNames {
55
+ root?: string;
56
+ header?: string;
57
+ title?: string;
58
+ summary?: string;
59
+ summaryCard?: string;
60
+ table?: string;
61
+ tableHeader?: string;
62
+ tableRow?: string;
63
+ statusBadge?: string;
64
+ complianceScore?: string;
65
+ gapAlert?: string;
66
+ }
67
+
68
+ export declare interface LawfulBasisTrackerLiteProps {
69
+ activities: ProcessingActivity[];
70
+ title?: string;
71
+ description?: string;
72
+ className?: string;
73
+ classNames?: LawfulBasisTrackerLiteClassNames;
74
+ unstyled?: boolean;
75
+ showSummary?: boolean;
76
+ showComplianceGaps?: boolean;
77
+ onActivityClick?: (activity: ProcessingActivity) => void;
78
+ }
79
+
80
+ /**
81
+ * Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
82
+ * Every processing activity must have a documented lawful basis
83
+ */
84
+ /**
85
+ * The six lawful bases for processing personal data per NDPA Section 25(1)
86
+ */
87
+ export declare type LawfulBasisType = 'consent' | 'contract' | 'legal_obligation' | 'vital_interests' | 'public_interest' | 'legitimate_interests';
88
+
89
+ /**
90
+ * Validation result for a processing activity
91
+ */
92
+ export declare interface LawfulBasisValidationResult {
93
+ isValid: boolean;
94
+ errors: string[];
95
+ warnings: string[];
96
+ }
97
+
98
+ /**
99
+ * Represents a processing activity and its lawful basis
100
+ */
101
+ export declare interface ProcessingActivity {
102
+ /** Unique identifier */
103
+ id: string;
104
+ /** Name of the processing activity */
105
+ name: string;
106
+ /** Description of what processing is performed */
107
+ description: string;
108
+ /** The lawful basis for this processing activity */
109
+ lawfulBasis: LawfulBasisType;
110
+ /** Justification for why this lawful basis applies */
111
+ lawfulBasisJustification: string;
112
+ /** Categories of personal data being processed */
113
+ dataCategories: string[];
114
+ /** Whether sensitive personal data is involved */
115
+ involvesSensitiveData: boolean;
116
+ /** Condition for processing sensitive data (required if involvesSensitiveData is true) */
117
+ sensitiveDataCondition?: SensitiveDataCondition;
118
+ /** Categories of data subjects */
119
+ dataSubjectCategories: string[];
120
+ /** Purposes of the processing */
121
+ purposes: string[];
122
+ /** Data retention period */
123
+ retentionPeriod: string;
124
+ /** Justification for the retention period */
125
+ retentionJustification?: string;
126
+ /** Recipients or categories of recipients */
127
+ recipients?: string[];
128
+ /** Whether data is transferred outside Nigeria */
129
+ crossBorderTransfer: boolean;
130
+ /** Timestamp when the record was created */
131
+ createdAt: number;
132
+ /** Timestamp when the record was last updated */
133
+ updatedAt: number;
134
+ /** Next review date */
135
+ reviewDate?: number;
136
+ /** Status of the processing activity */
137
+ status: 'active' | 'inactive' | 'under_review' | 'archived';
138
+ /** DPO approval details */
139
+ dpoApproval?: {
140
+ approved: boolean;
141
+ approvedBy: string;
142
+ approvedAt: number;
143
+ notes?: string;
144
+ };
145
+ }
146
+
147
+ /**
148
+ * Additional conditions required for processing sensitive personal data
149
+ * per NDPA Section 27
150
+ */
151
+ declare type SensitiveDataCondition = 'explicit_consent' | 'employment_law' | 'vital_interests_incapable' | 'nonprofit_legitimate' | 'publicly_available' | 'legal_claims' | 'substantial_public_interest' | 'health_purposes' | 'public_health' | 'archiving_research';
152
+
153
+ export { }
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ 'use strict';var chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var P={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},T={consent:"ndpr-badge ndpr-badge--info",contract:"ndpr-badge ndpr-badge--info",legal_obligation:"ndpr-badge ndpr-badge--info",vital_interests:"ndpr-badge ndpr-badge--destructive",public_interest:"ndpr-badge ndpr-badge--warning",legitimate_interests:"bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200"},D={active:"Active",inactive:"Inactive",under_review:"Under Review",archived:"Archived"},R={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--neutral",under_review:"ndpr-badge ndpr-badge--warning",archived:"ndpr-badge ndpr-badge--destructive"},G=p=>new Date(p).toLocaleDateString(),E=({activities:p,title:x="Lawful Basis Tracker",description:w="Document and track the lawful basis for each processing activity as required by NDPA 2023 Section 25.",className:_="",classNames:e,unstyled:i,showSummary:h=true,showComplianceGaps:L=true,onActivityClick:g})=>{let f=react.useMemo(()=>[...p].sort((r,d)=>d.updatedAt-r.updatedAt),[p]),l=react.useMemo(()=>chunkWZYCBW2R_js.d(p),[p]),o=react.useMemo(()=>chunkWZYCBW2R_js.c(p),[p]),c=react.useMemo(()=>o.filter(r=>r.severity==="high"),[o]),u=react.useMemo(()=>o.filter(r=>r.severity==="medium"),[o]),y=r=>jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${R[r]}`,e==null?void 0:e.statusBadge,i),children:D[r]}),A=r=>jsxRuntime.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${T[r]}`,children:P[r]}),B=r=>r.dpoApproval?r.dpoApproval.approved?jsxRuntime.jsx("span",{className:"ndpr-badge ndpr-badge--success",children:"Approved"}):jsxRuntime.jsx("span",{className:"ndpr-badge ndpr-badge--warning",children:"Pending Approval"}):jsxRuntime.jsx("span",{className:"px-2 py-1 rounded text-xs font-medium bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400",children:"No DPO Review"}),S=()=>jsxRuntime.jsxs("div",{"data-ndpr-component":"lawful-basis-tracker-lite",className:chunkAME4HJR4_js.a("grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",e==null?void 0:e.summary,i),role:"status","aria-label":"Compliance summary",children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-alert ndpr-alert--info",e==null?void 0:e.summaryCard,i),children:[jsxRuntime.jsx("p",{className:"ndpr-stat__value ndpr-text-info",children:l.totalActivities}),jsxRuntime.jsx("p",{className:"text-sm ndpr-text-info",children:"Total Activities"})]}),jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("bg-orange-50 dark:bg-orange-900/20 p-4 rounded-lg",e==null?void 0:e.summaryCard,i),children:[jsxRuntime.jsx("p",{className:"ndpr-stat__value ndpr-text-warning",children:l.sensitiveDataActivities}),jsxRuntime.jsx("p",{className:"text-sm ndpr-text-warning",children:"Sensitive Data"})]}),jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-alert ndpr-alert--info",e==null?void 0:e.summaryCard,i),children:[jsxRuntime.jsx("p",{className:"ndpr-stat__value ndpr-text-info",children:l.crossBorderActivities}),jsxRuntime.jsx("p",{className:"text-sm ndpr-text-info",children:"Cross-Border Transfers"})]}),jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-alert ndpr-alert--destructive",e==null?void 0:e.summaryCard,i),children:[jsxRuntime.jsx("p",{className:"ndpr-stat__value ndpr-text-destructive",children:l.activitiesWithoutApproval.length}),jsxRuntime.jsx("p",{className:"text-sm ndpr-text-destructive",children:"Pending Approval"})]})]}),k=()=>o.length===0?jsxRuntime.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-4 rounded-lg mb-6",role:"status","aria-label":"No compliance gaps",children:[jsxRuntime.jsx("p",{className:"text-sm ndpr-text-success font-medium",children:"No compliance gaps detected."}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-success mt-1",children:"All processing activities appear to be properly documented."})]}):jsxRuntime.jsxs("div",{className:"mb-6",role:"status","aria-label":`${o.length} compliance gaps detected`,children:[c.length>0&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("bg-red-50 dark:bg-red-900/20 p-4 rounded-lg mb-3",e==null?void 0:e.gapAlert,i),children:[jsxRuntime.jsxs("p",{className:"text-sm ndpr-text-destructive font-medium mb-2",children:["High Priority (",c.length,")"]}),jsxRuntime.jsx("ul",{className:"space-y-1",children:c.map((r,d)=>jsxRuntime.jsx("li",{className:"text-xs ndpr-text-destructive",children:r.description},d))})]}),u.length>0&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-alert ndpr-alert--warning",e==null?void 0:e.gapAlert,i),children:[jsxRuntime.jsxs("p",{className:"text-sm ndpr-text-warning font-medium mb-2",children:["Medium Priority (",u.length,")"]}),jsxRuntime.jsx("ul",{className:"space-y-1",children:u.map((r,d)=>jsxRuntime.jsx("li",{className:"text-xs ndpr-text-warning",children:r.description},d))})]})]});return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${_}`,e==null?void 0:e.root,i),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",e==null?void 0:e.header,i),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",e==null?void 0:e.title,i),children:x}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:w})]}),h&&S(),L&&k(),f.length===0?jsxRuntime.jsx("div",{className:"flex items-center justify-center h-32 bg-gray-50 dark:bg-gray-700 rounded-md",children:jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:"No processing activities found."})}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:chunkAME4HJR4_js.a("w-full text-sm text-left",e==null?void 0:e.table,i),children:[jsxRuntime.jsx("thead",{className:chunkAME4HJR4_js.a("ndpr-table__head",e==null?void 0:e.tableHeader,i),children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Activity"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"DPO Approval"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Sensitive Data"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Last Updated"})]})}),jsxRuntime.jsx("tbody",{children:f.map(r=>{let d=typeof g=="function",C=d?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),g(r));}:void 0;return jsxRuntime.jsxs("tr",{className:chunkAME4HJR4_js.a(`border-b border-gray-200 dark:border-gray-600${d?" hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer":""}`,e==null?void 0:e.tableRow,i),onClick:d?()=>g(r):void 0,onKeyDown:C,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?`View ${r.name}`:void 0,children:[jsxRuntime.jsxs("td",{className:"ndpr-table__cell",children:[jsxRuntime.jsx("span",{className:"font-medium ndpr-text-primary",children:r.name}),jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted mt-1 truncate max-w-xs",children:r.description})]}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:A(r.lawfulBasis)}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:y(r.status)}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:B(r)}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("span",{className:`text-xs ${r.involvesSensitiveData?"ndpr-text-warning font-medium":"ndpr-card__subtitle"}`,children:r.involvesSensitiveData?"Yes":"No"})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:G(r.updatedAt)})]},r.id)})})]})})]})};Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});exports.LawfulBasisTrackerLite=E;
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ import {d,c}from'./chunk-LWIKDDSU.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary}from'./chunk-LWIKDDSU.mjs';import {a}from'./chunk-SFGW37LE.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var P={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},T={consent:"ndpr-badge ndpr-badge--info",contract:"ndpr-badge ndpr-badge--info",legal_obligation:"ndpr-badge ndpr-badge--info",vital_interests:"ndpr-badge ndpr-badge--destructive",public_interest:"ndpr-badge ndpr-badge--warning",legitimate_interests:"bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200"},D={active:"Active",inactive:"Inactive",under_review:"Under Review",archived:"Archived"},R={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--neutral",under_review:"ndpr-badge ndpr-badge--warning",archived:"ndpr-badge ndpr-badge--destructive"},G=p=>new Date(p).toLocaleDateString(),E=({activities:p,title:x="Lawful Basis Tracker",description:w="Document and track the lawful basis for each processing activity as required by NDPA 2023 Section 25.",className:_="",classNames:e,unstyled:i,showSummary:h=true,showComplianceGaps:L=true,onActivityClick:g})=>{let f=useMemo(()=>[...p].sort((r,d)=>d.updatedAt-r.updatedAt),[p]),l=useMemo(()=>d(p),[p]),o=useMemo(()=>c(p),[p]),c$1=useMemo(()=>o.filter(r=>r.severity==="high"),[o]),u=useMemo(()=>o.filter(r=>r.severity==="medium"),[o]),y=r=>jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${R[r]}`,e==null?void 0:e.statusBadge,i),children:D[r]}),A=r=>jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${T[r]}`,children:P[r]}),B=r=>r.dpoApproval?r.dpoApproval.approved?jsx("span",{className:"ndpr-badge ndpr-badge--success",children:"Approved"}):jsx("span",{className:"ndpr-badge ndpr-badge--warning",children:"Pending Approval"}):jsx("span",{className:"px-2 py-1 rounded text-xs font-medium bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400",children:"No DPO Review"}),S=()=>jsxs("div",{"data-ndpr-component":"lawful-basis-tracker-lite",className:a("grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",e==null?void 0:e.summary,i),role:"status","aria-label":"Compliance summary",children:[jsxs("div",{className:a("ndpr-alert ndpr-alert--info",e==null?void 0:e.summaryCard,i),children:[jsx("p",{className:"ndpr-stat__value ndpr-text-info",children:l.totalActivities}),jsx("p",{className:"text-sm ndpr-text-info",children:"Total Activities"})]}),jsxs("div",{className:a("bg-orange-50 dark:bg-orange-900/20 p-4 rounded-lg",e==null?void 0:e.summaryCard,i),children:[jsx("p",{className:"ndpr-stat__value ndpr-text-warning",children:l.sensitiveDataActivities}),jsx("p",{className:"text-sm ndpr-text-warning",children:"Sensitive Data"})]}),jsxs("div",{className:a("ndpr-alert ndpr-alert--info",e==null?void 0:e.summaryCard,i),children:[jsx("p",{className:"ndpr-stat__value ndpr-text-info",children:l.crossBorderActivities}),jsx("p",{className:"text-sm ndpr-text-info",children:"Cross-Border Transfers"})]}),jsxs("div",{className:a("ndpr-alert ndpr-alert--destructive",e==null?void 0:e.summaryCard,i),children:[jsx("p",{className:"ndpr-stat__value ndpr-text-destructive",children:l.activitiesWithoutApproval.length}),jsx("p",{className:"text-sm ndpr-text-destructive",children:"Pending Approval"})]})]}),k=()=>o.length===0?jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-4 rounded-lg mb-6",role:"status","aria-label":"No compliance gaps",children:[jsx("p",{className:"text-sm ndpr-text-success font-medium",children:"No compliance gaps detected."}),jsx("p",{className:"text-xs ndpr-text-success mt-1",children:"All processing activities appear to be properly documented."})]}):jsxs("div",{className:"mb-6",role:"status","aria-label":`${o.length} compliance gaps detected`,children:[c$1.length>0&&jsxs("div",{className:a("bg-red-50 dark:bg-red-900/20 p-4 rounded-lg mb-3",e==null?void 0:e.gapAlert,i),children:[jsxs("p",{className:"text-sm ndpr-text-destructive font-medium mb-2",children:["High Priority (",c$1.length,")"]}),jsx("ul",{className:"space-y-1",children:c$1.map((r,d)=>jsx("li",{className:"text-xs ndpr-text-destructive",children:r.description},d))})]}),u.length>0&&jsxs("div",{className:a("ndpr-alert ndpr-alert--warning",e==null?void 0:e.gapAlert,i),children:[jsxs("p",{className:"text-sm ndpr-text-warning font-medium mb-2",children:["Medium Priority (",u.length,")"]}),jsx("ul",{className:"space-y-1",children:u.map((r,d)=>jsx("li",{className:"text-xs ndpr-text-warning",children:r.description},d))})]})]});return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${_}`,e==null?void 0:e.root,i),children:[jsxs("div",{className:a("",e==null?void 0:e.header,i),children:[jsx("h2",{className:a("ndpr-section-heading",e==null?void 0:e.title,i),children:x}),jsx("p",{className:"ndpr-card__subtitle",children:w})]}),h&&S(),L&&k(),f.length===0?jsx("div",{className:"flex items-center justify-center h-32 bg-gray-50 dark:bg-gray-700 rounded-md",children:jsx("p",{className:"ndpr-card__subtitle",children:"No processing activities found."})}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:a("w-full text-sm text-left",e==null?void 0:e.table,i),children:[jsx("thead",{className:a("ndpr-table__head",e==null?void 0:e.tableHeader,i),children:jsxs("tr",{children:[jsx("th",{className:"ndpr-table__cell",children:"Activity"}),jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsx("th",{className:"ndpr-table__cell",children:"DPO Approval"}),jsx("th",{className:"ndpr-table__cell",children:"Sensitive Data"}),jsx("th",{className:"ndpr-table__cell",children:"Last Updated"})]})}),jsx("tbody",{children:f.map(r=>{let d=typeof g=="function",C=d?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),g(r));}:void 0;return jsxs("tr",{className:a(`border-b border-gray-200 dark:border-gray-600${d?" hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer":""}`,e==null?void 0:e.tableRow,i),onClick:d?()=>g(r):void 0,onKeyDown:C,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?`View ${r.name}`:void 0,children:[jsxs("td",{className:"ndpr-table__cell",children:[jsx("span",{className:"font-medium ndpr-text-primary",children:r.name}),jsx("p",{className:"text-xs ndpr-text-muted mt-1 truncate max-w-xs",children:r.description})]}),jsx("td",{className:"ndpr-table__cell",children:A(r.lawfulBasis)}),jsx("td",{className:"ndpr-table__cell",children:y(r.status)}),jsx("td",{className:"ndpr-table__cell",children:B(r)}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:`text-xs ${r.involvesSensitiveData?"ndpr-text-warning font-medium":"ndpr-card__subtitle"}`,children:r.involvesSensitiveData?"Yes":"No"})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:G(r.updatedAt)})]},r.id)})})]})})]})};export{E as LawfulBasisTrackerLite};
@@ -85,6 +85,31 @@ export declare interface NDPRSubjectRightsProps {
85
85
  error?: unknown;
86
86
  response?: Response;
87
87
  }) => void;
88
+ /**
89
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
90
+ * `Response` object, the submitted `DSRFormSubmission` payload, and the
91
+ * parsed JSON body if the server returned valid JSON. Use this to
92
+ * display a server-generated reference number, redirect the user, or
93
+ * trigger analytics.
94
+ *
95
+ * The `body` field is `undefined` if the response had no body or the
96
+ * body was not valid JSON. It is typed `unknown` to force consumers to
97
+ * narrow it themselves before reading fields.
98
+ *
99
+ * @example
100
+ * <NDPRSubjectRights
101
+ * submitTo="/api/dsr"
102
+ * onSubmitSuccess={({ response, data, body }) => {
103
+ * const ref = (body as { referenceId?: string })?.referenceId;
104
+ * if (ref) router.push(`/dsr-confirmation?ref=${ref}`);
105
+ * }}
106
+ * />
107
+ */
108
+ onSubmitSuccess?: (ctx: {
109
+ response: Response;
110
+ data: DSRFormSubmission;
111
+ body?: unknown;
112
+ }) => void;
88
113
  }
89
114
 
90
115
  /**
@@ -85,6 +85,31 @@ export declare interface NDPRSubjectRightsProps {
85
85
  error?: unknown;
86
86
  response?: Response;
87
87
  }) => void;
88
+ /**
89
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
90
+ * `Response` object, the submitted `DSRFormSubmission` payload, and the
91
+ * parsed JSON body if the server returned valid JSON. Use this to
92
+ * display a server-generated reference number, redirect the user, or
93
+ * trigger analytics.
94
+ *
95
+ * The `body` field is `undefined` if the response had no body or the
96
+ * body was not valid JSON. It is typed `unknown` to force consumers to
97
+ * narrow it themselves before reading fields.
98
+ *
99
+ * @example
100
+ * <NDPRSubjectRights
101
+ * submitTo="/api/dsr"
102
+ * onSubmitSuccess={({ response, data, body }) => {
103
+ * const ref = (body as { referenceId?: string })?.referenceId;
104
+ * if (ref) router.push(`/dsr-confirmation?ref=${ref}`);
105
+ * }}
106
+ * />
107
+ */
108
+ onSubmitSuccess?: (ctx: {
109
+ response: Response;
110
+ data: DSRFormSubmission;
111
+ body?: unknown;
112
+ }) => void;
88
113
  }
89
114
 
90
115
  /**
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkRXZFYBUJ_js=require('./chunk-RXZFYBUJ.js');require('./chunk-W47OSMT6.js'),require('./chunk-UXUMYP4L.js'),require('./chunk-AME4HJR4.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"NDPRSubjectRights",{enumerable:true,get:function(){return chunkRXZFYBUJ_js.a}});
2
+ 'use strict';var chunkXS3Z4UT7_js=require('./chunk-XS3Z4UT7.js');require('./chunk-W47OSMT6.js'),require('./chunk-UXUMYP4L.js'),require('./chunk-AME4HJR4.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"NDPRSubjectRights",{enumerable:true,get:function(){return chunkXS3Z4UT7_js.a}});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{a as NDPRSubjectRights}from'./chunk-SJRIOZ4K.mjs';import'./chunk-XJO4DH3L.mjs';import'./chunk-EWVK45Z3.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-ZJYULEER.mjs';
2
+ export{a as NDPRSubjectRights}from'./chunk-EFIWANHF.mjs';import'./chunk-XJO4DH3L.mjs';import'./chunk-EWVK45Z3.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-ZJYULEER.mjs';
@@ -761,6 +761,31 @@ export declare interface NDPRSubjectRightsProps {
761
761
  error?: unknown;
762
762
  response?: Response;
763
763
  }) => void;
764
+ /**
765
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
766
+ * `Response` object, the submitted `DSRFormSubmission` payload, and the
767
+ * parsed JSON body if the server returned valid JSON. Use this to
768
+ * display a server-generated reference number, redirect the user, or
769
+ * trigger analytics.
770
+ *
771
+ * The `body` field is `undefined` if the response had no body or the
772
+ * body was not valid JSON. It is typed `unknown` to force consumers to
773
+ * narrow it themselves before reading fields.
774
+ *
775
+ * @example
776
+ * <NDPRSubjectRights
777
+ * submitTo="/api/dsr"
778
+ * onSubmitSuccess={({ response, data, body }) => {
779
+ * const ref = (body as { referenceId?: string })?.referenceId;
780
+ * if (ref) router.push(`/dsr-confirmation?ref=${ref}`);
781
+ * }}
782
+ * />
783
+ */
784
+ onSubmitSuccess?: (ctx: {
785
+ response: Response;
786
+ data: DSRFormSubmission;
787
+ body?: unknown;
788
+ }) => void;
764
789
  }
765
790
 
766
791
  /**
package/dist/presets.d.ts CHANGED
@@ -761,6 +761,31 @@ export declare interface NDPRSubjectRightsProps {
761
761
  error?: unknown;
762
762
  response?: Response;
763
763
  }) => void;
764
+ /**
765
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
766
+ * `Response` object, the submitted `DSRFormSubmission` payload, and the
767
+ * parsed JSON body if the server returned valid JSON. Use this to
768
+ * display a server-generated reference number, redirect the user, or
769
+ * trigger analytics.
770
+ *
771
+ * The `body` field is `undefined` if the response had no body or the
772
+ * body was not valid JSON. It is typed `unknown` to force consumers to
773
+ * narrow it themselves before reading fields.
774
+ *
775
+ * @example
776
+ * <NDPRSubjectRights
777
+ * submitTo="/api/dsr"
778
+ * onSubmitSuccess={({ response, data, body }) => {
779
+ * const ref = (body as { referenceId?: string })?.referenceId;
780
+ * if (ref) router.push(`/dsr-confirmation?ref=${ref}`);
781
+ * }}
782
+ * />
783
+ */
784
+ onSubmitSuccess?: (ctx: {
785
+ response: Response;
786
+ data: DSRFormSubmission;
787
+ body?: unknown;
788
+ }) => void;
764
789
  }
765
790
 
766
791
  /**
package/dist/presets.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunk5IOC3VAW_js=require('./chunk-5IOC3VAW.js');require('./chunk-W7OLQRJP.js');var chunkV3RYHNHN_js=require('./chunk-V3RYHNHN.js'),chunkRXZFYBUJ_js=require('./chunk-RXZFYBUJ.js'),chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkPZRQWPWD_js=require('./chunk-PZRQWPWD.js'),chunkI3Y4LOSL_js=require('./chunk-I3Y4LOSL.js'),chunk5GVMKUMP_js=require('./chunk-5GVMKUMP.js');require('./chunk-3GRGYT3P.js'),require('./chunk-HXWHL4BD.js'),require('./chunk-N3MQQUQP.js');var chunkQPRYXVH2_js=require('./chunk-QPRYXVH2.js');require('./chunk-Q64735OC.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-4CVBQC66.js'),require('./chunk-732C2EVN.js'),require('./chunk-L2VO3MEJ.js'),require('./chunk-W47OSMT6.js');var chunkWDDCKYWA_js=require('./chunk-WDDCKYWA.js'),chunkS6COXIZA_js=require('./chunk-S6COXIZA.js');require('./chunk-UXUMYP4L.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var L=[{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"}],I=({categories:c=L,adapter:s,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsxRuntime.jsx(chunkS6COXIZA_js.a,{categories:c,onSubmit:d=>{s&&s.save(d),o(d);},classNames:u,unstyled:p});var k=[{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"}]}]}],_=({sections:c=k,adapter:s,classNames:u,unstyled:p,onComplete:o=()=>{}})=>{let[n,d]=react.useState({}),[m,f]=react.useState(0),P=(a,C)=>{d(S=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},S),{[a]:C}));},e=()=>{m<c.length-1?f(a=>a+1):(s&&s.save(n),o(n));},t=()=>{m>0&&f(a=>a-1);},r=Math.round((m+1)/c.length*100);return jsxRuntime.jsx(chunkWDDCKYWA_js.a,{sections:c,answers:n,onAnswerChange:P,currentSectionIndex:m,onNextSection:e,onPrevSection:t,progress:r,classNames:u,unstyled:p})};var F=({initialActivities:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunkPZRQWPWD_js.a,{activities:o,onAddActivity:e=>{let t=Date.now(),r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateActivity:(e,t)=>{let r=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onArchiveActivity:e=>{let t=o.map(r=>r.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{status:"inactive",updatedAt:Date.now()}):r);n(t),d(t);},classNames:u,unstyled:p})};var W=({initialTransfers:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunkI3Y4LOSL_js.a,{transfers:o,onAddTransfer:e=>{let t=Date.now(),r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateTransfer:(e,t)=>{let r=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onRemoveTransfer:e=>{let t=o.filter(r=>r.id!==e);n(t),d(t);},classNames:u,unstyled:p})};var j={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},V=({initialData:c,adapter:s,classNames:u,unstyled:p})=>{let[o,n]=react.useState(c!=null?c:j);react.useEffect(()=>{if(!s)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){let r=yield s.load();!e&&r&&n(r);}),()=>{e=true;}},[s]);let d=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunk5GVMKUMP_js.a,{ropa:o,onAddRecord:e=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:[...o.records,e],lastUpdated:Date.now()});n(t),d(t);},onUpdateRecord:(e,t)=>{let r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:o.records.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a),lastUpdated:Date.now()});n(r),d(r);},onArchiveRecord:e=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:o.records.map(r=>r.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{status:"archived",updatedAt:Date.now()}):r),lastUpdated:Date.now()});n(t),d(t);},classNames:u,unstyled:p})};var G=u=>{var p=u,{input:c}=p,s=chunkRFPLZDIO_js.c(p,["input"]);let o=chunkQPRYXVH2_js.a(c);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:o},s))};Object.defineProperty(exports,"NDPRPrivacyPolicy",{enumerable:true,get:function(){return chunk5IOC3VAW_js.a}});Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunkV3RYHNHN_js.a}});Object.defineProperty(exports,"NDPRSubjectRights",{enumerable:true,get:function(){return chunkRXZFYBUJ_js.a}});exports.NDPRBreachReport=I;exports.NDPRComplianceDashboard=G;exports.NDPRCrossBorder=W;exports.NDPRDPIA=_;exports.NDPRLawfulBasis=F;exports.NDPRROPA=V;
2
+ 'use strict';var chunkV3RYHNHN_js=require('./chunk-V3RYHNHN.js'),chunkXS3Z4UT7_js=require('./chunk-XS3Z4UT7.js'),chunk5IOC3VAW_js=require('./chunk-5IOC3VAW.js');require('./chunk-W7OLQRJP.js');var chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkS6COXIZA_js=require('./chunk-S6COXIZA.js'),chunkPZRQWPWD_js=require('./chunk-PZRQWPWD.js'),chunkI3Y4LOSL_js=require('./chunk-I3Y4LOSL.js'),chunk5GVMKUMP_js=require('./chunk-5GVMKUMP.js');require('./chunk-3GRGYT3P.js'),require('./chunk-HXWHL4BD.js'),require('./chunk-N3MQQUQP.js');var chunkQPRYXVH2_js=require('./chunk-QPRYXVH2.js');require('./chunk-Q64735OC.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js'),require('./chunk-732C2EVN.js'),require('./chunk-L2VO3MEJ.js'),require('./chunk-W47OSMT6.js'),require('./chunk-UXUMYP4L.js');var chunkWDDCKYWA_js=require('./chunk-WDDCKYWA.js');require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var L=[{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"}],I=({categories:c=L,adapter:s,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsxRuntime.jsx(chunkS6COXIZA_js.a,{categories:c,onSubmit:d=>{s&&s.save(d),o(d);},classNames:u,unstyled:p});var k=[{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"}]}]}],_=({sections:c=k,adapter:s,classNames:u,unstyled:p,onComplete:o=()=>{}})=>{let[n,d]=react.useState({}),[m,f]=react.useState(0),P=(a,C)=>{d(S=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},S),{[a]:C}));},e=()=>{m<c.length-1?f(a=>a+1):(s&&s.save(n),o(n));},t=()=>{m>0&&f(a=>a-1);},r=Math.round((m+1)/c.length*100);return jsxRuntime.jsx(chunkWDDCKYWA_js.a,{sections:c,answers:n,onAnswerChange:P,currentSectionIndex:m,onNextSection:e,onPrevSection:t,progress:r,classNames:u,unstyled:p})};var F=({initialActivities:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunkPZRQWPWD_js.a,{activities:o,onAddActivity:e=>{let t=Date.now(),r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateActivity:(e,t)=>{let r=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onArchiveActivity:e=>{let t=o.map(r=>r.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{status:"inactive",updatedAt:Date.now()}):r);n(t),d(t);},classNames:u,unstyled:p})};var W=({initialTransfers:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunkI3Y4LOSL_js.a,{transfers:o,onAddTransfer:e=>{let t=Date.now(),r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateTransfer:(e,t)=>{let r=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onRemoveTransfer:e=>{let t=o.filter(r=>r.id!==e);n(t),d(t);},classNames:u,unstyled:p})};var j={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},V=({initialData:c,adapter:s,classNames:u,unstyled:p})=>{let[o,n]=react.useState(c!=null?c:j);react.useEffect(()=>{if(!s)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){let r=yield s.load();!e&&r&&n(r);}),()=>{e=true;}},[s]);let d=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunk5GVMKUMP_js.a,{ropa:o,onAddRecord:e=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:[...o.records,e],lastUpdated:Date.now()});n(t),d(t);},onUpdateRecord:(e,t)=>{let r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:o.records.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a),lastUpdated:Date.now()});n(r),d(r);},onArchiveRecord:e=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:o.records.map(r=>r.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{status:"archived",updatedAt:Date.now()}):r),lastUpdated:Date.now()});n(t),d(t);},classNames:u,unstyled:p})};var G=u=>{var p=u,{input:c}=p,s=chunkRFPLZDIO_js.c(p,["input"]);let o=chunkQPRYXVH2_js.a(c);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:o},s))};Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunkV3RYHNHN_js.a}});Object.defineProperty(exports,"NDPRSubjectRights",{enumerable:true,get:function(){return chunkXS3Z4UT7_js.a}});Object.defineProperty(exports,"NDPRPrivacyPolicy",{enumerable:true,get:function(){return chunk5IOC3VAW_js.a}});exports.NDPRBreachReport=I;exports.NDPRComplianceDashboard=G;exports.NDPRCrossBorder=W;exports.NDPRDPIA=_;exports.NDPRLawfulBasis=F;exports.NDPRROPA=V;
package/dist/presets.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{a as NDPRPrivacyPolicy}from'./chunk-R7545FP4.mjs';import'./chunk-ATFUSHC2.mjs';export{a as NDPRConsent}from'./chunk-LTPSN2SU.mjs';export{a as NDPRSubjectRights}from'./chunk-SJRIOZ4K.mjs';import {a as a$7}from'./chunk-ZIZL37BG.mjs';import {a as a$2}from'./chunk-COD3RMTL.mjs';import {a as a$4}from'./chunk-GTYXVAJX.mjs';import {a as a$5}from'./chunk-EXEXUAF6.mjs';import'./chunk-UKLU6BQF.mjs';import'./chunk-2MIQXECH.mjs';import'./chunk-AOHKVFAS.mjs';import {a as a$6}from'./chunk-EFIBHKQE.mjs';import'./chunk-RMQ7OLNY.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-XP5PL6K7.mjs';import'./chunk-BFAX7JQA.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-XJO4DH3L.mjs';import {a as a$1}from'./chunk-ZQZJNKVB.mjs';import {a}from'./chunk-ZHFLBL63.mjs';import'./chunk-EWVK45Z3.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import {b,a as a$3,d,c}from'./chunk-ZJYULEER.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var L=[{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"}],I=({categories:c=L,adapter:s,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsx(a,{categories:c,onSubmit:d=>{s&&s.save(d),o(d);},classNames:u,unstyled:p});var k=[{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"}]}]}],_=({sections:c=k,adapter:s,classNames:u,unstyled:p,onComplete:o=()=>{}})=>{let[n,d]=useState({}),[m,f]=useState(0),P=(a,C)=>{d(S=>b(a$3({},S),{[a]:C}));},e=()=>{m<c.length-1?f(a=>a+1):(s&&s.save(n),o(n));},t=()=>{m>0&&f(a=>a-1);},r=Math.round((m+1)/c.length*100);return jsx(a$1,{sections:c,answers:n,onAnswerChange:P,currentSectionIndex:m,onNextSection:e,onPrevSection:t,progress:r,classNames:u,unstyled:p})};var F=({initialActivities:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsx(a$2,{activities:o,onAddActivity:e=>{let t=Date.now(),r=b(a$3({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateActivity:(e,t)=>{let r=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onArchiveActivity:e=>{let t=o.map(r=>r.id===e?b(a$3({},r),{status:"inactive",updatedAt:Date.now()}):r);n(t),d(t);},classNames:u,unstyled:p})};var W=({initialTransfers:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsx(a$4,{transfers:o,onAddTransfer:e=>{let t=Date.now(),r=b(a$3({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateTransfer:(e,t)=>{let r=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onRemoveTransfer:e=>{let t=o.filter(r=>r.id!==e);n(t),d(t);},classNames:u,unstyled:p})};var j={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},V=({initialData:c,adapter:s,classNames:u,unstyled:p})=>{let[o,n]=useState(c!=null?c:j);useEffect(()=>{if(!s)return;let e=false;return d(null,null,function*(){let r=yield s.load();!e&&r&&n(r);}),()=>{e=true;}},[s]);let d$1=e=>{s&&s.save(e);};return jsx(a$5,{ropa:o,onAddRecord:e=>{let t=b(a$3({},o),{records:[...o.records,e],lastUpdated:Date.now()});n(t),d$1(t);},onUpdateRecord:(e,t)=>{let r=b(a$3({},o),{records:o.records.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a),lastUpdated:Date.now()});n(r),d$1(r);},onArchiveRecord:e=>{let t=b(a$3({},o),{records:o.records.map(r=>r.id===e?b(a$3({},r),{status:"archived",updatedAt:Date.now()}):r),lastUpdated:Date.now()});n(t),d$1(t);},classNames:u,unstyled:p})};var G=u=>{var p=u,{input:c$1}=p,s=c(p,["input"]);let o=a$6(c$1);return jsx(a$7,a$3({report:o},s))};export{I as NDPRBreachReport,G as NDPRComplianceDashboard,W as NDPRCrossBorder,_ as NDPRDPIA,F as NDPRLawfulBasis,V as NDPRROPA};
2
+ export{a as NDPRConsent}from'./chunk-LTPSN2SU.mjs';export{a as NDPRSubjectRights}from'./chunk-EFIWANHF.mjs';export{a as NDPRPrivacyPolicy}from'./chunk-R7545FP4.mjs';import'./chunk-ATFUSHC2.mjs';import {a as a$7}from'./chunk-ZIZL37BG.mjs';import {a}from'./chunk-ZHFLBL63.mjs';import {a as a$2}from'./chunk-COD3RMTL.mjs';import {a as a$4}from'./chunk-GTYXVAJX.mjs';import {a as a$5}from'./chunk-EXEXUAF6.mjs';import'./chunk-UKLU6BQF.mjs';import'./chunk-2MIQXECH.mjs';import'./chunk-AOHKVFAS.mjs';import {a as a$6}from'./chunk-EFIBHKQE.mjs';import'./chunk-RMQ7OLNY.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';import'./chunk-BFAX7JQA.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-XJO4DH3L.mjs';import'./chunk-EWVK45Z3.mjs';import {a as a$1}from'./chunk-ZQZJNKVB.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import {b,a as a$3,d,c}from'./chunk-ZJYULEER.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var L=[{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"}],I=({categories:c=L,adapter:s,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsx(a,{categories:c,onSubmit:d=>{s&&s.save(d),o(d);},classNames:u,unstyled:p});var k=[{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"}]}]}],_=({sections:c=k,adapter:s,classNames:u,unstyled:p,onComplete:o=()=>{}})=>{let[n,d]=useState({}),[m,f]=useState(0),P=(a,C)=>{d(S=>b(a$3({},S),{[a]:C}));},e=()=>{m<c.length-1?f(a=>a+1):(s&&s.save(n),o(n));},t=()=>{m>0&&f(a=>a-1);},r=Math.round((m+1)/c.length*100);return jsx(a$1,{sections:c,answers:n,onAnswerChange:P,currentSectionIndex:m,onNextSection:e,onPrevSection:t,progress:r,classNames:u,unstyled:p})};var F=({initialActivities:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsx(a$2,{activities:o,onAddActivity:e=>{let t=Date.now(),r=b(a$3({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateActivity:(e,t)=>{let r=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onArchiveActivity:e=>{let t=o.map(r=>r.id===e?b(a$3({},r),{status:"inactive",updatedAt:Date.now()}):r);n(t),d(t);},classNames:u,unstyled:p})};var W=({initialTransfers:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsx(a$4,{transfers:o,onAddTransfer:e=>{let t=Date.now(),r=b(a$3({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateTransfer:(e,t)=>{let r=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onRemoveTransfer:e=>{let t=o.filter(r=>r.id!==e);n(t),d(t);},classNames:u,unstyled:p})};var j={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},V=({initialData:c,adapter:s,classNames:u,unstyled:p})=>{let[o,n]=useState(c!=null?c:j);useEffect(()=>{if(!s)return;let e=false;return d(null,null,function*(){let r=yield s.load();!e&&r&&n(r);}),()=>{e=true;}},[s]);let d$1=e=>{s&&s.save(e);};return jsx(a$5,{ropa:o,onAddRecord:e=>{let t=b(a$3({},o),{records:[...o.records,e],lastUpdated:Date.now()});n(t),d$1(t);},onUpdateRecord:(e,t)=>{let r=b(a$3({},o),{records:o.records.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a),lastUpdated:Date.now()});n(r),d$1(r);},onArchiveRecord:e=>{let t=b(a$3({},o),{records:o.records.map(r=>r.id===e?b(a$3({},r),{status:"archived",updatedAt:Date.now()}):r),lastUpdated:Date.now()});n(t),d$1(t);},classNames:u,unstyled:p})};var G=u=>{var p=u,{input:c$1}=p,s=c(p,["input"]);let o=a$6(c$1);return jsx(a$7,a$3({report:o},s))};export{I as NDPRBreachReport,G as NDPRComplianceDashboard,W as NDPRCrossBorder,_ as NDPRDPIA,F as NDPRLawfulBasis,V as NDPRROPA};