@tantainnovative/ndpr-toolkit 3.4.0 → 3.5.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 +25 -0
- package/README.md +80 -38
- package/dist/adapters.d.mts +34 -25
- package/dist/adapters.d.ts +34 -25
- package/dist/breach.d.mts +803 -44
- package/dist/breach.d.ts +803 -44
- package/dist/breach.js +2 -1
- package/dist/breach.mjs +2 -1
- package/dist/{chunk-2WH4DLV5.js → chunk-3EGQWLJ6.js} +3 -3
- package/dist/chunk-B4Z5MBUC.mjs +2 -0
- package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
- package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
- package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
- package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
- package/dist/{chunk-KSERBMXW.mjs → chunk-F5TXUA4O.mjs} +3 -3
- package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
- package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
- package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
- package/dist/{chunk-MG73MOZC.mjs → chunk-I557S566.mjs} +2 -2
- package/dist/{chunk-QVULSG6J.mjs → chunk-ID2NYIVE.mjs} +3 -3
- package/dist/chunk-J5WCPZLW.js +2 -0
- package/dist/{chunk-4R42ZNO7.mjs → chunk-JFFOPHU3.mjs} +57 -57
- package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
- package/dist/chunk-LU7PKE7Y.mjs +2 -0
- package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
- package/dist/{chunk-XMBSJJ5U.js → chunk-ORFC66EA.js} +3 -3
- package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
- package/dist/chunk-SCWNM4PC.mjs +2 -0
- package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
- package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
- package/dist/chunk-TV4U6AIS.js +2 -0
- package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
- package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
- package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
- package/dist/{chunk-RNTNHVKZ.js → chunk-YPKUHSK4.js} +2 -2
- package/dist/{chunk-UFPSUO52.js → chunk-Z73T6MWY.js} +57 -57
- package/dist/consent.d.mts +648 -84
- package/dist/consent.d.ts +648 -84
- package/dist/consent.js +2 -1
- package/dist/consent.mjs +2 -1
- package/dist/core.d.mts +2049 -23
- package/dist/core.d.ts +2049 -23
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/cross-border.d.mts +470 -99
- package/dist/cross-border.d.ts +470 -99
- package/dist/cross-border.js +1 -0
- package/dist/cross-border.mjs +1 -0
- package/dist/dpia.d.mts +591 -37
- package/dist/dpia.d.ts +591 -37
- package/dist/dpia.js +1 -0
- package/dist/dpia.mjs +1 -0
- package/dist/dsr.d.mts +654 -37
- package/dist/dsr.d.ts +654 -37
- package/dist/dsr.js +2 -1
- package/dist/dsr.mjs +2 -1
- package/dist/hooks.d.mts +2174 -30
- package/dist/hooks.d.ts +2174 -30
- package/dist/hooks.js +2 -1
- package/dist/hooks.mjs +2 -1
- package/dist/index.d.mts +4428 -43
- package/dist/index.d.ts +4428 -43
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/dist/lawful-basis.d.mts +368 -32
- package/dist/lawful-basis.d.ts +368 -32
- package/dist/lawful-basis.js +1 -0
- package/dist/lawful-basis.mjs +1 -0
- package/dist/policy.d.mts +1178 -83
- package/dist/policy.d.ts +1178 -83
- package/dist/policy.js +2 -1
- package/dist/policy.mjs +2 -1
- package/dist/presets.d.mts +1020 -114
- package/dist/presets.d.ts +1020 -114
- package/dist/presets.js +2 -1
- package/dist/presets.mjs +2 -1
- package/dist/ropa.d.mts +396 -31
- package/dist/ropa.d.ts +396 -31
- package/dist/ropa.js +2 -1
- package/dist/ropa.mjs +2 -1
- package/dist/server.d.mts +2133 -24
- package/dist/server.d.ts +2133 -24
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/unstyled.d.mts +523 -55
- package/dist/unstyled.d.ts +523 -55
- package/dist/unstyled.js +2 -1
- package/dist/unstyled.mjs +2 -1
- package/package.json +3 -3
- package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
- package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
- package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
- package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
- package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
- package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
- package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
- package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
- package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
- package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
- package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
- package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
- package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
- package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
- package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
- package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
- package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
- package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
- package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
- package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
- package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
- package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
- package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
- package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
- package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
- package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
- package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
- package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
- package/dist/breach-B_-6lDqS.d.mts +0 -17
- package/dist/breach-CzXqSsaY.d.ts +0 -17
- package/dist/breach-Eu9byel8.d.mts +0 -185
- package/dist/breach-Eu9byel8.d.ts +0 -185
- package/dist/chunk-5X32J5IA.mjs +0 -2
- package/dist/chunk-7D2OIPHH.mjs +0 -2
- package/dist/chunk-JKKRPS4P.js +0 -2
- package/dist/chunk-NCOZB2WU.mjs +0 -2
- package/dist/chunk-RGNP45VR.js +0 -2
- package/dist/compliance-score-racQe_E_.d.mts +0 -115
- package/dist/compliance-score-racQe_E_.d.ts +0 -115
- package/dist/consent-CmVzqZUk.d.mts +0 -99
- package/dist/consent-CmVzqZUk.d.ts +0 -99
- package/dist/consent-audit-BdByjYlM.d.mts +0 -65
- package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
- package/dist/cross-border-BBi9rZyO.d.mts +0 -54
- package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
- package/dist/cross-border-UyT00llA.d.mts +0 -141
- package/dist/cross-border-UyT00llA.d.ts +0 -141
- package/dist/docx-BxKascXN.d.ts +0 -64
- package/dist/docx-CV7Vsry_.d.mts +0 -64
- package/dist/dpia-D82hUrJe.d.ts +0 -15
- package/dist/dpia-DQDFw2_l.d.mts +0 -15
- package/dist/dpia-c9GiiOq0.d.mts +0 -137
- package/dist/dpia-c9GiiOq0.d.ts +0 -137
- package/dist/dsr-CIx5sd7e.d.ts +0 -14
- package/dist/dsr-XZ_HqTlA.d.mts +0 -14
- package/dist/dsr-yKbqX531.d.mts +0 -128
- package/dist/dsr-yKbqX531.d.ts +0 -128
- package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
- package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
- package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
- package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
- package/dist/locale-CxJx2tzn.d.mts +0 -25
- package/dist/locale-DSkrtf-c.d.ts +0 -25
- package/dist/policy-engine-CCUCud2T.d.ts +0 -154
- package/dist/policy-engine-fYSqEqSW.d.mts +0 -154
- package/dist/policy-sections-BYx6fEFk.d.ts +0 -56
- package/dist/policy-sections-Dm97Nq8m.d.mts +0 -56
- package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
- package/dist/policy-templates-DwYl2329.d.mts +0 -43
- package/dist/privacy-Ca6te9Ir.d.mts +0 -138
- package/dist/privacy-Ca6te9Ir.d.ts +0 -138
- package/dist/ropa-BDTM06tr.d.ts +0 -152
- package/dist/ropa-CFHuT7jE.d.mts +0 -152
- package/dist/ropa-CyynscU6.d.ts +0 -51
- package/dist/ropa-NIgxd8uP.d.mts +0 -51
- package/dist/sanitize-CxxwKxAx.d.mts +0 -94
- package/dist/sanitize-CxxwKxAx.d.ts +0 -94
- package/dist/styling-BMDGQDgS.d.mts +0 -64
- package/dist/styling-BaoQtV06.d.ts +0 -64
- package/dist/types-DK2CoKOC.d.mts +0 -10
- package/dist/types-DK2CoKOC.d.ts +0 -10
- package/dist/useAdaptivePolicyWizard-BnjW4OR4.d.mts +0 -52
- package/dist/useAdaptivePolicyWizard-sb3m4-Zk.d.ts +0 -52
- package/dist/useBreach-CPr86Yan.d.mts +0 -115
- package/dist/useBreach-DkVXvtJK.d.ts +0 -115
- package/dist/useConsent-DCNkIJHR.d.mts +0 -75
- package/dist/useConsent-dOcELSfX.d.ts +0 -75
- package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
- package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
- package/dist/useDPIA-B6180UQn.d.mts +0 -109
- package/dist/useDPIA-CTqbNbww.d.ts +0 -109
- package/dist/useDSR-WvHk8_iu.d.mts +0 -85
- package/dist/useDSR-wH4H6hSM.d.ts +0 -85
- package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
- package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
- package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
- package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
- package/dist/useROPA-BSSU1rfx.d.ts +0 -76
- package/dist/useROPA-C2hjaBTz.d.mts +0 -76
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
'use strict';var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js');function x(o){return o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function
|
|
2
|
-
`),s=[],e=false;for(let r of
|
|
3
|
-
`)}var
|
|
4
|
-
/* \u2500\u2500 Reset & Base \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
5
|
-
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
6
|
-
|
|
7
|
-
/* \u2500\u2500 Design tokens \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
8
|
-
:root {
|
|
1
|
+
'use strict';var chunkMQFZHA2D_js=require('./chunk-MQFZHA2D.js');function x(o){return o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function O(o,c){var r,i;if(!o)return "";let s={},e=(r=c.organizationInfo)!=null?r:{};typeof e.name=="string"&&e.name&&(s.orgName=e.name);for(let[t,l]of Object.entries(e))typeof l=="string"&&l&&!(t in s)&&(s[t]=l);for(let[t,l]of Object.entries((i=c.variableValues)!=null?i:{}))typeof l=="string"&&l&&(s[t]=l);return o.replace(/\{\{\s*([^}\s]+)\s*\}\}/g,(t,l)=>{let a=String(l).trim();return Object.prototype.hasOwnProperty.call(s,a)?s[a]:t})}function F(o){return o.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function A(o){let c=o.split(`
|
|
2
|
+
`),s=[],e=false;for(let r of c){let i=r.trimEnd();i.startsWith("- ")||i.startsWith("\u2022 ")?(e||(s.push("<ul>"),e=true),s.push(` <li>${x(i.replace(/^[-•]\s*/,""))}</li>`)):(e&&(s.push("</ul>"),e=false),i.trim()===""||s.push(`<p>${x(i)}</p>`));}return e&&s.push("</ul>"),s.join(`
|
|
3
|
+
`)}var H=`
|
|
9
4
|
--color-bg: #ffffff;
|
|
10
5
|
--color-surface: #f9fafb;
|
|
11
6
|
--color-border: #e5e7eb;
|
|
@@ -15,29 +10,34 @@
|
|
|
15
10
|
--color-accent-light: #dcfce7;
|
|
16
11
|
--color-heading: #064e3b;
|
|
17
12
|
--color-link: #15803d;
|
|
18
|
-
--color-link-hover: #166534
|
|
13
|
+
--color-link-hover: #166534;`,L=`
|
|
14
|
+
--color-bg: #0f172a;
|
|
15
|
+
--color-surface: #1e293b;
|
|
16
|
+
--color-border: #334155;
|
|
17
|
+
--color-text: #f1f5f9;
|
|
18
|
+
--color-text-muted: #94a3b8;
|
|
19
|
+
--color-accent: #22c55e;
|
|
20
|
+
--color-accent-light: #14532d;
|
|
21
|
+
--color-heading: #86efac;
|
|
22
|
+
--color-link: #4ade80;
|
|
23
|
+
--color-link-hover: #86efac;`;function W(o){let c=o==="auto"?" color-scheme: light dark;":o==="dark"?" color-scheme: dark;":" color-scheme: light;",s=o==="dark"?L:H,e=o==="auto"?`
|
|
24
|
+
|
|
25
|
+
@media (prefers-color-scheme: dark) {
|
|
26
|
+
:root {${L}
|
|
27
|
+
}
|
|
28
|
+
}`:"";return `
|
|
29
|
+
:root {
|
|
30
|
+
${c}${s}
|
|
19
31
|
--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
20
32
|
--font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
|
|
21
33
|
--radius: 8px;
|
|
22
34
|
--shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
|
|
23
35
|
--max-width: 860px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
:root {
|
|
28
|
-
--color-bg: #0f172a;
|
|
29
|
-
--color-surface: #1e293b;
|
|
30
|
-
--color-border: #334155;
|
|
31
|
-
--color-text: #f1f5f9;
|
|
32
|
-
--color-text-muted: #94a3b8;
|
|
33
|
-
--color-accent: #22c55e;
|
|
34
|
-
--color-accent-light: #14532d;
|
|
35
|
-
--color-heading: #86efac;
|
|
36
|
-
--color-link: #4ade80;
|
|
37
|
-
--color-link-hover: #86efac;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
36
|
+
}${e}`}var B=`
|
|
37
|
+
/* \u2500\u2500 Reset & Base \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
38
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
40
39
|
|
|
40
|
+
/* \u2500\u2500 Design tokens \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */`,R=`
|
|
41
41
|
/* \u2500\u2500 Layout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
42
42
|
html { font-size: 16px; scroll-behavior: smooth; }
|
|
43
43
|
|
|
@@ -243,76 +243,76 @@
|
|
|
243
243
|
|
|
244
244
|
a { color: inherit; text-decoration: none; }
|
|
245
245
|
}
|
|
246
|
-
`.trim()
|
|
246
|
+
`;function G(o){return `${B}${W(o)}${R}`.trim()}function _(o,c){var d,g;let s=(c==null?void 0:c.includeStyles)!==false,e=(d=c==null?void 0:c.customCSS)!=null?d:"",r=(g=c==null?void 0:c.theme)!=null?g:"light",i=o.sections.filter(n=>n.included),t=x(o.organizationInfo.name||"Organisation"),l=x(o.title||"Privacy Policy"),a=x(o.version||"1.0"),m=o.effectiveDate?new Date(o.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),y=o.lastUpdated?new Date(o.lastUpdated).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):m,u=o.organizationInfo.website?`<a href="${x(o.organizationInfo.website)}" target="_blank" rel="noopener">${x(o.organizationInfo.website)}</a>`:"",b=o.organizationInfo.privacyEmail?`<a href="mailto:${x(o.organizationInfo.privacyEmail)}">${x(o.organizationInfo.privacyEmail)}</a>`:"",$=`
|
|
247
247
|
<nav class="policy-toc" aria-label="Table of Contents">
|
|
248
248
|
<h2>Table of Contents</h2>
|
|
249
249
|
<ol>
|
|
250
|
-
${
|
|
250
|
+
${i.map((n,v)=>` <li><a href="#${F(n.title)}">${x(n.title)}</a></li>`).join(`
|
|
251
251
|
`)}
|
|
252
252
|
</ol>
|
|
253
|
-
</nav>`,
|
|
254
|
-
<h2 id="section-heading-${
|
|
255
|
-
<span class="section-number" aria-hidden="true">${
|
|
256
|
-
${x(
|
|
253
|
+
</nav>`,w=i.map((n,v)=>{let p=F(n.title),f=n.template||n.defaultContent||"",h=O(f,{variableValues:o.variableValues,organizationInfo:o.organizationInfo}),z=A(h);return ` <section class="policy-section" id="${p}" aria-labelledby="section-heading-${p}">
|
|
254
|
+
<h2 id="section-heading-${p}">
|
|
255
|
+
<span class="section-number" aria-hidden="true">${v+1}</span>
|
|
256
|
+
${x(n.title)}
|
|
257
257
|
</h2>
|
|
258
|
-
${
|
|
258
|
+
${z}
|
|
259
259
|
</section>`}).join(`
|
|
260
260
|
|
|
261
|
-
`),
|
|
262
|
-
${
|
|
263
|
-
${
|
|
261
|
+
`),P=e?e.replace(/<\/style>/gi,""):"",D=s?`<style>
|
|
262
|
+
${G(r)}
|
|
263
|
+
${P?`
|
|
264
264
|
/* \u2500\u2500 Custom styles \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
265
|
-
${
|
|
266
|
-
</style>`:
|
|
265
|
+
${P}`:""}
|
|
266
|
+
</style>`:P?`<style>${P}</style>`:"";return `<!DOCTYPE html>
|
|
267
267
|
<html lang="en">
|
|
268
268
|
<head>
|
|
269
269
|
<meta charset="UTF-8" />
|
|
270
270
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
271
|
-
<meta name="description" content="Privacy Policy for ${
|
|
271
|
+
<meta name="description" content="Privacy Policy for ${t}" />
|
|
272
272
|
<meta name="generator" content="NDPA Toolkit" />
|
|
273
|
-
<title>${
|
|
273
|
+
<title>${l} \u2014 ${t}</title>
|
|
274
274
|
${D}
|
|
275
275
|
</head>
|
|
276
276
|
<body>
|
|
277
277
|
<div class="policy-wrapper">
|
|
278
278
|
|
|
279
279
|
<header class="policy-header">
|
|
280
|
-
<h1>${
|
|
280
|
+
<h1>${l}</h1>
|
|
281
281
|
<div class="policy-meta">
|
|
282
|
-
<span><strong>Organisation:</strong> ${
|
|
283
|
-
<span><strong>Effective:</strong> ${
|
|
284
|
-
<span><strong>Version:</strong> ${
|
|
285
|
-
${
|
|
282
|
+
<span><strong>Organisation:</strong> ${t}</span>
|
|
283
|
+
<span><strong>Effective:</strong> ${m}</span>
|
|
284
|
+
<span><strong>Version:</strong> ${a}</span>
|
|
285
|
+
${y!==m?`<span><strong>Last updated:</strong> ${y}</span>`:""}
|
|
286
286
|
</div>
|
|
287
287
|
<div>
|
|
288
288
|
<span class="compliance-badge" role="img" aria-label="NDPA compliant">✓ NDPA 2023 Compliant</span>
|
|
289
289
|
</div>
|
|
290
290
|
</header>
|
|
291
291
|
|
|
292
|
-
${
|
|
292
|
+
${$}
|
|
293
293
|
|
|
294
294
|
<article class="policy-body" aria-label="Policy content">
|
|
295
295
|
|
|
296
|
-
${
|
|
296
|
+
${w}
|
|
297
297
|
|
|
298
298
|
</article>
|
|
299
299
|
|
|
300
300
|
<footer class="policy-footer" role="contentinfo">
|
|
301
|
-
<div>${
|
|
302
|
-
${
|
|
303
|
-
<div>Effective ${
|
|
301
|
+
<div>${t}${u?` — ${u}`:""}</div>
|
|
302
|
+
${b?`<div>Privacy contact: ${b}</div>`:""}
|
|
303
|
+
<div>Effective ${m} • Version ${a}</div>
|
|
304
304
|
<div>Generated by <strong>NDPA Toolkit</strong> — Nigeria Data Protection Act 2023</div>
|
|
305
305
|
</footer>
|
|
306
306
|
|
|
307
307
|
</div>
|
|
308
308
|
</body>
|
|
309
|
-
</html>`}function
|
|
310
|
-
`);for(let
|
|
311
|
-
`)}function
|
|
309
|
+
</html>`}function j(o){return o.toLowerCase().replace(/[^a-z0-9\s-]/g,"").trim().replace(/\s+/g,"-")}function V(o){let c=o.sections.filter(l=>l.included),s=o.title||"Privacy Policy",e=o.organizationInfo.name||"Organisation",r=o.version||"1.0",i=o.effectiveDate?new Date(o.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),t=[];return t.push(`# ${s}`),t.push(""),t.push(`_Effective: ${i} | Version: ${r} | ${e}_`),t.push(""),o.organizationInfo.website&&t.push(`**Website:** ${o.organizationInfo.website} `),o.organizationInfo.privacyEmail&&t.push(`**Privacy contact:** ${o.organizationInfo.privacyEmail} `),(o.organizationInfo.website||o.organizationInfo.privacyEmail)&&t.push(""),t.push("> This privacy policy is compliant with the **Nigeria Data Protection Act (NDPA) 2023**."),t.push(""),t.push("---"),t.push(""),c.length>0&&(t.push("## Table of Contents"),t.push(""),c.forEach((l,a)=>{let m=j(`${a+1} ${l.title}`);t.push(`${a+1}. [${l.title}](#${m})`);}),t.push(""),t.push("---"),t.push("")),c.forEach((l,a)=>{t.push(`## ${a+1}. ${l.title}`),t.push("");let m=(l.template||l.defaultContent||"").trim();if(m){let y=m.split(`
|
|
310
|
+
`);for(let u of y){let b=u.trimEnd();b.startsWith("-")||b.startsWith("\u2022")||b===""?t.push(b.replace(/^•/,"-")):t.push(b);}}t.push(""),t.push("---"),t.push("");}),t.push(`_Generated by **NDPA Toolkit** \u2014 ${e} \u2022 Version ${r}_`),t.push(""),t.join(`
|
|
311
|
+
`)}function M(o,c){return chunkMQFZHA2D_js.d(this,null,function*(){var D;let s;try{let d=yield import('jspdf');s=(D=d.jsPDF)!=null?D:d.default;}catch(d){throw new Error(`[ndpr-toolkit] PDF export requires the "jspdf" package. Install it with:
|
|
312
312
|
pnpm add jspdf
|
|
313
|
-
See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let e=new s({unit:"mm",format:"a4"}),r=e.internal.pageSize.getWidth(),
|
|
314
|
-
`);e.setFontSize(9.5),e.setFont("helvetica","normal"),e.setTextColor(50,50,50),
|
|
313
|
+
See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let e=new s({unit:"mm",format:"a4"}),r=e.internal.pageSize.getWidth(),i=e.internal.pageSize.getHeight(),t=20,l=r-t*2,a=t,m=o.organizationInfo.name||"",y=o.title||"Privacy Policy",u=o.version||"1.0",b=o.effectiveDate?new Date(o.effectiveDate).toLocaleDateString():new Date().toLocaleDateString(),T=()=>{e.setFontSize(8),e.setFont("helvetica","italic"),e.setTextColor(150,150,150),e.text(m?`${m} \u2014 ${y}`:y,t,12),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,14,r-t,14),e.setTextColor(0,0,0);},$=d=>{a+d>i-t-10&&(e.addPage(),a=t+8,T());};if((c==null?void 0:c.includeCoverPage)!==false){e.setFillColor(22,163,74),e.rect(0,0,r,12,"F"),e.setFontSize(28),e.setFont("helvetica","bold"),e.setTextColor(22,163,74);let d=e.splitTextToSize(y,l-10),g=72;d.forEach(v=>{e.text(v,r/2,g,{align:"center"}),g+=11;}),e.setDrawColor(22,163,74),e.setLineWidth(.6);let n=g+6;if(e.line(r/2-30,n,r/2+30,n),e.setFontSize(14),e.setFont("helvetica","normal"),e.setTextColor(40,40,40),e.text(m,r/2,n+14,{align:"center"}),e.setFontSize(10),e.setTextColor(100,100,100),e.text(`Effective Date: ${b}`,r/2,n+26,{align:"center"}),e.text(`Version ${u}`,r/2,n+34,{align:"center"}),(c==null?void 0:c.includeComplianceBadge)!==false){let v=n+52,p="Compliant with the Nigeria Data Protection Act (NDPA) 2023";e.setFontSize(8.5),e.setFont("helvetica","bold"),e.setTextColor(255,255,255);let f=e.getTextWidth(p),h=7,z=3.5,S=(r-f-h*2)/2;e.setFillColor(22,163,74),e.roundedRect(S,v-z-1,f+h*2,7+z,2,2,"F"),e.text(p,r/2,v+1.5,{align:"center"}),e.setTextColor(0,0,0);}e.setFillColor(22,163,74),e.rect(0,i-12,r,12,"F"),e.addPage(),a=t+8,T();}let w=o.sections.filter(d=>d.included);(c==null?void 0:c.includeTOC)!==false&&(e.setFontSize(18),e.setFont("helvetica","bold"),e.setTextColor(22,163,74),e.text("Table of Contents",t,a+4),e.setDrawColor(22,163,74),e.setLineWidth(.5),e.line(t,a+8,t+80,a+8),a+=18,e.setFontSize(10.5),e.setFont("helvetica","normal"),e.setTextColor(40,40,40),w.forEach((d,g)=>{$(7);let n=`${g+1}. ${d.title}`;e.text(n,t+4,a),a+=6.5;}),e.addPage(),a=t+8,T()),w.forEach((d,g)=>{$(18),e.setFillColor(22,163,74),e.circle(t+3.5,a-1.5,3.8,"F"),e.setFontSize(8),e.setFont("helvetica","bold"),e.setTextColor(255,255,255),e.text(String(g+1),t+3.5,a-.5,{align:"center"}),e.setFontSize(13),e.setFont("helvetica","bold"),e.setTextColor(22,163,74),e.text(d.title,t+11,a),a+=3,e.setDrawColor(200,200,200),e.setLineWidth(.25),e.line(t+11,a,r-t,a),a+=6;let n=(d.template||d.defaultContent||"").trim();if(n){let v=n.split(`
|
|
314
|
+
`);e.setFontSize(9.5),e.setFont("helvetica","normal"),e.setTextColor(50,50,50),v.forEach(p=>{let f=p.trimEnd();if(f===""){a+=3;return}let h=f.startsWith("-")||f.startsWith("\u2022"),z=h?t+8:t+4,S=h?f.replace(/^[-•]\s*/,""):f,C=l-(h?12:8);e.splitTextToSize(S,C).forEach((E,I)=>{$(5),h&&I===0&&(e.setFillColor(22,163,74),e.circle(t+4,a-1,.9,"F")),e.text(E,z,a),a+=5;});});}a+=10;});let P=e.getNumberOfPages();for(let d=1;d<=P;d++)e.setPage(d),e.setFontSize(7.5),e.setFont("helvetica","normal"),e.setTextColor(160,160,160),e.setDrawColor(220,220,220),e.setLineWidth(.3),e.line(t,i-12,r-t,i-12),e.text(m?`${m} \u2014 Privacy Policy`:"Privacy Policy",t,i-8),e.text(`Page ${d} of ${P}`,r-t,i-8,{align:"right"}),e.setTextColor(0,0,0);return e.setProperties({title:y,author:m,subject:"Privacy Policy \u2014 NDPA 2023 Compliant",keywords:"privacy policy, NDPA, Nigeria, data protection"}),e.output("blob")})}function X(o,c){return chunkMQFZHA2D_js.d(this,null,function*(){let s;try{s=yield import('docx');}catch(p){throw new Error(`[ndpr-toolkit] Word export requires the "docx" package. Install it with:
|
|
315
315
|
pnpm add docx
|
|
316
|
-
See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let{Document:e,Paragraph:r,TextRun:
|
|
317
|
-
`).forEach(S=>{let C=S.trimEnd();if(C===""){
|
|
318
|
-
//# sourceMappingURL=chunk-
|
|
316
|
+
See: https://ndprtoolkit.com.ng/docs/guides/styling-customization`)}let{Document:e,Paragraph:r,TextRun:i,HeadingLevel:t,Packer:l,Header:a,Footer:m,PageNumber:y,AlignmentType:u,BorderStyle:b,ShadingType:T,TableOfContents:$}=s,w=o.organizationInfo.name||"",P=o.title||"Privacy Policy",D=o.version||"1.0",d=o.effectiveDate?new Date(o.effectiveDate).toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}):new Date().toLocaleDateString("en-NG",{day:"numeric",month:"long",year:"numeric"}),g=o.sections.filter(p=>p.included),n=[];if(n.push(new r({children:[new i({text:P,bold:true,size:52,color:"064e3b"})],heading:t.TITLE,spacing:{after:160},alignment:u.CENTER})),n.push(new r({children:[new i({text:`${w}${w?" \u2022 ":""}Version ${D} \u2022 Effective ${d}`,size:20,color:"6b7280",italics:true})],spacing:{after:120},alignment:u.CENTER})),n.push(new r({children:[new i({text:"Compliant with the Nigeria Data Protection Act (NDPA) 2023",size:18,color:"16a34a",bold:true})],spacing:{after:400},alignment:u.CENTER})),n.push(new r({children:[],spacing:{after:200},border:{bottom:{color:"16a34a",style:b.SINGLE,size:6,space:1}}})),(c==null?void 0:c.includeTOC)!==false){if(n.push(new r({children:[new i({text:"Table of Contents",bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200}})),typeof $=="function")try{n.push(new $("Table of Contents",{hyperlink:!0,headingStyleRange:"1-1"}));}catch(p){g.forEach((f,h)=>{n.push(new r({children:[new i({text:`${h+1}. ${f.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});}else g.forEach((p,f)=>{n.push(new r({children:[new i({text:`${f+1}. ${p.title}`,size:22,color:"15803d"})],spacing:{after:80}}));});n.push(new r({children:[],pageBreakBefore:true}));}g.forEach((p,f)=>{n.push(new r({children:[new i({text:`${f+1}. ${p.title}`,bold:true,size:28,color:"064e3b"})],heading:t.HEADING_1,spacing:{before:400,after:200},border:{bottom:{color:"dcfce7",style:b.SINGLE,size:4,space:1}}}));let h=(p.template||p.defaultContent||"").trim();h&&h.split(`
|
|
317
|
+
`).forEach(S=>{let C=S.trimEnd();if(C===""){n.push(new r({children:[],spacing:{after:60}}));return}let N=C.startsWith("- ")||C.startsWith("\u2022 "),E=N?C.replace(/^[-•]\s*/,""):C;N?n.push(new r({children:[new i({text:E,size:22})],spacing:{after:80},bullet:{level:0}})):n.push(new r({children:[new i({text:E,size:22})],spacing:{after:100}}));});}),n.push(new r({children:[new i({text:`Generated by NDPA Toolkit \u2014 ${w}${w?" \u2014 ":""}Privacy Policy v${D}`,size:16,color:"9ca3af",italics:true})],spacing:{before:600},alignment:u.CENTER}));let v=new e({title:P,description:"Privacy Policy \u2014 NDPA 2023 Compliant",styles:{paragraphStyles:[{id:"Normal",name:"Normal",run:{font:"Calibri",size:22}}]},sections:[{headers:{default:new a({children:[new r({children:[new i({text:w||"Privacy Policy",size:16,color:"9ca3af"})],alignment:u.RIGHT})]})},footers:{default:new m({children:[new r({children:[new i({text:"Page ",size:16,color:"9ca3af"}),new i({children:[y.CURRENT],size:16,color:"9ca3af"}),new i({text:" of ",size:16,color:"9ca3af"}),new i({children:[y.TOTAL_PAGES],size:16,color:"9ca3af"})],alignment:u.CENTER})]})},children:n}]});return l.toBlob(v)})}exports.a=_;exports.b=V;exports.c=M;exports.d=X;//# sourceMappingURL=chunk-Z73T6MWY.js.map
|
|
318
|
+
//# sourceMappingURL=chunk-Z73T6MWY.js.map
|