@tantainnovative/ndpr-toolkit 3.12.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/README.md +1 -1
  3. package/dist/breach.d.mts +3 -2
  4. package/dist/breach.d.ts +3 -2
  5. package/dist/breach.js +1 -1
  6. package/dist/breach.mjs +1 -1
  7. package/dist/chunk-37VFK5SR.js +6 -0
  8. package/dist/chunk-3E4IH7CE.js +1 -0
  9. package/dist/chunk-3H6FYU3Z.mjs +93 -0
  10. package/dist/chunk-3I6FYA5C.js +103 -0
  11. package/dist/chunk-3SIYRGJF.js +93 -0
  12. package/dist/chunk-3XU6FL2I.js +1 -0
  13. package/dist/chunk-42JPSNVV.mjs +6 -0
  14. package/dist/chunk-42UJFTII.js +1 -0
  15. package/dist/chunk-5F2IAUWJ.js +1 -0
  16. package/dist/chunk-63WM5PHZ.js +1 -0
  17. package/dist/chunk-6A6VI7ZP.mjs +1 -0
  18. package/dist/chunk-7FXNGGMO.js +1 -0
  19. package/dist/chunk-B2EXRSYG.mjs +1 -0
  20. package/dist/chunk-BGV2AKT7.mjs +1 -0
  21. package/dist/chunk-BL5W472Q.js +1 -0
  22. package/dist/chunk-BPMVJOHH.mjs +1 -0
  23. package/dist/chunk-D2UWB5OI.js +2 -0
  24. package/dist/chunk-DK7P5JEG.mjs +2 -0
  25. package/dist/chunk-ELK6VFKC.mjs +2 -0
  26. package/dist/chunk-F5MGMNQF.js +2 -0
  27. package/dist/chunk-FRQFU44F.mjs +1 -0
  28. package/dist/chunk-GUERZD4O.mjs +1 -0
  29. package/dist/{chunk-WYH3OA5L.mjs → chunk-I2ZBMR7F.mjs} +1 -1
  30. package/dist/chunk-J7BIJ45O.mjs +103 -0
  31. package/dist/{chunk-US2VGJ7I.js → chunk-KH3EQJQE.js} +1 -1
  32. package/dist/{chunk-IPWX5I5P.mjs → chunk-L3FR4PQE.mjs} +1 -1
  33. package/dist/chunk-N72RNTGP.mjs +6 -0
  34. package/dist/chunk-NB6SKG76.mjs +1 -0
  35. package/dist/chunk-RBKFNCGO.mjs +1 -0
  36. package/dist/chunk-TTMGFC6C.js +1 -0
  37. package/dist/{chunk-TWJHEIQH.js → chunk-UZNWXJ2W.js} +1 -1
  38. package/dist/chunk-V5TZJJWU.mjs +1 -0
  39. package/dist/chunk-WCTFED27.js +1 -0
  40. package/dist/chunk-WMISQDSV.js +1 -0
  41. package/dist/{chunk-MTSZ7GL6.mjs → chunk-WVHMY2BV.mjs} +1 -1
  42. package/dist/chunk-XYGGUGTO.js +6 -0
  43. package/dist/chunk-YDKWD6MQ.js +1 -0
  44. package/dist/chunk-Z2M5VJX2.mjs +1 -0
  45. package/dist/{chunk-D3DVVJCT.js → chunk-ZD2W3YU2.js} +1 -1
  46. package/dist/chunk-ZQHGIOYP.mjs +1 -0
  47. package/dist/consent.js +1 -1
  48. package/dist/consent.mjs +1 -1
  49. package/dist/core.d.mts +62 -0
  50. package/dist/core.d.ts +62 -0
  51. package/dist/core.js +1 -1
  52. package/dist/core.mjs +1 -1
  53. package/dist/cross-border-lite.js +1 -1
  54. package/dist/cross-border-lite.mjs +1 -1
  55. package/dist/cross-border.js +1 -1
  56. package/dist/cross-border.mjs +1 -1
  57. package/dist/dpia.js +1 -1
  58. package/dist/dpia.mjs +1 -1
  59. package/dist/dsr.d.mts +12 -3
  60. package/dist/dsr.d.ts +12 -3
  61. package/dist/dsr.js +1 -1
  62. package/dist/dsr.mjs +1 -1
  63. package/dist/headless.d.mts +12 -3
  64. package/dist/headless.d.ts +12 -3
  65. package/dist/headless.js +1 -1
  66. package/dist/headless.mjs +1 -1
  67. package/dist/hooks.d.mts +12 -3
  68. package/dist/hooks.d.ts +12 -3
  69. package/dist/hooks.js +1 -1
  70. package/dist/hooks.mjs +1 -1
  71. package/dist/index.d.mts +77 -5
  72. package/dist/index.d.ts +77 -5
  73. package/dist/index.js +1 -1
  74. package/dist/index.mjs +1 -1
  75. package/dist/lawful-basis-lite.js +1 -1
  76. package/dist/lawful-basis-lite.mjs +1 -1
  77. package/dist/lawful-basis.js +1 -1
  78. package/dist/lawful-basis.mjs +1 -1
  79. package/dist/policy.js +1 -1
  80. package/dist/policy.mjs +1 -1
  81. package/dist/presets-consent.d.mts +5 -1
  82. package/dist/presets-consent.d.ts +5 -1
  83. package/dist/presets-consent.js +1 -1
  84. package/dist/presets-consent.mjs +1 -1
  85. package/dist/presets-dsr.js +1 -1
  86. package/dist/presets-dsr.mjs +1 -1
  87. package/dist/presets-policy.d.mts +23 -0
  88. package/dist/presets-policy.d.ts +23 -0
  89. package/dist/presets-policy.js +1 -1
  90. package/dist/presets-policy.mjs +1 -1
  91. package/dist/presets.d.mts +221 -4
  92. package/dist/presets.d.ts +221 -4
  93. package/dist/presets.js +1 -1
  94. package/dist/presets.mjs +1 -1
  95. package/dist/ropa-lite.js +1 -1
  96. package/dist/ropa-lite.mjs +1 -1
  97. package/dist/ropa.js +1 -1
  98. package/dist/ropa.mjs +1 -1
  99. package/dist/server.d.mts +62 -0
  100. package/dist/server.d.ts +62 -0
  101. package/dist/server.js +1 -1
  102. package/dist/server.mjs +1 -1
  103. package/dist/unstyled.js +1 -1
  104. package/dist/unstyled.mjs +1 -1
  105. package/package.json +3 -3
  106. package/dist/chunk-25TNTLHJ.mjs +0 -1
  107. package/dist/chunk-4GIMXUMI.js +0 -6
  108. package/dist/chunk-5AECGMEB.js +0 -1
  109. package/dist/chunk-5EKQX6GM.mjs +0 -1
  110. package/dist/chunk-67KA345Q.mjs +0 -1
  111. package/dist/chunk-6GM2PBTF.js +0 -2
  112. package/dist/chunk-6OWCUDTN.mjs +0 -1
  113. package/dist/chunk-73BMSK67.js +0 -1
  114. package/dist/chunk-CAFCRCTZ.mjs +0 -1
  115. package/dist/chunk-EKNWO4DK.js +0 -1
  116. package/dist/chunk-FMJ6ICLJ.js +0 -1
  117. package/dist/chunk-G7JKRYM5.mjs +0 -1
  118. package/dist/chunk-GEP52QFH.mjs +0 -1
  119. package/dist/chunk-IB3KSUPZ.mjs +0 -1
  120. package/dist/chunk-JWAN5J4Y.js +0 -1
  121. package/dist/chunk-JYZOKO2W.mjs +0 -103
  122. package/dist/chunk-NDKDKDDX.js +0 -1
  123. package/dist/chunk-NX5MOBRI.js +0 -1
  124. package/dist/chunk-OLEUIYE2.mjs +0 -1
  125. package/dist/chunk-Q4CSVWSS.mjs +0 -1
  126. package/dist/chunk-QMAVEHOR.js +0 -1
  127. package/dist/chunk-RBMLGRDN.mjs +0 -1
  128. package/dist/chunk-ROC64RLP.js +0 -1
  129. package/dist/chunk-RR3KXNET.mjs +0 -6
  130. package/dist/chunk-TDHH7GS2.mjs +0 -2
  131. package/dist/chunk-TN4TH3CT.mjs +0 -2
  132. package/dist/chunk-VUFTRKKC.js +0 -2
  133. package/dist/chunk-WKTKTLMF.js +0 -1
  134. package/dist/chunk-WXUXCRAJ.js +0 -1
  135. package/dist/chunk-XN2UYZXH.mjs +0 -93
  136. package/dist/chunk-YK22SYCT.js +0 -103
  137. package/dist/chunk-YSD2DFBR.js +0 -6
  138. package/dist/chunk-YWCBI7SI.js +0 -93
  139. package/dist/chunk-ZHX62QAL.mjs +0 -6
