@oneclick.dev/cms-core-modules 0.0.101 → 0.0.102
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/Acquisition-Br1Pfny3.js +1 -0
- package/dist/{Acquisition-BJXNY4ko.mjs → Acquisition-CPlZzUBo.mjs} +40 -40
- package/dist/Audience-BfkrmBuQ.js +1 -0
- package/dist/{Audience-CIzVtUvV.mjs → Audience-DTblSAiL.mjs} +89 -89
- package/dist/Content-BHr_rPVY.js +1 -0
- package/dist/{Content-CWhjurn_.mjs → Content-CYOZKvWK.mjs} +56 -56
- package/dist/Overview-BrCwozey.js +1 -0
- package/dist/{Overview-CGo4jaaA.mjs → Overview-kaMhsIUq.mjs} +21 -21
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CL5kbDII.mjs +2782 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-DcyyNvf6.js +349 -0
- package/dist/SeoHealth-09sEOu3G.js +1 -0
- package/dist/{SeoHealth-DVFDz3em.mjs → SeoHealth-BzcWd_w7.mjs} +29 -29
- package/dist/{agenda-DMT75Qfo.mjs → agenda-CCOjPiwP.mjs} +1 -1
- package/dist/{agenda-DxD4RMsy.js → agenda-CNPQfaIQ.js} +1 -1
- package/dist/cms-core-modules.css +1 -1
- package/dist/{index-BbqRTXuU.js → index-BOnqrBfY.js} +1 -1
- package/dist/{index-D4GsbUId.mjs → index-Bj0qaL1N.mjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +8 -8
- package/dist/{orders-BRfXlWgV.mjs → orders-BJV5vRQr.mjs} +1 -1
- package/dist/{orders-CrCz1WTR.js → orders-C1C5IEIP.js} +1 -1
- package/package.json +2 -2
- package/dist/Acquisition-DPScJD4t.js +0 -1
- package/dist/Audience-Csw1QLmw.js +0 -1
- package/dist/Content-dYr7kYT0.js +0 -1
- package/dist/Overview-DBu86Ikb.js +0 -1
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-COfCOMsz.js +0 -349
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CYXkhhdp.mjs +0 -2383
- package/dist/SeoHealth-DzftZW1m.js +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as oe, ref as
|
|
1
|
+
import { defineComponent as oe, ref as m, computed as C, watch as q, onMounted as re, resolveComponent as $, openBlock as o, createElementBlock as r, createElementVNode as e, Fragment as f, renderList as g, normalizeClass as E, toDisplayString as u, createVNode as l, withCtx as n, unref as x, createCommentVNode as R, createBlock as W, createTextVNode as b, normalizeStyle as M, resolveDynamicComponent as K } from "vue";
|
|
2
2
|
import { useModule as ue, useModuleRoute as de, useModuleBreadcrumbs as ie } from "@oneclick.dev/cms-kit";
|
|
3
3
|
import "./index-CMk3uhUt.mjs";
|
|
4
|
-
import { RefreshCw as ce, Loader2 as
|
|
4
|
+
import { RefreshCw as ce, Loader2 as fe, UserPlus as me, UserCheck as ge, Clock as xe, Chrome as ve, Cpu as _e, Monitor as pe, Languages as be, MapPin as he } from "lucide-vue-next";
|
|
5
5
|
import { b as ye, E as ke } from "./index-DjDCYQ_6.mjs";
|
|
6
6
|
import { _ as we } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
7
|
-
const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e = { class: "flex items-center
|
|
7
|
+
const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e = { class: "flex justify-between gap-4 flex-col @lg:flex-row @lg:items-center" }, Re = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "flex items-center gap-2"
|
|
10
10
|
}, De = { class: "flex items-center border rounded-lg overflow-hidden" }, Ue = ["onClick"], ze = { class: "text-sm text-destructive font-medium" }, Me = {
|
|
11
11
|
key: 2,
|
|
12
12
|
class: "flex items-center justify-center py-20"
|
|
13
|
-
}, Se = { class: "grid @lg:grid-cols-3 gap-6" }, Ae = { class: "relative" }, Ne = { class: "absolute inset-0 flex items-center justify-center pointer-events-none" }, Ve = { class: "text-center" }, Te = { class: "text-xl font-bold tabular-nums" }, Be = { class: "mt-4 flex items-center gap-6" }, Fe = { class: "flex items-center gap-2" }, Pe = { class: "text-sm font-semibold tabular-nums" }, Le = {
|
|
13
|
+
}, Se = { class: "flex flex-col @lg:grid @lg:grid-cols-3 gap-6" }, Ae = { class: "relative" }, Ne = { class: "absolute inset-0 flex items-center justify-center pointer-events-none" }, Ve = { class: "text-center" }, Te = { class: "text-xl font-bold tabular-nums" }, Be = { class: "mt-4 flex items-center gap-6" }, Fe = { class: "flex items-center gap-2" }, Pe = { class: "text-sm font-semibold tabular-nums" }, Le = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "text-xs text-muted-foreground"
|
|
16
16
|
}, Oe = { class: "flex items-center gap-2" }, Ee = { class: "text-sm font-semibold tabular-nums" }, We = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "text-xs text-muted-foreground"
|
|
19
|
-
}, je = { class: "overflow-x-auto" }, Ie = { class: "w-full text-sm" }, He = { class: "divide-y" }, qe = { class: "px-4 py-3" }, Ke = { class: "flex items-center gap-2" }, Ge = { class: "font-medium capitalize" }, Je = { class: "px-4 py-3 text-right tabular-nums" }, Qe = { class: "px-4 py-3 text-right tabular-nums" }, Xe = { class: "px-4 py-3 text-right tabular-nums" }, Ye = { class: "px-4 py-3 text-right tabular-nums" }, Ze = { class: "px-4 py-3 text-right tabular-nums" }, et = { class: "overflow-x-auto" }, tt = { class: "min-w-[600px]" }, st = { class: "flex items-center mb-1.5" },
|
|
19
|
+
}, je = { class: "overflow-x-auto" }, Ie = { class: "w-full text-sm" }, He = { class: "divide-y" }, qe = { class: "px-4 py-3" }, Ke = { class: "flex items-center gap-2" }, Ge = { class: "font-medium capitalize" }, Je = { class: "px-4 py-3 text-right tabular-nums" }, Qe = { class: "px-4 py-3 text-right tabular-nums" }, Xe = { class: "px-4 py-3 text-right tabular-nums" }, Ye = { class: "px-4 py-3 text-right tabular-nums" }, Ze = { class: "px-4 py-3 text-right tabular-nums" }, et = { class: "overflow-x-auto" }, tt = { class: "min-w-[600px]" }, st = { class: "flex items-center mb-1.5" }, lt = { class: "flex-1 grid grid-cols-24 gap-0.5" }, nt = { class: "w-10 shrink-0 text-xs text-muted-foreground" }, at = { class: "flex-1 grid grid-cols-24 gap-0.5" }, ot = ["title"], rt = { class: "grid @lg:grid-cols-3 gap-6" }, ut = { class: "flex items-center justify-between" }, dt = { class: "flex items-center gap-1" }, it = ["onClick", "title"], ct = { class: "space-y-3" }, ft = { class: "text-sm flex-1 truncate" }, mt = { class: "flex-1 h-2 bg-muted rounded-full overflow-hidden" }, gt = { class: "text-xs tabular-nums text-muted-foreground w-12 text-right" }, xt = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "py-4 text-center text-muted-foreground text-sm"
|
|
22
22
|
}, vt = { class: "space-y-3" }, _t = { class: "text-sm flex-1 truncate" }, pt = { class: "flex-1 h-2 bg-muted rounded-full overflow-hidden" }, bt = { class: "text-xs tabular-nums text-muted-foreground w-12 text-right" }, ht = {
|
|
@@ -30,7 +30,7 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
30
30
|
setup(zt) {
|
|
31
31
|
const { config: I } = ue(), { moduleId: G } = de();
|
|
32
32
|
ie(() => [{ label: "Audience" }]);
|
|
33
|
-
const h =
|
|
33
|
+
const h = m(!0), S = m(null), D = m("30"), p = m("browser"), A = m([]), U = m([]), N = m([]), H = m([]), V = m([]), T = C(() => !!(I.serviceAccount && I.propertyId));
|
|
34
34
|
function y(a) {
|
|
35
35
|
return `/api/v1/modules/${G}${a}`;
|
|
36
36
|
}
|
|
@@ -69,7 +69,7 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
69
69
|
const d = a / t;
|
|
70
70
|
return d > 0.75 ? "bg-blue-600 dark:bg-blue-500" : d > 0.5 ? "bg-blue-500 dark:bg-blue-400" : d > 0.25 ? "bg-blue-400/70 dark:bg-blue-400/60" : "bg-blue-300/50 dark:bg-blue-300/30";
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const le = [
|
|
73
73
|
{ key: "browser", label: "Browser", icon: ve },
|
|
74
74
|
{ key: "operatingSystem", label: "OS", icon: _e },
|
|
75
75
|
{ key: "screenResolution", label: "Screen", icon: pe }
|
|
@@ -93,7 +93,7 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
93
93
|
h.value = !1;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
async function
|
|
96
|
+
async function ne() {
|
|
97
97
|
const a = `${D.value}daysAgo`;
|
|
98
98
|
try {
|
|
99
99
|
const t = await $fetch(y(`/audience/technology?startDate=${a}&endDate=today&dimension=${p.value}`));
|
|
@@ -101,7 +101,7 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
101
101
|
} catch {
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
return q(D, () => P()), q(p, () =>
|
|
104
|
+
return q(D, () => P()), q(p, () => ne()), re(() => {
|
|
105
105
|
T.value ? P() : h.value = !1;
|
|
106
106
|
}), (a, t) => {
|
|
107
107
|
const d = $("Button"), i = $("Card"), c = $("CardTitle"), _ = $("CardHeader"), ae = $("ChartContainer"), w = $("CardContent");
|
|
@@ -113,20 +113,20 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
113
113
|
], -1)),
|
|
114
114
|
T.value ? (o(), r("div", Re, [
|
|
115
115
|
e("div", De, [
|
|
116
|
-
(o(), r(
|
|
116
|
+
(o(), r(f, null, g(J, (s) => e("button", {
|
|
117
117
|
key: s.value,
|
|
118
118
|
class: E(["px-3 py-1.5 text-xs font-medium transition-colors", D.value === s.value ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted"]),
|
|
119
119
|
onClick: (L) => D.value = s.value
|
|
120
120
|
}, u(s.label), 11, Ue)), 64))
|
|
121
121
|
]),
|
|
122
|
-
|
|
122
|
+
l(d, {
|
|
123
123
|
variant: "outline",
|
|
124
124
|
size: "icon",
|
|
125
125
|
onClick: P,
|
|
126
126
|
disabled: h.value
|
|
127
127
|
}, {
|
|
128
|
-
default:
|
|
129
|
-
|
|
128
|
+
default: n(() => [
|
|
129
|
+
l(x(ce), {
|
|
130
130
|
class: E(["size-4", { "animate-spin": h.value }])
|
|
131
131
|
}, null, 8, ["class"])
|
|
132
132
|
]),
|
|
@@ -138,15 +138,15 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
138
138
|
key: 1,
|
|
139
139
|
class: "p-6 border-destructive/50 bg-destructive/5"
|
|
140
140
|
}, {
|
|
141
|
-
default:
|
|
141
|
+
default: n(() => [
|
|
142
142
|
e("p", ze, u(S.value), 1),
|
|
143
|
-
|
|
143
|
+
l(d, {
|
|
144
144
|
variant: "outline",
|
|
145
145
|
size: "sm",
|
|
146
146
|
class: "mt-3",
|
|
147
147
|
onClick: P
|
|
148
148
|
}, {
|
|
149
|
-
default:
|
|
149
|
+
default: n(() => [...t[2] || (t[2] = [
|
|
150
150
|
b("Retry", -1)
|
|
151
151
|
])]),
|
|
152
152
|
_: 1
|
|
@@ -154,15 +154,15 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
154
154
|
]),
|
|
155
155
|
_: 1
|
|
156
156
|
})) : h.value ? (o(), r("div", Me, [
|
|
157
|
-
|
|
158
|
-
])) : (o(), r(
|
|
157
|
+
l(x(fe), { class: "size-8 animate-spin text-muted-foreground" })
|
|
158
|
+
])) : (o(), r(f, { key: 3 }, [
|
|
159
159
|
e("div", Se, [
|
|
160
|
-
|
|
161
|
-
default:
|
|
162
|
-
|
|
163
|
-
default:
|
|
164
|
-
|
|
165
|
-
default:
|
|
160
|
+
l(i, null, {
|
|
161
|
+
default: n(() => [
|
|
162
|
+
l(_, { class: "pb-2" }, {
|
|
163
|
+
default: n(() => [
|
|
164
|
+
l(c, { class: "text-base" }, {
|
|
165
|
+
default: n(() => [...t[3] || (t[3] = [
|
|
166
166
|
b("New vs Returning", -1)
|
|
167
167
|
])]),
|
|
168
168
|
_: 1
|
|
@@ -170,20 +170,20 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
170
170
|
]),
|
|
171
171
|
_: 1
|
|
172
172
|
}),
|
|
173
|
-
|
|
174
|
-
default:
|
|
173
|
+
l(w, { class: "flex flex-col items-center" }, {
|
|
174
|
+
default: n(() => [
|
|
175
175
|
e("div", Ae, [
|
|
176
|
-
|
|
176
|
+
l(ae, {
|
|
177
177
|
config: Y,
|
|
178
178
|
class: "mx-auto aspect-square max-h-[200px]"
|
|
179
179
|
}, {
|
|
180
|
-
default:
|
|
181
|
-
|
|
180
|
+
default: n(() => [
|
|
181
|
+
l(x(ye), {
|
|
182
182
|
data: Z.value,
|
|
183
183
|
margin: { top: 16, bottom: 16, left: 16, right: 16 }
|
|
184
184
|
}, {
|
|
185
|
-
default:
|
|
186
|
-
|
|
185
|
+
default: n(() => [
|
|
186
|
+
l(x(ke), {
|
|
187
187
|
value: (s) => s.value,
|
|
188
188
|
color: (s) => s.fill,
|
|
189
189
|
arcWidth: 35,
|
|
@@ -229,12 +229,12 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
229
229
|
]),
|
|
230
230
|
_: 1
|
|
231
231
|
}),
|
|
232
|
-
|
|
233
|
-
default:
|
|
234
|
-
|
|
235
|
-
default:
|
|
236
|
-
|
|
237
|
-
default:
|
|
232
|
+
l(i, { class: "@lg:col-span-2" }, {
|
|
233
|
+
default: n(() => [
|
|
234
|
+
l(_, { class: "pb-2" }, {
|
|
235
|
+
default: n(() => [
|
|
236
|
+
l(c, { class: "text-base" }, {
|
|
237
|
+
default: n(() => [...t[7] || (t[7] = [
|
|
238
238
|
b("Engagement by Visitor Type", -1)
|
|
239
239
|
])]),
|
|
240
240
|
_: 1
|
|
@@ -242,8 +242,8 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
242
242
|
]),
|
|
243
243
|
_: 1
|
|
244
244
|
}),
|
|
245
|
-
|
|
246
|
-
default:
|
|
245
|
+
l(w, null, {
|
|
246
|
+
default: n(() => [
|
|
247
247
|
e("div", je, [
|
|
248
248
|
e("table", Ie, [
|
|
249
249
|
t[8] || (t[8] = e("thead", null, [
|
|
@@ -257,13 +257,13 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
257
257
|
])
|
|
258
258
|
], -1)),
|
|
259
259
|
e("tbody", He, [
|
|
260
|
-
(o(!0), r(
|
|
260
|
+
(o(!0), r(f, null, g(A.value, (s) => (o(), r("tr", {
|
|
261
261
|
key: s.newVsReturning,
|
|
262
262
|
class: "hover:bg-muted/50"
|
|
263
263
|
}, [
|
|
264
264
|
e("td", qe, [
|
|
265
265
|
e("div", Ke, [
|
|
266
|
-
(o(), W(K(s.newVsReturning === "new" ? x(
|
|
266
|
+
(o(), W(K(s.newVsReturning === "new" ? x(me) : x(ge)), { class: "size-4 text-muted-foreground" })),
|
|
267
267
|
e("span", Ge, u(s.newVsReturning), 1)
|
|
268
268
|
])
|
|
269
269
|
]),
|
|
@@ -283,13 +283,13 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
283
283
|
_: 1
|
|
284
284
|
})
|
|
285
285
|
]),
|
|
286
|
-
|
|
287
|
-
default:
|
|
288
|
-
|
|
289
|
-
default:
|
|
290
|
-
|
|
291
|
-
default:
|
|
292
|
-
|
|
286
|
+
l(i, null, {
|
|
287
|
+
default: n(() => [
|
|
288
|
+
l(_, { class: "pb-2" }, {
|
|
289
|
+
default: n(() => [
|
|
290
|
+
l(c, { class: "text-base flex items-center gap-2" }, {
|
|
291
|
+
default: n(() => [
|
|
292
|
+
l(x(xe), { class: "size-4" }),
|
|
293
293
|
t[9] || (t[9] = b(" Peak Hours ", -1))
|
|
294
294
|
]),
|
|
295
295
|
_: 1
|
|
@@ -298,26 +298,26 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
298
298
|
]),
|
|
299
299
|
_: 1
|
|
300
300
|
}),
|
|
301
|
-
|
|
302
|
-
default:
|
|
301
|
+
l(w, null, {
|
|
302
|
+
default: n(() => [
|
|
303
303
|
e("div", et, [
|
|
304
304
|
e("div", tt, [
|
|
305
305
|
e("div", st, [
|
|
306
306
|
t[11] || (t[11] = e("div", { class: "w-10 shrink-0" }, null, -1)),
|
|
307
|
-
e("div",
|
|
308
|
-
(o(), r(
|
|
307
|
+
e("div", lt, [
|
|
308
|
+
(o(), r(f, null, g(24, (s) => e("div", {
|
|
309
309
|
key: s,
|
|
310
310
|
class: "text-[10px] text-muted-foreground text-center"
|
|
311
311
|
}, u(s - 1), 1)), 64))
|
|
312
312
|
])
|
|
313
313
|
]),
|
|
314
|
-
(o(), r(
|
|
314
|
+
(o(), r(f, null, g(te, (s, L) => e("div", {
|
|
315
315
|
key: s,
|
|
316
316
|
class: "flex items-center mb-0.5"
|
|
317
317
|
}, [
|
|
318
|
-
e("div",
|
|
318
|
+
e("div", nt, u(s), 1),
|
|
319
319
|
e("div", at, [
|
|
320
|
-
(o(), r(
|
|
320
|
+
(o(), r(f, null, g(24, (O) => e("div", {
|
|
321
321
|
key: O,
|
|
322
322
|
class: E(["aspect-square rounded-sm transition-colors", se(j.value.matrix[L]?.[O - 1] || 0, j.value.maxVal)]),
|
|
323
323
|
title: `${s} ${O - 1}:00 — ${j.value.matrix[L]?.[O - 1] || 0} sessions`
|
|
@@ -342,19 +342,19 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
342
342
|
_: 1
|
|
343
343
|
}),
|
|
344
344
|
e("div", rt, [
|
|
345
|
-
|
|
346
|
-
default:
|
|
347
|
-
|
|
348
|
-
default:
|
|
345
|
+
l(i, null, {
|
|
346
|
+
default: n(() => [
|
|
347
|
+
l(_, { class: "pb-2" }, {
|
|
348
|
+
default: n(() => [
|
|
349
349
|
e("div", ut, [
|
|
350
|
-
|
|
351
|
-
default:
|
|
350
|
+
l(c, { class: "text-base" }, {
|
|
351
|
+
default: n(() => [...t[13] || (t[13] = [
|
|
352
352
|
b("Technology", -1)
|
|
353
353
|
])]),
|
|
354
354
|
_: 1
|
|
355
355
|
}),
|
|
356
356
|
e("div", dt, [
|
|
357
|
-
(o(), r(
|
|
357
|
+
(o(), r(f, null, g(le, (s) => e("button", {
|
|
358
358
|
key: s.key,
|
|
359
359
|
class: E(["p-1.5 rounded-md transition-colors", p.value === s.key ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"]),
|
|
360
360
|
onClick: (L) => p.value = s.key,
|
|
@@ -367,15 +367,15 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
367
367
|
]),
|
|
368
368
|
_: 1
|
|
369
369
|
}),
|
|
370
|
-
|
|
371
|
-
default:
|
|
370
|
+
l(w, null, {
|
|
371
|
+
default: n(() => [
|
|
372
372
|
e("div", ct, [
|
|
373
|
-
(o(!0), r(
|
|
373
|
+
(o(!0), r(f, null, g(U.value, (s) => (o(), r("div", {
|
|
374
374
|
key: s[p.value],
|
|
375
375
|
class: "flex items-center gap-3"
|
|
376
376
|
}, [
|
|
377
|
-
e("span",
|
|
378
|
-
e("div",
|
|
377
|
+
e("span", ft, u(s[p.value] || "(not set)"), 1),
|
|
378
|
+
e("div", mt, [
|
|
379
379
|
e("div", {
|
|
380
380
|
class: "h-full bg-primary rounded-full transition-all",
|
|
381
381
|
style: M({ width: `${s.totalUsers / (U.value[0]?.totalUsers || 1) * 100}%` })
|
|
@@ -391,13 +391,13 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
391
391
|
]),
|
|
392
392
|
_: 1
|
|
393
393
|
}),
|
|
394
|
-
|
|
395
|
-
default:
|
|
396
|
-
|
|
397
|
-
default:
|
|
398
|
-
|
|
399
|
-
default:
|
|
400
|
-
|
|
394
|
+
l(i, null, {
|
|
395
|
+
default: n(() => [
|
|
396
|
+
l(_, { class: "pb-2" }, {
|
|
397
|
+
default: n(() => [
|
|
398
|
+
l(c, { class: "text-base flex items-center gap-2" }, {
|
|
399
|
+
default: n(() => [
|
|
400
|
+
l(x(be), { class: "size-4" }),
|
|
401
401
|
t[14] || (t[14] = b(" Languages ", -1))
|
|
402
402
|
]),
|
|
403
403
|
_: 1
|
|
@@ -405,10 +405,10 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
405
405
|
]),
|
|
406
406
|
_: 1
|
|
407
407
|
}),
|
|
408
|
-
|
|
409
|
-
default:
|
|
408
|
+
l(w, null, {
|
|
409
|
+
default: n(() => [
|
|
410
410
|
e("div", vt, [
|
|
411
|
-
(o(!0), r(
|
|
411
|
+
(o(!0), r(f, null, g(N.value, (s) => (o(), r("div", {
|
|
412
412
|
key: s.language,
|
|
413
413
|
class: "flex items-center gap-3"
|
|
414
414
|
}, [
|
|
@@ -429,13 +429,13 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
429
429
|
]),
|
|
430
430
|
_: 1
|
|
431
431
|
}),
|
|
432
|
-
|
|
433
|
-
default:
|
|
434
|
-
|
|
435
|
-
default:
|
|
436
|
-
|
|
437
|
-
default:
|
|
438
|
-
|
|
432
|
+
l(i, null, {
|
|
433
|
+
default: n(() => [
|
|
434
|
+
l(_, { class: "pb-2" }, {
|
|
435
|
+
default: n(() => [
|
|
436
|
+
l(c, { class: "text-base flex items-center gap-2" }, {
|
|
437
|
+
default: n(() => [
|
|
438
|
+
l(x(he), { class: "size-4" }),
|
|
439
439
|
t[15] || (t[15] = b(" Top Cities ", -1))
|
|
440
440
|
]),
|
|
441
441
|
_: 1
|
|
@@ -443,10 +443,10 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
443
443
|
]),
|
|
444
444
|
_: 1
|
|
445
445
|
}),
|
|
446
|
-
|
|
447
|
-
default:
|
|
446
|
+
l(w, null, {
|
|
447
|
+
default: n(() => [
|
|
448
448
|
e("div", yt, [
|
|
449
|
-
(o(!0), r(
|
|
449
|
+
(o(!0), r(f, null, g(V.value, (s) => (o(), r("div", {
|
|
450
450
|
key: `${s.city}-${s.country}`,
|
|
451
451
|
class: "flex items-center gap-3"
|
|
452
452
|
}, [
|
|
@@ -475,7 +475,7 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
475
475
|
key: 0,
|
|
476
476
|
class: "p-8 text-center"
|
|
477
477
|
}, {
|
|
478
|
-
default:
|
|
478
|
+
default: n(() => [...t[1] || (t[1] = [
|
|
479
479
|
e("p", { class: "text-lg font-medium" }, "Setup required", -1)
|
|
480
480
|
])]),
|
|
481
481
|
_: 1
|
|
@@ -483,7 +483,7 @@ const Ce = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, $e =
|
|
|
483
483
|
]);
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
}), Bt = /* @__PURE__ */ we(Ut, [["__scopeId", "data-v-
|
|
486
|
+
}), Bt = /* @__PURE__ */ we(Ut, [["__scopeId", "data-v-4f3ae270"]]);
|
|
487
487
|
export {
|
|
488
488
|
Bt as default
|
|
489
489
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("@oneclick.dev/cms-kit"),i=require("lucide-vue-next"),$={class:"flex flex-col gap-6 w-full max-w-7xl mx-auto py-8"},z={class:"flex justify-between gap-4 flex-col @lg:flex-row @lg:items-center"},T={key:0,class:"flex items-center gap-2"},L={class:"flex items-center border rounded-lg overflow-hidden"},M=["onClick"],F={class:"text-sm text-destructive font-medium"},j={key:2,class:"flex items-center justify-center py-20"},A={class:"flex items-center justify-between gap-4"},U={class:"flex items-center gap-2"},q=["onClick"],H={key:0,class:"relative"},I={class:"overflow-x-auto"},O={class:"w-full text-sm"},Q={class:"divide-y"},K={class:"px-6 py-3 text-muted-foreground"},W={class:"px-4 py-3 max-w-[300px]"},G={class:"truncate font-mono text-xs"},J={key:0,class:"truncate text-xs text-muted-foreground mt-0.5"},X={class:"px-4 py-3 text-right tabular-nums"},Y={class:"px-4 py-3 text-right tabular-nums"},Z={class:"px-4 py-3 text-right tabular-nums"},ee={class:"px-4 py-3 text-right tabular-nums"},te={class:"px-4 py-3 text-right tabular-nums"},oe={class:"px-4 py-3 text-right"},ne={class:"flex items-center justify-end gap-2"},ae={class:"w-12 h-1.5 bg-muted rounded-full overflow-hidden"},re={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},se={class:"overflow-x-auto"},le={class:"w-full text-sm"},de={class:"divide-y"},ce={class:"px-6 py-3 text-muted-foreground"},ie={class:"px-4 py-3 font-mono text-xs truncate max-w-[300px]"},ue={class:"px-4 py-3 text-right tabular-nums"},me={class:"px-4 py-3 text-right tabular-nums"},xe={class:"px-4 py-3 text-right tabular-nums"},ge={class:"px-4 py-3 text-right tabular-nums"},pe={class:"px-4 py-3 text-right tabular-nums"},fe={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},he={class:"overflow-x-auto"},ye={class:"w-full text-sm"},ve={class:"divide-y"},Ve={class:"px-6 py-3 text-muted-foreground"},Ne={class:"px-4 py-3 font-mono text-xs truncate max-w-[300px]"},_e={class:"px-4 py-3 text-right tabular-nums"},Ee={class:"px-4 py-3 text-right tabular-nums"},ke={class:"px-4 py-3 text-right"},be={class:"flex items-center justify-end gap-2"},Ce={class:"w-16 h-1.5 bg-muted rounded-full overflow-hidden"},we={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},Be=e.defineComponent({__name:"Content",setup(Se){const{config:k}=E.useModule(),{moduleId:S}=E.useModuleRoute();E.useModuleBreadcrumbs(()=>[{label:"Content"}]);const l=e.ref(!0),x=e.ref(null),g=e.ref("30"),d=e.ref("all"),u=e.ref(""),y=e.ref([]),v=e.ref([]),V=e.ref([]),p=e.computed(()=>!!(k.serviceAccount&&k.propertyId));function N(n){return`/api/v1/modules/${S}${n}`}const D=[{label:"7d",value:"7"},{label:"14d",value:"14"},{label:"30d",value:"30"},{label:"90d",value:"90"}];function c(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${(n/1e3).toFixed(1)}K`:Math.round(n).toString()}function m(n){return`${(n*100).toFixed(1)}%`}function b(n){const o=Math.floor(n/60),a=Math.round(n%60);return o>0?`${o}m ${a}s`:`${a}s`}function f(n){const o=n.engagementRate||0,a=Math.min((n.averageSessionDuration||0)/300,1),r=Math.min((n.screenPageViews||0)/1e3,1);return(o*.4+a*.35+r*.25)*100}function P(n){return n>=70?"text-emerald-600 dark:text-emerald-400":n>=40?"text-amber-600 dark:text-amber-400":"text-red-500 dark:text-red-400"}function R(n){return n>=70?"bg-emerald-500":n>=40?"bg-amber-500":"bg-red-500"}const C=e.computed(()=>{if(!u.value)return y.value;const n=u.value.toLowerCase();return y.value.filter(o=>(o.pagePath||"").toLowerCase().includes(n)||(o.pageTitle||"").toLowerCase().includes(n))});async function h(){if(!p.value)return;l.value=!0,x.value=null;const n=`${g.value}daysAgo`;try{const[o,a,r]=await Promise.all([$fetch(N(`/content/all-pages?startDate=${n}&endDate=today&limit=50`)),$fetch(N(`/content/landing-pages?startDate=${n}&endDate=today`)),$fetch(N(`/content/exit-pages?startDate=${n}&endDate=today`))]);y.value=o.rows||[],v.value=a.rows||[],V.value=r.rows||[]}catch(o){x.value=o?.data?.statusMessage||o?.message||"Failed to load content data"}finally{l.value=!1}}return e.watch(g,()=>h()),e.onMounted(()=>{p.value?h():l.value=!1}),(n,o)=>{const a=e.resolveComponent("Button"),r=e.resolveComponent("Card"),_=e.resolveComponent("CardContent"),w=e.resolveComponent("CardTitle"),B=e.resolveComponent("CardHeader");return e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("div",z,[o[1]||(o[1]=e.createElementVNode("div",null,[e.createElementVNode("h1",{class:"text-2xl font-semibold"},"Content Performance"),e.createElementVNode("p",{class:"text-muted-foreground text-sm mt-1"},"How your pages perform")],-1)),p.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("div",L,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(D,t=>e.createElementVNode("button",{key:t.value,class:e.normalizeClass(["px-3 py-1.5 text-xs font-medium transition-colors",g.value===t.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:s=>g.value=t.value},e.toDisplayString(t.label),11,M)),64))]),e.createVNode(a,{variant:"outline",size:"icon",onClick:h,disabled:l.value},{default:e.withCtx(()=>[e.createVNode(e.unref(i.RefreshCw),{class:e.normalizeClass(["size-4",{"animate-spin":l.value}])},null,8,["class"])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0)]),p.value?x.value?(e.openBlock(),e.createBlock(r,{key:1,class:"p-6 border-destructive/50 bg-destructive/5"},{default:e.withCtx(()=>[e.createElementVNode("p",F,e.toDisplayString(x.value),1),e.createVNode(a,{variant:"outline",size:"sm",class:"mt-3",onClick:h},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode("Retry",-1)])]),_:1})]),_:1})):l.value?(e.openBlock(),e.createElementBlock("div",j,[e.createVNode(e.unref(i.Loader2),{class:"size-8 animate-spin text-muted-foreground"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",A,[e.createElementVNode("div",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList([{key:"all",label:"All Pages",icon:e.unref(i.FileText)},{key:"landing",label:"Landing Pages",icon:e.unref(i.LogIn)},{key:"exit",label:"Exit Pages",icon:e.unref(i.LogOut)}],t=>(e.openBlock(),e.createElementBlock("button",{key:t.key,class:e.normalizeClass(["flex items-center gap-1.5 px-3 py-2 text-sm font-medium rounded-md transition-colors",d.value===t.key?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"]),onClick:s=>d.value=t.key},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{class:"size-3.5"})),e.createTextVNode(" "+e.toDisplayString(t.label),1)],10,q))),128))]),d.value==="all"?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(e.unref(i.Search),{class:"absolute left-2.5 top-1/2 -translate-y-1/2 size-3.5 text-muted-foreground"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=t=>u.value=t),type:"text",placeholder:"Filter pages...",class:"pl-8 pr-3 py-1.5 text-sm border rounded-md bg-transparent w-48 focus:outline-none focus:ring-1 focus:ring-ring"},null,512),[[e.vModelText,u.value]])])):e.createCommentVNode("",!0)]),d.value==="all"?(e.openBlock(),e.createBlock(r,{key:0},{default:e.withCtx(()=>[e.createVNode(_,{class:"p-0"},{default:e.withCtx(()=>[e.createElementVNode("div",I,[e.createElementVNode("table",O,[o[4]||(o[4]=e.createElementVNode("thead",null,[e.createElementVNode("tr",{class:"border-b text-left"},[e.createElementVNode("th",{class:"px-6 py-3 font-medium text-muted-foreground w-8"},"#"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground"},"Page"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Views"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Users"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Avg Time"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Bounce"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Engagement"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Score")])],-1)),e.createElementVNode("tbody",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(t,s)=>(e.openBlock(),e.createElementBlock("tr",{key:t.pagePath,class:"hover:bg-muted/50 group"},[e.createElementVNode("td",K,e.toDisplayString(s+1),1),e.createElementVNode("td",W,[e.createElementVNode("div",G,e.toDisplayString(t.pagePath),1),t.pageTitle?(e.openBlock(),e.createElementBlock("div",J,e.toDisplayString(t.pageTitle),1)):e.createCommentVNode("",!0)]),e.createElementVNode("td",X,e.toDisplayString(c(t.screenPageViews)),1),e.createElementVNode("td",Y,e.toDisplayString(c(t.totalUsers)),1),e.createElementVNode("td",Z,e.toDisplayString(b(t.averageSessionDuration||0)),1),e.createElementVNode("td",ee,e.toDisplayString(m(t.bounceRate||0)),1),e.createElementVNode("td",te,e.toDisplayString(m(t.engagementRate||0)),1),e.createElementVNode("td",oe,[e.createElementVNode("div",ne,[e.createElementVNode("div",ae,[e.createElementVNode("div",{class:e.normalizeClass(["h-full rounded-full transition-all",R(f(t))]),style:e.normalizeStyle({width:`${Math.min(f(t),100)}%`})},null,6)]),e.createElementVNode("span",{class:e.normalizeClass(["text-xs font-medium tabular-nums w-8 text-right",P(f(t))])},e.toDisplayString(Math.round(f(t))),3)])])]))),128))])])]),C.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",re,e.toDisplayString(u.value?"No pages matching your search":"No page data available"),1))]),_:1})]),_:1})):e.createCommentVNode("",!0),d.value==="landing"?(e.openBlock(),e.createBlock(r,{key:1},{default:e.withCtx(()=>[e.createVNode(B,{class:"pb-2"},{default:e.withCtx(()=>[e.createVNode(w,{class:"text-base"},{default:e.withCtx(()=>[...o[5]||(o[5]=[e.createTextVNode("Top Landing Pages",-1)])]),_:1}),o[6]||(o[6]=e.createElementVNode("p",{class:"text-xs text-muted-foreground mt-1"},"Where users first enter your site. Low bounce + high engagement = great landing page.",-1))]),_:1}),e.createVNode(_,{class:"p-0"},{default:e.withCtx(()=>[e.createElementVNode("div",se,[e.createElementVNode("table",le,[o[7]||(o[7]=e.createElementVNode("thead",null,[e.createElementVNode("tr",{class:"border-b text-left"},[e.createElementVNode("th",{class:"px-6 py-3 font-medium text-muted-foreground w-8"},"#"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground"},"Landing Page"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Sessions"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Users"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Bounce"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Avg Time"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Engagement")])],-1)),e.createElementVNode("tbody",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(t,s)=>(e.openBlock(),e.createElementBlock("tr",{key:t.landingPagePlusQueryString,class:"hover:bg-muted/50"},[e.createElementVNode("td",ce,e.toDisplayString(s+1),1),e.createElementVNode("td",ie,e.toDisplayString(t.landingPagePlusQueryString),1),e.createElementVNode("td",ue,e.toDisplayString(c(t.sessions)),1),e.createElementVNode("td",me,e.toDisplayString(c(t.totalUsers)),1),e.createElementVNode("td",xe,[e.createElementVNode("span",{class:e.normalizeClass((t.bounceRate||0)>.6?"text-red-500":(t.bounceRate||0)<.3?"text-emerald-600 dark:text-emerald-400":"")},e.toDisplayString(m(t.bounceRate||0)),3)]),e.createElementVNode("td",ge,e.toDisplayString(b(t.averageSessionDuration||0)),1),e.createElementVNode("td",pe,[e.createElementVNode("span",{class:e.normalizeClass((t.engagementRate||0)>.6?"text-emerald-600 dark:text-emerald-400":"")},e.toDisplayString(m(t.engagementRate||0)),3)])]))),128))])])]),v.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",fe,"No landing page data"))]),_:1})]),_:1})):e.createCommentVNode("",!0),d.value==="exit"?(e.openBlock(),e.createBlock(r,{key:2},{default:e.withCtx(()=>[e.createVNode(B,{class:"pb-2"},{default:e.withCtx(()=>[e.createVNode(w,{class:"text-base"},{default:e.withCtx(()=>[...o[8]||(o[8]=[e.createTextVNode("Top Exit Pages",-1)])]),_:1}),o[9]||(o[9]=e.createElementVNode("p",{class:"text-xs text-muted-foreground mt-1"},"Where users leave your site. High exit rate might indicate issues.",-1))]),_:1}),e.createVNode(_,{class:"p-0"},{default:e.withCtx(()=>[e.createElementVNode("div",he,[e.createElementVNode("table",ye,[o[10]||(o[10]=e.createElementVNode("thead",null,[e.createElementVNode("tr",{class:"border-b text-left"},[e.createElementVNode("th",{class:"px-6 py-3 font-medium text-muted-foreground w-8"},"#"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground"},"Page"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Sessions"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Page Views"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Bounce Rate")])],-1)),e.createElementVNode("tbody",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(t,s)=>(e.openBlock(),e.createElementBlock("tr",{key:t.pagePath,class:"hover:bg-muted/50"},[e.createElementVNode("td",Ve,e.toDisplayString(s+1),1),e.createElementVNode("td",Ne,e.toDisplayString(t.pagePath),1),e.createElementVNode("td",_e,e.toDisplayString(c(t.sessions)),1),e.createElementVNode("td",Ee,e.toDisplayString(c(t.screenPageViews)),1),e.createElementVNode("td",ke,[e.createElementVNode("div",be,[e.createElementVNode("div",Ce,[e.createElementVNode("div",{class:e.normalizeClass(["h-full rounded-full transition-all",(t.exitRate||0)>.7?"bg-red-500":(t.exitRate||0)>.4?"bg-amber-500":"bg-emerald-500"]),style:e.normalizeStyle({width:`${(t.exitRate||0)*100}%`})},null,6)]),e.createElementVNode("span",{class:e.normalizeClass(["text-xs tabular-nums",(t.exitRate||0)>.7?"text-red-500":""])},e.toDisplayString(m(t.exitRate||0)),3)])])]))),128))])])]),V.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",we,"No exit page data"))]),_:1})]),_:1})):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(r,{key:0,class:"p-8 text-center"},{default:e.withCtx(()=>[...o[2]||(o[2]=[e.createElementVNode("p",{class:"text-lg font-medium"},"Setup required",-1)])]),_:1}))])}}});exports.default=Be;
|