@monterosa/sdk-consent-kit 2.0.0-rc.2 → 2.0.0-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/dist/index.cjs +403 -0
- package/dist/index.cjs.map +1 -0
- package/package.json +7 -6
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var sdkLauncherKit = require('@monterosa/sdk-launcher-kit');
|
|
6
|
+
var sdkUtil = require('@monterosa/sdk-util');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* @monterosa/sdk-consent-kit
|
|
11
|
+
*
|
|
12
|
+
* Copyright © 2026 Monterosa Productions Limited. All rights reserved.
|
|
13
|
+
*
|
|
14
|
+
* More details on the license can be found at https://www.monterosa.co/sdk/license
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Actions used for parent-child bridge communication.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
var ConsentAction;
|
|
22
|
+
(function (ConsentAction) {
|
|
23
|
+
/**
|
|
24
|
+
* Sent when consent state is updated.
|
|
25
|
+
*/
|
|
26
|
+
ConsentAction["OnConsentUpdated"] = "consentOnConsentUpdated";
|
|
27
|
+
/**
|
|
28
|
+
* Request to set consent state from child to parent.
|
|
29
|
+
*/
|
|
30
|
+
ConsentAction["SetConsent"] = "consentSetConsent";
|
|
31
|
+
})(ConsentAction || (ConsentAction = {}));
|
|
32
|
+
/**
|
|
33
|
+
* Internal event names for the consent emitter.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
var ConsentEvent;
|
|
38
|
+
(function (ConsentEvent) {
|
|
39
|
+
/**
|
|
40
|
+
* Emitted when consent state changes.
|
|
41
|
+
*/
|
|
42
|
+
ConsentEvent["ConsentChanged"] = "consent_changed";
|
|
43
|
+
})(ConsentEvent || (ConsentEvent = {}));
|
|
44
|
+
/**
|
|
45
|
+
* Defines error codes that may be encountered when using the Consent kit.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* try {
|
|
50
|
+
* setConsentState({ necessary: false });
|
|
51
|
+
* } catch (err) {
|
|
52
|
+
* if (err.code === ConsentError.NecessaryCategoryRequired) {
|
|
53
|
+
* // handle necessary category error
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
exports.ConsentError = void 0;
|
|
59
|
+
(function (ConsentError) {
|
|
60
|
+
/**
|
|
61
|
+
* Indicates that the 'necessary' category cannot be set to false.
|
|
62
|
+
*/
|
|
63
|
+
ConsentError["NecessaryCategoryRequired"] = "necessary_category_required";
|
|
64
|
+
/**
|
|
65
|
+
* Indicates that consent cannot be set from a child experience.
|
|
66
|
+
*/
|
|
67
|
+
ConsentError["CannotSetFromChild"] = "cannot_set_from_child";
|
|
68
|
+
})(exports.ConsentError || (exports.ConsentError = {}));
|
|
69
|
+
/**
|
|
70
|
+
* Error messages for consent errors.
|
|
71
|
+
*
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
const ConsentErrorMessages = {
|
|
75
|
+
[exports.ConsentError.NecessaryCategoryRequired]: () => "Cannot set 'necessary' category to false. Strictly necessary functionality cannot be disabled.",
|
|
76
|
+
[exports.ConsentError.CannotSetFromChild]: () => 'Cannot set consent state from embedded experience. Consent is managed by the parent application.',
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @license
|
|
81
|
+
* @monterosa/sdk-consent-kit
|
|
82
|
+
*
|
|
83
|
+
* Copyright © 2026 Monterosa Productions Limited. All rights reserved.
|
|
84
|
+
*
|
|
85
|
+
* More details on the license can be found at https://www.monterosa.co/sdk/license
|
|
86
|
+
*/
|
|
87
|
+
/**
|
|
88
|
+
* Internal Consent class that manages consent state.
|
|
89
|
+
*
|
|
90
|
+
* @internal
|
|
91
|
+
*/
|
|
92
|
+
class Consent extends sdkUtil.Emitter {
|
|
93
|
+
/**
|
|
94
|
+
* The current consent state.
|
|
95
|
+
* Setting this value will automatically emit ConsentChanged event if the state
|
|
96
|
+
* actually changed.
|
|
97
|
+
*/
|
|
98
|
+
get state() {
|
|
99
|
+
return this._state;
|
|
100
|
+
}
|
|
101
|
+
set state(value) {
|
|
102
|
+
const previousState = this._state;
|
|
103
|
+
this._state = value;
|
|
104
|
+
// Only emit if state changed to a non-null value
|
|
105
|
+
if (value !== null && !Consent.isConsentStateEqual(previousState, value)) {
|
|
106
|
+
this.emit(ConsentEvent.ConsentChanged, value);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Whether consent mode is active.
|
|
111
|
+
* Returns true when state has been set.
|
|
112
|
+
*/
|
|
113
|
+
get isActive() {
|
|
114
|
+
return this._state !== null;
|
|
115
|
+
}
|
|
116
|
+
constructor() {
|
|
117
|
+
super();
|
|
118
|
+
this._state = null;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Compare two consent states for equality.
|
|
122
|
+
*
|
|
123
|
+
* @param a - First consent state (or null)
|
|
124
|
+
* @param b - Second consent state (or null)
|
|
125
|
+
* @returns Whether the states are equal
|
|
126
|
+
*/
|
|
127
|
+
static isConsentStateEqual(a, b) {
|
|
128
|
+
if (a === null && b === null)
|
|
129
|
+
return true;
|
|
130
|
+
if (a === null || b === null)
|
|
131
|
+
return false;
|
|
132
|
+
const keysA = Object.keys(a);
|
|
133
|
+
const keysB = Object.keys(b);
|
|
134
|
+
if (keysA.length !== keysB.length)
|
|
135
|
+
return false;
|
|
136
|
+
const aRecord = a;
|
|
137
|
+
const bRecord = b;
|
|
138
|
+
return keysA.every((key) => aRecord[key] === bRecord[key]);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Get the singleton instance of the Consent class.
|
|
142
|
+
*
|
|
143
|
+
* @returns The Consent singleton instance.
|
|
144
|
+
*/
|
|
145
|
+
static getInstance() {
|
|
146
|
+
if (!Consent.instance) {
|
|
147
|
+
Consent.instance = new Consent();
|
|
148
|
+
}
|
|
149
|
+
return Consent.instance;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* @license
|
|
155
|
+
* @monterosa/sdk-consent-kit
|
|
156
|
+
*
|
|
157
|
+
* Copyright © 2026 Monterosa Productions Limited. All rights reserved.
|
|
158
|
+
*
|
|
159
|
+
* More details on the license can be found at https://www.monterosa.co/sdk/license
|
|
160
|
+
*/
|
|
161
|
+
const consentHooks = [];
|
|
162
|
+
let hooksRegistered = false;
|
|
163
|
+
/**
|
|
164
|
+
* Get the consent kit instance.
|
|
165
|
+
*
|
|
166
|
+
* @returns The consent kit instance.
|
|
167
|
+
*
|
|
168
|
+
* @internal
|
|
169
|
+
*/
|
|
170
|
+
function getConsent() {
|
|
171
|
+
const consent = Consent.getInstance();
|
|
172
|
+
if (!hooksRegistered) {
|
|
173
|
+
// Register hooks only once
|
|
174
|
+
for (const hook of consentHooks) {
|
|
175
|
+
hook(consent);
|
|
176
|
+
}
|
|
177
|
+
hooksRegistered = true;
|
|
178
|
+
}
|
|
179
|
+
return consent;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Register a hook that will be called when consent is initialised.
|
|
183
|
+
*
|
|
184
|
+
* @param hook - The hook function to register.
|
|
185
|
+
*
|
|
186
|
+
* @internal
|
|
187
|
+
*/
|
|
188
|
+
function registerConsentHook(hook) {
|
|
189
|
+
consentHooks.push(hook);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Set the consent state.
|
|
193
|
+
*
|
|
194
|
+
* @remarks
|
|
195
|
+
* - The 'necessary' category cannot be set to false
|
|
196
|
+
* - Cannot be called from a child experience (use parent application instead)
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* setConsentState({
|
|
201
|
+
* necessary: true,
|
|
202
|
+
* analytics: true,
|
|
203
|
+
* marketing: false,
|
|
204
|
+
* functional: true,
|
|
205
|
+
* });
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* @param state - The consent state to set
|
|
209
|
+
* @throws {MonterosaError} If called from a child experience
|
|
210
|
+
* @throws {MonterosaError} If 'necessary' category is set to false
|
|
211
|
+
*/
|
|
212
|
+
function setConsentState(state) {
|
|
213
|
+
const parentApp = sdkLauncherKit.getParentApplication();
|
|
214
|
+
// Cannot set consent from a child experience
|
|
215
|
+
if (parentApp !== null) {
|
|
216
|
+
throw new sdkUtil.MonterosaError(exports.ConsentError.CannotSetFromChild, ConsentErrorMessages[exports.ConsentError.CannotSetFromChild]());
|
|
217
|
+
}
|
|
218
|
+
// Necessary category cannot be false
|
|
219
|
+
if ('necessary' in state && state.necessary === false) {
|
|
220
|
+
throw new sdkUtil.MonterosaError(exports.ConsentError.NecessaryCategoryRequired, ConsentErrorMessages[exports.ConsentError.NecessaryCategoryRequired]());
|
|
221
|
+
}
|
|
222
|
+
const consent = getConsent();
|
|
223
|
+
consent.state = state;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Get the current consent state.
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```typescript
|
|
230
|
+
* const state = getConsentState();
|
|
231
|
+
* if (state.analytics) {
|
|
232
|
+
* // Analytics consent granted
|
|
233
|
+
* }
|
|
234
|
+
* ```
|
|
235
|
+
*
|
|
236
|
+
* @returns The current consent state, or empty object if consent mode not active
|
|
237
|
+
*/
|
|
238
|
+
function getConsentState() {
|
|
239
|
+
var _a;
|
|
240
|
+
return ((_a = getConsent().state) !== null && _a !== void 0 ? _a : {});
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Check if consent is granted for a specific category.
|
|
244
|
+
*
|
|
245
|
+
* @remarks
|
|
246
|
+
* - The 'necessary' category always returns true
|
|
247
|
+
* - Returns true if consent mode is not active (backwards compatibility)
|
|
248
|
+
* - Returns false for missing keys when consent mode is active (GDPR strict opt-in)
|
|
249
|
+
* - Returns the boolean value if the category exists in consent state
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```typescript
|
|
253
|
+
* if (hasConsent('analytics')) {
|
|
254
|
+
* // Track analytics event
|
|
255
|
+
* }
|
|
256
|
+
* ```
|
|
257
|
+
*
|
|
258
|
+
* @param category - The consent category to check
|
|
259
|
+
* @returns Whether consent is granted for the category
|
|
260
|
+
*/
|
|
261
|
+
function hasConsent(category) {
|
|
262
|
+
var _a;
|
|
263
|
+
// 'necessary' always returns true
|
|
264
|
+
if (category === 'necessary') {
|
|
265
|
+
return true;
|
|
266
|
+
}
|
|
267
|
+
const consent = getConsent();
|
|
268
|
+
// If consent mode not active, allow everything (backwards compatibility)
|
|
269
|
+
if (!consent.isActive) {
|
|
270
|
+
return true;
|
|
271
|
+
}
|
|
272
|
+
// GDPR strict opt-in: missing keys default to false
|
|
273
|
+
return (((_a = consent.state) === null || _a === void 0 ? void 0 : _a[category]) === true);
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Subscribe to consent state changes.
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* ```typescript
|
|
280
|
+
* const unsubscribe = onConsentChanged((state) => {
|
|
281
|
+
* console.log('Consent changed:', state);
|
|
282
|
+
* });
|
|
283
|
+
*
|
|
284
|
+
* // Later, to stop listening:
|
|
285
|
+
* unsubscribe();
|
|
286
|
+
* ```
|
|
287
|
+
*
|
|
288
|
+
* @param callback - The callback to call when consent state changes
|
|
289
|
+
* @returns A function to unsubscribe from the event
|
|
290
|
+
*/
|
|
291
|
+
function onConsentChanged(callback) {
|
|
292
|
+
const consent = getConsent();
|
|
293
|
+
return consent.on(ConsentEvent.ConsentChanged, callback);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Update consent state from parent (used internally by bridge).
|
|
297
|
+
*
|
|
298
|
+
* @param state - The consent state received from parent
|
|
299
|
+
*
|
|
300
|
+
* @internal
|
|
301
|
+
*/
|
|
302
|
+
function updateConsentFromParent(state) {
|
|
303
|
+
const consent = getConsent();
|
|
304
|
+
consent.state = state;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* @license
|
|
309
|
+
* @monterosa/sdk-consent-kit
|
|
310
|
+
*
|
|
311
|
+
* Copyright © 2026 Monterosa Productions Limited. All rights reserved.
|
|
312
|
+
*
|
|
313
|
+
* More details on the license can be found at https://www.monterosa.co/sdk/license
|
|
314
|
+
*/
|
|
315
|
+
const experienceUnsubs = new Map();
|
|
316
|
+
/**
|
|
317
|
+
* Handle when an experience is embedded.
|
|
318
|
+
* Sends current consent state to the child (queued by the bridge until
|
|
319
|
+
* the experience is initialised) and subscribes to consent changes.
|
|
320
|
+
*
|
|
321
|
+
* @param experience - The embedded experience
|
|
322
|
+
*
|
|
323
|
+
* @internal
|
|
324
|
+
*/
|
|
325
|
+
function handleExperienceEmbedded(experience) {
|
|
326
|
+
const consent = getConsent();
|
|
327
|
+
// Send current consent state if active.
|
|
328
|
+
// The bridge queues this message until the experience is initialised.
|
|
329
|
+
if (consent.isActive) {
|
|
330
|
+
sdkLauncherKit.sendSdkMessage(experience, ConsentAction.OnConsentUpdated, {
|
|
331
|
+
state: consent.state,
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
// Subscribe to consent changes and push to child
|
|
335
|
+
const consentChangedUnsub = onConsentChanged((state) => {
|
|
336
|
+
sdkLauncherKit.sendSdkMessage(experience, ConsentAction.OnConsentUpdated, {
|
|
337
|
+
state,
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
experienceUnsubs.set(experience.id, [consentChangedUnsub]);
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Handle when an experience is unmounted.
|
|
344
|
+
* Cleans up subscriptions for the experience.
|
|
345
|
+
*
|
|
346
|
+
* @param experience - The unmounted experience
|
|
347
|
+
*
|
|
348
|
+
* @internal
|
|
349
|
+
*/
|
|
350
|
+
function handleExperienceUnmounted(experience) {
|
|
351
|
+
const unsubs = experienceUnsubs.get(experience.id);
|
|
352
|
+
if (unsubs) {
|
|
353
|
+
for (const unsub of unsubs) {
|
|
354
|
+
unsub();
|
|
355
|
+
}
|
|
356
|
+
experienceUnsubs.delete(experience.id);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Hook to listen for consent messages from parent application.
|
|
361
|
+
* This is called when consent-kit is initialised in a child Experience.
|
|
362
|
+
*
|
|
363
|
+
* @param consent - The consent kit instance
|
|
364
|
+
* @returns Unsubscribe function
|
|
365
|
+
*
|
|
366
|
+
* @internal
|
|
367
|
+
*/
|
|
368
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
369
|
+
function parentMessagesHook(consent) {
|
|
370
|
+
const parentApp = sdkLauncherKit.getParentApplication();
|
|
371
|
+
if (parentApp === null) {
|
|
372
|
+
return () => { };
|
|
373
|
+
}
|
|
374
|
+
return sdkLauncherKit.onSdkMessage(parentApp, (message) => {
|
|
375
|
+
if (message.action === ConsentAction.OnConsentUpdated) {
|
|
376
|
+
const { state } = message.payload;
|
|
377
|
+
updateConsentFromParent(state);
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Manages user consent state between the parent page and embedded Experiences.
|
|
384
|
+
*
|
|
385
|
+
* @packageDocumentation
|
|
386
|
+
*/
|
|
387
|
+
// Register bridge handlers for parent-child communication
|
|
388
|
+
sdkLauncherKit.onStateChanged((experience, state) => {
|
|
389
|
+
if (state === 'mounted') {
|
|
390
|
+
handleExperienceEmbedded(experience);
|
|
391
|
+
}
|
|
392
|
+
else if (state === 'unmounted') {
|
|
393
|
+
handleExperienceUnmounted(experience);
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
// Register hook for child experiences to receive consent from parent
|
|
397
|
+
registerConsentHook(parentMessagesHook);
|
|
398
|
+
|
|
399
|
+
exports.getConsentState = getConsentState;
|
|
400
|
+
exports.hasConsent = hasConsent;
|
|
401
|
+
exports.onConsentChanged = onConsentChanged;
|
|
402
|
+
exports.setConsentState = setConsentState;
|
|
403
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/types.ts","../src/consent.ts","../src/api.ts","../src/bridge.ts","../src/index.ts"],"sourcesContent":["/**\n * @license\n * @monterosa/sdk-consent-kit\n *\n * Copyright © 2026 Monterosa Productions Limited. All rights reserved.\n *\n * More details on the license can be found at https://www.monterosa.co/sdk/license\n */\n\nimport { Emitter, Unsubscribe } from '@monterosa/sdk-util';\n\n/**\n * Default consent categories commonly used for GDPR/privacy compliance.\n *\n * @remarks\n * - `necessary` - Essential cookies/tracking required for the site to function\n * - `analytics` - Analytics and performance tracking\n * - `marketing` - Marketing and advertising tracking\n * - `functional` - User preference and personalization tracking\n */\nexport type DefaultCategory =\n | 'necessary'\n | 'analytics'\n | 'marketing'\n | 'functional';\n\n/**\n * Represents the consent state for each category.\n * Maps category names to boolean values indicating whether consent is granted.\n *\n * @typeParam T - The type of category keys, defaults to DefaultCategory\n *\n * @example\n * ```typescript\n * const state: ConsentState = {\n * necessary: true,\n * analytics: false,\n * marketing: false,\n * preferences: true,\n * };\n * ```\n */\nexport type ConsentState<T extends string = DefaultCategory> = {\n [K in T]?: boolean;\n};\n\n/**\n * Actions used for parent-child bridge communication.\n *\n * @internal\n */\nexport enum ConsentAction {\n /**\n * Sent when consent state is updated.\n */\n OnConsentUpdated = 'consentOnConsentUpdated',\n /**\n * Request to set consent state from child to parent.\n */\n SetConsent = 'consentSetConsent',\n}\n\n/**\n * Internal event names for the consent emitter.\n *\n * @internal\n */\nexport enum ConsentEvent {\n /**\n * Emitted when consent state changes.\n */\n ConsentChanged = 'consent_changed',\n}\n\n/**\n * Defines error codes that may be encountered when using the Consent kit.\n *\n * @example\n * ```typescript\n * try {\n * setConsentState({ necessary: false });\n * } catch (err) {\n * if (err.code === ConsentError.NecessaryCategoryRequired) {\n * // handle necessary category error\n * }\n * }\n * ```\n */\nexport enum ConsentError {\n /**\n * Indicates that the 'necessary' category cannot be set to false.\n */\n NecessaryCategoryRequired = 'necessary_category_required',\n /**\n * Indicates that consent cannot be set from a child experience.\n */\n CannotSetFromChild = 'cannot_set_from_child',\n}\n\n/**\n * Error messages for consent errors.\n *\n * @internal\n */\nexport const ConsentErrorMessages = {\n [ConsentError.NecessaryCategoryRequired]: () =>\n \"Cannot set 'necessary' category to false. Strictly necessary functionality cannot be disabled.\",\n [ConsentError.CannotSetFromChild]: () =>\n 'Cannot set consent state from embedded experience. Consent is managed by the parent application.',\n};\n\n/**\n * Hook function type for registering consent hooks.\n *\n * @internal\n */\nexport type ConsentHook = (consent: ConsentKit) => Unsubscribe;\n\n/**\n * The ConsentKit interface provides properties and methods\n * for managing user consent state.\n *\n * @internal\n */\nexport interface ConsentKit extends Emitter {\n /**\n * Whether consent mode is active.\n * Returns true when state has been set.\n */\n readonly isActive: boolean;\n /**\n * The current consent state.\n */\n state: ConsentState | null;\n}\n","/**\n * @license\n * @monterosa/sdk-consent-kit\n *\n * Copyright © 2026 Monterosa Productions Limited. All rights reserved.\n *\n * More details on the license can be found at https://www.monterosa.co/sdk/license\n */\n\nimport { Emitter } from '@monterosa/sdk-util';\n\nimport { ConsentKit, ConsentState, ConsentEvent } from './types';\n\n/**\n * Internal Consent class that manages consent state.\n *\n * @internal\n */\nexport class Consent extends Emitter implements ConsentKit {\n private static instance: Consent;\n\n private _state: ConsentState | null = null;\n\n /**\n * The current consent state.\n * Setting this value will automatically emit ConsentChanged event if the state\n * actually changed.\n */\n get state(): ConsentState | null {\n return this._state;\n }\n\n set state(value: ConsentState | null) {\n const previousState = this._state;\n this._state = value;\n\n // Only emit if state changed to a non-null value\n if (value !== null && !Consent.isConsentStateEqual(previousState, value)) {\n this.emit(ConsentEvent.ConsentChanged, value);\n }\n }\n\n /**\n * Whether consent mode is active.\n * Returns true when state has been set.\n */\n get isActive(): boolean {\n return this._state !== null;\n }\n\n private constructor() {\n super();\n }\n\n /**\n * Compare two consent states for equality.\n *\n * @param a - First consent state (or null)\n * @param b - Second consent state (or null)\n * @returns Whether the states are equal\n */\n private static isConsentStateEqual<T extends string = string>(\n a: ConsentState<T> | null,\n b: ConsentState<T> | null,\n ): boolean {\n if (a === null && b === null) return true;\n if (a === null || b === null) return false;\n\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n\n if (keysA.length !== keysB.length) return false;\n\n const aRecord = a as Record<string, boolean | undefined>;\n const bRecord = b as Record<string, boolean | undefined>;\n\n return keysA.every((key) => aRecord[key] === bRecord[key]);\n }\n\n /**\n * Get the singleton instance of the Consent class.\n *\n * @returns The Consent singleton instance.\n */\n public static getInstance(): Consent {\n if (!Consent.instance) {\n Consent.instance = new Consent();\n }\n\n return Consent.instance;\n }\n}\n","/**\n * @license\n * @monterosa/sdk-consent-kit\n *\n * Copyright © 2026 Monterosa Productions Limited. All rights reserved.\n *\n * More details on the license can be found at https://www.monterosa.co/sdk/license\n */\n\nimport { Unsubscribe, MonterosaError } from '@monterosa/sdk-util';\nimport { getParentApplication } from '@monterosa/sdk-launcher-kit';\n\nimport {\n ConsentState,\n ConsentKit,\n ConsentEvent,\n ConsentError,\n ConsentErrorMessages,\n ConsentHook,\n} from './types';\n\nimport { Consent } from './consent';\n\nconst consentHooks: ConsentHook[] = [];\nlet hooksRegistered = false;\n\n/**\n * Get the consent kit instance.\n *\n * @returns The consent kit instance.\n *\n * @internal\n */\nexport function getConsent(): ConsentKit {\n const consent = Consent.getInstance();\n\n if (!hooksRegistered) {\n // Register hooks only once\n for (const hook of consentHooks) {\n hook(consent);\n }\n\n hooksRegistered = true;\n }\n\n return consent;\n}\n\n/**\n * Register a hook that will be called when consent is initialised.\n *\n * @param hook - The hook function to register.\n *\n * @internal\n */\nexport function registerConsentHook(hook: ConsentHook): void {\n consentHooks.push(hook);\n}\n\n/**\n * Set the consent state.\n *\n * @remarks\n * - The 'necessary' category cannot be set to false\n * - Cannot be called from a child experience (use parent application instead)\n *\n * @example\n * ```typescript\n * setConsentState({\n * necessary: true,\n * analytics: true,\n * marketing: false,\n * functional: true,\n * });\n * ```\n *\n * @param state - The consent state to set\n * @throws {MonterosaError} If called from a child experience\n * @throws {MonterosaError} If 'necessary' category is set to false\n */\nexport function setConsentState<T extends string = string>(\n state: ConsentState<T>,\n): void {\n const parentApp = getParentApplication();\n\n // Cannot set consent from a child experience\n if (parentApp !== null) {\n throw new MonterosaError(\n ConsentError.CannotSetFromChild,\n ConsentErrorMessages[ConsentError.CannotSetFromChild](),\n );\n }\n\n // Necessary category cannot be false\n if ('necessary' in state && state.necessary === false) {\n throw new MonterosaError(\n ConsentError.NecessaryCategoryRequired,\n ConsentErrorMessages[ConsentError.NecessaryCategoryRequired](),\n );\n }\n\n const consent = getConsent();\n consent.state = state;\n}\n\n/**\n * Get the current consent state.\n *\n * @example\n * ```typescript\n * const state = getConsentState();\n * if (state.analytics) {\n * // Analytics consent granted\n * }\n * ```\n *\n * @returns The current consent state, or empty object if consent mode not active\n */\nexport function getConsentState<T extends string = string>(): ConsentState<T> {\n return (getConsent().state ?? {}) as ConsentState<T>;\n}\n\n/**\n * Check if consent is granted for a specific category.\n *\n * @remarks\n * - The 'necessary' category always returns true\n * - Returns true if consent mode is not active (backwards compatibility)\n * - Returns false for missing keys when consent mode is active (GDPR strict opt-in)\n * - Returns the boolean value if the category exists in consent state\n *\n * @example\n * ```typescript\n * if (hasConsent('analytics')) {\n * // Track analytics event\n * }\n * ```\n *\n * @param category - The consent category to check\n * @returns Whether consent is granted for the category\n */\nexport function hasConsent(category: string): boolean {\n // 'necessary' always returns true\n if (category === 'necessary') {\n return true;\n }\n\n const consent = getConsent();\n\n // If consent mode not active, allow everything (backwards compatibility)\n if (!consent.isActive) {\n return true;\n }\n\n // GDPR strict opt-in: missing keys default to false\n return (\n (consent.state as Record<string, boolean | undefined>)?.[category] === true\n );\n}\n\n/**\n * Subscribe to consent state changes.\n *\n * @example\n * ```typescript\n * const unsubscribe = onConsentChanged((state) => {\n * console.log('Consent changed:', state);\n * });\n *\n * // Later, to stop listening:\n * unsubscribe();\n * ```\n *\n * @param callback - The callback to call when consent state changes\n * @returns A function to unsubscribe from the event\n */\nexport function onConsentChanged<T extends string = string>(\n callback: (state: ConsentState<T>) => void,\n): Unsubscribe {\n const consent = getConsent();\n\n return consent.on(ConsentEvent.ConsentChanged, callback);\n}\n\n/**\n * Update consent state from parent (used internally by bridge).\n *\n * @param state - The consent state received from parent\n *\n * @internal\n */\nexport function updateConsentFromParent<T extends string = string>(\n state: ConsentState<T>,\n): void {\n const consent = getConsent();\n consent.state = state;\n}\n","/**\n * @license\n * @monterosa/sdk-consent-kit\n *\n * Copyright © 2026 Monterosa Productions Limited. All rights reserved.\n *\n * More details on the license can be found at https://www.monterosa.co/sdk/license\n */\n\nimport { Unsubscribe } from '@monterosa/sdk-util';\nimport {\n Experience,\n Message,\n getParentApplication,\n onSdkMessage,\n sendSdkMessage,\n} from '@monterosa/sdk-launcher-kit';\n\nimport { ConsentKit, ConsentState, ConsentAction } from './types';\n\nimport { getConsent, onConsentChanged, updateConsentFromParent } from './api';\n\nconst experienceUnsubs = new Map<string, Unsubscribe[]>();\n\n/**\n * Handle when an experience is embedded.\n * Sends current consent state to the child (queued by the bridge until\n * the experience is initialised) and subscribes to consent changes.\n *\n * @param experience - The embedded experience\n *\n * @internal\n */\nexport function handleExperienceEmbedded(experience: Experience): void {\n const consent = getConsent();\n\n // Send current consent state if active.\n // The bridge queues this message until the experience is initialised.\n if (consent.isActive) {\n sendSdkMessage(experience, ConsentAction.OnConsentUpdated, {\n state: consent.state,\n });\n }\n\n // Subscribe to consent changes and push to child\n const consentChangedUnsub = onConsentChanged((state) => {\n sendSdkMessage(experience, ConsentAction.OnConsentUpdated, {\n state,\n });\n });\n\n experienceUnsubs.set(experience.id, [consentChangedUnsub]);\n}\n\n/**\n * Handle when an experience is unmounted.\n * Cleans up subscriptions for the experience.\n *\n * @param experience - The unmounted experience\n *\n * @internal\n */\nexport function handleExperienceUnmounted(experience: Experience): void {\n const unsubs = experienceUnsubs.get(experience.id);\n\n if (unsubs) {\n for (const unsub of unsubs) {\n unsub();\n }\n\n experienceUnsubs.delete(experience.id);\n }\n}\n\n/**\n * Hook to listen for consent messages from parent application.\n * This is called when consent-kit is initialised in a child Experience.\n *\n * @param consent - The consent kit instance\n * @returns Unsubscribe function\n *\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function parentMessagesHook(consent: ConsentKit): Unsubscribe {\n const parentApp = getParentApplication();\n\n if (parentApp === null) {\n return () => {};\n }\n\n return onSdkMessage(parentApp, (message: Message) => {\n if (message.action === ConsentAction.OnConsentUpdated) {\n const { state } = message.payload as { state: ConsentState };\n\n updateConsentFromParent(state);\n }\n });\n}\n","/**\n * Manages user consent state between the parent page and embedded Experiences.\n *\n * @packageDocumentation\n */\n\n/**\n * @license\n * @monterosa/sdk-consent-kit\n *\n * Copyright © 2026 Monterosa Productions Limited. All rights reserved.\n *\n * More details on the license can be found at https://www.monterosa.co/sdk/license\n */\n\nimport { onStateChanged } from '@monterosa/sdk-launcher-kit';\n\nimport {\n handleExperienceEmbedded,\n handleExperienceUnmounted,\n parentMessagesHook,\n} from './bridge';\n\nimport { registerConsentHook } from './api';\n\n// Register bridge handlers for parent-child communication\nonStateChanged((experience, state) => {\n if (state === 'mounted') {\n handleExperienceEmbedded(experience);\n } else if (state === 'unmounted') {\n handleExperienceUnmounted(experience);\n }\n});\n\n// Register hook for child experiences to receive consent from parent\nregisterConsentHook(parentMessagesHook);\n\n// Public API exports\nexport {\n setConsentState,\n getConsentState,\n hasConsent,\n onConsentChanged,\n} from './api';\n\n// Type exports\nexport { DefaultCategory, ConsentState, ConsentError } from './types';\n"],"names":["ConsentError","Emitter","getParentApplication","MonterosaError","sendSdkMessage","onSdkMessage","onStateChanged"],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAuCH;;;;AAIG;AACH,IAAY,aASX,CAAA;AATD,CAAA,UAAY,aAAa,EAAA;AACvB;;AAEG;AACH,IAAA,aAAA,CAAA,kBAAA,CAAA,GAAA,yBAA4C,CAAA;AAC5C;;AAEG;AACH,IAAA,aAAA,CAAA,YAAA,CAAA,GAAA,mBAAgC,CAAA;AAClC,CAAC,EATW,aAAa,KAAb,aAAa,GASxB,EAAA,CAAA,CAAA,CAAA;AAED;;;;AAIG;AACH,IAAY,YAKX,CAAA;AALD,CAAA,UAAY,YAAY,EAAA;AACtB;;AAEG;AACH,IAAA,YAAA,CAAA,gBAAA,CAAA,GAAA,iBAAkC,CAAA;AACpC,CAAC,EALW,YAAY,KAAZ,YAAY,GAKvB,EAAA,CAAA,CAAA,CAAA;AAED;;;;;;;;;;;;;AAaG;AACSA,8BASX;AATD,CAAA,UAAY,YAAY,EAAA;AACtB;;AAEG;AACH,IAAA,YAAA,CAAA,2BAAA,CAAA,GAAA,6BAAyD,CAAA;AACzD;;AAEG;AACH,IAAA,YAAA,CAAA,oBAAA,CAAA,GAAA,uBAA4C,CAAA;AAC9C,CAAC,EATWA,oBAAY,KAAZA,oBAAY,GASvB,EAAA,CAAA,CAAA,CAAA;AAED;;;;AAIG;AACI,MAAM,oBAAoB,GAAG;IAClC,CAACA,oBAAY,CAAC,yBAAyB,GAAG,MACxC,gGAAgG;IAClG,CAACA,oBAAY,CAAC,kBAAkB,GAAG,MACjC,kGAAkG;CACrG;;AC7GD;;;;;;;AAOG;AAMH;;;;AAIG;AACG,MAAO,OAAQ,SAAQC,eAAO,CAAA;AAKlC;;;;AAIG;AACH,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;IAED,IAAI,KAAK,CAAC,KAA0B,EAAA;AAClC,QAAA,MAAM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,EAAE,GAAG,OAAO,CAAC,OAAkC,CAAC;YAE7D,uBAAuB,CAAC,KAAK,CAAC,CAAC;AAChC,SAAA;AACH,KAAC,CAAC,CAAC;AACL;;AClGA;;;;AAIG;AAqBH;AACAC,6BAAc,CAAC,CAAC,UAAU,EAAE,KAAK,KAAI;IACnC,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,wBAAwB,CAAC,UAAU,CAAC,CAAC;AACtC,KAAA;SAAM,IAAI,KAAK,KAAK,WAAW,EAAE;QAChC,yBAAyB,CAAC,UAAU,CAAC,CAAC;AACvC,KAAA;AACH,CAAC,CAAC,CAAC;AAEH;AACA,mBAAmB,CAAC,kBAAkB,CAAC;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monterosa/sdk-consent-kit",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.3",
|
|
4
4
|
"description": "Consent Kit for the Monterosa JS SDK",
|
|
5
5
|
"author": "Monterosa Productions Limited <hello@monterosa.co.uk> (https://www.monterosa.co/)",
|
|
6
|
-
"main": "./dist/index.
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"import": "./dist/index.js",
|
|
12
|
-
"
|
|
12
|
+
"require": "./dist/index.cjs",
|
|
13
|
+
"default": "./dist/index.cjs"
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
@@ -31,8 +32,8 @@
|
|
|
31
32
|
],
|
|
32
33
|
"license": "MIT",
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@monterosa/sdk-launcher-kit": "2.0.0-rc.
|
|
35
|
-
"@monterosa/sdk-util": "2.0.0-rc.
|
|
35
|
+
"@monterosa/sdk-launcher-kit": "2.0.0-rc.3",
|
|
36
|
+
"@monterosa/sdk-util": "2.0.0-rc.3"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@faker-js/faker": "^6.3.1",
|
|
@@ -52,5 +53,5 @@
|
|
|
52
53
|
"publishConfig": {
|
|
53
54
|
"access": "public"
|
|
54
55
|
},
|
|
55
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "d692ad26af0b5ea7cd7b664168bffa069f9ab911"
|
|
56
57
|
}
|