@carlonicora/nextjs-jsonapi 4.2.0 → 4.2.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-HXAHDJA7.mjs → BlockNoteEditor-FROUKBVK.mjs} +2 -2
- package/dist/{BlockNoteEditor-LLCZDFLZ.js → BlockNoteEditor-SWO3X5CC.js} +9 -9
- package/dist/{BlockNoteEditor-LLCZDFLZ.js.map → BlockNoteEditor-SWO3X5CC.js.map} +1 -1
- package/dist/billing/index.js +371 -371
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-2VXDZRYY.mjs → chunk-AICMLKWN.mjs} +21 -8
- package/dist/chunk-AICMLKWN.mjs.map +1 -0
- package/dist/{chunk-VDVIUDY5.js → chunk-GYW7LLBQ.js} +369 -356
- package/dist/chunk-GYW7LLBQ.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/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/src/components/tables/__tests__/ContentListTable.spec.tsx +1 -1
- package/src/hooks/__tests__/{useDataListRetriever.test.ts → useDataListRetriever.spec.ts} +57 -0
- package/src/hooks/useDataListRetriever.ts +38 -9
- package/src/shadcnui/ui/__tests__/{confirm-dialog.test.tsx → confirm-dialog.spec.tsx} +1 -1
- package/src/shadcnui/ui/__tests__/{cursor-controls.test.tsx → cursor-controls.spec.tsx} +1 -1
- package/src/shadcnui/ui/__tests__/{cursor-menu-items.test.tsx → cursor-menu-items.spec.tsx} +1 -1
- package/src/shadcnui/ui/__tests__/{empty-state.test.tsx → empty-state.spec.tsx} +1 -1
- package/src/shadcnui/ui/__tests__/{spinner.test.tsx → spinner.spec.tsx} +1 -1
- package/dist/chunk-2VXDZRYY.mjs.map +0 -1
- package/dist/chunk-VDVIUDY5.js.map +0 -1
- /package/dist/{BlockNoteEditor-HXAHDJA7.mjs.map → BlockNoteEditor-FROUKBVK.mjs.map} +0 -0
- /package/scripts/{check-rtl-classes.test.ts → check-rtl-classes.spec.ts} +0 -0
- /package/src/client/__tests__/{JsonApiClient.test.ts → JsonApiClient.spec.ts} +0 -0
- /package/src/client/__tests__/{request.test.ts → request.spec.ts} +0 -0
- /package/src/client/hooks/__tests__/{useJsonApiGet.test.tsx → useJsonApiGet.spec.tsx} +0 -0
- /package/src/client/hooks/__tests__/{useJsonApiMutation.test.tsx → useJsonApiMutation.spec.tsx} +0 -0
- /package/src/client/hooks/__tests__/{useRehydration.test.ts → useRehydration.spec.ts} +0 -0
- /package/src/components/editors/__tests__/{BlockNoteEditorAiActions.test.ts → BlockNoteEditorAiActions.spec.ts} +0 -0
- /package/src/components/editors/__tests__/{BlockNoteEditorMentionInlineContent.test.ts → BlockNoteEditorMentionInlineContent.spec.ts} +0 -0
- /package/src/components/forms/__tests__/{CommonEditorDiscardDialog.test.tsx → CommonEditorDiscardDialog.spec.tsx} +0 -0
- /package/src/components/forms/__tests__/{EditorSheet.test.tsx → EditorSheet.spec.tsx} +0 -0
- /package/src/components/forms/__tests__/{FormCheckbox.test.tsx → FormCheckbox.spec.tsx} +0 -0
- /package/src/components/forms/__tests__/{FormDate.test.tsx → FormDate.spec.tsx} +0 -0
- /package/src/components/forms/__tests__/{FormInput.test.tsx → FormInput.spec.tsx} +0 -0
- /package/src/components/forms/__tests__/{FormSelect.test.tsx → FormSelect.spec.tsx} +0 -0
- /package/src/components/forms/__tests__/{useEditorDialog.test.ts → useEditorDialog.spec.ts} +0 -0
- /package/src/components/grids/__tests__/{ContentListGrid.test.tsx → ContentListGrid.spec.tsx} +0 -0
- /package/src/components/tables/__tests__/{ContentListTable.test.tsx → ContentListTable.rendering.spec.tsx} +0 -0
- /package/src/contexts/__tests__/{DirectionContext.test.tsx → DirectionContext.spec.tsx} +0 -0
- /package/src/contexts/__tests__/{SessionContext.test.tsx → SessionContext.spec.tsx} +0 -0
- /package/src/contexts/__tests__/{SocketContext.session.test.tsx → SocketContext.session.spec.tsx} +0 -0
- /package/src/core/abstracts/__tests__/{AbstractService.locale.test.ts → AbstractService.locale.spec.ts} +0 -0
- /package/src/core/endpoint/__tests__/{EndpointCreator.test.ts → EndpointCreator.spec.ts} +0 -0
- /package/src/core/factories/__tests__/{JsonApiDataFactory.test.ts → JsonApiDataFactory.spec.ts} +0 -0
- /package/src/core/factories/__tests__/{RehydrationFactory.test.ts → RehydrationFactory.spec.ts} +0 -0
- /package/src/core/registry/__tests__/{DataClassRegistry.test.ts → DataClassRegistry.spec.ts} +0 -0
- /package/src/core/registry/__tests__/{ModuleRegistrar.test.ts → ModuleRegistrar.spec.ts} +0 -0
- /package/src/core/registry/__tests__/{viewportStore.test.ts → viewportStore.spec.ts} +0 -0
- /package/src/core/utils/__tests__/{translateResponse.test.ts → translateResponse.spec.ts} +0 -0
- /package/src/features/ai-connection/data/__tests__/{ai-connection.test.ts → ai-connection.spec.ts} +0 -0
- /package/src/features/company/data/{company.test.ts → company.spec.ts} +0 -0
- /package/src/features/company/hooks/{useSubscriptionStatus.test.ts → useSubscriptionStatus.spec.ts} +0 -0
- /package/src/features/user/data/__tests__/{user.test.ts → user.spec.ts} +0 -0
- /package/src/hooks/__tests__/{useDebounce.test.ts → useDebounce.spec.ts} +0 -0
- /package/src/hooks/__tests__/{useSocket.render.test.ts → useSocket.render.spec.ts} +0 -0
- /package/src/i18n/__tests__/{config.test.ts → config.spec.ts} +0 -0
- /package/src/lib/__tests__/{direction.test.ts → direction.spec.ts} +0 -0
- /package/src/next-config/__tests__/{createNextConfig.test.ts → createNextConfig.spec.ts} +0 -0
- /package/src/server/__tests__/{JsonApiServer.test.ts → JsonApiServer.spec.ts} +0 -0
- /package/src/server/__tests__/{ServerSession.read.test.ts → ServerSession.read.spec.ts} +0 -0
- /package/src/server/__tests__/{cache.test.ts → cache.spec.ts} +0 -0
- /package/src/server/__tests__/{cachedGet.test.ts → cachedGet.spec.ts} +0 -0
- /package/src/server/__tests__/{request.test.ts → request.spec.ts} +0 -0
- /package/src/shadcnui/ui/__tests__/{sidebar.menu-skeleton.test.tsx → sidebar.menu-skeleton.spec.tsx} +0 -0
- /package/src/shadcnui/ui/__tests__/{sidebar.session.test.tsx → sidebar.session.spec.tsx} +0 -0
- /package/src/shadcnui/ui/__tests__/{use-ui-text.test.tsx → use-ui-text.spec.tsx} +0 -0
- /package/src/unified/__tests__/{JsonApiGet.cache.test.ts → JsonApiGet.cache.spec.ts} +0 -0
- /package/src/unified/__tests__/{JsonApiRequest.test.ts → JsonApiRequest.spec.ts} +0 -0
- /package/src/utils/__tests__/{date-formatter.test.ts → date-formatter.spec.ts} +0 -0
- /package/src/utils/__tests__/{exists.test.ts → exists.spec.ts} +0 -0
- /package/src/utils/__tests__/{italian-validators.test.ts → italian-validators.spec.ts} +0 -0
- /package/src/utils/__tests__/{map-thenable.test.ts → map-thenable.spec.ts} +0 -0
- /package/src/utils/__tests__/{use-mobile.test.tsx → use-mobile.spec.tsx} +0 -0
- /package/src/utils/{cn.test.ts → cn.spec.ts} +0 -0
- /package/src/utils/{isRemoteImageSrc.test.ts → isRemoteImageSrc.spec.ts} +0 -0
|
@@ -33,7 +33,7 @@ var _chunkKJMMBUOAjs = require('../../chunk-KJMMBUOA.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkGYW7LLBQjs = require('../../chunk-GYW7LLBQ.js');
|
|
37
37
|
require('../../chunk-GPXYQMOZ.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
|
+
_chunkGYW7LLBQjs.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
|
+
_chunkGYW7LLBQjs.Button,
|
|
272
272
|
{
|
|
273
273
|
type: "button",
|
|
274
274
|
size: "sm",
|
|
@@ -388,7 +388,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
388
388
|
sessionPageUrl = ANALYTICS_SESSION_PAGE_URL
|
|
389
389
|
}) => {
|
|
390
390
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
391
|
-
const generateUrl =
|
|
391
|
+
const generateUrl = _chunkGYW7LLBQjs.usePageUrlGenerator.call(void 0, );
|
|
392
392
|
const [filters, setFilterState] = _react.useState.call(void 0, () => {
|
|
393
393
|
const range = defaultRange();
|
|
394
394
|
return {
|
|
@@ -512,7 +512,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
512
512
|
error
|
|
513
513
|
]
|
|
514
514
|
);
|
|
515
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
515
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminContext.Provider, { value: contextValue, children }) });
|
|
516
516
|
}, "AnalyticsAdminProvider");
|
|
517
517
|
var useAnalyticsAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
518
518
|
const ctx = _react.useContext.call(void 0, AnalyticsAdminContext);
|
|
@@ -605,8 +605,8 @@ function LeadTile({
|
|
|
605
605
|
previousLabel,
|
|
606
606
|
decimal
|
|
607
607
|
}) {
|
|
608
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
609
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
608
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.CardContent, { className: "grid gap-1", children: [
|
|
609
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.MicroLabel, { children: label }),
|
|
610
610
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
|
|
611
611
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
|
|
612
612
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal }),
|
|
@@ -622,8 +622,8 @@ function SupportingTile({
|
|
|
622
622
|
delta,
|
|
623
623
|
decimal
|
|
624
624
|
}) {
|
|
625
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
626
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
625
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.CardContent, { className: "grid gap-1", children: [
|
|
626
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.MicroLabel, { children: label }),
|
|
627
627
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
628
628
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
|
|
629
629
|
delta !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal })
|
|
@@ -674,9 +674,9 @@ function AnalyticsBreakdownTable({ breakdowns }) {
|
|
|
674
674
|
route: t("analytics.admin.dimensions.route"),
|
|
675
675
|
landing: t("analytics.admin.dimensions.landing")
|
|
676
676
|
};
|
|
677
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
678
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
679
|
-
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
677
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.Tabs, { defaultValue: ANALYTICS_DIMENSIONS[0], children: [
|
|
678
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.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, _chunkGYW7LLBQjs.TabsTrigger, { value: dimension, children: labels[dimension] }, dimension)) }),
|
|
679
|
+
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TabsContent, { value: dimension, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreakdownRows, { rows: _nullishCoalesce(breakdowns[dimension], () => ( [])) }) }, dimension))
|
|
680
680
|
] });
|
|
681
681
|
}
|
|
682
682
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsBreakdownTable, "AnalyticsBreakdownTable");
|
|
@@ -691,18 +691,18 @@ function BreakdownRows({ rows }) {
|
|
|
691
691
|
// The package's <Table> wraps itself in an `overflow-x-clip` container, which
|
|
692
692
|
// would swallow the overflow before this scroller ever saw it — hence the
|
|
693
693
|
// child override. Wide tables must scroll, never widen the page.
|
|
694
|
-
/* @__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,
|
|
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,
|
|
699
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
694
|
+
/* @__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, _chunkGYW7LLBQjs.Table, { children: [
|
|
695
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.TableRow, { children: [
|
|
696
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.key") }),
|
|
697
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.visitors") }),
|
|
698
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.sessions") }),
|
|
699
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.page_views") })
|
|
700
700
|
] }) }),
|
|
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,
|
|
705
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
701
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableBody, { children: sortedRows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.TableRow, { "data-testid": `analytics-breakdown-row-${row.id}`, children: [
|
|
702
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-xs", children: row.key === OTHER_KEY ? t("analytics.admin.other") : row.key }),
|
|
703
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.visitors, 0) }),
|
|
704
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.sessions, 0) }),
|
|
705
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) })
|
|
706
706
|
] }, row.id)) })
|
|
707
707
|
] }) })
|
|
708
708
|
);
|
|
@@ -717,48 +717,48 @@ var VISITOR_SUFFIX_LENGTH = 6;
|
|
|
717
717
|
function AnalyticsSessionsTable({ rows, sessionPageUrl, onLoadMore, hasMore }) {
|
|
718
718
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
719
719
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
720
|
-
const generateUrl =
|
|
720
|
+
const generateUrl = _chunkGYW7LLBQjs.usePageUrlGenerator.call(void 0, );
|
|
721
721
|
const { decimal } = _chunkKJMMBUOAjs.useUsageFormatters.call(void 0, );
|
|
722
722
|
const dateTime = _react.useMemo.call(void 0, () => new Intl.DateTimeFormat(locale, { dateStyle: "short", timeStyle: "short" }), [locale]);
|
|
723
723
|
if (rows.length === 0) {
|
|
724
724
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
725
725
|
}
|
|
726
726
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
727
|
-
/* @__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,
|
|
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,
|
|
734
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
727
|
+
/* @__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, _chunkGYW7LLBQjs.Table, { children: [
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.TableRow, { children: [
|
|
729
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.started") }),
|
|
730
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.visitor") }),
|
|
731
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.source") }),
|
|
732
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.landing") }),
|
|
733
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.pages") }),
|
|
734
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.device") })
|
|
735
735
|
] }) }),
|
|
736
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
736
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableBody, { children: rows.map((row) => {
|
|
737
737
|
const source = [_nullishCoalesce(row.utmSource, () => ( row.referrerHost)), row.utmMedium].filter(Boolean).join(" / ");
|
|
738
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
739
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
740
|
-
|
|
738
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.TableRow, { "data-testid": `analytics-session-row-${row.id}`, children: [
|
|
739
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-xs tabular-nums", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
740
|
+
_chunkGYW7LLBQjs.Link,
|
|
741
741
|
{
|
|
742
742
|
href: generateUrl({ page: sessionPageUrl, id: row.id }),
|
|
743
743
|
"data-testid": `analytics-session-link-${row.id}`,
|
|
744
744
|
children: dateTime.format(row.startedAt)
|
|
745
745
|
}
|
|
746
746
|
) }),
|
|
747
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
747
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-xs", children: row.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
748
748
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: row.user.name }),
|
|
749
749
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: row.user.email })
|
|
750
750
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
751
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
751
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
752
752
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: row.visitorId.slice(-VISITOR_SUFFIX_LENGTH) })
|
|
753
753
|
] }) }),
|
|
754
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
755
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
756
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
757
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
754
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-xs", children: source }),
|
|
755
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-xs", children: row.landingRoute }),
|
|
756
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) }),
|
|
757
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-muted-foreground text-xs", children: row.deviceType })
|
|
758
758
|
] }, row.id);
|
|
759
759
|
}) })
|
|
760
760
|
] }) }),
|
|
761
|
-
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
761
|
+
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Button, { type: "button", variant: "outline", size: "sm", onClick: onLoadMore, children: t("analytics.admin.load_more") }) })
|
|
762
762
|
] });
|
|
763
763
|
}
|
|
764
764
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsSessionsTable, "AnalyticsSessionsTable");
|
|
@@ -825,7 +825,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
825
825
|
// rtl-ok: deliberate LTR island (chart)
|
|
826
826
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
827
827
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "analytics-timeline-data", children: JSON.stringify(chartData) }),
|
|
828
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
828
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.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: [
|
|
829
829
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
830
830
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
831
831
|
_recharts.XAxis,
|
|
@@ -849,10 +849,10 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
849
849
|
}
|
|
850
850
|
),
|
|
851
851
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
852
|
-
|
|
852
|
+
_chunkGYW7LLBQjs.ChartTooltip,
|
|
853
853
|
{
|
|
854
854
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
855
|
-
|
|
855
|
+
_chunkGYW7LLBQjs.ChartTooltipContent,
|
|
856
856
|
{
|
|
857
857
|
labelFormatter: (value) => bucketDate(String(value), granularity),
|
|
858
858
|
valueFormatter: (value) => decimal(Number(value), 0)
|
|
@@ -860,7 +860,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
860
860
|
)
|
|
861
861
|
}
|
|
862
862
|
),
|
|
863
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
863
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.ChartLegendContent, {}) }),
|
|
864
864
|
SERIES.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
865
865
|
_recharts.Bar,
|
|
866
866
|
{
|
|
@@ -895,25 +895,25 @@ function AnalyticsAdminContainer() {
|
|
|
895
895
|
error
|
|
896
896
|
} = useAnalyticsAdmin();
|
|
897
897
|
if (error) {
|
|
898
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
898
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
899
899
|
}
|
|
900
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
901
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
900
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
|
|
901
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
902
902
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
903
903
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminTiles, { summary }),
|
|
904
904
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: t("analytics.admin.tiles.summarised_note") })
|
|
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, _chunkGYW7LLBQjs.Card, { children: [
|
|
907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardTitle, { children: t("analytics.admin.panels.over_time") }) }),
|
|
908
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsTimelineChart, { rows: timeline }) })
|
|
909
909
|
] }),
|
|
910
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
911
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
912
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
910
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.Card, { children: [
|
|
911
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardTitle, { children: t("analytics.admin.panels.breakdown") }) }),
|
|
912
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsBreakdownTable, { breakdowns }) })
|
|
913
913
|
] }),
|
|
914
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
915
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
916
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
914
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.Card, { children: [
|
|
915
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardTitle, { children: t("analytics.admin.panels.sessions") }) }),
|
|
916
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
917
917
|
AnalyticsSessionsTable,
|
|
918
918
|
{
|
|
919
919
|
rows: sessions,
|
|
@@ -936,7 +936,7 @@ var OTHER_SESSIONS_WINDOW_DAYS = 395;
|
|
|
936
936
|
function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_URL2 }) {
|
|
937
937
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
938
938
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
939
|
-
const generateUrl =
|
|
939
|
+
const generateUrl = _chunkGYW7LLBQjs.usePageUrlGenerator.call(void 0, );
|
|
940
940
|
const [session, setSession] = _react.useState.call(void 0, void 0);
|
|
941
941
|
const [pageViews, setPageViews] = _react.useState.call(void 0, []);
|
|
942
942
|
const [otherSessions, setOtherSessions] = _react.useState.call(void 0, []);
|
|
@@ -992,26 +992,26 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
992
992
|
const title = { type: t("analytics.admin.panels.journey") };
|
|
993
993
|
const renderBody = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
994
994
|
if (error) {
|
|
995
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
995
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
996
996
|
}
|
|
997
|
-
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
997
|
+
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
|
|
998
998
|
const source = [_nullishCoalesce(session.utmSource, () => ( session.referrerHost)), session.utmMedium, session.utmCampaign].filter(Boolean).join(" / ");
|
|
999
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1000
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
999
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
1000
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Card, { "data-testid": "analytics-journey-attribution", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.CardContent, { className: "flex flex-col gap-3", children: [
|
|
1001
1001
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1002
1002
|
session.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
1003
1003
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: session.user.name }),
|
|
1004
1004
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: session.user.email })
|
|
1005
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1006
|
-
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1005
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
1006
|
+
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Badge, { variant: "softGreen", children: t("analytics.admin.consented") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Badge, { variant: "softGray", children: t("analytics.admin.not_consented") })
|
|
1007
1007
|
] }),
|
|
1008
1008
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
|
|
1009
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1010
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1011
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1012
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1009
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.DetailField, { label: t("analytics.admin.columns.started"), value: dateTime.format(session.startedAt) }),
|
|
1010
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.DetailField, { label: t("analytics.admin.columns.source"), value: source }),
|
|
1011
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.DetailField, { label: t("analytics.admin.columns.landing"), value: session.landingRoute }),
|
|
1012
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.DetailField, { label: t("analytics.admin.columns.device"), value: session.deviceType }),
|
|
1013
1013
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1014
|
-
|
|
1014
|
+
_chunkGYW7LLBQjs.DetailField,
|
|
1015
1015
|
{
|
|
1016
1016
|
label: t("analytics.admin.columns.visitor"),
|
|
1017
1017
|
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: session.visitorId })
|
|
@@ -1019,31 +1019,31 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1019
1019
|
)
|
|
1020
1020
|
] })
|
|
1021
1021
|
] }) }),
|
|
1022
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1023
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1024
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1022
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.Card, { children: [
|
|
1023
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardTitle, { children: t("analytics.admin.columns.pages") }) }),
|
|
1024
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardContent, { children: pageViews.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") }) : (
|
|
1025
1025
|
// The package's <Table> wraps itself in an `overflow-x-clip`
|
|
1026
1026
|
// container — hence the child override, so wide rows scroll.
|
|
1027
|
-
/* @__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,
|
|
1028
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1029
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1030
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1031
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1027
|
+
/* @__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, _chunkGYW7LLBQjs.Table, { children: [
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.TableRow, { children: [
|
|
1029
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.time") }),
|
|
1030
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.gap") }),
|
|
1031
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.path") })
|
|
1032
1032
|
] }) }),
|
|
1033
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1033
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableBody, { children: pageViews.map((pageView, index) => {
|
|
1034
1034
|
const previous = index > 0 ? pageViews[index - 1] : void 0;
|
|
1035
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1036
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1037
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1038
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1035
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.TableRow, { "data-testid": `analytics-pageview-row-${pageView.id}`, children: [
|
|
1036
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-xs tabular-nums", children: dateTime.format(pageView.createdAt) }),
|
|
1037
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-end text-xs tabular-nums", children: previous ? formatGap(pageView.createdAt.getTime() - previous.createdAt.getTime()) : "\u2014" }),
|
|
1038
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TableCell, { className: "text-xs", children: pageView.path })
|
|
1039
1039
|
] }, pageView.id);
|
|
1040
1040
|
}) })
|
|
1041
1041
|
] }) })
|
|
1042
1042
|
) })
|
|
1043
1043
|
] }),
|
|
1044
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1045
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1046
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1044
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.Card, { children: [
|
|
1045
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardTitle, { children: t("analytics.admin.panels.other_sessions") }) }),
|
|
1046
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1047
1047
|
AnalyticsSessionsTable,
|
|
1048
1048
|
{
|
|
1049
1049
|
rows: otherSessions,
|
|
@@ -1055,7 +1055,7 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1055
1055
|
] })
|
|
1056
1056
|
] }) });
|
|
1057
1057
|
}, "renderBody");
|
|
1058
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1058
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.SharedProvider, { value: { breadcrumbs: breadcrumb, title }, children: renderBody() });
|
|
1059
1059
|
}
|
|
1060
1060
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsJourneyContainer, "AnalyticsJourneyContainer");
|
|
1061
1061
|
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 _chunkGYW7LLBQjs = require('../../chunk-GYW7LLBQ.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkGPXYQMOZjs = require('../../chunk-GPXYQMOZ.js');
|
|
@@ -76,29 +76,29 @@ var _lucidereact = require('lucide-react');
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
function HelpAssistantSheet({ open, onOpenChange }) {
|
|
79
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
80
|
-
|
|
79
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Sheet, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
80
|
+
_chunkGYW7LLBQjs.SheetContent,
|
|
81
81
|
{
|
|
82
82
|
side: "end",
|
|
83
83
|
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",
|
|
84
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
84
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.AssistantProvider, { manageUrl: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAssistantSheetBody, {}) })
|
|
85
85
|
}
|
|
86
86
|
) });
|
|
87
87
|
}
|
|
88
88
|
_chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheet, "HelpAssistantSheet");
|
|
89
89
|
function HelpAssistantSheetBody() {
|
|
90
90
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
91
|
-
const ctx =
|
|
91
|
+
const ctx = _chunkGYW7LLBQjs.useAssistantContext.call(void 0, );
|
|
92
92
|
const showThread = !!ctx.assistant || ctx.sending || ctx.messages.length > 0;
|
|
93
93
|
const send = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (content) => ctx.sendMessage(content, { howToMode: true }), "send");
|
|
94
94
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
95
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
96
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
97
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
95
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.SheetHeader, { children: [
|
|
96
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.SheetTitle, { children: t("help.askAi.sheet.title") }),
|
|
97
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.SheetDescription, { children: t("help.askAi.sheet.subtitle") })
|
|
98
98
|
] }),
|
|
99
|
-
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
99
|
+
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.AssistantEmptyState, { onSend: send }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
100
100
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
101
|
-
|
|
101
|
+
_chunkGYW7LLBQjs.AssistantThread,
|
|
102
102
|
{
|
|
103
103
|
messages: ctx.messages,
|
|
104
104
|
sending: ctx.sending,
|
|
@@ -108,7 +108,7 @@ function HelpAssistantSheetBody() {
|
|
|
108
108
|
onRetry: ctx.retrySend
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
111
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.AssistantComposer, { onSend: send, disabled: ctx.sending })
|
|
112
112
|
] })
|
|
113
113
|
] });
|
|
114
114
|
}
|
|
@@ -118,20 +118,20 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheetBody, "HelpAssistantSheet
|
|
|
118
118
|
|
|
119
119
|
function HelpAskAi() {
|
|
120
120
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
121
|
-
const { currentUser } =
|
|
121
|
+
const { currentUser } = _chunkGYW7LLBQjs.useCurrentUserContext.call(void 0, );
|
|
122
122
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
123
123
|
const disabled = !currentUser;
|
|
124
124
|
if (disabled) {
|
|
125
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
126
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
125
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.Tooltip, { children: [
|
|
126
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.Button, { variant: "outline", size: "sm", disabled: true }), children: [
|
|
127
127
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
128
128
|
t("help.askAi.button")
|
|
129
129
|
] }),
|
|
130
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
130
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.TooltipContent, { children: t("help.askAi.loginTooltip") })
|
|
131
131
|
] });
|
|
132
132
|
}
|
|
133
133
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
134
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
134
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
|
|
135
135
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
136
136
|
t("help.askAi.button")
|
|
137
137
|
] }),
|
|
@@ -144,7 +144,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAskAi, "HelpAskAi");
|
|
|
144
144
|
|
|
145
145
|
function HelpHeader() {
|
|
146
146
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
147
|
-
const { currentUser } =
|
|
147
|
+
const { currentUser } = _chunkGYW7LLBQjs.useCurrentUserContext.call(void 0, );
|
|
148
148
|
const { brand } = useHelp();
|
|
149
149
|
const logo = _optionalChain([brand, 'optionalAccess', _ => _.logo]);
|
|
150
150
|
const label = _nullishCoalesce(_optionalChain([brand, 'optionalAccess', _2 => _2.label]), () => ( t("help.title")));
|
|
@@ -160,7 +160,7 @@ function HelpHeader() {
|
|
|
160
160
|
] }),
|
|
161
161
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 max-md:shrink-0", children: [
|
|
162
162
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAskAi, {}),
|
|
163
|
-
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className:
|
|
163
|
+
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className: _chunkGYW7LLBQjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.openApp") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/login", className: _chunkGYW7LLBQjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.login") })
|
|
164
164
|
] })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
@@ -202,7 +202,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, useHelpFilter, "useHelpFilter");
|
|
|
202
202
|
|
|
203
203
|
function HelpSideNav() {
|
|
204
204
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
205
|
-
const generateUrl =
|
|
205
|
+
const generateUrl = _chunkGYW7LLBQjs.usePageUrlGenerator.call(void 0, );
|
|
206
206
|
const pathname = _navigation.usePathname.call(void 0, );
|
|
207
207
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
208
208
|
_react.useEffect.call(void 0, () => {
|
|
@@ -283,7 +283,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpSideNav, "HelpSideNav");
|
|
|
283
283
|
function HelpArticleBody(props) {
|
|
284
284
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
285
285
|
const format = _nextintl.useFormatter.call(void 0, );
|
|
286
|
-
const generateUrl =
|
|
286
|
+
const generateUrl = _chunkGYW7LLBQjs.usePageUrlGenerator.call(void 0, );
|
|
287
287
|
const { howToType, title, summary, updatedAt, prev, next, children } = props;
|
|
288
288
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "article", { className: "prose dark:prose-invert max-w-none", children: [
|
|
289
289
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { className: "text-muted-foreground mb-2 text-xs", children: [
|
|
@@ -340,7 +340,7 @@ function HelpTOC({ headings }) {
|
|
|
340
340
|
}, [headings]);
|
|
341
341
|
if (headings.length === 0) return null;
|
|
342
342
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { "aria-label": t("help.toc.title"), className: "hidden lg:block", children: [
|
|
343
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
343
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.MicroLabel, { className: "mb-2", children: t("help.toc.title") }),
|
|
344
344
|
/* @__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,
|
|
345
345
|
"a",
|
|
346
346
|
{
|
|
@@ -361,7 +361,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpTOC, "HelpTOC");
|
|
|
361
361
|
|
|
362
362
|
function HelpHint({ contextKey }) {
|
|
363
363
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
364
|
-
const generateUrl =
|
|
364
|
+
const generateUrl = _chunkGYW7LLBQjs.usePageUrlGenerator.call(void 0, );
|
|
365
365
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
366
366
|
const [picked, setPicked] = _react.useState.call(void 0, null);
|
|
367
367
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
@@ -379,7 +379,7 @@ function HelpHint({ contextKey }) {
|
|
|
379
379
|
if (matches.length === 0) return null;
|
|
380
380
|
const active = _nullishCoalesce(picked, () => ( (matches.length === 1 ? matches[0] : null)));
|
|
381
381
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
382
|
-
|
|
382
|
+
_chunkGYW7LLBQjs.Sheet,
|
|
383
383
|
{
|
|
384
384
|
open,
|
|
385
385
|
onOpenChange: (o) => {
|
|
@@ -387,11 +387,11 @@ function HelpHint({ contextKey }) {
|
|
|
387
387
|
if (!o) setPicked(null);
|
|
388
388
|
},
|
|
389
389
|
children: [
|
|
390
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
391
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
392
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
393
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
394
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
390
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.SheetTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.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" }) }),
|
|
391
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.SheetContent, { side: "end", className: "w-full max-w-md sm:max-w-lg", children: [
|
|
392
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkGYW7LLBQjs.SheetHeader, { children: [
|
|
393
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.SheetTitle, { children: active ? active.name : t("help.hint.pickArticle") }),
|
|
394
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.SheetDescription, { children: _nullishCoalesce(_optionalChain([active, 'optionalAccess', _4 => _4.summary]), () => ( "")) })
|
|
395
395
|
] }),
|
|
396
396
|
active ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-4 space-y-3", children: [
|
|
397
397
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: active.summary }),
|
|
@@ -423,7 +423,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpHint, "HelpHint");
|
|
|
423
423
|
|
|
424
424
|
function HelpSearchResultRow({ result, onSelect }) {
|
|
425
425
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
426
|
-
const generateUrl =
|
|
426
|
+
const generateUrl = _chunkGYW7LLBQjs.usePageUrlGenerator.call(void 0, );
|
|
427
427
|
const [article, setArticle] = _react.useState.call(void 0, null);
|
|
428
428
|
_react.useEffect.call(void 0, () => {
|
|
429
429
|
let active = true;
|
|
@@ -434,7 +434,7 @@ function HelpSearchResultRow({ result, onSelect }) {
|
|
|
434
434
|
}, [result.id]);
|
|
435
435
|
if (!article) {
|
|
436
436
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
437
|
-
|
|
437
|
+
_chunkGYW7LLBQjs.CommandItem,
|
|
438
438
|
{
|
|
439
439
|
value: result.id,
|
|
440
440
|
disabled: true,
|
|
@@ -443,7 +443,7 @@ function HelpSearchResultRow({ result, onSelect }) {
|
|
|
443
443
|
}
|
|
444
444
|
);
|
|
445
445
|
}
|
|
446
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
446
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGYW7LLBQjs.CommandItem, { value: result.id, onSelect, className: "cursor-pointer p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
447
447
|
_link2.default,
|
|
448
448
|
{
|
|
449
449
|
href: generateUrl({ page: `/help/${article.howToType}/${article.slug}` }),
|