@tantainnovative/ndpr-toolkit 3.4.1 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/adapters.d.mts +34 -25
  3. package/dist/adapters.d.ts +34 -25
  4. package/dist/breach.d.mts +803 -44
  5. package/dist/breach.d.ts +803 -44
  6. package/dist/breach.js +1 -1
  7. package/dist/breach.mjs +1 -1
  8. package/dist/{chunk-ASLMPY54.js → chunk-3EGQWLJ6.js} +3 -3
  9. package/dist/chunk-B4Z5MBUC.mjs +2 -0
  10. package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
  11. package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
  12. package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
  13. package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
  14. package/dist/{chunk-MLOWRZXO.mjs → chunk-F5TXUA4O.mjs} +3 -3
  15. package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
  16. package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
  17. package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
  18. package/dist/{chunk-NFJ4CB63.mjs → chunk-ID2NYIVE.mjs} +3 -3
  19. package/dist/chunk-J5WCPZLW.js +2 -0
  20. package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
  21. package/dist/chunk-LU7PKE7Y.mjs +2 -0
  22. package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
  23. package/dist/{chunk-4BOEFDDE.js → chunk-ORFC66EA.js} +3 -3
  24. package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
  25. package/dist/chunk-SCWNM4PC.mjs +2 -0
  26. package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
  27. package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
  28. package/dist/chunk-TV4U6AIS.js +2 -0
  29. package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
  30. package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
  31. package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
  32. package/dist/consent.d.mts +648 -84
  33. package/dist/consent.d.ts +648 -84
  34. package/dist/consent.js +1 -1
  35. package/dist/consent.mjs +1 -1
  36. package/dist/core.d.mts +2049 -23
  37. package/dist/core.d.ts +2049 -23
  38. package/dist/core.js +1 -1
  39. package/dist/core.mjs +1 -1
  40. package/dist/cross-border.d.mts +470 -99
  41. package/dist/cross-border.d.ts +470 -99
  42. package/dist/dpia.d.mts +591 -37
  43. package/dist/dpia.d.ts +591 -37
  44. package/dist/dsr.d.mts +654 -37
  45. package/dist/dsr.d.ts +654 -37
  46. package/dist/dsr.js +1 -1
  47. package/dist/dsr.mjs +1 -1
  48. package/dist/hooks.d.mts +2174 -30
  49. package/dist/hooks.d.ts +2174 -30
  50. package/dist/hooks.js +1 -1
  51. package/dist/hooks.mjs +1 -1
  52. package/dist/index.d.mts +4428 -43
  53. package/dist/index.d.ts +4428 -43
  54. package/dist/index.js +1 -1
  55. package/dist/index.mjs +1 -1
  56. package/dist/lawful-basis.d.mts +368 -32
  57. package/dist/lawful-basis.d.ts +368 -32
  58. package/dist/policy.d.mts +1178 -83
  59. package/dist/policy.d.ts +1178 -83
  60. package/dist/policy.js +1 -1
  61. package/dist/policy.mjs +1 -1
  62. package/dist/presets.d.mts +1020 -114
  63. package/dist/presets.d.ts +1020 -114
  64. package/dist/presets.js +1 -1
  65. package/dist/presets.mjs +1 -1
  66. package/dist/ropa.d.mts +396 -31
  67. package/dist/ropa.d.ts +396 -31
  68. package/dist/ropa.js +1 -1
  69. package/dist/ropa.mjs +1 -1
  70. package/dist/server.d.mts +2133 -24
  71. package/dist/server.d.ts +2133 -24
  72. package/dist/server.js +1 -1
  73. package/dist/server.mjs +1 -1
  74. package/dist/unstyled.d.mts +523 -55
  75. package/dist/unstyled.d.ts +523 -55
  76. package/dist/unstyled.js +1 -1
  77. package/dist/unstyled.mjs +1 -1
  78. package/package.json +3 -3
  79. package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
  80. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
  81. package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
  82. package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
  83. package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
  84. package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
  85. package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
  86. package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
  87. package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
  88. package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
  89. package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
  90. package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
  91. package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
  92. package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
  93. package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
  94. package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
  95. package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
  96. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
  97. package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
  98. package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
  99. package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
  100. package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
  101. package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
  102. package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
  103. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
  104. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
  105. package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
  106. package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
  107. package/dist/breach-B_-6lDqS.d.mts +0 -17
  108. package/dist/breach-CzXqSsaY.d.ts +0 -17
  109. package/dist/breach-Eu9byel8.d.mts +0 -185
  110. package/dist/breach-Eu9byel8.d.ts +0 -185
  111. package/dist/chunk-2L7BSG7G.mjs +0 -2
  112. package/dist/chunk-5X32J5IA.mjs +0 -2
  113. package/dist/chunk-7D2OIPHH.mjs +0 -2
  114. package/dist/chunk-JKKRPS4P.js +0 -2
  115. package/dist/chunk-UHTJ6UFW.js +0 -2
  116. package/dist/compliance-score-racQe_E_.d.mts +0 -115
  117. package/dist/compliance-score-racQe_E_.d.ts +0 -115
  118. package/dist/consent-CmVzqZUk.d.mts +0 -99
  119. package/dist/consent-CmVzqZUk.d.ts +0 -99
  120. package/dist/consent-audit-BdByjYlM.d.mts +0 -65
  121. package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
  122. package/dist/cross-border-BBi9rZyO.d.mts +0 -54
  123. package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
  124. package/dist/cross-border-UyT00llA.d.mts +0 -141
  125. package/dist/cross-border-UyT00llA.d.ts +0 -141
  126. package/dist/docx-4n8g4zul.d.mts +0 -64
  127. package/dist/docx-VvcTLYZM.d.ts +0 -64
  128. package/dist/dpia-D82hUrJe.d.ts +0 -15
  129. package/dist/dpia-DQDFw2_l.d.mts +0 -15
  130. package/dist/dpia-c9GiiOq0.d.mts +0 -137
  131. package/dist/dpia-c9GiiOq0.d.ts +0 -137
  132. package/dist/dsr-CIx5sd7e.d.ts +0 -14
  133. package/dist/dsr-XZ_HqTlA.d.mts +0 -14
  134. package/dist/dsr-yKbqX531.d.mts +0 -128
  135. package/dist/dsr-yKbqX531.d.ts +0 -128
  136. package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
  137. package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
  138. package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
  139. package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
  140. package/dist/locale-CxJx2tzn.d.mts +0 -25
  141. package/dist/locale-DSkrtf-c.d.ts +0 -25
  142. package/dist/policy-engine-5qTfp2z4.d.mts +0 -174
  143. package/dist/policy-engine-DzPxskOK.d.ts +0 -174
  144. package/dist/policy-sections-9tCb7VU7.d.ts +0 -56
  145. package/dist/policy-sections-CBWcJv-R.d.mts +0 -56
  146. package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
  147. package/dist/policy-templates-DwYl2329.d.mts +0 -43
  148. package/dist/privacy-Ca6te9Ir.d.mts +0 -138
  149. package/dist/privacy-Ca6te9Ir.d.ts +0 -138
  150. package/dist/ropa-BDTM06tr.d.ts +0 -152
  151. package/dist/ropa-CFHuT7jE.d.mts +0 -152
  152. package/dist/ropa-CyynscU6.d.ts +0 -51
  153. package/dist/ropa-NIgxd8uP.d.mts +0 -51
  154. package/dist/sanitize-CxxwKxAx.d.mts +0 -94
  155. package/dist/sanitize-CxxwKxAx.d.ts +0 -94
  156. package/dist/styling-BMDGQDgS.d.mts +0 -64
  157. package/dist/styling-BaoQtV06.d.ts +0 -64
  158. package/dist/types-DK2CoKOC.d.mts +0 -10
  159. package/dist/types-DK2CoKOC.d.ts +0 -10
  160. package/dist/useAdaptivePolicyWizard-BSLyltzZ.d.mts +0 -52
  161. package/dist/useAdaptivePolicyWizard-CL7C7MTZ.d.ts +0 -52
  162. package/dist/useBreach-CPr86Yan.d.mts +0 -115
  163. package/dist/useBreach-DkVXvtJK.d.ts +0 -115
  164. package/dist/useConsent-DCNkIJHR.d.mts +0 -75
  165. package/dist/useConsent-dOcELSfX.d.ts +0 -75
  166. package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
  167. package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
  168. package/dist/useDPIA-B6180UQn.d.mts +0 -109
  169. package/dist/useDPIA-CTqbNbww.d.ts +0 -109
  170. package/dist/useDSR-WvHk8_iu.d.mts +0 -85
  171. package/dist/useDSR-wH4H6hSM.d.ts +0 -85
  172. package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
  173. package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
  174. package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
  175. package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
  176. package/dist/useROPA-BSSU1rfx.d.ts +0 -76
  177. package/dist/useROPA-C2hjaBTz.d.mts +0 -76
