@tantainnovative/ndpr-toolkit 3.4.1 → 3.5.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 (177) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/adapters.d.mts +34 -25
  3. package/dist/adapters.d.ts +34 -25
  4. package/dist/breach.d.mts +803 -44
  5. package/dist/breach.d.ts +803 -44
  6. package/dist/breach.js +1 -1
  7. package/dist/breach.mjs +1 -1
  8. package/dist/{chunk-ASLMPY54.js → chunk-3EGQWLJ6.js} +3 -3
  9. package/dist/chunk-B4Z5MBUC.mjs +2 -0
  10. package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
  11. package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
  12. package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
  13. package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
  14. package/dist/{chunk-MLOWRZXO.mjs → chunk-F5TXUA4O.mjs} +3 -3
  15. package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
  16. package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
  17. package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
  18. package/dist/{chunk-NFJ4CB63.mjs → chunk-ID2NYIVE.mjs} +3 -3
  19. package/dist/chunk-J5WCPZLW.js +2 -0
  20. package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
  21. package/dist/chunk-LU7PKE7Y.mjs +2 -0
  22. package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
  23. package/dist/{chunk-4BOEFDDE.js → chunk-ORFC66EA.js} +3 -3
  24. package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
  25. package/dist/chunk-SCWNM4PC.mjs +2 -0
  26. package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
  27. package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
  28. package/dist/chunk-TV4U6AIS.js +2 -0
  29. package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
  30. package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
  31. package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
  32. package/dist/consent.d.mts +648 -84
  33. package/dist/consent.d.ts +648 -84
  34. package/dist/consent.js +1 -1
  35. package/dist/consent.mjs +1 -1
  36. package/dist/core.d.mts +2049 -23
  37. package/dist/core.d.ts +2049 -23
  38. package/dist/core.js +1 -1
  39. package/dist/core.mjs +1 -1
  40. package/dist/cross-border.d.mts +470 -99
  41. package/dist/cross-border.d.ts +470 -99
  42. package/dist/dpia.d.mts +591 -37
  43. package/dist/dpia.d.ts +591 -37
  44. package/dist/dsr.d.mts +654 -37
  45. package/dist/dsr.d.ts +654 -37
  46. package/dist/dsr.js +1 -1
  47. package/dist/dsr.mjs +1 -1
  48. package/dist/hooks.d.mts +2174 -30
  49. package/dist/hooks.d.ts +2174 -30
  50. package/dist/hooks.js +1 -1
  51. package/dist/hooks.mjs +1 -1
  52. package/dist/index.d.mts +4428 -43
  53. package/dist/index.d.ts +4428 -43
  54. package/dist/index.js +1 -1
  55. package/dist/index.mjs +1 -1
  56. package/dist/lawful-basis.d.mts +368 -32
  57. package/dist/lawful-basis.d.ts +368 -32
  58. package/dist/policy.d.mts +1178 -83
  59. package/dist/policy.d.ts +1178 -83
  60. package/dist/policy.js +1 -1
  61. package/dist/policy.mjs +1 -1
  62. package/dist/presets.d.mts +1020 -114
  63. package/dist/presets.d.ts +1020 -114
  64. package/dist/presets.js +1 -1
  65. package/dist/presets.mjs +1 -1
  66. package/dist/ropa.d.mts +396 -31
  67. package/dist/ropa.d.ts +396 -31
  68. package/dist/ropa.js +1 -1
  69. package/dist/ropa.mjs +1 -1
  70. package/dist/server.d.mts +2133 -24
  71. package/dist/server.d.ts +2133 -24
  72. package/dist/server.js +1 -1
  73. package/dist/server.mjs +1 -1
  74. package/dist/unstyled.d.mts +523 -55
  75. package/dist/unstyled.d.ts +523 -55
  76. package/dist/unstyled.js +1 -1
  77. package/dist/unstyled.mjs +1 -1
  78. package/package.json +3 -3
  79. package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
  80. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
  81. package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
  82. package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
  83. package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
  84. package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
  85. package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
  86. package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
  87. package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
  88. package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
  89. package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
  90. package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
  91. package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
  92. package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
  93. package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
  94. package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
  95. package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
  96. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
  97. package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
  98. package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
  99. package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
  100. package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
  101. package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
  102. package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
  103. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
  104. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
  105. package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
  106. package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
  107. package/dist/breach-B_-6lDqS.d.mts +0 -17
  108. package/dist/breach-CzXqSsaY.d.ts +0 -17
  109. package/dist/breach-Eu9byel8.d.mts +0 -185
  110. package/dist/breach-Eu9byel8.d.ts +0 -185
  111. package/dist/chunk-2L7BSG7G.mjs +0 -2
  112. package/dist/chunk-5X32J5IA.mjs +0 -2
  113. package/dist/chunk-7D2OIPHH.mjs +0 -2
  114. package/dist/chunk-JKKRPS4P.js +0 -2
  115. package/dist/chunk-UHTJ6UFW.js +0 -2
  116. package/dist/compliance-score-racQe_E_.d.mts +0 -115
  117. package/dist/compliance-score-racQe_E_.d.ts +0 -115
  118. package/dist/consent-CmVzqZUk.d.mts +0 -99
  119. package/dist/consent-CmVzqZUk.d.ts +0 -99
  120. package/dist/consent-audit-BdByjYlM.d.mts +0 -65
  121. package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
  122. package/dist/cross-border-BBi9rZyO.d.mts +0 -54
  123. package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
  124. package/dist/cross-border-UyT00llA.d.mts +0 -141
  125. package/dist/cross-border-UyT00llA.d.ts +0 -141
  126. package/dist/docx-4n8g4zul.d.mts +0 -64
  127. package/dist/docx-VvcTLYZM.d.ts +0 -64
  128. package/dist/dpia-D82hUrJe.d.ts +0 -15
  129. package/dist/dpia-DQDFw2_l.d.mts +0 -15
  130. package/dist/dpia-c9GiiOq0.d.mts +0 -137
  131. package/dist/dpia-c9GiiOq0.d.ts +0 -137
  132. package/dist/dsr-CIx5sd7e.d.ts +0 -14
  133. package/dist/dsr-XZ_HqTlA.d.mts +0 -14
  134. package/dist/dsr-yKbqX531.d.mts +0 -128
  135. package/dist/dsr-yKbqX531.d.ts +0 -128
  136. package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
  137. package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
  138. package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
  139. package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
  140. package/dist/locale-CxJx2tzn.d.mts +0 -25
  141. package/dist/locale-DSkrtf-c.d.ts +0 -25
  142. package/dist/policy-engine-5qTfp2z4.d.mts +0 -174
  143. package/dist/policy-engine-DzPxskOK.d.ts +0 -174
  144. package/dist/policy-sections-9tCb7VU7.d.ts +0 -56
  145. package/dist/policy-sections-CBWcJv-R.d.mts +0 -56
  146. package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
  147. package/dist/policy-templates-DwYl2329.d.mts +0 -43
  148. package/dist/privacy-Ca6te9Ir.d.mts +0 -138
  149. package/dist/privacy-Ca6te9Ir.d.ts +0 -138
  150. package/dist/ropa-BDTM06tr.d.ts +0 -152
  151. package/dist/ropa-CFHuT7jE.d.mts +0 -152
  152. package/dist/ropa-CyynscU6.d.ts +0 -51
  153. package/dist/ropa-NIgxd8uP.d.mts +0 -51
  154. package/dist/sanitize-CxxwKxAx.d.mts +0 -94
  155. package/dist/sanitize-CxxwKxAx.d.ts +0 -94
  156. package/dist/styling-BMDGQDgS.d.mts +0 -64
  157. package/dist/styling-BaoQtV06.d.ts +0 -64
  158. package/dist/types-DK2CoKOC.d.mts +0 -10
  159. package/dist/types-DK2CoKOC.d.ts +0 -10
  160. package/dist/useAdaptivePolicyWizard-BSLyltzZ.d.mts +0 -52
  161. package/dist/useAdaptivePolicyWizard-CL7C7MTZ.d.ts +0 -52
  162. package/dist/useBreach-CPr86Yan.d.mts +0 -115
  163. package/dist/useBreach-DkVXvtJK.d.ts +0 -115
  164. package/dist/useConsent-DCNkIJHR.d.mts +0 -75
  165. package/dist/useConsent-dOcELSfX.d.ts +0 -75
  166. package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
  167. package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
  168. package/dist/useDPIA-B6180UQn.d.mts +0 -109
  169. package/dist/useDPIA-CTqbNbww.d.ts +0 -109
  170. package/dist/useDSR-WvHk8_iu.d.mts +0 -85
  171. package/dist/useDSR-wH4H6hSM.d.ts +0 -85
  172. package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
  173. package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
  174. package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
  175. package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
  176. package/dist/useROPA-BSSU1rfx.d.ts +0 -76
  177. package/dist/useROPA-C2hjaBTz.d.mts +0 -76
