@drip-apex/sdk 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle-report.json +52 -52
- package/dist/drip.cjs +22 -1
- package/dist/drip.cjs.map +2 -2
- package/dist/drip.debug.js +1 -1
- package/dist/drip.debug.js.map +1 -1
- package/dist/drip.heatmap.js +1 -1
- package/dist/drip.heatmap.js.map +1 -1
- package/dist/drip.js +1 -1
- package/dist/drip.js.map +1 -1
- package/dist/drip.live.js +1 -1
- package/dist/drip.live.js.map +1 -1
- package/dist/drip.mjs +22 -1
- package/dist/drip.mjs.map +2 -2
- package/dist/metafiles/drip.cjs.meta.json +7 -7
- package/dist/metafiles/drip.debug.meta.json +7 -7
- package/dist/metafiles/drip.heatmap.meta.json +7 -7
- package/dist/metafiles/drip.live.meta.json +7 -7
- package/dist/metafiles/drip.meta.json +7 -7
- package/dist/metafiles/drip.mjs.meta.json +7 -7
- package/dist/metafiles/index.meta.json +7 -7
- package/dist/react/index.js +22 -1
- package/dist/react/index.js.map +2 -2
- package/dist/sri.json +12 -12
- package/dist/types/consent-evaluation.d.ts +2 -1
- package/dist/types/early-interaction-capture.d.ts +1 -1
- package/dist/types/inline-bootstrap.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/config-runtime.ts +1 -0
- package/src/consent-evaluation-borlabs.test.ts +41 -0
- package/src/consent-evaluation.ts +14 -1
- package/src/early-interaction-capture.ts +1 -1
- package/src/inline-bootstrap.ts +1 -1
- package/src/types.ts +1 -1
package/dist/drip.mjs
CHANGED
|
@@ -1178,6 +1178,7 @@ function readConsentCookie(name) {
|
|
|
1178
1178
|
function readConfiguredConsent(provider, requiredGroup, getter) {
|
|
1179
1179
|
const root = globalThis;
|
|
1180
1180
|
if (provider === "cookiescript") return readCookieScriptConsent(requiredGroup);
|
|
1181
|
+
if (provider === "borlabs") return readBorlabsConsent(requiredGroup);
|
|
1181
1182
|
if (provider === "usercentrics") {
|
|
1182
1183
|
const uc = root.UC_UI ?? root.window?.UC_UI;
|
|
1183
1184
|
if (typeof uc?.getServicesBaseInfo !== "function") return null;
|
|
@@ -1230,6 +1231,26 @@ function readConfiguredConsent(provider, requiredGroup, getter) {
|
|
|
1230
1231
|
}
|
|
1231
1232
|
return null;
|
|
1232
1233
|
}
|
|
1234
|
+
function readBorlabsConsent(requiredGroup) {
|
|
1235
|
+
const root = globalThis;
|
|
1236
|
+
const borlabs = root.BorlabsCookie ?? root.window?.BorlabsCookie;
|
|
1237
|
+
if (!borlabs) return null;
|
|
1238
|
+
const required = requiredGroup?.trim() || "statistics";
|
|
1239
|
+
const consents = borlabs.Consents;
|
|
1240
|
+
try {
|
|
1241
|
+
if (typeof consents?.hasConsent === "function" && consents.hasConsent(required)) return true;
|
|
1242
|
+
} catch {
|
|
1243
|
+
}
|
|
1244
|
+
try {
|
|
1245
|
+
if (typeof consents?.hasConsentForServiceGroup === "function") return Boolean(consents.hasConsentForServiceGroup(required));
|
|
1246
|
+
} catch {
|
|
1247
|
+
}
|
|
1248
|
+
try {
|
|
1249
|
+
if (typeof borlabs.checkCookieConsent === "function") return Boolean(borlabs.checkCookieConsent(required));
|
|
1250
|
+
} catch {
|
|
1251
|
+
}
|
|
1252
|
+
return null;
|
|
1253
|
+
}
|
|
1233
1254
|
function readCookieScriptConsent(requiredGroup) {
|
|
1234
1255
|
const root = globalThis;
|
|
1235
1256
|
const requested = (requiredGroup?.trim() || "analytics").toLowerCase();
|
|
@@ -18187,7 +18208,7 @@ function shouldPollConfiguredConsent5(config) {
|
|
|
18187
18208
|
const consent = config.consentMode;
|
|
18188
18209
|
if (!consent?.enabled || state.consentGranted) return false;
|
|
18189
18210
|
if (consent.provider && EVENT_DRIVEN_CONSENT_PROVIDERS5.has(consent.provider)) return false;
|
|
18190
|
-
return consent.provider === "custom" || consent.provider === "pandectes" || consent.provider === "cookiescript" || typeof consent.getter === "string";
|
|
18211
|
+
return consent.provider === "custom" || consent.provider === "pandectes" || consent.provider === "cookiescript" || consent.provider === "borlabs" || typeof consent.getter === "string";
|
|
18191
18212
|
}
|
|
18192
18213
|
function installConsentChangeListeners2(config) {
|
|
18193
18214
|
if (!config.consentMode?.enabled || typeof window === "undefined") return null;
|