@carlonicora/nextjs-jsonapi 5.7.0 → 5.7.1
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-ZHXXFWUJ.js → BlockNoteEditor-ARUXU5AV.js} +9 -9
- package/dist/{BlockNoteEditor-ZHXXFWUJ.js.map → BlockNoteEditor-ARUXU5AV.js.map} +1 -1
- package/dist/{BlockNoteEditor-R3WXUFHX.mjs → BlockNoteEditor-MNNISNVN.mjs} +2 -2
- package/dist/billing/index.js +381 -380
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +3 -2
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-CFB6FHIY.mjs → chunk-2FNSDBJG.mjs} +9 -6
- package/dist/chunk-2FNSDBJG.mjs.map +1 -0
- package/dist/{chunk-ZCOPOO7T.js → chunk-2WK35GO2.js} +10 -7
- package/dist/chunk-2WK35GO2.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 +58 -58
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +87 -87
- 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 +74 -74
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/features/billing/stripe-coupon/components/containers/CouponContainer.tsx +2 -2
- package/src/features/billing/stripe-coupon/components/forms/CouponEditor.tsx +1 -11
- package/src/features/billing/stripe-coupon/utils/__tests__/coupon-page-module.spec.ts +32 -0
- package/src/features/billing/stripe-coupon/utils/coupon-page-module.ts +13 -0
- package/dist/chunk-CFB6FHIY.mjs.map +0 -1
- package/dist/chunk-ZCOPOO7T.js.map +0 -1
- /package/dist/{BlockNoteEditor-R3WXUFHX.mjs.map → BlockNoteEditor-MNNISNVN.mjs.map} +0 -0
|
@@ -33,7 +33,7 @@ var _chunk2TXE57LEjs = require('../../chunk-2TXE57LE.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunk2WK35GO2js = require('../../chunk-2WK35GO2.js');
|
|
37
37
|
require('../../chunk-XOSC3FFP.js');
|
|
38
38
|
require('../../chunk-G4JR3SFV.js');
|
|
39
39
|
|
|
@@ -224,7 +224,7 @@ function AnalyticsAdminFilterBar({ section, granularity, onChange }) {
|
|
|
224
224
|
};
|
|
225
225
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
226
226
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-md:w-full max-md:[&_#date]:w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
227
|
-
|
|
227
|
+
_chunk2WK35GO2js.DateRangeSelector,
|
|
228
228
|
{
|
|
229
229
|
onDateChange: (range) => {
|
|
230
230
|
if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
|
|
@@ -268,7 +268,7 @@ function Segmented({
|
|
|
268
268
|
children: options.map((option) => {
|
|
269
269
|
const selected = option.value === value;
|
|
270
270
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
271
|
-
|
|
271
|
+
_chunk2WK35GO2js.Button,
|
|
272
272
|
{
|
|
273
273
|
type: "button",
|
|
274
274
|
size: "sm",
|
|
@@ -504,7 +504,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
504
504
|
error
|
|
505
505
|
]
|
|
506
506
|
);
|
|
507
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
507
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminContext.Provider, { value: contextValue, children }) });
|
|
508
508
|
}, "AnalyticsAdminProvider");
|
|
509
509
|
var useAnalyticsAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
510
510
|
const ctx = _react.useContext.call(void 0, AnalyticsAdminContext);
|
|
@@ -597,8 +597,8 @@ function LeadTile({
|
|
|
597
597
|
previousLabel,
|
|
598
598
|
decimal
|
|
599
599
|
}) {
|
|
600
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
601
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
600
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.CardContent, { className: "grid gap-1", children: [
|
|
601
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.MicroLabel, { children: label }),
|
|
602
602
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
|
|
603
603
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
|
|
604
604
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal }),
|
|
@@ -614,8 +614,8 @@ function SupportingTile({
|
|
|
614
614
|
delta,
|
|
615
615
|
decimal
|
|
616
616
|
}) {
|
|
617
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
618
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
617
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.CardContent, { className: "grid gap-1", children: [
|
|
618
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.MicroLabel, { children: label }),
|
|
619
619
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
620
620
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
|
|
621
621
|
delta !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal })
|
|
@@ -666,9 +666,9 @@ function AnalyticsBreakdownTable({ breakdowns }) {
|
|
|
666
666
|
route: t("analytics.admin.dimensions.route"),
|
|
667
667
|
landing: t("analytics.admin.dimensions.landing")
|
|
668
668
|
};
|
|
669
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
670
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
671
|
-
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
669
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.Tabs, { defaultValue: ANALYTICS_DIMENSIONS[0], children: [
|
|
670
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.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, _chunk2WK35GO2js.TabsTrigger, { value: dimension, children: labels[dimension] }, dimension)) }),
|
|
671
|
+
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TabsContent, { value: dimension, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreakdownRows, { rows: _nullishCoalesce(breakdowns[dimension], () => ( [])) }) }, dimension))
|
|
672
672
|
] });
|
|
673
673
|
}
|
|
674
674
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsBreakdownTable, "AnalyticsBreakdownTable");
|
|
@@ -683,18 +683,18 @@ function BreakdownRows({ rows }) {
|
|
|
683
683
|
// The package's <Table> wraps itself in an `overflow-x-clip` container, which
|
|
684
684
|
// would swallow the overflow before this scroller ever saw it — hence the
|
|
685
685
|
// child override. Wide tables must scroll, never widen the page.
|
|
686
|
-
/* @__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,
|
|
687
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
688
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
689
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
690
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
691
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
686
|
+
/* @__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, _chunk2WK35GO2js.Table, { children: [
|
|
687
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.TableRow, { children: [
|
|
688
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.key") }),
|
|
689
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.visitors") }),
|
|
690
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.sessions") }),
|
|
691
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.page_views") })
|
|
692
692
|
] }) }),
|
|
693
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
694
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
695
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
696
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
697
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
693
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableBody, { children: sortedRows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.TableRow, { "data-testid": `analytics-breakdown-row-${row.id}`, children: [
|
|
694
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-xs", children: row.key === OTHER_KEY ? t("analytics.admin.other") : row.key }),
|
|
695
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.visitors, 0) }),
|
|
696
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.sessions, 0) }),
|
|
697
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) })
|
|
698
698
|
] }, row.id)) })
|
|
699
699
|
] }) })
|
|
700
700
|
);
|
|
@@ -709,48 +709,48 @@ var VISITOR_SUFFIX_LENGTH = 6;
|
|
|
709
709
|
function AnalyticsSessionsTable({ rows, sessionPageUrl, onLoadMore, hasMore }) {
|
|
710
710
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
711
711
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
712
|
-
const generateUrl =
|
|
712
|
+
const generateUrl = _chunk2WK35GO2js.usePageUrlGenerator.call(void 0, );
|
|
713
713
|
const { decimal } = _chunk2TXE57LEjs.useUsageFormatters.call(void 0, );
|
|
714
714
|
const dateTime = _react.useMemo.call(void 0, () => new Intl.DateTimeFormat(locale, { dateStyle: "short", timeStyle: "short" }), [locale]);
|
|
715
715
|
if (rows.length === 0) {
|
|
716
716
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
717
717
|
}
|
|
718
718
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
719
|
-
/* @__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,
|
|
720
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
721
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
722
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
723
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
724
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
725
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
726
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
719
|
+
/* @__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, _chunk2WK35GO2js.Table, { children: [
|
|
720
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.TableRow, { children: [
|
|
721
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.started") }),
|
|
722
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.visitor") }),
|
|
723
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.source") }),
|
|
724
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.landing") }),
|
|
725
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.pages") }),
|
|
726
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.device") })
|
|
727
727
|
] }) }),
|
|
728
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableBody, { children: rows.map((row) => {
|
|
729
729
|
const source = [_nullishCoalesce(row.utmSource, () => ( row.referrerHost)), row.utmMedium].filter(Boolean).join(" / ");
|
|
730
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
731
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
732
|
-
|
|
730
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.TableRow, { "data-testid": `analytics-session-row-${row.id}`, children: [
|
|
731
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-xs tabular-nums", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
732
|
+
_chunk2WK35GO2js.Link,
|
|
733
733
|
{
|
|
734
734
|
href: generateUrl({ page: sessionPageUrl, id: row.id }),
|
|
735
735
|
"data-testid": `analytics-session-link-${row.id}`,
|
|
736
736
|
children: dateTime.format(row.startedAt)
|
|
737
737
|
}
|
|
738
738
|
) }),
|
|
739
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
739
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-xs", children: row.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
740
740
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: row.user.name }),
|
|
741
741
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: row.user.email })
|
|
742
742
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
743
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
743
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
744
744
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: row.visitorId.slice(-VISITOR_SUFFIX_LENGTH) })
|
|
745
745
|
] }) }),
|
|
746
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
747
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
748
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
749
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
746
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-xs", children: source }),
|
|
747
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-xs", children: row.landingRoute }),
|
|
748
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) }),
|
|
749
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-muted-foreground text-xs", children: row.deviceType })
|
|
750
750
|
] }, row.id);
|
|
751
751
|
}) })
|
|
752
752
|
] }) }),
|
|
753
|
-
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
753
|
+
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Button, { type: "button", variant: "outline", size: "sm", onClick: onLoadMore, children: t("analytics.admin.load_more") }) })
|
|
754
754
|
] });
|
|
755
755
|
}
|
|
756
756
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsSessionsTable, "AnalyticsSessionsTable");
|
|
@@ -817,7 +817,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
817
817
|
// rtl-ok: deliberate LTR island (chart)
|
|
818
818
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
819
819
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "analytics-timeline-data", children: JSON.stringify(chartData) }),
|
|
820
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
820
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.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: [
|
|
821
821
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
822
822
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
823
823
|
_recharts.XAxis,
|
|
@@ -841,10 +841,10 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
841
841
|
}
|
|
842
842
|
),
|
|
843
843
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
844
|
-
|
|
844
|
+
_chunk2WK35GO2js.ChartTooltip,
|
|
845
845
|
{
|
|
846
846
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
847
|
-
|
|
847
|
+
_chunk2WK35GO2js.ChartTooltipContent,
|
|
848
848
|
{
|
|
849
849
|
labelFormatter: (value) => bucketDate(String(value), granularity),
|
|
850
850
|
valueFormatter: (value) => decimal(Number(value), 0)
|
|
@@ -852,7 +852,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
852
852
|
)
|
|
853
853
|
}
|
|
854
854
|
),
|
|
855
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
855
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.ChartLegendContent, {}) }),
|
|
856
856
|
SERIES.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
857
857
|
_recharts.Bar,
|
|
858
858
|
{
|
|
@@ -887,25 +887,25 @@ function AnalyticsAdminContainer() {
|
|
|
887
887
|
error
|
|
888
888
|
} = useAnalyticsAdmin();
|
|
889
889
|
if (error) {
|
|
890
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
890
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.RoundPageContainer, { module: _chunk5TH2DSAHjs.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
891
891
|
}
|
|
892
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
893
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
892
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.RoundPageContainer, { module: _chunk5TH2DSAHjs.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true });
|
|
893
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.RoundPageContainer, { module: _chunk5TH2DSAHjs.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: [
|
|
894
894
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
895
895
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminTiles, { summary }),
|
|
896
896
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: t("analytics.admin.tiles.summarised_note") })
|
|
897
897
|
] }),
|
|
898
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
899
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
900
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
898
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.Card, { children: [
|
|
899
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardTitle, { children: t("analytics.admin.panels.over_time") }) }),
|
|
900
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsTimelineChart, { rows: timeline }) })
|
|
901
901
|
] }),
|
|
902
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
903
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
904
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
902
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.Card, { children: [
|
|
903
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardTitle, { children: t("analytics.admin.panels.breakdown") }) }),
|
|
904
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsBreakdownTable, { breakdowns }) })
|
|
905
905
|
] }),
|
|
906
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
907
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
908
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
906
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.Card, { children: [
|
|
907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardTitle, { children: t("analytics.admin.panels.sessions") }) }),
|
|
908
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
909
909
|
AnalyticsSessionsTable,
|
|
910
910
|
{
|
|
911
911
|
rows: sessions,
|
|
@@ -928,7 +928,7 @@ var OTHER_SESSIONS_WINDOW_DAYS = 395;
|
|
|
928
928
|
function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_URL }) {
|
|
929
929
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
930
930
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
931
|
-
const generateUrl =
|
|
931
|
+
const generateUrl = _chunk2WK35GO2js.usePageUrlGenerator.call(void 0, );
|
|
932
932
|
const [session, setSession] = _react.useState.call(void 0, void 0);
|
|
933
933
|
const [pageViews, setPageViews] = _react.useState.call(void 0, []);
|
|
934
934
|
const [otherSessions, setOtherSessions] = _react.useState.call(void 0, []);
|
|
@@ -984,26 +984,26 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
984
984
|
const title = { type: t("analytics.admin.panels.journey") };
|
|
985
985
|
const renderBody = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
986
986
|
if (error) {
|
|
987
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
987
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.RoundPageContainer, { module: _chunk5TH2DSAHjs.Modules.AnalyticsSession, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
988
988
|
}
|
|
989
|
-
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
989
|
+
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.RoundPageContainer, { module: _chunk5TH2DSAHjs.Modules.AnalyticsSession, fullWidth: true, forceHeader: true });
|
|
990
990
|
const source = [_nullishCoalesce(session.utmSource, () => ( session.referrerHost)), session.utmMedium, session.utmCampaign].filter(Boolean).join(" / ");
|
|
991
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
992
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
991
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.RoundPageContainer, { module: _chunk5TH2DSAHjs.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: [
|
|
992
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Card, { "data-testid": "analytics-journey-attribution", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.CardContent, { className: "flex flex-col gap-3", children: [
|
|
993
993
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
994
994
|
session.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
995
995
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: session.user.name }),
|
|
996
996
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: session.user.email })
|
|
997
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
998
|
-
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
997
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
998
|
+
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Badge, { variant: "softGreen", children: t("analytics.admin.consented") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.Badge, { variant: "softGray", children: t("analytics.admin.not_consented") })
|
|
999
999
|
] }),
|
|
1000
1000
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
|
|
1001
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1002
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1003
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1004
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1001
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.DetailField, { label: t("analytics.admin.columns.started"), value: dateTime.format(session.startedAt) }),
|
|
1002
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.DetailField, { label: t("analytics.admin.columns.source"), value: source }),
|
|
1003
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.DetailField, { label: t("analytics.admin.columns.landing"), value: session.landingRoute }),
|
|
1004
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.DetailField, { label: t("analytics.admin.columns.device"), value: session.deviceType }),
|
|
1005
1005
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1006
|
-
|
|
1006
|
+
_chunk2WK35GO2js.DetailField,
|
|
1007
1007
|
{
|
|
1008
1008
|
label: t("analytics.admin.columns.visitor"),
|
|
1009
1009
|
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: session.visitorId })
|
|
@@ -1011,31 +1011,31 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1011
1011
|
)
|
|
1012
1012
|
] })
|
|
1013
1013
|
] }) }),
|
|
1014
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1015
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1016
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1014
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.Card, { children: [
|
|
1015
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardTitle, { children: t("analytics.admin.columns.pages") }) }),
|
|
1016
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardContent, { children: pageViews.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") }) : (
|
|
1017
1017
|
// The package's <Table> wraps itself in an `overflow-x-clip`
|
|
1018
1018
|
// container — hence the child override, so wide rows scroll.
|
|
1019
|
-
/* @__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,
|
|
1020
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1021
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1022
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1023
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1019
|
+
/* @__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, _chunk2WK35GO2js.Table, { children: [
|
|
1020
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.TableRow, { children: [
|
|
1021
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.time") }),
|
|
1022
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.gap") }),
|
|
1023
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.path") })
|
|
1024
1024
|
] }) }),
|
|
1025
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1025
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableBody, { children: pageViews.map((pageView, index) => {
|
|
1026
1026
|
const previous = index > 0 ? pageViews[index - 1] : void 0;
|
|
1027
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1028
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1029
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1030
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1027
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.TableRow, { "data-testid": `analytics-pageview-row-${pageView.id}`, children: [
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-xs tabular-nums", children: dateTime.format(pageView.createdAt) }),
|
|
1029
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-end text-xs tabular-nums", children: previous ? formatGap(pageView.createdAt.getTime() - previous.createdAt.getTime()) : "\u2014" }),
|
|
1030
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.TableCell, { className: "text-xs", children: pageView.path })
|
|
1031
1031
|
] }, pageView.id);
|
|
1032
1032
|
}) })
|
|
1033
1033
|
] }) })
|
|
1034
1034
|
) })
|
|
1035
1035
|
] }),
|
|
1036
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1037
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1038
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1036
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2WK35GO2js.Card, { children: [
|
|
1037
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardTitle, { children: t("analytics.admin.panels.other_sessions") }) }),
|
|
1038
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1039
1039
|
AnalyticsSessionsTable,
|
|
1040
1040
|
{
|
|
1041
1041
|
rows: otherSessions,
|
|
@@ -1047,7 +1047,7 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1047
1047
|
] })
|
|
1048
1048
|
] }) });
|
|
1049
1049
|
}, "renderBody");
|
|
1050
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1050
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2WK35GO2js.SharedProvider, { value: { breadcrumbs: breadcrumb, title }, children: renderBody() });
|
|
1051
1051
|
}
|
|
1052
1052
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsJourneyContainer, "AnalyticsJourneyContainer");
|
|
1053
1053
|
function unit(locale, name, value) {
|