@tilli-pro/cookieconsent-plugin 0.7.54 → 0.7.60
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/.cache/tsbuildinfo.json +1 -1
- package/demos/demo.html +2 -2
- package/demos/demo.min.html +1 -1
- package/demos/demo.styles.dark.html +2 -2
- package/demos/demo.styles.dark.min.html +1 -1
- package/demos/demo.styles.nudge-website.dark.html +18 -0
- package/demos/demo.styles.nudge-website.dark.min.html +9 -0
- package/demos/demo.styles.nudge-website.light.html +18 -0
- package/demos/demo.styles.nudge-website.light.min.html +9 -0
- package/demos/demo.styles.nudge.dark.html +2 -2
- package/demos/demo.styles.nudge.dark.min.html +1 -1
- package/demos/demo.styles.nudge.light.html +2 -2
- package/demos/demo.styles.nudge.light.min.html +1 -1
- package/demos/demo.styles.tenant_con-edison.dark.html +2 -2
- package/demos/demo.styles.tenant_con-edison.dark.min.html +1 -1
- package/demos/demo.styles.tenant_con-edison.light.html +2 -2
- package/demos/demo.styles.tenant_con-edison.light.min.html +1 -1
- package/demos/demo.styles.tenant_freeman.dark.html +2 -2
- package/demos/demo.styles.tenant_freeman.dark.min.html +1 -1
- package/demos/demo.styles.tenant_freeman.light.html +2 -2
- package/demos/demo.styles.tenant_frontier.dark.html +2 -2
- package/demos/demo.styles.tenant_frontier.dark.min.html +1 -1
- package/demos/demo.styles.tenant_frontier.light.html +2 -2
- package/demos/demo.styles.tenant_frontier.light.min.html +1 -1
- package/demos/demo.styles.tenant_oru.dark.html +2 -2
- package/demos/demo.styles.tenant_oru.dark.min.html +1 -1
- package/demos/demo.styles.tenant_oru.light.html +2 -2
- package/demos/demo.styles.tenant_oru.light.min.html +1 -1
- package/demos/demo.styles.tilli-pay.dark.html +2 -2
- package/demos/demo.styles.tilli-pay.dark.min.html +1 -1
- package/demos/demo.styles.tilli-pay.light.html +2 -2
- package/demos/demo.styles.tilli-pay.light.min.html +1 -1
- package/demos/demo.styles.tilli-website.dark.html +2 -2
- package/demos/demo.styles.tilli-website.dark.min.html +1 -1
- package/demos/demo.styles.tilli-website.light.html +2 -2
- package/demos/demo.styles.tilli-website.light.min.html +1 -1
- package/dist/init/_configs.d.ts +12 -0
- package/dist/init/_configs.d.ts.map +1 -0
- package/dist/init/_configs.js +17 -0
- package/dist/init/brf.config.d.ts +3 -0
- package/dist/init/brf.config.d.ts.map +1 -0
- package/dist/init/brf.config.js +61 -0
- package/dist/init/brf.js +2 -61
- package/dist/init/nudge-website.config.d.ts +3 -0
- package/dist/init/nudge-website.config.d.ts.map +1 -0
- package/dist/init/nudge-website.config.js +120 -0
- package/dist/init/nudge-website.js +2 -120
- package/dist/init/nudge.config.d.ts +3 -0
- package/dist/init/nudge.config.d.ts.map +1 -0
- package/dist/init/nudge.config.js +28 -0
- package/dist/init/nudge.js +2 -28
- package/dist/init/tilli-pay-website.config.d.ts +3 -0
- package/dist/init/tilli-pay-website.config.d.ts.map +1 -0
- package/dist/init/tilli-pay-website.config.js +200 -0
- package/dist/init/tilli-pay-website.js +2 -200
- package/dist/init/tilli-pay.config.d.ts +3 -0
- package/dist/init/tilli-pay.config.d.ts.map +1 -0
- package/dist/init/tilli-pay.config.js +18 -0
- package/dist/init/tilli-pay.js +2 -18
- package/dist/init/tilli-website.config.d.ts +3 -0
- package/dist/init/tilli-website.config.d.ts.map +1 -0
- package/dist/init/tilli-website.config.js +206 -0
- package/dist/init/tilli-website.js +2 -206
- package/dist/init/tilliX.config.d.ts +3 -0
- package/dist/init/tilliX.config.d.ts.map +1 -0
- package/dist/init/tilliX.config.js +20 -0
- package/dist/init/tilliX.js +2 -20
- package/dist/init.d.ts +1 -1
- package/dist/init.js +2 -2
- package/dist/react-components/CookieConsentInit.client.d.ts +6 -1
- package/dist/react-components/CookieConsentInit.client.d.ts.map +1 -1
- package/dist/react-components/CookieConsentInit.client.js +2 -2
- package/dist/react-components/CookieConsentInit.server.d.ts +6 -1
- package/dist/react-components/CookieConsentInit.server.d.ts.map +1 -1
- package/dist/react-components/CookieConsentInit.server.js +2 -2
- package/dist/react-components/hooks/useCookieConsent.d.ts +2 -1
- package/dist/react-components/hooks/useCookieConsent.d.ts.map +1 -1
- package/dist/react-components/hooks/useCookieConsent.js +6 -3
- package/package.json +1 -1
- package/src/init/_configs.ts +20 -0
- package/src/init/brf.config.ts +70 -0
- package/src/init/brf.ts +2 -73
- package/src/init/nudge-website.config.ts +132 -0
- package/src/init/nudge-website.ts +2 -135
- package/src/init/nudge.config.ts +37 -0
- package/src/init/nudge.ts +2 -40
- package/src/init/tilli-pay-website.config.ts +213 -0
- package/src/init/tilli-pay-website.ts +2 -216
- package/src/init/tilli-pay.config.ts +27 -0
- package/src/init/tilli-pay.ts +2 -30
- package/src/init/tilli-website.config.ts +219 -0
- package/src/init/tilli-website.ts +2 -222
- package/src/init/tilliX.config.ts +29 -0
- package/src/init/tilliX.ts +2 -32
- package/src/init.ts +2 -2
- package/src/react-components/CookieConsentInit.client.tsx +9 -2
- package/src/react-components/CookieConsentInit.server.tsx +11 -2
- package/src/react-components/hooks/useCookieConsent.ts +10 -3
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tilliX.config.d.ts","sourceRoot":"","sources":["../../src/init/tilliX.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAwBpE,eAAO,MAAM,MAAM,EAAE,mBAIpB,CAAC"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import _config from "../config";
|
2
|
+
import { stripInvalidLinkedCategoriesFromTranslations } from "./utils";
|
3
|
+
const categories = {
|
4
|
+
necessary: {
|
5
|
+
enabled: true, // "necessary" category is always enabled.
|
6
|
+
readOnly: true,
|
7
|
+
},
|
8
|
+
functional: {},
|
9
|
+
analytics: {},
|
10
|
+
};
|
11
|
+
// TODO: DRY further w/ `./brf.ts`
|
12
|
+
const language = {
|
13
|
+
..._config.language,
|
14
|
+
translations: stripInvalidLinkedCategoriesFromTranslations(_config.language.translations, categories, true),
|
15
|
+
};
|
16
|
+
export const config = {
|
17
|
+
..._config,
|
18
|
+
categories,
|
19
|
+
language,
|
20
|
+
};
|
package/dist/init/tilliX.js
CHANGED
@@ -1,25 +1,7 @@
|
|
1
|
-
import _config from "../config";
|
2
1
|
import { run } from "../init";
|
3
|
-
import { makeInitFn
|
2
|
+
import { makeInitFn } from "./utils";
|
4
3
|
import { showPreferences } from "../config/gui-options/scripts/showPreferences.mjs";
|
5
|
-
|
6
|
-
necessary: {
|
7
|
-
enabled: true, // "necessary" category is always enabled.
|
8
|
-
readOnly: true,
|
9
|
-
},
|
10
|
-
functional: {},
|
11
|
-
analytics: {},
|
12
|
-
};
|
13
|
-
// TODO: DRY further w/ `./brf.ts`
|
14
|
-
const language = {
|
15
|
-
..._config.language,
|
16
|
-
translations: stripInvalidLinkedCategoriesFromTranslations(_config.language.translations, categories, true),
|
17
|
-
};
|
18
|
-
const config = {
|
19
|
-
..._config,
|
20
|
-
categories,
|
21
|
-
language,
|
22
|
-
};
|
4
|
+
import { config } from "./tilliX.config";
|
23
5
|
// console.debug({ config }, "Initializing Cookie Consent (tilli Website)...");
|
24
6
|
const init = makeInitFn(run, config, showPreferences);
|
25
7
|
void init();
|
package/dist/init.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import "https://cdn.jsdelivr.net/gh/tilli-pro/cookieconsent@
|
1
|
+
import "https://cdn.jsdelivr.net/gh/tilli-pro/cookieconsent@95beecd12c0b52ac7b01a40f5a04ca8dff865bfb/dist/cookieconsent.umd.js";
|
2
2
|
import type * as _CookieConsent from "@tilli-pro/cookieconsent";
|
3
3
|
import type { CookieConsentConfig } from "@tilli-pro/cookieconsent";
|
4
4
|
import { cookieConsentTheme } from "./_utils";
|
package/dist/init.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import "https://cdn.jsdelivr.net/gh/tilli-pro/cookieconsent@
|
1
|
+
import "https://cdn.jsdelivr.net/gh/tilli-pro/cookieconsent@95beecd12c0b52ac7b01a40f5a04ca8dff865bfb/dist/cookieconsent.umd.js";
|
2
2
|
import { cookieConsentTheme } from "./_utils";
|
3
3
|
import _config from "./config";
|
4
4
|
import styles from "./styles";
|
5
5
|
import { initTheme } from "./init/utils.script";
|
6
|
-
const GIT_SHA = "
|
6
|
+
const GIT_SHA = "95beecd12c0b52ac7b01a40f5a04ca8dff865bfb";
|
7
7
|
const GIT_REPO = "tilli-pro/cookieconsent";
|
8
8
|
const GIT_CDN_BASE_URL = "https://cdn.jsdelivr.net/gh";
|
9
9
|
const GIT_CDN_URL = `${GIT_CDN_BASE_URL}/${GIT_REPO}@${GIT_SHA}`;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { ConfigId } from "../init/_configs";
|
1
2
|
import "@tilli-pro/cookieconsent/dist/cookieconsent.css";
|
2
3
|
import "../styles/tilli-website.css";
|
3
4
|
import "../styles/tilli-pay.css";
|
@@ -6,5 +7,9 @@ import "../styles/tenants/freeman.css";
|
|
6
7
|
import "../styles/tenants/frontier.css";
|
7
8
|
import "../styles/tenants/con-edison.css";
|
8
9
|
import "../styles/tenants/oru.css";
|
9
|
-
|
10
|
+
interface CookieConsentInitProps {
|
11
|
+
config: ConfigId;
|
12
|
+
}
|
13
|
+
export default function CookieConsentInit({ config, }: Readonly<CookieConsentInitProps>): null;
|
14
|
+
export {};
|
10
15
|
//# sourceMappingURL=CookieConsentInit.client.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CookieConsentInit.client.d.ts","sourceRoot":"","sources":["../../src/react-components/CookieConsentInit.client.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"CookieConsentInit.client.d.ts","sourceRoot":"","sources":["../../src/react-components/CookieConsentInit.client.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,iDAAiD,CAAC;AAEzD,OAAO,6BAA6B,CAAC;AACrC,OAAO,yBAAyB,CAAC;AACjC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,+BAA+B,CAAC;AACvC,OAAO,gCAAgC,CAAC;AACxC,OAAO,kCAAkC,CAAC;AAC1C,OAAO,2BAA2B,CAAC;AAEnC,UAAU,sBAAsB;IAC9B,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,MAAM,GACP,EAAE,QAAQ,CAAC,sBAAsB,CAAC,QAIlC"}
|
@@ -9,7 +9,7 @@ import "../styles/tenants/freeman.css";
|
|
9
9
|
import "../styles/tenants/frontier.css";
|
10
10
|
import "../styles/tenants/con-edison.css";
|
11
11
|
import "../styles/tenants/oru.css";
|
12
|
-
export default function CookieConsentInit() {
|
13
|
-
useCookieConsent();
|
12
|
+
export default function CookieConsentInit({ config, }) {
|
13
|
+
useCookieConsent(config);
|
14
14
|
return null;
|
15
15
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
import "server-only";
|
2
|
+
import type { ConfigId } from "../init/_configs";
|
3
|
+
interface CookieConsentInitProps {
|
4
|
+
config: ConfigId;
|
5
|
+
}
|
2
6
|
/** we use a server component to handle dynamic injection of the script all together
|
3
7
|
* > basically, there's no need to inject the client-side cookie-consent script if it's not in scope */
|
4
|
-
export default function CookieConsentInit(): import("react/jsx-runtime").JSX.Element | null;
|
8
|
+
export default function CookieConsentInit({ config, }: Readonly<CookieConsentInitProps>): import("react/jsx-runtime").JSX.Element | null;
|
9
|
+
export {};
|
5
10
|
//# sourceMappingURL=CookieConsentInit.server.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CookieConsentInit.server.d.ts","sourceRoot":"","sources":["../../src/react-components/CookieConsentInit.server.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;
|
1
|
+
{"version":3,"file":"CookieConsentInit.server.d.ts","sourceRoot":"","sources":["../../src/react-components/CookieConsentInit.server.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,UAAU,sBAAsB;IAC9B,MAAM,EAAE,QAAQ,CAAC;CAClB;AAED;uGACuG;AACvG,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,MAAM,GACP,EAAE,QAAQ,CAAC,sBAAsB,CAAC,kDAIlC"}
|
@@ -4,6 +4,6 @@ import { COOKIE_CONSENT_ENABLED } from "../_consts";
|
|
4
4
|
import CookieConsentInitClient from "./CookieConsentInit.client";
|
5
5
|
/** we use a server component to handle dynamic injection of the script all together
|
6
6
|
* > basically, there's no need to inject the client-side cookie-consent script if it's not in scope */
|
7
|
-
export default function CookieConsentInit() {
|
8
|
-
return COOKIE_CONSENT_ENABLED ? _jsx(CookieConsentInitClient, {}) : null;
|
7
|
+
export default function CookieConsentInit({ config, }) {
|
8
|
+
return COOKIE_CONSENT_ENABLED ? (_jsx(CookieConsentInitClient, { config })) : null;
|
9
9
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useCookieConsent.d.ts","sourceRoot":"","sources":["../../../src/react-components/hooks/useCookieConsent.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useCookieConsent.d.ts","sourceRoot":"","sources":["../../../src/react-components/hooks/useCookieConsent.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAMpD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,QAalD"}
|
@@ -2,13 +2,16 @@
|
|
2
2
|
import { useEffect } from "react";
|
3
3
|
import { run } from "@tilli-pro/cookieconsent";
|
4
4
|
import { COOKIE_CONSENT_ENABLED } from "../../_consts";
|
5
|
-
import config from "../../config";
|
6
|
-
import { makeInitFn } from "../../init/utils";
|
7
5
|
import { showPreferences } from "../../config/gui-options/scripts/showPreferences.node";
|
8
|
-
|
6
|
+
import { getConfig } from "../../init/_configs";
|
7
|
+
import { makeInitFn } from "../../init/utils";
|
8
|
+
export function useCookieConsent(configId) {
|
9
9
|
useEffect(() => {
|
10
10
|
if (!COOKIE_CONSENT_ENABLED)
|
11
11
|
return;
|
12
|
+
const config = getConfig(configId);
|
13
|
+
if (!config)
|
14
|
+
throw new Error(`Unable to initialize the cookie consent banner (unable to find specified config: "${configId}")`);
|
12
15
|
const init = makeInitFn(run, config, showPreferences);
|
13
16
|
void init();
|
14
17
|
}, []);
|
package/package.json
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
import { config as brf } from "./brf.config";
|
2
|
+
import { config as nudge } from "./nudge.config";
|
3
|
+
import { config as nudgeWebsite } from "./nudge-website.config";
|
4
|
+
import { config as tilliPay } from "./tilli-pay.config";
|
5
|
+
import { config as tilliPayWebsite } from "./tilli-pay-website.config";
|
6
|
+
import { config as tilliWebsite } from "./tilli-website.config";
|
7
|
+
import { config as tilliX } from "./tilliX.config";
|
8
|
+
|
9
|
+
export const configs = {
|
10
|
+
brf,
|
11
|
+
"nudge-website": nudgeWebsite,
|
12
|
+
nudge,
|
13
|
+
"tilli-pay-website": tilliPayWebsite,
|
14
|
+
"tilli-pay": tilliPay,
|
15
|
+
"tilli-website": tilliWebsite,
|
16
|
+
"tilliX": tilliX,
|
17
|
+
};
|
18
|
+
export type ConfigId = keyof typeof configs;
|
19
|
+
|
20
|
+
export const getConfig = (configId: ConfigId) => configs[configId];
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import type { CookieConsentConfig } from "@tilli-pro/cookieconsent";
|
2
|
+
|
3
|
+
import _config from "../config";
|
4
|
+
import { LABELS } from "../config/categories/labels";
|
5
|
+
import cookies from "../config/cookies";
|
6
|
+
import { stripInvalidLinkedCategoriesFromTranslations } from "./utils";
|
7
|
+
|
8
|
+
// TODO: auto-detect detect language
|
9
|
+
const __LANGUAGE__ = "en"; // "English" ("English")
|
10
|
+
|
11
|
+
const categories: CookieConsentConfig["categories"] = {
|
12
|
+
necessary: {
|
13
|
+
enabled: true, // "necessary" category is always enabled.
|
14
|
+
readOnly: true,
|
15
|
+
services: {
|
16
|
+
/** tilliX (BRF) */
|
17
|
+
tilliX: {
|
18
|
+
label: LABELS.en.necessary.tilliX,
|
19
|
+
cookies: [...cookies.necessary.brf(__LANGUAGE__)],
|
20
|
+
},
|
21
|
+
},
|
22
|
+
},
|
23
|
+
functional: {
|
24
|
+
services: {
|
25
|
+
/** tilliX (BRF) */
|
26
|
+
tilliX: {
|
27
|
+
label: LABELS.en.functional.tilliX,
|
28
|
+
cookies: [...cookies.functional.brf(__LANGUAGE__)],
|
29
|
+
},
|
30
|
+
},
|
31
|
+
autoClear: {
|
32
|
+
cookies: [
|
33
|
+
{
|
34
|
+
name: /^(tx-theme)/, // tilliX theme (-> "light" | "dark")
|
35
|
+
},
|
36
|
+
],
|
37
|
+
},
|
38
|
+
},
|
39
|
+
analytics: {
|
40
|
+
services: {
|
41
|
+
/** Datadog (RUM) */
|
42
|
+
datadog: {
|
43
|
+
label: LABELS.en.analytics.datadog,
|
44
|
+
cookies: [...cookies.analytics.datadog(__LANGUAGE__)],
|
45
|
+
},
|
46
|
+
},
|
47
|
+
autoClear: {
|
48
|
+
cookies: [
|
49
|
+
{
|
50
|
+
name: /^(_tilli_analytics_dd_)/, // Datadog (RUM)
|
51
|
+
},
|
52
|
+
],
|
53
|
+
},
|
54
|
+
},
|
55
|
+
};
|
56
|
+
|
57
|
+
// TODO: DRY further w/ `./tilli-website.ts`
|
58
|
+
const language: CookieConsentConfig["language"] = {
|
59
|
+
..._config.language,
|
60
|
+
translations: stripInvalidLinkedCategoriesFromTranslations(
|
61
|
+
_config.language.translations,
|
62
|
+
categories,
|
63
|
+
),
|
64
|
+
};
|
65
|
+
|
66
|
+
export const config: CookieConsentConfig = {
|
67
|
+
..._config,
|
68
|
+
categories,
|
69
|
+
language,
|
70
|
+
};
|
package/src/init/brf.ts
CHANGED
@@ -1,78 +1,7 @@
|
|
1
|
-
import type { CookieConsentConfig } from "@tilli-pro/cookieconsent";
|
2
|
-
|
3
|
-
import _config from "../config";
|
4
|
-
import { LABELS } from "../config/categories/labels";
|
5
|
-
import cookies from "../config/cookies";
|
6
1
|
import { run } from "../init";
|
7
|
-
import {
|
8
|
-
makeInitFn,
|
9
|
-
stripInvalidLinkedCategoriesFromTranslations,
|
10
|
-
} from "./utils";
|
2
|
+
import { makeInitFn } from "./utils";
|
11
3
|
import { showPreferences } from "../config/gui-options/scripts/showPreferences.mjs";
|
12
|
-
|
13
|
-
// TODO: auto-detect detect language
|
14
|
-
const __LANGUAGE__ = "en"; // "English" ("English")
|
15
|
-
|
16
|
-
const categories: CookieConsentConfig["categories"] = {
|
17
|
-
necessary: {
|
18
|
-
enabled: true, // "necessary" category is always enabled.
|
19
|
-
readOnly: true,
|
20
|
-
services: {
|
21
|
-
/** tilliX (BRF) */
|
22
|
-
tilliX: {
|
23
|
-
label: LABELS.en.necessary.tilliX,
|
24
|
-
cookies: [...cookies.necessary.brf(__LANGUAGE__)],
|
25
|
-
},
|
26
|
-
},
|
27
|
-
},
|
28
|
-
functional: {
|
29
|
-
services: {
|
30
|
-
/** tilliX (BRF) */
|
31
|
-
tilliX: {
|
32
|
-
label: LABELS.en.functional.tilliX,
|
33
|
-
cookies: [...cookies.functional.brf(__LANGUAGE__)],
|
34
|
-
},
|
35
|
-
},
|
36
|
-
autoClear: {
|
37
|
-
cookies: [
|
38
|
-
{
|
39
|
-
name: /^(tx-theme)/, // tilliX theme (-> "light" | "dark")
|
40
|
-
},
|
41
|
-
],
|
42
|
-
},
|
43
|
-
},
|
44
|
-
analytics: {
|
45
|
-
services: {
|
46
|
-
/** Datadog (RUM) */
|
47
|
-
datadog: {
|
48
|
-
label: LABELS.en.analytics.datadog,
|
49
|
-
cookies: [...cookies.analytics.datadog(__LANGUAGE__)],
|
50
|
-
},
|
51
|
-
},
|
52
|
-
autoClear: {
|
53
|
-
cookies: [
|
54
|
-
{
|
55
|
-
name: /^(_tilli_analytics_dd_)/, // Datadog (RUM)
|
56
|
-
},
|
57
|
-
],
|
58
|
-
},
|
59
|
-
},
|
60
|
-
};
|
61
|
-
|
62
|
-
// TODO: DRY further w/ `./tilli-website.ts`
|
63
|
-
const language: CookieConsentConfig["language"] = {
|
64
|
-
..._config.language,
|
65
|
-
translations: stripInvalidLinkedCategoriesFromTranslations(
|
66
|
-
_config.language.translations,
|
67
|
-
categories,
|
68
|
-
),
|
69
|
-
};
|
70
|
-
|
71
|
-
const config: CookieConsentConfig = {
|
72
|
-
..._config,
|
73
|
-
categories,
|
74
|
-
language,
|
75
|
-
};
|
4
|
+
import { config } from "./brf.config";
|
76
5
|
|
77
6
|
// console.debug({ config }, "Initializing Cookie Consent (BRF)...");
|
78
7
|
const init = makeInitFn(run, config, showPreferences);
|
@@ -0,0 +1,132 @@
|
|
1
|
+
import type { CookieConsentConfig } from "@tilli-pro/cookieconsent";
|
2
|
+
|
3
|
+
import _config from "../config";
|
4
|
+
import { stripInvalidLinkedCategoriesFromTranslations } from "./utils";
|
5
|
+
|
6
|
+
const categories: CookieConsentConfig["categories"] = {
|
7
|
+
necessary: {
|
8
|
+
enabled: true, // "necessary" category is always enabled.
|
9
|
+
readOnly: true,
|
10
|
+
services: {
|
11
|
+
"Session": {
|
12
|
+
label: "Session",
|
13
|
+
cookies: [
|
14
|
+
{
|
15
|
+
name: /^(_scc_session)/, // session ID for core functionality
|
16
|
+
},
|
17
|
+
],
|
18
|
+
},
|
19
|
+
},
|
20
|
+
},
|
21
|
+
analytics: {
|
22
|
+
services: {
|
23
|
+
"Google Analytics": {
|
24
|
+
label: "Google Analytics",
|
25
|
+
cookies: [
|
26
|
+
{
|
27
|
+
name: /^(_ga_)/, // Google Analytics
|
28
|
+
domain: ".nudge.pro",
|
29
|
+
},
|
30
|
+
],
|
31
|
+
},
|
32
|
+
"TelemetryDeck": {
|
33
|
+
label: "TelemetryDeck",
|
34
|
+
cookies: [
|
35
|
+
{
|
36
|
+
name: /^(_tccl_)/, // TelemetryDeck
|
37
|
+
domain: ".nudge.pro",
|
38
|
+
},
|
39
|
+
],
|
40
|
+
},
|
41
|
+
},
|
42
|
+
autoClear: {
|
43
|
+
// TODO: DRY this with the services above
|
44
|
+
cookies: [
|
45
|
+
/** Google Analytics */
|
46
|
+
{
|
47
|
+
name: /^(_ga_)/, // Google Analytics
|
48
|
+
domain: ".nudge.pro",
|
49
|
+
},
|
50
|
+
|
51
|
+
/** TelemetryDeck */
|
52
|
+
{
|
53
|
+
name: /^(_tccl_)/, // TelemetryDeck
|
54
|
+
domain: ".nudge.pro",
|
55
|
+
},
|
56
|
+
],
|
57
|
+
},
|
58
|
+
},
|
59
|
+
marketing: {
|
60
|
+
services: {
|
61
|
+
"Google Adsense": {
|
62
|
+
label: "Google Adsense",
|
63
|
+
cookies: [
|
64
|
+
{
|
65
|
+
name: /^(_gcl_)/, // Google Adsense
|
66
|
+
domain: ".nudge.pro",
|
67
|
+
},
|
68
|
+
],
|
69
|
+
},
|
70
|
+
"zoominfo": {
|
71
|
+
label: "zoominfo",
|
72
|
+
cookies: [
|
73
|
+
{
|
74
|
+
name: /^(visitorld)/, // zoominfo (simply ws marketing tool)
|
75
|
+
domain: ".ws.zoominfo.com",
|
76
|
+
},
|
77
|
+
{
|
78
|
+
name: /^(_cfuvid)/, // zoominfo (Cloudflare)
|
79
|
+
domain: ".zoominfo.com",
|
80
|
+
},
|
81
|
+
],
|
82
|
+
},
|
83
|
+
"Twitter": {
|
84
|
+
label: "Twitter",
|
85
|
+
cookies: [
|
86
|
+
{
|
87
|
+
name: /^(muc_ads)/, // Twitter (ads)
|
88
|
+
domain: ".t.co",
|
89
|
+
},
|
90
|
+
],
|
91
|
+
},
|
92
|
+
},
|
93
|
+
autoClear: {
|
94
|
+
// TODO: DRY this with the services above
|
95
|
+
cookies: [
|
96
|
+
/** Google Adsense */
|
97
|
+
{
|
98
|
+
name: /^(_gcl_)/, // Google Adsense
|
99
|
+
domain: ".nudge.pro",
|
100
|
+
},
|
101
|
+
|
102
|
+
/** zoominfo */
|
103
|
+
{
|
104
|
+
name: /^(_cfuvid)/, // zoominfo (Cloudflare)
|
105
|
+
domain: ".zoominfo.com",
|
106
|
+
},
|
107
|
+
|
108
|
+
/** Twitter */
|
109
|
+
{
|
110
|
+
name: /^(muc_ads)/, // Twitter (ads)
|
111
|
+
domain: ".t.co",
|
112
|
+
},
|
113
|
+
],
|
114
|
+
},
|
115
|
+
},
|
116
|
+
};
|
117
|
+
|
118
|
+
// TODO: DRY further w/ `./brf.ts`
|
119
|
+
const language: CookieConsentConfig["language"] = {
|
120
|
+
..._config.language,
|
121
|
+
translations: stripInvalidLinkedCategoriesFromTranslations(
|
122
|
+
_config.language.translations,
|
123
|
+
categories,
|
124
|
+
true, // clear cookie tables // FIXME: refactor this to actually just use the proper cookie table accoring to the categories var
|
125
|
+
),
|
126
|
+
};
|
127
|
+
|
128
|
+
export const config: CookieConsentConfig = {
|
129
|
+
..._config,
|
130
|
+
categories,
|
131
|
+
language,
|
132
|
+
};
|
@@ -1,140 +1,7 @@
|
|
1
|
-
import type { CookieConsentConfig } from "@tilli-pro/cookieconsent";
|
2
|
-
|
3
|
-
import _config from "../config";
|
4
1
|
import { run } from "../init";
|
5
|
-
import {
|
6
|
-
makeInitFn,
|
7
|
-
stripInvalidLinkedCategoriesFromTranslations,
|
8
|
-
} from "./utils";
|
2
|
+
import { makeInitFn } from "./utils";
|
9
3
|
import { showPreferences } from "../config/gui-options/scripts/showPreferences.mjs";
|
10
|
-
|
11
|
-
const categories: CookieConsentConfig["categories"] = {
|
12
|
-
necessary: {
|
13
|
-
enabled: true, // "necessary" category is always enabled.
|
14
|
-
readOnly: true,
|
15
|
-
services: {
|
16
|
-
"Session": {
|
17
|
-
label: "Session",
|
18
|
-
cookies: [
|
19
|
-
{
|
20
|
-
name: /^(_scc_session)/, // session ID for core functionality
|
21
|
-
},
|
22
|
-
],
|
23
|
-
},
|
24
|
-
},
|
25
|
-
},
|
26
|
-
analytics: {
|
27
|
-
services: {
|
28
|
-
"Google Analytics": {
|
29
|
-
label: "Google Analytics",
|
30
|
-
cookies: [
|
31
|
-
{
|
32
|
-
name: /^(_ga_)/, // Google Analytics
|
33
|
-
domain: ".nudge.pro",
|
34
|
-
},
|
35
|
-
],
|
36
|
-
},
|
37
|
-
"TelemetryDeck": {
|
38
|
-
label: "TelemetryDeck",
|
39
|
-
cookies: [
|
40
|
-
{
|
41
|
-
name: /^(_tccl_)/, // TelemetryDeck
|
42
|
-
domain: ".nudge.pro",
|
43
|
-
},
|
44
|
-
],
|
45
|
-
},
|
46
|
-
},
|
47
|
-
autoClear: {
|
48
|
-
// TODO: DRY this with the services above
|
49
|
-
cookies: [
|
50
|
-
/** Google Analytics */
|
51
|
-
{
|
52
|
-
name: /^(_ga_)/, // Google Analytics
|
53
|
-
domain: ".nudge.pro",
|
54
|
-
},
|
55
|
-
|
56
|
-
/** TelemetryDeck */
|
57
|
-
{
|
58
|
-
name: /^(_tccl_)/, // TelemetryDeck
|
59
|
-
domain: ".nudge.pro",
|
60
|
-
},
|
61
|
-
],
|
62
|
-
},
|
63
|
-
},
|
64
|
-
marketing: {
|
65
|
-
services: {
|
66
|
-
"Google Adsense": {
|
67
|
-
label: "Google Adsense",
|
68
|
-
cookies: [
|
69
|
-
{
|
70
|
-
name: /^(_gcl_)/, // Google Adsense
|
71
|
-
domain: ".nudge.pro",
|
72
|
-
},
|
73
|
-
],
|
74
|
-
},
|
75
|
-
"zoominfo": {
|
76
|
-
label: "zoominfo",
|
77
|
-
cookies: [
|
78
|
-
{
|
79
|
-
name: /^(visitorld)/, // zoominfo (simply ws marketing tool)
|
80
|
-
domain: ".ws.zoominfo.com",
|
81
|
-
},
|
82
|
-
{
|
83
|
-
name: /^(_cfuvid)/, // zoominfo (Cloudflare)
|
84
|
-
domain: ".zoominfo.com",
|
85
|
-
},
|
86
|
-
],
|
87
|
-
},
|
88
|
-
"Twitter": {
|
89
|
-
label: "Twitter",
|
90
|
-
cookies: [
|
91
|
-
{
|
92
|
-
name: /^(muc_ads)/, // Twitter (ads)
|
93
|
-
domain: ".t.co",
|
94
|
-
},
|
95
|
-
],
|
96
|
-
},
|
97
|
-
},
|
98
|
-
autoClear: {
|
99
|
-
// TODO: DRY this with the services above
|
100
|
-
cookies: [
|
101
|
-
/** Google Adsense */
|
102
|
-
{
|
103
|
-
name: /^(_gcl_)/, // Google Adsense
|
104
|
-
domain: ".nudge.pro",
|
105
|
-
},
|
106
|
-
|
107
|
-
/** zoominfo */
|
108
|
-
{
|
109
|
-
name: /^(_cfuvid)/, // zoominfo (Cloudflare)
|
110
|
-
domain: ".zoominfo.com",
|
111
|
-
},
|
112
|
-
|
113
|
-
/** Twitter */
|
114
|
-
{
|
115
|
-
name: /^(muc_ads)/, // Twitter (ads)
|
116
|
-
domain: ".t.co",
|
117
|
-
},
|
118
|
-
],
|
119
|
-
},
|
120
|
-
},
|
121
|
-
};
|
122
|
-
|
123
|
-
// TODO: DRY further w/ `./brf.ts`
|
124
|
-
const language: CookieConsentConfig["language"] = {
|
125
|
-
..._config.language,
|
126
|
-
translations: stripInvalidLinkedCategoriesFromTranslations(
|
127
|
-
_config.language.translations,
|
128
|
-
categories,
|
129
|
-
true, // clear cookie tables // FIXME: refactor this to actually just use the proper cookie table accoring to the categories var
|
130
|
-
),
|
131
|
-
};
|
132
|
-
|
133
|
-
const config: CookieConsentConfig = {
|
134
|
-
..._config,
|
135
|
-
categories,
|
136
|
-
language,
|
137
|
-
};
|
4
|
+
import { config } from "./nudge-website.config";
|
138
5
|
|
139
6
|
// console.debug({ config }, "Initializing Cookie Consent (tilli Website)...");
|
140
7
|
const init = makeInitFn(run, config, showPreferences);
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import type { CookieConsentConfig } from "@tilli-pro/cookieconsent";
|
2
|
+
|
3
|
+
import _config from "../config";
|
4
|
+
import { stripInvalidLinkedCategoriesFromTranslations } from "./utils";
|
5
|
+
|
6
|
+
const categories: CookieConsentConfig["categories"] = {
|
7
|
+
necessary: {
|
8
|
+
enabled: true, // "necessary" category is always enabled.
|
9
|
+
readOnly: true,
|
10
|
+
services: {
|
11
|
+
"Authentication": {
|
12
|
+
label: "Authentication",
|
13
|
+
cookies: [
|
14
|
+
{
|
15
|
+
name: /^(refreshToken)/, // refresh token for authentication purposes only
|
16
|
+
},
|
17
|
+
],
|
18
|
+
},
|
19
|
+
},
|
20
|
+
},
|
21
|
+
};
|
22
|
+
|
23
|
+
// TODO: DRY further w/ `./brf.ts`
|
24
|
+
const language: CookieConsentConfig["language"] = {
|
25
|
+
..._config.language,
|
26
|
+
translations: stripInvalidLinkedCategoriesFromTranslations(
|
27
|
+
_config.language.translations,
|
28
|
+
categories,
|
29
|
+
true, // clear cookie tables // FIXME: refactor this to actually just use the proper cookie table accoring to the categories var
|
30
|
+
),
|
31
|
+
};
|
32
|
+
|
33
|
+
export const config: CookieConsentConfig = {
|
34
|
+
..._config,
|
35
|
+
categories,
|
36
|
+
language,
|
37
|
+
};
|