@tantainnovative/ndpr-toolkit 3.4.0 → 3.5.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.
Files changed (188) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +80 -38
  3. package/dist/adapters.d.mts +34 -25
  4. package/dist/adapters.d.ts +34 -25
  5. package/dist/breach.d.mts +803 -44
  6. package/dist/breach.d.ts +803 -44
  7. package/dist/breach.js +2 -1
  8. package/dist/breach.mjs +2 -1
  9. package/dist/{chunk-2WH4DLV5.js → chunk-3EGQWLJ6.js} +3 -3
  10. package/dist/chunk-B4Z5MBUC.mjs +2 -0
  11. package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
  12. package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
  13. package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
  14. package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
  15. package/dist/{chunk-KSERBMXW.mjs → chunk-F5TXUA4O.mjs} +3 -3
  16. package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
  17. package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
  18. package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
  19. package/dist/{chunk-MG73MOZC.mjs → chunk-I557S566.mjs} +2 -2
  20. package/dist/{chunk-QVULSG6J.mjs → chunk-ID2NYIVE.mjs} +3 -3
  21. package/dist/chunk-J5WCPZLW.js +2 -0
  22. package/dist/{chunk-4R42ZNO7.mjs → chunk-JFFOPHU3.mjs} +57 -57
  23. package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
  24. package/dist/chunk-LU7PKE7Y.mjs +2 -0
  25. package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
  26. package/dist/{chunk-XMBSJJ5U.js → chunk-ORFC66EA.js} +3 -3
  27. package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
  28. package/dist/chunk-SCWNM4PC.mjs +2 -0
  29. package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
  30. package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
  31. package/dist/chunk-TV4U6AIS.js +2 -0
  32. package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
  33. package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
  34. package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
  35. package/dist/{chunk-RNTNHVKZ.js → chunk-YPKUHSK4.js} +2 -2
  36. package/dist/{chunk-UFPSUO52.js → chunk-Z73T6MWY.js} +57 -57
  37. package/dist/consent.d.mts +648 -84
  38. package/dist/consent.d.ts +648 -84
  39. package/dist/consent.js +2 -1
  40. package/dist/consent.mjs +2 -1
  41. package/dist/core.d.mts +2049 -23
  42. package/dist/core.d.ts +2049 -23
  43. package/dist/core.js +1 -1
  44. package/dist/core.mjs +1 -1
  45. package/dist/cross-border.d.mts +470 -99
  46. package/dist/cross-border.d.ts +470 -99
  47. package/dist/cross-border.js +1 -0
  48. package/dist/cross-border.mjs +1 -0
  49. package/dist/dpia.d.mts +591 -37
  50. package/dist/dpia.d.ts +591 -37
  51. package/dist/dpia.js +1 -0
  52. package/dist/dpia.mjs +1 -0
  53. package/dist/dsr.d.mts +654 -37
  54. package/dist/dsr.d.ts +654 -37
  55. package/dist/dsr.js +2 -1
  56. package/dist/dsr.mjs +2 -1
  57. package/dist/hooks.d.mts +2174 -30
  58. package/dist/hooks.d.ts +2174 -30
  59. package/dist/hooks.js +2 -1
  60. package/dist/hooks.mjs +2 -1
  61. package/dist/index.d.mts +4428 -43
  62. package/dist/index.d.ts +4428 -43
  63. package/dist/index.js +2 -1
  64. package/dist/index.mjs +2 -1
  65. package/dist/lawful-basis.d.mts +368 -32
  66. package/dist/lawful-basis.d.ts +368 -32
  67. package/dist/lawful-basis.js +1 -0
  68. package/dist/lawful-basis.mjs +1 -0
  69. package/dist/policy.d.mts +1178 -83
  70. package/dist/policy.d.ts +1178 -83
  71. package/dist/policy.js +2 -1
  72. package/dist/policy.mjs +2 -1
  73. package/dist/presets.d.mts +1020 -114
  74. package/dist/presets.d.ts +1020 -114
  75. package/dist/presets.js +2 -1
  76. package/dist/presets.mjs +2 -1
  77. package/dist/ropa.d.mts +396 -31
  78. package/dist/ropa.d.ts +396 -31
  79. package/dist/ropa.js +2 -1
  80. package/dist/ropa.mjs +2 -1
  81. package/dist/server.d.mts +2133 -24
  82. package/dist/server.d.ts +2133 -24
  83. package/dist/server.js +1 -1
  84. package/dist/server.mjs +1 -1
  85. package/dist/unstyled.d.mts +523 -55
  86. package/dist/unstyled.d.ts +523 -55
  87. package/dist/unstyled.js +2 -1
  88. package/dist/unstyled.mjs +2 -1
  89. package/package.json +3 -3
  90. package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
  91. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
  92. package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
  93. package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
  94. package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
  95. package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
  96. package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
  97. package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
  98. package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
  99. package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
  100. package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
  101. package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
  102. package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
  103. package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
  104. package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
  105. package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
  106. package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
  107. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
  108. package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
  109. package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
  110. package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
  111. package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
  112. package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
  113. package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
  114. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
  115. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
  116. package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
  117. package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
  118. package/dist/breach-B_-6lDqS.d.mts +0 -17
  119. package/dist/breach-CzXqSsaY.d.ts +0 -17
  120. package/dist/breach-Eu9byel8.d.mts +0 -185
  121. package/dist/breach-Eu9byel8.d.ts +0 -185
  122. package/dist/chunk-5X32J5IA.mjs +0 -2
  123. package/dist/chunk-7D2OIPHH.mjs +0 -2
  124. package/dist/chunk-JKKRPS4P.js +0 -2
  125. package/dist/chunk-NCOZB2WU.mjs +0 -2
  126. package/dist/chunk-RGNP45VR.js +0 -2
  127. package/dist/compliance-score-racQe_E_.d.mts +0 -115
  128. package/dist/compliance-score-racQe_E_.d.ts +0 -115
  129. package/dist/consent-CmVzqZUk.d.mts +0 -99
  130. package/dist/consent-CmVzqZUk.d.ts +0 -99
  131. package/dist/consent-audit-BdByjYlM.d.mts +0 -65
  132. package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
  133. package/dist/cross-border-BBi9rZyO.d.mts +0 -54
  134. package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
  135. package/dist/cross-border-UyT00llA.d.mts +0 -141
  136. package/dist/cross-border-UyT00llA.d.ts +0 -141
  137. package/dist/docx-BxKascXN.d.ts +0 -64
  138. package/dist/docx-CV7Vsry_.d.mts +0 -64
  139. package/dist/dpia-D82hUrJe.d.ts +0 -15
  140. package/dist/dpia-DQDFw2_l.d.mts +0 -15
  141. package/dist/dpia-c9GiiOq0.d.mts +0 -137
  142. package/dist/dpia-c9GiiOq0.d.ts +0 -137
  143. package/dist/dsr-CIx5sd7e.d.ts +0 -14
  144. package/dist/dsr-XZ_HqTlA.d.mts +0 -14
  145. package/dist/dsr-yKbqX531.d.mts +0 -128
  146. package/dist/dsr-yKbqX531.d.ts +0 -128
  147. package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
  148. package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
  149. package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
  150. package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
  151. package/dist/locale-CxJx2tzn.d.mts +0 -25
  152. package/dist/locale-DSkrtf-c.d.ts +0 -25
  153. package/dist/policy-engine-CCUCud2T.d.ts +0 -154
  154. package/dist/policy-engine-fYSqEqSW.d.mts +0 -154
  155. package/dist/policy-sections-BYx6fEFk.d.ts +0 -56
  156. package/dist/policy-sections-Dm97Nq8m.d.mts +0 -56
  157. package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
  158. package/dist/policy-templates-DwYl2329.d.mts +0 -43
  159. package/dist/privacy-Ca6te9Ir.d.mts +0 -138
  160. package/dist/privacy-Ca6te9Ir.d.ts +0 -138
  161. package/dist/ropa-BDTM06tr.d.ts +0 -152
  162. package/dist/ropa-CFHuT7jE.d.mts +0 -152
  163. package/dist/ropa-CyynscU6.d.ts +0 -51
  164. package/dist/ropa-NIgxd8uP.d.mts +0 -51
  165. package/dist/sanitize-CxxwKxAx.d.mts +0 -94
  166. package/dist/sanitize-CxxwKxAx.d.ts +0 -94
  167. package/dist/styling-BMDGQDgS.d.mts +0 -64
  168. package/dist/styling-BaoQtV06.d.ts +0 -64
  169. package/dist/types-DK2CoKOC.d.mts +0 -10
  170. package/dist/types-DK2CoKOC.d.ts +0 -10
  171. package/dist/useAdaptivePolicyWizard-BnjW4OR4.d.mts +0 -52
  172. package/dist/useAdaptivePolicyWizard-sb3m4-Zk.d.ts +0 -52
  173. package/dist/useBreach-CPr86Yan.d.mts +0 -115
  174. package/dist/useBreach-DkVXvtJK.d.ts +0 -115
  175. package/dist/useConsent-DCNkIJHR.d.mts +0 -75
  176. package/dist/useConsent-dOcELSfX.d.ts +0 -75
  177. package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
  178. package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
  179. package/dist/useDPIA-B6180UQn.d.mts +0 -109
  180. package/dist/useDPIA-CTqbNbww.d.ts +0 -109
  181. package/dist/useDSR-WvHk8_iu.d.mts +0 -85
  182. package/dist/useDSR-wH4H6hSM.d.ts +0 -85
  183. package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
  184. package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
  185. package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
  186. package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
  187. package/dist/useROPA-BSSU1rfx.d.ts +0 -76
  188. package/dist/useROPA-C2hjaBTz.d.mts +0 -76
