From 872670c180fed32c5b296526ff5ad30304421350 Mon Sep 17 00:00:00 2001 From: Ian Krieger <48930920+IanKrieger@users.noreply.github.com> Date: Fri, 7 Jun 2024 10:13:21 -0400 Subject: [PATCH 1/4] fix: unify search and regular reporting views (#1224) Gets search reporting view in sync with the updated reporting view --- ![Screen Shot 2024-06-06 at 2 04 49 PM](https://github.com/brave/ads-ui/assets/48930920/d9488fb8-3403-4529-b733-444f024b7b9d) --- .../campaigns/analytics/CampaignAnalytics.tsx | 8 +- src/routes/campaigns/analytics/metrics.ts | 7 + src/user/analytics/search/AdSetBreakdown.tsx | 125 ---------------- src/user/analytics/search/MetricSelector.tsx | 67 --------- src/user/analytics/search/MetricsList.tsx | 23 --- src/user/analytics/search/OverTimeGraph.tsx | 114 --------------- src/user/analytics/search/RenderMetric.tsx | 18 --- src/user/analytics/search/hooks.ts | 59 -------- src/user/analytics/search/metrics.ts | 84 ----------- src/user/analytics/search/series.test.ts | 52 ------- src/user/analytics/search/series.ts | 69 --------- .../views/user/CampaignReportViewSelector.tsx | 6 +- .../user/reports/SearchCampaignReportView.tsx | 135 ------------------ 13 files changed, 14 insertions(+), 753 deletions(-) delete mode 100644 src/user/analytics/search/AdSetBreakdown.tsx delete mode 100644 src/user/analytics/search/MetricSelector.tsx delete mode 100644 src/user/analytics/search/MetricsList.tsx delete mode 100644 src/user/analytics/search/OverTimeGraph.tsx delete mode 100644 src/user/analytics/search/RenderMetric.tsx delete mode 100644 src/user/analytics/search/hooks.ts delete mode 100644 src/user/analytics/search/metrics.ts delete mode 100644 src/user/analytics/search/series.test.ts delete mode 100644 src/user/analytics/search/series.ts delete mode 100644 src/user/views/user/reports/SearchCampaignReportView.tsx diff --git a/src/routes/campaigns/analytics/CampaignAnalytics.tsx b/src/routes/campaigns/analytics/CampaignAnalytics.tsx index a01c2809..7eb79e69 100644 --- a/src/routes/campaigns/analytics/CampaignAnalytics.tsx +++ b/src/routes/campaigns/analytics/CampaignAnalytics.tsx @@ -6,7 +6,7 @@ import { useMetricSelection } from "./hooks"; import { useState } from "react"; import { FilterBar } from "./filters/FilterBar"; import { ResultsPane } from "./ResultsPane"; -import { PerformanceFilter } from "@/graphql-client/graphql"; +import { CampaignFormat, PerformanceFilter } from "@/graphql-client/graphql"; import dayjs from "dayjs"; import { CampaignOverviewProps } from "@/util/CampaignIdProps"; import { ErrorDetail } from "@/components/Error/ErrorDetail"; @@ -68,7 +68,9 @@ export function CampaignAnalytics({ campaignOverview }: CampaignOverviewProps) { return ( - + {campaignOverview.format !== CampaignFormat.Search && ( + + )} - + BigNumber(metrics.rates.costPerAcquisition), type: "usd", color: colors[0], + disableForCampaign: isSearch, }, { id: "upvote", diff --git a/src/user/analytics/search/AdSetBreakdown.tsx b/src/user/analytics/search/AdSetBreakdown.tsx deleted file mode 100644 index 11caff9a..00000000 --- a/src/user/analytics/search/AdSetBreakdown.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import { msg } from "@lingui/macro"; -import { useLingui } from "@lingui/react"; -import { DataGrid, GridColDef } from "@mui/x-data-grid"; -import { Status } from "@/components/Campaigns/Status"; -import { uiLabelsForBillingType } from "@/util/billingType"; -import { displayFromCampaignState } from "@/util/displayState"; -import { MetricDefinition, getMetricListForCampaign } from "./metrics"; -import { RenderMetric } from "./RenderMetric"; -import { i18n } from "@lingui/core"; -import lodash from "lodash"; -import { - AdSetValuesFragment, - CampaignSummaryFragment, - FetchAdSetMetricsForCampaignDocument, - PerformanceFilter, -} from "@/graphql-client/graphql"; -import { useQuery } from "@apollo/client"; - -function getColumnDefinitionForMetric(metric: MetricDefinition): GridColDef { - return { - headerName: i18n._(metric.shortCaption ?? metric.caption), - field: metric.id, - type: "number", - align: "right", - headerAlign: "right", - display: "flex", - width: 100, - renderCell: ({ value }) => ( - - ), - }; -} - -interface Props { - campaignSummary: CampaignSummaryFragment; - filter: PerformanceFilter; -} - -export function AdSetBreakdown({ campaignSummary, filter }: Props) { - const { _ } = useLingui(); - - const { data, loading } = useQuery(FetchAdSetMetricsForCampaignDocument, { - variables: { - filter, - }, - }); - - const allMetrics = getMetricListForCampaign(campaignSummary); - const metricColumns = allMetrics.map(getColumnDefinitionForMetric); - - const rows = (data?.performance?.values ?? []).map((p) => { - const metricValues = lodash.fromPairs( - allMetrics.map((m) => [m.id, m.getValue(p.metrics)]), - ); - return { - ...p, - ...metricValues, - }; - }); - - const baseColumns: GridColDef[] = [ - { - field: "name", - headerName: _(msg`Name`), - valueGetter: (_value, row) => - row.dimensions.adSet?.name || - row.dimensions.adSet?.id?.substring(0, 8) || - "?", - flex: 1, - }, - { - field: "state", - headerName: _(msg`Status`), - valueGetter: (_value, row) => - displayFromCampaignState({ - campaignState: campaignSummary.state, - campaignStart: campaignSummary.startAt, - campaignEnd: campaignSummary.endAt, - state: row.dimensions.adSet?.state, - }), - renderCell: ({ value }) => ( - - ), - width: 100, - }, - { - field: "billingType", - headerName: _(msg`Type`), - valueGetter: (_value, row) => - uiLabelsForBillingType(row.dimensions.adSet?.billingType).longLabel, - width: 150, - }, - ]; - - const columns = [...baseColumns, ...metricColumns]; - - return ( - row.dimensions.adSet?.id ?? ""} - sx={{ borderStyle: "none" }} - pageSizeOptions={[10, 20, 50]} - initialState={{ - sorting: { - sortModel: [{ field: "spend", sort: "desc" }], - }, - pagination: { - paginationModel: { - pageSize: 20, - }, - }, - }} - /> - ); -} diff --git a/src/user/analytics/search/MetricSelector.tsx b/src/user/analytics/search/MetricSelector.tsx deleted file mode 100644 index 9bccbbe0..00000000 --- a/src/user/analytics/search/MetricSelector.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { Box, Switch, Tooltip, Typography, switchClasses } from "@mui/material"; -import { MetricDefinition } from "./metrics"; -import { RenderMetric } from "./RenderMetric"; -import { useMetricSelection } from "./hooks"; -import { Trans } from "@lingui/react"; -import { CampaignMetricDetailValuesFragment } from "@/graphql-client/graphql"; - -interface Props { - metricDefinition: MetricDefinition; - dataSource: CampaignMetricDetailValuesFragment | undefined; - isLast: boolean; -} - -export function MetricSelector({ - metricDefinition, - dataSource, - isLast, -}: Props) { - const { isSelected, toggleMetric } = useMetricSelection(); - const value = dataSource ? metricDefinition.getValue(dataSource) : undefined; - - return ( - - - - ) : undefined - } - placement="top-start" - > - - - - - - - - - - ); -} diff --git a/src/user/analytics/search/MetricsList.tsx b/src/user/analytics/search/MetricsList.tsx deleted file mode 100644 index dd30cd7e..00000000 --- a/src/user/analytics/search/MetricsList.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { - CampaignSummaryFragment, - CampaignMetricDetailValuesFragment, -} from "@/graphql-client/graphql"; -import { getMetricListForCampaign } from "./metrics"; -import { MetricSelector } from "./MetricSelector"; - -interface Props { - campaign: CampaignSummaryFragment; - dataSource: CampaignMetricDetailValuesFragment | undefined; -} - -export function MetricsList({ dataSource, campaign }: Props) { - const metrics = getMetricListForCampaign(campaign); - return metrics.map((metric, idx) => ( - - )); -} diff --git a/src/user/analytics/search/OverTimeGraph.tsx b/src/user/analytics/search/OverTimeGraph.tsx deleted file mode 100644 index 0cf0541d..00000000 --- a/src/user/analytics/search/OverTimeGraph.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import { DailyValuesFragment } from "@/graphql-client/graphql"; -import { useMetricSelection } from "./hooks"; -import { makeLineChartSeries } from "./series"; -import { HighchartsWrapper } from "@/user/analytics/analyticsOverview/components/HighchartsWrapper"; - -interface Props { - dataSource: DailyValuesFragment[] | undefined; -} - -export function OverTimeGraph({ dataSource }: Props) { - const { selectedMetrics } = useMetricSelection(); - - const series = selectedMetrics.map((metric) => - makeLineChartSeries(metric, dataSource ?? []), - ); - - return ( - - ); -} diff --git a/src/user/analytics/search/RenderMetric.tsx b/src/user/analytics/search/RenderMetric.tsx deleted file mode 100644 index c2eec7ea..00000000 --- a/src/user/analytics/search/RenderMetric.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import BigNumber from "bignumber.js"; -import { MetricType } from "./metrics"; -import _ from "lodash"; -import { Skeleton, Typography } from "@mui/material"; -import { format } from "@/user/library/format"; - -interface Props { - type: MetricType; - value: BigNumber | undefined | null; -} - -export function RenderMetric({ type, value }: Props) { - if (_.isNil(value)) { - return ; - } - - return {format(type, value)}; -} diff --git a/src/user/analytics/search/hooks.ts b/src/user/analytics/search/hooks.ts deleted file mode 100644 index d09fe2fb..00000000 --- a/src/user/analytics/search/hooks.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { MetricDefinition, getMetricDefinition } from "./metrics"; -import _ from "lodash"; -import { useHistory } from "react-router-dom"; - -// it's nicest to use , to separate metrics, but that gets URL encoded. -// but "space" gets encoded as "+", which is ok -const SEPARATOR = " "; - -interface UseMetricSelectionResult { - toggleMetric: (metric: MetricDefinition) => () => void; - isSelected: (metric: MetricDefinition) => boolean; - forceDefaultMetricSelection: () => void; - selectedMetrics: readonly MetricDefinition[]; -} - -export function useMetricSelection(): UseMetricSelectionResult { - const { - location: { search }, - replace, - } = useHistory(); - - const params = new URLSearchParams(search); - const metricIds = params.get("metrics")?.split(SEPARATOR) ?? []; - const metricArray = _.compact(metricIds.map(getMetricDefinition)); - const metricSet = new Set(metricArray); - - return { - forceDefaultMetricSelection: () => { - if (metricSet.size === 0) { - // eslint-disable-next-line lingui/no-unlocalized-strings - params.set("metrics", "impression ctr"); - replace({ - search: params.toString(), - }); - } - }, - isSelected: (metric) => metricSet.has(metric), - toggleMetric: (metric) => () => { - const newMetrics = new Set(metricSet); - if (newMetrics.has(metric)) { - newMetrics.delete(metric); - } else { - newMetrics.add(metric); - } - - params.set( - "metrics", - Array.from(newMetrics) - .map((m) => m.id) - .join(SEPARATOR), - ); - - replace({ - search: params.toString(), - }); - }, - selectedMetrics: metricArray, - }; -} diff --git a/src/user/analytics/search/metrics.ts b/src/user/analytics/search/metrics.ts deleted file mode 100644 index 67edaadb..00000000 --- a/src/user/analytics/search/metrics.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { msg } from "@lingui/macro"; -import BigNumber from "bignumber.js"; -import { MessageDescriptor } from "@lingui/core"; -import { - CampaignMetricDetailValuesFragment, - CampaignSummaryFragment, -} from "@/graphql-client/graphql"; - -export type MetricType = "number" | "rate" | "usd"; - -const colors = [ - "#2caffe", - "#544fc5", - "#00e272", - "#fe6a35", - "#6b8abc", - "#d568fb", - "#2ee0ca", - "#fa4b42", - "#feb56a", - "#91e8e1", -] as const; - -export interface MetricDefinition { - id: string; - caption: MessageDescriptor; - shortCaption?: MessageDescriptor; - tooltip?: MessageDescriptor; - getValue: (metrics: CampaignMetricDetailValuesFragment) => BigNumber; - type: MetricType; - color: string; - disableForCampaign?: (campaign: CampaignSummaryFragment) => boolean; -} - -const METRICS: MetricDefinition[] = [ - { - id: "impression", - caption: msg`Impressions`, - tooltip: msg`Counted when an ad is displayed on screen for a minimum of one second`, - getValue: (metrics) => BigNumber(metrics.impression), - type: "number", - color: colors[0], - }, - { - id: "click", - caption: msg`Clicks`, - tooltip: msg`Counted when a user clicks on the ad. Does not include clicks to dismiss`, - getValue: (metrics) => BigNumber(metrics.click), - type: "number", - color: colors[1], - }, - { - id: "ctr", - caption: msg`Click Through Rate`, - shortCaption: msg`CTR`, - tooltip: msg`The rate at which users clicked in correlation to their impressions`, - getValue: (metrics) => BigNumber(metrics.rates.clickThrough), - type: "rate", - color: colors[2], - }, - { - id: "spend", - caption: msg`Spend`, - getValue: (metrics) => BigNumber(metrics.spendUsd), - type: "usd", - color: colors[9], - }, -]; - -const metricLookup = new Map( - METRICS.map((m) => [m.id, m]), -); - -export function getMetricDefinition(id: string): MetricDefinition | undefined { - return metricLookup.get(id); -} - -export function getMetricListForCampaign( - campaign: CampaignSummaryFragment, -): readonly MetricDefinition[] { - return METRICS.filter( - (m) => !m.disableForCampaign || !m.disableForCampaign(campaign), - ); -} diff --git a/src/user/analytics/search/series.test.ts b/src/user/analytics/search/series.test.ts deleted file mode 100644 index ba10cfa3..00000000 --- a/src/user/analytics/search/series.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { getMetricDefinition } from "./metrics"; -import { makeLineChartSeries } from "./series"; -import assert from "node:assert"; -import { DeepPartial } from "@apollo/client/utilities"; -import dayjs from "dayjs"; -import { DailyValuesFragment } from "@/graphql-client/graphql"; - -it("should populate zero values for missing days in the date range", () => { - // why? we show a line graph. If there are missing days, the graph will draw the line - // from the last known value to the next known value, which is misleading - those days - // should actually be zero. - // - // There's an argument to say this should be done on the server, but it's more a function - // of the fact that we're choosing to display as a line rather than a bar chart, so it's - // definitely a client-side concern. - - const impressionsMetricDefinition = getMetricDefinition("impression"); - assert.ok(impressionsMetricDefinition); - - const rawValues: DeepPartial[] = [ - { - dimensions: { day: "2021-01-01T00:00:00Z" }, - metrics: { impression: "1" }, - }, - { - dimensions: { day: "2021-01-03T00:00:00Z" }, - metrics: { impression: "2" }, - }, - ]; - const { data } = makeLineChartSeries( - impressionsMetricDefinition, - rawValues as DailyValuesFragment[], - ); - - // this should fill in an entry for 2021-01-02Z with a value of 0 - expect(data).toMatchObject([ - [dayjs("2021-01-01Z").valueOf(), 1], - [dayjs("2021-01-02Z").valueOf(), 0], - [dayjs("2021-01-03Z").valueOf(), 2], - ]); -}); - -it("should handle empty data", () => { - // originally I just got this to return no data, - // but highcharts doesn't bother to draw the graph at all then. - // It's better to show something. - const impressionsMetricDefinition = getMetricDefinition("impression"); - assert.ok(impressionsMetricDefinition); - - const { data } = makeLineChartSeries(impressionsMetricDefinition, []); - expect(data).toMatchObject([[dayjs().utc().startOf("day").valueOf(), 0]]); -}); diff --git a/src/user/analytics/search/series.ts b/src/user/analytics/search/series.ts deleted file mode 100644 index c64fd3b8..00000000 --- a/src/user/analytics/search/series.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { MetricDefinition } from "./metrics"; -import { SeriesSplineOptions, SeriesTooltipOptionsObject } from "highcharts"; -import BigNumber from "bignumber.js"; -import { i18n } from "@lingui/core"; -import dayjs from "dayjs"; -import { DailyValuesFragment } from "@/graphql-client/graphql"; - -function populateZeroValues(data: [number, number][]): [number, number][] { - if (data.length === 0) { - return [[dayjs().utc().startOf("day").valueOf(), 0]]; - } - - const start = dayjs.utc(data[0][0]); - const end = dayjs.utc(data[data.length - 1][0]); - const result: [number, number][] = []; - let current = start; - let dataIndex = 0; - while (!current.isAfter(end)) { - if (data[dataIndex] && current.isSame(dayjs.utc(data[dataIndex][0]))) { - result.push(data[dataIndex]); - dataIndex++; - } else { - result.push([current.valueOf(), 0]); - } - current = current.add(1, "day"); - } - return result; -} - -export function makeLineChartSeries( - metric: MetricDefinition, - data: DailyValuesFragment[], -): SeriesSplineOptions { - const scalingFactor = metric.type === "rate" ? BigNumber(100) : BigNumber(1); - - const tooltip = (): SeriesTooltipOptionsObject => { - switch (metric.type) { - case "rate": - return { - valueDecimals: 2, - valueSuffix: "%", - }; - case "usd": - return { - valueDecimals: 2, - valuePrefix: "$", - }; - default: - return { - format: "{point.y:,.0f}", - }; - } - }; - - return { - type: "spline", - name: i18n._(metric.caption), - id: metric.id, - color: metric.color, - tooltip: tooltip(), - yAxis: metric.type, - data: populateZeroValues( - data.map((point) => [ - dayjs.utc(point.dimensions.day).valueOf(), - metric.getValue(point.metrics).multipliedBy(scalingFactor).toNumber(), - ]), - ), - }; -} diff --git a/src/user/views/user/CampaignReportViewSelector.tsx b/src/user/views/user/CampaignReportViewSelector.tsx index 4c14c1d2..4668cda5 100644 --- a/src/user/views/user/CampaignReportViewSelector.tsx +++ b/src/user/views/user/CampaignReportViewSelector.tsx @@ -4,7 +4,6 @@ import { useParams, useRouteMatch } from "react-router-dom"; import { CampaignFormat } from "@/graphql-client/graphql"; import { ConsultAccountManager } from "./reports/ConsultAccountManager"; import { OriginalCampaignReportView } from "./reports/OriginalCampaignReportView"; -import { SearchCampaignReportView } from "./reports/SearchCampaignReportView"; import { useQuery } from "@apollo/client"; import { AnalyticsOverview } from "@/routes/campaigns/analytics/AnalyticsOverview"; import MiniSideBar from "@/components/Drawer/MiniSideBar"; @@ -57,15 +56,14 @@ export function CampaignReportViewSelector() { } const format = data.campaign.format; + const isSearch = format === CampaignFormat.Search; return ( {format === CampaignFormat.NtpSi ? ( - ) : format === CampaignFormat.Search ? ( - - ) : isReport ? ( + ) : isSearch || isReport ? ( ) : ( diff --git a/src/user/views/user/reports/SearchCampaignReportView.tsx b/src/user/views/user/reports/SearchCampaignReportView.tsx deleted file mode 100644 index a2d15736..00000000 --- a/src/user/views/user/reports/SearchCampaignReportView.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import { Trans, msg } from "@lingui/macro"; -import { Box, Stack, Typography } from "@mui/material"; -import { Status } from "@/components/Campaigns/Status"; -import { CardContainer } from "@/components/Card/CardContainer"; -import { DateRangePicker } from "@/components/Date/DateRangePicker"; -import { ErrorDetail } from "@/components/Error/ErrorDetail"; -import { - PerformanceFilter, - CampaignSummaryFragment, - FetchDailyMetricsForCampaignDocument, -} from "@/graphql-client/graphql"; -import { useState } from "react"; -import { AdSetBreakdown } from "@/user/analytics/search/AdSetBreakdown"; -import { MetricsList } from "@/user/analytics/search/MetricsList"; -import { OverTimeGraph } from "@/user/analytics/search/OverTimeGraph"; -import { useMetricSelection } from "@/user/analytics/search/hooks"; -import { ReportMenu } from "@/user/reporting/ReportMenu"; -import dayjs from "dayjs"; -import { useQuery } from "@apollo/client"; -import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo"; - -interface Props { - campaignSummary: CampaignSummaryFragment; -} - -export function SearchCampaignReportView({ campaignSummary }: Props) { - useTrackMatomoPageView({ documentTitle: "Search Campaign Report View" }); - - const { forceDefaultMetricSelection } = useMetricSelection(); - const [isFirstLoad, setIsFirstLoad] = useState(true); - - const [startDate, setStartDate] = useState(dayjs(campaignSummary.startAt)); - const [endDate, setEndDate] = useState(dayjs().utc().endOf("day")); - - const filter: PerformanceFilter = { - campaignIds: [campaignSummary.id], - from: startDate.toISOString(), - to: endDate.toISOString(), - }; - - const { data, error } = useQuery(FetchDailyMetricsForCampaignDocument, { - variables: { - filter, - }, - }); - - if (isFirstLoad) { - setIsFirstLoad(false); - forceDefaultMetricSelection(); - } - - if (error) { - return ( - - ); - } - - return ( - <> - - - - - - - - - - - - {campaignSummary.name} - - - - - - - - - - - Ad Sets}> - - - - ); -} From 0c7a2722f5ed0629ce2fa0a572ee5786d6e8e986 Mon Sep 17 00:00:00 2001 From: Ian Krieger <48930920+IanKrieger@users.noreply.github.com> Date: Wed, 12 Jun 2024 12:23:57 -0400 Subject: [PATCH 2/4] feat: persist report settings, use relative filtering (#1228) Resolves: https://github.com/brave/ads-ui/issues/1227 --- https://github.com/brave/ads-ui/assets/48930920/7b178d07-0687-4cb0-a2e4-637ce78d8465 --- eslint.config.js | 1 + src/components/Date/DateRangePicker.tsx | 8 +- src/locales/en.po | 118 +++++++----- src/locales/es.po | 118 +++++++----- src/locales/pt.po | 118 +++++++----- src/locales/test.po | 118 +++++++----- .../campaigns/analytics/CampaignAnalytics.tsx | 20 +- .../campaigns/analytics/MetricSelector.tsx | 10 +- .../campaigns/analytics/ResultsPane.tsx | 7 +- .../campaigns/analytics/TabularData.tsx | 1 - .../analytics/filters/BreakdownSelector.tsx | 4 +- .../campaigns/analytics/filters/FilterBar.tsx | 4 +- .../campaigns/analytics/filters/OsFilter.tsx | 71 +++++-- .../analytics/filters/TimeFilter.tsx | 79 ++++---- .../analytics/filters/multi-filters.ts | 4 + .../analytics/filters/time-filters.test.ts | 61 ------ .../analytics/filters/time-filters.ts | 81 ++++---- .../campaigns/analytics/graphs/DailyGraph.tsx | 12 +- .../analytics/graphs/GraphSkeleton.tsx | 5 +- .../analytics/graphs/HourlyGraph.tsx | 7 +- src/routes/campaigns/analytics/hooks.ts | 175 ++++++++++++++---- src/routes/campaigns/analytics/metrics.ts | 7 + 22 files changed, 637 insertions(+), 392 deletions(-) delete mode 100644 src/routes/campaigns/analytics/filters/time-filters.test.ts diff --git a/eslint.config.js b/eslint.config.js index e31408c2..81d25da3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -84,6 +84,7 @@ export default tseslint.config( "zonedTimeToUtc", "utcToZonedTime", "graphql", + "getGenericMultiSelect", ], ignoreProperty: [ "documentTitle", diff --git a/src/components/Date/DateRangePicker.tsx b/src/components/Date/DateRangePicker.tsx index 4af8b902..26577981 100644 --- a/src/components/Date/DateRangePicker.tsx +++ b/src/components/Date/DateRangePicker.tsx @@ -23,13 +23,14 @@ export const DateRangePicker = ({ return ( - + { if (newValue) { - onFromChange(newValue); + onFromChange(newValue.startOf("day")); } }} slotProps={{ @@ -42,9 +43,10 @@ export const DateRangePicker = ({ { if (newValue) { - onToChange(newValue); + onToChange(newValue.endOf("day")); } }} slotProps={{ diff --git a/src/locales/en.po b/src/locales/en.po index 34e8033a..8d13be35 100644 --- a/src/locales/en.po +++ b/src/locales/en.po @@ -94,7 +94,7 @@ msgid "Activate" msgstr "Activate" #: src/components/Creatives/NewsPreview.tsx:90 -#: src/routes/campaigns/analytics/breakdowns.tsx:144 +#: src/routes/campaigns/analytics/breakdowns.tsx:145 msgid "Ad" msgstr "Ad" @@ -160,7 +160,6 @@ msgid "Ad sets" msgstr "Ad sets" #: src/user/views/adsManager/views/advanced/components/form/components/BaseForm.tsx:30 -#: src/user/views/user/reports/SearchCampaignReportView.tsx:127 msgid "Ad Sets" msgstr "Ad Sets" @@ -201,7 +200,7 @@ msgstr "Add Conversion tracking" msgid "Additional Details" msgstr "Additional Details" -#: src/user/views/user/reports/OriginalCampaignReportView.tsx:92 +#: src/user/views/user/reports/OriginalCampaignReportView.tsx:94 msgid "Additional Report: OS Performance" msgstr "Additional Report: OS Performance" @@ -236,8 +235,7 @@ msgstr "Advertiser profile" #~ msgid "advertising made simple" #~ msgstr "advertising made simple" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:15 -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:28 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:20 msgid "All OS" msgstr "All OS" @@ -245,6 +243,10 @@ msgstr "All OS" #~ msgid "All targeting and reporting is strictly designed to be anonymous and privacy-preserving." #~ msgstr "All targeting and reporting is strictly designed to be anonymous and privacy-preserving." +#: src/routes/campaigns/analytics/filters/time-filters.ts:15 +msgid "All time" +msgstr "All time" + #: src/auth/views/LandingPage.tsx:72 #~ msgid "Already have an account?" #~ msgstr "Already have an account?" @@ -257,7 +259,7 @@ msgstr "An ad from my Brave browser" msgid "An error has occurred while processing your request." msgstr "An error has occurred while processing your request." -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:16 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:21 msgid "Android" msgstr "Android" @@ -495,7 +497,7 @@ msgstr "Campaign Drafts" msgid "Campaign Format is required" msgstr "Campaign Format is required" -#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:24 +#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:26 msgid "Campaign has not started yet" msgstr "Campaign has not started yet" @@ -586,7 +588,6 @@ msgid "Click on the secure login link in the email to access your Brave Ads acco msgstr "Click on the secure login link in the email to access your Brave Ads account." #: src/routes/campaigns/analytics/metrics.ts:62 -#: src/user/analytics/search/metrics.ts:54 msgid "Click Through Rate" msgstr "Click Through Rate" @@ -603,7 +604,7 @@ msgstr "Click to site visit rate" msgid "Click-through conversions" msgstr "Click-through conversions" -#: src/routes/campaigns/analytics/metrics.ts:94 +#: src/routes/campaigns/analytics/metrics.ts:97 msgid "Click-through Conversions" msgstr "Click-through Conversions" @@ -615,7 +616,6 @@ msgstr "Click-through rate" #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:48 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:35 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:164 -#: src/user/analytics/search/metrics.ts:46 #: src/user/campaignList/CampaignList.tsx:133 #: src/user/views/user/AdDetailTable.tsx:59 msgid "Clicks" @@ -694,7 +694,7 @@ msgstr "Conversion" msgid "Conversion rate" msgstr "Conversion rate" -#: src/routes/campaigns/analytics/metrics.ts:102 +#: src/routes/campaigns/analytics/metrics.ts:106 msgid "Conversion Rate" msgstr "Conversion Rate" @@ -730,7 +730,7 @@ msgstr "Conversion URL Pattern" msgid "Conversion URL required." msgstr "Conversion URL required." -#: src/routes/campaigns/analytics/metrics.ts:78 +#: src/routes/campaigns/analytics/metrics.ts:79 #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:47 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:60 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:50 @@ -742,7 +742,7 @@ msgstr "Conversions" msgid "Copy this and keep this safe!" msgstr "Copy this and keep this safe!" -#: src/routes/campaigns/analytics/metrics.ts:125 +#: src/routes/campaigns/analytics/metrics.ts:131 msgid "Cost per Acquisition" msgstr "Cost per Acquisition" @@ -763,7 +763,6 @@ msgid "Counted if the user clicks an ad and spends at least 10 seconds on the ad msgstr "Counted if the user clicks an ad and spends at least 10 seconds on the advertiser's website, with the website open in an active browser tab. The 10 seconds must be spent on the site after arriving by clicking the ad link, and the tab must remain open and active the entire time for the visit to count." #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:36 -#: src/user/analytics/search/metrics.ts:47 msgid "Counted when a user clicks on the ad. Does not include clicks to dismiss" msgstr "Counted when a user clicks on the ad. Does not include clicks to dismiss" @@ -784,7 +783,6 @@ msgid "Counted when a user reaches a designated conversion landing page followin msgstr "Counted when a user reaches a designated conversion landing page following an impression and click of the ad." #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:31 -#: src/user/analytics/search/metrics.ts:39 msgid "Counted when an ad is displayed on screen for a minimum of one second" msgstr "Counted when an ad is displayed on screen for a minimum of one second" @@ -801,7 +799,7 @@ msgstr "Country is required" msgid "Country Targeting" msgstr "Country Targeting" -#: src/routes/campaigns/analytics/metrics.ts:126 +#: src/routes/campaigns/analytics/metrics.ts:132 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:72 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:89 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:156 @@ -855,11 +853,11 @@ msgstr "created" #: src/routes/campaigns/analytics/metrics.ts:63 #: src/user/analytics/analyticsOverview/components/BaseBarChart.tsx:58 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:40 -#: src/user/analytics/search/metrics.ts:55 msgid "CTR" msgstr "CTR" -#: src/routes/campaigns/analytics/filters/TimeFilter.tsx:34 +#: src/routes/campaigns/analytics/filters/time-filters.ts:59 +#: src/routes/campaigns/analytics/filters/TimeFilter.tsx:47 msgid "Custom" msgstr "Custom" @@ -929,11 +927,11 @@ msgstr "Discard campaign" msgid "Dismissal rate" msgstr "Dismissal rate" -#: src/routes/campaigns/analytics/metrics.ts:157 +#: src/routes/campaigns/analytics/metrics.ts:164 msgid "Dismissal Rate" msgstr "Dismissal Rate" -#: src/routes/campaigns/analytics/metrics.ts:149 +#: src/routes/campaigns/analytics/metrics.ts:156 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:65 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:174 msgid "Dismissals" @@ -971,7 +969,7 @@ msgstr "Don’t see the email? Check your spam folder or <0>try again." msgid "Download Report" msgstr "Download Report" -#: src/routes/campaigns/analytics/metrics.ts:141 +#: src/routes/campaigns/analytics/metrics.ts:148 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:46 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:172 msgid "Downvotes" @@ -1246,7 +1244,7 @@ msgstr "I understand that payment is required before ad campaigns can be launche msgid "I would like to receive marketing emails about new features and promotions from Brave Ads" msgstr "I would like to receive marketing emails about new features and promotions from Brave Ads" -#: src/routes/campaigns/analytics/TabularData.tsx:79 +#: src/routes/campaigns/analytics/TabularData.tsx:78 msgid "Id" msgstr "Id" @@ -1275,7 +1273,6 @@ msgstr "Images" #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:46 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:30 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:154 -#: src/user/analytics/search/metrics.ts:38 #: src/user/campaignList/CampaignList.tsx:119 #: src/user/views/user/AdDetailTable.tsx:47 msgid "Impressions" @@ -1337,7 +1334,7 @@ msgstr "Invalid Session" msgid "Invalid Token" msgstr "Invalid Token" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:17 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:22 msgid "iOS" msgstr "iOS" @@ -1349,7 +1346,7 @@ msgstr "is not" msgid "It is a modern <0>advertiser-first ad platform made to help brands reach new users. Brave Ads are discrete, unobtrusive first-party ads built directly into the browser and search engine, with familiar formats like push notifications and news-feed ads. Brave’s innovative on-device targeting respects a user’s desire for privacy while still delivering personalized ads based on their interests, which drives high ROI for advertisers." msgstr "It is a modern <0>advertiser-first ad platform made to help brands reach new users. Brave Ads are discrete, unobtrusive first-party ads built directly into the browser and search engine, with familiar formats like push notifications and news-feed ads. Brave’s innovative on-device targeting respects a user’s desire for privacy while still delivering personalized ads based on their interests, which drives high ROI for advertisers." -#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:26 +#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:28 msgid "It is scheduled to start {campaignStartFromNow}." msgstr "It is scheduled to start {campaignStartFromNow}." @@ -1369,6 +1366,26 @@ msgstr "Keypairs" msgid "Language acknowledgement is required" msgstr "Language acknowledgement is required" +#: src/routes/campaigns/analytics/filters/time-filters.ts:52 +#~ msgid "Last 14 days" +#~ msgstr "Last 14 days" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:46 +msgid "Last 30 days" +msgstr "Last 30 days" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:34 +msgid "Last 7 days" +msgstr "Last 7 days" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:52 +msgid "Last month" +msgstr "Last month" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:46 +#~ msgid "Last week (Sun - Sat)" +#~ msgstr "Last week (Sun - Sat)" + #: src/basic-attention-token/BasicAttentionTokenLandingPage.tsx:86 #~ msgid "Launch a Campaign" #~ msgstr "Launch a Campaign" @@ -1410,7 +1427,7 @@ msgstr "Lifetime budget must be higher for date range provided. Minimum ${min}." #~ msgid "Limited time only. Available to new advertisers, and those who ran campaigns before September 30, 2023." #~ msgstr "Limited time only. Available to new advertisers, and those who ran campaigns before September 30, 2023." -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:18 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:23 msgid "Linux" msgstr "Linux" @@ -1437,7 +1454,7 @@ msgstr "Log into your Brave Ads account" msgid "Logging in" msgstr "Logging in" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:19 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:24 msgid "macOS" msgstr "macOS" @@ -1491,11 +1508,10 @@ msgstr "more" #: src/components/Creatives/CreativeCampaigns.tsx:45 #: src/components/Creatives/CreativeList.tsx:47 -#: src/routes/campaigns/analytics/TabularData.tsx:84 +#: src/routes/campaigns/analytics/TabularData.tsx:83 #: src/user/ads/InlineContentAd.tsx:65 #: src/user/ads/NotificationAd.tsx:51 #: src/user/adSet/AdSetList.tsx:92 -#: src/user/analytics/search/AdSetBreakdown.tsx:64 #: src/user/views/adsManager/views/advanced/components/review/components/AdSetReview.tsx:41 #: src/user/views/adsManager/views/advanced/components/review/components/CampaignReview.tsx:30 msgid "Name" @@ -1529,7 +1545,6 @@ msgstr "New campaigns typically take up to 48 hours to review during a regular U msgid "New Keypair" msgstr "New Keypair" -#: src/user/campaignList/CampaignList.tsx:263 #: src/user/library/index.ts:255 #: src/util/campaign.ts:7 msgid "New tab takeover" @@ -1662,7 +1677,7 @@ msgstr "or sign in using a secure link" msgid "Organization" msgstr "Organization" -#: src/routes/campaigns/analytics/breakdowns.tsx:131 +#: src/routes/campaigns/analytics/breakdowns.tsx:132 #: src/user/analytics/analyticsOverview/reports/os/components/OsPieChart.tsx:21 msgid "OS" msgstr "OS" @@ -1718,7 +1733,7 @@ msgstr "Performance Report" msgid "Platforms" msgstr "Platforms" -#: src/user/views/user/reports/ConsultAccountManager.tsx:10 +#: src/user/views/user/reports/ConsultAccountManager.tsx:13 msgid "Please ask your Account Manager for reports on campaigns of this format." msgstr "Please ask your Account Manager for reports on campaigns of this format." @@ -2062,7 +2077,7 @@ msgstr "Simple ads to reach digital trend-setters around the world" msgid "Site visit rate" msgstr "Site visit rate" -#: src/routes/campaigns/analytics/metrics.ts:110 +#: src/routes/campaigns/analytics/metrics.ts:115 msgid "Site Visit Rate" msgstr "Site Visit Rate" @@ -2090,12 +2105,11 @@ msgstr "Skip survey and continue" msgid "Something went wrong." msgstr "Something went wrong." -#: src/routes/campaigns/analytics/metrics.ts:118 +#: src/routes/campaigns/analytics/metrics.ts:124 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:48 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:88 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:168 #: src/user/analytics/analyticsOverview/reports/os/components/OsPieChart.tsx:40 -#: src/user/analytics/search/metrics.ts:63 #: src/user/campaignList/CampaignList.tsx:106 #: src/user/views/user/AdDetailTable.tsx:30 msgid "Spend" @@ -2155,7 +2169,6 @@ msgstr "State" #: src/components/Creatives/CreativeCampaigns.tsx:48 #: src/user/adSet/AdSetList.tsx:98 -#: src/user/analytics/search/AdSetBreakdown.tsx:73 #: src/user/campaignList/CampaignList.tsx:86 msgid "Status" msgstr "Status" @@ -2265,7 +2278,6 @@ msgid "The following query string parameters will be added to your landing page msgstr "The following query string parameters will be added to your landing page URLs. This will allow you to track the performance of your ads." #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:41 -#: src/user/analytics/search/metrics.ts:56 msgid "The rate at which users clicked in correlation to their impressions" msgstr "The rate at which users clicked in correlation to their impressions" @@ -2301,6 +2313,18 @@ msgstr "This is a news display ad, it wll look like part of the news feed." msgid "This key is unique to you, make sure to safely store it and avoid sharing it with others to prevent unauthorized access." msgstr "This key is unique to you, make sure to safely store it and avoid sharing it with others to prevent unauthorized access." +#: src/routes/campaigns/analytics/filters/time-filters.ts:40 +msgid "This month" +msgstr "This month" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:28 +msgid "This week" +msgstr "This week" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:34 +#~ msgid "This week (Sun - Today)" +#~ msgstr "This week (Sun - Today)" + #: src/components/TimeZonePicker/index.tsx:29 #: src/components/TimeZonePicker/index.tsx:36 msgid "Time Zone" @@ -2318,7 +2342,7 @@ msgstr "Title" msgid "Title Preview" msgstr "Title Preview" -#: src/components/Date/DateRangePicker.tsx:43 +#: src/components/Date/DateRangePicker.tsx:44 msgid "To" msgstr "To" @@ -2330,6 +2354,10 @@ msgstr "To" msgid "To protect user’s privacy, verified ad conversion data is encrypted so that the identities of converted users remain anonymous to Brave. You can decrypt the conversion data in the CSV file by providing your private key here. If no key is provided, you will receive the encrypted conversion data. Your private key will never be sent to or stored on any Brave servers." msgstr "To protect user’s privacy, verified ad conversion data is encrypted so that the identities of converted users remain anonymous to Brave. You can decrypt the conversion data in the CSV file by providing your private key here. If no key is provided, you will receive the encrypted conversion data. Your private key will never be sent to or stored on any Brave servers." +#: src/routes/campaigns/analytics/filters/time-filters.ts:22 +msgid "Today" +msgstr "Today" + #: src/components/Collapse/ChangeReportingAlert.tsx:48 #~ msgid "Toggle between various metrics using the switches provided. For deeper insights, click the buttons to access various breakdowns. If you prefer the previous view, simply click the \"revert\" button to switch back." #~ msgstr "Toggle between various metrics using the switches provided. For deeper insights, click the buttons to access various breakdowns. If you prefer the previous view, simply click the \"revert\" button to switch back." @@ -2360,7 +2388,6 @@ msgstr "Try a free one-month test to see how Brave Search Ads perform for your b #: src/components/Conversion/ConversionFields.tsx:17 #: src/user/adSet/AdSetList.tsx:111 -#: src/user/analytics/search/AdSetBreakdown.tsx:92 msgid "Type" msgstr "Type" @@ -2404,7 +2431,7 @@ msgstr "Unable to get profile information" msgid "Unable to load ad" msgstr "Unable to load ad" -#: src/routes/campaigns/analytics/CampaignAnalytics.tsx:64 +#: src/routes/campaigns/analytics/CampaignAnalytics.tsx:52 msgid "Unable to load reporting details for campaign: {0}" msgstr "Unable to load reporting details for campaign: {0}" @@ -2430,7 +2457,6 @@ msgid "Unable to retrieve images" msgstr "Unable to retrieve images" #: src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx:46 -#: src/user/views/user/reports/SearchCampaignReportView.tsx:53 msgid "Unable to retrieve reporting data for this Campaign." msgstr "Unable to retrieve reporting data for this Campaign." @@ -2496,7 +2522,7 @@ msgstr "Uploaded images can be shared across different ad sets within a Campaign msgid "Uploading file..." msgstr "Uploading file..." -#: src/routes/campaigns/analytics/metrics.ts:133 +#: src/routes/campaigns/analytics/metrics.ts:140 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:45 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:170 msgid "Upvotes" @@ -2544,7 +2570,7 @@ msgstr "Verified Conversions Report" msgid "View-through conversions" msgstr "View-through conversions" -#: src/routes/campaigns/analytics/metrics.ts:86 +#: src/routes/campaigns/analytics/metrics.ts:88 msgid "View-through Conversions" msgstr "View-through Conversions" @@ -2604,7 +2630,7 @@ msgstr "While looking up alternatives to Google Ads" msgid "Why use Brave Ads?" msgstr "Why use Brave Ads?" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:20 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:25 msgid "Windows" msgstr "Windows" @@ -2616,6 +2642,10 @@ msgstr "Work email" msgid "Yes" msgstr "Yes" +#: src/routes/campaigns/analytics/filters/time-filters.ts:28 +#~ msgid "Yesterday" +#~ msgstr "Yesterday" + #: src/user/settings/NewKeyPairModal.tsx:134 msgid "You are attempting to create a new keypair, this will replace any of your organization’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." msgstr "You are attempting to create a new keypair, this will replace any of your organization’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." diff --git a/src/locales/es.po b/src/locales/es.po index 712a7265..68fdac7f 100644 --- a/src/locales/es.po +++ b/src/locales/es.po @@ -90,7 +90,7 @@ msgid "Activate" msgstr "Activar" #: src/components/Creatives/NewsPreview.tsx:90 -#: src/routes/campaigns/analytics/breakdowns.tsx:144 +#: src/routes/campaigns/analytics/breakdowns.tsx:145 msgid "Ad" msgstr "Anuncio" @@ -156,7 +156,6 @@ msgid "Ad sets" msgstr "Conjuntos de anuncios" #: src/user/views/adsManager/views/advanced/components/form/components/BaseForm.tsx:30 -#: src/user/views/user/reports/SearchCampaignReportView.tsx:127 msgid "Ad Sets" msgstr "Conjuntos de anuncios" @@ -197,7 +196,7 @@ msgstr "Añadir seguimiento de conversiones" msgid "Additional Details" msgstr "Detalles adicionales" -#: src/user/views/user/reports/OriginalCampaignReportView.tsx:92 +#: src/user/views/user/reports/OriginalCampaignReportView.tsx:94 msgid "Additional Report: OS Performance" msgstr "Informe adicional: Rendimiento del Sistema Operativo" @@ -232,8 +231,7 @@ msgstr "" #~ msgid "advertising made simple" #~ msgstr "Publicidad simplificada" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:15 -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:28 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:20 msgid "All OS" msgstr "" @@ -241,6 +239,10 @@ msgstr "" #~ msgid "All targeting and reporting is strictly designed to be anonymous and privacy-preserving." #~ msgstr "Todos los objetivos e informes están estrictamente diseñados para ser anónimos y preservar la privacidad." +#: src/routes/campaigns/analytics/filters/time-filters.ts:15 +msgid "All time" +msgstr "" + #: src/auth/views/LandingPage.tsx:72 #~ msgid "Already have an account?" #~ msgstr "¿Ya tiene una cuenta?" @@ -253,7 +255,7 @@ msgstr "Un anuncio de mi navegador Brave" msgid "An error has occurred while processing your request." msgstr "Se ha producido un error al procesar su solicitud." -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:16 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:21 msgid "Android" msgstr "" @@ -480,7 +482,7 @@ msgstr "Borradores de campaña" msgid "Campaign Format is required" msgstr "Se requiere el formato de la campaña" -#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:24 +#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:26 msgid "Campaign has not started yet" msgstr "" @@ -566,7 +568,6 @@ msgid "Click on the secure login link in the email to access your Brave Ads acco msgstr "Haga clic en el enlace de inicio de sesión seguro del correo electrónico para acceder a su cuenta de Brave Ads." #: src/routes/campaigns/analytics/metrics.ts:62 -#: src/user/analytics/search/metrics.ts:54 msgid "Click Through Rate" msgstr "Clic por calificaciones" @@ -583,7 +584,7 @@ msgstr "Haga clic para ver la tasa de visitas al sitio" msgid "Click-through conversions" msgstr "Conversiones de clics" -#: src/routes/campaigns/analytics/metrics.ts:94 +#: src/routes/campaigns/analytics/metrics.ts:97 msgid "Click-through Conversions" msgstr "" @@ -595,7 +596,6 @@ msgstr "Tasa de clics" #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:48 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:35 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:164 -#: src/user/analytics/search/metrics.ts:46 #: src/user/campaignList/CampaignList.tsx:133 #: src/user/views/user/AdDetailTable.tsx:59 msgid "Clicks" @@ -674,7 +674,7 @@ msgstr "Conversión" msgid "Conversion rate" msgstr "Tasa de conversión" -#: src/routes/campaigns/analytics/metrics.ts:102 +#: src/routes/campaigns/analytics/metrics.ts:106 msgid "Conversion Rate" msgstr "" @@ -710,7 +710,7 @@ msgstr "Patrón de URL de conversión" msgid "Conversion URL required." msgstr "Se requiere una URL de conversión." -#: src/routes/campaigns/analytics/metrics.ts:78 +#: src/routes/campaigns/analytics/metrics.ts:79 #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:47 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:60 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:50 @@ -722,7 +722,7 @@ msgstr "Conversiones" msgid "Copy this and keep this safe!" msgstr "¡Copie esto y guárdelo en un lugar seguro!" -#: src/routes/campaigns/analytics/metrics.ts:125 +#: src/routes/campaigns/analytics/metrics.ts:131 msgid "Cost per Acquisition" msgstr "" @@ -743,7 +743,6 @@ msgid "Counted if the user clicks an ad and spends at least 10 seconds on the ad msgstr "Se cuenta si el usuario hace clic en un anuncio y pasa al menos 10 segundos en el sitio web del anunciante, con el sitio web abierto en una pestaña activa del navegador. Los 10 segundos deben pasar en el sitio después de llegar haciendo clic en el enlace del anuncio, y la pestaña debe permanecer abierta y activa todo el tiempo para que la visita cuente." #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:36 -#: src/user/analytics/search/metrics.ts:47 msgid "Counted when a user clicks on the ad. Does not include clicks to dismiss" msgstr "Se cuenta cuando un usuario hace clic en el anuncio. No incluye los clics para descartar." @@ -764,7 +763,6 @@ msgid "Counted when a user reaches a designated conversion landing page followin msgstr "Se cuenta cuando un usuario llega a una página de destino de conversión designada después de una impresión y un clic en el anuncio." #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:31 -#: src/user/analytics/search/metrics.ts:39 msgid "Counted when an ad is displayed on screen for a minimum of one second" msgstr "Se cuenta cuando un anuncio se muestra en la pantalla durante un mínimo de un segundo." @@ -781,7 +779,7 @@ msgstr "Se requiere el país" msgid "Country Targeting" msgstr "Segmentación por país" -#: src/routes/campaigns/analytics/metrics.ts:126 +#: src/routes/campaigns/analytics/metrics.ts:132 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:72 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:89 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:156 @@ -834,11 +832,11 @@ msgstr "creado" #: src/routes/campaigns/analytics/metrics.ts:63 #: src/user/analytics/analyticsOverview/components/BaseBarChart.tsx:58 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:40 -#: src/user/analytics/search/metrics.ts:55 msgid "CTR" msgstr "CTR" -#: src/routes/campaigns/analytics/filters/TimeFilter.tsx:34 +#: src/routes/campaigns/analytics/filters/time-filters.ts:59 +#: src/routes/campaigns/analytics/filters/TimeFilter.tsx:47 msgid "Custom" msgstr "" @@ -908,11 +906,11 @@ msgstr "Descartar campaña" msgid "Dismissal rate" msgstr "Tasa de rechazo" -#: src/routes/campaigns/analytics/metrics.ts:157 +#: src/routes/campaigns/analytics/metrics.ts:164 msgid "Dismissal Rate" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:149 +#: src/routes/campaigns/analytics/metrics.ts:156 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:65 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:174 msgid "Dismissals" @@ -950,7 +948,7 @@ msgstr "¿No ve el correo electrónico? Revise su carpeta de correo no deseado o msgid "Download Report" msgstr "Descargar informe" -#: src/routes/campaigns/analytics/metrics.ts:141 +#: src/routes/campaigns/analytics/metrics.ts:148 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:46 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:172 msgid "Downvotes" @@ -1215,7 +1213,7 @@ msgstr "Entiendo que se requiere un pago antes de que se puedan lanzar campañas msgid "I would like to receive marketing emails about new features and promotions from Brave Ads" msgstr "Me gustaría recibir correos electrónicos de marketing sobre nuevas funciones y promociones de Brave Ads" -#: src/routes/campaigns/analytics/TabularData.tsx:79 +#: src/routes/campaigns/analytics/TabularData.tsx:78 msgid "Id" msgstr "" @@ -1244,7 +1242,6 @@ msgstr "Imágenes" #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:46 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:30 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:154 -#: src/user/analytics/search/metrics.ts:38 #: src/user/campaignList/CampaignList.tsx:119 #: src/user/views/user/AdDetailTable.tsx:47 msgid "Impressions" @@ -1305,7 +1302,7 @@ msgstr "Sesión no válida" msgid "Invalid Token" msgstr "Token no válido" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:17 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:22 msgid "iOS" msgstr "" @@ -1317,7 +1314,7 @@ msgstr "no es" msgid "It is a modern <0>advertiser-first ad platform made to help brands reach new users. Brave Ads are discrete, unobtrusive first-party ads built directly into the browser and search engine, with familiar formats like push notifications and news-feed ads. Brave’s innovative on-device targeting respects a user’s desire for privacy while still delivering personalized ads based on their interests, which drives high ROI for advertisers." msgstr "" -#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:26 +#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:28 msgid "It is scheduled to start {campaignStartFromNow}." msgstr "" @@ -1337,6 +1334,26 @@ msgstr "Pares de claves" msgid "Language acknowledgement is required" msgstr "Se requiere confirmación de idioma" +#: src/routes/campaigns/analytics/filters/time-filters.ts:52 +#~ msgid "Last 14 days" +#~ msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:46 +msgid "Last 30 days" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:34 +msgid "Last 7 days" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:52 +msgid "Last month" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:46 +#~ msgid "Last week (Sun - Sat)" +#~ msgstr "" + #: src/basic-attention-token/BasicAttentionTokenLandingPage.tsx:86 #~ msgid "Launch a Campaign" #~ msgstr "Lanzar una campaña" @@ -1378,7 +1395,7 @@ msgstr "El presupuesto vitalicio debe ser mayor para el intervalo de fechas prop #~ msgid "Limited time only. Available to new advertisers, and those who ran campaigns before September 30, 2023." #~ msgstr "Solo por tiempo limitado. Disponible para nuevos anunciantes y aquellos que realizaron campañas antes del 30 de septiembre de 2023." -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:18 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:23 msgid "Linux" msgstr "" @@ -1405,7 +1422,7 @@ msgstr "Inicie sesión en su cuenta de Brave Ads" msgid "Logging in" msgstr "Iniciando sesión" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:19 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:24 msgid "macOS" msgstr "" @@ -1456,11 +1473,10 @@ msgstr "más" #: src/components/Creatives/CreativeCampaigns.tsx:45 #: src/components/Creatives/CreativeList.tsx:47 -#: src/routes/campaigns/analytics/TabularData.tsx:84 +#: src/routes/campaigns/analytics/TabularData.tsx:83 #: src/user/ads/InlineContentAd.tsx:65 #: src/user/ads/NotificationAd.tsx:51 #: src/user/adSet/AdSetList.tsx:92 -#: src/user/analytics/search/AdSetBreakdown.tsx:64 #: src/user/views/adsManager/views/advanced/components/review/components/AdSetReview.tsx:41 #: src/user/views/adsManager/views/advanced/components/review/components/CampaignReview.tsx:30 msgid "Name" @@ -1494,7 +1510,6 @@ msgstr "Las nuevas campañas suelen tardar hasta 48 horas en revisarse durante u msgid "New Keypair" msgstr "Nuevo par de claves" -#: src/user/campaignList/CampaignList.tsx:263 #: src/user/library/index.ts:255 #: src/util/campaign.ts:7 msgid "New tab takeover" @@ -1626,7 +1641,7 @@ msgstr "o inicie sesión usando un enlace seguro" msgid "Organization" msgstr "Organización" -#: src/routes/campaigns/analytics/breakdowns.tsx:131 +#: src/routes/campaigns/analytics/breakdowns.tsx:132 #: src/user/analytics/analyticsOverview/reports/os/components/OsPieChart.tsx:21 msgid "OS" msgstr "Sistema Operativo" @@ -1682,7 +1697,7 @@ msgstr "Informe de rendimiento" msgid "Platforms" msgstr "Plataformas" -#: src/user/views/user/reports/ConsultAccountManager.tsx:10 +#: src/user/views/user/reports/ConsultAccountManager.tsx:13 msgid "Please ask your Account Manager for reports on campaigns of this format." msgstr "Por favor, consulte con su Gerente de Cuenta para obtener informes sobre campañas en este formato." @@ -2011,7 +2026,7 @@ msgstr "" msgid "Site visit rate" msgstr "Tasa de visitas al sitio" -#: src/routes/campaigns/analytics/metrics.ts:110 +#: src/routes/campaigns/analytics/metrics.ts:115 msgid "Site Visit Rate" msgstr "" @@ -2039,12 +2054,11 @@ msgstr "Saltar encuesta y continuar" msgid "Something went wrong." msgstr "Algo salió mal. " -#: src/routes/campaigns/analytics/metrics.ts:118 +#: src/routes/campaigns/analytics/metrics.ts:124 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:48 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:88 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:168 #: src/user/analytics/analyticsOverview/reports/os/components/OsPieChart.tsx:40 -#: src/user/analytics/search/metrics.ts:63 #: src/user/campaignList/CampaignList.tsx:106 #: src/user/views/user/AdDetailTable.tsx:30 msgid "Spend" @@ -2096,7 +2110,6 @@ msgstr "Estado" #: src/components/Creatives/CreativeCampaigns.tsx:48 #: src/user/adSet/AdSetList.tsx:98 -#: src/user/analytics/search/AdSetBreakdown.tsx:73 #: src/user/campaignList/CampaignList.tsx:86 msgid "Status" msgstr "Estado" @@ -2196,7 +2209,6 @@ msgid "The following query string parameters will be added to your landing page msgstr "" #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:41 -#: src/user/analytics/search/metrics.ts:56 msgid "The rate at which users clicked in correlation to their impressions" msgstr "La tasa a la cual los usuarios hicieron clic en correlación con sus impresiones" @@ -2228,6 +2240,18 @@ msgstr "Este es un anuncio de noticias, se verá como parte de la fuente de noti msgid "This key is unique to you, make sure to safely store it and avoid sharing it with others to prevent unauthorized access." msgstr "Esta clave es única para usted, asegúrese de guardarla de forma segura y evite compartirla con otros para evitar el acceso no autorizado." +#: src/routes/campaigns/analytics/filters/time-filters.ts:40 +msgid "This month" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:28 +msgid "This week" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:34 +#~ msgid "This week (Sun - Today)" +#~ msgstr "" + #: src/components/TimeZonePicker/index.tsx:29 #: src/components/TimeZonePicker/index.tsx:36 msgid "Time Zone" @@ -2245,7 +2269,7 @@ msgstr "Título" msgid "Title Preview" msgstr "Vista previa del título" -#: src/components/Date/DateRangePicker.tsx:43 +#: src/components/Date/DateRangePicker.tsx:44 msgid "To" msgstr "Para" @@ -2253,6 +2277,10 @@ msgstr "Para" msgid "To protect user’s privacy, verified ad conversion data is encrypted so that the identities of converted users remain anonymous to Brave. You can decrypt the conversion data in the CSV file by providing your private key here. If no key is provided, you will receive the encrypted conversion data. Your private key will never be sent to or stored on any Brave servers." msgstr "Para proteger la privacidad del usuario, los datos de conversión de anuncios verificados se cifran para que las identidades de los usuarios convertidos permanezcan anónimas para Brave. Puede descifrar los datos de conversión en el archivo CSV proporcionando su clave privada aquí. Si no se proporciona ninguna clave, recibirá los datos de conversión cifrados. Su clave privada nunca se enviará ni se almacenará en ningún servidor de Brave." +#: src/routes/campaigns/analytics/filters/time-filters.ts:22 +msgid "Today" +msgstr "" + #: src/components/Collapse/ChangeReportingAlert.tsx:48 #~ msgid "Toggle between various metrics using the switches provided. For deeper insights, click the buttons to access various breakdowns. If you prefer the previous view, simply click the \"revert\" button to switch back." #~ msgstr "" @@ -2282,7 +2310,6 @@ msgstr "" #: src/components/Conversion/ConversionFields.tsx:17 #: src/user/adSet/AdSetList.tsx:111 -#: src/user/analytics/search/AdSetBreakdown.tsx:92 msgid "Type" msgstr "Tipo" @@ -2322,7 +2349,7 @@ msgstr "No se puede obtener información del perfil" msgid "Unable to load ad" msgstr "No se puede cargar el anuncio" -#: src/routes/campaigns/analytics/CampaignAnalytics.tsx:64 +#: src/routes/campaigns/analytics/CampaignAnalytics.tsx:52 msgid "Unable to load reporting details for campaign: {0}" msgstr "" @@ -2348,7 +2375,6 @@ msgid "Unable to retrieve images" msgstr "No se pueden recuperar imágenes" #: src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx:46 -#: src/user/views/user/reports/SearchCampaignReportView.tsx:53 msgid "Unable to retrieve reporting data for this Campaign." msgstr "No se pueden recuperar los datos de los informes de esta campaña." @@ -2414,7 +2440,7 @@ msgstr "Las imágenes subidas se pueden compartir entre diferentes conjuntos de msgid "Uploading file..." msgstr "Cargando archivo…" -#: src/routes/campaigns/analytics/metrics.ts:133 +#: src/routes/campaigns/analytics/metrics.ts:140 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:45 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:170 msgid "Upvotes" @@ -2462,7 +2488,7 @@ msgstr "Informe de conversiones verificadas" msgid "View-through conversions" msgstr "Conversiones por visualización" -#: src/routes/campaigns/analytics/metrics.ts:86 +#: src/routes/campaigns/analytics/metrics.ts:88 msgid "View-through Conversions" msgstr "" @@ -2517,7 +2543,7 @@ msgstr "Al buscar alternativas a Google Ads" msgid "Why use Brave Ads?" msgstr "" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:20 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:25 msgid "Windows" msgstr "" @@ -2529,6 +2555,10 @@ msgstr "Correo electrónico de trabajo" msgid "Yes" msgstr "Sí" +#: src/routes/campaigns/analytics/filters/time-filters.ts:28 +#~ msgid "Yesterday" +#~ msgstr "" + #: src/user/settings/NewKeyPairModal.tsx:134 msgid "You are attempting to create a new keypair, this will replace any of your organization’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." msgstr "Está intentando crear un nuevo par de claves, que reemplazará cualquiera de los pares de claves existentes de su organización. Tenga en cuenta que los pares de claves anteriores no se pueden recuperar ni utilizar una vez reemplazados." diff --git a/src/locales/pt.po b/src/locales/pt.po index 7512446d..529dd8f1 100644 --- a/src/locales/pt.po +++ b/src/locales/pt.po @@ -90,7 +90,7 @@ msgid "Activate" msgstr "Ativar" #: src/components/Creatives/NewsPreview.tsx:90 -#: src/routes/campaigns/analytics/breakdowns.tsx:144 +#: src/routes/campaigns/analytics/breakdowns.tsx:145 msgid "Ad" msgstr "Anúncio" @@ -156,7 +156,6 @@ msgid "Ad sets" msgstr "Conjuntos de anúncios" #: src/user/views/adsManager/views/advanced/components/form/components/BaseForm.tsx:30 -#: src/user/views/user/reports/SearchCampaignReportView.tsx:127 msgid "Ad Sets" msgstr "Conjuntos de Anúncios" @@ -197,7 +196,7 @@ msgstr "Adicionar rastreamento de conversão" msgid "Additional Details" msgstr "Detalhes Adicionais" -#: src/user/views/user/reports/OriginalCampaignReportView.tsx:92 +#: src/user/views/user/reports/OriginalCampaignReportView.tsx:94 msgid "Additional Report: OS Performance" msgstr "Relatório Adicional: Desempenho do Sistema Operacional" @@ -232,8 +231,7 @@ msgstr "" #~ msgid "advertising made simple" #~ msgstr "publicidade descomplicada" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:15 -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:28 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:20 msgid "All OS" msgstr "" @@ -241,6 +239,10 @@ msgstr "" #~ msgid "All targeting and reporting is strictly designed to be anonymous and privacy-preserving." #~ msgstr "Todos os direcionamentos e relatórios são estritamente projetados para serem anônimos e preservarem a privacidade." +#: src/routes/campaigns/analytics/filters/time-filters.ts:15 +msgid "All time" +msgstr "" + #: src/auth/views/LandingPage.tsx:72 #~ msgid "Already have an account?" #~ msgstr "Já tem uma conta?" @@ -253,7 +255,7 @@ msgstr "Um anúncio do meu navegador Brave" msgid "An error has occurred while processing your request." msgstr "Ocorreu um erro ao processar sua solicitação." -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:16 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:21 msgid "Android" msgstr "" @@ -471,7 +473,7 @@ msgstr "Rascunhos de Campanha" msgid "Campaign Format is required" msgstr "O Formato da Campanha é obrigatório" -#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:24 +#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:26 msgid "Campaign has not started yet" msgstr "" @@ -554,7 +556,6 @@ msgid "Click on the secure login link in the email to access your Brave Ads acco msgstr "Clique no link seguro de login no seu e-mail para acessar sua conta do Brave Ads." #: src/routes/campaigns/analytics/metrics.ts:62 -#: src/user/analytics/search/metrics.ts:54 msgid "Click Through Rate" msgstr "Taxa de Cliques" @@ -571,7 +572,7 @@ msgstr "Taxa de Visitas ao Site por Clique" msgid "Click-through conversions" msgstr "Conversões por Clique" -#: src/routes/campaigns/analytics/metrics.ts:94 +#: src/routes/campaigns/analytics/metrics.ts:97 msgid "Click-through Conversions" msgstr "" @@ -583,7 +584,6 @@ msgstr "Taxa de Cliques" #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:48 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:35 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:164 -#: src/user/analytics/search/metrics.ts:46 #: src/user/campaignList/CampaignList.tsx:133 #: src/user/views/user/AdDetailTable.tsx:59 msgid "Clicks" @@ -662,7 +662,7 @@ msgstr "Conversão" msgid "Conversion rate" msgstr "Taxa de conversão" -#: src/routes/campaigns/analytics/metrics.ts:102 +#: src/routes/campaigns/analytics/metrics.ts:106 msgid "Conversion Rate" msgstr "" @@ -698,7 +698,7 @@ msgstr "Padrão de URL de Conversão" msgid "Conversion URL required." msgstr "A URL de conversão é obrigatória." -#: src/routes/campaigns/analytics/metrics.ts:78 +#: src/routes/campaigns/analytics/metrics.ts:79 #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:47 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:60 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:50 @@ -710,7 +710,7 @@ msgstr "Conversões" msgid "Copy this and keep this safe!" msgstr "Copie isso e guarde em um local seguro!" -#: src/routes/campaigns/analytics/metrics.ts:125 +#: src/routes/campaigns/analytics/metrics.ts:131 msgid "Cost per Acquisition" msgstr "" @@ -731,7 +731,6 @@ msgid "Counted if the user clicks an ad and spends at least 10 seconds on the ad msgstr "Contado se o usuário clicar em um anúncio e passar pelo menos 10 segundos no site do anunciante, com o site aberto em uma aba ativa do navegador. Os 10 segundos devem ser gastos no site após o redirecionamento ao clicar no link do anúncio, e a aba deve permanecer aberta e ativa durante todo o tempo para que a visita conte." #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:36 -#: src/user/analytics/search/metrics.ts:47 msgid "Counted when a user clicks on the ad. Does not include clicks to dismiss" msgstr "Contado quando um usuário clica no anúncio. Não inclui cliques para fechar." @@ -752,7 +751,6 @@ msgid "Counted when a user reaches a designated conversion landing page followin msgstr "Contado quando um usuário chega a uma página de destino de conversão designada após uma visualização e clique no anúncio." #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:31 -#: src/user/analytics/search/metrics.ts:39 msgid "Counted when an ad is displayed on screen for a minimum of one second" msgstr "Contado quando um anúncio é exibido na tela por no mínimo um segundo." @@ -769,7 +767,7 @@ msgstr "O país é obrigatório" msgid "Country Targeting" msgstr "Direcionamento por País" -#: src/routes/campaigns/analytics/metrics.ts:126 +#: src/routes/campaigns/analytics/metrics.ts:132 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:72 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:89 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:156 @@ -819,11 +817,11 @@ msgstr "criado" #: src/routes/campaigns/analytics/metrics.ts:63 #: src/user/analytics/analyticsOverview/components/BaseBarChart.tsx:58 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:40 -#: src/user/analytics/search/metrics.ts:55 msgid "CTR" msgstr "CTR (Taxa de Cliques)" -#: src/routes/campaigns/analytics/filters/TimeFilter.tsx:34 +#: src/routes/campaigns/analytics/filters/time-filters.ts:59 +#: src/routes/campaigns/analytics/filters/TimeFilter.tsx:47 msgid "Custom" msgstr "" @@ -893,11 +891,11 @@ msgstr "Descartar Campanha" msgid "Dismissal rate" msgstr "Taxa de Dispensas" -#: src/routes/campaigns/analytics/metrics.ts:157 +#: src/routes/campaigns/analytics/metrics.ts:164 msgid "Dismissal Rate" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:149 +#: src/routes/campaigns/analytics/metrics.ts:156 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:65 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:174 msgid "Dismissals" @@ -934,7 +932,7 @@ msgstr "Não recebeu o e-mail? Verifique sua pasta de spam ou <0>tente novamente msgid "Download Report" msgstr "Baixar Relatório" -#: src/routes/campaigns/analytics/metrics.ts:141 +#: src/routes/campaigns/analytics/metrics.ts:148 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:46 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:172 msgid "Downvotes" @@ -1193,7 +1191,7 @@ msgstr "Entendo que o pagamento é necessário antes que as campanhas possam ser msgid "I would like to receive marketing emails about new features and promotions from Brave Ads" msgstr "Gostaria de receber e-mails sobre novos recursos e promoções do Brave Ads" -#: src/routes/campaigns/analytics/TabularData.tsx:79 +#: src/routes/campaigns/analytics/TabularData.tsx:78 msgid "Id" msgstr "" @@ -1222,7 +1220,6 @@ msgstr "Imagens" #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:46 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:30 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:154 -#: src/user/analytics/search/metrics.ts:38 #: src/user/campaignList/CampaignList.tsx:119 #: src/user/views/user/AdDetailTable.tsx:47 msgid "Impressions" @@ -1280,7 +1277,7 @@ msgstr "Sessão Inválida" msgid "Invalid Token" msgstr "Token Inválido" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:17 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:22 msgid "iOS" msgstr "" @@ -1292,7 +1289,7 @@ msgstr "não é" msgid "It is a modern <0>advertiser-first ad platform made to help brands reach new users. Brave Ads are discrete, unobtrusive first-party ads built directly into the browser and search engine, with familiar formats like push notifications and news-feed ads. Brave’s innovative on-device targeting respects a user’s desire for privacy while still delivering personalized ads based on their interests, which drives high ROI for advertisers." msgstr "" -#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:26 +#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:28 msgid "It is scheduled to start {campaignStartFromNow}." msgstr "" @@ -1312,6 +1309,26 @@ msgstr "Pares de chaves" msgid "Language acknowledgement is required" msgstr "É necessário confirmar o idioma" +#: src/routes/campaigns/analytics/filters/time-filters.ts:52 +#~ msgid "Last 14 days" +#~ msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:46 +msgid "Last 30 days" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:34 +msgid "Last 7 days" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:52 +msgid "Last month" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:46 +#~ msgid "Last week (Sun - Sat)" +#~ msgstr "" + #: src/basic-attention-token/BasicAttentionTokenLandingPage.tsx:86 #~ msgid "Launch a Campaign" #~ msgstr "Lançar uma Campanha" @@ -1353,7 +1370,7 @@ msgstr "O orçamento vitalício deve ser maior para o intervalo de datas forneci #~ msgid "Limited time only. Available to new advertisers, and those who ran campaigns before September 30, 2023." #~ msgstr "Por tempo limitado. Disponível para novos anunciantes e aqueles que executaram campanhas antes de 30 de setembro de 2023." -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:18 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:23 msgid "Linux" msgstr "" @@ -1380,7 +1397,7 @@ msgstr "Faça login em sua conta do Brave Ads" msgid "Logging in" msgstr "Fazendo login" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:19 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:24 msgid "macOS" msgstr "" @@ -1422,11 +1439,10 @@ msgstr "mais" #: src/components/Creatives/CreativeCampaigns.tsx:45 #: src/components/Creatives/CreativeList.tsx:47 -#: src/routes/campaigns/analytics/TabularData.tsx:84 +#: src/routes/campaigns/analytics/TabularData.tsx:83 #: src/user/ads/InlineContentAd.tsx:65 #: src/user/ads/NotificationAd.tsx:51 #: src/user/adSet/AdSetList.tsx:92 -#: src/user/analytics/search/AdSetBreakdown.tsx:64 #: src/user/views/adsManager/views/advanced/components/review/components/AdSetReview.tsx:41 #: src/user/views/adsManager/views/advanced/components/review/components/CampaignReview.tsx:30 msgid "Name" @@ -1460,7 +1476,6 @@ msgstr "Novas campanhas geralmente demoram até 48 horas para serem revisadas du msgid "New Keypair" msgstr "Novo Par de Chaves" -#: src/user/campaignList/CampaignList.tsx:263 #: src/user/library/index.ts:255 #: src/util/campaign.ts:7 msgid "New tab takeover" @@ -1589,7 +1604,7 @@ msgstr "ou faça login usando um link seguro" msgid "Organization" msgstr "Organização" -#: src/routes/campaigns/analytics/breakdowns.tsx:131 +#: src/routes/campaigns/analytics/breakdowns.tsx:132 #: src/user/analytics/analyticsOverview/reports/os/components/OsPieChart.tsx:21 msgid "OS" msgstr "SO (Sistema Operacional)" @@ -1645,7 +1660,7 @@ msgstr "Relatório de Desempenho" msgid "Platforms" msgstr "Plataformas" -#: src/user/views/user/reports/ConsultAccountManager.tsx:10 +#: src/user/views/user/reports/ConsultAccountManager.tsx:13 msgid "Please ask your Account Manager for reports on campaigns of this format." msgstr "Por favor, consulte o seu Gerente de Conta para obter relatórios sobre campanhas deste tipo." @@ -1965,7 +1980,7 @@ msgstr "" msgid "Site visit rate" msgstr "Taxa de visita ao site" -#: src/routes/campaigns/analytics/metrics.ts:110 +#: src/routes/campaigns/analytics/metrics.ts:115 msgid "Site Visit Rate" msgstr "" @@ -1993,12 +2008,11 @@ msgstr "Pular pesquisa e continuar" msgid "Something went wrong." msgstr "Algo deu errado." -#: src/routes/campaigns/analytics/metrics.ts:118 +#: src/routes/campaigns/analytics/metrics.ts:124 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:48 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:88 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:168 #: src/user/analytics/analyticsOverview/reports/os/components/OsPieChart.tsx:40 -#: src/user/analytics/search/metrics.ts:63 #: src/user/campaignList/CampaignList.tsx:106 #: src/user/views/user/AdDetailTable.tsx:30 msgid "Spend" @@ -2050,7 +2064,6 @@ msgstr "Estado" #: src/components/Creatives/CreativeCampaigns.tsx:48 #: src/user/adSet/AdSetList.tsx:98 -#: src/user/analytics/search/AdSetBreakdown.tsx:73 #: src/user/campaignList/CampaignList.tsx:86 msgid "Status" msgstr "Status" @@ -2144,7 +2157,6 @@ msgid "The following query string parameters will be added to your landing page msgstr "" #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:41 -#: src/user/analytics/search/metrics.ts:56 msgid "The rate at which users clicked in correlation to their impressions" msgstr "A taxa de cliques dos usuários em relação às suas visualizações" @@ -2176,6 +2188,18 @@ msgstr "Este é um anúncio de exibição de notícias, ele será integrado ao f msgid "This key is unique to you, make sure to safely store it and avoid sharing it with others to prevent unauthorized access." msgstr "Esta chave é exclusiva para você. Guarde-a com segurança e evite compartilhá-la com outras pessoas para evitar acessos não autorizados." +#: src/routes/campaigns/analytics/filters/time-filters.ts:40 +msgid "This month" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:28 +msgid "This week" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:34 +#~ msgid "This week (Sun - Today)" +#~ msgstr "" + #: src/components/TimeZonePicker/index.tsx:29 #: src/components/TimeZonePicker/index.tsx:36 msgid "Time Zone" @@ -2193,7 +2217,7 @@ msgstr "Título" msgid "Title Preview" msgstr "Visualização do Título" -#: src/components/Date/DateRangePicker.tsx:43 +#: src/components/Date/DateRangePicker.tsx:44 msgid "To" msgstr "Para" @@ -2201,6 +2225,10 @@ msgstr "Para" msgid "To protect user’s privacy, verified ad conversion data is encrypted so that the identities of converted users remain anonymous to Brave. You can decrypt the conversion data in the CSV file by providing your private key here. If no key is provided, you will receive the encrypted conversion data. Your private key will never be sent to or stored on any Brave servers." msgstr "Para proteger a privacidade do usuário, os dados de conversão do anúncio verificado são criptografados, garantindo que as identidades dos usuários convertidos permaneçam anônimas para o Brave. Você pode descriptografar os dados de conversão no arquivo CSV fornecendo sua chave privada aqui. Se nenhuma chave for fornecida, você receberá os dados de conversão criptografados. Sua chave privada nunca será enviada ou armazenada em nenhum servidor do Brave." +#: src/routes/campaigns/analytics/filters/time-filters.ts:22 +msgid "Today" +msgstr "" + #: src/components/Collapse/ChangeReportingAlert.tsx:48 #~ msgid "Toggle between various metrics using the switches provided. For deeper insights, click the buttons to access various breakdowns. If you prefer the previous view, simply click the \"revert\" button to switch back." #~ msgstr "" @@ -2227,7 +2255,6 @@ msgstr "" #: src/components/Conversion/ConversionFields.tsx:17 #: src/user/adSet/AdSetList.tsx:111 -#: src/user/analytics/search/AdSetBreakdown.tsx:92 msgid "Type" msgstr "Tipo" @@ -2267,7 +2294,7 @@ msgstr "Não foi possível obter informações do perfil" msgid "Unable to load ad" msgstr "Não foi possível carregar o anúncio" -#: src/routes/campaigns/analytics/CampaignAnalytics.tsx:64 +#: src/routes/campaigns/analytics/CampaignAnalytics.tsx:52 msgid "Unable to load reporting details for campaign: {0}" msgstr "" @@ -2293,7 +2320,6 @@ msgid "Unable to retrieve images" msgstr "Não foi possível recuperar as imagens" #: src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx:46 -#: src/user/views/user/reports/SearchCampaignReportView.tsx:53 msgid "Unable to retrieve reporting data for this Campaign." msgstr "Não foi possível recuperar os dados de relatório para esta Campanha." @@ -2359,7 +2385,7 @@ msgstr "As imagens enviadas podem ser compartilhadas entre diferentes conjuntos msgid "Uploading file..." msgstr "Enviando arquivo..." -#: src/routes/campaigns/analytics/metrics.ts:133 +#: src/routes/campaigns/analytics/metrics.ts:140 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:45 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:170 msgid "Upvotes" @@ -2407,7 +2433,7 @@ msgstr "Relatório de Conversões Verificadas" msgid "View-through conversions" msgstr "Conversões por visualização" -#: src/routes/campaigns/analytics/metrics.ts:86 +#: src/routes/campaigns/analytics/metrics.ts:88 msgid "View-through Conversions" msgstr "" @@ -2459,7 +2485,7 @@ msgstr "Enquanto procurava alternativas para o Google Ads" msgid "Why use Brave Ads?" msgstr "" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:20 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:25 msgid "Windows" msgstr "" @@ -2471,6 +2497,10 @@ msgstr "E-mail corporativo" msgid "Yes" msgstr "Sim" +#: src/routes/campaigns/analytics/filters/time-filters.ts:28 +#~ msgid "Yesterday" +#~ msgstr "" + #: src/user/settings/NewKeyPairModal.tsx:134 msgid "You are attempting to create a new keypair, this will replace any of your organization’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." msgstr "Você está tentando criar um novo par de chaves, isso substituirá qualquer um dos pares de chaves existentes da sua organização. Por favor, note que pares de chaves anteriores não podem ser recuperados ou usados uma vez que forem substituídos." diff --git a/src/locales/test.po b/src/locales/test.po index 03c49287..b5680a9c 100644 --- a/src/locales/test.po +++ b/src/locales/test.po @@ -90,7 +90,7 @@ msgid "Activate" msgstr "" #: src/components/Creatives/NewsPreview.tsx:90 -#: src/routes/campaigns/analytics/breakdowns.tsx:144 +#: src/routes/campaigns/analytics/breakdowns.tsx:145 msgid "Ad" msgstr "" @@ -156,7 +156,6 @@ msgid "Ad sets" msgstr "" #: src/user/views/adsManager/views/advanced/components/form/components/BaseForm.tsx:30 -#: src/user/views/user/reports/SearchCampaignReportView.tsx:127 msgid "Ad Sets" msgstr "" @@ -197,7 +196,7 @@ msgstr "" msgid "Additional Details" msgstr "" -#: src/user/views/user/reports/OriginalCampaignReportView.tsx:92 +#: src/user/views/user/reports/OriginalCampaignReportView.tsx:94 msgid "Additional Report: OS Performance" msgstr "" @@ -232,8 +231,7 @@ msgstr "" #~ msgid "advertising made simple" #~ msgstr "" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:15 -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:28 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:20 msgid "All OS" msgstr "" @@ -241,6 +239,10 @@ msgstr "" #~ msgid "All targeting and reporting is strictly designed to be anonymous and privacy-preserving." #~ msgstr "" +#: src/routes/campaigns/analytics/filters/time-filters.ts:15 +msgid "All time" +msgstr "" + #: src/auth/views/LandingPage.tsx:72 #~ msgid "Already have an account?" #~ msgstr "" @@ -253,7 +255,7 @@ msgstr "" msgid "An error has occurred while processing your request." msgstr "" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:16 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:21 msgid "Android" msgstr "" @@ -471,7 +473,7 @@ msgstr "" msgid "Campaign Format is required" msgstr "" -#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:24 +#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:26 msgid "Campaign has not started yet" msgstr "" @@ -554,7 +556,6 @@ msgid "Click on the secure login link in the email to access your Brave Ads acco msgstr "" #: src/routes/campaigns/analytics/metrics.ts:62 -#: src/user/analytics/search/metrics.ts:54 msgid "Click Through Rate" msgstr "" @@ -571,7 +572,7 @@ msgstr "" msgid "Click-through conversions" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:94 +#: src/routes/campaigns/analytics/metrics.ts:97 msgid "Click-through Conversions" msgstr "" @@ -583,7 +584,6 @@ msgstr "" #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:48 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:35 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:164 -#: src/user/analytics/search/metrics.ts:46 #: src/user/campaignList/CampaignList.tsx:133 #: src/user/views/user/AdDetailTable.tsx:59 msgid "Clicks" @@ -662,7 +662,7 @@ msgstr "" msgid "Conversion rate" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:102 +#: src/routes/campaigns/analytics/metrics.ts:106 msgid "Conversion Rate" msgstr "" @@ -698,7 +698,7 @@ msgstr "" msgid "Conversion URL required." msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:78 +#: src/routes/campaigns/analytics/metrics.ts:79 #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:47 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:60 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:50 @@ -710,7 +710,7 @@ msgstr "" msgid "Copy this and keep this safe!" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:125 +#: src/routes/campaigns/analytics/metrics.ts:131 msgid "Cost per Acquisition" msgstr "" @@ -731,7 +731,6 @@ msgid "Counted if the user clicks an ad and spends at least 10 seconds on the ad msgstr "" #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:36 -#: src/user/analytics/search/metrics.ts:47 msgid "Counted when a user clicks on the ad. Does not include clicks to dismiss" msgstr "" @@ -752,7 +751,6 @@ msgid "Counted when a user reaches a designated conversion landing page followin msgstr "" #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:31 -#: src/user/analytics/search/metrics.ts:39 msgid "Counted when an ad is displayed on screen for a minimum of one second" msgstr "" @@ -769,7 +767,7 @@ msgstr "" msgid "Country Targeting" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:126 +#: src/routes/campaigns/analytics/metrics.ts:132 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:72 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:89 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:156 @@ -819,11 +817,11 @@ msgstr "" #: src/routes/campaigns/analytics/metrics.ts:63 #: src/user/analytics/analyticsOverview/components/BaseBarChart.tsx:58 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:40 -#: src/user/analytics/search/metrics.ts:55 msgid "CTR" msgstr "" -#: src/routes/campaigns/analytics/filters/TimeFilter.tsx:34 +#: src/routes/campaigns/analytics/filters/time-filters.ts:59 +#: src/routes/campaigns/analytics/filters/TimeFilter.tsx:47 msgid "Custom" msgstr "" @@ -893,11 +891,11 @@ msgstr "" msgid "Dismissal rate" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:157 +#: src/routes/campaigns/analytics/metrics.ts:164 msgid "Dismissal Rate" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:149 +#: src/routes/campaigns/analytics/metrics.ts:156 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:65 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:174 msgid "Dismissals" @@ -935,7 +933,7 @@ msgstr "" msgid "Download Report" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:141 +#: src/routes/campaigns/analytics/metrics.ts:148 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:46 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:172 msgid "Downvotes" @@ -1194,7 +1192,7 @@ msgstr "" msgid "I would like to receive marketing emails about new features and promotions from Brave Ads" msgstr "" -#: src/routes/campaigns/analytics/TabularData.tsx:79 +#: src/routes/campaigns/analytics/TabularData.tsx:78 msgid "Id" msgstr "" @@ -1223,7 +1221,6 @@ msgstr "" #: src/user/analytics/analyticsOverview/components/BasePieChart.tsx:46 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:30 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:154 -#: src/user/analytics/search/metrics.ts:38 #: src/user/campaignList/CampaignList.tsx:119 #: src/user/views/user/AdDetailTable.tsx:47 msgid "Impressions" @@ -1281,7 +1278,7 @@ msgstr "" msgid "Invalid Token" msgstr "" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:17 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:22 msgid "iOS" msgstr "" @@ -1293,7 +1290,7 @@ msgstr "" msgid "It is a modern <0>advertiser-first ad platform made to help brands reach new users. Brave Ads are discrete, unobtrusive first-party ads built directly into the browser and search engine, with familiar formats like push notifications and news-feed ads. Brave’s innovative on-device targeting respects a user’s desire for privacy while still delivering personalized ads based on their interests, which drives high ROI for advertisers." msgstr "" -#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:26 +#: src/routes/campaigns/analytics/AnalyticsOverview.tsx:28 msgid "It is scheduled to start {campaignStartFromNow}." msgstr "" @@ -1313,6 +1310,26 @@ msgstr "" msgid "Language acknowledgement is required" msgstr "" +#: src/routes/campaigns/analytics/filters/time-filters.ts:52 +#~ msgid "Last 14 days" +#~ msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:46 +msgid "Last 30 days" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:34 +msgid "Last 7 days" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:52 +msgid "Last month" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:46 +#~ msgid "Last week (Sun - Sat)" +#~ msgstr "" + #: src/basic-attention-token/BasicAttentionTokenLandingPage.tsx:86 #~ msgid "Launch a Campaign" #~ msgstr "" @@ -1354,7 +1371,7 @@ msgstr "" #~ msgid "Limited time only. Available to new advertisers, and those who ran campaigns before September 30, 2023." #~ msgstr "" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:18 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:23 msgid "Linux" msgstr "" @@ -1381,7 +1398,7 @@ msgstr "" msgid "Logging in" msgstr "" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:19 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:24 msgid "macOS" msgstr "" @@ -1423,11 +1440,10 @@ msgstr "" #: src/components/Creatives/CreativeCampaigns.tsx:45 #: src/components/Creatives/CreativeList.tsx:47 -#: src/routes/campaigns/analytics/TabularData.tsx:84 +#: src/routes/campaigns/analytics/TabularData.tsx:83 #: src/user/ads/InlineContentAd.tsx:65 #: src/user/ads/NotificationAd.tsx:51 #: src/user/adSet/AdSetList.tsx:92 -#: src/user/analytics/search/AdSetBreakdown.tsx:64 #: src/user/views/adsManager/views/advanced/components/review/components/AdSetReview.tsx:41 #: src/user/views/adsManager/views/advanced/components/review/components/CampaignReview.tsx:30 msgid "Name" @@ -1461,7 +1477,6 @@ msgstr "" msgid "New Keypair" msgstr "" -#: src/user/campaignList/CampaignList.tsx:263 #: src/user/library/index.ts:255 #: src/util/campaign.ts:7 msgid "New tab takeover" @@ -1590,7 +1605,7 @@ msgstr "" msgid "Organization" msgstr "" -#: src/routes/campaigns/analytics/breakdowns.tsx:131 +#: src/routes/campaigns/analytics/breakdowns.tsx:132 #: src/user/analytics/analyticsOverview/reports/os/components/OsPieChart.tsx:21 msgid "OS" msgstr "" @@ -1646,7 +1661,7 @@ msgstr "" msgid "Platforms" msgstr "" -#: src/user/views/user/reports/ConsultAccountManager.tsx:10 +#: src/user/views/user/reports/ConsultAccountManager.tsx:13 msgid "Please ask your Account Manager for reports on campaigns of this format." msgstr "" @@ -1966,7 +1981,7 @@ msgstr "" msgid "Site visit rate" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:110 +#: src/routes/campaigns/analytics/metrics.ts:115 msgid "Site Visit Rate" msgstr "" @@ -1994,12 +2009,11 @@ msgstr "" msgid "Something went wrong." msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:118 +#: src/routes/campaigns/analytics/metrics.ts:124 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:48 #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:88 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:168 #: src/user/analytics/analyticsOverview/reports/os/components/OsPieChart.tsx:40 -#: src/user/analytics/search/metrics.ts:63 #: src/user/campaignList/CampaignList.tsx:106 #: src/user/views/user/AdDetailTable.tsx:30 msgid "Spend" @@ -2051,7 +2065,6 @@ msgstr "" #: src/components/Creatives/CreativeCampaigns.tsx:48 #: src/user/adSet/AdSetList.tsx:98 -#: src/user/analytics/search/AdSetBreakdown.tsx:73 #: src/user/campaignList/CampaignList.tsx:86 msgid "Status" msgstr "" @@ -2145,7 +2158,6 @@ msgid "The following query string parameters will be added to your landing page msgstr "" #: src/user/analytics/analyticsOverview/components/MetricSelect.tsx:41 -#: src/user/analytics/search/metrics.ts:56 msgid "The rate at which users clicked in correlation to their impressions" msgstr "" @@ -2177,6 +2189,18 @@ msgstr "" msgid "This key is unique to you, make sure to safely store it and avoid sharing it with others to prevent unauthorized access." msgstr "" +#: src/routes/campaigns/analytics/filters/time-filters.ts:40 +msgid "This month" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:28 +msgid "This week" +msgstr "" + +#: src/routes/campaigns/analytics/filters/time-filters.ts:34 +#~ msgid "This week (Sun - Today)" +#~ msgstr "" + #: src/components/TimeZonePicker/index.tsx:29 #: src/components/TimeZonePicker/index.tsx:36 msgid "Time Zone" @@ -2194,7 +2218,7 @@ msgstr "" msgid "Title Preview" msgstr "" -#: src/components/Date/DateRangePicker.tsx:43 +#: src/components/Date/DateRangePicker.tsx:44 msgid "To" msgstr "" @@ -2202,6 +2226,10 @@ msgstr "" msgid "To protect user’s privacy, verified ad conversion data is encrypted so that the identities of converted users remain anonymous to Brave. You can decrypt the conversion data in the CSV file by providing your private key here. If no key is provided, you will receive the encrypted conversion data. Your private key will never be sent to or stored on any Brave servers." msgstr "" +#: src/routes/campaigns/analytics/filters/time-filters.ts:22 +msgid "Today" +msgstr "" + #: src/components/Collapse/ChangeReportingAlert.tsx:48 #~ msgid "Toggle between various metrics using the switches provided. For deeper insights, click the buttons to access various breakdowns. If you prefer the previous view, simply click the \"revert\" button to switch back." #~ msgstr "" @@ -2228,7 +2256,6 @@ msgstr "" #: src/components/Conversion/ConversionFields.tsx:17 #: src/user/adSet/AdSetList.tsx:111 -#: src/user/analytics/search/AdSetBreakdown.tsx:92 msgid "Type" msgstr "" @@ -2268,7 +2295,7 @@ msgstr "" msgid "Unable to load ad" msgstr "" -#: src/routes/campaigns/analytics/CampaignAnalytics.tsx:64 +#: src/routes/campaigns/analytics/CampaignAnalytics.tsx:52 msgid "Unable to load reporting details for campaign: {0}" msgstr "" @@ -2294,7 +2321,6 @@ msgid "Unable to retrieve images" msgstr "" #: src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx:46 -#: src/user/views/user/reports/SearchCampaignReportView.tsx:53 msgid "Unable to retrieve reporting data for this Campaign." msgstr "" @@ -2360,7 +2386,7 @@ msgstr "" msgid "Uploading file..." msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:133 +#: src/routes/campaigns/analytics/metrics.ts:140 #: src/user/analytics/analyticsOverview/components/LiveFeed.tsx:45 #: src/user/analytics/analyticsOverview/lib/overview.library.ts:170 msgid "Upvotes" @@ -2408,7 +2434,7 @@ msgstr "" msgid "View-through conversions" msgstr "" -#: src/routes/campaigns/analytics/metrics.ts:86 +#: src/routes/campaigns/analytics/metrics.ts:88 msgid "View-through Conversions" msgstr "" @@ -2460,7 +2486,7 @@ msgstr "" msgid "Why use Brave Ads?" msgstr "" -#: src/routes/campaigns/analytics/filters/OsFilter.tsx:20 +#: src/routes/campaigns/analytics/filters/OsFilter.tsx:25 msgid "Windows" msgstr "" @@ -2472,6 +2498,10 @@ msgstr "" msgid "Yes" msgstr "" +#: src/routes/campaigns/analytics/filters/time-filters.ts:28 +#~ msgid "Yesterday" +#~ msgstr "" + #: src/user/settings/NewKeyPairModal.tsx:134 msgid "You are attempting to create a new keypair, this will replace any of your organization’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." msgstr "" diff --git a/src/routes/campaigns/analytics/CampaignAnalytics.tsx b/src/routes/campaigns/analytics/CampaignAnalytics.tsx index 7eb79e69..8125b435 100644 --- a/src/routes/campaigns/analytics/CampaignAnalytics.tsx +++ b/src/routes/campaigns/analytics/CampaignAnalytics.tsx @@ -2,12 +2,10 @@ import { graphql } from "@/graphql-client"; import { useQuery } from "@apollo/client"; import { MetricsList } from "./MetricsList"; import { Box, Card, Stack, Typography } from "@mui/material"; -import { useMetricSelection } from "./hooks"; -import { useState } from "react"; +import { useCampaignAnalyticFilter } from "./hooks"; import { FilterBar } from "./filters/FilterBar"; import { ResultsPane } from "./ResultsPane"; -import { CampaignFormat, PerformanceFilter } from "@/graphql-client/graphql"; -import dayjs from "dayjs"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { CampaignOverviewProps } from "@/util/CampaignIdProps"; import { ErrorDetail } from "@/components/Error/ErrorDetail"; import { msg } from "@lingui/macro"; @@ -38,12 +36,7 @@ export function CampaignAnalytics({ campaignOverview }: CampaignOverviewProps) { (c) => c.extractExternalId, ); - const { forceDefaultMetricSelection: forceDefaultSelection } = - useMetricSelection(); - const [isFirstLoad, setIsFirstLoad] = useState(true); - const [filter, setFilter] = useState({ - campaignIds: [campaignOverview.id], - }); + const { filter, setFilter } = useCampaignAnalyticFilter({ campaignOverview }); const { data, error } = useQuery(Analytics_Load, { pollInterval: 10 * 60 * 1000, @@ -52,11 +45,6 @@ export function CampaignAnalytics({ campaignOverview }: CampaignOverviewProps) { }, }); - if (isFirstLoad) { - setIsFirstLoad(false); - forceDefaultSelection(); - } - if (error) { return ( diff --git a/src/routes/campaigns/analytics/MetricSelector.tsx b/src/routes/campaigns/analytics/MetricSelector.tsx index e9bf98c6..e1e88c8c 100644 --- a/src/routes/campaigns/analytics/MetricSelector.tsx +++ b/src/routes/campaigns/analytics/MetricSelector.tsx @@ -16,9 +16,15 @@ export function MetricSelector({ dataSource, isLast, }: Props) { - const { isSelected, toggleMetric } = useMetricSelection(); + const { isSelected, toggleMetric, selectedMetrics, forceDefaultSelection } = + useMetricSelection(); const value = dataSource ? metricDefinition.getValue(dataSource) : undefined; + if (selectedMetrics.length === 0) { + forceDefaultSelection(); + return null; + } + return ( toggleMetric(metricDefinition)} color="default" sx={{ [`& .${switchClasses.checked}`]: { diff --git a/src/routes/campaigns/analytics/ResultsPane.tsx b/src/routes/campaigns/analytics/ResultsPane.tsx index 4ea30cfe..11a52e44 100644 --- a/src/routes/campaigns/analytics/ResultsPane.tsx +++ b/src/routes/campaigns/analytics/ResultsPane.tsx @@ -23,7 +23,12 @@ export function ResultsPane({ if (!selected) return null; if (selected.id === "day") { - return ; + return ( + + ); } if (selected.id === "hour") { diff --git a/src/routes/campaigns/analytics/TabularData.tsx b/src/routes/campaigns/analytics/TabularData.tsx index f3394545..b5ba7b4b 100644 --- a/src/routes/campaigns/analytics/TabularData.tsx +++ b/src/routes/campaigns/analytics/TabularData.tsx @@ -33,7 +33,6 @@ interface Props extends CampaignOverviewProps { export function TabularData({ campaignOverview, breakdown, filters }: Props) { const { _: lingui } = useLingui(); - console.log(breakdown); if (!isBreakdownWithQuery(breakdown)) throw new Error("opps"); const { isSelected } = useMetricSelection(); diff --git a/src/routes/campaigns/analytics/filters/BreakdownSelector.tsx b/src/routes/campaigns/analytics/filters/BreakdownSelector.tsx index 9b5726b9..e85b5b2b 100644 --- a/src/routes/campaigns/analytics/filters/BreakdownSelector.tsx +++ b/src/routes/campaigns/analytics/filters/BreakdownSelector.tsx @@ -36,8 +36,10 @@ export function VerticalBreakdown() { }} sx={{ alignItems: "left" }} > - {breakdowns.map((b) => ( + {breakdowns.map((b, i) => ( diff --git a/src/routes/campaigns/analytics/filters/FilterBar.tsx b/src/routes/campaigns/analytics/filters/FilterBar.tsx index ceaaff4b..51e14c5e 100644 --- a/src/routes/campaigns/analytics/filters/FilterBar.tsx +++ b/src/routes/campaigns/analytics/filters/FilterBar.tsx @@ -2,7 +2,6 @@ import { Box } from "@mui/material"; import { TimeFilter } from "./TimeFilter"; import { PerformanceFilter } from "@/graphql-client/graphql"; import { Dispatch } from "react"; -import { Dayjs } from "dayjs"; import { OsFilter } from "./OsFilter"; import { ReportMenu } from "@/user/reporting/ReportMenu"; @@ -11,8 +10,6 @@ export interface FilterProps { onChange: Dispatch; campaignId: string; hasVerifiedConversions: boolean; - minDate?: Dayjs; - maxDate?: Dayjs; } export function FilterBar(props: FilterProps) { @@ -24,6 +21,7 @@ export function FilterBar(props: FilterProps) { flexDirection="row" paddingX={1} gap={1} + height={50} > diff --git a/src/routes/campaigns/analytics/filters/OsFilter.tsx b/src/routes/campaigns/analytics/filters/OsFilter.tsx index 9003e799..f48f82ab 100644 --- a/src/routes/campaigns/analytics/filters/OsFilter.tsx +++ b/src/routes/campaigns/analytics/filters/OsFilter.tsx @@ -1,9 +1,10 @@ import { FilterProps } from "./FilterBar"; import { FilterButton } from "./FilterButton"; -import { applySelection } from "./multi-filters"; import { useLingui } from "@lingui/react"; import { msg } from "@lingui/macro"; -import { MessageDescriptor } from "@lingui/core"; +import { MessageDescriptor, i18n } from "@lingui/core"; +import { useOsFilterParams } from "@/routes/campaigns/analytics/hooks"; +import { applySelection } from "@/routes/campaigns/analytics/filters/multi-filters"; interface OsFilterEntry { label: MessageDescriptor; @@ -11,7 +12,11 @@ interface OsFilterEntry { divider?: boolean; } -const MENU_ITEMS: OsFilterEntry[] = [ +export interface LocalizedOsFilterEntry extends Omit { + label: string; +} + +const OS_FILTER_ITEMS: OsFilterEntry[] = [ { id: "all", label: msg`All OS`, divider: true }, { id: "android", label: msg`Android` }, { id: "ios", label: msg`iOS` }, @@ -20,33 +25,61 @@ const MENU_ITEMS: OsFilterEntry[] = [ { id: "windows", label: msg`Windows` }, ]; +const osLookup = new Map( + OS_FILTER_ITEMS.map((m) => [m.id, m]), +); + +export function getOsFilter( + id: string | null | undefined, +): LocalizedOsFilterEntry | undefined { + const item = osLookup.get(id ?? ""); + return item ? { id: item.id, label: i18n._(item.label) } : undefined; +} + export function OsFilter(props: FilterProps) { const { _ } = useLingui(); - const filteredOs = props.filters.os; + const { + isSelected, + forceDefaultSelection, + selectedMetrics, + toggleMetric, + removeMetric, + } = useOsFilterParams(); - const buttonLabel = !filteredOs - ? _(msg`All OS`) - : filteredOs.length === 1 - ? filteredOs[0] - : `${filteredOs.length} OS`; + if (selectedMetrics.length === 0) { + forceDefaultSelection(); + return null; + } return ( { + const isAll = item.id === "all"; + if (isAll) { + forceDefaultSelection(true); + } else { + removeMetric("all"); + toggleMetric(item); + } + const selection = applySelection(props.filters.os, item.id); props.onChange({ ...props.filters, - os: applySelection(props.filters.os, item.id), + os: !isAll && selection?.length !== 0 ? selection : undefined, }); }} - menuItems={MENU_ITEMS.map((item) => ({ ...item, label: _(item.label) }))} - itemSelectionState={(item) => - item.id === "all" - ? "no-selection-state" - : filteredOs && filteredOs.includes(item.id) - ? "selected" - : "unselected" - } + menuItems={OS_FILTER_ITEMS.map((item) => ({ + ...item, + label: _(item.label), + }))} + itemSelectionState={(item) => { + if (item.id === "all") return "no-selection-state"; + return isSelected(item) ? "selected" : "unselected"; + }} /> ); } diff --git a/src/routes/campaigns/analytics/filters/TimeFilter.tsx b/src/routes/campaigns/analytics/filters/TimeFilter.tsx index 190fe32a..7e0b9d61 100644 --- a/src/routes/campaigns/analytics/filters/TimeFilter.tsx +++ b/src/routes/campaigns/analytics/filters/TimeFilter.tsx @@ -1,46 +1,61 @@ -import dayjs from "dayjs"; import { FilterProps } from "./FilterBar"; import { FilterButton } from "./FilterButton"; import { buildTimeFilters } from "./time-filters"; import { msg } from "@lingui/macro"; import { useLingui } from "@lingui/react"; +import { useTimeFilterParams } from "@/routes/campaigns/analytics/hooks"; +import dayjs from "dayjs"; +import { DateRangePicker } from "@/components/Date/DateRangePicker"; +import { Box } from "@mui/material"; +import { useStickyState } from "@/hooks/useStickyState"; export function TimeFilter(props: FilterProps) { const { _ } = useLingui(); - const menuItems = buildTimeFilters(dayjs.utc(), props.minDate, props.maxDate); - - const matches = ( - a: dayjs.Dayjs | undefined, - b: string | undefined | null, - ): boolean => { - if (!a && !b) { - return true; - } - - if (!a || !b) { - return false; - } + const [, setCustom] = useStickyState( + "custom-date", + undefined, + ); + const menuItems = buildTimeFilters(); - return a.isSame(b); - }; + const { selected, setSelected, forceDefaultBreakdownSelection } = + useTimeFilterParams(); - const selected = menuItems.find( - (mi) => - matches(mi.from, props.filters.from) && matches(mi.to, props.filters.to), - ); + if (!selected) { + forceDefaultBreakdownSelection(); + return null; + } return ( - { - props.onChange({ - ...props.filters, - from: item.from?.toISOString(), - to: item.to?.toISOString(), - }); - }} - menuItems={menuItems} - /> + + {selected.id === "custom" && ( + { + const filter = { to: props.filters.to, from: from?.toISOString() }; + setCustom(JSON.stringify(filter)); + props.onChange({ ...props.filters, ...filter }); + }} + onToChange={(to) => { + const filter = { to: to?.toISOString(), from: props.filters.from }; + setCustom(JSON.stringify(filter)); + props.onChange({ ...props.filters, ...filter }); + }} + /> + )} + { + setSelected(item); + props.onChange({ + ...props.filters, + from: item.from?.toISOString(), + to: item.to?.toISOString(), + }); + }} + menuItems={menuItems} + /> + ); } diff --git a/src/routes/campaigns/analytics/filters/multi-filters.ts b/src/routes/campaigns/analytics/filters/multi-filters.ts index 4f3057b4..bb7c8b01 100644 --- a/src/routes/campaigns/analytics/filters/multi-filters.ts +++ b/src/routes/campaigns/analytics/filters/multi-filters.ts @@ -10,6 +10,10 @@ export function applySelection( return [id]; } + if (filters.length === 0) { + return undefined; + } + if (filters.includes(id)) { return filters.filter((f) => f !== id); } diff --git a/src/routes/campaigns/analytics/filters/time-filters.test.ts b/src/routes/campaigns/analytics/filters/time-filters.test.ts deleted file mode 100644 index 22002e29..00000000 --- a/src/routes/campaigns/analytics/filters/time-filters.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import dayjs from "dayjs"; -import { buildTimeFilters } from "./time-filters"; - -it("should return the last few months if no min or max provided", () => { - expect(buildTimeFilters(dayjs("2024-02-12Z"))).toMatchInlineSnapshot(` - [ - { - "divider": true, - "from": undefined, - "id": "all-time", - "label": "All time", - "to": undefined, - }, - { - "from": "2024-02-01T00:00:00.000Z", - "id": "2024-02", - "label": "February 2024", - "to": "2024-02-29T23:59:59.999Z", - }, - { - "from": "2024-01-01T00:00:00.000Z", - "id": "2024-01", - "label": "January 2024", - "to": "2024-01-31T23:59:59.999Z", - }, - { - "from": "2023-12-01T00:00:00.000Z", - "id": "2023-12", - "label": "December 2023", - "to": "2023-12-31T23:59:59.999Z", - }, - { - "from": "2023-11-01T00:00:00.000Z", - "id": "2023-11", - "label": "November 2023", - "to": "2023-11-30T23:59:59.999Z", - }, - ] - `); -}); - -it("should return the months between max and min if provided", () => { - expect( - buildTimeFilters( - dayjs("2024-02-12Z").utc(), - dayjs("2023-08-01Z").utc(), - dayjs("2024-05-01Z").utc(), - ).map((f) => f.label), - ).toEqual([ - "All time", - "February 2024", - "January 2024", - "December 2023", - "November 2023", - "October 2023", - "September 2023", - "August 2023", - - // but not the future months! - ]); -}); diff --git a/src/routes/campaigns/analytics/filters/time-filters.ts b/src/routes/campaigns/analytics/filters/time-filters.ts index 28c67143..b77f16d8 100644 --- a/src/routes/campaigns/analytics/filters/time-filters.ts +++ b/src/routes/campaigns/analytics/filters/time-filters.ts @@ -1,47 +1,64 @@ -import dayjs, { Dayjs } from "dayjs"; +import dayjs from "dayjs"; +import { t } from "@lingui/macro"; -interface TimeFilterEntry { +export interface TimeFilterEntry { label: string; id: string; - from: Dayjs | undefined; - to: Dayjs | undefined; + from: dayjs.Dayjs | undefined; + to: dayjs.Dayjs | undefined; divider?: boolean; } -export function buildTimeFilters( - baseDate: Dayjs = dayjs.utc(), - minDate: Dayjs = baseDate.subtract(3, "month"), - maxDate: Dayjs = baseDate, -): TimeFilterEntry[] { - const buildFilterForMonth = (dateInMonth: Dayjs) => ({ - label: dateInMonth.format("MMMM YYYY"), - id: dateInMonth.format("YYYY-MM"), - from: dateInMonth.startOf("month"), - to: dateInMonth.endOf("month"), - }); - - // build the per-month entries from minDate to maxDate - let currentMonthFilter = minDate; - - // never count beyond the "baseDate" (usually "now" in the UI context) - const actualMaxDate = dayjs.min(maxDate, baseDate); - - const monthsFilters = []; - while (currentMonthFilter.startOf("month").isBefore(actualMaxDate)) { - monthsFilters.push(buildFilterForMonth(currentMonthFilter)); - currentMonthFilter = currentMonthFilter.add(1, "month"); - } - +export function buildTimeFilters(): TimeFilterEntry[] { return [ { - // eslint-disable-next-line lingui/no-unlocalized-strings - label: "All time", + label: t`All time`, id: "all-time", divider: true, from: undefined, to: undefined, }, - // TODO: dayjs has a separate localization process, should use it but address in a separate PR - ...monthsFilters.reverse(), + { + label: t`Today`, + id: "today", + from: dayjs().utc().startOf("day"), + to: undefined, + }, + { + label: t`Last 7 days`, + id: "last-seven-days", + from: dayjs().utc().subtract(7, "day").startOf("day"), + to: undefined, + }, + { + label: t`This month`, + id: "this-month", + from: dayjs().utc().startOf("month"), + to: undefined, + }, + { + label: t`Last 30 days`, + id: "last-thirty-days", + from: dayjs().utc().subtract(30, "day").startOf("day"), + to: undefined, + }, + { + label: t`Last month`, + id: "last-month", + from: dayjs().utc().subtract(1, "month").startOf("month"), + to: dayjs().utc().subtract(1, "month").endOf("month"), + }, + { + id: "custom", + label: t`Custom`, + from: dayjs().utc().startOf("week"), + to: undefined, + }, ]; } + +export function getTimeFilter( + id: string | undefined | null, +): TimeFilterEntry | undefined { + return buildTimeFilters().find((filter) => filter.id === id); +} diff --git a/src/routes/campaigns/analytics/graphs/DailyGraph.tsx b/src/routes/campaigns/analytics/graphs/DailyGraph.tsx index f064c736..cc67094f 100644 --- a/src/routes/campaigns/analytics/graphs/DailyGraph.tsx +++ b/src/routes/campaigns/analytics/graphs/DailyGraph.tsx @@ -3,12 +3,14 @@ import { useMetricSelection } from "../hooks"; import { makeLineChartSeries } from "./series"; import { GraphSkeleton } from "./GraphSkeleton"; import { OverTimeGraph } from "./OverTimeGraph"; +import { CampaignOverviewProps } from "@/util/CampaignIdProps"; +import { isEnabledForCampaign } from "@/routes/campaigns/analytics/metrics"; -interface Props { +interface Props extends CampaignOverviewProps { dataSource: DailyMetricValuesFragment[] | undefined; } -export function DailyGraph({ dataSource }: Props) { +export function DailyGraph({ campaignOverview, dataSource }: Props) { const { selectedMetrics } = useMetricSelection(); if (!dataSource) { @@ -20,9 +22,9 @@ export function DailyGraph({ dataSource }: Props) { metrics: d.metrics, })); - const series = selectedMetrics.map((metric) => - makeLineChartSeries(metric, rawData, "day"), - ); + const series = selectedMetrics + .filter((m) => isEnabledForCampaign(m, campaignOverview)) + .map((metric) => makeLineChartSeries(metric, rawData, "day")); return ; } diff --git a/src/routes/campaigns/analytics/graphs/GraphSkeleton.tsx b/src/routes/campaigns/analytics/graphs/GraphSkeleton.tsx index d565edc3..70fdf775 100644 --- a/src/routes/campaigns/analytics/graphs/GraphSkeleton.tsx +++ b/src/routes/campaigns/analytics/graphs/GraphSkeleton.tsx @@ -2,9 +2,10 @@ import { Skeleton } from "@mui/material"; export const GraphSkeleton = () => ( ); diff --git a/src/routes/campaigns/analytics/graphs/HourlyGraph.tsx b/src/routes/campaigns/analytics/graphs/HourlyGraph.tsx index c43e9201..282cb388 100644 --- a/src/routes/campaigns/analytics/graphs/HourlyGraph.tsx +++ b/src/routes/campaigns/analytics/graphs/HourlyGraph.tsx @@ -7,6 +7,7 @@ import { useMetricSelection } from "../hooks"; import { makeLineChartSeries } from "./series"; import { OverTimeGraph } from "./OverTimeGraph"; import { CampaignOverviewProps } from "@/util/CampaignIdProps"; +import { isEnabledForCampaign } from "@/routes/campaigns/analytics/metrics"; const HourlyGraph_Load = graphql(` query HourlyGraph($filter: PerformanceFilter!) { @@ -64,9 +65,9 @@ export function HourlyGraph({ campaignOverview, filters }: Props) { metrics: d.metrics, })); - const series = selectedMetrics.map((metric) => - makeLineChartSeries(metric, rawData, "hour"), - ); + const series = selectedMetrics + .filter((m) => isEnabledForCampaign(m, campaignOverview)) + .map((metric) => makeLineChartSeries(metric, rawData, "hour")); return ; } diff --git a/src/routes/campaigns/analytics/hooks.ts b/src/routes/campaigns/analytics/hooks.ts index 4eb66ca8..e6b35220 100644 --- a/src/routes/campaigns/analytics/hooks.ts +++ b/src/routes/campaigns/analytics/hooks.ts @@ -6,61 +6,104 @@ import { getBreakdownDefinition, LocalizedBreakdown, } from "./breakdowns"; -import { Dispatch, DispatchWithoutAction } from "react"; +import { Dispatch, DispatchWithoutAction, useEffect, useState } from "react"; +import { + buildTimeFilters, + getTimeFilter, + TimeFilterEntry, +} from "@/routes/campaigns/analytics/filters/time-filters"; +import { + getOsFilter, + LocalizedOsFilterEntry, +} from "@/routes/campaigns/analytics/filters/OsFilter"; +import { useStickyState } from "@/hooks/useStickyState"; +import { PerformanceFilter } from "@/graphql-client/graphql"; +import { CampaignOverviewProps } from "@/util/CampaignIdProps"; // it's nicest to use , to separate metrics, but that gets URL encoded. // but "space" gets encoded as "+", which is ok const SEPARATOR = " "; interface UseMetricSelectionResult { - toggleMetric: (metric: MetricDefinition) => () => void; + toggleMetric: (metric: MetricDefinition) => void; isSelected: (metric: MetricDefinition) => boolean; - forceDefaultMetricSelection: () => void; + forceDefaultSelection: () => void; selectedMetrics: readonly MetricDefinition[]; } export function useMetricSelection(): UseMetricSelectionResult { + return getGenericMultiSelect( + "metrics", + getMetricDefinition, + "impression ctr", + ); +} + +interface UseOsSelectionResult { + toggleMetric: (metric: LocalizedOsFilterEntry) => void; + isSelected: (metric: LocalizedOsFilterEntry) => boolean; + forceDefaultSelection: (reset?: boolean) => void; + selectedMetrics: readonly LocalizedOsFilterEntry[]; + removeMetric: (id: string) => void; +} + +export function useOsFilterParams(): UseOsSelectionResult { + return getGenericMultiSelect("os", getOsFilter, "all"); +} + +function getGenericMultiSelect( + urlParam: string, + selectedFunc: (id: string) => T | undefined, + defaultSelection: string, +) { const { location: { search }, replace, } = useHistory(); + const [filter, setFilter] = useStickyState(urlParam, defaultSelection); const params = new URLSearchParams(search); - const metricIds = params.get("metrics")?.split(SEPARATOR) ?? []; - const metricArray = _.compact(metricIds.map(getMetricDefinition)); - const metricSet = new Set(metricArray); + const paramIds = params.get(urlParam)?.split(SEPARATOR) ?? []; + const paramSet = new Set(_.compact(paramIds)); + const paramArray = _.compact(Array.from(paramSet).map(selectedFunc)); return { - forceDefaultMetricSelection: () => { - if (metricSet.size === 0) { - // eslint-disable-next-line lingui/no-unlocalized-strings - params.set("metrics", "impression ctr"); + forceDefaultSelection: (reset: boolean = false) => { + if (paramSet.size === 0 || reset) { + let filtered = filter; + if (reset) { + filtered = defaultSelection; + setFilter(filtered); + } + + params.set(urlParam, filtered); replace({ search: params.toString(), }); } }, - isSelected: (metric) => metricSet.has(metric), - toggleMetric: (metric) => () => { - const newMetrics = new Set(metricSet); - if (newMetrics.has(metric)) { - newMetrics.delete(metric); + removeMetric: (id: string) => paramSet.delete(id), + isSelected: (metric: T) => paramSet.has(metric.id), + toggleMetric: (metric: T) => { + const newMetrics = new Set(paramSet); + if (newMetrics.has(metric.id)) { + newMetrics.delete(metric.id); } else { - newMetrics.add(metric); + newMetrics.add(metric.id); } - params.set( - "metrics", - Array.from(newMetrics) - .map((m) => m.id) - .join(SEPARATOR), - ); + let newParams = Array.from(newMetrics).join(SEPARATOR); + if (newMetrics.size === 0) { + newParams = defaultSelection; + } + params.set(urlParam, newParams); + setFilter(newParams); replace({ search: params.toString(), }); }, - selectedMetrics: metricArray, + selectedMetrics: paramArray, }; } @@ -71,35 +114,99 @@ interface UseBreakdownParamsResult { } export function useBreakdownParams(): UseBreakdownParamsResult { + return getGenericFilterParams( + "show", + getBreakdownDefinition, + BREAKDOWNS[0].id, + ); +} + +interface UseTimeParamsResult { + selected: TimeFilterEntry | undefined; + setSelected: Dispatch; + forceDefaultBreakdownSelection: DispatchWithoutAction; +} + +export function useTimeFilterParams(): UseTimeParamsResult { + return getGenericFilterParams( + "time", + getTimeFilter, + buildTimeFilters()[0].id, + ); +} + +function getGenericFilterParams( + urlParam: string, + selectedFunc: (id: string | undefined | null) => T | undefined, + defaultSelection: string, +) { const { location: { search }, replace, } = useHistory(); + const [filter, setFilter] = useStickyState(urlParam, defaultSelection); const params = new URLSearchParams(search); - const breakdownId = params.get("show"); - const selected = getBreakdownDefinition(breakdownId); + const param = params.get(urlParam); + const selected = selectedFunc(param); return { forceDefaultBreakdownSelection: () => { if (!selected) { setTimeout(() => { - params.set("show", BREAKDOWNS[0].id); - replace( - { - search: params.toString(), - }, - 0, - ); + params.set(urlParam, filter); + replace({ + search: params.toString(), + }); }); } }, selected, - setSelected: (breakdown) => { - params.set("show", breakdown.id); + setSelected: (filter: T) => { + params.set(urlParam, filter.id); + setFilter(filter.id); replace({ search: params.toString(), }); }, }; } + +export function useCampaignAnalyticFilter({ + campaignOverview, +}: CampaignOverviewProps) { + const { selected } = useTimeFilterParams(); + const { selectedMetrics: os } = useOsFilterParams(); + const [custom] = useStickyState("custom-date", undefined); + + const [filter, setFilter] = useState({ + campaignIds: [campaignOverview.id], + }); + + const timeFilter = { + from: selected?.from?.toISOString(), + to: selected?.to?.toISOString(), + }; + if (selected && selected.id === "custom") { + const customFilter = JSON.parse(custom ?? "{}"); + if (customFilter.from) timeFilter.from = customFilter.from; + if (customFilter.to) timeFilter.to = customFilter.to; + } + + useEffect(() => { + setFilter((prevFilter) => ({ + ...prevFilter, + ...timeFilter, + os: + os.length === 0 || (os.length === 1 && os[0].id === "all") + ? undefined + : os.map((a) => a.id), + })); + }, [ + JSON.stringify(selected), + JSON.stringify(os), + JSON.stringify(timeFilter), + ]); + + return { filter, setFilter }; +} diff --git a/src/routes/campaigns/analytics/metrics.ts b/src/routes/campaigns/analytics/metrics.ts index f101c9f6..2b0749f3 100644 --- a/src/routes/campaigns/analytics/metrics.ts +++ b/src/routes/campaigns/analytics/metrics.ts @@ -184,3 +184,10 @@ export function getMetricListForCampaign( (m) => !m.disableForCampaign || !m.disableForCampaign(campaign), ); } + +export function isEnabledForCampaign( + metric: MetricDefinition, + campaign: CampaignSummaryFragment, +) { + return !metric.disableForCampaign || !metric.disableForCampaign(campaign); +} From 7cd99d173adf4af1475dedb1fb6d45cc9fc2928a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 12:31:56 -0400 Subject: [PATCH 3/4] chore(deps): update all non-major dependencies (#1229) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | Pending | |---|---|---|---|---|---|---|---|---| | [@mui/x-data-grid](https://mui.com/x/react-data-grid/) ([source](https://togithub.com/mui/mui-x/tree/HEAD/packages/x-data-grid)) | [`7.6.1` -> `7.6.2`](https://renovatebot.com/diffs/npm/@mui%2fx-data-grid/7.6.1/7.6.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mui%2fx-data-grid/7.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mui%2fx-data-grid/7.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mui%2fx-data-grid/7.6.1/7.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mui%2fx-data-grid/7.6.1/7.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | | [@mui/x-date-pickers](https://mui.com/x/react-date-pickers/) ([source](https://togithub.com/mui/mui-x/tree/HEAD/packages/x-date-pickers)) | [`7.6.1` -> `7.6.2`](https://renovatebot.com/diffs/npm/@mui%2fx-date-pickers/7.6.1/7.6.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@mui%2fx-date-pickers/7.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@mui%2fx-date-pickers/7.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@mui%2fx-date-pickers/7.6.1/7.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@mui%2fx-date-pickers/7.6.1/7.6.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | dependencies | patch | | | [@types/lodash](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/lodash) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash)) | [`4.17.4` -> `4.17.5`](https://renovatebot.com/diffs/npm/@types%2flodash/4.17.4/4.17.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2flodash/4.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2flodash/4.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2flodash/4.17.4/4.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2flodash/4.17.4/4.17.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | | [github/codeql-action](https://togithub.com/github/codeql-action) | `v3.25.7` -> `v3.25.8` | [![age](https://developer.mend.io/api/mc/badges/age/github-tags/github%2fcodeql-action/v3.25.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/github-tags/github%2fcodeql-action/v3.25.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/github-tags/github%2fcodeql-action/v3.25.7/v3.25.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/github-tags/github%2fcodeql-action/v3.25.7/v3.25.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | action | patch | | | [knip](https://knip.dev) ([source](https://togithub.com/webpro-nl/knip/tree/HEAD/packages/knip)) | [`5.17.3` -> `5.18.1`](https://renovatebot.com/diffs/npm/knip/5.17.3/5.18.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/knip/5.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/knip/5.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/knip/5.17.3/5.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/knip/5.17.3/5.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | `5.19.0` (+1) | | [prettier](https://prettier.io) ([source](https://togithub.com/prettier/prettier)) | [`3.2.5` -> `3.3.1`](https://renovatebot.com/diffs/npm/prettier/3.2.5/3.3.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prettier/3.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prettier/3.2.5/3.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.2.5/3.3.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | `3.3.2` | | [typescript-eslint](https://typescript-eslint.io/packages/typescript-eslint) ([source](https://togithub.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint)) | [`7.11.0` -> `7.12.0`](https://renovatebot.com/diffs/npm/typescript-eslint/7.11.0/7.12.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/typescript-eslint/7.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript-eslint/7.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript-eslint/7.11.0/7.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript-eslint/7.11.0/7.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | minor | `7.13.0` | | [vite](https://vitejs.dev) ([source](https://togithub.com/vitejs/vite/tree/HEAD/packages/vite)) | [`5.2.12` -> `5.2.13`](https://renovatebot.com/diffs/npm/vite/5.2.12/5.2.13) | [![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.2.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.2.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.2.12/5.2.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.2.12/5.2.13?slim=true)](https://docs.renovatebot.com/merge-confidence/) | devDependencies | patch | | --- ### Release Notes
mui/mui-x (@​mui/x-data-grid) ### [`v7.6.2`](https://togithub.com/mui/mui-x/blob/HEAD/CHANGELOG.md#762) [Compare Source](https://togithub.com/mui/mui-x/compare/v7.6.1...v7.6.2) *Jun 6, 2024* We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨: - 📚 Adds Date and Time Pickers accessibility page - 🐞 Bugfixes - 📚 Documentation improvements ##### Data Grid ##### `@mui/x-data-grid@7.6.2` - \[DataGrid] Add the `areElementSizesEqual` utility to improve code readability ([#​13254](https://togithub.com/mui/mui-x/issues/13254)) [@​layerok](https://togithub.com/layerok) - \[DataGrid] Clean up IE remnants from the codebase ([#​13390](https://togithub.com/mui/mui-x/issues/13390)) [@​MBilalShafi](https://togithub.com/MBilalShafi) ##### `@mui/x-data-grid-pro@7.6.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan") Same changes as in `@mui/x-data-grid@7.6.2`. ##### `@mui/x-data-grid-premium@7.6.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link "Premium plan") Same changes as in `@mui/x-data-grid-pro@7.6.2`. ##### Date and Time Pickers ##### `@mui/x-date-pickers@7.6.2` - \[fields] Fix `PageUp` and `PageDown` editing on letter sections ([#​13310](https://togithub.com/mui/mui-x/issues/13310)) [@​arthurbalduini](https://togithub.com/arthurbalduini) - \[pickers] Fix `AdapterDayjs` timezone behavior ([#​13362](https://togithub.com/mui/mui-x/issues/13362)) [@​LukasTy](https://togithub.com/LukasTy) - \[pickers] Use `useRtl` instead of `useTheme` to access direction ([#​13363](https://togithub.com/mui/mui-x/issues/13363)) [@​flaviendelangle](https://togithub.com/flaviendelangle) ##### `@mui/x-date-pickers-pro@7.6.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan") Same changes as in `@mui/x-date-pickers@7.6.2`. ##### Charts ##### `@mui/x-charts@7.6.2` - \[charts] Add `Initializable` type and behaviour to allow checking if a complex context has been initialized. ([#​13365](https://togithub.com/mui/mui-x/issues/13365)) [@​JCQuintas](https://togithub.com/JCQuintas) - \[charts] Fix some props not working in `xAxis` and `yAxis` ([#​13372](https://togithub.com/mui/mui-x/issues/13372)) [@​Valyok26](https://togithub.com/Valyok26) - \[charts] Harmonize charts types ([#​13366](https://togithub.com/mui/mui-x/issues/13366)) [@​alexfauquette](https://togithub.com/alexfauquette) - \[charts] Introduce plugins system ([#​13367](https://togithub.com/mui/mui-x/issues/13367)) [@​alexfauquette](https://togithub.com/alexfauquette) - \[charts] Simplify plugin types ([#​13396](https://togithub.com/mui/mui-x/issues/13396)) [@​JCQuintas](https://togithub.com/JCQuintas) ##### Docs - \[docs] Add badges like in Material UI [@​oliviertassinari](https://togithub.com/oliviertassinari) - \[docs] Update twitter.com to x.com [@​oliviertassinari](https://togithub.com/oliviertassinari) - \[docs] Fix the description of `tickInterval` ([#​13355](https://togithub.com/mui/mui-x/issues/13355)) [@​alexfauquette](https://togithub.com/alexfauquette) - \[docs] Adjust the code example for `quickFilterValues` ([#​12919](https://togithub.com/mui/mui-x/issues/12919)) [@​michelengelen](https://togithub.com/michelengelen) - \[docs] Create Pickers accessibility page ([#​13274](https://togithub.com/mui/mui-x/issues/13274)) [@​arthurbalduini](https://togithub.com/arthurbalduini) ##### Core - \[core] Comment on `CSS.escape` for the future [@​oliviertassinari](https://togithub.com/oliviertassinari) - \[core] Fix `l10n` action setup ([#​13382](https://togithub.com/mui/mui-x/issues/13382)) [@​LukasTy](https://togithub.com/LukasTy) - \[core] Fixes in preparation for React 18.3 ([#​13378](https://togithub.com/mui/mui-x/issues/13378)) [@​LukasTy](https://togithub.com/LukasTy) - \[core] Remove explicit `marked` dependency ([#​13383](https://togithub.com/mui/mui-x/issues/13383)) [@​LukasTy](https://togithub.com/LukasTy) - \[core] Remove unused `@types/prettier` dependency ([#​13389](https://togithub.com/mui/mui-x/issues/13389)) [@​LukasTy](https://togithub.com/LukasTy) - \[core] Add `docs/.env.local` to `.gitignore` ([#​13377](https://togithub.com/mui/mui-x/issues/13377)) [@​KenanYusuf](https://togithub.com/KenanYusuf)
github/codeql-action (github/codeql-action) ### [`v3.25.8`](https://togithub.com/github/codeql-action/compare/v3.25.7...v3.25.8) [Compare Source](https://togithub.com/github/codeql-action/compare/v3.25.7...v3.25.8)
webpro-nl/knip (knip) ### [`v5.18.1`](https://togithub.com/webpro-nl/knip/releases/tag/5.18.1) [Compare Source](https://togithub.com/webpro-nl/knip/compare/5.18.0...5.18.1) - Refactor and improve dep graph naming/typing ([`28f05f0`](https://togithub.com/webpro-nl/knip/commit/28f05f0a)) - Speed up (de)serialized and add test ([`deb3b9c`](https://togithub.com/webpro-nl/knip/commit/deb3b9c5)) - Move cli tests involving stdout to separate folder ([`978674f`](https://togithub.com/webpro-nl/knip/commit/978674fc)) - Update and caretify dependencies ([`e14f6d2`](https://togithub.com/webpro-nl/knip/commit/e14f6d24)) - Fix link to screenshot ([`c2f9507`](https://togithub.com/webpro-nl/knip/commit/c2f9507e)) ### [`v5.18.0`](https://togithub.com/webpro-nl/knip/releases/tag/5.18.0) [Compare Source](https://togithub.com/webpro-nl/knip/compare/5.17.4...5.18.0) - Don't report issues when using --trace ([`d8e9719`](https://togithub.com/webpro-nl/knip/commit/d8e9719b)) - Emphasize --debug and --trace on troubleshooting page ([`bcb5e93`](https://togithub.com/webpro-nl/knip/commit/bcb5e93f)) - Add --performance screenshot ([`d0d0108`](https://togithub.com/webpro-nl/knip/commit/d0d01082)) - Integration test knip --cache for eslint as well ([`443b8be`](https://togithub.com/webpro-nl/knip/commit/443b8be0)) - Dogfoodin' is underrated ([`7115889`](https://togithub.com/webpro-nl/knip/commit/7115889b)) - Update docs ([`0651144`](https://togithub.com/webpro-nl/knip/commit/0651144c)) - Test against latest TS 5.5 rc ([`f7aba23`](https://togithub.com/webpro-nl/knip/commit/f7aba23c)) - Add test for imports-self (closes [#​663](https://togithub.com/webpro-nl/knip/issues/663)) ([`736b0a2`](https://togithub.com/webpro-nl/knip/commit/736b0a25)) - Major refactor of dep graph for trace feature ([`ad16689`](https://togithub.com/webpro-nl/knip/commit/ad16689b)) - Use cwd as default base in `toAbsolute` ([`678f47a`](https://togithub.com/webpro-nl/knip/commit/678f47ab)) - Fix tsup entries are production entry files ([`4d839d8`](https://togithub.com/webpro-nl/knip/commit/4d839d8f)) - Don't need to cache package.json ([`da33b9c`](https://togithub.com/webpro-nl/knip/commit/da33b9c4)) - Better explain `ignoreBinaries` configuration option ([#​670](https://togithub.com/webpro-nl/knip/issues/670)) ([`8470505`](https://togithub.com/webpro-nl/knip/commit/8470505f)) - Update funding options ([`81cf806`](https://togithub.com/webpro-nl/knip/commit/81cf806d)) ### [`v5.17.4`](https://togithub.com/webpro-nl/knip/releases/tag/5.17.4) [Compare Source](https://togithub.com/webpro-nl/knip/compare/5.17.3...5.17.4) - Fix up caching ([`e75f0e9`](https://togithub.com/webpro-nl/knip/commit/e75f0e92)) - Minor refactor ([`28b2434`](https://togithub.com/webpro-nl/knip/commit/28b24349)) - Do literal text search in setRefs (closes [#​595](https://togithub.com/webpro-nl/knip/issues/595) [#​596](https://togithub.com/webpro-nl/knip/issues/596) [#​664](https://togithub.com/webpro-nl/knip/issues/664)) ([`6e64d60`](https://togithub.com/webpro-nl/knip/commit/6e64d60c)) - Refactor to use more maps over objects, move/rename some vars ([`90fcd4c`](https://togithub.com/webpro-nl/knip/commit/90fcd4cd)) - Add polar to funding.yml ([`c4bb916`](https://togithub.com/webpro-nl/knip/commit/c4bb9167)) - Use `IMPORT_STAR` const ([`cb9ed83`](https://togithub.com/webpro-nl/knip/commit/cb9ed830)) - Remove specifier from dep graph and `SerializableImports` type ([`474a6f7`](https://togithub.com/webpro-nl/knip/commit/474a6f70)) - Add ‘xvfb-run’ as globally available binary ([#​662](https://togithub.com/webpro-nl/knip/issues/662)) ([`87850ea`](https://togithub.com/webpro-nl/knip/commit/87850eac)) - Add ‘aws’ as globally available binary ([#​661](https://togithub.com/webpro-nl/knip/issues/661)) ([`6fd3e46`](https://togithub.com/webpro-nl/knip/commit/6fd3e461))
prettier/prettier (prettier) ### [`v3.3.1`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#331) [Compare Source](https://togithub.com/prettier/prettier/compare/3.3.0...3.3.1) [diff](https://togithub.com/prettier/prettier/compare/3.3.0...3.3.1) ##### Preserve empty lines in front matter ([#​16347](https://togithub.com/prettier/prettier/pull/16347) by [@​fisker](https://togithub.com/fisker)) ```markdown --- foo: - bar1 - bar2 - bar3 --- Markdown --- foo: - bar1 - bar2 - bar3 --- Markdown --- foo: - bar1 - bar2 - bar3 --- Markdown ``` ##### Preserve explicit language in front matter ([#​16348](https://togithub.com/prettier/prettier/pull/16348) by [@​fisker](https://togithub.com/fisker)) ```markdown ---yaml title: Hello slug: home --- --- title: Hello slug: home --- ---yaml title: Hello slug: home --- ``` ##### Avoid line breaks in import attributes ([#​16349](https://togithub.com/prettier/prettier/pull/16349) by [@​fisker](https://togithub.com/fisker)) ```jsx // Input import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: "json" }; // Prettier 3.3.0 import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: "json" }; // Prettier 3.3.1 import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: "json" }; ``` ### [`v3.3.0`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#330) [Compare Source](https://togithub.com/prettier/prettier/compare/3.2.5...3.3.0) [diff](https://togithub.com/prettier/prettier/compare/3.2.5...3.3.0) 🔗 [Release Notes](https://prettier.io/blog/2024/06/01/3.3.0.html)
typescript-eslint/typescript-eslint (typescript-eslint) ### [`v7.12.0`](https://togithub.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/typescript-eslint/CHANGELOG.md#7120-2024-06-03) [Compare Source](https://togithub.com/typescript-eslint/typescript-eslint/compare/v7.11.0...v7.12.0) ##### 🚀 Features - **eslint-plugin:** \[no-useless-template-literals] rename to `no-useless-template-expression` (deprecate `no-useless-template-literals`) ##### 🩹 Fixes - no-useless-template-expression -> no-unnecessary-template-expression ##### ❤️ Thank You - Abraham Guo - Han Yeong-woo - Joshua Chen - Kim Sang Du - Kirk Waiblinger - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
vitejs/vite (vite) ### [`v5.2.13`](https://togithub.com/vitejs/vite/releases/tag/v5.2.13) [Compare Source](https://togithub.com/vitejs/vite/compare/v5.2.12...v5.2.13) Please refer to [CHANGELOG.md](https://togithub.com/vitejs/vite/blob/v5.2.13/packages/vite/CHANGELOG.md) for details.
--- ### Configuration 📅 **Schedule**: Branch creation - "* 0-4 * * 3" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/brave/ads-ui). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 6 +- package.json | 14 +- pnpm-lock.yaml | 205 +++++++++++++------------- 3 files changed, 111 insertions(+), 114 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 73eb37b9..76d45a7d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -42,7 +42,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7 + uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -53,7 +53,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7 + uses: github/codeql-action/autobuild@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -67,4 +67,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7 + uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8 diff --git a/package.json b/package.json index 4088fcf7..402b5cbc 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "@mui/icons-material": "5.15.19", "@mui/lab": "5.0.0-alpha.170", "@mui/material": "5.15.19", - "@mui/x-data-grid": "7.6.1", - "@mui/x-date-pickers": "7.6.1", + "@mui/x-data-grid": "7.6.2", + "@mui/x-date-pickers": "7.6.2", "bignumber.js": "9.1.2", "dayjs": "1.11.11", "formik": "2.4.6", @@ -66,7 +66,7 @@ "@lingui/cli": "4.11.1", "@lingui/vite-plugin": "4.11.1", "@parcel/watcher": "2.4.1", - "@types/lodash": "4.17.4", + "@types/lodash": "4.17.5", "@types/papaparse": "5.3.14", "@types/react": "18.3.3", "@types/react-dom": "18.3.0", @@ -81,13 +81,13 @@ "eslint-plugin-react": "7.34.2", "eslint-plugin-react-hooks": "4.6.2", "husky": "9.0.11", - "knip": "5.17.3", + "knip": "5.18.1", "lint-staged": "15.2.5", "npm-run-all2": "6.2.0", - "prettier": "3.2.5", + "prettier": "3.3.1", "typescript": "5.4.5", - "typescript-eslint": "7.11.0", - "vite": "5.2.12", + "typescript-eslint": "7.12.0", + "vite": "5.2.13", "vite-plugin-checker": "0.6.4", "vite-tsconfig-paths": "4.3.2", "vitest": "1.6.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 468bcea8..e0e9e8f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -57,11 +57,11 @@ importers: specifier: 5.15.19 version: 5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/x-data-grid': - specifier: 7.6.1 - version: 7.6.1(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 7.6.2 + version: 7.6.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/x-date-pickers': - specifier: 7.6.1 - version: 7.6.1(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(date-fns@3.6.0)(dayjs@1.11.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 7.6.2 + version: 7.6.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(date-fns@3.6.0)(dayjs@1.11.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) bignumber.js: specifier: 9.1.2 version: 9.1.2 @@ -131,13 +131,13 @@ importers: version: 4.11.1(typescript@5.4.5) '@lingui/vite-plugin': specifier: 4.11.1 - version: 4.11.1(typescript@5.4.5)(vite@5.2.12(@types/node@20.13.0)) + version: 4.11.1(typescript@5.4.5)(vite@5.2.13(@types/node@20.13.0)) '@parcel/watcher': specifier: 2.4.1 version: 2.4.1 '@types/lodash': - specifier: 4.17.4 - version: 4.17.4 + specifier: 4.17.5 + version: 4.17.5 '@types/papaparse': specifier: 5.3.14 version: 5.3.14 @@ -155,10 +155,10 @@ importers: version: 1.8.8 '@vitejs/plugin-basic-ssl': specifier: 1.1.0 - version: 1.1.0(vite@5.2.12(@types/node@20.13.0)) + version: 1.1.0(vite@5.2.13(@types/node@20.13.0)) '@vitejs/plugin-react': specifier: 4.3.0 - version: 4.3.0(vite@5.2.12(@types/node@20.13.0)) + version: 4.3.0(vite@5.2.13(@types/node@20.13.0)) babel-plugin-macros: specifier: 3.1.0 version: 3.1.0 @@ -181,8 +181,8 @@ importers: specifier: 9.0.11 version: 9.0.11 knip: - specifier: 5.17.3 - version: 5.17.3(@types/node@20.13.0)(typescript@5.4.5) + specifier: 5.18.1 + version: 5.18.1(@types/node@20.13.0)(typescript@5.4.5) lint-staged: specifier: 15.2.5 version: 15.2.5 @@ -190,23 +190,23 @@ importers: specifier: 6.2.0 version: 6.2.0 prettier: - specifier: 3.2.5 - version: 3.2.5 + specifier: 3.3.1 + version: 3.3.1 typescript: specifier: 5.4.5 version: 5.4.5 typescript-eslint: - specifier: 7.11.0 - version: 7.11.0(eslint@8.57.0)(typescript@5.4.5) + specifier: 7.12.0 + version: 7.12.0(eslint@8.57.0)(typescript@5.4.5) vite: - specifier: 5.2.12 - version: 5.2.12(@types/node@20.13.0) + specifier: 5.2.13 + version: 5.2.13(@types/node@20.13.0) vite-plugin-checker: specifier: 0.6.4 - version: 0.6.4(eslint@8.57.0)(optionator@0.9.4)(typescript@5.4.5)(vite@5.2.12(@types/node@20.13.0)) + version: 0.6.4(eslint@8.57.0)(optionator@0.9.4)(typescript@5.4.5)(vite@5.2.13(@types/node@20.13.0)) vite-tsconfig-paths: specifier: 4.3.2 - version: 4.3.2(typescript@5.4.5)(vite@5.2.12(@types/node@20.13.0)) + version: 4.3.2(typescript@5.4.5)(vite@5.2.13(@types/node@20.13.0)) vitest: specifier: 1.6.0 version: 1.6.0(@types/node@20.13.0) @@ -1220,6 +1220,7 @@ packages: '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -1227,6 +1228,7 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead '@jest/schemas@29.6.3': resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} @@ -1435,16 +1437,16 @@ packages: '@types/react': optional: true - '@mui/x-data-grid@7.6.1': - resolution: {integrity: sha512-ZUQqSvmJgNQAgwLqVp/XUgNgKFb3zdsBQTbYCagjAK7Saq3iPDJkTb7FNSyT8UN0G6Kqogxgd9fKJW4L4ku1zQ==} + '@mui/x-data-grid@7.6.2': + resolution: {integrity: sha512-f3t6TU8+f0VgmL4aJ9N/Wm5IeWfICfVb45S469wzzldUhbb/beIO/T3uMyGP13WFhx5f8N5wRRHSYZRHpfzhZw==} engines: {node: '>=14.0.0'} peerDependencies: '@mui/material': ^5.15.14 react: ^17.0.0 || ^18.0.0 react-dom: ^17.0.0 || ^18.0.0 - '@mui/x-date-pickers@7.6.1': - resolution: {integrity: sha512-erSq5cnOUyBgBmpHnMxIit5yhT3bl/lOaNZKpObvJtvEJetvNA9xWQ7dz/J/AufLzDuvThjusuRD0y+GmeXtiw==} + '@mui/x-date-pickers@7.6.2': + resolution: {integrity: sha512-9e5qO76eLvjiEm7Yt4HNR1jqGFia7vnZYbhi4Tw/xQ32emMKYLUzXZLhQNtb1wa7SwHWxXcPJOkIEmvQgEvaqQ==} engines: {node: '>=14.0.0'} peerDependencies: '@emotion/react': ^11.9.0 @@ -1723,8 +1725,8 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/lodash@4.17.4': - resolution: {integrity: sha512-wYCP26ZLxaT3R39kiN2+HcJ4kTd3U1waI/cY7ivWYqFP6pW3ZNpvi6Wd6PHZx7T/t8z0vlkXMg3QYLa7DZ/IJQ==} + '@types/lodash@4.17.5': + resolution: {integrity: sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==} '@types/node@20.13.0': resolution: {integrity: sha512-FM6AOb3khNkNIXPnHFDYaHerSv8uN22C91z098AnGccVu+Pcdhi+pNUFDi0iLmPIsVE0JBD0KVS7mzUYt4nRzQ==} @@ -1768,8 +1770,8 @@ packages: '@types/yargs@17.0.32': resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} - '@typescript-eslint/eslint-plugin@7.11.0': - resolution: {integrity: sha512-P+qEahbgeHW4JQ/87FuItjBj8O3MYv5gELDzr8QaQ7fsll1gSMTYb6j87MYyxwf3DtD7uGFB9ShwgmCJB5KmaQ==} + '@typescript-eslint/eslint-plugin@7.12.0': + resolution: {integrity: sha512-7F91fcbuDf/d3S8o21+r3ZncGIke/+eWk0EpO21LXhDfLahriZF9CGj4fbAetEjlaBdjdSm9a6VeXbpbT6Z40Q==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1779,8 +1781,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.11.0': - resolution: {integrity: sha512-yimw99teuaXVWsBcPO1Ais02kwJ1jmNA1KxE7ng0aT7ndr1pT1wqj0OJnsYVGKKlc4QJai86l/025L6z8CljOg==} + '@typescript-eslint/parser@7.12.0': + resolution: {integrity: sha512-dm/J2UDY3oV3TKius2OUZIFHsomQmpHtsV0FTh1WO8EKgHLQ1QCADUqscPgTpU+ih1e21FQSRjXckHn3txn6kQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1793,12 +1795,12 @@ packages: resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@typescript-eslint/scope-manager@7.11.0': - resolution: {integrity: sha512-27tGdVEiutD4POirLZX4YzT180vevUURJl4wJGmm6TrQoiYwuxTIY98PBp6L2oN+JQxzE0URvYlzJaBHIekXAw==} + '@typescript-eslint/scope-manager@7.12.0': + resolution: {integrity: sha512-itF1pTnN6F3unPak+kutH9raIkL3lhH1YRPGgt7QQOh43DQKVJXmWkpb+vpc/TiDHs6RSd9CTbDsc/Y+Ygq7kg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.11.0': - resolution: {integrity: sha512-WmppUEgYy+y1NTseNMJ6mCFxt03/7jTOy08bcg7bxJJdsM4nuhnchyBbE8vryveaJUf62noH7LodPSo5Z0WUCg==} + '@typescript-eslint/type-utils@7.12.0': + resolution: {integrity: sha512-lib96tyRtMhLxwauDWUp/uW3FMhLA6D0rJ8T7HmH7x23Gk1Gwwu8UZ94NMXBvOELn6flSPiBrCKlehkiXyaqwA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1811,8 +1813,8 @@ packages: resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@typescript-eslint/types@7.11.0': - resolution: {integrity: sha512-MPEsDRZTyCiXkD4vd3zywDCifi7tatc4K37KqTprCvaXptP7Xlpdw0NR2hRJTetG5TxbWDB79Ys4kLmHliEo/w==} + '@typescript-eslint/types@7.12.0': + resolution: {integrity: sha512-o+0Te6eWp2ppKY3mLCU+YA9pVJxhUJE15FV7kxuD9jgwIAa+w/ycGJBMrYDTpVGUM/tgpa9SeMOugSabWFq7bg==} engines: {node: ^18.18.0 || >=20.0.0} '@typescript-eslint/typescript-estree@5.62.0': @@ -1824,8 +1826,8 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@7.11.0': - resolution: {integrity: sha512-cxkhZ2C/iyi3/6U9EPc5y+a6csqHItndvN/CzbNXTNrsC3/ASoYQZEt9uMaEp+xFNjasqQyszp5TumAVKKvJeQ==} + '@typescript-eslint/typescript-estree@7.12.0': + resolution: {integrity: sha512-5bwqLsWBULv1h6pn7cMW5dXX/Y2amRqLaKqsASVwbBHMZSnHqE/HN4vT4fE0aFsiwxYvr98kqOWh1a8ZKXalCQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1839,8 +1841,8 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - '@typescript-eslint/utils@7.11.0': - resolution: {integrity: sha512-xlAWwPleNRHwF37AhrZurOxA1wyXowW4PqVXZVUNCLjB48CqdPJoJWkrpH2nij9Q3Lb7rtWindtoXwxjxlKKCA==} + '@typescript-eslint/utils@7.12.0': + resolution: {integrity: sha512-Y6hhwxwDx41HNpjuYswYp6gDbkiZ8Hin9Bf5aJQn1bpTs3afYY4GX+MPYxma8jtoIV2GRwTM/UJm/2uGCVv+DQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1849,8 +1851,8 @@ packages: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@typescript-eslint/visitor-keys@7.11.0': - resolution: {integrity: sha512-7syYk4MzjxTEk0g/w3iqtgxnFQspDJfn6QKD36xMuuhTzjcxY7F8EmBLnALjVyaOF1/bVocu3bS/2/F7rXrveQ==} + '@typescript-eslint/visitor-keys@7.12.0': + resolution: {integrity: sha512-uZk7DevrQLL3vSnfFl5bj4sL75qC9D6EdjemIdbtkuUmIheWpuiiylSY01JxJE7+zGrOWDZrp1WxOuDntvKrHQ==} engines: {node: ^18.18.0 || >=20.0.0} '@ungap/structured-clone@1.2.0': @@ -3181,8 +3183,8 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - knip@5.17.3: - resolution: {integrity: sha512-x2paKB0BOzFjnetYolGwg9Dwa8ZIYwBuVP2V4bWRFfTeLs7BymARb7I00R3OCbr09gKKr8TPLQVx2GQ6RF9llQ==} + knip@5.18.1: + resolution: {integrity: sha512-+EKgZVhlLGPj9tHtRMeW8oVy1tEUelmJ/1xfQyqdzmCYOd03MJA+8GXAtSZ9me4dxj/3qcPcunQhpZOeJ5wpNg==} engines: {node: '>=18.6.0'} hasBin: true peerDependencies: @@ -3592,9 +3594,6 @@ packages: pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} @@ -3633,8 +3632,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier@3.2.5: - resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} + prettier@3.3.1: + resolution: {integrity: sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==} engines: {node: '>=14'} hasBin: true @@ -4191,8 +4190,8 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} - typescript-eslint@7.11.0: - resolution: {integrity: sha512-ZKe3yHF/IS/kCUE4CGE3UgtK+Q7yRk1e9kwEI0rqm9XxMTd9P1eHe0LVVtrZ3oFuIQ2unJ9Xn0vTsLApzJ3aPw==} + typescript-eslint@7.12.0: + resolution: {integrity: sha512-D6HKNbQcnNu3BaN4HkQCR16tgG8Q2AMUWPgvhrJksOXu+d6ys07yC06ONiV2kcsEfWC22voB6C3PvK2MqlBZ7w==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -4311,8 +4310,8 @@ packages: vite: optional: true - vite@5.2.12: - resolution: {integrity: sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA==} + vite@5.2.13: + resolution: {integrity: sha512-SSq1noJfY9pR3I1TUENL3rQYDQCFqgD+lM6fTRAM8Nv6Lsg5hDLaXkjETVeBt+7vZBCMoibD+6IWnT2mJ+Zb/A==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -5996,11 +5995,11 @@ snapshots: '@lingui/core': 4.11.1 react: 18.3.1 - '@lingui/vite-plugin@4.11.1(typescript@5.4.5)(vite@5.2.12(@types/node@20.13.0))': + '@lingui/vite-plugin@4.11.1(typescript@5.4.5)(vite@5.2.13(@types/node@20.13.0))': dependencies: '@lingui/cli': 4.11.1(typescript@5.4.5) '@lingui/conf': 4.11.1(typescript@5.4.5) - vite: 5.2.12(@types/node@20.13.0) + vite: 5.2.13(@types/node@20.13.0) transitivePeerDependencies: - supports-color - typescript @@ -6121,7 +6120,7 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 - '@mui/x-data-grid@7.6.1(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/x-data-grid@7.6.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.24.6 '@mui/material': 5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -6137,7 +6136,7 @@ snapshots: - '@emotion/styled' - '@types/react' - '@mui/x-date-pickers@7.6.1(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(date-fns@3.6.0)(dayjs@1.11.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/x-date-pickers@7.6.2(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@mui/material@5.15.19(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react@18.3.1))(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.3)(date-fns@3.6.0)(dayjs@1.11.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.24.6 '@mui/base': 5.0.0-beta.40(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -6362,7 +6361,7 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/lodash@4.17.4': {} + '@types/lodash@4.17.5': {} '@types/node@20.13.0': dependencies: @@ -6416,14 +6415,14 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@7.11.0(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.12.0(@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.11.0 - '@typescript-eslint/type-utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.11.0 + '@typescript-eslint/parser': 7.12.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.12.0 + '@typescript-eslint/type-utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.12.0 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -6434,12 +6433,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 7.11.0 - '@typescript-eslint/types': 7.11.0 - '@typescript-eslint/typescript-estree': 7.11.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.11.0 + '@typescript-eslint/scope-manager': 7.12.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.12.0 debug: 4.3.5 eslint: 8.57.0 optionalDependencies: @@ -6452,15 +6451,15 @@ snapshots: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/visitor-keys': 5.62.0 - '@typescript-eslint/scope-manager@7.11.0': + '@typescript-eslint/scope-manager@7.12.0': dependencies: - '@typescript-eslint/types': 7.11.0 - '@typescript-eslint/visitor-keys': 7.11.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/visitor-keys': 7.12.0 - '@typescript-eslint/type-utils@7.11.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.12.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 7.11.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) debug: 4.3.5 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.5) @@ -6471,7 +6470,7 @@ snapshots: '@typescript-eslint/types@5.62.0': {} - '@typescript-eslint/types@7.11.0': {} + '@typescript-eslint/types@7.12.0': {} '@typescript-eslint/typescript-estree@5.62.0(typescript@5.4.5)': dependencies: @@ -6487,10 +6486,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@7.11.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@7.12.0(typescript@5.4.5)': dependencies: - '@typescript-eslint/types': 7.11.0 - '@typescript-eslint/visitor-keys': 7.11.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/visitor-keys': 7.12.0 debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 @@ -6517,12 +6516,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@7.11.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.12.0(eslint@8.57.0)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 7.11.0 - '@typescript-eslint/types': 7.11.0 - '@typescript-eslint/typescript-estree': 7.11.0(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.12.0 + '@typescript-eslint/types': 7.12.0 + '@typescript-eslint/typescript-estree': 7.12.0(typescript@5.4.5) eslint: 8.57.0 transitivePeerDependencies: - supports-color @@ -6533,25 +6532,25 @@ snapshots: '@typescript-eslint/types': 5.62.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@7.11.0': + '@typescript-eslint/visitor-keys@7.12.0': dependencies: - '@typescript-eslint/types': 7.11.0 + '@typescript-eslint/types': 7.12.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-basic-ssl@1.1.0(vite@5.2.12(@types/node@20.13.0))': + '@vitejs/plugin-basic-ssl@1.1.0(vite@5.2.13(@types/node@20.13.0))': dependencies: - vite: 5.2.12(@types/node@20.13.0) + vite: 5.2.13(@types/node@20.13.0) - '@vitejs/plugin-react@4.3.0(vite@5.2.12(@types/node@20.13.0))': + '@vitejs/plugin-react@4.3.0(vite@5.2.13(@types/node@20.13.0))': dependencies: '@babel/core': 7.24.6 '@babel/plugin-transform-react-jsx-self': 7.24.6(@babel/core@7.24.6) '@babel/plugin-transform-react-jsx-source': 7.24.6(@babel/core@7.24.6) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.2.12(@types/node@20.13.0) + vite: 5.2.13(@types/node@20.13.0) transitivePeerDependencies: - supports-color @@ -8149,7 +8148,7 @@ snapshots: dependencies: json-buffer: 3.0.1 - knip@5.17.3(@types/node@20.13.0)(typescript@5.4.5): + knip@5.18.1(@types/node@20.13.0)(typescript@5.4.5): dependencies: '@ericcornelissen/bash-parser': 0.5.2 '@nodelib/fs.walk': 2.0.0 @@ -8161,7 +8160,7 @@ snapshots: jiti: 1.21.0 js-yaml: 4.1.0 minimist: 1.2.8 - picocolors: 1.0.0 + picocolors: 1.0.1 picomatch: 4.0.2 pretty-ms: 9.0.0 resolve: 1.22.8 @@ -8580,8 +8579,6 @@ snapshots: pathval@1.1.1: {} - picocolors@1.0.0: {} - picocolors@1.0.1: {} picomatch@2.3.1: {} @@ -8612,7 +8609,7 @@ snapshots: prelude-ls@1.2.1: {} - prettier@3.2.5: {} + prettier@3.3.1: {} pretty-format@29.7.0: dependencies: @@ -9189,11 +9186,11 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - typescript-eslint@7.11.0(eslint@8.57.0)(typescript@5.4.5): + typescript-eslint@7.12.0(eslint@8.57.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/eslint-plugin': 7.11.0(@typescript-eslint/parser@7.11.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.11.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.11.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.12.0(@typescript-eslint/parser@7.12.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.12.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.12.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 optionalDependencies: typescript: 5.4.5 @@ -9263,7 +9260,7 @@ snapshots: debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.2.12(@types/node@20.13.0) + vite: 5.2.13(@types/node@20.13.0) transitivePeerDependencies: - '@types/node' - less @@ -9274,7 +9271,7 @@ snapshots: - supports-color - terser - vite-plugin-checker@0.6.4(eslint@8.57.0)(optionator@0.9.4)(typescript@5.4.5)(vite@5.2.12(@types/node@20.13.0)): + vite-plugin-checker@0.6.4(eslint@8.57.0)(optionator@0.9.4)(typescript@5.4.5)(vite@5.2.13(@types/node@20.13.0)): dependencies: '@babel/code-frame': 7.24.6 ansi-escapes: 4.3.2 @@ -9287,7 +9284,7 @@ snapshots: semver: 7.6.2 strip-ansi: 6.0.1 tiny-invariant: 1.3.3 - vite: 5.2.12(@types/node@20.13.0) + vite: 5.2.13(@types/node@20.13.0) vscode-languageclient: 7.0.0 vscode-languageserver: 7.0.0 vscode-languageserver-textdocument: 1.0.11 @@ -9297,18 +9294,18 @@ snapshots: optionator: 0.9.4 typescript: 5.4.5 - vite-tsconfig-paths@4.3.2(typescript@5.4.5)(vite@5.2.12(@types/node@20.13.0)): + vite-tsconfig-paths@4.3.2(typescript@5.4.5)(vite@5.2.13(@types/node@20.13.0)): dependencies: debug: 4.3.5 globrex: 0.1.2 tsconfck: 3.1.0(typescript@5.4.5) optionalDependencies: - vite: 5.2.12(@types/node@20.13.0) + vite: 5.2.13(@types/node@20.13.0) transitivePeerDependencies: - supports-color - typescript - vite@5.2.12(@types/node@20.13.0): + vite@5.2.13(@types/node@20.13.0): dependencies: esbuild: 0.20.2 postcss: 8.4.38 @@ -9336,7 +9333,7 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.2.12(@types/node@20.13.0) + vite: 5.2.13(@types/node@20.13.0) vite-node: 1.6.0(@types/node@20.13.0) why-is-node-running: 2.2.2 optionalDependencies: From c7a54f07a57623f4a86c51e8f1d0957b6fda3df4 Mon Sep 17 00:00:00 2001 From: Ian Krieger <48930920+IanKrieger@users.noreply.github.com> Date: Thu, 13 Jun 2024 08:38:18 -0400 Subject: [PATCH 4/4] chore: simplify advertiser update API (#1232) Uses new GraphQL definition to simplify server interaction --- src/auth/components/AdvertiserDetailsForm.tsx | 15 ++- src/graphql-client/gql.ts | 9 +- src/graphql-client/graphql.ts | 32 +++-- src/graphql/ads-serve.graphql.schema.json | 110 ++++++++++++++++-- src/graphql/advertiser.graphql | 7 -- src/user/settings/NewKeyPairModal.tsx | 8 +- 6 files changed, 147 insertions(+), 34 deletions(-) diff --git a/src/auth/components/AdvertiserDetailsForm.tsx b/src/auth/components/AdvertiserDetailsForm.tsx index 55551ed3..b800f5e3 100644 --- a/src/auth/components/AdvertiserDetailsForm.tsx +++ b/src/auth/components/AdvertiserDetailsForm.tsx @@ -10,7 +10,6 @@ import { useHistory } from "react-router-dom"; import { AdvertiserBillingAddressDocument, PaymentType, - UpdateAdvertiserDocument, } from "@/graphql-client/graphql"; import { AdvertiserAgreed } from "@/auth/components/AdvertiserAgreed"; import { FormikSubmitButton } from "@/form/FormikButton"; @@ -20,6 +19,16 @@ import { useTrackWithMatomo } from "@/hooks/useTrackWithMatomo"; import _ from "lodash"; import { msg, Trans } from "@lingui/macro"; import { useMutation, useQuery } from "@apollo/client"; +import { graphql } from "@/graphql-client/index"; + +export const Advertiser_Update = graphql(` + mutation UpdateAdvertiser($input: UpdateSelfServeAdvertiserInput!) { + updateSelfServeAdvertiser(updateAdvertiserInput: $input) { + id + publicKey + } + } +`); export function AdvertiserDetailsForm() { const { trackMatomoEvent } = useTrackWithMatomo({ @@ -35,7 +44,7 @@ export function AdvertiserDetailsForm() { initialAdvertiserForm(!requiresPaymentAgree), ); - const [mutation] = useMutation(UpdateAdvertiserDocument, { + const [mutation] = useMutation(Advertiser_Update, { async onCompleted() { const user = await getUser(); setSessionUser(user); @@ -63,7 +72,7 @@ export function AdvertiserDetailsForm() { setSubmitting(true); await mutation({ variables: { - updateAdvertiserInput: { + input: { id: advertiser.id, agreed: v.terms && v.tracking && v.payment && v.language, billingAddress: v.address.id diff --git a/src/graphql-client/gql.ts b/src/graphql-client/gql.ts index 49336503..1aaa3fba 100644 --- a/src/graphql-client/gql.ts +++ b/src/graphql-client/gql.ts @@ -13,8 +13,9 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document- * Therefore it is highly recommended to use the babel or swc plugin for production. */ const documents = { + "\n mutation UpdateAdvertiser($input: UpdateSelfServeAdvertiserInput!) {\n updateSelfServeAdvertiser(updateAdvertiserInput: $input) {\n id\n publicKey\n }\n }\n": types.UpdateAdvertiserDocument, "fragment AdSet on AdSet {\n id\n price\n createdAt\n billingType\n name\n totalMax\n perDay\n state\n segments {\n code\n name\n }\n oses {\n code\n name\n }\n conversions {\n id\n type\n urlPattern\n observationWindow\n }\n ads {\n ...Ad\n }\n}\n\nfragment Ad on Ad {\n id\n state\n creative {\n ...Creative\n }\n}\n\nfragment AdSetWithDeletedAds on AdSet {\n id\n createdAt\n name\n state\n billingType\n oses {\n code\n name\n }\n segments {\n code\n name\n }\n conversions {\n id\n }\n ads(includeDeleted: true) {\n ...Ad\n }\n}\n\nmutation CreateAdSet($createAdSetInput: CreateAdSetInput!) {\n createAdSet(createAdSetInput: $createAdSetInput) {\n ...AdSet\n }\n}\n\nmutation UpdateAdSet($updateAdSetInput: UpdateAdSetInput!) {\n updateAdSet(updateAdSetInput: $updateAdSetInput) {\n ...AdSet\n }\n}": types.AdSetFragmentDoc, - "fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nmutation UpdateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {\n updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}": types.AdvertiserBillingAddressFragmentDoc, + "fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}": types.AdvertiserBillingAddressFragmentDoc, "fragment Engagement on Engagement {\n creativeinstanceid\n createdat\n type\n pricetype\n creativesetname\n creativesetid\n creativename\n creativeid\n creativestate\n creativepayload\n view\n click\n viewthroughConversion\n clickthroughConversion\n conversion\n dismiss\n downvote\n landed\n spend\n upvote\n price\n android\n ios\n linux\n macos\n windows\n}\n\nfragment CampaignWithEngagements on Campaign {\n id\n name\n state\n budget\n spent\n createdAt\n startAt\n endAt\n currency\n pacingIndex\n format\n adSets {\n id\n conversions {\n id\n type\n extractExternalId\n }\n }\n engagements {\n ...Engagement\n }\n}\n\nquery AnalyticOverview($id: String!) {\n campaign(id: $id) {\n ...CampaignWithEngagements\n }\n}\n\nfragment CampaignMetricSummaryValues on Metrics {\n click\n impression\n siteVisit\n spendUsd\n rates {\n clickThrough\n }\n}\n\nquery CampaignMetrics($campaignIds: [String!]!) {\n performance(filter: {campaignIds: $campaignIds}) {\n values {\n dimensions {\n campaign {\n id\n }\n }\n metrics {\n ...CampaignMetricSummaryValues\n }\n }\n }\n}\n\nfragment CampaignMetricDetailValues on Metrics {\n click\n impression\n siteVisit\n conversion\n dismiss\n spendUsd\n rates {\n clickThrough\n clickToConversion\n costPerAcquisition\n }\n}\n\nfragment DailyValues on Performance {\n dimensions {\n day\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n}\n\nquery FetchDailyMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...DailyValues\n }\n total {\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n }\n}\n\nfragment AdSetValues on Performance {\n dimensions {\n adSet {\n id\n name\n state\n billingType\n }\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n}\n\nquery FetchAdSetMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...AdSetValues\n }\n }\n}": types.EngagementFragmentDoc, "fragment Campaign on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\n stripePaymentId\n hasPaymentIntent\n dayPartings {\n dow\n startMinute\n endMinute\n }\n geoTargets {\n code\n name\n }\n adSets {\n ...AdSet\n }\n advertiser {\n id\n }\n}\n\nfragment CampaignSummary on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n paymentType\n createdAt\n startAt\n endAt\n source\n type\n format\n dayProportion\n brandedKeywords\n advertiser {\n id\n name\n }\n}\n\nfragment CampaignAds on Campaign {\n id\n name\n state\n startAt\n endAt\n source\n currency\n format\n advertiser {\n id\n }\n adSets {\n ...AdSetWithDeletedAds\n }\n}\n\nquery LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n}\n\nquery LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n}\n\nmutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n}\n\nmutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n}": types.CampaignFragmentDoc, "fragment Geocode on Geocode {\n code\n name\n}\n\nfragment Segment on Segment {\n code\n name\n}\n\nquery ActiveGeocodes {\n geocodes {\n ...Geocode\n }\n}\n\nquery Segments {\n segments {\n data {\n ...Segment\n }\n }\n}": types.GeocodeFragmentDoc, @@ -46,6 +47,10 @@ const documents = { */ export function graphql(source: string): unknown; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation UpdateAdvertiser($input: UpdateSelfServeAdvertiserInput!) {\n updateSelfServeAdvertiser(updateAdvertiserInput: $input) {\n id\n publicKey\n }\n }\n"): (typeof documents)["\n mutation UpdateAdvertiser($input: UpdateSelfServeAdvertiserInput!) {\n updateSelfServeAdvertiser(updateAdvertiserInput: $input) {\n id\n publicKey\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -53,7 +58,7 @@ export function graphql(source: "fragment AdSet on AdSet {\n id\n price\n cre /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nmutation UpdateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {\n updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}"): (typeof documents)["fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nmutation UpdateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {\n updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}"]; +export function graphql(source: "fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}"): (typeof documents)["fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/src/graphql-client/graphql.ts b/src/graphql-client/graphql.ts index 9fc5bf92..104d5695 100644 --- a/src/graphql-client/graphql.ts +++ b/src/graphql-client/graphql.ts @@ -600,7 +600,7 @@ export type CreateTypeInput = { export type CreateUserInput = { email: Scalars['String']['input']; - emailVerified: Scalars['Boolean']['input']; + emailVerified?: InputMaybe; fullName: Scalars['String']['input']; password?: InputMaybe; role: Scalars['String']['input']; @@ -878,6 +878,7 @@ export type Mutation = { updateCampaign: Campaign; updateCreative: Creative; updateNotificationCreative: Creative; + updateSelfServeAdvertiser: Advertiser; updateUser: User; }; @@ -1007,6 +1008,11 @@ export type MutationUpdateNotificationCreativeArgs = { }; +export type MutationUpdateSelfServeAdvertiserArgs = { + updateAdvertiserInput: UpdateSelfServeAdvertiserInput; +}; + + export type MutationUpdateUserArgs = { updateUserInput: UpdateUserInput; }; @@ -1600,6 +1606,14 @@ export type UpdateSegmentInput = { name?: InputMaybe; }; +export type UpdateSelfServeAdvertiserInput = { + /** Agreed to Terms And Conditions - Advertiser Facing Dashboard */ + agreed?: InputMaybe; + billingAddress?: InputMaybe; + id: Scalars['String']['input']; + publicKey?: InputMaybe; +}; + export type UpdateUserInput = { email?: InputMaybe; emailVerified?: InputMaybe; @@ -1648,6 +1662,13 @@ export type CreateWebhookInput = { url: Scalars['String']['input']; }; +export type UpdateAdvertiserMutationVariables = Exact<{ + input: UpdateSelfServeAdvertiserInput; +}>; + + +export type UpdateAdvertiserMutation = { __typename?: 'Mutation', updateSelfServeAdvertiser: { __typename?: 'Advertiser', id: string, publicKey?: string | null } }; + export type AdSetFragment = { __typename?: 'AdSet', id: string, price: string, createdAt: string, billingType?: string | null, name: string, totalMax: number, perDay: number, state: string, segments: Array<{ __typename?: 'Segment', code: string, name: string }>, oses: Array<{ __typename?: 'OS', code: string, name: string }>, conversions: Array<{ __typename?: 'Conversion', id: string, type: string, urlPattern: string, observationWindow: number }>, ads: Array<{ __typename?: 'Ad', id: string, state: string, creative: { __typename?: 'Creative', id: string, createdAt: string, modifiedAt: string, name: string, state: string, type: { __typename?: 'CreativeType', code: string }, payloadNotification?: { __typename?: 'NotificationPayload', body: string, title: string, targetUrl: string } | null, payloadNewTabPage?: { __typename?: 'NewTabPagePayload', logo?: { __typename?: 'Logo', imageUrl: string, alt: string, companyName: string, destinationUrl: string } | null, wallpapers?: Array<{ __typename?: 'Wallpaper', imageUrl: string, focalPoint: { __typename?: 'FocalPoint', x: number, y: number } }> | null } | null, payloadInlineContent?: { __typename?: 'InlineContentPayload', title: string, ctaText: string, imageUrl: string, targetUrl: string, dimensions: string, description: string } | null, payloadSearch?: { __typename?: 'SearchPayload', body: string, title: string, targetUrl: string } | null, payloadSearchHomepage?: { __typename?: 'SearchHomepagePayload', body: string, imageUrl: string, imageDarkModeUrl?: string | null, targetUrl: string, title: string, ctaText: string } | null } }> }; export type AdFragment = { __typename?: 'Ad', id: string, state: string, creative: { __typename?: 'Creative', id: string, createdAt: string, modifiedAt: string, name: string, state: string, type: { __typename?: 'CreativeType', code: string }, payloadNotification?: { __typename?: 'NotificationPayload', body: string, title: string, targetUrl: string } | null, payloadNewTabPage?: { __typename?: 'NewTabPagePayload', logo?: { __typename?: 'Logo', imageUrl: string, alt: string, companyName: string, destinationUrl: string } | null, wallpapers?: Array<{ __typename?: 'Wallpaper', imageUrl: string, focalPoint: { __typename?: 'FocalPoint', x: number, y: number } }> | null } | null, payloadInlineContent?: { __typename?: 'InlineContentPayload', title: string, ctaText: string, imageUrl: string, targetUrl: string, dimensions: string, description: string } | null, payloadSearch?: { __typename?: 'SearchPayload', body: string, title: string, targetUrl: string } | null, payloadSearchHomepage?: { __typename?: 'SearchHomepagePayload', body: string, imageUrl: string, imageDarkModeUrl?: string | null, targetUrl: string, title: string, ctaText: string } | null } }; @@ -1677,13 +1698,6 @@ export type AdvertiserQueryVariables = Exact<{ export type AdvertiserQuery = { __typename?: 'Query', advertiser?: { __typename?: 'Advertiser', id: string, publicKey?: string | null } | null }; -export type UpdateAdvertiserMutationVariables = Exact<{ - updateAdvertiserInput: UpdateAdvertiserInput; -}>; - - -export type UpdateAdvertiserMutation = { __typename?: 'Mutation', updateAdvertiser: { __typename?: 'Advertiser', id: string, publicKey?: string | null } }; - export type AdvertiserCampaignsFragment = { __typename?: 'Advertiser', id: string, name: string, selfServiceManageCampaign: boolean, selfServiceSetPrice: boolean, campaigns: Array<{ __typename?: 'Campaign', id: string, name: string, state: string, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, advertiser: { __typename?: 'Advertiser', id: string, name: string } }> }; export type AdvertiserCampaignsQueryVariables = Exact<{ @@ -1975,10 +1989,10 @@ export const HourlyValuesFragmentDoc = {"kind":"Document","definitions":[{"kind" export const CampaignOverviewFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignOverview"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"extractExternalId"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; export const SearchProspectsLandingPageListFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SearchProspectsLandingPageList"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SearchLandingPageWithStats"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"rank"}},{"kind":"Field","name":{"kind":"Name","value":"lastSeen"}},{"kind":"Field","name":{"kind":"Name","value":"favicon"}},{"kind":"Field","name":{"kind":"Name","value":"creatives"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"lastSeen"}}]}}]}}]} as unknown as DocumentNode; export const SearchProspectsLandingPageDetailFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SearchProspectsLandingPageDetail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SearchLandingPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"queries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"query"}}]}}]}}]} as unknown as DocumentNode; +export const UpdateAdvertiserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateAdvertiser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateSelfServeAdvertiserInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateSelfServeAdvertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"updateAdvertiserInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"publicKey"}}]}}]}}]} as unknown as DocumentNode; export const CreateAdSetDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateAdSet"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"createAdSetInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateAdSetInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createAdSet"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"createAdSetInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"createAdSetInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdSet"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Creative"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Creative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"modifiedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"type"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadNotification"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadNewTabPage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"logo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"alt"}},{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"wallpapers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"focalPoint"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"x"}},{"kind":"Field","name":{"kind":"Name","value":"y"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadInlineContent"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"ctaText"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"dimensions"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadSearch"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadSearchHomepage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"imageDarkModeUrl"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"ctaText"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Ad"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Ad"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"creative"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdSet"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdSet"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"totalMax"}},{"kind":"Field","name":{"kind":"Name","value":"perDay"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"oses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"urlPattern"}},{"kind":"Field","name":{"kind":"Name","value":"observationWindow"}}]}},{"kind":"Field","name":{"kind":"Name","value":"ads"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Ad"}}]}}]}}]} as unknown as DocumentNode; export const UpdateAdSetDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateAdSet"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updateAdSetInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateAdSetInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateAdSet"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"updateAdSetInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updateAdSetInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdSet"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Creative"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Creative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"modifiedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"type"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadNotification"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadNewTabPage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"logo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"alt"}},{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"wallpapers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"focalPoint"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"x"}},{"kind":"Field","name":{"kind":"Name","value":"y"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadInlineContent"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"ctaText"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"dimensions"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadSearch"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadSearchHomepage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"imageDarkModeUrl"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"ctaText"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Ad"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Ad"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"creative"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdSet"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdSet"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"totalMax"}},{"kind":"Field","name":{"kind":"Name","value":"perDay"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"oses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"urlPattern"}},{"kind":"Field","name":{"kind":"Name","value":"observationWindow"}}]}},{"kind":"Field","name":{"kind":"Name","value":"ads"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Ad"}}]}}]}}]} as unknown as DocumentNode; export const AdvertiserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Advertiser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"publicKey"}}]}}]}}]} as unknown as DocumentNode; -export const UpdateAdvertiserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateAdvertiser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updateAdvertiserInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateAdvertiserInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateAdvertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"updateAdvertiserInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updateAdvertiserInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"publicKey"}}]}}]}}]} as unknown as DocumentNode; export const AdvertiserCampaignsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserCampaigns"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserCampaignFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiserCampaigns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserCampaigns"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserCampaigns"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Advertiser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceManageCampaign"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceSetPrice"}},{"kind":"Field","name":{"kind":"Name","value":"campaigns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}}]}}]}}]} as unknown as DocumentNode; export const AdvertiserImagesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserImages"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"images"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserImage"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserImage"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserImage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; export const AdvertiserPricesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserPrices"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"prices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserPrice"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserPrice"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserPrice"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billingModelPrice"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"kind":"Field","name":{"kind":"Name","value":"format"}}]}}]} as unknown as DocumentNode; diff --git a/src/graphql/ads-serve.graphql.schema.json b/src/graphql/ads-serve.graphql.schema.json index e8aa25e5..89de46e3 100644 --- a/src/graphql/ads-serve.graphql.schema.json +++ b/src/graphql/ads-serve.graphql.schema.json @@ -5813,15 +5813,11 @@ "name": "emailVerified", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, - "defaultValue": null, + "defaultValue": "false", "isDeprecated": false, "deprecationReason": null }, @@ -9192,6 +9188,39 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "updateSelfServeAdvertiser", + "description": null, + "args": [ + { + "name": "updateAdvertiserInput", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateSelfServeAdvertiserInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Advertiser", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "updateUser", "description": null, @@ -14526,6 +14555,69 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateSelfServeAdvertiserInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "agreed", + "description": "Agreed to Terms And Conditions - Advertiser Facing Dashboard", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "billingAddress", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateAddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicKey", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "UpdateUserInput", @@ -14552,7 +14644,7 @@ "name": "Boolean", "ofType": null }, - "defaultValue": null, + "defaultValue": "false", "isDeprecated": false, "deprecationReason": null }, diff --git a/src/graphql/advertiser.graphql b/src/graphql/advertiser.graphql index bde36074..189b3ac2 100644 --- a/src/graphql/advertiser.graphql +++ b/src/graphql/advertiser.graphql @@ -17,13 +17,6 @@ query Advertiser($id: String!) { } } -mutation UpdateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) { - updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) { - id - publicKey - } -} - fragment AdvertiserCampaigns on Advertiser { id name diff --git a/src/user/settings/NewKeyPairModal.tsx b/src/user/settings/NewKeyPairModal.tsx index 6772e8db..860fc46d 100644 --- a/src/user/settings/NewKeyPairModal.tsx +++ b/src/user/settings/NewKeyPairModal.tsx @@ -14,7 +14,7 @@ import { modalStyles } from "@/theme"; import { msg, Trans } from "@lingui/macro"; import { useLingui } from "@lingui/react"; import { useMutation } from "@apollo/client"; -import { UpdateAdvertiserDocument } from "@/graphql-client/graphql"; +import { Advertiser_Update } from "@/auth/components/AdvertiserDetailsForm"; interface Props { advertiser: IAdvertiser; @@ -32,9 +32,9 @@ export function NewKeyPairModal({ advertiser }: Props) { const [newKeypairModalState, setNewKeypairModalState] = useState("disclaimer"); - const [updateAdvertiser] = useMutation(UpdateAdvertiserDocument, { + const [updateAdvertiser] = useMutation(Advertiser_Update, { variables: { - updateAdvertiserInput: { + input: { id: advertiser.id, publicKey: publicKey.current, }, @@ -55,7 +55,7 @@ export function NewKeyPairModal({ advertiser }: Props) { setSaving(true); updateAdvertiser({ variables: { - updateAdvertiserInput: { + input: { id: advertiser.id, publicKey: newPublicKey, },