Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-plugins/real-cookie-banner/src/public/ts/components/config/consent/list/settings"

Index

Variables

Const ConsentTableRecordSettings

ConsentTableRecordSettings: FC<{ record: Consent }> = observer(({record: {forwarded,revision: {data: { options }},revision_independent: {data: { options: independentOptions }},user_country,...rest}}) => {const {optionStore: {others: { pageByIdUrl, iso3166OneAlpha2 }}} = useStores();const useOptions = {...independentOptions,...options};return forwarded ? null : (<Row><Col span={24}><Divider>{__("Settings at the time of consent")}</Divider></Col>{Object.keys(useOptions).map((key) => {let label = key;let value: any = useOptions[key];let known = true;switch (key) {// Ignore this settings, as they are visible with the live previewcase "SETTING_TCF_SCOPE_OF_CONSENT":case "SETTING_TCF":case "SETTING_PRIVACY_POLICY_EXTERNAL_URL":case "SETTING_PRIVACY_POLICY_IS_EXTERNAL_URL":case "SETTING_IMPRINT_EXTERNAL_URL":case "SETTING_IMPRINT_IS_EXTERNAL_URL":case "SETTING_COOKIE_VERSION":case "SETTING_CONSENT_DURATION":return null;case "SETTING_TCF_PUBLISHER_CC":// only show when TCF was activeif (!useOptions["SETTING_TCF"]) {return null;}label = __("Country of the website operator");value = iso3166OneAlpha2[value] || value;break;case "SETTING_BANNER_ACTIVE":label = __("Cookie Banner/Dialog");value = value ? __("Active") : __("Deactivated");break;case "SETTING_BLOCKER_ACTIVE":label = __("Content Blocker");value = value ? __("Active") : __("Deactivated");break;case "SETTING_IMPRINT_ID":label = __("Imprint page");value = rest.url_imprint ? (<a href={rest.url_imprint} target="_blank" rel="noopener noreferrer">{__("Open site")}</a>) : (__("Not defined"));break;case "SETTING_PRIVACY_POLICY_ID":label = __("Privacy policy page");value = rest.url_privacy_policy ? (<a href={rest.url_privacy_policy} target="_blank" rel="noopener noreferrer">{__("Open site")}</a>) : (__("Not defined"));break;case "SETTING_SET_COOKIES_VIA_MANAGER":label = __("Set cookies after consent via");value =value === "googleTagManager"? "Google Tag Manager": value === "matomoTagManager"? "Matomo Tag Manager": __("Disabled");break;case "SETTING_ACCEPT_ALL_FOR_BOTS":label = __("Automatically accept all services for bots");value = value ? __("Enabled") : __("Disabled");break;case "SETTING_RESPECT_DO_NOT_TRACK":label = __('Respect "Do Not Track"');value = value ? __("Enabled") : __("Disabled");break;case "SETTING_COOKIE_DURATION":label = __("Duration of cookie consent");value = `${value} ${__("days")}`;break;case "SETTING_SAVE_IP":label = __("Save IP address on consent");value = value ? __("Enabled") : __("Disabled");break;case "SETTING_EPRIVACY_USA":label = __("Consent for data processing in the USA");value = value ? __("Enabled") : __("Disabled");break;case "SETTING_AGE_NOTICE":label = __("Age notice for consent");value = value ? __("Enabled") : __("Disabled");break;case "SETTING_LIST_SERVICES_NOTICE":label = __("Naming of all services in first view");value = value ? __("Enabled") : __("Disabled");break;case "SETTING_CONSENT_FORWARDING":label = __("Consent Forwarding");value = value ? __("Enabled") : __("Disabled");break;case "SETTING_FORWARD_TO":label = __("Forward To");if (value) {value = value.split("|").filter(Boolean).map((url: string) => (<akey={url}href={url}target="_blank"rel="noopener noreferrer"style={{ marginRight: 5 }}>{__("Open endpoint")}</a>));}value = value?.length ? value : __("Not defined");break;case "SETTING_CROSS_DOMAINS":label = __("Additional cross domain endpoints");if (value) {value = value.split("\n").filter(Boolean).map((url: string) => (<akey={url}href={url}target="_blank"rel="noopener noreferrer"style={{ marginRight: 5 }}>{__("Open endpoint")}</a>));}value = value?.length ? value : __("Not defined");break;case "SETTING_HIDE_PAGE_IDS":label = __("Hide on additional pages");if (value) {value = value.split(",").filter(Boolean).map((id: string) => (<akey={id}href={`${pageByIdUrl}=${id}`}target="_blank"rel="noopener noreferrer"style={{ marginRight: 5 }}>{__("Open site")} (ID {id})</a>));}value = value?.length ? value : __("Not defined");break;case "SETTING_COUNTRY_BYPASS_ACTIVE":label = __("Geo-restriction");value = value ? __("Enabled") : __("Disabled");break;case "SETTING_COUNTRY_BYPASS_COUNTRIES":// only show when Country Bypass was activeif (!useOptions["SETTING_COUNTRY_BYPASS_ACTIVE"]) {return null;}label = __("Show banner only to users from these countries");if (value) {const countries = (value as string).split(",").map((code) => iso3166OneAlpha2[code]);value = (<Tooltip title={countries.join(", ")}><Tag>{__("%d countries", countries.length)}</Tag></Tooltip>);} else {value = __("Not defined");}break;case "SETTING_COUNTRY_BYPASS_TYPE":// only show when Country Bypass was activeif (!useOptions["SETTING_COUNTRY_BYPASS_ACTIVE"]) {return null;}label = __("Implicit consent for users from third countries");value = value === "all" ? __("Accept all") : __("Accept only essentials");break;default:known = false;break;}return (<Col key={key} md={12} sm={24}><div style={{ padding: "0 10px" }}>{known ? <strong>{label}</strong> : <code>{label}</code>}: {value}</div></Col>);})}</Row>);})

Generated using TypeDoc