Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-plugins/real-cookie-banner/src/public/ts/components/config/cookies/tcf/listItem"

Index

Variables

Const TcfVendorConfigurationItem

TcfVendorConfigurationItem: FC<{ item: TcfVendorConfigurationModel }> = observer(({ item }) => {const { editLink } = useRouteTcfVendorConfiguration();const { addLink, editLink: createEditBlockerLink } = useRouteBlocker();const {key,busy,data,stats: { activeFeatures, activePurposes },hasVendor} = item;let name: string;let policyUrl: string;if (hasVendor) {const vendorModelData = item.vendorModel.data;name = vendorModelData.name;policyUrl = vendorModelData.policyUrl;}const {status,meta: { ePrivacyUSA, vendorId },blocker} = data;const {optionStore: { ePrivacyUSA: ePrivacyUSAOption }} = useStores();const editBlockerLink = useMemo(() => {return blocker? createEditBlockerLink(new BlockerModel(undefined, {id: blocker})): `${addLink}?force=scratch&attributes=${JSON.stringify({name,tcfVendors: [key],criteria: "tcfVendors"})}`;}, [blocker, name, key]);return (<List.ItemitemID={key.toString()}actions={[hasVendor && (<a key="contentBlocker" href={editBlockerLink} style={{ textDecoration: "none" }}>{blocker ? __("Edit Content Blocker") : __("Create Content Blocker")}</a>),hasVendor && (<a key="edit" href={editLink(item)} style={{ textDecoration: "none" }}>{__("Edit")}</a>),<Popconfirmkey="delete"title={__("Are you sure you want to delete this vendor?")}placement="bottomRight"onConfirm={() =>item.delete({force: true})}okText={__("Delete")}cancelText={__("Cancel")}overlayStyle={{ maxWidth: 350 }}><a style={{ cursor: "pointer" }}>{__("Delete")}</a></Popconfirm>].filter(Boolean)}><Spin spinning={busy}><List.Item.Metatitle={<span>{name} <Tag>{__("Vendor ID: %d", vendorId)}</Tag>{status === "draft" ? (<Tag color="orange">{__("Draft")}</Tag>) : status === "private" ? (<Tag color="red">{__("Disabled")}</Tag>) : null}{!!ePrivacyUSA && ePrivacyUSAOption && <Tag>{__("US data processing")}</Tag>}{!hasVendor && (<Tooltiptitle={__("This vendor is no longer available and/or has been removed from the list of available vendors by the GVL. For this vendor, you can no longer request a consent from your visitors.")}><Tag color="error">{__("Abandoned")}</Tag></Tooltip>)}</span>}description={<div><div>{__("Privacy policy")}:{" "}<a href={policyUrl} target="_blank" rel="noreferrer">{policyUrl}</a></div><div style={{ paddingTop: 5 }}><Tag>{_n("%d purpose enabled", "%d purposes enabled", activePurposes, activePurposes)}</Tag>{activeFeatures > 0 && (<Tag>{_n("%d feature enabled","%d features enabled",activeFeatures,activeFeatures)}</Tag>)}</div></div>}/></Spin></List.Item>);})

Generated using TypeDoc