mozrest-sdk-react-dev 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mozrest-sdk.es.js +205 -32
- package/package.json +1 -1
package/mozrest-sdk.es.js
CHANGED
|
@@ -89116,7 +89116,7 @@ const formatParams$1 = (params) => {
|
|
|
89116
89116
|
}
|
|
89117
89117
|
return all2;
|
|
89118
89118
|
};
|
|
89119
|
-
const formatStats = (stat) => {
|
|
89119
|
+
const formatStats$1 = (stat) => {
|
|
89120
89120
|
var _a2;
|
|
89121
89121
|
let sum = 0;
|
|
89122
89122
|
(_a2 = stat.timeSeries) == null ? void 0 : _a2.datedValues.map((v2) => {
|
|
@@ -89135,30 +89135,30 @@ const formatData$3 = (dataToFormat) => {
|
|
|
89135
89135
|
branded: 4321
|
|
89136
89136
|
},
|
|
89137
89137
|
views: {
|
|
89138
|
-
total: getTotalViews(dataToFormat),
|
|
89139
|
-
search_desktop: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH),
|
|
89140
|
-
search_mobile: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH),
|
|
89141
|
-
maps_desktop: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS),
|
|
89142
|
-
maps_mobile: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_MAPS)
|
|
89138
|
+
total: getTotalViews$1(dataToFormat),
|
|
89139
|
+
search_desktop: formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH),
|
|
89140
|
+
search_mobile: formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH),
|
|
89141
|
+
maps_desktop: formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS),
|
|
89142
|
+
maps_mobile: formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_MAPS)
|
|
89143
89143
|
},
|
|
89144
89144
|
actions: {
|
|
89145
|
-
total: getTotalActions(dataToFormat),
|
|
89146
|
-
website_clicks: formatStats(dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS),
|
|
89147
|
-
calls: formatStats(dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS),
|
|
89148
|
-
direction_requests: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS)
|
|
89145
|
+
total: getTotalActions$1(dataToFormat),
|
|
89146
|
+
website_clicks: formatStats$1(dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS),
|
|
89147
|
+
calls: formatStats$1(dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS),
|
|
89148
|
+
direction_requests: formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS)
|
|
89149
89149
|
}
|
|
89150
89150
|
},
|
|
89151
|
-
views: getViewsGraphData(dataToFormat),
|
|
89152
|
-
actions: getActionsGraphData(dataToFormat)
|
|
89151
|
+
views: getViewsGraphData$1(dataToFormat),
|
|
89152
|
+
actions: getActionsGraphData$1(dataToFormat)
|
|
89153
89153
|
};
|
|
89154
89154
|
};
|
|
89155
|
-
const getTotalViews = (dataToFormat) => {
|
|
89156
|
-
return formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH) + formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS) + formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_MAPS) + formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH);
|
|
89155
|
+
const getTotalViews$1 = (dataToFormat) => {
|
|
89156
|
+
return formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH) + formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS) + formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_MAPS) + formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH);
|
|
89157
89157
|
};
|
|
89158
|
-
const getTotalActions = (dataToFormat) => {
|
|
89159
|
-
return formatStats(dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS) + formatStats(dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS) + formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS);
|
|
89158
|
+
const getTotalActions$1 = (dataToFormat) => {
|
|
89159
|
+
return formatStats$1(dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS) + formatStats$1(dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS) + formatStats$1(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS);
|
|
89160
89160
|
};
|
|
89161
|
-
const buildDates = (dates) => {
|
|
89161
|
+
const buildDates$1 = (dates) => {
|
|
89162
89162
|
let graphStats = [];
|
|
89163
89163
|
for (let i = 0; i < dates.length; i++) {
|
|
89164
89164
|
graphStats.push({
|
|
@@ -89167,31 +89167,31 @@ const buildDates = (dates) => {
|
|
|
89167
89167
|
}
|
|
89168
89168
|
return graphStats;
|
|
89169
89169
|
};
|
|
89170
|
-
const buildData = (base, data2, type4) => {
|
|
89170
|
+
const buildData$1 = (base, data2, type4) => {
|
|
89171
89171
|
for (let i = 0; i < data2.length; i++) {
|
|
89172
89172
|
const nv = (base[i][type4] | 0) + parseInt(data2[i].value | "0");
|
|
89173
89173
|
base[i] = { ...base[i], [type4]: nv };
|
|
89174
89174
|
}
|
|
89175
89175
|
return base;
|
|
89176
89176
|
};
|
|
89177
|
-
const getViewsGraphData = (dataToFormat) => {
|
|
89177
|
+
const getViewsGraphData$1 = (dataToFormat) => {
|
|
89178
89178
|
var _a2, _b, _c, _d, _e2;
|
|
89179
|
-
let graphStats = buildDates((_a2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
89180
|
-
let builder = buildData(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _b.datedValues, "Search");
|
|
89181
|
-
builder = buildData(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH.timeSeries) == null ? void 0 : _c.datedValues, "Search");
|
|
89182
|
-
builder = buildData(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS.timeSeries) == null ? void 0 : _d.datedValues, "Map");
|
|
89183
|
-
builder = buildData(builder, (_e2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_MAPS.timeSeries) == null ? void 0 : _e2.datedValues, "Map");
|
|
89179
|
+
let graphStats = buildDates$1((_a2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
89180
|
+
let builder = buildData$1(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _b.datedValues, "Search");
|
|
89181
|
+
builder = buildData$1(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH.timeSeries) == null ? void 0 : _c.datedValues, "Search");
|
|
89182
|
+
builder = buildData$1(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS.timeSeries) == null ? void 0 : _d.datedValues, "Map");
|
|
89183
|
+
builder = buildData$1(builder, (_e2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_MAPS.timeSeries) == null ? void 0 : _e2.datedValues, "Map");
|
|
89184
89184
|
return builder;
|
|
89185
89185
|
};
|
|
89186
|
-
const getActionsGraphData = (dataToFormat) => {
|
|
89186
|
+
const getActionsGraphData$1 = (dataToFormat) => {
|
|
89187
89187
|
var _a2, _b, _c, _d;
|
|
89188
|
-
let graphStats = buildDates((_a2 = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
89189
|
-
let builder = buildData(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _b.datedValues, "Web");
|
|
89190
|
-
builder = buildData(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS.timeSeries) == null ? void 0 : _c.datedValues, "Calls");
|
|
89191
|
-
builder = buildData(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS.timeSeries) == null ? void 0 : _d.datedValues, "Directions");
|
|
89188
|
+
let graphStats = buildDates$1((_a2 = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
89189
|
+
let builder = buildData$1(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _b.datedValues, "Web");
|
|
89190
|
+
builder = buildData$1(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS.timeSeries) == null ? void 0 : _c.datedValues, "Calls");
|
|
89191
|
+
builder = buildData$1(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS.timeSeries) == null ? void 0 : _d.datedValues, "Directions");
|
|
89192
89192
|
return builder;
|
|
89193
89193
|
};
|
|
89194
|
-
const singleVenue$
|
|
89194
|
+
const singleVenue$2 = async () => {
|
|
89195
89195
|
return await instance$1.get(`listing/venue-listing-summary/venues`, {
|
|
89196
89196
|
params: {
|
|
89197
89197
|
limit: 1,
|
|
@@ -89209,7 +89209,7 @@ const Analytics$1 = ({ venueListingId }) => {
|
|
|
89209
89209
|
range: getCurrentRange()
|
|
89210
89210
|
});
|
|
89211
89211
|
if (listingId === void 0) {
|
|
89212
|
-
singleVenue$
|
|
89212
|
+
singleVenue$2().then((response) => {
|
|
89213
89213
|
setListingId(response == null ? void 0 : response.data[0].id);
|
|
89214
89214
|
return;
|
|
89215
89215
|
});
|
|
@@ -89435,6 +89435,89 @@ const groupByDate = (data2) => {
|
|
|
89435
89435
|
};
|
|
89436
89436
|
});
|
|
89437
89437
|
};
|
|
89438
|
+
const formatStats = (stat) => {
|
|
89439
|
+
var _a2;
|
|
89440
|
+
let sum = 0;
|
|
89441
|
+
(_a2 = stat.timeSeries) == null ? void 0 : _a2.datedValues.map((v2) => {
|
|
89442
|
+
if (v2.value)
|
|
89443
|
+
sum += parseInt(v2.value);
|
|
89444
|
+
});
|
|
89445
|
+
return sum;
|
|
89446
|
+
};
|
|
89447
|
+
const formatDataAnalytics = (dataToFormat) => {
|
|
89448
|
+
return {
|
|
89449
|
+
totals: {
|
|
89450
|
+
queries: {
|
|
89451
|
+
total: 12340,
|
|
89452
|
+
direct: 1234,
|
|
89453
|
+
discovery: 1234,
|
|
89454
|
+
branded: 4321
|
|
89455
|
+
},
|
|
89456
|
+
views: {
|
|
89457
|
+
total: getTotalViews(dataToFormat),
|
|
89458
|
+
search_desktop: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH),
|
|
89459
|
+
search_mobile: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH),
|
|
89460
|
+
maps_desktop: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS),
|
|
89461
|
+
maps_mobile: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_MAPS)
|
|
89462
|
+
},
|
|
89463
|
+
actions: {
|
|
89464
|
+
total: getTotalActions(dataToFormat),
|
|
89465
|
+
website_clicks: formatStats(dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS),
|
|
89466
|
+
calls: formatStats(dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS),
|
|
89467
|
+
direction_requests: formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS)
|
|
89468
|
+
}
|
|
89469
|
+
},
|
|
89470
|
+
views: getViewsGraphData(dataToFormat),
|
|
89471
|
+
actions: getActionsGraphData(dataToFormat)
|
|
89472
|
+
};
|
|
89473
|
+
};
|
|
89474
|
+
const getTotalViews = (dataToFormat) => {
|
|
89475
|
+
return formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH) + formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS) + formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_MAPS) + formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH);
|
|
89476
|
+
};
|
|
89477
|
+
const getTotalActions = (dataToFormat) => {
|
|
89478
|
+
return formatStats(dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS) + formatStats(dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS) + formatStats(dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS);
|
|
89479
|
+
};
|
|
89480
|
+
const buildDates = (dates) => {
|
|
89481
|
+
let graphStats = [];
|
|
89482
|
+
for (let i = 0; i < dates.length; i++) {
|
|
89483
|
+
graphStats.push({
|
|
89484
|
+
name: `${dates[i].date.day}/${dates[i].date.month}/${dates[i].date.year}`
|
|
89485
|
+
});
|
|
89486
|
+
}
|
|
89487
|
+
return graphStats;
|
|
89488
|
+
};
|
|
89489
|
+
const buildData = (base, data2, type4) => {
|
|
89490
|
+
for (let i = 0; i < data2.length; i++) {
|
|
89491
|
+
const nv = (base[i][type4] | 0) + parseInt(data2[i].value | "0");
|
|
89492
|
+
base[i] = { ...base[i], [type4]: nv };
|
|
89493
|
+
}
|
|
89494
|
+
return base;
|
|
89495
|
+
};
|
|
89496
|
+
const getViewsGraphData = (dataToFormat) => {
|
|
89497
|
+
var _a2, _b, _c, _d, _e2;
|
|
89498
|
+
let graphStats = buildDates((_a2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
89499
|
+
let builder = buildData(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.timeSeries) == null ? void 0 : _b.datedValues, "Search");
|
|
89500
|
+
builder = buildData(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_SEARCH.timeSeries) == null ? void 0 : _c.datedValues, "Search");
|
|
89501
|
+
builder = buildData(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_DESKTOP_MAPS.timeSeries) == null ? void 0 : _d.datedValues, "Map");
|
|
89502
|
+
builder = buildData(builder, (_e2 = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_IMPRESSIONS_MOBILE_MAPS.timeSeries) == null ? void 0 : _e2.datedValues, "Map");
|
|
89503
|
+
return builder;
|
|
89504
|
+
};
|
|
89505
|
+
const getActionsGraphData = (dataToFormat) => {
|
|
89506
|
+
var _a2, _b, _c, _d;
|
|
89507
|
+
let graphStats = buildDates((_a2 = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _a2.datedValues);
|
|
89508
|
+
let builder = buildData(graphStats, (_b = dataToFormat == null ? void 0 : dataToFormat.WEBSITE_CLICKS.timeSeries) == null ? void 0 : _b.datedValues, "Web");
|
|
89509
|
+
builder = buildData(builder, (_c = dataToFormat == null ? void 0 : dataToFormat.CALL_CLICKS.timeSeries) == null ? void 0 : _c.datedValues, "Calls");
|
|
89510
|
+
builder = buildData(builder, (_d = dataToFormat == null ? void 0 : dataToFormat.BUSINESS_DIRECTION_REQUESTS.timeSeries) == null ? void 0 : _d.datedValues, "Directions");
|
|
89511
|
+
return builder;
|
|
89512
|
+
};
|
|
89513
|
+
const singleVenue$1 = async () => {
|
|
89514
|
+
return await instance$1.get(`listing/venue-listing-summary/venues`, {
|
|
89515
|
+
params: {
|
|
89516
|
+
limit: 1,
|
|
89517
|
+
offset: 0
|
|
89518
|
+
}
|
|
89519
|
+
});
|
|
89520
|
+
};
|
|
89438
89521
|
const Analytics = ({ venueListingId }) => {
|
|
89439
89522
|
const { t: t2 } = useTranslation();
|
|
89440
89523
|
const [filter, setFilters] = useState({
|
|
@@ -89448,12 +89531,102 @@ const Analytics = ({ venueListingId }) => {
|
|
|
89448
89531
|
params: filter
|
|
89449
89532
|
}, { formatData: formatData$2 });
|
|
89450
89533
|
const comparedPeriod = formatComparedPeriod(filter.compare);
|
|
89534
|
+
const [listingId, setListingId] = useState(venueListingId);
|
|
89535
|
+
const [formattedStats, setFormattedStats] = useState();
|
|
89536
|
+
const [notAuthorized, setNotAuthorized] = useState(false);
|
|
89537
|
+
if (listingId === void 0) {
|
|
89538
|
+
singleVenue$1().then((response) => {
|
|
89539
|
+
setListingId(response == null ? void 0 : response.data[0].id);
|
|
89540
|
+
return;
|
|
89541
|
+
});
|
|
89542
|
+
}
|
|
89543
|
+
const [filterAnalytics, setFilterAnalytics] = useState({
|
|
89544
|
+
findBy: "venueId",
|
|
89545
|
+
range: getTodaysRange()
|
|
89546
|
+
});
|
|
89547
|
+
console.log("filterAnalytics", filterAnalytics);
|
|
89548
|
+
console.log("venueListingId", listingId);
|
|
89549
|
+
const { data: dataListingAnalytics, isLoading: isLoadingListingAnalytics } = useFetch(GetListingAnalytics, {
|
|
89550
|
+
cacheId: `listing-analytics-${listingId}`,
|
|
89551
|
+
params: filterAnalytics,
|
|
89552
|
+
id: listingId
|
|
89553
|
+
});
|
|
89554
|
+
useEffect(() => {
|
|
89555
|
+
if (dataListingAnalytics && !(dataListingAnalytics == null ? void 0 : dataListingAnalytics.error)) {
|
|
89556
|
+
if (dataListingAnalytics && (dataListingAnalytics == null ? void 0 : dataListingAnalytics.BUSINESS_IMPRESSIONS_DESKTOP_SEARCH.error)) {
|
|
89557
|
+
setNotAuthorized(true);
|
|
89558
|
+
} else {
|
|
89559
|
+
setFormattedStats(formatDataAnalytics(dataListingAnalytics));
|
|
89560
|
+
}
|
|
89561
|
+
}
|
|
89562
|
+
}, [data2]);
|
|
89451
89563
|
if (error3) {
|
|
89452
89564
|
return /* @__PURE__ */ React__default.createElement(Error$1, {
|
|
89453
89565
|
error: error3
|
|
89454
89566
|
});
|
|
89455
89567
|
}
|
|
89456
|
-
return /* @__PURE__ */ React__default.createElement(LayoutPage$1, null, /* @__PURE__ */ React__default.createElement("div", null,
|
|
89568
|
+
return /* @__PURE__ */ React__default.createElement(LayoutPage$1, null, /* @__PURE__ */ React__default.createElement("div", null, isLoadingListingAnalytics && /* @__PURE__ */ React__default.createElement(LayoutPage$1, null, /* @__PURE__ */ React__default.createElement("div", null, /* @__PURE__ */ React__default.createElement("p", null, /* @__PURE__ */ React__default.createElement("img", {
|
|
89569
|
+
src: Loader,
|
|
89570
|
+
className: styles$7.loader,
|
|
89571
|
+
alt: "Loading"
|
|
89572
|
+
}), "Loading listing analytics"))), !isLoadingListingAnalytics && formattedStats && !(dataListingAnalytics == null ? void 0 : dataListingAnalytics.error) && !notAuthorized && /* @__PURE__ */ React__default.createElement(Row$1, {
|
|
89573
|
+
gutter: [28, 28],
|
|
89574
|
+
style: { marginBottom: 28 }
|
|
89575
|
+
}, /* @__PURE__ */ React__default.createElement(Col$1, {
|
|
89576
|
+
xs: 24,
|
|
89577
|
+
md: 12,
|
|
89578
|
+
lg: 12
|
|
89579
|
+
}, /* @__PURE__ */ React__default.createElement(StatsCard, {
|
|
89580
|
+
value: formattedStats == null ? void 0 : formattedStats.totals.views.total,
|
|
89581
|
+
comparison: 0,
|
|
89582
|
+
title: t2("VIEWS"),
|
|
89583
|
+
icon: /* @__PURE__ */ React__default.createElement(CircleIcon, {
|
|
89584
|
+
icon: Eye$1,
|
|
89585
|
+
color: "blue"
|
|
89586
|
+
})
|
|
89587
|
+
}, /* @__PURE__ */ React__default.createElement(ParamsList, {
|
|
89588
|
+
params: [
|
|
89589
|
+
{
|
|
89590
|
+
title: t2("VIEWSONGOOSEARCH"),
|
|
89591
|
+
value: (formattedStats == null ? void 0 : formattedStats.totals.views.search_desktop) + (formattedStats == null ? void 0 : formattedStats.totals.views.search_mobile),
|
|
89592
|
+
tooltip: t2("VIEWSONGOOSEARCH")
|
|
89593
|
+
},
|
|
89594
|
+
{
|
|
89595
|
+
title: t2("VIEWSONGOOMAP"),
|
|
89596
|
+
value: (formattedStats == null ? void 0 : formattedStats.totals.views.maps_desktop) + (formattedStats == null ? void 0 : formattedStats.totals.views.maps_mobile),
|
|
89597
|
+
tooltip: t2("VIEWSONGOOMAP")
|
|
89598
|
+
}
|
|
89599
|
+
]
|
|
89600
|
+
}))), /* @__PURE__ */ React__default.createElement(Col$1, {
|
|
89601
|
+
xs: 24,
|
|
89602
|
+
lg: 12
|
|
89603
|
+
}, /* @__PURE__ */ React__default.createElement(StatsCard, {
|
|
89604
|
+
value: formattedStats == null ? void 0 : formattedStats.totals.actions.total,
|
|
89605
|
+
comparison: 0,
|
|
89606
|
+
title: t2("ACTIONS"),
|
|
89607
|
+
icon: /* @__PURE__ */ React__default.createElement(CircleIcon, {
|
|
89608
|
+
icon: MousePointer$1,
|
|
89609
|
+
color: "red"
|
|
89610
|
+
})
|
|
89611
|
+
}, /* @__PURE__ */ React__default.createElement(ParamsList, {
|
|
89612
|
+
params: [
|
|
89613
|
+
{
|
|
89614
|
+
title: t2("WEBSITEVISITS"),
|
|
89615
|
+
value: formattedStats == null ? void 0 : formattedStats.totals.actions.website_clicks,
|
|
89616
|
+
tooltip: t2("WEBSITEVISITS")
|
|
89617
|
+
},
|
|
89618
|
+
{
|
|
89619
|
+
title: t2("CALLS"),
|
|
89620
|
+
value: formattedStats == null ? void 0 : formattedStats.totals.actions.calls,
|
|
89621
|
+
tooltip: t2("CALLS")
|
|
89622
|
+
},
|
|
89623
|
+
{
|
|
89624
|
+
title: t2("DIRECTIONREQUES"),
|
|
89625
|
+
value: formattedStats == null ? void 0 : formattedStats.totals.actions.direction_requests,
|
|
89626
|
+
tooltip: t2("DIRECTIONREQUES")
|
|
89627
|
+
}
|
|
89628
|
+
]
|
|
89629
|
+
})))), isLoading && /* @__PURE__ */ React__default.createElement(SkeletonPage, null), !isLoading && /* @__PURE__ */ React__default.createElement(Row$1, {
|
|
89457
89630
|
gutter: [28, 28]
|
|
89458
89631
|
}, /* @__PURE__ */ React__default.createElement(Col$1, {
|
|
89459
89632
|
xs: 24,
|