@highfivve/ad-tag 5.8.30 → 5.8.31
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/lib/console/components/adSlotConfig.js +115 -87
- package/lib/console/components/consentConfig.js +26 -23
- package/lib/console/components/globalConfig.js +342 -356
- package/lib/console/components/labelConfigDebug.js +8 -8
- package/lib/console/components/moduleConfigs.js +359 -0
- package/lib/console/components/sizeConfigDebug.js +14 -14
- package/lib/console/components/tag.js +11 -2
- package/lib/console/components/ui.js +43 -0
- package/lib/console/debug.js +2 -27
- package/lib/console/tailwind.config.js +205 -0
- package/lib/console/util/themingService.js +15 -8
- package/lib/console/validations/sizesConfigValidations.js +1 -1
- package/lib/gen/packageJson.js +1 -1
- package/lib/util/browserStorageKeys.js +1 -0
- package/package.json +4 -1
|
@@ -2,19 +2,13 @@ import React, { Fragment } from 'react';
|
|
|
2
2
|
import { classList } from '../util/stringUtils';
|
|
3
3
|
import { SizeConfigDebug } from './sizeConfigDebug';
|
|
4
4
|
import { Tag } from './tag';
|
|
5
|
+
import { SubHeadline, Tabs } from './ui';
|
|
5
6
|
import { extractPrebidAdSlotConfigs } from '../util/prebid';
|
|
6
7
|
import { SizeConfigService } from '../../ads/sizeConfigService';
|
|
7
|
-
const defaultPanelState = {
|
|
8
|
-
showA9: false,
|
|
9
|
-
showPrebid: false,
|
|
10
|
-
showGeneral: false,
|
|
11
|
-
showSizeConfig: false
|
|
12
|
-
};
|
|
13
8
|
export class AdSlotConfig extends React.Component {
|
|
14
9
|
constructor(props) {
|
|
15
10
|
super(props);
|
|
16
11
|
this.prebidConfig = (prebid) => {
|
|
17
|
-
const labels = this.props.labelConfigService.getSupportedLabels();
|
|
18
12
|
const prebidAdUnits = extractPrebidAdSlotConfigs(prebid).map(config => config.adUnit);
|
|
19
13
|
const hasMultipleBids = prebidAdUnits.length > 1;
|
|
20
14
|
const elements = prebidAdUnits.map((prebidAdUnit, index) => {
|
|
@@ -24,33 +18,33 @@ export class AdSlotConfig extends React.Component {
|
|
|
24
18
|
const native = prebidAdUnit.mediaTypes.native;
|
|
25
19
|
return (React.createElement("div", { key: index },
|
|
26
20
|
index > 0 && React.createElement("hr", null),
|
|
27
|
-
hasMultipleBids && React.createElement("h5",
|
|
21
|
+
hasMultipleBids && React.createElement("h5", { className: "mb-1 mt-3 text-sm font-bold" },
|
|
28
22
|
index + 1,
|
|
29
23
|
". config"),
|
|
30
|
-
React.createElement("div", { className: "
|
|
31
|
-
React.createElement("span", { className: "
|
|
24
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
25
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "Code"),
|
|
32
26
|
React.createElement(Tag, { variant: "green" }, prebidAdUnit.code || this.props.slot.domId)),
|
|
33
|
-
banner && (React.createElement("div", { className: "
|
|
34
|
-
React.createElement("span", { className: "
|
|
27
|
+
banner && (React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
28
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "Banner sizes"),
|
|
35
29
|
this.validateSlotSizes(banner.sizes).map(validatedSlotSize => this.tagFromValidatedSlotSize(validatedSlotSize, !!slotSizeConfig)))),
|
|
36
|
-
video && (React.createElement("div", { className: "
|
|
37
|
-
React.createElement("span", { className: "
|
|
30
|
+
video && (React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
31
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "Video"),
|
|
38
32
|
React.createElement(Tag, { variant: "green" }, video.context),
|
|
39
33
|
!!video.playerSize &&
|
|
40
34
|
this.validateSlotSizes(this.isSingleVideoSize(video.playerSize) ? [video.playerSize] : video.playerSize).map(validatedSlotSize => this.tagFromValidatedSlotSize(validatedSlotSize, !!slotSizeConfig)))),
|
|
41
|
-
native && (React.createElement("div", { className: "
|
|
42
|
-
React.createElement("span", { className: "
|
|
35
|
+
native && (React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
36
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "Native"),
|
|
43
37
|
React.createElement(Tag, { variant: "green" }, "true"))),
|
|
44
38
|
prebidAdUnit.bids.map((bid, idx) => (React.createElement(Fragment, { key: idx },
|
|
45
39
|
React.createElement("hr", null),
|
|
46
|
-
React.createElement("div", { className: "
|
|
47
|
-
React.createElement("span", { className: "
|
|
40
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
41
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" },
|
|
48
42
|
"Bidder #",
|
|
49
43
|
idx + 1),
|
|
50
44
|
React.createElement(Tag, { variant: "blue" }, bid.bidder ?? bid.module)),
|
|
51
|
-
React.createElement("div", { className: "
|
|
52
|
-
React.createElement("div", { className: "
|
|
53
|
-
React.createElement("span", { className: "
|
|
45
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" }, this.labelConfig(bid)),
|
|
46
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
47
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "Params"),
|
|
54
48
|
React.createElement(Tag, null, JSON.stringify(bid.params))))))));
|
|
55
49
|
});
|
|
56
50
|
if (elements.length === 1) {
|
|
@@ -58,7 +52,7 @@ export class AdSlotConfig extends React.Component {
|
|
|
58
52
|
}
|
|
59
53
|
else {
|
|
60
54
|
return (React.createElement("div", null,
|
|
61
|
-
React.createElement("h5",
|
|
55
|
+
React.createElement("h5", { className: "mb-1 mt-3 text-sm font-bold" },
|
|
62
56
|
elements.length,
|
|
63
57
|
" bid configurations"),
|
|
64
58
|
elements));
|
|
@@ -67,19 +61,39 @@ export class AdSlotConfig extends React.Component {
|
|
|
67
61
|
this.a9Config = (a9) => {
|
|
68
62
|
const slotSizeConfig = this.props.slot.sizeConfig;
|
|
69
63
|
return (React.createElement("div", null,
|
|
70
|
-
React.createElement("div", { className: "
|
|
71
|
-
React.createElement("span", { className: "
|
|
64
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
65
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "Sizes"),
|
|
72
66
|
this.validateSlotSizes(this.props.slot.sizes.filter(AdSlotConfig.isFixedSize)).map(validatedSlotSize => this.tagFromValidatedSlotSize(validatedSlotSize, !!slotSizeConfig))),
|
|
73
|
-
React.createElement("div", { className: "
|
|
67
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" }, this.labelConfig(a9))));
|
|
68
|
+
};
|
|
69
|
+
this.countMatchedSizeConfigs = () => {
|
|
70
|
+
const supportedLabels = this.props.labelConfigService.getSupportedLabels();
|
|
71
|
+
return (this.props.slot.sizeConfig ?? []).filter(entry => window.matchMedia(entry.mediaQuery).matches &&
|
|
72
|
+
(!entry.labelAll || entry.labelAll.every(label => supportedLabels.includes(label))) &&
|
|
73
|
+
(!entry.labelNone || !entry.labelNone.some(label => supportedLabels.includes(label)))).length;
|
|
74
|
+
};
|
|
75
|
+
this.countRequestedBidders = (slotVisible) => {
|
|
76
|
+
const supportedLabels = this.props.labelConfigService.getSupportedLabels();
|
|
77
|
+
const matchesLabels = (bid) => {
|
|
78
|
+
if (bid.labelAll) {
|
|
79
|
+
return bid.labelAll.every(label => supportedLabels.includes(label));
|
|
80
|
+
}
|
|
81
|
+
if (bid.labelAny) {
|
|
82
|
+
return bid.labelAny.some(label => supportedLabels.includes(label));
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
};
|
|
86
|
+
const prebidBidders = this.props.slot.prebid
|
|
87
|
+
? extractPrebidAdSlotConfigs(this.props.slot.prebid)
|
|
88
|
+
.flatMap(config => config.adUnit.bids)
|
|
89
|
+
.filter(matchesLabels).length
|
|
90
|
+
: 0;
|
|
91
|
+
const a9Bidder = this.props.slot.a9 && slotVisible && this.isVisibleA9() ? 1 : 0;
|
|
92
|
+
return prebidBidders + a9Bidder;
|
|
74
93
|
};
|
|
75
|
-
this.toggleGeneral = () => this.setState({ showGeneral: !this.state.showGeneral });
|
|
76
|
-
this.toggleA9 = () => this.setState({ showA9: !this.state.showA9 });
|
|
77
|
-
this.togglePrebid = () => this.setState({ showPrebid: !this.state.showPrebid });
|
|
78
|
-
this.toggleSizeConfig = () => this.setState({ showSizeConfig: !this.state.showSizeConfig });
|
|
79
94
|
this.isVisiblePrebid = () => {
|
|
80
95
|
const prebid = this.props.slot.prebid;
|
|
81
96
|
if (prebid) {
|
|
82
|
-
const labels = this.props.labelConfigService.getSupportedLabels();
|
|
83
97
|
return extractPrebidAdSlotConfigs(prebid)
|
|
84
98
|
.map(config => config.adUnit)
|
|
85
99
|
.some(prebidAdUnit => {
|
|
@@ -138,48 +152,28 @@ export class AdSlotConfig extends React.Component {
|
|
|
138
152
|
const labelAnyMatches = !!labelAny && labelAny.some(label => supportedLabels.indexOf(label) > -1);
|
|
139
153
|
return (React.createElement("div", null,
|
|
140
154
|
labelAll && labelAll.length > 0 && (React.createElement("div", null,
|
|
141
|
-
React.createElement("span", { className: classList('
|
|
155
|
+
React.createElement("span", { className: classList('inline-block min-w-36 max-w-96 pr-1 font-medium', [labelAllMatches, 'text-success'], [!labelAllMatches, 'text-error']) }, "labelAll"),
|
|
142
156
|
labelAll.map(label => (React.createElement(Tag, { key: label, variant: supportedLabels.indexOf(label) > -1 ? 'green' : 'red' }, label))))),
|
|
143
157
|
labelAny && labelAny.length > 0 && (React.createElement("div", null,
|
|
144
|
-
React.createElement("span", { className: classList('
|
|
158
|
+
React.createElement("span", { className: classList('inline-block min-w-36 max-w-96 pr-1 font-medium', [labelAnyMatches, 'text-success'], [!labelAnyMatches, 'text-error']) }, "labelAny"),
|
|
145
159
|
labelAll && labelAll.length > 0 && (React.createElement(Tag, { variant: 'yellow' }, "labelAll was already evaluated, labelAny is ignored")),
|
|
146
160
|
labelAny.map(label => {
|
|
147
161
|
const labelFound = supportedLabels.indexOf(label) > -1;
|
|
148
162
|
return (React.createElement(Tag, { key: label, variant: labelFound ? 'green' : 'red' }, label));
|
|
149
163
|
})))));
|
|
150
164
|
};
|
|
151
|
-
|
|
152
|
-
props.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
dimensions: { width, height },
|
|
156
|
-
...defaultPanelState
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
this.state = defaultPanelState;
|
|
161
|
-
}
|
|
165
|
+
this.state = {
|
|
166
|
+
expanded: !!props.initiallyExpanded,
|
|
167
|
+
activeTab: 'overview'
|
|
168
|
+
};
|
|
162
169
|
}
|
|
163
170
|
render() {
|
|
164
|
-
const { labelConfigService, slot
|
|
165
|
-
const {
|
|
171
|
+
const { labelConfigService, slot } = this.props;
|
|
172
|
+
const { expanded, activeTab } = this.state;
|
|
166
173
|
const slotValid = slot.behaviour.loaded === 'infinite' ? true : labelConfigService.filterSlot(slot);
|
|
167
174
|
const slotElementExists = !!document.getElementById(slot.domId);
|
|
168
175
|
const slotVisible = slotValid && slotElementExists;
|
|
169
176
|
const isConfiguredInfiniteSlot = slot.behaviour.loaded === 'infinite' && !slotVisible;
|
|
170
|
-
const prebidValid = this.isVisiblePrebid();
|
|
171
|
-
const a9Valid = slotVisible && this.isVisibleA9();
|
|
172
|
-
function setSlotVisibilityIcon(slotVisible, loadingBehaviour) {
|
|
173
|
-
if (slotVisible) {
|
|
174
|
-
return '✔';
|
|
175
|
-
}
|
|
176
|
-
else if (isConfiguredInfiniteSlot) {
|
|
177
|
-
return '?';
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
return 'x';
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
177
|
const getBucketName = (bucket) => {
|
|
184
178
|
if (!bucket) {
|
|
185
179
|
return 'default';
|
|
@@ -189,35 +183,69 @@ export class AdSlotConfig extends React.Component {
|
|
|
189
183
|
}
|
|
190
184
|
return bucket[labelConfigService.getDeviceLabel()] ?? 'default';
|
|
191
185
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
186
|
+
const tabItems = [
|
|
187
|
+
{ id: 'overview', label: 'Overview' },
|
|
188
|
+
...(slot.sizeConfig
|
|
189
|
+
? [
|
|
190
|
+
{
|
|
191
|
+
id: 'sizeConfig',
|
|
192
|
+
label: (React.createElement(React.Fragment, null,
|
|
193
|
+
"Size Configs ",
|
|
194
|
+
React.createElement(Tag, { variant: "grey" }, this.countMatchedSizeConfigs())))
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
: []),
|
|
198
|
+
...(slot.prebid || slot.a9
|
|
199
|
+
? [
|
|
200
|
+
{
|
|
201
|
+
id: 'bidders',
|
|
202
|
+
label: (React.createElement(React.Fragment, null,
|
|
203
|
+
"Bidder Params ",
|
|
204
|
+
React.createElement(Tag, { variant: "grey" }, this.countRequestedBidders(slotVisible))))
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
: [])
|
|
208
|
+
];
|
|
209
|
+
return (React.createElement("div", { className: classList('d-collapse d-collapse-arrow mb-2 rounded-md border-y-0 border-l-4 border-r-0 border-solid bg-base-200', [slotVisible, 'border-l-primary'], [!slotVisible, 'border-l-base-300']), title: slotVisible
|
|
210
|
+
? 'Slot requested'
|
|
211
|
+
: isConfiguredInfiniteSlot
|
|
212
|
+
? 'Configuration only used to copy on slots with infinite selector'
|
|
213
|
+
: 'Slot not requested' },
|
|
214
|
+
React.createElement("input", { type: "checkbox", checked: expanded, onChange: () => this.setState({ expanded: !expanded }), "aria-label": `toggle slot ${slot.domId}` }),
|
|
215
|
+
React.createElement("div", { className: "d-collapse-title flex min-h-0 flex-wrap items-center gap-1 py-2 text-sm font-semibold" },
|
|
216
|
+
React.createElement("span", { className: "break-all" }, slot.domId)),
|
|
217
|
+
React.createElement("div", { className: "d-collapse-content text-sm" },
|
|
218
|
+
React.createElement(Tabs, { tabs: tabItems, active: activeTab, onSelect: tab => this.setState({ activeTab: tab }), className: "mb-2" }),
|
|
219
|
+
activeTab === 'overview' && (React.createElement("div", null,
|
|
220
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
221
|
+
React.createElement(Tag, { variant: "green" }, slot.position),
|
|
222
|
+
React.createElement(Tag, { variant: "yellow" }, slot.behaviour.loaded),
|
|
223
|
+
slot.behaviour.bucket && (React.createElement(Tag, { variant: "blue" }, getBucketName(slot.behaviour.bucket)))),
|
|
224
|
+
isConfiguredInfiniteSlot && (React.createElement("p", { className: "mt-2" }, "Looking up infinite slots is currently not implemented")),
|
|
225
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
226
|
+
React.createElement("span", { className: classList('inline-block min-w-36 max-w-96 pr-1 font-medium', [slotElementExists, 'text-success'], [!slotElementExists, 'text-error']) }, "DOM ID"),
|
|
227
|
+
React.createElement(Tag, { variant: slotElementExists ? 'green' : 'red', title: `Slot ${slotElementExists ? '' : 'not '}found in DOM` }, slot.domId)),
|
|
228
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
229
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "AdUnit path"),
|
|
230
|
+
React.createElement("pre", { className: "m-0 whitespace-pre-wrap break-all rounded bg-base-300 px-1.5 py-0.5 text-xs" }, slot.adUnitPath)),
|
|
231
|
+
slot.sizes.length > 0 && (React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
232
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "Sizes"),
|
|
233
|
+
this.validateSlotSizes(slot.sizes).map(validatedSlotSize => this.tagFromValidatedSlotSize(validatedSlotSize, !!slot.sizeConfig)))),
|
|
234
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" }, this.labelConfig(slot)))),
|
|
235
|
+
activeTab === 'sizeConfig' && slot.sizeConfig && (React.createElement(SizeConfigDebug, { sizeConfig: slot.sizeConfig, supportedLabels: labelConfigService.getSupportedLabels() })),
|
|
236
|
+
activeTab === 'bidders' && (React.createElement("div", null,
|
|
237
|
+
slot.prebid && (React.createElement(React.Fragment, null,
|
|
238
|
+
React.createElement(SubHeadline, null,
|
|
239
|
+
"Prebid",
|
|
240
|
+
' ',
|
|
241
|
+
React.createElement(Tag, { variant: this.isVisiblePrebid() ? 'green' : 'red' }, this.isVisiblePrebid() ? 'valid' : 'invalid')),
|
|
242
|
+
this.prebidConfig(slot.prebid))),
|
|
243
|
+
slot.a9 && (React.createElement(React.Fragment, null,
|
|
244
|
+
React.createElement(SubHeadline, null,
|
|
245
|
+
"A9",
|
|
246
|
+
' ',
|
|
247
|
+
React.createElement(Tag, { variant: slotVisible && this.isVisibleA9() ? 'green' : 'red' }, slotVisible && this.isVisibleA9() ? 'valid' : 'invalid')),
|
|
248
|
+
this.a9Config(slot.a9))))))));
|
|
221
249
|
}
|
|
222
250
|
static isFixedSize(size) {
|
|
223
251
|
return size !== 'fluid';
|
|
@@ -65,7 +65,7 @@ export const ConsentConfig = () => {
|
|
|
65
65
|
const cmpVendor = cmpVendors[consentState.tcModel.cmpId.toString()];
|
|
66
66
|
if (cmpVendor) {
|
|
67
67
|
return (React.createElement(Tag, { variant: "grey" },
|
|
68
|
-
React.createElement("a", { href: cmpVendor.website },
|
|
68
|
+
React.createElement("a", { className: "d-link", href: cmpVendor.website },
|
|
69
69
|
cmpVendor.name,
|
|
70
70
|
" (id: ",
|
|
71
71
|
consentState.tcModel.cmpId.toString(),
|
|
@@ -82,42 +82,44 @@ export const ConsentConfig = () => {
|
|
|
82
82
|
const consent = () => {
|
|
83
83
|
const { gdprApplies, tcModel } = consentState;
|
|
84
84
|
return (React.createElement("div", null,
|
|
85
|
-
React.createElement("div", { className: "
|
|
86
|
-
React.createElement("span", { className: "
|
|
85
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
86
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" },
|
|
87
87
|
React.createElement("a", { href: "https://iabeurope.eu/cmp-list/" }, "GDPR")),
|
|
88
88
|
!!gdprApplies),
|
|
89
|
-
React.createElement("div", { className: "
|
|
90
|
-
React.createElement("span", { className: "
|
|
89
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
90
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" },
|
|
91
91
|
React.createElement("a", { href: "https://iabeurope.eu/cmp-list/" }, "CMP ID")),
|
|
92
92
|
cmpVendorTag()),
|
|
93
|
-
React.createElement("div", { className: "
|
|
94
|
-
React.createElement("span", { className: "
|
|
93
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
94
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "Last updated"),
|
|
95
95
|
tcModel ? (React.createElement(Tag, null, tcModel.lastUpdated.toLocaleString())) : (React.createElement(Tag, { variant: "red" }, "Unknown"))),
|
|
96
|
-
React.createElement("div", { className: "
|
|
97
|
-
React.createElement("span", { className: "
|
|
96
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
97
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "TCF Policy Version"),
|
|
98
98
|
tcModel ? (React.createElement(Tag, null, tcModel.policyVersion.toString())) : (React.createElement(Tag, { variant: "red" }, "Unknown")))));
|
|
99
99
|
};
|
|
100
100
|
const isCmpFunctionAvailable = () => window.__tcfapi || typeof window.__tcfapi === 'function';
|
|
101
101
|
const consentData = () => {
|
|
102
102
|
if (isCmpFunctionAvailable()) {
|
|
103
103
|
return (React.createElement("div", null,
|
|
104
|
-
React.createElement("div", { className: "
|
|
105
|
-
React.createElement("span", { className: "
|
|
104
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
105
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "vendor list version"),
|
|
106
106
|
React.createElement(Tag, null, consentState.tcModel
|
|
107
107
|
? consentState.tcModel.vendorListVersion.toString()
|
|
108
108
|
: 'not found')),
|
|
109
|
-
React.createElement("div", { className: "
|
|
110
|
-
React.createElement("span", { className: "
|
|
109
|
+
React.createElement("div", { className: "mt-2 flex flex-wrap items-center gap-y-1" },
|
|
110
|
+
React.createElement("span", { className: "inline-block min-w-36 max-w-96 pr-1 font-medium" }, "num vendors allowed"),
|
|
111
111
|
React.createElement(Tag, null, consentState.tcModel
|
|
112
112
|
? consentState.tcModel.vendorConsents.size.toString()
|
|
113
113
|
: 'not found')),
|
|
114
|
-
React.createElement("div", { className: "
|
|
115
|
-
React.createElement("
|
|
116
|
-
React.createElement(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
React.createElement("div", { className: "d-collapse d-collapse-arrow mt-2 rounded-md bg-base-200" },
|
|
115
|
+
React.createElement("input", { type: "checkbox", "aria-label": "toggle allowed purposes" }),
|
|
116
|
+
React.createElement("div", { className: "d-collapse-title min-h-0 py-2 text-sm font-medium" },
|
|
117
|
+
"allowed purposes",
|
|
118
|
+
React.createElement(Tag, null, consentState.tcModel
|
|
119
|
+
? consentState.tcModel.purposeConsents.size.toString()
|
|
120
|
+
: 'not found')),
|
|
121
|
+
React.createElement("div", { className: "d-collapse-content text-sm" },
|
|
122
|
+
React.createElement("a", { className: "d-link", href: "https://iabeurope.eu/iab-europe-transparency-consent-framework-policies/#Appendix_A_Purposes_and_Features_Definitions" }, "Purpose and Feature definitions"),
|
|
121
123
|
React.createElement("br", null),
|
|
122
124
|
consentState.tcModel &&
|
|
123
125
|
Array.from(consentState.tcModel.purposeConsents).map(([id, accepted]) => {
|
|
@@ -126,9 +128,10 @@ export const ConsentConfig = () => {
|
|
|
126
128
|
": ",
|
|
127
129
|
accepted ? 'accepted' : 'denied'));
|
|
128
130
|
}))),
|
|
129
|
-
React.createElement("div", { className: "
|
|
130
|
-
React.createElement("
|
|
131
|
-
React.createElement("div", { className: "collapse
|
|
131
|
+
React.createElement("div", { className: "d-collapse d-collapse-arrow mt-2 rounded-md bg-base-200" },
|
|
132
|
+
React.createElement("input", { type: "checkbox", "aria-label": "toggle consent string" }),
|
|
133
|
+
React.createElement("div", { className: "d-collapse-title min-h-0 py-2 text-sm font-medium" }, "consent string"),
|
|
134
|
+
React.createElement("div", { className: "d-collapse-content text-sm" },
|
|
132
135
|
React.createElement(Tag, null, consentState.tcString ? consentState.tcString : 'not found')))));
|
|
133
136
|
}
|
|
134
137
|
};
|