@tantainnovative/ndpr-toolkit 3.2.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -1
- package/dist/{DPIAQuestionnaire-BkejviPj.d.mts → DPIAQuestionnaire-VXBoWFMC.d.ts} +3 -3
- package/dist/{DPIAQuestionnaire-DdSqXG3x.d.ts → DPIAQuestionnaire-jkt1Veb6.d.mts} +3 -3
- package/dist/{DSRRequestForm-BY8PogCU.d.mts → DSRRequestForm-D8rPTNmU.d.ts} +2 -2
- package/dist/{DSRRequestForm-CHUg9cZh.d.ts → DSRRequestForm-DRouEr9j.d.mts} +2 -2
- package/dist/{DSRTracker-Dr_aT0pg.d.ts → DSRTracker-Bl__d4df.d.ts} +1 -1
- package/dist/{DSRTracker-C6u_jAaK.d.mts → DSRTracker-CSVDfgQQ.d.mts} +1 -1
- package/dist/{StepIndicator-D9ZATz_O.d.ts → StepIndicator-CgrlokSV.d.ts} +1 -1
- package/dist/{StepIndicator-D-nwRTyo.d.mts → StepIndicator-W8S_QjgO.d.mts} +1 -1
- package/dist/chunk-25OOUES4.js +2 -0
- package/dist/chunk-4JKTIR33.mjs +2 -0
- package/dist/chunk-5BUS6AI7.js +2 -0
- package/dist/chunk-5X32J5IA.mjs +2 -0
- package/dist/chunk-6JCRDJQI.mjs +2 -0
- package/dist/chunk-6YN73KR7.mjs +2 -0
- package/dist/chunk-75TJPK2N.mjs +2 -0
- package/dist/{chunk-NXQMU36Z.mjs → chunk-7D2OIPHH.mjs} +2 -2
- package/dist/chunk-C4YM4UMI.js +2 -0
- package/dist/{chunk-EH2I4L7M.mjs → chunk-CDZDT2OS.mjs} +14 -10
- package/dist/chunk-CSIJCLGZ.mjs +2 -0
- package/dist/chunk-GMLCWGNJ.js +7 -0
- package/dist/chunk-GQVNLUP2.js +94 -0
- package/dist/chunk-GXLSOZCH.mjs +2 -0
- package/dist/chunk-IQJO7WIH.js +7 -0
- package/dist/{chunk-NRQELKAE.js → chunk-JKKRPS4P.js} +2 -2
- package/dist/chunk-LETEUS5X.mjs +2 -0
- package/dist/{chunk-KBP26GLC.js → chunk-M6XETYNL.js} +2 -2
- package/dist/chunk-NBSVFQ5G.js +2 -0
- package/dist/chunk-NUULHXVL.mjs +7 -0
- package/dist/chunk-QDHHD2KR.mjs +94 -0
- package/dist/chunk-TI2M7H6R.mjs +7 -0
- package/dist/chunk-TKVJ3OOV.mjs +2 -0
- package/dist/{chunk-KVOGOLIR.js → chunk-TXXWCB5O.js} +14 -10
- package/dist/{chunk-44W4H2EY.js → chunk-UGY5ZYUG.js} +2 -2
- package/dist/chunk-UO6QPJLH.js +2 -0
- package/dist/chunk-UX6ZZNEM.mjs +3 -0
- package/dist/{chunk-3DJGO6WG.js → chunk-VLSGE2YA.js} +2 -2
- package/dist/chunk-XFUEZ3MP.mjs +2 -0
- package/dist/chunk-XHSHPB74.js +2 -0
- package/dist/chunk-YCX6BFOQ.js +2 -0
- package/dist/chunk-YURSF2YO.mjs +2 -0
- package/dist/chunk-YZXUAIYN.js +3 -0
- package/dist/chunk-ZGJA7OO4.js +2 -0
- package/dist/chunk-ZT7KNFAU.mjs +2 -0
- package/dist/chunk-ZYLDLGFL.js +2 -0
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +21 -9
- package/dist/core.d.ts +21 -9
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.d.mts +68 -1
- package/dist/cross-border.d.ts +68 -1
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/{dpia-B0Pok5us.d.ts → dpia-D82hUrJe.d.ts} +1 -1
- package/dist/{dpia-CUfOmzvX.d.mts → dpia-DQDFw2_l.d.mts} +1 -1
- package/dist/{dpia-5OQVA1R_.d.mts → dpia-c9GiiOq0.d.mts} +2 -2
- package/dist/{dpia-5OQVA1R_.d.ts → dpia-c9GiiOq0.d.ts} +2 -2
- package/dist/dpia.d.mts +9 -9
- package/dist/dpia.d.ts +9 -9
- package/dist/dpia.js +1 -1
- package/dist/dpia.mjs +1 -1
- package/dist/{dsr-D_eTNc4S.d.mts → dsr-CIx5sd7e.d.ts} +2 -2
- package/dist/{dsr-pNtVb1BK.d.ts → dsr-XZ_HqTlA.d.mts} +2 -2
- package/dist/{dsr-Cm9lzWG7.d.mts → dsr-yKbqX531.d.mts} +1 -1
- package/dist/{dsr-Cm9lzWG7.d.ts → dsr-yKbqX531.d.ts} +1 -1
- package/dist/dsr.d.mts +9 -9
- package/dist/dsr.d.ts +9 -9
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +6 -6
- package/dist/hooks.d.ts +6 -6
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/lawful-basis.js +1 -1
- package/dist/lawful-basis.mjs +1 -1
- package/dist/{policy-engine-DSQpT55_.d.ts → policy-engine-C6nC2t3a.d.ts} +1 -1
- package/dist/{policy-engine-C-tShzZH.d.mts → policy-engine-DefZcX3R.d.mts} +1 -1
- package/dist/{policy-sections-CfNVBLCh.d.mts → policy-sections-Bylm31kZ.d.mts} +1 -1
- package/dist/{policy-sections-DqH0iZRf.d.ts → policy-sections-DFDPVCCg.d.ts} +1 -1
- package/dist/policy.d.mts +4 -4
- package/dist/policy.d.ts +4 -4
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets.d.mts +5 -5
- package/dist/presets.d.ts +5 -5
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -1
- package/dist/{sanitize-9mOO_cJW.d.mts → sanitize-B0AzEm1D.d.mts} +14 -1
- package/dist/{sanitize-9mOO_cJW.d.ts → sanitize-B0AzEm1D.d.ts} +14 -1
- package/dist/{useAdaptivePolicyWizard-N4eUM4Tj.d.mts → useAdaptivePolicyWizard-A1PyOy6P.d.mts} +1 -1
- package/dist/{useAdaptivePolicyWizard-B9Op2gYM.d.ts → useAdaptivePolicyWizard-LVIKhAxw.d.ts} +1 -1
- package/dist/{useDPIA-DzWye8JB.d.mts → useDPIA-B6180UQn.d.mts} +9 -5
- package/dist/{useDPIA-Dl16Te3r.d.ts → useDPIA-CTqbNbww.d.ts} +9 -5
- package/dist/{useDSR-C1LksCfP.d.mts → useDSR-WvHk8_iu.d.mts} +2 -2
- package/dist/{useDSR-DZel52O1.d.ts → useDSR-wH4H6hSM.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/chunk-2FWCVWKN.js +0 -2
- package/dist/chunk-3UWT64FI.mjs +0 -2
- package/dist/chunk-4JUDKBA2.mjs +0 -7
- package/dist/chunk-4XCL62MJ.mjs +0 -2
- package/dist/chunk-555WWZ3W.js +0 -2
- package/dist/chunk-CL53OI3I.js +0 -7
- package/dist/chunk-ELKEZEV5.mjs +0 -2
- package/dist/chunk-ER7X6E36.js +0 -2
- package/dist/chunk-FOXZRRMW.mjs +0 -2
- package/dist/chunk-FY5G6DGZ.js +0 -7
- package/dist/chunk-GOD4LA2J.mjs +0 -2
- package/dist/chunk-I23WPZNQ.mjs +0 -94
- package/dist/chunk-IQF726GS.js +0 -2
- package/dist/chunk-IR7VCBWV.mjs +0 -2
- package/dist/chunk-K45S6YQV.mjs +0 -2
- package/dist/chunk-KBAFOVE3.js +0 -2
- package/dist/chunk-MDWG2KDA.mjs +0 -2
- package/dist/chunk-NN233SGA.mjs +0 -3
- package/dist/chunk-NPI5T6NH.mjs +0 -7
- package/dist/chunk-QH6YUVJS.js +0 -2
- package/dist/chunk-QKK5S54L.mjs +0 -2
- package/dist/chunk-QY7PD5XB.js +0 -94
- package/dist/chunk-TVW6KBVV.mjs +0 -2
- package/dist/chunk-UDNRAQLE.js +0 -3
- package/dist/chunk-UNKXYVXY.js +0 -2
- package/dist/chunk-V37BM2LF.js +0 -2
- package/dist/chunk-V3MXWGXU.mjs +0 -2
- package/dist/chunk-VK27WVV3.js +0 -2
- package/dist/chunk-XQ4M5FHC.mjs +0 -2
package/dist/policy.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export { O as OrganizationInfo, P as PolicySection, b as PolicyVariable } from '
|
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import React__default from 'react';
|
|
10
10
|
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
11
|
-
import { P as PolicyDraft, H as HTMLExportOptions,
|
|
12
|
-
export { C as ComplianceGap,
|
|
13
|
-
export { U as UseAdaptivePolicyWizardOptions, a as UseAdaptivePolicyWizardReturn, u as useAdaptivePolicyWizard } from './useAdaptivePolicyWizard-
|
|
14
|
-
export { a as assemblePolicy, e as evaluatePolicyCompliance } from './policy-sections-
|
|
11
|
+
import { P as PolicyDraft, H as HTMLExportOptions, c as PDFExportOptions, D as DOCXExportOptions } from './policy-engine-C6nC2t3a.js';
|
|
12
|
+
export { C as ComplianceGap, b as ComplianceResult, a as CustomSection, g as DEFAULT_DATA_CATEGORIES, d as DataCategory, I as Industry, O as OrgSize, h as ProcessingPurpose, T as TemplateContext, e as ThirdPartyProcessor, f as createDefaultContext } from './policy-engine-C6nC2t3a.js';
|
|
13
|
+
export { U as UseAdaptivePolicyWizardOptions, a as UseAdaptivePolicyWizardReturn, u as useAdaptivePolicyWizard } from './useAdaptivePolicyWizard-LVIKhAxw.js';
|
|
14
|
+
export { a as assemblePolicy, e as evaluatePolicyCompliance } from './policy-sections-DFDPVCCg.js';
|
|
15
15
|
|
|
16
16
|
interface PolicyProviderProps {
|
|
17
17
|
templates: PolicyTemplate[];
|
package/dist/policy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkYZXUAIYN_js=require('./chunk-YZXUAIYN.js'),chunkGQVNLUP2_js=require('./chunk-GQVNLUP2.js'),chunkTXXWCB5O_js=require('./chunk-TXXWCB5O.js'),chunkE63VPR7U_js=require('./chunk-E63VPR7U.js'),chunkLU4PFST7_js=require('./chunk-LU4PFST7.js'),chunkUXMGBIX6_js=require('./chunk-UXMGBIX6.js');require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var a=react.createContext(null);function z(){let o=react.useContext(a);if(!o)throw new Error("Policy compound components must be wrapped in <Policy.Provider>. Example: <Policy.Provider templates={...}><Policy.Generator /></Policy.Provider>");return o}var i=({templates:o,adapter:p,storageKey:c,useLocalStorage:m,initialPolicy:s,onGenerate:d,children:x})=>{let f=chunkE63VPR7U_js.a({templates:o,adapter:p,storageKey:c,useLocalStorage:m,initialPolicy:s,onGenerate:d}),v=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},f),{templates:o});return jsxRuntime.jsx(a.Provider,{value:v,children:x})};var F={Provider:i,Generator:chunkGQVNLUP2_js.a,Preview:chunkGQVNLUP2_js.b,Exporter:chunkGQVNLUP2_js.c};var N=({policy:o,className:p})=>{let c=chunkTXXWCB5O_js.a(o,{includeStyles:true,includePrintCSS:true});return jsxRuntime.jsx("div",{"data-ndpr-component":"policy-page",className:p,dangerouslySetInnerHTML:{__html:c}})};Object.defineProperty(exports,"AdaptivePolicyWizard",{enumerable:true,get:function(){return chunkYZXUAIYN_js.a}});Object.defineProperty(exports,"PolicyExporter",{enumerable:true,get:function(){return chunkGQVNLUP2_js.c}});Object.defineProperty(exports,"PolicyGenerator",{enumerable:true,get:function(){return chunkGQVNLUP2_js.a}});Object.defineProperty(exports,"PolicyPreview",{enumerable:true,get:function(){return chunkGQVNLUP2_js.b}});Object.defineProperty(exports,"exportDOCX",{enumerable:true,get:function(){return chunkTXXWCB5O_js.d}});Object.defineProperty(exports,"exportHTML",{enumerable:true,get:function(){return chunkTXXWCB5O_js.a}});Object.defineProperty(exports,"exportMarkdown",{enumerable:true,get:function(){return chunkTXXWCB5O_js.b}});Object.defineProperty(exports,"exportPDF",{enumerable:true,get:function(){return chunkTXXWCB5O_js.c}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkTXXWCB5O_js.e}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkE63VPR7U_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkE63VPR7U_js.a}});Object.defineProperty(exports,"DEFAULT_DATA_CATEGORIES",{enumerable:true,get:function(){return chunkLU4PFST7_js.a}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunkLU4PFST7_js.d}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunkLU4PFST7_js.b}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunkLU4PFST7_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkUXMGBIX6_js.b}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkUXMGBIX6_js.c}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkUXMGBIX6_js.d}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkUXMGBIX6_js.a}});exports.Policy=F;exports.PolicyPage=N;exports.PolicyProvider=i;exports.usePolicyCompound=z;//# sourceMappingURL=policy.js.map
|
|
2
2
|
//# sourceMappingURL=policy.js.map
|
package/dist/policy.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as AdaptivePolicyWizard}from'./chunk-
|
|
1
|
+
export{a as AdaptivePolicyWizard}from'./chunk-UX6ZZNEM.mjs';import {c,b,a as a$1}from'./chunk-QDHHD2KR.mjs';export{c as PolicyExporter,a as PolicyGenerator,b as PolicyPreview}from'./chunk-QDHHD2KR.mjs';import {a as a$4}from'./chunk-CDZDT2OS.mjs';export{d as exportDOCX,a as exportHTML,b as exportMarkdown,c as exportPDF,e as useAdaptivePolicyWizard}from'./chunk-CDZDT2OS.mjs';import {a as a$2}from'./chunk-FDDI426Y.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-FDDI426Y.mjs';export{a as DEFAULT_DATA_CATEGORIES,d as assemblePolicy,b as createDefaultContext,c as evaluatePolicyCompliance}from'./chunk-GCQRHMTQ.mjs';export{b as DEFAULT_POLICY_SECTIONS,c as DEFAULT_POLICY_VARIABLES,d as createBusinessPolicyTemplate,a as generatePolicyText}from'./chunk-ZEOQYWOE.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {b as b$1,a as a$3}from'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var a=createContext(null);function z(){let o=useContext(a);if(!o)throw new Error("Policy compound components must be wrapped in <Policy.Provider>. Example: <Policy.Provider templates={...}><Policy.Generator /></Policy.Provider>");return o}var i=({templates:o,adapter:p,storageKey:c,useLocalStorage:m,initialPolicy:s,onGenerate:d,children:x})=>{let f=a$2({templates:o,adapter:p,storageKey:c,useLocalStorage:m,initialPolicy:s,onGenerate:d}),v=b$1(a$3({},f),{templates:o});return jsx(a.Provider,{value:v,children:x})};var F={Provider:i,Generator:a$1,Preview:b,Exporter:c};var N=({policy:o,className:p})=>{let c=a$4(o,{includeStyles:true,includePrintCSS:true});return jsx("div",{"data-ndpr-component":"policy-page",className:p,dangerouslySetInnerHTML:{__html:c}})};export{F as Policy,N as PolicyPage,i as PolicyProvider,z as usePolicyCompound};//# sourceMappingURL=policy.mjs.map
|
|
2
2
|
//# sourceMappingURL=policy.mjs.map
|
package/dist/presets.d.mts
CHANGED
|
@@ -2,14 +2,14 @@ import React__default from 'react';
|
|
|
2
2
|
import { b as ConsentBannerClassNames } from './ConsentBanner-CDRT0o2k.mjs';
|
|
3
3
|
import { C as ConsentOption, a as ConsentSettings } from './consent-CmVzqZUk.mjs';
|
|
4
4
|
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
5
|
-
import { D as DSRFormSubmission, b as DSRRequestFormClassNames } from './DSRRequestForm-
|
|
6
|
-
import { c as RequestType } from './dsr-
|
|
5
|
+
import { D as DSRFormSubmission, b as DSRRequestFormClassNames } from './DSRRequestForm-DRouEr9j.mjs';
|
|
6
|
+
import { c as RequestType } from './dsr-yKbqX531.mjs';
|
|
7
7
|
import { B as BreachFormSubmission, b as BreachReportFormClassNames } from './BreachReportForm-yJ2Zl6gz.mjs';
|
|
8
8
|
import { B as BreachCategory } from './breach-Eu9byel8.mjs';
|
|
9
9
|
import { c as PrivacyPolicy } from './privacy-Ca6te9Ir.mjs';
|
|
10
|
-
import { P as PolicyDraft } from './policy-engine-
|
|
11
|
-
import { a as DPIAQuestionnaireClassNames } from './DPIAQuestionnaire-
|
|
12
|
-
import { c as DPIASection } from './dpia-
|
|
10
|
+
import { P as PolicyDraft } from './policy-engine-DefZcX3R.mjs';
|
|
11
|
+
import { a as DPIAQuestionnaireClassNames } from './DPIAQuestionnaire-jkt1Veb6.mjs';
|
|
12
|
+
import { c as DPIASection } from './dpia-c9GiiOq0.mjs';
|
|
13
13
|
import { a as LawfulBasisTrackerClassNames } from './LawfulBasisTracker-CBqOxX1D.mjs';
|
|
14
14
|
import { P as ProcessingActivity } from './lawful-basis-Cv1VmDLn.mjs';
|
|
15
15
|
import { a as CrossBorderTransferManagerClassNames } from './CrossBorderTransferManager-DkZhv9vD.mjs';
|
package/dist/presets.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import React__default from 'react';
|
|
|
2
2
|
import { b as ConsentBannerClassNames } from './ConsentBanner-Vxyt8SCX.js';
|
|
3
3
|
import { C as ConsentOption, a as ConsentSettings } from './consent-CmVzqZUk.js';
|
|
4
4
|
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
5
|
-
import { D as DSRFormSubmission, b as DSRRequestFormClassNames } from './DSRRequestForm-
|
|
6
|
-
import { c as RequestType } from './dsr-
|
|
5
|
+
import { D as DSRFormSubmission, b as DSRRequestFormClassNames } from './DSRRequestForm-D8rPTNmU.js';
|
|
6
|
+
import { c as RequestType } from './dsr-yKbqX531.js';
|
|
7
7
|
import { B as BreachFormSubmission, b as BreachReportFormClassNames } from './BreachReportForm-DpRrBoxU.js';
|
|
8
8
|
import { B as BreachCategory } from './breach-Eu9byel8.js';
|
|
9
9
|
import { c as PrivacyPolicy } from './privacy-Ca6te9Ir.js';
|
|
10
|
-
import { P as PolicyDraft } from './policy-engine-
|
|
11
|
-
import { a as DPIAQuestionnaireClassNames } from './DPIAQuestionnaire-
|
|
12
|
-
import { c as DPIASection } from './dpia-
|
|
10
|
+
import { P as PolicyDraft } from './policy-engine-C6nC2t3a.js';
|
|
11
|
+
import { a as DPIAQuestionnaireClassNames } from './DPIAQuestionnaire-VXBoWFMC.js';
|
|
12
|
+
import { c as DPIASection } from './dpia-c9GiiOq0.js';
|
|
13
13
|
import { a as LawfulBasisTrackerClassNames } from './LawfulBasisTracker-Cg30NbDA.js';
|
|
14
14
|
import { P as ProcessingActivity } from './lawful-basis-Cv1VmDLn.js';
|
|
15
15
|
import { a as CrossBorderTransferManagerClassNames } from './CrossBorderTransferManager-D5Lc0e46.js';
|
package/dist/presets.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkV37BM2LF_js=require('./chunk-V37BM2LF.js'),chunkER7X6E36_js=require('./chunk-ER7X6E36.js'),chunkCL53OI3I_js=require('./chunk-CL53OI3I.js'),chunkVK27WVV3_js=require('./chunk-VK27WVV3.js'),chunkS4GRSNB4_js=require('./chunk-S4GRSNB4.js');require('./chunk-TDDAYVKK.js'),require('./chunk-IQF726GS.js'),require('./chunk-GOU6FU6Y.js');var chunk555WWZ3W_js=require('./chunk-555WWZ3W.js'),chunkQH6YUVJS_js=require('./chunk-QH6YUVJS.js'),chunkUNKXYVXY_js=require('./chunk-UNKXYVXY.js'),chunkSAA7UVI2_js=require('./chunk-SAA7UVI2.js');require('./chunk-I54CDQGN.js');var chunkUDNRAQLE_js=require('./chunk-UDNRAQLE.js');require('./chunk-KVOGOLIR.js'),require('./chunk-LU4PFST7.js'),require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a})=>{let u=t!=null?t:[...q,...d];return jsxRuntime.jsx(chunk555WWZ3W_js.a,{options:u,onSave:f=>{p&&p.save(f),a==null||a(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkQH6YUVJS_js.a,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkSAA7UVI2_js.a,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsxRuntime.jsx(chunkUDNRAQLE_js.a,chunkMQFZHA2D_js.a({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=react.useState({}),[u,y]=react.useState(0),f=(i,T)=>{a(B=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsxRuntime.jsx(chunkUNKXYVXY_js.a,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkER7X6E36_js.a,{activities:s,onAddActivity:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkCL53OI3I_js.a,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(d!=null?d:Z);react.useEffect(()=>{if(!t)return;let e=false;return chunkMQFZHA2D_js.d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkVK27WVV3_js.a,{ropa:s,onAddRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=chunkMQFZHA2D_js.c(l,["input"]);let s=chunkS4GRSNB4_js.a(d);return jsxRuntime.jsx(chunkV37BM2LF_js.a,chunkMQFZHA2D_js.a({report:s},t))};exports.NDPRBreachReport=U;exports.NDPRComplianceDashboard=re;exports.NDPRConsent=O;exports.NDPRCrossBorder=V;exports.NDPRDPIA=z;exports.NDPRLawfulBasis=H;exports.NDPRPrivacyPolicy=E;exports.NDPRROPA=ee;exports.NDPRSubjectRights=k;//# sourceMappingURL=presets.js.map
|
|
1
|
+
'use strict';var chunk25OOUES4_js=require('./chunk-25OOUES4.js'),chunkUO6QPJLH_js=require('./chunk-UO6QPJLH.js'),chunkGMLCWGNJ_js=require('./chunk-GMLCWGNJ.js'),chunk5BUS6AI7_js=require('./chunk-5BUS6AI7.js'),chunkS4GRSNB4_js=require('./chunk-S4GRSNB4.js');require('./chunk-TDDAYVKK.js'),require('./chunk-C4YM4UMI.js'),require('./chunk-GOU6FU6Y.js');var chunkNBSVFQ5G_js=require('./chunk-NBSVFQ5G.js'),chunkYCX6BFOQ_js=require('./chunk-YCX6BFOQ.js'),chunkXHSHPB74_js=require('./chunk-XHSHPB74.js'),chunkSAA7UVI2_js=require('./chunk-SAA7UVI2.js');require('./chunk-I54CDQGN.js');var chunkYZXUAIYN_js=require('./chunk-YZXUAIYN.js');require('./chunk-TXXWCB5O.js'),require('./chunk-LU4PFST7.js'),require('./chunk-E64TU6IU.js'),require('./chunk-ELKB2AFZ.js');var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),jsxRuntime=require('react/jsx-runtime'),react=require('react');var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a})=>{let u=t!=null?t:[...q,...d];return jsxRuntime.jsx(chunkNBSVFQ5G_js.a,{options:u,onSave:f=>{p&&p.save(f),a==null||a(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkYCX6BFOQ_js.a,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsxRuntime.jsx(chunkSAA7UVI2_js.a,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsxRuntime.jsx(chunkYZXUAIYN_js.a,chunkMQFZHA2D_js.a({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=react.useState({}),[u,y]=react.useState(0),f=(i,T)=>{a(B=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsxRuntime.jsx(chunkXHSHPB74_js.a,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkUO6QPJLH_js.a,{activities:s,onAddActivity:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunkGMLCWGNJ_js.a,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=react.useState(d!=null?d:Z);react.useEffect(()=>{if(!t)return;let e=false;return chunkMQFZHA2D_js.d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsxRuntime.jsx(chunk5BUS6AI7_js.a,{ropa:s,onAddRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(i=>i.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},s),{records:s.records.map(o=>o.id===e?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=chunkMQFZHA2D_js.c(l,["input"]);let s=chunkS4GRSNB4_js.a(d);return jsxRuntime.jsx(chunk25OOUES4_js.a,chunkMQFZHA2D_js.a({report:s},t))};exports.NDPRBreachReport=U;exports.NDPRComplianceDashboard=re;exports.NDPRConsent=O;exports.NDPRCrossBorder=V;exports.NDPRDPIA=z;exports.NDPRLawfulBasis=H;exports.NDPRPrivacyPolicy=E;exports.NDPRROPA=ee;exports.NDPRSubjectRights=k;//# sourceMappingURL=presets.js.map
|
|
2
2
|
//# sourceMappingURL=presets.js.map
|
package/dist/presets.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a as a$a}from'./chunk-3UWT64FI.mjs';import {a as a$6}from'./chunk-ELKEZEV5.mjs';import {a as a$7}from'./chunk-4JUDKBA2.mjs';import {a as a$8}from'./chunk-K45S6YQV.mjs';import {a as a$9}from'./chunk-ABDB7LEV.mjs';import'./chunk-TXBZPCGF.mjs';import'./chunk-QKK5S54L.mjs';import'./chunk-SHMJNRHO.mjs';import {a}from'./chunk-4XCL62MJ.mjs';import {a as a$1}from'./chunk-IR7VCBWV.mjs';import {a as a$5}from'./chunk-V3MXWGXU.mjs';import {a as a$2}from'./chunk-CWUPGY3M.mjs';import'./chunk-GKKAK6ES.mjs';import {a as a$3}from'./chunk-NN233SGA.mjs';import'./chunk-EH2I4L7M.mjs';import'./chunk-GCQRHMTQ.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {a as a$4,b,d,c}from'./chunk-WWT2ZSNU.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a$1})=>{let u=t!=null?t:[...q,...d];return jsx(a,{options:u,onSave:f=>{p&&p.save(f),a$1==null||a$1(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$1,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$2,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsx(a$3,a$4({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=useState({}),[u,y]=useState(0),f=(i,T)=>{a(B=>b(a$4({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsx(a$5,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$6,{activities:s,onAddActivity:e=>{let r=Date.now(),o=b(a$4({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?b(a$4({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$7,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=b(a$4({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d$1,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(d$1!=null?d$1:Z);useEffect(()=>{if(!t)return;let e=false;return d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsx(a$8,{ropa:s,onAddRecord:e=>{let r=b(a$4({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=b(a$4({},s),{records:s.records.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=b(a$4({},s),{records:s.records.map(o=>o.id===e?b(a$4({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=c(l,["input"]);let s=a$9(d);return jsx(a$a,a$4({report:s},t))};export{U as NDPRBreachReport,re as NDPRComplianceDashboard,O as NDPRConsent,V as NDPRCrossBorder,z as NDPRDPIA,H as NDPRLawfulBasis,E as NDPRPrivacyPolicy,ee as NDPRROPA,k as NDPRSubjectRights};//# sourceMappingURL=presets.mjs.map
|
|
1
|
+
import {a as a$a}from'./chunk-XFUEZ3MP.mjs';import {a as a$6}from'./chunk-ZT7KNFAU.mjs';import {a as a$7}from'./chunk-TI2M7H6R.mjs';import {a as a$8}from'./chunk-YURSF2YO.mjs';import {a as a$9}from'./chunk-ABDB7LEV.mjs';import'./chunk-TXBZPCGF.mjs';import'./chunk-75TJPK2N.mjs';import'./chunk-SHMJNRHO.mjs';import {a}from'./chunk-4JKTIR33.mjs';import {a as a$1}from'./chunk-6YN73KR7.mjs';import {a as a$5}from'./chunk-GXLSOZCH.mjs';import {a as a$2}from'./chunk-CWUPGY3M.mjs';import'./chunk-GKKAK6ES.mjs';import {a as a$3}from'./chunk-UX6ZZNEM.mjs';import'./chunk-CDZDT2OS.mjs';import'./chunk-GCQRHMTQ.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-6WIP33TW.mjs';import {a as a$4,b,d,c}from'./chunk-WWT2ZSNU.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var q=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],O=({extraOptions:d=[],options:t,adapter:p,position:l="bottom",classNames:s,unstyled:c,onSave:a$1})=>{let u=t!=null?t:[...q,...d];return jsx(a,{options:u,onSave:f=>{p&&p.save(f),a$1==null||a$1(f);},position:l,classNames:s,unstyled:c,manageStorage:!p})};var I=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:d=I,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$1,{requestTypes:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var _=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],U=({categories:d=_,adapter:t,classNames:p,unstyled:l,onSubmit:s=()=>{}})=>jsx(a$2,{categories:d,onSubmit:a=>{t&&t.save(a),s(a);},classNames:p,unstyled:l});var E=d=>jsx(a$3,a$4({},d));var Y=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],z=({sections:d=Y,adapter:t,classNames:p,unstyled:l,onComplete:s=()=>{}})=>{let[c,a]=useState({}),[u,y]=useState(0),f=(i,T)=>{a(B=>b(a$4({},B),{[i]:T}));},e=()=>{u<d.length-1?y(i=>i+1):(t&&t.save(c),s(c));},r=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/d.length*100);return jsx(a$5,{sections:d,answers:c,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:r,progress:o,classNames:p,unstyled:l})};var H=({initialActivities:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$6,{activities:s,onAddActivity:e=>{let r=Date.now(),o=b(a$4({},e),{id:`activity-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateActivity:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onArchiveActivity:e=>{let r=s.map(o=>o.id===e?b(a$4({},o),{status:"inactive",updatedAt:Date.now()}):o);c(r),a(r);},classNames:p,unstyled:l})};var V=({initialTransfers:d=[],adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return d}),a=e=>{t&&t.save(e);};return jsx(a$7,{transfers:s,onAddTransfer:e=>{let r=Date.now(),o=b(a$4({},e),{id:`transfer-${r}`,createdAt:r,updatedAt:r}),i=[...s,o];c(i),a(i);},onUpdateTransfer:(e,r)=>{let o=s.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i);c(o),a(o);},onRemoveTransfer:e=>{let r=s.filter(o=>o.id!==e);c(r),a(r);},classNames:p,unstyled:l})};var Z={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},ee=({initialData:d$1,adapter:t,classNames:p,unstyled:l})=>{let[s,c]=useState(d$1!=null?d$1:Z);useEffect(()=>{if(!t)return;let e=false;return d(null,null,function*(){let o=yield t.load();!e&&o&&c(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsx(a$8,{ropa:s,onAddRecord:e=>{let r=b(a$4({},s),{records:[...s.records,e],lastUpdated:Date.now()});c(r),a(r);},onUpdateRecord:(e,r)=>{let o=b(a$4({},s),{records:s.records.map(i=>i.id===e?b(a$4(a$4({},i),r),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});c(o),a(o);},onArchiveRecord:e=>{let r=b(a$4({},s),{records:s.records.map(o=>o.id===e?b(a$4({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});c(r),a(r);},classNames:p,unstyled:l})};var re=p=>{var l=p,{input:d}=l,t=c(l,["input"]);let s=a$9(d);return jsx(a$a,a$4({report:s},t))};export{U as NDPRBreachReport,re as NDPRComplianceDashboard,O as NDPRConsent,V as NDPRCrossBorder,z as NDPRDPIA,H as NDPRLawfulBasis,E as NDPRPrivacyPolicy,ee as NDPRROPA,k as NDPRSubjectRights};//# sourceMappingURL=presets.mjs.map
|
|
2
2
|
//# sourceMappingURL=presets.mjs.map
|
package/dist/ropa.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk5BUS6AI7_js=require('./chunk-5BUS6AI7.js'),chunk6RQGQZT2_js=require('./chunk-6RQGQZT2.js'),chunkGOU6FU6Y_js=require('./chunk-GOU6FU6Y.js');require('./chunk-E64TU6IU.js'),require('./chunk-MQFZHA2D.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var p=react.createContext(null);function u(){let r=react.useContext(p);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 e=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=chunk6RQGQZT2_js.a({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsxRuntime.jsx(p.Provider,{value:R,children:s})};var v={Provider:e,Manager:chunk5BUS6AI7_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunk5BUS6AI7_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunk6RQGQZT2_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunkGOU6FU6Y_js.a}});exports.ROPA=v;exports.ROPAProvider=e;exports.useROPACompound=u;//# sourceMappingURL=ropa.js.map
|
|
2
2
|
//# sourceMappingURL=ropa.js.map
|
package/dist/ropa.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-YURSF2YO.mjs';export{a as ROPAManager}from'./chunk-YURSF2YO.mjs';import {a as a$1}from'./chunk-PM7O5IGE.mjs';export{a as useROPA}from'./chunk-PM7O5IGE.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-SHMJNRHO.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null);function u(){let r=useContext(p);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 e=({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(p.Provider,{value:R,children:s})};var v={Provider:e,Manager:a};export{v as ROPA,e as ROPAProvider,u as useROPACompound};//# sourceMappingURL=ropa.mjs.map
|
|
2
2
|
//# sourceMappingURL=ropa.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
1
|
+
import React__default, { ReactNode, ErrorInfo } from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Locale strings for all toolkit components.
|
|
@@ -114,6 +114,16 @@ interface NDPRConfig {
|
|
|
114
114
|
* Pass partial overrides — missing keys fall back to English defaults.
|
|
115
115
|
*/
|
|
116
116
|
locale?: NDPRLocale;
|
|
117
|
+
/**
|
|
118
|
+
* Custom fallback UI to render when a child component throws during rendering.
|
|
119
|
+
* Receives the error and a reset function. If omitted, a default fallback is shown.
|
|
120
|
+
*/
|
|
121
|
+
fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode);
|
|
122
|
+
/**
|
|
123
|
+
* Called when the error boundary catches an error.
|
|
124
|
+
* Useful for sending errors to an external reporting service.
|
|
125
|
+
*/
|
|
126
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
117
127
|
}
|
|
118
128
|
/**
|
|
119
129
|
* Provides NDPR configuration to all descendant toolkit components.
|
|
@@ -121,6 +131,9 @@ interface NDPRConfig {
|
|
|
121
131
|
* When a `theme` is supplied, the corresponding CSS custom properties
|
|
122
132
|
* (`--ndpr-primary`, `--ndpr-primary-hover`, `--ndpr-primary-foreground`)
|
|
123
133
|
* are set on the wrapping element so components can reference them.
|
|
134
|
+
*
|
|
135
|
+
* Wraps children in an error boundary so that a rendering failure in any
|
|
136
|
+
* toolkit component does not crash the host application.
|
|
124
137
|
*/
|
|
125
138
|
declare const NDPRProvider: React__default.FC<NDPRConfig & {
|
|
126
139
|
children: React__default.ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
1
|
+
import React__default, { ReactNode, ErrorInfo } from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Locale strings for all toolkit components.
|
|
@@ -114,6 +114,16 @@ interface NDPRConfig {
|
|
|
114
114
|
* Pass partial overrides — missing keys fall back to English defaults.
|
|
115
115
|
*/
|
|
116
116
|
locale?: NDPRLocale;
|
|
117
|
+
/**
|
|
118
|
+
* Custom fallback UI to render when a child component throws during rendering.
|
|
119
|
+
* Receives the error and a reset function. If omitted, a default fallback is shown.
|
|
120
|
+
*/
|
|
121
|
+
fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode);
|
|
122
|
+
/**
|
|
123
|
+
* Called when the error boundary catches an error.
|
|
124
|
+
* Useful for sending errors to an external reporting service.
|
|
125
|
+
*/
|
|
126
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
117
127
|
}
|
|
118
128
|
/**
|
|
119
129
|
* Provides NDPR configuration to all descendant toolkit components.
|
|
@@ -121,6 +131,9 @@ interface NDPRConfig {
|
|
|
121
131
|
* When a `theme` is supplied, the corresponding CSS custom properties
|
|
122
132
|
* (`--ndpr-primary`, `--ndpr-primary-hover`, `--ndpr-primary-foreground`)
|
|
123
133
|
* are set on the wrapping element so components can reference them.
|
|
134
|
+
*
|
|
135
|
+
* Wraps children in an error boundary so that a rendering failure in any
|
|
136
|
+
* toolkit component does not crash the host application.
|
|
124
137
|
*/
|
|
125
138
|
declare const NDPRProvider: React__default.FC<NDPRConfig & {
|
|
126
139
|
children: React__default.ReactNode;
|
package/dist/{useAdaptivePolicyWizard-N4eUM4Tj.d.mts → useAdaptivePolicyWizard-A1PyOy6P.d.mts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as PrivacyPolicy, P as PolicySection } from './privacy-Ca6te9Ir.mjs';
|
|
2
|
-
import { P as PolicyDraft, C as ComplianceGap, T as TemplateContext,
|
|
2
|
+
import { P as PolicyDraft, C as ComplianceGap, T as TemplateContext, a as CustomSection, b as ComplianceResult, c as PDFExportOptions, D as DOCXExportOptions, H as HTMLExportOptions } from './policy-engine-DefZcX3R.mjs';
|
|
3
3
|
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
4
4
|
|
|
5
5
|
interface UseAdaptivePolicyWizardOptions {
|
package/dist/{useAdaptivePolicyWizard-B9Op2gYM.d.ts → useAdaptivePolicyWizard-LVIKhAxw.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as PrivacyPolicy, P as PolicySection } from './privacy-Ca6te9Ir.js';
|
|
2
|
-
import { P as PolicyDraft, C as ComplianceGap, T as TemplateContext,
|
|
2
|
+
import { P as PolicyDraft, C as ComplianceGap, T as TemplateContext, a as CustomSection, b as ComplianceResult, c as PDFExportOptions, D as DOCXExportOptions, H as HTMLExportOptions } from './policy-engine-C6nC2t3a.js';
|
|
3
3
|
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
4
4
|
|
|
5
5
|
interface UseAdaptivePolicyWizardOptions {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { c as DPIASection, a as DPIAResult, D as DPIAQuestion } from './dpia-
|
|
1
|
+
import { c as DPIASection, a as DPIAResult, D as DPIAQuestion } from './dpia-c9GiiOq0.mjs';
|
|
2
2
|
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
3
3
|
|
|
4
|
+
/** Possible value types for a DPIA answer */
|
|
5
|
+
type DPIAAnswerValue = string | number | boolean | string[];
|
|
6
|
+
/** A map of question IDs to their answer values */
|
|
7
|
+
type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
|
|
4
8
|
interface UseDPIAOptions {
|
|
5
9
|
/**
|
|
6
10
|
* Sections of the DPIA questionnaire
|
|
@@ -9,11 +13,11 @@ interface UseDPIAOptions {
|
|
|
9
13
|
/**
|
|
10
14
|
* Initial answers (if resuming a DPIA)
|
|
11
15
|
*/
|
|
12
|
-
initialAnswers?:
|
|
16
|
+
initialAnswers?: DPIAAnswerMap;
|
|
13
17
|
/**
|
|
14
18
|
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
19
|
*/
|
|
16
|
-
adapter?: StorageAdapter<
|
|
20
|
+
adapter?: StorageAdapter<DPIAAnswerMap>;
|
|
17
21
|
/**
|
|
18
22
|
* Storage key for DPIA data
|
|
19
23
|
* @default "ndpr_dpia_data"
|
|
@@ -43,11 +47,11 @@ interface UseDPIAReturn {
|
|
|
43
47
|
/**
|
|
44
48
|
* All answers
|
|
45
49
|
*/
|
|
46
|
-
answers:
|
|
50
|
+
answers: DPIAAnswerMap;
|
|
47
51
|
/**
|
|
48
52
|
* Update an answer
|
|
49
53
|
*/
|
|
50
|
-
updateAnswer: (questionId: string, value:
|
|
54
|
+
updateAnswer: (questionId: string, value: DPIAAnswerValue) => void;
|
|
51
55
|
/**
|
|
52
56
|
* Go to the next section
|
|
53
57
|
*/
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { c as DPIASection, a as DPIAResult, D as DPIAQuestion } from './dpia-
|
|
1
|
+
import { c as DPIASection, a as DPIAResult, D as DPIAQuestion } from './dpia-c9GiiOq0.js';
|
|
2
2
|
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
3
3
|
|
|
4
|
+
/** Possible value types for a DPIA answer */
|
|
5
|
+
type DPIAAnswerValue = string | number | boolean | string[];
|
|
6
|
+
/** A map of question IDs to their answer values */
|
|
7
|
+
type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
|
|
4
8
|
interface UseDPIAOptions {
|
|
5
9
|
/**
|
|
6
10
|
* Sections of the DPIA questionnaire
|
|
@@ -9,11 +13,11 @@ interface UseDPIAOptions {
|
|
|
9
13
|
/**
|
|
10
14
|
* Initial answers (if resuming a DPIA)
|
|
11
15
|
*/
|
|
12
|
-
initialAnswers?:
|
|
16
|
+
initialAnswers?: DPIAAnswerMap;
|
|
13
17
|
/**
|
|
14
18
|
* Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
|
|
15
19
|
*/
|
|
16
|
-
adapter?: StorageAdapter<
|
|
20
|
+
adapter?: StorageAdapter<DPIAAnswerMap>;
|
|
17
21
|
/**
|
|
18
22
|
* Storage key for DPIA data
|
|
19
23
|
* @default "ndpr_dpia_data"
|
|
@@ -43,11 +47,11 @@ interface UseDPIAReturn {
|
|
|
43
47
|
/**
|
|
44
48
|
* All answers
|
|
45
49
|
*/
|
|
46
|
-
answers:
|
|
50
|
+
answers: DPIAAnswerMap;
|
|
47
51
|
/**
|
|
48
52
|
* Update an answer
|
|
49
53
|
*/
|
|
50
|
-
updateAnswer: (questionId: string, value:
|
|
54
|
+
updateAnswer: (questionId: string, value: DPIAAnswerValue) => void;
|
|
51
55
|
/**
|
|
52
56
|
* Go to the next section
|
|
53
57
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DSRRequest, c as RequestType, R as RequestStatus } from './dsr-
|
|
1
|
+
import { D as DSRRequest, c as RequestType, R as RequestStatus } from './dsr-yKbqX531.mjs';
|
|
2
2
|
import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
|
|
3
3
|
|
|
4
4
|
interface UseDSROptions {
|
|
@@ -67,7 +67,7 @@ interface UseDSRReturn {
|
|
|
67
67
|
/**
|
|
68
68
|
* Format a request for display or submission
|
|
69
69
|
*/
|
|
70
|
-
formatRequest: (request: DSRRequest) => Record<string,
|
|
70
|
+
formatRequest: (request: DSRRequest) => Record<string, unknown>;
|
|
71
71
|
/**
|
|
72
72
|
* Clear all requests
|
|
73
73
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DSRRequest, c as RequestType, R as RequestStatus } from './dsr-
|
|
1
|
+
import { D as DSRRequest, c as RequestType, R as RequestStatus } from './dsr-yKbqX531.js';
|
|
2
2
|
import { S as StorageAdapter } from './types-DK2CoKOC.js';
|
|
3
3
|
|
|
4
4
|
interface UseDSROptions {
|
|
@@ -67,7 +67,7 @@ interface UseDSRReturn {
|
|
|
67
67
|
/**
|
|
68
68
|
* Format a request for display or submission
|
|
69
69
|
*/
|
|
70
|
-
formatRequest: (request: DSRRequest) => Record<string,
|
|
70
|
+
formatRequest: (request: DSRRequest) => Record<string, unknown>;
|
|
71
71
|
/**
|
|
72
72
|
* Clear all requests
|
|
73
73
|
*/
|
package/package.json
CHANGED
package/dist/chunk-2FWCVWKN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use strict';var chunkNRQELKAE_js=require('./chunk-NRQELKAE.js'),chunkE64TU6IU_js=require('./chunk-E64TU6IU.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var oe=({requests:R,onSelectRequest:T,onUpdateStatus:$,onAssignRequest:I,title:H="Data Subject Request Dashboard",description:X="Track and manage data subject requests in compliance with NDPA Part IV requirements.",className:J="",buttonClassName:V="",showRequestDetails:K=true,showRequestTimeline:Y=true,showDeadlineAlerts:F=true,assignees:i=[],classNames:s,unstyled:f=false})=>{let[h,y]=react.useState(null),[D,B]=react.useState(R),[j,O]=react.useState("all"),[C,M]=react.useState("all"),[A,_]=react.useState(""),[P,z]=react.useState("createdAt"),[L,Z]=react.useState("desc"),[S,G]=react.useState("");react.useEffect(()=>{let e=[...R];if(j!=="all"&&(e=e.filter(r=>r.status===j)),C!=="all"&&(e=e.filter(r=>r.type===C)),A){let r=A.toLowerCase();e=e.filter(p=>p.subject.name.toLowerCase().includes(r)||p.subject.email.toLowerCase().includes(r)||p.description&&p.description.toLowerCase().includes(r));}e.sort((r,p)=>{let w=0;switch(P){case "createdAt":w=r.createdAt-p.createdAt;break;case "dueDate":w=(r.dueDate||0)-(p.dueDate||0);break;case "type":w=r.type.localeCompare(p.type);break;case "status":w=r.status.localeCompare(p.status);break;default:w=r.createdAt-p.createdAt;}return L==="asc"?w:-w}),B(e);},[R,j,C,A,P,L]),react.useEffect(()=>{D.length>0&&(h&&D.some(r=>r.id===h)||y(D[0].id));},[D,h]);let Q=e=>{y(e),T&&T(e);},U=e=>{h&&$&&$(h,e);},W=()=>{h&&S&&I&&(I(h,S),G(""));},k=e=>new Date(e).toLocaleDateString(),E=e=>{let r=Date.now(),p=(e-r)/(1440*60*1e3);return Math.ceil(p)},m=h?R.find(e=>e.id===h):null,t=e=>{let r={information:"bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-200",access:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",rectification:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",erasure:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",restriction:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",portability:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200",objection:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200",automated_decision_making:"bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200"},p={information:"Information",access:"Access",rectification:"Rectification",erasure:"Erasure",restriction:"Restriction",portability:"Portability",objection:"Objection",automated_decision_making:"Automated Decision-Making"};return jsxRuntime.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${r[e]}`,children:p[e]})},l=e=>jsxRuntime.jsx("span",{className:chunkE64TU6IU_js.a(`px-2 py-1 rounded text-xs font-medium ${{pending:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",inProgress:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",completed:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",rejected:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",awaitingVerification:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200"}[e]}`,s==null?void 0:s.statusBadge,f),children:e==="inProgress"?"In Progress":e==="awaitingVerification"?"Awaiting Verification":e.charAt(0).toUpperCase()+e.slice(1)}),g=e=>{if(!e.dueDate)return null;let r=E(e.dueDate);return r<=0?jsxRuntime.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium",children:"Deadline Passed"}),jsxRuntime.jsx("p",{className:"text-xs text-red-700 dark:text-red-300 mt-1",children:"The response deadline has passed. Immediate action is required."})]}):r<=3?jsxRuntime.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium",children:"Urgent: Deadline Approaching"}),jsxRuntime.jsxs("p",{className:"text-xs text-red-700 dark:text-red-300 mt-1",children:["Only ",r," day",r!==1?"s":""," remaining until the response deadline."]})]}):r<=7?jsxRuntime.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium",children:"Deadline Approaching"}),jsxRuntime.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:[r," days remaining until the response deadline."]})]}):jsxRuntime.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-md",children:[jsxRuntime.jsx("p",{className:"text-sm text-green-800 dark:text-green-200 font-medium",children:"Deadline Tracking"}),jsxRuntime.jsxs("p",{className:"text-xs text-green-700 dark:text-green-300 mt-1",children:[r," days remaining until the response deadline."]})]})},x=e=>{let r=[{title:"Request Received",date:e.createdAt,completed:true,description:`Request was received on ${k(e.createdAt)}.`}];return e.verifiedAt?r.push({title:"Identity Verified",date:e.verifiedAt,completed:true,description:`Data subject's identity was verified on ${k(e.verifiedAt)}.`}):e.status==="awaitingVerification"&&r.push({title:"Identity Verification",date:Date.now(),completed:false,description:"Awaiting verification of data subject's identity."}),(e.status==="inProgress"||e.status==="completed"||e.status==="rejected")&&r.push({title:"Processing Started",date:e.updatedAt,completed:true,description:`Request processing started on ${k(e.updatedAt)}.`}),e.status==="completed"?r.push({title:"Request Completed",date:e.completedAt||Date.now(),completed:true,description:`Request was completed on ${k(e.completedAt||Date.now())}.`}):e.status==="rejected"&&r.push({title:"Request Rejected",date:e.completedAt||Date.now(),completed:true,description:`Request was rejected on ${k(e.completedAt||Date.now())}.${e.rejectionReason?` Reason: ${e.rejectionReason}`:""}`}),e.dueDate&&r.push({title:"Response Deadline",date:e.dueDate,completed:Date.now()>e.dueDate,description:`Response is due by ${k(e.dueDate)}.`}),jsxRuntime.jsxs("div",{className:"mt-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-4",children:"Request Timeline"}),jsxRuntime.jsx("ol",{className:"relative border-l border-gray-200 dark:border-gray-700",children:r.map((p,w)=>jsxRuntime.jsxs("li",{className:"mb-6 ml-4",children:[jsxRuntime.jsx("div",{className:`absolute w-3 h-3 rounded-full mt-1.5 -left-1.5 border ${p.completed?"bg-green-500 border-green-500 dark:border-green-500":"bg-gray-200 border-gray-200 dark:bg-gray-700 dark:border-gray-700"}`}),jsxRuntime.jsx("time",{className:"mb-1 text-sm font-normal leading-none text-gray-600 dark:text-gray-500",children:p.date?k(p.date):"Pending"}),jsxRuntime.jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:p.title}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:p.description})]},w))})]})},o=()=>[{value:"all",label:"All Types"},{value:"information",label:"Information (NDPA Section 29)"},{value:"access",label:"Access (NDPA Section 30)"},{value:"rectification",label:"Rectification (NDPA Section 31)"},{value:"erasure",label:"Erasure (NDPA Section 32)"},{value:"restriction",label:"Restriction (NDPA Section 33)"},{value:"portability",label:"Portability (NDPA Section 34)"},{value:"objection",label:"Objection (NDPA Section 35)"},{value:"automated_decision_making",label:"Automated Decision-Making (NDPA Section 36)"}].map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value)),u=()=>[{value:"all",label:"All Statuses"},{value:"pending",label:"Pending"},{value:"awaitingVerification",label:"Awaiting Verification"},{value:"inProgress",label:"In Progress"},{value:"completed",label:"Completed"},{value:"rejected",label:"Rejected"}].map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value)),v=()=>[{value:"pending",label:"Pending"},{value:"awaitingVerification",label:"Awaiting Verification"},{value:"inProgress",label:"In Progress"},{value:"completed",label:"Completed"},{value:"rejected",label:"Rejected"}].map(r=>jsxRuntime.jsx("option",{value:r.value,children:r.label},r.value));return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${J}`,s==null?void 0:s.root,f),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("",s==null?void 0:s.header,f),children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("text-xl font-bold mb-2",s==null?void 0:s.title,f),children:H}),jsxRuntime.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:X})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("mb-6 grid grid-cols-1 md:grid-cols-4 gap-4",s==null?void 0:s.filters,f),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"statusFilter",className:"block text-sm font-medium mb-1",children:"Status Filter"}),jsxRuntime.jsx("select",{id:"statusFilter",value:j,onChange:e=>O(e.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:u()})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"typeFilter",className:"block text-sm font-medium mb-1",children:"Request Type Filter"}),jsxRuntime.jsx("select",{id:"typeFilter",value:C,onChange:e=>M(e.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:o()})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"sortBy",className:"block text-sm font-medium mb-1",children:"Sort By"}),jsxRuntime.jsxs("select",{id:"sortBy",value:P,onChange:e=>z(e.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:[jsxRuntime.jsx("option",{value:"createdAt",children:"Date Received"}),jsxRuntime.jsx("option",{value:"dueDate",children:"Due Date"}),jsxRuntime.jsx("option",{value:"type",children:"Request Type"}),jsxRuntime.jsx("option",{value:"status",children:"Status"})]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("label",{htmlFor:"searchTerm",className:"block text-sm font-medium mb-1",children:"Search"}),jsxRuntime.jsx("input",{type:"text",id:"searchTerm",value:A,onChange:e=>_(e.target.value),placeholder:"Search requests...",className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]"})]})]}),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[jsxRuntime.jsxs("div",{className:"md:col-span-1",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"DSR Requests"}),D.length===0?jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No data subject requests found."}):jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("space-y-2 max-h-96 overflow-y-auto pr-2",s==null?void 0:s.requestList,f),children:D.map(e=>{let r=e.dueDate?E(e.dueDate):null,p=null;return r!==null&&(r<=0?p=jsxRuntime.jsx("span",{className:"text-xs text-red-600 dark:text-red-400 font-bold",children:"Overdue"}):r<=3?p=jsxRuntime.jsx("span",{className:"text-xs text-red-600 dark:text-red-400",children:"Urgent"}):r<=7&&(p=jsxRuntime.jsx("span",{className:"text-xs text-yellow-600 dark:text-yellow-400",children:"Soon"}))),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`p-3 rounded-md cursor-pointer ${h===e.id?"bg-[rgb(var(--ndpr-primary)/0.05)] dark:bg-[rgb(var(--ndpr-primary)/0.1)] border border-[rgb(var(--ndpr-primary)/0.2)] dark:border-[rgb(var(--ndpr-primary)/0.3)]":"bg-gray-50 dark:bg-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600"}`,s==null?void 0:s.requestItem,f),onClick:()=>Q(e.id),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx("h4",{className:"font-medium text-sm",children:e.subject.name}),t(e.type)]}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:e.subject.email}),jsxRuntime.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:["Received: ",k(e.createdAt)]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center mt-2",children:[jsxRuntime.jsx("div",{children:l(e.status)}),jsxRuntime.jsx("div",{children:p})]})]},e.id)})})]}),jsxRuntime.jsx("div",{className:chunkE64TU6IU_js.a("md:col-span-2",s==null?void 0:s.detailPanel,f),children:m?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-4",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium",children:m.subject.name}),jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[t(m.type),l(m.status)]})]}),F&&m.dueDate&&jsxRuntime.jsx("div",{className:"mb-4",children:g(m)}),K&&jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Email:"})," ",m.subject.email]}),m.subject.phone&&jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Phone:"})," ",m.subject.phone]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Received:"})," ",k(m.createdAt)]})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Request Type:"})," ",{information:"Information",access:"Access",rectification:"Rectification",erasure:"Erasure",restriction:"Restriction",portability:"Portability",objection:"Objection",automated_decision_making:"Automated Decision-Making"}[m.type]||m.type]}),jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Status:"})," ",m.status==="inProgress"?"In Progress":m.status==="awaitingVerification"?"Awaiting Verification":m.status.charAt(0).toUpperCase()+m.status.slice(1)]}),m.dueDate&&jsxRuntime.jsxs("p",{className:"text-sm",children:[jsxRuntime.jsx("span",{className:"font-medium",children:"Due Date:"})," ",k(m.dueDate)]})]})]}),m.description&&jsxRuntime.jsxs("div",{className:"mb-4",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"Request Details:"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700 p-2 rounded-md mt-1",children:m.description})]}),m.additionalInfo&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"Additional Information:"}),jsxRuntime.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700 p-2 rounded-md mt-1",children:typeof m.additionalInfo=="object"?JSON.stringify(m.additionalInfo,null,2):String(m.additionalInfo||"No additional information provided")})]})]}),jsxRuntime.jsxs("div",{className:"mb-6 grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-md font-medium mb-2",children:"Update Status"}),jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsx("select",{value:m.status,onChange:e=>U(e.target.value),className:"flex-grow px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:v()}),jsxRuntime.jsx("button",{onClick:()=>U(m.status),className:`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] ${V}`,children:"Update"})]})]}),i.length>0&&jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h3",{className:"text-md font-medium mb-2",children:"Assign Request"}),jsxRuntime.jsxs("div",{className:"flex space-x-2",children:[jsxRuntime.jsxs("select",{value:S,onChange:e=>G(e.target.value),className:"flex-grow px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:[jsxRuntime.jsx("option",{value:"",children:"Select Assignee"}),i.map(e=>jsxRuntime.jsx("option",{value:e,children:e},e))]}),jsxRuntime.jsx("button",{onClick:W,disabled:!S,className:`px-4 py-2 bg-[rgb(var(--ndpr-primary))] text-white rounded hover:bg-[rgb(var(--ndpr-primary-hover))] disabled:bg-gray-300 disabled:text-gray-500 ${V}`,children:"Assign"})]})]})]}),jsxRuntime.jsxs("div",{className:"mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-3",children:"Request Summary"}),jsxRuntime.jsx("div",{className:"bg-gray-50 dark:bg-gray-700 p-3 rounded-md",children:jsxRuntime.jsx("pre",{className:"whitespace-pre-wrap text-sm font-mono text-gray-800 dark:text-gray-200",children:jsxRuntime.jsx("pre",{children:JSON.stringify(chunkNRQELKAE_js.a(m),null,2)})})})]}),Y&&x(m)]}):jsxRuntime.jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 dark:bg-gray-700 rounded-md",children:jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Select a request to view details"})})})]})]})};var ue=({requests:R,onSelectRequest:T,title:$="DSR Request Tracker",description:I="Track the status and progress of data subject requests as required by NDPA Part IV.",className:H="",buttonClassName:X="",showSummaryStats:J=true,showTypeBreakdown:V=true,showStatusBreakdown:K=true,showTimelineChart:Y=true,showOverdueRequests:F=true,classNames:i,unstyled:s=false})=>{let[f,h]=react.useState("30days"),[y,D]=react.useState(R),[B,j]=react.useState([]),[O,C]=react.useState([]);react.useEffect(()=>{let t=Date.now(),l;switch(f){case "7days":l=R.filter(o=>t-o.createdAt<=10080*60*1e3);break;case "30days":l=R.filter(o=>t-o.createdAt<=720*60*60*1e3);break;case "90days":l=R.filter(o=>t-o.createdAt<=2160*60*60*1e3);break;default:l=[...R];}D(l);let g=l.filter(o=>o.dueDate&&t>o.dueDate&&o.status!=="completed"&&o.status!=="rejected");j(g);let x=l.filter(o=>o.dueDate&&t<o.dueDate&&o.dueDate-t<=10080*60*1e3&&o.status!=="completed"&&o.status!=="rejected");C(x);},[R,f]);let M=t=>{T&&T(t);},A=t=>new Date(t).toLocaleDateString(),_=t=>{let l=Date.now(),g=(t-l)/(1440*60*1e3);return Math.ceil(g)},P=()=>{let t=y.filter(g=>g.status==="completed"&&g.completedAt&&g.createdAt);if(t.length===0)return null;let l=t.reduce((g,x)=>{let o=((x.completedAt||0)-x.createdAt)/864e5;return g+o},0);return Number((l/t.length).toFixed(1))},z=()=>{let t=y.filter(g=>(g.status==="completed"||g.status==="rejected")&&g.completedAt&&g.dueDate);if(t.length===0)return null;let l=t.filter(g=>(g.completedAt||0)<=(g.dueDate||0));return Math.round(l.length/t.length*100)},L=()=>{let t={};return y.forEach(l=>{t[l.type]=(t[l.type]||0)+1;}),{information:t.information||0,access:t.access||0,rectification:t.rectification||0,erasure:t.erasure||0,restriction:t.restriction||0,portability:t.portability||0,objection:t.objection||0,automated_decision_making:t.automated_decision_making||0}},Z=()=>{let t={};return y.forEach(l=>{t[l.status]=(t[l.status]||0)+1;}),{pending:t.pending||0,awaitingVerification:t.awaitingVerification||0,inProgress:t.inProgress||0,completed:t.completed||0,rejected:t.rejected||0}},S=t=>{let l={information:"bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-200",access:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",rectification:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",erasure:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200",restriction:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",portability:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200",objection:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200",automated_decision_making:"bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200"},g={information:"Information",access:"Access",rectification:"Rectification",erasure:"Erasure",restriction:"Restriction",portability:"Portability",objection:"Objection",automated_decision_making:"Automated Decision-Making"};return jsxRuntime.jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${l[t]}`,children:g[t]})},Q=()=>{let t=y.length,l=y.filter(u=>u.status!=="completed"&&u.status!=="rejected").length;y.filter(u=>u.status==="completed"||u.status==="rejected").length;let x=P(),o=z();return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",i==null?void 0:i.stats,s),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow",i==null?void 0:i.statCard,s),children:[jsxRuntime.jsx("h4",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Total Requests"}),jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:t})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow",i==null?void 0:i.statCard,s),children:[jsxRuntime.jsx("h4",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Pending Requests"}),jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:l})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow",i==null?void 0:i.statCard,s),children:[jsxRuntime.jsx("h4",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Avg. Response Time"}),jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:x!==null?`${x} days`:"N/A"})]}),jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow",i==null?void 0:i.statCard,s),children:[jsxRuntime.jsx("h4",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Compliance Rate"}),jsxRuntime.jsx("p",{className:"text-2xl font-bold",children:o!==null?`${o}%`:"N/A"})]})]})},U=()=>{let t=L(),l=y.length,g=Object.entries(t).sort(([,x],[,o])=>o-x).map(([x])=>x);return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",i==null?void 0:i.table,s),children:[jsxRuntime.jsx("h3",{className:chunkE64TU6IU_js.a("text-lg font-medium mb-4",i==null?void 0:i.tableHeader,s),children:"Request Types"}),l===0?jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No data available for the selected timeframe."}):jsxRuntime.jsx("div",{className:"space-y-4",children:g.map(x=>{let o=t[x],u=Math.round(o/l*100);return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-1",children:[jsxRuntime.jsxs("div",{className:"flex items-center",children:[S(x),jsxRuntime.jsxs("span",{className:"ml-2 text-sm",children:[o," requests"]})]}),jsxRuntime.jsxs("span",{className:"text-sm font-medium",children:[u,"%"]})]}),jsxRuntime.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2.5",children:jsxRuntime.jsx("div",{className:"bg-[rgb(var(--ndpr-primary))] h-2.5 rounded-full",style:{width:`${u}%`}})})]},x)})})]})},W=()=>{let t=Z(),l=y.length,g=["pending","awaitingVerification","inProgress","completed","rejected"],x={pending:"bg-yellow-500",awaitingVerification:"bg-purple-500",inProgress:"bg-blue-500",completed:"bg-green-500",rejected:"bg-red-500"};return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",i==null?void 0:i.table,s),children:[jsxRuntime.jsx("h3",{className:chunkE64TU6IU_js.a("text-lg font-medium mb-4",i==null?void 0:i.tableHeader,s),children:"Request Status"}),l===0?jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No data available for the selected timeframe."}):jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"flex h-4 mb-2",children:g.map(o=>{let u=t[o],v=u/l*100;return v>0?jsxRuntime.jsx("div",{className:`${x[o]} first:rounded-l-full last:rounded-r-full`,style:{width:`${v}%`},title:`${o}: ${u} (${Math.round(v)}%)`},o):null})}),jsxRuntime.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-2 mt-4",children:g.map(o=>{let u=t[o],v=Math.round(u/l*100);return jsxRuntime.jsxs("div",{className:"flex items-center",children:[jsxRuntime.jsx("div",{className:`w-3 h-3 rounded-full ${x[o]} mr-2`}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-xs font-medium",children:o==="inProgress"?"In Progress":o==="awaitingVerification"?"Awaiting Verification":o.charAt(0).toUpperCase()+o.slice(1)}),jsxRuntime.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:[u," (",v,"%)"]})]})]},o)})})]})]})},k=()=>{let t={};y.forEach(u=>{let v=new Date(u.createdAt),e=`${v.getFullYear()}-${String(v.getMonth()+1).padStart(2,"0")}`;t[e]=(t[e]||0)+1;});let g=Object.keys(t).sort().slice(-6),x=Math.max(...Object.values(t).filter(u=>u>0),1),o=u=>{let[v,e]=u.split("-");return `${e}/${v.slice(2)}`};return jsxRuntime.jsxs("div",{className:"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-4",children:"Request Timeline"}),g.length===0?jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No data available for the selected timeframe."}):jsxRuntime.jsxs("div",{className:"h-40",children:[jsxRuntime.jsx("div",{className:"flex h-32 items-end justify-between space-x-2",children:g.map(u=>{let v=t[u],e=`${v/x*100}%`;return jsxRuntime.jsx("div",{className:"flex flex-col items-center flex-1",children:jsxRuntime.jsx("div",{className:"w-full bg-[rgb(var(--ndpr-primary))] rounded-t",style:{height:e},title:`${o(u)}: ${v} requests`})},u)})}),jsxRuntime.jsx("div",{className:"flex justify-between mt-2",children:g.map(u=>jsxRuntime.jsx("div",{className:"text-xs text-center",children:o(u)},u))})]})]})},E=()=>jsxRuntime.jsxs("div",{className:"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-4",children:"Overdue Requests"}),B.length===0?jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No overdue requests."}):jsxRuntime.jsx("div",{className:"space-y-2 max-h-60 overflow-y-auto",children:B.map(t=>jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-3 bg-red-50 dark:bg-red-900/20 rounded-md cursor-pointer hover:bg-red-100 dark:hover:bg-red-900/30",i==null?void 0:i.tableRow,s),onClick:()=>M(t.id),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx("h4",{className:"font-medium text-sm",children:t.subject.name}),S(t.type)]}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:t.subject.email}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center",children:[jsxRuntime.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:["Due: ",A(t.dueDate||0)]}),jsxRuntime.jsxs("p",{className:"text-xs font-bold text-red-600 dark:text-red-400",children:["Overdue by ",Math.abs(_(t.dueDate||0))," days"]})]})]},t.id))})]}),m=()=>jsxRuntime.jsxs("div",{className:"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",children:[jsxRuntime.jsx("h3",{className:"text-lg font-medium mb-4",children:"Upcoming Deadlines"}),O.length===0?jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No upcoming deadlines in the next 7 days."}):jsxRuntime.jsx("div",{className:"space-y-2 max-h-60 overflow-y-auto",children:O.map(t=>{let l=_(t.dueDate||0);return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("p-3 bg-yellow-50 dark:bg-yellow-900/20 rounded-md cursor-pointer hover:bg-yellow-100 dark:hover:bg-yellow-900/30",i==null?void 0:i.tableRow,s),onClick:()=>M(t.id),children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsxRuntime.jsx("h4",{className:"font-medium text-sm",children:t.subject.name}),S(t.type)]}),jsxRuntime.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:t.subject.email}),jsxRuntime.jsxs("div",{className:"flex justify-between items-center",children:[jsxRuntime.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:["Due: ",A(t.dueDate||0)]}),jsxRuntime.jsxs("p",{className:`text-xs font-bold ${l<=3?"text-red-600 dark:text-red-400":"text-yellow-600 dark:text-yellow-400"}`,children:["Due in ",l," days"]})]})]},t.id)})})]});return jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${H}`,i==null?void 0:i.root,s),children:[jsxRuntime.jsxs("div",{className:chunkE64TU6IU_js.a("flex flex-col md:flex-row md:justify-between md:items-center mb-6",i==null?void 0:i.header,s),children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("h2",{className:chunkE64TU6IU_js.a("text-xl font-bold mb-2",i==null?void 0:i.title,s),children:$}),jsxRuntime.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:I})]}),jsxRuntime.jsxs("div",{className:"mt-4 md:mt-0",children:[jsxRuntime.jsx("label",{htmlFor:"timeframe",className:"block text-sm font-medium mb-1",children:"Timeframe"}),jsxRuntime.jsxs("select",{id:"timeframe",value:f,onChange:t=>h(t.target.value),className:"px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-[rgb(var(--ndpr-ring))]",children:[jsxRuntime.jsx("option",{value:"7days",children:"Last 7 Days"}),jsxRuntime.jsx("option",{value:"30days",children:"Last 30 Days"}),jsxRuntime.jsx("option",{value:"90days",children:"Last 90 Days"}),jsxRuntime.jsx("option",{value:"all",children:"All Time"})]})]})]}),J&&Q(),jsxRuntime.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[jsxRuntime.jsxs("div",{children:[V&&U(),K&&W()]}),jsxRuntime.jsxs("div",{children:[Y&&k(),F&&E(),F&&m()]})]})]})};exports.a=oe;exports.b=ue;//# sourceMappingURL=chunk-2FWCVWKN.js.map
|
|
2
|
-
//# sourceMappingURL=chunk-2FWCVWKN.js.map
|
package/dist/chunk-3UWT64FI.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-AYKLAEOU.mjs';import {jsxs,jsx}from'react/jsx-runtime';var m={consent:"Consent",dsr:"Data Subject Rights",dpia:"DPIA",breach:"Breach Notification",policy:"Privacy Policy",lawfulBasis:"Lawful Basis",crossBorder:"Cross-Border",ropa:"ROPA"},p={critical:"rgb(var(--ndpr-destructive))","needs-work":"rgb(var(--ndpr-warning))",good:"rgb(var(--ndpr-primary))",excellent:"rgb(var(--ndpr-success))"},x={critical:"Critical","needs-work":"Needs Work",good:"Good",excellent:"Excellent"},f={critical:"Critical",high:"High",medium:"Medium",low:"Low"},y=({score:t,rating:e,classNames:o,unstyled:a$1})=>{let r=p[e],i=2*Math.PI*40,l=i*(1-t/100);return jsxs("div",{className:a("relative inline-flex items-center justify-center",o==null?void 0:o.scoreCircle,a$1),children:[jsxs("svg",{width:"120",height:"120",viewBox:"0 0 100 100","aria-hidden":"true",children:[jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"rgba(0,0,0,0.08)",strokeWidth:"8"}),jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:r,strokeWidth:"8",strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:l,transform:"rotate(-90 50 50)",style:{transition:"stroke-dashoffset 0.4s ease"}})]}),jsx("span",{className:a("absolute text-2xl font-bold tabular-nums",o==null?void 0:o.scoreValue,a$1),style:{color:r},children:t})]})},C=({rating:t,className:e,unstyled:o})=>{let a$1=p[t];return jsx("span",{className:a("inline-block px-3 py-1 rounded-full text-sm font-semibold",e,o),style:{backgroundColor:`${a$1.replace("rgb(","rgba(").replace(")",", 0.12)")}`,color:a$1,border:`1px solid ${a$1.replace("rgb(","rgba(").replace(")",", 0.3)")}`},children:x[t]})},h=({moduleKey:t,module:e,classNames:o,unstyled:a$1})=>{var b;let r=e.score>=90?"excellent":e.score>=70?"good":e.score>=40?"needs-work":"critical",i=p[r];Math.round(e.score/100*(e.gaps.length+Math.round(e.score/100*5)));let u=e.gaps.length,c=(b=m[t])!=null?b:t;return jsxs("div",{className:a("rounded-lg border p-4 flex flex-col gap-2",o==null?void 0:o.moduleCard,a$1),style:{borderColor:`${i.replace("rgb(","rgba(").replace(")",", 0.25)")}`,backgroundColor:`${i.replace("rgb(","rgba(").replace(")",", 0.04)")}`},children:[jsxs("div",{className:"flex items-center justify-between",children:[jsx("span",{className:a("text-sm font-semibold truncate",o==null?void 0:o.moduleTitle,a$1),children:c}),jsx("span",{className:a("text-lg font-bold tabular-nums",o==null?void 0:o.moduleScore,a$1),style:{color:i},children:e.score})]}),jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{backgroundColor:"rgba(0,0,0,0.08)"},role:"progressbar","aria-valuenow":e.score,"aria-valuemin":0,"aria-valuemax":100,children:jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${e.score}%`,backgroundColor:i}})}),u>0&&jsxs("p",{className:a("text-xs text-gray-500 dark:text-gray-400",o==null?void 0:o.moduleGaps,a$1),children:[u," gap",u!==1?"s":""," to address"]})]})},R=({rec:t,classNames:e,unstyled:o})=>{var i,l;let r=(i={critical:p.critical,high:p["needs-work"],medium:p.good,low:p.excellent}[t.priority])!=null?i:p.good;return jsxs("div",{"data-testid":"recommendation-item",className:a("flex gap-3 p-3 rounded-lg border border-gray-100 dark:border-gray-700 bg-white dark:bg-gray-800",e==null?void 0:e.recommendationItem,o),children:[jsx("span",{className:a("mt-0.5 shrink-0 inline-block px-2 py-0.5 rounded text-xs font-bold uppercase tracking-wide",e==null?void 0:e.recommendationPriority,o),style:{backgroundColor:`${r.replace("rgb(","rgba(").replace(")",", 0.12)")}`,color:r},children:(l=f[t.priority])!=null?l:t.priority}),jsxs("div",{className:"min-w-0 flex-1",children:[jsx("p",{className:a("text-sm font-medium text-gray-900 dark:text-gray-100",e==null?void 0:e.recommendationTitle,o),children:t.label}),jsx("p",{className:"mt-0.5 text-xs text-gray-500 dark:text-gray-400 leading-relaxed",children:t.recommendation}),jsxs("p",{className:"mt-1 text-xs text-gray-400 dark:text-gray-500",children:[t.ndpaSection," \u2022 Effort: ",t.effort]})]})]})},k=({report:t,title:e="NDPA Compliance Dashboard",showRecommendations:o=true,maxRecommendations:a$1=5,classNames:r,unstyled:i=false})=>{let l=t.recommendations.slice(0,a$1),u=Object.entries(t.modules);return jsxs("div",{"data-ndpr-component":"compliance-dashboard",className:a("w-full rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 shadow-sm p-6 flex flex-col gap-8",r==null?void 0:r.root,i),children:[jsxs("div",{className:a("flex flex-col sm:flex-row items-start sm:items-center gap-6",r==null?void 0:r.header,i),children:[jsx(y,{score:t.score,rating:t.rating,classNames:{scoreCircle:r==null?void 0:r.scoreCircle,scoreValue:r==null?void 0:r.scoreValue},unstyled:i}),jsxs("div",{className:"flex flex-col gap-2",children:[jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-gray-100 leading-tight",children:e}),jsx(C,{rating:t.rating,className:r==null?void 0:r.ratingBadge,unstyled:i}),jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Generated on"," ",new Date(t.generatedAt).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})]})]})]}),jsx("div",{className:a("grid grid-cols-2 sm:grid-cols-2 md:grid-cols-4 gap-3",r==null?void 0:r.modulesGrid,i),children:u.map(([c,b])=>jsx(h,{moduleKey:c,module:b,classNames:{moduleCard:r==null?void 0:r.moduleCard,moduleTitle:r==null?void 0:r.moduleTitle,moduleScore:r==null?void 0:r.moduleScore,moduleGaps:r==null?void 0:r.moduleGaps},unstyled:i},c))}),o&&l.length>0&&jsxs("div",{className:a("flex flex-col gap-3",r==null?void 0:r.recommendationsSection,i),children:[jsx("h3",{className:"text-base font-semibold text-gray-900 dark:text-gray-100",children:"Recommendations"}),l.map(c=>jsx(R,{rec:c,classNames:{recommendationItem:r==null?void 0:r.recommendationItem,recommendationPriority:r==null?void 0:r.recommendationPriority,recommendationTitle:r==null?void 0:r.recommendationTitle},unstyled:i},`${c.module}-${c.key}`))]})]})};export{k as a};//# sourceMappingURL=chunk-3UWT64FI.mjs.map
|
|
2
|
-
//# sourceMappingURL=chunk-3UWT64FI.mjs.map
|