Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-plugins/real-cookie-banner/src/public/ts/components/config/consent/stats/grid"

Index

Variables

Variables

Const StatsGrid

StatsGrid: FC<{}> = observer(() => {const {optionStore: {others: { isPro, assetsUrl },contexts},statsStore} = useStores();const {filters: { dates, context }} = statsStore;const contextKeys = Object.keys(contexts);const [statsLiteInContainerRef, setStatsLiteInContainerRef] = useState<HTMLDivElement>();// Provide preset ranges to the userconst availableRanges = useAvailableDateRangesForFilter();return isPro ? (<><div style={{ textAlign: "right" }}>{contextKeys.length > 1 && (<><label><Selectstyle={{ width: 200, textAlign: "left" }}value={context}onSelect={(e) => statsStore.applyContext(e)}>{contextKeys.map((context) => (<Select.Option value={context} key={context}>{contexts[context]}</Select.Option>))}</Select></label><Divider type="vertical" /></>)}<label>{__("Period")}:{" "}<DateRangePickervalue={/* Ant design relies on moment 2.27 and typings are currently incompatible with other moment typings */ dates as any}ranges={availableRanges as any}onChange={(dates) => statsStore.applyDates(dates as any)}/></label></div>{dates?.length === 2 ? (<><Row><Col md={12} sm={24}><Divider>{__("Consents by clicked button")}</Divider><StatsButtonClickedPieChart /></Col><Col md={12} sm={24}><Divider>{__("Cookie banner bypass")}</Divider><StatsCustomBypassPieChart /></Col></Row><Row><Colmd={20}sm={24}style={{margin: "auto",paddingTop: 20,marginTop: 30}}><Divider>{__("Consents by group")}</Divider><StatsMainBarChart /></Col></Row></>) : (<Empty description={__("Please provide a date range!")} />)}</>) : (<><ProModaltitle={__("Want to see detailed statistics about the consents of your visitors?")}inContainerinContainerElement={statsLiteInContainerRef}testDrivefeature="stats"description={__("You can get several statistics about how your users use the cookie banner. This helps you to calculate the total number of users who do not want to be tracked, for example, by extrapolating data from Google Analytics.")}/><divref={setStatsLiteInContainerRef}className="rcb-modal-mount"style={{height: 800,backgroundImage: `url('${assetsUrl}statistics-blured.png')`}}/></>);})

Generated using TypeDoc