@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.
- package/CHANGELOG.md +25 -0
- package/README.md +80 -38
- package/dist/adapters.d.mts +34 -25
- package/dist/adapters.d.ts +34 -25
- package/dist/breach.d.mts +803 -44
- package/dist/breach.d.ts +803 -44
- package/dist/breach.js +2 -1
- package/dist/breach.mjs +2 -1
- package/dist/{chunk-2WH4DLV5.js → chunk-3EGQWLJ6.js} +3 -3
- package/dist/chunk-B4Z5MBUC.mjs +2 -0
- package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
- package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
- package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
- package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
- package/dist/{chunk-KSERBMXW.mjs → chunk-F5TXUA4O.mjs} +3 -3
- package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
- package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
- package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
- package/dist/{chunk-MG73MOZC.mjs → chunk-I557S566.mjs} +2 -2
- package/dist/{chunk-QVULSG6J.mjs → chunk-ID2NYIVE.mjs} +3 -3
- package/dist/chunk-J5WCPZLW.js +2 -0
- package/dist/{chunk-4R42ZNO7.mjs → chunk-JFFOPHU3.mjs} +57 -57
- package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
- package/dist/chunk-LU7PKE7Y.mjs +2 -0
- package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
- package/dist/{chunk-XMBSJJ5U.js → chunk-ORFC66EA.js} +3 -3
- package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
- package/dist/chunk-SCWNM4PC.mjs +2 -0
- package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
- package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
- package/dist/chunk-TV4U6AIS.js +2 -0
- package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
- package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
- package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
- package/dist/{chunk-RNTNHVKZ.js → chunk-YPKUHSK4.js} +2 -2
- package/dist/{chunk-UFPSUO52.js → chunk-Z73T6MWY.js} +57 -57
- package/dist/consent.d.mts +648 -84
- package/dist/consent.d.ts +648 -84
- package/dist/consent.js +2 -1
- package/dist/consent.mjs +2 -1
- package/dist/core.d.mts +2049 -23
- package/dist/core.d.ts +2049 -23
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.d.mts +470 -99
- package/dist/cross-border.d.ts +470 -99
- package/dist/cross-border.js +1 -0
- package/dist/cross-border.mjs +1 -0
- package/dist/dpia.d.mts +591 -37
- package/dist/dpia.d.ts +591 -37
- package/dist/dpia.js +1 -0
- package/dist/dpia.mjs +1 -0
- package/dist/dsr.d.mts +654 -37
- package/dist/dsr.d.ts +654 -37
- package/dist/dsr.js +2 -1
- package/dist/dsr.mjs +2 -1
- package/dist/hooks.d.mts +2174 -30
- package/dist/hooks.d.ts +2174 -30
- package/dist/hooks.js +2 -1
- package/dist/hooks.mjs +2 -1
- package/dist/index.d.mts +4428 -43
- package/dist/index.d.ts +4428 -43
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/dist/lawful-basis.d.mts +368 -32
- package/dist/lawful-basis.d.ts +368 -32
- package/dist/lawful-basis.js +1 -0
- package/dist/lawful-basis.mjs +1 -0
- package/dist/policy.d.mts +1178 -83
- package/dist/policy.d.ts +1178 -83
- package/dist/policy.js +2 -1
- package/dist/policy.mjs +2 -1
- package/dist/presets.d.mts +1020 -114
- package/dist/presets.d.ts +1020 -114
- package/dist/presets.js +2 -1
- package/dist/presets.mjs +2 -1
- package/dist/ropa.d.mts +396 -31
- package/dist/ropa.d.ts +396 -31
- package/dist/ropa.js +2 -1
- package/dist/ropa.mjs +2 -1
- package/dist/server.d.mts +2133 -24
- package/dist/server.d.ts +2133 -24
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/unstyled.d.mts +523 -55
- package/dist/unstyled.d.ts +523 -55
- package/dist/unstyled.js +2 -1
- package/dist/unstyled.mjs +2 -1
- package/package.json +3 -3
- package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
- package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
- package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
- package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
- package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
- package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
- package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
- package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
- package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
- package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
- package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
- package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
- package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
- package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
- package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
- package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
- package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
- package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
- package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
- package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
- package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
- package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
- package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
- package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
- package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
- package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
- package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
- package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
- package/dist/breach-B_-6lDqS.d.mts +0 -17
- package/dist/breach-CzXqSsaY.d.ts +0 -17
- package/dist/breach-Eu9byel8.d.mts +0 -185
- package/dist/breach-Eu9byel8.d.ts +0 -185
- package/dist/chunk-5X32J5IA.mjs +0 -2
- package/dist/chunk-7D2OIPHH.mjs +0 -2
- package/dist/chunk-JKKRPS4P.js +0 -2
- package/dist/chunk-NCOZB2WU.mjs +0 -2
- package/dist/chunk-RGNP45VR.js +0 -2
- package/dist/compliance-score-racQe_E_.d.mts +0 -115
- package/dist/compliance-score-racQe_E_.d.ts +0 -115
- package/dist/consent-CmVzqZUk.d.mts +0 -99
- package/dist/consent-CmVzqZUk.d.ts +0 -99
- package/dist/consent-audit-BdByjYlM.d.mts +0 -65
- package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
- package/dist/cross-border-BBi9rZyO.d.mts +0 -54
- package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
- package/dist/cross-border-UyT00llA.d.mts +0 -141
- package/dist/cross-border-UyT00llA.d.ts +0 -141
- package/dist/docx-BxKascXN.d.ts +0 -64
- package/dist/docx-CV7Vsry_.d.mts +0 -64
- package/dist/dpia-D82hUrJe.d.ts +0 -15
- package/dist/dpia-DQDFw2_l.d.mts +0 -15
- package/dist/dpia-c9GiiOq0.d.mts +0 -137
- package/dist/dpia-c9GiiOq0.d.ts +0 -137
- package/dist/dsr-CIx5sd7e.d.ts +0 -14
- package/dist/dsr-XZ_HqTlA.d.mts +0 -14
- package/dist/dsr-yKbqX531.d.mts +0 -128
- package/dist/dsr-yKbqX531.d.ts +0 -128
- package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
- package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
- package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
- package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
- package/dist/locale-CxJx2tzn.d.mts +0 -25
- package/dist/locale-DSkrtf-c.d.ts +0 -25
- package/dist/policy-engine-CCUCud2T.d.ts +0 -154
- package/dist/policy-engine-fYSqEqSW.d.mts +0 -154
- package/dist/policy-sections-BYx6fEFk.d.ts +0 -56
- package/dist/policy-sections-Dm97Nq8m.d.mts +0 -56
- package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
- package/dist/policy-templates-DwYl2329.d.mts +0 -43
- package/dist/privacy-Ca6te9Ir.d.mts +0 -138
- package/dist/privacy-Ca6te9Ir.d.ts +0 -138
- package/dist/ropa-BDTM06tr.d.ts +0 -152
- package/dist/ropa-CFHuT7jE.d.mts +0 -152
- package/dist/ropa-CyynscU6.d.ts +0 -51
- package/dist/ropa-NIgxd8uP.d.mts +0 -51
- package/dist/sanitize-CxxwKxAx.d.mts +0 -94
- package/dist/sanitize-CxxwKxAx.d.ts +0 -94
- package/dist/styling-BMDGQDgS.d.mts +0 -64
- package/dist/styling-BaoQtV06.d.ts +0 -64
- package/dist/types-DK2CoKOC.d.mts +0 -10
- package/dist/types-DK2CoKOC.d.ts +0 -10
- package/dist/useAdaptivePolicyWizard-BnjW4OR4.d.mts +0 -52
- package/dist/useAdaptivePolicyWizard-sb3m4-Zk.d.ts +0 -52
- package/dist/useBreach-CPr86Yan.d.mts +0 -115
- package/dist/useBreach-DkVXvtJK.d.ts +0 -115
- package/dist/useConsent-DCNkIJHR.d.mts +0 -75
- package/dist/useConsent-dOcELSfX.d.ts +0 -75
- package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
- package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
- package/dist/useDPIA-B6180UQn.d.mts +0 -109
- package/dist/useDPIA-CTqbNbww.d.ts +0 -109
- package/dist/useDSR-WvHk8_iu.d.mts +0 -85
- package/dist/useDSR-wH4H6hSM.d.ts +0 -85
- package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
- package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
- package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
- package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
- package/dist/useROPA-BSSU1rfx.d.ts +0 -76
- package/dist/useROPA-C2hjaBTz.d.mts +0 -76
package/dist/dpia.d.ts
CHANGED
|
@@ -1,37 +1,591 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
declare
|
|
36
|
-
|
|
37
|
-
|
|
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 { }
|
package/dist/dpia.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
'use strict';var chunk3VQAYQR7_js=require('./chunk-3VQAYQR7.js'),chunk5HL4UBFV_js=require('./chunk-5HL4UBFV.js'),chunkOPYQIJKY_js=require('./chunk-OPYQIJKY.js'),chunkP42Z5CFE_js=require('./chunk-P42Z5CFE.js');require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var i=react.createContext(null);function v(){let o=react.useContext(i);if(!o)throw new Error("DPIA compound components must be wrapped in <DPIA.Provider>. Example: <DPIA.Provider sections={...}><DPIA.Questionnaire /></DPIA.Provider>");return o}var p=({sections:o,initialAnswers:a,adapter:m,storageKey:I,useLocalStorage:A,onComplete:d,children:D})=>{let u=chunkOPYQIJKY_js.a({sections:o,initialAnswers:a,adapter:m,storageKey:I,useLocalStorage:A,onComplete:d}),c=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},u),{sections:o});return jsxRuntime.jsx(i.Provider,{value:c,children:D})};var y={Provider:p,Questionnaire:chunk5HL4UBFV_js.a,Report:chunk3VQAYQR7_js.a,StepIndicator:chunk3VQAYQR7_js.b};Object.defineProperty(exports,"DPIAReport",{enumerable:true,get:function(){return chunk3VQAYQR7_js.a}});Object.defineProperty(exports,"StepIndicator",{enumerable:true,get:function(){return chunk3VQAYQR7_js.b}});Object.defineProperty(exports,"DPIAQuestionnaire",{enumerable:true,get:function(){return chunk5HL4UBFV_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkOPYQIJKY_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkP42Z5CFE_js.a}});exports.DPIA=y;exports.DPIAProvider=p;exports.useDPIACompound=v;//# sourceMappingURL=dpia.js.map
|
|
2
3
|
//# sourceMappingURL=dpia.js.map
|
package/dist/dpia.mjs
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import {b,a}from'./chunk-TCN22KYP.mjs';export{a as DPIAReport,b as StepIndicator}from'./chunk-TCN22KYP.mjs';import {a as a$1}from'./chunk-LJNNPAFU.mjs';export{a as DPIAQuestionnaire}from'./chunk-LJNNPAFU.mjs';import {a as a$2}from'./chunk-6FGCGLH5.mjs';export{a as useDPIA}from'./chunk-6FGCGLH5.mjs';export{a as assessDPIARisk}from'./chunk-6TA2MVTU.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {b as b$1,a as a$3}from'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var i=createContext(null);function v(){let o=useContext(i);if(!o)throw new Error("DPIA compound components must be wrapped in <DPIA.Provider>. Example: <DPIA.Provider sections={...}><DPIA.Questionnaire /></DPIA.Provider>");return o}var p=({sections:o,initialAnswers:a,adapter:m,storageKey:I,useLocalStorage:A,onComplete:d,children:D})=>{let u=a$2({sections:o,initialAnswers:a,adapter:m,storageKey:I,useLocalStorage:A,onComplete:d}),c=b$1(a$3({},u),{sections:o});return jsx(i.Provider,{value:c,children:D})};var y={Provider:p,Questionnaire:a$1,Report:a,StepIndicator:b};export{y as DPIA,p as DPIAProvider,v as useDPIACompound};//# sourceMappingURL=dpia.mjs.map
|
|
2
3
|
//# sourceMappingURL=dpia.mjs.map
|