package/dist/presets.d.ts CHANGED
@@ -543,12 +543,78 @@ 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
+ * Body paragraph under the heading.
572
+ */
573
+ description?: string;
574
+ /**
575
+ * Public-form mode. Use when the form should submit to your existing
576
+ * backend workflow instead of being state-managed by an adapter.
577
+ *
578
+ * When `submitTo` is set:
579
+ * - the form does NOT require an `adapter`
580
+ * - on submit, the toolkit POSTs the JSON-serialised `BreachFormSubmission`
581
+ * to this URL (with `Content-Type: application/json`)
582
+ * - your `onSubmit` callback still fires (after the POST resolves)
583
+ * - submit failures are surfaced via `onSubmitError`
584
+ *
585
+ * @example
586
+ * <NDPRBreachReport submitTo="/api/breach" />
587
+ */
588
+ submitTo?: string;
589
+ /**
590
+ * Fetch options for the `submitTo` POST. Useful for adding `credentials`
591
+ * (cookies/auth), `X-CSRF-Token`, or any other header your backend
592
+ * requires. Ignored unless `submitTo` is set.
593
+ *
594
+ * @default { credentials: 'same-origin' }
595
+ */
596
+ submitOptions?: {
597
+ headers?: Record<string, string> | (() => Record<string, string>);
598
+ credentials?: RequestCredentials;
599
+ };
600
+ /**
601
+ * Called when a `submitTo` POST fails (network error or non-2xx
602
+ * response). Receives the underlying error or Response.
603
+ */
604
+ onSubmitError?: (ctx: {
605
+ error?: unknown;
606
+ response?: Response;
607
+ }) => void;
608
+ /**
609
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
610
+ * `Response` object, the submitted `BreachFormSubmission` payload, and the
611
+ * parsed JSON body if the server returned valid JSON.
612
+ */
613
+ onSubmitSuccess?: (ctx: {
614
+ response: Response;
615
+ data: BreachFormSubmission;
616
+ body?: unknown;
617
+ }) => void;
552
618
  }
553
619
 
554
620
  /**
@@ -575,7 +641,7 @@ export declare const NDPRConsent: React__default.FC<NDPRConsentProps>;
575
641
  * rejectAll: 'Only essentials',
576
642
  * }} />
577
643
  */
