@carlonicora/nextjs-jsonapi 6.32.1 → 6.32.2
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/dist/{BlockNoteEditor-XIEMUQCO.mjs → BlockNoteEditor-KRNC6EAX.mjs} +2 -2
- package/dist/{BlockNoteEditor-RD3JNEV5.js → BlockNoteEditor-VXSVY6OY.js} +15 -15
- package/dist/{BlockNoteEditor-RD3JNEV5.js.map → BlockNoteEditor-VXSVY6OY.js.map} +1 -1
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-F25BVBEH.mjs → chunk-4SXHRANW.mjs} +50 -30
- package/dist/chunk-4SXHRANW.mjs.map +1 -0
- package/dist/{chunk-SQNFYMYE.js → chunk-GPVLFNLB.js} +523 -503
- package/dist/chunk-GPVLFNLB.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/email-automations/index.js +78 -78
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +107 -107
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/dist/shadcnui/ui/calendar.d.ts +1 -1
- package/dist/shadcnui/ui/calendar.d.ts.map +1 -1
- package/messages/en.json +11 -0
- package/messages/it.json +11 -0
- package/package.json +1 -1
- package/src/shadcnui/ui/__tests__/calendar.spec.tsx +222 -0
- package/src/shadcnui/ui/calendar.tsx +28 -1
- package/dist/chunk-F25BVBEH.mjs.map +0 -1
- package/dist/chunk-SQNFYMYE.js.map +0 -1
- /package/dist/{BlockNoteEditor-XIEMUQCO.mjs.map → BlockNoteEditor-KRNC6EAX.mjs.map} +0 -0
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkGPVLFNLBjs = require('../../chunk-GPVLFNLB.js');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var _chunkSYMI4IDWjs = require('../../chunk-SYMI4IDW.js');
|
|
@@ -237,7 +237,7 @@ function AnalyticsAdminFilterBar({ section, granularity, onChange }) {
|
|
|
237
237
|
};
|
|
238
238
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
239
239
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-md:w-full max-md:[&_#date]:w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
240
|
-
|
|
240
|
+
_chunkGPVLFNLBjs.DateRangeSelector,
|
|
241
241
|
{
|
|
242
242
|
onDateChange: (range) => {
|
|
243
243
|
if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
|
|
@@ -281,7 +281,7 @@ function Segmented({
|
|
|
281
281
|
children: options.map((option) => {
|
|
282
282
|
const selected = option.value === value;
|
|
283
283
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
284
|
-
|
|
284
|
+
_chunkGPVLFNLBjs.Button,
|
|
285
285
|
{
|
|
286
286
|
type: "button",
|
|
287
287
|
size: "sm",
|
|
@@ -541,7 +541,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
541
541
|
error
|
|
542
542
|
]
|
|
543
543
|
);
|
|
544
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
544
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminContext.Provider, { value: contextValue, children }) });
|
|
545
545
|
}, "AnalyticsAdminProvider");
|
|
546
546
|
var useAnalyticsAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
547
547
|
const ctx = _react.useContext.call(void 0, AnalyticsAdminContext);
|
|
@@ -561,7 +561,7 @@ var _lucidereact = require('lucide-react');
|
|
|
561
561
|
var ZERO = { visitors: 0, sessions: 0, pageViews: 0, pagesPerSession: 0, consentShare: 0 };
|
|
562
562
|
function AnalyticsAdminTiles({ summary }) {
|
|
563
563
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
564
|
-
const { decimal } =
|
|
564
|
+
const { decimal } = _chunkGPVLFNLBjs.useUsageFormatters.call(void 0, );
|
|
565
565
|
const rowFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (window2) => _nullishCoalesce(summary.find((r) => r.section === "total" && r.window === window2), () => ( ZERO)), "rowFor");
|
|
566
566
|
const current = rowFor("current");
|
|
567
567
|
const previous = rowFor("previous");
|
|
@@ -574,7 +574,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
574
574
|
testId: "analytics-tile-visitors",
|
|
575
575
|
label: t("analytics.admin.tiles.visitors"),
|
|
576
576
|
value: decimal(current.visitors, 0),
|
|
577
|
-
delta:
|
|
577
|
+
delta: _chunkGPVLFNLBjs.percentageDelta.call(void 0, current.visitors, previous.visitors),
|
|
578
578
|
previousLabel,
|
|
579
579
|
decimal
|
|
580
580
|
}
|
|
@@ -585,7 +585,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
585
585
|
testId: "analytics-tile-sessions",
|
|
586
586
|
label: t("analytics.admin.tiles.sessions"),
|
|
587
587
|
value: decimal(current.sessions, 0),
|
|
588
|
-
delta:
|
|
588
|
+
delta: _chunkGPVLFNLBjs.percentageDelta.call(void 0, current.sessions, previous.sessions),
|
|
589
589
|
previousLabel,
|
|
590
590
|
decimal
|
|
591
591
|
}
|
|
@@ -596,7 +596,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
596
596
|
testId: "analytics-tile-page-views",
|
|
597
597
|
label: t("analytics.admin.tiles.page_views"),
|
|
598
598
|
value: decimal(current.pageViews, 0),
|
|
599
|
-
delta:
|
|
599
|
+
delta: _chunkGPVLFNLBjs.percentageDelta.call(void 0, current.pageViews, previous.pageViews),
|
|
600
600
|
previousLabel,
|
|
601
601
|
decimal
|
|
602
602
|
}
|
|
@@ -609,7 +609,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
609
609
|
testId: "analytics-tile-pages-per-session",
|
|
610
610
|
label: t("analytics.admin.tiles.pages_per_session"),
|
|
611
611
|
value: decimal(current.pagesPerSession, 1),
|
|
612
|
-
delta:
|
|
612
|
+
delta: _chunkGPVLFNLBjs.percentageDelta.call(void 0, current.pagesPerSession, previous.pagesPerSession),
|
|
613
613
|
decimal
|
|
614
614
|
}
|
|
615
615
|
),
|
|
@@ -634,8 +634,8 @@ function LeadTile({
|
|
|
634
634
|
previousLabel,
|
|
635
635
|
decimal
|
|
636
636
|
}) {
|
|
637
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
638
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
637
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.CardContent, { className: "grid gap-1", children: [
|
|
638
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.MicroLabel, { children: label }),
|
|
639
639
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
|
|
640
640
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
|
|
641
641
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal }),
|
|
@@ -651,8 +651,8 @@ function SupportingTile({
|
|
|
651
651
|
delta,
|
|
652
652
|
decimal
|
|
653
653
|
}) {
|
|
654
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
655
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
654
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.CardContent, { className: "grid gap-1", children: [
|
|
655
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.MicroLabel, { children: label }),
|
|
656
656
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
657
657
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
|
|
658
658
|
delta !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal })
|
|
@@ -703,15 +703,15 @@ function AnalyticsBreakdownTable({ breakdowns }) {
|
|
|
703
703
|
route: t("analytics.admin.dimensions.route"),
|
|
704
704
|
landing: t("analytics.admin.dimensions.landing")
|
|
705
705
|
};
|
|
706
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
707
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
708
|
-
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
706
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Tabs, { defaultValue: ANALYTICS_DIMENSIONS[0], children: [
|
|
707
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TabsList, { className: "max-md:w-full max-md:justify-start max-md:overflow-x-auto", children: ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TabsTrigger, { value: dimension, children: labels[dimension] }, dimension)) }),
|
|
708
|
+
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TabsContent, { value: dimension, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreakdownRows, { rows: _nullishCoalesce(breakdowns[dimension], () => ( [])) }) }, dimension))
|
|
709
709
|
] });
|
|
710
710
|
}
|
|
711
711
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsBreakdownTable, "AnalyticsBreakdownTable");
|
|
712
712
|
function BreakdownRows({ rows }) {
|
|
713
713
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
714
|
-
const { decimal } =
|
|
714
|
+
const { decimal } = _chunkGPVLFNLBjs.useUsageFormatters.call(void 0, );
|
|
715
715
|
const sortedRows = _react.useMemo.call(void 0, () => [...rows].sort((a, b) => b.visitors - a.visitors), [rows]);
|
|
716
716
|
if (sortedRows.length === 0) {
|
|
717
717
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
@@ -720,18 +720,18 @@ function BreakdownRows({ rows }) {
|
|
|
720
720
|
// The package's <Table> wraps itself in an `overflow-x-clip` container, which
|
|
721
721
|
// would swallow the overflow before this scroller ever saw it — hence the
|
|
722
722
|
// child override. Wide tables must scroll, never widen the page.
|
|
723
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
724
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
725
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
726
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
727
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
728
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
723
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Table, { children: [
|
|
724
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.TableRow, { children: [
|
|
725
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.key") }),
|
|
726
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.visitors") }),
|
|
727
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.sessions") }),
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.page_views") })
|
|
729
729
|
] }) }),
|
|
730
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
731
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
732
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
733
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
734
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
730
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableBody, { children: sortedRows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.TableRow, { "data-testid": `analytics-breakdown-row-${row.id}`, children: [
|
|
731
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-xs", children: row.key === OTHER_KEY ? t("analytics.admin.other") : row.key }),
|
|
732
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.visitors, 0) }),
|
|
733
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.sessions, 0) }),
|
|
734
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) })
|
|
735
735
|
] }, row.id)) })
|
|
736
736
|
] }) })
|
|
737
737
|
);
|
|
@@ -769,10 +769,10 @@ function buildDailyUniquesSeries(rows, metric, todayKey) {
|
|
|
769
769
|
_chunk7QVYU63Ejs.__name.call(void 0, buildDailyUniquesSeries, "buildDailyUniquesSeries");
|
|
770
770
|
function AnalyticsDailyUniquesChart({ rows, metric, className }) {
|
|
771
771
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
772
|
-
const { compact, bucketDate, decimal } =
|
|
772
|
+
const { compact, bucketDate, decimal } = _chunkGPVLFNLBjs.useUsageFormatters.call(void 0, );
|
|
773
773
|
const { resolvedTheme } = _nextthemes.useTheme.call(void 0, );
|
|
774
774
|
const mode = resolvedTheme === "dark" ? "dark" : "light";
|
|
775
|
-
const color =
|
|
775
|
+
const color = _chunkGPVLFNLBjs.seriesColor.call(void 0, METRIC_SLOT[metric], mode);
|
|
776
776
|
const chartData = _react.useMemo.call(void 0, () => buildDailyUniquesSeries(rows, metric, bucketKey(/* @__PURE__ */ new Date())), [rows, metric]);
|
|
777
777
|
const points = _react.useMemo.call(void 0, () => chartData.map(({ day, value }) => ({ day, value })), [chartData]);
|
|
778
778
|
const seriesLabel = t(`analytics.admin.daily_uniques.${metric}`);
|
|
@@ -801,7 +801,7 @@ function AnalyticsDailyUniquesChart({ rows, metric, className }) {
|
|
|
801
801
|
// rtl-ok: deliberate LTR island (chart)
|
|
802
802
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
803
803
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": `analytics-daily-${metric}-data`, children: JSON.stringify(points) }),
|
|
804
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
804
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.ChartContainer, { config: chartConfig, className: "aspect-auto h-72 w-full", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _recharts.LineChart, { accessibilityLayer: true, data: chartData, margin: { top: 8, right: 16, bottom: 0, left: 0 }, children: [
|
|
805
805
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
806
806
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
807
807
|
_recharts.XAxis,
|
|
@@ -827,11 +827,11 @@ function AnalyticsDailyUniquesChart({ rows, metric, className }) {
|
|
|
827
827
|
}
|
|
828
828
|
),
|
|
829
829
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
830
|
-
|
|
830
|
+
_chunkGPVLFNLBjs.ChartTooltip,
|
|
831
831
|
{
|
|
832
832
|
filterNull: false,
|
|
833
833
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
834
|
-
|
|
834
|
+
_chunkGPVLFNLBjs.ChartTooltipContent,
|
|
835
835
|
{
|
|
836
836
|
labelFormatter: (value, payload) => {
|
|
837
837
|
const entry = _optionalChain([payload, 'optionalAccess', _6 => _6[0], 'optionalAccess', _7 => _7.payload]);
|
|
@@ -893,47 +893,47 @@ var VISITOR_SUFFIX_LENGTH = 6;
|
|
|
893
893
|
function AnalyticsSessionsTable({ rows, sessionPageUrl, onLoadMore, hasMore }) {
|
|
894
894
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
895
895
|
const dates = _chunkSYMI4IDWjs.useDateFormatter.call(void 0, );
|
|
896
|
-
const generateUrl =
|
|
897
|
-
const { decimal } =
|
|
896
|
+
const generateUrl = _chunkGPVLFNLBjs.usePageUrlGenerator.call(void 0, );
|
|
897
|
+
const { decimal } = _chunkGPVLFNLBjs.useUsageFormatters.call(void 0, );
|
|
898
898
|
if (rows.length === 0) {
|
|
899
899
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
900
900
|
}
|
|
901
901
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
902
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
903
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
904
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
905
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
906
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
907
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
908
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
909
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
902
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Table, { children: [
|
|
903
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.TableRow, { children: [
|
|
904
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.started") }),
|
|
905
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.visitor") }),
|
|
906
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.source") }),
|
|
907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.landing") }),
|
|
908
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.pages") }),
|
|
909
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.device") })
|
|
910
910
|
] }) }),
|
|
911
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
911
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableBody, { children: rows.map((row) => {
|
|
912
912
|
const source = [_nullishCoalesce(row.utmSource, () => ( row.referrerHost)), row.utmMedium].filter(Boolean).join(" / ");
|
|
913
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
914
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
915
|
-
|
|
913
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.TableRow, { "data-testid": `analytics-session-row-${row.id}`, children: [
|
|
914
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-xs tabular-nums", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
915
|
+
_chunkGPVLFNLBjs.Link,
|
|
916
916
|
{
|
|
917
917
|
href: generateUrl({ page: sessionPageUrl, id: row.id }),
|
|
918
918
|
"data-testid": `analytics-session-link-${row.id}`,
|
|
919
919
|
children: dates.format(row.startedAt, "dateTime")
|
|
920
920
|
}
|
|
921
921
|
) }),
|
|
922
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
922
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-xs", children: row.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
923
923
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: row.user.name }),
|
|
924
924
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: row.user.email })
|
|
925
925
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
926
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
926
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
927
927
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: row.visitorId.slice(-VISITOR_SUFFIX_LENGTH) })
|
|
928
928
|
] }) }),
|
|
929
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
930
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
931
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
932
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
929
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-xs", children: source }),
|
|
930
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-xs", children: row.landingRoute }),
|
|
931
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) }),
|
|
932
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-muted-foreground text-xs", children: row.deviceType })
|
|
933
933
|
] }, row.id);
|
|
934
934
|
}) })
|
|
935
935
|
] }) }),
|
|
936
|
-
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
936
|
+
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Button, { type: "button", variant: "outline", size: "sm", onClick: onLoadMore, children: t("analytics.admin.load_more") }) })
|
|
937
937
|
] });
|
|
938
938
|
}
|
|
939
939
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsSessionsTable, "AnalyticsSessionsTable");
|
|
@@ -965,7 +965,7 @@ var inferGranularity = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (buc
|
|
|
965
965
|
}, "inferGranularity");
|
|
966
966
|
function AnalyticsTimelineChart({ rows, className }) {
|
|
967
967
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
968
|
-
const { compact, bucketDate, decimal } =
|
|
968
|
+
const { compact, bucketDate, decimal } = _chunkGPVLFNLBjs.useUsageFormatters.call(void 0, );
|
|
969
969
|
const { resolvedTheme } = _nextthemes.useTheme.call(void 0, );
|
|
970
970
|
const mode = resolvedTheme === "dark" ? "dark" : "light";
|
|
971
971
|
const chartData = _react.useMemo.call(void 0, () => {
|
|
@@ -1000,7 +1000,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
1000
1000
|
// rtl-ok: deliberate LTR island (chart)
|
|
1001
1001
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
1002
1002
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "analytics-timeline-data", children: JSON.stringify(chartData) }),
|
|
1003
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1003
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.ChartContainer, { config: chartConfig, className: "aspect-auto h-72 w-full", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _recharts.BarChart, { accessibilityLayer: true, data: chartData, margin: { top: 8, right: 8, bottom: 0, left: 0 }, children: [
|
|
1004
1004
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
1005
1005
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1006
1006
|
_recharts.XAxis,
|
|
@@ -1024,10 +1024,10 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
),
|
|
1026
1026
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1027
|
-
|
|
1027
|
+
_chunkGPVLFNLBjs.ChartTooltip,
|
|
1028
1028
|
{
|
|
1029
1029
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1030
|
-
|
|
1030
|
+
_chunkGPVLFNLBjs.ChartTooltipContent,
|
|
1031
1031
|
{
|
|
1032
1032
|
labelFormatter: (value) => bucketDate(String(value), granularity),
|
|
1033
1033
|
valueFormatter: (value) => decimal(Number(value), 0)
|
|
@@ -1035,13 +1035,13 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
1035
1035
|
)
|
|
1036
1036
|
}
|
|
1037
1037
|
),
|
|
1038
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1038
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.ChartLegendContent, {}) }),
|
|
1039
1039
|
SERIES.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1040
1040
|
_recharts.Bar,
|
|
1041
1041
|
{
|
|
1042
1042
|
dataKey: series,
|
|
1043
1043
|
maxBarSize: 28,
|
|
1044
|
-
fill:
|
|
1044
|
+
fill: _chunkGPVLFNLBjs.seriesColor.call(void 0, index, mode),
|
|
1045
1045
|
stroke: "var(--background)",
|
|
1046
1046
|
strokeWidth: 2,
|
|
1047
1047
|
radius: [4, 4, 0, 0]
|
|
@@ -1071,33 +1071,33 @@ function AnalyticsAdminContainer() {
|
|
|
1071
1071
|
error
|
|
1072
1072
|
} = useAnalyticsAdmin();
|
|
1073
1073
|
if (error) {
|
|
1074
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1074
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
1075
1075
|
}
|
|
1076
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1077
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1076
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true });
|
|
1077
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
1078
1078
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
1079
1079
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminTiles, { summary }),
|
|
1080
1080
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: t("analytics.admin.tiles.summarised_note") })
|
|
1081
1081
|
] }),
|
|
1082
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1083
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1084
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1082
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Card, { children: [
|
|
1083
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardTitle, { children: t("analytics.admin.panels.over_time") }) }),
|
|
1084
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsTimelineChart, { rows: timeline }) })
|
|
1085
1085
|
] }),
|
|
1086
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1087
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1088
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1086
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Card, { "data-testid": "analytics-daily-visitors-card", children: [
|
|
1087
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardTitle, { children: t("analytics.admin.panels.daily_visitors") }) }),
|
|
1088
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsDailyUniquesChart, { rows: dailyUniques, metric: "visitors" }) })
|
|
1089
1089
|
] }),
|
|
1090
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1091
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1092
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1090
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Card, { "data-testid": "analytics-daily-users-card", children: [
|
|
1091
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardTitle, { children: t("analytics.admin.panels.daily_users") }) }),
|
|
1092
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsDailyUniquesChart, { rows: dailyUniques, metric: "users" }) })
|
|
1093
1093
|
] }),
|
|
1094
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1095
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1096
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1094
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Card, { children: [
|
|
1095
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardTitle, { children: t("analytics.admin.panels.breakdown") }) }),
|
|
1096
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsBreakdownTable, { breakdowns }) })
|
|
1097
1097
|
] }),
|
|
1098
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1099
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1100
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1098
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Card, { children: [
|
|
1099
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardTitle, { children: t("analytics.admin.panels.sessions") }) }),
|
|
1100
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1101
1101
|
AnalyticsSessionsTable,
|
|
1102
1102
|
{
|
|
1103
1103
|
rows: sessions,
|
|
@@ -1121,7 +1121,7 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1121
1121
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1122
1122
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
1123
1123
|
const dates = _chunkSYMI4IDWjs.useDateFormatter.call(void 0, );
|
|
1124
|
-
const generateUrl =
|
|
1124
|
+
const generateUrl = _chunkGPVLFNLBjs.usePageUrlGenerator.call(void 0, );
|
|
1125
1125
|
const [session, setSession] = _react.useState.call(void 0, void 0);
|
|
1126
1126
|
const [pageViews, setPageViews] = _react.useState.call(void 0, []);
|
|
1127
1127
|
const [otherSessions, setOtherSessions] = _react.useState.call(void 0, []);
|
|
@@ -1173,32 +1173,32 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1173
1173
|
const title = { type: t("analytics.admin.panels.journey") };
|
|
1174
1174
|
const renderBody = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
1175
1175
|
if (error) {
|
|
1176
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1176
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.AnalyticsSession, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
1177
1177
|
}
|
|
1178
|
-
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1178
|
+
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.AnalyticsSession, fullWidth: true, forceHeader: true });
|
|
1179
1179
|
const source = [_nullishCoalesce(session.utmSource, () => ( session.referrerHost)), session.utmMedium, session.utmCampaign].filter(Boolean).join(" / ");
|
|
1180
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1181
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1180
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.AnalyticsSession, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
1181
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Card, { "data-testid": "analytics-journey-attribution", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.CardContent, { className: "flex flex-col gap-3", children: [
|
|
1182
1182
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1183
1183
|
session.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
1184
1184
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: session.user.name }),
|
|
1185
1185
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: session.user.email })
|
|
1186
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1187
|
-
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1186
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
1187
|
+
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Badge, { variant: "softGreen", children: t("analytics.admin.consented") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.Badge, { variant: "softGray", children: t("analytics.admin.not_consented") })
|
|
1188
1188
|
] }),
|
|
1189
1189
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
|
|
1190
1190
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1191
|
-
|
|
1191
|
+
_chunkGPVLFNLBjs.DetailField,
|
|
1192
1192
|
{
|
|
1193
1193
|
label: t("analytics.admin.columns.started"),
|
|
1194
1194
|
value: dates.format(session.startedAt, "dateTimeSeconds")
|
|
1195
1195
|
}
|
|
1196
1196
|
),
|
|
1197
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1198
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1199
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1197
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.DetailField, { label: t("analytics.admin.columns.source"), value: source }),
|
|
1198
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.DetailField, { label: t("analytics.admin.columns.landing"), value: session.landingRoute }),
|
|
1199
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.DetailField, { label: t("analytics.admin.columns.device"), value: session.deviceType }),
|
|
1200
1200
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1201
|
-
|
|
1201
|
+
_chunkGPVLFNLBjs.DetailField,
|
|
1202
1202
|
{
|
|
1203
1203
|
label: t("analytics.admin.columns.visitor"),
|
|
1204
1204
|
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: session.visitorId })
|
|
@@ -1206,31 +1206,31 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1206
1206
|
)
|
|
1207
1207
|
] })
|
|
1208
1208
|
] }) }),
|
|
1209
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1210
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1211
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1209
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Card, { children: [
|
|
1210
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardTitle, { children: t("analytics.admin.columns.pages") }) }),
|
|
1211
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardContent, { children: pageViews.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") }) : (
|
|
1212
1212
|
// The package's <Table> wraps itself in an `overflow-x-clip`
|
|
1213
1213
|
// container — hence the child override, so wide rows scroll.
|
|
1214
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1215
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1216
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1217
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1218
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1214
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Table, { children: [
|
|
1215
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.TableRow, { children: [
|
|
1216
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.time") }),
|
|
1217
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.gap") }),
|
|
1218
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.path") })
|
|
1219
1219
|
] }) }),
|
|
1220
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1220
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableBody, { children: pageViews.map((pageView, index) => {
|
|
1221
1221
|
const previous = index > 0 ? pageViews[index - 1] : void 0;
|
|
1222
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1223
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1224
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1225
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1222
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.TableRow, { "data-testid": `analytics-pageview-row-${pageView.id}`, children: [
|
|
1223
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-xs tabular-nums", children: dates.format(pageView.createdAt, "dateTimeSeconds") }),
|
|
1224
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-end text-xs tabular-nums", children: previous ? formatGap(pageView.createdAt.getTime() - previous.createdAt.getTime()) : "\u2014" }),
|
|
1225
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.TableCell, { className: "text-xs", children: pageView.path })
|
|
1226
1226
|
] }, pageView.id);
|
|
1227
1227
|
}) })
|
|
1228
1228
|
] }) })
|
|
1229
1229
|
) })
|
|
1230
1230
|
] }),
|
|
1231
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1232
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1233
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1231
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGPVLFNLBjs.Card, { children: [
|
|
1232
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardTitle, { children: t("analytics.admin.panels.other_sessions") }) }),
|
|
1233
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1234
1234
|
AnalyticsSessionsTable,
|
|
1235
1235
|
{
|
|
1236
1236
|
rows: otherSessions,
|
|
@@ -1242,7 +1242,7 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1242
1242
|
] })
|
|
1243
1243
|
] }) });
|
|
1244
1244
|
}, "renderBody");
|
|
1245
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1245
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGPVLFNLBjs.SharedProvider, { value: { breadcrumbs: breadcrumb, title }, children: renderBody() });
|
|
1246
1246
|
}
|
|
1247
1247
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsJourneyContainer, "AnalyticsJourneyContainer");
|
|
1248
1248
|
function unit(locale, name, value) {
|