c15t 0.0.1-rc.3
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/.turbo/turbo-build.log +54 -0
- package/.turbo/turbo-fmt.log +6 -0
- package/.turbo/turbo-lint.log +288 -0
- package/.turbo/turbo-test.log +33 -0
- package/CHANGELOG.md +20 -0
- package/LICENSE.md +595 -0
- package/README.md +28 -0
- package/dist/index.cjs +118 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/libs/__tests__/tracking-blocker.test.cjs +269 -0
- package/dist/libs/__tests__/tracking-blocker.test.d.ts +2 -0
- package/dist/libs/__tests__/tracking-blocker.test.d.ts.map +1 -0
- package/dist/libs/__tests__/tracking-blocker.test.js +267 -0
- package/dist/libs/consent-utils.cjs +68 -0
- package/dist/libs/consent-utils.d.ts +49 -0
- package/dist/libs/consent-utils.d.ts.map +1 -0
- package/dist/libs/consent-utils.js +23 -0
- package/dist/libs/tracking-blocker.cjs +167 -0
- package/dist/libs/tracking-blocker.d.ts +33 -0
- package/dist/libs/tracking-blocker.d.ts.map +1 -0
- package/dist/libs/tracking-blocker.js +108 -0
- package/dist/libs/tracking-domains.cjs +188 -0
- package/dist/libs/tracking-domains.d.ts +7 -0
- package/dist/libs/tracking-domains.d.ts.map +1 -0
- package/dist/libs/tracking-domains.js +146 -0
- package/dist/store.cjs +248 -0
- package/dist/store.d.ts +58 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.initial-state.cjs +105 -0
- package/dist/store.initial-state.d.ts +43 -0
- package/dist/store.initial-state.d.ts.map +1 -0
- package/dist/store.initial-state.js +66 -0
- package/dist/store.js +219 -0
- package/dist/store.type.cjs +22 -0
- package/dist/store.type.d.ts +159 -0
- package/dist/store.type.d.ts.map +1 -0
- package/dist/store.type.js +0 -0
- package/dist/translations/en.cjs +96 -0
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.d.ts.map +1 -0
- package/dist/translations/en.js +54 -0
- package/dist/translations/index.cjs +51 -0
- package/dist/translations/index.d.ts +3 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/index.js +9 -0
- package/dist/types/callbacks.cjs +22 -0
- package/dist/types/callbacks.d.ts +146 -0
- package/dist/types/callbacks.d.ts.map +1 -0
- package/dist/types/callbacks.js +0 -0
- package/dist/types/compliance.cjs +22 -0
- package/dist/types/compliance.d.ts +196 -0
- package/dist/types/compliance.d.ts.map +1 -0
- package/dist/types/compliance.js +0 -0
- package/dist/types/gdpr.cjs +86 -0
- package/dist/types/gdpr.d.ts +168 -0
- package/dist/types/gdpr.d.ts.map +1 -0
- package/dist/types/gdpr.js +44 -0
- package/dist/types/index.cjs +44 -0
- package/dist/types/index.d.ts +141 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/translations.cjs +22 -0
- package/dist/types/translations.d.ts +52 -0
- package/dist/types/translations.d.ts.map +1 -0
- package/dist/types/translations.js +0 -0
- package/package.json +33 -0
- package/rslib.config.ts +28 -0
- package/src/index.ts +31 -0
- package/src/libs/__tests__/tracking-blocker.test.ts +271 -0
- package/src/libs/consent-utils.ts +70 -0
- package/src/libs/tracking-blocker.ts +202 -0
- package/src/libs/tracking-domains.ts +158 -0
- package/src/store.initial-state.ts +123 -0
- package/src/store.ts +450 -0
- package/src/store.type.ts +187 -0
- package/src/translations/en.ts +55 -0
- package/src/translations/index.ts +10 -0
- package/src/types/callbacks.ts +152 -0
- package/src/types/compliance.ts +205 -0
- package/src/types/gdpr.ts +217 -0
- package/src/types/index.ts +148 -0
- package/src/types/translations.ts +60 -0
- package/tsconfig.json +12 -0
- package/vitest.config.ts +15 -0
package/dist/store.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_zustand_vanilla_8a8e4ffb__ from 'zustand/vanilla';
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE__libs_consent_utils_js_653d35fa__ from './libs/consent-utils.js';
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__libs_tracking_blocker_js_b46fe1fa__ from './libs/tracking-blocker.js';
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__store_initial_state_js_e62f207b__ from './store.initial-state.js';
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__types_index_js_63ede62f__ from './types/index.js';
|
|
6
|
+
const STORAGE_KEY = 'privacy-consent-storage';
|
|
7
|
+
const getStoredConsent = () => {
|
|
8
|
+
if ('undefined' == typeof window) return null;
|
|
9
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
|
10
|
+
if (!stored) return null;
|
|
11
|
+
try {
|
|
12
|
+
return JSON.parse(stored);
|
|
13
|
+
} catch (e) {
|
|
14
|
+
console.error('Failed to parse stored consent:', e);
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const createConsentManagerStore = (namespace = 'c15tStore', config) => {
|
|
19
|
+
const storedConsent = getStoredConsent();
|
|
20
|
+
const trackingBlocker =
|
|
21
|
+
'undefined' != typeof window
|
|
22
|
+
? (0,
|
|
23
|
+
__WEBPACK_EXTERNAL_MODULE__libs_tracking_blocker_js_b46fe1fa__.createTrackingBlocker)(
|
|
24
|
+
config?.trackingBlockerConfig || {},
|
|
25
|
+
storedConsent?.consents ||
|
|
26
|
+
__WEBPACK_EXTERNAL_MODULE__store_initial_state_js_e62f207b__
|
|
27
|
+
.initialState.consents
|
|
28
|
+
)
|
|
29
|
+
: null;
|
|
30
|
+
const store = (0,
|
|
31
|
+
__WEBPACK_EXTERNAL_MODULE_zustand_vanilla_8a8e4ffb__.createStore)(
|
|
32
|
+
(set, get) => ({
|
|
33
|
+
...__WEBPACK_EXTERNAL_MODULE__store_initial_state_js_e62f207b__.initialState,
|
|
34
|
+
...(storedConsent
|
|
35
|
+
? {
|
|
36
|
+
consents: storedConsent.consents,
|
|
37
|
+
consentInfo: storedConsent.consentInfo,
|
|
38
|
+
showPopup: false,
|
|
39
|
+
}
|
|
40
|
+
: {
|
|
41
|
+
showPopup: true,
|
|
42
|
+
}),
|
|
43
|
+
setConsent: (name, value) => {
|
|
44
|
+
set((state) => {
|
|
45
|
+
const consentType = state.consentTypes.find(
|
|
46
|
+
(type) => type.name === name
|
|
47
|
+
);
|
|
48
|
+
if (consentType?.disabled) return state;
|
|
49
|
+
const newConsents = {
|
|
50
|
+
...state.consents,
|
|
51
|
+
[name]: value,
|
|
52
|
+
};
|
|
53
|
+
trackingBlocker?.updateConsents(newConsents);
|
|
54
|
+
return {
|
|
55
|
+
consents: newConsents,
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
get().updateConsentMode();
|
|
59
|
+
},
|
|
60
|
+
setShowPopup: (show, force = false) => {
|
|
61
|
+
const state = get();
|
|
62
|
+
const storedConsent = getStoredConsent();
|
|
63
|
+
if (force || (!storedConsent && !state.consentInfo && show))
|
|
64
|
+
set({
|
|
65
|
+
showPopup: show,
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
setIsPrivacyDialogOpen: (isOpen) => {
|
|
69
|
+
set({
|
|
70
|
+
isPrivacyDialogOpen: isOpen,
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
saveConsents: (type) => {
|
|
74
|
+
const {
|
|
75
|
+
callbacks,
|
|
76
|
+
updateConsentMode,
|
|
77
|
+
consents,
|
|
78
|
+
consentTypes,
|
|
79
|
+
includeNonDisplayedConsents,
|
|
80
|
+
} = get();
|
|
81
|
+
const newConsents = {
|
|
82
|
+
...consents,
|
|
83
|
+
};
|
|
84
|
+
if ('all' === type)
|
|
85
|
+
for (const consent of consentTypes) newConsents[consent.name] = true;
|
|
86
|
+
else if ('necessary' === type)
|
|
87
|
+
for (const consent of consentTypes)
|
|
88
|
+
newConsents[consent.name] = 'necessary' === consent.name;
|
|
89
|
+
const consentInfo = {
|
|
90
|
+
time: Date.now(),
|
|
91
|
+
type: type,
|
|
92
|
+
};
|
|
93
|
+
localStorage.setItem(
|
|
94
|
+
STORAGE_KEY,
|
|
95
|
+
JSON.stringify({
|
|
96
|
+
consents: newConsents,
|
|
97
|
+
consentInfo,
|
|
98
|
+
})
|
|
99
|
+
);
|
|
100
|
+
trackingBlocker?.updateConsents(newConsents);
|
|
101
|
+
set({
|
|
102
|
+
consents: newConsents,
|
|
103
|
+
showPopup: false,
|
|
104
|
+
consentInfo,
|
|
105
|
+
});
|
|
106
|
+
updateConsentMode();
|
|
107
|
+
callbacks.onConsentGiven?.();
|
|
108
|
+
callbacks.onPreferenceExpressed?.();
|
|
109
|
+
},
|
|
110
|
+
resetConsents: () => {
|
|
111
|
+
set((state) => {
|
|
112
|
+
const resetState = {
|
|
113
|
+
consents:
|
|
114
|
+
__WEBPACK_EXTERNAL_MODULE__types_index_js_63ede62f__.consentTypes.reduce(
|
|
115
|
+
(acc, consent) => {
|
|
116
|
+
acc[consent.name] = consent.defaultValue;
|
|
117
|
+
return acc;
|
|
118
|
+
},
|
|
119
|
+
{}
|
|
120
|
+
),
|
|
121
|
+
consentInfo: null,
|
|
122
|
+
};
|
|
123
|
+
localStorage.removeItem(STORAGE_KEY);
|
|
124
|
+
return resetState;
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
setGdprTypes: (types) =>
|
|
128
|
+
set({
|
|
129
|
+
gdprTypes: types,
|
|
130
|
+
}),
|
|
131
|
+
setComplianceSetting: (region, settings) =>
|
|
132
|
+
set((state) => ({
|
|
133
|
+
complianceSettings: {
|
|
134
|
+
...state.complianceSettings,
|
|
135
|
+
[region]: {
|
|
136
|
+
...state.complianceSettings[region],
|
|
137
|
+
...settings,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
})),
|
|
141
|
+
resetComplianceSettings: () =>
|
|
142
|
+
set({
|
|
143
|
+
complianceSettings:
|
|
144
|
+
__WEBPACK_EXTERNAL_MODULE__store_initial_state_js_e62f207b__
|
|
145
|
+
.initialState.complianceSettings,
|
|
146
|
+
}),
|
|
147
|
+
setCallback: (name, callback) =>
|
|
148
|
+
set((state) => ({
|
|
149
|
+
callbacks: {
|
|
150
|
+
...state.callbacks,
|
|
151
|
+
[name]: callback,
|
|
152
|
+
},
|
|
153
|
+
})),
|
|
154
|
+
setDetectedCountry: (country) =>
|
|
155
|
+
set({
|
|
156
|
+
detectedCountry: country,
|
|
157
|
+
}),
|
|
158
|
+
getDisplayedConsents: () => {
|
|
159
|
+
const { gdprTypes, consentTypes } = get();
|
|
160
|
+
return consentTypes.filter((consent) =>
|
|
161
|
+
gdprTypes.includes(consent.name)
|
|
162
|
+
);
|
|
163
|
+
},
|
|
164
|
+
hasConsented: () => {
|
|
165
|
+
const { consentInfo } = get();
|
|
166
|
+
return (0,
|
|
167
|
+
__WEBPACK_EXTERNAL_MODULE__libs_consent_utils_js_653d35fa__.hasConsented)(
|
|
168
|
+
consentInfo
|
|
169
|
+
);
|
|
170
|
+
},
|
|
171
|
+
clearAllData: () => {
|
|
172
|
+
set(
|
|
173
|
+
__WEBPACK_EXTERNAL_MODULE__store_initial_state_js_e62f207b__.initialState
|
|
174
|
+
);
|
|
175
|
+
localStorage.removeItem(STORAGE_KEY);
|
|
176
|
+
},
|
|
177
|
+
updateConsentMode: () => {
|
|
178
|
+
get().getEffectiveConsents();
|
|
179
|
+
},
|
|
180
|
+
setPrivacySettings: (settings) =>
|
|
181
|
+
set((state) => ({
|
|
182
|
+
privacySettings: {
|
|
183
|
+
...state.privacySettings,
|
|
184
|
+
...settings,
|
|
185
|
+
},
|
|
186
|
+
})),
|
|
187
|
+
getEffectiveConsents: () => {
|
|
188
|
+
const { consents, privacySettings } = get();
|
|
189
|
+
return (0,
|
|
190
|
+
__WEBPACK_EXTERNAL_MODULE__libs_consent_utils_js_653d35fa__.getEffectiveConsents)(
|
|
191
|
+
consents,
|
|
192
|
+
privacySettings.honorDoNotTrack
|
|
193
|
+
);
|
|
194
|
+
},
|
|
195
|
+
hasConsentFor: (consentType) => {
|
|
196
|
+
const { consents, privacySettings } = get();
|
|
197
|
+
return (0,
|
|
198
|
+
__WEBPACK_EXTERNAL_MODULE__libs_consent_utils_js_653d35fa__.hasConsentFor)(
|
|
199
|
+
consentType,
|
|
200
|
+
consents,
|
|
201
|
+
privacySettings.honorDoNotTrack
|
|
202
|
+
);
|
|
203
|
+
},
|
|
204
|
+
setIncludeNonDisplayedConsents: (include) =>
|
|
205
|
+
set({
|
|
206
|
+
includeNonDisplayedConsents: include,
|
|
207
|
+
}),
|
|
208
|
+
setTranslationConfig: (config) => {
|
|
209
|
+
set({
|
|
210
|
+
translationConfig: config,
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
})
|
|
214
|
+
);
|
|
215
|
+
if ('undefined' != typeof window) window[namespace] = store;
|
|
216
|
+
return store;
|
|
217
|
+
};
|
|
218
|
+
const store_rslib_entry_ = createConsentManagerStore;
|
|
219
|
+
export { createConsentManagerStore, store_rslib_entry_ as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(() => {
|
|
4
|
+
__webpack_require__.r = function (exports1) {
|
|
5
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag)
|
|
6
|
+
Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
7
|
+
value: 'Module',
|
|
8
|
+
});
|
|
9
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
10
|
+
value: true,
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __webpack_exports__ = {};
|
|
15
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16
|
+
var __webpack_export_target__ = exports;
|
|
17
|
+
for (var __webpack_i__ in __webpack_exports__)
|
|
18
|
+
__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
19
|
+
if (__webpack_exports__.__esModule)
|
|
20
|
+
Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
21
|
+
value: true,
|
|
22
|
+
});
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Defines the core types and interfaces for the consent management store.
|
|
4
|
+
*/
|
|
5
|
+
import type {
|
|
6
|
+
AllConsentNames,
|
|
7
|
+
CallbackFunction,
|
|
8
|
+
Callbacks,
|
|
9
|
+
ComplianceRegion,
|
|
10
|
+
ComplianceSettings,
|
|
11
|
+
ConsentState,
|
|
12
|
+
ConsentType,
|
|
13
|
+
PrivacySettings,
|
|
14
|
+
TranslationConfig,
|
|
15
|
+
consentTypes,
|
|
16
|
+
} from './types';
|
|
17
|
+
/**
|
|
18
|
+
* Core state and methods interface for the privacy consent management store.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* This interface defines the complete API surface of the consent manager, including:
|
|
22
|
+
* - State properties for tracking consent status
|
|
23
|
+
* - Methods for managing consent preferences
|
|
24
|
+
* - Compliance and privacy settings
|
|
25
|
+
* - Callback management
|
|
26
|
+
* - UI state control
|
|
27
|
+
*
|
|
28
|
+
* The store is typically created using {@link createConsentManagerStore} and
|
|
29
|
+
* accessed through React hooks or direct store subscription.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* Basic store usage:
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const store = createConsentManagerStore();
|
|
35
|
+
*
|
|
36
|
+
* // Check consent status
|
|
37
|
+
* if (store.getState().hasConsentFor('analytics')) {
|
|
38
|
+
* initializeAnalytics();
|
|
39
|
+
* }
|
|
40
|
+
*
|
|
41
|
+
* // Update consent preferences
|
|
42
|
+
* store.getState().saveConsents('all');
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export interface PrivacyConsentState {
|
|
48
|
+
/** Current consent states for all consent types */
|
|
49
|
+
consents: ConsentState;
|
|
50
|
+
/** Information about when and how consent was given */
|
|
51
|
+
consentInfo: {
|
|
52
|
+
time: number;
|
|
53
|
+
type: 'all' | 'custom' | 'necessary';
|
|
54
|
+
} | null;
|
|
55
|
+
/** Whether to show the consent popup */
|
|
56
|
+
showPopup: boolean;
|
|
57
|
+
/** Active GDPR consent types */
|
|
58
|
+
gdprTypes: AllConsentNames[];
|
|
59
|
+
/** Whether the privacy dialog is currently open */
|
|
60
|
+
isPrivacyDialogOpen: boolean;
|
|
61
|
+
/** Region-specific compliance settings */
|
|
62
|
+
complianceSettings: Record<ComplianceRegion, ComplianceSettings>;
|
|
63
|
+
/** Event callbacks for consent actions */
|
|
64
|
+
callbacks: Callbacks;
|
|
65
|
+
/** User's detected country code */
|
|
66
|
+
detectedCountry: string;
|
|
67
|
+
/** Privacy-related settings */
|
|
68
|
+
privacySettings: PrivacySettings;
|
|
69
|
+
/** Translation configuration */
|
|
70
|
+
translationConfig: TranslationConfig;
|
|
71
|
+
/**
|
|
72
|
+
* Updates the translation configuration.
|
|
73
|
+
* @param config - The new translation configuration
|
|
74
|
+
*/
|
|
75
|
+
setTranslationConfig: (config: TranslationConfig) => void;
|
|
76
|
+
/** Whether to include non-displayed consents in operations */
|
|
77
|
+
includeNonDisplayedConsents: boolean;
|
|
78
|
+
/** Available consent type configurations */
|
|
79
|
+
consentTypes: ConsentType[];
|
|
80
|
+
/**
|
|
81
|
+
* Updates the consent state for a specific consent type.
|
|
82
|
+
* @param name - The consent type to update
|
|
83
|
+
* @param value - The new consent value
|
|
84
|
+
*/
|
|
85
|
+
setConsent: (name: AllConsentNames, value: boolean) => void;
|
|
86
|
+
/**
|
|
87
|
+
* Controls the visibility of the consent popup.
|
|
88
|
+
* @param show - Whether to show the popup
|
|
89
|
+
*/
|
|
90
|
+
setShowPopup: (show: boolean) => void;
|
|
91
|
+
/**
|
|
92
|
+
* Controls the visibility of the privacy dialog.
|
|
93
|
+
* @param isOpen - Whether the dialog should be open
|
|
94
|
+
*/
|
|
95
|
+
setIsPrivacyDialogOpen: (isOpen: boolean) => void;
|
|
96
|
+
/**
|
|
97
|
+
* Saves the user's consent preferences.
|
|
98
|
+
* @param type - The type of consent being saved
|
|
99
|
+
*/
|
|
100
|
+
saveConsents: (type: 'all' | 'custom' | 'necessary') => void;
|
|
101
|
+
/** Resets all consent preferences to their default values */
|
|
102
|
+
resetConsents: () => void;
|
|
103
|
+
/**
|
|
104
|
+
* Updates the active GDPR consent types.
|
|
105
|
+
* @param types - Array of consent types to activate
|
|
106
|
+
*/
|
|
107
|
+
setGdprTypes: (types: AllConsentNames[]) => void;
|
|
108
|
+
/**
|
|
109
|
+
* Updates compliance settings for a specific region.
|
|
110
|
+
* @param region - The region to update
|
|
111
|
+
* @param settings - New compliance settings
|
|
112
|
+
*/
|
|
113
|
+
setComplianceSetting: (
|
|
114
|
+
region: ComplianceRegion,
|
|
115
|
+
settings: Partial<ComplianceSettings>
|
|
116
|
+
) => void;
|
|
117
|
+
/** Resets compliance settings to their default values */
|
|
118
|
+
resetComplianceSettings: () => void;
|
|
119
|
+
/**
|
|
120
|
+
* Sets a callback for a specific consent event.
|
|
121
|
+
* @param name - The callback event name
|
|
122
|
+
* @param callback - The callback function
|
|
123
|
+
*/
|
|
124
|
+
setCallback: (
|
|
125
|
+
name: keyof Callbacks,
|
|
126
|
+
callback: CallbackFunction | undefined
|
|
127
|
+
) => void;
|
|
128
|
+
/**
|
|
129
|
+
* Updates the user's detected country.
|
|
130
|
+
* @param country - The country code
|
|
131
|
+
*/
|
|
132
|
+
setDetectedCountry: (country: string) => void;
|
|
133
|
+
/** Retrieves the list of consent types that should be displayed */
|
|
134
|
+
getDisplayedConsents: () => typeof consentTypes;
|
|
135
|
+
/** Checks if the user has provided any form of consent */
|
|
136
|
+
hasConsented: () => boolean;
|
|
137
|
+
/** Clears all consent data and resets to initial state */
|
|
138
|
+
clearAllData: () => void;
|
|
139
|
+
/** Updates the consent mode in external systems (e.g., analytics) */
|
|
140
|
+
updateConsentMode: () => void;
|
|
141
|
+
/**
|
|
142
|
+
* Updates privacy-related settings.
|
|
143
|
+
* @param settings - New privacy settings
|
|
144
|
+
*/
|
|
145
|
+
setPrivacySettings: (settings: Partial<PrivacySettings>) => void;
|
|
146
|
+
/** Gets the effective consent states after applying privacy settings */
|
|
147
|
+
getEffectiveConsents: () => ConsentState;
|
|
148
|
+
/**
|
|
149
|
+
* Checks if consent has been given for a specific type.
|
|
150
|
+
* @param consentType - The consent type to check
|
|
151
|
+
*/
|
|
152
|
+
hasConsentFor: (consentType: AllConsentNames) => boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Controls whether non-displayed consents should be included.
|
|
155
|
+
* @param include - Whether to include non-displayed consents
|
|
156
|
+
*/
|
|
157
|
+
setIncludeNonDisplayedConsents: (include: boolean) => void;
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=store.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.type.d.ts","sourceRoot":"","sources":["../src/store.type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,mBAAmB;IACnC,mDAAmD;IACnD,QAAQ,EAAE,YAAY,CAAC;IAEvB,uDAAuD;IACvD,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAA;KAAE,GAAG,IAAI,CAAC;IAE3E,wCAAwC;IACxC,SAAS,EAAE,OAAO,CAAC;IAEnB,gCAAgC;IAChC,SAAS,EAAE,eAAe,EAAE,CAAC;IAE7B,mDAAmD;IACnD,mBAAmB,EAAE,OAAO,CAAC;IAE7B,0CAA0C;IAC1C,kBAAkB,EAAE,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;IAEjE,0CAA0C;IAC1C,SAAS,EAAE,SAAS,CAAC;IAErB,mCAAmC;IACnC,eAAe,EAAE,MAAM,CAAC;IAExB,+BAA+B;IAC/B,eAAe,EAAE,eAAe,CAAC;IAEjC,gCAAgC;IAChC,iBAAiB,EAAE,iBAAiB,CAAC;IAErC;;;OAGG;IACH,oBAAoB,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAE1D,8DAA8D;IAC9D,2BAA2B,EAAE,OAAO,CAAC;IAErC,4CAA4C;IAC5C,YAAY,EAAE,WAAW,EAAE,CAAC;IAE5B;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5D;;;OAGG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEtC;;;OAGG;IACH,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAElD;;;OAGG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,WAAW,KAAK,IAAI,CAAC;IAE7D,6DAA6D;IAC7D,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B;;;OAGG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IAEjD;;;;OAIG;IACH,oBAAoB,EAAE,CACrB,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC,KACjC,IAAI,CAAC;IAEV,yDAAyD;IACzD,uBAAuB,EAAE,MAAM,IAAI,CAAC;IAEpC;;;;OAIG;IACH,WAAW,EAAE,CACZ,IAAI,EAAE,MAAM,SAAS,EACrB,QAAQ,EAAE,gBAAgB,GAAG,SAAS,KAClC,IAAI,CAAC;IAEV;;;OAGG;IACH,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAE9C,mEAAmE;IACnE,oBAAoB,EAAE,MAAM,OAAO,YAAY,CAAC;IAEhD,0DAA0D;IAC1D,YAAY,EAAE,MAAM,OAAO,CAAC;IAE5B,0DAA0D;IAC1D,YAAY,EAAE,MAAM,IAAI,CAAC;IAEzB,qEAAqE;IACrE,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAE9B;;;OAGG;IACH,kBAAkB,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAEjE,wEAAwE;IACxE,oBAAoB,EAAE,MAAM,YAAY,CAAC;IAEzC;;;OAGG;IACH,aAAa,EAAE,CAAC,WAAW,EAAE,eAAe,KAAK,OAAO,CAAC;IAEzD;;;OAGG;IACH,8BAA8B,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3D"}
|
|
File without changes
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(() => {
|
|
4
|
+
__webpack_require__.d = function (exports1, definition) {
|
|
5
|
+
for (var key in definition)
|
|
6
|
+
if (
|
|
7
|
+
__webpack_require__.o(definition, key) &&
|
|
8
|
+
!__webpack_require__.o(exports1, key)
|
|
9
|
+
)
|
|
10
|
+
Object.defineProperty(exports1, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: definition[key],
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(() => {
|
|
17
|
+
__webpack_require__.o = function (obj, prop) {
|
|
18
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
19
|
+
};
|
|
20
|
+
})();
|
|
21
|
+
(() => {
|
|
22
|
+
__webpack_require__.r = function (exports1) {
|
|
23
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag)
|
|
24
|
+
Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
25
|
+
value: 'Module',
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
28
|
+
value: true,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
})();
|
|
32
|
+
var __webpack_exports__ = {};
|
|
33
|
+
__webpack_require__.r(__webpack_exports__);
|
|
34
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
35
|
+
enTranslations: () => enTranslations,
|
|
36
|
+
});
|
|
37
|
+
const enTranslations = {
|
|
38
|
+
cookieBanner: {
|
|
39
|
+
title: 'We value your privacy',
|
|
40
|
+
description:
|
|
41
|
+
'This site uses cookies to improve your browsing experience, analyze site traffic, and show personalized content.',
|
|
42
|
+
acceptAll: 'Accept All',
|
|
43
|
+
rejectAll: 'Reject All',
|
|
44
|
+
customize: 'Customize',
|
|
45
|
+
},
|
|
46
|
+
consentManagerDialog: {
|
|
47
|
+
title: 'Privacy Settings',
|
|
48
|
+
description:
|
|
49
|
+
'Customize your privacy settings here. You can choose which types of cookies and tracking technologies you allow.',
|
|
50
|
+
save: 'Save Settings',
|
|
51
|
+
acceptAll: 'Accept All',
|
|
52
|
+
rejectAll: 'Reject All',
|
|
53
|
+
close: 'Close',
|
|
54
|
+
},
|
|
55
|
+
consentManagerWidget: {
|
|
56
|
+
title: 'Privacy Preferences',
|
|
57
|
+
description: 'Manage your privacy settings',
|
|
58
|
+
save: 'Save Settings',
|
|
59
|
+
acceptAll: 'Accept All',
|
|
60
|
+
rejectAll: 'Reject All',
|
|
61
|
+
},
|
|
62
|
+
consentTypes: {
|
|
63
|
+
necessary: {
|
|
64
|
+
title: 'Strictly Necessary',
|
|
65
|
+
description:
|
|
66
|
+
'These cookies are essential for the website to function properly and cannot be disabled.',
|
|
67
|
+
},
|
|
68
|
+
functionality: {
|
|
69
|
+
title: 'Functionality',
|
|
70
|
+
description:
|
|
71
|
+
'These cookies enable enhanced functionality and personalization of the website.',
|
|
72
|
+
},
|
|
73
|
+
marketing: {
|
|
74
|
+
title: 'Marketing',
|
|
75
|
+
description:
|
|
76
|
+
'These cookies are used to deliver relevant advertisements and track their effectiveness.',
|
|
77
|
+
},
|
|
78
|
+
measurement: {
|
|
79
|
+
title: 'Analytics',
|
|
80
|
+
description:
|
|
81
|
+
'These cookies help us understand how visitors interact with the website and improve its performance.',
|
|
82
|
+
},
|
|
83
|
+
experience: {
|
|
84
|
+
title: 'Experience',
|
|
85
|
+
description:
|
|
86
|
+
'These cookies help us provide a better user experience and test new features.',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
var __webpack_export_target__ = exports;
|
|
91
|
+
for (var __webpack_i__ in __webpack_exports__)
|
|
92
|
+
__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
93
|
+
if (__webpack_exports__.__esModule)
|
|
94
|
+
Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
95
|
+
value: true,
|
|
96
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/translations/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,eAAO,MAAM,cAAc,EAAE,oBAoD5B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const enTranslations = {
|
|
2
|
+
cookieBanner: {
|
|
3
|
+
title: 'We value your privacy',
|
|
4
|
+
description:
|
|
5
|
+
'This site uses cookies to improve your browsing experience, analyze site traffic, and show personalized content.',
|
|
6
|
+
acceptAll: 'Accept All',
|
|
7
|
+
rejectAll: 'Reject All',
|
|
8
|
+
customize: 'Customize',
|
|
9
|
+
},
|
|
10
|
+
consentManagerDialog: {
|
|
11
|
+
title: 'Privacy Settings',
|
|
12
|
+
description:
|
|
13
|
+
'Customize your privacy settings here. You can choose which types of cookies and tracking technologies you allow.',
|
|
14
|
+
save: 'Save Settings',
|
|
15
|
+
acceptAll: 'Accept All',
|
|
16
|
+
rejectAll: 'Reject All',
|
|
17
|
+
close: 'Close',
|
|
18
|
+
},
|
|
19
|
+
consentManagerWidget: {
|
|
20
|
+
title: 'Privacy Preferences',
|
|
21
|
+
description: 'Manage your privacy settings',
|
|
22
|
+
save: 'Save Settings',
|
|
23
|
+
acceptAll: 'Accept All',
|
|
24
|
+
rejectAll: 'Reject All',
|
|
25
|
+
},
|
|
26
|
+
consentTypes: {
|
|
27
|
+
necessary: {
|
|
28
|
+
title: 'Strictly Necessary',
|
|
29
|
+
description:
|
|
30
|
+
'These cookies are essential for the website to function properly and cannot be disabled.',
|
|
31
|
+
},
|
|
32
|
+
functionality: {
|
|
33
|
+
title: 'Functionality',
|
|
34
|
+
description:
|
|
35
|
+
'These cookies enable enhanced functionality and personalization of the website.',
|
|
36
|
+
},
|
|
37
|
+
marketing: {
|
|
38
|
+
title: 'Marketing',
|
|
39
|
+
description:
|
|
40
|
+
'These cookies are used to deliver relevant advertisements and track their effectiveness.',
|
|
41
|
+
},
|
|
42
|
+
measurement: {
|
|
43
|
+
title: 'Analytics',
|
|
44
|
+
description:
|
|
45
|
+
'These cookies help us understand how visitors interact with the website and improve its performance.',
|
|
46
|
+
},
|
|
47
|
+
experience: {
|
|
48
|
+
title: 'Experience',
|
|
49
|
+
description:
|
|
50
|
+
'These cookies help us provide a better user experience and test new features.',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
export { enTranslations };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(() => {
|
|
4
|
+
__webpack_require__.d = function (exports1, definition) {
|
|
5
|
+
for (var key in definition)
|
|
6
|
+
if (
|
|
7
|
+
__webpack_require__.o(definition, key) &&
|
|
8
|
+
!__webpack_require__.o(exports1, key)
|
|
9
|
+
)
|
|
10
|
+
Object.defineProperty(exports1, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: definition[key],
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(() => {
|
|
17
|
+
__webpack_require__.o = function (obj, prop) {
|
|
18
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
19
|
+
};
|
|
20
|
+
})();
|
|
21
|
+
(() => {
|
|
22
|
+
__webpack_require__.r = function (exports1) {
|
|
23
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag)
|
|
24
|
+
Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
25
|
+
value: 'Module',
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
28
|
+
value: true,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
})();
|
|
32
|
+
var __webpack_exports__ = {};
|
|
33
|
+
__webpack_require__.r(__webpack_exports__);
|
|
34
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
35
|
+
defaultTranslationConfig: () => defaultTranslationConfig,
|
|
36
|
+
});
|
|
37
|
+
const external_en_cjs_namespaceObject = require('./en.cjs');
|
|
38
|
+
const defaultTranslationConfig = {
|
|
39
|
+
translations: {
|
|
40
|
+
en: external_en_cjs_namespaceObject.enTranslations,
|
|
41
|
+
},
|
|
42
|
+
defaultLanguage: 'en',
|
|
43
|
+
disableAutoLanguageSwitch: false,
|
|
44
|
+
};
|
|
45
|
+
var __webpack_export_target__ = exports;
|
|
46
|
+
for (var __webpack_i__ in __webpack_exports__)
|
|
47
|
+
__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
48
|
+
if (__webpack_exports__.__esModule)
|
|
49
|
+
Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
50
|
+
value: true,
|
|
51
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/translations/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG/D,eAAO,MAAM,wBAAwB,EAAE,iBAMtC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__en_js_1898771b__ from './en.js';
|
|
2
|
+
const defaultTranslationConfig = {
|
|
3
|
+
translations: {
|
|
4
|
+
en: __WEBPACK_EXTERNAL_MODULE__en_js_1898771b__.enTranslations,
|
|
5
|
+
},
|
|
6
|
+
defaultLanguage: 'en',
|
|
7
|
+
disableAutoLanguageSwitch: false,
|
|
8
|
+
};
|
|
9
|
+
export { defaultTranslationConfig };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(() => {
|
|
4
|
+
__webpack_require__.r = function (exports1) {
|
|
5
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag)
|
|
6
|
+
Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
7
|
+
value: 'Module',
|
|
8
|
+
});
|
|
9
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
10
|
+
value: true,
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __webpack_exports__ = {};
|
|
15
|
+
__webpack_require__.r(__webpack_exports__);
|
|
16
|
+
var __webpack_export_target__ = exports;
|
|
17
|
+
for (var __webpack_i__ in __webpack_exports__)
|
|
18
|
+
__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
19
|
+
if (__webpack_exports__.__esModule)
|
|
20
|
+
Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
21
|
+
value: true,
|
|
22
|
+
});
|