@tantainnovative/ndpr-toolkit 3.12.0 → 3.13.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.
Files changed (130) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/dist/breach.d.mts +7 -1
  3. package/dist/breach.d.ts +7 -1
  4. package/dist/breach.js +1 -1
  5. package/dist/breach.mjs +1 -1
  6. package/dist/chunk-37VFK5SR.js +6 -0
  7. package/dist/chunk-3E4IH7CE.js +1 -0
  8. package/dist/chunk-3H6FYU3Z.mjs +93 -0
  9. package/dist/chunk-3I6FYA5C.js +103 -0
  10. package/dist/chunk-3SIYRGJF.js +93 -0
  11. package/dist/chunk-3XU6FL2I.js +1 -0
  12. package/dist/chunk-42JPSNVV.mjs +6 -0
  13. package/dist/chunk-42UJFTII.js +1 -0
  14. package/dist/chunk-737EMUUC.mjs +1 -0
  15. package/dist/chunk-7FXNGGMO.js +1 -0
  16. package/dist/chunk-B2EXRSYG.mjs +1 -0
  17. package/dist/chunk-BGV2AKT7.mjs +1 -0
  18. package/dist/chunk-BL5W472Q.js +1 -0
  19. package/dist/chunk-BPMVJOHH.mjs +1 -0
  20. package/dist/chunk-ELK6VFKC.mjs +2 -0
  21. package/dist/chunk-F5MGMNQF.js +2 -0
  22. package/dist/chunk-FRQFU44F.mjs +1 -0
  23. package/dist/{chunk-WYH3OA5L.mjs → chunk-I2ZBMR7F.mjs} +1 -1
  24. package/dist/chunk-J7BIJ45O.mjs +103 -0
  25. package/dist/{chunk-US2VGJ7I.js → chunk-KH3EQJQE.js} +1 -1
  26. package/dist/{chunk-IPWX5I5P.mjs → chunk-L3FR4PQE.mjs} +1 -1
  27. package/dist/chunk-N72RNTGP.mjs +6 -0
  28. package/dist/chunk-NB6SKG76.mjs +1 -0
  29. package/dist/chunk-NUIRMJKQ.mjs +2 -0
  30. package/dist/chunk-PXDSPF5B.js +2 -0
  31. package/dist/chunk-QGUOFGVJ.js +2 -0
  32. package/dist/chunk-RBKFNCGO.mjs +1 -0
  33. package/dist/chunk-TTMGFC6C.js +1 -0
  34. package/dist/{chunk-TWJHEIQH.js → chunk-UZNWXJ2W.js} +1 -1
  35. package/dist/chunk-V5TZJJWU.mjs +1 -0
  36. package/dist/chunk-WCTFED27.js +1 -0
  37. package/dist/chunk-WHQ4PEYS.mjs +2 -0
  38. package/dist/chunk-WMISQDSV.js +1 -0
  39. package/dist/{chunk-MTSZ7GL6.mjs → chunk-WVHMY2BV.mjs} +1 -1
  40. package/dist/chunk-XYGGUGTO.js +6 -0
  41. package/dist/chunk-YDKWD6MQ.js +1 -0
  42. package/dist/chunk-Z2M5VJX2.mjs +1 -0
  43. package/dist/{chunk-D3DVVJCT.js → chunk-ZD2W3YU2.js} +1 -1
  44. package/dist/chunk-ZM5DLFCZ.js +1 -0
  45. package/dist/chunk-ZQHGIOYP.mjs +1 -0
  46. package/dist/consent.js +1 -1
  47. package/dist/consent.mjs +1 -1
  48. package/dist/core.d.mts +62 -0
  49. package/dist/core.d.ts +62 -0
  50. package/dist/core.js +1 -1
  51. package/dist/core.mjs +1 -1
  52. package/dist/cross-border-lite.js +1 -1
  53. package/dist/cross-border-lite.mjs +1 -1
  54. package/dist/cross-border.js +1 -1
  55. package/dist/cross-border.mjs +1 -1
  56. package/dist/dpia.js +1 -1
  57. package/dist/dpia.mjs +1 -1
  58. package/dist/dsr.js +1 -1
  59. package/dist/dsr.mjs +1 -1
  60. package/dist/headless.js +1 -1
  61. package/dist/headless.mjs +1 -1
  62. package/dist/hooks.js +1 -1
  63. package/dist/hooks.mjs +1 -1
  64. package/dist/index.d.mts +69 -1
  65. package/dist/index.d.ts +69 -1
  66. package/dist/index.js +1 -1
  67. package/dist/index.mjs +1 -1
  68. package/dist/lawful-basis-lite.js +1 -1
  69. package/dist/lawful-basis-lite.mjs +1 -1
  70. package/dist/lawful-basis.js +1 -1
  71. package/dist/lawful-basis.mjs +1 -1
  72. package/dist/policy.js +1 -1
  73. package/dist/policy.mjs +1 -1
  74. package/dist/presets-consent.js +1 -1
  75. package/dist/presets-consent.mjs +1 -1
  76. package/dist/presets-dsr.js +1 -1
  77. package/dist/presets-dsr.mjs +1 -1
  78. package/dist/presets-policy.d.mts +23 -0
  79. package/dist/presets-policy.d.ts +23 -0
  80. package/dist/presets-policy.js +1 -1
  81. package/dist/presets-policy.mjs +1 -1
  82. package/dist/presets.d.mts +230 -1
  83. package/dist/presets.d.ts +230 -1
  84. package/dist/presets.js +1 -1
  85. package/dist/presets.mjs +1 -1
  86. package/dist/ropa-lite.js +1 -1
  87. package/dist/ropa-lite.mjs +1 -1
  88. package/dist/ropa.js +1 -1
  89. package/dist/ropa.mjs +1 -1
  90. package/dist/server.d.mts +62 -0
  91. package/dist/server.d.ts +62 -0
  92. package/dist/server.js +1 -1
  93. package/dist/server.mjs +1 -1
  94. package/dist/unstyled.js +1 -1
  95. package/dist/unstyled.mjs +1 -1
  96. package/package.json +1 -1
  97. package/dist/chunk-25TNTLHJ.mjs +0 -1
  98. package/dist/chunk-4GIMXUMI.js +0 -6
  99. package/dist/chunk-5AECGMEB.js +0 -1
  100. package/dist/chunk-5EKQX6GM.mjs +0 -1
  101. package/dist/chunk-67KA345Q.mjs +0 -1
  102. package/dist/chunk-6GM2PBTF.js +0 -2
  103. package/dist/chunk-6OWCUDTN.mjs +0 -1
  104. package/dist/chunk-73BMSK67.js +0 -1
  105. package/dist/chunk-CAFCRCTZ.mjs +0 -1
  106. package/dist/chunk-EKNWO4DK.js +0 -1
  107. package/dist/chunk-FMJ6ICLJ.js +0 -1
  108. package/dist/chunk-G7JKRYM5.mjs +0 -1
  109. package/dist/chunk-GEP52QFH.mjs +0 -1
  110. package/dist/chunk-IB3KSUPZ.mjs +0 -1
  111. package/dist/chunk-JWAN5J4Y.js +0 -1
  112. package/dist/chunk-JYZOKO2W.mjs +0 -103
  113. package/dist/chunk-NDKDKDDX.js +0 -1
  114. package/dist/chunk-NX5MOBRI.js +0 -1
  115. package/dist/chunk-OLEUIYE2.mjs +0 -1
  116. package/dist/chunk-Q4CSVWSS.mjs +0 -1
  117. package/dist/chunk-QMAVEHOR.js +0 -1
  118. package/dist/chunk-RBMLGRDN.mjs +0 -1
  119. package/dist/chunk-ROC64RLP.js +0 -1
  120. package/dist/chunk-RR3KXNET.mjs +0 -6
  121. package/dist/chunk-TDHH7GS2.mjs +0 -2
  122. package/dist/chunk-TN4TH3CT.mjs +0 -2
  123. package/dist/chunk-VUFTRKKC.js +0 -2
  124. package/dist/chunk-WKTKTLMF.js +0 -1
  125. package/dist/chunk-WXUXCRAJ.js +0 -1
  126. package/dist/chunk-XN2UYZXH.mjs +0 -93
  127. package/dist/chunk-YK22SYCT.js +0 -103
  128. package/dist/chunk-YSD2DFBR.js +0 -6
  129. package/dist/chunk-YWCBI7SI.js +0 -93
  130. package/dist/chunk-ZHX62QAL.mjs +0 -6
