@tantainnovative/ndpr-toolkit 3.6.0 → 3.7.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/CHANGELOG.md +49 -0
- package/README.md +31 -1
- package/dist/chunk-2MIQXECH.mjs +3 -0
- package/dist/chunk-3GRGYT3P.js +1 -0
- package/dist/chunk-5IOC3VAW.js +1 -0
- package/dist/chunk-ATFUSHC2.mjs +2 -0
- package/dist/chunk-HXWHL4BD.js +3 -0
- package/dist/chunk-R7545FP4.mjs +1 -0
- package/dist/chunk-UKLU6BQF.mjs +1 -0
- package/dist/{chunk-I2LMQWK3.js → chunk-W7OLQRJP.js} +2 -2
- package/dist/core.d.mts +70 -0
- package/dist/core.d.ts +70 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/hooks.d.mts +10 -0
- package/dist/hooks.d.ts +10 -0
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/policy.d.mts +86 -0
- package/dist/policy.d.ts +86 -0
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/presets-policy.d.mts +71 -0
- package/dist/presets-policy.d.ts +71 -0
- package/dist/presets-policy.js +1 -1
- package/dist/presets-policy.mjs +1 -1
- package/dist/presets.d.mts +71 -0
- package/dist/presets.d.ts +71 -0
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/server.d.mts +70 -0
- package/dist/server.d.ts +70 -0
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-BNHQFZHL.mjs +0 -2
- package/dist/chunk-O6CUBNXK.mjs +0 -3
- package/dist/chunk-RV2VMWZJ.mjs +0 -1
- package/dist/chunk-UI536RU2.js +0 -3
- package/dist/chunk-W7RBGZCC.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var chunkXO3VQYTL_js=require('./chunk-XO3VQYTL.js'),chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkPZRQWPWD_js=require('./chunk-PZRQWPWD.js'),chunkI3Y4LOSL_js=require('./chunk-I3Y4LOSL.js'),chunk5GVMKUMP_js=require('./chunk-5GVMKUMP.js'),chunkUAV7V4EM_js=require('./chunk-UAV7V4EM.js');require('./chunk-7IFSWCQP.js');var chunkRYREGZVQ_js=require('./chunk-RYREGZVQ.js'),chunkZ763UI5U_js=require('./chunk-Z763UI5U.js'),chunkUTFBKL73_js=require('./chunk-UTFBKL73.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunk3JPDTXGC_js=require('./chunk-3JPDTXGC.js'),
|
|
2
|
+
'use strict';var chunkXO3VQYTL_js=require('./chunk-XO3VQYTL.js'),chunkNUWVPRNI_js=require('./chunk-NUWVPRNI.js'),chunkPZRQWPWD_js=require('./chunk-PZRQWPWD.js'),chunkI3Y4LOSL_js=require('./chunk-I3Y4LOSL.js'),chunk5GVMKUMP_js=require('./chunk-5GVMKUMP.js'),chunkUAV7V4EM_js=require('./chunk-UAV7V4EM.js');require('./chunk-7IFSWCQP.js');var chunkRYREGZVQ_js=require('./chunk-RYREGZVQ.js'),chunkZ763UI5U_js=require('./chunk-Z763UI5U.js'),chunkUTFBKL73_js=require('./chunk-UTFBKL73.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunk3JPDTXGC_js=require('./chunk-3JPDTXGC.js'),chunkHXWHL4BD_js=require('./chunk-HXWHL4BD.js');require('./chunk-N3MQQUQP.js');var chunkLVGT3DLT_js=require('./chunk-LVGT3DLT.js'),chunkQPRYXVH2_js=require('./chunk-QPRYXVH2.js');require('./chunk-Q64735OC.js');var chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunkSJDDNB6M_js=require('./chunk-SJDDNB6M.js'),chunkBRS52EDT_js=require('./chunk-BRS52EDT.js'),chunk732C2EVN_js=require('./chunk-732C2EVN.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkP4LNLCSF_js=require('./chunk-P4LNLCSF.js'),chunkL2VO3MEJ_js=require('./chunk-L2VO3MEJ.js');require('./chunk-7ZZO7GVB.js');var chunkB46SJB5V_js=require('./chunk-B46SJB5V.js'),chunkCR2QZTGW_js=require('./chunk-CR2QZTGW.js'),chunkW47OSMT6_js=require('./chunk-W47OSMT6.js'),chunkHBLGN4SD_js=require('./chunk-HBLGN4SD.js'),chunkL2BRFMVS_js=require('./chunk-L2BRFMVS.js'),chunkEZCGTHQV_js=require('./chunk-EZCGTHQV.js'),chunkWDDCKYWA_js=require('./chunk-WDDCKYWA.js'),chunkC7IDR2IV_js=require('./chunk-C7IDR2IV.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkPGI2LM6P_js=require('./chunk-PGI2LM6P.js'),chunkS6COXIZA_js=require('./chunk-S6COXIZA.js'),chunkVJTQXVAF_js=require('./chunk-VJTQXVAF.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunkAME4HJR4_js=require('./chunk-AME4HJR4.js');require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');var jsxRuntime=require('react/jsx-runtime');var xe=({variant:t="short",className:e,hidden:s})=>{if(s)return null;let a=t==="long"?chunkZVOIR4QH_js.b:chunkZVOIR4QH_js.a;return jsxRuntime.jsx("p",{role:"note",className:e!=null?e:"ndpr-legal-notice","data-ndpr-legal-notice":t,children:a})};Object.defineProperty(exports,"PolicyExporter",{enumerable:true,get:function(){return chunkXO3VQYTL_js.c}});Object.defineProperty(exports,"PolicyGenerator",{enumerable:true,get:function(){return chunkXO3VQYTL_js.a}});Object.defineProperty(exports,"PolicyPreview",{enumerable:true,get:function(){return chunkXO3VQYTL_js.b}});Object.defineProperty(exports,"NDPRDashboard",{enumerable:true,get:function(){return chunkNUWVPRNI_js.a}});Object.defineProperty(exports,"LawfulBasisTracker",{enumerable:true,get:function(){return chunkPZRQWPWD_js.a}});Object.defineProperty(exports,"CrossBorderTransferManager",{enumerable:true,get:function(){return chunkI3Y4LOSL_js.a}});Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunk5GVMKUMP_js.a}});Object.defineProperty(exports,"NDPRProvider",{enumerable:true,get:function(){return chunkUAV7V4EM_js.a}});Object.defineProperty(exports,"useNDPRConfig",{enumerable:true,get:function(){return chunkUAV7V4EM_js.b}});Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkRYREGZVQ_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkZ763UI5U_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkZ763UI5U_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkUTFBKL73_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunk3JPDTXGC_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkHXWHL4BD_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkLVGT3DLT_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkLVGT3DLT_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkLVGT3DLT_js.e}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkLVGT3DLT_js.b}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunkQPRYXVH2_js.a}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"ConsentStorage",{enumerable:true,get:function(){return chunkSJDDNB6M_js.a}});Object.defineProperty(exports,"ConsentManager",{enumerable:true,get:function(){return chunkBRS52EDT_js.a}});Object.defineProperty(exports,"ConsentBanner",{enumerable:true,get:function(){return chunk732C2EVN_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkP4LNLCSF_js.a}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkL2VO3MEJ_js.a}});Object.defineProperty(exports,"validateConsent",{enumerable:true,get:function(){return chunkB46SJB5V_js.a}});Object.defineProperty(exports,"validateConsentOptions",{enumerable:true,get:function(){return chunkB46SJB5V_js.b}});Object.defineProperty(exports,"DSRDashboard",{enumerable:true,get:function(){return chunkCR2QZTGW_js.a}});Object.defineProperty(exports,"DSRTracker",{enumerable:true,get:function(){return chunkCR2QZTGW_js.b}});Object.defineProperty(exports,"DSRRequestForm",{enumerable:true,get:function(){return chunkW47OSMT6_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkHBLGN4SD_js.a}});Object.defineProperty(exports,"formatDSRRequest",{enumerable:true,get:function(){return chunkL2BRFMVS_js.b}});Object.defineProperty(exports,"DPIAReport",{enumerable:true,get:function(){return chunkEZCGTHQV_js.a}});Object.defineProperty(exports,"StepIndicator",{enumerable:true,get:function(){return chunkEZCGTHQV_js.b}});Object.defineProperty(exports,"DPIAQuestionnaire",{enumerable:true,get:function(){return chunkWDDCKYWA_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkC7IDR2IV_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"BreachNotificationManager",{enumerable:true,get:function(){return chunkPGI2LM6P_js.b}});Object.defineProperty(exports,"BreachRiskAssessment",{enumerable:true,get:function(){return chunkPGI2LM6P_js.a}});Object.defineProperty(exports,"RegulatoryReportGenerator",{enumerable:true,get:function(){return chunkPGI2LM6P_js.c}});Object.defineProperty(exports,"BreachReportForm",{enumerable:true,get:function(){return chunkS6COXIZA_js.a}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkVJTQXVAF_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"resolveClass",{enumerable:true,get:function(){return chunkAME4HJR4_js.a}});exports.LegalNotice=xe;
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{c as PolicyExporter,a as PolicyGenerator,b as PolicyPreview}from'./chunk-TMXK4QKK.mjs';export{a as NDPRDashboard}from'./chunk-ZIZL37BG.mjs';export{a as LawfulBasisTracker}from'./chunk-COD3RMTL.mjs';export{a as CrossBorderTransferManager}from'./chunk-GTYXVAJX.mjs';export{a as ROPAManager}from'./chunk-EXEXUAF6.mjs';export{a as NDPRProvider,b as useNDPRConfig}from'./chunk-EEQALYOY.mjs';import'./chunk-HWHBINVN.mjs';export{a as useComplianceScore}from'./chunk-W65ZWTLD.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-VYAL2TGT.mjs';export{a as useLawfulBasis}from'./chunk-4G3SRVRI.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-RPXRPGHL.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-
|
|
2
|
+
export{c as PolicyExporter,a as PolicyGenerator,b as PolicyPreview}from'./chunk-TMXK4QKK.mjs';export{a as NDPRDashboard}from'./chunk-ZIZL37BG.mjs';export{a as LawfulBasisTracker}from'./chunk-COD3RMTL.mjs';export{a as CrossBorderTransferManager}from'./chunk-GTYXVAJX.mjs';export{a as ROPAManager}from'./chunk-EXEXUAF6.mjs';export{a as NDPRProvider,b as useNDPRConfig}from'./chunk-EEQALYOY.mjs';import'./chunk-HWHBINVN.mjs';export{a as useComplianceScore}from'./chunk-W65ZWTLD.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-VYAL2TGT.mjs';export{a as useLawfulBasis}from'./chunk-4G3SRVRI.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-RPXRPGHL.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-2MIQXECH.mjs';import'./chunk-AOHKVFAS.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,b as generatePolicyText}from'./chunk-Y3MKMAFQ.mjs';export{a as getComplianceScore}from'./chunk-EFIBHKQE.mjs';import'./chunk-RMQ7OLNY.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{a as ConsentStorage}from'./chunk-XOH4WXOZ.mjs';export{a as ConsentManager}from'./chunk-U5RWJRGA.mjs';export{a as ConsentBanner}from'./chunk-BFAX7JQA.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{a as useConsent}from'./chunk-PCU6GKBE.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-UASG46LP.mjs';export{a as validateConsent,b as validateConsentOptions}from'./chunk-PJNKQPQP.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-66NQ5CVY.mjs';export{a as DSRRequestForm}from'./chunk-XJO4DH3L.mjs';export{a as useDSR}from'./chunk-MPBPAEZC.mjs';export{b as formatDSRRequest}from'./chunk-RZ6GC6WN.mjs';export{a as DPIAReport,b as StepIndicator}from'./chunk-O45PKBZA.mjs';export{a as DPIAQuestionnaire}from'./chunk-ZQZJNKVB.mjs';export{a as useDPIA}from'./chunk-H3XJV2IR.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as BreachNotificationManager,a as BreachRiskAssessment,c as RegulatoryReportGenerator}from'./chunk-X3GCGC3H.mjs';export{a as BreachReportForm}from'./chunk-ZHFLBL63.mjs';export{a as useBreach}from'./chunk-3HOXQNCH.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';import {b,a}from'./chunk-ITCY2Z66.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as resolveClass}from'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';import {jsx}from'react/jsx-runtime';var xe=({variant:t="short",className:e,hidden:s})=>{if(s)return null;let a$1=t==="long"?b:a;return jsx("p",{role:"note",className:e!=null?e:"ndpr-legal-notice","data-ndpr-legal-notice":t,children:a$1})};export{xe as LegalNotice};
|
package/dist/policy.d.mts
CHANGED
|
@@ -8,6 +8,12 @@ declare interface AdaptivePolicyWizardProps {
|
|
|
8
8
|
onComplete?: (policy: PrivacyPolicy) => void;
|
|
9
9
|
classNames?: Record<string, string>;
|
|
10
10
|
unstyled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Initial template context — seeds the wizard with a sector-specific
|
|
13
|
+
* pre-fill. Use `templateContextFor('saas' | 'ecommerce' | …)` from
|
|
14
|
+
* `/server` (or `/core`) to construct it.
|
|
15
|
+
*/
|
|
16
|
+
initialContext?: TemplateContext;
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
/**
|
|
@@ -324,6 +330,18 @@ declare interface HTMLExportOptions {
|
|
|
324
330
|
/** Industry verticals with sector-specific compliance requirements. */
|
|
325
331
|
export declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'education' | 'government' | 'other';
|
|
326
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Static metadata for every template — useful for picker UIs that need
|
|
335
|
+
* to list available templates with a one-line description.
|
|
336
|
+
*/
|
|
337
|
+
export declare const ORG_POLICY_TEMPLATE_REGISTRY: Record<OrgPolicyTemplateId, {
|
|
338
|
+
id: OrgPolicyTemplateId;
|
|
339
|
+
label: string;
|
|
340
|
+
description: string;
|
|
341
|
+
/** Best-fit org examples to show in the picker. */
|
|
342
|
+
examples: readonly string[];
|
|
343
|
+
}>;
|
|
344
|
+
|
|
327
345
|
/**
|
|
328
346
|
* Represents organization information for a privacy policy
|
|
329
347
|
*/
|
|
@@ -348,6 +366,48 @@ export declare interface OrganizationInfo {
|
|
|
348
366
|
ndpcRegistrationNumber?: string;
|
|
349
367
|
}
|
|
350
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Org-specific privacy-policy templates — pre-filled `TemplateContext`
|
|
371
|
+
* factories for the most common Nigerian app shapes.
|
|
372
|
+
*
|
|
373
|
+
* Each template returns a fully-populated `TemplateContext` with:
|
|
374
|
+
* - industry set to the matching `Industry` value
|
|
375
|
+
* - the data categories the sector typically collects (selected: true)
|
|
376
|
+
* - the processing purposes that match the business model
|
|
377
|
+
* - sensitive-data / children / cross-border / automated-decisions flags
|
|
378
|
+
* set to the defaults that org type usually needs (a school will have
|
|
379
|
+
* children data, a hospital will have sensitive data, etc.)
|
|
380
|
+
*
|
|
381
|
+
* Templates are guidance starters. The wizard still walks the user through
|
|
382
|
+
* every step — they can flip any flag, add/remove categories, or rewrite
|
|
383
|
+
* any section before the policy is finalised. The legal-notice footer the
|
|
384
|
+
* toolkit ships everywhere applies to the generated output.
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* import { templateContextFor } from '@tantainnovative/ndpr-toolkit/server';
|
|
388
|
+
* const ctx = templateContextFor('ecommerce', { orgName: 'Acme NG' });
|
|
389
|
+
* const draft = assemblePolicy(ctx);
|
|
390
|
+
*/
|
|
391
|
+
|
|
392
|
+
/** Identifiers for the bundled org templates. */
|
|
393
|
+
export declare type OrgPolicyTemplateId = 'saas' | 'ecommerce' | 'school' | 'healthcare' | 'procurement';
|
|
394
|
+
|
|
395
|
+
/** Optional overrides applied on top of a template's defaults. */
|
|
396
|
+
export declare interface OrgPolicyTemplateOverrides {
|
|
397
|
+
/** Organisation name (e.g. "Acme Nigeria Ltd"). Default: empty. */
|
|
398
|
+
orgName?: string;
|
|
399
|
+
/** Public website URL. */
|
|
400
|
+
website?: string;
|
|
401
|
+
/** Privacy contact email. */
|
|
402
|
+
privacyEmail?: string;
|
|
403
|
+
/** Postal address. */
|
|
404
|
+
address?: string;
|
|
405
|
+
/** DPO name. Required for DCPMI under NDPA Section 32. */
|
|
406
|
+
dpoName?: string;
|
|
407
|
+
/** DPO email. Required for the NDPC breach-notification contact. */
|
|
408
|
+
dpoEmail?: string;
|
|
409
|
+
}
|
|
410
|
+
|
|
351
411
|
/** Organisation size tiers — affects complexity of generated language. */
|
|
352
412
|
export declare type OrgSize = 'startup' | 'midsize' | 'enterprise';
|
|
353
413
|
|
|
@@ -936,6 +996,22 @@ export declare interface TemplateContext {
|
|
|
936
996
|
thirdPartyProcessors: ThirdPartyProcessor[];
|
|
937
997
|
}
|
|
938
998
|
|
|
999
|
+
/**
|
|
1000
|
+
* Returns a fresh `TemplateContext` pre-filled for the given org type.
|
|
1001
|
+
* Pass `overrides` to set organisation details (name, DPO, etc.) inline.
|
|
1002
|
+
*
|
|
1003
|
+
* Calling without arguments throws — pass a known template id.
|
|
1004
|
+
*
|
|
1005
|
+
* @example
|
|
1006
|
+
* const ctx = templateContextFor('healthcare', {
|
|
1007
|
+
* orgName: 'Lagos Heart Centre',
|
|
1008
|
+
* dpoEmail: 'dpo@lhc.ng',
|
|
1009
|
+
* });
|
|
1010
|
+
*/
|
|
1011
|
+
declare function templateContextFor(id: OrgPolicyTemplateId, overrides?: OrgPolicyTemplateOverrides): TemplateContext;
|
|
1012
|
+
export { templateContextFor as createOrgTemplate }
|
|
1013
|
+
export { templateContextFor }
|
|
1014
|
+
|
|
939
1015
|
/** A third-party entity that processes data on behalf of the organisation. */
|
|
940
1016
|
export declare interface ThirdPartyProcessor {
|
|
941
1017
|
/** Name of the third party. */
|
|
@@ -952,6 +1028,16 @@ export declare interface UseAdaptivePolicyWizardOptions {
|
|
|
952
1028
|
adapter?: StorageAdapter<PolicyDraft>;
|
|
953
1029
|
onComplete?: (policy: PrivacyPolicy) => void;
|
|
954
1030
|
onComplianceChange?: (score: number, gaps: ComplianceGap[]) => void;
|
|
1031
|
+
/**
|
|
1032
|
+
* Initial template context. Use an org-template factory like
|
|
1033
|
+
* `templateContextFor('healthcare')` to start the wizard with a sector-
|
|
1034
|
+
* specific pre-fill (lawful basis, data categories, sensitive-data flag,
|
|
1035
|
+
* cross-border default). Defaults to `createDefaultContext()` if omitted.
|
|
1036
|
+
*
|
|
1037
|
+
* If an adapter loads a saved draft, the draft's context wins — the
|
|
1038
|
+
* `initialContext` only seeds the very first session.
|
|
1039
|
+
*/
|
|
1040
|
+
initialContext?: TemplateContext;
|
|
955
1041
|
}
|
|
956
1042
|
|
|
957
1043
|
export declare interface UseAdaptivePolicyWizardReturn {
|
package/dist/policy.d.ts
CHANGED
|
@@ -8,6 +8,12 @@ declare interface AdaptivePolicyWizardProps {
|
|
|
8
8
|
onComplete?: (policy: PrivacyPolicy) => void;
|
|
9
9
|
classNames?: Record<string, string>;
|
|
10
10
|
unstyled?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Initial template context — seeds the wizard with a sector-specific
|
|
13
|
+
* pre-fill. Use `templateContextFor('saas' | 'ecommerce' | …)` from
|
|
14
|
+
* `/server` (or `/core`) to construct it.
|
|
15
|
+
*/
|
|
16
|
+
initialContext?: TemplateContext;
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
/**
|
|
@@ -324,6 +330,18 @@ declare interface HTMLExportOptions {
|
|
|
324
330
|
/** Industry verticals with sector-specific compliance requirements. */
|
|
325
331
|
export declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'education' | 'government' | 'other';
|
|
326
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Static metadata for every template — useful for picker UIs that need
|
|
335
|
+
* to list available templates with a one-line description.
|
|
336
|
+
*/
|
|
337
|
+
export declare const ORG_POLICY_TEMPLATE_REGISTRY: Record<OrgPolicyTemplateId, {
|
|
338
|
+
id: OrgPolicyTemplateId;
|
|
339
|
+
label: string;
|
|
340
|
+
description: string;
|
|
341
|
+
/** Best-fit org examples to show in the picker. */
|
|
342
|
+
examples: readonly string[];
|
|
343
|
+
}>;
|
|
344
|
+
|
|
327
345
|
/**
|
|
328
346
|
* Represents organization information for a privacy policy
|
|
329
347
|
*/
|
|
@@ -348,6 +366,48 @@ export declare interface OrganizationInfo {
|
|
|
348
366
|
ndpcRegistrationNumber?: string;
|
|
349
367
|
}
|
|
350
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Org-specific privacy-policy templates — pre-filled `TemplateContext`
|
|
371
|
+
* factories for the most common Nigerian app shapes.
|
|
372
|
+
*
|
|
373
|
+
* Each template returns a fully-populated `TemplateContext` with:
|
|
374
|
+
* - industry set to the matching `Industry` value
|
|
375
|
+
* - the data categories the sector typically collects (selected: true)
|
|
376
|
+
* - the processing purposes that match the business model
|
|
377
|
+
* - sensitive-data / children / cross-border / automated-decisions flags
|
|
378
|
+
* set to the defaults that org type usually needs (a school will have
|
|
379
|
+
* children data, a hospital will have sensitive data, etc.)
|
|
380
|
+
*
|
|
381
|
+
* Templates are guidance starters. The wizard still walks the user through
|
|
382
|
+
* every step — they can flip any flag, add/remove categories, or rewrite
|
|
383
|
+
* any section before the policy is finalised. The legal-notice footer the
|
|
384
|
+
* toolkit ships everywhere applies to the generated output.
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* import { templateContextFor } from '@tantainnovative/ndpr-toolkit/server';
|
|
388
|
+
* const ctx = templateContextFor('ecommerce', { orgName: 'Acme NG' });
|
|
389
|
+
* const draft = assemblePolicy(ctx);
|
|
390
|
+
*/
|
|
391
|
+
|
|
392
|
+
/** Identifiers for the bundled org templates. */
|
|
393
|
+
export declare type OrgPolicyTemplateId = 'saas' | 'ecommerce' | 'school' | 'healthcare' | 'procurement';
|
|
394
|
+
|
|
395
|
+
/** Optional overrides applied on top of a template's defaults. */
|
|
396
|
+
export declare interface OrgPolicyTemplateOverrides {
|
|
397
|
+
/** Organisation name (e.g. "Acme Nigeria Ltd"). Default: empty. */
|
|
398
|
+
orgName?: string;
|
|
399
|
+
/** Public website URL. */
|
|
400
|
+
website?: string;
|
|
401
|
+
/** Privacy contact email. */
|
|
402
|
+
privacyEmail?: string;
|
|
403
|
+
/** Postal address. */
|
|
404
|
+
address?: string;
|
|
405
|
+
/** DPO name. Required for DCPMI under NDPA Section 32. */
|
|
406
|
+
dpoName?: string;
|
|
407
|
+
/** DPO email. Required for the NDPC breach-notification contact. */
|
|
408
|
+
dpoEmail?: string;
|
|
409
|
+
}
|
|
410
|
+
|
|
351
411
|
/** Organisation size tiers — affects complexity of generated language. */
|
|
352
412
|
export declare type OrgSize = 'startup' | 'midsize' | 'enterprise';
|
|
353
413
|
|
|
@@ -936,6 +996,22 @@ export declare interface TemplateContext {
|
|
|
936
996
|
thirdPartyProcessors: ThirdPartyProcessor[];
|
|
937
997
|
}
|
|
938
998
|
|
|
999
|
+
/**
|
|
1000
|
+
* Returns a fresh `TemplateContext` pre-filled for the given org type.
|
|
1001
|
+
* Pass `overrides` to set organisation details (name, DPO, etc.) inline.
|
|
1002
|
+
*
|
|
1003
|
+
* Calling without arguments throws — pass a known template id.
|
|
1004
|
+
*
|
|
1005
|
+
* @example
|
|
1006
|
+
* const ctx = templateContextFor('healthcare', {
|
|
1007
|
+
* orgName: 'Lagos Heart Centre',
|
|
1008
|
+
* dpoEmail: 'dpo@lhc.ng',
|
|
1009
|
+
* });
|
|
1010
|
+
*/
|
|
1011
|
+
declare function templateContextFor(id: OrgPolicyTemplateId, overrides?: OrgPolicyTemplateOverrides): TemplateContext;
|
|
1012
|
+
export { templateContextFor as createOrgTemplate }
|
|
1013
|
+
export { templateContextFor }
|
|
1014
|
+
|
|
939
1015
|
/** A third-party entity that processes data on behalf of the organisation. */
|
|
940
1016
|
export declare interface ThirdPartyProcessor {
|
|
941
1017
|
/** Name of the third party. */
|
|
@@ -952,6 +1028,16 @@ export declare interface UseAdaptivePolicyWizardOptions {
|
|
|
952
1028
|
adapter?: StorageAdapter<PolicyDraft>;
|
|
953
1029
|
onComplete?: (policy: PrivacyPolicy) => void;
|
|
954
1030
|
onComplianceChange?: (score: number, gaps: ComplianceGap[]) => void;
|
|
1031
|
+
/**
|
|
1032
|
+
* Initial template context. Use an org-template factory like
|
|
1033
|
+
* `templateContextFor('healthcare')` to start the wizard with a sector-
|
|
1034
|
+
* specific pre-fill (lawful basis, data categories, sensitive-data flag,
|
|
1035
|
+
* cross-border default). Defaults to `createDefaultContext()` if omitted.
|
|
1036
|
+
*
|
|
1037
|
+
* If an adapter loads a saved draft, the draft's context wins — the
|
|
1038
|
+
* `initialContext` only seeds the very first session.
|
|
1039
|
+
*/
|
|
1040
|
+
initialContext?: TemplateContext;
|
|
955
1041
|
}
|
|
956
1042
|
|
|
957
1043
|
export declare interface UseAdaptivePolicyWizardReturn {
|
package/dist/policy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var
|
|
2
|
+
'use strict';var chunkW7OLQRJP_js=require('./chunk-W7OLQRJP.js'),chunkXO3VQYTL_js=require('./chunk-XO3VQYTL.js'),chunk3GRGYT3P_js=require('./chunk-3GRGYT3P.js'),chunkZ763UI5U_js=require('./chunk-Z763UI5U.js'),chunkHXWHL4BD_js=require('./chunk-HXWHL4BD.js'),chunkN3MQQUQP_js=require('./chunk-N3MQQUQP.js'),chunkLVGT3DLT_js=require('./chunk-LVGT3DLT.js'),chunkQ64735OC_js=require('./chunk-Q64735OC.js');require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-VWED6UTN.js');var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var u=react.createContext(null);function X(){let e=react.useContext(u);if(!e)throw new Error("Policy compound components must be wrapped in <Policy.Provider>. Example: <Policy.Provider templates={...}><Policy.Generator /></Policy.Provider>");return e}var x=({templates:e,adapter:l,storageKey:t,useLocalStorage:i,initialPolicy:p,onGenerate:n,children:o})=>{let y=chunkZ763UI5U_js.a({templates:e,adapter:l,storageKey:t,useLocalStorage:i,initialPolicy:p,onGenerate:n}),r=chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},y),{templates:e});return jsxRuntime.jsx(u.Provider,{value:r,children:o})};var J={Provider:x,Generator:chunkXO3VQYTL_js.a,Preview:chunkXO3VQYTL_js.b,Exporter:chunkXO3VQYTL_js.c};var $=({policy:e,className:l,mode:t="shadow",options:i})=>{let p=react.useRef(null);if(react.useEffect(()=>{var g;if(t!=="shadow")return;let o=p.current;if(!o)return;let y=chunkN3MQQUQP_js.a(e,chunkRFPLZDIO_js.a({includeStyles:true,includePrintCSS:true},i)),r=(g=o.shadowRoot)!=null?g:o.attachShadow({mode:"open"});r.innerHTML=y;let v=C=>{var R;let T=C.target;if(!T)return;let h=T.closest("a[href]");if(!h)return;let P=(R=h.getAttribute("href"))!=null?R:"";if(!P.startsWith("#")||P.length<2)return;let S=decodeURIComponent(P.slice(1)),E=r.getElementById(S);E&&(C.preventDefault(),E.scrollIntoView({behavior:"smooth",block:"start"}));};return r.addEventListener("click",v),()=>{r.removeEventListener("click",v),o.shadowRoot&&(o.shadowRoot.innerHTML="");}},[e,i,t]),t==="shadow")return jsxRuntime.jsx("div",{ref:p,"data-ndpr-component":"policy-page",className:l});let n=chunkN3MQQUQP_js.a(e,chunkRFPLZDIO_js.a({includeStyles:false},i));return jsxRuntime.jsx("div",{"data-ndpr-component":"policy-page",className:l,dangerouslySetInnerHTML:{__html:n}})};Object.defineProperty(exports,"AdaptivePolicyWizard",{enumerable:true,get:function(){return chunkW7OLQRJP_js.a}});Object.defineProperty(exports,"PolicyExporter",{enumerable:true,get:function(){return chunkXO3VQYTL_js.c}});Object.defineProperty(exports,"PolicyGenerator",{enumerable:true,get:function(){return chunkXO3VQYTL_js.a}});Object.defineProperty(exports,"PolicyPreview",{enumerable:true,get:function(){return chunkXO3VQYTL_js.b}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunk3GRGYT3P_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunk3GRGYT3P_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunk3GRGYT3P_js.b}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkZ763UI5U_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkZ763UI5U_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkHXWHL4BD_js.a}});Object.defineProperty(exports,"exportDOCX",{enumerable:true,get:function(){return chunkN3MQQUQP_js.d}});Object.defineProperty(exports,"exportHTML",{enumerable:true,get:function(){return chunkN3MQQUQP_js.a}});Object.defineProperty(exports,"exportMarkdown",{enumerable:true,get:function(){return chunkN3MQQUQP_js.b}});Object.defineProperty(exports,"exportPDF",{enumerable:true,get:function(){return chunkN3MQQUQP_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkLVGT3DLT_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkLVGT3DLT_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkLVGT3DLT_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkLVGT3DLT_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkLVGT3DLT_js.b}});Object.defineProperty(exports,"DEFAULT_DATA_CATEGORIES",{enumerable:true,get:function(){return chunkQ64735OC_js.d}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunkQ64735OC_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunkQ64735OC_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunkQ64735OC_js.f}});exports.Policy=J;exports.PolicyPage=$;exports.PolicyProvider=x;exports.usePolicyCompound=X;
|
package/dist/policy.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{a as AdaptivePolicyWizard}from'./chunk-
|
|
2
|
+
export{a as AdaptivePolicyWizard}from'./chunk-ATFUSHC2.mjs';import {c,b,a}from'./chunk-TMXK4QKK.mjs';export{c as PolicyExporter,a as PolicyGenerator,b as PolicyPreview}from'./chunk-TMXK4QKK.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-UKLU6BQF.mjs';import {a as a$1}from'./chunk-VYAL2TGT.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-VYAL2TGT.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-2MIQXECH.mjs';import {a as a$3}from'./chunk-AOHKVFAS.mjs';export{d as exportDOCX,a as exportHTML,b as exportMarkdown,c as exportPDF}from'./chunk-AOHKVFAS.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-Y3MKMAFQ.mjs';export{d as DEFAULT_DATA_CATEGORIES,c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-RMQ7OLNY.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import {b as b$1,a as a$2}from'./chunk-ZJYULEER.mjs';import {createContext,useContext,useRef,useEffect}from'react';import {jsx}from'react/jsx-runtime';var u=createContext(null);function X(){let e=useContext(u);if(!e)throw new Error("Policy compound components must be wrapped in <Policy.Provider>. Example: <Policy.Provider templates={...}><Policy.Generator /></Policy.Provider>");return e}var x=({templates:e,adapter:l,storageKey:t,useLocalStorage:i,initialPolicy:p,onGenerate:n,children:o})=>{let y=a$1({templates:e,adapter:l,storageKey:t,useLocalStorage:i,initialPolicy:p,onGenerate:n}),r=b$1(a$2({},y),{templates:e});return jsx(u.Provider,{value:r,children:o})};var J={Provider:x,Generator:a,Preview:b,Exporter:c};var $=({policy:e,className:l,mode:t="shadow",options:i})=>{let p=useRef(null);if(useEffect(()=>{var g;if(t!=="shadow")return;let o=p.current;if(!o)return;let y=a$3(e,a$2({includeStyles:true,includePrintCSS:true},i)),r=(g=o.shadowRoot)!=null?g:o.attachShadow({mode:"open"});r.innerHTML=y;let v=C=>{var R;let T=C.target;if(!T)return;let h=T.closest("a[href]");if(!h)return;let P=(R=h.getAttribute("href"))!=null?R:"";if(!P.startsWith("#")||P.length<2)return;let S=decodeURIComponent(P.slice(1)),E=r.getElementById(S);E&&(C.preventDefault(),E.scrollIntoView({behavior:"smooth",block:"start"}));};return r.addEventListener("click",v),()=>{r.removeEventListener("click",v),o.shadowRoot&&(o.shadowRoot.innerHTML="");}},[e,i,t]),t==="shadow")return jsx("div",{ref:p,"data-ndpr-component":"policy-page",className:l});let n=a$3(e,a$2({includeStyles:false},i));return jsx("div",{"data-ndpr-component":"policy-page",className:l,dangerouslySetInnerHTML:{__html:n}})};export{J as Policy,$ as PolicyPage,x as PolicyProvider,X as usePolicyCompound};
|
|
@@ -39,6 +39,35 @@ export declare interface NDPRPrivacyPolicyProps {
|
|
|
39
39
|
onComplete?: (policy: PrivacyPolicy) => void;
|
|
40
40
|
classNames?: Record<string, string>;
|
|
41
41
|
unstyled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Pre-fill the policy wizard with a sector-specific starter template.
|
|
44
|
+
*
|
|
45
|
+
* Pass one of `'saas' | 'ecommerce' | 'school' | 'healthcare' |
|
|
46
|
+
* 'procurement'` and the wizard opens already populated with the data
|
|
47
|
+
* categories, lawful-basis defaults, sensitive-data / children /
|
|
48
|
+
* cross-border / automated-decisions flags that org type usually needs.
|
|
49
|
+
* The user can still flip every flag and rewrite every section.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* <NDPRPrivacyPolicy
|
|
53
|
+
* template="healthcare"
|
|
54
|
+
* templateOverrides={{ orgName: 'Lagos Heart Centre' }}
|
|
55
|
+
* />
|
|
56
|
+
*
|
|
57
|
+
* @see templateContextFor in `/server` or `/core` for the underlying
|
|
58
|
+
* factory if you'd rather build the context yourself.
|
|
59
|
+
*/
|
|
60
|
+
template?: OrgPolicyTemplateId;
|
|
61
|
+
/**
|
|
62
|
+
* Organisation-level overrides applied on top of the chosen template.
|
|
63
|
+
* Ignored when `template` is unset.
|
|
64
|
+
*/
|
|
65
|
+
templateOverrides?: OrgPolicyTemplateOverrides;
|
|
66
|
+
/**
|
|
67
|
+
* Pass a fully-constructed `TemplateContext` to skip the template
|
|
68
|
+
* lookup entirely. Takes precedence over `template` if both are set.
|
|
69
|
+
*/
|
|
70
|
+
initialContext?: TemplateContext;
|
|
42
71
|
}
|
|
43
72
|
|
|
44
73
|
/**
|
|
@@ -65,6 +94,48 @@ declare interface OrganizationInfo {
|
|
|
65
94
|
ndpcRegistrationNumber?: string;
|
|
66
95
|
}
|
|
67
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Org-specific privacy-policy templates — pre-filled `TemplateContext`
|
|
99
|
+
* factories for the most common Nigerian app shapes.
|
|
100
|
+
*
|
|
101
|
+
* Each template returns a fully-populated `TemplateContext` with:
|
|
102
|
+
* - industry set to the matching `Industry` value
|
|
103
|
+
* - the data categories the sector typically collects (selected: true)
|
|
104
|
+
* - the processing purposes that match the business model
|
|
105
|
+
* - sensitive-data / children / cross-border / automated-decisions flags
|
|
106
|
+
* set to the defaults that org type usually needs (a school will have
|
|
107
|
+
* children data, a hospital will have sensitive data, etc.)
|
|
108
|
+
*
|
|
109
|
+
* Templates are guidance starters. The wizard still walks the user through
|
|
110
|
+
* every step — they can flip any flag, add/remove categories, or rewrite
|
|
111
|
+
* any section before the policy is finalised. The legal-notice footer the
|
|
112
|
+
* toolkit ships everywhere applies to the generated output.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* import { templateContextFor } from '@tantainnovative/ndpr-toolkit/server';
|
|
116
|
+
* const ctx = templateContextFor('ecommerce', { orgName: 'Acme NG' });
|
|
117
|
+
* const draft = assemblePolicy(ctx);
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
/** Identifiers for the bundled org templates. */
|
|
121
|
+
declare type OrgPolicyTemplateId = 'saas' | 'ecommerce' | 'school' | 'healthcare' | 'procurement';
|
|
122
|
+
|
|
123
|
+
/** Optional overrides applied on top of a template's defaults. */
|
|
124
|
+
declare interface OrgPolicyTemplateOverrides {
|
|
125
|
+
/** Organisation name (e.g. "Acme Nigeria Ltd"). Default: empty. */
|
|
126
|
+
orgName?: string;
|
|
127
|
+
/** Public website URL. */
|
|
128
|
+
website?: string;
|
|
129
|
+
/** Privacy contact email. */
|
|
130
|
+
privacyEmail?: string;
|
|
131
|
+
/** Postal address. */
|
|
132
|
+
address?: string;
|
|
133
|
+
/** DPO name. Required for DCPMI under NDPA Section 32. */
|
|
134
|
+
dpoName?: string;
|
|
135
|
+
/** DPO email. Required for the NDPC breach-notification contact. */
|
|
136
|
+
dpoEmail?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
68
139
|
/** Organisation size tiers — affects complexity of generated language. */
|
|
69
140
|
declare type OrgSize = 'startup' | 'midsize' | 'enterprise';
|
|
70
141
|
|
package/dist/presets-policy.d.ts
CHANGED
|
@@ -39,6 +39,35 @@ export declare interface NDPRPrivacyPolicyProps {
|
|
|
39
39
|
onComplete?: (policy: PrivacyPolicy) => void;
|
|
40
40
|
classNames?: Record<string, string>;
|
|
41
41
|
unstyled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Pre-fill the policy wizard with a sector-specific starter template.
|
|
44
|
+
*
|
|
45
|
+
* Pass one of `'saas' | 'ecommerce' | 'school' | 'healthcare' |
|
|
46
|
+
* 'procurement'` and the wizard opens already populated with the data
|
|
47
|
+
* categories, lawful-basis defaults, sensitive-data / children /
|
|
48
|
+
* cross-border / automated-decisions flags that org type usually needs.
|
|
49
|
+
* The user can still flip every flag and rewrite every section.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* <NDPRPrivacyPolicy
|
|
53
|
+
* template="healthcare"
|
|
54
|
+
* templateOverrides={{ orgName: 'Lagos Heart Centre' }}
|
|
55
|
+
* />
|
|
56
|
+
*
|
|
57
|
+
* @see templateContextFor in `/server` or `/core` for the underlying
|
|
58
|
+
* factory if you'd rather build the context yourself.
|
|
59
|
+
*/
|
|
60
|
+
template?: OrgPolicyTemplateId;
|
|
61
|
+
/**
|
|
62
|
+
* Organisation-level overrides applied on top of the chosen template.
|
|
63
|
+
* Ignored when `template` is unset.
|
|
64
|
+
*/
|
|
65
|
+
templateOverrides?: OrgPolicyTemplateOverrides;
|
|
66
|
+
/**
|
|
67
|
+
* Pass a fully-constructed `TemplateContext` to skip the template
|
|
68
|
+
* lookup entirely. Takes precedence over `template` if both are set.
|
|
69
|
+
*/
|
|
70
|
+
initialContext?: TemplateContext;
|
|
42
71
|
}
|
|
43
72
|
|
|
44
73
|
/**
|
|
@@ -65,6 +94,48 @@ declare interface OrganizationInfo {
|
|
|
65
94
|
ndpcRegistrationNumber?: string;
|
|
66
95
|
}
|
|
67
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Org-specific privacy-policy templates — pre-filled `TemplateContext`
|
|
99
|
+
* factories for the most common Nigerian app shapes.
|
|
100
|
+
*
|
|
101
|
+
* Each template returns a fully-populated `TemplateContext` with:
|
|
102
|
+
* - industry set to the matching `Industry` value
|
|
103
|
+
* - the data categories the sector typically collects (selected: true)
|
|
104
|
+
* - the processing purposes that match the business model
|
|
105
|
+
* - sensitive-data / children / cross-border / automated-decisions flags
|
|
106
|
+
* set to the defaults that org type usually needs (a school will have
|
|
107
|
+
* children data, a hospital will have sensitive data, etc.)
|
|
108
|
+
*
|
|
109
|
+
* Templates are guidance starters. The wizard still walks the user through
|
|
110
|
+
* every step — they can flip any flag, add/remove categories, or rewrite
|
|
111
|
+
* any section before the policy is finalised. The legal-notice footer the
|
|
112
|
+
* toolkit ships everywhere applies to the generated output.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* import { templateContextFor } from '@tantainnovative/ndpr-toolkit/server';
|
|
116
|
+
* const ctx = templateContextFor('ecommerce', { orgName: 'Acme NG' });
|
|
117
|
+
* const draft = assemblePolicy(ctx);
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
/** Identifiers for the bundled org templates. */
|
|
121
|
+
declare type OrgPolicyTemplateId = 'saas' | 'ecommerce' | 'school' | 'healthcare' | 'procurement';
|
|
122
|
+
|
|
123
|
+
/** Optional overrides applied on top of a template's defaults. */
|
|
124
|
+
declare interface OrgPolicyTemplateOverrides {
|
|
125
|
+
/** Organisation name (e.g. "Acme Nigeria Ltd"). Default: empty. */
|
|
126
|
+
orgName?: string;
|
|
127
|
+
/** Public website URL. */
|
|
128
|
+
website?: string;
|
|
129
|
+
/** Privacy contact email. */
|
|
130
|
+
privacyEmail?: string;
|
|
131
|
+
/** Postal address. */
|
|
132
|
+
address?: string;
|
|
133
|
+
/** DPO name. Required for DCPMI under NDPA Section 32. */
|
|
134
|
+
dpoName?: string;
|
|
135
|
+
/** DPO email. Required for the NDPC breach-notification contact. */
|
|
136
|
+
dpoEmail?: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
68
139
|
/** Organisation size tiers — affects complexity of generated language. */
|
|
69
140
|
declare type OrgSize = 'startup' | 'midsize' | 'enterprise';
|
|
70
141
|
|
package/dist/presets-policy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var
|
|
2
|
+
'use strict';var chunk5IOC3VAW_js=require('./chunk-5IOC3VAW.js');require('./chunk-W7OLQRJP.js'),require('./chunk-3GRGYT3P.js'),require('./chunk-HXWHL4BD.js'),require('./chunk-N3MQQUQP.js'),require('./chunk-Q64735OC.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-AME4HJR4.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"NDPRPrivacyPolicy",{enumerable:true,get:function(){return chunk5IOC3VAW_js.a}});
|
package/dist/presets-policy.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{a as NDPRPrivacyPolicy}from'./chunk-
|
|
2
|
+
export{a as NDPRPrivacyPolicy}from'./chunk-R7545FP4.mjs';import'./chunk-ATFUSHC2.mjs';import'./chunk-UKLU6BQF.mjs';import'./chunk-2MIQXECH.mjs';import'./chunk-AOHKVFAS.mjs';import'./chunk-RMQ7OLNY.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-SFGW37LE.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
|
package/dist/presets.d.mts
CHANGED
|
@@ -674,6 +674,35 @@ export declare interface NDPRPrivacyPolicyProps {
|
|
|
674
674
|
onComplete?: (policy: PrivacyPolicy) => void;
|
|
675
675
|
classNames?: Record<string, string>;
|
|
676
676
|
unstyled?: boolean;
|
|
677
|
+
/**
|
|
678
|
+
* Pre-fill the policy wizard with a sector-specific starter template.
|
|
679
|
+
*
|
|
680
|
+
* Pass one of `'saas' | 'ecommerce' | 'school' | 'healthcare' |
|
|
681
|
+
* 'procurement'` and the wizard opens already populated with the data
|
|
682
|
+
* categories, lawful-basis defaults, sensitive-data / children /
|
|
683
|
+
* cross-border / automated-decisions flags that org type usually needs.
|
|
684
|
+
* The user can still flip every flag and rewrite every section.
|
|
685
|
+
*
|
|
686
|
+
* @example
|
|
687
|
+
* <NDPRPrivacyPolicy
|
|
688
|
+
* template="healthcare"
|
|
689
|
+
* templateOverrides={{ orgName: 'Lagos Heart Centre' }}
|
|
690
|
+
* />
|
|
691
|
+
*
|
|
692
|
+
* @see templateContextFor in `/server` or `/core` for the underlying
|
|
693
|
+
* factory if you'd rather build the context yourself.
|
|
694
|
+
*/
|
|
695
|
+
template?: OrgPolicyTemplateId;
|
|
696
|
+
/**
|
|
697
|
+
* Organisation-level overrides applied on top of the chosen template.
|
|
698
|
+
* Ignored when `template` is unset.
|
|
699
|
+
*/
|
|
700
|
+
templateOverrides?: OrgPolicyTemplateOverrides;
|
|
701
|
+
/**
|
|
702
|
+
* Pass a fully-constructed `TemplateContext` to skip the template
|
|
703
|
+
* lookup entirely. Takes precedence over `template` if both are set.
|
|
704
|
+
*/
|
|
705
|
+
initialContext?: TemplateContext;
|
|
677
706
|
}
|
|
678
707
|
|
|
679
708
|
export declare const NDPRROPA: React__default.FC<NDPRROPAProps>;
|
|
@@ -758,6 +787,48 @@ declare interface OrganizationInfo {
|
|
|
758
787
|
ndpcRegistrationNumber?: string;
|
|
759
788
|
}
|
|
760
789
|
|
|
790
|
+
/**
|
|
791
|
+
* Org-specific privacy-policy templates — pre-filled `TemplateContext`
|
|
792
|
+
* factories for the most common Nigerian app shapes.
|
|
793
|
+
*
|
|
794
|
+
* Each template returns a fully-populated `TemplateContext` with:
|
|
795
|
+
* - industry set to the matching `Industry` value
|
|
796
|
+
* - the data categories the sector typically collects (selected: true)
|
|
797
|
+
* - the processing purposes that match the business model
|
|
798
|
+
* - sensitive-data / children / cross-border / automated-decisions flags
|
|
799
|
+
* set to the defaults that org type usually needs (a school will have
|
|
800
|
+
* children data, a hospital will have sensitive data, etc.)
|
|
801
|
+
*
|
|
802
|
+
* Templates are guidance starters. The wizard still walks the user through
|
|
803
|
+
* every step — they can flip any flag, add/remove categories, or rewrite
|
|
804
|
+
* any section before the policy is finalised. The legal-notice footer the
|
|
805
|
+
* toolkit ships everywhere applies to the generated output.
|
|
806
|
+
*
|
|
807
|
+
* @example
|
|
808
|
+
* import { templateContextFor } from '@tantainnovative/ndpr-toolkit/server';
|
|
809
|
+
* const ctx = templateContextFor('ecommerce', { orgName: 'Acme NG' });
|
|
810
|
+
* const draft = assemblePolicy(ctx);
|
|
811
|
+
*/
|
|
812
|
+
|
|
813
|
+
/** Identifiers for the bundled org templates. */
|
|
814
|
+
declare type OrgPolicyTemplateId = 'saas' | 'ecommerce' | 'school' | 'healthcare' | 'procurement';
|
|
815
|
+
|
|
816
|
+
/** Optional overrides applied on top of a template's defaults. */
|
|
817
|
+
declare interface OrgPolicyTemplateOverrides {
|
|
818
|
+
/** Organisation name (e.g. "Acme Nigeria Ltd"). Default: empty. */
|
|
819
|
+
orgName?: string;
|
|
820
|
+
/** Public website URL. */
|
|
821
|
+
website?: string;
|
|
822
|
+
/** Privacy contact email. */
|
|
823
|
+
privacyEmail?: string;
|
|
824
|
+
/** Postal address. */
|
|
825
|
+
address?: string;
|
|
826
|
+
/** DPO name. Required for DCPMI under NDPA Section 32. */
|
|
827
|
+
dpoName?: string;
|
|
828
|
+
/** DPO email. Required for the NDPC breach-notification contact. */
|
|
829
|
+
dpoEmail?: string;
|
|
830
|
+
}
|
|
831
|
+
|
|
761
832
|
/** Organisation size tiers — affects complexity of generated language. */
|
|
762
833
|
declare type OrgSize = 'startup' | 'midsize' | 'enterprise';
|
|
763
834
|
|