package/dist/dpia.d.mts CHANGED
@@ -1,37 +1,591 @@
1
- import { b as DPIAQuestionnaireProps } from './DPIAQuestionnaire-jkt1Veb6.mjs';
2
- export { D as DPIAQuestionnaire, a as DPIAQuestionnaireClassNames } from './DPIAQuestionnaire-jkt1Veb6.mjs';
3
- import { c as DPIAReportProps, d as StepIndicatorProps } from './StepIndicator-W8S_QjgO.mjs';
4
- export { D as DPIAReport, a as DPIAReportClassNames, S as StepIndicator, b as StepIndicatorClassNames } from './StepIndicator-W8S_QjgO.mjs';
5
- import { U as UseDPIAReturn } from './useDPIA-B6180UQn.mjs';
6
- export { u as useDPIA } from './useDPIA-B6180UQn.mjs';
7
- export { a as assessDPIARisk } from './dpia-DQDFw2_l.mjs';
8
- import { c as DPIASection, a as DPIAResult } from './dpia-c9GiiOq0.mjs';
9
- export { D as DPIAQuestion, b as DPIARisk } from './dpia-c9GiiOq0.mjs';
10
- import * as React from 'react';
11
- import React__default from 'react';
12
- import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
13
-
14
- interface DPIAProviderProps {
15
- sections: DPIASection[];
16
- initialAnswers?: Record<string, any>;
17
- adapter?: StorageAdapter<Record<string, any>>;
18
- storageKey?: string;
19
- useLocalStorage?: boolean;
20
- onComplete?: (result: DPIAResult) => void;
21
- children: React__default.ReactNode;
22
- }
23
- declare const DPIAProvider: React__default.FC<DPIAProviderProps>;
24
-
25
- declare const DPIA: {
26
- Provider: React.FC<DPIAProviderProps>;
27
- Questionnaire: React.FC<DPIAQuestionnaireProps>;
28
- Report: React.FC<DPIAReportProps>;
29
- StepIndicator: React.FC<StepIndicatorProps>;
30
- };
31
-
32
- interface DPIAContextValue extends UseDPIAReturn {
33
- sections: DPIASection[];
34
- }
35
- declare function useDPIACompound(): DPIAContextValue;
36
-
37
- export { DPIA, DPIAProvider, type DPIAProviderProps, DPIAResult, DPIASection, StorageAdapter, useDPIACompound };
1
+ import * as React_2 from 'react';
2
+ import React__default from 'react';
3
+
4
+ /**
5
+ * Assesses the risk level of a DPIA based on the identified risks
6
+ * @param dpiaResult The DPIA result containing risks to assess
7
+ * @returns Assessment result with overall risk level and recommendations
8
+ */
9
+ export declare function assessDPIARisk(dpiaResult: DPIAResult): {
10
+ overallRiskLevel: 'low' | 'medium' | 'high' | 'critical';
11
+ requiresConsultation: boolean;
12
+ canProceed: boolean;
13
+ recommendations: string[];
14
+ };
15
+
16
+ export declare const DPIA: {
17
+ Provider: React_2.FC<DPIAProviderProps>;
18
+ Questionnaire: React_2.FC<DPIAQuestionnaireProps>;
19
+ Report: React_2.FC<DPIAReportProps>;
20
+ StepIndicator: React_2.FC<StepIndicatorProps>;
21
+ };
22
+
23
+ /** A map of question IDs to their answer values */
24
+ declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
25
+
26
+ /** Possible value types for a DPIA answer */
27
+ declare type DPIAAnswerValue = string | number | boolean | string[];
28
+
29
+ declare interface DPIAContextValue extends UseDPIAReturn {
30
+ sections: DPIASection[];
31
+ }
32
+
33
+ export declare const DPIAProvider: React__default.FC<DPIAProviderProps>;
34
+
35
+ export declare interface DPIAProviderProps {
36
+ sections: DPIASection[];
37
+ initialAnswers?: Record<string, any>;
38
+ adapter?: StorageAdapter<Record<string, any>>;
39
+ storageKey?: string;
40
+ useLocalStorage?: boolean;
41
+ onComplete?: (result: DPIAResult) => void;
42
+ children: React__default.ReactNode;
43
+ }
44
+
45
+ /**
46
+ * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
47
+ * A DPIA is required when processing is likely to result in high risk to data subjects
48
+ */
49
+ /**
50
+ * Represents a question in the DPIA questionnaire
51
+ */
52
+ export declare interface DPIAQuestion {
53
+ /** Unique identifier for the question */
54
+ id: string;
55
+ /** The text of the question */
56
+ text: string;
57
+ /** Additional guidance for answering the question */
58
+ guidance?: string;
59
+ /** Type of input required for the answer */
60
+ type: 'text' | 'textarea' | 'select' | 'radio' | 'checkbox' | 'scale';
61
+ /** Options for select, radio, or checkbox questions */
62
+ options?: Array<{
63
+ value: string;
64
+ label: string;
65
+ riskLevel?: 'low' | 'medium' | 'high';
66
+ }>;
67
+ /** For scale questions, the minimum value */
68
+ minValue?: number;
69
+ /** For scale questions, the maximum value */
70
+ maxValue?: number;
71
+ /** For scale questions, labels for the scale points */
72
+ scaleLabels?: Record<number, string>;
73
+ /** Whether the question is required */
74
+ required: boolean;
75
+ /** Risk level associated with this question */
76
+ riskLevel?: 'low' | 'medium' | 'high';
77
+ /** Whether this question triggers additional questions based on the answer */
78
+ hasDependentQuestions?: boolean;
79
+ /** Conditions that determine when this question should be shown */
80
+ showWhen?: Array<{
81
+ questionId: string;
82
+ operator: 'equals' | 'contains' | 'greaterThan' | 'lessThan';
83
+ value: string | number | boolean;
84
+ }>;
85
+ }
86
+
87
+ /**
88
+ * DPIA questionnaire component. Implements NDPA Section 38 requirements
89
+ * for conducting Data Protection Impact Assessments on high-risk processing activities.
90
+ */
91
+ export declare const DPIAQuestionnaire: React__default.FC<DPIAQuestionnaireProps>;
92
+
93
+ export declare interface DPIAQuestionnaireClassNames {
94
+ /** Outermost wrapper */
95
+ root?: string;
96
+ /** Header area containing progress indicator */
97
+ header?: string;
98
+ /** Section title */
99
+ title?: string;
100
+ /** Section container */
101
+ section?: string;
102
+ /** Section title heading */
103
+ sectionTitle?: string;
104
+ /** Individual question wrapper */
105
+ question?: string;
106
+ /** Question label text */
107
+ questionText?: string;
108
+ /** Guidance / help text below a question */
109
+ guidance?: string;
110
+ /** Text / textarea / select inputs */
111
+ input?: string;
112
+ /** Radio option group container */
113
+ radioGroup?: string;
114
+ /** Individual radio option row */
115
+ radioOption?: string;
116
+ /** Navigation button container */
117
+ navigation?: string;
118
+ /** Next / submit button */
119
+ nextButton?: string;
120
+ /** Previous button */
121
+ prevButton?: string;
122
+ /** Alias for nextButton */
123
+ primaryButton?: string;
124
+ /** Alias for prevButton */
125
+ secondaryButton?: string;
126
+ /** Progress bar wrapper */
127
+ progressBar?: string;
128
+ }
129
+
130
+ declare interface DPIAQuestionnaireProps {
131
+ /**
132
+ * Sections of the DPIA questionnaire
133
+ */
134
+ sections: DPIASection[];
135
+ /**
136
+ * Current answers to the questionnaire
137
+ */
138
+ answers: Record<string, string | number | boolean | string[]>;
139
+ /**
140
+ * Callback function called when an answer is updated
141
+ */
142
+ onAnswerChange: (questionId: string, value: string | number | boolean | string[]) => void;
143
+ /**
144
+ * Current section index
145
+ */
146
+ currentSectionIndex: number;
147
+ /**
148
+ * Callback function called when user navigates to the next section
149
+ */
150
+ onNextSection?: () => void;
151
+ /**
152
+ * Callback function called when user navigates to the previous section
153
+ */
154
+ onPrevSection?: () => void;
155
+ /**
156
+ * Validation errors for the current section
157
+ */
158
+ validationErrors?: Record<string, string>;
159
+ /**
160
+ * Whether the questionnaire is in read-only mode
161
+ * @default false
162
+ */
163
+ readOnly?: boolean;
164
+ /**
165
+ * Custom CSS class for the questionnaire
166
+ */
167
+ className?: string;
168
+ /**
169
+ * Custom CSS class for the buttons
170
+ */
171
+ buttonClassName?: string;
172
+ /**
173
+ * Text for the next button
174
+ * @default "Next"
175
+ */
176
+ nextButtonText?: string;
177
+ /**
178
+ * Text for the previous button
179
+ * @default "Previous"
180
+ */
181
+ prevButtonText?: string;
182
+ /**
183
+ * Text for the submit button (shown on the last section)
184
+ * @default "Submit"
185
+ */
186
+ submitButtonText?: string;
187
+ /**
188
+ * Whether to show a progress indicator
189
+ * @default true
190
+ */
191
+ showProgress?: boolean;
192
+ /**
193
+ * Current progress percentage (0-100)
194
+ */
195
+ progress?: number;
196
+ /**
197
+ * Per-section class name overrides
198
+ */
199
+ classNames?: DPIAQuestionnaireClassNames;
200
+ /**
201
+ * When true, all default classes are stripped.
202
+ * Only explicit overrides from `classNames` are applied.
203
+ * @default false
204
+ */
205
+ unstyled?: boolean;
206
+ }
207
+
208
+ /**
209
+ * DPIA report component. Implements NDPA Sections 38-39 requirements for documenting
210
+ * and presenting Data Protection Impact Assessment findings, risks, and recommendations.
211
+ */
212
+ export declare const DPIAReport: React__default.FC<DPIAReportProps>;
213
+
214
+ export declare interface DPIAReportClassNames {
215
+ /** Outermost wrapper */
216
+ root?: string;
217
+ /** Report header area */
218
+ header?: string;
219
+ /** Main report title */
220
+ title?: string;
221
+ /** Executive summary section */
222
+ summary?: string;
223
+ /** Risk level badge */
224
+ riskBadge?: string;
225
+ /** Risks table element */
226
+ riskTable?: string;
227
+ /** Individual risk row */
228
+ riskRow?: string;
229
+ /** Recommendation list item */
230
+ recommendation?: string;
231
+ /** Conclusion text */
232
+ conclusion?: string;
233
+ /** Print button */
234
+ printButton?: string;
235
+ /** Alias for printButton */
236
+ primaryButton?: string;
237
+ }
238
+
239
+ declare interface DPIAReportProps {
240
+ /**
241
+ * The DPIA result to display
242
+ */
243
+ result: DPIAResult;
244
+ /**
245
+ * The sections of the DPIA questionnaire
246
+ */
247
+ sections: DPIASection[];
248
+ /**
249
+ * Whether to show the full report or just a summary
250
+ * @default true
251
+ */
252
+ showFullReport?: boolean;
253
+ /**
254
+ * Whether to allow printing the report
255
+ * @default true
256
+ */
257
+ allowPrint?: boolean;
258
+ /**
259
+ * Whether to allow exporting the report as PDF
260
+ * @default true
261
+ */
262
+ allowExport?: boolean;
263
+ /**
264
+ * Callback function called when the report is exported
265
+ */
266
+ onExport?: (format: 'pdf' | 'docx' | 'html') => void;
267
+ /**
268
+ * Custom CSS class for the report container
269
+ */
270
+ className?: string;
271
+ /**
272
+ * Custom CSS class for the buttons
273
+ */
274
+ buttonClassName?: string;
275
+ /**
276
+ * Per-section class name overrides
277
+ */
278
+ classNames?: DPIAReportClassNames;
279
+ /**
280
+ * When true, all default classes are stripped.
281
+ * Only explicit overrides from `classNames` are applied.
282
+ * @default false
283
+ */
284
+ unstyled?: boolean;
285
+ }
286
+
287
+ /**
288
+ * Represents the result of a completed DPIA
289
+ */
290
+ export declare interface DPIAResult {
291
+ /** Unique identifier for the DPIA */
292
+ id: string;
293
+ /** Title of the DPIA */
294
+ title: string;
295
+ /** Description of the processing activity being assessed */
296
+ processingDescription: string;
297
+ /** Timestamp when the DPIA was started */
298
+ startedAt: number;
299
+ /** Timestamp when the DPIA was completed */
300
+ completedAt?: number;
301
+ /** Person responsible for conducting the DPIA */
302
+ assessor: {
303
+ name: string;
304
+ role: string;
305
+ email: string;
306
+ };
307
+ /** Answers to all questions in the DPIA */
308
+ answers: Record<string, string | number | boolean | string[]>;
309
+ /** Risks identified in the DPIA */
310
+ risks: DPIARisk[];
311
+ /** Overall risk level of the processing activity */
312
+ overallRiskLevel: 'low' | 'medium' | 'high' | 'critical';
313
+ /** Whether the DPIA concluded that the processing can proceed */
314
+ canProceed: boolean;
315
+ /** Reasons why the processing can or cannot proceed */
316
+ conclusion: string;
317
+ /** Recommendations for the processing activity */
318
+ recommendations?: string[];
319
+ /** Next review date for the DPIA */
320
+ reviewDate?: number;
321
+ /** Version of the DPIA questionnaire used */
322
+ version: string;
323
+ /**
324
+ * Whether prior consultation with NDPC is required
325
+ * Per NDPA Section 39, consultation is required when DPIA indicates high residual risk
326
+ */
327
+ ndpcConsultationRequired?: boolean;
328
+ /** Date when NDPC consultation was initiated */
329
+ ndpcConsultationDate?: number;
330
+ /** Reference number from NDPC consultation */
331
+ ndpcConsultationReference?: string;
332
+ /**
333
+ * The lawful basis for the processing activity being assessed
334
+ */
335
+ lawfulBasis?: string;
336
+ /**
337
+ * Whether this DPIA involves cross-border data transfers
338
+ */
339
+ involvesCrossBorderTransfer?: boolean;
340
+ }
341
+
342
+ /**
343
+ * Represents a risk identified in the DPIA
344
+ */
345
+ export declare interface DPIARisk {
346
+ /** Unique identifier for the risk */
347
+ id: string;
348
+ /** Description of the risk */
349
+ description: string;
350
+ /** Likelihood of the risk occurring (1-5) */
351
+ likelihood: number;
352
+ /** Impact if the risk occurs (1-5) */
353
+ impact: number;
354
+ /** Overall risk score (likelihood * impact) */
355
+ score: number;
356
+ /** Risk level based on the score */
357
+ level: 'low' | 'medium' | 'high' | 'critical';
358
+ /** Measures to mitigate the risk */
359
+ mitigationMeasures?: string[];
360
+ /** Whether the risk has been mitigated */
361
+ mitigated: boolean;
362
+ /** Residual risk score after mitigation */
363
+ residualScore?: number;
364
+ /** Questions that identified this risk */
365
+ relatedQuestionIds: string[];
366
+ }
367
+
368
+ /**
369
+ * Represents a section in the DPIA questionnaire
370
+ */
371
+ export declare interface DPIASection {
372
+ /** Unique identifier for the section */
373
+ id: string;
374
+ /** Title of the section */
375
+ title: string;
376
+ /** Description of the section */
377
+ description?: string;
378
+ /** Questions in this section */
379
+ questions: DPIAQuestion[];
380
+ /** Order of the section in the questionnaire */
381
+ order: number;
382
+ }
383
+
384
+ declare interface Step {
385
+ /**
386
+ * Unique identifier for the step
387
+ */
388
+ id: string;
389
+ /**
390
+ * Display label for the step
391
+ */
392
+ label: string;
393
+ /**
394
+ * Optional description for the step
395
+ */
396
+ description?: string;
397
+ /**
398
+ * Whether the step is completed
399
+ */
400
+ completed: boolean;
401
+ /**
402
+ * Whether the step is the current active step
403
+ */
404
+ active: boolean;
405
+ /**
406
+ * Optional icon for the step
407
+ */
408
+ icon?: React__default.ReactNode;
409
+ }
410
+
411
+ export declare const StepIndicator: React__default.FC<StepIndicatorProps>;
412
+
413
+ export declare interface StepIndicatorClassNames {
414
+ /** Outermost wrapper */
415
+ root?: string;
416
+ /** Individual step wrapper */
417
+ step?: string;
418
+ /** Active step circle / indicator */
419
+ stepActive?: string;
420
+ /** Completed step circle / indicator */
421
+ stepCompleted?: string;
422
+ /** Pending (incomplete, inactive) step circle / indicator */
423
+ stepPending?: string;
424
+ /** Connector line between steps */
425
+ connector?: string;
426
+ /** Step label text */
427
+ label?: string;
428
+ }
429
+
430
+ declare interface StepIndicatorProps {
431
+ /**
432
+ * Array of steps to display
433
+ */
434
+ steps: Step[];
435
+ /**
436
+ * Callback function called when a step is clicked
437
+ */
438
+ onStepClick?: (stepId: string) => void;
439
+ /**
440
+ * Whether the steps are clickable
441
+ * @default true
442
+ */
443
+ clickable?: boolean;
444
+ /**
445
+ * Orientation of the step indicator
446
+ * @default "horizontal"
447
+ */
448
+ orientation?: 'horizontal' | 'vertical';
449
+ /**
450
+ * Custom CSS class for the container
451
+ */
452
+ className?: string;
453
+ /**
454
+ * Custom CSS class for the active step
455
+ */
456
+ activeStepClassName?: string;
457
+ /**
458
+ * Custom CSS class for completed steps
459
+ */
460
+ completedStepClassName?: string;
461
+ /**
462
+ * Custom CSS class for incomplete steps
463
+ */
464
+ incompleteStepClassName?: string;
465
+ /**
466
+ * Per-section class name overrides
467
+ */
468
+ classNames?: StepIndicatorClassNames;
469
+ /**
470
+ * When true, all default classes are stripped.
471
+ * Only explicit overrides from `classNames` are applied.
472
+ * @default false
473
+ */
474
+ unstyled?: boolean;
475
+ }
476
+
477
+ export declare interface StorageAdapter<T = unknown> {
478
+ /** Load persisted data. Called once on hook mount. */
479
+ load(): T | null | Promise<T | null>;
480
+ /** Persist data. Called on every state change. */
481
+ save(data: T): void | Promise<void>;
482
+ /** Clear persisted data. Called on reset. */
483
+ remove(): void | Promise<void>;
484
+ }
485
+
486
+ /**
487
+ * Hook for conducting Data Protection Impact Assessments in compliance with the NDPA 2023
488
+ */
489
+ export declare function useDPIA({ sections, initialAnswers, adapter, storageKey, useLocalStorage, onComplete, }: UseDPIAOptions): UseDPIAReturn;
490
+
491
+ export declare function useDPIACompound(): DPIAContextValue;
492
+
493
+ declare interface UseDPIAOptions {
494
+ /**
495
+ * Sections of the DPIA questionnaire
496
+ */
497
+ sections: DPIASection[];
498
+ /**
499
+ * Initial answers (if resuming a DPIA)
500
+ */
501
+ initialAnswers?: DPIAAnswerMap;
502
+ /**
503
+ * Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
504
+ */
505
+ adapter?: StorageAdapter<DPIAAnswerMap>;
506
+ /**
507
+ * Storage key for DPIA data
508
+ * @default "ndpr_dpia_data"
509
+ * @deprecated Use adapter instead
510
+ */
511
+ storageKey?: string;
512
+ /**
513
+ * Whether to use local storage to persist DPIA data
514
+ * @default true
515
+ * @deprecated Use adapter instead
516
+ */
517
+ useLocalStorage?: boolean;
518
+ /**
519
+ * Callback function called when the DPIA is completed
520
+ */
521
+ onComplete?: (result: DPIAResult) => void;
522
+ }
523
+
524
+ declare interface UseDPIAReturn {
525
+ /**
526
+ * Current section index
527
+ */
528
+ currentSectionIndex: number;
529
+ /**
530
+ * Current section
531
+ */
532
+ currentSection: DPIASection | null;
533
+ /**
534
+ * All answers
535
+ */
536
+ answers: DPIAAnswerMap;
537
+ /**
538
+ * Update an answer
539
+ */
540
+ updateAnswer: (questionId: string, value: DPIAAnswerValue) => void;
541
+ /**
542
+ * Go to the next section
543
+ */
544
+ nextSection: () => boolean;
545
+ /**
546
+ * Go to the previous section
547
+ */
548
+ prevSection: () => boolean;
549
+ /**
550
+ * Go to a specific section
551
+ */
552
+ goToSection: (index: number) => boolean;
553
+ /**
554
+ * Check if the current section is valid
555
+ */
556
+ isCurrentSectionValid: () => boolean;
557
+ /**
558
+ * Get validation errors for the current section
559
+ */
560
+ getCurrentSectionErrors: () => Record<string, string>;
561
+ /**
562
+ * Check if the DPIA is complete
563
+ */
564
+ isComplete: () => boolean;
565
+ /**
566
+ * Complete the DPIA and generate a result
567
+ */
568
+ completeDPIA: (assessorInfo: {
569
+ name: string;
570
+ role: string;
571
+ email: string;
572
+ }, title: string, processingDescription: string) => DPIAResult;
573
+ /**
574
+ * Get the visible questions for the current section
575
+ */
576
+ getVisibleQuestions: () => DPIAQuestion[];
577
+ /**
578
+ * Reset the DPIA
579
+ */
580
+ resetDPIA: () => void;
581
+ /**
582
+ * Progress percentage
583
+ */
584
+ progress: number;
585
+ /**
586
+ * Whether the adapter is still loading data (relevant for async adapters)
587
+ */
588
+ isLoading: boolean;
589
+ }
590
+
591
+ export { }