578
- declare interface NDPRConsentCopy {
644
+ export declare interface NDPRConsentCopy {
579
645
  /** Banner heading. Default: "We Value Your Privacy" */
580
646
  title?: string;
581
647
  /** Body paragraph under the heading. Default cites NDPA Section 26. */
@@ -591,7 +657,11 @@ declare interface NDPRConsentCopy {
591
657
  }
592
658
 
593
659
  export declare interface NDPRConsentProps {
594
- extraOptions?: ConsentOption[];
660
+ /**
661
+ * Consent categories to present. When omitted, the toolkit's
662
+ * default options are used. (4.0: legacy `extraOptions` was removed —
663
+ * pass the full options array here instead.)
664
+ */
595
665
  options?: ConsentOption[];
596
666
  adapter?: StorageAdapter<ConsentSettings>;
597
667
  position?: 'top' | 'bottom' | 'center' | 'inline';
@@ -607,11 +677,31 @@ export declare interface NDPRConsentProps {
607
677
 
608
678
  export declare const NDPRCrossBorder: React__default.FC<NDPRCrossBorderProps>;
609
679
 
680
+ /**
681
+ * UX copy overrides for the NDPRCrossBorder preset. Pass any subset to
682
+ * replace the default text without dropping to the lower-level
683
+ * `<CrossBorderTransferManager>` API.
684
+ */
685
+ export declare interface NDPRCrossBorderCopy {
686
+ /** Manager heading. Default: "Cross-Border Data Transfer Manager" */
687
+ title?: string;
688
+ /** Body paragraph under the heading. */
689
+ description?: string;
690
+ }
691
+
610
692
  export declare interface NDPRCrossBorderProps {
611
- initialTransfers?: CrossBorderTransfer[];
693
+ /**
694
+ * Initial transfers to seed the manager. (4.0: the legacy
695
+ * `initialTransfers` alias was removed.)
696
+ */
697
+ initialData?: CrossBorderTransfer[];
612
698
  adapter?: StorageAdapter<CrossBorderTransfer[]>;
613
699
  classNames?: CrossBorderTransferManagerClassNames;
614
700
  unstyled?: boolean;
701
+ /**
702
+ * UX copy overrides — see {@link NDPRCrossBorderCopy}.
703
+ */
704
+ copy?: NDPRCrossBorderCopy;
615
705
  }
616
706
 
617
707
  declare interface NDPRDashboardClassNames {
@@ -650,30 +740,141 @@ export declare interface NDPRDashboardPresetProps {
650
740
 
651
741
  export declare const NDPRDPIA: React__default.FC<NDPRDPIAProps>;
652
742
 
743
+ /**
744
+ * UX copy overrides for the NDPRDPIA preset. Strings you omit fall back
745
+ * to the lower-level `<DPIAQuestionnaire>` defaults. The DPIA wizard does
746
+ * not render a single header (each section has its own title); the `title`
747
+ * and `description` fields are reserved for future use and currently
748
+ * accepted for API parity with the other presets.
749
+ */
750
+ export declare interface NDPRDPIACopy {
751
+ /** Reserved — DPIA sections render their own titles. */
752
+ title?: string;
753
+ /** Reserved — DPIA sections render their own descriptions. */
754
+ description?: string;
755
+ /** Final-step submit button label. Default: "Submit" */
756
+ submitButton?: string;
757
+ /** Next-section button label. Default: "Next" */
758
+ nextButton?: string;
759
+ /** Previous-section button label. Default: "Previous" */
760
+ prevButton?: string;
761
+ }
762
+
653
763
  export declare interface NDPRDPIAProps {
654
764
  sections?: DPIASection[];
655
765
  adapter?: StorageAdapter<DPIAAnswerMap>;
656
766
  classNames?: DPIAQuestionnaireClassNames;
657
767
  unstyled?: boolean;
658
768
  onComplete?: (answers: DPIAAnswerMap) => void;
769
+ /**
770
+ * UX copy overrides — see {@link NDPRDPIACopy}.
771
+ */
772
+ copy?: NDPRDPIACopy;
773
+ /**
774
+ * Public-form mode. Use when the questionnaire should submit to your
775
+ * existing backend workflow instead of being state-managed by an adapter.
776
+ *
777
+ * When `submitTo` is set:
778
+ * - the questionnaire does NOT require an `adapter`
779
+ * - on completion, the toolkit POSTs the JSON-serialised `DPIAAnswerMap`
780
+ * to this URL (with `Content-Type: application/json`)
781
+ * - your `onComplete` callback still fires (after the POST resolves)
782
+ * - submit failures are surfaced via `onSubmitError`
783
+ *
784
+ * @example
785
+ * <NDPRDPIA submitTo="/api/dpia" />
786
+ */
787
+ submitTo?: string;
788
+ /**
789
+ * Fetch options for the `submitTo` POST. Useful for adding `credentials`
790
+ * (cookies/auth), `X-CSRF-Token`, or any other header your backend
791
+ * requires. Ignored unless `submitTo` is set.
792
+ *
793
+ * @default { credentials: 'same-origin' }
794
+ */
795
+ submitOptions?: {
796
+ headers?: Record<string, string> | (() => Record<string, string>);
797
+ credentials?: RequestCredentials;
798
+ };
799
+ /**
800
+ * Called when a `submitTo` POST fails (network error or non-2xx
801
+ * response).
802
+ */
803
+ onSubmitError?: (ctx: {
804
+ error?: unknown;
805
+ response?: Response;
806
+ }) => void;
807
+ /**
808
+ * Called when a `submitTo` POST succeeds (2xx response). Receives the
809
+ * `Response` object, the submitted `DPIAAnswerMap` payload, and the
810
+ * parsed JSON body if the server returned valid JSON.
811
+ */
812
+ onSubmitSuccess?: (ctx: {
813
+ response: Response;
814
+ data: DPIAAnswerMap;
815
+ body?: unknown;
816
+ }) => void;
659
817
  }
660
818
 
661
819
  export declare const NDPRLawfulBasis: React__default.FC<NDPRLawfulBasisProps>;
662
820
 
821
+ /**
822
+ * UX copy overrides for the NDPRLawfulBasis preset. Pass any subset to
823
+ * replace the default text without dropping to the lower-level
824
+ * `<LawfulBasisTracker>` API.
825
+ */
826
+ export declare interface NDPRLawfulBasisCopy {
827
+ /** Tracker heading. Default: "Lawful Basis Tracker" */
828
+ title?: string;
829
+ /** Body paragraph under the heading. */
830
+ description?: string;
831
+ }
832
+
663
833
  export declare interface NDPRLawfulBasisProps {
664
- initialActivities?: ProcessingActivity[];
834
+ /**
835
+ * Initial activities to seed the tracker. (4.0: the legacy
836
+ * `initialActivities` alias was removed.)
837
+ */
838
+ initialData?: ProcessingActivity[];
665
839
  adapter?: StorageAdapter<ProcessingActivity[]>;
666
840
  classNames?: LawfulBasisTrackerClassNames;
667
841
  unstyled?: boolean;
842
+ /**
843
+ * UX copy overrides — see {@link NDPRLawfulBasisCopy}.
844
+ */
845
+ copy?: NDPRLawfulBasisCopy;
668
846
  }
669
847
 
670
848
  export declare const NDPRPrivacyPolicy: React__default.FC<NDPRPrivacyPolicyProps>;
671
849
 
850
+ /**
851
+ * UX copy overrides for the NDPRPrivacyPolicy preset. Strings you omit
852
+ * fall back to the underlying `<AdaptivePolicyWizard>` defaults.
853
+ *
854
+ * Note: the wizard renders many step-specific labels; the fields here
855
+ * cover the high-level header text. Step-specific copy is wired through
856
+ * the `NDPRProvider` locale.
857
+ */
858
+ export declare interface NDPRPrivacyPolicyCopy {
859
+ /** Wizard heading. Default: "Privacy Policy Builder" */
860
+ title?: string;
861
+ /** Optional body paragraph under the heading. */
862
+ description?: string;
863
+ /** Submit / complete button label. */
864
+ submitButton?: string;
865
+ }
866
+
672
867
  export declare interface NDPRPrivacyPolicyProps {
673
868
  adapter?: StorageAdapter<PolicyDraft>;
674
869
  onComplete?: (policy: PrivacyPolicy) => void;
675
870
  classNames?: Record<string, string>;
676
871
  unstyled?: boolean;
872
+ /**
873
+ * UX copy overrides — see {@link NDPRPrivacyPolicyCopy}. The wizard
874
+ * derives most of its labels from the active `NDPRProvider` locale; the
875
+ * fields here cover the high-level header text.
876
+ */
877
+ copy?: NDPRPrivacyPolicyCopy;
677
878
  /**
678
879
  * Pre-fill the policy wizard with a sector-specific starter template.
679
880
  *
@@ -707,11 +908,27 @@ export declare interface NDPRPrivacyPolicyProps {
707
908
 
708
909
  export declare const NDPRROPA: React__default.FC<NDPRROPAProps>;
709
910
 
911
+ /**
912
+ * UX copy overrides for the NDPRROPA preset. Pass any subset to
913
+ * replace the default text without dropping to the lower-level
914
+ * `<ROPAManager>` API.
915
+ */
916
+ export declare interface NDPRROPACopy {
917
+ /** Manager heading. Default: "Record of Processing Activities (ROPA)" */
918
+ title?: string;
919
+ /** Body paragraph under the heading. */
920
+ description?: string;
921
+ }
922
+
710
923
  export declare interface NDPRROPAProps {
711
924
  initialData?: RecordOfProcessingActivities;
712
925
  adapter?: StorageAdapter<RecordOfProcessingActivities>;
713
926
  classNames?: ROPAManagerClassNames;
714
927
  unstyled?: boolean;
928
+ /**
929
+ * UX copy overrides — see {@link NDPRROPACopy}.
930
+ */
931
+ copy?: NDPRROPACopy;
715
932
  }
716
933
 
717
934
  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 chunk63WM5PHZ_js=require('./chunk-63WM5PHZ.js'),chunkKH3EQJQE_js=require('./chunk-KH3EQJQE.js'),chunk3E4IH7CE_js=require('./chunk-3E4IH7CE.js');require('./chunk-F5MGMNQF.js');var chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkD2UWB5OI_js=require('./chunk-D2UWB5OI.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'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var W=[{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"}],Y=({categories:c=W,adapter:s,classNames:R,unstyled:h,onSubmit:a=()=>{},copy:r,description:l,submitTo:o,submitOptions:i,onSubmitError:m,onSubmitSuccess:v})=>{var t;let f=n=>chunkRFPLZDIO_js.d(null,null,function*(){var p,N;if(o){let w=typeof(i==null?void 0:i.headers)=="function"?i.headers():(p=i==null?void 0:i.headers)!=null?p:{};try{let A=yield fetch(o,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},w),credentials:(N=i==null?void 0:i.credentials)!=null?N:"same-origin",body:JSON.stringify(n)});if(!A.ok)m==null||m({response:A});else if(v){let P;try{let D=yield A.clone().text();D&&(P=JSON.parse(D));}catch(D){}v({response:A,data:n,body:P});}}catch(A){m==null||m({error:A});}}else s&&s.save(n);a(n);}),e=(t=r==null?void 0:r.description)!=null?t:l;return jsxRuntime.jsx(chunkD2UWB5OI_js.a,{categories:c,onSubmit:f,classNames:R,unstyled:h,title:r==null?void 0:r.title,description:e,submitButtonText:r==null?void 0:r.submitButton})};var J=[{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"}]}]}],Q=({sections:c=J,adapter:s,classNames:R,unstyled:h,onComplete:a=()=>{},copy:r,submitTo:l,submitOptions:o,onSubmitError:i,onSubmitSuccess:m})=>{let[v,f]=react.useState({}),[e,t]=react.useState(0),n=(P,D)=>{f(C=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},C),{[P]:D}));},p=P=>chunkRFPLZDIO_js.d(null,null,function*(){var D,C;if(l){let F=typeof(o==null?void 0:o.headers)=="function"?o.headers():(D=o==null?void 0:o.headers)!=null?D:{};try{let y=yield fetch(l,{method:"POST",headers:chunkRFPLZDIO_js.a({"Content-Type":"application/json"},F),credentials:(C=o==null?void 0:o.credentials)!=null?C:"same-origin",body:JSON.stringify(P)});if(!y.ok)i==null||i({response:y});else if(m){let x;try{let B=yield y.clone().text();B&&(x=JSON.parse(B));}catch(B){}m({response:y,data:P,body:x});}}catch(y){i==null||i({error:y});}}else s&&s.save(P);a(P);}),N=()=>{e<c.length-1?t(P=>P+1):p(v);},w=()=>{e>0&&t(P=>P-1);},A=Math.round((e+1)/c.length*100);return jsxRuntime.jsx(chunkWCTFED27_js.a,{sections:c,answers:v,onAnswerChange:n,currentSectionIndex:e,onNextSection:N,onPrevSection:w,progress:A,classNames:R,unstyled:h,submitButtonText:r==null?void 0:r.submitButton,nextButtonText:r==null?void 0:r.nextButton,prevButtonText:r==null?void 0:r.prevButton})};var H=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let r=c!=null?c:[],[l,o]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return r});react.useEffect(()=>{if(!s)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let t=yield s.load();!e&&t&&o(t);}catch(t){}}),()=>{e=true;}},[s]);let i=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunk7FXNGGMO_js.a,{activities:l,onAddActivity:e=>{let t=Date.now(),n=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),p=[...l,n];o(p),i(p);},onUpdateActivity:(e,t)=>{let n=l.map(p=>p.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},p),t),{updatedAt:Date.now()}):p);o(n),i(n);},onArchiveActivity:e=>{let t=l.map(n=>n.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},n),{status:"inactive",updatedAt:Date.now()}):n);o(t),i(t);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var E=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let r=c!=null?c:[],[l,o]=react.useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return r});react.useEffect(()=>{if(!s)return;let e=false;return chunkRFPLZDIO_js.d(null,null,function*(){try{let t=yield s.load();!e&&t&&o(t);}catch(t){}}),()=>{e=true;}},[s]);let i=e=>{s&&s.save(e);};return jsxRuntime.jsx(chunkXYGGUGTO_js.a,{transfers:l,onAddTransfer:e=>{let t=Date.now(),n=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),p=[...l,n];o(p),i(p);},onUpdateTransfer:(e,t)=>{let n=l.map(p=>p.id===e?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},p),t),{updatedAt:Date.now()}):p);o(n),i(n);},onRemoveTransfer:e=>{let t=l.filter(n=>n.id!==e);o(t),i(t);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var se={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},oe=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let[r,l]=react.useState(c!=null?c:se);react.useEffect(()=>{if(!s)return;let f=false;return chunkRFPLZDIO_js.d(null,null,function*(){let t=yield s.load();!f&&t&&l(t);}),()=>{f=true;}},[s]);let o=f=>{s&&s.save(f);};return jsxRuntime.jsx(chunkBL5W472Q_js.a,{ropa:r,onAddRecord:f=>{let e=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{records:[...r.records,f],lastUpdated:Date.now()});l(e),o(e);},onUpdateRecord:(f,e)=>{let t=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{records:r.records.map(n=>n.id===f?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},n),e),{updatedAt:Date.now()}):n),lastUpdated:Date.now()});l(t),o(t);},onArchiveRecord:f=>{let e=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},r),{records:r.records.map(t=>t.id===f?chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},t),{status:"archived",updatedAt:Date.now()}):t),lastUpdated:Date.now()});l(e),o(e);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var ie=R=>{var h=R,{input:c}=h,s=chunkRFPLZDIO_js.c(h,["input"]);let a=chunkRDALAH3Y_js.a(c);return jsxRuntime.jsx(chunkNUWVPRNI_js.a,chunkRFPLZDIO_js.a({report:a},s))};Object.defineProperty(exports,"NDPRConsent",{enumerable:true,get:function(){return chunk63WM5PHZ_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=Y;exports.NDPRComplianceDashboard=ie;exports.NDPRCrossBorder=E;exports.NDPRDPIA=Q;exports.NDPRLawfulBasis=H;exports.NDPRROPA=oe;
package/dist/presets.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{a as NDPRConsent}from'./chunk-OLEUIYE2.mjs';export{a as NDPRSubjectRights}from'./chunk-MTSZ7GL6.mjs';export{a as NDPRPrivacyPolicy}from'./chunk-GEP52QFH.mjs';import'./chunk-TDHH7GS2.mjs';import {a as a$7}from'./chunk-ZIZL37BG.mjs';import {a}from'./chunk-TN4TH3CT.mjs';import {a as a$2}from'./chunk-67KA345Q.mjs';import {a as a$4}from'./chunk-ZHX62QAL.mjs';import {a as a$5}from'./chunk-CAFCRCTZ.mjs';import'./chunk-CWY2FMIC.mjs';import'./chunk-KE2FZH2V.mjs';import'./chunk-IVSNHT24.mjs';import {a as a$6}from'./chunk-7RBO42IW.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';import'./chunk-WYH3OA5L.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-IPWX5I5P.mjs';import'./chunk-EWVK45Z3.mjs';import'./chunk-25TNTLHJ.mjs';import'./chunk-RBMLGRDN.mjs';import {a as a$1}from'./chunk-6OWCUDTN.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import {d,b,a as a$3,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:r,classNames:u,unstyled:p,onSubmit:o=()=>{}})=>jsx(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]=useState({}),[m,P]=useState(0),h=(a,C)=>{d(S=>b(a$3({},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 jsx(a$1,{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]=useState(()=>{if(r){let e=r.load();if(e&&!(e instanceof Promise))return e}return c});useEffect(()=>{if(!r)return;let e=false;return d(null,null,function*(){try{let t=yield r.load();!e&&t&&n(t);}catch(t){}}),()=>{e=true;}},[r]);let d$1=e=>{r&&r.save(e);};return jsx(a$2,{activities:o,onAddActivity:e=>{let t=Date.now(),s=b(a$3({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),a=[...o,s];n(a),d$1(a);},onUpdateActivity:(e,t)=>{let s=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(s),d$1(s);},onArchiveActivity:e=>{let t=o.map(s=>s.id===e?b(a$3({},s),{status:"inactive",updatedAt:Date.now()}):s);n(t),d$1(t);},classNames:u,unstyled:p})};var z=({initialTransfers:c=[],adapter:r,classNames:u,unstyled:p})=>{let[o,n]=useState(()=>{if(r){let e=r.load();if(e&&!(e instanceof Promise))return e}return c});useEffect(()=>{if(!r)return;let e=false;return d(null,null,function*(){try{let t=yield r.load();!e&&t&&n(t);}catch(t){}}),()=>{e=true;}},[r]);let d$1=e=>{r&&r.save(e);};return jsx(a$4,{transfers:o,onAddTransfer:e=>{let t=Date.now(),s=b(a$3({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),a=[...o,s];n(a),d$1(a);},onUpdateTransfer:(e,t)=>{let s=o.map(a=>a.id===e?b(a$3(a$3({},a),t),{updatedAt:Date.now()}):a);n(s),d$1(s);},onRemoveTransfer:e=>{let t=o.filter(s=>s.id!==e);n(t),d$1(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]=useState(c!=null?c:$);useEffect(()=>{if(!r)return;let e=false;return d(null,null,function*(){let s=yield r.load();!e&&s&&n(s);}),()=>{e=true;}},[r]);let d$1=e=>{r&&r.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 s=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(s),d$1(s);},onArchiveRecord:e=>{let t=b(a$3({},o),{records:o.records.map(s=>s.id===e?b(a$3({},s),{status:"archived",updatedAt:Date.now()}):s),lastUpdated:Date.now()});n(t),d$1(t);},classNames:u,unstyled:p})};var J=u=>{var p=u,{input:c$1}=p,r=c(p,["input"]);let o=a$6(c$1);return jsx(a$7,a$3({report:o},r))};export{I as NDPRBreachReport,J as NDPRComplianceDashboard,z as NDPRCrossBorder,_ as NDPRDPIA,M as NDPRLawfulBasis,G as NDPRROPA};
2
+ export{a as NDPRConsent}from'./chunk-6A6VI7ZP.mjs';export{a as NDPRSubjectRights}from'./chunk-WVHMY2BV.mjs';export{a as NDPRPrivacyPolicy}from'./chunk-B2EXRSYG.mjs';import'./chunk-ELK6VFKC.mjs';import {a as a$7}from'./chunk-ZIZL37BG.mjs';import {a}from'./chunk-DK7P5JEG.mjs';import {a as a$2}from'./chunk-RBKFNCGO.mjs';import {a as a$4}from'./chunk-42JPSNVV.mjs';import {a as a$5}from'./chunk-Z2M5VJX2.mjs';import'./chunk-CWY2FMIC.mjs';import'./chunk-KE2FZH2V.mjs';import'./chunk-IVSNHT24.mjs';import {a as a$6}from'./chunk-7RBO42IW.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';import'./chunk-I2ZBMR7F.mjs';import'./chunk-YTU4FNM2.mjs';import'./chunk-L3FR4PQE.mjs';import'./chunk-EWVK45Z3.mjs';import {a as a$1}from'./chunk-ZQHGIOYP.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-DBZSN4WP.mjs';import {d,b,a as a$3,c}from'./chunk-ZJYULEER.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var W=[{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"}],Y=({categories:c=W,adapter:s,classNames:R,unstyled:h,onSubmit:a$1=()=>{},copy:r,description:l,submitTo:o,submitOptions:i,onSubmitError:m,onSubmitSuccess:v})=>{var t;let f=n=>d(null,null,function*(){var p,N;if(o){let w=typeof(i==null?void 0:i.headers)=="function"?i.headers():(p=i==null?void 0:i.headers)!=null?p:{};try{let A=yield fetch(o,{method:"POST",headers:a$3({"Content-Type":"application/json"},w),credentials:(N=i==null?void 0:i.credentials)!=null?N:"same-origin",body:JSON.stringify(n)});if(!A.ok)m==null||m({response:A});else if(v){let P;try{let D=yield A.clone().text();D&&(P=JSON.parse(D));}catch(D){}v({response:A,data:n,body:P});}}catch(A){m==null||m({error:A});}}else s&&s.save(n);a$1(n);}),e=(t=r==null?void 0:r.description)!=null?t:l;return jsx(a,{categories:c,onSubmit:f,classNames:R,unstyled:h,title:r==null?void 0:r.title,description:e,submitButtonText:r==null?void 0:r.submitButton})};var J=[{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"}]}]}],Q=({sections:c=J,adapter:s,classNames:R,unstyled:h,onComplete:a=()=>{},copy:r,submitTo:l,submitOptions:o,onSubmitError:i,onSubmitSuccess:m})=>{let[v,f]=useState({}),[e,t]=useState(0),n=(P,D)=>{f(C=>b(a$3({},C),{[P]:D}));},p=P=>d(null,null,function*(){var D,C;if(l){let F=typeof(o==null?void 0:o.headers)=="function"?o.headers():(D=o==null?void 0:o.headers)!=null?D:{};try{let y=yield fetch(l,{method:"POST",headers:a$3({"Content-Type":"application/json"},F),credentials:(C=o==null?void 0:o.credentials)!=null?C:"same-origin",body:JSON.stringify(P)});if(!y.ok)i==null||i({response:y});else if(m){let x;try{let B=yield y.clone().text();B&&(x=JSON.parse(B));}catch(B){}m({response:y,data:P,body:x});}}catch(y){i==null||i({error:y});}}else s&&s.save(P);a(P);}),N=()=>{e<c.length-1?t(P=>P+1):p(v);},w=()=>{e>0&&t(P=>P-1);},A=Math.round((e+1)/c.length*100);return jsx(a$1,{sections:c,answers:v,onAnswerChange:n,currentSectionIndex:e,onNextSection:N,onPrevSection:w,progress:A,classNames:R,unstyled:h,submitButtonText:r==null?void 0:r.submitButton,nextButtonText:r==null?void 0:r.nextButton,prevButtonText:r==null?void 0:r.prevButton})};var H=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let r=c!=null?c:[],[l,o]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return r});useEffect(()=>{if(!s)return;let e=false;return d(null,null,function*(){try{let t=yield s.load();!e&&t&&o(t);}catch(t){}}),()=>{e=true;}},[s]);let i=e=>{s&&s.save(e);};return jsx(a$2,{activities:l,onAddActivity:e=>{let t=Date.now(),n=b(a$3({},e),{id:`activity-${t}`,createdAt:t,updatedAt:t}),p=[...l,n];o(p),i(p);},onUpdateActivity:(e,t)=>{let n=l.map(p=>p.id===e?b(a$3(a$3({},p),t),{updatedAt:Date.now()}):p);o(n),i(n);},onArchiveActivity:e=>{let t=l.map(n=>n.id===e?b(a$3({},n),{status:"inactive",updatedAt:Date.now()}):n);o(t),i(t);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var E=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let r=c!=null?c:[],[l,o]=useState(()=>{if(s){let e=s.load();if(e&&!(e instanceof Promise))return e}return r});useEffect(()=>{if(!s)return;let e=false;return d(null,null,function*(){try{let t=yield s.load();!e&&t&&o(t);}catch(t){}}),()=>{e=true;}},[s]);let i=e=>{s&&s.save(e);};return jsx(a$4,{transfers:l,onAddTransfer:e=>{let t=Date.now(),n=b(a$3({},e),{id:`transfer-${t}`,createdAt:t,updatedAt:t}),p=[...l,n];o(p),i(p);},onUpdateTransfer:(e,t)=>{let n=l.map(p=>p.id===e?b(a$3(a$3({},p),t),{updatedAt:Date.now()}):p);o(n),i(n);},onRemoveTransfer:e=>{let t=l.filter(n=>n.id!==e);o(t),i(t);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var se={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},oe=({initialData:c,adapter:s,classNames:R,unstyled:h,copy:a})=>{let[r,l]=useState(c!=null?c:se);useEffect(()=>{if(!s)return;let f=false;return d(null,null,function*(){let t=yield s.load();!f&&t&&l(t);}),()=>{f=true;}},[s]);let o=f=>{s&&s.save(f);};return jsx(a$5,{ropa:r,onAddRecord:f=>{let e=b(a$3({},r),{records:[...r.records,f],lastUpdated:Date.now()});l(e),o(e);},onUpdateRecord:(f,e)=>{let t=b(a$3({},r),{records:r.records.map(n=>n.id===f?b(a$3(a$3({},n),e),{updatedAt:Date.now()}):n),lastUpdated:Date.now()});l(t),o(t);},onArchiveRecord:f=>{let e=b(a$3({},r),{records:r.records.map(t=>t.id===f?b(a$3({},t),{status:"archived",updatedAt:Date.now()}):t),lastUpdated:Date.now()});l(e),o(e);},classNames:R,unstyled:h,title:a==null?void 0:a.title,description:a==null?void 0:a.description})};var ie=R=>{var h=R,{input:c$1}=h,s=c(h,["input"]);let a=a$6(c$1);return jsx(a$7,a$3({report:a},s))};export{Y as NDPRBreachReport,ie as NDPRComplianceDashboard,E as NDPRCrossBorder,Q as NDPRDPIA,H as NDPRLawfulBasis,oe as NDPRROPA};
package/dist/ropa-lite.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var _={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},w=["consent","contract","legal_obligation","vital_interests","public_interest","legitimate_interests"],P={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--warning",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},L={active:"Active",inactive:"Inactive",archived:"Archived"};function D(s){return s?new Date(s).toLocaleDateString():"N/A"}function O(s){return !!s.nextReviewDate&&s.nextReviewDate<=Date.now()}var S=({records:s,title:x="Record of Processing Activities (ROPA)",description:R="Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",className:y="",classNames:t,unstyled:n,showSummary:h=true,showComplianceGaps:A=true,onRecordClick:l})=>{let u=react.useMemo(()=>({id:"lite",organizationName:"",organizationContact:"",organizationAddress:"",records:s,lastUpdated:0,version:"0"}),[s]),d=react.useMemo(()=>chunk4CVBQC66_js.b(u),[u]),m=react.useMemo(()=>chunk4CVBQC66_js.d(u),[u]);return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${y}`,t==null?void 0:t.root,n),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",t==null?void 0:t.header,n),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",t==null?void 0:t.title,n),children:x}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:R})]}),h&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("mb-6",t==null?void 0:t.summary,n),children:[jsxRuntime.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[["p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center","ndpr-text-info","Total Records",d.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",d.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",d.crossBorderRecords,false],["p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center","ndpr-text-warning","Records with Gaps",m.length,true]].map(([a,o,p,c,g])=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(a,t==null?void 0:t.summaryCard,n),children:[jsxRuntime.jsx("p",{className:g?chunkAME4HJR4_js.a(`ndpr-stat__value ${o}`,t==null?void 0:t.complianceScore,n):`ndpr-stat__value ${o}`,children:c}),jsxRuntime.jsx("p",{className:`text-xs ${o}`,children:p})]},p))}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"By Lawful Basis"}),w.map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:_[a]}),jsxRuntime.jsx("span",{className:"font-medium",children:d.byLawfulBasis[a]||0})]},a))]}),jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",d.sensitiveDataRecords,false],["DPIA Required",d.dpiaRequiredRecords,false],["Automated Decisions",d.automatedDecisionRecords,false],["Due for Review",d.recordsDueForReview.length,d.recordsDueForReview.length>0]].map(([a,o,p])=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:a}),jsxRuntime.jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:o})]},a))]}),d.topDepartments.length>0&&jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),d.topDepartments.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:a.department}),jsxRuntime.jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]})]}),A&&m.length>0&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md mb-6",t==null?void 0:t.gapAlert,n),role:"status","aria-live":"polite",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium ndpr-text-destructive mb-2",children:"Compliance Gaps Detected"}),m.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"mb-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:a.recordName}),jsxRuntime.jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((o,p)=>jsxRuntime.jsx("li",{className:"text-xs ndpr-text-destructive",children:o},p))})]},a.recordId)),m.length>5&&jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["...and ",m.length-5," more record(s) with gaps."]})]}),s.length===0?jsxRuntime.jsx("p",{className:"ndpr-empty-state",children:"No processing records found."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:chunkAME4HJR4_js.a("w-full text-sm text-left",t==null?void 0:t.table,n),children:[jsxRuntime.jsx("thead",{className:chunkAME4HJR4_js.a("ndpr-table__head",t==null?void 0:t.tableHeader,n),children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Name"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Data Categories"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Retention"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Last Reviewed"})]})}),jsxRuntime.jsx("tbody",{children:s.map(a=>{let o=O(a),p=m.some(g=>g.recordId===a.id),c=!!l;return jsxRuntime.jsxs("tr",{onClick:c?()=>l==null?void 0:l(a):void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),l==null||l(a));}:void 0,className:chunkAME4HJR4_js.a(`border-b dark:border-gray-600 ${o?"bg-red-50 dark:bg-red-900/10":p?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,t==null?void 0:t.tableRow,n),children:[jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium",children:a.name}),a.department&&jsxRuntime.jsx("p",{className:"ndpr-form-field__hint",children:a.department}),o&&jsxRuntime.jsx("span",{className:"text-xs ndpr-text-destructive font-medium",children:"Review Overdue"})]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("span",{className:"ndpr-badge ndpr-badge--info",children:_[a.lawfulBasis]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:a.dataCategories.join(", ")})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:a.retentionPeriod||"N/A"}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${P[a.status]}`,t==null?void 0:t.statusBadge,n),children:L[a.status]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:D(a.lastReviewedAt)})]},a.id)})})]})})]})};Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});exports.ROPAManagerLite=S;
2
+ 'use strict';var chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),chunkYDKWD6MQ_js=require('./chunk-YDKWD6MQ.js');require('./chunk-TTMGFC6C.js'),require('./chunk-RFPLZDIO.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var w={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},B=["consent","contract","legal_obligation","vital_interests","public_interest","legitimate_interests"],k={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--warning",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},N={active:"Active",inactive:"Inactive",archived:"Archived"};function C(o){return o?new Date(o).toLocaleDateString():"N/A"}function G(o){return !!o.nextReviewDate&&o.nextReviewDate<=Date.now()}var I=({records:o,title:b,description:v,className:P="",classNames:t,unstyled:i,showSummary:L=true,showComplianceGaps:D=true,onRecordClick:l})=>{var y,h;let R=chunkYDKWD6MQ_js.c(),O=(y=b!=null?b:R.ropa.title)!=null?y:"Record of Processing Activities (ROPA)",S=(h=v!=null?v:R.ropa.description)!=null?h:"Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",u=react.useMemo(()=>({id:"lite",organizationName:"",organizationContact:"",organizationAddress:"",records:o,lastUpdated:0,version:"0"}),[o]),d=react.useMemo(()=>chunk4CVBQC66_js.b(u),[u]),g=react.useMemo(()=>chunk4CVBQC66_js.d(u),[u]);return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${P}`,t==null?void 0:t.root,i),children:[jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("",t==null?void 0:t.header,i),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-section-heading",t==null?void 0:t.title,i),children:O}),jsxRuntime.jsx("p",{className:"ndpr-card__subtitle",children:S})]}),L&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("mb-6",t==null?void 0:t.summary,i),children:[jsxRuntime.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[["p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center","ndpr-text-info","Total Records",d.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",d.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",d.crossBorderRecords,false],["p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center","ndpr-text-warning","Records with Gaps",g.length,true]].map(([a,s,p,c,m])=>jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a(a,t==null?void 0:t.summaryCard,i),children:[jsxRuntime.jsx("p",{className:m?chunkAME4HJR4_js.a(`ndpr-stat__value ${s}`,t==null?void 0:t.complianceScore,i):`ndpr-stat__value ${s}`,children:c}),jsxRuntime.jsx("p",{className:`text-xs ${s}`,children:p})]},p))}),jsxRuntime.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"By Lawful Basis"}),B.map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:w[a]}),jsxRuntime.jsx("span",{className:"font-medium",children:d.byLawfulBasis[a]||0})]},a))]}),jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",d.sensitiveDataRecords,false],["DPIA Required",d.dpiaRequiredRecords,false],["Automated Decisions",d.automatedDecisionRecords,false],["Due for Review",d.recordsDueForReview.length,d.recordsDueForReview.length>0]].map(([a,s,p])=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:a}),jsxRuntime.jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:s})]},a))]}),d.topDepartments.length>0&&jsxRuntime.jsxs("div",{className:"ndpr-panel",children:[jsxRuntime.jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),d.topDepartments.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsxRuntime.jsx("span",{className:"ndpr-card__subtitle",children:a.department}),jsxRuntime.jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]})]}),D&&g.length>0&&jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md mb-6",t==null?void 0:t.gapAlert,i),role:"status","aria-live":"polite",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium ndpr-text-destructive mb-2",children:"Compliance Gaps Detected"}),g.slice(0,5).map(a=>jsxRuntime.jsxs("div",{className:"mb-2",children:[jsxRuntime.jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:a.recordName}),jsxRuntime.jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((s,p)=>jsxRuntime.jsx("li",{className:"text-xs ndpr-text-destructive",children:s},p))})]},a.recordId)),g.length>5&&jsxRuntime.jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["...and ",g.length-5," more record(s) with gaps."]})]}),o.length===0?jsxRuntime.jsx("p",{className:"ndpr-empty-state",children:"No processing records found."}):jsxRuntime.jsx("div",{className:"overflow-x-auto",children:jsxRuntime.jsxs("table",{className:chunkAME4HJR4_js.a("w-full text-sm text-left",t==null?void 0:t.table,i),children:[jsxRuntime.jsx("thead",{className:chunkAME4HJR4_js.a("ndpr-table__head",t==null?void 0:t.tableHeader,i),children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Name"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Data Categories"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Retention"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsxRuntime.jsx("th",{className:"ndpr-table__cell",children:"Last Reviewed"})]})}),jsxRuntime.jsx("tbody",{children:o.map(a=>{let s=G(a),p=g.some(m=>m.recordId===a.id),c=!!l;return jsxRuntime.jsxs("tr",{onClick:c?()=>l==null?void 0:l(a):void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),l==null||l(a));}:void 0,className:chunkAME4HJR4_js.a(`border-b dark:border-gray-600 ${s?"bg-red-50 dark:bg-red-900/10":p?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,t==null?void 0:t.tableRow,i),children:[jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"font-medium",children:a.name}),a.department&&jsxRuntime.jsx("p",{className:"ndpr-form-field__hint",children:a.department}),s&&jsxRuntime.jsx("span",{className:"text-xs ndpr-text-destructive font-medium",children:"Review Overdue"})]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("span",{className:"ndpr-badge ndpr-badge--info",children:w[a.lawfulBasis]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:a.dataCategories.join(", ")})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:a.retentionPeriod||"N/A"}),jsxRuntime.jsx("td",{className:"ndpr-table__cell",children:jsxRuntime.jsx("span",{className:chunkAME4HJR4_js.a(`px-2 py-1 rounded text-xs font-medium ${k[a.status]}`,t==null?void 0:t.statusBadge,i),children:N[a.status]})}),jsxRuntime.jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:C(a.lastReviewedAt)})]},a.id)})})]})})]})};Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});exports.ROPAManagerLite=I;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {b,d}from'./chunk-XP5PL6K7.mjs';export{b as generateROPASummary,d as identifyComplianceGaps}from'./chunk-XP5PL6K7.mjs';import {a}from'./chunk-SFGW37LE.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var _={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},w=["consent","contract","legal_obligation","vital_interests","public_interest","legitimate_interests"],P={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--warning",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},L={active:"Active",inactive:"Inactive",archived:"Archived"};function D(s){return s?new Date(s).toLocaleDateString():"N/A"}function O(s){return !!s.nextReviewDate&&s.nextReviewDate<=Date.now()}var S=({records:s,title:x="Record of Processing Activities (ROPA)",description:R="Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",className:y="",classNames:t,unstyled:n,showSummary:h=true,showComplianceGaps:A=true,onRecordClick:l})=>{let u=useMemo(()=>({id:"lite",organizationName:"",organizationContact:"",organizationAddress:"",records:s,lastUpdated:0,version:"0"}),[s]),d$1=useMemo(()=>b(u),[u]),m=useMemo(()=>d(u),[u]);return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${y}`,t==null?void 0:t.root,n),children:[jsxs("div",{className:a("",t==null?void 0:t.header,n),children:[jsx("h2",{className:a("ndpr-section-heading",t==null?void 0:t.title,n),children:x}),jsx("p",{className:"ndpr-card__subtitle",children:R})]}),h&&jsxs("div",{className:a("mb-6",t==null?void 0:t.summary,n),children:[jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[["p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center","ndpr-text-info","Total Records",d$1.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",d$1.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",d$1.crossBorderRecords,false],["p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center","ndpr-text-warning","Records with Gaps",m.length,true]].map(([a$1,o,p,c,g])=>jsxs("div",{className:a(a$1,t==null?void 0:t.summaryCard,n),children:[jsx("p",{className:g?a(`ndpr-stat__value ${o}`,t==null?void 0:t.complianceScore,n):`ndpr-stat__value ${o}`,children:c}),jsx("p",{className:`text-xs ${o}`,children:p})]},p))}),jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"By Lawful Basis"}),w.map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:_[a]}),jsx("span",{className:"font-medium",children:d$1.byLawfulBasis[a]||0})]},a))]}),jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",d$1.sensitiveDataRecords,false],["DPIA Required",d$1.dpiaRequiredRecords,false],["Automated Decisions",d$1.automatedDecisionRecords,false],["Due for Review",d$1.recordsDueForReview.length,d$1.recordsDueForReview.length>0]].map(([a,o,p])=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:a}),jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:o})]},a))]}),d$1.topDepartments.length>0&&jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),d$1.topDepartments.slice(0,5).map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:a.department}),jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]})]}),A&&m.length>0&&jsxs("div",{className:a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md mb-6",t==null?void 0:t.gapAlert,n),role:"status","aria-live":"polite",children:[jsx("p",{className:"text-sm font-medium ndpr-text-destructive mb-2",children:"Compliance Gaps Detected"}),m.slice(0,5).map(a=>jsxs("div",{className:"mb-2",children:[jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:a.recordName}),jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((o,p)=>jsx("li",{className:"text-xs ndpr-text-destructive",children:o},p))})]},a.recordId)),m.length>5&&jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["...and ",m.length-5," more record(s) with gaps."]})]}),s.length===0?jsx("p",{className:"ndpr-empty-state",children:"No processing records found."}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:a("w-full text-sm text-left",t==null?void 0:t.table,n),children:[jsx("thead",{className:a("ndpr-table__head",t==null?void 0:t.tableHeader,n),children:jsxs("tr",{children:[jsx("th",{className:"ndpr-table__cell",children:"Name"}),jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsx("th",{className:"ndpr-table__cell",children:"Data Categories"}),jsx("th",{className:"ndpr-table__cell",children:"Retention"}),jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsx("th",{className:"ndpr-table__cell",children:"Last Reviewed"})]})}),jsx("tbody",{children:s.map(a$1=>{let o=O(a$1),p=m.some(g=>g.recordId===a$1.id),c=!!l;return jsxs("tr",{onClick:c?()=>l==null?void 0:l(a$1):void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),l==null||l(a$1));}:void 0,className:a(`border-b dark:border-gray-600 ${o?"bg-red-50 dark:bg-red-900/10":p?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,t==null?void 0:t.tableRow,n),children:[jsx("td",{className:"ndpr-table__cell",children:jsxs("div",{children:[jsx("p",{className:"font-medium",children:a$1.name}),a$1.department&&jsx("p",{className:"ndpr-form-field__hint",children:a$1.department}),o&&jsx("span",{className:"text-xs ndpr-text-destructive font-medium",children:"Review Overdue"})]})}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:"ndpr-badge ndpr-badge--info",children:_[a$1.lawfulBasis]})}),jsx("td",{className:"ndpr-table__cell",children:jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:a$1.dataCategories.join(", ")})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:a$1.retentionPeriod||"N/A"}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${P[a$1.status]}`,t==null?void 0:t.statusBadge,n),children:L[a$1.status]})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:D(a$1.lastReviewedAt)})]},a$1.id)})})]})})]})};export{S as ROPAManagerLite};
2
+ import {b,d}from'./chunk-XP5PL6K7.mjs';export{b as generateROPASummary,d as identifyComplianceGaps}from'./chunk-XP5PL6K7.mjs';import {a}from'./chunk-SFGW37LE.mjs';import {c}from'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var w={consent:"Consent",contract:"Contract",legal_obligation:"Legal Obligation",vital_interests:"Vital Interests",public_interest:"Public Interest",legitimate_interests:"Legitimate Interests"},B=["consent","contract","legal_obligation","vital_interests","public_interest","legitimate_interests"],k={active:"ndpr-badge ndpr-badge--success",inactive:"ndpr-badge ndpr-badge--warning",archived:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"},N={active:"Active",inactive:"Inactive",archived:"Archived"};function C(o){return o?new Date(o).toLocaleDateString():"N/A"}function G(o){return !!o.nextReviewDate&&o.nextReviewDate<=Date.now()}var I=({records:o,title:b$1,description:v,className:P="",classNames:t,unstyled:i,showSummary:L=true,showComplianceGaps:D=true,onRecordClick:l})=>{var y,h;let R=c(),O=(y=b$1!=null?b$1:R.ropa.title)!=null?y:"Record of Processing Activities (ROPA)",S=(h=v!=null?v:R.ropa.description)!=null?h:"Maintain a comprehensive record of all data processing activities as required by the NDPA accountability principle.",u=useMemo(()=>({id:"lite",organizationName:"",organizationContact:"",organizationAddress:"",records:o,lastUpdated:0,version:"0"}),[o]),d$1=useMemo(()=>b(u),[u]),g=useMemo(()=>d(u),[u]);return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${P}`,t==null?void 0:t.root,i),children:[jsxs("div",{className:a("",t==null?void 0:t.header,i),children:[jsx("h2",{className:a("ndpr-section-heading",t==null?void 0:t.title,i),children:O}),jsx("p",{className:"ndpr-card__subtitle",children:S})]}),L&&jsxs("div",{className:a("mb-6",t==null?void 0:t.summary,i),children:[jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-4",children:[["p-4 bg-blue-50 dark:bg-blue-900/20 rounded-md text-center","ndpr-text-info","Total Records",d$1.totalRecords,false],["p-4 bg-green-50 dark:bg-green-900/20 rounded-md text-center","ndpr-text-success","Active",d$1.activeRecords,false],["p-4 bg-purple-50 dark:bg-purple-900/20 rounded-md text-center","ndpr-text-info","Cross-Border",d$1.crossBorderRecords,false],["p-4 bg-orange-50 dark:bg-orange-900/20 rounded-md text-center","ndpr-text-warning","Records with Gaps",g.length,true]].map(([a$1,s,p,c,m])=>jsxs("div",{className:a(a$1,t==null?void 0:t.summaryCard,i),children:[jsx("p",{className:m?a(`ndpr-stat__value ${s}`,t==null?void 0:t.complianceScore,i):`ndpr-stat__value ${s}`,children:c}),jsx("p",{className:`text-xs ${s}`,children:p})]},p))}),jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-4",children:[jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"By Lawful Basis"}),B.map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:w[a]}),jsx("span",{className:"font-medium",children:d$1.byLawfulBasis[a]||0})]},a))]}),jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Risk Indicators"}),[["Sensitive Data",d$1.sensitiveDataRecords,false],["DPIA Required",d$1.dpiaRequiredRecords,false],["Automated Decisions",d$1.automatedDecisionRecords,false],["Due for Review",d$1.recordsDueForReview.length,d$1.recordsDueForReview.length>0]].map(([a,s,p])=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:a}),jsx("span",{className:`font-medium ${p?"ndpr-text-destructive":""}`,children:s})]},a))]}),d$1.topDepartments.length>0&&jsxs("div",{className:"ndpr-panel",children:[jsx("p",{className:"ndpr-form-field__label",children:"Top Departments"}),d$1.topDepartments.slice(0,5).map(a=>jsxs("div",{className:"flex justify-between text-xs mb-1",children:[jsx("span",{className:"ndpr-card__subtitle",children:a.department}),jsx("span",{className:"font-medium",children:a.count})]},a.department))]})]})]}),D&&g.length>0&&jsxs("div",{className:a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md mb-6",t==null?void 0:t.gapAlert,i),role:"status","aria-live":"polite",children:[jsx("p",{className:"text-sm font-medium ndpr-text-destructive mb-2",children:"Compliance Gaps Detected"}),g.slice(0,5).map(a=>jsxs("div",{className:"mb-2",children:[jsx("p",{className:"text-xs font-medium ndpr-text-destructive",children:a.recordName}),jsx("ul",{className:"list-disc list-inside",children:a.gaps.map((s,p)=>jsx("li",{className:"text-xs ndpr-text-destructive",children:s},p))})]},a.recordId)),g.length>5&&jsxs("p",{className:"text-xs ndpr-text-destructive mt-1",children:["...and ",g.length-5," more record(s) with gaps."]})]}),o.length===0?jsx("p",{className:"ndpr-empty-state",children:"No processing records found."}):jsx("div",{className:"overflow-x-auto",children:jsxs("table",{className:a("w-full text-sm text-left",t==null?void 0:t.table,i),children:[jsx("thead",{className:a("ndpr-table__head",t==null?void 0:t.tableHeader,i),children:jsxs("tr",{children:[jsx("th",{className:"ndpr-table__cell",children:"Name"}),jsx("th",{className:"ndpr-table__cell",children:"Lawful Basis"}),jsx("th",{className:"ndpr-table__cell",children:"Data Categories"}),jsx("th",{className:"ndpr-table__cell",children:"Retention"}),jsx("th",{className:"ndpr-table__cell",children:"Status"}),jsx("th",{className:"ndpr-table__cell",children:"Last Reviewed"})]})}),jsx("tbody",{children:o.map(a$1=>{let s=G(a$1),p=g.some(m=>m.recordId===a$1.id),c=!!l;return jsxs("tr",{onClick:c?()=>l==null?void 0:l(a$1):void 0,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),l==null||l(a$1));}:void 0,className:a(`border-b dark:border-gray-600 ${s?"bg-red-50 dark:bg-red-900/10":p?"bg-yellow-50 dark:bg-yellow-900/10":"bg-white dark:bg-gray-800"} ${c?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,t==null?void 0:t.tableRow,i),children:[jsx("td",{className:"ndpr-table__cell",children:jsxs("div",{children:[jsx("p",{className:"font-medium",children:a$1.name}),a$1.department&&jsx("p",{className:"ndpr-form-field__hint",children:a$1.department}),s&&jsx("span",{className:"text-xs ndpr-text-destructive font-medium",children:"Review Overdue"})]})}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:"ndpr-badge ndpr-badge--info",children:w[a$1.lawfulBasis]})}),jsx("td",{className:"ndpr-table__cell",children:jsx("p",{className:"text-xs ndpr-text-muted max-w-xs truncate",children:a$1.dataCategories.join(", ")})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:a$1.retentionPeriod||"N/A"}),jsx("td",{className:"ndpr-table__cell",children:jsx("span",{className:a(`px-2 py-1 rounded text-xs font-medium ${k[a$1.status]}`,t==null?void 0:t.statusBadge,i),children:N[a$1.status]})}),jsx("td",{className:"ndpr-table__cell ndpr-table__cell--muted",children:C(a$1.lastReviewedAt)})]},a$1.id)})})]})})]})};export{I as ROPAManagerLite};
package/dist/ropa.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkWXUXCRAJ_js=require('./chunk-WXUXCRAJ.js'),chunkO2WEABB3_js=require('./chunk-O2WEABB3.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=chunkO2WEABB3_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:chunkWXUXCRAJ_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkWXUXCRAJ_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkO2WEABB3_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;
2
+ 'use strict';var chunkBL5W472Q_js=require('./chunk-BL5W472Q.js'),chunkO2WEABB3_js=require('./chunk-O2WEABB3.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js');require('./chunk-AME4HJR4.js'),require('./chunk-YDKWD6MQ.js'),require('./chunk-TTMGFC6C.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=chunkO2WEABB3_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:chunkBL5W472Q_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkBL5W472Q_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkO2WEABB3_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,2 +1,2 @@
1
1
  "use client";
2
- import {a}from'./chunk-CAFCRCTZ.mjs';export{a as ROPAManager}from'./chunk-CAFCRCTZ.mjs';import {a as a$1}from'./chunk-WKUC65HL.mjs';export{a as useROPA}from'./chunk-WKUC65HL.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};
2
+ import {a}from'./chunk-Z2M5VJX2.mjs';export{a as ROPAManager}from'./chunk-Z2M5VJX2.mjs';import {a as a$1}from'./chunk-WKUC65HL.mjs';export{a as useROPA}from'./chunk-WKUC65HL.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-FRQFU44F.mjs';import'./chunk-V5TZJJWU.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
@@ -1505,6 +1505,12 @@ export declare interface NDPRLocale {
1505
1505
  deselectAll?: string;
1506
1506
  required?: string;
1507
1507
  cookieNotice?: string;
1508
+ /** ConsentManager component title */
1509
+ managerTitle?: string;
1510
+ /** ConsentManager component description */
1511
+ managerDescription?: string;
1512
+ /** ConsentManager reset button */
1513
+ resetToDefaults?: string;
1508
1514
  };
1509
1515
  dsr?: {
1510
1516
  title?: string;
@@ -1521,6 +1527,14 @@ export declare interface NDPRLocale {
1521
1527
  identifierValue?: string;
1522
1528
  privacyNotice?: string;
1523
1529
  successMessage?: string;
1530
+ /** DSRDashboard component title */
1531
+ dashboardTitle?: string;
1532
+ /** DSRDashboard component description */
1533
+ dashboardDescription?: string;
1534
+ /** DSRTracker component title */
1535
+ trackerTitle?: string;
1536
+ /** DSRTracker component description */
1537
+ trackerDescription?: string;
1524
1538
  };
1525
1539
  breach?: {
1526
1540
  title?: string;
@@ -1530,6 +1544,18 @@ export declare interface NDPRLocale {
1530
1544
  category?: string;
1531
1545
  discoveredAt?: string;
1532
1546
  detailedDescription?: string;
1547
+ /** BreachRiskAssessment component title */
1548
+ riskAssessmentTitle?: string;
1549
+ /** BreachRiskAssessment component description */
1550
+ riskAssessmentDescription?: string;
1551
+ /** BreachNotificationManager component title */
1552
+ notificationManagerTitle?: string;
1553
+ /** BreachNotificationManager component description */
1554
+ notificationManagerDescription?: string;
1555
+ /** RegulatoryReportGenerator component title */
1556
+ regulatoryReportTitle?: string;
1557
+ /** RegulatoryReportGenerator component description */
1558
+ regulatoryReportDescription?: string;
1533
1559
  };
1534
1560
  dpia?: {
1535
1561
  title?: string;
@@ -1537,6 +1563,10 @@ export declare interface NDPRLocale {
1537
1563
  previous?: string;
1538
1564
  complete?: string;
1539
1565
  progress?: string;
1566
+ /** DPIAQuestionnaire submit button (last section) */
1567
+ submit?: string;
1568
+ /** DPIAReport main report title */
1569
+ reportTitle?: string;
1540
1570
  };
1541
1571
  policy?: {
1542
1572
  title?: string;
@@ -1545,6 +1575,38 @@ export declare interface NDPRLocale {
1545
1575
  export?: string;
1546
1576
  sections?: string;
1547
1577
  variables?: string;
1578
+ /** PolicyGenerator component title */
1579
+ generatorTitle?: string;
1580
+ /** PolicyGenerator component description */
1581
+ generatorDescription?: string;
1582
+ /** PolicyPreview component title */
1583
+ previewTitle?: string;
1584
+ /** PolicyPreview component description */
1585
+ previewDescription?: string;
1586
+ /** PolicyExporter component title */
1587
+ exporterTitle?: string;
1588
+ /** PolicyExporter component description */
1589
+ exporterDescription?: string;
1590
+ /** AdaptivePolicyWizard heading */
1591
+ wizardTitle?: string;
1592
+ };
1593
+ lawfulBasis?: {
1594
+ /** LawfulBasisTracker title */
1595
+ title?: string;
1596
+ /** LawfulBasisTracker description */
1597
+ description?: string;
1598
+ };
1599
+ crossBorder?: {
1600
+ /** CrossBorderTransferManager title */
1601
+ title?: string;
1602
+ /** CrossBorderTransferManager description */
1603
+ description?: string;
1604
+ };
1605
+ ropa?: {
1606
+ /** ROPAManager title */
1607
+ title?: string;
1608
+ /** ROPAManager description */
1609
+ description?: string;
1548
1610
  };
1549
1611
  compliance?: {
1550
1612
  score?: string;