@@ -1,64 +0,0 @@
1
- import React__default from 'react';
2
- import { a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.js';
3
-
4
- interface ConsentStorageClassNames {
5
- root?: string;
6
- }
7
- interface ConsentStorageProps {
8
- /**
9
- * Current consent settings
10
- */
11
- settings: ConsentSettings;
12
- /**
13
- * Storage options for consent settings
14
- */
15
- storageOptions?: ConsentStorageOptions;
16
- /**
17
- * Callback function called when settings are loaded from storage
18
- */
19
- onLoad?: (settings: ConsentSettings | null) => void;
20
- /**
21
- * Callback function called when settings are saved to storage
22
- */
23
- onSave?: (settings: ConsentSettings) => void;
24
- /**
25
- * Whether to automatically save settings to storage
26
- * @default true
27
- */
28
- autoSave?: boolean;
29
- /**
30
- * Whether to automatically load settings from storage on mount
31
- * @default true
32
- */
33
- autoLoad?: boolean;
34
- /**
35
- * Object of CSS class overrides keyed by semantic section name.
36
- */
37
- classNames?: ConsentStorageClassNames;
38
- /**
39
- * When true, all default classes are removed so consumers
40
- * can style from scratch using classNames.
41
- */
42
- unstyled?: boolean;
43
- /**
44
- * Children to render
45
- * Can be either React nodes or a render prop function that receives storage methods
46
- */
47
- children?: React__default.ReactNode | ((props: {
48
- loadSettings: () => ConsentSettings | null;
49
- saveSettings: (settings: ConsentSettings) => void;
50
- clearSettings: () => void;
51
- loaded: boolean;
52
- }) => React__default.ReactNode);
53
- }
54
- declare const ConsentStorage: ({ settings, storageOptions, onLoad, onSave, autoSave, autoLoad, classNames, unstyled, children }: ConsentStorageProps) => React__default.ReactElement | null;
55
-
56
- /**
57
- * Resolves class names for a component section.
58
- * If unstyled is true, only the override class is used (or empty string).
59
- * If an override is provided, it fully REPLACES the default — no appending.
60
- * Otherwise the default class string is returned as-is.
61
- */
62
- declare function resolveClass(defaultClass: string, override?: string, unstyled?: boolean): string;
63
-
64
- export { ConsentStorage as C, type ConsentStorageClassNames as a, type ConsentStorageProps as b, resolveClass as r };
@@ -1,10 +0,0 @@
1
- interface StorageAdapter<T = unknown> {
2
- /** Load persisted data. Called once on hook mount. */
3
- load(): T | null | Promise<T | null>;
4
- /** Persist data. Called on every state change. */
5
- save(data: T): void | Promise<void>;
6
- /** Clear persisted data. Called on reset. */
7
- remove(): void | Promise<void>;
8
- }
9
-
10
- export type { StorageAdapter as S };
@@ -1,10 +0,0 @@
1
- interface StorageAdapter<T = unknown> {
2
- /** Load persisted data. Called once on hook mount. */
3
- load(): T | null | Promise<T | null>;
4
- /** Persist data. Called on every state change. */
5
- save(data: T): void | Promise<void>;
6
- /** Clear persisted data. Called on reset. */
7
- remove(): void | Promise<void>;
8
- }
9
-
10
- export type { StorageAdapter as S };
@@ -1,52 +0,0 @@
1
- import { c as PrivacyPolicy, P as PolicySection } from './privacy-Ca6te9Ir.mjs';
2
- import { P as PolicyDraft, C as ComplianceGap, T as TemplateContext, b as CustomSection, a as ComplianceResult, g as PDFExportOptions, f as DOCXExportOptions, H as HTMLExportOptions } from './policy-engine-5qTfp2z4.mjs';
3
- import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
4
-
5
- interface UseAdaptivePolicyWizardOptions {
6
- adapter?: StorageAdapter<PolicyDraft>;
7
- onComplete?: (policy: PrivacyPolicy) => void;
8
- onComplianceChange?: (score: number, gaps: ComplianceGap[]) => void;
9
- }
10
- interface UseAdaptivePolicyWizardReturn {
11
- currentStep: number;
12
- goToStep: (step: number) => void;
13
- nextStep: () => void;
14
- prevStep: () => void;
15
- canProceed: boolean;
16
- context: TemplateContext;
17
- updateContext: (updates: Partial<TemplateContext>) => void;
18
- updateOrg: (updates: Partial<TemplateContext['org']>) => void;
19
- toggleDataCategory: (categoryId: string) => void;
20
- togglePurpose: (purpose: string) => void;
21
- addProcessor: (processor: {
22
- name: string;
23
- purpose: string;
24
- country: string;
25
- }) => void;
26
- removeProcessor: (index: number) => void;
27
- policy: PrivacyPolicy | null;
28
- sections: PolicySection[];
29
- customSections: CustomSection[];
30
- addCustomSection: (section: Omit<CustomSection, 'id' | 'required'>) => void;
31
- updateCustomSection: (id: string, updates: Partial<CustomSection>) => void;
32
- removeCustomSection: (id: string) => void;
33
- reorderSections: (sectionId: string, direction: 'up' | 'down') => void;
34
- editSectionContent: (sectionId: string, content: string) => void;
35
- sectionOverrides: Record<string, string>;
36
- complianceScore: number;
37
- complianceResult: ComplianceResult;
38
- complianceGaps: ComplianceGap[];
39
- applyFix: (gapId: string) => void;
40
- handleExportPDF: (options?: PDFExportOptions) => Promise<Blob>;
41
- handleExportDOCX: (options?: DOCXExportOptions) => Promise<Blob>;
42
- handleExportHTML: (options?: HTMLExportOptions) => string;
43
- handleExportMarkdown: () => string;
44
- isDraftSaved: boolean;
45
- lastSavedAt: number | null;
46
- saveDraft: () => Promise<void>;
47
- discardDraft: () => void;
48
- isLoading: boolean;
49
- }
50
- declare function useAdaptivePolicyWizard(options?: UseAdaptivePolicyWizardOptions): UseAdaptivePolicyWizardReturn;
51
-
52
- export { type UseAdaptivePolicyWizardOptions as U, type UseAdaptivePolicyWizardReturn as a, useAdaptivePolicyWizard as u };
@@ -1,52 +0,0 @@
1
- import { c as PrivacyPolicy, P as PolicySection } from './privacy-Ca6te9Ir.js';
2
- import { P as PolicyDraft, C as ComplianceGap, T as TemplateContext, b as CustomSection, a as ComplianceResult, g as PDFExportOptions, f as DOCXExportOptions, H as HTMLExportOptions } from './policy-engine-DzPxskOK.js';
3
- import { S as StorageAdapter } from './types-DK2CoKOC.js';
4
-
5
- interface UseAdaptivePolicyWizardOptions {
6
- adapter?: StorageAdapter<PolicyDraft>;
7
- onComplete?: (policy: PrivacyPolicy) => void;
8
- onComplianceChange?: (score: number, gaps: ComplianceGap[]) => void;
9
- }
10
- interface UseAdaptivePolicyWizardReturn {
11
- currentStep: number;
12
- goToStep: (step: number) => void;
13
- nextStep: () => void;
14
- prevStep: () => void;
15
- canProceed: boolean;
16
- context: TemplateContext;
17
- updateContext: (updates: Partial<TemplateContext>) => void;
18
- updateOrg: (updates: Partial<TemplateContext['org']>) => void;
19
- toggleDataCategory: (categoryId: string) => void;
20
- togglePurpose: (purpose: string) => void;
21
- addProcessor: (processor: {
22
- name: string;
23
- purpose: string;
24
- country: string;
25
- }) => void;
26
- removeProcessor: (index: number) => void;
27
- policy: PrivacyPolicy | null;
28
- sections: PolicySection[];
29
- customSections: CustomSection[];
30
- addCustomSection: (section: Omit<CustomSection, 'id' | 'required'>) => void;
31
- updateCustomSection: (id: string, updates: Partial<CustomSection>) => void;
32
- removeCustomSection: (id: string) => void;
33
- reorderSections: (sectionId: string, direction: 'up' | 'down') => void;
34
- editSectionContent: (sectionId: string, content: string) => void;
35
- sectionOverrides: Record<string, string>;
36
- complianceScore: number;
37
- complianceResult: ComplianceResult;
38
- complianceGaps: ComplianceGap[];
39
- applyFix: (gapId: string) => void;
40
- handleExportPDF: (options?: PDFExportOptions) => Promise<Blob>;
41
- handleExportDOCX: (options?: DOCXExportOptions) => Promise<Blob>;
42
- handleExportHTML: (options?: HTMLExportOptions) => string;
43
- handleExportMarkdown: () => string;
44
- isDraftSaved: boolean;
45
- lastSavedAt: number | null;
46
- saveDraft: () => Promise<void>;
47
- discardDraft: () => void;
48
- isLoading: boolean;
49
- }
50
- declare function useAdaptivePolicyWizard(options?: UseAdaptivePolicyWizardOptions): UseAdaptivePolicyWizardReturn;
51
-
52
- export { type UseAdaptivePolicyWizardOptions as U, type UseAdaptivePolicyWizardReturn as a, useAdaptivePolicyWizard as u };
@@ -1,115 +0,0 @@
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';
3
-
4
- type BreachCompositeState = {
5
- reports: BreachReport[];
6
- assessments: RiskAssessment[];
7
- notifications: RegulatoryNotification[];
8
- };
9
- interface UseBreachOptions {
10
- /**
11
- * Available breach categories
12
- */
13
- categories: BreachCategory[];
14
- /**
15
- * Initial breach reports
16
- */
17
- initialReports?: BreachReport[];
18
- /**
19
- * Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
20
- */
21
- adapter?: StorageAdapter<BreachCompositeState>;
22
- /**
23
- * Storage key for breach data
24
- * @default "ndpr_breach_data"
25
- * @deprecated Use adapter instead
26
- */
27
- storageKey?: string;
28
- /**
29
- * Whether to use local storage to persist breach data
30
- * @default true
31
- * @deprecated Use adapter instead
32
- */
33
- useLocalStorage?: boolean;
34
- /**
35
- * Callback function called when a breach is reported
36
- */
37
- onReport?: (report: BreachReport) => void;
38
- /**
39
- * Callback function called when a risk assessment is completed
40
- */
41
- onAssessment?: (assessment: RiskAssessment) => void;
42
- /**
43
- * Callback function called when a notification is sent
44
- */
45
- onNotification?: (notification: RegulatoryNotification) => void;
46
- }
47
- interface UseBreachReturn {
48
- /**
49
- * All breach reports
50
- */
51
- reports: BreachReport[];
52
- /**
53
- * All risk assessments
54
- */
55
- assessments: RiskAssessment[];
56
- /**
57
- * All regulatory notifications
58
- */
59
- notifications: RegulatoryNotification[];
60
- /**
61
- * Submit a new breach report
62
- */
63
- reportBreach: (reportData: Omit<BreachReport, 'id' | 'reportedAt'>) => BreachReport;
64
- /**
65
- * Update an existing breach report
66
- */
67
- updateReport: (id: string, updates: Partial<BreachReport>) => BreachReport | null;
68
- /**
69
- * Get a breach report by ID
70
- */
71
- getReport: (id: string) => BreachReport | null;
72
- /**
73
- * Conduct a risk assessment for a breach
74
- */
75
- assessRisk: (breachId: string, assessmentData: Omit<RiskAssessment, 'id' | 'breachId' | 'assessedAt'>) => RiskAssessment;
76
- /**
77
- * Get a risk assessment for a breach
78
- */
79
- getAssessment: (breachId: string) => RiskAssessment | null;
80
- /**
81
- * Calculate notification requirements based on a risk assessment
82
- */
83
- calculateNotificationRequirements: (breachId: string) => NotificationRequirement | null;
84
- /**
85
- * Send a regulatory notification
86
- */
87
- sendNotification: (breachId: string, notificationData: Omit<RegulatoryNotification, 'id' | 'breachId' | 'sentAt'>) => RegulatoryNotification;
88
- /**
89
- * Get a regulatory notification for a breach
90
- */
91
- getNotification: (breachId: string) => RegulatoryNotification | null;
92
- /**
93
- * Get breaches that require notification within the next X hours
94
- */
95
- getBreachesRequiringNotification: (hoursThreshold?: number) => Array<{
96
- report: BreachReport;
97
- assessment: RiskAssessment;
98
- requirements: NotificationRequirement;
99
- hoursRemaining: number;
100
- }>;
101
- /**
102
- * Clear all breach data
103
- */
104
- clearBreachData: () => void;
105
- /**
106
- * Whether the adapter is still loading data (relevant for async adapters)
107
- */
108
- isLoading: boolean;
109
- }
110
- /**
111
- * Hook for managing data breach notifications in compliance with the NDPA (Section 40)
112
- */
113
- declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
114
-
115
- export { type UseBreachReturn as U, useBreach as u };
@@ -1,115 +0,0 @@
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';
3
-
4
- type BreachCompositeState = {
5
- reports: BreachReport[];
6
- assessments: RiskAssessment[];
7
- notifications: RegulatoryNotification[];
8
- };
9
- interface UseBreachOptions {
10
- /**
11
- * Available breach categories
12
- */
13
- categories: BreachCategory[];
14
- /**
15
- * Initial breach reports
16
- */
17
- initialReports?: BreachReport[];
18
- /**
19
- * Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
20
- */
21
- adapter?: StorageAdapter<BreachCompositeState>;
22
- /**
23
- * Storage key for breach data
24
- * @default "ndpr_breach_data"
25
- * @deprecated Use adapter instead
26
- */
27
- storageKey?: string;
28
- /**
29
- * Whether to use local storage to persist breach data
30
- * @default true
31
- * @deprecated Use adapter instead
32
- */
33
- useLocalStorage?: boolean;
34
- /**
35
- * Callback function called when a breach is reported
36
- */
37
- onReport?: (report: BreachReport) => void;
38
- /**
39
- * Callback function called when a risk assessment is completed
40
- */
41
- onAssessment?: (assessment: RiskAssessment) => void;
42
- /**
43
- * Callback function called when a notification is sent
44
- */
45
- onNotification?: (notification: RegulatoryNotification) => void;
46
- }
47
- interface UseBreachReturn {
48
- /**
49
- * All breach reports
50
- */
51
- reports: BreachReport[];
52
- /**
53
- * All risk assessments
54
- */
55
- assessments: RiskAssessment[];
56
- /**
57
- * All regulatory notifications
58
- */
59
- notifications: RegulatoryNotification[];
60
- /**
61
- * Submit a new breach report
62
- */
63
- reportBreach: (reportData: Omit<BreachReport, 'id' | 'reportedAt'>) => BreachReport;
64
- /**
65
- * Update an existing breach report
66
- */
67
- updateReport: (id: string, updates: Partial<BreachReport>) => BreachReport | null;
68
- /**
69
- * Get a breach report by ID
70
- */
71
- getReport: (id: string) => BreachReport | null;
72
- /**
73
- * Conduct a risk assessment for a breach
74
- */
75
- assessRisk: (breachId: string, assessmentData: Omit<RiskAssessment, 'id' | 'breachId' | 'assessedAt'>) => RiskAssessment;
76
- /**
77
- * Get a risk assessment for a breach
78
- */
79
- getAssessment: (breachId: string) => RiskAssessment | null;
80
- /**
81
- * Calculate notification requirements based on a risk assessment
82
- */
83
- calculateNotificationRequirements: (breachId: string) => NotificationRequirement | null;
84
- /**
85
- * Send a regulatory notification
86
- */
87
- sendNotification: (breachId: string, notificationData: Omit<RegulatoryNotification, 'id' | 'breachId' | 'sentAt'>) => RegulatoryNotification;
88
- /**
89
- * Get a regulatory notification for a breach
90
- */
91
- getNotification: (breachId: string) => RegulatoryNotification | null;
92
- /**
93
- * Get breaches that require notification within the next X hours
94
- */
95
- getBreachesRequiringNotification: (hoursThreshold?: number) => Array<{
96
- report: BreachReport;
97
- assessment: RiskAssessment;
98
- requirements: NotificationRequirement;
99
- hoursRemaining: number;
100
- }>;
101
- /**
102
- * Clear all breach data
103
- */
104
- clearBreachData: () => void;
105
- /**
106
- * Whether the adapter is still loading data (relevant for async adapters)
107
- */
108
- isLoading: boolean;
109
- }
110
- /**
111
- * Hook for managing data breach notifications in compliance with the NDPA (Section 40)
112
- */
113
- declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
114
-
115
- export { type UseBreachReturn as U, useBreach as u };
@@ -1,75 +0,0 @@
1
- import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.mjs';
2
- import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
3
-
4
- interface UseConsentOptions {
5
- /**
6
- * Consent options to present to the user
7
- */
8
- options: ConsentOption[];
9
- /**
10
- * Pluggable storage adapter. When provided, takes precedence over storageOptions.
11
- */
12
- adapter?: StorageAdapter<ConsentSettings>;
13
- /**
14
- * Storage options for consent settings
15
- * @deprecated Use adapter instead
16
- */
17
- storageOptions?: ConsentStorageOptions;
18
- /**
19
- * Version of the consent form
20
- * @default "1.0"
21
- */
22
- version?: string;
23
- /**
24
- * Callback function called when consent settings change
25
- */
26
- onChange?: (settings: ConsentSettings) => void;
27
- }
28
- interface UseConsentReturn {
29
- /**
30
- * Current consent settings
31
- */
32
- settings: ConsentSettings | null;
33
- /**
34
- * Whether consent has been given for a specific option
35
- */
36
- hasConsent: (optionId: string) => boolean;
37
- /**
38
- * Update consent settings
39
- */
40
- updateConsent: (consents: Record<string, boolean>) => void;
41
- /**
42
- * Accept all consent options
43
- */
44
- acceptAll: () => void;
45
- /**
46
- * Reject all non-required consent options
47
- */
48
- rejectAll: () => void;
49
- /**
50
- * Whether the consent banner should be shown
51
- */
52
- shouldShowBanner: boolean;
53
- /**
54
- * Whether consent settings are valid
55
- */
56
- isValid: boolean;
57
- /**
58
- * Validation errors (if any)
59
- */
60
- validationErrors: string[];
61
- /**
62
- * Reset consent settings (clear from storage)
63
- */
64
- resetConsent: () => void;
65
- /**
66
- * Whether the adapter is still loading data (relevant for async adapters)
67
- */
68
- isLoading: boolean;
69
- }
70
- /**
71
- * Hook for managing user consent in compliance with NDPA
72
- */
73
- declare function useConsent({ options, adapter, storageOptions, version, onChange, }: UseConsentOptions): UseConsentReturn;
74
-
75
- export { useConsent as u };
@@ -1,75 +0,0 @@
1
- import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.js';
2
- import { S as StorageAdapter } from './types-DK2CoKOC.js';
3
-
4
- interface UseConsentOptions {
5
- /**
6
- * Consent options to present to the user
7
- */
8
- options: ConsentOption[];
9
- /**
10
- * Pluggable storage adapter. When provided, takes precedence over storageOptions.
11
- */
12
- adapter?: StorageAdapter<ConsentSettings>;
13
- /**
14
- * Storage options for consent settings
15
- * @deprecated Use adapter instead
16
- */
17
- storageOptions?: ConsentStorageOptions;
18
- /**
19
- * Version of the consent form
20
- * @default "1.0"
21
- */
22
- version?: string;
23
- /**
24
- * Callback function called when consent settings change
25
- */
26
- onChange?: (settings: ConsentSettings) => void;
27
- }
28
- interface UseConsentReturn {
29
- /**
30
- * Current consent settings
31
- */
32
- settings: ConsentSettings | null;
33
- /**
34
- * Whether consent has been given for a specific option
35
- */
36
- hasConsent: (optionId: string) => boolean;
37
- /**
38
- * Update consent settings
39
- */
40
- updateConsent: (consents: Record<string, boolean>) => void;
41
- /**
42
- * Accept all consent options
43
- */
44
- acceptAll: () => void;
45
- /**
46
- * Reject all non-required consent options
47
- */
48
- rejectAll: () => void;
49
- /**
50
- * Whether the consent banner should be shown
51
- */
52
- shouldShowBanner: boolean;
53
- /**
54
- * Whether consent settings are valid
55
- */
56
- isValid: boolean;
57
- /**
58
- * Validation errors (if any)
59
- */
60
- validationErrors: string[];
61
- /**
62
- * Reset consent settings (clear from storage)
63
- */
64
- resetConsent: () => void;
65
- /**
66
- * Whether the adapter is still loading data (relevant for async adapters)
67
- */
68
- isLoading: boolean;
69
- }
70
- /**
71
- * Hook for managing user consent in compliance with NDPA
72
- */
73
- declare function useConsent({ options, adapter, storageOptions, version, onChange, }: UseConsentOptions): UseConsentReturn;
74
-
75
- export { useConsent as u };
@@ -1,78 +0,0 @@
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';
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 };