@freshjuice/zest 0.1.0 → 2.0.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.
Files changed (82) hide show
  1. package/README.md +216 -70
  2. package/dist/zest.de.js +776 -286
  3. package/dist/zest.de.js.map +1 -1
  4. package/dist/zest.de.min.js +1 -1
  5. package/dist/zest.en.js +776 -286
  6. package/dist/zest.en.js.map +1 -1
  7. package/dist/zest.en.min.js +1 -1
  8. package/dist/zest.es.js +776 -286
  9. package/dist/zest.es.js.map +1 -1
  10. package/dist/zest.es.min.js +1 -1
  11. package/dist/zest.esm.js +776 -286
  12. package/dist/zest.esm.js.map +1 -1
  13. package/dist/zest.esm.min.js +1 -1
  14. package/dist/zest.fr.js +776 -286
  15. package/dist/zest.fr.js.map +1 -1
  16. package/dist/zest.fr.min.js +1 -1
  17. package/dist/zest.headless.esm.js +2299 -0
  18. package/dist/zest.headless.esm.js.map +1 -0
  19. package/dist/zest.headless.esm.min.js +1 -0
  20. package/dist/zest.it.js +776 -286
  21. package/dist/zest.it.js.map +1 -1
  22. package/dist/zest.it.min.js +1 -1
  23. package/dist/zest.ja.js +776 -286
  24. package/dist/zest.ja.js.map +1 -1
  25. package/dist/zest.ja.min.js +1 -1
  26. package/dist/zest.js +776 -286
  27. package/dist/zest.js.map +1 -1
  28. package/dist/zest.min.js +1 -1
  29. package/dist/zest.nl.js +776 -286
  30. package/dist/zest.nl.js.map +1 -1
  31. package/dist/zest.nl.min.js +1 -1
  32. package/dist/zest.pl.js +776 -286
  33. package/dist/zest.pl.js.map +1 -1
  34. package/dist/zest.pl.min.js +1 -1
  35. package/dist/zest.pt.js +776 -286
  36. package/dist/zest.pt.js.map +1 -1
  37. package/dist/zest.pt.min.js +1 -1
  38. package/dist/zest.ru.js +776 -286
  39. package/dist/zest.ru.js.map +1 -1
  40. package/dist/zest.ru.min.js +1 -1
  41. package/dist/zest.uk.js +776 -286
  42. package/dist/zest.uk.js.map +1 -1
  43. package/dist/zest.uk.min.js +1 -1
  44. package/dist/zest.zh.js +776 -286
  45. package/dist/zest.zh.js.map +1 -1
  46. package/dist/zest.zh.min.js +1 -1
  47. package/package.json +17 -4
  48. package/src/api/public-api.js +97 -0
  49. package/src/config/defaults.js +150 -0
  50. package/src/config/parser.js +104 -0
  51. package/src/core/categories.js +52 -0
  52. package/src/core/cookie-interceptor.js +131 -0
  53. package/src/core/dnt.js +56 -0
  54. package/src/core/known-trackers.js +195 -0
  55. package/src/core/pattern-matcher.js +111 -0
  56. package/src/core/script-blocker.js +314 -0
  57. package/src/core/security.js +204 -0
  58. package/src/core/storage-interceptor.js +173 -0
  59. package/src/core-lifecycle.js +192 -0
  60. package/src/headless.js +133 -0
  61. package/src/i18n/lang-en.js +54 -0
  62. package/src/i18n/single/lang-de.js +55 -0
  63. package/src/i18n/single/lang-en.js +55 -0
  64. package/src/i18n/single/lang-es.js +55 -0
  65. package/src/i18n/single/lang-fr.js +55 -0
  66. package/src/i18n/single/lang-it.js +55 -0
  67. package/src/i18n/single/lang-ja.js +55 -0
  68. package/src/i18n/single/lang-nl.js +55 -0
  69. package/src/i18n/single/lang-pl.js +55 -0
  70. package/src/i18n/single/lang-pt.js +55 -0
  71. package/src/i18n/single/lang-ru.js +55 -0
  72. package/src/i18n/single/lang-uk.js +55 -0
  73. package/src/i18n/single/lang-zh.js +55 -0
  74. package/src/i18n/translations.js +546 -0
  75. package/src/index.js +266 -0
  76. package/src/integrations/consent-signals.js +71 -0
  77. package/src/storage/consent-store.js +201 -0
  78. package/src/storage/events.js +84 -0
  79. package/src/ui/banner.js +134 -0
  80. package/src/ui/modal.js +215 -0
  81. package/src/ui/styles.js +519 -0
  82. package/src/ui/widget.js +105 -0
