@nortic/citronkaka-ui 0.1.0 → 0.1.1-beta.1
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.
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
function m() {
|
|
2
|
+
return location.hostname.split(".").slice(-2).join(".");
|
|
3
|
+
}
|
|
4
|
+
const h = {
|
|
5
|
+
domain: m(),
|
|
3
6
|
defaultModel: {
|
|
4
7
|
useraction: !1,
|
|
5
8
|
value: { necessary: !0, functional: !1, analytics: !1, marketing: !1 }
|
|
@@ -56,7 +59,7 @@ class d {
|
|
|
56
59
|
});
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
|
-
class
|
|
62
|
+
class k {
|
|
60
63
|
/**
|
|
61
64
|
* Cleans up cookies based on a list of blacklist patterns.
|
|
62
65
|
* @param blacklist An array of RegExp patterns for cookies to delete.
|
|
@@ -73,7 +76,7 @@ class f {
|
|
|
73
76
|
});
|
|
74
77
|
}
|
|
75
78
|
}
|
|
76
|
-
class
|
|
79
|
+
class f {
|
|
77
80
|
/**
|
|
78
81
|
* Starts the cookie interception process to block cookies based on a blacklist.
|
|
79
82
|
* @param blacklist An array of RegExp patterns for cookie names to block.
|
|
@@ -185,8 +188,8 @@ class l {
|
|
|
185
188
|
});
|
|
186
189
|
}
|
|
187
190
|
}
|
|
188
|
-
class
|
|
189
|
-
constructor(e =
|
|
191
|
+
class y {
|
|
192
|
+
constructor(e = h, t = { update: [] }, o = d, n = k, i = f, s = l) {
|
|
190
193
|
this.config = e, this.listeners = t, this.persistentService = o, this.cookieCleaner = n, this.cookieInterceptor = i, this.scriptInterceptor = s, n.run(this.blacklist.cookies), i.run(this.blacklist.cookies), s.run(this.blacklist.scripts);
|
|
191
194
|
}
|
|
192
195
|
/**
|
|
@@ -262,10 +265,10 @@ class g {
|
|
|
262
265
|
return o.necessary === !0 && typeof o.functional == "boolean" && typeof o.analytics == "boolean" && typeof o.marketing == "boolean";
|
|
263
266
|
}
|
|
264
267
|
}
|
|
265
|
-
window.Citronkaka = window.Citronkaka || new
|
|
266
|
-
const
|
|
267
|
-
class
|
|
268
|
-
constructor(e = null, t =
|
|
268
|
+
window.Citronkaka = window.Citronkaka || new y();
|
|
269
|
+
const g = window.Citronkaka;
|
|
270
|
+
class v {
|
|
271
|
+
constructor(e = null, t = g) {
|
|
269
272
|
this.ui = e, this.service = t, this.init();
|
|
270
273
|
}
|
|
271
274
|
/**
|
|
@@ -281,7 +284,7 @@ class b {
|
|
|
281
284
|
*/
|
|
282
285
|
async loadUI() {
|
|
283
286
|
try {
|
|
284
|
-
const { NorticCookieConsentDialog: e } = await import("./index-
|
|
287
|
+
const { NorticCookieConsentDialog: e } = await import("./index-BYym5AkI.js");
|
|
285
288
|
window.customElements.get("nortic-cookie-consent-dialog") || window.customElements.define("nortic-cookie-consent-dialog", e), this.ui = document.createElement("nortic-cookie-consent-dialog"), this.ui.setAttribute("data-testid", "cookie-consent"), document.body.appendChild(this.ui);
|
|
286
289
|
} catch (e) {
|
|
287
290
|
console.error("Failed to load the cookie consent dialog:", e);
|
|
@@ -294,8 +297,8 @@ class b {
|
|
|
294
297
|
this.ui && (document.body.removeChild(this.ui), this.ui = null);
|
|
295
298
|
}
|
|
296
299
|
}
|
|
297
|
-
const
|
|
300
|
+
const b = new v();
|
|
298
301
|
export {
|
|
299
|
-
|
|
300
|
-
|
|
302
|
+
g,
|
|
303
|
+
b as i
|
|
301
304
|
};
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nortic/citronkaka-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1-beta.1",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"openapi-fetch": "0.13.0",
|
|
25
25
|
"vue": "^3.5.13",
|
|
26
26
|
"vue-i18n": "^9.14.1",
|
|
27
|
-
"@nortic/citronkaka-service": "0.1.
|
|
27
|
+
"@nortic/citronkaka-service": "0.1.1-beta.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@antfu/eslint-config": "^3.11.2",
|