@carlonicora/nextjs-jsonapi 6.10.2 → 6.11.0
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-7GQWHXBC.mjs → BlockNoteEditor-5WM5DX3J.mjs} +4 -4
- package/dist/{BlockNoteEditor-LX7NMBV6.js → BlockNoteEditor-GY5R25YI.js} +19 -19
- package/dist/{BlockNoteEditor-LX7NMBV6.js.map → BlockNoteEditor-GY5R25YI.js.map} +1 -1
- package/dist/{BlockNoteViewer-NXV5PKR4.js → BlockNoteViewer-FLUHEXE6.js} +3 -3
- package/dist/{BlockNoteViewer-NXV5PKR4.js.map → BlockNoteViewer-FLUHEXE6.js.map} +1 -1
- package/dist/{BlockNoteViewer-D3Y4FUST.mjs → BlockNoteViewer-UCA3LV3N.mjs} +2 -2
- package/dist/billing/index.js +491 -491
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-LDUTS7SJ.mjs → chunk-3PRLRCMF.mjs} +1281 -603
- package/dist/chunk-3PRLRCMF.mjs.map +1 -0
- package/dist/{chunk-QB2XU64X.mjs → chunk-6RLATJ2L.mjs} +2 -2
- package/dist/{chunk-62P4KIR2.mjs → chunk-BGLOFZ3K.mjs} +282 -2
- package/dist/chunk-BGLOFZ3K.mjs.map +1 -0
- package/dist/{chunk-62VVBUIL.js → chunk-FNPXCYHO.js} +8 -8
- package/dist/{chunk-62VVBUIL.js.map → chunk-FNPXCYHO.js.map} +1 -1
- package/dist/{chunk-3I5JCFPY.js → chunk-MP3DV2I5.js} +1647 -969
- package/dist/chunk-MP3DV2I5.js.map +1 -0
- package/dist/{chunk-TOPGUZSX.js → chunk-OHJSI6L2.js} +4 -4
- package/dist/{chunk-TOPGUZSX.js.map → chunk-OHJSI6L2.js.map} +1 -1
- package/dist/{chunk-Z4OVEA3N.js → chunk-YGEOX2XX.js} +283 -3
- package/dist/chunk-YGEOX2XX.js.map +1 -0
- package/dist/{chunk-GHAZOQTT.mjs → chunk-YP6W4AB5.mjs} +2 -2
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +67 -29
- package/dist/components/index.d.ts +67 -29
- package/dist/components/index.js +10 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +9 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +159 -3
- package/dist/core/index.d.ts +159 -3
- package/dist/core/index.js +14 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +13 -1
- package/dist/email-automations/index.js +93 -93
- package/dist/email-automations/index.mjs +3 -3
- package/dist/features/analytics/index.js +120 -122
- package/dist/features/analytics/index.js.map +1 -1
- package/dist/features/analytics/index.mjs +7 -9
- package/dist/features/analytics/index.mjs.map +1 -1
- package/dist/features/analytics/server.js +4 -4
- package/dist/features/analytics/server.mjs +2 -2
- package/dist/features/blog/index.js +150 -150
- package/dist/features/blog/index.mjs +3 -3
- package/dist/features/blog/server.js +16 -16
- package/dist/features/blog/server.mjs +1 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +126 -128
- package/dist/features/tokenusage/index.js.map +1 -1
- package/dist/features/tokenusage/index.mjs +14 -16
- package/dist/features/tokenusage/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -2
- package/dist/{HandbookSectionInterface-5I57rC1b.d.mts → referral-admin.interface-C87ApGMR.d.mts} +41 -1
- package/dist/{HandbookSectionInterface-IDYEzQMi.d.ts → referral-admin.interface-CMwl5NiV.d.ts} +41 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/messages/en.json +78 -1
- package/messages/it.json +78 -1
- package/package.json +1 -1
- package/src/core/index.ts +2 -0
- package/src/core/registry/ModuleRegistry.ts +5 -0
- package/src/features/referral/__tests__/referral-admin-models.spec.ts +122 -0
- package/src/features/referral/__tests__/referral-admin-service.spec.ts +70 -0
- package/src/features/referral/__tests__/referral-code-capture.spec.tsx +105 -0
- package/src/features/referral/__tests__/referral-invite-errors.spec.tsx +82 -0
- package/src/features/referral/__tests__/referral-visit-service.spec.ts +47 -0
- package/src/features/referral/__tests__/referrals-admin-container.spec.tsx +230 -0
- package/src/features/referral/components/ReferralCodeCapture.tsx +3 -0
- package/src/features/referral/components/ReferralDialog.tsx +9 -13
- package/src/features/referral/components/ReferralWidget.tsx +75 -45
- package/src/features/referral/components/ReferralsAdminFunnel.tsx +74 -0
- package/src/features/referral/components/ReferralsAdminTiles.tsx +128 -0
- package/src/features/referral/components/containers/ReferralsAdminContainer.tsx +205 -0
- package/src/features/referral/components/index.ts +3 -0
- package/src/features/referral/data/ReferralAdminReferral.ts +65 -0
- package/src/features/referral/data/ReferralAdminReferrer.ts +65 -0
- package/src/features/referral/data/ReferralAdminService.ts +51 -0
- package/src/features/referral/data/ReferralAdminSummary.ts +60 -0
- package/src/features/referral/data/ReferralService.ts +20 -0
- package/src/features/referral/data/ReferralVisit.ts +23 -0
- package/src/features/referral/data/index.ts +5 -0
- package/src/features/referral/hooks/index.ts +2 -0
- package/src/features/referral/hooks/useReferralAdminReferralTableStructure.tsx +127 -0
- package/src/features/referral/hooks/useReferralAdminReferrerTableStructure.tsx +229 -0
- package/src/features/referral/hooks/useReferralInvite.ts +2 -0
- package/src/features/referral/index.ts +1 -0
- package/src/features/referral/interfaces/index.ts +1 -0
- package/src/features/referral/interfaces/referral-admin.interface.ts +45 -0
- package/src/features/referral/referral-admin.modules.ts +32 -0
- package/dist/chunk-3I5JCFPY.js.map +0 -1
- package/dist/chunk-62P4KIR2.mjs.map +0 -1
- package/dist/chunk-D6UX37IA.mjs +0 -115
- package/dist/chunk-D6UX37IA.mjs.map +0 -1
- package/dist/chunk-KEHP2OBQ.js +0 -115
- package/dist/chunk-KEHP2OBQ.js.map +0 -1
- package/dist/chunk-LDUTS7SJ.mjs.map +0 -1
- package/dist/chunk-Z4OVEA3N.js.map +0 -1
- /package/dist/{BlockNoteEditor-7GQWHXBC.mjs.map → BlockNoteEditor-5WM5DX3J.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-D3Y4FUST.mjs.map → BlockNoteViewer-UCA3LV3N.mjs.map} +0 -0
- /package/dist/{chunk-QB2XU64X.mjs.map → chunk-6RLATJ2L.mjs.map} +0 -0
- /package/dist/{chunk-GHAZOQTT.mjs.map → chunk-YP6W4AB5.mjs.map} +0 -0
|
@@ -31,8 +31,8 @@ import {
|
|
|
31
31
|
useDataListRetriever,
|
|
32
32
|
usePageUrlGenerator,
|
|
33
33
|
useSidebar
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-3PRLRCMF.mjs";
|
|
35
|
+
import "../chunk-6RLATJ2L.mjs";
|
|
36
36
|
import "../chunk-PW42LRSL.mjs";
|
|
37
37
|
import {
|
|
38
38
|
EmailAutomationEnrollmentService,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
showError,
|
|
46
46
|
useI18nRouter,
|
|
47
47
|
useIsMobile
|
|
48
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-BGLOFZ3K.mjs";
|
|
49
49
|
import "../chunk-V5MI7RNB.mjs";
|
|
50
50
|
import "../chunk-AUXK7QSA.mjs";
|
|
51
51
|
import "../chunk-PI56A4DG.mjs";
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var _chunkKEHP2OBQjs = require('../../chunk-KEHP2OBQ.js');
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
|
|
@@ -32,9 +31,8 @@ var _chunkKEHP2OBQjs = require('../../chunk-KEHP2OBQ.js');
|
|
|
32
31
|
|
|
33
32
|
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
require('../../chunk-62VVBUIL.js');
|
|
34
|
+
var _chunkMP3DV2I5js = require('../../chunk-MP3DV2I5.js');
|
|
35
|
+
require('../../chunk-FNPXCYHO.js');
|
|
38
36
|
require('../../chunk-G4JR3SFV.js');
|
|
39
37
|
|
|
40
38
|
|
|
@@ -48,7 +46,7 @@ require('../../chunk-G4JR3SFV.js');
|
|
|
48
46
|
|
|
49
47
|
|
|
50
48
|
|
|
51
|
-
var
|
|
49
|
+
var _chunkYGEOX2XXjs = require('../../chunk-YGEOX2XX.js');
|
|
52
50
|
require('../../chunk-GHE4VT2R.js');
|
|
53
51
|
require('../../chunk-LXKSUWAV.js');
|
|
54
52
|
require('../../chunk-JTPRJNT2.js');
|
|
@@ -63,7 +61,7 @@ var _react = require('react');
|
|
|
63
61
|
var _uuid = require('uuid');
|
|
64
62
|
|
|
65
63
|
// src/features/analytics/data/AnalyticsService.ts
|
|
66
|
-
var AnalyticsService = class extends
|
|
64
|
+
var AnalyticsService = class extends _chunkYGEOX2XXjs.AbstractService {
|
|
67
65
|
static {
|
|
68
66
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "AnalyticsService");
|
|
69
67
|
}
|
|
@@ -75,9 +73,9 @@ var AnalyticsService = class extends _chunkZ4OVEA3Njs.AbstractService {
|
|
|
75
73
|
static async track(input) {
|
|
76
74
|
try {
|
|
77
75
|
await this.callApi({
|
|
78
|
-
type:
|
|
76
|
+
type: _chunkYGEOX2XXjs.Modules.AnalyticsEvent,
|
|
79
77
|
method: "POST" /* POST */,
|
|
80
|
-
endpoint: new (0,
|
|
78
|
+
endpoint: new (0, _chunkYGEOX2XXjs.EndpointCreator)({ endpoint: _chunkYGEOX2XXjs.Modules.AnalyticsEvent }).generate(),
|
|
81
79
|
input,
|
|
82
80
|
suppressGlobalError: true
|
|
83
81
|
});
|
|
@@ -226,7 +224,7 @@ function AnalyticsAdminFilterBar({ section, granularity, onChange }) {
|
|
|
226
224
|
};
|
|
227
225
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
228
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,
|
|
229
|
-
|
|
227
|
+
_chunkMP3DV2I5js.DateRangeSelector,
|
|
230
228
|
{
|
|
231
229
|
onDateChange: (range) => {
|
|
232
230
|
if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
|
|
@@ -270,13 +268,13 @@ function Segmented({
|
|
|
270
268
|
children: options.map((option) => {
|
|
271
269
|
const selected = option.value === value;
|
|
272
270
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
273
|
-
|
|
271
|
+
_chunkMP3DV2I5js.Button,
|
|
274
272
|
{
|
|
275
273
|
type: "button",
|
|
276
274
|
size: "sm",
|
|
277
275
|
variant: selected ? "default" : "ghost",
|
|
278
276
|
"aria-pressed": selected,
|
|
279
|
-
className:
|
|
277
|
+
className: _chunkYGEOX2XXjs.cn.call(void 0, !selected && "text-muted-foreground"),
|
|
280
278
|
onClick: () => onSelect(option.value),
|
|
281
279
|
children: option.label
|
|
282
280
|
},
|
|
@@ -296,45 +294,45 @@ function withFilters(endpoint, filters) {
|
|
|
296
294
|
return endpoint;
|
|
297
295
|
}
|
|
298
296
|
_chunk7QVYU63Ejs.__name.call(void 0, withFilters, "withFilters");
|
|
299
|
-
var AnalyticsAdminService = class extends
|
|
297
|
+
var AnalyticsAdminService = class extends _chunkYGEOX2XXjs.AbstractService {
|
|
300
298
|
static {
|
|
301
299
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "AnalyticsAdminService");
|
|
302
300
|
}
|
|
303
301
|
/** Headline tiles: one row per window (current, previous). */
|
|
304
302
|
static async getSummary(filters) {
|
|
305
|
-
const endpoint = withFilters(new (0,
|
|
303
|
+
const endpoint = withFilters(new (0, _chunkYGEOX2XXjs.EndpointCreator)({ endpoint: _chunkYGEOX2XXjs.Modules.AnalyticsSummary }), filters);
|
|
306
304
|
return this.callApi({
|
|
307
|
-
type:
|
|
305
|
+
type: _chunkYGEOX2XXjs.Modules.AnalyticsSummary,
|
|
308
306
|
method: "GET" /* GET */,
|
|
309
307
|
endpoint: endpoint.generate()
|
|
310
308
|
});
|
|
311
309
|
}
|
|
312
310
|
static async getTimeline(params) {
|
|
313
|
-
const endpoint = withFilters(new (0,
|
|
311
|
+
const endpoint = withFilters(new (0, _chunkYGEOX2XXjs.EndpointCreator)({ endpoint: _chunkYGEOX2XXjs.Modules.AnalyticsTimeline }), params);
|
|
314
312
|
endpoint.addAdditionalParam("granularity", params.granularity);
|
|
315
313
|
return this.callApi({
|
|
316
|
-
type:
|
|
314
|
+
type: _chunkYGEOX2XXjs.Modules.AnalyticsTimeline,
|
|
317
315
|
method: "GET" /* GET */,
|
|
318
316
|
endpoint: endpoint.generate()
|
|
319
317
|
});
|
|
320
318
|
}
|
|
321
319
|
static async getBreakdown(params) {
|
|
322
|
-
const endpoint = withFilters(new (0,
|
|
320
|
+
const endpoint = withFilters(new (0, _chunkYGEOX2XXjs.EndpointCreator)({ endpoint: _chunkYGEOX2XXjs.Modules.AnalyticsBreakdown }), params);
|
|
323
321
|
endpoint.addAdditionalParam("dimension", params.dimension);
|
|
324
322
|
if (params.limit !== void 0) endpoint.addAdditionalParam("limit", String(params.limit));
|
|
325
323
|
return this.callApi({
|
|
326
|
-
type:
|
|
324
|
+
type: _chunkYGEOX2XXjs.Modules.AnalyticsBreakdown,
|
|
327
325
|
method: "GET" /* GET */,
|
|
328
326
|
endpoint: endpoint.generate()
|
|
329
327
|
});
|
|
330
328
|
}
|
|
331
329
|
/** Newest sessions first, cursor-paginated through `next`. */
|
|
332
330
|
static async getSessions(params) {
|
|
333
|
-
const endpoint = withFilters(new (0,
|
|
331
|
+
const endpoint = withFilters(new (0, _chunkYGEOX2XXjs.EndpointCreator)({ endpoint: _chunkYGEOX2XXjs.Modules.AnalyticsSession }), params);
|
|
334
332
|
if (params.visitorId) endpoint.addAdditionalParam("visitorId", params.visitorId);
|
|
335
333
|
if (params.userId) endpoint.addAdditionalParam("userId", params.userId);
|
|
336
334
|
return this.callApi({
|
|
337
|
-
type:
|
|
335
|
+
type: _chunkYGEOX2XXjs.Modules.AnalyticsSession,
|
|
338
336
|
method: "GET" /* GET */,
|
|
339
337
|
endpoint: endpoint.generate(),
|
|
340
338
|
next: params.next
|
|
@@ -342,20 +340,20 @@ var AnalyticsAdminService = class extends _chunkZ4OVEA3Njs.AbstractService {
|
|
|
342
340
|
}
|
|
343
341
|
static async getSession(params) {
|
|
344
342
|
return this.callApi({
|
|
345
|
-
type:
|
|
343
|
+
type: _chunkYGEOX2XXjs.Modules.AnalyticsSession,
|
|
346
344
|
method: "GET" /* GET */,
|
|
347
|
-
endpoint: new (0,
|
|
345
|
+
endpoint: new (0, _chunkYGEOX2XXjs.EndpointCreator)({ endpoint: _chunkYGEOX2XXjs.Modules.AnalyticsSession, id: params.id }).generate()
|
|
348
346
|
});
|
|
349
347
|
}
|
|
350
348
|
/** The journey: every page view of one session, oldest first. */
|
|
351
349
|
static async getSessionPageViews(params) {
|
|
352
350
|
return this.callApi({
|
|
353
|
-
type:
|
|
351
|
+
type: _chunkYGEOX2XXjs.Modules.AnalyticsPageView,
|
|
354
352
|
method: "GET" /* GET */,
|
|
355
|
-
endpoint: new (0,
|
|
356
|
-
endpoint:
|
|
353
|
+
endpoint: new (0, _chunkYGEOX2XXjs.EndpointCreator)({
|
|
354
|
+
endpoint: _chunkYGEOX2XXjs.Modules.AnalyticsSession,
|
|
357
355
|
id: params.sessionId,
|
|
358
|
-
childEndpoint:
|
|
356
|
+
childEndpoint: _chunkYGEOX2XXjs.Modules.AnalyticsPageView
|
|
359
357
|
}).generate()
|
|
360
358
|
});
|
|
361
359
|
}
|
|
@@ -451,7 +449,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
451
449
|
const sessionsNext = {};
|
|
452
450
|
try {
|
|
453
451
|
const nextSessions = await AnalyticsAdminService.next({
|
|
454
|
-
type:
|
|
452
|
+
type: _chunkYGEOX2XXjs.Modules.AnalyticsSession,
|
|
455
453
|
endpoint: sessionsNextPage,
|
|
456
454
|
next: sessionsNext
|
|
457
455
|
});
|
|
@@ -506,7 +504,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
506
504
|
error
|
|
507
505
|
]
|
|
508
506
|
);
|
|
509
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
507
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminContext.Provider, { value: contextValue, children }) });
|
|
510
508
|
}, "AnalyticsAdminProvider");
|
|
511
509
|
var useAnalyticsAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
512
510
|
const ctx = _react.useContext.call(void 0, AnalyticsAdminContext);
|
|
@@ -526,7 +524,7 @@ var _lucidereact = require('lucide-react');
|
|
|
526
524
|
var ZERO = { visitors: 0, sessions: 0, pageViews: 0, pagesPerSession: 0, consentShare: 0 };
|
|
527
525
|
function AnalyticsAdminTiles({ summary }) {
|
|
528
526
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
529
|
-
const { decimal } =
|
|
527
|
+
const { decimal } = _chunkMP3DV2I5js.useUsageFormatters.call(void 0, );
|
|
530
528
|
const rowFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (window2) => _nullishCoalesce(summary.find((r) => r.section === "total" && r.window === window2), () => ( ZERO)), "rowFor");
|
|
531
529
|
const current = rowFor("current");
|
|
532
530
|
const previous = rowFor("previous");
|
|
@@ -539,7 +537,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
539
537
|
testId: "analytics-tile-visitors",
|
|
540
538
|
label: t("analytics.admin.tiles.visitors"),
|
|
541
539
|
value: decimal(current.visitors, 0),
|
|
542
|
-
delta:
|
|
540
|
+
delta: _chunkMP3DV2I5js.percentageDelta.call(void 0, current.visitors, previous.visitors),
|
|
543
541
|
previousLabel,
|
|
544
542
|
decimal
|
|
545
543
|
}
|
|
@@ -550,7 +548,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
550
548
|
testId: "analytics-tile-sessions",
|
|
551
549
|
label: t("analytics.admin.tiles.sessions"),
|
|
552
550
|
value: decimal(current.sessions, 0),
|
|
553
|
-
delta:
|
|
551
|
+
delta: _chunkMP3DV2I5js.percentageDelta.call(void 0, current.sessions, previous.sessions),
|
|
554
552
|
previousLabel,
|
|
555
553
|
decimal
|
|
556
554
|
}
|
|
@@ -561,7 +559,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
561
559
|
testId: "analytics-tile-page-views",
|
|
562
560
|
label: t("analytics.admin.tiles.page_views"),
|
|
563
561
|
value: decimal(current.pageViews, 0),
|
|
564
|
-
delta:
|
|
562
|
+
delta: _chunkMP3DV2I5js.percentageDelta.call(void 0, current.pageViews, previous.pageViews),
|
|
565
563
|
previousLabel,
|
|
566
564
|
decimal
|
|
567
565
|
}
|
|
@@ -574,7 +572,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
574
572
|
testId: "analytics-tile-pages-per-session",
|
|
575
573
|
label: t("analytics.admin.tiles.pages_per_session"),
|
|
576
574
|
value: decimal(current.pagesPerSession, 1),
|
|
577
|
-
delta:
|
|
575
|
+
delta: _chunkMP3DV2I5js.percentageDelta.call(void 0, current.pagesPerSession, previous.pagesPerSession),
|
|
578
576
|
decimal
|
|
579
577
|
}
|
|
580
578
|
),
|
|
@@ -599,8 +597,8 @@ function LeadTile({
|
|
|
599
597
|
previousLabel,
|
|
600
598
|
decimal
|
|
601
599
|
}) {
|
|
602
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
603
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
600
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.CardContent, { className: "grid gap-1", children: [
|
|
601
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.MicroLabel, { children: label }),
|
|
604
602
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
|
|
605
603
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
|
|
606
604
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal }),
|
|
@@ -616,8 +614,8 @@ function SupportingTile({
|
|
|
616
614
|
delta,
|
|
617
615
|
decimal
|
|
618
616
|
}) {
|
|
619
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
620
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
617
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.CardContent, { className: "grid gap-1", children: [
|
|
618
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.MicroLabel, { children: label }),
|
|
621
619
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
622
620
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
|
|
623
621
|
delta !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal })
|
|
@@ -640,7 +638,7 @@ function Delta({
|
|
|
640
638
|
"span",
|
|
641
639
|
{
|
|
642
640
|
"data-testid": testId,
|
|
643
|
-
className:
|
|
641
|
+
className: _chunkYGEOX2XXjs.cn.call(void 0,
|
|
644
642
|
"inline-flex items-center gap-0.5 text-xs tabular-nums",
|
|
645
643
|
increased ? "text-success" : "text-destructive"
|
|
646
644
|
),
|
|
@@ -668,15 +666,15 @@ function AnalyticsBreakdownTable({ breakdowns }) {
|
|
|
668
666
|
route: t("analytics.admin.dimensions.route"),
|
|
669
667
|
landing: t("analytics.admin.dimensions.landing")
|
|
670
668
|
};
|
|
671
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
672
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
673
|
-
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
669
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.Tabs, { defaultValue: ANALYTICS_DIMENSIONS[0], children: [
|
|
670
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.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, _chunkMP3DV2I5js.TabsTrigger, { value: dimension, children: labels[dimension] }, dimension)) }),
|
|
671
|
+
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TabsContent, { value: dimension, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreakdownRows, { rows: _nullishCoalesce(breakdowns[dimension], () => ( [])) }) }, dimension))
|
|
674
672
|
] });
|
|
675
673
|
}
|
|
676
674
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsBreakdownTable, "AnalyticsBreakdownTable");
|
|
677
675
|
function BreakdownRows({ rows }) {
|
|
678
676
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
679
|
-
const { decimal } =
|
|
677
|
+
const { decimal } = _chunkMP3DV2I5js.useUsageFormatters.call(void 0, );
|
|
680
678
|
const sortedRows = _react.useMemo.call(void 0, () => [...rows].sort((a, b) => b.visitors - a.visitors), [rows]);
|
|
681
679
|
if (sortedRows.length === 0) {
|
|
682
680
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
@@ -685,18 +683,18 @@ function BreakdownRows({ rows }) {
|
|
|
685
683
|
// The package's <Table> wraps itself in an `overflow-x-clip` container, which
|
|
686
684
|
// would swallow the overflow before this scroller ever saw it — hence the
|
|
687
685
|
// child override. Wide tables must scroll, never widen the page.
|
|
688
|
-
/* @__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,
|
|
689
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
690
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
691
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
692
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
693
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
686
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.Table, { children: [
|
|
687
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.TableRow, { children: [
|
|
688
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.key") }),
|
|
689
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.visitors") }),
|
|
690
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.sessions") }),
|
|
691
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.page_views") })
|
|
694
692
|
] }) }),
|
|
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,
|
|
693
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableBody, { children: sortedRows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.TableRow, { "data-testid": `analytics-breakdown-row-${row.id}`, children: [
|
|
694
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-xs", children: row.key === OTHER_KEY ? t("analytics.admin.other") : row.key }),
|
|
695
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.visitors, 0) }),
|
|
696
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.sessions, 0) }),
|
|
697
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) })
|
|
700
698
|
] }, row.id)) })
|
|
701
699
|
] }) })
|
|
702
700
|
);
|
|
@@ -711,48 +709,48 @@ var VISITOR_SUFFIX_LENGTH = 6;
|
|
|
711
709
|
function AnalyticsSessionsTable({ rows, sessionPageUrl, onLoadMore, hasMore }) {
|
|
712
710
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
713
711
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
714
|
-
const generateUrl =
|
|
715
|
-
const { decimal } =
|
|
712
|
+
const generateUrl = _chunkMP3DV2I5js.usePageUrlGenerator.call(void 0, );
|
|
713
|
+
const { decimal } = _chunkMP3DV2I5js.useUsageFormatters.call(void 0, );
|
|
716
714
|
const dateTime = _react.useMemo.call(void 0, () => new Intl.DateTimeFormat(locale, { dateStyle: "short", timeStyle: "short" }), [locale]);
|
|
717
715
|
if (rows.length === 0) {
|
|
718
716
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
719
717
|
}
|
|
720
718
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
721
|
-
/* @__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,
|
|
722
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
723
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
724
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
725
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
726
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
727
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
728
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
719
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.Table, { children: [
|
|
720
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.TableRow, { children: [
|
|
721
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.started") }),
|
|
722
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.visitor") }),
|
|
723
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.source") }),
|
|
724
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.landing") }),
|
|
725
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.pages") }),
|
|
726
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.device") })
|
|
729
727
|
] }) }),
|
|
730
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableBody, { children: rows.map((row) => {
|
|
731
729
|
const source = [_nullishCoalesce(row.utmSource, () => ( row.referrerHost)), row.utmMedium].filter(Boolean).join(" / ");
|
|
732
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
733
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
734
|
-
|
|
730
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.TableRow, { "data-testid": `analytics-session-row-${row.id}`, children: [
|
|
731
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-xs tabular-nums", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
732
|
+
_chunkMP3DV2I5js.Link,
|
|
735
733
|
{
|
|
736
734
|
href: generateUrl({ page: sessionPageUrl, id: row.id }),
|
|
737
735
|
"data-testid": `analytics-session-link-${row.id}`,
|
|
738
736
|
children: dateTime.format(row.startedAt)
|
|
739
737
|
}
|
|
740
738
|
) }),
|
|
741
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
739
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-xs", children: row.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
742
740
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: row.user.name }),
|
|
743
741
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: row.user.email })
|
|
744
742
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
745
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
743
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
746
744
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: row.visitorId.slice(-VISITOR_SUFFIX_LENGTH) })
|
|
747
745
|
] }) }),
|
|
748
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
749
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
750
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
751
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
746
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-xs", children: source }),
|
|
747
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-xs", children: row.landingRoute }),
|
|
748
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) }),
|
|
749
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-muted-foreground text-xs", children: row.deviceType })
|
|
752
750
|
] }, row.id);
|
|
753
751
|
}) })
|
|
754
752
|
] }) }),
|
|
755
|
-
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
753
|
+
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Button, { type: "button", variant: "outline", size: "sm", onClick: onLoadMore, children: t("analytics.admin.load_more") }) })
|
|
756
754
|
] });
|
|
757
755
|
}
|
|
758
756
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsSessionsTable, "AnalyticsSessionsTable");
|
|
@@ -784,7 +782,7 @@ var inferGranularity = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (buc
|
|
|
784
782
|
}, "inferGranularity");
|
|
785
783
|
function AnalyticsTimelineChart({ rows, className }) {
|
|
786
784
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
787
|
-
const { compact, bucketDate, decimal } =
|
|
785
|
+
const { compact, bucketDate, decimal } = _chunkMP3DV2I5js.useUsageFormatters.call(void 0, );
|
|
788
786
|
const { resolvedTheme } = _nextthemes.useTheme.call(void 0, );
|
|
789
787
|
const mode = resolvedTheme === "dark" ? "dark" : "light";
|
|
790
788
|
const chartData = _react.useMemo.call(void 0, () => {
|
|
@@ -819,7 +817,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
819
817
|
// rtl-ok: deliberate LTR island (chart)
|
|
820
818
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
821
819
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "analytics-timeline-data", children: JSON.stringify(chartData) }),
|
|
822
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
820
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.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: [
|
|
823
821
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
824
822
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
825
823
|
_recharts.XAxis,
|
|
@@ -843,10 +841,10 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
843
841
|
}
|
|
844
842
|
),
|
|
845
843
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
846
|
-
|
|
844
|
+
_chunkMP3DV2I5js.ChartTooltip,
|
|
847
845
|
{
|
|
848
846
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
849
|
-
|
|
847
|
+
_chunkMP3DV2I5js.ChartTooltipContent,
|
|
850
848
|
{
|
|
851
849
|
labelFormatter: (value) => bucketDate(String(value), granularity),
|
|
852
850
|
valueFormatter: (value) => decimal(Number(value), 0)
|
|
@@ -854,13 +852,13 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
854
852
|
)
|
|
855
853
|
}
|
|
856
854
|
),
|
|
857
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
855
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.ChartLegendContent, {}) }),
|
|
858
856
|
SERIES.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
859
857
|
_recharts.Bar,
|
|
860
858
|
{
|
|
861
859
|
dataKey: series,
|
|
862
860
|
maxBarSize: 28,
|
|
863
|
-
fill:
|
|
861
|
+
fill: _chunkMP3DV2I5js.seriesColor.call(void 0, index, mode),
|
|
864
862
|
stroke: "var(--background)",
|
|
865
863
|
strokeWidth: 2,
|
|
866
864
|
radius: [4, 4, 0, 0]
|
|
@@ -889,25 +887,25 @@ function AnalyticsAdminContainer() {
|
|
|
889
887
|
error
|
|
890
888
|
} = useAnalyticsAdmin();
|
|
891
889
|
if (error) {
|
|
892
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
890
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.RoundPageContainer, { module: _chunkYGEOX2XXjs.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
893
891
|
}
|
|
894
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
895
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
892
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.RoundPageContainer, { module: _chunkYGEOX2XXjs.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true });
|
|
893
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.RoundPageContainer, { module: _chunkYGEOX2XXjs.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
896
894
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
897
895
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminTiles, { summary }),
|
|
898
896
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: t("analytics.admin.tiles.summarised_note") })
|
|
899
897
|
] }),
|
|
900
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
901
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
902
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
898
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.Card, { children: [
|
|
899
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardTitle, { children: t("analytics.admin.panels.over_time") }) }),
|
|
900
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsTimelineChart, { rows: timeline }) })
|
|
903
901
|
] }),
|
|
904
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
905
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
906
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
902
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.Card, { children: [
|
|
903
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardTitle, { children: t("analytics.admin.panels.breakdown") }) }),
|
|
904
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsBreakdownTable, { breakdowns }) })
|
|
907
905
|
] }),
|
|
908
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
909
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
910
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
906
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.Card, { children: [
|
|
907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardTitle, { children: t("analytics.admin.panels.sessions") }) }),
|
|
908
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
911
909
|
AnalyticsSessionsTable,
|
|
912
910
|
{
|
|
913
911
|
rows: sessions,
|
|
@@ -930,7 +928,7 @@ var OTHER_SESSIONS_WINDOW_DAYS = 395;
|
|
|
930
928
|
function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_URL }) {
|
|
931
929
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
932
930
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
933
|
-
const generateUrl =
|
|
931
|
+
const generateUrl = _chunkMP3DV2I5js.usePageUrlGenerator.call(void 0, );
|
|
934
932
|
const [session, setSession] = _react.useState.call(void 0, void 0);
|
|
935
933
|
const [pageViews, setPageViews] = _react.useState.call(void 0, []);
|
|
936
934
|
const [otherSessions, setOtherSessions] = _react.useState.call(void 0, []);
|
|
@@ -986,26 +984,26 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
986
984
|
const title = { type: t("analytics.admin.panels.journey") };
|
|
987
985
|
const renderBody = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
988
986
|
if (error) {
|
|
989
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
987
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.RoundPageContainer, { module: _chunkYGEOX2XXjs.Modules.AnalyticsSession, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
990
988
|
}
|
|
991
|
-
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
989
|
+
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.RoundPageContainer, { module: _chunkYGEOX2XXjs.Modules.AnalyticsSession, fullWidth: true, forceHeader: true });
|
|
992
990
|
const source = [_nullishCoalesce(session.utmSource, () => ( session.referrerHost)), session.utmMedium, session.utmCampaign].filter(Boolean).join(" / ");
|
|
993
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
994
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
991
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.RoundPageContainer, { module: _chunkYGEOX2XXjs.Modules.AnalyticsSession, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-4 p-4", children: [
|
|
992
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Card, { "data-testid": "analytics-journey-attribution", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.CardContent, { className: "flex flex-col gap-3", children: [
|
|
995
993
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
996
994
|
session.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
997
995
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: session.user.name }),
|
|
998
996
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: session.user.email })
|
|
999
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1000
|
-
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
997
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
998
|
+
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Badge, { variant: "softGreen", children: t("analytics.admin.consented") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.Badge, { variant: "softGray", children: t("analytics.admin.not_consented") })
|
|
1001
999
|
] }),
|
|
1002
1000
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
|
|
1003
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1004
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1005
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1006
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1001
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.DetailField, { label: t("analytics.admin.columns.started"), value: dateTime.format(session.startedAt) }),
|
|
1002
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.DetailField, { label: t("analytics.admin.columns.source"), value: source }),
|
|
1003
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.DetailField, { label: t("analytics.admin.columns.landing"), value: session.landingRoute }),
|
|
1004
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.DetailField, { label: t("analytics.admin.columns.device"), value: session.deviceType }),
|
|
1007
1005
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1008
|
-
|
|
1006
|
+
_chunkMP3DV2I5js.DetailField,
|
|
1009
1007
|
{
|
|
1010
1008
|
label: t("analytics.admin.columns.visitor"),
|
|
1011
1009
|
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: session.visitorId })
|
|
@@ -1013,31 +1011,31 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1013
1011
|
)
|
|
1014
1012
|
] })
|
|
1015
1013
|
] }) }),
|
|
1016
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1017
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1018
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1014
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.Card, { children: [
|
|
1015
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardTitle, { children: t("analytics.admin.columns.pages") }) }),
|
|
1016
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardContent, { children: pageViews.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") }) : (
|
|
1019
1017
|
// The package's <Table> wraps itself in an `overflow-x-clip`
|
|
1020
1018
|
// container — hence the child override, so wide rows scroll.
|
|
1021
|
-
/* @__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,
|
|
1022
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1023
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1024
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1025
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1019
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.Table, { children: [
|
|
1020
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.TableRow, { children: [
|
|
1021
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.time") }),
|
|
1022
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.gap") }),
|
|
1023
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.path") })
|
|
1026
1024
|
] }) }),
|
|
1027
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1025
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableBody, { children: pageViews.map((pageView, index) => {
|
|
1028
1026
|
const previous = index > 0 ? pageViews[index - 1] : void 0;
|
|
1029
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1030
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1031
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1032
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1027
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.TableRow, { "data-testid": `analytics-pageview-row-${pageView.id}`, children: [
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-xs tabular-nums", children: dateTime.format(pageView.createdAt) }),
|
|
1029
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-end text-xs tabular-nums", children: previous ? formatGap(pageView.createdAt.getTime() - previous.createdAt.getTime()) : "\u2014" }),
|
|
1030
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.TableCell, { className: "text-xs", children: pageView.path })
|
|
1033
1031
|
] }, pageView.id);
|
|
1034
1032
|
}) })
|
|
1035
1033
|
] }) })
|
|
1036
1034
|
) })
|
|
1037
1035
|
] }),
|
|
1038
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1039
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1040
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1036
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMP3DV2I5js.Card, { children: [
|
|
1037
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardTitle, { children: t("analytics.admin.panels.other_sessions") }) }),
|
|
1038
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1041
1039
|
AnalyticsSessionsTable,
|
|
1042
1040
|
{
|
|
1043
1041
|
rows: otherSessions,
|
|
@@ -1049,7 +1047,7 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1049
1047
|
] })
|
|
1050
1048
|
] }) });
|
|
1051
1049
|
}, "renderBody");
|
|
1052
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1050
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMP3DV2I5js.SharedProvider, { value: { breadcrumbs: breadcrumb, title }, children: renderBody() });
|
|
1053
1051
|
}
|
|
1054
1052
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsJourneyContainer, "AnalyticsJourneyContainer");
|
|
1055
1053
|
function unit(locale, name, value) {
|
|
@@ -1157,5 +1155,5 @@ var ANALYTICS_ADMIN_I18N_KEYS = [
|
|
|
1157
1155
|
|
|
1158
1156
|
|
|
1159
1157
|
|
|
1160
|
-
exports.ANALYTICS_ADMIN_I18N_KEYS = ANALYTICS_ADMIN_I18N_KEYS; exports.ANALYTICS_DIMENSIONS = ANALYTICS_DIMENSIONS; exports.ANALYTICS_GRANULARITIES = ANALYTICS_GRANULARITIES; exports.ANALYTICS_SECTIONS = ANALYTICS_SECTIONS; exports.AnalyticsAdminContainer = AnalyticsAdminContainer; exports.AnalyticsAdminFilterBar = AnalyticsAdminFilterBar; exports.AnalyticsAdminPageContainer = AnalyticsAdminPageContainer; exports.AnalyticsAdminProvider = AnalyticsAdminProvider; exports.AnalyticsAdminService = AnalyticsAdminService; exports.AnalyticsAdminTiles = AnalyticsAdminTiles; exports.AnalyticsBreakdown =
|
|
1158
|
+
exports.ANALYTICS_ADMIN_I18N_KEYS = ANALYTICS_ADMIN_I18N_KEYS; exports.ANALYTICS_DIMENSIONS = ANALYTICS_DIMENSIONS; exports.ANALYTICS_GRANULARITIES = ANALYTICS_GRANULARITIES; exports.ANALYTICS_SECTIONS = ANALYTICS_SECTIONS; exports.AnalyticsAdminContainer = AnalyticsAdminContainer; exports.AnalyticsAdminFilterBar = AnalyticsAdminFilterBar; exports.AnalyticsAdminPageContainer = AnalyticsAdminPageContainer; exports.AnalyticsAdminProvider = AnalyticsAdminProvider; exports.AnalyticsAdminService = AnalyticsAdminService; exports.AnalyticsAdminTiles = AnalyticsAdminTiles; exports.AnalyticsBreakdown = _chunkYGEOX2XXjs.AnalyticsBreakdown; exports.AnalyticsBreakdownTable = AnalyticsBreakdownTable; exports.AnalyticsEvent = _chunkYGEOX2XXjs.AnalyticsEvent; exports.AnalyticsJourneyContainer = AnalyticsJourneyContainer; exports.AnalyticsJourneyPageContainer = AnalyticsJourneyPageContainer; exports.AnalyticsPageView = _chunkYGEOX2XXjs.AnalyticsPageView; exports.AnalyticsService = AnalyticsService; exports.AnalyticsSession = _chunkYGEOX2XXjs.AnalyticsSession; exports.AnalyticsSessionsTable = AnalyticsSessionsTable; exports.AnalyticsSummary = _chunkYGEOX2XXjs.AnalyticsSummary; exports.AnalyticsTimeline = _chunkYGEOX2XXjs.AnalyticsTimeline; exports.AnalyticsTimelineChart = AnalyticsTimelineChart; exports.AnalyticsTracker = AnalyticsTracker; exports.analyticsModules = _chunkYGEOX2XXjs.analyticsModules; exports.useAnalyticsAdmin = useAnalyticsAdmin;
|
|
1161
1159
|
//# sourceMappingURL=index.js.map
|