@tantainnovative/ndpr-toolkit 2.4.0 → 2.4.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.
@@ -1,307 +0,0 @@
1
- import React from 'react';
2
- import { c as RequestType, D as DSRRequest, a as DSRStatus } from './dsr-Cm9lzWG7.js';
3
- import './useDSR-CYI7WCXr.js';
4
- import './dsr-pNtVb1BK.js';
5
-
6
- /**
7
- * Represents the data submitted by the DSR request form.
8
- */
9
- interface DSRFormSubmission {
10
- /** The selected request type identifier */
11
- requestType: string;
12
- /** Data subject personal information */
13
- dataSubject: {
14
- fullName: string;
15
- email: string;
16
- phone?: string;
17
- identifierType: string;
18
- identifierValue: string;
19
- };
20
- /** Additional information provided for the selected request type */
21
- additionalInfo?: Record<string, any>;
22
- /** Timestamp (ms) when the form was submitted */
23
- submittedAt: number;
24
- }
25
- interface DSRRequestFormClassNames {
26
- root?: string;
27
- title?: string;
28
- description?: string;
29
- form?: string;
30
- fieldGroup?: string;
31
- label?: string;
32
- input?: string;
33
- select?: string;
34
- textarea?: string;
35
- submitButton?: string;
36
- /** Alias for submitButton */
37
- primaryButton?: string;
38
- successMessage?: string;
39
- /** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
40
- loadingOverlay?: string;
41
- }
42
- interface DSRRequestFormProps {
43
- /**
44
- * Array of request types that can be submitted
45
- */
46
- requestTypes: RequestType[];
47
- /**
48
- * Callback function called when form is submitted
49
- */
50
- onSubmit: (data: DSRFormSubmission) => void;
51
- /**
52
- * Callback function called when form validation fails
53
- */
54
- onValidationError?: (errors: Record<string, string>) => void;
55
- /**
56
- * Title displayed on the form
57
- * @default "Submit a Data Subject Request"
58
- */
59
- title?: string;
60
- /**
61
- * Description text displayed on the form
62
- * @default "Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part IV, Sections 29-36."
63
- */
64
- description?: string;
65
- /**
66
- * Text for the submit button
67
- * @default "Submit Request"
68
- */
69
- submitButtonText?: string;
70
- /**
71
- * Custom CSS class for the form
72
- */
73
- className?: string;
74
- /**
75
- * Custom CSS class for the submit button
76
- */
77
- buttonClassName?: string;
78
- /**
79
- * Whether to show a confirmation message after submission
80
- * @default true
81
- */
82
- showConfirmation?: boolean;
83
- /**
84
- * Confirmation message to display after submission
85
- * @default "Your request has been submitted successfully. You will receive a confirmation email shortly."
86
- */
87
- confirmationMessage?: string;
88
- /**
89
- * Whether to require identity verification
90
- * @default true
91
- */
92
- requireIdentityVerification?: boolean;
93
- /**
94
- * Types of identifiers accepted for verification
95
- * @default ["email", "account", "customer_id"]
96
- */
97
- identifierTypes?: Array<{
98
- id: string;
99
- label: string;
100
- }>;
101
- /**
102
- * Whether to collect additional contact information
103
- * @default true
104
- */
105
- collectAdditionalContact?: boolean;
106
- /**
107
- * Custom labels for form fields
108
- */
109
- labels?: {
110
- name?: string;
111
- email?: string;
112
- requestType?: string;
113
- description?: string;
114
- submit?: string;
115
- };
116
- /**
117
- * Object of CSS class overrides keyed by semantic section name.
118
- */
119
- classNames?: DSRRequestFormClassNames;
120
- /**
121
- * When true, all default Tailwind classes are removed so consumers
122
- * can style from scratch using classNames.
123
- */
124
- unstyled?: boolean;
125
- /**
126
- * Whether the form is currently submitting.
127
- * When true, the submit button is disabled and shows "Submitting..." text.
128
- */
129
- isSubmitting?: boolean;
130
- /**
131
- * Default values to pre-fill form fields.
132
- * Useful for editing existing requests or pre-populating known data.
133
- */
134
- defaultValues?: Partial<DSRFormSubmission>;
135
- /**
136
- * Callback fired when the form is reset via the Reset button.
137
- * To fully remount the component (clearing all internal state),
138
- * change the `key` prop from the parent.
139
- */
140
- onReset?: () => void;
141
- }
142
- /**
143
- * Data Subject Request form component. Implements NDPA Part IV, Sections 29-36
144
- * covering data subject rights including access, rectification, erasure, and portability.
145
- */
146
- declare const DSRRequestForm: React.FC<DSRRequestFormProps>;
147
-
148
- interface DSRDashboardClassNames {
149
- root?: string;
150
- header?: string;
151
- title?: string;
152
- filters?: string;
153
- requestList?: string;
154
- requestItem?: string;
155
- statusBadge?: string;
156
- detailPanel?: string;
157
- }
158
- interface DSRDashboardProps {
159
- /**
160
- * List of DSR requests to display
161
- */
162
- requests: DSRRequest[];
163
- /**
164
- * Callback function called when a request is selected
165
- */
166
- onSelectRequest?: (requestId: string) => void;
167
- /**
168
- * Callback function called when a request status is updated
169
- */
170
- onUpdateStatus?: (requestId: string, status: DSRStatus) => void;
171
- /**
172
- * Callback function called when a request is assigned
173
- */
174
- onAssignRequest?: (requestId: string, assignee: string) => void;
175
- /**
176
- * Title displayed on the dashboard
177
- * @default "Data Subject Request Dashboard"
178
- */
179
- title?: string;
180
- /**
181
- * Description text displayed on the dashboard
182
- * @default "Track and manage data subject requests in compliance with NDPA Part IV requirements."
183
- */
184
- description?: string;
185
- /**
186
- * Custom CSS class for the dashboard
187
- */
188
- className?: string;
189
- /**
190
- * Custom CSS class for the buttons
191
- */
192
- buttonClassName?: string;
193
- /**
194
- * Whether to show the request details
195
- * @default true
196
- */
197
- showRequestDetails?: boolean;
198
- /**
199
- * Whether to show the request timeline
200
- * @default true
201
- */
202
- showRequestTimeline?: boolean;
203
- /**
204
- * Whether to show the deadline alerts
205
- * @default true
206
- */
207
- showDeadlineAlerts?: boolean;
208
- /**
209
- * List of possible assignees
210
- */
211
- assignees?: string[];
212
- /**
213
- * Object of CSS class overrides keyed by semantic section name.
214
- */
215
- classNames?: DSRDashboardClassNames;
216
- /**
217
- * When true, all default Tailwind classes are removed so consumers
218
- * can style from scratch using classNames.
219
- */
220
- unstyled?: boolean;
221
- }
222
- /**
223
- * Data Subject Request dashboard component. Supports compliance with NDPA Part IV,
224
- * providing tools to track, manage, and respond to data subject requests within required timeframes.
225
- */
226
- declare const DSRDashboard: React.FC<DSRDashboardProps>;
227
-
228
- interface DSRTrackerClassNames {
229
- root?: string;
230
- header?: string;
231
- title?: string;
232
- stats?: string;
233
- statCard?: string;
234
- table?: string;
235
- tableHeader?: string;
236
- tableRow?: string;
237
- statusBadge?: string;
238
- }
239
- interface DSRTrackerProps {
240
- /**
241
- * List of DSR requests to track
242
- */
243
- requests: DSRRequest[];
244
- /**
245
- * Callback function called when a request is selected
246
- */
247
- onSelectRequest?: (requestId: string) => void;
248
- /**
249
- * Title displayed on the tracker
250
- * @default "DSR Request Tracker"
251
- */
252
- title?: string;
253
- /**
254
- * Description text displayed on the tracker
255
- * @default "Track the status and progress of data subject requests as required by NDPA Part IV."
256
- */
257
- description?: string;
258
- /**
259
- * Custom CSS class for the tracker
260
- */
261
- className?: string;
262
- /**
263
- * Custom CSS class for the buttons
264
- */
265
- buttonClassName?: string;
266
- /**
267
- * Whether to show the summary statistics
268
- * @default true
269
- */
270
- showSummaryStats?: boolean;
271
- /**
272
- * Whether to show the request type breakdown
273
- * @default true
274
- */
275
- showTypeBreakdown?: boolean;
276
- /**
277
- * Whether to show the status breakdown
278
- * @default true
279
- */
280
- showStatusBreakdown?: boolean;
281
- /**
282
- * Whether to show the timeline chart
283
- * @default true
284
- */
285
- showTimelineChart?: boolean;
286
- /**
287
- * Whether to show the overdue requests
288
- * @default true
289
- */
290
- showOverdueRequests?: boolean;
291
- /**
292
- * Object of CSS class overrides keyed by semantic section name.
293
- */
294
- classNames?: DSRTrackerClassNames;
295
- /**
296
- * When true, all default Tailwind classes are removed so consumers
297
- * can style from scratch using classNames.
298
- */
299
- unstyled?: boolean;
300
- }
301
- /**
302
- * DSR tracking and analytics component. Supports compliance with NDPA Part IV,
303
- * providing summary statistics, deadline tracking, and compliance metrics for data subject requests.
304
- */
305
- declare const DSRTracker: React.FC<DSRTrackerProps>;
306
-
307
- export { DSRDashboard as D, type DSRDashboardClassNames as a, type DSRFormSubmission as b, DSRRequestForm as c, type DSRRequestFormClassNames as d, DSRTracker as e, type DSRTrackerClassNames as f };
@@ -1,307 +0,0 @@
1
- import React from 'react';
2
- import { c as RequestType, D as DSRRequest, a as DSRStatus } from './dsr-Cm9lzWG7.mjs';
3
- import './useDSR-YYZ6FYFs.mjs';
4
- import './dsr-D_eTNc4S.mjs';
5
-
6
- /**
7
- * Represents the data submitted by the DSR request form.
8
- */
9
- interface DSRFormSubmission {
10
- /** The selected request type identifier */
11
- requestType: string;
12
- /** Data subject personal information */
13
- dataSubject: {
14
- fullName: string;
15
- email: string;
16
- phone?: string;
17
- identifierType: string;
18
- identifierValue: string;
19
- };
20
- /** Additional information provided for the selected request type */
21
- additionalInfo?: Record<string, any>;
22
- /** Timestamp (ms) when the form was submitted */
23
- submittedAt: number;
24
- }
25
- interface DSRRequestFormClassNames {
26
- root?: string;
27
- title?: string;
28
- description?: string;
29
- form?: string;
30
- fieldGroup?: string;
31
- label?: string;
32
- input?: string;
33
- select?: string;
34
- textarea?: string;
35
- submitButton?: string;
36
- /** Alias for submitButton */
37
- primaryButton?: string;
38
- successMessage?: string;
39
- /** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
40
- loadingOverlay?: string;
41
- }
42
- interface DSRRequestFormProps {
43
- /**
44
- * Array of request types that can be submitted
45
- */
46
- requestTypes: RequestType[];
47
- /**
48
- * Callback function called when form is submitted
49
- */
50
- onSubmit: (data: DSRFormSubmission) => void;
51
- /**
52
- * Callback function called when form validation fails
53
- */
54
- onValidationError?: (errors: Record<string, string>) => void;
55
- /**
56
- * Title displayed on the form
57
- * @default "Submit a Data Subject Request"
58
- */
59
- title?: string;
60
- /**
61
- * Description text displayed on the form
62
- * @default "Use this form to exercise your rights under the Nigeria Data Protection Act (NDPA), Part IV, Sections 29-36."
63
- */
64
- description?: string;
65
- /**
66
- * Text for the submit button
67
- * @default "Submit Request"
68
- */
69
- submitButtonText?: string;
70
- /**
71
- * Custom CSS class for the form
72
- */
73
- className?: string;
74
- /**
75
- * Custom CSS class for the submit button
76
- */
77
- buttonClassName?: string;
78
- /**
79
- * Whether to show a confirmation message after submission
80
- * @default true
81
- */
82
- showConfirmation?: boolean;
83
- /**
84
- * Confirmation message to display after submission
85
- * @default "Your request has been submitted successfully. You will receive a confirmation email shortly."
86
- */
87
- confirmationMessage?: string;
88
- /**
89
- * Whether to require identity verification
90
- * @default true
91
- */
92
- requireIdentityVerification?: boolean;
93
- /**
94
- * Types of identifiers accepted for verification
95
- * @default ["email", "account", "customer_id"]
96
- */
97
- identifierTypes?: Array<{
98
- id: string;
99
- label: string;
100
- }>;
101
- /**
102
- * Whether to collect additional contact information
103
- * @default true
104
- */
105
- collectAdditionalContact?: boolean;
106
- /**
107
- * Custom labels for form fields
108
- */
109
- labels?: {
110
- name?: string;
111
- email?: string;
112
- requestType?: string;
113
- description?: string;
114
- submit?: string;
115
- };
116
- /**
117
- * Object of CSS class overrides keyed by semantic section name.
118
- */
119
- classNames?: DSRRequestFormClassNames;
120
- /**
121
- * When true, all default Tailwind classes are removed so consumers
122
- * can style from scratch using classNames.
123
- */
124
- unstyled?: boolean;
125
- /**
126
- * Whether the form is currently submitting.
127
- * When true, the submit button is disabled and shows "Submitting..." text.
128
- */
129
- isSubmitting?: boolean;
130
- /**
131
- * Default values to pre-fill form fields.
132
- * Useful for editing existing requests or pre-populating known data.
133
- */
134
- defaultValues?: Partial<DSRFormSubmission>;
135
- /**
136
- * Callback fired when the form is reset via the Reset button.
137
- * To fully remount the component (clearing all internal state),
138
- * change the `key` prop from the parent.
139
- */
140
- onReset?: () => void;
141
- }
142
- /**
143
- * Data Subject Request form component. Implements NDPA Part IV, Sections 29-36
144
- * covering data subject rights including access, rectification, erasure, and portability.
145
- */
146
- declare const DSRRequestForm: React.FC<DSRRequestFormProps>;
147
-
148
- interface DSRDashboardClassNames {
149
- root?: string;
150
- header?: string;
151
- title?: string;
152
- filters?: string;
153
- requestList?: string;
154
- requestItem?: string;
155
- statusBadge?: string;
156
- detailPanel?: string;
157
- }
158
- interface DSRDashboardProps {
159
- /**
160
- * List of DSR requests to display
161
- */
162
- requests: DSRRequest[];
163
- /**
164
- * Callback function called when a request is selected
165
- */
166
- onSelectRequest?: (requestId: string) => void;
167
- /**
168
- * Callback function called when a request status is updated
169
- */
170
- onUpdateStatus?: (requestId: string, status: DSRStatus) => void;
171
- /**
172
- * Callback function called when a request is assigned
173
- */
174
- onAssignRequest?: (requestId: string, assignee: string) => void;
175
- /**
176
- * Title displayed on the dashboard
177
- * @default "Data Subject Request Dashboard"
178
- */
179
- title?: string;
180
- /**
181
- * Description text displayed on the dashboard
182
- * @default "Track and manage data subject requests in compliance with NDPA Part IV requirements."
183
- */
184
- description?: string;
185
- /**
186
- * Custom CSS class for the dashboard
187
- */
188
- className?: string;
189
- /**
190
- * Custom CSS class for the buttons
191
- */
192
- buttonClassName?: string;
193
- /**
194
- * Whether to show the request details
195
- * @default true
196
- */
197
- showRequestDetails?: boolean;
198
- /**
199
- * Whether to show the request timeline
200
- * @default true
201
- */
202
- showRequestTimeline?: boolean;
203
- /**
204
- * Whether to show the deadline alerts
205
- * @default true
206
- */
207
- showDeadlineAlerts?: boolean;
208
- /**
209
- * List of possible assignees
210
- */
211
- assignees?: string[];
212
- /**
213
- * Object of CSS class overrides keyed by semantic section name.
214
- */
215
- classNames?: DSRDashboardClassNames;
216
- /**
217
- * When true, all default Tailwind classes are removed so consumers
218
- * can style from scratch using classNames.
219
- */
220
- unstyled?: boolean;
221
- }
222
- /**
223
- * Data Subject Request dashboard component. Supports compliance with NDPA Part IV,
224
- * providing tools to track, manage, and respond to data subject requests within required timeframes.
225
- */
226
- declare const DSRDashboard: React.FC<DSRDashboardProps>;
227
-
228
- interface DSRTrackerClassNames {
229
- root?: string;
230
- header?: string;
231
- title?: string;
232
- stats?: string;
233
- statCard?: string;
234
- table?: string;
235
- tableHeader?: string;
236
- tableRow?: string;
237
- statusBadge?: string;
238
- }
239
- interface DSRTrackerProps {
240
- /**
241
- * List of DSR requests to track
242
- */
243
- requests: DSRRequest[];
244
- /**
245
- * Callback function called when a request is selected
246
- */
247
- onSelectRequest?: (requestId: string) => void;
248
- /**
249
- * Title displayed on the tracker
250
- * @default "DSR Request Tracker"
251
- */
252
- title?: string;
253
- /**
254
- * Description text displayed on the tracker
255
- * @default "Track the status and progress of data subject requests as required by NDPA Part IV."
256
- */
257
- description?: string;
258
- /**
259
- * Custom CSS class for the tracker
260
- */
261
- className?: string;
262
- /**
263
- * Custom CSS class for the buttons
264
- */
265
- buttonClassName?: string;
266
- /**
267
- * Whether to show the summary statistics
268
- * @default true
269
- */
270
- showSummaryStats?: boolean;
271
- /**
272
- * Whether to show the request type breakdown
273
- * @default true
274
- */
275
- showTypeBreakdown?: boolean;
276
- /**
277
- * Whether to show the status breakdown
278
- * @default true
279
- */
280
- showStatusBreakdown?: boolean;
281
- /**
282
- * Whether to show the timeline chart
283
- * @default true
284
- */
285
- showTimelineChart?: boolean;
286
- /**
287
- * Whether to show the overdue requests
288
- * @default true
289
- */
290
- showOverdueRequests?: boolean;
291
- /**
292
- * Object of CSS class overrides keyed by semantic section name.
293
- */
294
- classNames?: DSRTrackerClassNames;
295
- /**
296
- * When true, all default Tailwind classes are removed so consumers
297
- * can style from scratch using classNames.
298
- */
299
- unstyled?: boolean;
300
- }
301
- /**
302
- * DSR tracking and analytics component. Supports compliance with NDPA Part IV,
303
- * providing summary statistics, deadline tracking, and compliance metrics for data subject requests.
304
- */
305
- declare const DSRTracker: React.FC<DSRTrackerProps>;
306
-
307
- export { DSRDashboard as D, type DSRDashboardClassNames as a, type DSRFormSubmission as b, DSRRequestForm as c, type DSRRequestFormClassNames as d, DSRTracker as e, type DSRTrackerClassNames as f };