package/dist/ropa.d.ts CHANGED
@@ -1,31 +1,396 @@
1
- import { b as ROPAManagerProps } from './ROPAManager-qxTrXLkD.js';
2
- export { R as ROPAManager } from './ROPAManager-qxTrXLkD.js';
3
- import { a as UseROPAReturn } from './useROPA-BSSU1rfx.js';
4
- export { U as UseROPAOptions, u as useROPA } from './useROPA-BSSU1rfx.js';
5
- export { R as ROPAComplianceGap, a as ROPAValidationResult, e as exportROPAToCSV, g as generateROPASummary, i as identifyComplianceGaps, v as validateProcessingRecord } from './ropa-CyynscU6.js';
6
- import { a as RecordOfProcessingActivities, P as ProcessingRecord } from './ropa-BDTM06tr.js';
7
- export { R as ROPASummary } from './ropa-BDTM06tr.js';
8
- import * as React from 'react';
9
- import React__default from 'react';
10
- import { S as StorageAdapter } from './types-DK2CoKOC.js';
11
- import './lawful-basis-Cv1VmDLn.js';
12
-
13
- interface ROPAProviderProps {
14
- initialData: RecordOfProcessingActivities;
15
- adapter?: StorageAdapter<RecordOfProcessingActivities>;
16
- onRecordAdd?: (record: ProcessingRecord) => void;
17
- onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
18
- onRecordArchive?: (id: string) => void;
19
- children: React__default.ReactNode;
20
- }
21
- declare const ROPAProvider: React__default.FC<ROPAProviderProps>;
22
-
23
- declare const ROPA: {
24
- Provider: React.FC<ROPAProviderProps>;
25
- Manager: React.FC<ROPAManagerProps>;
26
- };
27
-
28
- type ROPAContextValue = UseROPAReturn;
29
- declare function useROPACompound(): ROPAContextValue;
30
-
31
- export { ProcessingRecord, ROPA, ROPAProvider, type ROPAProviderProps, RecordOfProcessingActivities, StorageAdapter, UseROPAReturn, useROPACompound };
1
+ import * as React_2 from 'react';
2
+ import React__default from 'react';
3
+
4
+ /**
5
+ * Exports the Record of Processing Activities to a CSV string.
6
+ * The CSV includes all key fields from each processing record.
7
+ *
8
+ * @param ropa - The full Record of Processing Activities
9
+ * @returns CSV-formatted string
10
+ */
11
+ export declare function exportROPAToCSV(ropa: RecordOfProcessingActivities): string;
12
+
13
+ /**
14
+ * Generates a summary of the Record of Processing Activities.
15
+ * Provides statistics and identifies records that are due for review.
16
+ *
17
+ * @param ropa - The full Record of Processing Activities
18
+ * @returns Summary statistics for the ROPA
19
+ */
20
+ export declare function generateROPASummary(ropa: RecordOfProcessingActivities): ROPASummary;
21
+
22
+ /**
23
+ * Identifies compliance gaps in the Record of Processing Activities.
24
+ * Finds records that are missing required information per NDPA 2023.
25
+ *
26
+ * @param ropa - The full Record of Processing Activities
27
+ * @returns Array of compliance gaps grouped by record
28
+ */
29
+ export declare function identifyComplianceGaps(ropa: RecordOfProcessingActivities): ROPAComplianceGap[];
30
+
31
+ /**
32
+ * Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
33
+ * Every processing activity must have a documented lawful basis
34
+ */
35
+ /**
36
+ * The six lawful bases for processing personal data per NDPA Section 25(1)
37
+ */
38
+ declare type LawfulBasis = 'consent' | 'contract' | 'legal_obligation' | 'vital_interests' | 'public_interest' | 'legitimate_interests';
39
+
40
+ /**
41
+ * Record of Processing Activities (ROPA) types aligned with NDPA 2023
42
+ * Data controllers must maintain comprehensive records of all processing activities
43
+ */
44
+
45
+ /**
46
+ * Represents a single processing record in the ROPA
47
+ */
48
+ export declare interface ProcessingRecord {
49
+ /** Unique identifier */
50
+ id: string;
51
+ /** Name of the processing activity */
52
+ name: string;
53
+ /** Detailed description of the processing */
54
+ description: string;
55
+ /** Data controller details */
56
+ controllerDetails: {
57
+ name: string;
58
+ contact: string;
59
+ address: string;
60
+ registrationNumber?: string;
61
+ dpoContact?: string;
62
+ };
63
+ /** Joint controller details (if applicable) */
64
+ jointControllerDetails?: {
65
+ name: string;
66
+ contact: string;
67
+ address: string;
68
+ responsibilities: string;
69
+ };
70
+ /** Data processor details (if processing is outsourced) */
71
+ processorDetails?: {
72
+ name: string;
73
+ contact: string;
74
+ address: string;
75
+ contractReference?: string;
76
+ };
77
+ /** Lawful basis for the processing */
78
+ lawfulBasis: LawfulBasis;
79
+ /** Justification for the chosen lawful basis */
80
+ lawfulBasisJustification: string;
81
+ /** Purposes of the processing */
82
+ purposes: string[];
83
+ /** Categories of personal data processed */
84
+ dataCategories: string[];
85
+ /** Categories of sensitive personal data (if any) */
86
+ sensitiveDataCategories?: string[];
87
+ /** Categories of data subjects */
88
+ dataSubjectCategories: string[];
89
+ /** Recipients or categories of recipients */
90
+ recipients: string[];
91
+ /** Cross-border transfer details */
92
+ crossBorderTransfers?: Array<{
93
+ destinationCountry: string;
94
+ countryCode?: string;
95
+ safeguards: string;
96
+ transferMechanism: string;
97
+ }>;
98
+ /** Data retention period */
99
+ retentionPeriod: string;
100
+ /** Justification for the retention period */
101
+ retentionJustification?: string;
102
+ /** Technical and organizational security measures */
103
+ securityMeasures: string[];
104
+ /** Data source (directly from data subject or from third party) */
105
+ dataSource: 'data_subject' | 'third_party' | 'public_source' | 'other';
106
+ /** Third-party source details (if dataSource is 'third_party') */
107
+ thirdPartySourceDetails?: string;
108
+ /** Whether a DPIA is required for this processing */
109
+ dpiaRequired: boolean;
110
+ /** Reference to the DPIA (if conducted) */
111
+ dpiaReference?: string;
112
+ /** Whether automated decision-making is involved */
113
+ automatedDecisionMaking: boolean;
114
+ /** Details of automated decision-making (if applicable) */
115
+ automatedDecisionMakingDetails?: string;
116
+ /** Status of the processing record */
117
+ status: 'active' | 'inactive' | 'archived';
118
+ /** Department or business unit responsible */
119
+ department?: string;
120
+ /** System or application used for processing */
121
+ systemsUsed?: string[];
122
+ /** Timestamp when the record was created */
123
+ createdAt: number;
124
+ /** Timestamp when the record was last updated */
125
+ updatedAt: number;
126
+ /** Timestamp when the record was last reviewed */
127
+ lastReviewedAt?: number;
128
+ /** Next review date */
129
+ nextReviewDate?: number;
130
+ }
131
+
132
+ /**
133
+ * Represents a complete Record of Processing Activities
134
+ */
135
+ export declare interface RecordOfProcessingActivities {
136
+ /** Unique identifier */
137
+ id: string;
138
+ /** Organization name */
139
+ organizationName: string;
140
+ /** Organization contact information */
141
+ organizationContact: string;
142
+ /** Organization address */
143
+ organizationAddress: string;
144
+ /** Data Protection Officer details */
145
+ dpoDetails?: {
146
+ name: string;
147
+ email: string;
148
+ phone?: string;
149
+ };
150
+ /** NDPC registration number */
151
+ ndpcRegistrationNumber?: string;
152
+ /** All processing records */
153
+ records: ProcessingRecord[];
154
+ /** Timestamp when the ROPA was last updated */
155
+ lastUpdated: number;
156
+ /** Version of the ROPA */
157
+ version: string;
158
+ /** Export format options */
159
+ exportFormats?: ('pdf' | 'csv' | 'json' | 'xlsx')[];
160
+ }
161
+
162
+ export declare const ROPA: {
163
+ Provider: React_2.FC<ROPAProviderProps>;
164
+ Manager: React_2.FC<ROPAManagerProps>;
165
+ };
166
+
167
+ /**
168
+ * Compliance gap found in a processing record
169
+ */
170
+ export declare interface ROPAComplianceGap {
171
+ recordId: string;
172
+ recordName: string;
173
+ gaps: string[];
174
+ }
175
+
176
+ declare type ROPAContextValue = UseROPAReturn;
177
+
178
+ /**
179
+ * Record of Processing Activities (ROPA) management component. Implements the NDPA
180
+ * accountability principle, requiring organizations to maintain comprehensive records
181
+ * of all personal data processing activities.
182
+ */
183
+ export declare const ROPAManager: React__default.FC<ROPAManagerProps>;
184
+
185
+ declare interface ROPAManagerClassNames {
186
+ root?: string;
187
+ header?: string;
188
+ title?: string;
189
+ orgInfo?: string;
190
+ summary?: string;
191
+ summaryCard?: string;
192
+ table?: string;
193
+ tableHeader?: string;
194
+ tableRow?: string;
195
+ form?: string;
196
+ input?: string;
197
+ select?: string;
198
+ submitButton?: string;
199
+ /** Alias for submitButton */
200
+ primaryButton?: string;
201
+ statusBadge?: string;
202
+ exportButton?: string;
203
+ /** Alias for exportButton */
204
+ secondaryButton?: string;
205
+ complianceGap?: string;
206
+ }
207
+
208
+ declare interface ROPAManagerProps {
209
+ /**
210
+ * The full Record of Processing Activities
211
+ */
212
+ ropa: RecordOfProcessingActivities;
213
+ /**
214
+ * Callback when a new record is added
215
+ */
216
+ onAddRecord?: (record: ProcessingRecord) => void;
217
+ /**
218
+ * Callback when a record is updated
219
+ */
220
+ onUpdateRecord?: (id: string, updates: Partial<ProcessingRecord>) => void;
221
+ /**
222
+ * Callback when a record is archived
223
+ */
224
+ onArchiveRecord?: (id: string) => void;
225
+ /**
226
+ * Title displayed on the manager
227
+ * @default "Record of Processing Activities (ROPA)"
228
+ */
229
+ title?: string;
230
+ /**
231
+ * Description text
232
+ * @default "Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle."
233
+ */
234
+ description?: string;
235
+ /**
236
+ * Custom CSS class
237
+ */
238
+ className?: string;
239
+ /**
240
+ * Custom CSS class for buttons
241
+ */
242
+ buttonClassName?: string;
243
+ /**
244
+ * Override class names for individual sections of the component.
245
+ * Takes priority over className / buttonClassName.
246
+ */
247
+ classNames?: ROPAManagerClassNames;
248
+ /**
249
+ * When true, all default styling is removed so consumers
250
+ * can style from scratch using classNames.
251
+ */
252
+ unstyled?: boolean;
253
+ }
254
+
255
+ export declare const ROPAProvider: React__default.FC<ROPAProviderProps>;
256
+
257
+ export declare interface ROPAProviderProps {
258
+ initialData: RecordOfProcessingActivities;
259
+ adapter?: StorageAdapter<RecordOfProcessingActivities>;
260
+ onRecordAdd?: (record: ProcessingRecord) => void;
261
+ onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
262
+ onRecordArchive?: (id: string) => void;
263
+ children: React__default.ReactNode;
264
+ }
265
+
266
+ /**
267
+ * Summary statistics for the ROPA
268
+ */
269
+ export declare interface ROPASummary {
270
+ /** Total number of processing records */
271
+ totalRecords: number;
272
+ /** Active processing records */
273
+ activeRecords: number;
274
+ /** Records by lawful basis */
275
+ byLawfulBasis: Record<LawfulBasis, number>;
276
+ /** Records involving sensitive data */
277
+ sensitiveDataRecords: number;
278
+ /** Records involving cross-border transfers */
279
+ crossBorderRecords: number;
280
+ /** Records requiring DPIA */
281
+ dpiaRequiredRecords: number;
282
+ /** Records involving automated decision-making */
283
+ automatedDecisionRecords: number;
284
+ /** Records due for review */
285
+ recordsDueForReview: ProcessingRecord[];
286
+ /** Departments with most processing activities */
287
+ topDepartments: Array<{
288
+ department: string;
289
+ count: number;
290
+ }>;
291
+ /** Last updated timestamp */
292
+ lastUpdated: number;
293
+ }
294
+
295
+ /**
296
+ * Validation result for a processing record
297
+ */
298
+ export declare interface ROPAValidationResult {
299
+ valid: boolean;
300
+ errors: string[];
301
+ }
302
+
303
+ export declare interface StorageAdapter<T = unknown> {
304
+ /** Load persisted data. Called once on hook mount. */
305
+ load(): T | null | Promise<T | null>;
306
+ /** Persist data. Called on every state change. */
307
+ save(data: T): void | Promise<void>;
308
+ /** Clear persisted data. Called on reset. */
309
+ remove(): void | Promise<void>;
310
+ }
311
+
312
+ /**
313
+ * Hook for managing a Record of Processing Activities (ROPA)
314
+ * in compliance with NDPA 2023 requirements.
315
+ *
316
+ * Provides state management and utility functions for maintaining
317
+ * a comprehensive register of all data processing activities.
318
+ */
319
+ export declare function useROPA({ initialData, adapter, onRecordAdd, onRecordUpdate, onRecordArchive, }: UseROPAOptions): UseROPAReturn;
320
+
321
+ export declare function useROPACompound(): ROPAContextValue;
322
+
323
+ export declare interface UseROPAOptions {
324
+ /**
325
+ * Initial ROPA state
326
+ */
327
+ initialData: RecordOfProcessingActivities;
328
+ /**
329
+ * Pluggable storage adapter. When provided, adapter data is loaded on mount
330
+ * and the ROPA is persisted after every mutation. Falls back to initialData
331
+ * when no adapter data is found.
332
+ */
333
+ adapter?: StorageAdapter<RecordOfProcessingActivities>;
334
+ /**
335
+ * Callback when a record is added
336
+ */
337
+ onRecordAdd?: (record: ProcessingRecord) => void;
338
+ /**
339
+ * Callback when a record is updated
340
+ */
341
+ onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
342
+ /**
343
+ * Callback when a record is archived
344
+ */
345
+ onRecordArchive?: (id: string) => void;
346
+ }
347
+
348
+ export declare interface UseROPAReturn {
349
+ /**
350
+ * Current state of the Record of Processing Activities
351
+ */
352
+ ropa: RecordOfProcessingActivities;
353
+ /**
354
+ * Add a new processing record
355
+ */
356
+ addRecord: (record: ProcessingRecord) => void;
357
+ /**
358
+ * Update an existing processing record
359
+ */
360
+ updateRecord: (id: string, updates: Partial<ProcessingRecord>) => void;
361
+ /**
362
+ * Archive a processing record by setting its status to 'archived'
363
+ */
364
+ archiveRecord: (id: string) => void;
365
+ /**
366
+ * Get a single processing record by ID
367
+ */
368
+ getRecord: (id: string) => ProcessingRecord | undefined;
369
+ /**
370
+ * Get a summary of the ROPA including statistics
371
+ */
372
+ getSummary: () => ROPASummary;
373
+ /**
374
+ * Export the ROPA as a CSV string
375
+ */
376
+ exportCSV: () => string;
377
+ /**
378
+ * Identify compliance gaps across all records
379
+ */
380
+ getComplianceGaps: () => ROPAComplianceGap[];
381
+ /**
382
+ * Whether the adapter is still loading data (relevant for async adapters)
383
+ */
384
+ isLoading: boolean;
385
+ }
386
+
387
+ /**
388
+ * Validates a processing record to ensure all required fields are present
389
+ * and properly filled per NDPA 2023 requirements.
390
+ *
391
+ * @param record - The processing record to validate
392
+ * @returns Validation result with any errors found
393
+ */
394
+ export declare function validateProcessingRecord(record: ProcessingRecord): ROPAValidationResult;
395
+
396
+ export { }
package/dist/ropa.js CHANGED
@@ -1,2 +1,3 @@
1
- 'use strict';var chunkP6QAFBCV_js=require('./chunk-P6QAFBCV.js'),chunkM2TPT5GB_js=require('./chunk-M2TPT5GB.js'),chunkGOU6FU6Y_js=require('./chunk-GOU6FU6Y.js');require('./chunk-E64TU6IU.js'),require('./chunk-MQFZHA2D.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var p=react.createContext(null);function u(){let r=react.useContext(p);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var e=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=chunkM2TPT5GB_js.a({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsxRuntime.jsx(p.Provider,{value:R,children:s})};var v={Provider:e,Manager:chunkP6QAFBCV_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkP6QAFBCV_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkM2TPT5GB_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.a}});exports.ROPA=v;exports.ROPAProvider=e;exports.useROPACompound=u;//# sourceMappingURL=ropa.js.map
1
+ "use client";
2
+ 'use strict';var chunkXNSZ7KUH_js=require('./chunk-XNSZ7KUH.js'),chunkM2TPT5GB_js=require('./chunk-M2TPT5GB.js'),chunkGOU6FU6Y_js=require('./chunk-GOU6FU6Y.js');require('./chunk-E64TU6IU.js'),require('./chunk-MQFZHA2D.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var p=react.createContext(null);function u(){let r=react.useContext(p);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var e=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=chunkM2TPT5GB_js.a({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsxRuntime.jsx(p.Provider,{value:R,children:s})};var v={Provider:e,Manager:chunkXNSZ7KUH_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkXNSZ7KUH_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkM2TPT5GB_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.a}});exports.ROPA=v;exports.ROPAProvider=e;exports.useROPACompound=u;//# sourceMappingURL=ropa.js.map
2
3
  //# sourceMappingURL=ropa.js.map
package/dist/ropa.mjs CHANGED
@@ -1,2 +1,3 @@
1
- import {a}from'./chunk-VTITKWGX.mjs';export{a as ROPAManager}from'./chunk-VTITKWGX.mjs';import {a as a$1}from'./chunk-2AW7KAZO.mjs';export{a as useROPA}from'./chunk-2AW7KAZO.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-SHMJNRHO.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null);function u(){let r=useContext(p);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var e=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=a$1({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsx(p.Provider,{value:R,children:s})};var v={Provider:e,Manager:a};export{v as ROPA,e as ROPAProvider,u as useROPACompound};//# sourceMappingURL=ropa.mjs.map
1
+ "use client";
2
+ import {a}from'./chunk-QSVVAZVT.mjs';export{a as ROPAManager}from'./chunk-QSVVAZVT.mjs';import {a as a$1}from'./chunk-2AW7KAZO.mjs';export{a as useROPA}from'./chunk-2AW7KAZO.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-SHMJNRHO.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null);function u(){let r=useContext(p);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var e=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=a$1({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsx(p.Provider,{value:R,children:s})};var v={Provider:e,Manager:a};export{v as ROPA,e as ROPAProvider,u as useROPACompound};//# sourceMappingURL=ropa.mjs.map
2
3
  //# sourceMappingURL=ropa.mjs.map