@@ -543,12 +543,84 @@ declare type LawfulBasisType = 'consent' | 'contract' | 'legal_obligation' | 'vi
543
543
 
544
544
  export declare const NDPRBreachReport: React__default.FC<NDPRBreachReportProps>;
545
545
 
546
+ /**
547
+ * UX copy overrides for the NDPRBreachReport preset. Pass any subset to
548
+ * replace the default text without dropping to the lower-level
549
+ * `<BreachReportForm>` API.
550
+ */
551
+ export declare interface NDPRBreachReportCopy {
552
+ /** Form heading. Default: "Report a Data Breach" */
553
+ title?: string;
554
+ /** Body paragraph under the heading. */
555
+ description?: string;
556
+ /** Submit button label. Default: "Submit Report" */
557
+ submitButton?: string;
558
+ }
559
+
546
560
  export declare interface NDPRBreachReportProps {
547
561
  categories?: BreachCategory[];
548
562
  adapter?: StorageAdapter<BreachFormSubmission>;
549
563
  classNames?: BreachReportFormClassNames;
550
564
  unstyled?: boolean;
551
565
  onSubmit?: (data: BreachFormSubmission) => void;
566
+ /**
567
+ * UX copy overrides — see {@link NDPRBreachReportCopy}.
568
+ */
569
+ copy?: NDPRBreachReportCopy;
570
+ /**
571
+ * @deprecated Renamed to `copy.description`. Will be removed in 4.0.
572
+ * If both are set, `copy.description` wins.
573
+ */
574
+ formDescription?: string;
575
+ /**
576
+ * Body paragraph under the heading. Canonical name in 3.13+. Takes
577
+ * precedence over `formDescription`.
578
+ */
579
+ description?: string;
580
+ /**
581
+ * Public-form mode. Use when the form should submit to your existing
582
+ * backend workflow instead of being state-managed by an adapter.
583
+ *
584
+ * When `submitTo` is set:
585
+ * - the form does NOT require an `adapter`
586
+ * - on submit, the toolkit POSTs the JSON-serialised `BreachFormSubmission`
587
+ * to this URL (with `Content-Type: application/json`)
588
+ * - your `onSubmit` callback still fires (after the POST resolves)
589
+ * - submit failures are surfaced via `onSubmitError`
590
+ *
591
+ * @example
592
+ * <NDPRBreachReport submitTo="/api/breach" />
593
+ */
594
+ submitTo?: string;
595
+ /**
596
+ * Fetch options for the `submitTo` POST. Useful for adding `credentials`
597
+ * (cookies/auth), `X-CSRF-Token`, or any other header your backend
598
+ * requires. Ignored unless `submitTo` is set.
599
+ *
600
+ * @default { credentials: 'same-origin' }
601
+ */
602
+ submitOptions?: {
603
+ headers?: Record<string, string> | (() => Record<string, string>);
604
+ credentials?: RequestCredentials;
605
+ };
606
+ /**
607
+ * Called when a `submitTo` POST fails (network error or non-2xx
608
+ * response). Receives the underlying error or Response.
609
+ */
610
+ onSubmitError?: (ctx: {
611
+ error?: unknown;
612
+ response?: Response;
613
+ }) => void;
614
+ /**
615
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
616
+ * `Response` object, the submitted `BreachFormSubmission` payload, and the
617
+ * parsed JSON body if the server returned valid JSON.
618
+ */
619
+ onSubmitSuccess?: (ctx: {
620
+ response: Response;
621
+ data: BreachFormSubmission;
622
+ body?: unknown;
623
+ }) => void;
552
624
  }
553
625
 
554
626
  /**
@@ -575,7 +647,7 @@ export declare const NDPRConsent: React__default.FC<NDPRConsentProps>;
575
647
  * rejectAll: 'Only essentials',
576
648
  * }} />
577
649
  */
