@carlonicora/nextjs-jsonapi 5.4.0 → 5.6.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-4YCAIEPT.js → BlockNoteEditor-AE3ZTEEH.js} +20 -20
- package/dist/{BlockNoteEditor-4YCAIEPT.js.map → BlockNoteEditor-AE3ZTEEH.js.map} +1 -1
- package/dist/{BlockNoteEditor-YQL2SGFR.mjs → BlockNoteEditor-NEYG5L6W.mjs} +5 -5
- package/dist/{BlockNoteViewer-AEJKJ27Q.mjs → BlockNoteViewer-3OUT5UFY.mjs} +3 -3
- package/dist/{BlockNoteViewer-YL3J7J2Y.js → BlockNoteViewer-4CFKQM7U.js} +4 -4
- package/dist/{BlockNoteViewer-YL3J7J2Y.js.map → BlockNoteViewer-4CFKQM7U.js.map} +1 -1
- package/dist/billing/index.d.mts +186 -25
- package/dist/billing/index.d.ts +186 -25
- package/dist/billing/index.js +1149 -588
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +786 -225
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-5PPG6PL7.js → chunk-3I5AAJXV.js} +3 -3
- package/dist/{chunk-5PPG6PL7.js.map → chunk-3I5AAJXV.js.map} +1 -1
- package/dist/{chunk-YW4ZCEWB.js → chunk-53BAULDP.js} +4 -4
- package/dist/{chunk-YW4ZCEWB.js.map → chunk-53BAULDP.js.map} +1 -1
- package/dist/{chunk-XCHSX3VC.mjs → chunk-BTPUYUQ3.mjs} +2 -2
- package/dist/{chunk-WC63PJSC.mjs → chunk-EYA2F6AN.mjs} +756 -24
- package/dist/chunk-EYA2F6AN.mjs.map +1 -0
- package/dist/{chunk-NFBOSPNJ.js → chunk-HKZAESS6.js} +954 -222
- package/dist/chunk-HKZAESS6.js.map +1 -0
- package/dist/{chunk-6DC2WVVB.mjs → chunk-KQHBONL4.mjs} +2 -2
- package/dist/{chunk-3NLAXVIN.js → chunk-LQ4DK4JF.js} +1988 -1089
- package/dist/chunk-LQ4DK4JF.js.map +1 -0
- package/dist/{chunk-YNCQSWQW.js → chunk-RL3PL3KV.js} +8 -8
- package/dist/{chunk-YNCQSWQW.js.map → chunk-RL3PL3KV.js.map} +1 -1
- package/dist/{chunk-EUKTBOI2.mjs → chunk-SFYPXCK4.mjs} +3382 -2483
- package/dist/chunk-SFYPXCK4.mjs.map +1 -0
- package/dist/{chunk-QMYQRPQC.mjs → chunk-Y7RR57EW.mjs} +2 -2
- package/dist/client/index.js +5 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +4 -4
- package/dist/components/editors/server.d.mts +15 -0
- package/dist/components/editors/server.d.ts +15 -0
- package/dist/components/editors/server.js +38 -0
- package/dist/components/editors/server.js.map +1 -0
- package/dist/components/editors/server.mjs +38 -0
- package/dist/components/editors/server.mjs.map +1 -0
- package/dist/components/index.d.mts +33 -10
- package/dist/components/index.d.ts +33 -10
- package/dist/components/index.js +7 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +8 -6
- package/dist/contexts/index.d.mts +9 -1
- package/dist/contexts/index.d.ts +9 -1
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.d.mts +242 -3
- package/dist/core/index.d.ts +242 -3
- package/dist/core/index.js +36 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +35 -3
- package/dist/email-automations/index.d.mts +3 -0
- package/dist/email-automations/index.d.ts +3 -0
- package/dist/email-automations/index.js +99 -95
- package/dist/email-automations/index.js.map +1 -1
- package/dist/email-automations/index.mjs +30 -26
- package/dist/email-automations/index.mjs.map +1 -1
- package/dist/features/analytics/index.d.mts +11 -4
- package/dist/features/analytics/index.d.ts +11 -4
- package/dist/features/analytics/index.js +127 -135
- package/dist/features/analytics/index.js.map +1 -1
- package/dist/features/analytics/index.mjs +16 -24
- package/dist/features/analytics/index.mjs.map +1 -1
- package/dist/features/analytics/server.d.mts +5 -2
- package/dist/features/analytics/server.d.ts +5 -2
- package/dist/features/analytics/server.js +7 -7
- package/dist/features/analytics/server.js.map +1 -1
- package/dist/features/analytics/server.mjs +5 -5
- package/dist/features/analytics/server.mjs.map +1 -1
- package/dist/features/blog/index.d.mts +12 -2
- package/dist/features/blog/index.d.ts +12 -2
- package/dist/features/blog/index.js +206 -195
- package/dist/features/blog/index.js.map +1 -1
- package/dist/features/blog/index.mjs +71 -60
- package/dist/features/blog/index.mjs.map +1 -1
- package/dist/features/blog/server.d.mts +4 -1
- package/dist/features/blog/server.d.ts +4 -1
- package/dist/features/blog/server.js +49 -21
- package/dist/features/blog/server.js.map +1 -1
- package/dist/features/blog/server.mjs +36 -8
- package/dist/features/blog/server.mjs.map +1 -1
- package/dist/features/help/index.js +38 -38
- package/dist/features/help/index.mjs +4 -4
- package/dist/features/tokenusage/index.d.mts +1 -3
- package/dist/features/tokenusage/index.d.ts +1 -3
- package/dist/features/tokenusage/index.js +127 -135
- package/dist/features/tokenusage/index.js.map +1 -1
- package/dist/features/tokenusage/index.mjs +10 -18
- package/dist/features/tokenusage/index.mjs.map +1 -1
- package/dist/{stripe-promotion-code.interface-C3qqh3mi.d.ts → format-options-BtX3o0Yu.d.ts} +104 -1
- package/dist/{stripe-promotion-code.interface-ClZ7DxS9.d.mts → format-options-D6c7FNDi.d.mts} +104 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +37 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -4
- package/dist/server/index.js +4 -4
- package/dist/server/index.mjs +3 -3
- package/messages/en.json +125 -3
- package/messages/it.json +125 -3
- package/package.json +9 -1
- package/scripts/validate-messages.mjs +1 -0
- package/src/billing/index.ts +1 -0
- package/src/client/index.ts +4 -0
- package/src/components/editors/server/BlockNoteServerContent.tsx +28 -0
- package/src/components/editors/server/__tests__/renderBlockNoteHTML.spec.ts +44 -0
- package/src/components/editors/server/renderBlockNoteHTML.ts +26 -0
- package/src/components/editors/server-entry.ts +7 -0
- package/src/components/index.ts +1 -0
- package/src/components/viewers/BlockNoteStaticViewer.tsx +44 -0
- package/src/core/index.ts +1 -0
- package/src/core/registry/ModuleRegistry.ts +3 -0
- package/src/features/administration/components/AdminIndexContainer.tsx +61 -33
- package/src/features/administration/components/__tests__/AdminIndexContainer.spec.tsx +61 -1
- package/src/features/administration/components/index.ts +2 -1
- package/src/features/administration/contexts/AdministrationContext.tsx +11 -3
- package/src/features/administration/contexts/__tests__/AdministrationContext.spec.tsx +40 -0
- package/src/features/ai-connection/ai-connection.module.ts +2 -0
- package/src/features/ai-connection/contexts/AiConnectionsContext.tsx +3 -16
- package/src/features/ai-connection/contexts/__tests__/AiConnectionsContext.spec.tsx +33 -0
- package/src/features/analytics/__tests__/server-entry.spec.tsx +2 -1
- package/src/features/analytics/analytics.modules.ts +22 -5
- package/src/features/analytics/components/AnalyticsAdminContainer.tsx +4 -3
- package/src/features/analytics/components/AnalyticsAdminPageContainer.tsx +6 -3
- package/src/features/analytics/components/AnalyticsJourneyContainer.tsx +4 -3
- package/src/features/analytics/components/__tests__/AnalyticsJourneyContainer.spec.tsx +11 -0
- package/src/features/analytics/components/__tests__/AnalyticsPageContainers.spec.tsx +12 -1
- package/src/features/analytics/components/server/AnalyticsAdminPage.tsx +6 -3
- package/src/features/analytics/contexts/AnalyticsAdminContext.tsx +8 -17
- package/src/features/analytics/contexts/__tests__/AnalyticsAdminContext.spec.tsx +17 -0
- package/src/features/billing/components/cards/InvoicesSummaryCard.tsx +3 -2
- package/src/features/billing/components/cards/SubscriptionSummaryCard.tsx +4 -3
- package/src/features/billing/components/containers/BillingDashboardContainer.tsx +22 -5
- package/src/features/billing/components/utils/__tests__/discount.spec.ts +59 -0
- package/src/features/billing/components/utils/__tests__/url.spec.ts +32 -0
- package/src/features/billing/components/utils/discount.ts +38 -0
- package/src/features/billing/components/utils/index.ts +2 -0
- package/src/features/billing/components/utils/url.ts +12 -0
- package/src/features/billing/contexts/CouponContext.tsx +211 -0
- package/src/features/billing/contexts/index.ts +1 -0
- package/src/features/billing/i18n-keys.ts +79 -0
- package/src/features/billing/stripe-coupon/components/containers/CouponContainer.tsx +38 -0
- package/src/features/billing/stripe-coupon/components/containers/index.ts +1 -0
- package/src/features/billing/stripe-coupon/components/details/CouponDetails.tsx +69 -0
- package/src/features/billing/stripe-coupon/components/details/index.ts +1 -0
- package/src/features/billing/stripe-coupon/components/forms/CouponCodeEditor.tsx +79 -0
- package/src/features/billing/stripe-coupon/components/forms/CouponCodeFields.tsx +192 -0
- package/src/features/billing/stripe-coupon/components/forms/CouponEditor.tsx +333 -0
- package/src/features/billing/stripe-coupon/components/forms/CouponRefresher.tsx +45 -0
- package/src/features/billing/stripe-coupon/components/forms/index.ts +6 -0
- package/src/features/billing/stripe-coupon/components/index.ts +5 -0
- package/src/features/billing/stripe-coupon/components/lists/CouponCodesList.tsx +61 -0
- package/src/features/billing/stripe-coupon/components/lists/CouponsList.tsx +67 -0
- package/src/features/billing/stripe-coupon/components/lists/index.ts +2 -0
- package/src/features/billing/stripe-coupon/components/widgets/CouponCodeActions.tsx +80 -0
- package/src/features/billing/stripe-coupon/components/widgets/index.ts +1 -0
- package/src/features/billing/stripe-coupon/data/__tests__/stripe-coupon-models.spec.ts +114 -0
- package/src/features/billing/stripe-coupon/data/index.ts +10 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-code.fields.ts +8 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-code.interface.ts +44 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-code.service.ts +92 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-code.ts +132 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-offer.interface.ts +17 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-offer.ts +70 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon.fields.ts +7 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon.interface.ts +51 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon.service.ts +93 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon.ts +165 -0
- package/src/features/billing/stripe-coupon/hooks/useStripeCouponCodeTableStructure.tsx +154 -0
- package/src/features/billing/stripe-coupon/hooks/useStripeCouponTableStructure.tsx +113 -0
- package/src/features/billing/stripe-coupon/index.ts +5 -0
- package/src/features/billing/stripe-coupon/stripe-coupon-code.module.ts +14 -0
- package/src/features/billing/stripe-coupon/stripe-coupon-offer.module.ts +10 -0
- package/src/features/billing/stripe-coupon/stripe-coupon.module.ts +18 -0
- package/src/features/billing/stripe-coupon/utils/__tests__/coupon-places.spec.ts +19 -0
- package/src/features/billing/stripe-coupon/utils/__tests__/to-promotion-code-result.spec.ts +41 -0
- package/src/features/billing/stripe-coupon/utils/coupon-places.ts +23 -0
- package/src/features/billing/stripe-coupon/utils/format-coupon-discount.ts +36 -0
- package/src/features/billing/stripe-coupon/utils/index.ts +3 -0
- package/src/features/billing/stripe-coupon/utils/to-promotion-code-result.ts +23 -0
- package/src/features/billing/stripe-customer/components/forms/PaymentMethodForm.tsx +24 -8
- package/src/features/billing/stripe-price/stripe-price.module.ts +2 -0
- package/src/features/billing/stripe-product/components/containers/ProductsListContainer.tsx +21 -6
- package/src/features/billing/stripe-product/stripe-product.module.ts +2 -0
- package/src/features/billing/stripe-promotion-code/components/PromoCodeInput.tsx +60 -19
- package/src/features/billing/stripe-promotion-code/data/stripe-promotion-code.interface.ts +2 -0
- package/src/features/billing/stripe-subscription/components/containers/SubscriptionsContainer.tsx +24 -5
- package/src/features/billing/stripe-subscription/components/lists/SubscriptionsList.tsx +21 -2
- package/src/features/billing/stripe-subscription/components/wizards/SubscriptionWizard.tsx +1 -1
- package/src/features/billing/stripe-subscription/components/wizards/WizardStepPaymentMethod.tsx +1 -1
- package/src/features/billing/stripe-subscription/components/wizards/WizardStepReview.tsx +60 -49
- package/src/features/billing/stripe-subscription/components/wizards/__tests__/review-card.spec.ts +34 -0
- package/src/features/billing/stripe-subscription/components/wizards/review-card.ts +24 -0
- package/src/features/billing/stripe-subscription/data/__tests__/stripe-subscription.discount.spec.ts +67 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.interface.ts +14 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.service.ts +39 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.ts +21 -0
- package/src/features/billing/stripe-subscription/hooks/__tests__/wizard-payment.spec.ts +48 -0
- package/src/features/billing/stripe-subscription/hooks/__tests__/wizard-promotion.spec.ts +132 -0
- package/src/features/billing/stripe-subscription/hooks/useSubscriptionWizard.ts +138 -12
- package/src/features/billing/stripe-subscription/hooks/wizard-payment.ts +30 -0
- package/src/features/billing/stripe-subscription/hooks/wizard-promotion.ts +54 -0
- package/src/features/blog/components/admin/BlogAdminContainer.tsx +13 -6
- package/src/features/blog/components/admin/BlogCategoriesList.tsx +1 -1
- package/src/features/blog/components/admin/BlogCoverImageField.tsx +1 -1
- package/src/features/blog/components/admin/BlogPostContainer.tsx +0 -1
- package/src/features/blog/components/admin/BlogPostEditor.tsx +42 -33
- package/src/features/blog/components/admin/BlogPostTranslationEditor.tsx +12 -4
- package/src/features/blog/components/admin/BlogPostsList.tsx +1 -1
- package/src/features/blog/components/public/BlogPostCard.tsx +2 -9
- package/src/features/blog/components/public/BlogPostMeta.tsx +2 -2
- package/src/features/blog/components/public/BlogPostView.tsx +9 -3
- package/src/features/blog/components/public/__tests__/BlogList.spec.tsx +2 -0
- package/src/features/blog/components/public/__tests__/BlogPostView.spec.tsx +17 -11
- package/src/features/blog/server/fetchers.ts +57 -8
- package/src/features/email-automation/components/containers/EmailAutomationsListContainer.tsx +12 -3
- package/src/features/rbac/contexts/RbacContext.tsx +4 -7
- package/src/features/rbac/contexts/__tests__/RbacContext.spec.tsx +42 -0
- package/src/features/tokenusage/components/TokenUsageAdminContainer.tsx +4 -3
- package/src/features/tokenusage/contexts/TokenUsageAdminContext.tsx +3 -18
- package/src/features/tokenusage/contexts/__tests__/TokenUsageAdminContext.spec.tsx +17 -0
- package/src/features/tokenusage/tokenusage-admin.module.ts +4 -3
- package/src/features/tokenusage/tokenusage.modules.ts +12 -2
- package/src/features/user/contexts/CurrentUserContext.tsx +25 -0
- package/src/features/user/contexts/UserContext.tsx +18 -3
- package/src/features/user/contexts/__tests__/CurrentUserContext.spec.tsx +121 -2
- package/src/features/user/contexts/__tests__/UserContext.spec.tsx +95 -0
- package/dist/chunk-3NLAXVIN.js.map +0 -1
- package/dist/chunk-EUKTBOI2.mjs.map +0 -1
- package/dist/chunk-NFBOSPNJ.js.map +0 -1
- package/dist/chunk-WC63PJSC.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-YQL2SGFR.mjs.map → BlockNoteEditor-NEYG5L6W.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-AEJKJ27Q.mjs.map → BlockNoteViewer-3OUT5UFY.mjs.map} +0 -0
- /package/dist/{chunk-XCHSX3VC.mjs.map → chunk-BTPUYUQ3.mjs.map} +0 -0
- /package/dist/{chunk-6DC2WVVB.mjs.map → chunk-KQHBONL4.mjs.map} +0 -0
- /package/dist/{chunk-QMYQRPQC.mjs.map → chunk-Y7RR57EW.mjs.map} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk3I5AAJXVjs = require('../../chunk-3I5AAJXV.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -33,8 +33,8 @@ var _chunk5PPG6PL7js = require('../../chunk-5PPG6PL7.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
37
|
-
require('../../chunk-
|
|
36
|
+
var _chunkLQ4DK4JFjs = require('../../chunk-LQ4DK4JF.js');
|
|
37
|
+
require('../../chunk-RL3PL3KV.js');
|
|
38
38
|
require('../../chunk-G4JR3SFV.js');
|
|
39
39
|
|
|
40
40
|
|
|
@@ -48,10 +48,10 @@ require('../../chunk-G4JR3SFV.js');
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
var
|
|
51
|
+
var _chunkHKZAESS6js = require('../../chunk-HKZAESS6.js');
|
|
52
|
+
require('../../chunk-GHE4VT2R.js');
|
|
52
53
|
require('../../chunk-LXKSUWAV.js');
|
|
53
54
|
require('../../chunk-JTPRJNT2.js');
|
|
54
|
-
require('../../chunk-GHE4VT2R.js');
|
|
55
55
|
require('../../chunk-3EPNHTMH.js');
|
|
56
56
|
|
|
57
57
|
|
|
@@ -63,7 +63,7 @@ var _react = require('react');
|
|
|
63
63
|
var _uuid = require('uuid');
|
|
64
64
|
|
|
65
65
|
// src/features/analytics/data/AnalyticsService.ts
|
|
66
|
-
var AnalyticsService = class extends
|
|
66
|
+
var AnalyticsService = class extends _chunkHKZAESS6js.AbstractService {
|
|
67
67
|
static {
|
|
68
68
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "AnalyticsService");
|
|
69
69
|
}
|
|
@@ -75,9 +75,9 @@ var AnalyticsService = class extends _chunkNFBOSPNJjs.AbstractService {
|
|
|
75
75
|
static async track(input) {
|
|
76
76
|
try {
|
|
77
77
|
await this.callApi({
|
|
78
|
-
type:
|
|
78
|
+
type: _chunkHKZAESS6js.Modules.AnalyticsEvent,
|
|
79
79
|
method: "POST" /* POST */,
|
|
80
|
-
endpoint: new (0,
|
|
80
|
+
endpoint: new (0, _chunkHKZAESS6js.EndpointCreator)({ endpoint: _chunkHKZAESS6js.Modules.AnalyticsEvent }).generate(),
|
|
81
81
|
input,
|
|
82
82
|
suppressGlobalError: true
|
|
83
83
|
});
|
|
@@ -224,7 +224,7 @@ function AnalyticsAdminFilterBar({ section, granularity, onChange }) {
|
|
|
224
224
|
};
|
|
225
225
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
226
226
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "max-md:w-full max-md:[&_#date]:w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
227
|
-
|
|
227
|
+
_chunkLQ4DK4JFjs.DateRangeSelector,
|
|
228
228
|
{
|
|
229
229
|
onDateChange: (range) => {
|
|
230
230
|
if (!_optionalChain([range, 'optionalAccess', _ => _.from]) || !_optionalChain([range, 'optionalAccess', _2 => _2.to])) return;
|
|
@@ -268,13 +268,13 @@ function Segmented({
|
|
|
268
268
|
children: options.map((option) => {
|
|
269
269
|
const selected = option.value === value;
|
|
270
270
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
271
|
-
|
|
271
|
+
_chunkLQ4DK4JFjs.Button,
|
|
272
272
|
{
|
|
273
273
|
type: "button",
|
|
274
274
|
size: "sm",
|
|
275
275
|
variant: selected ? "default" : "ghost",
|
|
276
276
|
"aria-pressed": selected,
|
|
277
|
-
className:
|
|
277
|
+
className: _chunkHKZAESS6js.cn.call(void 0, !selected && "text-muted-foreground"),
|
|
278
278
|
onClick: () => onSelect(option.value),
|
|
279
279
|
children: option.label
|
|
280
280
|
},
|
|
@@ -294,45 +294,45 @@ function withFilters(endpoint, filters) {
|
|
|
294
294
|
return endpoint;
|
|
295
295
|
}
|
|
296
296
|
_chunk7QVYU63Ejs.__name.call(void 0, withFilters, "withFilters");
|
|
297
|
-
var AnalyticsAdminService = class extends
|
|
297
|
+
var AnalyticsAdminService = class extends _chunkHKZAESS6js.AbstractService {
|
|
298
298
|
static {
|
|
299
299
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "AnalyticsAdminService");
|
|
300
300
|
}
|
|
301
301
|
/** Headline tiles: one row per window (current, previous). */
|
|
302
302
|
static async getSummary(filters) {
|
|
303
|
-
const endpoint = withFilters(new (0,
|
|
303
|
+
const endpoint = withFilters(new (0, _chunkHKZAESS6js.EndpointCreator)({ endpoint: _chunkHKZAESS6js.Modules.AnalyticsSummary }), filters);
|
|
304
304
|
return this.callApi({
|
|
305
|
-
type:
|
|
305
|
+
type: _chunkHKZAESS6js.Modules.AnalyticsSummary,
|
|
306
306
|
method: "GET" /* GET */,
|
|
307
307
|
endpoint: endpoint.generate()
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
310
|
static async getTimeline(params) {
|
|
311
|
-
const endpoint = withFilters(new (0,
|
|
311
|
+
const endpoint = withFilters(new (0, _chunkHKZAESS6js.EndpointCreator)({ endpoint: _chunkHKZAESS6js.Modules.AnalyticsTimeline }), params);
|
|
312
312
|
endpoint.addAdditionalParam("granularity", params.granularity);
|
|
313
313
|
return this.callApi({
|
|
314
|
-
type:
|
|
314
|
+
type: _chunkHKZAESS6js.Modules.AnalyticsTimeline,
|
|
315
315
|
method: "GET" /* GET */,
|
|
316
316
|
endpoint: endpoint.generate()
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
319
|
static async getBreakdown(params) {
|
|
320
|
-
const endpoint = withFilters(new (0,
|
|
320
|
+
const endpoint = withFilters(new (0, _chunkHKZAESS6js.EndpointCreator)({ endpoint: _chunkHKZAESS6js.Modules.AnalyticsBreakdown }), params);
|
|
321
321
|
endpoint.addAdditionalParam("dimension", params.dimension);
|
|
322
322
|
if (params.limit !== void 0) endpoint.addAdditionalParam("limit", String(params.limit));
|
|
323
323
|
return this.callApi({
|
|
324
|
-
type:
|
|
324
|
+
type: _chunkHKZAESS6js.Modules.AnalyticsBreakdown,
|
|
325
325
|
method: "GET" /* GET */,
|
|
326
326
|
endpoint: endpoint.generate()
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
/** Newest sessions first, cursor-paginated through `next`. */
|
|
330
330
|
static async getSessions(params) {
|
|
331
|
-
const endpoint = withFilters(new (0,
|
|
331
|
+
const endpoint = withFilters(new (0, _chunkHKZAESS6js.EndpointCreator)({ endpoint: _chunkHKZAESS6js.Modules.AnalyticsSession }), params);
|
|
332
332
|
if (params.visitorId) endpoint.addAdditionalParam("visitorId", params.visitorId);
|
|
333
333
|
if (params.userId) endpoint.addAdditionalParam("userId", params.userId);
|
|
334
334
|
return this.callApi({
|
|
335
|
-
type:
|
|
335
|
+
type: _chunkHKZAESS6js.Modules.AnalyticsSession,
|
|
336
336
|
method: "GET" /* GET */,
|
|
337
337
|
endpoint: endpoint.generate(),
|
|
338
338
|
next: params.next
|
|
@@ -340,20 +340,20 @@ var AnalyticsAdminService = class extends _chunkNFBOSPNJjs.AbstractService {
|
|
|
340
340
|
}
|
|
341
341
|
static async getSession(params) {
|
|
342
342
|
return this.callApi({
|
|
343
|
-
type:
|
|
343
|
+
type: _chunkHKZAESS6js.Modules.AnalyticsSession,
|
|
344
344
|
method: "GET" /* GET */,
|
|
345
|
-
endpoint: new (0,
|
|
345
|
+
endpoint: new (0, _chunkHKZAESS6js.EndpointCreator)({ endpoint: _chunkHKZAESS6js.Modules.AnalyticsSession, id: params.id }).generate()
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
348
|
/** The journey: every page view of one session, oldest first. */
|
|
349
349
|
static async getSessionPageViews(params) {
|
|
350
350
|
return this.callApi({
|
|
351
|
-
type:
|
|
351
|
+
type: _chunkHKZAESS6js.Modules.AnalyticsPageView,
|
|
352
352
|
method: "GET" /* GET */,
|
|
353
|
-
endpoint: new (0,
|
|
354
|
-
endpoint:
|
|
353
|
+
endpoint: new (0, _chunkHKZAESS6js.EndpointCreator)({
|
|
354
|
+
endpoint: _chunkHKZAESS6js.Modules.AnalyticsSession,
|
|
355
355
|
id: params.sessionId,
|
|
356
|
-
childEndpoint:
|
|
356
|
+
childEndpoint: _chunkHKZAESS6js.Modules.AnalyticsPageView
|
|
357
357
|
}).generate()
|
|
358
358
|
});
|
|
359
359
|
}
|
|
@@ -361,7 +361,6 @@ var AnalyticsAdminService = class extends _chunkNFBOSPNJjs.AbstractService {
|
|
|
361
361
|
|
|
362
362
|
// src/features/analytics/contexts/AnalyticsAdminContext.tsx
|
|
363
363
|
|
|
364
|
-
var ANALYTICS_ADMIN_PAGE_URL = "/administration/analytics";
|
|
365
364
|
var ANALYTICS_SESSION_PAGE_URL = "/administration/analytics/sessions";
|
|
366
365
|
var BREAKDOWN_LIMIT = 20;
|
|
367
366
|
var DEFAULT_RANGE_DAYS = 30;
|
|
@@ -384,11 +383,9 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
384
383
|
children,
|
|
385
384
|
initialFrom,
|
|
386
385
|
initialTo,
|
|
387
|
-
pageUrl = ANALYTICS_ADMIN_PAGE_URL,
|
|
388
386
|
sessionPageUrl = ANALYTICS_SESSION_PAGE_URL
|
|
389
387
|
}) => {
|
|
390
388
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
391
|
-
const generateUrl = _chunk3NLAXVINjs.usePageUrlGenerator.call(void 0, );
|
|
392
389
|
const [filters, setFilterState] = _react.useState.call(void 0, () => {
|
|
393
390
|
const range = defaultRange();
|
|
394
391
|
return {
|
|
@@ -452,7 +449,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
452
449
|
const sessionsNext = {};
|
|
453
450
|
try {
|
|
454
451
|
const nextSessions = await AnalyticsAdminService.next({
|
|
455
|
-
type:
|
|
452
|
+
type: _chunkHKZAESS6js.Modules.AnalyticsSession,
|
|
456
453
|
endpoint: sessionsNextPage,
|
|
457
454
|
next: sessionsNext
|
|
458
455
|
});
|
|
@@ -463,12 +460,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
463
460
|
setError(err instanceof Error ? err.message : String(err));
|
|
464
461
|
}
|
|
465
462
|
}, [sessionsNextPage]);
|
|
466
|
-
const breadcrumb = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => [
|
|
467
|
-
{
|
|
468
|
-
name: t("analytics.admin.title"),
|
|
469
|
-
href: generateUrl({ page: pageUrl })
|
|
470
|
-
}
|
|
471
|
-
], "breadcrumb");
|
|
463
|
+
const breadcrumb = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => [{ name: t("analytics.admin.title") }], "breadcrumb");
|
|
472
464
|
const title = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => ({
|
|
473
465
|
type: t("analytics.admin.title"),
|
|
474
466
|
functions: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -512,7 +504,7 @@ var AnalyticsAdminProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
|
|
|
512
504
|
error
|
|
513
505
|
]
|
|
514
506
|
);
|
|
515
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
507
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminContext.Provider, { value: contextValue, children }) });
|
|
516
508
|
}, "AnalyticsAdminProvider");
|
|
517
509
|
var useAnalyticsAdmin = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
518
510
|
const ctx = _react.useContext.call(void 0, AnalyticsAdminContext);
|
|
@@ -532,7 +524,7 @@ var _lucidereact = require('lucide-react');
|
|
|
532
524
|
var ZERO = { visitors: 0, sessions: 0, pageViews: 0, pagesPerSession: 0, consentShare: 0 };
|
|
533
525
|
function AnalyticsAdminTiles({ summary }) {
|
|
534
526
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
535
|
-
const { decimal } =
|
|
527
|
+
const { decimal } = _chunk3I5AAJXVjs.useUsageFormatters.call(void 0, );
|
|
536
528
|
const rowFor = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (window2) => _nullishCoalesce(summary.find((r) => r.section === "total" && r.window === window2), () => ( ZERO)), "rowFor");
|
|
537
529
|
const current = rowFor("current");
|
|
538
530
|
const previous = rowFor("previous");
|
|
@@ -545,7 +537,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
545
537
|
testId: "analytics-tile-visitors",
|
|
546
538
|
label: t("analytics.admin.tiles.visitors"),
|
|
547
539
|
value: decimal(current.visitors, 0),
|
|
548
|
-
delta:
|
|
540
|
+
delta: _chunk3I5AAJXVjs.percentageDelta.call(void 0, current.visitors, previous.visitors),
|
|
549
541
|
previousLabel,
|
|
550
542
|
decimal
|
|
551
543
|
}
|
|
@@ -556,7 +548,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
556
548
|
testId: "analytics-tile-sessions",
|
|
557
549
|
label: t("analytics.admin.tiles.sessions"),
|
|
558
550
|
value: decimal(current.sessions, 0),
|
|
559
|
-
delta:
|
|
551
|
+
delta: _chunk3I5AAJXVjs.percentageDelta.call(void 0, current.sessions, previous.sessions),
|
|
560
552
|
previousLabel,
|
|
561
553
|
decimal
|
|
562
554
|
}
|
|
@@ -567,7 +559,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
567
559
|
testId: "analytics-tile-page-views",
|
|
568
560
|
label: t("analytics.admin.tiles.page_views"),
|
|
569
561
|
value: decimal(current.pageViews, 0),
|
|
570
|
-
delta:
|
|
562
|
+
delta: _chunk3I5AAJXVjs.percentageDelta.call(void 0, current.pageViews, previous.pageViews),
|
|
571
563
|
previousLabel,
|
|
572
564
|
decimal
|
|
573
565
|
}
|
|
@@ -580,7 +572,7 @@ function AnalyticsAdminTiles({ summary }) {
|
|
|
580
572
|
testId: "analytics-tile-pages-per-session",
|
|
581
573
|
label: t("analytics.admin.tiles.pages_per_session"),
|
|
582
574
|
value: decimal(current.pagesPerSession, 1),
|
|
583
|
-
delta:
|
|
575
|
+
delta: _chunk3I5AAJXVjs.percentageDelta.call(void 0, current.pagesPerSession, previous.pagesPerSession),
|
|
584
576
|
decimal
|
|
585
577
|
}
|
|
586
578
|
),
|
|
@@ -605,8 +597,8 @@ function LeadTile({
|
|
|
605
597
|
previousLabel,
|
|
606
598
|
decimal
|
|
607
599
|
}) {
|
|
608
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
609
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
600
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.Card, { "data-testid": testId, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.CardContent, { className: "grid gap-1", children: [
|
|
601
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.MicroLabel, { children: label }),
|
|
610
602
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-primary text-xl font-semibold tabular-nums", children: value }),
|
|
611
603
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-1", children: [
|
|
612
604
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal }),
|
|
@@ -622,8 +614,8 @@ function SupportingTile({
|
|
|
622
614
|
delta,
|
|
623
615
|
decimal
|
|
624
616
|
}) {
|
|
625
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
626
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
617
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.Card, { "data-testid": testId, size: "sm", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.CardContent, { className: "grid gap-1", children: [
|
|
618
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.MicroLabel, { children: label }),
|
|
627
619
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
628
620
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium tabular-nums", children: value }),
|
|
629
621
|
delta !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Delta, { testId: `${testId}-delta`, delta, decimal })
|
|
@@ -646,7 +638,7 @@ function Delta({
|
|
|
646
638
|
"span",
|
|
647
639
|
{
|
|
648
640
|
"data-testid": testId,
|
|
649
|
-
className:
|
|
641
|
+
className: _chunkHKZAESS6js.cn.call(void 0,
|
|
650
642
|
"inline-flex items-center gap-0.5 text-xs tabular-nums",
|
|
651
643
|
increased ? "text-success" : "text-destructive"
|
|
652
644
|
),
|
|
@@ -674,15 +666,15 @@ function AnalyticsBreakdownTable({ breakdowns }) {
|
|
|
674
666
|
route: t("analytics.admin.dimensions.route"),
|
|
675
667
|
landing: t("analytics.admin.dimensions.landing")
|
|
676
668
|
};
|
|
677
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
678
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
679
|
-
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
669
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.Tabs, { defaultValue: ANALYTICS_DIMENSIONS[0], children: [
|
|
670
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.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, _chunkLQ4DK4JFjs.TabsTrigger, { value: dimension, children: labels[dimension] }, dimension)) }),
|
|
671
|
+
ANALYTICS_DIMENSIONS.map((dimension) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TabsContent, { value: dimension, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreakdownRows, { rows: _nullishCoalesce(breakdowns[dimension], () => ( [])) }) }, dimension))
|
|
680
672
|
] });
|
|
681
673
|
}
|
|
682
674
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsBreakdownTable, "AnalyticsBreakdownTable");
|
|
683
675
|
function BreakdownRows({ rows }) {
|
|
684
676
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
685
|
-
const { decimal } =
|
|
677
|
+
const { decimal } = _chunk3I5AAJXVjs.useUsageFormatters.call(void 0, );
|
|
686
678
|
const sortedRows = _react.useMemo.call(void 0, () => [...rows].sort((a, b) => b.visitors - a.visitors), [rows]);
|
|
687
679
|
if (sortedRows.length === 0) {
|
|
688
680
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
@@ -691,18 +683,18 @@ function BreakdownRows({ rows }) {
|
|
|
691
683
|
// The package's <Table> wraps itself in an `overflow-x-clip` container, which
|
|
692
684
|
// would swallow the overflow before this scroller ever saw it — hence the
|
|
693
685
|
// child override. Wide tables must scroll, never widen the page.
|
|
694
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
695
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
696
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
697
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
698
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
699
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
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, _chunkLQ4DK4JFjs.Table, { children: [
|
|
687
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.TableRow, { children: [
|
|
688
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.key") }),
|
|
689
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.visitors") }),
|
|
690
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.sessions") }),
|
|
691
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.page_views") })
|
|
700
692
|
] }) }),
|
|
701
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
702
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
703
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
704
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
705
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
693
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableBody, { children: sortedRows.map((row) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.TableRow, { "data-testid": `analytics-breakdown-row-${row.id}`, children: [
|
|
694
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-xs", children: row.key === OTHER_KEY ? t("analytics.admin.other") : row.key }),
|
|
695
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.visitors, 0) }),
|
|
696
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.sessions, 0) }),
|
|
697
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) })
|
|
706
698
|
] }, row.id)) })
|
|
707
699
|
] }) })
|
|
708
700
|
);
|
|
@@ -717,48 +709,48 @@ var VISITOR_SUFFIX_LENGTH = 6;
|
|
|
717
709
|
function AnalyticsSessionsTable({ rows, sessionPageUrl, onLoadMore, hasMore }) {
|
|
718
710
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
719
711
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
720
|
-
const generateUrl =
|
|
721
|
-
const { decimal } =
|
|
712
|
+
const generateUrl = _chunkLQ4DK4JFjs.usePageUrlGenerator.call(void 0, );
|
|
713
|
+
const { decimal } = _chunk3I5AAJXVjs.useUsageFormatters.call(void 0, );
|
|
722
714
|
const dateTime = _react.useMemo.call(void 0, () => new Intl.DateTimeFormat(locale, { dateStyle: "short", timeStyle: "short" }), [locale]);
|
|
723
715
|
if (rows.length === 0) {
|
|
724
716
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") });
|
|
725
717
|
}
|
|
726
718
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
727
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
728
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
729
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
730
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
731
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
732
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
733
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
734
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
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, _chunkLQ4DK4JFjs.Table, { children: [
|
|
720
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.TableRow, { children: [
|
|
721
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.started") }),
|
|
722
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.visitor") }),
|
|
723
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.source") }),
|
|
724
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.landing") }),
|
|
725
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.pages") }),
|
|
726
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.device") })
|
|
735
727
|
] }) }),
|
|
736
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableBody, { children: rows.map((row) => {
|
|
737
729
|
const source = [_nullishCoalesce(row.utmSource, () => ( row.referrerHost)), row.utmMedium].filter(Boolean).join(" / ");
|
|
738
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
739
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
740
|
-
|
|
730
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.TableRow, { "data-testid": `analytics-session-row-${row.id}`, children: [
|
|
731
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-xs tabular-nums", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
732
|
+
_chunkLQ4DK4JFjs.Link,
|
|
741
733
|
{
|
|
742
734
|
href: generateUrl({ page: sessionPageUrl, id: row.id }),
|
|
743
735
|
"data-testid": `analytics-session-link-${row.id}`,
|
|
744
736
|
children: dateTime.format(row.startedAt)
|
|
745
737
|
}
|
|
746
738
|
) }),
|
|
747
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
739
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-xs", children: row.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
748
740
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: row.user.name }),
|
|
749
741
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: row.user.email })
|
|
750
742
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
|
|
751
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
743
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
752
744
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs tabular-nums", children: row.visitorId.slice(-VISITOR_SUFFIX_LENGTH) })
|
|
753
745
|
] }) }),
|
|
754
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
755
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
756
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
757
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
746
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-xs", children: source }),
|
|
747
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-xs", children: row.landingRoute }),
|
|
748
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-end text-xs tabular-nums", children: decimal(row.pageViews, 0) }),
|
|
749
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-muted-foreground text-xs", children: row.deviceType })
|
|
758
750
|
] }, row.id);
|
|
759
751
|
}) })
|
|
760
752
|
] }) }),
|
|
761
|
-
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, _chunkLQ4DK4JFjs.Button, { type: "button", variant: "outline", size: "sm", onClick: onLoadMore, children: t("analytics.admin.load_more") }) })
|
|
762
754
|
] });
|
|
763
755
|
}
|
|
764
756
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsSessionsTable, "AnalyticsSessionsTable");
|
|
@@ -790,7 +782,7 @@ var inferGranularity = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (buc
|
|
|
790
782
|
}, "inferGranularity");
|
|
791
783
|
function AnalyticsTimelineChart({ rows, className }) {
|
|
792
784
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
793
|
-
const { compact, bucketDate, decimal } =
|
|
785
|
+
const { compact, bucketDate, decimal } = _chunk3I5AAJXVjs.useUsageFormatters.call(void 0, );
|
|
794
786
|
const { resolvedTheme } = _nextthemes.useTheme.call(void 0, );
|
|
795
787
|
const mode = resolvedTheme === "dark" ? "dark" : "light";
|
|
796
788
|
const chartData = _react.useMemo.call(void 0, () => {
|
|
@@ -825,7 +817,7 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
825
817
|
// rtl-ok: deliberate LTR island (chart)
|
|
826
818
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className, dir: "ltr", children: [
|
|
827
819
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", "data-testid": "analytics-timeline-data", children: JSON.stringify(chartData) }),
|
|
828
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
820
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.ChartContainer, { config: chartConfig, className: "aspect-auto h-72 w-full", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _recharts.BarChart, { accessibilityLayer: true, data: chartData, margin: { top: 8, right: 8, bottom: 0, left: 0 }, children: [
|
|
829
821
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _recharts.CartesianGrid, { vertical: false }),
|
|
830
822
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
831
823
|
_recharts.XAxis,
|
|
@@ -849,10 +841,10 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
849
841
|
}
|
|
850
842
|
),
|
|
851
843
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
852
|
-
|
|
844
|
+
_chunkLQ4DK4JFjs.ChartTooltip,
|
|
853
845
|
{
|
|
854
846
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
855
|
-
|
|
847
|
+
_chunkLQ4DK4JFjs.ChartTooltipContent,
|
|
856
848
|
{
|
|
857
849
|
labelFormatter: (value) => bucketDate(String(value), granularity),
|
|
858
850
|
valueFormatter: (value) => decimal(Number(value), 0)
|
|
@@ -860,13 +852,13 @@ function AnalyticsTimelineChart({ rows, className }) {
|
|
|
860
852
|
)
|
|
861
853
|
}
|
|
862
854
|
),
|
|
863
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
855
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.ChartLegend, { content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.ChartLegendContent, {}) }),
|
|
864
856
|
SERIES.map((series, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
865
857
|
_recharts.Bar,
|
|
866
858
|
{
|
|
867
859
|
dataKey: series,
|
|
868
860
|
maxBarSize: 28,
|
|
869
|
-
fill:
|
|
861
|
+
fill: _chunk3I5AAJXVjs.seriesColor.call(void 0, index, mode),
|
|
870
862
|
stroke: "var(--background)",
|
|
871
863
|
strokeWidth: 2,
|
|
872
864
|
radius: [4, 4, 0, 0]
|
|
@@ -895,25 +887,25 @@ function AnalyticsAdminContainer() {
|
|
|
895
887
|
error
|
|
896
888
|
} = useAnalyticsAdmin();
|
|
897
889
|
if (error) {
|
|
898
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
890
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.RoundPageContainer, { module: _chunkHKZAESS6js.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
899
891
|
}
|
|
900
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
901
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
892
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.RoundPageContainer, { module: _chunkHKZAESS6js.Modules.AnalyticsSummary, fullWidth: true, forceHeader: true });
|
|
893
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.RoundPageContainer, { module: _chunkHKZAESS6js.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: [
|
|
902
894
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2", children: [
|
|
903
895
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminTiles, { summary }),
|
|
904
896
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: t("analytics.admin.tiles.summarised_note") })
|
|
905
897
|
] }),
|
|
906
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
907
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
908
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
898
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.Card, { children: [
|
|
899
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardTitle, { children: t("analytics.admin.panels.over_time") }) }),
|
|
900
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsTimelineChart, { rows: timeline }) })
|
|
909
901
|
] }),
|
|
910
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
911
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
912
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
902
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.Card, { children: [
|
|
903
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardTitle, { children: t("analytics.admin.panels.breakdown") }) }),
|
|
904
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsBreakdownTable, { breakdowns }) })
|
|
913
905
|
] }),
|
|
914
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
915
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
916
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
906
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.Card, { children: [
|
|
907
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardTitle, { children: t("analytics.admin.panels.sessions") }) }),
|
|
908
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
917
909
|
AnalyticsSessionsTable,
|
|
918
910
|
{
|
|
919
911
|
rows: sessions,
|
|
@@ -931,12 +923,12 @@ _chunk7QVYU63Ejs.__name.call(void 0, AnalyticsAdminContainer, "AnalyticsAdminCon
|
|
|
931
923
|
|
|
932
924
|
|
|
933
925
|
|
|
934
|
-
var
|
|
926
|
+
var ANALYTICS_ADMIN_PAGE_URL = "/administration/analytics";
|
|
935
927
|
var OTHER_SESSIONS_WINDOW_DAYS = 395;
|
|
936
|
-
function AnalyticsJourneyContainer({ sessionId, pageUrl =
|
|
928
|
+
function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_URL }) {
|
|
937
929
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
938
930
|
const locale = _nextintl.useLocale.call(void 0, );
|
|
939
|
-
const generateUrl =
|
|
931
|
+
const generateUrl = _chunkLQ4DK4JFjs.usePageUrlGenerator.call(void 0, );
|
|
940
932
|
const [session, setSession] = _react.useState.call(void 0, void 0);
|
|
941
933
|
const [pageViews, setPageViews] = _react.useState.call(void 0, []);
|
|
942
934
|
const [otherSessions, setOtherSessions] = _react.useState.call(void 0, []);
|
|
@@ -992,26 +984,26 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
992
984
|
const title = { type: t("analytics.admin.panels.journey") };
|
|
993
985
|
const renderBody = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
994
986
|
if (error) {
|
|
995
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
987
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.RoundPageContainer, { module: _chunkHKZAESS6js.Modules.AnalyticsSession, fullWidth: true, forceHeader: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) }) }) }) });
|
|
996
988
|
}
|
|
997
|
-
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
989
|
+
if (isLoading || !session) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.RoundPageContainer, { module: _chunkHKZAESS6js.Modules.AnalyticsSession, fullWidth: true, forceHeader: true });
|
|
998
990
|
const source = [_nullishCoalesce(session.utmSource, () => ( session.referrerHost)), session.utmMedium, session.utmCampaign].filter(Boolean).join(" / ");
|
|
999
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1000
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
991
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.RoundPageContainer, { module: _chunkHKZAESS6js.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, _chunkLQ4DK4JFjs.Card, { "data-testid": "analytics-journey-attribution", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.CardContent, { className: "flex flex-col gap-3", children: [
|
|
1001
993
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1002
994
|
session.user ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col", children: [
|
|
1003
995
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: session.user.name }),
|
|
1004
996
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: session.user.email })
|
|
1005
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1006
|
-
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
997
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.Badge, { variant: "softGray", children: t("analytics.admin.anonymous") }),
|
|
998
|
+
session.consented ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.Badge, { variant: "softGreen", children: t("analytics.admin.consented") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.Badge, { variant: "softGray", children: t("analytics.admin.not_consented") })
|
|
1007
999
|
] }),
|
|
1008
1000
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-3 sm:grid-cols-3", children: [
|
|
1009
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1010
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1011
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1012
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1001
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.DetailField, { label: t("analytics.admin.columns.started"), value: dateTime.format(session.startedAt) }),
|
|
1002
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.DetailField, { label: t("analytics.admin.columns.source"), value: source }),
|
|
1003
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.DetailField, { label: t("analytics.admin.columns.landing"), value: session.landingRoute }),
|
|
1004
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.DetailField, { label: t("analytics.admin.columns.device"), value: session.deviceType }),
|
|
1013
1005
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1014
|
-
|
|
1006
|
+
_chunkLQ4DK4JFjs.DetailField,
|
|
1015
1007
|
{
|
|
1016
1008
|
label: t("analytics.admin.columns.visitor"),
|
|
1017
1009
|
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: session.visitorId })
|
|
@@ -1019,31 +1011,31 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1019
1011
|
)
|
|
1020
1012
|
] })
|
|
1021
1013
|
] }) }),
|
|
1022
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1023
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1024
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1014
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.Card, { children: [
|
|
1015
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardTitle, { children: t("analytics.admin.columns.pages") }) }),
|
|
1016
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardContent, { children: pageViews.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("analytics.admin.no_data") }) : (
|
|
1025
1017
|
// The package's <Table> wraps itself in an `overflow-x-clip`
|
|
1026
1018
|
// container — hence the child override, so wide rows scroll.
|
|
1027
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto [&_[data-slot=table-container]]:overflow-x-visible", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1028
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1029
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1030
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1031
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
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, _chunkLQ4DK4JFjs.Table, { children: [
|
|
1020
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.TableRow, { children: [
|
|
1021
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.time") }),
|
|
1022
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-end text-xs font-medium", children: t("analytics.admin.columns.gap") }),
|
|
1023
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableHead, { className: "text-xs font-medium", children: t("analytics.admin.columns.path") })
|
|
1032
1024
|
] }) }),
|
|
1033
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1025
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableBody, { children: pageViews.map((pageView, index) => {
|
|
1034
1026
|
const previous = index > 0 ? pageViews[index - 1] : void 0;
|
|
1035
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1036
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1037
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1038
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1027
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.TableRow, { "data-testid": `analytics-pageview-row-${pageView.id}`, children: [
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.TableCell, { className: "text-xs tabular-nums", children: dateTime.format(pageView.createdAt) }),
|
|
1029
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.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, _chunkLQ4DK4JFjs.TableCell, { className: "text-xs", children: pageView.path })
|
|
1039
1031
|
] }, pageView.id);
|
|
1040
1032
|
}) })
|
|
1041
1033
|
] }) })
|
|
1042
1034
|
) })
|
|
1043
1035
|
] }),
|
|
1044
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1045
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1046
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1036
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkLQ4DK4JFjs.Card, { children: [
|
|
1037
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardTitle, { children: t("analytics.admin.panels.other_sessions") }) }),
|
|
1038
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1047
1039
|
AnalyticsSessionsTable,
|
|
1048
1040
|
{
|
|
1049
1041
|
rows: otherSessions,
|
|
@@ -1055,7 +1047,7 @@ function AnalyticsJourneyContainer({ sessionId, pageUrl = ANALYTICS_ADMIN_PAGE_U
|
|
|
1055
1047
|
] })
|
|
1056
1048
|
] }) });
|
|
1057
1049
|
}, "renderBody");
|
|
1058
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1050
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLQ4DK4JFjs.SharedProvider, { value: { breadcrumbs: breadcrumb, title }, children: renderBody() });
|
|
1059
1051
|
}
|
|
1060
1052
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsJourneyContainer, "AnalyticsJourneyContainer");
|
|
1061
1053
|
function unit(locale, name, value) {
|
|
@@ -1065,8 +1057,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, unit, "unit");
|
|
|
1065
1057
|
|
|
1066
1058
|
// src/features/analytics/components/AnalyticsAdminPageContainer.tsx
|
|
1067
1059
|
|
|
1068
|
-
function AnalyticsAdminPageContainer({
|
|
1069
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminProvider, {
|
|
1060
|
+
function AnalyticsAdminPageContainer({ sessionPageUrl }) {
|
|
1061
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminProvider, { sessionPageUrl, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AnalyticsAdminContainer, {}) });
|
|
1070
1062
|
}
|
|
1071
1063
|
_chunk7QVYU63Ejs.__name.call(void 0, AnalyticsAdminPageContainer, "AnalyticsAdminPageContainer");
|
|
1072
1064
|
|
|
@@ -1163,5 +1155,5 @@ var ANALYTICS_ADMIN_I18N_KEYS = [
|
|
|
1163
1155
|
|
|
1164
1156
|
|
|
1165
1157
|
|
|
1166
|
-
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 = _chunkHKZAESS6js.AnalyticsBreakdown; exports.AnalyticsBreakdownTable = AnalyticsBreakdownTable; exports.AnalyticsEvent = _chunkHKZAESS6js.AnalyticsEvent; exports.AnalyticsJourneyContainer = AnalyticsJourneyContainer; exports.AnalyticsJourneyPageContainer = AnalyticsJourneyPageContainer; exports.AnalyticsPageView = _chunkHKZAESS6js.AnalyticsPageView; exports.AnalyticsService = AnalyticsService; exports.AnalyticsSession = _chunkHKZAESS6js.AnalyticsSession; exports.AnalyticsSessionsTable = AnalyticsSessionsTable; exports.AnalyticsSummary = _chunkHKZAESS6js.AnalyticsSummary; exports.AnalyticsTimeline = _chunkHKZAESS6js.AnalyticsTimeline; exports.AnalyticsTimelineChart = AnalyticsTimelineChart; exports.AnalyticsTracker = AnalyticsTracker; exports.analyticsModules = _chunkHKZAESS6js.analyticsModules; exports.useAnalyticsAdmin = useAnalyticsAdmin;
|
|
1167
1159
|
//# sourceMappingURL=index.js.map
|