@carlonicora/nextjs-jsonapi 6.20.2 → 6.20.4
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-S7EVHYWT.mjs → BlockNoteEditor-ISF5MDPH.mjs} +48 -23
- package/dist/BlockNoteEditor-ISF5MDPH.mjs.map +1 -0
- package/dist/{BlockNoteEditor-V76V5XFY.js → BlockNoteEditor-IXWMZTJS.js} +55 -30
- package/dist/BlockNoteEditor-IXWMZTJS.js.map +1 -0
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-QWQZUFFA.mjs → chunk-4OJFFFUQ.mjs} +2 -2
- package/dist/{chunk-2CXF5XBU.js → chunk-O5MTDTZC.js} +2 -2
- package/dist/{chunk-2CXF5XBU.js.map → chunk-O5MTDTZC.js.map} +1 -1
- 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/package.json +1 -1
- package/src/components/editors/BlockNoteEditor.tsx +50 -50
- package/src/components/editors/__tests__/BlockNoteEditor.empty-change.spec.tsx +50 -1
- package/src/components/editors/__tests__/removeTrailingEmptyBlocks.spec.ts +60 -0
- package/src/components/editors/blockNoteEditorOptions.ts +39 -0
- package/dist/BlockNoteEditor-S7EVHYWT.mjs.map +0 -1
- package/dist/BlockNoteEditor-V76V5XFY.js.map +0 -1
- /package/dist/{chunk-QWQZUFFA.mjs.map → chunk-4OJFFFUQ.mjs.map} +0 -0
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkO5MTDTZCjs = require('../../chunk-O5MTDTZC.js');
|
|
35
35
|
require('../../chunk-3EPNHTMH.js');
|
|
36
36
|
require('../../chunk-2CR7HWVS.js');
|
|
37
37
|
require('../../chunk-G4JR3SFV.js');
|
|
@@ -231,7 +231,7 @@ function AnalyticsAdminFilterBar({ section, granularity, onChange }) {
|
|
|
231
231
|
};
|
|
232
232
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
233
233
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-md:w-full max-md:[&_#date]:w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
234
|
-
|
|
234
|
+
_chunkO5MTDTZCjs.DateRangeSelector,
|
|
235
235
|
{
|
|
236
236
|
onDateChange: (range) => {
|
|
237
237
|
if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
|
|
@@ -275,7 +275,7 @@ function Segmented({
|
|
|
275
275
|
children: options.map((option) => {
|
|
276
276
|
const selected = option.value === value;
|
|
277
277
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
278
|
-
|
|
278
|
+
_chunkO5MTDTZCjs.Button,
|
|
279
279
|
{
|
|
280
280
|
type: "button",
|
|
281
281
|
size: "sm",
|
|
@@ -535,7 +535,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
535
535
|
error
|
|
536
536
|
]
|
|
537
537
|
);
|
|
538
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
538
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminContext.Provider, { value: contextValue, children }) });
|
|
539
539
|
}, "AnalyticsAdminProvider");
|
|
540
540
|
var useAnalyticsAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
541
541
|
const ctx = _react.useContext.call(void 0, AnalyticsAdminContext);
|
|
@@ -555,7 +555,7 @@ var _lucidereact = require('lucide-react');
|
|
|
555
555
|
var ZERO = { visitors: 0, sessions: 0, pageViews: 0, pagesPerSession: 0, consentShare: 0 };
|
|
556
556
|
function AnalyticsAdminTiles({ summary }) {
|
|
557
557
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
558
|
-
const { decimal } =
|
|
558
|
+
const { decimal } = _chunkO5MTDTZCjs.useUsageFormatters.call(void 0, );
|
|
559
559
|
const rowFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (window2) => _nullishCoalesce(summary.find((r) => r.section === "total" && r.window === window2), () => ( ZERO)), "rowFor");
|
|
560
560
|
const current = rowFor("current");
|
|
561
561
|
const previous = rowFor("previous");
|
|
@@ -568,7 +568,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
568
568
|
testId: "analytics-tile-visitors",
|
|
569
569
|
label: t("analytics.admin.tiles.visitors"),
|
|
570
570
|
value: decimal(current.visitors, 0),
|
|
571
|
-
delta:
|
|
571
|
+
delta: _chunkO5MTDTZCjs.percentageDelta.call(void 0, current.visitors, previous.visitors),
|
|
572
572
|
previousLabel,
|
|
573
573
|
decimal
|
|
574
574
|
}
|
|
@@ -579,7 +579,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
579
579
|
testId: "analytics-tile-sessions",
|
|
580
580
|
label: t("analytics.admin.tiles.sessions"),
|
|
581
581
|
value: decimal(current.sessions, 0),
|
|
582
|
-
delta:
|
|
582
|
+
delta: _chunkO5MTDTZCjs.percentageDelta.call(void 0, current.sessions, previous.sessions),
|
|
583
583
|
previousLabel,
|
|
584
584
|
decimal
|
|
585
585
|
}
|
|
@@ -590,7 +590,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
590
590
|
testId: "analytics-tile-page-views",
|
|
591
591
|
label: t("analytics.admin.tiles.page_views"),
|
|
592
592
|
value: decimal(current.pageViews, 0),
|
|
593
|
-
delta:
|
|
593
|
+
delta: _chunkO5MTDTZCjs.percentageDelta.call(void 0, current.pageViews, previous.pageViews),
|
|
594
594
|
previousLabel,
|
|
595
595
|
decimal
|
|
596
596
|
}
|
|
@@ -603,7 +603,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
603
603
|
testId: "analytics-tile-pages-per-session",
|
|
604
604
|
label: t("analytics.admin.tiles.pages_per_session"),
|
|
605
605
|
value: decimal(current.pagesPerSession, 1),
|
|
606
|
-
delta:
|
|
606
|
+
delta: _chunkO5MTDTZCjs.percentageDelta.call(void 0, current.pagesPerSession, previous.pagesPerSession),
|
|
607
607
|
decimal
|
|
608
608
|
}
|
|
609
609
|
),
|
|
@@ -628,8 +628,8 @@ function LeadTile({
|
|
|
628
628
|
previousLabel,
|
|
629
629
|
decimal
|
|
630
630
|
}) {
|
|
631
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
632
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
631
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.CardContent, { className: "grid gap-1", children: [
|
|
632
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.MicroLabel, { children: label }),
|
|
633
633
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
|
|
634
634
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
|
|
635
635
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal }),
|
|
@@ -645,8 +645,8 @@ function SupportingTile({
|
|
|
645
645
|
delta,
|
|
646
646
|
decimal
|
|
647
647
|
}) {
|
|
648
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
649
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
648
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.CardContent, { className: "grid gap-1", children: [
|
|
649
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.MicroLabel, { children: label }),
|
|
650
650
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
651
651
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
|
|
652
652
|
delta !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal })
|
|
@@ -697,15 +697,15 @@ function AnalyticsBreakdownTable({ breakdowns }) {
|
|
|
697
697
|
route: t("analytics.admin.dimensions.route"),
|
|
698
698
|
landing: t("analytics.admin.dimensions.landing")
|
|
699
699
|
};
|
|
700
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
701
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
702
|
-
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
700
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.Tabs, { defaultValue: ANALYTICS_DIMENSIONS[0], children: [
|
|
701
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.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, _chunkO5MTDTZCjs.TabsTrigger, { value: dimension, children: labels[dimension] }, dimension)) }),
|
|
702
|
+
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TabsContent, { value: dimension, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreakdownRows, { rows: _nullishCoalesce(breakdowns[dimension], () => ( [])) }) }, dimension))
|
|
703
703
|
] });
|
|
704
704
|
}
|
|
705
705
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsBreakdownTable, "AnalyticsBreakdownTable");
|
|
706
706
|
function BreakdownRows({ rows }) {
|
|
707
707
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
708
|
-
const { decimal } =
|
|
708
|
+
const { decimal } = _chunkO5MTDTZCjs.useUsageFormatters.call(void 0, );
|
|
709
709
|
const sortedRows = _react.useMemo.call(void 0, () => [...rows].sort((a, b) => b.visitors - a.visitors), [rows]);
|
|
710
710
|
if (sortedRows.length === 0) {
|
|
711
711
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
@@ -714,18 +714,18 @@ function BreakdownRows({ rows }) {
|
|
|
714
714
|
// The package's <Table> wraps itself in an `overflow-x-clip` container, which
|
|
715
715
|
// would swallow the overflow before this scroller ever saw it — hence the
|
|
716
716
|
// child override. Wide tables must scroll, never widen the page.
|
|
717
|
-
/* @__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,
|
|
718
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
719
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
720
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
721
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
722
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
717
|
+
/* @__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, _chunkO5MTDTZCjs.Table, { children: [
|
|
718
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.TableRow, { children: [
|
|
719
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.key") }),
|
|
720
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.visitors") }),
|
|
721
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.sessions") }),
|
|
722
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.page_views") })
|
|
723
723
|
] }) }),
|
|
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,
|
|
724
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableBody, { children: sortedRows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.TableRow, { "data-testid": `analytics-breakdown-row-${row.id}`, children: [
|
|
725
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-xs", children: row.key === OTHER_KEY ? t("analytics.admin.other") : row.key }),
|
|
726
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.visitors, 0) }),
|
|
727
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.sessions, 0) }),
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) })
|
|
729
729
|
] }, row.id)) })
|
|
730
730
|
] }) })
|
|
731
731
|
);
|
|
@@ -763,10 +763,10 @@ function buildDailyUniquesSeries(rows, metric, todayKey) {
|
|
|
763
763
|
_chunk7QVYU63Ejs.__name.call(void 0, buildDailyUniquesSeries, "buildDailyUniquesSeries");
|
|
764
764
|
function AnalyticsDailyUniquesChart({ rows, metric, className }) {
|
|
765
765
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
766
|
-
const { compact, bucketDate, decimal } =
|
|
766
|
+
const { compact, bucketDate, decimal } = _chunkO5MTDTZCjs.useUsageFormatters.call(void 0, );
|
|
767
767
|
const { resolvedTheme } = _nextthemes.useTheme.call(void 0, );
|
|
768
768
|
const mode = resolvedTheme === "dark" ? "dark" : "light";
|
|
769
|
-
const color =
|
|
769
|
+
const color = _chunkO5MTDTZCjs.seriesColor.call(void 0, METRIC_SLOT[metric], mode);
|
|
770
770
|
const chartData = _react.useMemo.call(void 0, () => buildDailyUniquesSeries(rows, metric, bucketKey(/* @__PURE__ */ new Date())), [rows, metric]);
|
|
771
771
|
const points = _react.useMemo.call(void 0, () => chartData.map(({ day, value }) => ({ day, value })), [chartData]);
|
|
772
772
|
const seriesLabel = t(`analytics.admin.daily_uniques.${metric}`);
|
|
@@ -795,7 +795,7 @@ function AnalyticsDailyUniquesChart({ rows, metric, className }) {
|
|
|
795
795
|
// rtl-ok: deliberate LTR island (chart)
|
|
796
796
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
797
797
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": `analytics-daily-${metric}-data`, children: JSON.stringify(points) }),
|
|
798
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
798
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.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: [
|
|
799
799
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
800
800
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
801
801
|
_recharts.XAxis,
|
|
@@ -821,11 +821,11 @@ function AnalyticsDailyUniquesChart({ rows, metric, className }) {
|
|
|
821
821
|
}
|
|
822
822
|
),
|
|
823
823
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
824
|
-
|
|
824
|
+
_chunkO5MTDTZCjs.ChartTooltip,
|
|
825
825
|
{
|
|
826
826
|
filterNull: false,
|
|
827
827
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
828
|
-
|
|
828
|
+
_chunkO5MTDTZCjs.ChartTooltipContent,
|
|
829
829
|
{
|
|
830
830
|
labelFormatter: (value, payload) => {
|
|
831
831
|
const entry = _optionalChain([payload, 'optionalAccess', _6 => _6[0], 'optionalAccess', _7 => _7.payload]);
|
|
@@ -888,48 +888,48 @@ var VISITOR_SUFFIX_LENGTH = 6;
|
|
|
888
888
|
function AnalyticsSessionsTable({ rows, sessionPageUrl, onLoadMore, hasMore }) {
|
|
889
889
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
890
890
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
891
|
-
const generateUrl =
|
|
892
|
-
const { decimal } =
|
|
891
|
+
const generateUrl = _chunkO5MTDTZCjs.usePageUrlGenerator.call(void 0, );
|
|
892
|
+
const { decimal } = _chunkO5MTDTZCjs.useUsageFormatters.call(void 0, );
|
|
893
893
|
const dateTime = _react.useMemo.call(void 0, () => new Intl.DateTimeFormat(locale, { dateStyle: "short", timeStyle: "short" }), [locale]);
|
|
894
894
|
if (rows.length === 0) {
|
|
895
895
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
896
896
|
}
|
|
897
897
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
898
|
-
/* @__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,
|
|
899
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
900
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
901
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
902
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
903
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
904
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
905
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
898
|
+
/* @__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, _chunkO5MTDTZCjs.Table, { children: [
|
|
899
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.TableRow, { children: [
|
|
900
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.started") }),
|
|
901
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.visitor") }),
|
|
902
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.source") }),
|
|
903
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.landing") }),
|
|
904
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.pages") }),
|
|
905
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.device") })
|
|
906
906
|
] }) }),
|
|
907
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableBody, { children: rows.map((row) => {
|
|
908
908
|
const source = [_nullishCoalesce(row.utmSource, () => ( row.referrerHost)), row.utmMedium].filter(Boolean).join(" / ");
|
|
909
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
910
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
911
|
-
|
|
909
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.TableRow, { "data-testid": `analytics-session-row-${row.id}`, children: [
|
|
910
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-xs tabular-nums", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
911
|
+
_chunkO5MTDTZCjs.Link,
|
|
912
912
|
{
|
|
913
913
|
href: generateUrl({ page: sessionPageUrl, id: row.id }),
|
|
914
914
|
"data-testid": `analytics-session-link-${row.id}`,
|
|
915
915
|
children: dateTime.format(row.startedAt)
|
|
916
916
|
}
|
|
917
917
|
) }),
|
|
918
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
918
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-xs", children: row.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
919
919
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: row.user.name }),
|
|
920
920
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: row.user.email })
|
|
921
921
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
922
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
922
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
923
923
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: row.visitorId.slice(-VISITOR_SUFFIX_LENGTH) })
|
|
924
924
|
] }) }),
|
|
925
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
926
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
927
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
928
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
925
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-xs", children: source }),
|
|
926
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-xs", children: row.landingRoute }),
|
|
927
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) }),
|
|
928
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-muted-foreground text-xs", children: row.deviceType })
|
|
929
929
|
] }, row.id);
|
|
930
930
|
}) })
|
|
931
931
|
] }) }),
|
|
932
|
-
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
932
|
+
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Button, { type: "button", variant: "outline", size: "sm", onClick: onLoadMore, children: t("analytics.admin.load_more") }) })
|
|
933
933
|
] });
|
|
934
934
|
}
|
|
935
935
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsSessionsTable, "AnalyticsSessionsTable");
|
|
@@ -961,7 +961,7 @@ var inferGranularity = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (buc
|
|
|
961
961
|
}, "inferGranularity");
|
|
962
962
|
function AnalyticsTimelineChart({ rows, className }) {
|
|
963
963
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
964
|
-
const { compact, bucketDate, decimal } =
|
|
964
|
+
const { compact, bucketDate, decimal } = _chunkO5MTDTZCjs.useUsageFormatters.call(void 0, );
|
|
965
965
|
const { resolvedTheme } = _nextthemes.useTheme.call(void 0, );
|
|
966
966
|
const mode = resolvedTheme === "dark" ? "dark" : "light";
|
|
967
967
|
const chartData = _react.useMemo.call(void 0, () => {
|
|
@@ -996,7 +996,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
996
996
|
// rtl-ok: deliberate LTR island (chart)
|
|
997
997
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
998
998
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "analytics-timeline-data", children: JSON.stringify(chartData) }),
|
|
999
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
999
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.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: [
|
|
1000
1000
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
1001
1001
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1002
1002
|
_recharts.XAxis,
|
|
@@ -1020,10 +1020,10 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
),
|
|
1022
1022
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1023
|
-
|
|
1023
|
+
_chunkO5MTDTZCjs.ChartTooltip,
|
|
1024
1024
|
{
|
|
1025
1025
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1026
|
-
|
|
1026
|
+
_chunkO5MTDTZCjs.ChartTooltipContent,
|
|
1027
1027
|
{
|
|
1028
1028
|
labelFormatter: (value) => bucketDate(String(value), granularity),
|
|
1029
1029
|
valueFormatter: (value) => decimal(Number(value), 0)
|
|
@@ -1031,13 +1031,13 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
1031
1031
|
)
|
|
1032
1032
|
}
|
|
1033
1033
|
),
|
|
1034
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1034
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.ChartLegendContent, {}) }),
|
|
1035
1035
|
SERIES.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1036
1036
|
_recharts.Bar,
|
|
1037
1037
|
{
|
|
1038
1038
|
dataKey: series,
|
|
1039
1039
|
maxBarSize: 28,
|
|
1040
|
-
fill:
|
|
1040
|
+
fill: _chunkO5MTDTZCjs.seriesColor.call(void 0, index, mode),
|
|
1041
1041
|
stroke: "var(--background)",
|
|
1042
1042
|
strokeWidth: 2,
|
|
1043
1043
|
radius: [4, 4, 0, 0]
|
|
@@ -1067,33 +1067,33 @@ function AnalyticsAdminContainer() {
|
|
|
1067
1067
|
error
|
|
1068
1068
|
} = useAnalyticsAdmin();
|
|
1069
1069
|
if (error) {
|
|
1070
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1070
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.RoundPageContainer, { module: _chunkYWLSIIE6js.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
1071
1071
|
}
|
|
1072
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1073
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1072
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.RoundPageContainer, { module: _chunkYWLSIIE6js.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true });
|
|
1073
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.RoundPageContainer, { module: _chunkYWLSIIE6js.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: [
|
|
1074
1074
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
1075
1075
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminTiles, { summary }),
|
|
1076
1076
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: t("analytics.admin.tiles.summarised_note") })
|
|
1077
1077
|
] }),
|
|
1078
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1079
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1080
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1078
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.Card, { children: [
|
|
1079
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardTitle, { children: t("analytics.admin.panels.over_time") }) }),
|
|
1080
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsTimelineChart, { rows: timeline }) })
|
|
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, _chunkO5MTDTZCjs.Card, { "data-testid": "analytics-daily-visitors-card", children: [
|
|
1083
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardTitle, { children: t("analytics.admin.panels.daily_visitors") }) }),
|
|
1084
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsDailyUniquesChart, { rows: dailyUniques, metric: "visitors" }) })
|
|
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, _chunkO5MTDTZCjs.Card, { "data-testid": "analytics-daily-users-card", children: [
|
|
1087
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardTitle, { children: t("analytics.admin.panels.daily_users") }) }),
|
|
1088
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsDailyUniquesChart, { rows: dailyUniques, metric: "users" }) })
|
|
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, _chunkO5MTDTZCjs.Card, { children: [
|
|
1091
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardTitle, { children: t("analytics.admin.panels.breakdown") }) }),
|
|
1092
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsBreakdownTable, { breakdowns }) })
|
|
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, _chunkO5MTDTZCjs.Card, { children: [
|
|
1095
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardTitle, { children: t("analytics.admin.panels.sessions") }) }),
|
|
1096
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1097
1097
|
AnalyticsSessionsTable,
|
|
1098
1098
|
{
|
|
1099
1099
|
rows: sessions,
|
|
@@ -1116,7 +1116,7 @@ var OTHER_SESSIONS_WINDOW_DAYS = 395;
|
|
|
1116
1116
|
function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_URL }) {
|
|
1117
1117
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1118
1118
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
1119
|
-
const generateUrl =
|
|
1119
|
+
const generateUrl = _chunkO5MTDTZCjs.usePageUrlGenerator.call(void 0, );
|
|
1120
1120
|
const [session, setSession] = _react.useState.call(void 0, void 0);
|
|
1121
1121
|
const [pageViews, setPageViews] = _react.useState.call(void 0, []);
|
|
1122
1122
|
const [otherSessions, setOtherSessions] = _react.useState.call(void 0, []);
|
|
@@ -1172,26 +1172,26 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1172
1172
|
const title = { type: t("analytics.admin.panels.journey") };
|
|
1173
1173
|
const renderBody = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
1174
1174
|
if (error) {
|
|
1175
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1175
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.RoundPageContainer, { module: _chunkYWLSIIE6js.Modules.AnalyticsSession, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
1176
1176
|
}
|
|
1177
|
-
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1177
|
+
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.RoundPageContainer, { module: _chunkYWLSIIE6js.Modules.AnalyticsSession, fullWidth: true, forceHeader: true });
|
|
1178
1178
|
const source = [_nullishCoalesce(session.utmSource, () => ( session.referrerHost)), session.utmMedium, session.utmCampaign].filter(Boolean).join(" / ");
|
|
1179
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1180
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1179
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.RoundPageContainer, { module: _chunkYWLSIIE6js.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: [
|
|
1180
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Card, { "data-testid": "analytics-journey-attribution", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.CardContent, { className: "flex flex-col gap-3", children: [
|
|
1181
1181
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1182
1182
|
session.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
1183
1183
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: session.user.name }),
|
|
1184
1184
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: session.user.email })
|
|
1185
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1186
|
-
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1185
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
1186
|
+
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Badge, { variant: "softGreen", children: t("analytics.admin.consented") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.Badge, { variant: "softGray", children: t("analytics.admin.not_consented") })
|
|
1187
1187
|
] }),
|
|
1188
1188
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
|
|
1189
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1190
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1191
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1192
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1189
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.DetailField, { label: t("analytics.admin.columns.started"), value: dateTime.format(session.startedAt) }),
|
|
1190
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.DetailField, { label: t("analytics.admin.columns.source"), value: source }),
|
|
1191
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.DetailField, { label: t("analytics.admin.columns.landing"), value: session.landingRoute }),
|
|
1192
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.DetailField, { label: t("analytics.admin.columns.device"), value: session.deviceType }),
|
|
1193
1193
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1194
|
-
|
|
1194
|
+
_chunkO5MTDTZCjs.DetailField,
|
|
1195
1195
|
{
|
|
1196
1196
|
label: t("analytics.admin.columns.visitor"),
|
|
1197
1197
|
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: session.visitorId })
|
|
@@ -1199,31 +1199,31 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1199
1199
|
)
|
|
1200
1200
|
] })
|
|
1201
1201
|
] }) }),
|
|
1202
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1203
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1204
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1202
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.Card, { children: [
|
|
1203
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardTitle, { children: t("analytics.admin.columns.pages") }) }),
|
|
1204
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardContent, { children: pageViews.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") }) : (
|
|
1205
1205
|
// The package's <Table> wraps itself in an `overflow-x-clip`
|
|
1206
1206
|
// container — hence the child override, so wide rows scroll.
|
|
1207
|
-
/* @__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,
|
|
1208
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1209
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1210
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1211
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1207
|
+
/* @__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, _chunkO5MTDTZCjs.Table, { children: [
|
|
1208
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.TableRow, { children: [
|
|
1209
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.time") }),
|
|
1210
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.gap") }),
|
|
1211
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.path") })
|
|
1212
1212
|
] }) }),
|
|
1213
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1213
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableBody, { children: pageViews.map((pageView, index) => {
|
|
1214
1214
|
const previous = index > 0 ? pageViews[index - 1] : void 0;
|
|
1215
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1216
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1217
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1218
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1215
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.TableRow, { "data-testid": `analytics-pageview-row-${pageView.id}`, children: [
|
|
1216
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-xs tabular-nums", children: dateTime.format(pageView.createdAt) }),
|
|
1217
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-end text-xs tabular-nums", children: previous ? formatGap(pageView.createdAt.getTime() - previous.createdAt.getTime()) : "\u2014" }),
|
|
1218
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.TableCell, { className: "text-xs", children: pageView.path })
|
|
1219
1219
|
] }, pageView.id);
|
|
1220
1220
|
}) })
|
|
1221
1221
|
] }) })
|
|
1222
1222
|
) })
|
|
1223
1223
|
] }),
|
|
1224
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1225
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1226
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1224
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkO5MTDTZCjs.Card, { children: [
|
|
1225
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardTitle, { children: t("analytics.admin.panels.other_sessions") }) }),
|
|
1226
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1227
1227
|
AnalyticsSessionsTable,
|
|
1228
1228
|
{
|
|
1229
1229
|
rows: otherSessions,
|
|
@@ -1235,7 +1235,7 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1235
1235
|
] })
|
|
1236
1236
|
] }) });
|
|
1237
1237
|
}, "renderBody");
|
|
1238
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1238
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkO5MTDTZCjs.SharedProvider, { value: { breadcrumbs: breadcrumb, title }, children: renderBody() });
|
|
1239
1239
|
}
|
|
1240
1240
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsJourneyContainer, "AnalyticsJourneyContainer");
|
|
1241
1241
|
function unit(locale, name, value) {
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
seriesColor,
|
|
32
32
|
usePageUrlGenerator,
|
|
33
33
|
useUsageFormatters
|
|
34
|
-
} from "../../chunk-
|
|
34
|
+
} from "../../chunk-4OJFFFUQ.mjs";
|
|
35
35
|
import "../../chunk-VOXD3ZLY.mjs";
|
|
36
36
|
import "../../chunk-QSNZ6HPY.mjs";
|
|
37
37
|
import "../../chunk-PW42LRSL.mjs";
|