@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.
- package/CHANGELOG.md +19 -0
- 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 +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/{chunk-ASLMPY54.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-MLOWRZXO.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-NFJ4CB63.mjs → chunk-ID2NYIVE.mjs} +3 -3
- package/dist/chunk-J5WCPZLW.js +2 -0
- 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-4BOEFDDE.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/consent.d.mts +648 -84
- package/dist/consent.d.ts +648 -84
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -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/dpia.d.mts +591 -37
- package/dist/dpia.d.ts +591 -37
- package/dist/dsr.d.mts +654 -37
- package/dist/dsr.d.ts +654 -37
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +2174 -30
- package/dist/hooks.d.ts +2174 -30
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +4428 -43
- package/dist/index.d.ts +4428 -43
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lawful-basis.d.mts +368 -32
- package/dist/lawful-basis.d.ts +368 -32
- package/dist/policy.d.mts +1178 -83
- package/dist/policy.d.ts +1178 -83
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets.d.mts +1020 -114
- package/dist/presets.d.ts +1020 -114
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/ropa.d.mts +396 -31
- package/dist/ropa.d.ts +396 -31
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -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 +1 -1
- package/dist/unstyled.mjs +1 -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-2L7BSG7G.mjs +0 -2
- package/dist/chunk-5X32J5IA.mjs +0 -2
- package/dist/chunk-7D2OIPHH.mjs +0 -2
- package/dist/chunk-JKKRPS4P.js +0 -2
- package/dist/chunk-UHTJ6UFW.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-4n8g4zul.d.mts +0 -64
- package/dist/docx-VvcTLYZM.d.ts +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-5qTfp2z4.d.mts +0 -174
- package/dist/policy-engine-DzPxskOK.d.ts +0 -174
- package/dist/policy-sections-9tCb7VU7.d.ts +0 -56
- package/dist/policy-sections-CBWcJv-R.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-BSLyltzZ.d.mts +0 -52
- package/dist/useAdaptivePolicyWizard-CL7C7MTZ.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
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { a as CrossBorderTransfer, C as CrossBorderSummary } from './cross-border-UyT00llA.js';
|
|
2
|
-
import { a as TransferValidationResult } from './cross-border-Dy-U9Hu6.js';
|
|
3
|
-
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
4
|
-
|
|
5
|
-
interface UseCrossBorderTransferOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Initial transfers to load
|
|
8
|
-
*/
|
|
9
|
-
initialTransfers?: CrossBorderTransfer[];
|
|
10
|
-
/**
|
|
11
|
-
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
12
|
-
*/
|
|
13
|
-
adapter?: StorageAdapter<CrossBorderTransfer[]>;
|
|
14
|
-
/**
|
|
15
|
-
* Storage key for transfer data
|
|
16
|
-
* @default "ndpr_cross_border_transfers"
|
|
17
|
-
* @deprecated Use adapter instead
|
|
18
|
-
*/
|
|
19
|
-
storageKey?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Whether to use local storage to persist transfers
|
|
22
|
-
* @default true
|
|
23
|
-
* @deprecated Use adapter instead
|
|
24
|
-
*/
|
|
25
|
-
useLocalStorage?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Callback function called when a transfer is added
|
|
28
|
-
*/
|
|
29
|
-
onAdd?: (transfer: CrossBorderTransfer) => void;
|
|
30
|
-
/**
|
|
31
|
-
* Callback function called when a transfer is updated
|
|
32
|
-
*/
|
|
33
|
-
onUpdate?: (transfer: CrossBorderTransfer) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Callback function called when a transfer is removed
|
|
36
|
-
*/
|
|
37
|
-
onRemove?: (id: string) => void;
|
|
38
|
-
}
|
|
39
|
-
interface UseCrossBorderTransferReturn {
|
|
40
|
-
/**
|
|
41
|
-
* All cross-border transfers
|
|
42
|
-
*/
|
|
43
|
-
transfers: CrossBorderTransfer[];
|
|
44
|
-
/**
|
|
45
|
-
* Add a new cross-border transfer
|
|
46
|
-
*/
|
|
47
|
-
addTransfer: (transfer: Omit<CrossBorderTransfer, 'id' | 'createdAt' | 'updatedAt'>) => CrossBorderTransfer;
|
|
48
|
-
/**
|
|
49
|
-
* Update an existing cross-border transfer
|
|
50
|
-
*/
|
|
51
|
-
updateTransfer: (id: string, updates: Partial<CrossBorderTransfer>) => CrossBorderTransfer | null;
|
|
52
|
-
/**
|
|
53
|
-
* Remove a cross-border transfer
|
|
54
|
-
*/
|
|
55
|
-
removeTransfer: (id: string) => void;
|
|
56
|
-
/**
|
|
57
|
-
* Get a cross-border transfer by ID
|
|
58
|
-
*/
|
|
59
|
-
getTransfer: (id: string) => CrossBorderTransfer | null;
|
|
60
|
-
/**
|
|
61
|
-
* Get a compliance summary of all cross-border transfers
|
|
62
|
-
*/
|
|
63
|
-
getSummary: () => CrossBorderSummary;
|
|
64
|
-
/**
|
|
65
|
-
* Validate a cross-border transfer
|
|
66
|
-
*/
|
|
67
|
-
validateTransfer: (transfer: CrossBorderTransfer) => TransferValidationResult;
|
|
68
|
-
/**
|
|
69
|
-
* Whether the adapter is still loading data (relevant for async adapters)
|
|
70
|
-
*/
|
|
71
|
-
isLoading: boolean;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Hook for managing cross-border data transfers in compliance with NDPA Part VI (Sections 41-45)
|
|
75
|
-
*/
|
|
76
|
-
declare function useCrossBorderTransfer({ initialTransfers, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
|
|
77
|
-
|
|
78
|
-
export { type UseCrossBorderTransferReturn as U, useCrossBorderTransfer as u };
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { c as DPIASection, a as DPIAResult, D as DPIAQuestion } from './dpia-c9GiiOq0.mjs';
|
|
2
|
-
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
3
|
-
|
|
4
|
-
/** Possible value types for a DPIA answer */
|
|
5
|
-
type DPIAAnswerValue = string | number | boolean | string[];
|
|
6
|
-
/** A map of question IDs to their answer values */
|
|
7
|
-
type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
|
|
8
|
-
interface UseDPIAOptions {
|
|
9
|
-
/**
|
|
10
|
-
* Sections of the DPIA questionnaire
|
|
11
|
-
*/
|
|
12
|
-
sections: DPIASection[];
|
|
13
|
-
/**
|
|
14
|
-
* Initial answers (if resuming a DPIA)
|
|
15
|
-
*/
|
|
16
|
-
initialAnswers?: DPIAAnswerMap;
|
|
17
|
-
/**
|
|
18
|
-
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
19
|
-
*/
|
|
20
|
-
adapter?: StorageAdapter<DPIAAnswerMap>;
|
|
21
|
-
/**
|
|
22
|
-
* Storage key for DPIA data
|
|
23
|
-
* @default "ndpr_dpia_data"
|
|
24
|
-
* @deprecated Use adapter instead
|
|
25
|
-
*/
|
|
26
|
-
storageKey?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Whether to use local storage to persist DPIA data
|
|
29
|
-
* @default true
|
|
30
|
-
* @deprecated Use adapter instead
|
|
31
|
-
*/
|
|
32
|
-
useLocalStorage?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Callback function called when the DPIA is completed
|
|
35
|
-
*/
|
|
36
|
-
onComplete?: (result: DPIAResult) => void;
|
|
37
|
-
}
|
|
38
|
-
interface UseDPIAReturn {
|
|
39
|
-
/**
|
|
40
|
-
* Current section index
|
|
41
|
-
*/
|
|
42
|
-
currentSectionIndex: number;
|
|
43
|
-
/**
|
|
44
|
-
* Current section
|
|
45
|
-
*/
|
|
46
|
-
currentSection: DPIASection | null;
|
|
47
|
-
/**
|
|
48
|
-
* All answers
|
|
49
|
-
*/
|
|
50
|
-
answers: DPIAAnswerMap;
|
|
51
|
-
/**
|
|
52
|
-
* Update an answer
|
|
53
|
-
*/
|
|
54
|
-
updateAnswer: (questionId: string, value: DPIAAnswerValue) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Go to the next section
|
|
57
|
-
*/
|
|
58
|
-
nextSection: () => boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Go to the previous section
|
|
61
|
-
*/
|
|
62
|
-
prevSection: () => boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Go to a specific section
|
|
65
|
-
*/
|
|
66
|
-
goToSection: (index: number) => boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Check if the current section is valid
|
|
69
|
-
*/
|
|
70
|
-
isCurrentSectionValid: () => boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Get validation errors for the current section
|
|
73
|
-
*/
|
|
74
|
-
getCurrentSectionErrors: () => Record<string, string>;
|
|
75
|
-
/**
|
|
76
|
-
* Check if the DPIA is complete
|
|
77
|
-
*/
|
|
78
|
-
isComplete: () => boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Complete the DPIA and generate a result
|
|
81
|
-
*/
|
|
82
|
-
completeDPIA: (assessorInfo: {
|
|
83
|
-
name: string;
|
|
84
|
-
role: string;
|
|
85
|
-
email: string;
|
|
86
|
-
}, title: string, processingDescription: string) => DPIAResult;
|
|
87
|
-
/**
|
|
88
|
-
* Get the visible questions for the current section
|
|
89
|
-
*/
|
|
90
|
-
getVisibleQuestions: () => DPIAQuestion[];
|
|
91
|
-
/**
|
|
92
|
-
* Reset the DPIA
|
|
93
|
-
*/
|
|
94
|
-
resetDPIA: () => void;
|
|
95
|
-
/**
|
|
96
|
-
* Progress percentage
|
|
97
|
-
*/
|
|
98
|
-
progress: number;
|
|
99
|
-
/**
|
|
100
|
-
* Whether the adapter is still loading data (relevant for async adapters)
|
|
101
|
-
*/
|
|
102
|
-
isLoading: boolean;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Hook for conducting Data Protection Impact Assessments in compliance with the NDPA 2023
|
|
106
|
-
*/
|
|
107
|
-
declare function useDPIA({ sections, initialAnswers, adapter, storageKey, useLocalStorage, onComplete, }: UseDPIAOptions): UseDPIAReturn;
|
|
108
|
-
|
|
109
|
-
export { type UseDPIAReturn as U, useDPIA as u };
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { c as DPIASection, a as DPIAResult, D as DPIAQuestion } from './dpia-c9GiiOq0.js';
|
|
2
|
-
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
3
|
-
|
|
4
|
-
/** Possible value types for a DPIA answer */
|
|
5
|
-
type DPIAAnswerValue = string | number | boolean | string[];
|
|
6
|
-
/** A map of question IDs to their answer values */
|
|
7
|
-
type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
|
|
8
|
-
interface UseDPIAOptions {
|
|
9
|
-
/**
|
|
10
|
-
* Sections of the DPIA questionnaire
|
|
11
|
-
*/
|
|
12
|
-
sections: DPIASection[];
|
|
13
|
-
/**
|
|
14
|
-
* Initial answers (if resuming a DPIA)
|
|
15
|
-
*/
|
|
16
|
-
initialAnswers?: DPIAAnswerMap;
|
|
17
|
-
/**
|
|
18
|
-
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
19
|
-
*/
|
|
20
|
-
adapter?: StorageAdapter<DPIAAnswerMap>;
|
|
21
|
-
/**
|
|
22
|
-
* Storage key for DPIA data
|
|
23
|
-
* @default "ndpr_dpia_data"
|
|
24
|
-
* @deprecated Use adapter instead
|
|
25
|
-
*/
|
|
26
|
-
storageKey?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Whether to use local storage to persist DPIA data
|
|
29
|
-
* @default true
|
|
30
|
-
* @deprecated Use adapter instead
|
|
31
|
-
*/
|
|
32
|
-
useLocalStorage?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Callback function called when the DPIA is completed
|
|
35
|
-
*/
|
|
36
|
-
onComplete?: (result: DPIAResult) => void;
|
|
37
|
-
}
|
|
38
|
-
interface UseDPIAReturn {
|
|
39
|
-
/**
|
|
40
|
-
* Current section index
|
|
41
|
-
*/
|
|
42
|
-
currentSectionIndex: number;
|
|
43
|
-
/**
|
|
44
|
-
* Current section
|
|
45
|
-
*/
|
|
46
|
-
currentSection: DPIASection | null;
|
|
47
|
-
/**
|
|
48
|
-
* All answers
|
|
49
|
-
*/
|
|
50
|
-
answers: DPIAAnswerMap;
|
|
51
|
-
/**
|
|
52
|
-
* Update an answer
|
|
53
|
-
*/
|
|
54
|
-
updateAnswer: (questionId: string, value: DPIAAnswerValue) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Go to the next section
|
|
57
|
-
*/
|
|
58
|
-
nextSection: () => boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Go to the previous section
|
|
61
|
-
*/
|
|
62
|
-
prevSection: () => boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Go to a specific section
|
|
65
|
-
*/
|
|
66
|
-
goToSection: (index: number) => boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Check if the current section is valid
|
|
69
|
-
*/
|
|
70
|
-
isCurrentSectionValid: () => boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Get validation errors for the current section
|
|
73
|
-
*/
|
|
74
|
-
getCurrentSectionErrors: () => Record<string, string>;
|
|
75
|
-
/**
|
|
76
|
-
* Check if the DPIA is complete
|
|
77
|
-
*/
|
|
78
|
-
isComplete: () => boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Complete the DPIA and generate a result
|
|
81
|
-
*/
|
|
82
|
-
completeDPIA: (assessorInfo: {
|
|
83
|
-
name: string;
|
|
84
|
-
role: string;
|
|
85
|
-
email: string;
|
|
86
|
-
}, title: string, processingDescription: string) => DPIAResult;
|
|
87
|
-
/**
|
|
88
|
-
* Get the visible questions for the current section
|
|
89
|
-
*/
|
|
90
|
-
getVisibleQuestions: () => DPIAQuestion[];
|
|
91
|
-
/**
|
|
92
|
-
* Reset the DPIA
|
|
93
|
-
*/
|
|
94
|
-
resetDPIA: () => void;
|
|
95
|
-
/**
|
|
96
|
-
* Progress percentage
|
|
97
|
-
*/
|
|
98
|
-
progress: number;
|
|
99
|
-
/**
|
|
100
|
-
* Whether the adapter is still loading data (relevant for async adapters)
|
|
101
|
-
*/
|
|
102
|
-
isLoading: boolean;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Hook for conducting Data Protection Impact Assessments in compliance with the NDPA 2023
|
|
106
|
-
*/
|
|
107
|
-
declare function useDPIA({ sections, initialAnswers, adapter, storageKey, useLocalStorage, onComplete, }: UseDPIAOptions): UseDPIAReturn;
|
|
108
|
-
|
|
109
|
-
export { type UseDPIAReturn as U, useDPIA as u };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { D as DSRRequest, c as RequestType, R as RequestStatus } from './dsr-yKbqX531.mjs';
|
|
2
|
-
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
3
|
-
|
|
4
|
-
interface UseDSROptions {
|
|
5
|
-
/**
|
|
6
|
-
* Initial requests to load
|
|
7
|
-
*/
|
|
8
|
-
initialRequests?: DSRRequest[];
|
|
9
|
-
/**
|
|
10
|
-
* Available request types
|
|
11
|
-
*/
|
|
12
|
-
requestTypes: RequestType[];
|
|
13
|
-
/**
|
|
14
|
-
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
|
-
*/
|
|
16
|
-
adapter?: StorageAdapter<DSRRequest[]>;
|
|
17
|
-
/**
|
|
18
|
-
* Storage key for requests
|
|
19
|
-
* @default "ndpr_dsr_requests"
|
|
20
|
-
* @deprecated Use adapter instead
|
|
21
|
-
*/
|
|
22
|
-
storageKey?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Whether to use local storage to persist requests
|
|
25
|
-
* @default true
|
|
26
|
-
* @deprecated Use adapter instead
|
|
27
|
-
*/
|
|
28
|
-
useLocalStorage?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Callback function called when a request is submitted
|
|
31
|
-
*/
|
|
32
|
-
onSubmit?: (request: DSRRequest) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Callback function called when a request is updated
|
|
35
|
-
*/
|
|
36
|
-
onUpdate?: (request: DSRRequest) => void;
|
|
37
|
-
}
|
|
38
|
-
interface UseDSRReturn {
|
|
39
|
-
/**
|
|
40
|
-
* All requests
|
|
41
|
-
*/
|
|
42
|
-
requests: DSRRequest[];
|
|
43
|
-
/**
|
|
44
|
-
* Submit a new request
|
|
45
|
-
*/
|
|
46
|
-
submitRequest: (requestData: Omit<DSRRequest, 'id' | 'status' | 'submittedAt' | 'updatedAt' | 'estimatedCompletionDate'>) => DSRRequest;
|
|
47
|
-
/**
|
|
48
|
-
* Update an existing request
|
|
49
|
-
*/
|
|
50
|
-
updateRequest: (id: string, updates: Partial<DSRRequest>) => DSRRequest | null;
|
|
51
|
-
/**
|
|
52
|
-
* Get a request by ID
|
|
53
|
-
*/
|
|
54
|
-
getRequest: (id: string) => DSRRequest | null;
|
|
55
|
-
/**
|
|
56
|
-
* Get requests by status
|
|
57
|
-
*/
|
|
58
|
-
getRequestsByStatus: (status: RequestStatus) => DSRRequest[];
|
|
59
|
-
/**
|
|
60
|
-
* Get requests by type
|
|
61
|
-
*/
|
|
62
|
-
getRequestsByType: (type: string) => DSRRequest[];
|
|
63
|
-
/**
|
|
64
|
-
* Get the request type definition by ID
|
|
65
|
-
*/
|
|
66
|
-
getRequestType: (typeId: string) => RequestType | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* Format a request for display or submission
|
|
69
|
-
*/
|
|
70
|
-
formatRequest: (request: DSRRequest) => Record<string, unknown>;
|
|
71
|
-
/**
|
|
72
|
-
* Clear all requests
|
|
73
|
-
*/
|
|
74
|
-
clearRequests: () => void;
|
|
75
|
-
/**
|
|
76
|
-
* Whether the adapter is still loading data (relevant for async adapters)
|
|
77
|
-
*/
|
|
78
|
-
isLoading: boolean;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Hook for managing Data Subject Requests in compliance with the NDPA
|
|
82
|
-
*/
|
|
83
|
-
declare function useDSR({ initialRequests, requestTypes, adapter, storageKey, useLocalStorage, onSubmit, onUpdate, }: UseDSROptions): UseDSRReturn;
|
|
84
|
-
|
|
85
|
-
export { type UseDSRReturn as U, useDSR as u };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { D as DSRRequest, c as RequestType, R as RequestStatus } from './dsr-yKbqX531.js';
|
|
2
|
-
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
3
|
-
|
|
4
|
-
interface UseDSROptions {
|
|
5
|
-
/**
|
|
6
|
-
* Initial requests to load
|
|
7
|
-
*/
|
|
8
|
-
initialRequests?: DSRRequest[];
|
|
9
|
-
/**
|
|
10
|
-
* Available request types
|
|
11
|
-
*/
|
|
12
|
-
requestTypes: RequestType[];
|
|
13
|
-
/**
|
|
14
|
-
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
|
-
*/
|
|
16
|
-
adapter?: StorageAdapter<DSRRequest[]>;
|
|
17
|
-
/**
|
|
18
|
-
* Storage key for requests
|
|
19
|
-
* @default "ndpr_dsr_requests"
|
|
20
|
-
* @deprecated Use adapter instead
|
|
21
|
-
*/
|
|
22
|
-
storageKey?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Whether to use local storage to persist requests
|
|
25
|
-
* @default true
|
|
26
|
-
* @deprecated Use adapter instead
|
|
27
|
-
*/
|
|
28
|
-
useLocalStorage?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Callback function called when a request is submitted
|
|
31
|
-
*/
|
|
32
|
-
onSubmit?: (request: DSRRequest) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Callback function called when a request is updated
|
|
35
|
-
*/
|
|
36
|
-
onUpdate?: (request: DSRRequest) => void;
|
|
37
|
-
}
|
|
38
|
-
interface UseDSRReturn {
|
|
39
|
-
/**
|
|
40
|
-
* All requests
|
|
41
|
-
*/
|
|
42
|
-
requests: DSRRequest[];
|
|
43
|
-
/**
|
|
44
|
-
* Submit a new request
|
|
45
|
-
*/
|
|
46
|
-
submitRequest: (requestData: Omit<DSRRequest, 'id' | 'status' | 'submittedAt' | 'updatedAt' | 'estimatedCompletionDate'>) => DSRRequest;
|
|
47
|
-
/**
|
|
48
|
-
* Update an existing request
|
|
49
|
-
*/
|
|
50
|
-
updateRequest: (id: string, updates: Partial<DSRRequest>) => DSRRequest | null;
|
|
51
|
-
/**
|
|
52
|
-
* Get a request by ID
|
|
53
|
-
*/
|
|
54
|
-
getRequest: (id: string) => DSRRequest | null;
|
|
55
|
-
/**
|
|
56
|
-
* Get requests by status
|
|
57
|
-
*/
|
|
58
|
-
getRequestsByStatus: (status: RequestStatus) => DSRRequest[];
|
|
59
|
-
/**
|
|
60
|
-
* Get requests by type
|
|
61
|
-
*/
|
|
62
|
-
getRequestsByType: (type: string) => DSRRequest[];
|
|
63
|
-
/**
|
|
64
|
-
* Get the request type definition by ID
|
|
65
|
-
*/
|
|
66
|
-
getRequestType: (typeId: string) => RequestType | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* Format a request for display or submission
|
|
69
|
-
*/
|
|
70
|
-
formatRequest: (request: DSRRequest) => Record<string, unknown>;
|
|
71
|
-
/**
|
|
72
|
-
* Clear all requests
|
|
73
|
-
*/
|
|
74
|
-
clearRequests: () => void;
|
|
75
|
-
/**
|
|
76
|
-
* Whether the adapter is still loading data (relevant for async adapters)
|
|
77
|
-
*/
|
|
78
|
-
isLoading: boolean;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Hook for managing Data Subject Requests in compliance with the NDPA
|
|
82
|
-
*/
|
|
83
|
-
declare function useDSR({ initialRequests, requestTypes, adapter, storageKey, useLocalStorage, onSubmit, onUpdate, }: UseDSROptions): UseDSRReturn;
|
|
84
|
-
|
|
85
|
-
export { type UseDSRReturn as U, useDSR as u };
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { c as PrivacyPolicy, a as PolicyTemplate, O as OrganizationInfo } from './privacy-Ca6te9Ir.mjs';
|
|
2
|
-
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
3
|
-
|
|
4
|
-
interface UsePrivacyPolicyOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Available policy templates
|
|
7
|
-
*/
|
|
8
|
-
templates: PolicyTemplate[];
|
|
9
|
-
/**
|
|
10
|
-
* Initial policy data (if editing an existing policy)
|
|
11
|
-
*/
|
|
12
|
-
initialPolicy?: PrivacyPolicy;
|
|
13
|
-
/**
|
|
14
|
-
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
|
-
*/
|
|
16
|
-
adapter?: StorageAdapter<PrivacyPolicy>;
|
|
17
|
-
/**
|
|
18
|
-
* Storage key for policy data
|
|
19
|
-
* @default "ndpr_privacy_policy"
|
|
20
|
-
* @deprecated Use adapter instead
|
|
21
|
-
*/
|
|
22
|
-
storageKey?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Whether to use local storage to persist policy data
|
|
25
|
-
* @default true
|
|
26
|
-
* @deprecated Use adapter instead
|
|
27
|
-
*/
|
|
28
|
-
useLocalStorage?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Callback function called when a policy is generated
|
|
31
|
-
*/
|
|
32
|
-
onGenerate?: (policy: PrivacyPolicy) => void;
|
|
33
|
-
}
|
|
34
|
-
interface UsePrivacyPolicyReturn {
|
|
35
|
-
/**
|
|
36
|
-
* Current policy data
|
|
37
|
-
*/
|
|
38
|
-
policy: PrivacyPolicy | null;
|
|
39
|
-
/**
|
|
40
|
-
* Selected template
|
|
41
|
-
*/
|
|
42
|
-
selectedTemplate: PolicyTemplate | null;
|
|
43
|
-
/**
|
|
44
|
-
* Organization information
|
|
45
|
-
*/
|
|
46
|
-
organizationInfo: OrganizationInfo;
|
|
47
|
-
/**
|
|
48
|
-
* Select a template
|
|
49
|
-
*/
|
|
50
|
-
selectTemplate: (templateId: string) => boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Update organization information
|
|
53
|
-
*/
|
|
54
|
-
updateOrganizationInfo: (updates: Partial<OrganizationInfo>) => void;
|
|
55
|
-
/**
|
|
56
|
-
* Toggle whether a section is included in the policy
|
|
57
|
-
*/
|
|
58
|
-
toggleSection: (sectionId: string, included: boolean) => void;
|
|
59
|
-
/**
|
|
60
|
-
* Update section content
|
|
61
|
-
*/
|
|
62
|
-
updateSectionContent: (sectionId: string, content: string) => void;
|
|
63
|
-
/**
|
|
64
|
-
* Update variable values
|
|
65
|
-
*/
|
|
66
|
-
updateVariableValue: (variable: string, value: string) => void;
|
|
67
|
-
/**
|
|
68
|
-
* Generate the policy
|
|
69
|
-
*/
|
|
70
|
-
generatePolicy: () => PrivacyPolicy | null;
|
|
71
|
-
/**
|
|
72
|
-
* Get the generated policy text
|
|
73
|
-
*/
|
|
74
|
-
getPolicyText: () => {
|
|
75
|
-
fullText: string;
|
|
76
|
-
sectionTexts: Record<string, string>;
|
|
77
|
-
missingVariables: string[];
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Reset the policy
|
|
81
|
-
*/
|
|
82
|
-
resetPolicy: () => void;
|
|
83
|
-
/**
|
|
84
|
-
* Check if the policy is valid
|
|
85
|
-
*/
|
|
86
|
-
isValid: () => {
|
|
87
|
-
valid: boolean;
|
|
88
|
-
errors: string[];
|
|
89
|
-
};
|
|
90
|
-
/**
|
|
91
|
-
* Whether the adapter is still loading data (relevant for async adapters)
|
|
92
|
-
*/
|
|
93
|
-
isLoading: boolean;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Hook for generating NDPA-compliant privacy policies
|
|
97
|
-
*/
|
|
98
|
-
declare function usePrivacyPolicy({ templates, initialPolicy, adapter, storageKey, useLocalStorage, onGenerate, }: UsePrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
99
|
-
|
|
100
|
-
interface UseDefaultPrivacyPolicyOptions {
|
|
101
|
-
/**
|
|
102
|
-
* Organisation information to pre-fill into the policy. When provided and
|
|
103
|
-
* `autoGenerate` is true (the default), the hook will auto-select the
|
|
104
|
-
* default template and generate a renderable policy on first commit, so
|
|
105
|
-
* `policy` is non-null on the first useful render.
|
|
106
|
-
*/
|
|
107
|
-
orgInfo?: {
|
|
108
|
-
/** Organisation name (maps to `organizationInfo.name` and `orgName` variable) */
|
|
109
|
-
name?: string;
|
|
110
|
-
/** Privacy contact email (maps to `privacyEmail`) */
|
|
111
|
-
email?: string;
|
|
112
|
-
/** Organisation website URL */
|
|
113
|
-
website?: string;
|
|
114
|
-
/** Physical address */
|
|
115
|
-
address?: string;
|
|
116
|
-
/** Industry / sector descriptor */
|
|
117
|
-
industry?: string;
|
|
118
|
-
/** Data Protection Officer name */
|
|
119
|
-
dpoName?: string;
|
|
120
|
-
/** DPO email address */
|
|
121
|
-
dpoEmail?: string;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Whether the hook should auto-select the default template and generate
|
|
125
|
-
* the policy as soon as it's mounted with `orgInfo`. Set to false to
|
|
126
|
-
* retain manual control via `selectTemplate` / `generatePolicy`.
|
|
127
|
-
* @default true
|
|
128
|
-
*/
|
|
129
|
-
autoGenerate?: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* Storage key for policy data.
|
|
132
|
-
* @default "ndpr_privacy_policy"
|
|
133
|
-
*/
|
|
134
|
-
storageKey?: string;
|
|
135
|
-
/**
|
|
136
|
-
* Whether to persist policy data in local storage.
|
|
137
|
-
* @default true
|
|
138
|
-
*/
|
|
139
|
-
useLocalStorage?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Pluggable storage adapter. When provided, takes precedence over
|
|
142
|
-
* storageKey/useLocalStorage.
|
|
143
|
-
*/
|
|
144
|
-
adapter?: StorageAdapter<PrivacyPolicy>;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Convenience wrapper around `usePrivacyPolicy`. With `orgInfo` provided
|
|
148
|
-
* and `autoGenerate` enabled (default), `policy` is non-null on the first
|
|
149
|
-
* post-load render — no manual `selectTemplate` / `generatePolicy` chaining
|
|
150
|
-
* required.
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* ```tsx
|
|
154
|
-
* const { policy } = useDefaultPrivacyPolicy({
|
|
155
|
-
* orgInfo: { name: 'Acme Ltd', email: 'privacy@acme.ng' }
|
|
156
|
-
* });
|
|
157
|
-
* return policy ? <PolicyPage policy={policy} /> : <Spinner />;
|
|
158
|
-
* ```
|
|
159
|
-
*/
|
|
160
|
-
declare function useDefaultPrivacyPolicy(options?: UseDefaultPrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
161
|
-
|
|
162
|
-
export { type UsePrivacyPolicyReturn as U, usePrivacyPolicy as a, useDefaultPrivacyPolicy as u };
|