@@ -0,0 +1,192 @@
1
+ /**
2
+ * Core lifecycle - UI-agnostic initialization and consent actions.
3
+ *
4
+ * This module contains everything the main entry (with UI) and the
5
+ * headless entry (no UI) share: interceptor setup, consent load/save,
6
+ * replay, DNT handling, and the events/callbacks fan-out. It intentionally
7
+ * does NOT import anything from `./ui/*` so tree-shakers can drop the UI
8
+ * bundle entirely when only the headless API is used.
9
+ */
10
+
11
+ import { interceptCookies, setConsentChecker as setCookieChecker, replayCookies } from './core/cookie-interceptor.js';
12
+ import { interceptStorage, setConsentChecker as setStorageChecker, replayStorage } from './core/storage-interceptor.js';
13
+ import { startScriptBlocking, setConsentChecker as setScriptChecker, replayScripts } from './core/script-blocker.js';
14
+ import { setPatterns } from './core/pattern-matcher.js';
15
+ import { getCategoryIds } from './core/categories.js';
16
+ import { isDoNotTrackEnabled } from './core/dnt.js';
17
+ import { safeInvoke } from './core/security.js';
18
+
19
+ import { applyConsentSignals } from './integrations/consent-signals.js';
20
+
21
+ import { setConfig } from './config/parser.js';
22
+
23
+ import {
24
+ loadConsent,
25
+ hasConsent,
26
+ updateConsent,
27
+ acceptAll as storeAcceptAll,
28
+ rejectAll as storeRejectAll,
29
+ resetConsent,
30
+ hasConsentDecision
31
+ } from './storage/consent-store.js';
32
+ import { emitReady, emitConsent, emitReject, emitChange } from './storage/events.js';
33
+
34
+ let initialized = false;
35
+ let currentConfig = null;
36
+
37
+ function checkConsent(category) {
38
+ return hasConsent(category);
39
+ }
40
+
41
+ function replayAll(categories) {
42
+ replayCookies(categories);
43
+ replayStorage(categories);
44
+ replayScripts(categories);
45
+ }
46
+
47
+ /**
48
+ * Run the non-UI half of init. Returns a snapshot the caller (UI or
49
+ * headless) can use to decide what to do next.
50
+ */
51
+ export function coreInit(userConfig = {}) {
52
+ if (initialized) {
53
+ return {
54
+ alreadyInitialized: true,
55
+ config: currentConfig,
56
+ consent: loadConsent(),
57
+ hasDecision: hasConsentDecision(),
58
+ dntApplied: false
59
+ };
60
+ }
61
+
62
+ currentConfig = setConfig(userConfig);
63
+
64
+ // Push default-denied state to vendor consent mode APIs BEFORE any
65
+ // third-party script has a chance to fire.
66
+ applyConsentSignals(
67
+ { essential: true, functional: false, analytics: false, marketing: false },
68
+ currentConfig,
69
+ true
70
+ );
71
+
72
+ if (currentConfig.patterns) {
73
+ setPatterns(currentConfig.patterns);
74
+ }
75
+
76
+ setCookieChecker(checkConsent);
77
+ setStorageChecker(checkConsent);
78
+ setScriptChecker(checkConsent);
79
+
80
+ interceptCookies();
81
+ interceptStorage();
82
+ startScriptBlocking(currentConfig.mode, currentConfig.blockedDomains);
83
+
84
+ const consent = loadConsent();
85
+ initialized = true;
86
+
87
+ if (hasConsentDecision()) {
88
+ applyConsentSignals(consent, currentConfig, false);
89
+ }
90
+
91
+ // DNT / GPC handling — if the user signalled opt-out at the browser
92
+ // level and the site opts to respect it, auto-reject before the UI
93
+ // layer ever runs.
94
+ const dntEnabled = isDoNotTrackEnabled();
95
+ let dntApplied = false;
96
+
97
+ if (dntEnabled && currentConfig.respectDNT && currentConfig.dntBehavior !== 'ignore') {
98
+ if (currentConfig.dntBehavior === 'reject' && !hasConsentDecision()) {
99
+ const result = storeRejectAll(currentConfig.expiration);
100
+ dntApplied = true;
101
+ applyConsentSignals(result.current, currentConfig, false);
102
+ emitReject(result.current);
103
+ emitChange(result.current, result.previous);
104
+ safeInvoke(currentConfig.callbacks?.onReject);
105
+ safeInvoke(currentConfig.callbacks?.onChange, result.current);
106
+ }
107
+ }
108
+
109
+ emitReady(consent);
110
+ safeInvoke(currentConfig.callbacks?.onReady, consent);
111
+
112
+ return {
113
+ alreadyInitialized: false,
114
+ config: currentConfig,
115
+ consent,
116
+ hasDecision: hasConsentDecision(),
117
+ dntApplied
118
+ };
119
+ }
120
+
121
+ /**
122
+ * Accept all categories, replay queued items, fire events + callbacks.
123
+ * Returns { current, previous } or null if not yet initialized.
124
+ */
125
+ export function coreAcceptAll() {
126
+ if (!initialized) return null;
127
+ const result = storeAcceptAll(currentConfig.expiration);
128
+ applyConsentSignals(result.current, currentConfig, false);
129
+ replayAll(getCategoryIds());
130
+ emitConsent(result.current, result.previous);
131
+ emitChange(result.current, result.previous);
132
+ safeInvoke(currentConfig.callbacks?.onAccept, result.current);
133
+ safeInvoke(currentConfig.callbacks?.onChange, result.current);
134
+ return result;
135
+ }
136
+
137
+ /**
138
+ * Reject all non-essential categories, fire events + callbacks.
139
+ */
140
+ export function coreRejectAll() {
141
+ if (!initialized) return null;
142
+ const result = storeRejectAll(currentConfig.expiration);
143
+ applyConsentSignals(result.current, currentConfig, false);
144
+ emitReject(result.current);
145
+ emitChange(result.current, result.previous);
146
+ safeInvoke(currentConfig.callbacks?.onReject);
147
+ safeInvoke(currentConfig.callbacks?.onChange, result.current);
148
+ return result;
149
+ }
150
+
151
+ /**
152
+ * Save custom selections and replay only the newly-allowed categories.
153
+ */
154
+ export function coreUpdateConsent(selections) {
155
+ if (!initialized) return null;
156
+ const result = updateConsent(selections, currentConfig.expiration);
157
+ applyConsentSignals(result.current, currentConfig, false);
158
+
159
+ const newlyAllowed = Object.keys(result.current).filter(
160
+ (cat) => result.current[cat] && !result.previous[cat]
161
+ );
162
+ if (newlyAllowed.length > 0) {
163
+ replayAll(newlyAllowed);
164
+ }
165
+
166
+ const hasNonEssential = Object.entries(selections || {}).some(
167
+ ([cat, val]) => cat !== 'essential' && val
168
+ );
169
+ if (hasNonEssential) {
170
+ emitConsent(result.current, result.previous);
171
+ } else {
172
+ emitReject(result.current);
173
+ }
174
+ emitChange(result.current, result.previous);
175
+ safeInvoke(currentConfig.callbacks?.onChange, result.current);
176
+ return result;
177
+ }
178
+
179
+ /**
180
+ * Clear the consent cookie. The caller is responsible for any UI reset.
181
+ */
182
+ export function coreReset() {
183
+ resetConsent();
184
+ }
185
+
186
+ export function isInitialized() {
187
+ return initialized;
188
+ }
189
+
190
+ export function getActiveConfig() {
191
+ return currentConfig;
192
+ }
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Zest Headless - consent logic only, zero UI.
3
+ *
4
+ * Use this entry when you want to bring your own banner / modal / settings
5
+ * markup and style it with your own CSS. No Shadow DOM is mounted, no
6
+ * inline stylesheet is injected, and nothing is attached to `window`.
7
+ *
8
+ * Everything you need to wire a custom UI is here:
9
+ *
10
+ * import Zest from '@freshjuice/zest/headless';
11
+ *
12
+ * Zest.init({ mode: 'safe', respectDNT: true });
13
+ *
14
+ * if (!Zest.hasConsentDecision()) {
15
+ * myBanner.show();
16
+ * }
17
+ *
18
+ * myAcceptBtn.addEventListener('click', () => Zest.acceptAll());
19
+ * myRejectBtn.addEventListener('click', () => Zest.rejectAll());
20
+ * mySaveBtn.addEventListener('click', () => {
21
+ * Zest.updateConsent({ analytics: true, marketing: false });
22
+ * });
23
+ *
24
+ * Zest.on(Zest.EVENTS.CHANGE, (e) => console.log(e.detail.consent));
25
+ *
26
+ * The headless build does NOT auto-initialize. You must call `init()`
27
+ * yourself, so you control exactly when interceptors come online.
28
+ */
29
+
30
+ import {
31
+ coreInit,
32
+ coreAcceptAll,
33
+ coreRejectAll,
34
+ coreUpdateConsent,
35
+ coreReset,
36
+ isInitialized,
37
+ getActiveConfig
38
+ } from './core-lifecycle.js';
39
+
40
+ import {
41
+ getConsent,
42
+ hasConsent,
43
+ hasConsentDecision,
44
+ getConsentProof
45
+ } from './storage/consent-store.js';
46
+
47
+ import { isDoNotTrackEnabled, getDNTDetails } from './core/dnt.js';
48
+
49
+ import { EVENTS, on, once } from './storage/events.js';
50
+
51
+ function init(userConfig = {}) {
52
+ const snapshot = coreInit(userConfig);
53
+ // Headless returns the snapshot so callers can decide whether to
54
+ // render their banner / settings UI based on hasDecision / dntApplied.
55
+ return snapshot;
56
+ }
57
+
58
+ function acceptAll() {
59
+ if (!isInitialized()) {
60
+ console.warn('[Zest] Not initialized. Call Zest.init() first.');
61
+ return null;
62
+ }
63
+ return coreAcceptAll();
64
+ }
65
+
66
+ function rejectAll() {
67
+ if (!isInitialized()) {
68
+ console.warn('[Zest] Not initialized. Call Zest.init() first.');
69
+ return null;
70
+ }
71
+ return coreRejectAll();
72
+ }
73
+
74
+ function updateConsent(selections) {
75
+ if (!isInitialized()) {
76
+ console.warn('[Zest] Not initialized. Call Zest.init() first.');
77
+ return null;
78
+ }
79
+ return coreUpdateConsent(selections);
80
+ }
81
+
82
+ function reset() {
83
+ coreReset();
84
+ }
85
+
86
+ const Zest = {
87
+ init,
88
+
89
+ // Consent state
90
+ getConsent,
91
+ hasConsent,
92
+ hasConsentDecision,
93
+ getConsentProof,
94
+
95
+ // Actions
96
+ acceptAll,
97
+ rejectAll,
98
+ updateConsent,
99
+ reset,
100
+
101
+ // DNT introspection
102
+ isDoNotTrackEnabled,
103
+ getDNTDetails,
104
+
105
+ // Events
106
+ on,
107
+ once,
108
+ EVENTS,
109
+
110
+ // Config introspection
111
+ getConfig: getActiveConfig
112
+ };
113
+
114
+ export default Zest;
115
+
116
+ // Named exports for tree-shake friendly consumers who only need a slice.
117
+ export {
118
+ init,
119
+ acceptAll,
120
+ rejectAll,
121
+ updateConsent,
122
+ reset,
123
+ getConsent,
124
+ hasConsent,
125
+ hasConsentDecision,
126
+ getConsentProof,
127
+ isDoNotTrackEnabled,
128
+ getDNTDetails,
129
+ on,
130
+ once,
131
+ EVENTS,
132
+ getActiveConfig as getConfig
133
+ };
@@ -0,0 +1,54 @@
1
+ /**
2
+ * English only translation
3
+ */
4
+ export const translations = {
5
+ en: {
6
+ labels: {
7
+ banner: {
8
+ title: 'We value your privacy',
9
+ description: 'We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies.',
10
+ acceptAll: 'Accept All',
11
+ rejectAll: 'Reject All',
12
+ settings: 'Settings'
13
+ },
14
+ modal: {
15
+ title: 'Privacy Settings',
16
+ description: 'Manage your cookie preferences. You can enable or disable different types of cookies below.',
17
+ save: 'Save Preferences',
18
+ acceptAll: 'Accept All',
19
+ rejectAll: 'Reject All'
20
+ },
21
+ widget: {
22
+ label: 'Cookie Settings'
23
+ }
24
+ },
25
+ categories: {
26
+ essential: {
27
+ label: 'Essential',
28
+ description: 'Required for the website to function properly. Cannot be disabled.'
29
+ },
30
+ functional: {
31
+ label: 'Functional',
32
+ description: 'Enable personalized features like language preferences and themes.'
33
+ },
34
+ analytics: {
35
+ label: 'Analytics',
36
+ description: 'Help us understand how visitors interact with our website.'
37
+ },
38
+ marketing: {
39
+ label: 'Marketing',
40
+ description: 'Used to deliver relevant advertisements and track campaign performance.'
41
+ }
42
+ }
43
+ }
44
+ };
45
+
46
+ export const supportedLanguages = ['en'];
47
+
48
+ export function detectLanguage() {
49
+ return 'en';
50
+ }
51
+
52
+ export function getTranslation() {
53
+ return translations.en;
54
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * DE only translation - auto-generated
3
+ * Do not edit manually, run: npm run build
4
+ */
5
+ export const translations = {
6
+ de: {
7
+ "labels": {
8
+ "banner": {
9
+ "title": "Wir respektieren Ihre Privatsphäre",
10
+ "description": "Wir verwenden Cookies, um Ihr Surferlebnis zu verbessern, personalisierte Inhalte bereitzustellen und unseren Datenverkehr zu analysieren. Mit einem Klick auf „Alle akzeptieren\" stimmen Sie der Verwendung von Cookies zu.",
11
+ "acceptAll": "Alle akzeptieren",
12
+ "rejectAll": "Alle ablehnen",
13
+ "settings": "Einstellungen"
14
+ },
15
+ "modal": {
16
+ "title": "Datenschutzeinstellungen",
17
+ "description": "Verwalten Sie Ihre Cookie-Einstellungen. Sie können verschiedene Arten von Cookies unten aktivieren oder deaktivieren.",
18
+ "save": "Einstellungen speichern",
19
+ "acceptAll": "Alle akzeptieren",
20
+ "rejectAll": "Alle ablehnen"
21
+ },
22
+ "widget": {
23
+ "label": "Cookie-Einstellungen"
24
+ }
25
+ },
26
+ "categories": {
27
+ "essential": {
28
+ "label": "Notwendig",
29
+ "description": "Erforderlich für die ordnungsgemäße Funktion der Website. Können nicht deaktiviert werden."
30
+ },
31
+ "functional": {
32
+ "label": "Funktional",
33
+ "description": "Ermöglichen personalisierte Funktionen wie Spracheinstellungen und Designs."
34
+ },
35
+ "analytics": {
36
+ "label": "Analytisch",
37
+ "description": "Helfen uns zu verstehen, wie Besucher mit unserer Website interagieren."
38
+ },
39
+ "marketing": {
40
+ "label": "Marketing",
41
+ "description": "Werden verwendet, um relevante Werbung anzuzeigen und die Kampagnenleistung zu messen."
42
+ }
43
+ }
44
+ }
45
+ };
46
+
47
+ export const supportedLanguages = ['de'];
48
+
49
+ export function detectLanguage() {
50
+ return 'de';
51
+ }
52
+
53
+ export function getTranslation() {
54
+ return translations.de;
55
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * EN only translation - auto-generated
3
+ * Do not edit manually, run: npm run build
4
+ */
5
+ export const translations = {
6
+ en: {
7
+ "labels": {
8
+ "banner": {
9
+ "title": "We value your privacy",
10
+ "description": "We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By clicking \"Accept All\", you consent to our use of cookies.",
11
+ "acceptAll": "Accept All",
12
+ "rejectAll": "Reject All",
13
+ "settings": "Settings"
14
+ },
15
+ "modal": {
16
+ "title": "Privacy Settings",
17
+ "description": "Manage your cookie preferences. You can enable or disable different types of cookies below.",
18
+ "save": "Save Preferences",
19
+ "acceptAll": "Accept All",
20
+ "rejectAll": "Reject All"
21
+ },
22
+ "widget": {
23
+ "label": "Cookie Settings"
24
+ }
25
+ },
26
+ "categories": {
27
+ "essential": {
28
+ "label": "Essential",
29
+ "description": "Required for the website to function properly. Cannot be disabled."
30
+ },
31
+ "functional": {
32
+ "label": "Functional",
33
+ "description": "Enable personalized features like language preferences and themes."
34
+ },
35
+ "analytics": {
36
+ "label": "Analytics",
37
+ "description": "Help us understand how visitors interact with our website."
38
+ },
39
+ "marketing": {
40
+ "label": "Marketing",
41
+ "description": "Used to deliver relevant advertisements and track campaign performance."
42
+ }
43
+ }
44
+ }
45
+ };
46
+
47
+ export const supportedLanguages = ['en'];
48
+
49
+ export function detectLanguage() {
50
+ return 'en';
51
+ }
52
+
53
+ export function getTranslation() {
54
+ return translations.en;
55
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * ES only translation - auto-generated
3
+ * Do not edit manually, run: npm run build
4
+ */
5
+ export const translations = {
6
+ es: {
7
+ "labels": {
8
+ "banner": {
9
+ "title": "Valoramos tu privacidad",
10
+ "description": "Utilizamos cookies para mejorar tu experiencia de navegación, ofrecer contenido personalizado y analizar nuestro tráfico. Al hacer clic en \"Aceptar todo\", consientes el uso de cookies.",
11
+ "acceptAll": "Aceptar todo",
12
+ "rejectAll": "Rechazar todo",
13
+ "settings": "Configuración"
14
+ },
15
+ "modal": {
16
+ "title": "Configuración de privacidad",
17
+ "description": "Gestiona tus preferencias de cookies. Puedes activar o desactivar diferentes tipos de cookies a continuación.",
18
+ "save": "Guardar preferencias",
19
+ "acceptAll": "Aceptar todo",
20
+ "rejectAll": "Rechazar todo"
21
+ },
22
+ "widget": {
23
+ "label": "Configuración de cookies"
24
+ }
25
+ },
26
+ "categories": {
27
+ "essential": {
28
+ "label": "Esenciales",
29
+ "description": "Necesarias para el funcionamiento del sitio web. No se pueden desactivar."
30
+ },
31
+ "functional": {
32
+ "label": "Funcionales",
33
+ "description": "Permiten funciones personalizadas como preferencias de idioma y temas."
34
+ },
35
+ "analytics": {
36
+ "label": "Analíticas",
37
+ "description": "Nos ayudan a entender cómo los visitantes interactúan con nuestro sitio web."
38
+ },
39
+ "marketing": {
40
+ "label": "Marketing",
41
+ "description": "Se utilizan para mostrar anuncios relevantes y medir el rendimiento de las campañas."
42
+ }
43
+ }
44
+ }
45
+ };
46
+
47
+ export const supportedLanguages = ['es'];
48
+
49
+ export function detectLanguage() {
50
+ return 'es';
51
+ }
52
+
53
+ export function getTranslation() {
54
+ return translations.es;
55
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * FR only translation - auto-generated
3
+ * Do not edit manually, run: npm run build
4
+ */
5
+ export const translations = {
6
+ fr: {
7
+ "labels": {
8
+ "banner": {
9
+ "title": "Nous respectons votre vie privée",
10
+ "description": "Nous utilisons des cookies pour améliorer votre expérience de navigation, proposer du contenu personnalisé et analyser notre trafic. En cliquant sur « Tout accepter », vous consentez à l'utilisation de cookies.",
11
+ "acceptAll": "Tout accepter",
12
+ "rejectAll": "Tout refuser",
13
+ "settings": "Paramètres"
14
+ },
15
+ "modal": {
16
+ "title": "Paramètres de confidentialité",
17
+ "description": "Gérez vos préférences en matière de cookies. Vous pouvez activer ou désactiver différents types de cookies ci-dessous.",
18
+ "save": "Enregistrer les préférences",
19
+ "acceptAll": "Tout accepter",
20
+ "rejectAll": "Tout refuser"
21
+ },
22
+ "widget": {
23
+ "label": "Paramètres des cookies"
24
+ }
25
+ },
26
+ "categories": {
27
+ "essential": {
28
+ "label": "Essentiels",
29
+ "description": "Nécessaires au bon fonctionnement du site. Ne peuvent pas être désactivés."
30
+ },
31
+ "functional": {
32
+ "label": "Fonctionnels",
33
+ "description": "Permettent des fonctionnalités personnalisées comme les préférences de langue et de thème."
34
+ },
35
+ "analytics": {
36
+ "label": "Analytiques",
37
+ "description": "Nous aident à comprendre comment les visiteurs interagissent avec notre site."
38
+ },
39
+ "marketing": {
40
+ "label": "Marketing",
41
+ "description": "Utilisés pour afficher des publicités pertinentes et mesurer les performances des campagnes."
42
+ }
43
+ }
44
+ }
45
+ };
46
+
47
+ export const supportedLanguages = ['fr'];
48
+
49
+ export function detectLanguage() {
50
+ return 'fr';
51
+ }
52
+
53
+ export function getTranslation() {
54
+ return translations.fr;
55
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * IT only translation - auto-generated
3
+ * Do not edit manually, run: npm run build
4
+ */
5
+ export const translations = {
6
+ it: {
7
+ "labels": {
8
+ "banner": {
9
+ "title": "Rispettiamo la tua privacy",
10
+ "description": "Utilizziamo i cookie per migliorare la tua esperienza di navigazione, fornire contenuti personalizzati e analizzare il nostro traffico. Cliccando su \"Accetta tutto\", acconsenti all'uso dei cookie.",
11
+ "acceptAll": "Accetta tutto",
12
+ "rejectAll": "Rifiuta tutto",
13
+ "settings": "Impostazioni"
14
+ },
15
+ "modal": {
16
+ "title": "Impostazioni privacy",
17
+ "description": "Gestisci le tue preferenze sui cookie. Puoi attivare o disattivare diversi tipi di cookie qui sotto.",
18
+ "save": "Salva preferenze",
19
+ "acceptAll": "Accetta tutto",
20
+ "rejectAll": "Rifiuta tutto"
21
+ },
22
+ "widget": {
23
+ "label": "Impostazioni cookie"
24
+ }
25
+ },
26
+ "categories": {
27
+ "essential": {
28
+ "label": "Essenziali",
29
+ "description": "Necessari per il corretto funzionamento del sito. Non possono essere disattivati."
30
+ },
31
+ "functional": {
32
+ "label": "Funzionali",
33
+ "description": "Abilitano funzionalità personalizzate come preferenze di lingua e tema."
34
+ },
35
+ "analytics": {
36
+ "label": "Analitici",
37
+ "description": "Ci aiutano a capire come i visitatori interagiscono con il nostro sito."
38
+ },
39
+ "marketing": {
40
+ "label": "Marketing",
41
+ "description": "Utilizzati per mostrare annunci pertinenti e misurare le prestazioni delle campagne."
42
+ }
43
+ }
44
+ }
45
+ };
46
+
47
+ export const supportedLanguages = ['it'];
48
+
49
+ export function detectLanguage() {
50
+ return 'it';
51
+ }
52
+
53
+ export function getTranslation() {
54
+ return translations.it;
55
+ }