@blotoutio/providers-blotout-consent-sdk 1.52.1 → 1.53.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/index.cjs.js +97 -52
- package/index.d.ts +1 -0
- package/index.js +97 -52
- package/index.mjs +97 -52
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -6131,7 +6131,7 @@ PreferenceCenter.styles = [
|
|
|
6131
6131
|
}
|
|
6132
6132
|
|
|
6133
6133
|
.dns-link {
|
|
6134
|
-
font-size:
|
|
6134
|
+
font-size: var(--text-sm);
|
|
6135
6135
|
text-decoration: underline;
|
|
6136
6136
|
cursor: pointer;
|
|
6137
6137
|
background: none;
|
|
@@ -6210,17 +6210,6 @@ const dialogViewStyles = i$5 `
|
|
|
6210
6210
|
overflow: hidden;
|
|
6211
6211
|
}
|
|
6212
6212
|
|
|
6213
|
-
.dns-link {
|
|
6214
|
-
font-size: 0.75rem;
|
|
6215
|
-
text-decoration: underline;
|
|
6216
|
-
cursor: pointer;
|
|
6217
|
-
background: none;
|
|
6218
|
-
border: none;
|
|
6219
|
-
color: var(--bc-link-color, #6d28d9);
|
|
6220
|
-
padding: 0;
|
|
6221
|
-
margin-top: 8px;
|
|
6222
|
-
}
|
|
6223
|
-
|
|
6224
6213
|
@container (min-width: 480px) {
|
|
6225
6214
|
.btn-row {
|
|
6226
6215
|
flex-direction: row;
|
|
@@ -6781,7 +6770,7 @@ class DialogView extends ElementWithActions {
|
|
|
6781
6770
|
* @returns TemplateResult for the dialog header
|
|
6782
6771
|
*/
|
|
6783
6772
|
renderTitleAndDescription() {
|
|
6784
|
-
var _a;
|
|
6773
|
+
var _a, _b, _c;
|
|
6785
6774
|
const { text } = this.config;
|
|
6786
6775
|
return b `
|
|
6787
6776
|
<div class="bc-header" data-annotation="bc-header">
|
|
@@ -6808,6 +6797,10 @@ class DialogView extends ElementWithActions {
|
|
|
6808
6797
|
data-annotation="bc-description"
|
|
6809
6798
|
>
|
|
6810
6799
|
${(_a = text.description) !== null && _a !== void 0 ? _a : ''}
|
|
6800
|
+
${((_c = (_b = text.privacyPolicy) === null || _b === void 0 ? void 0 : _b.placement) !== null && _c !== void 0 ? _c : 'banner-subtext') ===
|
|
6801
|
+
'banner-subtext'
|
|
6802
|
+
? this.renderPrivacyPolicyLink()
|
|
6803
|
+
: b ``}
|
|
6811
6804
|
</p>
|
|
6812
6805
|
</div>
|
|
6813
6806
|
</div>
|
|
@@ -6846,7 +6839,7 @@ class DialogView extends ElementWithActions {
|
|
|
6846
6839
|
</div>`;
|
|
6847
6840
|
}
|
|
6848
6841
|
renderPrivacyPolicyLink() {
|
|
6849
|
-
var _a, _b, _c;
|
|
6842
|
+
var _a, _b, _c, _d, _e;
|
|
6850
6843
|
const url = (_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '';
|
|
6851
6844
|
let safeUrl = null;
|
|
6852
6845
|
try {
|
|
@@ -6858,15 +6851,17 @@ class DialogView extends ElementWithActions {
|
|
|
6858
6851
|
catch {
|
|
6859
6852
|
// invalid URL — omit link
|
|
6860
6853
|
}
|
|
6854
|
+
const pretext = (_d = (_c = this.config.text.privacyPolicy) === null || _c === void 0 ? void 0 : _c.pretext) !== null && _d !== void 0 ? _d : 'Learn more in our';
|
|
6861
6855
|
return safeUrl
|
|
6862
|
-
? b
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6856
|
+
? b `${pretext}
|
|
6857
|
+
<a
|
|
6858
|
+
href="${safeUrl}"
|
|
6859
|
+
target="_blank"
|
|
6860
|
+
rel="noopener noreferrer"
|
|
6861
|
+
class="text-[var(--bc-link-color)] text-xs font-medium hover:opacity-80 underline underline-offset-2 bc-privacy-link"
|
|
6862
|
+
data-annotation="bc-privacy-link"
|
|
6863
|
+
>${((_e = this.config.text.privacyPolicy) === null || _e === void 0 ? void 0 : _e.label) || 'Privacy Policy'}</a
|
|
6864
|
+
>`
|
|
6870
6865
|
: b ``;
|
|
6871
6866
|
}
|
|
6872
6867
|
/**
|
|
@@ -6874,6 +6869,7 @@ class DialogView extends ElementWithActions {
|
|
|
6874
6869
|
* @returns TemplateResult for the dialog
|
|
6875
6870
|
*/
|
|
6876
6871
|
render() {
|
|
6872
|
+
var _a, _b;
|
|
6877
6873
|
if (this.showDoNotSellForm) {
|
|
6878
6874
|
return b `
|
|
6879
6875
|
<do-not-sell-form
|
|
@@ -6895,19 +6891,17 @@ class DialogView extends ElementWithActions {
|
|
|
6895
6891
|
.annotationCss=${this.showAnnotations ? ANNOTATION_CSS : ''}
|
|
6896
6892
|
>
|
|
6897
6893
|
${this.renderTitleAndDescription()} ${this.renderContent()}
|
|
6898
|
-
${
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
: '';
|
|
6910
|
-
})()}
|
|
6894
|
+
${this.config.text.disclaimer
|
|
6895
|
+
? b `<div
|
|
6896
|
+
class="text-[var(--bc-text-color)] text-xs opacity-60 mb-3 bc-disclaimer"
|
|
6897
|
+
data-annotation="bc-disclaimer"
|
|
6898
|
+
>
|
|
6899
|
+
${this.config.text.disclaimer}
|
|
6900
|
+
${((_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.placement) !== null && _b !== void 0 ? _b : 'banner-subtext') === 'disclaimer'
|
|
6901
|
+
? b ` ${this.renderPrivacyPolicyLink()}`
|
|
6902
|
+
: b ``}
|
|
6903
|
+
</div>`
|
|
6904
|
+
: ''}
|
|
6911
6905
|
<powered-by-blotout
|
|
6912
6906
|
class="bc-footer"
|
|
6913
6907
|
data-annotation="bc-footer"
|
|
@@ -6973,7 +6967,7 @@ const longViewStyles = i$5 `
|
|
|
6973
6967
|
}
|
|
6974
6968
|
|
|
6975
6969
|
.dns-link {
|
|
6976
|
-
font-size:
|
|
6970
|
+
font-size: var(--text-sm);
|
|
6977
6971
|
text-decoration: underline;
|
|
6978
6972
|
cursor: pointer;
|
|
6979
6973
|
background: none;
|
|
@@ -7076,7 +7070,7 @@ class LongView extends ElementWithActions {
|
|
|
7076
7070
|
super.disconnectedCallback();
|
|
7077
7071
|
}
|
|
7078
7072
|
renderTitleAndDescription() {
|
|
7079
|
-
var _a;
|
|
7073
|
+
var _a, _b, _c;
|
|
7080
7074
|
const { text } = this.config;
|
|
7081
7075
|
return b `
|
|
7082
7076
|
<div class="bc-header" data-annotation="bc-header">
|
|
@@ -7092,6 +7086,10 @@ class LongView extends ElementWithActions {
|
|
|
7092
7086
|
data-annotation="bc-description"
|
|
7093
7087
|
>
|
|
7094
7088
|
${(_a = text.description) !== null && _a !== void 0 ? _a : ''}
|
|
7089
|
+
${((_c = (_b = text.privacyPolicy) === null || _b === void 0 ? void 0 : _b.placement) !== null && _c !== void 0 ? _c : 'banner-subtext') ===
|
|
7090
|
+
'banner-subtext'
|
|
7091
|
+
? this.renderPrivacyPolicyLink()
|
|
7092
|
+
: b ``}
|
|
7095
7093
|
</p>
|
|
7096
7094
|
</div>
|
|
7097
7095
|
</div>
|
|
@@ -7199,7 +7197,7 @@ class LongView extends ElementWithActions {
|
|
|
7199
7197
|
`;
|
|
7200
7198
|
}
|
|
7201
7199
|
renderPrivacyPolicyLink() {
|
|
7202
|
-
var _a, _b, _c;
|
|
7200
|
+
var _a, _b, _c, _d, _e;
|
|
7203
7201
|
const url = (_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '';
|
|
7204
7202
|
let safeUrl = null;
|
|
7205
7203
|
try {
|
|
@@ -7211,18 +7209,21 @@ class LongView extends ElementWithActions {
|
|
|
7211
7209
|
catch {
|
|
7212
7210
|
// invalid URL — omit link
|
|
7213
7211
|
}
|
|
7212
|
+
const pretext = (_d = (_c = this.config.text.privacyPolicy) === null || _c === void 0 ? void 0 : _c.pretext) !== null && _d !== void 0 ? _d : 'Learn more in our';
|
|
7214
7213
|
return safeUrl
|
|
7215
|
-
? b
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7214
|
+
? b `${pretext}
|
|
7215
|
+
<a
|
|
7216
|
+
href="${safeUrl}"
|
|
7217
|
+
target="_blank"
|
|
7218
|
+
rel="noopener noreferrer"
|
|
7219
|
+
class="text-[var(--bc-link-color)] text-xs font-medium hover:opacity-80 underline underline-offset-2 bc-privacy-link"
|
|
7220
|
+
data-annotation="bc-privacy-link"
|
|
7221
|
+
>${((_e = this.config.text.privacyPolicy) === null || _e === void 0 ? void 0 : _e.label) || 'Privacy Policy'}</a
|
|
7222
|
+
>`
|
|
7223
7223
|
: b ``;
|
|
7224
7224
|
}
|
|
7225
7225
|
renderContent() {
|
|
7226
|
+
var _a, _b;
|
|
7226
7227
|
return b `
|
|
7227
7228
|
<div class="content-layout bc-content" data-annotation="bc-content">
|
|
7228
7229
|
${this.renderTitleAndDescription()}
|
|
@@ -7246,7 +7247,10 @@ class LongView extends ElementWithActions {
|
|
|
7246
7247
|
class="text-[var(--bc-text-color)] text-xs opacity-60 mb-3 bc-disclaimer"
|
|
7247
7248
|
data-annotation="bc-disclaimer"
|
|
7248
7249
|
>
|
|
7249
|
-
${this.config.text.disclaimer}
|
|
7250
|
+
${this.config.text.disclaimer}
|
|
7251
|
+
${((_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.placement) !== null && _b !== void 0 ? _b : 'banner-subtext') === 'disclaimer'
|
|
7252
|
+
? b ` ${this.renderPrivacyPolicyLink()}`
|
|
7253
|
+
: b ``}
|
|
7250
7254
|
</div>`
|
|
7251
7255
|
: ''}
|
|
7252
7256
|
<powered-by-blotout
|
|
@@ -7443,6 +7447,7 @@ class ConsentBanner extends ElementWithStylesheet {
|
|
|
7443
7447
|
this.disableActions = false;
|
|
7444
7448
|
this.showBanner = false;
|
|
7445
7449
|
this.showCookieIcon = true;
|
|
7450
|
+
this.showDnsFormStandalone = false;
|
|
7446
7451
|
this.disableCookieIcon = true;
|
|
7447
7452
|
this.isLoading = false;
|
|
7448
7453
|
this.bannerTimer = null;
|
|
@@ -7457,6 +7462,13 @@ class ConsentBanner extends ElementWithStylesheet {
|
|
|
7457
7462
|
show() {
|
|
7458
7463
|
this.showBanner = true;
|
|
7459
7464
|
}
|
|
7465
|
+
/** Programmatically opens the Do Not Sell form without triggering the consent banner. */
|
|
7466
|
+
showDnsForm() {
|
|
7467
|
+
this.showDnsFormStandalone = true;
|
|
7468
|
+
}
|
|
7469
|
+
handleDnsFormClosed() {
|
|
7470
|
+
this.showDnsFormStandalone = false;
|
|
7471
|
+
}
|
|
7460
7472
|
async checkAndShowBanner() {
|
|
7461
7473
|
var _a, _b, _c;
|
|
7462
7474
|
if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.behavior)) {
|
|
@@ -7720,6 +7732,18 @@ class ConsentBanner extends ElementWithStylesheet {
|
|
|
7720
7732
|
}
|
|
7721
7733
|
render() {
|
|
7722
7734
|
var _a, _b, _c;
|
|
7735
|
+
if (this.showDnsFormStandalone) {
|
|
7736
|
+
return b `<do-not-sell-form
|
|
7737
|
+
.open=${true}
|
|
7738
|
+
.config=${this.config}
|
|
7739
|
+
.css=${this.css}
|
|
7740
|
+
.disableActions=${this.disableActions}
|
|
7741
|
+
.contained=${this.contained}
|
|
7742
|
+
.showAnnotations=${this.showAnnotations}
|
|
7743
|
+
@do-not-sell-form-closed=${this.handleDnsFormClosed}
|
|
7744
|
+
@do-not-sell-request-submitted=${this.handleDoNotSellRequestSubmitted}
|
|
7745
|
+
></do-not-sell-form>`;
|
|
7746
|
+
}
|
|
7723
7747
|
return b `<div
|
|
7724
7748
|
class=${e({ 'root-contained': this.contained })}
|
|
7725
7749
|
@accept-all=${this.handleAcceptAll}
|
|
@@ -7778,6 +7802,10 @@ __decorate([
|
|
|
7778
7802
|
r$1(),
|
|
7779
7803
|
__metadata("design:type", Object)
|
|
7780
7804
|
], ConsentBanner.prototype, "showCookieIcon", void 0);
|
|
7805
|
+
__decorate([
|
|
7806
|
+
r$1(),
|
|
7807
|
+
__metadata("design:type", Object)
|
|
7808
|
+
], ConsentBanner.prototype, "showDnsFormStandalone", void 0);
|
|
7781
7809
|
__decorate([
|
|
7782
7810
|
r$1(),
|
|
7783
7811
|
__metadata("design:type", Object)
|
|
@@ -7833,6 +7861,15 @@ class BlotoutConsent extends ElementWithStylesheet {
|
|
|
7833
7861
|
logger.info('BlotoutConsent: Cannot show banner - not yet initialized. Ensure config and blotoutConsentAPI are set.');
|
|
7834
7862
|
}
|
|
7835
7863
|
}
|
|
7864
|
+
/** Programmatically opens the Do Not Sell form without showing the consent banner. */
|
|
7865
|
+
showDnsForm() {
|
|
7866
|
+
if (this.banner) {
|
|
7867
|
+
this.banner.showDnsForm();
|
|
7868
|
+
}
|
|
7869
|
+
else {
|
|
7870
|
+
logger.info('BlotoutConsent: Cannot show DNS form - not yet initialized. Ensure config and blotoutConsentAPI are set.');
|
|
7871
|
+
}
|
|
7872
|
+
}
|
|
7836
7873
|
render() {
|
|
7837
7874
|
if (!this.config || !this.blotoutConsentAPI) {
|
|
7838
7875
|
return;
|
|
@@ -7900,15 +7937,18 @@ if (!customElements.get('blotout-consent')) {
|
|
|
7900
7937
|
customElements.define('blotout-consent', BlotoutConsent);
|
|
7901
7938
|
}
|
|
7902
7939
|
|
|
7903
|
-
var _a, _b, _c;
|
|
7904
|
-
var
|
|
7940
|
+
var _a, _b, _c, _d;
|
|
7941
|
+
var _e, _f, _g;
|
|
7905
7942
|
let blotoutConsent;
|
|
7906
7943
|
if (typeof window != 'undefined' && typeof document != 'undefined') {
|
|
7907
7944
|
(_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {});
|
|
7908
|
-
(_b = (
|
|
7909
|
-
|
|
7945
|
+
(_b = (_e = window[registryKey]).showBanner) !== null && _b !== void 0 ? _b : (_e.showBanner = () => {
|
|
7946
|
+
logger.info('showBanner() called before blotout-consent init() — call will be ignored. Ensure init() has completed first.');
|
|
7947
|
+
});
|
|
7948
|
+
(_c = (_f = window[registryKey]).showDnsForm) !== null && _c !== void 0 ? _c : (_f.showDnsForm = () => {
|
|
7949
|
+
logger.info('showDnsForm() called before blotout-consent init() — call will be ignored. Ensure init() has completed first.');
|
|
7910
7950
|
});
|
|
7911
|
-
(
|
|
7951
|
+
(_d = (_g = window[registryKey]).ui) !== null && _d !== void 0 ? _d : (_g.ui = {
|
|
7912
7952
|
init(params) {
|
|
7913
7953
|
if (!params || typeof params !== 'object') {
|
|
7914
7954
|
console.error('Invalid blotout-consent init params');
|
|
@@ -7953,6 +7993,11 @@ if (typeof window != 'undefined' && typeof document != 'undefined') {
|
|
|
7953
7993
|
blotoutConsent.show();
|
|
7954
7994
|
}
|
|
7955
7995
|
};
|
|
7996
|
+
window[registryKey].showDnsForm = () => {
|
|
7997
|
+
if (blotoutConsent) {
|
|
7998
|
+
blotoutConsent.showDnsForm();
|
|
7999
|
+
}
|
|
8000
|
+
};
|
|
7956
8001
|
},
|
|
7957
8002
|
});
|
|
7958
8003
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6130,7 +6130,7 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
6130
6130
|
}
|
|
6131
6131
|
|
|
6132
6132
|
.dns-link {
|
|
6133
|
-
font-size:
|
|
6133
|
+
font-size: var(--text-sm);
|
|
6134
6134
|
text-decoration: underline;
|
|
6135
6135
|
cursor: pointer;
|
|
6136
6136
|
background: none;
|
|
@@ -6209,17 +6209,6 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
6209
6209
|
overflow: hidden;
|
|
6210
6210
|
}
|
|
6211
6211
|
|
|
6212
|
-
.dns-link {
|
|
6213
|
-
font-size: 0.75rem;
|
|
6214
|
-
text-decoration: underline;
|
|
6215
|
-
cursor: pointer;
|
|
6216
|
-
background: none;
|
|
6217
|
-
border: none;
|
|
6218
|
-
color: var(--bc-link-color, #6d28d9);
|
|
6219
|
-
padding: 0;
|
|
6220
|
-
margin-top: 8px;
|
|
6221
|
-
}
|
|
6222
|
-
|
|
6223
6212
|
@container (min-width: 480px) {
|
|
6224
6213
|
.btn-row {
|
|
6225
6214
|
flex-direction: row;
|
|
@@ -6780,7 +6769,7 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
6780
6769
|
* @returns TemplateResult for the dialog header
|
|
6781
6770
|
*/
|
|
6782
6771
|
renderTitleAndDescription() {
|
|
6783
|
-
var _a;
|
|
6772
|
+
var _a, _b, _c;
|
|
6784
6773
|
const { text } = this.config;
|
|
6785
6774
|
return b `
|
|
6786
6775
|
<div class="bc-header" data-annotation="bc-header">
|
|
@@ -6807,6 +6796,10 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
6807
6796
|
data-annotation="bc-description"
|
|
6808
6797
|
>
|
|
6809
6798
|
${(_a = text.description) !== null && _a !== void 0 ? _a : ''}
|
|
6799
|
+
${((_c = (_b = text.privacyPolicy) === null || _b === void 0 ? void 0 : _b.placement) !== null && _c !== void 0 ? _c : 'banner-subtext') ===
|
|
6800
|
+
'banner-subtext'
|
|
6801
|
+
? this.renderPrivacyPolicyLink()
|
|
6802
|
+
: b ``}
|
|
6810
6803
|
</p>
|
|
6811
6804
|
</div>
|
|
6812
6805
|
</div>
|
|
@@ -6845,7 +6838,7 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
6845
6838
|
</div>`;
|
|
6846
6839
|
}
|
|
6847
6840
|
renderPrivacyPolicyLink() {
|
|
6848
|
-
var _a, _b, _c;
|
|
6841
|
+
var _a, _b, _c, _d, _e;
|
|
6849
6842
|
const url = (_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '';
|
|
6850
6843
|
let safeUrl = null;
|
|
6851
6844
|
try {
|
|
@@ -6857,15 +6850,17 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
6857
6850
|
catch {
|
|
6858
6851
|
// invalid URL — omit link
|
|
6859
6852
|
}
|
|
6853
|
+
const pretext = (_d = (_c = this.config.text.privacyPolicy) === null || _c === void 0 ? void 0 : _c.pretext) !== null && _d !== void 0 ? _d : 'Learn more in our';
|
|
6860
6854
|
return safeUrl
|
|
6861
|
-
? b
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6855
|
+
? b `${pretext}
|
|
6856
|
+
<a
|
|
6857
|
+
href="${safeUrl}"
|
|
6858
|
+
target="_blank"
|
|
6859
|
+
rel="noopener noreferrer"
|
|
6860
|
+
class="text-[var(--bc-link-color)] text-xs font-medium hover:opacity-80 underline underline-offset-2 bc-privacy-link"
|
|
6861
|
+
data-annotation="bc-privacy-link"
|
|
6862
|
+
>${((_e = this.config.text.privacyPolicy) === null || _e === void 0 ? void 0 : _e.label) || 'Privacy Policy'}</a
|
|
6863
|
+
>`
|
|
6869
6864
|
: b ``;
|
|
6870
6865
|
}
|
|
6871
6866
|
/**
|
|
@@ -6873,6 +6868,7 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
6873
6868
|
* @returns TemplateResult for the dialog
|
|
6874
6869
|
*/
|
|
6875
6870
|
render() {
|
|
6871
|
+
var _a, _b;
|
|
6876
6872
|
if (this.showDoNotSellForm) {
|
|
6877
6873
|
return b `
|
|
6878
6874
|
<do-not-sell-form
|
|
@@ -6894,19 +6890,17 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
6894
6890
|
.annotationCss=${this.showAnnotations ? ANNOTATION_CSS : ''}
|
|
6895
6891
|
>
|
|
6896
6892
|
${this.renderTitleAndDescription()} ${this.renderContent()}
|
|
6897
|
-
${
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
: '';
|
|
6909
|
-
})()}
|
|
6893
|
+
${this.config.text.disclaimer
|
|
6894
|
+
? b `<div
|
|
6895
|
+
class="text-[var(--bc-text-color)] text-xs opacity-60 mb-3 bc-disclaimer"
|
|
6896
|
+
data-annotation="bc-disclaimer"
|
|
6897
|
+
>
|
|
6898
|
+
${this.config.text.disclaimer}
|
|
6899
|
+
${((_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.placement) !== null && _b !== void 0 ? _b : 'banner-subtext') === 'disclaimer'
|
|
6900
|
+
? b ` ${this.renderPrivacyPolicyLink()}`
|
|
6901
|
+
: b ``}
|
|
6902
|
+
</div>`
|
|
6903
|
+
: ''}
|
|
6910
6904
|
<powered-by-blotout
|
|
6911
6905
|
class="bc-footer"
|
|
6912
6906
|
data-annotation="bc-footer"
|
|
@@ -6972,7 +6966,7 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
6972
6966
|
}
|
|
6973
6967
|
|
|
6974
6968
|
.dns-link {
|
|
6975
|
-
font-size:
|
|
6969
|
+
font-size: var(--text-sm);
|
|
6976
6970
|
text-decoration: underline;
|
|
6977
6971
|
cursor: pointer;
|
|
6978
6972
|
background: none;
|
|
@@ -7075,7 +7069,7 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7075
7069
|
super.disconnectedCallback();
|
|
7076
7070
|
}
|
|
7077
7071
|
renderTitleAndDescription() {
|
|
7078
|
-
var _a;
|
|
7072
|
+
var _a, _b, _c;
|
|
7079
7073
|
const { text } = this.config;
|
|
7080
7074
|
return b `
|
|
7081
7075
|
<div class="bc-header" data-annotation="bc-header">
|
|
@@ -7091,6 +7085,10 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7091
7085
|
data-annotation="bc-description"
|
|
7092
7086
|
>
|
|
7093
7087
|
${(_a = text.description) !== null && _a !== void 0 ? _a : ''}
|
|
7088
|
+
${((_c = (_b = text.privacyPolicy) === null || _b === void 0 ? void 0 : _b.placement) !== null && _c !== void 0 ? _c : 'banner-subtext') ===
|
|
7089
|
+
'banner-subtext'
|
|
7090
|
+
? this.renderPrivacyPolicyLink()
|
|
7091
|
+
: b ``}
|
|
7094
7092
|
</p>
|
|
7095
7093
|
</div>
|
|
7096
7094
|
</div>
|
|
@@ -7198,7 +7196,7 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7198
7196
|
`;
|
|
7199
7197
|
}
|
|
7200
7198
|
renderPrivacyPolicyLink() {
|
|
7201
|
-
var _a, _b, _c;
|
|
7199
|
+
var _a, _b, _c, _d, _e;
|
|
7202
7200
|
const url = (_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '';
|
|
7203
7201
|
let safeUrl = null;
|
|
7204
7202
|
try {
|
|
@@ -7210,18 +7208,21 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7210
7208
|
catch {
|
|
7211
7209
|
// invalid URL — omit link
|
|
7212
7210
|
}
|
|
7211
|
+
const pretext = (_d = (_c = this.config.text.privacyPolicy) === null || _c === void 0 ? void 0 : _c.pretext) !== null && _d !== void 0 ? _d : 'Learn more in our';
|
|
7213
7212
|
return safeUrl
|
|
7214
|
-
? b
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7213
|
+
? b `${pretext}
|
|
7214
|
+
<a
|
|
7215
|
+
href="${safeUrl}"
|
|
7216
|
+
target="_blank"
|
|
7217
|
+
rel="noopener noreferrer"
|
|
7218
|
+
class="text-[var(--bc-link-color)] text-xs font-medium hover:opacity-80 underline underline-offset-2 bc-privacy-link"
|
|
7219
|
+
data-annotation="bc-privacy-link"
|
|
7220
|
+
>${((_e = this.config.text.privacyPolicy) === null || _e === void 0 ? void 0 : _e.label) || 'Privacy Policy'}</a
|
|
7221
|
+
>`
|
|
7222
7222
|
: b ``;
|
|
7223
7223
|
}
|
|
7224
7224
|
renderContent() {
|
|
7225
|
+
var _a, _b;
|
|
7225
7226
|
return b `
|
|
7226
7227
|
<div class="content-layout bc-content" data-annotation="bc-content">
|
|
7227
7228
|
${this.renderTitleAndDescription()}
|
|
@@ -7245,7 +7246,10 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7245
7246
|
class="text-[var(--bc-text-color)] text-xs opacity-60 mb-3 bc-disclaimer"
|
|
7246
7247
|
data-annotation="bc-disclaimer"
|
|
7247
7248
|
>
|
|
7248
|
-
${this.config.text.disclaimer}
|
|
7249
|
+
${this.config.text.disclaimer}
|
|
7250
|
+
${((_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.placement) !== null && _b !== void 0 ? _b : 'banner-subtext') === 'disclaimer'
|
|
7251
|
+
? b ` ${this.renderPrivacyPolicyLink()}`
|
|
7252
|
+
: b ``}
|
|
7249
7253
|
</div>`
|
|
7250
7254
|
: ''}
|
|
7251
7255
|
<powered-by-blotout
|
|
@@ -7442,6 +7446,7 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7442
7446
|
this.disableActions = false;
|
|
7443
7447
|
this.showBanner = false;
|
|
7444
7448
|
this.showCookieIcon = true;
|
|
7449
|
+
this.showDnsFormStandalone = false;
|
|
7445
7450
|
this.disableCookieIcon = true;
|
|
7446
7451
|
this.isLoading = false;
|
|
7447
7452
|
this.bannerTimer = null;
|
|
@@ -7456,6 +7461,13 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7456
7461
|
show() {
|
|
7457
7462
|
this.showBanner = true;
|
|
7458
7463
|
}
|
|
7464
|
+
/** Programmatically opens the Do Not Sell form without triggering the consent banner. */
|
|
7465
|
+
showDnsForm() {
|
|
7466
|
+
this.showDnsFormStandalone = true;
|
|
7467
|
+
}
|
|
7468
|
+
handleDnsFormClosed() {
|
|
7469
|
+
this.showDnsFormStandalone = false;
|
|
7470
|
+
}
|
|
7459
7471
|
async checkAndShowBanner() {
|
|
7460
7472
|
var _a, _b, _c;
|
|
7461
7473
|
if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.behavior)) {
|
|
@@ -7719,6 +7731,18 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7719
7731
|
}
|
|
7720
7732
|
render() {
|
|
7721
7733
|
var _a, _b, _c;
|
|
7734
|
+
if (this.showDnsFormStandalone) {
|
|
7735
|
+
return b `<do-not-sell-form
|
|
7736
|
+
.open=${true}
|
|
7737
|
+
.config=${this.config}
|
|
7738
|
+
.css=${this.css}
|
|
7739
|
+
.disableActions=${this.disableActions}
|
|
7740
|
+
.contained=${this.contained}
|
|
7741
|
+
.showAnnotations=${this.showAnnotations}
|
|
7742
|
+
@do-not-sell-form-closed=${this.handleDnsFormClosed}
|
|
7743
|
+
@do-not-sell-request-submitted=${this.handleDoNotSellRequestSubmitted}
|
|
7744
|
+
></do-not-sell-form>`;
|
|
7745
|
+
}
|
|
7722
7746
|
return b `<div
|
|
7723
7747
|
class=${e({ 'root-contained': this.contained })}
|
|
7724
7748
|
@accept-all=${this.handleAcceptAll}
|
|
@@ -7777,6 +7801,10 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7777
7801
|
r$1(),
|
|
7778
7802
|
__metadata("design:type", Object)
|
|
7779
7803
|
], ConsentBanner.prototype, "showCookieIcon", void 0);
|
|
7804
|
+
__decorate([
|
|
7805
|
+
r$1(),
|
|
7806
|
+
__metadata("design:type", Object)
|
|
7807
|
+
], ConsentBanner.prototype, "showDnsFormStandalone", void 0);
|
|
7780
7808
|
__decorate([
|
|
7781
7809
|
r$1(),
|
|
7782
7810
|
__metadata("design:type", Object)
|
|
@@ -7832,6 +7860,15 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7832
7860
|
logger.info('BlotoutConsent: Cannot show banner - not yet initialized. Ensure config and blotoutConsentAPI are set.');
|
|
7833
7861
|
}
|
|
7834
7862
|
}
|
|
7863
|
+
/** Programmatically opens the Do Not Sell form without showing the consent banner. */
|
|
7864
|
+
showDnsForm() {
|
|
7865
|
+
if (this.banner) {
|
|
7866
|
+
this.banner.showDnsForm();
|
|
7867
|
+
}
|
|
7868
|
+
else {
|
|
7869
|
+
logger.info('BlotoutConsent: Cannot show DNS form - not yet initialized. Ensure config and blotoutConsentAPI are set.');
|
|
7870
|
+
}
|
|
7871
|
+
}
|
|
7835
7872
|
render() {
|
|
7836
7873
|
if (!this.config || !this.blotoutConsentAPI) {
|
|
7837
7874
|
return;
|
|
@@ -7899,15 +7936,18 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7899
7936
|
customElements.define('blotout-consent', BlotoutConsent);
|
|
7900
7937
|
}
|
|
7901
7938
|
|
|
7902
|
-
var _a, _b, _c;
|
|
7903
|
-
var
|
|
7939
|
+
var _a, _b, _c, _d;
|
|
7940
|
+
var _e, _f, _g;
|
|
7904
7941
|
let blotoutConsent;
|
|
7905
7942
|
if (typeof window != 'undefined' && typeof document != 'undefined') {
|
|
7906
7943
|
(_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {});
|
|
7907
|
-
(_b = (
|
|
7908
|
-
|
|
7944
|
+
(_b = (_e = window[registryKey]).showBanner) !== null && _b !== void 0 ? _b : (_e.showBanner = () => {
|
|
7945
|
+
logger.info('showBanner() called before blotout-consent init() — call will be ignored. Ensure init() has completed first.');
|
|
7946
|
+
});
|
|
7947
|
+
(_c = (_f = window[registryKey]).showDnsForm) !== null && _c !== void 0 ? _c : (_f.showDnsForm = () => {
|
|
7948
|
+
logger.info('showDnsForm() called before blotout-consent init() — call will be ignored. Ensure init() has completed first.');
|
|
7909
7949
|
});
|
|
7910
|
-
(
|
|
7950
|
+
(_d = (_g = window[registryKey]).ui) !== null && _d !== void 0 ? _d : (_g.ui = {
|
|
7911
7951
|
init(params) {
|
|
7912
7952
|
if (!params || typeof params !== 'object') {
|
|
7913
7953
|
console.error('Invalid blotout-consent init params');
|
|
@@ -7952,6 +7992,11 @@ var ProvidersBlotoutConsentSdk = (function (exports) {
|
|
|
7952
7992
|
blotoutConsent.show();
|
|
7953
7993
|
}
|
|
7954
7994
|
};
|
|
7995
|
+
window[registryKey].showDnsForm = () => {
|
|
7996
|
+
if (blotoutConsent) {
|
|
7997
|
+
blotoutConsent.showDnsForm();
|
|
7998
|
+
}
|
|
7999
|
+
};
|
|
7955
8000
|
},
|
|
7956
8001
|
});
|
|
7957
8002
|
}
|
package/index.mjs
CHANGED
|
@@ -6127,7 +6127,7 @@ PreferenceCenter.styles = [
|
|
|
6127
6127
|
}
|
|
6128
6128
|
|
|
6129
6129
|
.dns-link {
|
|
6130
|
-
font-size:
|
|
6130
|
+
font-size: var(--text-sm);
|
|
6131
6131
|
text-decoration: underline;
|
|
6132
6132
|
cursor: pointer;
|
|
6133
6133
|
background: none;
|
|
@@ -6206,17 +6206,6 @@ const dialogViewStyles = i$5 `
|
|
|
6206
6206
|
overflow: hidden;
|
|
6207
6207
|
}
|
|
6208
6208
|
|
|
6209
|
-
.dns-link {
|
|
6210
|
-
font-size: 0.75rem;
|
|
6211
|
-
text-decoration: underline;
|
|
6212
|
-
cursor: pointer;
|
|
6213
|
-
background: none;
|
|
6214
|
-
border: none;
|
|
6215
|
-
color: var(--bc-link-color, #6d28d9);
|
|
6216
|
-
padding: 0;
|
|
6217
|
-
margin-top: 8px;
|
|
6218
|
-
}
|
|
6219
|
-
|
|
6220
6209
|
@container (min-width: 480px) {
|
|
6221
6210
|
.btn-row {
|
|
6222
6211
|
flex-direction: row;
|
|
@@ -6777,7 +6766,7 @@ class DialogView extends ElementWithActions {
|
|
|
6777
6766
|
* @returns TemplateResult for the dialog header
|
|
6778
6767
|
*/
|
|
6779
6768
|
renderTitleAndDescription() {
|
|
6780
|
-
var _a;
|
|
6769
|
+
var _a, _b, _c;
|
|
6781
6770
|
const { text } = this.config;
|
|
6782
6771
|
return b `
|
|
6783
6772
|
<div class="bc-header" data-annotation="bc-header">
|
|
@@ -6804,6 +6793,10 @@ class DialogView extends ElementWithActions {
|
|
|
6804
6793
|
data-annotation="bc-description"
|
|
6805
6794
|
>
|
|
6806
6795
|
${(_a = text.description) !== null && _a !== void 0 ? _a : ''}
|
|
6796
|
+
${((_c = (_b = text.privacyPolicy) === null || _b === void 0 ? void 0 : _b.placement) !== null && _c !== void 0 ? _c : 'banner-subtext') ===
|
|
6797
|
+
'banner-subtext'
|
|
6798
|
+
? this.renderPrivacyPolicyLink()
|
|
6799
|
+
: b ``}
|
|
6807
6800
|
</p>
|
|
6808
6801
|
</div>
|
|
6809
6802
|
</div>
|
|
@@ -6842,7 +6835,7 @@ class DialogView extends ElementWithActions {
|
|
|
6842
6835
|
</div>`;
|
|
6843
6836
|
}
|
|
6844
6837
|
renderPrivacyPolicyLink() {
|
|
6845
|
-
var _a, _b, _c;
|
|
6838
|
+
var _a, _b, _c, _d, _e;
|
|
6846
6839
|
const url = (_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '';
|
|
6847
6840
|
let safeUrl = null;
|
|
6848
6841
|
try {
|
|
@@ -6854,15 +6847,17 @@ class DialogView extends ElementWithActions {
|
|
|
6854
6847
|
catch {
|
|
6855
6848
|
// invalid URL — omit link
|
|
6856
6849
|
}
|
|
6850
|
+
const pretext = (_d = (_c = this.config.text.privacyPolicy) === null || _c === void 0 ? void 0 : _c.pretext) !== null && _d !== void 0 ? _d : 'Learn more in our';
|
|
6857
6851
|
return safeUrl
|
|
6858
|
-
? b
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6852
|
+
? b `${pretext}
|
|
6853
|
+
<a
|
|
6854
|
+
href="${safeUrl}"
|
|
6855
|
+
target="_blank"
|
|
6856
|
+
rel="noopener noreferrer"
|
|
6857
|
+
class="text-[var(--bc-link-color)] text-xs font-medium hover:opacity-80 underline underline-offset-2 bc-privacy-link"
|
|
6858
|
+
data-annotation="bc-privacy-link"
|
|
6859
|
+
>${((_e = this.config.text.privacyPolicy) === null || _e === void 0 ? void 0 : _e.label) || 'Privacy Policy'}</a
|
|
6860
|
+
>`
|
|
6866
6861
|
: b ``;
|
|
6867
6862
|
}
|
|
6868
6863
|
/**
|
|
@@ -6870,6 +6865,7 @@ class DialogView extends ElementWithActions {
|
|
|
6870
6865
|
* @returns TemplateResult for the dialog
|
|
6871
6866
|
*/
|
|
6872
6867
|
render() {
|
|
6868
|
+
var _a, _b;
|
|
6873
6869
|
if (this.showDoNotSellForm) {
|
|
6874
6870
|
return b `
|
|
6875
6871
|
<do-not-sell-form
|
|
@@ -6891,19 +6887,17 @@ class DialogView extends ElementWithActions {
|
|
|
6891
6887
|
.annotationCss=${this.showAnnotations ? ANNOTATION_CSS : ''}
|
|
6892
6888
|
>
|
|
6893
6889
|
${this.renderTitleAndDescription()} ${this.renderContent()}
|
|
6894
|
-
${
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
: '';
|
|
6906
|
-
})()}
|
|
6890
|
+
${this.config.text.disclaimer
|
|
6891
|
+
? b `<div
|
|
6892
|
+
class="text-[var(--bc-text-color)] text-xs opacity-60 mb-3 bc-disclaimer"
|
|
6893
|
+
data-annotation="bc-disclaimer"
|
|
6894
|
+
>
|
|
6895
|
+
${this.config.text.disclaimer}
|
|
6896
|
+
${((_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.placement) !== null && _b !== void 0 ? _b : 'banner-subtext') === 'disclaimer'
|
|
6897
|
+
? b ` ${this.renderPrivacyPolicyLink()}`
|
|
6898
|
+
: b ``}
|
|
6899
|
+
</div>`
|
|
6900
|
+
: ''}
|
|
6907
6901
|
<powered-by-blotout
|
|
6908
6902
|
class="bc-footer"
|
|
6909
6903
|
data-annotation="bc-footer"
|
|
@@ -6969,7 +6963,7 @@ const longViewStyles = i$5 `
|
|
|
6969
6963
|
}
|
|
6970
6964
|
|
|
6971
6965
|
.dns-link {
|
|
6972
|
-
font-size:
|
|
6966
|
+
font-size: var(--text-sm);
|
|
6973
6967
|
text-decoration: underline;
|
|
6974
6968
|
cursor: pointer;
|
|
6975
6969
|
background: none;
|
|
@@ -7072,7 +7066,7 @@ class LongView extends ElementWithActions {
|
|
|
7072
7066
|
super.disconnectedCallback();
|
|
7073
7067
|
}
|
|
7074
7068
|
renderTitleAndDescription() {
|
|
7075
|
-
var _a;
|
|
7069
|
+
var _a, _b, _c;
|
|
7076
7070
|
const { text } = this.config;
|
|
7077
7071
|
return b `
|
|
7078
7072
|
<div class="bc-header" data-annotation="bc-header">
|
|
@@ -7088,6 +7082,10 @@ class LongView extends ElementWithActions {
|
|
|
7088
7082
|
data-annotation="bc-description"
|
|
7089
7083
|
>
|
|
7090
7084
|
${(_a = text.description) !== null && _a !== void 0 ? _a : ''}
|
|
7085
|
+
${((_c = (_b = text.privacyPolicy) === null || _b === void 0 ? void 0 : _b.placement) !== null && _c !== void 0 ? _c : 'banner-subtext') ===
|
|
7086
|
+
'banner-subtext'
|
|
7087
|
+
? this.renderPrivacyPolicyLink()
|
|
7088
|
+
: b ``}
|
|
7091
7089
|
</p>
|
|
7092
7090
|
</div>
|
|
7093
7091
|
</div>
|
|
@@ -7195,7 +7193,7 @@ class LongView extends ElementWithActions {
|
|
|
7195
7193
|
`;
|
|
7196
7194
|
}
|
|
7197
7195
|
renderPrivacyPolicyLink() {
|
|
7198
|
-
var _a, _b, _c;
|
|
7196
|
+
var _a, _b, _c, _d, _e;
|
|
7199
7197
|
const url = (_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : '';
|
|
7200
7198
|
let safeUrl = null;
|
|
7201
7199
|
try {
|
|
@@ -7207,18 +7205,21 @@ class LongView extends ElementWithActions {
|
|
|
7207
7205
|
catch {
|
|
7208
7206
|
// invalid URL — omit link
|
|
7209
7207
|
}
|
|
7208
|
+
const pretext = (_d = (_c = this.config.text.privacyPolicy) === null || _c === void 0 ? void 0 : _c.pretext) !== null && _d !== void 0 ? _d : 'Learn more in our';
|
|
7210
7209
|
return safeUrl
|
|
7211
|
-
? b
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7210
|
+
? b `${pretext}
|
|
7211
|
+
<a
|
|
7212
|
+
href="${safeUrl}"
|
|
7213
|
+
target="_blank"
|
|
7214
|
+
rel="noopener noreferrer"
|
|
7215
|
+
class="text-[var(--bc-link-color)] text-xs font-medium hover:opacity-80 underline underline-offset-2 bc-privacy-link"
|
|
7216
|
+
data-annotation="bc-privacy-link"
|
|
7217
|
+
>${((_e = this.config.text.privacyPolicy) === null || _e === void 0 ? void 0 : _e.label) || 'Privacy Policy'}</a
|
|
7218
|
+
>`
|
|
7219
7219
|
: b ``;
|
|
7220
7220
|
}
|
|
7221
7221
|
renderContent() {
|
|
7222
|
+
var _a, _b;
|
|
7222
7223
|
return b `
|
|
7223
7224
|
<div class="content-layout bc-content" data-annotation="bc-content">
|
|
7224
7225
|
${this.renderTitleAndDescription()}
|
|
@@ -7242,7 +7243,10 @@ class LongView extends ElementWithActions {
|
|
|
7242
7243
|
class="text-[var(--bc-text-color)] text-xs opacity-60 mb-3 bc-disclaimer"
|
|
7243
7244
|
data-annotation="bc-disclaimer"
|
|
7244
7245
|
>
|
|
7245
|
-
${this.config.text.disclaimer}
|
|
7246
|
+
${this.config.text.disclaimer}
|
|
7247
|
+
${((_b = (_a = this.config.text.privacyPolicy) === null || _a === void 0 ? void 0 : _a.placement) !== null && _b !== void 0 ? _b : 'banner-subtext') === 'disclaimer'
|
|
7248
|
+
? b ` ${this.renderPrivacyPolicyLink()}`
|
|
7249
|
+
: b ``}
|
|
7246
7250
|
</div>`
|
|
7247
7251
|
: ''}
|
|
7248
7252
|
<powered-by-blotout
|
|
@@ -7439,6 +7443,7 @@ class ConsentBanner extends ElementWithStylesheet {
|
|
|
7439
7443
|
this.disableActions = false;
|
|
7440
7444
|
this.showBanner = false;
|
|
7441
7445
|
this.showCookieIcon = true;
|
|
7446
|
+
this.showDnsFormStandalone = false;
|
|
7442
7447
|
this.disableCookieIcon = true;
|
|
7443
7448
|
this.isLoading = false;
|
|
7444
7449
|
this.bannerTimer = null;
|
|
@@ -7453,6 +7458,13 @@ class ConsentBanner extends ElementWithStylesheet {
|
|
|
7453
7458
|
show() {
|
|
7454
7459
|
this.showBanner = true;
|
|
7455
7460
|
}
|
|
7461
|
+
/** Programmatically opens the Do Not Sell form without triggering the consent banner. */
|
|
7462
|
+
showDnsForm() {
|
|
7463
|
+
this.showDnsFormStandalone = true;
|
|
7464
|
+
}
|
|
7465
|
+
handleDnsFormClosed() {
|
|
7466
|
+
this.showDnsFormStandalone = false;
|
|
7467
|
+
}
|
|
7456
7468
|
async checkAndShowBanner() {
|
|
7457
7469
|
var _a, _b, _c;
|
|
7458
7470
|
if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.behavior)) {
|
|
@@ -7716,6 +7728,18 @@ class ConsentBanner extends ElementWithStylesheet {
|
|
|
7716
7728
|
}
|
|
7717
7729
|
render() {
|
|
7718
7730
|
var _a, _b, _c;
|
|
7731
|
+
if (this.showDnsFormStandalone) {
|
|
7732
|
+
return b `<do-not-sell-form
|
|
7733
|
+
.open=${true}
|
|
7734
|
+
.config=${this.config}
|
|
7735
|
+
.css=${this.css}
|
|
7736
|
+
.disableActions=${this.disableActions}
|
|
7737
|
+
.contained=${this.contained}
|
|
7738
|
+
.showAnnotations=${this.showAnnotations}
|
|
7739
|
+
@do-not-sell-form-closed=${this.handleDnsFormClosed}
|
|
7740
|
+
@do-not-sell-request-submitted=${this.handleDoNotSellRequestSubmitted}
|
|
7741
|
+
></do-not-sell-form>`;
|
|
7742
|
+
}
|
|
7719
7743
|
return b `<div
|
|
7720
7744
|
class=${e({ 'root-contained': this.contained })}
|
|
7721
7745
|
@accept-all=${this.handleAcceptAll}
|
|
@@ -7774,6 +7798,10 @@ __decorate([
|
|
|
7774
7798
|
r$1(),
|
|
7775
7799
|
__metadata("design:type", Object)
|
|
7776
7800
|
], ConsentBanner.prototype, "showCookieIcon", void 0);
|
|
7801
|
+
__decorate([
|
|
7802
|
+
r$1(),
|
|
7803
|
+
__metadata("design:type", Object)
|
|
7804
|
+
], ConsentBanner.prototype, "showDnsFormStandalone", void 0);
|
|
7777
7805
|
__decorate([
|
|
7778
7806
|
r$1(),
|
|
7779
7807
|
__metadata("design:type", Object)
|
|
@@ -7829,6 +7857,15 @@ class BlotoutConsent extends ElementWithStylesheet {
|
|
|
7829
7857
|
logger.info('BlotoutConsent: Cannot show banner - not yet initialized. Ensure config and blotoutConsentAPI are set.');
|
|
7830
7858
|
}
|
|
7831
7859
|
}
|
|
7860
|
+
/** Programmatically opens the Do Not Sell form without showing the consent banner. */
|
|
7861
|
+
showDnsForm() {
|
|
7862
|
+
if (this.banner) {
|
|
7863
|
+
this.banner.showDnsForm();
|
|
7864
|
+
}
|
|
7865
|
+
else {
|
|
7866
|
+
logger.info('BlotoutConsent: Cannot show DNS form - not yet initialized. Ensure config and blotoutConsentAPI are set.');
|
|
7867
|
+
}
|
|
7868
|
+
}
|
|
7832
7869
|
render() {
|
|
7833
7870
|
if (!this.config || !this.blotoutConsentAPI) {
|
|
7834
7871
|
return;
|
|
@@ -7896,15 +7933,18 @@ if (!customElements.get('blotout-consent')) {
|
|
|
7896
7933
|
customElements.define('blotout-consent', BlotoutConsent);
|
|
7897
7934
|
}
|
|
7898
7935
|
|
|
7899
|
-
var _a, _b, _c;
|
|
7900
|
-
var
|
|
7936
|
+
var _a, _b, _c, _d;
|
|
7937
|
+
var _e, _f, _g;
|
|
7901
7938
|
let blotoutConsent;
|
|
7902
7939
|
if (typeof window != 'undefined' && typeof document != 'undefined') {
|
|
7903
7940
|
(_a = window[registryKey]) !== null && _a !== void 0 ? _a : (window[registryKey] = {});
|
|
7904
|
-
(_b = (
|
|
7905
|
-
|
|
7941
|
+
(_b = (_e = window[registryKey]).showBanner) !== null && _b !== void 0 ? _b : (_e.showBanner = () => {
|
|
7942
|
+
logger.info('showBanner() called before blotout-consent init() — call will be ignored. Ensure init() has completed first.');
|
|
7943
|
+
});
|
|
7944
|
+
(_c = (_f = window[registryKey]).showDnsForm) !== null && _c !== void 0 ? _c : (_f.showDnsForm = () => {
|
|
7945
|
+
logger.info('showDnsForm() called before blotout-consent init() — call will be ignored. Ensure init() has completed first.');
|
|
7906
7946
|
});
|
|
7907
|
-
(
|
|
7947
|
+
(_d = (_g = window[registryKey]).ui) !== null && _d !== void 0 ? _d : (_g.ui = {
|
|
7908
7948
|
init(params) {
|
|
7909
7949
|
if (!params || typeof params !== 'object') {
|
|
7910
7950
|
console.error('Invalid blotout-consent init params');
|
|
@@ -7949,6 +7989,11 @@ if (typeof window != 'undefined' && typeof document != 'undefined') {
|
|
|
7949
7989
|
blotoutConsent.show();
|
|
7950
7990
|
}
|
|
7951
7991
|
};
|
|
7992
|
+
window[registryKey].showDnsForm = () => {
|
|
7993
|
+
if (blotoutConsent) {
|
|
7994
|
+
blotoutConsent.showDnsForm();
|
|
7995
|
+
}
|
|
7996
|
+
};
|
|
7952
7997
|
},
|
|
7953
7998
|
});
|
|
7954
7999
|
}
|