@tantainnovative/ndpr-toolkit 3.5.1 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +125 -0
- package/README.md +29 -8
- package/dist/adapters.d.mts +137 -3
- package/dist/adapters.d.ts +137 -3
- package/dist/adapters.js +1 -2
- package/dist/adapters.mjs +1 -2
- package/dist/breach.d.mts +80 -1
- package/dist/breach.d.ts +80 -1
- package/dist/breach.js +1 -2
- package/dist/breach.mjs +1 -2
- package/dist/{chunk-PATONNTZ.mjs → chunk-3HOXQNCH.mjs} +1 -2
- package/dist/{chunk-MJGOLP5M.js → chunk-3IA3KDII.js} +1 -2
- package/dist/{chunk-M2TPT5GB.js → chunk-3JPDTXGC.js} +1 -2
- package/dist/{chunk-BKRETVJ6.js → chunk-3YTAOT5O.js} +1 -2
- package/dist/{chunk-GOU6FU6Y.js → chunk-4CVBQC66.js} +1 -2
- package/dist/{chunk-E4NCJ7RD.mjs → chunk-4G3SRVRI.mjs} +1 -2
- package/dist/{chunk-6QPRDQZF.js → chunk-4QXTB3L6.js} +1 -2
- package/dist/{chunk-XNSZ7KUH.js → chunk-5GVMKUMP.js} +1 -2
- package/dist/chunk-66NQ5CVY.mjs +1 -0
- package/dist/chunk-732C2EVN.js +1 -0
- package/dist/chunk-7BJXI2HI.mjs +1 -0
- package/dist/{chunk-C5QO3SX4.js → chunk-7IFSWCQP.js} +1 -2
- package/dist/{chunk-A4PK7JB2.js → chunk-7ZZO7GVB.js} +1 -2
- package/dist/chunk-AME4HJR4.js +1 -0
- package/dist/chunk-AOHKVFAS.mjs +322 -0
- package/dist/{chunk-HO5M7M4M.js → chunk-B46SJB5V.js} +1 -2
- package/dist/chunk-BFAX7JQA.mjs +1 -0
- package/dist/{chunk-ID2NYIVE.mjs → chunk-BNHQFZHL.mjs} +2 -3
- package/dist/{chunk-RLYTX3MM.js → chunk-BRS52EDT.js} +1 -2
- package/dist/{chunk-OPYQIJKY.js → chunk-C7IDR2IV.js} +1 -2
- package/dist/{chunk-CISJAQ6W.mjs → chunk-COD3RMTL.mjs} +1 -2
- package/dist/chunk-CR2QZTGW.js +1 -0
- package/dist/{chunk-6WIP33TW.mjs → chunk-DBZSN4WP.mjs} +1 -2
- package/dist/{chunk-74Z23WUA.mjs → chunk-EEQALYOY.mjs} +1 -2
- package/dist/chunk-EFIBHKQE.mjs +1 -0
- package/dist/{chunk-GKKAK6ES.mjs → chunk-EWVK45Z3.mjs} +1 -2
- package/dist/{chunk-QSVVAZVT.mjs → chunk-EXEXUAF6.mjs} +1 -2
- package/dist/chunk-EZCGTHQV.js +6 -0
- package/dist/{chunk-SYMQJO2W.mjs → chunk-GTYXVAJX.mjs} +2 -3
- package/dist/{chunk-6FGCGLH5.mjs → chunk-H3XJV2IR.mjs} +1 -2
- package/dist/chunk-HBLGN4SD.js +1 -0
- package/dist/{chunk-MCWV7S2G.js → chunk-HHK5LHEG.js} +1 -2
- package/dist/{chunk-XHROISIF.mjs → chunk-HWHBINVN.mjs} +1 -2
- package/dist/{chunk-3EGQWLJ6.js → chunk-I2LMQWK3.js} +2 -3
- package/dist/{chunk-NQNFS3QI.js → chunk-I3Y4LOSL.js} +4 -5
- package/dist/chunk-ITCY2Z66.mjs +4 -0
- package/dist/{chunk-Z6IIMLZU.mjs → chunk-KDAZQO3N.mjs} +1 -2
- package/dist/{chunk-J5WCPZLW.js → chunk-L2BRFMVS.js} +1 -2
- package/dist/chunk-L2VO3MEJ.js +1 -0
- package/dist/{chunk-R5FW5XUQ.mjs → chunk-LQTARVPU.mjs} +1 -2
- package/dist/{chunk-6TA2MVTU.mjs → chunk-LRRENTT5.mjs} +1 -2
- package/dist/chunk-LTPSN2SU.mjs +1 -0
- package/dist/{chunk-LIM64IV2.js → chunk-LVGT3DLT.js} +2 -3
- package/dist/{chunk-TXBZPCGF.mjs → chunk-LWIKDDSU.mjs} +1 -2
- package/dist/chunk-MPBPAEZC.mjs +1 -0
- package/dist/{chunk-Z73T6MWY.js → chunk-N3MQQUQP.js} +39 -35
- package/dist/{chunk-HGGLW5TE.js → chunk-NUWVPRNI.js} +1 -2
- package/dist/chunk-O45PKBZA.mjs +6 -0
- package/dist/chunk-O6CUBNXK.mjs +3 -0
- package/dist/{chunk-7SMLHZ4B.js → chunk-P4LNLCSF.js} +1 -2
- package/dist/{chunk-VWPGIES4.mjs → chunk-PCU6GKBE.mjs} +1 -2
- package/dist/chunk-PGI2LM6P.js +103 -0
- package/dist/{chunk-U62QYKVG.mjs → chunk-PJNKQPQP.mjs} +1 -2
- package/dist/chunk-PL4XNCQA.mjs +1 -0
- package/dist/{chunk-LSNL4XR5.js → chunk-PZRQWPWD.js} +1 -2
- package/dist/chunk-Q64735OC.js +144 -0
- package/dist/chunk-QPRYXVH2.js +1 -0
- package/dist/{chunk-MQFZHA2D.js → chunk-RFPLZDIO.js} +1 -2
- package/dist/chunk-RMQ7OLNY.mjs +144 -0
- package/dist/chunk-ROTLSZMV.js +1 -0
- package/dist/{chunk-2AW7KAZO.mjs → chunk-RPXRPGHL.mjs} +1 -2
- package/dist/chunk-RV2VMWZJ.mjs +1 -0
- package/dist/chunk-RXZFYBUJ.js +1 -0
- package/dist/chunk-RYREGZVQ.js +1 -0
- package/dist/{chunk-B4Z5MBUC.mjs → chunk-RZ6GC6WN.mjs} +1 -2
- package/dist/chunk-S6COXIZA.js +2 -0
- package/dist/chunk-SFGW37LE.mjs +1 -0
- package/dist/{chunk-3NQQSU4P.js → chunk-SJDDNB6M.js} +1 -2
- package/dist/chunk-SJRIOZ4K.mjs +1 -0
- package/dist/{chunk-H3EYBSVP.mjs → chunk-TMXK4QKK.mjs} +2 -3
- package/dist/{chunk-P42Z5CFE.js → chunk-TQZWJGJ2.js} +1 -2
- package/dist/{chunk-EPT2K355.mjs → chunk-U5RWJRGA.mjs} +1 -2
- package/dist/{chunk-R3OYAJI6.mjs → chunk-UASG46LP.mjs} +1 -2
- package/dist/{chunk-RXL6CZAI.js → chunk-UAV7V4EM.js} +1 -2
- package/dist/chunk-UI536RU2.js +3 -0
- package/dist/{chunk-7AVN424U.js → chunk-UTFBKL73.js} +1 -2
- package/dist/{chunk-I54CDQGN.js → chunk-UXUMYP4L.js} +1 -2
- package/dist/chunk-V3RYHNHN.js +1 -0
- package/dist/{chunk-P3PULLYP.mjs → chunk-V7UFP6QU.mjs} +1 -2
- package/dist/{chunk-I4M2AA3N.js → chunk-VJTQXVAF.js} +1 -2
- package/dist/{chunk-ELKB2AFZ.js → chunk-VWED6UTN.js} +1 -2
- package/dist/{chunk-LU7PKE7Y.mjs → chunk-VYAL2TGT.mjs} +1 -2
- package/dist/chunk-W47OSMT6.js +2 -0
- package/dist/chunk-W65ZWTLD.mjs +1 -0
- package/dist/chunk-W7RBGZCC.js +1 -0
- package/dist/{chunk-5HL4UBFV.js → chunk-WDDCKYWA.js} +1 -2
- package/dist/{chunk-DJGS7SSN.mjs → chunk-WTGKZX7J.mjs} +1 -2
- package/dist/{chunk-TDDAYVKK.js → chunk-WZYCBW2R.js} +1 -2
- package/dist/chunk-X3GCGC3H.mjs +103 -0
- package/dist/chunk-XJO4DH3L.mjs +2 -0
- package/dist/{chunk-LWXZMKC2.js → chunk-XO3VQYTL.js} +7 -8
- package/dist/{chunk-IZCWCE7W.mjs → chunk-XOH4WXOZ.mjs} +1 -2
- package/dist/{chunk-SHMJNRHO.mjs → chunk-XP5PL6K7.mjs} +1 -2
- package/dist/{chunk-CKGJK4D7.mjs → chunk-Y3MKMAFQ.mjs} +2 -3
- package/dist/chunk-YFBDJ4FH.js +1 -0
- package/dist/chunk-YTU4FNM2.mjs +1 -0
- package/dist/{chunk-TV4U6AIS.js → chunk-Z763UI5U.js} +1 -2
- package/dist/chunk-ZHFLBL63.mjs +2 -0
- package/dist/{chunk-RRVKUCFR.mjs → chunk-ZIZL37BG.mjs} +1 -2
- package/dist/{chunk-WWT2ZSNU.mjs → chunk-ZJYULEER.mjs} +1 -2
- package/dist/{chunk-LJNNPAFU.mjs → chunk-ZQZJNKVB.mjs} +1 -2
- package/dist/chunk-ZVOIR4QH.js +4 -0
- package/dist/consent.js +1 -2
- package/dist/consent.mjs +1 -2
- package/dist/core.d.mts +98 -19
- package/dist/core.d.ts +98 -19
- package/dist/core.js +1 -2
- package/dist/core.mjs +1 -2
- package/dist/cross-border.d.mts +36 -14
- package/dist/cross-border.d.ts +36 -14
- package/dist/cross-border.js +1 -2
- package/dist/cross-border.mjs +1 -2
- package/dist/dpia.d.mts +4 -4
- package/dist/dpia.d.ts +4 -4
- package/dist/dpia.js +1 -2
- package/dist/dpia.mjs +1 -2
- package/dist/dsr.d.mts +30 -17
- package/dist/dsr.d.ts +30 -17
- package/dist/dsr.js +1 -2
- package/dist/dsr.mjs +1 -2
- package/dist/hooks.d.mts +113 -20
- package/dist/hooks.d.ts +113 -20
- package/dist/hooks.js +1 -2
- package/dist/hooks.mjs +1 -2
- package/dist/index.d.mts +422 -26
- package/dist/index.d.ts +422 -26
- package/dist/index.js +1 -2
- package/dist/index.mjs +1 -2
- package/dist/lawful-basis.js +1 -2
- package/dist/lawful-basis.mjs +1 -2
- package/dist/policy.js +1 -2
- package/dist/policy.mjs +1 -2
- package/dist/presets-consent.d.mts +139 -0
- package/dist/presets-consent.d.ts +139 -0
- package/dist/presets-consent.js +2 -0
- package/dist/presets-consent.mjs +2 -0
- package/dist/presets-dsr.d.mts +133 -0
- package/dist/presets-dsr.d.ts +133 -0
- package/dist/presets-dsr.js +2 -0
- package/dist/presets-dsr.mjs +2 -0
- package/dist/presets-policy.d.mts +203 -0
- package/dist/presets-policy.d.ts +203 -0
- package/dist/presets-policy.js +2 -0
- package/dist/presets-policy.mjs +2 -0
- package/dist/presets.d.mts +127 -5
- package/dist/presets.d.ts +127 -5
- package/dist/presets.js +1 -2
- package/dist/presets.mjs +1 -2
- package/dist/ropa.js +1 -2
- package/dist/ropa.mjs +1 -2
- package/dist/server.d.mts +226 -22
- package/dist/server.d.ts +226 -22
- package/dist/server.js +1 -2
- package/dist/server.mjs +1 -2
- package/dist/styles.css +34 -0
- package/dist/unstyled.d.mts +3 -1
- package/dist/unstyled.d.ts +3 -1
- package/dist/unstyled.js +1 -2
- package/dist/unstyled.mjs +1 -2
- package/package.json +83 -20
- package/dist/chunk-3VQAYQR7.js +0 -7
- package/dist/chunk-6HZL2WDU.mjs +0 -2
- package/dist/chunk-75TJPK2N.mjs +0 -2
- package/dist/chunk-ABDB7LEV.mjs +0 -2
- package/dist/chunk-AYKLAEOU.mjs +0 -2
- package/dist/chunk-C4YM4UMI.js +0 -2
- package/dist/chunk-CKJAECGV.js +0 -2
- package/dist/chunk-CPK5D5FY.js +0 -132
- package/dist/chunk-CWHBCQGT.mjs +0 -2
- package/dist/chunk-E64TU6IU.js +0 -2
- package/dist/chunk-F5TXUA4O.mjs +0 -4
- package/dist/chunk-GN5C32JB.mjs +0 -2
- package/dist/chunk-GRLIPT5V.mjs +0 -132
- package/dist/chunk-I557S566.mjs +0 -15
- package/dist/chunk-JBSCER34.js +0 -2
- package/dist/chunk-JFFOPHU3.mjs +0 -318
- package/dist/chunk-KF3EFJEF.mjs +0 -3
- package/dist/chunk-ORFC66EA.js +0 -4
- package/dist/chunk-RY3PGVLZ.mjs +0 -2
- package/dist/chunk-S4GRSNB4.js +0 -2
- package/dist/chunk-SCWNM4PC.mjs +0 -2
- package/dist/chunk-SKKOMFXH.js +0 -81
- package/dist/chunk-TCN22KYP.mjs +0 -7
- package/dist/chunk-TUNQUVHU.mjs +0 -81
- package/dist/chunk-VIQUXWJC.js +0 -2
- package/dist/chunk-WTJGLNTB.js +0 -3
- package/dist/chunk-XIM7KMD6.js +0 -2
- package/dist/chunk-YPKUHSK4.js +0 -15
- package/dist/chunk-ZPKVLTSX.js +0 -2
package/dist/presets.d.ts
CHANGED
|
@@ -53,6 +53,44 @@ declare interface BreachFormSubmission {
|
|
|
53
53
|
dataTypes: string[];
|
|
54
54
|
/** Estimated number of affected data subjects */
|
|
55
55
|
estimatedAffectedSubjects?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Approximate number of personal data RECORDS concerned. Distinct from
|
|
58
|
+
* subject count (one subject may have many records). NDPA Section 40(2).
|
|
59
|
+
*/
|
|
60
|
+
approximateRecordCount?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Categories of data subjects affected (e.g. customers, employees, minors).
|
|
63
|
+
* NDPA Section 40(2).
|
|
64
|
+
*/
|
|
65
|
+
dataSubjectCategories?: string[];
|
|
66
|
+
/** Whether sensitive personal data (NDPA Section 30) is involved */
|
|
67
|
+
involvesSensitiveData?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Likely consequences of the breach for affected data subjects.
|
|
70
|
+
* Required content for the NDPC report and Section 40(3) communications.
|
|
71
|
+
*/
|
|
72
|
+
likelyConsequences?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Measures taken or proposed to mitigate adverse effects.
|
|
75
|
+
* NDPA Section 40(3).
|
|
76
|
+
*/
|
|
77
|
+
mitigationMeasures?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Data Protection Officer contact details (Section 32(3)(c) — DPO is the
|
|
80
|
+
* named NDPC contact). Falls back to organisation-level DPO if omitted.
|
|
81
|
+
*/
|
|
82
|
+
dpoContact?: {
|
|
83
|
+
name: string;
|
|
84
|
+
email: string;
|
|
85
|
+
phone?: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Whether this is a phased / interim report submitted under Section 40(2)
|
|
89
|
+
* before complete information is available.
|
|
90
|
+
*/
|
|
91
|
+
isPhasedReport?: boolean;
|
|
92
|
+
/** ID of the prior phased report this report supplements, if any. */
|
|
93
|
+
supplementsReportId?: string;
|
|
56
94
|
/** Current status of the breach */
|
|
57
95
|
status: 'ongoing' | 'contained' | 'resolved';
|
|
58
96
|
/** Initial actions taken to address the breach */
|
|
@@ -321,6 +359,12 @@ declare interface DataCategory {
|
|
|
321
359
|
selected: boolean;
|
|
322
360
|
}
|
|
323
361
|
|
|
362
|
+
/** A map of question IDs to their answer values */
|
|
363
|
+
declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
|
|
364
|
+
|
|
365
|
+
/** Possible value types for a DPIA answer */
|
|
366
|
+
declare type DPIAAnswerValue = string | number | boolean | string[];
|
|
367
|
+
|
|
324
368
|
/**
|
|
325
369
|
* Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
|
|
326
370
|
* A DPIA is required when processing is likely to result in high risk to data subjects
|
|
@@ -517,6 +561,35 @@ export declare const NDPRComplianceDashboard: React__default.FC<NDPRDashboardPre
|
|
|
517
561
|
|
|
518
562
|
export declare const NDPRConsent: React__default.FC<NDPRConsentProps>;
|
|
519
563
|
|
|
564
|
+
/**
|
|
565
|
+
* UX copy overrides for the NDPRConsent preset. Pass any subset to
|
|
566
|
+
* replace the default text without dropping to the lower-level
|
|
567
|
+
* `<ConsentBanner>` API. Strings you omit fall back to the toolkit
|
|
568
|
+
* defaults (which already cite NDPA Section 26).
|
|
569
|
+
*
|
|
570
|
+
* @example
|
|
571
|
+
* <NDPRConsent copy={{
|
|
572
|
+
* title: 'Cookie preferences',
|
|
573
|
+
* description: 'Acme uses cookies to keep you signed in and improve our store.',
|
|
574
|
+
* acceptAll: 'Allow all',
|
|
575
|
+
* rejectAll: 'Only essentials',
|
|
576
|
+
* }} />
|
|
577
|
+
*/
|
|
578
|
+
declare interface NDPRConsentCopy {
|
|
579
|
+
/** Banner heading. Default: "We Value Your Privacy" */
|
|
580
|
+
title?: string;
|
|
581
|
+
/** Body paragraph under the heading. Default cites NDPA Section 26. */
|
|
582
|
+
description?: string;
|
|
583
|
+
/** Primary CTA — accepts all categories. Default: "Accept All" */
|
|
584
|
+
acceptAll?: string;
|
|
585
|
+
/** Secondary CTA — rejects all non-essential categories. Default: "Reject All" */
|
|
586
|
+
rejectAll?: string;
|
|
587
|
+
/** Tertiary CTA — opens the per-category controls. Default: "Customize" */
|
|
588
|
+
customize?: string;
|
|
589
|
+
/** Submit button on the per-category panel. Default: "Save Preferences" */
|
|
590
|
+
save?: string;
|
|
591
|
+
}
|
|
592
|
+
|
|
520
593
|
export declare interface NDPRConsentProps {
|
|
521
594
|
extraOptions?: ConsentOption[];
|
|
522
595
|
options?: ConsentOption[];
|
|
@@ -525,6 +598,11 @@ export declare interface NDPRConsentProps {
|
|
|
525
598
|
classNames?: ConsentBannerClassNames;
|
|
526
599
|
unstyled?: boolean;
|
|
527
600
|
onSave?: (settings: ConsentSettings) => void;
|
|
601
|
+
/**
|
|
602
|
+
* UX copy overrides — see {@link NDPRConsentCopy}. Lets you brand the
|
|
603
|
+
* banner without dropping to the lower-level `<ConsentBanner>` API.
|
|
604
|
+
*/
|
|
605
|
+
copy?: NDPRConsentCopy;
|
|
528
606
|
}
|
|
529
607
|
|
|
530
608
|
export declare const NDPRCrossBorder: React__default.FC<NDPRCrossBorderProps>;
|
|
@@ -574,10 +652,10 @@ export declare const NDPRDPIA: React__default.FC<NDPRDPIAProps>;
|
|
|
574
652
|
|
|
575
653
|
export declare interface NDPRDPIAProps {
|
|
576
654
|
sections?: DPIASection[];
|
|
577
|
-
adapter?: StorageAdapter<
|
|
655
|
+
adapter?: StorageAdapter<DPIAAnswerMap>;
|
|
578
656
|
classNames?: DPIAQuestionnaireClassNames;
|
|
579
657
|
unstyled?: boolean;
|
|
580
|
-
onComplete?: (answers:
|
|
658
|
+
onComplete?: (answers: DPIAAnswerMap) => void;
|
|
581
659
|
}
|
|
582
660
|
|
|
583
661
|
export declare const NDPRLawfulBasis: React__default.FC<NDPRLawfulBasisProps>;
|
|
@@ -615,6 +693,45 @@ export declare interface NDPRSubjectRightsProps {
|
|
|
615
693
|
classNames?: DSRRequestFormClassNames;
|
|
616
694
|
unstyled?: boolean;
|
|
617
695
|
onSubmit?: (data: DSRFormSubmission) => void;
|
|
696
|
+
/**
|
|
697
|
+
* Public-form mode. Use when the form should submit to your existing
|
|
698
|
+
* backend workflow instead of being state-managed by an adapter.
|
|
699
|
+
*
|
|
700
|
+
* When `submitTo` is set:
|
|
701
|
+
* - the form does NOT require an `adapter`
|
|
702
|
+
* - on submit, the toolkit POSTs the JSON-serialised `DSRFormSubmission`
|
|
703
|
+
* to this URL (with `Content-Type: application/json`)
|
|
704
|
+
* - your `onSubmit` callback still fires (after the POST resolves)
|
|
705
|
+
* - submit failures are surfaced via `onSubmitError`
|
|
706
|
+
*
|
|
707
|
+
* For more control over headers, credentials, or retry behaviour, build
|
|
708
|
+
* an `apiAdapter` (which now supports CSRF, retry, and error hooks in
|
|
709
|
+
* 3.6.0) and pass that as `adapter` instead. `submitTo` is the
|
|
710
|
+
* fire-and-forget shortcut for public forms.
|
|
711
|
+
*
|
|
712
|
+
* @example
|
|
713
|
+
* <NDPRSubjectRights submitTo="/api/dsr" />
|
|
714
|
+
*/
|
|
715
|
+
submitTo?: string;
|
|
716
|
+
/**
|
|
717
|
+
* Fetch options for the `submitTo` POST. Useful for adding `credentials`
|
|
718
|
+
* (cookies/auth), `X-CSRF-Token`, or any other header your backend
|
|
719
|
+
* requires. Ignored unless `submitTo` is set.
|
|
720
|
+
*
|
|
721
|
+
* @default { credentials: 'same-origin' }
|
|
722
|
+
*/
|
|
723
|
+
submitOptions?: {
|
|
724
|
+
headers?: Record<string, string> | (() => Record<string, string>);
|
|
725
|
+
credentials?: RequestCredentials;
|
|
726
|
+
};
|
|
727
|
+
/**
|
|
728
|
+
* Called when a `submitTo` POST fails (network error or non-2xx
|
|
729
|
+
* response). Receives the underlying error or Response.
|
|
730
|
+
*/
|
|
731
|
+
onSubmitError?: (ctx: {
|
|
732
|
+
error?: unknown;
|
|
733
|
+
response?: Response;
|
|
734
|
+
}) => void;
|
|
618
735
|
}
|
|
619
736
|
|
|
620
737
|
/**
|
|
@@ -913,7 +1030,9 @@ declare interface RequestType {
|
|
|
913
1030
|
/** Description of what this request type entails */
|
|
914
1031
|
description: string;
|
|
915
1032
|
/**
|
|
916
|
-
* NDPA section reference
|
|
1033
|
+
* NDPA 2023 section reference for this right
|
|
1034
|
+
* (e.g., "Section 34(1)(a)" for access, "Section 38" for portability).
|
|
1035
|
+
* Used for display purposes only — verify the exact subsection with counsel.
|
|
917
1036
|
*/
|
|
918
1037
|
ndpaSection?: string;
|
|
919
1038
|
/**
|
|
@@ -1009,8 +1128,11 @@ declare interface ThirdPartyProcessor {
|
|
|
1009
1128
|
}
|
|
1010
1129
|
|
|
1011
1130
|
/**
|
|
1012
|
-
* Cross-Border Data Transfer types aligned with NDPA 2023 Part
|
|
1013
|
-
* Personal data may only be transferred outside Nigeria under
|
|
1131
|
+
* Cross-Border Data Transfer types aligned with NDPA 2023 Part VIII (Sections 41-43).
|
|
1132
|
+
* Personal data may only be transferred outside Nigeria under the bases listed in
|
|
1133
|
+
* Section 41(1), where Section 42 defines adequacy and Section 43 lists derogations.
|
|
1134
|
+
*
|
|
1135
|
+
* Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
|
|
1014
1136
|
*/
|
|
1015
1137
|
/**
|
|
1016
1138
|
* Transfer mechanisms recognized under the NDPA
|
package/dist/presets.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var chunk3EGQWLJ6_js=require('./chunk-3EGQWLJ6.js'),chunkHGGLW5TE_js=require('./chunk-HGGLW5TE.js'),chunkLSNL4XR5_js=require('./chunk-LSNL4XR5.js'),chunkNQNFS3QI_js=require('./chunk-NQNFS3QI.js'),chunkXNSZ7KUH_js=require('./chunk-XNSZ7KUH.js');require('./chunk-ORFC66EA.js'),require('./chunk-Z73T6MWY.js'),require('./chunk-YPKUHSK4.js');var chunkS4GRSNB4_js=require('./chunk-S4GRSNB4.js');require('./chunk-CPK5D5FY.js'),require('./chunk-TDDAYVKK.js'),require('./chunk-C4YM4UMI.js'),require('./chunk-GOU6FU6Y.js');var chunkXIM7KMD6_js=require('./chunk-XIM7KMD6.js'),chunkZPKVLTSX_js=require('./chunk-ZPKVLTSX.js'),chunk5HL4UBFV_js=require('./chunk-5HL4UBFV.js'),chunkWTJGLNTB_js=require('./chunk-WTJGLNTB.js');require('./chunk-I54CDQGN.js'),require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a})=>{let u=t!=null?t:[...q,...d];return jsxRuntime.jsx(chunkXIM7KMD6_js.a,{options:u,onSave:f=>{p&&p.save(f),a==null||a(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkZPKVLTSX_js.a,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkWTJGLNTB_js.a,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsxRuntime.jsx(chunk3EGQWLJ6_js.a,chunkMQFZHA2D_js.a({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=react.useState({}),[u,y]=react.useState(0),f=(i,T)=>{a(B=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsxRuntime.jsx(chunk5HL4UBFV_js.a,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkLSNL4XR5_js.a,{activities:s,onAddActivity:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkNQNFS3QI_js.a,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(d!=null?d:Z);react.useEffect(()=>{if(!t)return;let e=false;return chunkMQFZHA2D_js.d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkXNSZ7KUH_js.a,{ropa:s,onAddRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=chunkMQFZHA2D_js.c(l,["input"]);let s=chunkS4GRSNB4_js.a(d);return jsxRuntime.jsx(chunkHGGLW5TE_js.a,chunkMQFZHA2D_js.a({report:s},t))};exports.NDPRBreachReport=U;exports.NDPRComplianceDashboard=re;exports.NDPRConsent=O;exports.NDPRCrossBorder=V;exports.NDPRDPIA=z;exports.NDPRLawfulBasis=H;exports.NDPRPrivacyPolicy=E;exports.NDPRROPA=ee;exports.NDPRSubjectRights=k;//# sourceMappingURL=presets.js.map
|
|
3
|
-
//# sourceMappingURL=presets.js.map
|
|
2
|
+
'use strict';var chunkW7RBGZCC_js=require('./chunk-W7RBGZCC.js');require('./chunk-I2LMQWK3.js');var chunkV3RYHNHN_js=require('./chunk-V3RYHNHN.js'),chunkRXZFYBUJ_js=require('./chunk-RXZFYBUJ.js'),chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkPZRQWPWD_js=require('./chunk-PZRQWPWD.js'),chunkI3Y4LOSL_js=require('./chunk-I3Y4LOSL.js'),chunk5GVMKUMP_js=require('./chunk-5GVMKUMP.js');require('./chunk-UI536RU2.js'),require('./chunk-N3MQQUQP.js');var chunkQPRYXVH2_js=require('./chunk-QPRYXVH2.js');require('./chunk-Q64735OC.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-4CVBQC66.js'),require('./chunk-732C2EVN.js'),require('./chunk-L2VO3MEJ.js'),require('./chunk-W47OSMT6.js');var chunkWDDCKYWA_js=require('./chunk-WDDCKYWA.js'),chunkS6COXIZA_js=require('./chunk-S6COXIZA.js');require('./chunk-UXUMYP4L.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var L=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],I=({categories:c=L,adapter:s,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsxRuntime.jsx(chunkS6COXIZA_js.a,{categories:c,onSubmit:d=>{s&&s.save(d),o(d);},classNames:u,unstyled:p});var k=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],_=({sections:c=k,adapter:s,classNames:u,unstyled:p,onComplete:o=()=>{}})=>{let[n,d]=react.useState({}),[m,f]=react.useState(0),P=(a,C)=>{d(S=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},S),{[a]:C}));},e=()=>{m<c.length-1?f(a=>a+1):(s&&s.save(n),o(n));},t=()=>{m>0&&f(a=>a-1);},r=Math.round((m+1)/c.length*100);return jsxRuntime.jsx(chunkWDDCKYWA_js.a,{sections:c,answers:n,onAnswerChange:P,currentSectionIndex:m,onNextSection:e,onPrevSection:t,progress:r,classNames:u,unstyled:p})};var F=({initialActivities:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunkPZRQWPWD_js.a,{activities:o,onAddActivity:e=>{let t=Date.now(),r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateActivity:(e,t)=>{let r=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onArchiveActivity:e=>{let t=o.map(r=>r.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{status:"inactive",updatedAt:Date.now()}):r);n(t),d(t);},classNames:u,unstyled:p})};var W=({initialTransfers:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunkI3Y4LOSL_js.a,{transfers:o,onAddTransfer:e=>{let t=Date.now(),r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateTransfer:(e,t)=>{let r=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onRemoveTransfer:e=>{let t=o.filter(r=>r.id!==e);n(t),d(t);},classNames:u,unstyled:p})};var j={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},V=({initialData:c,adapter:s,classNames:u,unstyled:p})=>{let[o,n]=react.useState(c!=null?c:j);react.useEffect(()=>{if(!s)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){let r=yield s.load();!e&&r&&n(r);}),()=>{e=true;}},[s]);let d=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunk5GVMKUMP_js.a,{ropa:o,onAddRecord:e=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:[...o.records,e],lastUpdated:Date.now()});n(t),d(t);},onUpdateRecord:(e,t)=>{let r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:o.records.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a),lastUpdated:Date.now()});n(r),d(r);},onArchiveRecord:e=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:o.records.map(r=>r.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{status:"archived",updatedAt:Date.now()}):r),lastUpdated:Date.now()});n(t),d(t);},classNames:u,unstyled:p})};var G=u=>{var p=u,{input:c}=p,s=chunkRFPLZDIO_js.c(p,["input"]);let o=chunkQPRYXVH2_js.a(c);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:o},s))};Object.defineProperty(exports,"NDPRPrivacyPolicy",{enumerable:true,get:function(){return chunkW7RBGZCC_js.a}});Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunkV3RYHNHN_js.a}});Object.defineProperty(exports,"NDPRSubjectRights",{enumerable:true,get:function(){return chunkRXZFYBUJ_js.a}});exports.NDPRBreachReport=I;exports.NDPRComplianceDashboard=G;exports.NDPRCrossBorder=W;exports.NDPRDPIA=_;exports.NDPRLawfulBasis=F;exports.NDPRROPA=V;
|
package/dist/presets.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {a as a$3}from'./chunk-ID2NYIVE.mjs';import {a as a$a}from'./chunk-RRVKUCFR.mjs';import {a as a$6}from'./chunk-CISJAQ6W.mjs';import {a as a$7}from'./chunk-SYMQJO2W.mjs';import {a as a$8}from'./chunk-QSVVAZVT.mjs';import'./chunk-F5TXUA4O.mjs';import'./chunk-JFFOPHU3.mjs';import'./chunk-I557S566.mjs';import {a as a$9}from'./chunk-ABDB7LEV.mjs';import'./chunk-GRLIPT5V.mjs';import'./chunk-TXBZPCGF.mjs';import'./chunk-75TJPK2N.mjs';import'./chunk-SHMJNRHO.mjs';import {a}from'./chunk-GN5C32JB.mjs';import {a as a$1}from'./chunk-6HZL2WDU.mjs';import {a as a$5}from'./chunk-LJNNPAFU.mjs';import {a as a$2}from'./chunk-KF3EFJEF.mjs';import'./chunk-GKKAK6ES.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {a as a$4,b,d,c}from'./chunk-WWT2ZSNU.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a$1})=>{let u=t!=null?t:[...q,...d];return jsx(a,{options:u,onSave:f=>{p&&p.save(f),a$1==null||a$1(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$1,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$2,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsx(a$3,a$4({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=useState({}),[u,y]=useState(0),f=(i,T)=>{a(B=>b(a$4({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsx(a$5,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$6,{activities:s,onAddActivity:e=>{let r=Date.now(),o=b(a$4({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?b(a$4({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$7,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=b(a$4({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d$1,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(d$1!=null?d$1:Z);useEffect(()=>{if(!t)return;let e=false;return d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsx(a$8,{ropa:s,onAddRecord:e=>{let r=b(a$4({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=b(a$4({},s),{records:s.records.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=b(a$4({},s),{records:s.records.map(o=>o.id===e?b(a$4({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=c(l,["input"]);let s=a$9(d);return jsx(a$a,a$4({report:s},t))};export{U as NDPRBreachReport,re as NDPRComplianceDashboard,O as NDPRConsent,V as NDPRCrossBorder,z as NDPRDPIA,H as NDPRLawfulBasis,E as NDPRPrivacyPolicy,ee as NDPRROPA,k as NDPRSubjectRights};//# sourceMappingURL=presets.mjs.map
|
|
3
|
-
//# sourceMappingURL=presets.mjs.map
|
|
2
|
+
export{a as NDPRPrivacyPolicy}from'./chunk-RV2VMWZJ.mjs';import'./chunk-BNHQFZHL.mjs';export{a as NDPRConsent}from'./chunk-LTPSN2SU.mjs';export{a as NDPRSubjectRights}from'./chunk-SJRIOZ4K.mjs';import {a as a$7}from'./chunk-ZIZL37BG.mjs';import {a as a$2}from'./chunk-COD3RMTL.mjs';import {a as a$4}from'./chunk-GTYXVAJX.mjs';import {a as a$5}from'./chunk-EXEXUAF6.mjs';import'./chunk-O6CUBNXK.mjs';import'./chunk-AOHKVFAS.mjs';import {a as a$6}from'./chunk-EFIBHKQE.mjs';import'./chunk-RMQ7OLNY.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-XP5PL6K7.mjs';import'./chunk-BFAX7JQA.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-XJO4DH3L.mjs';import {a as a$1}from'./chunk-ZQZJNKVB.mjs';import {a}from'./chunk-ZHFLBL63.mjs';import'./chunk-EWVK45Z3.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import {b,a as a$3,d,c}from'./chunk-ZJYULEER.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var L=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],I=({categories:c=L,adapter:s,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsx(a,{categories:c,onSubmit:d=>{s&&s.save(d),o(d);},classNames:u,unstyled:p});var k=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],_=({sections:c=k,adapter:s,classNames:u,unstyled:p,onComplete:o=()=>{}})=>{let[n,d]=useState({}),[m,f]=useState(0),P=(a,C)=>{d(S=>b(a$3({},S),{[a]:C}));},e=()=>{m<c.length-1?f(a=>a+1):(s&&s.save(n),o(n));},t=()=>{m>0&&f(a=>a-1);},r=Math.round((m+1)/c.length*100);return jsx(a$1,{sections:c,answers:n,onAnswerChange:P,currentSectionIndex:m,onNextSection:e,onPrevSection:t,progress:r,classNames:u,unstyled:p})};var F=({initialActivities:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsx(a$2,{activities:o,onAddActivity:e=>{let t=Date.now(),r=b(a$3({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateActivity:(e,t)=>{let r=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onArchiveActivity:e=>{let t=o.map(r=>r.id===e?b(a$3({},r),{status:"inactive",updatedAt:Date.now()}):r);n(t),d(t);},classNames:u,unstyled:p})};var W=({initialTransfers:c=[],adapter:s,classNames:u,unstyled:p})=>{let[o,n]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return c}),d=e=>{s&&s.save(e);};return jsx(a$4,{transfers:o,onAddTransfer:e=>{let t=Date.now(),r=b(a$3({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,r];n(a),d(a);},onUpdateTransfer:(e,t)=>{let r=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(r),d(r);},onRemoveTransfer:e=>{let t=o.filter(r=>r.id!==e);n(t),d(t);},classNames:u,unstyled:p})};var j={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},V=({initialData:c,adapter:s,classNames:u,unstyled:p})=>{let[o,n]=useState(c!=null?c:j);useEffect(()=>{if(!s)return;let e=false;return d(null,null,function*(){let r=yield s.load();!e&&r&&n(r);}),()=>{e=true;}},[s]);let d$1=e=>{s&&s.save(e);};return jsx(a$5,{ropa:o,onAddRecord:e=>{let t=b(a$3({},o),{records:[...o.records,e],lastUpdated:Date.now()});n(t),d$1(t);},onUpdateRecord:(e,t)=>{let r=b(a$3({},o),{records:o.records.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a),lastUpdated:Date.now()});n(r),d$1(r);},onArchiveRecord:e=>{let t=b(a$3({},o),{records:o.records.map(r=>r.id===e?b(a$3({},r),{status:"archived",updatedAt:Date.now()}):r),lastUpdated:Date.now()});n(t),d$1(t);},classNames:u,unstyled:p})};var G=u=>{var p=u,{input:c$1}=p,s=c(p,["input"]);let o=a$6(c$1);return jsx(a$7,a$3({report:o},s))};export{I as NDPRBreachReport,G as NDPRComplianceDashboard,W as NDPRCrossBorder,_ as NDPRDPIA,F as NDPRLawfulBasis,V as NDPRROPA};
|
package/dist/ropa.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var
|
|
3
|
-
//# sourceMappingURL=ropa.js.map
|
|
2
|
+
'use strict';var chunk5GVMKUMP_js=require('./chunk-5GVMKUMP.js'),chunk3JPDTXGC_js=require('./chunk-3JPDTXGC.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js');require('./chunk-AME4HJR4.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var t=react.createContext(null);function u(){let r=react.useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=chunk3JPDTXGC_js.a({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsxRuntime.jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:chunk5GVMKUMP_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunk5GVMKUMP_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunk3JPDTXGC_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});exports.ROPA=v;exports.ROPAProvider=p;exports.useROPACompound=u;
|
package/dist/ropa.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {a}from'./chunk-
|
|
3
|
-
//# sourceMappingURL=ropa.mjs.map
|
|
2
|
+
import {a}from'./chunk-EXEXUAF6.mjs';export{a as ROPAManager}from'./chunk-EXEXUAF6.mjs';import {a as a$1}from'./chunk-RPXRPGHL.mjs';export{a as useROPA}from'./chunk-RPXRPGHL.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-ZJYULEER.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var t=createContext(null);function u(){let r=useContext(t);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var p=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=a$1({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsx(t.Provider,{value:R,children:s})};var v={Provider:p,Manager:a};export{v as ROPA,p as ROPAProvider,u as useROPACompound};
|
package/dist/server.d.mts
CHANGED
|
@@ -3,10 +3,144 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare type AdequacyStatus = 'adequate' | 'inadequate' | 'pending_review' | 'unknown';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Production-ready API storage adapter.
|
|
8
|
+
*
|
|
9
|
+
* Backward-compatible with the 3.5.x signature — `apiAdapter('/api/x')`
|
|
10
|
+
* still works exactly as before. New options are all opt-in.
|
|
11
|
+
*
|
|
12
|
+
* @example basic
|
|
13
|
+
* const adapter = apiAdapter<ConsentSettings>('/api/consent');
|
|
14
|
+
*
|
|
15
|
+
* @example with credentials and CSRF
|
|
16
|
+
* const adapter = apiAdapter<ConsentSettings>('/api/consent', {
|
|
17
|
+
* credentials: 'include',
|
|
18
|
+
* headers: () => ({
|
|
19
|
+
* 'X-CSRF-Token': document.querySelector<HTMLMetaElement>(
|
|
20
|
+
* 'meta[name="csrf-token"]'
|
|
21
|
+
* )?.content ?? '',
|
|
22
|
+
* }),
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* @example with retry + telemetry
|
|
26
|
+
* const adapter = apiAdapter<ConsentSettings>('/api/consent', {
|
|
27
|
+
* retry: { attempts: 2, baseDelayMs: 300 },
|
|
28
|
+
* onError: (ctx) => Sentry.captureException(ctx.error, { extra: ctx }),
|
|
29
|
+
* onSuccess: (ctx) => analytics.track('consent_saved', { method: ctx.method }),
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* @example with response unwrap
|
|
33
|
+
* const adapter = apiAdapter<ConsentSettings>('/api/consent', {
|
|
34
|
+
* // API returns { data: ConsentSettings, ok: true }
|
|
35
|
+
* unwrap: (raw) => (raw as { data: ConsentSettings }).data,
|
|
36
|
+
* });
|
|
37
|
+
*/
|
|
38
|
+
export declare function apiAdapter<T = unknown>(endpoint: string, options?: ApiAdapterOptions<T>): StorageAdapter<T>;
|
|
39
|
+
|
|
40
|
+
declare interface ApiAdapterErrorContext<T = unknown> {
|
|
41
|
+
/** Which adapter operation triggered this — `load`, `save`, or `remove`. */
|
|
42
|
+
method: ApiAdapterMethod;
|
|
43
|
+
/** The endpoint URL that failed. */
|
|
44
|
+
endpoint: string;
|
|
45
|
+
/** Underlying error (for network failures / parse errors). */
|
|
46
|
+
error?: unknown;
|
|
47
|
+
/** Response object, if a response was received. */
|
|
48
|
+
response?: Response;
|
|
49
|
+
/** HTTP status code, if available. */
|
|
50
|
+
status?: number;
|
|
51
|
+
/** For `save`, the payload that failed to send. */
|
|
52
|
+
payload?: T;
|
|
53
|
+
/** Which retry attempt this is (0 = first try). Capped at `retry.attempts`. */
|
|
54
|
+
attempt: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare type ApiAdapterMethod = 'load' | 'save' | 'remove';
|
|
58
|
+
|
|
59
|
+
declare interface ApiAdapterOptions<T = unknown> {
|
|
60
|
+
/**
|
|
61
|
+
* Extra HTTP headers to send with every request. Useful for `Authorization`,
|
|
62
|
+
* `X-CSRF-Token`, `X-Requested-With`, etc.
|
|
63
|
+
*
|
|
64
|
+
* Can also be a function that returns headers, which lets you read a CSRF
|
|
65
|
+
* token from the DOM/cookie at request time rather than at adapter
|
|
66
|
+
* construction time.
|
|
67
|
+
*/
|
|
68
|
+
headers?: Record<string, string> | (() => Record<string, string>);
|
|
69
|
+
/**
|
|
70
|
+
* Forwarded to fetch's `credentials` option. Defaults to `'same-origin'`
|
|
71
|
+
* (the browser default). Set to `'include'` for cross-origin endpoints
|
|
72
|
+
* that need cookies / auth.
|
|
73
|
+
*/
|
|
74
|
+
credentials?: RequestCredentials;
|
|
75
|
+
/**
|
|
76
|
+
* HTTP method override for the load operation. Defaults to `'GET'`.
|
|
77
|
+
*/
|
|
78
|
+
loadMethod?: 'GET' | 'POST';
|
|
79
|
+
/**
|
|
80
|
+
* HTTP method override for the save operation. Defaults to `'POST'`. Some
|
|
81
|
+
* REST APIs prefer `'PUT'` for upsert semantics.
|
|
82
|
+
*/
|
|
83
|
+
saveMethod?: 'POST' | 'PUT' | 'PATCH';
|
|
84
|
+
/**
|
|
85
|
+
* Transform the raw JSON response into the expected `T`. Useful for APIs
|
|
86
|
+
* that wrap responses in `{ data: ... }` or similar envelopes. Called
|
|
87
|
+
* after `res.json()`. If omitted, the parsed JSON is used as-is.
|
|
88
|
+
*/
|
|
89
|
+
unwrap?: (raw: unknown) => T | null;
|
|
90
|
+
/**
|
|
91
|
+
* Retry policy for failed requests. Defaults to no retries (preserves the
|
|
92
|
+
* pre-3.6.0 behaviour). When configured, applies to all three operations.
|
|
93
|
+
*/
|
|
94
|
+
retry?: ApiAdapterRetryConfig;
|
|
95
|
+
/**
|
|
96
|
+
* Called when a request fails (after all retries exhausted). The adapter
|
|
97
|
+
* still returns a graceful null/void result so the consuming hook
|
|
98
|
+
* doesn't crash — this hook is for telemetry, toasts, or audit logging.
|
|
99
|
+
*/
|
|
100
|
+
onError?: (ctx: ApiAdapterErrorContext<T>) => void;
|
|
101
|
+
/**
|
|
102
|
+
* Called when a request succeeds. Useful for cache invalidation,
|
|
103
|
+
* analytics, or syncing other state.
|
|
104
|
+
*/
|
|
105
|
+
onSuccess?: (ctx: ApiAdapterSuccessContext<T>) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Per-request fetch options to merge into every request. Use this for
|
|
108
|
+
* things `fetch` itself supports that aren't directly modelled above —
|
|
109
|
+
* `signal`, `mode`, `cache`, `redirect`, etc.
|
|
110
|
+
*/
|
|
111
|
+
fetchInit?: Omit<RequestInit, 'method' | 'headers' | 'body' | 'credentials'>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
declare interface ApiAdapterRetryConfig {
|
|
115
|
+
/**
|
|
116
|
+
* Number of additional attempts after the initial request. Defaults to 0
|
|
117
|
+
* (no retries). e.g. `attempts: 2` means up to 3 total requests.
|
|
118
|
+
*/
|
|
119
|
+
attempts?: number;
|
|
120
|
+
/**
|
|
121
|
+
* Base delay in ms between attempts. Defaults to 250ms. The actual delay
|
|
122
|
+
* uses exponential backoff: `baseDelayMs * 2^attempt`.
|
|
123
|
+
*/
|
|
124
|
+
baseDelayMs?: number;
|
|
125
|
+
/**
|
|
126
|
+
* Predicate that decides whether to retry given the failure context. By
|
|
127
|
+
* default we retry on network errors and 5xx responses, but not on 4xx
|
|
128
|
+
* (those are client errors that won't fix themselves).
|
|
129
|
+
*/
|
|
130
|
+
shouldRetry?: (ctx: ApiAdapterErrorContext<unknown>) => boolean;
|
|
131
|
+
}
|
|
7
132
|
|
|
8
|
-
declare interface
|
|
9
|
-
|
|
133
|
+
declare interface ApiAdapterSuccessContext<T = unknown> {
|
|
134
|
+
/** Which adapter operation succeeded — `load`, `save`, or `remove`. */
|
|
135
|
+
method: ApiAdapterMethod;
|
|
136
|
+
/** The endpoint URL. */
|
|
137
|
+
endpoint: string;
|
|
138
|
+
/** Response object. */
|
|
139
|
+
response: Response;
|
|
140
|
+
/** For `load` operations, the parsed (and optionally unwrapped) data. */
|
|
141
|
+
data?: T;
|
|
142
|
+
/** For `save` operations, the payload that was sent. */
|
|
143
|
+
payload?: T;
|
|
10
144
|
}
|
|
11
145
|
|
|
12
146
|
/**
|
|
@@ -139,10 +273,51 @@ export declare interface BreachReport {
|
|
|
139
273
|
affectedSystems: string[];
|
|
140
274
|
/** Types of data involved in the breach */
|
|
141
275
|
dataTypes: string[];
|
|
142
|
-
/** Whether sensitive personal data is involved (NDPA Section
|
|
276
|
+
/** Whether sensitive personal data is involved (NDPA Section 30) */
|
|
143
277
|
involvesSensitiveData?: boolean;
|
|
144
278
|
/** Estimated number of data subjects affected */
|
|
145
279
|
estimatedAffectedSubjects?: number;
|
|
280
|
+
/**
|
|
281
|
+
* Approximate number of personal data RECORDS concerned (distinct from subject count).
|
|
282
|
+
* Required content under NDPA Section 40(1)(a) and Section 40(2).
|
|
283
|
+
*/
|
|
284
|
+
approximateRecordCount?: number;
|
|
285
|
+
/**
|
|
286
|
+
* Categories of data subjects affected (e.g. customers, employees, minors, patients).
|
|
287
|
+
* Required content under NDPA Section 40(1)(a) and Section 40(2).
|
|
288
|
+
*/
|
|
289
|
+
dataSubjectCategories?: string[];
|
|
290
|
+
/**
|
|
291
|
+
* Likely consequences of the breach for affected data subjects (e.g. identity theft,
|
|
292
|
+
* financial loss, reputational damage). Reported to the NDPC and, where applicable,
|
|
293
|
+
* communicated to data subjects under Section 40(3).
|
|
294
|
+
*/
|
|
295
|
+
likelyConsequences?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Measures taken or proposed to mitigate adverse effects of the breach.
|
|
298
|
+
* Required content for Section 40(3) communications to data subjects.
|
|
299
|
+
*/
|
|
300
|
+
mitigationMeasures?: string;
|
|
301
|
+
/**
|
|
302
|
+
* Whether this is a phased / interim report submitted before full investigation
|
|
303
|
+
* is complete. The NDPC permits phased reporting where complete information is
|
|
304
|
+
* not available within 72 hours.
|
|
305
|
+
*/
|
|
306
|
+
isPhasedReport?: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* ID of the prior phased report this report supplements, if any.
|
|
309
|
+
*/
|
|
310
|
+
supplementsReportId?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Data Protection Officer contact details. The DPO is the named contact point
|
|
313
|
+
* for the NDPC per NDPA Section 32(3)(c). Required content in the regulatory
|
|
314
|
+
* report (Section 40(2)).
|
|
315
|
+
*/
|
|
316
|
+
dpoContact?: {
|
|
317
|
+
name: string;
|
|
318
|
+
email: string;
|
|
319
|
+
phone?: string;
|
|
320
|
+
};
|
|
146
321
|
/** Whether the breach is ongoing or contained */
|
|
147
322
|
status: 'ongoing' | 'contained' | 'resolved';
|
|
148
323
|
/** Initial actions taken to address the breach */
|
|
@@ -823,20 +998,25 @@ export declare interface DsrSubmissionValidationResult {
|
|
|
823
998
|
}
|
|
824
999
|
|
|
825
1000
|
/**
|
|
826
|
-
* Data Subject Rights types aligned with NDPA 2023 Part
|
|
1001
|
+
* Data Subject Rights types aligned with NDPA 2023 Part VI (Sections 34-38)
|
|
1002
|
+
* and the related provisions in Part V (Section 27 — information to the data subject)
|
|
1003
|
+
* and Part X (Section 46 — complaint to the Commission).
|
|
1004
|
+
*
|
|
1005
|
+
* Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
|
|
827
1006
|
*/
|
|
828
1007
|
/**
|
|
829
|
-
* Types of data subject requests per NDPA Part
|
|
830
|
-
* - 'information': Right to be informed (Section
|
|
831
|
-
* - 'access': Right of access (Section
|
|
832
|
-
* - 'rectification': Right to rectification (Section
|
|
833
|
-
* - 'erasure': Right to erasure (Section
|
|
834
|
-
* - 'restriction': Right to restrict processing (Section
|
|
835
|
-
* - 'portability': Right to data portability (Section
|
|
836
|
-
* - 'objection': Right to object (Section
|
|
837
|
-
* - 'automated_decision_making': Rights
|
|
1008
|
+
* Types of data subject requests per NDPA Part VI
|
|
1009
|
+
* - 'information': Right to be informed (Section 27 — provision of information; Section 34(1)(a))
|
|
1010
|
+
* - 'access': Right of access / confirmation + data copy (Section 34(1)(a)–(b))
|
|
1011
|
+
* - 'rectification': Right to rectification (Section 34(1)(c))
|
|
1012
|
+
* - 'erasure': Right to erasure (Section 34(1)(d), Section 34(2))
|
|
1013
|
+
* - 'restriction': Right to restrict processing (Section 34(1)(e))
|
|
1014
|
+
* - 'portability': Right to data portability (Section 38)
|
|
1015
|
+
* - 'objection': Right to object (Section 36)
|
|
1016
|
+
* - 'automated_decision_making': Rights re. automated decisions / profiling (Section 37)
|
|
1017
|
+
* - 'withdraw_consent': Right to withdraw consent (Section 35)
|
|
838
1018
|
*/
|
|
839
|
-
export declare type DSRType = 'information' | 'access' | 'rectification' | 'erasure' | 'restriction' | 'portability' | 'objection' | 'automated_decision_making';
|
|
1019
|
+
export declare type DSRType = 'information' | 'access' | 'rectification' | 'erasure' | 'restriction' | 'portability' | 'objection' | 'automated_decision_making' | 'withdraw_consent';
|
|
840
1020
|
|
|
841
1021
|
export declare type EffortLevel = 'low' | 'medium' | 'high';
|
|
842
1022
|
|
|
@@ -1100,11 +1280,13 @@ export declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' |
|
|
|
1100
1280
|
|
|
1101
1281
|
/**
|
|
1102
1282
|
* Returns whether NDPC approval is required for a given transfer mechanism.
|
|
1103
|
-
*
|
|
1104
|
-
*
|
|
1283
|
+
* Under NDPA Section 42(5), the Commission may approve binding corporate rules,
|
|
1284
|
+
* codes of conduct, certification mechanisms, or similar instruments. Standard
|
|
1285
|
+
* contractual clauses are one of the appropriate safeguards under Section 41(1)(a)
|
|
1286
|
+
* and the Commission may approve them per Section 42(4).
|
|
1105
1287
|
*
|
|
1106
1288
|
* @param mechanism The transfer mechanism
|
|
1107
|
-
* @returns Whether NDPC approval is required
|
|
1289
|
+
* @returns Whether NDPC approval is typically required
|
|
1108
1290
|
*/
|
|
1109
1291
|
export declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
|
|
1110
1292
|
|
|
@@ -1162,6 +1344,23 @@ export declare interface LawfulBasisValidationResult {
|
|
|
1162
1344
|
warnings: string[];
|
|
1163
1345
|
}
|
|
1164
1346
|
|
|
1347
|
+
/**
|
|
1348
|
+
* Full disclaimer suitable for PDF/DOCX footers and exported artifacts.
|
|
1349
|
+
*/
|
|
1350
|
+
export declare const LEGAL_DISCLAIMER_LONG: string;
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Short disclaimer suitable for component captions and dashboard footers.
|
|
1354
|
+
* One line, no markdown.
|
|
1355
|
+
*/
|
|
1356
|
+
export declare const LEGAL_DISCLAIMER_SHORT = "Generated for guidance only. Not legal advice \u2014 verify with your DPO or counsel.";
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* Returns the long disclaimer wrapped with a leading heading suitable for
|
|
1360
|
+
* embedding at the foot of an exported document.
|
|
1361
|
+
*/
|
|
1362
|
+
export declare function legalDisclaimerBlock(heading?: string): string;
|
|
1363
|
+
|
|
1165
1364
|
/**
|
|
1166
1365
|
* Represents a Legitimate Interest Assessment (LIA)
|
|
1167
1366
|
* Required when the lawful basis is 'legitimate_interests'
|
|
@@ -1770,7 +1969,9 @@ export declare interface RequestType {
|
|
|
1770
1969
|
/** Description of what this request type entails */
|
|
1771
1970
|
description: string;
|
|
1772
1971
|
/**
|
|
1773
|
-
* NDPA section reference
|
|
1972
|
+
* NDPA 2023 section reference for this right
|
|
1973
|
+
* (e.g., "Section 34(1)(a)" for access, "Section 38" for portability).
|
|
1974
|
+
* Used for display purposes only — verify the exact subsection with counsel.
|
|
1774
1975
|
*/
|
|
1775
1976
|
ndpaSection?: string;
|
|
1776
1977
|
/**
|
|
@@ -1978,8 +2179,11 @@ export declare interface TransferImpactAssessment {
|
|
|
1978
2179
|
}
|
|
1979
2180
|
|
|
1980
2181
|
/**
|
|
1981
|
-
* Cross-Border Data Transfer types aligned with NDPA 2023 Part
|
|
1982
|
-
* Personal data may only be transferred outside Nigeria under
|
|
2182
|
+
* Cross-Border Data Transfer types aligned with NDPA 2023 Part VIII (Sections 41-43).
|
|
2183
|
+
* Personal data may only be transferred outside Nigeria under the bases listed in
|
|
2184
|
+
* Section 41(1), where Section 42 defines adequacy and Section 43 lists derogations.
|
|
2185
|
+
*
|
|
2186
|
+
* Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
|
|
1983
2187
|
*/
|
|
1984
2188
|
/**
|
|
1985
2189
|
* Transfer mechanisms recognized under the NDPA
|
|
@@ -2090,7 +2294,7 @@ export declare interface ValidateDsrSubmissionOptions {
|
|
|
2090
2294
|
/**
|
|
2091
2295
|
* Allowed request types. When provided, the payload's `requestType`
|
|
2092
2296
|
* must be one of these — useful for locking the server to a specific
|
|
2093
|
-
* set of supported NDPA Part
|
|
2297
|
+
* set of supported NDPA Part VI §34-38 (plus §35, §36, §37) data-subject rights.
|
|
2094
2298
|
*/
|
|
2095
2299
|
allowedRequestTypes?: string[];
|
|
2096
2300
|
}
|