@carlonicora/nextjs-jsonapi 3.25.0 → 3.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-46O3JC4Z.mjs → BlockNoteEditor-VET2JD72.mjs} +13 -3
- package/dist/{BlockNoteEditor-46O3JC4Z.mjs.map → BlockNoteEditor-VET2JD72.mjs.map} +1 -1
- package/dist/{BlockNoteEditor-HKS6AXDA.js → BlockNoteEditor-WUC2NRGI.js} +20 -10
- package/dist/BlockNoteEditor-WUC2NRGI.js.map +1 -0
- package/dist/billing/index.js +335 -335
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-Y3OKEQGL.js → chunk-425GLYXN.js} +580 -363
- package/dist/chunk-425GLYXN.js.map +1 -0
- package/dist/{chunk-XDYILJ2S.mjs → chunk-7SJ4HKDR.mjs} +548 -331
- package/dist/chunk-7SJ4HKDR.mjs.map +1 -0
- package/dist/{chunk-KLV6RLDE.js → chunk-GKDHYB2R.js} +2 -2
- package/dist/chunk-GKDHYB2R.js.map +1 -0
- package/dist/{chunk-4Z2UONN2.mjs → chunk-U65JPKO3.mjs} +2 -2
- package/dist/chunk-U65JPKO3.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +16 -3
- package/dist/components/index.d.ts +16 -3
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/analytics/index.js +100 -100
- package/dist/features/analytics/index.js.map +1 -1
- package/dist/features/analytics/index.mjs +5 -5
- package/dist/features/analytics/index.mjs.map +1 -1
- package/dist/features/help/index.js +36 -36
- package/dist/features/help/index.js.map +1 -1
- package/dist/features/help/index.mjs +6 -6
- package/dist/features/help/index.mjs.map +1 -1
- package/dist/features/tokenusage/index.js +103 -103
- package/dist/features/tokenusage/index.js.map +1 -1
- package/dist/features/tokenusage/index.mjs +4 -4
- package/dist/features/tokenusage/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/containers/PageContainer.tsx +3 -1
- package/src/components/containers/RoundPageContainer.tsx +63 -16
- package/src/components/containers/RoundPageContainerTitle.tsx +75 -35
- package/src/components/editors/BlockNoteEditor.tsx +13 -1
- package/src/components/forms/EntityMultiSelector.tsx +4 -4
- package/src/components/forms/EntitySelector.tsx +4 -4
- package/src/components/forms/FormBlockNote.tsx +27 -1
- package/src/components/forms/FormCheckbox.tsx +3 -2
- package/src/components/forms/__tests__/useEditorDialog.test.ts +47 -0
- package/src/components/forms/useEditorDialog.ts +22 -0
- package/src/components/navigations/Breadcrumb.tsx +45 -16
- package/src/components/navigations/Header.tsx +18 -3
- package/src/components/navigations/MobileNavigationBar.tsx +12 -0
- package/src/components/navigations/__tests__/MobileNavigationBar.spec.tsx +17 -0
- package/src/components/tables/ContentListTable.tsx +52 -32
- package/src/features/analytics/components/AnalyticsAdminFilterBar.tsx +9 -6
- package/src/features/analytics/components/AnalyticsBreakdownTable.tsx +2 -1
- package/src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx +3 -1
- package/src/features/assistant/components/parts/AssistantComposer.tsx +3 -1
- package/src/features/assistant-message/components/MessageItem.tsx +2 -2
- package/src/features/assistant-message/components/parts/tabs/CitationsTab.tsx +25 -5
- package/src/features/auth/components/containers/AuthContainer.tsx +8 -1
- package/src/features/company/components/details/CompanyContent.tsx +3 -1
- package/src/features/company/components/details/CompanyDetails.tsx +9 -1
- package/src/features/company/components/details/TokenStatusIndicator.tsx +42 -13
- package/src/features/help/components/HelpHeader.tsx +7 -5
- package/src/features/tokenusage/components/TokenUsageAdminFilterBar.tsx +9 -6
- package/src/features/tokenusage/lib/__tests__/formatters.spec.ts +21 -0
- package/src/features/tokenusage/lib/formatters.ts +5 -1
- package/src/shadcnui/ui/button.tsx +1 -1
- package/src/shadcnui/ui/checkbox.tsx +1 -1
- package/src/shadcnui/ui/command.tsx +7 -4
- package/src/shadcnui/ui/dialog.tsx +2 -0
- package/src/shadcnui/ui/input.tsx +1 -1
- package/src/shadcnui/ui/popover.tsx +9 -0
- package/src/shadcnui/ui/select.tsx +1 -1
- package/src/shadcnui/ui/sheet.tsx +8 -1
- package/src/shadcnui/ui/table.tsx +5 -2
- package/src/shadcnui/ui/textarea.tsx +1 -1
- package/dist/BlockNoteEditor-HKS6AXDA.js.map +0 -1
- package/dist/chunk-4Z2UONN2.mjs.map +0 -1
- package/dist/chunk-KLV6RLDE.js.map +0 -1
- package/dist/chunk-XDYILJ2S.mjs.map +0 -1
- package/dist/chunk-Y3OKEQGL.js.map +0 -1
package/dist/contexts/index.js
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunk425GLYXNjs = require('../chunk-425GLYXN.js');
|
|
52
52
|
require('../chunk-4Z45NYPR.js');
|
|
53
53
|
require('../chunk-CAKOFJZD.js');
|
|
54
54
|
require('../chunk-26MQIJNB.js');
|
|
@@ -105,5 +105,5 @@ require('../chunk-7QVYU63E.js');
|
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
|
|
108
|
-
exports.ActionBarProvider =
|
|
108
|
+
exports.ActionBarProvider = _chunk425GLYXNjs.ActionBarProvider; exports.AdministrationProvider = _chunk425GLYXNjs.AdministrationProvider; exports.AssistantProvider = _chunk425GLYXNjs.AssistantProvider; exports.BreadcrumbRootProvider = _chunk425GLYXNjs.BreadcrumbRootProvider; exports.CommonProvider = _chunk425GLYXNjs.CommonProvider; exports.CompanyProvider = _chunk425GLYXNjs.CompanyProvider; exports.CurrentUserProvider = _chunk425GLYXNjs.CurrentUserProvider; exports.DEFAULT_ONBOARDING_LABELS = _chunk425GLYXNjs.DEFAULT_ONBOARDING_LABELS; exports.DirectionProvider = _chunk425GLYXNjs.DirectionProvider; exports.HeaderChildrenProvider = _chunk425GLYXNjs.HeaderChildrenProvider; exports.HeaderLeftContentProvider = _chunk425GLYXNjs.HeaderLeftContentProvider; exports.HeaderLogoProvider = _chunk425GLYXNjs.HeaderLogoProvider; exports.HowToProvider = _chunk425GLYXNjs.HowToProvider; exports.MobileNavigationProvider = _chunk425GLYXNjs.MobileNavigationProvider; exports.NotificationContextProvider = _chunk425GLYXNjs.NotificationContextProvider; exports.OnboardingProvider = _chunk425GLYXNjs.OnboardingProvider; exports.RbacProvider = _chunk425GLYXNjs.RbacProvider; exports.RoleProvider = _chunk425GLYXNjs.RoleProvider; exports.SharedProvider = _chunk425GLYXNjs.SharedProvider; exports.SocketContext = _chunk425GLYXNjs.SocketContext; exports.SocketProvider = _chunk425GLYXNjs.SocketProvider; exports.UserProvider = _chunk425GLYXNjs.UserProvider; exports.ViewportProvider = _chunk425GLYXNjs.ViewportProvider; exports.mapOnboardingSide = _chunk425GLYXNjs.mapOnboardingSide; exports.recentPagesAtom = _chunk425GLYXNjs.recentPagesAtom; exports.useAdministrationContext = _chunk425GLYXNjs.useAdministrationContext; exports.useAssistantContext = _chunk425GLYXNjs.useAssistantContext; exports.useCommonContext = _chunk425GLYXNjs.useCommonContext; exports.useCompanyContext = _chunk425GLYXNjs.useCompanyContext; exports.useCurrentUserContext = _chunk425GLYXNjs.useCurrentUserContext; exports.useCurrentUserContextOptional = _chunk425GLYXNjs.useCurrentUserContextOptional; exports.useDir = _chunk425GLYXNjs.useDir; exports.useHeaderChildren = _chunk425GLYXNjs.useHeaderChildren; exports.useHeaderLeftContent = _chunk425GLYXNjs.useHeaderLeftContent; exports.useHeaderLogo = _chunk425GLYXNjs.useHeaderLogo; exports.useHeaderMobileChildren = _chunk425GLYXNjs.useHeaderMobileChildren; exports.useHeaderRootLabel = _chunk425GLYXNjs.useHeaderRootLabel; exports.useHowToContext = _chunk425GLYXNjs.useHowToContext; exports.useIsBreadcrumbRootHidden = _chunk425GLYXNjs.useIsBreadcrumbRootHidden; exports.useIsInActionBar = _chunk425GLYXNjs.useIsInActionBar; exports.useMobileNavigationItems = _chunk425GLYXNjs.useMobileNavigationItems; exports.useNotificationContext = _chunk425GLYXNjs.useNotificationContext; exports.useOnboarding = _chunk425GLYXNjs.useOnboarding; exports.useRbacContext = _chunk425GLYXNjs.useRbacContext; exports.useRoleContext = _chunk425GLYXNjs.useRoleContext; exports.useSharedContext = _chunk425GLYXNjs.useSharedContext; exports.useSocketContext = _chunk425GLYXNjs.useSocketContext; exports.useUserContext = _chunk425GLYXNjs.useUserContext;
|
|
109
109
|
//# sourceMappingURL=index.js.map
|
package/dist/contexts/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkGKDHYB2Rjs = require('../../chunk-GKDHYB2R.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -33,7 +33,7 @@ var _chunkKLV6RLDEjs = require('../../chunk-KLV6RLDE.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunk425GLYXNjs = require('../../chunk-425GLYXN.js');
|
|
37
37
|
require('../../chunk-4Z45NYPR.js');
|
|
38
38
|
|
|
39
39
|
|
|
@@ -222,15 +222,15 @@ function AnalyticsAdminFilterBar({ section, granularity, onChange }) {
|
|
|
222
222
|
month: t("analytics.admin.filter.granularity_month")
|
|
223
223
|
};
|
|
224
224
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
225
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
226
|
-
|
|
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
|
+
_chunk425GLYXNjs.DateRangeSelector,
|
|
227
227
|
{
|
|
228
228
|
onDateChange: (range) => {
|
|
229
229
|
if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
|
|
230
230
|
onChange({ from: range.from.toISOString(), to: range.to.toISOString() });
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
),
|
|
233
|
+
) }),
|
|
234
234
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
235
235
|
Segmented,
|
|
236
236
|
{
|
|
@@ -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
|
+
_chunk425GLYXNjs.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 = _chunk425GLYXNjs.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, _chunk425GLYXNjs.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);
|
|
@@ -531,7 +531,7 @@ var _lucidereact = require('lucide-react');
|
|
|
531
531
|
var ZERO = { visitors: 0, sessions: 0, pageViews: 0, pagesPerSession: 0, consentShare: 0 };
|
|
532
532
|
function AnalyticsAdminTiles({ summary }) {
|
|
533
533
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
534
|
-
const { decimal } =
|
|
534
|
+
const { decimal } = _chunkGKDHYB2Rjs.useUsageFormatters.call(void 0, );
|
|
535
535
|
const rowFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (window2) => _nullishCoalesce(summary.find((r) => r.section === "total" && r.window === window2), () => ( ZERO)), "rowFor");
|
|
536
536
|
const current = rowFor("current");
|
|
537
537
|
const previous = rowFor("previous");
|
|
@@ -544,7 +544,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
544
544
|
testId: "analytics-tile-visitors",
|
|
545
545
|
label: t("analytics.admin.tiles.visitors"),
|
|
546
546
|
value: decimal(current.visitors, 0),
|
|
547
|
-
delta:
|
|
547
|
+
delta: _chunkGKDHYB2Rjs.percentageDelta.call(void 0, current.visitors, previous.visitors),
|
|
548
548
|
previousLabel,
|
|
549
549
|
decimal
|
|
550
550
|
}
|
|
@@ -555,7 +555,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
555
555
|
testId: "analytics-tile-sessions",
|
|
556
556
|
label: t("analytics.admin.tiles.sessions"),
|
|
557
557
|
value: decimal(current.sessions, 0),
|
|
558
|
-
delta:
|
|
558
|
+
delta: _chunkGKDHYB2Rjs.percentageDelta.call(void 0, current.sessions, previous.sessions),
|
|
559
559
|
previousLabel,
|
|
560
560
|
decimal
|
|
561
561
|
}
|
|
@@ -566,7 +566,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
566
566
|
testId: "analytics-tile-page-views",
|
|
567
567
|
label: t("analytics.admin.tiles.page_views"),
|
|
568
568
|
value: decimal(current.pageViews, 0),
|
|
569
|
-
delta:
|
|
569
|
+
delta: _chunkGKDHYB2Rjs.percentageDelta.call(void 0, current.pageViews, previous.pageViews),
|
|
570
570
|
previousLabel,
|
|
571
571
|
decimal
|
|
572
572
|
}
|
|
@@ -579,7 +579,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
579
579
|
testId: "analytics-tile-pages-per-session",
|
|
580
580
|
label: t("analytics.admin.tiles.pages_per_session"),
|
|
581
581
|
value: decimal(current.pagesPerSession, 1),
|
|
582
|
-
delta:
|
|
582
|
+
delta: _chunkGKDHYB2Rjs.percentageDelta.call(void 0, current.pagesPerSession, previous.pagesPerSession),
|
|
583
583
|
decimal
|
|
584
584
|
}
|
|
585
585
|
),
|
|
@@ -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, _chunk425GLYXNjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk425GLYXNjs.CardContent, { className: "grid gap-1", children: [
|
|
608
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk425GLYXNjs.CardContent, { className: "grid gap-1", children: [
|
|
625
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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,15 +673,15 @@ 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, _chunk425GLYXNjs.Tabs, { defaultValue: ANALYTICS_DIMENSIONS[0], children: [
|
|
677
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.TabsTrigger, { value: dimension, children: labels[dimension] }, dimension)) }),
|
|
678
|
+
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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");
|
|
682
682
|
function BreakdownRows({ rows }) {
|
|
683
683
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
684
|
-
const { decimal } =
|
|
684
|
+
const { decimal } = _chunkGKDHYB2Rjs.useUsageFormatters.call(void 0, );
|
|
685
685
|
const sortedRows = _react.useMemo.call(void 0, () => [...rows].sort((a, b) => b.visitors - a.visitors), [rows]);
|
|
686
686
|
if (sortedRows.length === 0) {
|
|
687
687
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
@@ -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, _chunk425GLYXNjs.Table, { children: [
|
|
694
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk425GLYXNjs.TableRow, { children: [
|
|
695
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.key") }),
|
|
696
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.visitors") }),
|
|
697
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.sessions") }),
|
|
698
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.TableBody, { children: sortedRows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk425GLYXNjs.TableRow, { "data-testid": `analytics-breakdown-row-${row.id}`, children: [
|
|
701
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableCell, { className: "text-xs", children: row.key === OTHER_KEY ? t("analytics.admin.other") : row.key }),
|
|
702
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.visitors, 0) }),
|
|
703
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.sessions, 0) }),
|
|
704
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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 =
|
|
720
|
-
const { decimal } =
|
|
719
|
+
const generateUrl = _chunk425GLYXNjs.usePageUrlGenerator.call(void 0, );
|
|
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, _chunk425GLYXNjs.Table, { children: [
|
|
727
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk425GLYXNjs.TableRow, { children: [
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.started") }),
|
|
729
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.visitor") }),
|
|
730
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.source") }),
|
|
731
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.landing") }),
|
|
732
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.pages") }),
|
|
733
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.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, _chunk425GLYXNjs.TableRow, { "data-testid": `analytics-session-row-${row.id}`, children: [
|
|
738
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableCell, { className: "text-xs tabular-nums", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
739
|
+
_chunk425GLYXNjs.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, _chunk425GLYXNjs.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, _chunk425GLYXNjs.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, _chunk425GLYXNjs.TableCell, { className: "text-xs", children: source }),
|
|
754
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableCell, { className: "text-xs", children: row.landingRoute }),
|
|
755
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) }),
|
|
756
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.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");
|
|
@@ -789,7 +789,7 @@ var inferGranularity = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (buc
|
|
|
789
789
|
}, "inferGranularity");
|
|
790
790
|
function AnalyticsTimelineChart({ rows, className }) {
|
|
791
791
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
792
|
-
const { compact, bucketDate, decimal } =
|
|
792
|
+
const { compact, bucketDate, decimal } = _chunkGKDHYB2Rjs.useUsageFormatters.call(void 0, );
|
|
793
793
|
const { resolvedTheme } = _nextthemes.useTheme.call(void 0, );
|
|
794
794
|
const mode = resolvedTheme === "dark" ? "dark" : "light";
|
|
795
795
|
const chartData = _react.useMemo.call(void 0, () => {
|
|
@@ -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, _chunk425GLYXNjs.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
|
+
_chunk425GLYXNjs.ChartTooltip,
|
|
852
852
|
{
|
|
853
853
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
854
|
-
|
|
854
|
+
_chunk425GLYXNjs.ChartTooltipContent,
|
|
855
855
|
{
|
|
856
856
|
labelFormatter: (value) => bucketDate(String(value), granularity),
|
|
857
857
|
valueFormatter: (value) => decimal(Number(value), 0)
|
|
@@ -859,13 +859,13 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
859
859
|
)
|
|
860
860
|
}
|
|
861
861
|
),
|
|
862
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
862
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.ChartLegendContent, {}) }),
|
|
863
863
|
SERIES.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
864
864
|
_recharts.Bar,
|
|
865
865
|
{
|
|
866
866
|
dataKey: series,
|
|
867
867
|
maxBarSize: 28,
|
|
868
|
-
fill:
|
|
868
|
+
fill: _chunkGKDHYB2Rjs.seriesColor.call(void 0, index, mode),
|
|
869
869
|
stroke: "var(--background)",
|
|
870
870
|
strokeWidth: 2,
|
|
871
871
|
radius: [4, 4, 0, 0]
|
|
@@ -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, _chunk425GLYXNjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.RoundPageContainer, { fullWidth: true, forceHeader: true });
|
|
900
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.Card, { children: [
|
|
906
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardTitle, { children: t("analytics.admin.panels.over_time") }) }),
|
|
907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.Card, { children: [
|
|
910
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardTitle, { children: t("analytics.admin.panels.breakdown") }) }),
|
|
911
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.Card, { children: [
|
|
914
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardTitle, { children: t("analytics.admin.panels.sessions") }) }),
|
|
915
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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 = _chunk425GLYXNjs.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, _chunk425GLYXNjs.RoundPageContainer, { fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.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, _chunk425GLYXNjs.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, _chunk425GLYXNjs.Card, { "data-testid": "analytics-journey-attribution", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
1005
|
+
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.Badge, { variant: "softGreen", children: t("analytics.admin.consented") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.DetailField, { label: t("analytics.admin.columns.started"), value: dateTime.format(session.startedAt) }),
|
|
1009
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.DetailField, { label: t("analytics.admin.columns.source"), value: source }),
|
|
1010
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.DetailField, { label: t("analytics.admin.columns.landing"), value: session.landingRoute }),
|
|
1011
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.DetailField, { label: t("analytics.admin.columns.device"), value: session.deviceType }),
|
|
1012
1012
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1013
|
-
|
|
1013
|
+
_chunk425GLYXNjs.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, _chunk425GLYXNjs.Card, { children: [
|
|
1022
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardTitle, { children: t("analytics.admin.columns.pages") }) }),
|
|
1023
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.Table, { children: [
|
|
1027
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk425GLYXNjs.TableRow, { children: [
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.time") }),
|
|
1029
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.gap") }),
|
|
1030
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.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, _chunk425GLYXNjs.TableRow, { "data-testid": `analytics-pageview-row-${pageView.id}`, children: [
|
|
1035
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.TableCell, { className: "text-xs tabular-nums", children: dateTime.format(pageView.createdAt) }),
|
|
1036
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.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, _chunk425GLYXNjs.Card, { children: [
|
|
1044
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.CardTitle, { children: t("analytics.admin.panels.other_sessions") }) }),
|
|
1045
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk425GLYXNjs.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, _chunk425GLYXNjs.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) {
|