@tilli-pro/cookieconsent-plugin 0.7.52 → 0.7.57
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
package/src/init/nudge.ts
CHANGED
@@ -1,45 +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
|
-
"Authentication": {
|
17
|
-
label: "Authentication",
|
18
|
-
cookies: [
|
19
|
-
{
|
20
|
-
name: /^(refreshToken)/, // refresh token for authentication purposes only
|
21
|
-
},
|
22
|
-
],
|
23
|
-
},
|
24
|
-
},
|
25
|
-
},
|
26
|
-
};
|
27
|
-
|
28
|
-
// TODO: DRY further w/ `./brf.ts`
|
29
|
-
const language: CookieConsentConfig["language"] = {
|
30
|
-
..._config.language,
|
31
|
-
translations: stripInvalidLinkedCategoriesFromTranslations(
|
32
|
-
_config.language.translations,
|
33
|
-
categories,
|
34
|
-
true, // clear cookie tables // FIXME: refactor this to actually just use the proper cookie table accoring to the categories var
|
35
|
-
),
|
36
|
-
};
|
37
|
-
|
38
|
-
const config: CookieConsentConfig = {
|
39
|
-
..._config,
|
40
|
-
categories,
|
41
|
-
language,
|
42
|
-
};
|
4
|
+
import { config } from "./nudge.config";
|
43
5
|
|
44
6
|
// console.debug({ config }, "Initializing Cookie Consent (tilli Website)...");
|
45
7
|
const init = makeInitFn(run, config, showPreferences);
|
@@ -0,0 +1,213 @@
|
|
1
|
+
// TODO: migrate from monay.com to tillipay.com
|
2
|
+
|
3
|
+
import type { CookieConsentConfig } from "@tilli-pro/cookieconsent";
|
4
|
+
|
5
|
+
import _config from "../config";
|
6
|
+
import { stripInvalidLinkedCategoriesFromTranslations } from "./utils";
|
7
|
+
|
8
|
+
const categories: CookieConsentConfig["categories"] = {
|
9
|
+
necessary: {
|
10
|
+
enabled: true, // "necessary" category is always enabled.
|
11
|
+
readOnly: true,
|
12
|
+
services: {
|
13
|
+
Session: {
|
14
|
+
label: "Session",
|
15
|
+
cookies: [
|
16
|
+
{
|
17
|
+
name: /^(_scc_session)/, // session ID for core functionality
|
18
|
+
},
|
19
|
+
],
|
20
|
+
},
|
21
|
+
},
|
22
|
+
},
|
23
|
+
functional: {
|
24
|
+
services: {
|
25
|
+
Hubspot: {
|
26
|
+
label: "Hubspot",
|
27
|
+
cookies: [
|
28
|
+
{
|
29
|
+
name: /^(messagesUtk)/, // Hubspot (chat user identity)
|
30
|
+
domain: ".monay.com",
|
31
|
+
},
|
32
|
+
],
|
33
|
+
},
|
34
|
+
},
|
35
|
+
autoClear: {
|
36
|
+
// TODO: DRY this with the services above
|
37
|
+
cookies: [
|
38
|
+
/** Hubspot */
|
39
|
+
{
|
40
|
+
name: /^(messagesUtk)/, // Hubspot (chat user identity)
|
41
|
+
domain: ".monay.com",
|
42
|
+
},
|
43
|
+
],
|
44
|
+
},
|
45
|
+
},
|
46
|
+
analytics: {
|
47
|
+
services: {
|
48
|
+
"Google Analytics": {
|
49
|
+
label: "Google Analytics",
|
50
|
+
cookies: [
|
51
|
+
{
|
52
|
+
name: /^(_ga_)/, // Google Analytics
|
53
|
+
domain: "tilli.pro",
|
54
|
+
},
|
55
|
+
],
|
56
|
+
},
|
57
|
+
TelemetryDeck: {
|
58
|
+
label: "TelemetryDeck",
|
59
|
+
cookies: [
|
60
|
+
{
|
61
|
+
name: /^(_tccl_)/, // TelemetryDeck
|
62
|
+
domain: "tilli.pro",
|
63
|
+
},
|
64
|
+
],
|
65
|
+
},
|
66
|
+
},
|
67
|
+
autoClear: {
|
68
|
+
// TODO: DRY this with the services above
|
69
|
+
cookies: [
|
70
|
+
/** Google Analytics */
|
71
|
+
{
|
72
|
+
name: /^(_ga_)/, // Google Analytics
|
73
|
+
domain: "tilli.pro",
|
74
|
+
},
|
75
|
+
|
76
|
+
/** TelemetryDeck */
|
77
|
+
{
|
78
|
+
name: /^(_tccl_)/, // TelemetryDeck
|
79
|
+
domain: "tilli.pro",
|
80
|
+
},
|
81
|
+
],
|
82
|
+
},
|
83
|
+
},
|
84
|
+
marketing: {
|
85
|
+
services: {
|
86
|
+
Hubspot: {
|
87
|
+
label: "Hubspot",
|
88
|
+
cookies: [
|
89
|
+
{
|
90
|
+
name: /^(__hs)/, // Hubspot (Session Tracking)
|
91
|
+
domain: "tilli.pro",
|
92
|
+
},
|
93
|
+
{
|
94
|
+
name: /^(hubspotutk)/, // Hubspot (User Tracking)
|
95
|
+
domain: "tilli.pro",
|
96
|
+
},
|
97
|
+
{
|
98
|
+
name: /^(__cf_bm)/, // Hubspot (Analytics - Cloudfare)
|
99
|
+
domain: ".hs-analytics.net",
|
100
|
+
},
|
101
|
+
{
|
102
|
+
name: /^(__cf_bm)/, // Hubspot (Banner - Cloudfare)
|
103
|
+
domain: ".hs-banner.com",
|
104
|
+
},
|
105
|
+
{
|
106
|
+
name: /^(__cf_bm)/, // Hubspot (Scripts - Cloudfare)
|
107
|
+
domain: ".hs-scripts.com",
|
108
|
+
},
|
109
|
+
{
|
110
|
+
name: /^(__cf_bm)/, // Hubspot (Adspixel - Cloudfare)
|
111
|
+
domain: ".hsadspixel.net",
|
112
|
+
},
|
113
|
+
{
|
114
|
+
name: /^(__cf_bm)/, // Hubspot (Twitter - Cloudfare)
|
115
|
+
domain: ".t.co",
|
116
|
+
},
|
117
|
+
{
|
118
|
+
name: /^(__cf_bm)/, // Hubspot (User Messages - Cloudfare)
|
119
|
+
domain: ".usermessages.com",
|
120
|
+
},
|
121
|
+
{
|
122
|
+
name: /^(_cfuvid)/, // Hubspot (Visitor ID - Cloudfare)
|
123
|
+
domain: ".hubspot.com",
|
124
|
+
},
|
125
|
+
],
|
126
|
+
},
|
127
|
+
Facebook: {
|
128
|
+
label: "Facebook",
|
129
|
+
cookies: [
|
130
|
+
{
|
131
|
+
name: /^(_fb)/, // Facebook (ads)
|
132
|
+
domain: "tilli.pro",
|
133
|
+
},
|
134
|
+
],
|
135
|
+
},
|
136
|
+
Twitter: {
|
137
|
+
label: "Twitter",
|
138
|
+
cookies: [
|
139
|
+
{
|
140
|
+
name: /^(muc_ads)/, // Twitter (ads)
|
141
|
+
domain: ".t.co",
|
142
|
+
},
|
143
|
+
],
|
144
|
+
},
|
145
|
+
},
|
146
|
+
autoClear: {
|
147
|
+
// TODO: DRY this with the services above
|
148
|
+
cookies: [
|
149
|
+
/** Hubspot */
|
150
|
+
{
|
151
|
+
name: /^(__hs)/, // Hubspot (Session Tracking)
|
152
|
+
domain: "tilli.pro",
|
153
|
+
},
|
154
|
+
{
|
155
|
+
name: /^(__cf_bm)/, // Hubspot (Analytics - Cloudfare)
|
156
|
+
domain: ".hs-analytics.net",
|
157
|
+
},
|
158
|
+
{
|
159
|
+
name: /^(__cf_bm)/, // Hubspot (Banner - Cloudfare)
|
160
|
+
domain: ".hs-banner.com",
|
161
|
+
},
|
162
|
+
{
|
163
|
+
name: /^(__cf_bm)/, // Hubspot (Scripts - Cloudfare)
|
164
|
+
domain: ".hs-scripts.com",
|
165
|
+
},
|
166
|
+
{
|
167
|
+
name: /^(__cf_bm)/, // Hubspot (Adspixel - Cloudfare)
|
168
|
+
domain: ".hsadspixel.net",
|
169
|
+
},
|
170
|
+
{
|
171
|
+
name: /^(__cf_bm)/, // Hubspot (Twitter - Cloudfare)
|
172
|
+
domain: ".t.co",
|
173
|
+
},
|
174
|
+
{
|
175
|
+
name: /^(__cf_bm)/, // Hubspot (User Messages - Cloudfare)
|
176
|
+
domain: ".usermessages.com",
|
177
|
+
},
|
178
|
+
{
|
179
|
+
name: /^(_cfuvid)/, // Hubspot (Visitor ID - Cloudfare)
|
180
|
+
domain: ".hubspot.com",
|
181
|
+
},
|
182
|
+
|
183
|
+
/** Facebook */
|
184
|
+
{
|
185
|
+
name: /^(_fb)/, // Facebook (ads)
|
186
|
+
domain: "tilli.pro",
|
187
|
+
},
|
188
|
+
|
189
|
+
/** Twitter */
|
190
|
+
{
|
191
|
+
name: /^(muc_ads)/, // Twitter (ads)
|
192
|
+
domain: ".t.co",
|
193
|
+
},
|
194
|
+
],
|
195
|
+
},
|
196
|
+
},
|
197
|
+
};
|
198
|
+
|
199
|
+
// TODO: DRY further w/ `./brf.ts`
|
200
|
+
const language: CookieConsentConfig["language"] = {
|
201
|
+
..._config.language,
|
202
|
+
translations: stripInvalidLinkedCategoriesFromTranslations(
|
203
|
+
_config.language.translations,
|
204
|
+
categories,
|
205
|
+
true, // clear cookie tables // FIXME: refactor this to actually just use the proper cookie table accoring to the categories var
|
206
|
+
),
|
207
|
+
};
|
208
|
+
|
209
|
+
export const config: CookieConsentConfig = {
|
210
|
+
..._config,
|
211
|
+
categories,
|
212
|
+
language,
|
213
|
+
};
|
@@ -1,221 +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
|
-
// TODO: migrate from monay.com to tillipay.com
|
12
|
-
|
13
|
-
const categories: CookieConsentConfig["categories"] = {
|
14
|
-
necessary: {
|
15
|
-
enabled: true, // "necessary" category is always enabled.
|
16
|
-
readOnly: true,
|
17
|
-
services: {
|
18
|
-
"Session": {
|
19
|
-
label: "Session",
|
20
|
-
cookies: [
|
21
|
-
{
|
22
|
-
name: /^(_scc_session)/, // session ID for core functionality
|
23
|
-
},
|
24
|
-
],
|
25
|
-
},
|
26
|
-
},
|
27
|
-
},
|
28
|
-
functional: {
|
29
|
-
services: {
|
30
|
-
"Hubspot": {
|
31
|
-
label: "Hubspot",
|
32
|
-
cookies: [
|
33
|
-
{
|
34
|
-
name: /^(messagesUtk)/, // Hubspot (chat user identity)
|
35
|
-
domain: ".monay.com",
|
36
|
-
},
|
37
|
-
],
|
38
|
-
},
|
39
|
-
},
|
40
|
-
autoClear: {
|
41
|
-
// TODO: DRY this with the services above
|
42
|
-
cookies: [
|
43
|
-
/** Hubspot */
|
44
|
-
{
|
45
|
-
name: /^(messagesUtk)/, // Hubspot (chat user identity)
|
46
|
-
domain: ".monay.com",
|
47
|
-
},
|
48
|
-
],
|
49
|
-
},
|
50
|
-
},
|
51
|
-
analytics: {
|
52
|
-
services: {
|
53
|
-
"Google Analytics": {
|
54
|
-
label: "Google Analytics",
|
55
|
-
cookies: [
|
56
|
-
{
|
57
|
-
name: /^(_ga_)/, // Google Analytics
|
58
|
-
domain: "tilli.pro",
|
59
|
-
},
|
60
|
-
],
|
61
|
-
},
|
62
|
-
"TelemetryDeck": {
|
63
|
-
label: "TelemetryDeck",
|
64
|
-
cookies: [
|
65
|
-
{
|
66
|
-
name: /^(_tccl_)/, // TelemetryDeck
|
67
|
-
domain: "tilli.pro",
|
68
|
-
},
|
69
|
-
],
|
70
|
-
},
|
71
|
-
},
|
72
|
-
autoClear: {
|
73
|
-
// TODO: DRY this with the services above
|
74
|
-
cookies: [
|
75
|
-
/** Google Analytics */
|
76
|
-
{
|
77
|
-
name: /^(_ga_)/, // Google Analytics
|
78
|
-
domain: "tilli.pro",
|
79
|
-
},
|
80
|
-
|
81
|
-
/** TelemetryDeck */
|
82
|
-
{
|
83
|
-
name: /^(_tccl_)/, // TelemetryDeck
|
84
|
-
domain: "tilli.pro",
|
85
|
-
},
|
86
|
-
],
|
87
|
-
},
|
88
|
-
},
|
89
|
-
marketing: {
|
90
|
-
services: {
|
91
|
-
"Hubspot": {
|
92
|
-
label: "Hubspot",
|
93
|
-
cookies: [
|
94
|
-
{
|
95
|
-
name: /^(__hs)/, // Hubspot (Session Tracking)
|
96
|
-
domain: "tilli.pro",
|
97
|
-
},
|
98
|
-
{
|
99
|
-
name: /^(hubspotutk)/, // Hubspot (User Tracking)
|
100
|
-
domain: "tilli.pro",
|
101
|
-
},
|
102
|
-
{
|
103
|
-
name: /^(__cf_bm)/, // Hubspot (Analytics - Cloudfare)
|
104
|
-
domain: ".hs-analytics.net",
|
105
|
-
},
|
106
|
-
{
|
107
|
-
name: /^(__cf_bm)/, // Hubspot (Banner - Cloudfare)
|
108
|
-
domain: ".hs-banner.com",
|
109
|
-
},
|
110
|
-
{
|
111
|
-
name: /^(__cf_bm)/, // Hubspot (Scripts - Cloudfare)
|
112
|
-
domain: ".hs-scripts.com",
|
113
|
-
},
|
114
|
-
{
|
115
|
-
name: /^(__cf_bm)/, // Hubspot (Adspixel - Cloudfare)
|
116
|
-
domain: ".hsadspixel.net",
|
117
|
-
},
|
118
|
-
{
|
119
|
-
name: /^(__cf_bm)/, // Hubspot (Twitter - Cloudfare)
|
120
|
-
domain: ".t.co",
|
121
|
-
},
|
122
|
-
{
|
123
|
-
name: /^(__cf_bm)/, // Hubspot (User Messages - Cloudfare)
|
124
|
-
domain: ".usermessages.com",
|
125
|
-
},
|
126
|
-
{
|
127
|
-
name: /^(_cfuvid)/, // Hubspot (Visitor ID - Cloudfare)
|
128
|
-
domain: ".hubspot.com",
|
129
|
-
},
|
130
|
-
],
|
131
|
-
},
|
132
|
-
"Facebook": {
|
133
|
-
label: "Facebook",
|
134
|
-
cookies: [
|
135
|
-
{
|
136
|
-
name: /^(_fb)/, // Facebook (ads)
|
137
|
-
domain: "tilli.pro",
|
138
|
-
},
|
139
|
-
],
|
140
|
-
},
|
141
|
-
"Twitter": {
|
142
|
-
label: "Twitter",
|
143
|
-
cookies: [
|
144
|
-
{
|
145
|
-
name: /^(muc_ads)/, // Twitter (ads)
|
146
|
-
domain: ".t.co",
|
147
|
-
},
|
148
|
-
],
|
149
|
-
},
|
150
|
-
},
|
151
|
-
autoClear: {
|
152
|
-
// TODO: DRY this with the services above
|
153
|
-
cookies: [
|
154
|
-
/** Hubspot */
|
155
|
-
{
|
156
|
-
name: /^(__hs)/, // Hubspot (Session Tracking)
|
157
|
-
domain: "tilli.pro",
|
158
|
-
},
|
159
|
-
{
|
160
|
-
name: /^(__cf_bm)/, // Hubspot (Analytics - Cloudfare)
|
161
|
-
domain: ".hs-analytics.net",
|
162
|
-
},
|
163
|
-
{
|
164
|
-
name: /^(__cf_bm)/, // Hubspot (Banner - Cloudfare)
|
165
|
-
domain: ".hs-banner.com",
|
166
|
-
},
|
167
|
-
{
|
168
|
-
name: /^(__cf_bm)/, // Hubspot (Scripts - Cloudfare)
|
169
|
-
domain: ".hs-scripts.com",
|
170
|
-
},
|
171
|
-
{
|
172
|
-
name: /^(__cf_bm)/, // Hubspot (Adspixel - Cloudfare)
|
173
|
-
domain: ".hsadspixel.net",
|
174
|
-
},
|
175
|
-
{
|
176
|
-
name: /^(__cf_bm)/, // Hubspot (Twitter - Cloudfare)
|
177
|
-
domain: ".t.co",
|
178
|
-
},
|
179
|
-
{
|
180
|
-
name: /^(__cf_bm)/, // Hubspot (User Messages - Cloudfare)
|
181
|
-
domain: ".usermessages.com",
|
182
|
-
},
|
183
|
-
{
|
184
|
-
name: /^(_cfuvid)/, // Hubspot (Visitor ID - Cloudfare)
|
185
|
-
domain: ".hubspot.com",
|
186
|
-
},
|
187
|
-
|
188
|
-
/** Facebook */
|
189
|
-
{
|
190
|
-
name: /^(_fb)/, // Facebook (ads)
|
191
|
-
domain: "tilli.pro",
|
192
|
-
},
|
193
|
-
|
194
|
-
/** Twitter */
|
195
|
-
{
|
196
|
-
name: /^(muc_ads)/, // Twitter (ads)
|
197
|
-
domain: ".t.co",
|
198
|
-
},
|
199
|
-
],
|
200
|
-
},
|
201
|
-
},
|
202
|
-
};
|
203
|
-
|
204
|
-
// TODO: DRY further w/ `./brf.ts`
|
205
|
-
const language: CookieConsentConfig["language"] = {
|
206
|
-
..._config.language,
|
207
|
-
translations: stripInvalidLinkedCategoriesFromTranslations(
|
208
|
-
_config.language.translations,
|
209
|
-
categories,
|
210
|
-
true, // clear cookie tables // FIXME: refactor this to actually just use the proper cookie table accoring to the categories var
|
211
|
-
),
|
212
|
-
};
|
213
|
-
|
214
|
-
const config: CookieConsentConfig = {
|
215
|
-
..._config,
|
216
|
-
categories,
|
217
|
-
language,
|
218
|
-
};
|
4
|
+
import { config } from "./tilli-pay-website.config";
|
219
5
|
|
220
6
|
// console.debug({ config }, "Initializing Cookie Consent (tilli Website)...");
|
221
7
|
const init = makeInitFn(run, config, showPreferences);
|
@@ -0,0 +1,27 @@
|
|
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
|
+
},
|
11
|
+
};
|
12
|
+
|
13
|
+
// TODO: DRY further w/ `./brf.ts`
|
14
|
+
const language: CookieConsentConfig["language"] = {
|
15
|
+
..._config.language,
|
16
|
+
translations: stripInvalidLinkedCategoriesFromTranslations(
|
17
|
+
_config.language.translations,
|
18
|
+
categories,
|
19
|
+
true, // clear cookie tables // FIXME: refactor this to actually just use the proper cookie table accoring to the categories var
|
20
|
+
),
|
21
|
+
};
|
22
|
+
|
23
|
+
export const config: CookieConsentConfig = {
|
24
|
+
..._config,
|
25
|
+
categories,
|
26
|
+
language,
|
27
|
+
};
|
package/src/init/tilli-pay.ts
CHANGED
@@ -1,35 +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
|
-
},
|
16
|
-
};
|
17
|
-
|
18
|
-
// TODO: DRY further w/ `./brf.ts`
|
19
|
-
const language: CookieConsentConfig["language"] = {
|
20
|
-
..._config.language,
|
21
|
-
translations: stripInvalidLinkedCategoriesFromTranslations(
|
22
|
-
_config.language.translations,
|
23
|
-
categories,
|
24
|
-
true, // clear cookie tables // FIXME: refactor this to actually just use the proper cookie table accoring to the categories var
|
25
|
-
),
|
26
|
-
};
|
27
|
-
|
28
|
-
const config: CookieConsentConfig = {
|
29
|
-
..._config,
|
30
|
-
categories,
|
31
|
-
language,
|
32
|
-
};
|
4
|
+
import { config } from "./tilli-pay.config";
|
33
5
|
|
34
6
|
// console.debug({ config }, "Initializing Cookie Consent (tilli Website)...");
|
35
7
|
const init = makeInitFn(run, config, showPreferences);
|