@tantainnovative/ndpr-toolkit 2.1.2 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -2
- package/dist/{breach-6z0r-KuE.d.mts → breach-B_-6lDqS.d.mts} +1 -1
- package/dist/{breach-BFfnvtRk.d.ts → breach-CzXqSsaY.d.ts} +1 -1
- package/dist/{breach-BtFbDOmV.d.mts → breach-Eu9byel8.d.mts} +1 -1
- package/dist/{breach-BtFbDOmV.d.ts → breach-Eu9byel8.d.ts} +1 -1
- package/dist/breach-ouXoVTWs.d.ts +438 -0
- package/dist/breach-yRiyyc4n.d.mts +438 -0
- package/dist/breach.d.mts +5 -275
- package/dist/breach.d.ts +5 -275
- package/dist/breach.js +1 -1
- package/dist/breach.mjs +1 -1
- package/dist/chunk-2XFAV267.mjs +2 -0
- package/dist/chunk-32UIWTGD.js +72 -0
- package/dist/chunk-4JUDKBA2.mjs +7 -0
- package/dist/chunk-4VVARDN2.mjs +2 -0
- package/dist/chunk-5RSOLEEP.js +63 -0
- package/dist/chunk-AYKLAEOU.mjs +2 -0
- package/dist/chunk-BGHQTZAC.js +94 -0
- package/dist/chunk-BZTTQS4A.mjs +7 -0
- package/dist/chunk-CAB7O3GR.mjs +63 -0
- package/dist/chunk-CL53OI3I.js +7 -0
- package/dist/chunk-E64TU6IU.js +2 -0
- package/dist/chunk-EKVTLHBQ.js +2 -0
- package/dist/chunk-ELKEZEV5.mjs +2 -0
- package/dist/chunk-EPF7J2FK.js +3 -0
- package/dist/chunk-ER7X6E36.js +2 -0
- package/dist/chunk-FXTZDKDC.mjs +3 -0
- package/dist/chunk-IBEKLDBY.mjs +2 -0
- package/dist/chunk-ILCNDOBU.js +2 -0
- package/dist/chunk-K3GMTMQ6.js +2 -0
- package/dist/chunk-MJGOLP5M.js +2 -0
- package/dist/chunk-NW4A3JW6.mjs +2 -0
- package/dist/chunk-P3PULLYP.mjs +2 -0
- package/dist/chunk-SKJCQKFL.mjs +94 -0
- package/dist/chunk-TCJCE6WN.js +2 -0
- package/dist/chunk-UZ5EZOA7.js +2 -0
- package/dist/chunk-WSHSHIIM.mjs +2 -0
- package/dist/chunk-XMYUYQH7.mjs +72 -0
- package/dist/chunk-ZNTMZ6NM.js +7 -0
- package/dist/consent-audit-BdByjYlM.d.mts +65 -0
- package/dist/consent-audit-DhbfMR0n.d.ts +65 -0
- package/dist/consent.d.mts +120 -7
- package/dist/consent.d.ts +120 -7
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/core.d.mts +62 -12
- package/dist/core.d.ts +62 -12
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{cross-border-BrIy1ieh.d.ts → cross-border-BMcqLvjC.d.mts} +1 -1
- package/dist/{cross-border-BrIy1ieh.d.mts → cross-border-BMcqLvjC.d.ts} +1 -1
- package/dist/cross-border-entry-BrWVPly6.d.ts +91 -0
- package/dist/cross-border-entry-cCTvpwnT.d.mts +91 -0
- package/dist/cross-border.d.mts +4 -58
- package/dist/cross-border.d.ts +4 -58
- package/dist/cross-border.js +1 -1
- package/dist/cross-border.mjs +1 -1
- package/dist/{dpia-vWfE_9bO.d.mts → dpia-5OQVA1R_.d.mts} +1 -1
- package/dist/{dpia-vWfE_9bO.d.ts → dpia-5OQVA1R_.d.ts} +1 -1
- package/dist/{dpia-fdtTd2DI.d.ts → dpia-B0Pok5us.d.ts} +1 -1
- package/dist/{dpia-B9ZZJG5a.d.mts → dpia-CUfOmzvX.d.mts} +1 -1
- package/dist/dpia.d.mts +119 -5
- package/dist/dpia.d.ts +119 -5
- package/dist/dpia.js +1 -1
- package/dist/dpia.mjs +1 -1
- package/dist/dsr-190YpijW.d.ts +307 -0
- package/dist/dsr-BTT-Xd7H.d.mts +307 -0
- package/dist/{dsr-pQzQ3H1O.d.mts → dsr-Cm9lzWG7.d.mts} +1 -1
- package/dist/{dsr-pQzQ3H1O.d.ts → dsr-Cm9lzWG7.d.ts} +1 -1
- package/dist/{dsr-whPkiI0_.d.mts → dsr-D_eTNc4S.d.mts} +1 -1
- package/dist/{dsr-jq5NUEdz.d.ts → dsr-pNtVb1BK.d.ts} +1 -1
- package/dist/dsr.d.mts +5 -192
- package/dist/dsr.d.ts +5 -192
- package/dist/dsr.js +1 -1
- package/dist/dsr.mjs +1 -1
- package/dist/hooks.d.mts +14 -14
- package/dist/hooks.d.ts +14 -14
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +28 -27
- package/dist/index.d.ts +28 -27
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{lawful-basis-v04AhbK2.d.ts → lawful-basis-BEyI0kGg.d.ts} +2 -2
- package/dist/{lawful-basis-D-oXFizg.d.mts → lawful-basis-C2eGaoHM.d.mts} +2 -2
- package/dist/{lawful-basis-CWtvDG1x.d.mts → lawful-basis-Cv1VmDLn.d.mts} +1 -1
- package/dist/{lawful-basis-CWtvDG1x.d.ts → lawful-basis-Cv1VmDLn.d.ts} +1 -1
- package/dist/lawful-basis-entry-15qjKcNO.d.ts +87 -0
- package/dist/lawful-basis-entry-CxZrofwG.d.mts +87 -0
- package/dist/lawful-basis.d.mts +5 -55
- package/dist/lawful-basis.d.ts +5 -55
- package/dist/lawful-basis.js +1 -1
- package/dist/lawful-basis.mjs +1 -1
- package/dist/policy-D2_jh5-T.d.ts +293 -0
- package/dist/policy-E0fXZkda.d.mts +293 -0
- package/dist/policy-templates-CIKcV0i1.d.ts +36 -0
- package/dist/policy-templates-DMsPwOSZ.d.mts +36 -0
- package/dist/policy.d.mts +5 -195
- package/dist/policy.d.ts +5 -195
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/{ropa-Rb4dsFSz.d.mts → ropa-DP7pPPql.d.mts} +2 -2
- package/dist/{ropa-BebGfqKQ.d.ts → ropa-Li6UlL5H.d.ts} +2 -2
- package/dist/ropa-entry-B0D7X1GV.d.ts +80 -0
- package/dist/ropa-entry-DiOThOc2.d.mts +80 -0
- package/dist/ropa.d.mts +5 -45
- package/dist/ropa.d.ts +5 -45
- package/dist/ropa.js +1 -1
- package/dist/ropa.mjs +1 -1
- package/dist/styles.css +40 -28
- package/dist/styles.d.ts +1 -0
- package/dist/unstyled.js +1 -1
- package/dist/unstyled.mjs +1 -1
- package/dist/{useBreach-WrZzJilM.d.mts → useBreach-BBSoIcZO.d.mts} +1 -1
- package/dist/{useBreach-vrh_XMpI.d.ts → useBreach-lFLbSyAN.d.ts} +1 -1
- package/dist/{useCrossBorderTransfer-TVnY8_UX.d.mts → useCrossBorderTransfer-BZVFCXfr.d.mts} +1 -1
- package/dist/{useCrossBorderTransfer-D4FQYfFt.d.ts → useCrossBorderTransfer-DmtACeqW.d.ts} +1 -1
- package/dist/{useDPIA-DFDHBLSa.d.ts → useDPIA-DBsg2yZx.d.ts} +1 -1
- package/dist/{useDPIA-FqPofFaV.d.mts → useDPIA-Da7-Q_yW.d.mts} +1 -1
- package/dist/{useDSR-DAqqOBXb.d.ts → useDSR-CYI7WCXr.d.ts} +1 -1
- package/dist/{useDSR-OXM5Q9rf.d.mts → useDSR-YYZ6FYFs.d.mts} +1 -1
- package/dist/{usePrivacyPolicy-CfySfBLS.d.ts → useDefaultPrivacyPolicy-B7kTHbZh.d.ts} +39 -2
- package/dist/{usePrivacyPolicy-Dit2sFuV.d.mts → useDefaultPrivacyPolicy-CUluF_ic.d.mts} +39 -2
- package/dist/{useLawfulBasis-RILM_xsx.d.ts → useLawfulBasis-CCWF9waR.d.ts} +2 -2
- package/dist/{useLawfulBasis-DNQ8YszQ.d.mts → useLawfulBasis-CpWuHtyh.d.mts} +2 -2
- package/dist/{useROPA-Bcs6cRdi.d.ts → useROPA-BhJ3kvHp.d.ts} +1 -1
- package/dist/{useROPA-nmcSiUYv.d.mts → useROPA-DLFdjkxP.d.mts} +1 -1
- package/package.json +30 -21
- package/dist/chunk-2XHD22J7.mjs +0 -7
- package/dist/chunk-4DKT6IB6.js +0 -94
- package/dist/chunk-6JFTAYXV.mjs +0 -2
- package/dist/chunk-6JVYYLS7.js +0 -2
- package/dist/chunk-6SGG6WPA.mjs +0 -2
- package/dist/chunk-AQEGDEQM.js +0 -7
- package/dist/chunk-C2IJWCZQ.mjs +0 -2
- package/dist/chunk-DB3JH4DS.mjs +0 -2
- package/dist/chunk-FFW7RUAG.mjs +0 -94
- package/dist/chunk-FK3CSFLJ.js +0 -2
- package/dist/chunk-IWUUVRLJ.js +0 -2
- package/dist/chunk-JUN6YPLL.mjs +0 -72
- package/dist/chunk-L3FKTBGV.js +0 -72
- package/dist/chunk-PM7CMTMB.js +0 -4
- package/dist/chunk-RB26MIRI.js +0 -2
- package/dist/chunk-RHWW5FDP.js +0 -16
- package/dist/chunk-SLNMKGQ2.mjs +0 -2
- package/dist/chunk-UUWVBENC.js +0 -2
- package/dist/chunk-UYP64PV7.mjs +0 -4
- package/dist/chunk-XMKA6GVK.mjs +0 -16
- package/dist/consent-DCc5zjXI.d.mts +0 -24
- package/dist/consent-DLWb5ota.d.ts +0 -24
- package/dist/privacy-9FcJceMr.d.mts +0 -15
- package/dist/privacy-BXz7O2ej.d.ts +0 -15
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { P as PolicySection, b as PolicyVariable } from './privacy-Ca6te9Ir.mjs';
|
|
3
|
+
import './useDefaultPrivacyPolicy-CUluF_ic.mjs';
|
|
4
|
+
import './policy-templates-DMsPwOSZ.mjs';
|
|
5
|
+
|
|
6
|
+
interface PolicyGeneratorClassNames {
|
|
7
|
+
/** Root container */
|
|
8
|
+
root?: string;
|
|
9
|
+
/** Header area containing title and description */
|
|
10
|
+
header?: string;
|
|
11
|
+
/** Title element */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** Description element */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** Section list container */
|
|
16
|
+
sectionList?: string;
|
|
17
|
+
/** Individual section item */
|
|
18
|
+
sectionItem?: string;
|
|
19
|
+
/** Variable form container */
|
|
20
|
+
form?: string;
|
|
21
|
+
/** Form input fields */
|
|
22
|
+
input?: string;
|
|
23
|
+
/** Generate button */
|
|
24
|
+
generateButton?: string;
|
|
25
|
+
/** Alias for generateButton */
|
|
26
|
+
primaryButton?: string;
|
|
27
|
+
/** NDPA compliance notice */
|
|
28
|
+
complianceNotice?: string;
|
|
29
|
+
}
|
|
30
|
+
interface PolicyGeneratorProps {
|
|
31
|
+
/**
|
|
32
|
+
* List of policy sections
|
|
33
|
+
* @default DEFAULT_POLICY_SECTIONS
|
|
34
|
+
*/
|
|
35
|
+
sections?: PolicySection[];
|
|
36
|
+
/**
|
|
37
|
+
* List of policy variables
|
|
38
|
+
* @default DEFAULT_POLICY_VARIABLES
|
|
39
|
+
*/
|
|
40
|
+
variables?: PolicyVariable[];
|
|
41
|
+
/**
|
|
42
|
+
* Callback function called when the policy is generated
|
|
43
|
+
*/
|
|
44
|
+
onGenerate: (policy: {
|
|
45
|
+
sections: PolicySection[];
|
|
46
|
+
variables: PolicyVariable[];
|
|
47
|
+
content: string;
|
|
48
|
+
}) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Title displayed on the generator
|
|
51
|
+
* @default "NDPA Privacy Policy Generator"
|
|
52
|
+
*/
|
|
53
|
+
title?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Description text displayed on the generator
|
|
56
|
+
* @default "Generate an NDPA-compliant privacy policy for your organization in accordance with NDPA Section 24."
|
|
57
|
+
*/
|
|
58
|
+
description?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Custom CSS class for the generator
|
|
61
|
+
*/
|
|
62
|
+
className?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Custom CSS class for the buttons
|
|
65
|
+
*/
|
|
66
|
+
buttonClassName?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Text for the generate button
|
|
69
|
+
* @default "Generate Policy"
|
|
70
|
+
*/
|
|
71
|
+
generateButtonText?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Whether to show a preview of the generated policy
|
|
74
|
+
* @default true
|
|
75
|
+
*/
|
|
76
|
+
showPreview?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Whether to allow editing the policy content
|
|
79
|
+
* @default true
|
|
80
|
+
*/
|
|
81
|
+
allowEditing?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Override class names for internal elements
|
|
84
|
+
*/
|
|
85
|
+
classNames?: PolicyGeneratorClassNames;
|
|
86
|
+
/**
|
|
87
|
+
* If true, removes all default styles. Use with classNames to apply your own.
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
unstyled?: boolean;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Privacy policy generator component. Implements NDPA Section 24 transparency requirements,
|
|
94
|
+
* helping organizations generate compliant privacy policies that disclose required information.
|
|
95
|
+
*/
|
|
96
|
+
declare const PolicyGenerator: React.FC<PolicyGeneratorProps>;
|
|
97
|
+
|
|
98
|
+
interface PolicyPreviewClassNames {
|
|
99
|
+
/** Root container */
|
|
100
|
+
root?: string;
|
|
101
|
+
/** Header area containing title and description */
|
|
102
|
+
header?: string;
|
|
103
|
+
/** Title element */
|
|
104
|
+
title?: string;
|
|
105
|
+
/** Description element */
|
|
106
|
+
description?: string;
|
|
107
|
+
/** Content area wrapping the rendered policy */
|
|
108
|
+
content?: string;
|
|
109
|
+
/** Individual rendered section container */
|
|
110
|
+
section?: string;
|
|
111
|
+
/** Section title within rendered content */
|
|
112
|
+
sectionTitle?: string;
|
|
113
|
+
/** Section content within rendered content */
|
|
114
|
+
sectionContent?: string;
|
|
115
|
+
/** NDPA compliance notice */
|
|
116
|
+
complianceNotice?: string;
|
|
117
|
+
}
|
|
118
|
+
interface PolicyPreviewProps {
|
|
119
|
+
/**
|
|
120
|
+
* The policy content to preview
|
|
121
|
+
*/
|
|
122
|
+
content: string;
|
|
123
|
+
/**
|
|
124
|
+
* The policy sections
|
|
125
|
+
*/
|
|
126
|
+
sections?: PolicySection[];
|
|
127
|
+
/**
|
|
128
|
+
* The policy variables
|
|
129
|
+
*/
|
|
130
|
+
variables?: PolicyVariable[];
|
|
131
|
+
/**
|
|
132
|
+
* Callback function called when the policy is exported
|
|
133
|
+
*/
|
|
134
|
+
onExport?: (format: 'pdf' | 'html' | 'markdown' | 'docx') => void;
|
|
135
|
+
/**
|
|
136
|
+
* Callback function called when the policy is edited
|
|
137
|
+
*/
|
|
138
|
+
onEdit?: () => void;
|
|
139
|
+
/**
|
|
140
|
+
* Title displayed on the preview
|
|
141
|
+
* @default "Privacy Policy Preview"
|
|
142
|
+
*/
|
|
143
|
+
title?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Description text displayed on the preview
|
|
146
|
+
* @default "Preview your NDPA-compliant privacy policy before exporting."
|
|
147
|
+
*/
|
|
148
|
+
description?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Custom CSS class for the preview
|
|
151
|
+
*/
|
|
152
|
+
className?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Custom CSS class for the buttons
|
|
155
|
+
*/
|
|
156
|
+
buttonClassName?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Whether to show the export options
|
|
159
|
+
* @default true
|
|
160
|
+
*/
|
|
161
|
+
showExportOptions?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Whether to show the edit button
|
|
164
|
+
* @default true
|
|
165
|
+
*/
|
|
166
|
+
showEditButton?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Whether to show the table of contents
|
|
169
|
+
* @default true
|
|
170
|
+
*/
|
|
171
|
+
showTableOfContents?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Whether to show the policy metadata
|
|
174
|
+
* @default true
|
|
175
|
+
*/
|
|
176
|
+
showMetadata?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* The organization name to display in the policy
|
|
179
|
+
*/
|
|
180
|
+
organizationName?: string;
|
|
181
|
+
/**
|
|
182
|
+
* The last updated date to display in the policy
|
|
183
|
+
*/
|
|
184
|
+
lastUpdated?: Date;
|
|
185
|
+
/**
|
|
186
|
+
* Override class names for internal elements
|
|
187
|
+
*/
|
|
188
|
+
classNames?: PolicyPreviewClassNames;
|
|
189
|
+
/**
|
|
190
|
+
* If true, removes all default styles. Use with classNames to apply your own.
|
|
191
|
+
* @default false
|
|
192
|
+
*/
|
|
193
|
+
unstyled?: boolean;
|
|
194
|
+
}
|
|
195
|
+
declare const PolicyPreview: React.FC<PolicyPreviewProps>;
|
|
196
|
+
|
|
197
|
+
interface PolicyExporterClassNames {
|
|
198
|
+
/** Root container */
|
|
199
|
+
root?: string;
|
|
200
|
+
/** Header area containing title and description */
|
|
201
|
+
header?: string;
|
|
202
|
+
/** Title element */
|
|
203
|
+
title?: string;
|
|
204
|
+
/** Description element */
|
|
205
|
+
description?: string;
|
|
206
|
+
/** Format selector container */
|
|
207
|
+
formatSelector?: string;
|
|
208
|
+
/** Individual format option */
|
|
209
|
+
formatOption?: string;
|
|
210
|
+
/** Export button */
|
|
211
|
+
exportButton?: string;
|
|
212
|
+
/** Alias for exportButton */
|
|
213
|
+
primaryButton?: string;
|
|
214
|
+
/** NDPA compliance / export tips notice */
|
|
215
|
+
complianceNotice?: string;
|
|
216
|
+
/** Preview / export history area */
|
|
217
|
+
preview?: string;
|
|
218
|
+
}
|
|
219
|
+
interface PolicyExporterProps {
|
|
220
|
+
/**
|
|
221
|
+
* The policy content to export
|
|
222
|
+
*/
|
|
223
|
+
content: string;
|
|
224
|
+
/**
|
|
225
|
+
* The policy title
|
|
226
|
+
*/
|
|
227
|
+
title?: string;
|
|
228
|
+
/**
|
|
229
|
+
* The organization name to include in the exported policy
|
|
230
|
+
*/
|
|
231
|
+
organizationName?: string;
|
|
232
|
+
/**
|
|
233
|
+
* The last updated date to include in the exported policy
|
|
234
|
+
*/
|
|
235
|
+
lastUpdated?: Date;
|
|
236
|
+
/**
|
|
237
|
+
* Callback function called when the export is complete
|
|
238
|
+
*/
|
|
239
|
+
onExportComplete?: (format: string, url: string) => void;
|
|
240
|
+
/**
|
|
241
|
+
* Title displayed on the exporter
|
|
242
|
+
* @default "Export Privacy Policy"
|
|
243
|
+
*/
|
|
244
|
+
componentTitle?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Description text displayed on the exporter
|
|
247
|
+
* @default "Export your NDPA-compliant privacy policy in various formats."
|
|
248
|
+
*/
|
|
249
|
+
description?: string;
|
|
250
|
+
/**
|
|
251
|
+
* Custom CSS class for the exporter
|
|
252
|
+
*/
|
|
253
|
+
className?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Custom CSS class for the buttons
|
|
256
|
+
*/
|
|
257
|
+
buttonClassName?: string;
|
|
258
|
+
/**
|
|
259
|
+
* Whether to show the export history
|
|
260
|
+
* @default true
|
|
261
|
+
*/
|
|
262
|
+
showExportHistory?: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Whether to include the NDPA compliance notice in the exported policy
|
|
265
|
+
* @default true
|
|
266
|
+
*/
|
|
267
|
+
includeComplianceNotice?: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Whether to include the organization logo in the exported policy
|
|
270
|
+
* @default false
|
|
271
|
+
*/
|
|
272
|
+
includeLogo?: boolean;
|
|
273
|
+
/**
|
|
274
|
+
* URL of the organization logo
|
|
275
|
+
*/
|
|
276
|
+
logoUrl?: string;
|
|
277
|
+
/**
|
|
278
|
+
* Custom CSS styles for the exported policy
|
|
279
|
+
*/
|
|
280
|
+
customStyles?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Override class names for internal elements
|
|
283
|
+
*/
|
|
284
|
+
classNames?: PolicyExporterClassNames;
|
|
285
|
+
/**
|
|
286
|
+
* If true, removes all default styles. Use with classNames to apply your own.
|
|
287
|
+
* @default false
|
|
288
|
+
*/
|
|
289
|
+
unstyled?: boolean;
|
|
290
|
+
}
|
|
291
|
+
declare const PolicyExporter: React.FC<PolicyExporterProps>;
|
|
292
|
+
|
|
293
|
+
export { PolicyExporter as P, type PolicyExporterClassNames as a, PolicyGenerator as b, type PolicyGeneratorClassNames as c, PolicyPreview as d, type PolicyPreviewClassNames as e };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { P as PolicySection, O as OrganizationInfo, b as PolicyVariable } from './privacy-Ca6te9Ir.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generates policy text by replacing variables in a template with organization-specific values
|
|
5
|
+
* @param sectionsOrTemplate The policy sections or template string to generate text for
|
|
6
|
+
* @param organizationInfoOrVariables The organization information or variable map to use for replacement
|
|
7
|
+
* @returns The generated policy text or an object with the generated text and metadata
|
|
8
|
+
*/
|
|
9
|
+
declare function generatePolicyText(sectionsOrTemplate: PolicySection[] | string, organizationInfoOrVariables: OrganizationInfo | Record<string, string>): string | {
|
|
10
|
+
fullText: string;
|
|
11
|
+
sectionTexts: Record<string, string>;
|
|
12
|
+
missingVariables: string[];
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Default NDPA-compliant privacy policy sections.
|
|
17
|
+
* Each section uses {{variable}} placeholders that are resolved at generation time.
|
|
18
|
+
*/
|
|
19
|
+
declare const DEFAULT_POLICY_SECTIONS: PolicySection[];
|
|
20
|
+
/**
|
|
21
|
+
* Default policy variables for NDPA-compliant privacy policies.
|
|
22
|
+
* These map to the {{variable}} placeholders used in DEFAULT_POLICY_SECTIONS.
|
|
23
|
+
*/
|
|
24
|
+
declare const DEFAULT_POLICY_VARIABLES: PolicyVariable[];
|
|
25
|
+
/**
|
|
26
|
+
* Creates a complete business privacy policy template with default
|
|
27
|
+
* NDPA-compliant sections and variables.
|
|
28
|
+
*
|
|
29
|
+
* @returns An object containing the default sections and variables.
|
|
30
|
+
*/
|
|
31
|
+
declare function createBusinessPolicyTemplate(): {
|
|
32
|
+
sections: PolicySection[];
|
|
33
|
+
variables: PolicyVariable[];
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { DEFAULT_POLICY_SECTIONS as D, DEFAULT_POLICY_VARIABLES as a, createBusinessPolicyTemplate as c, generatePolicyText as g };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { P as PolicySection, O as OrganizationInfo, b as PolicyVariable } from './privacy-Ca6te9Ir.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generates policy text by replacing variables in a template with organization-specific values
|
|
5
|
+
* @param sectionsOrTemplate The policy sections or template string to generate text for
|
|
6
|
+
* @param organizationInfoOrVariables The organization information or variable map to use for replacement
|
|
7
|
+
* @returns The generated policy text or an object with the generated text and metadata
|
|
8
|
+
*/
|
|
9
|
+
declare function generatePolicyText(sectionsOrTemplate: PolicySection[] | string, organizationInfoOrVariables: OrganizationInfo | Record<string, string>): string | {
|
|
10
|
+
fullText: string;
|
|
11
|
+
sectionTexts: Record<string, string>;
|
|
12
|
+
missingVariables: string[];
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Default NDPA-compliant privacy policy sections.
|
|
17
|
+
* Each section uses {{variable}} placeholders that are resolved at generation time.
|
|
18
|
+
*/
|
|
19
|
+
declare const DEFAULT_POLICY_SECTIONS: PolicySection[];
|
|
20
|
+
/**
|
|
21
|
+
* Default policy variables for NDPA-compliant privacy policies.
|
|
22
|
+
* These map to the {{variable}} placeholders used in DEFAULT_POLICY_SECTIONS.
|
|
23
|
+
*/
|
|
24
|
+
declare const DEFAULT_POLICY_VARIABLES: PolicyVariable[];
|
|
25
|
+
/**
|
|
26
|
+
* Creates a complete business privacy policy template with default
|
|
27
|
+
* NDPA-compliant sections and variables.
|
|
28
|
+
*
|
|
29
|
+
* @returns An object containing the default sections and variables.
|
|
30
|
+
*/
|
|
31
|
+
declare function createBusinessPolicyTemplate(): {
|
|
32
|
+
sections: PolicySection[];
|
|
33
|
+
variables: PolicyVariable[];
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { DEFAULT_POLICY_SECTIONS as D, DEFAULT_POLICY_VARIABLES as a, createBusinessPolicyTemplate as c, generatePolicyText as g };
|
package/dist/policy.d.mts
CHANGED
|
@@ -1,195 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
interface PolicyGeneratorProps {
|
|
8
|
-
/**
|
|
9
|
-
* List of policy sections
|
|
10
|
-
*/
|
|
11
|
-
sections: PolicySection[];
|
|
12
|
-
/**
|
|
13
|
-
* List of policy variables
|
|
14
|
-
*/
|
|
15
|
-
variables: PolicyVariable[];
|
|
16
|
-
/**
|
|
17
|
-
* Callback function called when the policy is generated
|
|
18
|
-
*/
|
|
19
|
-
onGenerate: (policy: {
|
|
20
|
-
sections: PolicySection[];
|
|
21
|
-
variables: PolicyVariable[];
|
|
22
|
-
content: string;
|
|
23
|
-
}) => void;
|
|
24
|
-
/**
|
|
25
|
-
* Title displayed on the generator
|
|
26
|
-
* @default "NDPA Privacy Policy Generator"
|
|
27
|
-
*/
|
|
28
|
-
title?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Description text displayed on the generator
|
|
31
|
-
* @default "Generate an NDPA-compliant privacy policy for your organization."
|
|
32
|
-
*/
|
|
33
|
-
description?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Custom CSS class for the generator
|
|
36
|
-
*/
|
|
37
|
-
className?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Custom CSS class for the buttons
|
|
40
|
-
*/
|
|
41
|
-
buttonClassName?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Text for the generate button
|
|
44
|
-
* @default "Generate Policy"
|
|
45
|
-
*/
|
|
46
|
-
generateButtonText?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Whether to show a preview of the generated policy
|
|
49
|
-
* @default true
|
|
50
|
-
*/
|
|
51
|
-
showPreview?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Whether to allow editing the policy content
|
|
54
|
-
* @default true
|
|
55
|
-
*/
|
|
56
|
-
allowEditing?: boolean;
|
|
57
|
-
}
|
|
58
|
-
declare const PolicyGenerator: React.FC<PolicyGeneratorProps>;
|
|
59
|
-
|
|
60
|
-
interface PolicyPreviewProps {
|
|
61
|
-
/**
|
|
62
|
-
* The policy content to preview
|
|
63
|
-
*/
|
|
64
|
-
content: string;
|
|
65
|
-
/**
|
|
66
|
-
* The policy sections
|
|
67
|
-
*/
|
|
68
|
-
sections?: PolicySection[];
|
|
69
|
-
/**
|
|
70
|
-
* The policy variables
|
|
71
|
-
*/
|
|
72
|
-
variables?: PolicyVariable[];
|
|
73
|
-
/**
|
|
74
|
-
* Callback function called when the policy is exported
|
|
75
|
-
*/
|
|
76
|
-
onExport?: (format: 'pdf' | 'html' | 'markdown' | 'docx') => void;
|
|
77
|
-
/**
|
|
78
|
-
* Callback function called when the policy is edited
|
|
79
|
-
*/
|
|
80
|
-
onEdit?: () => void;
|
|
81
|
-
/**
|
|
82
|
-
* Title displayed on the preview
|
|
83
|
-
* @default "Privacy Policy Preview"
|
|
84
|
-
*/
|
|
85
|
-
title?: string;
|
|
86
|
-
/**
|
|
87
|
-
* Description text displayed on the preview
|
|
88
|
-
* @default "Preview your NDPA-compliant privacy policy before exporting."
|
|
89
|
-
*/
|
|
90
|
-
description?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Custom CSS class for the preview
|
|
93
|
-
*/
|
|
94
|
-
className?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Custom CSS class for the buttons
|
|
97
|
-
*/
|
|
98
|
-
buttonClassName?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Whether to show the export options
|
|
101
|
-
* @default true
|
|
102
|
-
*/
|
|
103
|
-
showExportOptions?: boolean;
|
|
104
|
-
/**
|
|
105
|
-
* Whether to show the edit button
|
|
106
|
-
* @default true
|
|
107
|
-
*/
|
|
108
|
-
showEditButton?: boolean;
|
|
109
|
-
/**
|
|
110
|
-
* Whether to show the table of contents
|
|
111
|
-
* @default true
|
|
112
|
-
*/
|
|
113
|
-
showTableOfContents?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Whether to show the policy metadata
|
|
116
|
-
* @default true
|
|
117
|
-
*/
|
|
118
|
-
showMetadata?: boolean;
|
|
119
|
-
/**
|
|
120
|
-
* The organization name to display in the policy
|
|
121
|
-
*/
|
|
122
|
-
organizationName?: string;
|
|
123
|
-
/**
|
|
124
|
-
* The last updated date to display in the policy
|
|
125
|
-
*/
|
|
126
|
-
lastUpdated?: Date;
|
|
127
|
-
}
|
|
128
|
-
declare const PolicyPreview: React.FC<PolicyPreviewProps>;
|
|
129
|
-
|
|
130
|
-
interface PolicyExporterProps {
|
|
131
|
-
/**
|
|
132
|
-
* The policy content to export
|
|
133
|
-
*/
|
|
134
|
-
content: string;
|
|
135
|
-
/**
|
|
136
|
-
* The policy title
|
|
137
|
-
*/
|
|
138
|
-
title?: string;
|
|
139
|
-
/**
|
|
140
|
-
* The organization name to include in the exported policy
|
|
141
|
-
*/
|
|
142
|
-
organizationName?: string;
|
|
143
|
-
/**
|
|
144
|
-
* The last updated date to include in the exported policy
|
|
145
|
-
*/
|
|
146
|
-
lastUpdated?: Date;
|
|
147
|
-
/**
|
|
148
|
-
* Callback function called when the export is complete
|
|
149
|
-
*/
|
|
150
|
-
onExportComplete?: (format: string, url: string) => void;
|
|
151
|
-
/**
|
|
152
|
-
* Title displayed on the exporter
|
|
153
|
-
* @default "Export Privacy Policy"
|
|
154
|
-
*/
|
|
155
|
-
componentTitle?: string;
|
|
156
|
-
/**
|
|
157
|
-
* Description text displayed on the exporter
|
|
158
|
-
* @default "Export your NDPA-compliant privacy policy in various formats."
|
|
159
|
-
*/
|
|
160
|
-
description?: string;
|
|
161
|
-
/**
|
|
162
|
-
* Custom CSS class for the exporter
|
|
163
|
-
*/
|
|
164
|
-
className?: string;
|
|
165
|
-
/**
|
|
166
|
-
* Custom CSS class for the buttons
|
|
167
|
-
*/
|
|
168
|
-
buttonClassName?: string;
|
|
169
|
-
/**
|
|
170
|
-
* Whether to show the export history
|
|
171
|
-
* @default true
|
|
172
|
-
*/
|
|
173
|
-
showExportHistory?: boolean;
|
|
174
|
-
/**
|
|
175
|
-
* Whether to include the NDPA compliance notice in the exported policy
|
|
176
|
-
* @default true
|
|
177
|
-
*/
|
|
178
|
-
includeComplianceNotice?: boolean;
|
|
179
|
-
/**
|
|
180
|
-
* Whether to include the organization logo in the exported policy
|
|
181
|
-
* @default false
|
|
182
|
-
*/
|
|
183
|
-
includeLogo?: boolean;
|
|
184
|
-
/**
|
|
185
|
-
* URL of the organization logo
|
|
186
|
-
*/
|
|
187
|
-
logoUrl?: string;
|
|
188
|
-
/**
|
|
189
|
-
* Custom CSS styles for the exported policy
|
|
190
|
-
*/
|
|
191
|
-
customStyles?: string;
|
|
192
|
-
}
|
|
193
|
-
declare const PolicyExporter: React.FC<PolicyExporterProps>;
|
|
194
|
-
|
|
195
|
-
export { PolicyExporter, PolicyGenerator, PolicyPreview, PolicySection, PolicyVariable };
|
|
1
|
+
export { P as PolicyExporter, b as PolicyGenerator, d as PolicyPreview } from './policy-E0fXZkda.mjs';
|
|
2
|
+
export { u as useDefaultPrivacyPolicy, a as usePrivacyPolicy } from './useDefaultPrivacyPolicy-CUluF_ic.mjs';
|
|
3
|
+
export { D as DEFAULT_POLICY_SECTIONS, a as DEFAULT_POLICY_VARIABLES, c as createBusinessPolicyTemplate, g as generatePolicyText } from './policy-templates-DMsPwOSZ.mjs';
|
|
4
|
+
export { O as OrganizationInfo, P as PolicySection, a as PolicyTemplate, b as PolicyVariable, c as PrivacyPolicy } from './privacy-Ca6te9Ir.mjs';
|
|
5
|
+
import 'react';
|