@iqworksai/consentiq-react 0.1.4 → 0.1.6
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/README.md +10 -10
- package/dist/index.d.mts +192 -14
- package/dist/index.d.ts +192 -14
- package/dist/index.js +739 -125
- package/dist/index.mjs +729 -122
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createContext, useContext, useEffect, useState, useCallback, useMemo } from "react";
|
|
3
3
|
|
|
4
4
|
// src/api-client.ts
|
|
5
|
-
var DEFAULT_API_URL = "https://
|
|
5
|
+
var DEFAULT_API_URL = "https://consent.iqworks.ai";
|
|
6
6
|
var ConsentIQApiClient = class {
|
|
7
7
|
constructor(propertyKey, apiUrl, debug = false) {
|
|
8
8
|
this.propertyKey = propertyKey;
|
|
@@ -133,6 +133,11 @@ var DEFAULT_CONSENT = {
|
|
|
133
133
|
social: false
|
|
134
134
|
};
|
|
135
135
|
var CONSENT_STORAGE_KEY = "consentiq_consent";
|
|
136
|
+
var RTL_LANGUAGES = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur", "ps", "sd", "dv", "yi"]);
|
|
137
|
+
function isRtlLanguage(lang) {
|
|
138
|
+
if (!lang) return false;
|
|
139
|
+
return RTL_LANGUAGES.has(lang.split("-")[0].toLowerCase());
|
|
140
|
+
}
|
|
136
141
|
function ConsentIQProvider({
|
|
137
142
|
children,
|
|
138
143
|
propertyKey,
|
|
@@ -144,6 +149,7 @@ function ConsentIQProvider({
|
|
|
144
149
|
onClose,
|
|
145
150
|
autoShow = true,
|
|
146
151
|
language: preferredLanguage,
|
|
152
|
+
locale,
|
|
147
153
|
debug = false
|
|
148
154
|
}) {
|
|
149
155
|
const [config, setConfig] = useState(null);
|
|
@@ -155,7 +161,6 @@ function ConsentIQProvider({
|
|
|
155
161
|
const [language, setLanguage] = useState("en");
|
|
156
162
|
const [regulation, setRegulation] = useState(null);
|
|
157
163
|
const [subjectId, setSubjectId] = useState("");
|
|
158
|
-
const [hasExistingConsent, setHasExistingConsent] = useState(false);
|
|
159
164
|
const apiClient = useMemo(
|
|
160
165
|
() => new ConsentIQApiClient(propertyKey, apiUrl, debug),
|
|
161
166
|
[propertyKey, apiUrl, debug]
|
|
@@ -185,7 +190,7 @@ function ConsentIQProvider({
|
|
|
185
190
|
setSubjectId(sid);
|
|
186
191
|
const propertyConfig = await apiClient.getConfig();
|
|
187
192
|
setConfig(propertyConfig);
|
|
188
|
-
const detectedLang = preferredLanguage || detectLanguage(propertyConfig.property.supportedLanguages);
|
|
193
|
+
const detectedLang = preferredLanguage || locale || detectLanguage(propertyConfig.property.supportedLanguages);
|
|
189
194
|
setLanguage(detectedLang);
|
|
190
195
|
const country = detectCountry();
|
|
191
196
|
if (country && propertyConfig.geoRules) {
|
|
@@ -204,14 +209,12 @@ function ConsentIQProvider({
|
|
|
204
209
|
if (existingConsent.marketingConsents) {
|
|
205
210
|
setMarketingConsent(existingConsent.marketingConsents);
|
|
206
211
|
}
|
|
207
|
-
setHasExistingConsent(true);
|
|
208
212
|
saveLocalConsent(existingConsent.cookieConsents);
|
|
209
213
|
foundExistingConsent = true;
|
|
210
214
|
} else {
|
|
211
215
|
const localConsent = loadLocalConsent();
|
|
212
216
|
if (localConsent) {
|
|
213
217
|
setConsent(localConsent);
|
|
214
|
-
setHasExistingConsent(true);
|
|
215
218
|
foundExistingConsent = true;
|
|
216
219
|
}
|
|
217
220
|
}
|
|
@@ -233,6 +236,7 @@ function ConsentIQProvider({
|
|
|
233
236
|
providedSubjectId,
|
|
234
237
|
autoGenerateSubjectId,
|
|
235
238
|
preferredLanguage,
|
|
239
|
+
locale,
|
|
236
240
|
autoShow
|
|
237
241
|
]);
|
|
238
242
|
const submitConsent = useCallback(
|
|
@@ -281,10 +285,10 @@ function ConsentIQProvider({
|
|
|
281
285
|
allAccepted.social = true;
|
|
282
286
|
}
|
|
283
287
|
setConsent(allAccepted);
|
|
284
|
-
await submitConsent(allAccepted, marketingConsent);
|
|
285
288
|
setIsBannerVisible(false);
|
|
286
289
|
setIsPreferenceCenterVisible(false);
|
|
287
290
|
onClose?.();
|
|
291
|
+
void submitConsent(allAccepted, marketingConsent);
|
|
288
292
|
}, [config, marketingConsent, submitConsent, onClose]);
|
|
289
293
|
const rejectAll = useCallback(async () => {
|
|
290
294
|
const allRejected = {
|
|
@@ -296,10 +300,10 @@ function ConsentIQProvider({
|
|
|
296
300
|
social: false
|
|
297
301
|
};
|
|
298
302
|
setConsent(allRejected);
|
|
299
|
-
await submitConsent(allRejected, {});
|
|
300
303
|
setIsBannerVisible(false);
|
|
301
304
|
setIsPreferenceCenterVisible(false);
|
|
302
305
|
onClose?.();
|
|
306
|
+
void submitConsent(allRejected, {});
|
|
303
307
|
}, [submitConsent, onClose]);
|
|
304
308
|
const updateConsent = useCallback(
|
|
305
309
|
async (updates) => {
|
|
@@ -310,7 +314,7 @@ function ConsentIQProvider({
|
|
|
310
314
|
// Always enforce necessary
|
|
311
315
|
};
|
|
312
316
|
setConsent(newConsent);
|
|
313
|
-
|
|
317
|
+
void submitConsent(newConsent, marketingConsent);
|
|
314
318
|
},
|
|
315
319
|
[consent, marketingConsent, submitConsent]
|
|
316
320
|
);
|
|
@@ -318,10 +322,13 @@ function ConsentIQProvider({
|
|
|
318
322
|
async (updates) => {
|
|
319
323
|
const newMarketingConsent = { ...marketingConsent, ...updates };
|
|
320
324
|
setMarketingConsent(newMarketingConsent);
|
|
321
|
-
|
|
325
|
+
void submitConsent(consent, newMarketingConsent);
|
|
322
326
|
},
|
|
323
327
|
[consent, marketingConsent, submitConsent]
|
|
324
328
|
);
|
|
329
|
+
const changeLanguage = useCallback((lang) => {
|
|
330
|
+
setLanguage(lang);
|
|
331
|
+
}, []);
|
|
325
332
|
const showBanner = useCallback(() => {
|
|
326
333
|
setIsBannerVisible(true);
|
|
327
334
|
onOpen?.();
|
|
@@ -342,12 +349,12 @@ function ConsentIQProvider({
|
|
|
342
349
|
const resetConsent = useCallback(() => {
|
|
343
350
|
setConsent(DEFAULT_CONSENT);
|
|
344
351
|
setMarketingConsent({});
|
|
345
|
-
setHasExistingConsent(false);
|
|
346
352
|
if (typeof window !== "undefined") {
|
|
347
353
|
localStorage.removeItem(CONSENT_STORAGE_KEY);
|
|
348
354
|
localStorage.removeItem("consentiq_subject_id");
|
|
349
355
|
}
|
|
350
356
|
}, []);
|
|
357
|
+
const dir = isRtlLanguage(language) ? "rtl" : "ltr";
|
|
351
358
|
const contextValue = useMemo(
|
|
352
359
|
() => ({
|
|
353
360
|
consent,
|
|
@@ -357,6 +364,8 @@ function ConsentIQProvider({
|
|
|
357
364
|
isBannerVisible,
|
|
358
365
|
isPreferenceCenterVisible,
|
|
359
366
|
language,
|
|
367
|
+
changeLanguage,
|
|
368
|
+
dir,
|
|
360
369
|
regulation,
|
|
361
370
|
hasConsent,
|
|
362
371
|
hasMarketingConsent,
|
|
@@ -378,6 +387,8 @@ function ConsentIQProvider({
|
|
|
378
387
|
isBannerVisible,
|
|
379
388
|
isPreferenceCenterVisible,
|
|
380
389
|
language,
|
|
390
|
+
changeLanguage,
|
|
391
|
+
dir,
|
|
381
392
|
regulation,
|
|
382
393
|
hasConsent,
|
|
383
394
|
hasMarketingConsent,
|
|
@@ -413,14 +424,70 @@ function useConsentGate(category) {
|
|
|
413
424
|
};
|
|
414
425
|
}
|
|
415
426
|
|
|
427
|
+
// src/components/LanguageSelector.tsx
|
|
428
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
429
|
+
function languageLabel(code) {
|
|
430
|
+
try {
|
|
431
|
+
const display = new Intl.DisplayNames([code], { type: "language" });
|
|
432
|
+
const name = display.of(code);
|
|
433
|
+
if (name) {
|
|
434
|
+
return name.charAt(0).toUpperCase() + name.slice(1);
|
|
435
|
+
}
|
|
436
|
+
} catch {
|
|
437
|
+
}
|
|
438
|
+
return code.toUpperCase();
|
|
439
|
+
}
|
|
440
|
+
function LanguageSelector({ className, style }) {
|
|
441
|
+
const { config, language, changeLanguage, dir } = useConsentIQ();
|
|
442
|
+
const languages = config?.property.supportedLanguages ?? [];
|
|
443
|
+
if (languages.length <= 1) {
|
|
444
|
+
return null;
|
|
445
|
+
}
|
|
446
|
+
const caretSide = dir === "rtl" ? "left" : "right";
|
|
447
|
+
return /* @__PURE__ */ jsx2(
|
|
448
|
+
"select",
|
|
449
|
+
{
|
|
450
|
+
className,
|
|
451
|
+
value: language,
|
|
452
|
+
onChange: (e) => changeLanguage(e.target.value),
|
|
453
|
+
"aria-label": "Language",
|
|
454
|
+
style: {
|
|
455
|
+
appearance: "none",
|
|
456
|
+
WebkitAppearance: "none",
|
|
457
|
+
MozAppearance: "none",
|
|
458
|
+
backgroundColor: "rgba(127, 127, 127, 0.12)",
|
|
459
|
+
backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")`,
|
|
460
|
+
backgroundRepeat: "no-repeat",
|
|
461
|
+
backgroundPosition: `${caretSide} 0.45rem center`,
|
|
462
|
+
backgroundSize: "0.65rem",
|
|
463
|
+
border: "1px solid rgba(127, 127, 127, 0.3)",
|
|
464
|
+
borderRadius: "0.375rem",
|
|
465
|
+
color: "inherit",
|
|
466
|
+
fontFamily: "inherit",
|
|
467
|
+
fontSize: "0.75rem",
|
|
468
|
+
fontWeight: 500,
|
|
469
|
+
lineHeight: 1.2,
|
|
470
|
+
cursor: "pointer",
|
|
471
|
+
outline: "none",
|
|
472
|
+
paddingBlock: "0.3rem",
|
|
473
|
+
paddingInlineStart: "0.6rem",
|
|
474
|
+
paddingInlineEnd: "1.5rem",
|
|
475
|
+
...style
|
|
476
|
+
},
|
|
477
|
+
children: languages.map((code) => /* @__PURE__ */ jsx2("option", { value: code, style: { color: "#18181b" }, children: languageLabel(code) }, code))
|
|
478
|
+
}
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
|
|
416
482
|
// src/components/CookieBanner.tsx
|
|
417
|
-
import { Fragment, jsx as
|
|
483
|
+
import { Fragment, jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
418
484
|
function CookieBanner({ className, position, theme, style }) {
|
|
419
485
|
const {
|
|
420
486
|
config,
|
|
421
487
|
isBannerVisible,
|
|
422
488
|
isLoading,
|
|
423
489
|
language,
|
|
490
|
+
dir,
|
|
424
491
|
acceptAll,
|
|
425
492
|
rejectAll,
|
|
426
493
|
showPreferenceCenter
|
|
@@ -430,7 +497,8 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
430
497
|
}
|
|
431
498
|
const bannerConfig = config.banner;
|
|
432
499
|
const translations = config.translations[language] || config.translations[config.property.defaultLanguage] || {};
|
|
433
|
-
const
|
|
500
|
+
const requestedPosition = position || bannerConfig.position || "bottom";
|
|
501
|
+
const resolvedPosition = dir === "rtl" ? requestedPosition === "bottom-left" ? "bottom-right" : requestedPosition === "bottom-right" ? "bottom-left" : requestedPosition : requestedPosition;
|
|
434
502
|
const resolvedTheme = theme || bannerConfig.theme || "dark";
|
|
435
503
|
const effectiveTheme = resolvedTheme === "auto" ? typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : resolvedTheme;
|
|
436
504
|
const positionStyles = {
|
|
@@ -449,14 +517,14 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
449
517
|
}
|
|
450
518
|
};
|
|
451
519
|
const themeStyles = {
|
|
452
|
-
backgroundColor: effectiveTheme === "dark" ? "#
|
|
453
|
-
color: effectiveTheme === "dark" ? "#
|
|
520
|
+
backgroundColor: effectiveTheme === "dark" ? "#09090b" : "#ffffff",
|
|
521
|
+
color: effectiveTheme === "dark" ? "#f4f4f5" : "#27272a",
|
|
454
522
|
borderWidth: "1px",
|
|
455
523
|
borderStyle: "solid",
|
|
456
|
-
borderColor: effectiveTheme === "dark" ? "#
|
|
524
|
+
borderColor: effectiveTheme === "dark" ? "#3f3f46" : "#e4e4e7"
|
|
457
525
|
};
|
|
458
526
|
const buttonPrimaryStyle = {
|
|
459
|
-
backgroundColor: bannerConfig.primaryColor || "#
|
|
527
|
+
backgroundColor: bannerConfig.primaryColor || "#ff6a00",
|
|
460
528
|
color: "#ffffff",
|
|
461
529
|
padding: "0.5rem 1rem",
|
|
462
530
|
borderRadius: "0.5rem",
|
|
@@ -466,8 +534,8 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
466
534
|
fontSize: "0.875rem"
|
|
467
535
|
};
|
|
468
536
|
const buttonSecondaryStyle = {
|
|
469
|
-
backgroundColor: effectiveTheme === "dark" ? "#
|
|
470
|
-
color: effectiveTheme === "dark" ? "#
|
|
537
|
+
backgroundColor: effectiveTheme === "dark" ? "#52525b" : "#e4e4e7",
|
|
538
|
+
color: effectiveTheme === "dark" ? "#f4f4f5" : "#27272a",
|
|
471
539
|
padding: "0.5rem 1rem",
|
|
472
540
|
borderRadius: "0.5rem",
|
|
473
541
|
border: "none",
|
|
@@ -478,13 +546,13 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
478
546
|
const buttonLinkStyle = {
|
|
479
547
|
background: "none",
|
|
480
548
|
border: "none",
|
|
481
|
-
color: effectiveTheme === "dark" ? "#
|
|
549
|
+
color: effectiveTheme === "dark" ? "#a1a1aa" : "#71717a",
|
|
482
550
|
cursor: "pointer",
|
|
483
551
|
fontSize: "0.875rem",
|
|
484
552
|
padding: "0.5rem"
|
|
485
553
|
};
|
|
486
554
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
487
|
-
resolvedPosition === "center" && /* @__PURE__ */
|
|
555
|
+
resolvedPosition === "center" && /* @__PURE__ */ jsx3(
|
|
488
556
|
"div",
|
|
489
557
|
{
|
|
490
558
|
style: {
|
|
@@ -511,8 +579,9 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
511
579
|
role: "dialog",
|
|
512
580
|
"aria-label": "Cookie consent",
|
|
513
581
|
"aria-modal": resolvedPosition === "center",
|
|
582
|
+
dir,
|
|
514
583
|
children: [
|
|
515
|
-
bannerConfig.showLogo && bannerConfig.logoUrl && /* @__PURE__ */
|
|
584
|
+
bannerConfig.showLogo && bannerConfig.logoUrl && /* @__PURE__ */ jsx3(
|
|
516
585
|
"img",
|
|
517
586
|
{
|
|
518
587
|
src: bannerConfig.logoUrl,
|
|
@@ -520,7 +589,7 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
520
589
|
style: { height: "1.5rem", marginBottom: "0.75rem" }
|
|
521
590
|
}
|
|
522
591
|
),
|
|
523
|
-
translations.bannerTitle && /* @__PURE__ */
|
|
592
|
+
translations.bannerTitle && /* @__PURE__ */ jsx3(
|
|
524
593
|
"h2",
|
|
525
594
|
{
|
|
526
595
|
style: {
|
|
@@ -532,7 +601,7 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
532
601
|
children: translations.bannerTitle
|
|
533
602
|
}
|
|
534
603
|
),
|
|
535
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ jsx3(
|
|
536
605
|
"p",
|
|
537
606
|
{
|
|
538
607
|
style: {
|
|
@@ -554,7 +623,7 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
554
623
|
alignItems: "center"
|
|
555
624
|
},
|
|
556
625
|
children: [
|
|
557
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ jsx3(
|
|
558
627
|
"button",
|
|
559
628
|
{
|
|
560
629
|
onClick: acceptAll,
|
|
@@ -563,7 +632,7 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
563
632
|
children: translations.acceptAllText || "Accept All"
|
|
564
633
|
}
|
|
565
634
|
),
|
|
566
|
-
/* @__PURE__ */
|
|
635
|
+
/* @__PURE__ */ jsx3(
|
|
567
636
|
"button",
|
|
568
637
|
{
|
|
569
638
|
onClick: rejectAll,
|
|
@@ -572,7 +641,7 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
572
641
|
children: translations.rejectAllText || "Reject All"
|
|
573
642
|
}
|
|
574
643
|
),
|
|
575
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ jsx3(
|
|
576
645
|
"button",
|
|
577
646
|
{
|
|
578
647
|
onClick: showPreferenceCenter,
|
|
@@ -580,7 +649,8 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
580
649
|
type: "button",
|
|
581
650
|
children: translations.customizeText || "Customize"
|
|
582
651
|
}
|
|
583
|
-
)
|
|
652
|
+
),
|
|
653
|
+
/* @__PURE__ */ jsx3(LanguageSelector, { style: { marginInlineStart: "auto" } })
|
|
584
654
|
]
|
|
585
655
|
}
|
|
586
656
|
)
|
|
@@ -590,9 +660,266 @@ function CookieBanner({ className, position, theme, style }) {
|
|
|
590
660
|
] });
|
|
591
661
|
}
|
|
592
662
|
|
|
663
|
+
// src/components/ConsentTrigger.tsx
|
|
664
|
+
import { useState as useState2 } from "react";
|
|
665
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
666
|
+
function ConsentTrigger({
|
|
667
|
+
className,
|
|
668
|
+
position = "bottom-left",
|
|
669
|
+
theme,
|
|
670
|
+
style,
|
|
671
|
+
label = "Cookie preferences"
|
|
672
|
+
}) {
|
|
673
|
+
const { config, isLoading, isBannerVisible, isPreferenceCenterVisible, showPreferenceCenter, dir } = useConsentIQ();
|
|
674
|
+
const [hovered, setHovered] = useState2(false);
|
|
675
|
+
if (isLoading || !config || isBannerVisible || isPreferenceCenterVisible) {
|
|
676
|
+
return null;
|
|
677
|
+
}
|
|
678
|
+
const bannerConfig = config?.banner;
|
|
679
|
+
const resolvedTheme = theme || bannerConfig?.theme || "dark";
|
|
680
|
+
const effectiveTheme = resolvedTheme === "auto" ? typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : resolvedTheme;
|
|
681
|
+
const accent = bannerConfig?.primaryColor || "#ff6a00";
|
|
682
|
+
const corner = dir === "rtl" ? position === "bottom-right" ? "bottom-left" : "bottom-right" : position;
|
|
683
|
+
const cornerStyles = corner === "bottom-right" ? { right: "1rem" } : { left: "1rem" };
|
|
684
|
+
return /* @__PURE__ */ jsx4(
|
|
685
|
+
"button",
|
|
686
|
+
{
|
|
687
|
+
type: "button",
|
|
688
|
+
className,
|
|
689
|
+
onClick: showPreferenceCenter,
|
|
690
|
+
onMouseEnter: () => setHovered(true),
|
|
691
|
+
onMouseLeave: () => setHovered(false),
|
|
692
|
+
onFocus: () => setHovered(true),
|
|
693
|
+
onBlur: () => setHovered(false),
|
|
694
|
+
"aria-label": label,
|
|
695
|
+
title: label,
|
|
696
|
+
style: {
|
|
697
|
+
position: "fixed",
|
|
698
|
+
bottom: "1rem",
|
|
699
|
+
...cornerStyles,
|
|
700
|
+
zIndex: 9997,
|
|
701
|
+
width: "3rem",
|
|
702
|
+
height: "3rem",
|
|
703
|
+
padding: 0,
|
|
704
|
+
borderRadius: "9999px",
|
|
705
|
+
display: "flex",
|
|
706
|
+
alignItems: "center",
|
|
707
|
+
justifyContent: "center",
|
|
708
|
+
cursor: "pointer",
|
|
709
|
+
backgroundColor: effectiveTheme === "dark" ? "#09090b" : "#ffffff",
|
|
710
|
+
color: accent,
|
|
711
|
+
borderWidth: "1px",
|
|
712
|
+
borderStyle: "solid",
|
|
713
|
+
borderColor: effectiveTheme === "dark" ? "#3f3f46" : "#e4e4e7",
|
|
714
|
+
boxShadow: hovered ? "0 6px 16px -2px rgba(0, 0, 0, 0.2)" : "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
715
|
+
transform: hovered ? "scale(1.05)" : "scale(1)",
|
|
716
|
+
transition: "transform 0.15s ease, box-shadow 0.15s ease",
|
|
717
|
+
...style
|
|
718
|
+
},
|
|
719
|
+
children: /* @__PURE__ */ jsxs2(
|
|
720
|
+
"svg",
|
|
721
|
+
{
|
|
722
|
+
width: "22",
|
|
723
|
+
height: "22",
|
|
724
|
+
viewBox: "0 0 24 24",
|
|
725
|
+
fill: "none",
|
|
726
|
+
stroke: "currentColor",
|
|
727
|
+
strokeWidth: "2",
|
|
728
|
+
strokeLinecap: "round",
|
|
729
|
+
strokeLinejoin: "round",
|
|
730
|
+
"aria-hidden": "true",
|
|
731
|
+
children: [
|
|
732
|
+
/* @__PURE__ */ jsx4("path", { d: "M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5Z" }),
|
|
733
|
+
/* @__PURE__ */ jsx4("path", { d: "M8.5 8.5v.01" }),
|
|
734
|
+
/* @__PURE__ */ jsx4("path", { d: "M16 15.5v.01" }),
|
|
735
|
+
/* @__PURE__ */ jsx4("path", { d: "M12 12v.01" }),
|
|
736
|
+
/* @__PURE__ */ jsx4("path", { d: "M11 17v.01" }),
|
|
737
|
+
/* @__PURE__ */ jsx4("path", { d: "M7 14v.01" })
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
)
|
|
741
|
+
}
|
|
742
|
+
);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
// src/components/ConsentPageTrigger.tsx
|
|
746
|
+
import { useCallback as useCallback2, useEffect as useEffect2, useState as useState3 } from "react";
|
|
747
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
748
|
+
function ConsentPageTrigger({
|
|
749
|
+
apiUrl,
|
|
750
|
+
token,
|
|
751
|
+
mode = "popup",
|
|
752
|
+
redirect,
|
|
753
|
+
onComplete,
|
|
754
|
+
onClose,
|
|
755
|
+
className,
|
|
756
|
+
style,
|
|
757
|
+
children
|
|
758
|
+
}) {
|
|
759
|
+
const [open, setOpen] = useState3(false);
|
|
760
|
+
const origin = apiUrl.replace(/\/$/, "");
|
|
761
|
+
const pageUrl = `${origin}/portal/consent/${encodeURIComponent(token)}`;
|
|
762
|
+
const handleClick = useCallback2(() => {
|
|
763
|
+
if (mode === "redirect") {
|
|
764
|
+
window.location.href = redirect ? `${pageUrl}?redirect=${encodeURIComponent(redirect)}` : pageUrl;
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
setOpen(true);
|
|
768
|
+
}, [mode, pageUrl, redirect]);
|
|
769
|
+
useEffect2(() => {
|
|
770
|
+
if (!open) return;
|
|
771
|
+
function onMessage(e) {
|
|
772
|
+
if (e.origin !== origin) return;
|
|
773
|
+
const d = e.data || {};
|
|
774
|
+
if (d.source !== "consentiq") return;
|
|
775
|
+
if (d.type === "consent:complete") {
|
|
776
|
+
onComplete?.({ consentId: d.consentId, proofHash: d.proofHash, email: d.email });
|
|
777
|
+
setOpen(false);
|
|
778
|
+
} else if (d.type === "consent:closed") {
|
|
779
|
+
onClose?.();
|
|
780
|
+
setOpen(false);
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
window.addEventListener("message", onMessage);
|
|
784
|
+
return () => window.removeEventListener("message", onMessage);
|
|
785
|
+
}, [open, origin, onComplete, onClose]);
|
|
786
|
+
return /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
787
|
+
/* @__PURE__ */ jsx5("button", { type: "button", className, style, onClick: handleClick, children: children ?? "Give consent" }),
|
|
788
|
+
open && /* @__PURE__ */ jsx5(
|
|
789
|
+
"div",
|
|
790
|
+
{
|
|
791
|
+
onClick: (e) => {
|
|
792
|
+
if (e.target === e.currentTarget) {
|
|
793
|
+
onClose?.();
|
|
794
|
+
setOpen(false);
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
style: { position: "fixed", inset: 0, zIndex: 2147483647, background: "rgba(15,23,42,.55)", display: "flex", alignItems: "center", justifyContent: "center", padding: 16 },
|
|
798
|
+
children: /* @__PURE__ */ jsx5(
|
|
799
|
+
"iframe",
|
|
800
|
+
{
|
|
801
|
+
title: "Consent",
|
|
802
|
+
src: `${pageUrl}?embed=1`,
|
|
803
|
+
style: { width: "100%", maxWidth: 480, height: "90vh", maxHeight: 760, border: 0, borderRadius: 16, background: "#fff", boxShadow: "0 20px 60px rgba(0,0,0,.35)" }
|
|
804
|
+
}
|
|
805
|
+
)
|
|
806
|
+
}
|
|
807
|
+
)
|
|
808
|
+
] });
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
// src/components/ConsentForm.tsx
|
|
812
|
+
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
813
|
+
|
|
814
|
+
// src/hooks/useConsentPurposes.ts
|
|
815
|
+
import { useCallback as useCallback3, useEffect as useEffect3, useState as useState4 } from "react";
|
|
816
|
+
function useConsentPurposes(apiUrl, token) {
|
|
817
|
+
const origin = apiUrl.replace(/\/$/, "");
|
|
818
|
+
const [purposes, setPurposes] = useState4([]);
|
|
819
|
+
const [loading, setLoading] = useState4(true);
|
|
820
|
+
const [error, setError] = useState4(null);
|
|
821
|
+
useEffect3(() => {
|
|
822
|
+
let cancelled = false;
|
|
823
|
+
setLoading(true);
|
|
824
|
+
fetch(`${origin}/api/public/consent-point/${encodeURIComponent(token)}`).then((r) => r.ok ? r.json() : Promise.reject(new Error("Failed to load consent purposes"))).then((d) => {
|
|
825
|
+
if (!cancelled) {
|
|
826
|
+
setPurposes(d.purposes ?? []);
|
|
827
|
+
setError(null);
|
|
828
|
+
}
|
|
829
|
+
}).catch((e) => {
|
|
830
|
+
if (!cancelled) setError(e instanceof Error ? e.message : "Failed to load");
|
|
831
|
+
}).finally(() => {
|
|
832
|
+
if (!cancelled) setLoading(false);
|
|
833
|
+
});
|
|
834
|
+
return () => {
|
|
835
|
+
cancelled = true;
|
|
836
|
+
};
|
|
837
|
+
}, [origin, token]);
|
|
838
|
+
const record = useCallback3(async (email, purposeConsents) => {
|
|
839
|
+
const nonce = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : String(Date.now());
|
|
840
|
+
const res = await fetch(`${origin}/api/public/collect`, {
|
|
841
|
+
method: "POST",
|
|
842
|
+
headers: { "Content-Type": "application/json" },
|
|
843
|
+
body: JSON.stringify({ token, email, purposeConsents, mode: "embed", nonce })
|
|
844
|
+
});
|
|
845
|
+
const data = await res.json().catch(() => ({}));
|
|
846
|
+
if (!res.ok) throw new Error(data?.error || "Could not record consent");
|
|
847
|
+
return data;
|
|
848
|
+
}, [origin, token]);
|
|
849
|
+
return { purposes, loading, error, record };
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
// src/components/ConsentForm.tsx
|
|
853
|
+
import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
854
|
+
function ConsentForm({ apiUrl, token, email: initialEmail, onRecorded, className }) {
|
|
855
|
+
const { purposes, loading, error, record } = useConsentPurposes(apiUrl, token);
|
|
856
|
+
const [email, setEmail] = useState5(initialEmail ?? "");
|
|
857
|
+
const [grants, setGrants] = useState5({});
|
|
858
|
+
const [submitting, setSubmitting] = useState5(false);
|
|
859
|
+
const [submitError, setSubmitError] = useState5(null);
|
|
860
|
+
const [done, setDone] = useState5(null);
|
|
861
|
+
useEffect4(() => {
|
|
862
|
+
setGrants((g) => {
|
|
863
|
+
const next = { ...g };
|
|
864
|
+
for (const p of purposes) if (!(p.purpose_id in next)) next[p.purpose_id] = p.is_required;
|
|
865
|
+
return next;
|
|
866
|
+
});
|
|
867
|
+
}, [purposes]);
|
|
868
|
+
const emailValid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
|
869
|
+
async function submit(e) {
|
|
870
|
+
e.preventDefault();
|
|
871
|
+
setSubmitError(null);
|
|
872
|
+
if (!emailValid) {
|
|
873
|
+
setSubmitError("Enter a valid email.");
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
setSubmitting(true);
|
|
877
|
+
try {
|
|
878
|
+
const r = await record(email, grants);
|
|
879
|
+
setDone({ consentId: r.consentId });
|
|
880
|
+
onRecorded?.({ consentId: r.consentId, proofHash: r.proofHash });
|
|
881
|
+
} catch (err) {
|
|
882
|
+
setSubmitError(err instanceof Error ? err.message : "Failed to record consent");
|
|
883
|
+
} finally {
|
|
884
|
+
setSubmitting(false);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
if (loading) return /* @__PURE__ */ jsx6("p", { className, children: "Loading consent options\u2026" });
|
|
888
|
+
if (error) return /* @__PURE__ */ jsx6("p", { className, style: { color: "crimson" }, children: error });
|
|
889
|
+
if (done) return /* @__PURE__ */ jsxs4("p", { className, children: [
|
|
890
|
+
"Consent recorded (",
|
|
891
|
+
done.consentId,
|
|
892
|
+
")."
|
|
893
|
+
] });
|
|
894
|
+
return /* @__PURE__ */ jsxs4("form", { className, onSubmit: submit, style: { display: "grid", gap: 12 }, children: [
|
|
895
|
+
purposes.map((p) => /* @__PURE__ */ jsxs4("label", { style: { display: "flex", gap: 8, alignItems: "flex-start" }, children: [
|
|
896
|
+
/* @__PURE__ */ jsx6(
|
|
897
|
+
"input",
|
|
898
|
+
{
|
|
899
|
+
type: "checkbox",
|
|
900
|
+
checked: grants[p.purpose_id] ?? p.is_required,
|
|
901
|
+
disabled: p.is_required,
|
|
902
|
+
onChange: (ev) => setGrants((g) => ({ ...g, [p.purpose_id]: ev.target.checked }))
|
|
903
|
+
}
|
|
904
|
+
),
|
|
905
|
+
/* @__PURE__ */ jsxs4("span", { children: [
|
|
906
|
+
/* @__PURE__ */ jsx6("strong", { children: p.label ?? "Purpose" }),
|
|
907
|
+
p.is_required ? " (required)" : "",
|
|
908
|
+
p.description ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
909
|
+
/* @__PURE__ */ jsx6("br", {}),
|
|
910
|
+
/* @__PURE__ */ jsx6("span", { style: { opacity: 0.7, fontSize: 13 }, children: p.description })
|
|
911
|
+
] }) : null
|
|
912
|
+
] })
|
|
913
|
+
] }, p.purpose_id)),
|
|
914
|
+
!initialEmail && /* @__PURE__ */ jsx6("input", { type: "email", value: email, onChange: (e) => setEmail(e.target.value), placeholder: "you@example.com" }),
|
|
915
|
+
submitError && /* @__PURE__ */ jsx6("p", { style: { color: "crimson" }, children: submitError }),
|
|
916
|
+
/* @__PURE__ */ jsx6("button", { type: "submit", disabled: submitting, children: submitting ? "Recording\u2026" : "Confirm consent" })
|
|
917
|
+
] });
|
|
918
|
+
}
|
|
919
|
+
|
|
593
920
|
// src/components/PreferenceCenter.tsx
|
|
594
|
-
import { useState as
|
|
595
|
-
import { jsx as
|
|
921
|
+
import { useState as useState6, useEffect as useEffect5 } from "react";
|
|
922
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
596
923
|
function PreferenceCenter({ className, theme, style }) {
|
|
597
924
|
const {
|
|
598
925
|
config,
|
|
@@ -600,11 +927,12 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
600
927
|
isPreferenceCenterVisible,
|
|
601
928
|
isLoading,
|
|
602
929
|
language,
|
|
930
|
+
dir,
|
|
603
931
|
updateConsent,
|
|
604
932
|
hidePreferenceCenter
|
|
605
933
|
} = useConsentIQ();
|
|
606
|
-
const [localConsent, setLocalConsent] =
|
|
607
|
-
|
|
934
|
+
const [localConsent, setLocalConsent] = useState6(consent);
|
|
935
|
+
useEffect5(() => {
|
|
608
936
|
setLocalConsent(consent);
|
|
609
937
|
}, [consent]);
|
|
610
938
|
if (isLoading || !isPreferenceCenterVisible || !config) {
|
|
@@ -669,8 +997,8 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
669
997
|
};
|
|
670
998
|
const modalStyle = {
|
|
671
999
|
position: "relative",
|
|
672
|
-
backgroundColor: isDark ? "#
|
|
673
|
-
color: isDark ? "#
|
|
1000
|
+
backgroundColor: isDark ? "#09090b" : "#ffffff",
|
|
1001
|
+
color: isDark ? "#f4f4f5" : "#27272a",
|
|
674
1002
|
borderRadius: "0.75rem",
|
|
675
1003
|
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
|
|
676
1004
|
maxWidth: "600px",
|
|
@@ -684,7 +1012,7 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
684
1012
|
};
|
|
685
1013
|
const headerStyle = {
|
|
686
1014
|
padding: "1rem 1.5rem",
|
|
687
|
-
borderBottom: `1px solid ${isDark ? "#
|
|
1015
|
+
borderBottom: `1px solid ${isDark ? "#3f3f46" : "#e4e4e7"}`,
|
|
688
1016
|
display: "flex",
|
|
689
1017
|
justifyContent: "space-between",
|
|
690
1018
|
alignItems: "center"
|
|
@@ -696,14 +1024,14 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
696
1024
|
};
|
|
697
1025
|
const footerStyle = {
|
|
698
1026
|
padding: "1rem 1.5rem",
|
|
699
|
-
borderTop: `1px solid ${isDark ? "#
|
|
1027
|
+
borderTop: `1px solid ${isDark ? "#3f3f46" : "#e4e4e7"}`,
|
|
700
1028
|
display: "flex",
|
|
701
1029
|
gap: "0.5rem",
|
|
702
1030
|
justifyContent: "flex-end"
|
|
703
1031
|
};
|
|
704
1032
|
const categoryStyle = {
|
|
705
1033
|
padding: "1rem",
|
|
706
|
-
backgroundColor: isDark ? "#
|
|
1034
|
+
backgroundColor: isDark ? "#18181b" : "#fafafa",
|
|
707
1035
|
borderRadius: "0.5rem",
|
|
708
1036
|
marginBottom: "0.75rem"
|
|
709
1037
|
};
|
|
@@ -713,7 +1041,7 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
713
1041
|
justifyContent: "space-between"
|
|
714
1042
|
};
|
|
715
1043
|
const buttonPrimaryStyle = {
|
|
716
|
-
backgroundColor: bannerConfig.primaryColor || "#
|
|
1044
|
+
backgroundColor: bannerConfig.primaryColor || "#ff6a00",
|
|
717
1045
|
color: "#ffffff",
|
|
718
1046
|
padding: "0.5rem 1rem",
|
|
719
1047
|
borderRadius: "0.5rem",
|
|
@@ -723,8 +1051,8 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
723
1051
|
fontSize: "0.875rem"
|
|
724
1052
|
};
|
|
725
1053
|
const buttonSecondaryStyle = {
|
|
726
|
-
backgroundColor: isDark ? "#
|
|
727
|
-
color: isDark ? "#
|
|
1054
|
+
backgroundColor: isDark ? "#52525b" : "#e4e4e7",
|
|
1055
|
+
color: isDark ? "#f4f4f5" : "#27272a",
|
|
728
1056
|
padding: "0.5rem 1rem",
|
|
729
1057
|
borderRadius: "0.5rem",
|
|
730
1058
|
border: "none",
|
|
@@ -735,47 +1063,59 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
735
1063
|
const buttonTextStyle = {
|
|
736
1064
|
background: "none",
|
|
737
1065
|
border: "none",
|
|
738
|
-
color:
|
|
1066
|
+
color: bannerConfig.primaryColor || "#ff6a00",
|
|
739
1067
|
cursor: "pointer",
|
|
740
1068
|
fontSize: "0.875rem",
|
|
741
|
-
|
|
1069
|
+
fontWeight: 500,
|
|
1070
|
+
padding: 0,
|
|
1071
|
+
textDecoration: "underline",
|
|
1072
|
+
textUnderlineOffset: "2px"
|
|
742
1073
|
};
|
|
743
|
-
return /* @__PURE__ */
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
-
/* @__PURE__ */
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
/* @__PURE__ */
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
1074
|
+
return /* @__PURE__ */ jsxs5("div", { style: containerStyle, className, children: [
|
|
1075
|
+
/* @__PURE__ */ jsx7("div", { style: backdropStyle, onClick: hidePreferenceCenter }),
|
|
1076
|
+
/* @__PURE__ */ jsxs5("div", { style: modalStyle, role: "dialog", "aria-modal": "true", "aria-label": "Cookie preferences", dir, children: [
|
|
1077
|
+
/* @__PURE__ */ jsxs5("div", { style: headerStyle, children: [
|
|
1078
|
+
/* @__PURE__ */ jsx7("h2", { style: { margin: 0, fontSize: "1.25rem", fontWeight: 600, lineHeight: 1 }, children: "Cookie Preferences" }),
|
|
1079
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", alignItems: "center", gap: "0.875rem" }, children: [
|
|
1080
|
+
/* @__PURE__ */ jsx7(LanguageSelector, {}),
|
|
1081
|
+
/* @__PURE__ */ jsx7(
|
|
1082
|
+
"button",
|
|
1083
|
+
{
|
|
1084
|
+
onClick: hidePreferenceCenter,
|
|
1085
|
+
style: {
|
|
1086
|
+
display: "flex",
|
|
1087
|
+
alignItems: "center",
|
|
1088
|
+
justifyContent: "center",
|
|
1089
|
+
width: "1.75rem",
|
|
1090
|
+
height: "1.75rem",
|
|
1091
|
+
padding: 0,
|
|
1092
|
+
background: "none",
|
|
1093
|
+
border: "none",
|
|
1094
|
+
fontSize: "1.5rem",
|
|
1095
|
+
cursor: "pointer",
|
|
1096
|
+
color: isDark ? "#a1a1aa" : "#71717a",
|
|
1097
|
+
lineHeight: 1
|
|
1098
|
+
},
|
|
1099
|
+
"aria-label": "Close",
|
|
1100
|
+
type: "button",
|
|
1101
|
+
children: "\xD7"
|
|
1102
|
+
}
|
|
1103
|
+
)
|
|
1104
|
+
] })
|
|
765
1105
|
] }),
|
|
766
|
-
/* @__PURE__ */
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
/* @__PURE__ */
|
|
769
|
-
/* @__PURE__ */
|
|
770
|
-
/* @__PURE__ */
|
|
1106
|
+
/* @__PURE__ */ jsxs5("div", { style: bodyStyle, children: [
|
|
1107
|
+
/* @__PURE__ */ jsx7("p", { style: { marginTop: 0, marginBottom: "1.5rem", opacity: 0.8, fontSize: "0.875rem" }, children: translations.bannerDescription || "Manage your cookie preferences. Some cookies are essential for the site to function properly." }),
|
|
1108
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", gap: "1rem", marginBottom: "1.5rem" }, children: [
|
|
1109
|
+
/* @__PURE__ */ jsx7("button", { onClick: handleAcceptAll, style: buttonTextStyle, type: "button", children: "Enable All" }),
|
|
1110
|
+
/* @__PURE__ */ jsx7("button", { onClick: handleRejectAll, style: buttonTextStyle, type: "button", children: "Disable All" })
|
|
771
1111
|
] }),
|
|
772
1112
|
config.categories.filter((cat) => cat.enabled).map((category) => {
|
|
773
1113
|
const categoryTranslation = translations.categories?.[category.code];
|
|
774
1114
|
const isEnabled = localConsent[category.code] ?? category.defaultState;
|
|
775
|
-
return /* @__PURE__ */
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */
|
|
1115
|
+
return /* @__PURE__ */ jsxs5("div", { style: categoryStyle, children: [
|
|
1116
|
+
/* @__PURE__ */ jsxs5("div", { style: toggleContainerStyle, children: [
|
|
1117
|
+
/* @__PURE__ */ jsxs5("div", { style: { display: "flex", alignItems: "baseline", flexWrap: "wrap" }, children: [
|
|
1118
|
+
/* @__PURE__ */ jsx7(
|
|
779
1119
|
"h3",
|
|
780
1120
|
{
|
|
781
1121
|
style: {
|
|
@@ -786,19 +1126,19 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
786
1126
|
children: categoryTranslation?.title || category.name
|
|
787
1127
|
}
|
|
788
1128
|
),
|
|
789
|
-
category.isRequired && /* @__PURE__ */
|
|
1129
|
+
category.isRequired && /* @__PURE__ */ jsx7(
|
|
790
1130
|
"span",
|
|
791
1131
|
{
|
|
792
1132
|
style: {
|
|
793
1133
|
fontSize: "0.75rem",
|
|
794
|
-
color: isDark ? "#
|
|
1134
|
+
color: isDark ? "#a1a1aa" : "#71717a",
|
|
795
1135
|
marginLeft: "0.5rem"
|
|
796
1136
|
},
|
|
797
1137
|
children: "(Required)"
|
|
798
1138
|
}
|
|
799
1139
|
)
|
|
800
1140
|
] }),
|
|
801
|
-
/* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ jsx7(
|
|
802
1142
|
Toggle,
|
|
803
1143
|
{
|
|
804
1144
|
checked: isEnabled,
|
|
@@ -808,7 +1148,7 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
808
1148
|
}
|
|
809
1149
|
)
|
|
810
1150
|
] }),
|
|
811
|
-
/* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ jsx7(
|
|
812
1152
|
"p",
|
|
813
1153
|
{
|
|
814
1154
|
style: {
|
|
@@ -822,14 +1162,14 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
822
1162
|
] }, category.code);
|
|
823
1163
|
})
|
|
824
1164
|
] }),
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
/* @__PURE__ */
|
|
827
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ jsxs5("div", { style: footerStyle, children: [
|
|
1166
|
+
/* @__PURE__ */ jsx7("button", { onClick: hidePreferenceCenter, style: buttonSecondaryStyle, type: "button", children: "Cancel" }),
|
|
1167
|
+
/* @__PURE__ */ jsx7("button", { onClick: handleSave, style: buttonPrimaryStyle, type: "button", children: translations.savePreferencesText || "Save Preferences" })
|
|
828
1168
|
] }),
|
|
829
|
-
/* @__PURE__ */
|
|
1169
|
+
/* @__PURE__ */ jsx7("div", { style: {
|
|
830
1170
|
padding: "0.5rem 1.5rem 0.75rem",
|
|
831
1171
|
textAlign: "center"
|
|
832
|
-
}, children: /* @__PURE__ */
|
|
1172
|
+
}, children: /* @__PURE__ */ jsxs5(
|
|
833
1173
|
"a",
|
|
834
1174
|
{
|
|
835
1175
|
href: "https://consent.iqworks.ai",
|
|
@@ -840,12 +1180,12 @@ function PreferenceCenter({ className, theme, style }) {
|
|
|
840
1180
|
alignItems: "center",
|
|
841
1181
|
gap: "0.35rem",
|
|
842
1182
|
fontSize: "0.7rem",
|
|
843
|
-
color: isDark ? "#
|
|
1183
|
+
color: isDark ? "#71717a" : "#a1a1aa",
|
|
844
1184
|
textDecoration: "none"
|
|
845
1185
|
},
|
|
846
1186
|
children: [
|
|
847
1187
|
"Powered by",
|
|
848
|
-
/* @__PURE__ */
|
|
1188
|
+
/* @__PURE__ */ jsx7(ConsentIQLogo, { isDark })
|
|
849
1189
|
]
|
|
850
1190
|
}
|
|
851
1191
|
) })
|
|
@@ -862,7 +1202,7 @@ function Toggle({
|
|
|
862
1202
|
position: "relative",
|
|
863
1203
|
width: "44px",
|
|
864
1204
|
height: "24px",
|
|
865
|
-
backgroundColor: checked ? primaryColor || "#
|
|
1205
|
+
backgroundColor: checked ? primaryColor || "#ff6a00" : "#a1a1aa",
|
|
866
1206
|
borderRadius: "12px",
|
|
867
1207
|
cursor: disabled ? "not-allowed" : "pointer",
|
|
868
1208
|
opacity: disabled ? 0.5 : 1,
|
|
@@ -871,15 +1211,15 @@ function Toggle({
|
|
|
871
1211
|
const thumbStyle = {
|
|
872
1212
|
position: "absolute",
|
|
873
1213
|
top: "2px",
|
|
874
|
-
|
|
1214
|
+
insetInlineStart: checked ? "22px" : "2px",
|
|
875
1215
|
width: "20px",
|
|
876
1216
|
height: "20px",
|
|
877
1217
|
backgroundColor: "#ffffff",
|
|
878
1218
|
borderRadius: "50%",
|
|
879
|
-
transition: "
|
|
1219
|
+
transition: "inset-inline-start 0.2s",
|
|
880
1220
|
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.2)"
|
|
881
1221
|
};
|
|
882
|
-
return /* @__PURE__ */
|
|
1222
|
+
return /* @__PURE__ */ jsx7(
|
|
883
1223
|
"button",
|
|
884
1224
|
{
|
|
885
1225
|
type: "button",
|
|
@@ -888,47 +1228,47 @@ function Toggle({
|
|
|
888
1228
|
onClick: disabled ? void 0 : onChange,
|
|
889
1229
|
style: trackStyle,
|
|
890
1230
|
disabled,
|
|
891
|
-
children: /* @__PURE__ */
|
|
1231
|
+
children: /* @__PURE__ */ jsx7("span", { style: thumbStyle })
|
|
892
1232
|
}
|
|
893
1233
|
);
|
|
894
1234
|
}
|
|
895
1235
|
function ConsentIQLogo({ isDark }) {
|
|
896
1236
|
if (isDark) {
|
|
897
|
-
return /* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
899
|
-
/* @__PURE__ */
|
|
900
|
-
/* @__PURE__ */
|
|
901
|
-
/* @__PURE__ */
|
|
902
|
-
/* @__PURE__ */
|
|
903
|
-
/* @__PURE__ */
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
/* @__PURE__ */
|
|
906
|
-
/* @__PURE__ */
|
|
907
|
-
/* @__PURE__ */
|
|
908
|
-
/* @__PURE__ */
|
|
909
|
-
/* @__PURE__ */
|
|
910
|
-
/* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ jsxs5("svg", { width: "80", height: "14", viewBox: "0 0 487 85", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1238
|
+
/* @__PURE__ */ jsx7("path", { d: "M49.3323 11.8633L41.634 7.59045L12.417 24.7048C9.84034 52.4047 19.3957 71.4081 35.7685 82.4129C20.9524 65.4494 18.5009 39.8252 19.664 29.2678L49.3323 11.8633Z", fill: "#FF6503" }),
|
|
1239
|
+
/* @__PURE__ */ jsx7("path", { d: "M58.8505 6.18471L51.0667 2.15857L43.3711 6.59458L50.9943 10.8186L58.8505 6.18471Z", fill: "white" }),
|
|
1240
|
+
/* @__PURE__ */ jsx7("path", { d: "M28.2107 33.8309C24.131 59.3834 31.5211 76.8658 35.7261 82.413C35.7261 82.413 34.4207 77.3773 33.847 74.0981C31.4064 60.1473 32.3708 50.2576 35.1891 37.8571L66.0559 20.1421C65.3617 30.7093 59.5471 53.4338 42.7104 68.3178C50.6824 64.6214 61.1777 58.5798 64.854 51.8087C64.6636 52.2227 66.2567 49.3651 66.0559 49.771C73.3369 35.6413 74.3274 23.7642 74.3767 15.0422L66.8613 10.7477L28.2107 33.8309Z", fill: "#FF6503" }),
|
|
1241
|
+
/* @__PURE__ */ jsx7("path", { d: "M63.7104 54.4578C57.4728 65.6025 33.8945 74.3768 33.8945 74.3768C33.8945 74.3768 34.1088 75.8873 34.643 78.0695C35.1772 80.2517 35.7138 82.3943 35.7138 82.3943C43.4068 78.4438 55.3104 70.2184 63.7104 54.4578Z", fill: "white" }),
|
|
1242
|
+
/* @__PURE__ */ jsx7("path", { d: "M473.855 85V60.5074C472.26 61.7151 470.473 62.6571 468.492 63.3334C466.512 64.0581 464.362 64.4204 462.043 64.4204C457.985 64.4204 454.314 63.3817 451.029 61.3045C447.744 59.2272 445.111 56.4736 443.13 53.0436C441.198 49.5654 440.231 45.7248 440.231 41.5219C440.231 37.319 441.198 33.4784 443.13 30.0002C445.111 26.5219 447.744 23.7683 451.029 21.7393C454.314 19.6621 457.985 18.6234 462.043 18.6234C464.797 18.6234 467.333 19.1065 469.652 20.0727C471.97 21.0389 473.951 22.3674 475.594 24.0582V19.7828H486.463V85H473.855ZM463.492 53.3335C465.618 53.3335 467.55 52.8021 469.289 51.7393C471.028 50.6765 472.405 49.2513 473.42 47.4639C474.483 45.6765 475.014 43.6958 475.014 41.5219C475.014 39.348 474.483 37.3673 473.42 35.5799C472.405 33.7925 471.028 32.3673 469.289 31.3045C467.55 30.2417 465.618 29.7103 463.492 29.7103C461.367 29.7103 459.434 30.2417 457.695 31.3045C455.956 32.3673 454.555 33.7925 453.492 35.5799C452.478 37.3673 451.971 39.348 451.971 41.5219C451.971 43.6958 452.478 45.6765 453.492 47.4639C454.555 49.2513 455.956 50.6765 457.695 51.7393C459.434 52.8021 461.367 53.3335 463.492 53.3335Z", fill: "#FF6503" }),
|
|
1243
|
+
/* @__PURE__ */ jsx7("path", { d: "M420.133 63.2607V19.7826H432.742V63.2607H420.133ZM426.437 13.4782C424.553 13.4782 422.959 12.826 421.655 11.5217C420.35 10.2174 419.698 8.62316 419.698 6.73911C419.698 4.80675 420.35 3.21255 421.655 1.95651C422.959 0.65217 424.553 0 426.437 0C428.37 0 429.964 0.65217 431.22 1.95651C432.524 3.21255 433.176 4.80675 433.176 6.73911C433.176 8.62316 432.524 10.2174 431.22 11.5217C429.964 12.826 428.37 13.4782 426.437 13.4782Z", fill: "#FF6503" }),
|
|
1244
|
+
/* @__PURE__ */ jsx7("path", { d: "M392.451 63.2607V29.7825H384.335V19.7825H392.668V5.28979H404.842V19.7825H413.465V29.7825H405.06V63.2607H392.451Z", fill: "white" }),
|
|
1245
|
+
/* @__PURE__ */ jsx7("path", { d: "M338.059 63.2605V19.7824H349.363V24.565C350.909 22.536 352.817 20.9901 355.088 19.9273C357.358 18.8645 359.798 18.3331 362.406 18.3331C365.498 18.3331 368.373 19.0819 371.03 20.5795C373.735 22.0288 375.909 24.1785 377.551 27.0288C379.242 29.8307 380.087 33.2365 380.087 37.2461V63.2605H367.479V38.9128C367.479 36.4973 366.754 34.3476 365.305 32.4635C363.856 30.5795 361.778 29.6374 359.073 29.6374C356.899 29.6374 354.943 30.3862 353.203 31.8838C351.513 33.3331 350.667 35.6278 350.667 38.7679V63.2605H338.059Z", fill: "white" }),
|
|
1246
|
+
/* @__PURE__ */ jsx7("path", { d: "M310.56 64.7098C305.68 64.7098 301.381 63.6953 297.661 61.6664C293.941 59.6374 291.043 56.8596 288.966 53.333C286.888 49.7582 285.85 45.6761 285.85 41.0867C285.85 36.6906 286.864 32.8017 288.893 29.4201C290.922 25.9901 293.652 23.2848 297.081 21.3041C300.56 19.3235 304.4 18.3331 308.603 18.3331C312.903 18.3331 316.743 19.3235 320.125 21.3041C323.507 23.2365 326.164 25.8935 328.096 29.2751C330.077 32.6568 331.067 36.4973 331.067 40.7968V45.2171H304.545C303.337 45.2171 302.178 45.1447 301.067 44.9997C299.956 44.8548 298.845 44.6857 297.734 44.4925C298.313 47.391 299.738 49.7582 302.009 51.5939C304.328 53.3813 307.275 54.2751 310.85 54.2751C313.603 54.2751 316.067 53.7195 318.241 52.6084C320.463 51.4973 322.275 50.1205 323.676 48.478L326.429 59.7823C324.255 61.4248 321.792 62.6567 319.038 63.4779C316.333 64.2992 313.507 64.7098 310.56 64.7098ZM297.444 36.8838C299.859 36.3524 302.226 36.0867 304.545 36.0867H312.226C313.579 36.0867 314.859 36.135 316.067 36.2316C317.275 36.3283 318.41 36.4973 319.473 36.7389C318.748 34.1302 317.42 32.0771 315.487 30.5795C313.603 29.0819 311.26 28.3331 308.458 28.3331C305.801 28.3331 303.482 29.1061 301.502 30.6519C299.569 32.1495 298.217 34.2268 297.444 36.8838Z", fill: "white" }),
|
|
1247
|
+
/* @__PURE__ */ jsx7("path", { d: "M263.884 64.7098C260.937 64.7098 257.942 64.2267 254.898 63.2605C251.903 62.2944 249.56 60.99 247.869 59.3475L250.985 47.4635C252.386 49.3959 254.318 51.0867 256.782 52.5359C259.294 53.9852 261.879 54.7098 264.536 54.7098C266.323 54.7098 267.603 54.3717 268.376 53.6954C269.198 53.019 269.608 52.1978 269.608 51.2316C269.608 50.1205 269.198 49.3234 268.376 48.8403C267.555 48.3089 266.71 47.8741 265.84 47.536L259.753 45.2171C258.401 44.6857 256.855 43.9611 255.115 43.0432C253.376 42.1253 251.855 40.821 250.55 39.1302C249.294 37.4394 248.666 35.2171 248.666 32.4635C248.666 29.9515 249.294 27.6326 250.55 25.507C251.806 23.3814 253.618 21.6665 255.985 20.3621C258.401 19.0095 261.299 18.3331 264.681 18.3331C267.821 18.3331 270.743 18.8645 273.449 19.9273C276.202 20.9901 278.207 22.1737 279.463 23.478L276.565 34.9273C274.922 32.8017 272.966 31.1833 270.695 30.0722C268.473 28.9128 266.347 28.3331 264.318 28.3331C262.772 28.3331 261.637 28.6471 260.913 29.2751C260.188 29.9031 259.826 30.6278 259.826 31.449C259.826 32.0771 260.067 32.7051 260.55 33.3331C261.082 33.9128 261.951 34.4442 263.159 34.9273L268.811 37.0287C270.454 37.6084 272.193 38.3814 274.028 39.3476C275.913 40.3137 277.507 41.6664 278.811 43.4055C280.115 45.0963 280.768 47.4393 280.768 50.4345C280.768 54.6374 279.198 58.0673 276.057 60.7243C272.966 63.3813 268.908 64.7098 263.884 64.7098Z", fill: "white" }),
|
|
1248
|
+
/* @__PURE__ */ jsx7("path", { d: "M198.861 63.2605V19.7824H210.166V24.565C211.712 22.536 213.62 20.9901 215.89 19.9273C218.161 18.8645 220.6 18.3331 223.209 18.3331C226.301 18.3331 229.175 19.0819 231.832 20.5795C234.538 22.0288 236.711 24.1785 238.354 27.0288C240.045 29.8307 240.89 33.2365 240.89 37.2461V63.2605H228.282V38.9128C228.282 36.4973 227.557 34.3476 226.108 32.4635C224.658 30.5795 222.581 29.6374 219.876 29.6374C217.702 29.6374 215.745 30.3862 214.006 31.8838C212.315 33.3331 211.47 35.6278 211.47 38.7679V63.2605H198.861Z", fill: "white" }),
|
|
1249
|
+
/* @__PURE__ */ jsx7("path", { d: "M167.99 64.7098C163.69 64.7098 159.753 63.6712 156.178 61.5939C152.603 59.5166 149.753 56.7147 147.628 53.1881C145.55 49.6616 144.512 45.7727 144.512 41.5215C144.512 37.222 145.55 33.3331 147.628 29.8548C149.753 26.3283 152.603 23.5264 156.178 21.4491C159.753 19.3718 163.69 18.3331 167.99 18.3331C172.338 18.3331 176.275 19.3718 179.801 21.4491C183.376 23.5264 186.202 26.3283 188.28 29.8548C190.405 33.3331 191.468 37.222 191.468 41.5215C191.468 45.7727 190.405 49.6616 188.28 53.1881C186.202 56.7147 183.376 59.5166 179.801 61.5939C176.275 63.6712 172.338 64.7098 167.99 64.7098ZM167.99 53.4055C170.164 53.4055 172.12 52.8741 173.859 51.8113C175.647 50.7485 177.048 49.3234 178.062 47.536C179.125 45.7002 179.657 43.6954 179.657 41.5215C179.657 39.2993 179.125 37.2944 178.062 35.507C177.048 33.7196 175.647 32.2944 173.859 31.2316C172.12 30.1688 170.164 29.6374 167.99 29.6374C165.816 29.6374 163.835 30.1688 162.048 31.2316C160.309 32.2944 158.908 33.7196 157.845 35.507C156.831 37.2944 156.323 39.2993 156.323 41.5215C156.323 43.6954 156.831 45.7002 157.845 47.536C158.908 49.3234 160.309 50.7485 162.048 51.8113C163.835 52.8741 165.816 53.4055 167.99 53.4055Z", fill: "white" }),
|
|
1250
|
+
/* @__PURE__ */ jsx7("path", { d: "M124.478 64.7098C120.179 64.7098 116.242 63.6712 112.667 61.5939C109.092 59.5166 106.242 56.7147 104.116 53.1881C102.039 49.6616 101 45.7727 101 41.5215C101 37.222 102.039 33.3331 104.116 29.8548C106.242 26.3283 109.092 23.5264 112.667 21.4491C116.242 19.3718 120.179 18.3331 124.478 18.3331C127.473 18.3331 130.299 18.8404 132.956 19.8549C135.662 20.821 138.053 22.2703 140.13 24.2027L136.869 37.0287C135.662 35.0481 134.043 33.3331 132.014 31.8838C130.034 30.3862 127.691 29.6374 124.985 29.6374C122.715 29.6374 120.686 30.1688 118.899 31.2316C117.111 32.2944 115.71 33.7196 114.696 35.507C113.681 37.2944 113.174 39.2993 113.174 41.5215C113.174 43.6954 113.681 45.7002 114.696 47.536C115.71 49.3234 117.111 50.7485 118.899 51.8113C120.686 52.8741 122.715 53.4055 124.985 53.4055C127.691 53.4055 130.034 52.6809 132.014 51.2316C134.043 49.734 135.662 47.9949 136.869 46.0142L140.13 58.8403C138.053 60.7726 135.662 62.2461 132.956 63.2605C130.299 64.2267 127.473 64.7098 124.478 64.7098Z", fill: "white" })
|
|
911
1251
|
] });
|
|
912
1252
|
}
|
|
913
|
-
return /* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */
|
|
917
|
-
/* @__PURE__ */
|
|
918
|
-
/* @__PURE__ */
|
|
919
|
-
/* @__PURE__ */
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
/* @__PURE__ */
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
-
/* @__PURE__ */
|
|
926
|
-
/* @__PURE__ */
|
|
1253
|
+
return /* @__PURE__ */ jsxs5("svg", { width: "80", height: "14", viewBox: "0 0 487 85", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1254
|
+
/* @__PURE__ */ jsx7("path", { d: "M48.6448 12.0775L40.9465 7.80469L11.7295 24.9191C9.15284 52.6189 18.7082 71.6223 35.081 82.6271C20.2649 65.6636 17.8134 40.0395 18.9765 29.482L48.6448 12.0775Z", fill: "#FF6503" }),
|
|
1255
|
+
/* @__PURE__ */ jsx7("path", { d: "M58.163 6.39894L50.3792 2.3728L42.6836 6.80882L50.3068 11.0328L58.163 6.39894Z", fill: "#3A3A3A" }),
|
|
1256
|
+
/* @__PURE__ */ jsx7("path", { d: "M27.5232 34.0452C23.4435 59.5977 30.8336 77.08 35.0386 82.6272C35.0386 82.6272 33.7332 77.5916 33.1595 74.3123C30.7189 60.3615 31.6833 50.4718 34.5016 38.0713L65.3684 20.3563C64.6742 30.9236 58.8596 53.6481 42.0229 68.532C49.9949 64.8357 60.4902 58.794 64.1665 52.0229C63.9761 52.437 65.5692 49.5794 65.3684 49.9853C72.6494 35.8555 73.6399 23.9785 73.6892 15.2564L66.1738 10.9619L27.5232 34.0452Z", fill: "#FF6503" }),
|
|
1257
|
+
/* @__PURE__ */ jsx7("path", { d: "M63.0229 54.672C56.7853 65.8167 33.207 74.5911 33.207 74.5911C33.207 74.5911 33.4213 76.1015 33.9555 78.2837C34.4897 80.4659 35.0263 82.6085 35.0263 82.6085C42.7193 78.658 54.6229 70.4326 63.0229 54.672Z", fill: "#3A3A3A" }),
|
|
1258
|
+
/* @__PURE__ */ jsx7("path", { d: "M473.854 85V60.5074C472.259 61.7151 470.472 62.6571 468.491 63.3334C466.511 64.0581 464.361 64.4204 462.042 64.4204C457.984 64.4204 454.313 63.3817 451.028 61.3045C447.743 59.2272 445.11 56.4736 443.129 53.0436C441.197 49.5654 440.23 45.7248 440.23 41.5219C440.23 37.319 441.197 33.4784 443.129 30.0002C445.11 26.5219 447.743 23.7683 451.028 21.7393C454.313 19.6621 457.984 18.6234 462.042 18.6234C464.796 18.6234 467.332 19.1065 469.651 20.0727C471.969 21.0389 473.95 22.3674 475.593 24.0582V19.7828H486.462V85H473.854ZM463.491 53.3335C465.617 53.3335 467.549 52.8021 469.288 51.7393C471.027 50.6765 472.404 49.2513 473.419 47.4639C474.482 45.6765 475.013 43.6958 475.013 41.5219C475.013 39.348 474.482 37.3673 473.419 35.5799C472.404 33.7925 471.027 32.3673 469.288 31.3045C467.549 30.2417 465.617 29.7103 463.491 29.7103C461.366 29.7103 459.433 30.2417 457.694 31.3045C455.955 32.3673 454.554 33.7925 453.491 35.5799C452.477 37.3673 451.97 39.348 451.97 41.5219C451.97 43.6958 452.477 45.6765 453.491 47.4639C454.554 49.2513 455.955 50.6765 457.694 51.7393C459.433 52.8021 461.366 53.3335 463.491 53.3335Z", fill: "#FF6503" }),
|
|
1259
|
+
/* @__PURE__ */ jsx7("path", { d: "M420.132 63.2607V19.7826H432.741V63.2607H420.132ZM426.436 13.4782C424.552 13.4782 422.958 12.826 421.654 11.5217C420.349 10.2174 419.697 8.62316 419.697 6.73911C419.697 4.80675 420.349 3.21255 421.654 1.95651C422.958 0.65217 424.552 0 426.436 0C428.369 0 429.963 0.65217 431.219 1.95651C432.523 3.21255 433.175 4.80675 433.175 6.73911C433.175 8.62316 432.523 10.2174 431.219 11.5217C429.963 12.826 428.369 13.4782 426.436 13.4782Z", fill: "#FF6503" }),
|
|
1260
|
+
/* @__PURE__ */ jsx7("path", { d: "M392.452 63.2607V29.7825H384.336V19.7825H392.669V5.28979H404.843V19.7825H413.466V29.7825H405.061V63.2607H392.452Z", fill: "#3A3A3A" }),
|
|
1261
|
+
/* @__PURE__ */ jsx7("path", { d: "M338.059 63.2605V19.7824H349.363V24.565C350.909 22.536 352.817 20.9901 355.088 19.9273C357.358 18.8645 359.798 18.3331 362.406 18.3331C365.498 18.3331 368.373 19.0819 371.03 20.5795C373.735 22.0288 375.909 24.1785 377.551 27.0288C379.242 29.8307 380.087 33.2365 380.087 37.2461V63.2605H367.479V38.9128C367.479 36.4973 366.754 34.3476 365.305 32.4635C363.856 30.5795 361.778 29.6374 359.073 29.6374C356.899 29.6374 354.943 30.3862 353.203 31.8838C351.513 33.3331 350.667 35.6278 350.667 38.7679V63.2605H338.059Z", fill: "#3A3A3A" }),
|
|
1262
|
+
/* @__PURE__ */ jsx7("path", { d: "M310.56 64.7098C305.68 64.7098 301.381 63.6953 297.661 61.6664C293.941 59.6374 291.043 56.8596 288.966 53.333C286.888 49.7582 285.85 45.6761 285.85 41.0867C285.85 36.6906 286.864 32.8017 288.893 29.4201C290.922 25.9901 293.652 23.2848 297.081 21.3041C300.56 19.3235 304.4 18.3331 308.603 18.3331C312.903 18.3331 316.743 19.3235 320.125 21.3041C323.507 23.2365 326.164 25.8935 328.096 29.2751C330.077 32.6568 331.067 36.4973 331.067 40.7968V45.2171H304.545C303.337 45.2171 302.178 45.1447 301.067 44.9997C299.956 44.8548 298.845 44.6857 297.734 44.4925C298.313 47.391 299.738 49.7582 302.009 51.5939C304.328 53.3813 307.275 54.2751 310.85 54.2751C313.603 54.2751 316.067 53.7195 318.241 52.6084C320.463 51.4973 322.275 50.1205 323.676 48.478L326.429 59.7823C324.255 61.4248 321.792 62.6567 319.038 63.4779C316.333 64.2992 313.507 64.7098 310.56 64.7098ZM297.444 36.8838C299.859 36.3524 302.226 36.0867 304.545 36.0867H312.226C313.579 36.0867 314.859 36.135 316.067 36.2316C317.275 36.3283 318.41 36.4973 319.473 36.7389C318.748 34.1302 317.42 32.0771 315.487 30.5795C313.603 29.0819 311.26 28.3331 308.458 28.3331C305.801 28.3331 303.482 29.1061 301.502 30.6519C299.569 32.1495 298.217 34.2268 297.444 36.8838Z", fill: "#3A3A3A" }),
|
|
1263
|
+
/* @__PURE__ */ jsx7("path", { d: "M263.884 64.7098C260.937 64.7098 257.942 64.2267 254.898 63.2605C251.903 62.2944 249.56 60.99 247.869 59.3475L250.985 47.4635C252.386 49.3959 254.318 51.0867 256.782 52.5359C259.294 53.9852 261.879 54.7098 264.536 54.7098C266.323 54.7098 267.603 54.3717 268.376 53.6954C269.198 53.019 269.608 52.1978 269.608 51.2316C269.608 50.1205 269.198 49.3234 268.376 48.8403C267.555 48.3089 266.71 47.8741 265.84 47.536L259.753 45.2171C258.401 44.6857 256.855 43.9611 255.115 43.0432C253.376 42.1253 251.855 40.821 250.55 39.1302C249.294 37.4394 248.666 35.2171 248.666 32.4635C248.666 29.9515 249.294 27.6326 250.55 25.507C251.806 23.3814 253.618 21.6665 255.985 20.3621C258.401 19.0095 261.299 18.3331 264.681 18.3331C267.821 18.3331 270.743 18.8645 273.449 19.9273C276.202 20.9901 278.207 22.1737 279.463 23.478L276.565 34.9273C274.922 32.8017 272.966 31.1833 270.695 30.0722C268.473 28.9128 266.347 28.3331 264.318 28.3331C262.772 28.3331 261.637 28.6471 260.913 29.2751C260.188 29.9031 259.826 30.6278 259.826 31.449C259.826 32.0771 260.067 32.7051 260.55 33.3331C261.082 33.9128 261.951 34.4442 263.159 34.9273L268.811 37.0287C270.454 37.6084 272.193 38.3814 274.028 39.3476C275.913 40.3137 277.507 41.6664 278.811 43.4055C280.115 45.0963 280.768 47.4393 280.768 50.4345C280.768 54.6374 279.198 58.0673 276.057 60.7243C272.966 63.3813 268.908 64.7098 263.884 64.7098Z", fill: "#3A3A3A" }),
|
|
1264
|
+
/* @__PURE__ */ jsx7("path", { d: "M198.861 63.2605V19.7824H210.166V24.565C211.712 22.536 213.62 20.9901 215.89 19.9273C218.161 18.8645 220.6 18.3331 223.209 18.3331C226.301 18.3331 229.175 19.0819 231.832 20.5795C234.538 22.0288 236.711 24.1785 238.354 27.0288C240.045 29.8307 240.89 33.2365 240.89 37.2461V63.2605H228.282V38.9128C228.282 36.4973 227.557 34.3476 226.108 32.4635C224.658 30.5795 222.581 29.6374 219.876 29.6374C217.702 29.6374 215.745 30.3862 214.006 31.8838C212.315 33.3331 211.47 35.6278 211.47 38.7679V63.2605H198.861Z", fill: "#3A3A3A" }),
|
|
1265
|
+
/* @__PURE__ */ jsx7("path", { d: "M167.99 64.7098C163.69 64.7098 159.753 63.6712 156.178 61.5939C152.603 59.5166 149.753 56.7147 147.628 53.1881C145.55 49.6616 144.512 45.7727 144.512 41.5215C144.512 37.222 145.55 33.3331 147.628 29.8548C149.753 26.3283 152.603 23.5264 156.178 21.4491C159.753 19.3718 163.69 18.3331 167.99 18.3331C172.338 18.3331 176.275 19.3718 179.801 21.4491C183.376 23.5264 186.202 26.3283 188.28 29.8548C190.405 33.3331 191.468 37.222 191.468 41.5215C191.468 45.7727 190.405 49.6616 188.28 53.1881C186.202 56.7147 183.376 59.5166 179.801 61.5939C176.275 63.6712 172.338 64.7098 167.99 64.7098ZM167.99 53.4055C170.164 53.4055 172.12 52.8741 173.859 51.8113C175.647 50.7485 177.048 49.3234 178.062 47.536C179.125 45.7002 179.657 43.6954 179.657 41.5215C179.657 39.2993 179.125 37.2944 178.062 35.507C177.048 33.7196 175.647 32.2944 173.859 31.2316C172.12 30.1688 170.164 29.6374 167.99 29.6374C165.816 29.6374 163.835 30.1688 162.048 31.2316C160.309 32.2944 158.908 33.7196 157.845 35.507C156.831 37.2944 156.323 39.2993 156.323 41.5215C156.323 43.6954 156.831 45.7002 157.845 47.536C158.908 49.3234 160.309 50.7485 162.048 51.8113C163.835 52.8741 165.816 53.4055 167.99 53.4055Z", fill: "#3A3A3A" }),
|
|
1266
|
+
/* @__PURE__ */ jsx7("path", { d: "M124.478 64.7098C120.179 64.7098 116.242 63.6712 112.667 61.5939C109.092 59.5166 106.242 56.7147 104.116 53.1881C102.039 49.6616 101 45.7727 101 41.5215C101 37.222 102.039 33.3331 104.116 29.8548C106.242 26.3283 109.092 23.5264 112.667 21.4491C116.242 19.3718 120.179 18.3331 124.478 18.3331C127.473 18.3331 130.299 18.8404 132.956 19.8549C135.662 20.821 138.053 22.2703 140.13 24.2027L136.869 37.0287C135.662 35.0481 134.043 33.3331 132.014 31.8838C130.034 30.3862 127.691 29.6374 124.985 29.6374C122.715 29.6374 120.686 30.1688 118.899 31.2316C117.111 32.2944 115.71 33.7196 114.696 35.507C113.681 37.2944 113.174 39.2993 113.174 41.5215C113.174 43.6954 113.681 45.7002 114.696 47.536C115.71 49.3234 117.111 50.7485 118.899 51.8113C120.686 52.8741 122.715 53.4055 124.985 53.4055C127.691 53.4055 130.034 52.6809 132.014 51.2316C134.043 49.734 135.662 47.9949 136.869 46.0142L140.13 58.8403C138.053 60.7726 135.662 62.2461 132.956 63.2605C130.299 64.2267 127.473 64.7098 124.478 64.7098Z", fill: "#3A3A3A" })
|
|
927
1267
|
] });
|
|
928
1268
|
}
|
|
929
1269
|
|
|
930
1270
|
// src/components/ConsentGate.tsx
|
|
931
|
-
import { Fragment as
|
|
1271
|
+
import { Fragment as Fragment4, jsx as jsx8 } from "react/jsx-runtime";
|
|
932
1272
|
function ConsentGate({
|
|
933
1273
|
category,
|
|
934
1274
|
children,
|
|
@@ -937,12 +1277,12 @@ function ConsentGate({
|
|
|
937
1277
|
}) {
|
|
938
1278
|
const { hasConsent, isLoading } = useConsentGate(category);
|
|
939
1279
|
if (isLoading) {
|
|
940
|
-
return /* @__PURE__ */
|
|
1280
|
+
return /* @__PURE__ */ jsx8(Fragment4, { children: loading });
|
|
941
1281
|
}
|
|
942
1282
|
if (hasConsent) {
|
|
943
|
-
return /* @__PURE__ */
|
|
1283
|
+
return /* @__PURE__ */ jsx8(Fragment4, { children });
|
|
944
1284
|
}
|
|
945
|
-
return /* @__PURE__ */
|
|
1285
|
+
return /* @__PURE__ */ jsx8(Fragment4, { children: fallback });
|
|
946
1286
|
}
|
|
947
1287
|
function withConsentGate(Component, category, FallbackComponent) {
|
|
948
1288
|
return function ConsentGatedComponent(props) {
|
|
@@ -951,19 +1291,284 @@ function withConsentGate(Component, category, FallbackComponent) {
|
|
|
951
1291
|
return null;
|
|
952
1292
|
}
|
|
953
1293
|
if (hasConsent) {
|
|
954
|
-
return /* @__PURE__ */
|
|
1294
|
+
return /* @__PURE__ */ jsx8(Component, { ...props });
|
|
955
1295
|
}
|
|
956
1296
|
if (FallbackComponent) {
|
|
957
|
-
return /* @__PURE__ */
|
|
1297
|
+
return /* @__PURE__ */ jsx8(FallbackComponent, { ...props });
|
|
958
1298
|
}
|
|
959
1299
|
return null;
|
|
960
1300
|
};
|
|
961
1301
|
}
|
|
1302
|
+
|
|
1303
|
+
// src/components/MarketingConsentForm.tsx
|
|
1304
|
+
import { forwardRef, useImperativeHandle } from "react";
|
|
1305
|
+
|
|
1306
|
+
// src/hooks/useFormConsent.ts
|
|
1307
|
+
import { useState as useState7, useEffect as useEffect6, useCallback as useCallback4, useRef } from "react";
|
|
1308
|
+
var configCache = /* @__PURE__ */ new Map();
|
|
1309
|
+
var CONFIG_TTL = 6e4;
|
|
1310
|
+
function getCachedConfig(propertyKey) {
|
|
1311
|
+
const entry = configCache.get(propertyKey);
|
|
1312
|
+
if (entry && Date.now() - entry.timestamp < CONFIG_TTL) {
|
|
1313
|
+
return entry.config;
|
|
1314
|
+
}
|
|
1315
|
+
return null;
|
|
1316
|
+
}
|
|
1317
|
+
function setCachedConfig(propertyKey, config) {
|
|
1318
|
+
configCache.set(propertyKey, { config, timestamp: Date.now() });
|
|
1319
|
+
}
|
|
1320
|
+
function useFormConsent(options) {
|
|
1321
|
+
const { propertyKey, apiUrl, subjectId, subjectType = "visitor", debug = false } = options;
|
|
1322
|
+
const [config, setConfig] = useState7(() => getCachedConfig(propertyKey));
|
|
1323
|
+
const [consents, setConsents] = useState7({});
|
|
1324
|
+
const [isLoading, setIsLoading] = useState7(!getCachedConfig(propertyKey));
|
|
1325
|
+
const [isSubmitting, setIsSubmitting] = useState7(false);
|
|
1326
|
+
const [error, setError] = useState7(null);
|
|
1327
|
+
const [lastSubmission, setLastSubmission] = useState7(null);
|
|
1328
|
+
const apiClientRef = useRef(null);
|
|
1329
|
+
useEffect6(() => {
|
|
1330
|
+
if (config) return;
|
|
1331
|
+
let cancelled = false;
|
|
1332
|
+
const client = new ConsentIQApiClient(propertyKey, apiUrl, debug);
|
|
1333
|
+
apiClientRef.current = client;
|
|
1334
|
+
client.getConfig().then((cfg) => {
|
|
1335
|
+
if (cancelled) return;
|
|
1336
|
+
setCachedConfig(propertyKey, cfg);
|
|
1337
|
+
setConfig(cfg);
|
|
1338
|
+
setIsLoading(false);
|
|
1339
|
+
}).catch((err) => {
|
|
1340
|
+
if (cancelled) return;
|
|
1341
|
+
setError(err.message || "Failed to load config");
|
|
1342
|
+
setIsLoading(false);
|
|
1343
|
+
});
|
|
1344
|
+
return () => {
|
|
1345
|
+
cancelled = true;
|
|
1346
|
+
};
|
|
1347
|
+
}, [propertyKey, apiUrl, debug]);
|
|
1348
|
+
const privacyNoticeUrl = (() => {
|
|
1349
|
+
if (!config) return null;
|
|
1350
|
+
const currentPath = typeof window !== "undefined" ? window.location.pathname : "/";
|
|
1351
|
+
const sources = config.formConsentSources || [];
|
|
1352
|
+
for (const source of sources) {
|
|
1353
|
+
if (!source.selector) continue;
|
|
1354
|
+
const selectorPath = source.selector.startsWith("/") ? source.selector.split("#")[0] : null;
|
|
1355
|
+
if (selectorPath && currentPath.startsWith(selectorPath)) {
|
|
1356
|
+
const noticeParam = source.privacyNotice.id;
|
|
1357
|
+
return `${config.privacyNoticeUrl}?notice=${noticeParam}`;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
return config.privacyNoticeUrl;
|
|
1361
|
+
})();
|
|
1362
|
+
const channels = config?.marketingChannels || [];
|
|
1363
|
+
const setConsent = useCallback4((channel, value) => {
|
|
1364
|
+
setConsents((prev) => ({ ...prev, [channel]: value }));
|
|
1365
|
+
}, []);
|
|
1366
|
+
const setAllConsents = useCallback4((value) => {
|
|
1367
|
+
if (!config) return;
|
|
1368
|
+
const newConsents = {};
|
|
1369
|
+
for (const ch of config.marketingChannels) {
|
|
1370
|
+
newConsents[ch.code] = value;
|
|
1371
|
+
}
|
|
1372
|
+
setConsents(newConsents);
|
|
1373
|
+
}, [config]);
|
|
1374
|
+
const submit = useCallback4(async () => {
|
|
1375
|
+
if (!subjectId) {
|
|
1376
|
+
setError("subjectId is required");
|
|
1377
|
+
return null;
|
|
1378
|
+
}
|
|
1379
|
+
if (!apiClientRef.current) {
|
|
1380
|
+
setError("API client not initialized");
|
|
1381
|
+
return null;
|
|
1382
|
+
}
|
|
1383
|
+
setIsSubmitting(true);
|
|
1384
|
+
setError(null);
|
|
1385
|
+
try {
|
|
1386
|
+
const result = await apiClientRef.current.submitConsent({
|
|
1387
|
+
subjectId,
|
|
1388
|
+
subjectType,
|
|
1389
|
+
marketingConsents: consents,
|
|
1390
|
+
consentMethod: "form"
|
|
1391
|
+
});
|
|
1392
|
+
const submission = { consentId: result.consentId, proofHash: result.proofHash };
|
|
1393
|
+
setLastSubmission(submission);
|
|
1394
|
+
setIsSubmitting(false);
|
|
1395
|
+
return submission;
|
|
1396
|
+
} catch (err) {
|
|
1397
|
+
const message = err instanceof Error ? err.message : "Failed to submit consent";
|
|
1398
|
+
setError(message);
|
|
1399
|
+
setIsSubmitting(false);
|
|
1400
|
+
return null;
|
|
1401
|
+
}
|
|
1402
|
+
}, [subjectId, subjectType, consents]);
|
|
1403
|
+
return {
|
|
1404
|
+
channels,
|
|
1405
|
+
consents,
|
|
1406
|
+
privacyNoticeUrl,
|
|
1407
|
+
lastSubmission,
|
|
1408
|
+
setConsent,
|
|
1409
|
+
setAllConsents,
|
|
1410
|
+
submit,
|
|
1411
|
+
isLoading,
|
|
1412
|
+
isSubmitting,
|
|
1413
|
+
error
|
|
1414
|
+
};
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
// src/components/MarketingConsentForm.tsx
|
|
1418
|
+
import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1419
|
+
var MarketingConsentForm = forwardRef(
|
|
1420
|
+
function MarketingConsentForm2({
|
|
1421
|
+
propertyKey,
|
|
1422
|
+
apiUrl,
|
|
1423
|
+
subjectId,
|
|
1424
|
+
subjectType,
|
|
1425
|
+
mode = "simple",
|
|
1426
|
+
simpleLabel,
|
|
1427
|
+
channels: channelFilter,
|
|
1428
|
+
onConsentSubmitted,
|
|
1429
|
+
onConsentChange,
|
|
1430
|
+
autoSubmit = false,
|
|
1431
|
+
className,
|
|
1432
|
+
style,
|
|
1433
|
+
showDescriptions = false,
|
|
1434
|
+
showPrivacyLink = true,
|
|
1435
|
+
privacyLinkText = "Privacy Policy",
|
|
1436
|
+
privacyUrl: privacyUrlOverride
|
|
1437
|
+
}, ref) {
|
|
1438
|
+
const resolvedPropertyKey = propertyKey || "";
|
|
1439
|
+
const {
|
|
1440
|
+
channels,
|
|
1441
|
+
consents,
|
|
1442
|
+
privacyNoticeUrl,
|
|
1443
|
+
setConsent,
|
|
1444
|
+
setAllConsents,
|
|
1445
|
+
submit,
|
|
1446
|
+
isLoading,
|
|
1447
|
+
isSubmitting
|
|
1448
|
+
} = useFormConsent({
|
|
1449
|
+
propertyKey: resolvedPropertyKey,
|
|
1450
|
+
apiUrl,
|
|
1451
|
+
subjectId,
|
|
1452
|
+
subjectType
|
|
1453
|
+
});
|
|
1454
|
+
const privacyUrl = privacyUrlOverride || privacyNoticeUrl;
|
|
1455
|
+
const visibleChannels = channelFilter ? channels.filter((ch) => channelFilter.includes(ch.code)) : channels;
|
|
1456
|
+
useImperativeHandle(ref, () => ({
|
|
1457
|
+
submit: async () => {
|
|
1458
|
+
const result = await submit();
|
|
1459
|
+
if (result && onConsentSubmitted) {
|
|
1460
|
+
onConsentSubmitted({ ...result, consents });
|
|
1461
|
+
}
|
|
1462
|
+
return result;
|
|
1463
|
+
},
|
|
1464
|
+
getConsents: () => consents,
|
|
1465
|
+
reset: () => setAllConsents(false)
|
|
1466
|
+
}), [submit, consents, onConsentSubmitted, setAllConsents]);
|
|
1467
|
+
const handleChange = (channel, value) => {
|
|
1468
|
+
setConsent(channel, value);
|
|
1469
|
+
const updated = { ...consents, [channel]: value };
|
|
1470
|
+
onConsentChange?.(updated);
|
|
1471
|
+
if (autoSubmit) {
|
|
1472
|
+
submit().then((result) => {
|
|
1473
|
+
if (result && onConsentSubmitted) {
|
|
1474
|
+
onConsentSubmitted({ ...result, consents: updated });
|
|
1475
|
+
}
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
};
|
|
1479
|
+
const handleSimpleChange = (checked) => {
|
|
1480
|
+
setAllConsents(checked);
|
|
1481
|
+
const updated = {};
|
|
1482
|
+
for (const ch of visibleChannels) {
|
|
1483
|
+
updated[ch.code] = checked;
|
|
1484
|
+
}
|
|
1485
|
+
onConsentChange?.(updated);
|
|
1486
|
+
if (autoSubmit) {
|
|
1487
|
+
submit().then((result) => {
|
|
1488
|
+
if (result && onConsentSubmitted) {
|
|
1489
|
+
onConsentSubmitted({ ...result, consents: updated });
|
|
1490
|
+
}
|
|
1491
|
+
});
|
|
1492
|
+
}
|
|
1493
|
+
};
|
|
1494
|
+
if (isLoading) {
|
|
1495
|
+
return null;
|
|
1496
|
+
}
|
|
1497
|
+
const allChecked = visibleChannels.length > 0 && visibleChannels.every((ch) => consents[ch.code]);
|
|
1498
|
+
return /* @__PURE__ */ jsx9("div", { className, style: { fontSize: "14px", ...style }, children: mode === "simple" ? /* @__PURE__ */ jsxs6("label", { style: { display: "flex", alignItems: "flex-start", gap: "8px", cursor: "pointer" }, children: [
|
|
1499
|
+
/* @__PURE__ */ jsx9(
|
|
1500
|
+
"input",
|
|
1501
|
+
{
|
|
1502
|
+
type: "checkbox",
|
|
1503
|
+
checked: allChecked,
|
|
1504
|
+
onChange: (e) => handleSimpleChange(e.target.checked),
|
|
1505
|
+
disabled: isSubmitting,
|
|
1506
|
+
style: { marginTop: "3px" }
|
|
1507
|
+
}
|
|
1508
|
+
),
|
|
1509
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
1510
|
+
simpleLabel || "I agree to receive marketing communications",
|
|
1511
|
+
showPrivacyLink && privacyUrl && /* @__PURE__ */ jsxs6(Fragment5, { children: [
|
|
1512
|
+
". ",
|
|
1513
|
+
/* @__PURE__ */ jsx9(
|
|
1514
|
+
"a",
|
|
1515
|
+
{
|
|
1516
|
+
href: privacyUrl,
|
|
1517
|
+
target: "_blank",
|
|
1518
|
+
rel: "noopener noreferrer",
|
|
1519
|
+
style: { textDecoration: "underline" },
|
|
1520
|
+
children: privacyLinkText
|
|
1521
|
+
}
|
|
1522
|
+
)
|
|
1523
|
+
] })
|
|
1524
|
+
] })
|
|
1525
|
+
] }) : /* @__PURE__ */ jsxs6("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
1526
|
+
visibleChannels.map((ch) => /* @__PURE__ */ jsxs6(
|
|
1527
|
+
"label",
|
|
1528
|
+
{
|
|
1529
|
+
style: { display: "flex", alignItems: "flex-start", gap: "8px", cursor: "pointer" },
|
|
1530
|
+
children: [
|
|
1531
|
+
/* @__PURE__ */ jsx9(
|
|
1532
|
+
"input",
|
|
1533
|
+
{
|
|
1534
|
+
type: "checkbox",
|
|
1535
|
+
checked: consents[ch.code] === true,
|
|
1536
|
+
onChange: (e) => handleChange(ch.code, e.target.checked),
|
|
1537
|
+
disabled: isSubmitting,
|
|
1538
|
+
style: { marginTop: "3px" }
|
|
1539
|
+
}
|
|
1540
|
+
),
|
|
1541
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
1542
|
+
/* @__PURE__ */ jsx9("strong", { children: ch.name }),
|
|
1543
|
+
showDescriptions && ch.description && /* @__PURE__ */ jsx9("span", { style: { display: "block", color: "#666", fontSize: "12px" }, children: ch.description })
|
|
1544
|
+
] })
|
|
1545
|
+
]
|
|
1546
|
+
},
|
|
1547
|
+
ch.code
|
|
1548
|
+
)),
|
|
1549
|
+
showPrivacyLink && privacyUrl && /* @__PURE__ */ jsx9(
|
|
1550
|
+
"a",
|
|
1551
|
+
{
|
|
1552
|
+
href: privacyUrl,
|
|
1553
|
+
target: "_blank",
|
|
1554
|
+
rel: "noopener noreferrer",
|
|
1555
|
+
style: { fontSize: "12px", textDecoration: "underline", color: "#666" },
|
|
1556
|
+
children: privacyLinkText
|
|
1557
|
+
}
|
|
1558
|
+
)
|
|
1559
|
+
] }) });
|
|
1560
|
+
}
|
|
1561
|
+
);
|
|
962
1562
|
export {
|
|
1563
|
+
ConsentForm,
|
|
963
1564
|
ConsentGate,
|
|
964
1565
|
ConsentIQApiClient,
|
|
965
1566
|
ConsentIQProvider,
|
|
1567
|
+
ConsentPageTrigger,
|
|
1568
|
+
ConsentTrigger,
|
|
966
1569
|
CookieBanner,
|
|
1570
|
+
LanguageSelector,
|
|
1571
|
+
MarketingConsentForm,
|
|
967
1572
|
PreferenceCenter,
|
|
968
1573
|
detectCountry,
|
|
969
1574
|
detectLanguage,
|
|
@@ -972,5 +1577,7 @@ export {
|
|
|
972
1577
|
useConsent,
|
|
973
1578
|
useConsentGate,
|
|
974
1579
|
useConsentIQ,
|
|
1580
|
+
useConsentPurposes,
|
|
1581
|
+
useFormConsent,
|
|
975
1582
|
withConsentGate
|
|
976
1583
|
};
|