578
- declare interface NDPRConsentCopy {
650
+ export declare interface NDPRConsentCopy {
579
651
  /** Banner heading. Default: "We Value Your Privacy" */
580
652
  title?: string;
581
653
  /** Body paragraph under the heading. Default cites NDPA Section 26. */
@@ -607,11 +679,36 @@ export declare interface NDPRConsentProps {
607
679
 
608
680
  export declare const NDPRCrossBorder: React__default.FC<NDPRCrossBorderProps>;
609
681
 
682
+ /**
683
+ * UX copy overrides for the NDPRCrossBorder preset. Pass any subset to
684
+ * replace the default text without dropping to the lower-level
685
+ * `<CrossBorderTransferManager>` API.
686
+ */
687
+ export declare interface NDPRCrossBorderCopy {
688
+ /** Manager heading. Default: "Cross-Border Data Transfer Manager" */
689
+ title?: string;
690
+ /** Body paragraph under the heading. */
691
+ description?: string;
692
+ }
693
+
610
694
  export declare interface NDPRCrossBorderProps {
695
+ /**
696
+ * Initial transfers to seed the manager. Canonical name in 3.13+.
697
+ * Takes precedence over `initialTransfers` if both are set.
698
+ */
699
+ initialData?: CrossBorderTransfer[];
700
+ /**
701
+ * @deprecated Renamed to `initialData`. Will be removed in 4.0.
702
+ * If both are set, `initialData` wins.
703
+ */
611
704
  initialTransfers?: CrossBorderTransfer[];
612
705
  adapter?: StorageAdapter<CrossBorderTransfer[]>;
613
706
  classNames?: CrossBorderTransferManagerClassNames;
614
707
  unstyled?: boolean;
708
+ /**
709
+ * UX copy overrides — see {@link NDPRCrossBorderCopy}.
710
+ */
711
+ copy?: NDPRCrossBorderCopy;
615
712
  }
616
713
 
617
714
  declare interface NDPRDashboardClassNames {
@@ -650,30 +747,146 @@ export declare interface NDPRDashboardPresetProps {
650
747
 
651
748
  export declare const NDPRDPIA: React__default.FC<NDPRDPIAProps>;
652
749
 
750
+ /**
751
+ * UX copy overrides for the NDPRDPIA preset. Strings you omit fall back
752
+ * to the lower-level `<DPIAQuestionnaire>` defaults. The DPIA wizard does
753
+ * not render a single header (each section has its own title); the `title`
754
+ * and `description` fields are reserved for future use and currently
755
+ * accepted for API parity with the other presets.
756
+ */
757
+ export declare interface NDPRDPIACopy {
758
+ /** Reserved — DPIA sections render their own titles. */
759
+ title?: string;
760
+ /** Reserved — DPIA sections render their own descriptions. */
761
+ description?: string;
762
+ /** Final-step submit button label. Default: "Submit" */
763
+ submitButton?: string;
764
+ /** Next-section button label. Default: "Next" */
765
+ nextButton?: string;
766
+ /** Previous-section button label. Default: "Previous" */
767
+ prevButton?: string;
768
+ }
769
+
653
770
  export declare interface NDPRDPIAProps {
654
771
  sections?: DPIASection[];
655
772
  adapter?: StorageAdapter<DPIAAnswerMap>;
656
773
  classNames?: DPIAQuestionnaireClassNames;
657
774
  unstyled?: boolean;
658
775
  onComplete?: (answers: DPIAAnswerMap) => void;
776
+ /**
777
+ * UX copy overrides — see {@link NDPRDPIACopy}.
778
+ */
779
+ copy?: NDPRDPIACopy;
780
+ /**
781
+ * Public-form mode. Use when the questionnaire should submit to your
782
+ * existing backend workflow instead of being state-managed by an adapter.
783
+ *
784
+ * When `submitTo` is set:
785
+ * - the questionnaire does NOT require an `adapter`
786
+ * - on completion, the toolkit POSTs the JSON-serialised `DPIAAnswerMap`
787
+ * to this URL (with `Content-Type: application/json`)
788
+ * - your `onComplete` callback still fires (after the POST resolves)
789
+ * - submit failures are surfaced via `onSubmitError`
790
+ *
791
+ * @example
792
+ * <NDPRDPIA submitTo="/api/dpia" />
793
+ */
794
+ submitTo?: string;
795
+ /**
796
+ * Fetch options for the `submitTo` POST. Useful for adding `credentials`
797
+ * (cookies/auth), `X-CSRF-Token`, or any other header your backend
798
+ * requires. Ignored unless `submitTo` is set.
799
+ *
800
+ * @default { credentials: 'same-origin' }
801
+ */
802
+ submitOptions?: {
803
+ headers?: Record<string, string> | (() => Record<string, string>);
804
+ credentials?: RequestCredentials;
805
+ };
806
+ /**
807
+ * Called when a `submitTo` POST fails (network error or non-2xx
808
+ * response).
809
+ */
810
+ onSubmitError?: (ctx: {
811
+ error?: unknown;
812
+ response?: Response;
813
+ }) => void;
814
+ /**
815
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
816
+ * `Response` object, the submitted `DPIAAnswerMap` payload, and the
817
+ * parsed JSON body if the server returned valid JSON.
818
+ */
819
+ onSubmitSuccess?: (ctx: {
820
+ response: Response;
821
+ data: DPIAAnswerMap;
822
+ body?: unknown;
823
+ }) => void;
659
824
  }
660
825
 
661
826
  export declare const NDPRLawfulBasis: React__default.FC<NDPRLawfulBasisProps>;
662
827
 
828
+ /**
829
+ * UX copy overrides for the NDPRLawfulBasis preset. Pass any subset to
830
+ * replace the default text without dropping to the lower-level
831
+ * `<LawfulBasisTracker>` API.
832
+ */
833
+ export declare interface NDPRLawfulBasisCopy {
834
+ /** Tracker heading. Default: "Lawful Basis Tracker" */
835
+ title?: string;
836
+ /** Body paragraph under the heading. */
837
+ description?: string;
838
+ }
839
+
663
840
  export declare interface NDPRLawfulBasisProps {
841
+ /**
842
+ * Initial activities to seed the tracker. Canonical name in 3.13+.
843
+ * Takes precedence over `initialActivities` if both are set.
844
+ */
845
+ initialData?: ProcessingActivity[];
846
+ /**
847
+ * @deprecated Renamed to `initialData`. Will be removed in 4.0.
848
+ * If both are set, `initialData` wins.
849
+ */
664
850
  initialActivities?: ProcessingActivity[];
665
851
  adapter?: StorageAdapter<ProcessingActivity[]>;
666
852
  classNames?: LawfulBasisTrackerClassNames;
667
853
  unstyled?: boolean;
854
+ /**
855
+ * UX copy overrides — see {@link NDPRLawfulBasisCopy}.
856
+ */
857
+ copy?: NDPRLawfulBasisCopy;
668
858
  }
669
859
 
670
860
  export declare const NDPRPrivacyPolicy: React__default.FC<NDPRPrivacyPolicyProps>;
671
861
 
862
+ /**
863
+ * UX copy overrides for the NDPRPrivacyPolicy preset. Strings you omit
864
+ * fall back to the underlying `<AdaptivePolicyWizard>` defaults.
865
+ *
866
+ * Note: the wizard renders many step-specific labels; the fields here
867
+ * cover the high-level header text. Step-specific copy is wired through
868
+ * the `NDPRProvider` locale.
869
+ */
870
+ export declare interface NDPRPrivacyPolicyCopy {
871
+ /** Wizard heading. Default: "Privacy Policy Builder" */
872
+ title?: string;
873
+ /** Optional body paragraph under the heading. */
874
+ description?: string;
875
+ /** Submit / complete button label. */
876
+ submitButton?: string;
877
+ }
878
+
672
879
  export declare interface NDPRPrivacyPolicyProps {
673
880
  adapter?: StorageAdapter<PolicyDraft>;
674
881
  onComplete?: (policy: PrivacyPolicy) => void;
675
882
  classNames?: Record<string, string>;
676
883
  unstyled?: boolean;
884
+ /**
885
+ * UX copy overrides — see {@link NDPRPrivacyPolicyCopy}. The wizard
886
+ * derives most of its labels from the active `NDPRProvider` locale; the
887
+ * fields here cover the high-level header text.
888
+ */
889
+ copy?: NDPRPrivacyPolicyCopy;
677
890
  /**
678
891
  * Pre-fill the policy wizard with a sector-specific starter template.
679
892
  *
@@ -707,11 +920,27 @@ export declare interface NDPRPrivacyPolicyProps {
707
920
 
708
921
  export declare const NDPRROPA: React__default.FC<NDPRROPAProps>;
709
922
 
923
+ /**
924
+ * UX copy overrides for the NDPRROPA preset. Pass any subset to
925
+ * replace the default text without dropping to the lower-level
926
+ * `<ROPAManager>` API.
927
+ */
928
+ export declare interface NDPRROPACopy {
929
+ /** Manager heading. Default: "Record of Processing Activities (ROPA)" */
930
+ title?: string;
931
+ /** Body paragraph under the heading. */
932
+ description?: string;
933
+ }
934
+
710
935
  export declare interface NDPRROPAProps {
711
936
  initialData?: RecordOfProcessingActivities;
712
937
  adapter?: StorageAdapter<RecordOfProcessingActivities>;
713
938
  classNames?: ROPAManagerClassNames;
714
939
  unstyled?: boolean;
940
+ /**
941
+ * UX copy overrides — see {@link NDPRROPACopy}.
942
+ */
943
+ copy?: NDPRROPACopy;
715
944
  }
716
945
 
717
946
  export declare const NDPRSubjectRights: React__default.FC<NDPRSubjectRightsProps>;
package/dist/presets.d.ts CHANGED
@@ -543,12 +543,84 @@ declare type LawfulBasisType = 'consent' | 'contract' | 'legal_obligation' | 'vi
543
543
 
544
544
  export declare const NDPRBreachReport: React__default.FC<NDPRBreachReportProps>;
545
545
 
546
+ /**
547
+ * UX copy overrides for the NDPRBreachReport preset. Pass any subset to
548
+ * replace the default text without dropping to the lower-level
549
+ * `<BreachReportForm>` API.
550
+ */
551
+ export declare interface NDPRBreachReportCopy {
552
+ /** Form heading. Default: "Report a Data Breach" */
553
+ title?: string;
554
+ /** Body paragraph under the heading. */
555
+ description?: string;
556
+ /** Submit button label. Default: "Submit Report" */
557
+ submitButton?: string;
558
+ }
559
+
546
560
  export declare interface NDPRBreachReportProps {
547
561
  categories?: BreachCategory[];
548
562
  adapter?: StorageAdapter<BreachFormSubmission>;
549
563
  classNames?: BreachReportFormClassNames;
550
564
  unstyled?: boolean;
551
565
  onSubmit?: (data: BreachFormSubmission) => void;
566
+ /**
567
+ * UX copy overrides — see {@link NDPRBreachReportCopy}.
568
+ */
569
+ copy?: NDPRBreachReportCopy;
570
+ /**
571
+ * @deprecated Renamed to `copy.description`. Will be removed in 4.0.
572
+ * If both are set, `copy.description` wins.
573
+ */
574
+ formDescription?: string;
575
+ /**
576
+ * Body paragraph under the heading. Canonical name in 3.13+. Takes
577
+ * precedence over `formDescription`.
578
+ */
579
+ description?: string;
580
+ /**
581
+ * Public-form mode. Use when the form should submit to your existing
582
+ * backend workflow instead of being state-managed by an adapter.
583
+ *
584
+ * When `submitTo` is set:
585
+ * - the form does NOT require an `adapter`
586
+ * - on submit, the toolkit POSTs the JSON-serialised `BreachFormSubmission`
587
+ * to this URL (with `Content-Type: application/json`)
588
+ * - your `onSubmit` callback still fires (after the POST resolves)
589
+ * - submit failures are surfaced via `onSubmitError`
590
+ *
591
+ * @example
592
+ * <NDPRBreachReport submitTo="/api/breach" />
593
+ */
594
+ submitTo?: string;
595
+ /**
596
+ * Fetch options for the `submitTo` POST. Useful for adding `credentials`
597
+ * (cookies/auth), `X-CSRF-Token`, or any other header your backend
598
+ * requires. Ignored unless `submitTo` is set.
599
+ *
600
+ * @default { credentials: 'same-origin' }
601
+ */
602
+ submitOptions?: {
603
+ headers?: Record<string, string> | (() => Record<string, string>);
604
+ credentials?: RequestCredentials;
605
+ };
606
+ /**
607
+ * Called when a `submitTo` POST fails (network error or non-2xx
608
+ * response). Receives the underlying error or Response.
609
+ */
610
+ onSubmitError?: (ctx: {
611
+ error?: unknown;
612
+ response?: Response;
613
+ }) => void;
614
+ /**
615
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
616
+ * `Response` object, the submitted `BreachFormSubmission` payload, and the
617
+ * parsed JSON body if the server returned valid JSON.
618
+ */
619
+ onSubmitSuccess?: (ctx: {
620
+ response: Response;
621
+ data: BreachFormSubmission;
622
+ body?: unknown;
623
+ }) => void;
552
624
  }
553
625
 
554
626
  /**
@@ -575,7 +647,7 @@ export declare const NDPRConsent: React__default.FC<NDPRConsentProps>;
575
647
  * rejectAll: 'Only essentials',
576
648
  * }} />
577
649
  */
578
- declare interface NDPRConsentCopy {
650
+ export declare interface NDPRConsentCopy {
579
651
  /** Banner heading. Default: "We Value Your Privacy" */
580
652
  title?: string;
581
653
  /** Body paragraph under the heading. Default cites NDPA Section 26. */
@@ -607,11 +679,36 @@ export declare interface NDPRConsentProps {
607
679
 
608
680
  export declare const NDPRCrossBorder: React__default.FC<NDPRCrossBorderProps>;
609
681
 
682
+ /**
683
+ * UX copy overrides for the NDPRCrossBorder preset. Pass any subset to
684
+ * replace the default text without dropping to the lower-level
685
+ * `<CrossBorderTransferManager>` API.
686
+ */
687
+ export declare interface NDPRCrossBorderCopy {
688
+ /** Manager heading. Default: "Cross-Border Data Transfer Manager" */
689
+ title?: string;
690
+ /** Body paragraph under the heading. */
691
+ description?: string;
692
+ }
693
+
610
694
  export declare interface NDPRCrossBorderProps {
695
+ /**
696
+ * Initial transfers to seed the manager. Canonical name in 3.13+.
697
+ * Takes precedence over `initialTransfers` if both are set.
698
+ */
699
+ initialData?: CrossBorderTransfer[];
700
+ /**
701
+ * @deprecated Renamed to `initialData`. Will be removed in 4.0.
702
+ * If both are set, `initialData` wins.
703
+ */
611
704
  initialTransfers?: CrossBorderTransfer[];
612
705
  adapter?: StorageAdapter<CrossBorderTransfer[]>;
613
706
  classNames?: CrossBorderTransferManagerClassNames;
614
707
  unstyled?: boolean;
708
+ /**
709
+ * UX copy overrides — see {@link NDPRCrossBorderCopy}.
710
+ */
711
+ copy?: NDPRCrossBorderCopy;
615
712
  }
616
713
 
617
714
  declare interface NDPRDashboardClassNames {
@@ -650,30 +747,146 @@ export declare interface NDPRDashboardPresetProps {
650
747
 
651
748
  export declare const NDPRDPIA: React__default.FC<NDPRDPIAProps>;
652
749
 
750
+ /**
751
+ * UX copy overrides for the NDPRDPIA preset. Strings you omit fall back
752
+ * to the lower-level `<DPIAQuestionnaire>` defaults. The DPIA wizard does
753
+ * not render a single header (each section has its own title); the `title`
754
+ * and `description` fields are reserved for future use and currently
755
+ * accepted for API parity with the other presets.
756
+ */
757
+ export declare interface NDPRDPIACopy {
758
+ /** Reserved — DPIA sections render their own titles. */
759
+ title?: string;
760
+ /** Reserved — DPIA sections render their own descriptions. */
761
+ description?: string;
762
+ /** Final-step submit button label. Default: "Submit" */
763
+ submitButton?: string;
764
+ /** Next-section button label. Default: "Next" */
765
+ nextButton?: string;
766
+ /** Previous-section button label. Default: "Previous" */
767
+ prevButton?: string;
768
+ }
769
+
653
770
  export declare interface NDPRDPIAProps {
654
771
  sections?: DPIASection[];
655
772
  adapter?: StorageAdapter<DPIAAnswerMap>;
656
773
  classNames?: DPIAQuestionnaireClassNames;
657
774
  unstyled?: boolean;
658
775
  onComplete?: (answers: DPIAAnswerMap) => void;
776
+ /**
777
+ * UX copy overrides — see {@link NDPRDPIACopy}.
778
+ */
779
+ copy?: NDPRDPIACopy;
780
+ /**
781
+ * Public-form mode. Use when the questionnaire should submit to your
782
+ * existing backend workflow instead of being state-managed by an adapter.
783
+ *
784
+ * When `submitTo` is set:
785
+ * - the questionnaire does NOT require an `adapter`
786
+ * - on completion, the toolkit POSTs the JSON-serialised `DPIAAnswerMap`
787
+ * to this URL (with `Content-Type: application/json`)
788
+ * - your `onComplete` callback still fires (after the POST resolves)
789
+ * - submit failures are surfaced via `onSubmitError`
790
+ *
791
+ * @example
792
+ * <NDPRDPIA submitTo="/api/dpia" />
793
+ */
794
+ submitTo?: string;
795
+ /**
796
+ * Fetch options for the `submitTo` POST. Useful for adding `credentials`
797
+ * (cookies/auth), `X-CSRF-Token`, or any other header your backend
798
+ * requires. Ignored unless `submitTo` is set.
799
+ *
800
+ * @default { credentials: 'same-origin' }
801
+ */
802
+ submitOptions?: {
803
+ headers?: Record<string, string> | (() => Record<string, string>);
804
+ credentials?: RequestCredentials;
805
+ };
806
+ /**
807
+ * Called when a `submitTo` POST fails (network error or non-2xx
808
+ * response).
809
+ */
810
+ onSubmitError?: (ctx: {
811
+ error?: unknown;
812
+ response?: Response;
813
+ }) => void;
814
+ /**
815
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
816
+ * `Response` object, the submitted `DPIAAnswerMap` payload, and the
817
+ * parsed JSON body if the server returned valid JSON.
818
+ */
819
+ onSubmitSuccess?: (ctx: {
820
+ response: Response;
821
+ data: DPIAAnswerMap;
822
+ body?: unknown;
823
+ }) => void;
659
824
  }
660
825
 
661
826
  export declare const NDPRLawfulBasis: React__default.FC<NDPRLawfulBasisProps>;
662
827
 
828
+ /**
829
+ * UX copy overrides for the NDPRLawfulBasis preset. Pass any subset to
830
+ * replace the default text without dropping to the lower-level
831
+ * `<LawfulBasisTracker>` API.
832
+ */
833
+ export declare interface NDPRLawfulBasisCopy {
834
+ /** Tracker heading. Default: "Lawful Basis Tracker" */
835
+ title?: string;
836
+ /** Body paragraph under the heading. */
837
+ description?: string;
838
+ }
839
+
663
840
  export declare interface NDPRLawfulBasisProps {
841
+ /**
842
+ * Initial activities to seed the tracker. Canonical name in 3.13+.
843
+ * Takes precedence over `initialActivities` if both are set.
844
+ */
845
+ initialData?: ProcessingActivity[];
846
+ /**
847
+ * @deprecated Renamed to `initialData`. Will be removed in 4.0.
848
+ * If both are set, `initialData` wins.
849
+ */
664
850
  initialActivities?: ProcessingActivity[];
665
851
  adapter?: StorageAdapter<ProcessingActivity[]>;
666
852
  classNames?: LawfulBasisTrackerClassNames;
667
853
  unstyled?: boolean;
854
+ /**
855
+ * UX copy overrides — see {@link NDPRLawfulBasisCopy}.
856
+ */
857
+ copy?: NDPRLawfulBasisCopy;
668
858
  }
669
859
 
670
860
  export declare const NDPRPrivacyPolicy: React__default.FC<NDPRPrivacyPolicyProps>;
671
861
 
862
+ /**
863
+ * UX copy overrides for the NDPRPrivacyPolicy preset. Strings you omit
864
+ * fall back to the underlying `<AdaptivePolicyWizard>` defaults.
865
+ *
866
+ * Note: the wizard renders many step-specific labels; the fields here
867
+ * cover the high-level header text. Step-specific copy is wired through
868
+ * the `NDPRProvider` locale.
869
+ */
870
+ export declare interface NDPRPrivacyPolicyCopy {
871
+ /** Wizard heading. Default: "Privacy Policy Builder" */
872
+ title?: string;
873
+ /** Optional body paragraph under the heading. */
874
+ description?: string;
875
+ /** Submit / complete button label. */
876
+ submitButton?: string;
877
+ }
878
+
672
879
  export declare interface NDPRPrivacyPolicyProps {
673
880
  adapter?: StorageAdapter<PolicyDraft>;
674
881
  onComplete?: (policy: PrivacyPolicy) => void;
675
882
  classNames?: Record<string, string>;
676
883
  unstyled?: boolean;
884
+ /**
885
+ * UX copy overrides — see {@link NDPRPrivacyPolicyCopy}. The wizard
886
+ * derives most of its labels from the active `NDPRProvider` locale; the
887
+ * fields here cover the high-level header text.
888
+ */
889
+ copy?: NDPRPrivacyPolicyCopy;
677
890
  /**
678
891
  * Pre-fill the policy wizard with a sector-specific starter template.
679
892
  *
@@ -707,11 +920,27 @@ export declare interface NDPRPrivacyPolicyProps {
707
920
 
708
921
  export declare const NDPRROPA: React__default.FC<NDPRROPAProps>;
709
922
 
923
+ /**
924
+ * UX copy overrides for the NDPRROPA preset. Pass any subset to
925
+ * replace the default text without dropping to the lower-level
926
+ * `<ROPAManager>` API.
927
+ */
928
+ export declare interface NDPRROPACopy {
929
+ /** Manager heading. Default: "Record of Processing Activities (ROPA)" */
930
+ title?: string;
931
+ /** Body paragraph under the heading. */
932
+ description?: string;
933
+ }
934
+
710
935
  export declare interface NDPRROPAProps {
711
936
  initialData?: RecordOfProcessingActivities;
712
937
  adapter?: StorageAdapter<RecordOfProcessingActivities>;
713
938
  classNames?: ROPAManagerClassNames;
714
939
  unstyled?: boolean;
940
+ /**
941
+ * UX copy overrides — see {@link NDPRROPACopy}.
942
+ */
943
+ copy?: NDPRROPACopy;
715
944
  }
716
945
 
717
946
  export declare const NDPRSubjectRights: React__default.FC<NDPRSubjectRightsProps>;
package/dist/presets.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkEKNWO4DK_js=require('./chunk-EKNWO4DK.js'),chunkUS2VGJ7I_js=require('./chunk-US2VGJ7I.js'),chunkJWAN5J4Y_js=require('./chunk-JWAN5J4Y.js');require('./chunk-6GM2PBTF.js');var chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkVUFTRKKC_js=require('./chunk-VUFTRKKC.js'),chunkNX5MOBRI_js=require('./chunk-NX5MOBRI.js'),chunkYSD2DFBR_js=require('./chunk-YSD2DFBR.js'),chunkWXUXCRAJ_js=require('./chunk-WXUXCRAJ.js');require('./chunk-NUOHT3LO.js'),require('./chunk-QHW4UKGJ.js'),require('./chunk-JS7SYL5P.js');var chunkRDALAH3Y_js=require('./chunk-RDALAH3Y.js');require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js'),require('./chunk-D3DVVJCT.js'),require('./chunk-L2VO3MEJ.js'),require('./chunk-TWJHEIQH.js'),require('./chunk-UXUMYP4L.js'),require('./chunk-NDKDKDDX.js'),require('./chunk-WKTKTLMF.js');var chunkROC64RLP_js=require('./chunk-ROC64RLP.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:r,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsxRuntime.jsx(chunkVUFTRKKC_js.a,{categories:c,onSubmit:d=>{r&&r.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:r,classNames:u,unstyled:p,onComplete:o=()=>{}})=>{let[n,d]=react.useState({}),[m,P]=react.useState(0),h=(a,C)=>{d(S=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},S),{[a]:C}));},e=()=>{m<c.length-1?P(a=>a+1):(r&&r.save(n),o(n));},t=()=>{m>0&&P(a=>a-1);},s=Math.round((m+1)/c.length*100);return jsxRuntime.jsx(chunkROC64RLP_js.a,{sections:c,answers:n,onAnswerChange:h,currentSectionIndex:m,onNextSection:e,onPrevSection:t,progress:s,classNames:u,unstyled:p})};var M=({initialActivities:c=[],adapter:r,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(r){let e=r.load();if(e&&!(e instanceof Promise))return e}return c});react.useEffect(()=>{if(!r)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let t=yield r.load();!e&&t&&n(t);}catch(t){}}),()=>{e=true;}},[r]);let d=e=>{r&&r.save(e);};return jsxRuntime.jsx(chunkNX5MOBRI_js.a,{activities:o,onAddActivity:e=>{let t=Date.now(),s=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,s];n(a),d(a);},onUpdateActivity:(e,t)=>{let s=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(s),d(s);},onArchiveActivity:e=>{let t=o.map(s=>s.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},s),{status:"inactive",updatedAt:Date.now()}):s);n(t),d(t);},classNames:u,unstyled:p})};var z=({initialTransfers:c=[],adapter:r,classNames:u,unstyled:p})=>{let[o,n]=react.useState(()=>{if(r){let e=r.load();if(e&&!(e instanceof Promise))return e}return c});react.useEffect(()=>{if(!r)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let t=yield r.load();!e&&t&&n(t);}catch(t){}}),()=>{e=true;}},[r]);let d=e=>{r&&r.save(e);};return jsxRuntime.jsx(chunkYSD2DFBR_js.a,{transfers:o,onAddTransfer:e=>{let t=Date.now(),s=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,s];n(a),d(a);},onUpdateTransfer:(e,t)=>{let s=o.map(a=>a.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},a),t),{updatedAt:Date.now()}):a);n(s),d(s);},onRemoveTransfer:e=>{let t=o.filter(s=>s.id!==e);n(t),d(t);},classNames:u,unstyled:p})};var $={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},G=({initialData:c,adapter:r,classNames:u,unstyled:p})=>{let[o,n]=react.useState(c!=null?c:$);react.useEffect(()=>{if(!r)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){let s=yield r.load();!e&&s&&n(s);}),()=>{e=true;}},[r]);let d=e=>{r&&r.save(e);};return jsxRuntime.jsx(chunkWXUXCRAJ_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 s=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(s),d(s);},onArchiveRecord:e=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},o),{records:o.records.map(s=>s.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},s),{status:"archived",updatedAt:Date.now()}):s),lastUpdated:Date.now()});n(t),d(t);},classNames:u,unstyled:p})};var J=u=>{var p=u,{input:c}=p,r=chunkRFPLZDIO_js.c(p,["input"]);let o=chunkRDALAH3Y_js.a(c);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:o},r))};Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunkEKNWO4DK_js.a}});Object.defineProperty(exports,"NDPRSubjectRights",{enumerable:true,get:function(){return chunkUS2VGJ7I_js.a}});Object.defineProperty(exports,"NDPRPrivacyPolicy",{enumerable:true,get:function(){return chunkJWAN5J4Y_js.a}});exports.NDPRBreachReport=I;exports.NDPRComplianceDashboard=J;exports.NDPRCrossBorder=z;exports.NDPRDPIA=_;exports.NDPRLawfulBasis=M;exports.NDPRROPA=G;
2
+ 'use strict';var chunkZM5DLFCZ_js=require('./chunk-ZM5DLFCZ.js'),chunkKH3EQJQE_js=require('./chunk-KH3EQJQE.js'),chunk3E4IH7CE_js=require('./chunk-3E4IH7CE.js');require('./chunk-F5MGMNQF.js');var chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkQGUOFGVJ_js=require('./chunk-QGUOFGVJ.js'),chunk7FXNGGMO_js=require('./chunk-7FXNGGMO.js'),chunkXYGGUGTO_js=require('./chunk-XYGGUGTO.js'),chunkBL5W472Q_js=require('./chunk-BL5W472Q.js');require('./chunk-NUOHT3LO.js'),require('./chunk-QHW4UKGJ.js'),require('./chunk-JS7SYL5P.js');var chunkRDALAH3Y_js=require('./chunk-RDALAH3Y.js');require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js'),require('./chunk-ZD2W3YU2.js'),require('./chunk-L2VO3MEJ.js'),require('./chunk-UZNWXJ2W.js'),require('./chunk-UXUMYP4L.js');var chunkWCTFED27_js=require('./chunk-WCTFED27.js');require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var J=[{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"}],Q=({categories:o=J,adapter:c,classNames:i,unstyled:A,onSubmit:h=()=>{},copy:e,formDescription:P,description:n,submitTo:l,submitOptions:s,onSubmitError:p,onSubmitSuccess:m})=>{var t,r;let f=react.useRef(false);react.useEffect(()=>{process.env.NODE_ENV!=="production"&&P!==void 0&&n===void 0&&!f.current&&(f.current=true,console.warn("[ndpr-toolkit/breach] NDPRBreachReportProps.formDescription is deprecated; rename to 'description'. Will be removed in 4.0."));},[P,n]);let R=d=>chunkRFPLZDIO_js.d(null,null,function*(){var u,D;if(l){let C=typeof(s==null?void 0:s.headers)=="function"?s.headers():(u=s==null?void 0:s.headers)!=null?u:{};try{let N=yield fetch(l,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},C),credentials:(D=s==null?void 0:s.credentials)!=null?D:"same-origin",body:JSON.stringify(d)});if(!N.ok)p==null||p({response:N});else if(m){let B;try{let y=yield N.clone().text();y&&(B=JSON.parse(y));}catch(y){}m({response:N,data:d,body:B});}}catch(N){p==null||p({error:N});}}else c&&c.save(d);h(d);}),g=(r=(t=e==null?void 0:e.description)!=null?t:n)!=null?r:P;return jsxRuntime.jsx(chunkQGUOFGVJ_js.a,{categories:o,onSubmit:R,classNames:i,unstyled:A,title:e==null?void 0:e.title,formDescription:g,submitButtonText:e==null?void 0:e.submitButton})};var G=[{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"}]}]}],H=({sections:o=G,adapter:c,classNames:i,unstyled:A,onComplete:h=()=>{},copy:e,submitTo:P,submitOptions:n,onSubmitError:l,onSubmitSuccess:s})=>{let[p,m]=react.useState({}),[f,R]=react.useState(0),g=(D,C)=>{m(N=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},N),{[D]:C}));},t=D=>chunkRFPLZDIO_js.d(null,null,function*(){var C,N;if(P){let B=typeof(n==null?void 0:n.headers)=="function"?n.headers():(C=n==null?void 0:n.headers)!=null?C:{};try{let y=yield fetch(P,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},B),credentials:(N=n==null?void 0:n.credentials)!=null?N:"same-origin",body:JSON.stringify(D)});if(!y.ok)l==null||l({response:y});else if(s){let b;try{let x=yield y.clone().text();x&&(b=JSON.parse(x));}catch(x){}s({response:y,data:D,body:b});}}catch(y){l==null||l({error:y});}}else c&&c.save(D);h(D);}),r=()=>{f<o.length-1?R(D=>D+1):t(p);},d=()=>{f>0&&R(D=>D-1);},u=Math.round((f+1)/o.length*100);return jsxRuntime.jsx(chunkWCTFED27_js.a,{sections:o,answers:p,onAnswerChange:g,currentSectionIndex:f,onNextSection:r,onPrevSection:d,progress:u,classNames:i,unstyled:A,submitButtonText:e==null?void 0:e.submitButton,nextButtonText:e==null?void 0:e.nextButton,prevButtonText:e==null?void 0:e.prevButton})};var Z=({initialData:o,initialActivities:c,adapter:i,classNames:A,unstyled:h,copy:e})=>{var g;let P=react.useRef(false);react.useEffect(()=>{process.env.NODE_ENV!=="production"&&c!==void 0&&o===void 0&&!P.current&&(P.current=true,console.warn("[ndpr-toolkit/lawful-basis] NDPRLawfulBasisProps.initialActivities is deprecated; rename to 'initialData'. Will be removed in 4.0."));},[c,o]);let n=(g=o!=null?o:c)!=null?g:[],[l,s]=react.useState(()=>{if(i){let t=i.load();if(t&&!(t instanceof Promise))return t}return n});react.useEffect(()=>{if(!i)return;let t=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let r=yield i.load();!t&&r&&s(r);}catch(r){}}),()=>{t=true;}},[i]);let p=t=>{i&&i.save(t);};return jsxRuntime.jsx(chunk7FXNGGMO_js.a,{activities:l,onAddActivity:t=>{let r=Date.now(),d=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{id:`activity-${r}`,createdAt:r,updatedAt:r}),u=[...l,d];s(u),p(u);},onUpdateActivity:(t,r)=>{let d=l.map(u=>u.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},u),r),{updatedAt:Date.now()}):u);s(d),p(d);},onArchiveActivity:t=>{let r=l.map(d=>d.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},d),{status:"inactive",updatedAt:Date.now()}):d);s(r),p(r);},classNames:A,unstyled:h,title:e==null?void 0:e.title,description:e==null?void 0:e.description})};var se=({initialData:o,initialTransfers:c,adapter:i,classNames:A,unstyled:h,copy:e})=>{var g;let P=react.useRef(false);react.useEffect(()=>{process.env.NODE_ENV!=="production"&&c!==void 0&&o===void 0&&!P.current&&(P.current=true,console.warn("[ndpr-toolkit/cross-border] NDPRCrossBorderProps.initialTransfers is deprecated; rename to 'initialData'. Will be removed in 4.0."));},[c,o]);let n=(g=o!=null?o:c)!=null?g:[],[l,s]=react.useState(()=>{if(i){let t=i.load();if(t&&!(t instanceof Promise))return t}return n});react.useEffect(()=>{if(!i)return;let t=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let r=yield i.load();!t&&r&&s(r);}catch(r){}}),()=>{t=true;}},[i]);let p=t=>{i&&i.save(t);};return jsxRuntime.jsx(chunkXYGGUGTO_js.a,{transfers:l,onAddTransfer:t=>{let r=Date.now(),d=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),u=[...l,d];s(u),p(u);},onUpdateTransfer:(t,r)=>{let d=l.map(u=>u.id===t?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},u),r),{updatedAt:Date.now()}):u);s(d),p(d);},onRemoveTransfer:t=>{let r=l.filter(d=>d.id!==t);s(r),p(r);},classNames:A,unstyled:h,title:e==null?void 0:e.title,description:e==null?void 0:e.description})};var ne={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},de=({initialData:o,adapter:c,classNames:i,unstyled:A,copy:h})=>{let[e,P]=react.useState(o!=null?o:ne);react.useEffect(()=>{if(!c)return;let m=false;return chunkRFPLZDIO_js.d(null,null,function*(){let R=yield c.load();!m&&R&&P(R);}),()=>{m=true;}},[c]);let n=m=>{c&&c.save(m);};return jsxRuntime.jsx(chunkBL5W472Q_js.a,{ropa:e,onAddRecord:m=>{let f=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{records:[...e.records,m],lastUpdated:Date.now()});P(f),n(f);},onUpdateRecord:(m,f)=>{let R=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{records:e.records.map(g=>g.id===m?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},g),f),{updatedAt:Date.now()}):g),lastUpdated:Date.now()});P(R),n(R);},onArchiveRecord:m=>{let f=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{records:e.records.map(R=>R.id===m?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},R),{status:"archived",updatedAt:Date.now()}):R),lastUpdated:Date.now()});P(f),n(f);},classNames:i,unstyled:A,title:h==null?void 0:h.title,description:h==null?void 0:h.description})};var le=i=>{var A=i,{input:o}=A,c=chunkRFPLZDIO_js.c(A,["input"]);let h=chunkRDALAH3Y_js.a(o);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:h},c))};Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunkZM5DLFCZ_js.a}});Object.defineProperty(exports,"NDPRSubjectRights",{enumerable:true,get:function(){return chunkKH3EQJQE_js.a}});Object.defineProperty(exports,"NDPRPrivacyPolicy",{enumerable:true,get:function(){return chunk3E4IH7CE_js.a}});exports.NDPRBreachReport=Q;exports.NDPRComplianceDashboard=le;exports.NDPRCrossBorder=se;exports.NDPRDPIA=H;exports.NDPRLawfulBasis=Z;exports.NDPRROPA=de;