@tantainnovative/ndpr-toolkit 3.0.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PolicyExporter-BIqSVjfC.d.mts → PolicyExporter-Bgi6nz82.d.mts} +93 -1
- package/dist/{PolicyExporter-BNWaPBGU.d.ts → PolicyExporter-BnvuFncj.d.ts} +93 -1
- package/dist/adapters.js +1 -1
- package/dist/adapters.mjs +1 -1
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-256APOQM.js +2 -0
- package/dist/chunk-2FWCVWKN.js +2 -0
- package/dist/chunk-3DJGO6WG.js +2 -0
- package/dist/chunk-44W4H2EY.js +2 -0
- package/dist/chunk-4XCL62MJ.mjs +2 -0
- package/dist/chunk-555WWZ3W.js +2 -0
- package/dist/chunk-6BXUVS6E.js +81 -0
- package/dist/{chunk-KHRBU5K7.js → chunk-6RQGQZT2.js} +2 -2
- package/dist/chunk-6TA2MVTU.mjs +2 -0
- package/dist/chunk-6WIP33TW.mjs +2 -0
- package/dist/{chunk-2ORDHJRD.js → chunk-7AVN424U.js} +2 -2
- package/dist/{chunk-5VMHKNJY.js → chunk-7SMLHZ4B.js} +2 -2
- package/dist/chunk-A4PK7JB2.js +2 -0
- package/dist/chunk-ABDB7LEV.mjs +2 -0
- package/dist/chunk-BKRETVJ6.js +2 -0
- package/dist/chunk-CWUPGY3M.mjs +3 -0
- package/dist/chunk-DJGS7SSN.mjs +2 -0
- package/dist/{chunk-SVCRYM4I.mjs → chunk-E4NCJ7RD.mjs} +2 -2
- package/dist/chunk-E63VPR7U.js +2 -0
- package/dist/chunk-EH2I4L7M.mjs +316 -0
- package/dist/chunk-ELKB2AFZ.js +2 -0
- package/dist/chunk-FDDI426Y.mjs +2 -0
- package/dist/chunk-FOXZRRMW.mjs +2 -0
- package/dist/chunk-GCQRHMTQ.mjs +144 -0
- package/dist/chunk-GKKAK6ES.mjs +3 -0
- package/dist/chunk-GOD4LA2J.mjs +2 -0
- package/dist/{chunk-SWF3YVE5.js → chunk-GOU6FU6Y.js} +3 -3
- package/dist/chunk-HO5M7M4M.js +2 -0
- package/dist/chunk-I23WPZNQ.mjs +94 -0
- package/dist/chunk-I4M2AA3N.js +2 -0
- package/dist/chunk-I54CDQGN.js +3 -0
- package/dist/{chunk-6D3ZUGBB.mjs → chunk-IR7VCBWV.mjs} +2 -2
- package/dist/{chunk-4VVARDN2.mjs → chunk-K45S6YQV.mjs} +2 -2
- package/dist/chunk-KBAFOVE3.js +2 -0
- package/dist/{chunk-P7BSBCB3.js → chunk-KBP26GLC.js} +2 -2
- package/dist/chunk-KVOGOLIR.js +316 -0
- package/dist/chunk-LU4PFST7.js +144 -0
- package/dist/chunk-MDWG2KDA.mjs +2 -0
- package/dist/chunk-NN233SGA.mjs +3 -0
- package/dist/chunk-NRQELKAE.js +2 -0
- package/dist/chunk-NUDVUAD4.mjs +81 -0
- package/dist/chunk-NXQMU36Z.mjs +2 -0
- package/dist/chunk-P42Z5CFE.js +2 -0
- package/dist/chunk-PATONNTZ.mjs +2 -0
- package/dist/{chunk-WLSW4Z4W.mjs → chunk-PM7O5IGE.mjs} +2 -2
- package/dist/chunk-Q7VHB64E.mjs +2 -0
- package/dist/{chunk-PEH5GIMN.js → chunk-QH6YUVJS.js} +2 -2
- package/dist/chunk-QY7PD5XB.js +94 -0
- package/dist/chunk-R3OYAJI6.mjs +2 -0
- package/dist/chunk-S4GRSNB4.js +2 -0
- package/dist/chunk-SAA7UVI2.js +3 -0
- package/dist/{chunk-PYEX7DFR.mjs → chunk-SHMJNRHO.mjs} +3 -3
- package/dist/chunk-TVW6KBVV.mjs +2 -0
- package/dist/chunk-U62QYKVG.mjs +2 -0
- package/dist/chunk-UDNRAQLE.js +3 -0
- package/dist/{chunk-5RSOLEEP.js → chunk-UXMGBIX6.js} +4 -4
- package/dist/{chunk-UZ5EZOA7.js → chunk-VK27WVV3.js} +2 -2
- package/dist/{chunk-G26I6MP5.mjs → chunk-VWPGIES4.mjs} +2 -2
- package/dist/{chunk-NPLXE43Q.mjs → chunk-XQ4M5FHC.mjs} +2 -2
- package/dist/{chunk-CAB7O3GR.mjs → chunk-ZEOQYWOE.mjs} +4 -4
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +9 -46
- package/dist/core.d.ts +9 -46
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/dpia.js +1 -1
- package/dist/dpia.mjs +1 -1
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +2 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- 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-C-tShzZH.d.mts +154 -0
- package/dist/policy-engine-DSQpT55_.d.ts +154 -0
- package/dist/policy-sections-CfNVBLCh.d.mts +54 -0
- package/dist/policy-sections-DqH0iZRf.d.ts +54 -0
- package/dist/policy.d.mts +86 -5
- package/dist/policy.d.ts +86 -5
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets.d.mts +5 -15
- package/dist/presets.d.ts +5 -15
- 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 +147 -0
- package/dist/sanitize-9mOO_cJW.d.ts +147 -0
- package/dist/useAdaptivePolicyWizard-B9Op2gYM.d.ts +52 -0
- package/dist/useAdaptivePolicyWizard-N4eUM4Tj.d.mts +52 -0
- package/package.json +9 -3
- package/dist/PolicyGenerator-BvcWPbxp.d.mts +0 -96
- package/dist/PolicyGenerator-BzRwtlgn.d.ts +0 -96
- package/dist/chunk-27NYSWUG.mjs +0 -2
- package/dist/chunk-2SYNHRP6.mjs +0 -2
- package/dist/chunk-2W7ARAW2.js +0 -2
- package/dist/chunk-3F34NACG.js +0 -2
- package/dist/chunk-3RGJV3VF.js +0 -7
- package/dist/chunk-3V23O4ZJ.js +0 -2
- package/dist/chunk-3XAUN5IM.mjs +0 -3
- package/dist/chunk-6E54NSAO.mjs +0 -2
- package/dist/chunk-7F5F5YWI.mjs +0 -2
- package/dist/chunk-7FIUX3ZM.js +0 -89
- package/dist/chunk-CMZTI7SG.js +0 -2
- package/dist/chunk-EPF7J2FK.js +0 -3
- package/dist/chunk-FR7ZYZXB.js +0 -2
- package/dist/chunk-FXTZDKDC.mjs +0 -3
- package/dist/chunk-GIV2OHE6.mjs +0 -2
- package/dist/chunk-GPJVTGHR.mjs +0 -2
- package/dist/chunk-GVANK6PL.js +0 -3
- package/dist/chunk-HNZK7LY3.mjs +0 -2
- package/dist/chunk-IKEPXHCZ.js +0 -2
- package/dist/chunk-ILCNDOBU.js +0 -2
- package/dist/chunk-IQQW52EF.js +0 -2
- package/dist/chunk-ISSGO2YT.mjs +0 -72
- package/dist/chunk-J6IKAGUP.mjs +0 -89
- package/dist/chunk-KNE4NXCY.mjs +0 -7
- package/dist/chunk-LFNA6WYQ.mjs +0 -2
- package/dist/chunk-PGSA2O5P.mjs +0 -2
- package/dist/chunk-RGYK4VAY.mjs +0 -2
- package/dist/chunk-RSUDIFZV.mjs +0 -2
- package/dist/chunk-RYZEIDNR.js +0 -2
- package/dist/chunk-SBNAMPAP.mjs +0 -2
- package/dist/chunk-SSGJREE3.js +0 -2
- package/dist/chunk-U6VWHC46.js +0 -72
- package/dist/chunk-UK656RCG.js +0 -2
- package/dist/chunk-UOSEH6DC.js +0 -2
- package/dist/chunk-VDZKGCAF.js +0 -2
- package/dist/chunk-WSHSHIIM.mjs +0 -2
- package/dist/chunk-XSK4BSZJ.mjs +0 -2
- package/dist/chunk-Y34DQYS7.js +0 -2
- package/dist/chunk-YJCGEOLO.mjs +0 -2
- package/dist/chunk-ZCZ5RRZO.js +0 -2
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
'use strict';var chunkLU4PFST7_js=require('./chunk-LU4PFST7.js'),chunkELKB2AFZ_js=require('./chunk-ELKB2AFZ.js'),chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js'),react=require('react');function M(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ce(r){return r.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function Le(r){let u=r.split(`
|
|
2
|
+
`),v=[],e=false;for(let a of u){let s=a.trimEnd();s.startsWith("- ")||s.startsWith("\u2022 ")?(e||(v.push("<ul>"),e=true),v.push(` <li>${M(s.replace(/^[-•]\s*/,""))}</li>`)):(e&&(v.push("</ul>"),e=false),s.trim()===""||v.push(`<p>${M(s)}</p>`));}return e&&v.push("</ul>"),v.join(`
|
|
3
|
+
`)}var Ne=`
|
|
4
|
+
/* \u2500\u2500 Reset & Base \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
5
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
6
|
+
|
|
7
|
+
/* \u2500\u2500 Design tokens \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
8
|
+
:root {
|
|
9
|
+
--color-bg: #ffffff;
|
|
10
|
+
--color-surface: #f9fafb;
|
|
11
|
+
--color-border: #e5e7eb;
|
|
12
|
+
--color-text: #111827;
|
|
13
|
+
--color-text-muted: #6b7280;
|
|
14
|
+
--color-accent: #16a34a;
|
|
15
|
+
--color-accent-light: #dcfce7;
|
|
16
|
+
--color-heading: #064e3b;
|
|
17
|
+
--color-link: #15803d;
|
|
18
|
+
--color-link-hover: #166534;
|
|
19
|
+
--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
20
|
+
--font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
|
|
21
|
+
--radius: 8px;
|
|
22
|
+
--shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
|
|
23
|
+
--max-width: 860px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (prefers-color-scheme: dark) {
|
|
27
|
+
:root {
|
|
28
|
+
--color-bg: #0f172a;
|
|
29
|
+
--color-surface: #1e293b;
|
|
30
|
+
--color-border: #334155;
|
|
31
|
+
--color-text: #f1f5f9;
|
|
32
|
+
--color-text-muted: #94a3b8;
|
|
33
|
+
--color-accent: #22c55e;
|
|
34
|
+
--color-accent-light: #14532d;
|
|
35
|
+
--color-heading: #86efac;
|
|
36
|
+
--color-link: #4ade80;
|
|
37
|
+
--color-link-hover: #86efac;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* \u2500\u2500 Layout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
42
|
+
html { font-size: 16px; scroll-behavior: smooth; }
|
|
43
|
+
|
|
44
|
+
body {
|
|
45
|
+
font-family: var(--font-sans);
|
|
46
|
+
background: var(--color-bg);
|
|
47
|
+
color: var(--color-text);
|
|
48
|
+
line-height: 1.7;
|
|
49
|
+
padding: 2rem 1.25rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.policy-wrapper {
|
|
53
|
+
max-width: var(--max-width);
|
|
54
|
+
margin: 0 auto;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
58
|
+
.policy-header {
|
|
59
|
+
background: var(--color-surface);
|
|
60
|
+
border: 1px solid var(--color-border);
|
|
61
|
+
border-radius: var(--radius);
|
|
62
|
+
padding: 2.5rem 2.5rem 2rem;
|
|
63
|
+
margin-bottom: 2rem;
|
|
64
|
+
box-shadow: var(--shadow);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.policy-header h1 {
|
|
68
|
+
font-size: 2rem;
|
|
69
|
+
font-weight: 700;
|
|
70
|
+
color: var(--color-heading);
|
|
71
|
+
line-height: 1.2;
|
|
72
|
+
margin-bottom: 0.75rem;
|
|
73
|
+
letter-spacing: -0.025em;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.policy-meta {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
gap: 0.5rem 1.5rem;
|
|
80
|
+
font-size: 0.875rem;
|
|
81
|
+
color: var(--color-text-muted);
|
|
82
|
+
margin-top: 0.5rem;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.policy-meta span { white-space: nowrap; }
|
|
86
|
+
|
|
87
|
+
.compliance-badge {
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 0.35rem;
|
|
91
|
+
background: var(--color-accent-light);
|
|
92
|
+
color: var(--color-accent);
|
|
93
|
+
font-size: 0.75rem;
|
|
94
|
+
font-weight: 600;
|
|
95
|
+
padding: 0.25rem 0.75rem;
|
|
96
|
+
border-radius: 9999px;
|
|
97
|
+
margin-top: 1rem;
|
|
98
|
+
letter-spacing: 0.01em;
|
|
99
|
+
border: 1px solid var(--color-accent);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* \u2500\u2500 Navigation / TOC \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
103
|
+
.policy-toc {
|
|
104
|
+
background: var(--color-surface);
|
|
105
|
+
border: 1px solid var(--color-border);
|
|
106
|
+
border-left: 4px solid var(--color-accent);
|
|
107
|
+
border-radius: var(--radius);
|
|
108
|
+
padding: 1.5rem 2rem;
|
|
109
|
+
margin-bottom: 2.5rem;
|
|
110
|
+
box-shadow: var(--shadow);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.policy-toc h2 {
|
|
114
|
+
font-size: 1rem;
|
|
115
|
+
font-weight: 700;
|
|
116
|
+
text-transform: uppercase;
|
|
117
|
+
letter-spacing: 0.08em;
|
|
118
|
+
color: var(--color-text-muted);
|
|
119
|
+
margin-bottom: 1rem;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.policy-toc ol {
|
|
123
|
+
list-style: decimal;
|
|
124
|
+
padding-left: 1.25rem;
|
|
125
|
+
column-count: 1;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (min-width: 600px) {
|
|
129
|
+
.policy-toc ol { column-count: 2; column-gap: 2rem; }
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.policy-toc li { margin-bottom: 0.35rem; break-inside: avoid; }
|
|
133
|
+
|
|
134
|
+
.policy-toc a {
|
|
135
|
+
color: var(--color-link);
|
|
136
|
+
text-decoration: none;
|
|
137
|
+
font-size: 0.9375rem;
|
|
138
|
+
transition: color 0.15s ease;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.policy-toc a:hover { color: var(--color-link-hover); text-decoration: underline; }
|
|
142
|
+
|
|
143
|
+
/* \u2500\u2500 Article / Sections \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
144
|
+
article.policy-body { display: flex; flex-direction: column; gap: 2.5rem; }
|
|
145
|
+
|
|
146
|
+
.policy-section {
|
|
147
|
+
background: var(--color-surface);
|
|
148
|
+
border: 1px solid var(--color-border);
|
|
149
|
+
border-radius: var(--radius);
|
|
150
|
+
padding: 2rem 2.5rem;
|
|
151
|
+
box-shadow: var(--shadow);
|
|
152
|
+
scroll-margin-top: 1.5rem;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.policy-section h2 {
|
|
156
|
+
font-size: 1.25rem;
|
|
157
|
+
font-weight: 700;
|
|
158
|
+
color: var(--color-heading);
|
|
159
|
+
margin-bottom: 1.25rem;
|
|
160
|
+
padding-bottom: 0.75rem;
|
|
161
|
+
border-bottom: 2px solid var(--color-accent-light);
|
|
162
|
+
display: flex;
|
|
163
|
+
align-items: baseline;
|
|
164
|
+
gap: 0.5rem;
|
|
165
|
+
line-height: 1.3;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.section-number {
|
|
169
|
+
font-size: 0.75rem;
|
|
170
|
+
font-weight: 700;
|
|
171
|
+
background: var(--color-accent);
|
|
172
|
+
color: #fff;
|
|
173
|
+
width: 1.5rem;
|
|
174
|
+
height: 1.5rem;
|
|
175
|
+
display: inline-flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
border-radius: 50%;
|
|
179
|
+
flex-shrink: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.policy-section p {
|
|
183
|
+
margin-bottom: 0.875rem;
|
|
184
|
+
font-size: 0.9375rem;
|
|
185
|
+
color: var(--color-text);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.policy-section p:last-child { margin-bottom: 0; }
|
|
189
|
+
|
|
190
|
+
.policy-section ul {
|
|
191
|
+
margin: 0.75rem 0 0.875rem 1.5rem;
|
|
192
|
+
display: flex;
|
|
193
|
+
flex-direction: column;
|
|
194
|
+
gap: 0.35rem;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.policy-section ul li {
|
|
198
|
+
font-size: 0.9375rem;
|
|
199
|
+
color: var(--color-text);
|
|
200
|
+
position: relative;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.policy-section ul li::marker { color: var(--color-accent); }
|
|
204
|
+
|
|
205
|
+
/* \u2500\u2500 Footer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
206
|
+
.policy-footer {
|
|
207
|
+
margin-top: 3rem;
|
|
208
|
+
padding: 1.5rem 2rem;
|
|
209
|
+
border-top: 1px solid var(--color-border);
|
|
210
|
+
text-align: center;
|
|
211
|
+
font-size: 0.8125rem;
|
|
212
|
+
color: var(--color-text-muted);
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
gap: 0.35rem;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.policy-footer a { color: var(--color-link); text-decoration: none; }
|
|
219
|
+
.policy-footer a:hover { text-decoration: underline; }
|
|
220
|
+
|
|
221
|
+
/* \u2500\u2500 Print styles \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
222
|
+
@media print {
|
|
223
|
+
:root {
|
|
224
|
+
--color-bg: #fff;
|
|
225
|
+
--color-surface: #fff;
|
|
226
|
+
--color-border: #d1d5db;
|
|
227
|
+
--color-text: #000;
|
|
228
|
+
--color-text-muted: #374151;
|
|
229
|
+
--color-accent: #16a34a;
|
|
230
|
+
--color-accent-light: #f0fdf4;
|
|
231
|
+
--color-heading: #064e3b;
|
|
232
|
+
--color-link: #15803d;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
body { padding: 0; font-size: 10pt; }
|
|
236
|
+
.policy-wrapper { max-width: 100%; }
|
|
237
|
+
|
|
238
|
+
.policy-toc { break-inside: avoid; }
|
|
239
|
+
.policy-section { break-inside: avoid; box-shadow: none; border: 1px solid #d1d5db; }
|
|
240
|
+
|
|
241
|
+
.policy-toc ol { column-count: 2; }
|
|
242
|
+
.policy-footer { border-top: 1px solid #d1d5db; }
|
|
243
|
+
|
|
244
|
+
a { color: inherit; text-decoration: none; }
|
|
245
|
+
}
|
|
246
|
+
`.trim();function ee(r,u){var R;let v=(u==null?void 0:u.includeStyles)!==false,e=(R=u==null?void 0:u.customCSS)!=null?R:"",a=r.sections.filter(d=>d.included),s=M(r.organizationInfo.name||"Organisation"),t=M(r.title||"Privacy Policy"),l=M(r.version||"1.0"),c=r.effectiveDate?new Date(r.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),y=r.lastUpdated?new Date(r.lastUpdated).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):c,C=r.organizationInfo.website?`<a href="${M(r.organizationInfo.website)}" target="_blank" rel="noopener">${M(r.organizationInfo.website)}</a>`:"",x=r.organizationInfo.privacyEmail?`<a href="mailto:${M(r.organizationInfo.privacyEmail)}">${M(r.organizationInfo.privacyEmail)}</a>`:"",F=`
|
|
247
|
+
<nav class="policy-toc" aria-label="Table of Contents">
|
|
248
|
+
<h2>Table of Contents</h2>
|
|
249
|
+
<ol>
|
|
250
|
+
${a.map((d,w)=>` <li><a href="#${ce(d.title)}">${M(d.title)}</a></li>`).join(`
|
|
251
|
+
`)}
|
|
252
|
+
</ol>
|
|
253
|
+
</nav>`,k=a.map((d,w)=>{let p=ce(d.title),T=d.template||d.defaultContent||"",b=Le(T);return ` <section class="policy-section" id="${p}" aria-labelledby="section-heading-${p}">
|
|
254
|
+
<h2 id="section-heading-${p}">
|
|
255
|
+
<span class="section-number" aria-hidden="true">${w+1}</span>
|
|
256
|
+
${M(d.title)}
|
|
257
|
+
</h2>
|
|
258
|
+
${b}
|
|
259
|
+
</section>`}).join(`
|
|
260
|
+
|
|
261
|
+
`),z=e?e.replace(/<\/style>/gi,""):"",L=v?`<style>
|
|
262
|
+
${Ne}
|
|
263
|
+
${z?`
|
|
264
|
+
/* \u2500\u2500 Custom styles \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
265
|
+
${z}`:""}
|
|
266
|
+
</style>`:z?`<style>${z}</style>`:"";return `<!DOCTYPE html>
|
|
267
|
+
<html lang="en">
|
|
268
|
+
<head>
|
|
269
|
+
<meta charset="UTF-8" />
|
|
270
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
271
|
+
<meta name="description" content="Privacy Policy for ${s}" />
|
|
272
|
+
<meta name="generator" content="NDPA Toolkit" />
|
|
273
|
+
<title>${t} \u2014 ${s}</title>
|
|
274
|
+
${L}
|
|
275
|
+
</head>
|
|
276
|
+
<body>
|
|
277
|
+
<div class="policy-wrapper">
|
|
278
|
+
|
|
279
|
+
<header class="policy-header">
|
|
280
|
+
<h1>${t}</h1>
|
|
281
|
+
<div class="policy-meta">
|
|
282
|
+
<span><strong>Organisation:</strong> ${s}</span>
|
|
283
|
+
<span><strong>Effective:</strong> ${c}</span>
|
|
284
|
+
<span><strong>Version:</strong> ${l}</span>
|
|
285
|
+
${y!==c?`<span><strong>Last updated:</strong> ${y}</span>`:""}
|
|
286
|
+
</div>
|
|
287
|
+
<div>
|
|
288
|
+
<span class="compliance-badge" role="img" aria-label="NDPA compliant">✓ NDPA 2023 Compliant</span>
|
|
289
|
+
</div>
|
|
290
|
+
</header>
|
|
291
|
+
|
|
292
|
+
${F}
|
|
293
|
+
|
|
294
|
+
<article class="policy-body" aria-label="Policy content">
|
|
295
|
+
|
|
296
|
+
${k}
|
|
297
|
+
|
|
298
|
+
</article>
|
|
299
|
+
|
|
300
|
+
<footer class="policy-footer" role="contentinfo">
|
|
301
|
+
<div>${s}${C?` — ${C}`:""}</div>
|
|
302
|
+
${x?`<div>Privacy contact: ${x}</div>`:""}
|
|
303
|
+
<div>Effective ${c} • Version ${l}</div>
|
|
304
|
+
<div>Generated by <strong>NDPA Toolkit</strong> — Nigeria Data Protection Act 2023</div>
|
|
305
|
+
</footer>
|
|
306
|
+
|
|
307
|
+
</div>
|
|
308
|
+
</body>
|
|
309
|
+
</html>`}function Ie(r){return r.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function te(r){let u=r.sections.filter(l=>l.included),v=r.title||"Privacy Policy",e=r.organizationInfo.name||"Organisation",a=r.version||"1.0",s=r.effectiveDate?new Date(r.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),t=[];return t.push(`# ${v}`),t.push(""),t.push(`_Effective: ${s} | Version: ${a} | ${e}_`),t.push(""),r.organizationInfo.website&&t.push(`**Website:** ${r.organizationInfo.website} `),r.organizationInfo.privacyEmail&&t.push(`**Privacy contact:** ${r.organizationInfo.privacyEmail} `),(r.organizationInfo.website||r.organizationInfo.privacyEmail)&&t.push(""),t.push("> This privacy policy is compliant with the **Nigeria Data Protection Act (NDPA) 2023**."),t.push(""),t.push("---"),t.push(""),u.length>0&&(t.push("## Table of Contents"),t.push(""),u.forEach((l,c)=>{let y=Ie(`${c+1} ${l.title}`);t.push(`${c+1}. [${l.title}](#${y})`);}),t.push(""),t.push("---"),t.push("")),u.forEach((l,c)=>{t.push(`## ${c+1}. ${l.title}`),t.push("");let y=(l.template||l.defaultContent||"").trim();if(y){let C=y.split(`
|
|
310
|
+
`);for(let x of C){let D=x.trimEnd();D.startsWith("-")||D.startsWith("\u2022")||D===""?t.push(D.replace(/^•/,"-")):t.push(D);}}t.push(""),t.push("---"),t.push("");}),t.push(`_Generated by **NDPA Toolkit** \u2014 ${e} \u2022 Version ${a}_`),t.push(""),t.join(`
|
|
311
|
+
`)}function oe(r,u){return chunkMQFZHA2D_js.d(this,null,function*(){var R;let v;try{let d=yield import('jspdf');v=(R=d.jsPDF)!=null?R:d.default;}catch(d){throw new Error('The "jspdf" package is required for PDF export. Install it with: pnpm add jspdf')}let e=new v({unit:"mm",format:"a4"}),a=e.internal.pageSize.getWidth(),s=e.internal.pageSize.getHeight(),t=20,l=a-t*2,c=t,y=r.organizationInfo.name||"",C=r.title||"Privacy Policy",x=r.version||"1.0",D=r.effectiveDate?new Date(r.effectiveDate).toLocaleDateString():new Date().toLocaleDateString(),F=()=>{e.setFontSize(8),e.setFont("helvetica","italic"),e.setTextColor(150,150,150),e.text(y?`${y} \u2014 ${C}`:C,t,12),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,14,a-t,14),e.setTextColor(0,0,0);},k=d=>{c+d>s-t-10&&(e.addPage(),c=t+8,F());};if((u==null?void 0:u.includeCoverPage)!==false){e.setFillColor(22,163,74),e.rect(0,0,a,12,"F"),e.setFontSize(28),e.setFont("helvetica","bold"),e.setTextColor(22,163,74);let d=e.splitTextToSize(C,l-10),w=72;d.forEach(T=>{e.text(T,a/2,w,{align:"center"}),w+=11;}),e.setDrawColor(22,163,74),e.setLineWidth(.6);let p=w+6;if(e.line(a/2-30,p,a/2+30,p),e.setFontSize(14),e.setFont("helvetica","normal"),e.setTextColor(40,40,40),e.text(y,a/2,p+14,{align:"center"}),e.setFontSize(10),e.setTextColor(100,100,100),e.text(`Effective Date: ${D}`,a/2,p+26,{align:"center"}),e.text(`Version ${x}`,a/2,p+34,{align:"center"}),(u==null?void 0:u.includeComplianceBadge)!==false){let T=p+52,b="Compliant with the Nigeria Data Protection Act (NDPA) 2023";e.setFontSize(8.5),e.setFont("helvetica","bold"),e.setTextColor(255,255,255);let f=e.getTextWidth(b),m=7,_=3.5,H=(a-f-m*2)/2;e.setFillColor(22,163,74),e.roundedRect(H,T-_-1,f+m*2,7+_,2,2,"F"),e.text(b,a/2,T+1.5,{align:"center"}),e.setTextColor(0,0,0);}e.setFillColor(22,163,74),e.rect(0,s-12,a,12,"F"),e.addPage(),c=t+8,F();}let z=r.sections.filter(d=>d.included);(u==null?void 0:u.includeTOC)!==false&&(e.setFontSize(18),e.setFont("helvetica","bold"),e.setTextColor(22,163,74),e.text("Table of Contents",t,c+4),e.setDrawColor(22,163,74),e.setLineWidth(.5),e.line(t,c+8,t+80,c+8),c+=18,e.setFontSize(10.5),e.setFont("helvetica","normal"),e.setTextColor(40,40,40),z.forEach((d,w)=>{k(7);let p=`${w+1}. ${d.title}`;e.text(p,t+4,c),c+=6.5;}),e.addPage(),c=t+8,F()),z.forEach((d,w)=>{k(18),e.setFillColor(22,163,74),e.circle(t+3.5,c-1.5,3.8,"F"),e.setFontSize(8),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text(String(w+1),t+3.5,c-.5,{align:"center"}),e.setFontSize(13),e.setFont("helvetica","bold"),e.setTextColor(22,163,74),e.text(d.title,t+11,c),c+=3,e.setDrawColor(200,200,200),e.setLineWidth(.25),e.line(t+11,c,a-t,c),c+=6;let p=(d.template||d.defaultContent||"").trim();if(p){let T=p.split(`
|
|
312
|
+
`);e.setFontSize(9.5),e.setFont("helvetica","normal"),e.setTextColor(50,50,50),T.forEach(b=>{let f=b.trimEnd();if(f===""){c+=3;return}let m=f.startsWith("-")||f.startsWith("\u2022"),_=m?t+8:t+4,H=m?f.replace(/^[-•]\s*/,""):f,A=l-(m?12:8);e.splitTextToSize(H,A).forEach((X,Z)=>{k(5),m&&Z===0&&(e.setFillColor(22,163,74),e.circle(t+4,c-1,.9,"F")),e.text(X,_,c),c+=5;});});}c+=10;});let L=e.getNumberOfPages();for(let d=1;d<=L;d++)e.setPage(d),e.setFontSize(7.5),e.setFont("helvetica","normal"),e.setTextColor(160,160,160),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,s-12,a-t,s-12),e.text(y?`${y} \u2014 Privacy Policy`:"Privacy Policy",t,s-8),e.text(`Page ${d} of ${L}`,a-t,s-8,{align:"right"}),e.setTextColor(0,0,0);return e.setProperties({title:C,author:y,subject:"Privacy Policy \u2014 NDPA 2023 Compliant",keywords:"privacy policy, NDPA, Nigeria, data protection"}),e.output("blob")})}function re(r,u){return chunkMQFZHA2D_js.d(this,null,function*(){let v;try{v=yield import('docx');}catch(b){throw new Error('The "docx" package is required for Word export. Install it with: pnpm add docx')}let{Document:e,Paragraph:a,TextRun:s,HeadingLevel:t,Packer:l,Header:c,Footer:y,PageNumber:C,AlignmentType:x,BorderStyle:D,ShadingType:F,TableOfContents:k}=v,z=r.organizationInfo.name||"",L=r.title||"Privacy Policy",R=r.version||"1.0",d=r.effectiveDate?new Date(r.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),w=r.sections.filter(b=>b.included),p=[];if(p.push(new a({children:[new s({text:L,bold:true,size:52,color:"064e3b"})],heading:t.TITLE,spacing:{after:160},alignment:x.CENTER})),p.push(new a({children:[new s({text:`${z}${z?" \u2022 ":""}Version ${R} \u2022 Effective ${d}`,size:20,color:"6b7280",italics:true})],spacing:{after:120},alignment:x.CENTER})),p.push(new a({children:[new s({text:"Compliant with the Nigeria Data Protection Act (NDPA) 2023",size:18,color:"16a34a",bold:true})],spacing:{after:400},alignment:x.CENTER})),p.push(new a({children:[],spacing:{after:200},border:{bottom:{color:"16a34a",style:D.SINGLE,size:6,space:1}}})),(u==null?void 0:u.includeTOC)!==false){if(p.push(new a({children:[new s({text:"Table of Contents",bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200}})),typeof k=="function")try{p.push(new k("Table of Contents",{hyperlink:!0,headingStyleRange:"1-1"}));}catch(b){w.forEach((f,m)=>{p.push(new a({children:[new s({text:`${m+1}. ${f.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});}else w.forEach((b,f)=>{p.push(new a({children:[new s({text:`${f+1}. ${b.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});p.push(new a({children:[],pageBreakBefore:true}));}w.forEach((b,f)=>{p.push(new a({children:[new s({text:`${f+1}. ${b.title}`,bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200},border:{bottom:{color:"dcfce7",style:D.SINGLE,size:4,space:1}}}));let m=(b.template||b.defaultContent||"").trim();m&&m.split(`
|
|
313
|
+
`).forEach(H=>{let A=H.trimEnd();if(A===""){p.push(new a({children:[],spacing:{after:60}}));return}let N=A.startsWith("- ")||A.startsWith("\u2022 "),X=N?A.replace(/^[-•]\s*/,""):A;N?p.push(new a({children:[new s({text:X,size:22})],spacing:{after:80},bullet:{level:0}})):p.push(new a({children:[new s({text:X,size:22})],spacing:{after:100}}));});}),p.push(new a({children:[new s({text:`Generated by NDPA Toolkit \u2014 ${z}${z?" \u2014 ":""}Privacy Policy v${R}`,size:16,color:"9ca3af",italics:true})],spacing:{before:600},alignment:x.CENTER}));let T=new e({title:L,description:"Privacy Policy \u2014 NDPA 2023 Compliant",styles:{paragraphStyles:[{id:"Normal",name:"Normal",run:{font:"Calibri",size:22}}]},sections:[{headers:{default:new c({children:[new a({children:[new s({text:z||"Privacy Policy",size:16,color:"9ca3af"})],alignment:x.RIGHT})]})},footers:{default:new y({children:[new a({children:[new s({text:"Page ",size:16,color:"9ca3af"}),new s({children:[C.CURRENT],size:16,color:"9ca3af"}),new s({text:" of ",size:16,color:"9ca3af"}),new s({children:[C.TOTAL_PAGES],size:16,color:"9ca3af"})],alignment:x.CENTER})]})},children:p}]});return l.toBlob(T)})}var le=10,Me="ndpr_policy_draft",Re=2e3;function de(){return `section_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function pe(){return `draft_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function U(r,u,v){let e=Date.now();return {id:v,title:`Privacy Policy${r.org.name?` \u2014 ${r.org.name}`:""}`,templateId:"adaptive-policy-wizard",organizationInfo:{name:r.org.name,website:r.org.website,privacyEmail:r.org.privacyEmail,address:r.org.address,dpoName:r.org.dpoName,dpoEmail:r.org.dpoEmail,industry:r.org.industry},sections:u,variableValues:{},effectiveDate:e,lastUpdated:e,version:"1.0",applicableFrameworks:["ndpa","ndpr"]}}function ot(r={}){var ne;let{onComplete:u,onComplianceChange:v}=r,e=react.useRef((ne=r.adapter)!=null?ne:chunkELKB2AFZ_js.a(Me));r.adapter&&(e.current=r.adapter);let a=react.useRef(pe()),[s,t]=react.useState(1),[l,c]=react.useState(chunkLU4PFST7_js.b),[y,C]=react.useState([]),[x,D]=react.useState({}),[F,k]=react.useState([]),[z,L]=react.useState(false),[R,d]=react.useState(null),[w,p]=react.useState(true),T=react.useRef(false),b=react.useRef(null);react.useEffect(()=>{let o=false,n=i=>{i&&(a.current=i.id,c(i.templateContext),C(i.customSections),D(i.sectionOverrides),k(i.sectionOrder),t(i.currentStep),d(i.lastSavedAt),L(true));};try{let i=e.current.load();i instanceof Promise?i.then(h=>{o||(n(h),p(!1));},()=>{o||p(!1);}):(n(i),p(!1));}catch(i){o||p(false);}return ()=>{o=true;}},[]);let f=react.useMemo(()=>{let n=chunkLU4PFST7_js.d(l).map(g=>x[g.id]?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},g),{template:x[g.id]}):g),i=y.map(g=>{var E;return {id:g.id,title:g.title,template:(E=x[g.id])!=null?E:g.content,order:g.order,required:false,included:true}}),h=[...n,...i];if(F.length>0){let g=new Map(F.map((E,$)=>[E,$]));return [...h].sort((E,$)=>{let O=g.has(E.id)?g.get(E.id):h.length,W=g.has($.id)?g.get($.id):h.length;return O-W})}return [...h].sort((g,E)=>{var $,O;return (($=g.order)!=null?$:0)-((O=E.order)!=null?O:0)})},[l,y,x,F]),m=react.useMemo(()=>!l.org.name&&!l.org.privacyEmail?null:U(l,f,a.current),[l,f]),_=react.useMemo(()=>U(chunkLU4PFST7_js.b(),[],a.current),[]),H=react.useMemo(()=>chunkLU4PFST7_js.c(m!=null?m:_,l),[m,l,_]),A=H.percentage,N=H.gaps,X=react.useRef({score:-1,gaps:[]});react.useEffect(()=>{let o=X.current;v&&(A!==o.score||N!==o.gaps)&&v(A,N),X.current={score:A,gaps:N};},[A,N,v]);let Z=react.useMemo(()=>{switch(s){case 1:return l.org.name.trim().length>0&&l.org.privacyEmail.trim().length>0;case 2:return l.dataCategories.some(o=>o.selected);case 3:return l.purposes.length>0;case 4:return true;default:return false}},[s,l]),me=react.useCallback(o=>{let n=Math.min(Math.max(1,o),4);n<4&&(T.current=false),t(n);},[]),ue=react.useCallback(()=>{t(o=>Math.min(o+1,4));},[]),fe=react.useCallback(()=>{T.current=false,t(o=>Math.max(o-1,1));},[]),ge=react.useCallback(o=>{c(n=>chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},n),o));},[]),he=react.useCallback(o=>{c(n=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},n),{org:chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},n.org),o)}));},[]),ye=react.useCallback(o=>{c(n=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},n),{dataCategories:n.dataCategories.map(i=>i.id===o?chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},i),{selected:!i.selected}):i)}));},[]),ve=react.useCallback(o=>{c(n=>{let i=n.purposes.includes(o);return chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},n),{purposes:i?n.purposes.filter(h=>h!==o):[...n.purposes,o]})});},[]),xe=react.useCallback(o=>{c(n=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},n),{thirdPartyProcessors:[...n.thirdPartyProcessors,o]}));},[]),be=react.useCallback(o=>{c(n=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},n),{thirdPartyProcessors:n.thirdPartyProcessors.filter((i,h)=>h!==o)}));},[]),Pe=react.useCallback(o=>{C(n=>n.length>=le?n:[...n,chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},o),{id:de(),required:false})]);},[]),Ce=react.useCallback((o,n)=>{C(i=>i.map(h=>h.id===o?chunkMQFZHA2D_js.a(chunkMQFZHA2D_js.a({},h),n):h));},[]),we=react.useCallback(o=>{C(n=>n.filter(i=>i.id!==o)),k(n=>n.filter(i=>i!==o)),D(n=>{let i=chunkMQFZHA2D_js.a({},n);return delete i[o],i});},[]),Se=react.useCallback((o,n)=>{k(i=>{let h=i.length>0?i:f.map(O=>O.id),g=h.indexOf(o);if(g===-1){let O=f.map(Ae=>Ae.id),W=O.indexOf(o);if(W===-1)return i;let K=n==="up"?W-1:W+1;if(K<0||K>=O.length)return O;let j=[...O];return [j[W],j[K]]=[j[K],j[W]],j}let E=n==="up"?g-1:g+1;if(E<0||E>=h.length)return h;let $=[...h];return [$[g],$[E]]=[$[E],$[g]],$});},[f]),De=react.useCallback((o,n)=>{D(i=>chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},i),{[o]:n}));},[]),Te=react.useCallback(o=>{let n=N.find(i=>i.requirementId===o);if(n)switch(n.fixType){case "fill_field":{T.current=false;let h=["data-categories-disclosed"],g=["purpose-of-processing"];h.includes(o)?t(2):g.includes(o)?t(3):(t(1));break}case "add_section":{if(!n.suggestedContent)break;C(i=>i.length>=le?i:[...i,{id:de(),title:n.requirement,content:n.suggestedContent,order:999,required:false}]);break}case "add_content":{if(!n.suggestedContent)break;let i="data-subject-rights";D(h=>{var E,$,O;let g=(O=($=h[i])!=null?$:(E=f.find(W=>W.id===i))==null?void 0:E.template)!=null?O:"";return chunkMQFZHA2D_js.b(chunkMQFZHA2D_js.a({},h),{[i]:`${g}
|
|
314
|
+
|
|
315
|
+
${n.suggestedContent}`.trim()})});break}}},[N,f]),Y=react.useCallback(o=>({id:a.current,templateContext:l,customSections:y,sectionOverrides:x,sectionOrder:F,currentStep:o,lastSavedAt:Date.now(),status:"draft"}),[l,y,x,F]),Ee=react.useCallback(()=>chunkMQFZHA2D_js.d(null,null,function*(){let o=Y(s);try{yield Promise.resolve(e.current.save(o)),d(o.lastSavedAt),L(!0);}catch(n){console.warn("[ndpr-toolkit] Failed to save draft:",n);}}),[Y,s]),$e=react.useCallback(()=>{Promise.resolve(e.current.remove()).catch(o=>{console.warn("[ndpr-toolkit] Failed to remove draft:",o);}),a.current=pe(),T.current=false,c(chunkLU4PFST7_js.b()),C([]),D({}),k([]),t(1),L(false),d(null);},[]);react.useEffect(()=>{if(!w)return b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{let o=Y(s);Promise.resolve(e.current.save(o)).then(()=>{d(o.lastSavedAt),L(true);}).catch(n=>{console.warn("[ndpr-toolkit] Auto-save failed:",n);});},Re),()=>{b.current&&clearTimeout(b.current);}},[l,y,x,F,s,w,Y]),react.useEffect(()=>{s===4&&m&&u&&!T.current&&(T.current=true,u(m));},[s,m,u]);let ze=react.useCallback(o=>chunkMQFZHA2D_js.d(null,null,function*(){let n=m!=null?m:U(l,f,a.current);return oe(n,o)}),[m,l,f]),Oe=react.useCallback(o=>chunkMQFZHA2D_js.d(null,null,function*(){let n=m!=null?m:U(l,f,a.current);return re(n,o)}),[m,l,f]),Fe=react.useCallback(o=>{let n=m!=null?m:U(l,f,a.current);return ee(n,o)},[m,l,f]),ke=react.useCallback(()=>{let o=m!=null?m:U(l,f,a.current);return te(o)},[m,l,f]);return {currentStep:s,goToStep:me,nextStep:ue,prevStep:fe,canProceed:Z,context:l,updateContext:ge,updateOrg:he,toggleDataCategory:ye,togglePurpose:ve,addProcessor:xe,removeProcessor:be,policy:m,sections:f,customSections:y,addCustomSection:Pe,updateCustomSection:Ce,removeCustomSection:we,reorderSections:Se,editSectionContent:De,sectionOverrides:x,complianceScore:A,complianceResult:H,complianceGaps:N,applyFix:Te,handleExportPDF:ze,handleExportDOCX:Oe,handleExportHTML:Fe,handleExportMarkdown:ke,isDraftSaved:z,lastSavedAt:R,saveDraft:Ee,discardDraft:$e,isLoading:w}}exports.a=ee;exports.b=te;exports.c=oe;exports.d=re;exports.e=ot;//# sourceMappingURL=chunk-KVOGOLIR.js.map
|
|
316
|
+
//# sourceMappingURL=chunk-KVOGOLIR.js.map
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use strict';var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js');var f=[{id:"full-name",label:"Full Name",group:"identity",dataPoints:["first name","last name","middle name","title"],selected:false},{id:"contact-details",label:"Contact Details",group:"identity",dataPoints:["email address","phone number","postal address"],selected:false},{id:"government-ids",label:"Government-Issued Identifiers",group:"identity",dataPoints:["NIN","passport number","driver's licence number","voter's card number"],selected:false},{id:"account-credentials",label:"Account Credentials",group:"identity",dataPoints:["username","hashed password","security questions"],selected:false},{id:"payment-info",label:"Payment Information",group:"financial",dataPoints:["credit/debit card number","bank account number","billing address"],selected:false},{id:"financial-records",label:"Financial Records",group:"financial",dataPoints:["transaction history","account balance","income details"],selected:false},{id:"bvn",label:"Bank Verification Number (BVN)",group:"financial",dataPoints:["BVN"],selected:false},{id:"device-info",label:"Device & Browser Information",group:"behavioral",dataPoints:["IP address","browser type","operating system","device identifiers"],selected:false},{id:"usage-data",label:"Usage & Analytics Data",group:"behavioral",dataPoints:["pages visited","click patterns","session duration","referral source"],selected:false},{id:"location-data",label:"Location Data",group:"behavioral",dataPoints:["GPS coordinates","city","country","timezone"],selected:false},{id:"cookies",label:"Cookies & Tracking Technologies",group:"behavioral",dataPoints:["cookie identifiers","pixel tags","local storage data"],selected:false},{id:"health-data",label:"Health & Medical Data",group:"sensitive",dataPoints:["medical history","prescriptions","health insurance details","disability status"],selected:false},{id:"biometric-data",label:"Biometric Data",group:"sensitive",dataPoints:["fingerprints","facial recognition data","voiceprints"],selected:false},{id:"ethnic-religious",label:"Ethnic Origin & Religious Beliefs",group:"sensitive",dataPoints:["ethnic origin","religious affiliation","political opinions"],selected:false},{id:"child-identity",label:"Child Identity Information",group:"children",dataPoints:["child's name","date of birth","school name","parent/guardian contact"],selected:false},{id:"child-activity",label:"Child Online Activity",group:"children",dataPoints:["content viewed","in-app activity","communications"],selected:false}];function R(){return {org:{name:"",website:"",privacyEmail:"",address:"",dpoName:"",dpoEmail:"",industry:"other",orgSize:"startup",country:"Nigeria"},dataCategories:f.map(e=>chunkMQFZHA2D_js.a({},e)),purposes:[],hasChildrenData:false,hasSensitiveData:false,hasFinancialData:false,hasCrossBorderTransfer:false,hasAutomatedDecisions:false,thirdPartyProcessors:[]}}function u(e,t){return e.sections.some(i=>i.id===t&&i.included)}function h(e,t){var n;let i=e.sections.find(a=>a.id===t&&a.included);return (n=i==null?void 0:i.template)!=null?n:""}function g(e){return e.sections.filter(t=>t.included).map(t=>t.template).join(`
|
|
2
|
+
`)}var m=[{id:"controller-identity",name:"Controller Identity",ndpaSection:"NDPA Section 24(1)(a)",severity:"critical",points:10,check:e=>{var t,i;return ((t=e.organizationInfo.name)!=null?t:"").trim().length>0&&((i=e.organizationInfo.privacyEmail)!=null?i:"").trim().length>0},gap:()=>({message:"The policy does not identify the data controller. The organisation name and contact email must be provided so data subjects know who is responsible for their data.",fixType:"fill_field",fixLabel:"Add organisation details",suggestedContent:"Provide your organisation's registered name and a valid privacy contact email address in the Organisation Info section."})},{id:"purpose-of-processing",name:"Purpose of Processing",ndpaSection:"NDPA Section 24(1)(b)",severity:"critical",points:10,check:(e,t)=>t.purposes.length>0,gap:()=>({message:"No processing purposes have been selected. The NDPA requires you to clearly state the specific purposes for which personal data is collected and processed.",fixType:"fill_field",fixLabel:"Select processing purposes",suggestedContent:"Select at least one processing purpose (e.g. service delivery, analytics, marketing) in the wizard."})},{id:"lawful-basis",name:"Lawful Basis Identified",ndpaSection:"NDPA Section 25",severity:"critical",points:10,check:e=>u(e,"legal-basis"),gap:()=>({message:"The policy does not include a section identifying the lawful basis for processing. Under the NDPA, every processing activity must be grounded in a lawful basis such as consent, contract, or legitimate interest.",fixType:"add_section",fixLabel:"Add legal basis section",suggestedContent:`We process personal data under one or more of the following lawful bases as prescribed by the NDPA 2023:
|
|
3
|
+
|
|
4
|
+
- Consent: where you have given clear, informed, and voluntary consent.
|
|
5
|
+
- Contract: where processing is necessary for the performance of a contract.
|
|
6
|
+
- Legal Obligation: where processing is required by Nigerian law.
|
|
7
|
+
- Legitimate Interest: where processing is necessary for our legitimate interests, provided they do not override your rights.`})},{id:"data-categories-disclosed",name:"Data Categories Disclosed",ndpaSection:"NDPA Section 24(1)(c)",severity:"critical",points:10,check:(e,t)=>t.dataCategories.some(i=>i.selected),gap:()=>({message:"No data categories have been selected. The NDPA requires you to disclose the categories of personal data you collect (e.g. identity, financial, behavioral data).",fixType:"fill_field",fixLabel:"Select data categories",suggestedContent:"Select the categories of personal data your organisation collects in the Data Collection step of the wizard."})},{id:"recipients-disclosed",name:"Recipients Disclosed",ndpaSection:"NDPA Section 24(1)(e)",severity:"critical",points:10,check:(e,t)=>{if(!u(e,"data-sharing"))return false;if(t.thirdPartyProcessors.length>0){let i=h(e,"data-sharing");return t.thirdPartyProcessors.every(n=>i.includes(n.name))}return true},gap:e=>({message:e.thirdPartyProcessors.length>0?"The data sharing section does not list all third-party processors. Each processor must be named with its purpose and location.":"The policy does not include a data sharing section. Even if you do not share data, you must state this clearly.",fixType:e.thirdPartyProcessors.length>0?"add_content":"add_section",fixLabel:e.thirdPartyProcessors.length>0?"Update sharing section":"Add data sharing section",suggestedContent:"We do not sell personal data. We may share your data with service providers under strict data processing agreements that comply with the NDPA 2023."})},{id:"retention-periods",name:"Retention Periods Specified",ndpaSection:"NDPA Section 24(1)(f)",severity:"critical",points:10,check:e=>u(e,"data-retention"),gap:()=>({message:"The policy does not include a data retention section. The NDPA requires you to specify the period for which personal data will be stored, or the criteria used to determine that period.",fixType:"add_section",fixLabel:"Add retention schedule",suggestedContent:"We retain personal data only for as long as necessary to fulfil the purposes for which it was collected, or as required by applicable Nigerian law. When personal data is no longer needed, it is securely deleted or anonymised."})},{id:"data-subject-rights",name:"Data Subject Rights Listed",ndpaSection:"NDPA Sections 34-39",severity:"important",points:7,check:e=>{if(!u(e,"data-subject-rights"))return false;let t=h(e,"data-subject-rights").toLowerCase();return ["access","rectification","erasure","portability","restrict","object"].every(n=>t.includes(n))},gap:()=>({message:"The data subject rights section is missing or does not cover all six NDPA rights: access, rectification, erasure, portability, restriction, and objection.",fixType:"add_content",fixLabel:"Add missing rights",suggestedContent:`Under the NDPA 2023, you have the following rights:
|
|
8
|
+
1. Right of Access (Section 34)
|
|
9
|
+
2. Right to Rectification (Section 35)
|
|
10
|
+
3. Right to Erasure (Section 36)
|
|
11
|
+
4. Right to Restrict Processing (Section 37)
|
|
12
|
+
5. Right to Data Portability (Section 38)
|
|
13
|
+
6. Right to Object (Section 37)`})},{id:"right-to-withdraw-consent",name:"Right to Withdraw Consent",ndpaSection:"NDPA Section 25(2)",severity:"important",points:7,check:e=>{let t=g(e).toLowerCase();return t.includes("withdraw")&&t.includes("consent")},gap:()=>({message:"The policy does not mention the right to withdraw consent. Data subjects must be informed that they can withdraw consent at any time without affecting the lawfulness of prior processing.",fixType:"add_content",fixLabel:"Add withdrawal clause",suggestedContent:"You have the right to withdraw your consent at any time, without affecting the lawfulness of processing carried out prior to withdrawal. To withdraw your consent, contact us at the email address provided in this policy."})},{id:"right-to-lodge-complaint",name:"Right to Lodge Complaint with NDPC",ndpaSection:"NDPA Section 40",severity:"important",points:7,check:e=>{let t=g(e).toLowerCase();return t.includes("ndpc")||t.includes("nigeria data protection commission")},gap:()=>({message:"The policy does not mention the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC). Data subjects must be informed of this right.",fixType:"add_content",fixLabel:"Add NDPC complaint reference",suggestedContent:"You have the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC) if you believe your data protection rights have been infringed. Website: https://ndpc.gov.ng"})},{id:"cross-border-safeguards",name:"Cross-Border Transfer Safeguards",ndpaSection:"NDPA Sections 43-44",severity:"important",points:7,check:(e,t)=>t.hasCrossBorderTransfer?u(e,"cross-border-transfers"):true,gap:()=>({message:"Cross-border data transfers are indicated but the policy lacks a section describing the safeguards in place. The NDPA requires disclosure of transfer mechanisms and adequacy assessments.",fixType:"add_section",fixLabel:"Add cross-border section",suggestedContent:"Where we transfer personal data outside Nigeria, we ensure compliance with Sections 43 and 44 of the NDPA 2023 by implementing appropriate safeguards, including adequacy assessments and Standard Contractual Clauses."})},{id:"automated-decision-disclosure",name:"Automated Decision-Making Disclosure",ndpaSection:"NDPA Section 39",severity:"important",points:7,check:(e,t)=>t.hasAutomatedDecisions?u(e,"automated-decision-making"):true,gap:()=>({message:"Automated decision-making is indicated but the policy does not include a section disclosing this. The NDPA requires you to inform data subjects about automated decisions, including the logic involved and the right to human intervention.",fixType:"add_section",fixLabel:"Add automated decisions section",suggestedContent:"We use automated decision-making in certain processes. You have the right to request human intervention, express your point of view, and contest automated decisions, in accordance with Section 39 of the NDPA 2023."})},{id:"children-data-protection",name:"Children's Data Protection",ndpaSection:"NDPA Section 31",severity:"recommended",points:5,check:(e,t)=>t.hasChildrenData?u(e,"children-data-protection"):true,gap:()=>({message:"Children's data processing is indicated but the policy does not include a dedicated children's data protection section. The NDPA requires enhanced protections including parental consent for children under 13.",fixType:"add_section",fixLabel:"Add children's data section",suggestedContent:"We do not knowingly collect personal data from children under the age of 13 without verifiable parental or guardian consent. Parents and guardians may request access to, correction of, or deletion of their child's data at any time."})},{id:"dpo-contact-info",name:"DPO Contact Information",ndpaSection:"NDPA Section 30",severity:"recommended",points:5,check:e=>{var t,i;return ((t=e.organizationInfo.dpoName)!=null?t:"").trim().length>0&&((i=e.organizationInfo.dpoEmail)!=null?i:"").trim().length>0},gap:()=>({message:"The Data Protection Officer (DPO) contact information is not provided. While not always mandatory, appointing a DPO and publishing their contact details is strongly recommended under the NDPA.",fixType:"fill_field",fixLabel:"Add DPO details",suggestedContent:"Provide the full name and email address of your Data Protection Officer in the Organisation Info section."})},{id:"security-measures",name:"Security Measures Described",ndpaSection:"NDPA Section 28",severity:"recommended",points:5,check:e=>u(e,"data-security"),gap:()=>({message:"The policy does not describe the technical and organisational security measures in place to protect personal data. Describing these measures builds trust and demonstrates NDPA compliance.",fixType:"add_section",fixLabel:"Add security section",suggestedContent:"We implement appropriate technical and organisational measures to protect personal data, including encryption in transit and at rest, access controls, regular security assessments, and incident response procedures aligned with NDPA breach notification requirements."})},{id:"policy-effective-date",name:"Policy Effective Date",ndpaSection:"NDPA Section 24",severity:"recommended",points:5,check:e=>e.effectiveDate>0,gap:()=>({message:"The policy does not have an effective date set. An effective date is important for version control and for data subjects to know when the policy was last updated.",fixType:"fill_field",fixLabel:"Set effective date",suggestedContent:"Set the policy's effective date to the date you intend to publish it."})}];function L(e,t){let i=m.reduce((r,l)=>r+l.points,0),n=0,a=[],o=[];for(let r of m)if(r.check(e,t))n+=r.points,o.push(r.id);else {let l=r.gap(t);a.push(chunkMQFZHA2D_js.a({requirementId:r.id,requirement:r.name,ndpaSection:r.ndpaSection,severity:r.severity},l));}let c=Math.round(n/i*100),d;return n>=100?d="compliant":n>=80?d="nearly_compliant":d="not_compliant",{score:n,maxScore:i,percentage:c,rating:d,gaps:a,passed:o}}function s(e,t,i,n,a){return {id:e,title:t,template:i,order:n,required:a,included:true}}function y(e){return e.filter(t=>t.selected)}function b(e){return {service_delivery:"Service Delivery \u2014 to provide, maintain, and improve the services you have requested from us",marketing:"Marketing \u2014 to send promotional communications where you have opted in to receive them",analytics:"Analytics \u2014 to analyse usage patterns and improve user experience",research:"Research \u2014 to conduct research and development for service improvement",legal_compliance:"Legal Compliance \u2014 to meet our obligations under Nigerian law, including the NDPA 2023",fraud_prevention:"Fraud Prevention \u2014 to detect, prevent, and respond to fraud, security threats, and abuse"}[e]}function v(e,t){let i=e.org.name||"[Organisation Name]",n=e.org.website||"[website]",a=new Date().toISOString().slice(0,10);return s("introduction","Introduction & Scope",`This Privacy Policy explains how ${i} ("we", "us", or "our") collects, uses, stores, and protects personal data when you use our services and visit our website at ${n}. This policy is issued in compliance with the Nigeria Data Protection Act (NDPA) 2023 and the Nigeria Data Protection Regulation (NDPR). It applies to all personal data processed by ${i}, whether collected online or offline.
|
|
14
|
+
|
|
15
|
+
Effective Date: ${a}.
|
|
16
|
+
|
|
17
|
+
We are committed to protecting your privacy and ensuring that your personal data is handled responsibly and in accordance with applicable data protection legislation.`,t,true)}function P(e,t){let i=e.org.name||"[Organisation Name]",n=y(e.dataCategories),a={identity:"Identity & Contact Information",financial:"Financial Information",behavioral:"Technical & Behavioral Data",sensitive:"Sensitive / Special-Category Data",children:"Children's Data"},o="",c=["identity","financial","behavioral","sensitive","children"];for(let d of c){let r=n.filter(l=>l.group===d);if(r.length>0){o+=`
|
|
18
|
+
${a[d]}:
|
|
19
|
+
`;for(let l of r)o+=`- ${l.label}: ${l.dataPoints.join(", ")}.
|
|
20
|
+
`;}}return o===""&&(o=`
|
|
21
|
+
- Personal data categories have not yet been specified.
|
|
22
|
+
`),s("data-collection","Data We Collect",`${i} collects the following categories of personal data in the course of providing our services. Data may be collected directly from you (e.g. through forms, account registration, or correspondence) or automatically (e.g. through cookies, server logs, and similar technologies).
|
|
23
|
+
`+o+`
|
|
24
|
+
We only collect personal data that is adequate, relevant, and limited to what is necessary for the purposes described in this policy, in accordance with the NDPA 2023.`,t,true)}function w(e,t){let i=e.org.name||"[Organisation Name]",n=[];return (e.purposes.includes("service_delivery")||e.purposes.length===0)&&(n.push("- Consent: where you have given clear, informed, and voluntary consent for specific processing activities (NDPA Section 25)."),n.push("- Contract: where processing is necessary for the performance of a contract to which you are a party, or to take pre-contractual steps at your request (NDPA Section 25).")),e.purposes.includes("legal_compliance")&&n.push("- Legal Obligation: where processing is required for compliance with a legal obligation to which we are subject under Nigerian law."),e.purposes.includes("fraud_prevention")&&n.push("- Legitimate Interest: where processing is necessary for our legitimate interests (such as fraud prevention and network security), provided those interests are not overridden by your rights and freedoms (NDPA Section 25)."),e.purposes.includes("research")&&n.push("- Public Interest / Research: where processing is necessary for scientific or historical research purposes, or statistical purposes, subject to appropriate safeguards."),n.length===0&&(n.push("- Consent: where you have given clear, informed, and voluntary consent for specific processing activities (NDPA Section 25)."),n.push("- Contract: where processing is necessary for the performance of a contract to which you are a party (NDPA Section 25).")),s("legal-basis","Legal Basis for Processing",`${i} processes personal data under one or more of the following lawful bases as prescribed by the Nigeria Data Protection Act (NDPA) 2023:
|
|
25
|
+
|
|
26
|
+
`+n.join(`
|
|
27
|
+
`)+`
|
|
28
|
+
|
|
29
|
+
We will always inform you of the specific legal basis applicable to each processing activity at the time of data collection.`,t,true)}function D(e,t){let n=(e.purposes.length>0?e.purposes:["service_delivery"]).map(a=>`- ${b(a)}`).join(`
|
|
30
|
+
`);return s("data-usage","How We Use Your Data",`We process the personal data we collect for the following purposes:
|
|
31
|
+
|
|
32
|
+
`+n+`
|
|
33
|
+
|
|
34
|
+
We will not process your personal data for purposes incompatible with those stated above without providing you with prior notice and, where required by the NDPA, obtaining your consent.`,t,true)}function C(e,t){let i=e.org.name||"[Organisation Name]",n=e.thirdPartyProcessors,a;return n.length>0?a=`We share personal data with the following third-party processors under data processing agreements that comply with the NDPA 2023:
|
|
35
|
+
|
|
36
|
+
| Processor | Purpose | Country |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
`+n.map(c=>`| ${c.name} | ${c.purpose} | ${c.country} |`).join(`
|
|
39
|
+
`)+`
|
|
40
|
+
|
|
41
|
+
All processors are contractually required to implement appropriate technical and organisational measures to protect personal data.`:a="We do not currently share your personal data with third-party processors. Should this change, we will update this policy and, where required, obtain your consent before any sharing takes place.",s("data-sharing","Data Sharing & Disclosure",`${i} does not sell personal data under any circumstances.
|
|
42
|
+
|
|
43
|
+
`+a+`
|
|
44
|
+
|
|
45
|
+
We may also disclose personal data where required by law, regulation, or valid legal process, including requests from Nigerian regulatory and law enforcement authorities.`,t,true)}function S(e,t){let i=e.org.privacyEmail||"[privacy email]";return s("data-subject-rights","Your Rights as a Data Subject",`Under the Nigeria Data Protection Act (NDPA) 2023, you are entitled to the following rights regarding your personal data:
|
|
46
|
+
|
|
47
|
+
1. Right of Access \u2014 You may request confirmation of whether we process your personal data and obtain a copy of that data (NDPA Section 34).
|
|
48
|
+
2. Right to Rectification \u2014 You may request correction of inaccurate or incomplete personal data we hold about you (NDPA Section 35).
|
|
49
|
+
3. Right to Erasure \u2014 You may request deletion of your personal data where there is no compelling legal reason for its continued processing (NDPA Section 36).
|
|
50
|
+
4. Right to Data Portability \u2014 You may request to receive your personal data in a structured, commonly used, and machine-readable format (NDPA Section 38).
|
|
51
|
+
5. Right to Restrict Processing \u2014 You may request that we limit the processing of your personal data in certain circumstances (NDPA Section 37).
|
|
52
|
+
6. Right to Object \u2014 You may object to the processing of your personal data where processing is based on legitimate interest or is carried out for direct marketing purposes (NDPA Section 37).
|
|
53
|
+
|
|
54
|
+
You also have the right to withdraw your consent at any time, without affecting the lawfulness of processing carried out prior to withdrawal.
|
|
55
|
+
|
|
56
|
+
To exercise any of these rights, please contact us at ${i}. We will respond to your request within 30 days, as required by the NDPA. If you are unsatisfied with our response, you have the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC).`,t,true)}function N(e,t){let i=e.org.privacyEmail||"[privacy email]",n=e.org.industry,a="";return n==="fintech"?a=`
|
|
57
|
+
- Compliance with Payment Card Industry Data Security Standard (PCI-DSS) for cardholder data protection.
|
|
58
|
+
- End-to-end encryption of financial transactions.
|
|
59
|
+
- Multi-factor authentication for account access.`:n==="healthcare"?a=`
|
|
60
|
+
- HIPAA-aligned safeguards for health information, including access controls and audit logging.
|
|
61
|
+
- Segregation of medical data from other personal data.
|
|
62
|
+
- Role-based access controls restricting health data to authorised personnel.`:n==="ecommerce"?a=`
|
|
63
|
+
- PCI-DSS compliant payment processing.
|
|
64
|
+
- Secure checkout and tokenisation of payment credentials.`:n==="government"&&(a=`
|
|
65
|
+
- Compliance with Nigeria's Cybercrimes Act 2015 requirements.
|
|
66
|
+
- Government-grade access controls and audit trails.`),s("data-security","Data Security Measures",`We implement appropriate technical and organisational measures to protect personal data against unauthorised access, alteration, disclosure, or destruction. These measures include:
|
|
67
|
+
|
|
68
|
+
- Encryption of personal data in transit (TLS 1.2+) and at rest (AES-256).
|
|
69
|
+
- Access controls and least-privilege principles for all systems handling personal data.
|
|
70
|
+
- Regular security assessments, penetration testing, and vulnerability scanning.
|
|
71
|
+
- Staff training on data protection obligations and information security best practices.
|
|
72
|
+
- Incident response procedures aligned with NDPA breach notification requirements (72-hour notification to NDPC).`+a+`
|
|
73
|
+
|
|
74
|
+
While we employ industry-standard safeguards, no method of electronic transmission or storage is entirely secure. If you become aware of any security incident affecting your data, please contact us immediately at ${i}.`,t,true)}function A(e,t){let i=e.org.name||"[Organisation Name]",n=e.org.address||"[Address]",a=e.org.privacyEmail||"[privacy email]",o=e.org.website||"[website]",c=e.org.dpoName||"[DPO Name]",d=e.org.dpoEmail||"[DPO Email]";return s("contact-info","Contact Information",`If you have questions, concerns, or requests regarding this privacy policy or our data protection practices, please contact us:
|
|
75
|
+
|
|
76
|
+
Organisation: ${i}
|
|
77
|
+
Address: ${n}
|
|
78
|
+
Email: ${a}
|
|
79
|
+
Website: ${o}
|
|
80
|
+
|
|
81
|
+
Data Protection Officer: ${c}
|
|
82
|
+
DPO Email: ${d}
|
|
83
|
+
|
|
84
|
+
You also have the right to lodge a complaint with the Nigeria Data Protection Commission (NDPC) if you believe your data protection rights have been infringed.
|
|
85
|
+
|
|
86
|
+
Nigeria Data Protection Commission
|
|
87
|
+
Website: https://ndpc.gov.ng
|
|
88
|
+
Email: info@ndpc.gov.ng`,t,true)}function T(e){return s("children-data-protection","Children's Data Protection",`We recognise the importance of protecting the privacy of children. In accordance with Section 31 of the NDPA 2023, we implement the following safeguards when processing children's personal data:
|
|
89
|
+
|
|
90
|
+
- We do not knowingly collect personal data from children under the age of 13 without verifiable parental or guardian consent.
|
|
91
|
+
- Where we process data of children between the ages of 13 and 17, we obtain consent from a parent or guardian, taking into account the child's age and maturity.
|
|
92
|
+
- Parents and guardians may request access to, correction of, or deletion of their child's personal data at any time by contacting us.
|
|
93
|
+
- We limit the collection of children's data to what is strictly necessary for the service provided and do not use it for marketing or profiling.
|
|
94
|
+
- A Data Protection Impact Assessment (DPIA) is conducted before any new processing activity involving children's data.
|
|
95
|
+
|
|
96
|
+
If we discover that we have inadvertently collected personal data from a child without appropriate consent, we will delete that data promptly.`,e,true)}function x(e){return s("sensitive-data-processing","Sensitive / Special-Category Data",`Certain categories of personal data are considered sensitive under the NDPA 2023 and require additional safeguards. Sensitive data includes information relating to health, biometric identifiers, ethnic origin, religious or political beliefs, and genetic data.
|
|
97
|
+
|
|
98
|
+
We process sensitive personal data only where:
|
|
99
|
+
|
|
100
|
+
- You have given explicit consent for the specific processing purpose.
|
|
101
|
+
- Processing is necessary to protect your vital interests or those of another person.
|
|
102
|
+
- Processing is required for the establishment, exercise, or defence of legal claims.
|
|
103
|
+
- Processing is necessary for reasons of substantial public interest under Nigerian law.
|
|
104
|
+
|
|
105
|
+
Enhanced security measures are applied to all sensitive data, including additional encryption, strict access controls, and enhanced audit logging. Sensitive data is stored separately from other personal data where technically feasible.`,e,true)}function k(e,t){let i=e.thirdPartyProcessors.filter(a=>a.country.toLowerCase()!=="nigeria"),n="";return i.length>0&&(n=`
|
|
106
|
+
|
|
107
|
+
We currently transfer personal data to the following jurisdictions: ${[...new Set(i.map(o=>o.country))].join(", ")}. Each transfer is subject to the safeguards described above.`),s("cross-border-transfers","Cross-Border Data Transfers",`Where we transfer personal data outside Nigeria, we do so in strict compliance with Sections 43 and 44 of the NDPA 2023. We ensure that any cross-border transfer of personal data is subject to one or more of the following safeguards:
|
|
108
|
+
|
|
109
|
+
- The receiving country has been assessed by the NDPC as providing an adequate level of data protection.
|
|
110
|
+
- We have put in place appropriate contractual safeguards, such as Standard Contractual Clauses approved by the NDPC.
|
|
111
|
+
- You have provided explicit consent to the transfer after being informed of the associated risks.
|
|
112
|
+
- The transfer is necessary for the performance of a contract between you and us, or for pre-contractual steps taken at your request.
|
|
113
|
+
- The NDPC has granted an administrative authorisation for the transfer.`+n,t,true)}function q(e){return s("automated-decision-making","Automated Decision-Making & Profiling",`In accordance with Section 39 of the NDPA 2023, we inform you of any automated decision-making processes, including profiling, that produce legal effects or similarly significant effects on you.
|
|
114
|
+
|
|
115
|
+
Where we use automated decision-making:
|
|
116
|
+
|
|
117
|
+
- We will inform you that automated processing is being used and provide meaningful information about the logic involved.
|
|
118
|
+
- You have the right to request human intervention in any automated decision.
|
|
119
|
+
- You have the right to express your point of view and contest the decision.
|
|
120
|
+
- We will carry out regular reviews of automated decision-making systems to ensure fairness, accuracy, and absence of bias.
|
|
121
|
+
- We will not base automated decisions solely on sensitive personal data unless you have given explicit consent or the processing is authorised by Nigerian law.
|
|
122
|
+
|
|
123
|
+
You may object to automated decision-making at any time by contacting us using the details provided in this policy.`,e,true)}function I(e,t){let i=e.org.name||"[Organisation Name]",n=e.org.industry,a="";return n==="fintech"?a=`
|
|
124
|
+
|
|
125
|
+
Financial transaction records are retained for a minimum of six (6) years in compliance with the Central Bank of Nigeria (CBN) guidelines and the Money Laundering (Prevention and Prohibition) Act.`:n==="healthcare"?a=`
|
|
126
|
+
|
|
127
|
+
Medical and health records are retained for a minimum of ten (10) years after the last date of treatment, or longer where required by applicable health regulations.`:n==="ecommerce"?a=`
|
|
128
|
+
|
|
129
|
+
Order and transaction records are retained for six (6) years in accordance with Nigerian tax and commercial law requirements.`:n==="education"&&(a=`
|
|
130
|
+
|
|
131
|
+
Student academic records may be retained indefinitely for verification purposes. Other personal data is retained only for the duration of enrolment plus five (5) years.`),s("data-retention","Data Retention Schedule",`${i} retains personal data only for as long as necessary to fulfil the purposes for which it was collected, or as required by applicable Nigerian law. Our retention periods are determined based on the following criteria:
|
|
132
|
+
|
|
133
|
+
- The nature and sensitivity of the personal data.
|
|
134
|
+
- The purposes for which the data is processed.
|
|
135
|
+
- Legal, regulatory, and contractual obligations (including NDPA 2023 requirements).
|
|
136
|
+
- Legitimate business needs such as maintaining records for audits, dispute resolution, and regulatory examinations.
|
|
137
|
+
|
|
138
|
+
General retention periods:
|
|
139
|
+
- Account data: retained for the duration of your relationship with us, plus three (3) years.
|
|
140
|
+
- Communication records: retained for two (2) years from the date of correspondence.
|
|
141
|
+
- Analytics and usage data: retained in identifiable form for twelve (12) months, then aggregated or anonymised.`+a+`
|
|
142
|
+
|
|
143
|
+
When personal data is no longer required, it is securely deleted or irreversibly anonymised in accordance with our internal data retention and disposal policy.`,t,true)}function j(e){let t=1,i=[];return i.push(v(e,t++)),i.push(P(e,t++)),i.push(w(e,t++)),i.push(D(e,t++)),i.push(C(e,t++)),i.push(S(e,t++)),i.push(N(e,t++)),i.push(A(e,t++)),e.hasChildrenData&&i.push(T(t++)),e.hasSensitiveData&&i.push(x(t++)),e.hasCrossBorderTransfer&&i.push(k(e,t++)),e.hasAutomatedDecisions&&i.push(q(t++)),i.push(I(e,t++)),i}exports.a=f;exports.b=R;exports.c=L;exports.d=j;//# sourceMappingURL=chunk-LU4PFST7.js.map
|
|
144
|
+
//# sourceMappingURL=chunk-LU4PFST7.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-NXQMU36Z.mjs';import {a}from'./chunk-AYKLAEOU.mjs';import {useState,useEffect}from'react';import {jsxs,jsx}from'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]=useState(null),[D,B]=useState(R),[j,O]=useState("all"),[C,M]=useState("all"),[A,_]=useState(""),[P,z]=useState("createdAt"),[L,Z]=useState("desc"),[S,G]=useState("");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]),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 jsx("span",{className:`px-2 py-1 rounded text-xs font-medium ${r[e]}`,children:p[e]})},l=e=>jsx("span",{className: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?jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium",children:"Deadline Passed"}),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?jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium",children:"Urgent: Deadline Approaching"}),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?jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium",children:"Deadline Approaching"}),jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-300 mt-1",children:[r," days remaining until the response deadline."]})]}):jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-md",children:[jsx("p",{className:"text-sm text-green-800 dark:text-green-200 font-medium",children:"Deadline Tracking"}),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)}.`}),jsxs("div",{className:"mt-6",children:[jsx("h3",{className:"text-lg font-medium mb-4",children:"Request Timeline"}),jsx("ol",{className:"relative border-l border-gray-200 dark:border-gray-700",children:r.map((p,w)=>jsxs("li",{className:"mb-6 ml-4",children:[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"}`}),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"}),jsx("h4",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:p.title}),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=>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=>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=>jsx("option",{value:r.value,children:r.label},r.value));return jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${J}`,s==null?void 0:s.root,f),children:[jsxs("div",{className:a("",s==null?void 0:s.header,f),children:[jsx("h2",{className:a("text-xl font-bold mb-2",s==null?void 0:s.title,f),children:H}),jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-300",children:X})]}),jsxs("div",{className:a("mb-6 grid grid-cols-1 md:grid-cols-4 gap-4",s==null?void 0:s.filters,f),children:[jsxs("div",{children:[jsx("label",{htmlFor:"statusFilter",className:"block text-sm font-medium mb-1",children:"Status Filter"}),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()})]}),jsxs("div",{children:[jsx("label",{htmlFor:"typeFilter",className:"block text-sm font-medium mb-1",children:"Request Type Filter"}),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()})]}),jsxs("div",{children:[jsx("label",{htmlFor:"sortBy",className:"block text-sm font-medium mb-1",children:"Sort By"}),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:[jsx("option",{value:"createdAt",children:"Date Received"}),jsx("option",{value:"dueDate",children:"Due Date"}),jsx("option",{value:"type",children:"Request Type"}),jsx("option",{value:"status",children:"Status"})]})]}),jsxs("div",{children:[jsx("label",{htmlFor:"searchTerm",className:"block text-sm font-medium mb-1",children:"Search"}),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))]"})]})]}),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[jsxs("div",{className:"md:col-span-1",children:[jsx("h3",{className:"text-lg font-medium mb-3",children:"DSR Requests"}),D.length===0?jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No data subject requests found."}):jsx("div",{className: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=jsx("span",{className:"text-xs text-red-600 dark:text-red-400 font-bold",children:"Overdue"}):r<=3?p=jsx("span",{className:"text-xs text-red-600 dark:text-red-400",children:"Urgent"}):r<=7&&(p=jsx("span",{className:"text-xs text-yellow-600 dark:text-yellow-400",children:"Soon"}))),jsxs("div",{className: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:[jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsx("h4",{className:"font-medium text-sm",children:e.subject.name}),t(e.type)]}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:e.subject.email}),jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:["Received: ",k(e.createdAt)]}),jsxs("div",{className:"flex justify-between items-center mt-2",children:[jsx("div",{children:l(e.status)}),jsx("div",{children:p})]})]},e.id)})})]}),jsx("div",{className:a("md:col-span-2",s==null?void 0:s.detailPanel,f),children:m?jsxs("div",{children:[jsxs("div",{className:"flex justify-between items-start mb-4",children:[jsx("h3",{className:"text-lg font-medium",children:m.subject.name}),jsxs("div",{className:"flex space-x-2",children:[t(m.type),l(m.status)]})]}),F&&m.dueDate&&jsx("div",{className:"mb-4",children:g(m)}),K&&jsxs("div",{className:"mb-6",children:[jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[jsxs("div",{children:[jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Email:"})," ",m.subject.email]}),m.subject.phone&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Phone:"})," ",m.subject.phone]}),jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Received:"})," ",k(m.createdAt)]})]}),jsxs("div",{children:[jsxs("p",{className:"text-sm",children:[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]}),jsxs("p",{className:"text-sm",children:[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&&jsxs("p",{className:"text-sm",children:[jsx("span",{className:"font-medium",children:"Due Date:"})," ",k(m.dueDate)]})]})]}),m.description&&jsxs("div",{className:"mb-4",children:[jsx("p",{className:"text-sm font-medium",children:"Request Details:"}),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&&jsxs("div",{children:[jsx("p",{className:"text-sm font-medium",children:"Additional Information:"}),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")})]})]}),jsxs("div",{className:"mb-6 grid grid-cols-1 md:grid-cols-2 gap-4",children:[jsxs("div",{children:[jsx("h3",{className:"text-md font-medium mb-2",children:"Update Status"}),jsxs("div",{className:"flex space-x-2",children:[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()}),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&&jsxs("div",{children:[jsx("h3",{className:"text-md font-medium mb-2",children:"Assign Request"}),jsxs("div",{className:"flex space-x-2",children:[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:[jsx("option",{value:"",children:"Select Assignee"}),i.map(e=>jsx("option",{value:e,children:e},e))]}),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"})]})]})]}),jsxs("div",{className:"mb-6",children:[jsx("h3",{className:"text-lg font-medium mb-3",children:"Request Summary"}),jsx("div",{className:"bg-gray-50 dark:bg-gray-700 p-3 rounded-md",children:jsx("pre",{className:"whitespace-pre-wrap text-sm font-mono text-gray-800 dark:text-gray-200",children:jsx("pre",{children:JSON.stringify(a$1(m),null,2)})})})]}),Y&&x(m)]}):jsx("div",{className:"flex items-center justify-center h-64 bg-gray-50 dark:bg-gray-700 rounded-md",children: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]=useState("30days"),[y,D]=useState(R),[B,j]=useState([]),[O,C]=useState([]);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 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 jsxs("div",{className:a("grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",i==null?void 0:i.stats,s),children:[jsxs("div",{className:a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow",i==null?void 0:i.statCard,s),children:[jsx("h4",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Total Requests"}),jsx("p",{className:"text-2xl font-bold",children:t})]}),jsxs("div",{className:a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow",i==null?void 0:i.statCard,s),children:[jsx("h4",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Pending Requests"}),jsx("p",{className:"text-2xl font-bold",children:l})]}),jsxs("div",{className:a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow",i==null?void 0:i.statCard,s),children:[jsx("h4",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Avg. Response Time"}),jsx("p",{className:"text-2xl font-bold",children:x!==null?`${x} days`:"N/A"})]}),jsxs("div",{className:a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow",i==null?void 0:i.statCard,s),children:[jsx("h4",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mb-1",children:"Compliance Rate"}),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 jsxs("div",{className:a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",i==null?void 0:i.table,s),children:[jsx("h3",{className:a("text-lg font-medium mb-4",i==null?void 0:i.tableHeader,s),children:"Request Types"}),l===0?jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No data available for the selected timeframe."}):jsx("div",{className:"space-y-4",children:g.map(x=>{let o=t[x],u=Math.round(o/l*100);return jsxs("div",{children:[jsxs("div",{className:"flex justify-between items-center mb-1",children:[jsxs("div",{className:"flex items-center",children:[S(x),jsxs("span",{className:"ml-2 text-sm",children:[o," requests"]})]}),jsxs("span",{className:"text-sm font-medium",children:[u,"%"]})]}),jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2.5",children: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 jsxs("div",{className:a("bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",i==null?void 0:i.table,s),children:[jsx("h3",{className:a("text-lg font-medium mb-4",i==null?void 0:i.tableHeader,s),children:"Request Status"}),l===0?jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No data available for the selected timeframe."}):jsxs("div",{children:[jsx("div",{className:"flex h-4 mb-2",children:g.map(o=>{let u=t[o],v=u/l*100;return v>0?jsx("div",{className:`${x[o]} first:rounded-l-full last:rounded-r-full`,style:{width:`${v}%`},title:`${o}: ${u} (${Math.round(v)}%)`},o):null})}),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 jsxs("div",{className:"flex items-center",children:[jsx("div",{className:`w-3 h-3 rounded-full ${x[o]} mr-2`}),jsxs("div",{children:[jsx("p",{className:"text-xs font-medium",children:o==="inProgress"?"In Progress":o==="awaitingVerification"?"Awaiting Verification":o.charAt(0).toUpperCase()+o.slice(1)}),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 jsxs("div",{className:"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",children:[jsx("h3",{className:"text-lg font-medium mb-4",children:"Request Timeline"}),g.length===0?jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No data available for the selected timeframe."}):jsxs("div",{className:"h-40",children:[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 jsx("div",{className:"flex flex-col items-center flex-1",children:jsx("div",{className:"w-full bg-[rgb(var(--ndpr-primary))] rounded-t",style:{height:e},title:`${o(u)}: ${v} requests`})},u)})}),jsx("div",{className:"flex justify-between mt-2",children:g.map(u=>jsx("div",{className:"text-xs text-center",children:o(u)},u))})]})]})},E=()=>jsxs("div",{className:"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",children:[jsx("h3",{className:"text-lg font-medium mb-4",children:"Overdue Requests"}),B.length===0?jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No overdue requests."}):jsx("div",{className:"space-y-2 max-h-60 overflow-y-auto",children:B.map(t=>jsxs("div",{className: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:[jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsx("h4",{className:"font-medium text-sm",children:t.subject.name}),S(t.type)]}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:t.subject.email}),jsxs("div",{className:"flex justify-between items-center",children:[jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:["Due: ",A(t.dueDate||0)]}),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=()=>jsxs("div",{className:"bg-white dark:bg-gray-700 p-4 rounded-lg shadow mb-6",children:[jsx("h3",{className:"text-lg font-medium mb-4",children:"Upcoming Deadlines"}),O.length===0?jsx("p",{className:"text-gray-600 dark:text-gray-400 text-sm",children:"No upcoming deadlines in the next 7 days."}):jsx("div",{className:"space-y-2 max-h-60 overflow-y-auto",children:O.map(t=>{let l=_(t.dueDate||0);return jsxs("div",{className: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:[jsxs("div",{className:"flex justify-between items-start mb-1",children:[jsx("h4",{className:"font-medium text-sm",children:t.subject.name}),S(t.type)]}),jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:t.subject.email}),jsxs("div",{className:"flex justify-between items-center",children:[jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:["Due: ",A(t.dueDate||0)]}),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 jsxs("div",{className:a(`bg-white dark:bg-gray-800 p-6 rounded-lg shadow-md ${H}`,i==null?void 0:i.root,s),children:[jsxs("div",{className:a("flex flex-col md:flex-row md:justify-between md:items-center mb-6",i==null?void 0:i.header,s),children:[jsxs("div",{children:[jsx("h2",{className:a("text-xl font-bold mb-2",i==null?void 0:i.title,s),children:$}),jsx("p",{className:"text-gray-600 dark:text-gray-300",children:I})]}),jsxs("div",{className:"mt-4 md:mt-0",children:[jsx("label",{htmlFor:"timeframe",className:"block text-sm font-medium mb-1",children:"Timeframe"}),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:[jsx("option",{value:"7days",children:"Last 7 Days"}),jsx("option",{value:"30days",children:"Last 30 Days"}),jsx("option",{value:"90days",children:"Last 90 Days"}),jsx("option",{value:"all",children:"All Time"})]})]})]}),J&&Q(),jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[jsxs("div",{children:[V&&U(),K&&W()]}),jsxs("div",{children:[Y&&k(),F&&E(),F&&m()]})]})]})};export{oe as a,ue as b};//# sourceMappingURL=chunk-MDWG2KDA.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-MDWG2KDA.mjs.map
|