@carlonicora/nextjs-jsonapi 3.27.0 → 3.27.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-LP65KUXI.js → BlockNoteEditor-BWL2FBVB.js} +9 -9
- package/dist/{BlockNoteEditor-LP65KUXI.js.map → BlockNoteEditor-BWL2FBVB.js.map} +1 -1
- package/dist/{BlockNoteEditor-5MF2AH2U.mjs → BlockNoteEditor-XSL3AWNI.mjs} +2 -2
- package/dist/billing/index.js +335 -335
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-ZEEOY45J.js → chunk-CXWLZRAF.js} +446 -433
- package/dist/chunk-CXWLZRAF.js.map +1 -0
- package/dist/{chunk-SVJ6UZPA.mjs → chunk-EK37KFPD.mjs} +24 -11
- package/dist/chunk-EK37KFPD.mjs.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/features/analytics/index.js +88 -88
- package/dist/features/analytics/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 +75 -75
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/scripts/dev-watch.mjs +27 -2
- package/src/components/tables/cells/cell.date.tsx +7 -3
- package/src/components/tables/cells/cell.dateTime.tsx +11 -5
- package/src/features/auth/components/two-factor/PasskeyList.tsx +3 -1
- package/src/features/auth/components/two-factor/TotpAuthenticatorList.tsx +3 -1
- package/src/features/notification/components/notifications/Notification.tsx +1 -1
- package/src/features/waitlist/hooks/useWaitlistTableStructure.tsx +5 -3
- package/src/shadcnui/ui/calendar.tsx +1 -1
- package/dist/chunk-SVJ6UZPA.mjs.map +0 -1
- package/dist/chunk-ZEEOY45J.js.map +0 -1
- /package/dist/{BlockNoteEditor-5MF2AH2U.mjs.map → BlockNoteEditor-XSL3AWNI.mjs.map} +0 -0
|
@@ -33,7 +33,7 @@ var _chunkGKDHYB2Rjs = require('../../chunk-GKDHYB2R.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkCXWLZRAFjs = require('../../chunk-CXWLZRAF.js');
|
|
37
37
|
require('../../chunk-4Z45NYPR.js');
|
|
38
38
|
|
|
39
39
|
|
|
@@ -223,7 +223,7 @@ function AnalyticsAdminFilterBar({ section, granularity, onChange }) {
|
|
|
223
223
|
};
|
|
224
224
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
225
225
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-md:w-full max-md:[&_#date]:w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
226
|
-
|
|
226
|
+
_chunkCXWLZRAFjs.DateRangeSelector,
|
|
227
227
|
{
|
|
228
228
|
onDateChange: (range) => {
|
|
229
229
|
if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
|
|
@@ -267,7 +267,7 @@ function Segmented({
|
|
|
267
267
|
children: options.map((option) => {
|
|
268
268
|
const selected = option.value === value;
|
|
269
269
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
270
|
-
|
|
270
|
+
_chunkCXWLZRAFjs.Button,
|
|
271
271
|
{
|
|
272
272
|
type: "button",
|
|
273
273
|
size: "sm",
|
|
@@ -387,7 +387,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
387
387
|
sessionPageUrl = ANALYTICS_SESSION_PAGE_URL
|
|
388
388
|
}) => {
|
|
389
389
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
390
|
-
const generateUrl =
|
|
390
|
+
const generateUrl = _chunkCXWLZRAFjs.usePageUrlGenerator.call(void 0, );
|
|
391
391
|
const [filters, setFilterState] = _react.useState.call(void 0, () => {
|
|
392
392
|
const range = defaultRange();
|
|
393
393
|
return {
|
|
@@ -511,7 +511,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
511
511
|
error
|
|
512
512
|
]
|
|
513
513
|
);
|
|
514
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
514
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminContext.Provider, { value: contextValue, children }) });
|
|
515
515
|
}, "AnalyticsAdminProvider");
|
|
516
516
|
var useAnalyticsAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
517
517
|
const ctx = _react.useContext.call(void 0, AnalyticsAdminContext);
|
|
@@ -604,8 +604,8 @@ function LeadTile({
|
|
|
604
604
|
previousLabel,
|
|
605
605
|
decimal
|
|
606
606
|
}) {
|
|
607
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
608
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
607
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.CardContent, { className: "grid gap-1", children: [
|
|
608
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.MicroLabel, { children: label }),
|
|
609
609
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
|
|
610
610
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
|
|
611
611
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal }),
|
|
@@ -621,8 +621,8 @@ function SupportingTile({
|
|
|
621
621
|
delta,
|
|
622
622
|
decimal
|
|
623
623
|
}) {
|
|
624
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
625
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
624
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.CardContent, { className: "grid gap-1", children: [
|
|
625
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.MicroLabel, { children: label }),
|
|
626
626
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
627
627
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
|
|
628
628
|
delta !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal })
|
|
@@ -673,9 +673,9 @@ function AnalyticsBreakdownTable({ breakdowns }) {
|
|
|
673
673
|
route: t("analytics.admin.dimensions.route"),
|
|
674
674
|
landing: t("analytics.admin.dimensions.landing")
|
|
675
675
|
};
|
|
676
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
677
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
678
|
-
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
676
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.Tabs, { defaultValue: ANALYTICS_DIMENSIONS[0], children: [
|
|
677
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.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, _chunkCXWLZRAFjs.TabsTrigger, { value: dimension, children: labels[dimension] }, dimension)) }),
|
|
678
|
+
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TabsContent, { value: dimension, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreakdownRows, { rows: _nullishCoalesce(breakdowns[dimension], () => ( [])) }) }, dimension))
|
|
679
679
|
] });
|
|
680
680
|
}
|
|
681
681
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsBreakdownTable, "AnalyticsBreakdownTable");
|
|
@@ -690,18 +690,18 @@ function BreakdownRows({ rows }) {
|
|
|
690
690
|
// The package's <Table> wraps itself in an `overflow-x-clip` container, which
|
|
691
691
|
// would swallow the overflow before this scroller ever saw it — hence the
|
|
692
692
|
// child override. Wide tables must scroll, never widen the page.
|
|
693
|
-
/* @__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,
|
|
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,
|
|
698
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
693
|
+
/* @__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, _chunkCXWLZRAFjs.Table, { children: [
|
|
694
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.TableRow, { children: [
|
|
695
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.key") }),
|
|
696
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.visitors") }),
|
|
697
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.sessions") }),
|
|
698
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.page_views") })
|
|
699
699
|
] }) }),
|
|
700
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
701
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
702
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
703
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
704
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
700
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableBody, { children: sortedRows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.TableRow, { "data-testid": `analytics-breakdown-row-${row.id}`, children: [
|
|
701
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-xs", children: row.key === OTHER_KEY ? t("analytics.admin.other") : row.key }),
|
|
702
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.visitors, 0) }),
|
|
703
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.sessions, 0) }),
|
|
704
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) })
|
|
705
705
|
] }, row.id)) })
|
|
706
706
|
] }) })
|
|
707
707
|
);
|
|
@@ -716,48 +716,48 @@ var VISITOR_SUFFIX_LENGTH = 6;
|
|
|
716
716
|
function AnalyticsSessionsTable({ rows, sessionPageUrl, onLoadMore, hasMore }) {
|
|
717
717
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
718
718
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
719
|
-
const generateUrl =
|
|
719
|
+
const generateUrl = _chunkCXWLZRAFjs.usePageUrlGenerator.call(void 0, );
|
|
720
720
|
const { decimal } = _chunkGKDHYB2Rjs.useUsageFormatters.call(void 0, );
|
|
721
721
|
const dateTime = _react.useMemo.call(void 0, () => new Intl.DateTimeFormat(locale, { dateStyle: "short", timeStyle: "short" }), [locale]);
|
|
722
722
|
if (rows.length === 0) {
|
|
723
723
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
724
724
|
}
|
|
725
725
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
726
|
-
/* @__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,
|
|
727
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
728
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
729
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
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,
|
|
726
|
+
/* @__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, _chunkCXWLZRAFjs.Table, { children: [
|
|
727
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.TableRow, { children: [
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.started") }),
|
|
729
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.visitor") }),
|
|
730
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.source") }),
|
|
731
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.landing") }),
|
|
732
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.pages") }),
|
|
733
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.device") })
|
|
734
734
|
] }) }),
|
|
735
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
735
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableBody, { children: rows.map((row) => {
|
|
736
736
|
const source = [_nullishCoalesce(row.utmSource, () => ( row.referrerHost)), row.utmMedium].filter(Boolean).join(" / ");
|
|
737
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
738
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
739
|
-
|
|
737
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.TableRow, { "data-testid": `analytics-session-row-${row.id}`, children: [
|
|
738
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-xs tabular-nums", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
739
|
+
_chunkCXWLZRAFjs.Link,
|
|
740
740
|
{
|
|
741
741
|
href: generateUrl({ page: sessionPageUrl, id: row.id }),
|
|
742
742
|
"data-testid": `analytics-session-link-${row.id}`,
|
|
743
743
|
children: dateTime.format(row.startedAt)
|
|
744
744
|
}
|
|
745
745
|
) }),
|
|
746
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
746
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-xs", children: row.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
747
747
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: row.user.name }),
|
|
748
748
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: row.user.email })
|
|
749
749
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
750
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
750
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
751
751
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: row.visitorId.slice(-VISITOR_SUFFIX_LENGTH) })
|
|
752
752
|
] }) }),
|
|
753
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
754
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
755
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
756
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
753
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-xs", children: source }),
|
|
754
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-xs", children: row.landingRoute }),
|
|
755
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) }),
|
|
756
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-muted-foreground text-xs", children: row.deviceType })
|
|
757
757
|
] }, row.id);
|
|
758
758
|
}) })
|
|
759
759
|
] }) }),
|
|
760
|
-
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
760
|
+
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Button, { type: "button", variant: "outline", size: "sm", onClick: onLoadMore, children: t("analytics.admin.load_more") }) })
|
|
761
761
|
] });
|
|
762
762
|
}
|
|
763
763
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsSessionsTable, "AnalyticsSessionsTable");
|
|
@@ -824,7 +824,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
824
824
|
// rtl-ok: deliberate LTR island (chart)
|
|
825
825
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
826
826
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "analytics-timeline-data", children: JSON.stringify(chartData) }),
|
|
827
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
827
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.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: [
|
|
828
828
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
829
829
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
830
830
|
_recharts.XAxis,
|
|
@@ -848,10 +848,10 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
848
848
|
}
|
|
849
849
|
),
|
|
850
850
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
851
|
-
|
|
851
|
+
_chunkCXWLZRAFjs.ChartTooltip,
|
|
852
852
|
{
|
|
853
853
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
854
|
-
|
|
854
|
+
_chunkCXWLZRAFjs.ChartTooltipContent,
|
|
855
855
|
{
|
|
856
856
|
labelFormatter: (value) => bucketDate(String(value), granularity),
|
|
857
857
|
valueFormatter: (value) => decimal(Number(value), 0)
|
|
@@ -859,7 +859,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
859
859
|
)
|
|
860
860
|
}
|
|
861
861
|
),
|
|
862
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
862
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.ChartLegendContent, {}) }),
|
|
863
863
|
SERIES.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
864
864
|
_recharts.Bar,
|
|
865
865
|
{
|
|
@@ -894,25 +894,25 @@ function AnalyticsAdminContainer() {
|
|
|
894
894
|
error
|
|
895
895
|
} = useAnalyticsAdmin();
|
|
896
896
|
if (error) {
|
|
897
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
897
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
898
898
|
}
|
|
899
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
900
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
899
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
|
|
900
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
901
901
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
902
902
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminTiles, { summary }),
|
|
903
903
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: t("analytics.admin.tiles.summarised_note") })
|
|
904
904
|
] }),
|
|
905
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
906
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
907
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
905
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.Card, { children: [
|
|
906
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardTitle, { children: t("analytics.admin.panels.over_time") }) }),
|
|
907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsTimelineChart, { rows: timeline }) })
|
|
908
908
|
] }),
|
|
909
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
910
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
911
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
909
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.Card, { children: [
|
|
910
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardTitle, { children: t("analytics.admin.panels.breakdown") }) }),
|
|
911
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsBreakdownTable, { breakdowns }) })
|
|
912
912
|
] }),
|
|
913
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
914
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
915
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
913
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.Card, { children: [
|
|
914
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardTitle, { children: t("analytics.admin.panels.sessions") }) }),
|
|
915
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
916
916
|
AnalyticsSessionsTable,
|
|
917
917
|
{
|
|
918
918
|
rows: sessions,
|
|
@@ -935,7 +935,7 @@ var OTHER_SESSIONS_WINDOW_DAYS = 395;
|
|
|
935
935
|
function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_URL2 }) {
|
|
936
936
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
937
937
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
938
|
-
const generateUrl =
|
|
938
|
+
const generateUrl = _chunkCXWLZRAFjs.usePageUrlGenerator.call(void 0, );
|
|
939
939
|
const [session, setSession] = _react.useState.call(void 0, void 0);
|
|
940
940
|
const [pageViews, setPageViews] = _react.useState.call(void 0, []);
|
|
941
941
|
const [otherSessions, setOtherSessions] = _react.useState.call(void 0, []);
|
|
@@ -991,26 +991,26 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
991
991
|
const title = { type: t("analytics.admin.panels.journey") };
|
|
992
992
|
const renderBody = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
993
993
|
if (error) {
|
|
994
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
994
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
995
995
|
}
|
|
996
|
-
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
996
|
+
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
|
|
997
997
|
const source = [_nullishCoalesce(session.utmSource, () => ( session.referrerHost)), session.utmMedium, session.utmCampaign].filter(Boolean).join(" / ");
|
|
998
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
999
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
998
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
999
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Card, { "data-testid": "analytics-journey-attribution", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.CardContent, { className: "flex flex-col gap-3", children: [
|
|
1000
1000
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1001
1001
|
session.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
1002
1002
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: session.user.name }),
|
|
1003
1003
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: session.user.email })
|
|
1004
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1005
|
-
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1004
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
1005
|
+
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Badge, { variant: "softGreen", children: t("analytics.admin.consented") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Badge, { variant: "softGray", children: t("analytics.admin.not_consented") })
|
|
1006
1006
|
] }),
|
|
1007
1007
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
|
|
1008
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1009
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1010
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1011
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1008
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.DetailField, { label: t("analytics.admin.columns.started"), value: dateTime.format(session.startedAt) }),
|
|
1009
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.DetailField, { label: t("analytics.admin.columns.source"), value: source }),
|
|
1010
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.DetailField, { label: t("analytics.admin.columns.landing"), value: session.landingRoute }),
|
|
1011
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.DetailField, { label: t("analytics.admin.columns.device"), value: session.deviceType }),
|
|
1012
1012
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1013
|
-
|
|
1013
|
+
_chunkCXWLZRAFjs.DetailField,
|
|
1014
1014
|
{
|
|
1015
1015
|
label: t("analytics.admin.columns.visitor"),
|
|
1016
1016
|
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: session.visitorId })
|
|
@@ -1018,31 +1018,31 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1018
1018
|
)
|
|
1019
1019
|
] })
|
|
1020
1020
|
] }) }),
|
|
1021
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1022
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1023
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1021
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.Card, { children: [
|
|
1022
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardTitle, { children: t("analytics.admin.columns.pages") }) }),
|
|
1023
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardContent, { children: pageViews.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") }) : (
|
|
1024
1024
|
// The package's <Table> wraps itself in an `overflow-x-clip`
|
|
1025
1025
|
// container — hence the child override, so wide rows scroll.
|
|
1026
|
-
/* @__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,
|
|
1027
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1028
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1029
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1030
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1026
|
+
/* @__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, _chunkCXWLZRAFjs.Table, { children: [
|
|
1027
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.TableRow, { children: [
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.time") }),
|
|
1029
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.gap") }),
|
|
1030
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.path") })
|
|
1031
1031
|
] }) }),
|
|
1032
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1032
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableBody, { children: pageViews.map((pageView, index) => {
|
|
1033
1033
|
const previous = index > 0 ? pageViews[index - 1] : void 0;
|
|
1034
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1035
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1036
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1037
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1034
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.TableRow, { "data-testid": `analytics-pageview-row-${pageView.id}`, children: [
|
|
1035
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-xs tabular-nums", children: dateTime.format(pageView.createdAt) }),
|
|
1036
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-end text-xs tabular-nums", children: previous ? formatGap(pageView.createdAt.getTime() - previous.createdAt.getTime()) : "\u2014" }),
|
|
1037
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TableCell, { className: "text-xs", children: pageView.path })
|
|
1038
1038
|
] }, pageView.id);
|
|
1039
1039
|
}) })
|
|
1040
1040
|
] }) })
|
|
1041
1041
|
) })
|
|
1042
1042
|
] }),
|
|
1043
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1044
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1045
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1043
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.Card, { children: [
|
|
1044
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardTitle, { children: t("analytics.admin.panels.other_sessions") }) }),
|
|
1045
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1046
1046
|
AnalyticsSessionsTable,
|
|
1047
1047
|
{
|
|
1048
1048
|
rows: otherSessions,
|
|
@@ -1054,7 +1054,7 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1054
1054
|
] })
|
|
1055
1055
|
] }) });
|
|
1056
1056
|
}, "renderBody");
|
|
1057
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1057
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.SharedProvider, { value: { breadcrumbs: breadcrumb, title }, children: renderBody() });
|
|
1058
1058
|
}
|
|
1059
1059
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsJourneyContainer, "AnalyticsJourneyContainer");
|
|
1060
1060
|
function unit(locale, name, value) {
|
|
@@ -23,7 +23,7 @@ var _chunkYBZVWLPHjs = require('../../chunk-YBZVWLPH.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkCXWLZRAFjs = require('../../chunk-CXWLZRAF.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunk4Z45NYPRjs = require('../../chunk-4Z45NYPR.js');
|
|
@@ -75,29 +75,29 @@ var _lucidereact = require('lucide-react');
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
function HelpAssistantSheet({ open, onOpenChange }) {
|
|
78
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
79
|
-
|
|
78
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Sheet, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
79
|
+
_chunkCXWLZRAFjs.SheetContent,
|
|
80
80
|
{
|
|
81
81
|
side: "end",
|
|
82
82
|
className: "flex w-full flex-col data-[side=right]:sm:max-w-2xl data-[side=right]:lg:max-w-3xl data-[side=left]:sm:max-w-2xl data-[side=left]:lg:max-w-3xl",
|
|
83
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
83
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.AssistantProvider, { manageUrl: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAssistantSheetBody, {}) })
|
|
84
84
|
}
|
|
85
85
|
) });
|
|
86
86
|
}
|
|
87
87
|
_chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheet, "HelpAssistantSheet");
|
|
88
88
|
function HelpAssistantSheetBody() {
|
|
89
89
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
90
|
-
const ctx =
|
|
90
|
+
const ctx = _chunkCXWLZRAFjs.useAssistantContext.call(void 0, );
|
|
91
91
|
const showThread = !!ctx.assistant || ctx.sending || ctx.messages.length > 0;
|
|
92
92
|
const send = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (content) => ctx.sendMessage(content, { howToMode: true }), "send");
|
|
93
93
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
94
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
95
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
96
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
94
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.SheetHeader, { children: [
|
|
95
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.SheetTitle, { children: t("help.askAi.sheet.title") }),
|
|
96
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.SheetDescription, { children: t("help.askAi.sheet.subtitle") })
|
|
97
97
|
] }),
|
|
98
|
-
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
98
|
+
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.AssistantEmptyState, { onSend: send }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
99
99
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
100
|
-
|
|
100
|
+
_chunkCXWLZRAFjs.AssistantThread,
|
|
101
101
|
{
|
|
102
102
|
messages: ctx.messages,
|
|
103
103
|
sending: ctx.sending,
|
|
@@ -107,7 +107,7 @@ function HelpAssistantSheetBody() {
|
|
|
107
107
|
onRetry: ctx.retrySend
|
|
108
108
|
}
|
|
109
109
|
),
|
|
110
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
110
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.AssistantComposer, { onSend: send, disabled: ctx.sending })
|
|
111
111
|
] })
|
|
112
112
|
] });
|
|
113
113
|
}
|
|
@@ -117,20 +117,20 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheetBody, "HelpAssistantSheet
|
|
|
117
117
|
|
|
118
118
|
function HelpAskAi() {
|
|
119
119
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
120
|
-
const { currentUser } =
|
|
120
|
+
const { currentUser } = _chunkCXWLZRAFjs.useCurrentUserContext.call(void 0, );
|
|
121
121
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
122
122
|
const disabled = !currentUser;
|
|
123
123
|
if (disabled) {
|
|
124
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
125
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
124
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.Tooltip, { children: [
|
|
125
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Button, { variant: "outline", size: "sm", disabled: true }), children: [
|
|
126
126
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
127
127
|
t("help.askAi.button")
|
|
128
128
|
] }),
|
|
129
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
129
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.TooltipContent, { children: t("help.askAi.loginTooltip") })
|
|
130
130
|
] });
|
|
131
131
|
}
|
|
132
132
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
133
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
133
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
|
|
134
134
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
135
135
|
t("help.askAi.button")
|
|
136
136
|
] }),
|
|
@@ -143,7 +143,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAskAi, "HelpAskAi");
|
|
|
143
143
|
|
|
144
144
|
function HelpHeader() {
|
|
145
145
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
146
|
-
const { currentUser } =
|
|
146
|
+
const { currentUser } = _chunkCXWLZRAFjs.useCurrentUserContext.call(void 0, );
|
|
147
147
|
const { brand } = useHelp();
|
|
148
148
|
const logo = _optionalChain([brand, 'optionalAccess', _ => _.logo]);
|
|
149
149
|
const label = _nullishCoalesce(_optionalChain([brand, 'optionalAccess', _2 => _2.label]), () => ( "Help"));
|
|
@@ -159,7 +159,7 @@ function HelpHeader() {
|
|
|
159
159
|
] }),
|
|
160
160
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 max-md:shrink-0", children: [
|
|
161
161
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAskAi, {}),
|
|
162
|
-
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className:
|
|
162
|
+
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className: _chunkCXWLZRAFjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.openApp") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/login", className: _chunkCXWLZRAFjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.login") })
|
|
163
163
|
] })
|
|
164
164
|
] });
|
|
165
165
|
}
|
|
@@ -201,7 +201,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, useHelpFilter, "useHelpFilter");
|
|
|
201
201
|
|
|
202
202
|
function HelpSideNav() {
|
|
203
203
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
204
|
-
const generateUrl =
|
|
204
|
+
const generateUrl = _chunkCXWLZRAFjs.usePageUrlGenerator.call(void 0, );
|
|
205
205
|
const pathname = _navigation.usePathname.call(void 0, );
|
|
206
206
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
207
207
|
_react.useEffect.call(void 0, () => {
|
|
@@ -282,7 +282,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpSideNav, "HelpSideNav");
|
|
|
282
282
|
function HelpArticleBody(props) {
|
|
283
283
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
284
284
|
const format = _nextintl.useFormatter.call(void 0, );
|
|
285
|
-
const generateUrl =
|
|
285
|
+
const generateUrl = _chunkCXWLZRAFjs.usePageUrlGenerator.call(void 0, );
|
|
286
286
|
const { howToType, title, summary, updatedAt, prev, next, children } = props;
|
|
287
287
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "article", { className: "prose dark:prose-invert max-w-none", children: [
|
|
288
288
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { className: "text-muted-foreground mb-2 text-xs", children: [
|
|
@@ -339,7 +339,7 @@ function HelpTOC({ headings }) {
|
|
|
339
339
|
}, [headings]);
|
|
340
340
|
if (headings.length === 0) return null;
|
|
341
341
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { "aria-label": t("help.toc.title"), className: "hidden lg:block", children: [
|
|
342
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
342
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.MicroLabel, { className: "mb-2", children: t("help.toc.title") }),
|
|
343
343
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "space-y-1 text-sm", children: headings.map((h) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { style: { paddingInlineStart: `${(h.depth - 2) * 0.75}rem` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
344
344
|
"a",
|
|
345
345
|
{
|
|
@@ -360,7 +360,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpTOC, "HelpTOC");
|
|
|
360
360
|
|
|
361
361
|
function HelpHint({ contextKey }) {
|
|
362
362
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
363
|
-
const generateUrl =
|
|
363
|
+
const generateUrl = _chunkCXWLZRAFjs.usePageUrlGenerator.call(void 0, );
|
|
364
364
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
365
365
|
const [picked, setPicked] = _react.useState.call(void 0, null);
|
|
366
366
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
@@ -378,7 +378,7 @@ function HelpHint({ contextKey }) {
|
|
|
378
378
|
if (matches.length === 0) return null;
|
|
379
379
|
const active = _nullishCoalesce(picked, () => ( (matches.length === 1 ? matches[0] : null)));
|
|
380
380
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
381
|
-
|
|
381
|
+
_chunkCXWLZRAFjs.Sheet,
|
|
382
382
|
{
|
|
383
383
|
open,
|
|
384
384
|
onOpenChange: (o) => {
|
|
@@ -386,11 +386,11 @@ function HelpHint({ contextKey }) {
|
|
|
386
386
|
if (!o) setPicked(null);
|
|
387
387
|
},
|
|
388
388
|
children: [
|
|
389
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
390
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
391
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
392
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
393
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
389
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.SheetTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.Button, { variant: "ghost", size: "icon-sm", "aria-label": t("help.hint.trigger") }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.HelpCircleIcon, { className: "h-4 w-4" }) }),
|
|
390
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.SheetContent, { side: "end", className: "w-full max-w-md sm:max-w-lg", children: [
|
|
391
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkCXWLZRAFjs.SheetHeader, { children: [
|
|
392
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.SheetTitle, { children: active ? active.name : t("help.hint.pickArticle") }),
|
|
393
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.SheetDescription, { children: _nullishCoalesce(_optionalChain([active, 'optionalAccess', _4 => _4.summary]), () => ( "")) })
|
|
394
394
|
] }),
|
|
395
395
|
active ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-4 space-y-3", children: [
|
|
396
396
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: active.summary }),
|
|
@@ -422,7 +422,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpHint, "HelpHint");
|
|
|
422
422
|
|
|
423
423
|
function HelpSearchResultRow({ result, onSelect }) {
|
|
424
424
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
425
|
-
const generateUrl =
|
|
425
|
+
const generateUrl = _chunkCXWLZRAFjs.usePageUrlGenerator.call(void 0, );
|
|
426
426
|
const [article, setArticle] = _react.useState.call(void 0, null);
|
|
427
427
|
_react.useEffect.call(void 0, () => {
|
|
428
428
|
let active = true;
|
|
@@ -433,7 +433,7 @@ function HelpSearchResultRow({ result, onSelect }) {
|
|
|
433
433
|
}, [result.id]);
|
|
434
434
|
if (!article) {
|
|
435
435
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
436
|
-
|
|
436
|
+
_chunkCXWLZRAFjs.CommandItem,
|
|
437
437
|
{
|
|
438
438
|
value: result.id,
|
|
439
439
|
disabled: true,
|
|
@@ -442,7 +442,7 @@ function HelpSearchResultRow({ result, onSelect }) {
|
|
|
442
442
|
}
|
|
443
443
|
);
|
|
444
444
|
}
|
|
445
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
445
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCXWLZRAFjs.CommandItem, { value: result.id, onSelect, className: "cursor-pointer p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
446
446
|
_link2.default,
|
|
447
447
|
{
|
|
448
448
|
href: generateUrl({ page: `/help/${article.howToType}/${article.slug}` }),
|