@tantainnovative/ndpr-toolkit 2.4.1 → 3.0.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/README.md +226 -246
- package/dist/BreachReportForm-DpRrBoxU.d.ts +158 -0
- package/dist/BreachReportForm-yJ2Zl6gz.d.mts +158 -0
- package/dist/ConsentBanner-CDRT0o2k.d.mts +146 -0
- package/dist/ConsentBanner-Vxyt8SCX.d.ts +146 -0
- package/dist/{cross-border-entry-BrWVPly6.d.ts → CrossBorderTransferManager-D5Lc0e46.d.ts} +4 -5
- package/dist/{cross-border-entry-cCTvpwnT.d.mts → CrossBorderTransferManager-DkZhv9vD.d.mts} +4 -5
- package/dist/DPIAQuestionnaire-BkejviPj.d.mts +123 -0
- package/dist/DPIAQuestionnaire-DdSqXG3x.d.ts +123 -0
- package/dist/DSRRequestForm-BY8PogCU.d.mts +146 -0
- package/dist/DSRRequestForm-CHUg9cZh.d.ts +146 -0
- package/dist/DSRTracker-C6u_jAaK.d.mts +163 -0
- package/dist/DSRTracker-Dr_aT0pg.d.ts +163 -0
- package/dist/{lawful-basis-entry-CxZrofwG.d.mts → LawfulBasisTracker-CBqOxX1D.d.mts} +3 -5
- package/dist/{lawful-basis-entry-15qjKcNO.d.ts → LawfulBasisTracker-Cg30NbDA.d.ts} +3 -5
- package/dist/NDPRDashboard-CLJpEg0X.d.mts +44 -0
- package/dist/NDPRDashboard-DDWNd2Ah.d.ts +44 -0
- package/dist/{policy-E0fXZkda.d.mts → PolicyExporter-BIqSVjfC.d.mts} +4 -98
- package/dist/{policy-D2_jh5-T.d.ts → PolicyExporter-BNWaPBGU.d.ts} +4 -98
- package/dist/PolicyGenerator-BvcWPbxp.d.mts +96 -0
- package/dist/PolicyGenerator-BzRwtlgn.d.ts +96 -0
- package/dist/{ropa-entry-B0D7X1GV.d.ts → ROPAManager-BS4eB8Hw.d.mts} +4 -5
- package/dist/{ropa-entry-DiOThOc2.d.mts → ROPAManager-qxTrXLkD.d.ts} +4 -5
- package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +282 -0
- package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +282 -0
- package/dist/StepIndicator-D-nwRTyo.d.mts +171 -0
- package/dist/StepIndicator-D9ZATz_O.d.ts +171 -0
- package/dist/adapters.d.mts +25 -0
- package/dist/adapters.d.ts +25 -0
- package/dist/adapters.js +2 -0
- package/dist/adapters.mjs +2 -0
- package/dist/breach.d.mts +36 -431
- package/dist/breach.d.ts +36 -431
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-27NYSWUG.mjs +2 -0
- package/dist/chunk-2ORDHJRD.js +2 -0
- package/dist/chunk-2W7ARAW2.js +2 -0
- package/dist/chunk-3F34NACG.js +2 -0
- package/dist/chunk-3RGJV3VF.js +7 -0
- package/dist/chunk-3UWT64FI.mjs +2 -0
- package/dist/chunk-3V23O4ZJ.js +2 -0
- package/dist/chunk-3XAUN5IM.mjs +3 -0
- package/dist/chunk-5VMHKNJY.js +2 -0
- package/dist/chunk-6D3ZUGBB.mjs +2 -0
- package/dist/chunk-6E54NSAO.mjs +2 -0
- package/dist/chunk-7F5F5YWI.mjs +2 -0
- package/dist/chunk-7FIUX3ZM.js +89 -0
- package/dist/chunk-FR7ZYZXB.js +2 -0
- package/dist/chunk-FY5G6DGZ.js +7 -0
- package/dist/chunk-G26I6MP5.mjs +2 -0
- package/dist/chunk-GPJVTGHR.mjs +2 -0
- package/dist/chunk-GVANK6PL.js +3 -0
- package/dist/chunk-HNZK7LY3.mjs +2 -0
- package/dist/chunk-IKEPXHCZ.js +2 -0
- package/dist/chunk-IQQW52EF.js +2 -0
- package/dist/chunk-ISSGO2YT.mjs +72 -0
- package/dist/chunk-J6IKAGUP.mjs +89 -0
- package/dist/chunk-KHRBU5K7.js +2 -0
- package/dist/chunk-KNE4NXCY.mjs +7 -0
- package/dist/chunk-LFNA6WYQ.mjs +2 -0
- package/dist/chunk-NPI5T6NH.mjs +7 -0
- package/dist/chunk-NPLXE43Q.mjs +2 -0
- package/dist/chunk-P7BSBCB3.js +2 -0
- package/dist/chunk-PEH5GIMN.js +2 -0
- package/dist/chunk-RSUDIFZV.mjs +2 -0
- package/dist/chunk-SBNAMPAP.mjs +2 -0
- package/dist/chunk-SVCRYM4I.mjs +2 -0
- package/dist/chunk-U6VWHC46.js +72 -0
- package/dist/chunk-UK656RCG.js +2 -0
- package/dist/chunk-UNKXYVXY.js +2 -0
- package/dist/chunk-UOSEH6DC.js +2 -0
- package/dist/chunk-V37BM2LF.js +2 -0
- package/dist/chunk-V3MXWGXU.mjs +2 -0
- package/dist/chunk-VDZKGCAF.js +2 -0
- package/dist/chunk-WLSW4Z4W.mjs +2 -0
- package/dist/chunk-XSK4BSZJ.mjs +2 -0
- package/dist/chunk-YJCGEOLO.mjs +2 -0
- package/dist/chunk-ZCZ5RRZO.js +2 -0
- package/dist/compliance-score-racQe_E_.d.mts +115 -0
- package/dist/compliance-score-racQe_E_.d.ts +115 -0
- package/dist/consent.d.mts +67 -295
- package/dist/consent.d.ts +67 -295
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +8 -5
- package/dist/core.d.ts +8 -5
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border-BBi9rZyO.d.mts +54 -0
- package/dist/cross-border-Dy-U9Hu6.d.ts +54 -0
- package/dist/{cross-border-BMcqLvjC.d.mts → cross-border-UyT00llA.d.mts} +1 -52
- package/dist/{cross-border-BMcqLvjC.d.ts → cross-border-UyT00llA.d.ts} +1 -52
- package/dist/cross-border.d.mts +32 -4
- package/dist/cross-border.d.ts +32 -4
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/dpia.d.mts +28 -284
- package/dist/dpia.d.ts +28 -284
- package/dist/dpia.js +1 -1
- package/dist/dpia.mjs +1 -1
- package/dist/dsr.d.mts +29 -300
- package/dist/dsr.d.ts +29 -300
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +21 -10
- package/dist/hooks.d.ts +21 -10
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +28 -18
- package/dist/index.d.ts +28 -18
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lawful-basis.d.mts +31 -4
- package/dist/lawful-basis.d.ts +31 -4
- package/dist/lawful-basis.js +1 -1
- package/dist/lawful-basis.mjs +1 -1
- package/dist/policy.d.mts +36 -4
- package/dist/policy.d.ts +36 -4
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets.d.mts +124 -0
- package/dist/presets.d.ts +124 -0
- package/dist/presets.js +2 -0
- package/dist/presets.mjs +2 -0
- package/dist/{ropa-Li6UlL5H.d.ts → ropa-BDTM06tr.d.ts} +1 -49
- package/dist/{ropa-DP7pPPql.d.mts → ropa-CFHuT7jE.d.mts} +1 -49
- package/dist/ropa-CyynscU6.d.ts +51 -0
- package/dist/ropa-NIgxd8uP.d.mts +51 -0
- package/dist/ropa.d.mts +30 -4
- package/dist/ropa.d.ts +30 -4
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -1
- package/dist/styling-B7CBzYG7.d.ts +165 -0
- package/dist/styling-uJLsBbER.d.mts +165 -0
- package/dist/types-DK2CoKOC.d.mts +10 -0
- package/dist/types-DK2CoKOC.d.ts +10 -0
- package/dist/unstyled.d.mts +4 -4
- package/dist/unstyled.d.ts +4 -4
- package/dist/{useBreach-BBSoIcZO.d.mts → useBreach-CPr86Yan.d.mts} +18 -2
- package/dist/{useBreach-lFLbSyAN.d.ts → useBreach-DkVXvtJK.d.ts} +18 -2
- package/dist/{useConsent-D0pAfTlb.d.ts → useConsent-DCNkIJHR.d.mts} +12 -2
- package/dist/{useConsent-DOt2Njst.d.mts → useConsent-dOcELSfX.d.ts} +12 -2
- package/dist/{useCrossBorderTransfer-DmtACeqW.d.ts → useCrossBorderTransfer-BGNZt2lk.d.mts} +15 -3
- package/dist/{useCrossBorderTransfer-BZVFCXfr.d.mts → useCrossBorderTransfer-COqjgjsu.d.ts} +15 -3
- package/dist/{useDPIA-DBsg2yZx.d.ts → useDPIA-Dl16Te3r.d.ts} +13 -2
- package/dist/{useDPIA-Da7-Q_yW.d.mts → useDPIA-DzWye8JB.d.mts} +13 -2
- package/dist/{useDSR-YYZ6FYFs.d.mts → useDSR-C1LksCfP.d.mts} +13 -2
- package/dist/{useDSR-CYI7WCXr.d.ts → useDSR-DZel52O1.d.ts} +13 -2
- package/dist/{useDefaultPrivacyPolicy-CUluF_ic.d.mts → useDefaultPrivacyPolicy-BsYttRey.d.mts} +13 -2
- package/dist/{useDefaultPrivacyPolicy-B7kTHbZh.d.ts → useDefaultPrivacyPolicy-C-mG-A5S.d.ts} +13 -2
- package/dist/{useLawfulBasis-CpWuHtyh.d.mts → useLawfulBasis-CKJ-kw84.d.mts} +13 -2
- package/dist/{useLawfulBasis-CCWF9waR.d.ts → useLawfulBasis-DFTmu1ca.d.ts} +13 -2
- package/dist/{useROPA-BhJ3kvHp.d.ts → useROPA-BSSU1rfx.d.ts} +14 -2
- package/dist/{useROPA-DLFdjkxP.d.mts → useROPA-C2hjaBTz.d.mts} +14 -2
- package/package.json +18 -2
- package/dist/chunk-2XFAV267.mjs +0 -2
- package/dist/chunk-32UIWTGD.js +0 -72
- package/dist/chunk-3YCV2BA6.js +0 -2
- package/dist/chunk-4A354HL3.js +0 -2
- package/dist/chunk-5ZBO2UPH.js +0 -2
- package/dist/chunk-6GGGTRDZ.mjs +0 -2
- package/dist/chunk-BGHQTZAC.js +0 -94
- package/dist/chunk-BZTTQS4A.mjs +0 -7
- package/dist/chunk-EKVTLHBQ.js +0 -2
- package/dist/chunk-GMLNWS2N.mjs +0 -2
- package/dist/chunk-IBEKLDBY.mjs +0 -2
- package/dist/chunk-K3GMTMQ6.js +0 -2
- package/dist/chunk-L52PDW6O.mjs +0 -2
- package/dist/chunk-LI6WJ3LZ.js +0 -2
- package/dist/chunk-LXRXDTPI.js +0 -2
- package/dist/chunk-NW4A3JW6.mjs +0 -2
- package/dist/chunk-OITITR6K.mjs +0 -2
- package/dist/chunk-PDJGTQMY.mjs +0 -2
- package/dist/chunk-SKJCQKFL.mjs +0 -94
- package/dist/chunk-T44JQT2O.mjs +0 -2
- package/dist/chunk-TCJCE6WN.js +0 -2
- package/dist/chunk-VMJBW3EF.mjs +0 -2
- package/dist/chunk-WW3X3ELF.js +0 -2
- package/dist/chunk-XMYUYQH7.mjs +0 -72
- package/dist/chunk-ZNTMZ6NM.js +0 -7
- package/dist/chunk-ZU73VG3X.js +0 -2
package/dist/unstyled.d.mts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
interface UnstyledConsentBannerProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare const UnstyledConsentBanner:
|
|
7
|
+
declare const UnstyledConsentBanner: React__default.FC<UnstyledConsentBannerProps>;
|
|
8
8
|
|
|
9
9
|
interface UnstyledConsentSettingsProps {
|
|
10
10
|
className?: string;
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
}
|
|
13
|
-
declare const UnstyledConsentSettings:
|
|
13
|
+
declare const UnstyledConsentSettings: React__default.FC<UnstyledConsentSettingsProps>;
|
|
14
14
|
|
|
15
15
|
interface UnstyledConsentToggleProps {
|
|
16
16
|
category: 'analytics' | 'marketing' | 'functional';
|
|
17
17
|
className?: string;
|
|
18
18
|
label?: string;
|
|
19
19
|
}
|
|
20
|
-
declare const UnstyledConsentToggle:
|
|
20
|
+
declare const UnstyledConsentToggle: React__default.FC<UnstyledConsentToggleProps>;
|
|
21
21
|
|
|
22
22
|
export { UnstyledConsentBanner as ConsentBanner, UnstyledConsentSettings as ConsentSettings, UnstyledConsentToggle as ConsentToggle };
|
package/dist/unstyled.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
interface UnstyledConsentBannerProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare const UnstyledConsentBanner:
|
|
7
|
+
declare const UnstyledConsentBanner: React__default.FC<UnstyledConsentBannerProps>;
|
|
8
8
|
|
|
9
9
|
interface UnstyledConsentSettingsProps {
|
|
10
10
|
className?: string;
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
}
|
|
13
|
-
declare const UnstyledConsentSettings:
|
|
13
|
+
declare const UnstyledConsentSettings: React__default.FC<UnstyledConsentSettingsProps>;
|
|
14
14
|
|
|
15
15
|
interface UnstyledConsentToggleProps {
|
|
16
16
|
category: 'analytics' | 'marketing' | 'functional';
|
|
17
17
|
className?: string;
|
|
18
18
|
label?: string;
|
|
19
19
|
}
|
|
20
|
-
declare const UnstyledConsentToggle:
|
|
20
|
+
declare const UnstyledConsentToggle: React__default.FC<UnstyledConsentToggleProps>;
|
|
21
21
|
|
|
22
22
|
export { UnstyledConsentBanner as ConsentBanner, UnstyledConsentSettings as ConsentSettings, UnstyledConsentToggle as ConsentToggle };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { B as BreachCategory, a as BreachReport, b as RiskAssessment, R as RegulatoryNotification, N as NotificationRequirement } from './breach-Eu9byel8.mjs';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
2
3
|
|
|
4
|
+
type BreachCompositeState = {
|
|
5
|
+
reports: BreachReport[];
|
|
6
|
+
assessments: RiskAssessment[];
|
|
7
|
+
notifications: RegulatoryNotification[];
|
|
8
|
+
};
|
|
3
9
|
interface UseBreachOptions {
|
|
4
10
|
/**
|
|
5
11
|
* Available breach categories
|
|
@@ -9,14 +15,20 @@ interface UseBreachOptions {
|
|
|
9
15
|
* Initial breach reports
|
|
10
16
|
*/
|
|
11
17
|
initialReports?: BreachReport[];
|
|
18
|
+
/**
|
|
19
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
20
|
+
*/
|
|
21
|
+
adapter?: StorageAdapter<BreachCompositeState>;
|
|
12
22
|
/**
|
|
13
23
|
* Storage key for breach data
|
|
14
24
|
* @default "ndpr_breach_data"
|
|
25
|
+
* @deprecated Use adapter instead
|
|
15
26
|
*/
|
|
16
27
|
storageKey?: string;
|
|
17
28
|
/**
|
|
18
29
|
* Whether to use local storage to persist breach data
|
|
19
30
|
* @default true
|
|
31
|
+
* @deprecated Use adapter instead
|
|
20
32
|
*/
|
|
21
33
|
useLocalStorage?: boolean;
|
|
22
34
|
/**
|
|
@@ -90,10 +102,14 @@ interface UseBreachReturn {
|
|
|
90
102
|
* Clear all breach data
|
|
91
103
|
*/
|
|
92
104
|
clearBreachData: () => void;
|
|
105
|
+
/**
|
|
106
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
107
|
+
*/
|
|
108
|
+
isLoading: boolean;
|
|
93
109
|
}
|
|
94
110
|
/**
|
|
95
111
|
* Hook for managing data breach notifications in compliance with the NDPA (Section 40)
|
|
96
112
|
*/
|
|
97
|
-
declare function useBreach({ categories, initialReports, storageKey, useLocalStorage, onReport, onAssessment, onNotification }: UseBreachOptions): UseBreachReturn;
|
|
113
|
+
declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
|
|
98
114
|
|
|
99
|
-
export { useBreach as u };
|
|
115
|
+
export { type UseBreachReturn as U, useBreach as u };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { B as BreachCategory, a as BreachReport, b as RiskAssessment, R as RegulatoryNotification, N as NotificationRequirement } from './breach-Eu9byel8.js';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
2
3
|
|
|
4
|
+
type BreachCompositeState = {
|
|
5
|
+
reports: BreachReport[];
|
|
6
|
+
assessments: RiskAssessment[];
|
|
7
|
+
notifications: RegulatoryNotification[];
|
|
8
|
+
};
|
|
3
9
|
interface UseBreachOptions {
|
|
4
10
|
/**
|
|
5
11
|
* Available breach categories
|
|
@@ -9,14 +15,20 @@ interface UseBreachOptions {
|
|
|
9
15
|
* Initial breach reports
|
|
10
16
|
*/
|
|
11
17
|
initialReports?: BreachReport[];
|
|
18
|
+
/**
|
|
19
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
20
|
+
*/
|
|
21
|
+
adapter?: StorageAdapter<BreachCompositeState>;
|
|
12
22
|
/**
|
|
13
23
|
* Storage key for breach data
|
|
14
24
|
* @default "ndpr_breach_data"
|
|
25
|
+
* @deprecated Use adapter instead
|
|
15
26
|
*/
|
|
16
27
|
storageKey?: string;
|
|
17
28
|
/**
|
|
18
29
|
* Whether to use local storage to persist breach data
|
|
19
30
|
* @default true
|
|
31
|
+
* @deprecated Use adapter instead
|
|
20
32
|
*/
|
|
21
33
|
useLocalStorage?: boolean;
|
|
22
34
|
/**
|
|
@@ -90,10 +102,14 @@ interface UseBreachReturn {
|
|
|
90
102
|
* Clear all breach data
|
|
91
103
|
*/
|
|
92
104
|
clearBreachData: () => void;
|
|
105
|
+
/**
|
|
106
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
107
|
+
*/
|
|
108
|
+
isLoading: boolean;
|
|
93
109
|
}
|
|
94
110
|
/**
|
|
95
111
|
* Hook for managing data breach notifications in compliance with the NDPA (Section 40)
|
|
96
112
|
*/
|
|
97
|
-
declare function useBreach({ categories, initialReports, storageKey, useLocalStorage, onReport, onAssessment, onNotification }: UseBreachOptions): UseBreachReturn;
|
|
113
|
+
declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
|
|
98
114
|
|
|
99
|
-
export { useBreach as u };
|
|
115
|
+
export { type UseBreachReturn as U, useBreach as u };
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { C as ConsentOption,
|
|
1
|
+
import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.mjs';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
2
3
|
|
|
3
4
|
interface UseConsentOptions {
|
|
4
5
|
/**
|
|
5
6
|
* Consent options to present to the user
|
|
6
7
|
*/
|
|
7
8
|
options: ConsentOption[];
|
|
9
|
+
/**
|
|
10
|
+
* Pluggable storage adapter. When provided, takes precedence over storageOptions.
|
|
11
|
+
*/
|
|
12
|
+
adapter?: StorageAdapter<ConsentSettings>;
|
|
8
13
|
/**
|
|
9
14
|
* Storage options for consent settings
|
|
15
|
+
* @deprecated Use adapter instead
|
|
10
16
|
*/
|
|
11
17
|
storageOptions?: ConsentStorageOptions;
|
|
12
18
|
/**
|
|
@@ -56,10 +62,14 @@ interface UseConsentReturn {
|
|
|
56
62
|
* Reset consent settings (clear from storage)
|
|
57
63
|
*/
|
|
58
64
|
resetConsent: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
67
|
+
*/
|
|
68
|
+
isLoading: boolean;
|
|
59
69
|
}
|
|
60
70
|
/**
|
|
61
71
|
* Hook for managing user consent in compliance with NDPA
|
|
62
72
|
*/
|
|
63
|
-
declare function useConsent({ options, storageOptions, version, onChange }: UseConsentOptions): UseConsentReturn;
|
|
73
|
+
declare function useConsent({ options, adapter, storageOptions, version, onChange, }: UseConsentOptions): UseConsentReturn;
|
|
64
74
|
|
|
65
75
|
export { useConsent as u };
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { C as ConsentOption,
|
|
1
|
+
import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.js';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
2
3
|
|
|
3
4
|
interface UseConsentOptions {
|
|
4
5
|
/**
|
|
5
6
|
* Consent options to present to the user
|
|
6
7
|
*/
|
|
7
8
|
options: ConsentOption[];
|
|
9
|
+
/**
|
|
10
|
+
* Pluggable storage adapter. When provided, takes precedence over storageOptions.
|
|
11
|
+
*/
|
|
12
|
+
adapter?: StorageAdapter<ConsentSettings>;
|
|
8
13
|
/**
|
|
9
14
|
* Storage options for consent settings
|
|
15
|
+
* @deprecated Use adapter instead
|
|
10
16
|
*/
|
|
11
17
|
storageOptions?: ConsentStorageOptions;
|
|
12
18
|
/**
|
|
@@ -56,10 +62,14 @@ interface UseConsentReturn {
|
|
|
56
62
|
* Reset consent settings (clear from storage)
|
|
57
63
|
*/
|
|
58
64
|
resetConsent: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
67
|
+
*/
|
|
68
|
+
isLoading: boolean;
|
|
59
69
|
}
|
|
60
70
|
/**
|
|
61
71
|
* Hook for managing user consent in compliance with NDPA
|
|
62
72
|
*/
|
|
63
|
-
declare function useConsent({ options, storageOptions, version, onChange }: UseConsentOptions): UseConsentReturn;
|
|
73
|
+
declare function useConsent({ options, adapter, storageOptions, version, onChange, }: UseConsentOptions): UseConsentReturn;
|
|
64
74
|
|
|
65
75
|
export { useConsent as u };
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import { a as CrossBorderTransfer, C as CrossBorderSummary
|
|
1
|
+
import { a as CrossBorderTransfer, C as CrossBorderSummary } from './cross-border-UyT00llA.mjs';
|
|
2
|
+
import { a as TransferValidationResult } from './cross-border-BBi9rZyO.mjs';
|
|
3
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
2
4
|
|
|
3
5
|
interface UseCrossBorderTransferOptions {
|
|
4
6
|
/**
|
|
5
7
|
* Initial transfers to load
|
|
6
8
|
*/
|
|
7
9
|
initialTransfers?: CrossBorderTransfer[];
|
|
10
|
+
/**
|
|
11
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
12
|
+
*/
|
|
13
|
+
adapter?: StorageAdapter<CrossBorderTransfer[]>;
|
|
8
14
|
/**
|
|
9
15
|
* Storage key for transfer data
|
|
10
16
|
* @default "ndpr_cross_border_transfers"
|
|
17
|
+
* @deprecated Use adapter instead
|
|
11
18
|
*/
|
|
12
19
|
storageKey?: string;
|
|
13
20
|
/**
|
|
14
21
|
* Whether to use local storage to persist transfers
|
|
15
22
|
* @default true
|
|
23
|
+
* @deprecated Use adapter instead
|
|
16
24
|
*/
|
|
17
25
|
useLocalStorage?: boolean;
|
|
18
26
|
/**
|
|
@@ -57,10 +65,14 @@ interface UseCrossBorderTransferReturn {
|
|
|
57
65
|
* Validate a cross-border transfer
|
|
58
66
|
*/
|
|
59
67
|
validateTransfer: (transfer: CrossBorderTransfer) => TransferValidationResult;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
70
|
+
*/
|
|
71
|
+
isLoading: boolean;
|
|
60
72
|
}
|
|
61
73
|
/**
|
|
62
74
|
* Hook for managing cross-border data transfers in compliance with NDPA Part VI (Sections 41-45)
|
|
63
75
|
*/
|
|
64
|
-
declare function useCrossBorderTransfer({ initialTransfers, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
|
|
76
|
+
declare function useCrossBorderTransfer({ initialTransfers, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
|
|
65
77
|
|
|
66
|
-
export { useCrossBorderTransfer as u };
|
|
78
|
+
export { type UseCrossBorderTransferReturn as U, useCrossBorderTransfer as u };
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import { a as CrossBorderTransfer, C as CrossBorderSummary
|
|
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';
|
|
2
4
|
|
|
3
5
|
interface UseCrossBorderTransferOptions {
|
|
4
6
|
/**
|
|
5
7
|
* Initial transfers to load
|
|
6
8
|
*/
|
|
7
9
|
initialTransfers?: CrossBorderTransfer[];
|
|
10
|
+
/**
|
|
11
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
12
|
+
*/
|
|
13
|
+
adapter?: StorageAdapter<CrossBorderTransfer[]>;
|
|
8
14
|
/**
|
|
9
15
|
* Storage key for transfer data
|
|
10
16
|
* @default "ndpr_cross_border_transfers"
|
|
17
|
+
* @deprecated Use adapter instead
|
|
11
18
|
*/
|
|
12
19
|
storageKey?: string;
|
|
13
20
|
/**
|
|
14
21
|
* Whether to use local storage to persist transfers
|
|
15
22
|
* @default true
|
|
23
|
+
* @deprecated Use adapter instead
|
|
16
24
|
*/
|
|
17
25
|
useLocalStorage?: boolean;
|
|
18
26
|
/**
|
|
@@ -57,10 +65,14 @@ interface UseCrossBorderTransferReturn {
|
|
|
57
65
|
* Validate a cross-border transfer
|
|
58
66
|
*/
|
|
59
67
|
validateTransfer: (transfer: CrossBorderTransfer) => TransferValidationResult;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
70
|
+
*/
|
|
71
|
+
isLoading: boolean;
|
|
60
72
|
}
|
|
61
73
|
/**
|
|
62
74
|
* Hook for managing cross-border data transfers in compliance with NDPA Part VI (Sections 41-45)
|
|
63
75
|
*/
|
|
64
|
-
declare function useCrossBorderTransfer({ initialTransfers, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
|
|
76
|
+
declare function useCrossBorderTransfer({ initialTransfers, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseCrossBorderTransferOptions): UseCrossBorderTransferReturn;
|
|
65
77
|
|
|
66
|
-
export { useCrossBorderTransfer as u };
|
|
78
|
+
export { type UseCrossBorderTransferReturn as U, useCrossBorderTransfer as u };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { c as DPIASection, a as DPIAResult, D as DPIAQuestion } from './dpia-5OQVA1R_.js';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
2
3
|
|
|
3
4
|
interface UseDPIAOptions {
|
|
4
5
|
/**
|
|
@@ -9,14 +10,20 @@ interface UseDPIAOptions {
|
|
|
9
10
|
* Initial answers (if resuming a DPIA)
|
|
10
11
|
*/
|
|
11
12
|
initialAnswers?: Record<string, any>;
|
|
13
|
+
/**
|
|
14
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
|
+
*/
|
|
16
|
+
adapter?: StorageAdapter<Record<string, any>>;
|
|
12
17
|
/**
|
|
13
18
|
* Storage key for DPIA data
|
|
14
19
|
* @default "ndpr_dpia_data"
|
|
20
|
+
* @deprecated Use adapter instead
|
|
15
21
|
*/
|
|
16
22
|
storageKey?: string;
|
|
17
23
|
/**
|
|
18
24
|
* Whether to use local storage to persist DPIA data
|
|
19
25
|
* @default true
|
|
26
|
+
* @deprecated Use adapter instead
|
|
20
27
|
*/
|
|
21
28
|
useLocalStorage?: boolean;
|
|
22
29
|
/**
|
|
@@ -85,10 +92,14 @@ interface UseDPIAReturn {
|
|
|
85
92
|
* Progress percentage
|
|
86
93
|
*/
|
|
87
94
|
progress: number;
|
|
95
|
+
/**
|
|
96
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
97
|
+
*/
|
|
98
|
+
isLoading: boolean;
|
|
88
99
|
}
|
|
89
100
|
/**
|
|
90
101
|
* Hook for conducting Data Protection Impact Assessments in compliance with the NDPA 2023
|
|
91
102
|
*/
|
|
92
|
-
declare function useDPIA({ sections, initialAnswers, storageKey, useLocalStorage, onComplete }: UseDPIAOptions): UseDPIAReturn;
|
|
103
|
+
declare function useDPIA({ sections, initialAnswers, adapter, storageKey, useLocalStorage, onComplete, }: UseDPIAOptions): UseDPIAReturn;
|
|
93
104
|
|
|
94
|
-
export { useDPIA as u };
|
|
105
|
+
export { type UseDPIAReturn as U, useDPIA as u };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { c as DPIASection, a as DPIAResult, D as DPIAQuestion } from './dpia-5OQVA1R_.mjs';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
2
3
|
|
|
3
4
|
interface UseDPIAOptions {
|
|
4
5
|
/**
|
|
@@ -9,14 +10,20 @@ interface UseDPIAOptions {
|
|
|
9
10
|
* Initial answers (if resuming a DPIA)
|
|
10
11
|
*/
|
|
11
12
|
initialAnswers?: Record<string, any>;
|
|
13
|
+
/**
|
|
14
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
|
+
*/
|
|
16
|
+
adapter?: StorageAdapter<Record<string, any>>;
|
|
12
17
|
/**
|
|
13
18
|
* Storage key for DPIA data
|
|
14
19
|
* @default "ndpr_dpia_data"
|
|
20
|
+
* @deprecated Use adapter instead
|
|
15
21
|
*/
|
|
16
22
|
storageKey?: string;
|
|
17
23
|
/**
|
|
18
24
|
* Whether to use local storage to persist DPIA data
|
|
19
25
|
* @default true
|
|
26
|
+
* @deprecated Use adapter instead
|
|
20
27
|
*/
|
|
21
28
|
useLocalStorage?: boolean;
|
|
22
29
|
/**
|
|
@@ -85,10 +92,14 @@ interface UseDPIAReturn {
|
|
|
85
92
|
* Progress percentage
|
|
86
93
|
*/
|
|
87
94
|
progress: number;
|
|
95
|
+
/**
|
|
96
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
97
|
+
*/
|
|
98
|
+
isLoading: boolean;
|
|
88
99
|
}
|
|
89
100
|
/**
|
|
90
101
|
* Hook for conducting Data Protection Impact Assessments in compliance with the NDPA 2023
|
|
91
102
|
*/
|
|
92
|
-
declare function useDPIA({ sections, initialAnswers, storageKey, useLocalStorage, onComplete }: UseDPIAOptions): UseDPIAReturn;
|
|
103
|
+
declare function useDPIA({ sections, initialAnswers, adapter, storageKey, useLocalStorage, onComplete, }: UseDPIAOptions): UseDPIAReturn;
|
|
93
104
|
|
|
94
|
-
export { useDPIA as u };
|
|
105
|
+
export { type UseDPIAReturn as U, useDPIA as u };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { D as DSRRequest, c as RequestType, R as RequestStatus } from './dsr-Cm9lzWG7.mjs';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
2
3
|
|
|
3
4
|
interface UseDSROptions {
|
|
4
5
|
/**
|
|
@@ -9,14 +10,20 @@ interface UseDSROptions {
|
|
|
9
10
|
* Available request types
|
|
10
11
|
*/
|
|
11
12
|
requestTypes: RequestType[];
|
|
13
|
+
/**
|
|
14
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
|
+
*/
|
|
16
|
+
adapter?: StorageAdapter<DSRRequest[]>;
|
|
12
17
|
/**
|
|
13
18
|
* Storage key for requests
|
|
14
19
|
* @default "ndpr_dsr_requests"
|
|
20
|
+
* @deprecated Use adapter instead
|
|
15
21
|
*/
|
|
16
22
|
storageKey?: string;
|
|
17
23
|
/**
|
|
18
24
|
* Whether to use local storage to persist requests
|
|
19
25
|
* @default true
|
|
26
|
+
* @deprecated Use adapter instead
|
|
20
27
|
*/
|
|
21
28
|
useLocalStorage?: boolean;
|
|
22
29
|
/**
|
|
@@ -65,10 +72,14 @@ interface UseDSRReturn {
|
|
|
65
72
|
* Clear all requests
|
|
66
73
|
*/
|
|
67
74
|
clearRequests: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
77
|
+
*/
|
|
78
|
+
isLoading: boolean;
|
|
68
79
|
}
|
|
69
80
|
/**
|
|
70
81
|
* Hook for managing Data Subject Requests in compliance with the NDPA
|
|
71
82
|
*/
|
|
72
|
-
declare function useDSR({ initialRequests, requestTypes, storageKey, useLocalStorage, onSubmit, onUpdate }: UseDSROptions): UseDSRReturn;
|
|
83
|
+
declare function useDSR({ initialRequests, requestTypes, adapter, storageKey, useLocalStorage, onSubmit, onUpdate, }: UseDSROptions): UseDSRReturn;
|
|
73
84
|
|
|
74
|
-
export { useDSR as u };
|
|
85
|
+
export { type UseDSRReturn as U, useDSR as u };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { D as DSRRequest, c as RequestType, R as RequestStatus } from './dsr-Cm9lzWG7.js';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
2
3
|
|
|
3
4
|
interface UseDSROptions {
|
|
4
5
|
/**
|
|
@@ -9,14 +10,20 @@ interface UseDSROptions {
|
|
|
9
10
|
* Available request types
|
|
10
11
|
*/
|
|
11
12
|
requestTypes: RequestType[];
|
|
13
|
+
/**
|
|
14
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
|
+
*/
|
|
16
|
+
adapter?: StorageAdapter<DSRRequest[]>;
|
|
12
17
|
/**
|
|
13
18
|
* Storage key for requests
|
|
14
19
|
* @default "ndpr_dsr_requests"
|
|
20
|
+
* @deprecated Use adapter instead
|
|
15
21
|
*/
|
|
16
22
|
storageKey?: string;
|
|
17
23
|
/**
|
|
18
24
|
* Whether to use local storage to persist requests
|
|
19
25
|
* @default true
|
|
26
|
+
* @deprecated Use adapter instead
|
|
20
27
|
*/
|
|
21
28
|
useLocalStorage?: boolean;
|
|
22
29
|
/**
|
|
@@ -65,10 +72,14 @@ interface UseDSRReturn {
|
|
|
65
72
|
* Clear all requests
|
|
66
73
|
*/
|
|
67
74
|
clearRequests: () => void;
|
|
75
|
+
/**
|
|
76
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
77
|
+
*/
|
|
78
|
+
isLoading: boolean;
|
|
68
79
|
}
|
|
69
80
|
/**
|
|
70
81
|
* Hook for managing Data Subject Requests in compliance with the NDPA
|
|
71
82
|
*/
|
|
72
|
-
declare function useDSR({ initialRequests, requestTypes, storageKey, useLocalStorage, onSubmit, onUpdate }: UseDSROptions): UseDSRReturn;
|
|
83
|
+
declare function useDSR({ initialRequests, requestTypes, adapter, storageKey, useLocalStorage, onSubmit, onUpdate, }: UseDSROptions): UseDSRReturn;
|
|
73
84
|
|
|
74
|
-
export { useDSR as u };
|
|
85
|
+
export { type UseDSRReturn as U, useDSR as u };
|
package/dist/{useDefaultPrivacyPolicy-CUluF_ic.d.mts → useDefaultPrivacyPolicy-BsYttRey.d.mts}
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { c as PrivacyPolicy, a as PolicyTemplate, O as OrganizationInfo } from './privacy-Ca6te9Ir.mjs';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
2
3
|
|
|
3
4
|
interface UsePrivacyPolicyOptions {
|
|
4
5
|
/**
|
|
@@ -9,14 +10,20 @@ interface UsePrivacyPolicyOptions {
|
|
|
9
10
|
* Initial policy data (if editing an existing policy)
|
|
10
11
|
*/
|
|
11
12
|
initialPolicy?: PrivacyPolicy;
|
|
13
|
+
/**
|
|
14
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
|
+
*/
|
|
16
|
+
adapter?: StorageAdapter<PrivacyPolicy>;
|
|
12
17
|
/**
|
|
13
18
|
* Storage key for policy data
|
|
14
19
|
* @default "ndpr_privacy_policy"
|
|
20
|
+
* @deprecated Use adapter instead
|
|
15
21
|
*/
|
|
16
22
|
storageKey?: string;
|
|
17
23
|
/**
|
|
18
24
|
* Whether to use local storage to persist policy data
|
|
19
25
|
* @default true
|
|
26
|
+
* @deprecated Use adapter instead
|
|
20
27
|
*/
|
|
21
28
|
useLocalStorage?: boolean;
|
|
22
29
|
/**
|
|
@@ -80,11 +87,15 @@ interface UsePrivacyPolicyReturn {
|
|
|
80
87
|
valid: boolean;
|
|
81
88
|
errors: string[];
|
|
82
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
92
|
+
*/
|
|
93
|
+
isLoading: boolean;
|
|
83
94
|
}
|
|
84
95
|
/**
|
|
85
96
|
* Hook for generating NDPA-compliant privacy policies
|
|
86
97
|
*/
|
|
87
|
-
declare function usePrivacyPolicy({ templates, initialPolicy, storageKey, useLocalStorage, onGenerate }: UsePrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
98
|
+
declare function usePrivacyPolicy({ templates, initialPolicy, adapter, storageKey, useLocalStorage, onGenerate, }: UsePrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
88
99
|
|
|
89
100
|
interface UseDefaultPrivacyPolicyOptions {
|
|
90
101
|
/**
|
|
@@ -123,4 +134,4 @@ interface UseDefaultPrivacyPolicyOptions {
|
|
|
123
134
|
*/
|
|
124
135
|
declare function useDefaultPrivacyPolicy(options?: UseDefaultPrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
125
136
|
|
|
126
|
-
export { usePrivacyPolicy as a, useDefaultPrivacyPolicy as u };
|
|
137
|
+
export { type UsePrivacyPolicyReturn as U, usePrivacyPolicy as a, useDefaultPrivacyPolicy as u };
|
package/dist/{useDefaultPrivacyPolicy-B7kTHbZh.d.ts → useDefaultPrivacyPolicy-C-mG-A5S.d.ts}
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { c as PrivacyPolicy, a as PolicyTemplate, O as OrganizationInfo } from './privacy-Ca6te9Ir.js';
|
|
2
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
2
3
|
|
|
3
4
|
interface UsePrivacyPolicyOptions {
|
|
4
5
|
/**
|
|
@@ -9,14 +10,20 @@ interface UsePrivacyPolicyOptions {
|
|
|
9
10
|
* Initial policy data (if editing an existing policy)
|
|
10
11
|
*/
|
|
11
12
|
initialPolicy?: PrivacyPolicy;
|
|
13
|
+
/**
|
|
14
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
|
+
*/
|
|
16
|
+
adapter?: StorageAdapter<PrivacyPolicy>;
|
|
12
17
|
/**
|
|
13
18
|
* Storage key for policy data
|
|
14
19
|
* @default "ndpr_privacy_policy"
|
|
20
|
+
* @deprecated Use adapter instead
|
|
15
21
|
*/
|
|
16
22
|
storageKey?: string;
|
|
17
23
|
/**
|
|
18
24
|
* Whether to use local storage to persist policy data
|
|
19
25
|
* @default true
|
|
26
|
+
* @deprecated Use adapter instead
|
|
20
27
|
*/
|
|
21
28
|
useLocalStorage?: boolean;
|
|
22
29
|
/**
|
|
@@ -80,11 +87,15 @@ interface UsePrivacyPolicyReturn {
|
|
|
80
87
|
valid: boolean;
|
|
81
88
|
errors: string[];
|
|
82
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
92
|
+
*/
|
|
93
|
+
isLoading: boolean;
|
|
83
94
|
}
|
|
84
95
|
/**
|
|
85
96
|
* Hook for generating NDPA-compliant privacy policies
|
|
86
97
|
*/
|
|
87
|
-
declare function usePrivacyPolicy({ templates, initialPolicy, storageKey, useLocalStorage, onGenerate }: UsePrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
98
|
+
declare function usePrivacyPolicy({ templates, initialPolicy, adapter, storageKey, useLocalStorage, onGenerate, }: UsePrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
88
99
|
|
|
89
100
|
interface UseDefaultPrivacyPolicyOptions {
|
|
90
101
|
/**
|
|
@@ -123,4 +134,4 @@ interface UseDefaultPrivacyPolicyOptions {
|
|
|
123
134
|
*/
|
|
124
135
|
declare function useDefaultPrivacyPolicy(options?: UseDefaultPrivacyPolicyOptions): UsePrivacyPolicyReturn;
|
|
125
136
|
|
|
126
|
-
export { usePrivacyPolicy as a, useDefaultPrivacyPolicy as u };
|
|
137
|
+
export { type UsePrivacyPolicyReturn as U, usePrivacyPolicy as a, useDefaultPrivacyPolicy as u };
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
import { P as ProcessingActivity, a as LawfulBasisSummary } from './lawful-basis-Cv1VmDLn.mjs';
|
|
2
2
|
import { a as LawfulBasisValidationResult } from './lawful-basis-C2eGaoHM.mjs';
|
|
3
|
+
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
3
4
|
|
|
4
5
|
interface UseLawfulBasisOptions {
|
|
5
6
|
/**
|
|
6
7
|
* Initial processing activities to load
|
|
7
8
|
*/
|
|
8
9
|
initialActivities?: ProcessingActivity[];
|
|
10
|
+
/**
|
|
11
|
+
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
12
|
+
*/
|
|
13
|
+
adapter?: StorageAdapter<ProcessingActivity[]>;
|
|
9
14
|
/**
|
|
10
15
|
* Storage key for persisting activities
|
|
11
16
|
* @default "ndpr_lawful_basis_activities"
|
|
17
|
+
* @deprecated Use adapter instead
|
|
12
18
|
*/
|
|
13
19
|
storageKey?: string;
|
|
14
20
|
/**
|
|
15
21
|
* Whether to use local storage to persist activities
|
|
16
22
|
* @default true
|
|
23
|
+
* @deprecated Use adapter instead
|
|
17
24
|
*/
|
|
18
25
|
useLocalStorage?: boolean;
|
|
19
26
|
/**
|
|
@@ -58,11 +65,15 @@ interface UseLawfulBasisReturn {
|
|
|
58
65
|
* Validate a processing activity
|
|
59
66
|
*/
|
|
60
67
|
validateActivity: (activity: ProcessingActivity) => LawfulBasisValidationResult;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the adapter is still loading data (relevant for async adapters)
|
|
70
|
+
*/
|
|
71
|
+
isLoading: boolean;
|
|
61
72
|
}
|
|
62
73
|
/**
|
|
63
74
|
* Hook for managing lawful basis documentation for processing activities
|
|
64
75
|
* in compliance with NDPA 2023 Section 25.
|
|
65
76
|
*/
|
|
66
|
-
declare function useLawfulBasis({ initialActivities, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseLawfulBasisOptions): UseLawfulBasisReturn;
|
|
77
|
+
declare function useLawfulBasis({ initialActivities, adapter, storageKey, useLocalStorage, onAdd, onUpdate, onRemove, }?: UseLawfulBasisOptions): UseLawfulBasisReturn;
|
|
67
78
|
|
|
68
|
-
export { useLawfulBasis as u };
|
|
79
|
+
export { type UseLawfulBasisReturn as U, useLawfulBasis as u };
|