@oneclick.dev/cms-core-modules 0.0.100 → 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.
Files changed (59) hide show
  1. package/dist/Acquisition-Br1Pfny3.js +1 -0
  2. package/dist/{Acquisition-D_Qx7XRY.mjs → Acquisition-CPlZzUBo.mjs} +40 -40
  3. package/dist/Audience-BfkrmBuQ.js +1 -0
  4. package/dist/{Audience-BdlrWkY-.mjs → Audience-DTblSAiL.mjs} +89 -89
  5. package/dist/Content-BHr_rPVY.js +1 -0
  6. package/dist/{Content-DW6xvbUo.mjs → Content-CYOZKvWK.mjs} +56 -56
  7. package/dist/Overview-BrCwozey.js +1 -0
  8. package/dist/{Overview-gJSvftdE.mjs → Overview-kaMhsIUq.mjs} +21 -21
  9. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CL5kbDII.mjs +2782 -0
  10. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-DcyyNvf6.js +349 -0
  11. package/dist/SendPush-COns44j7.js +1 -0
  12. package/dist/SendPush-CPIOjVX4.mjs +184 -0
  13. package/dist/SeoHealth-09sEOu3G.js +1 -0
  14. package/dist/SeoHealth-BzcWd_w7.mjs +615 -0
  15. package/dist/{agenda-DMT75Qfo.mjs → agenda-CCOjPiwP.mjs} +1 -1
  16. package/dist/{agenda-DxD4RMsy.js → agenda-CNPQfaIQ.js} +1 -1
  17. package/dist/cms-core-modules.css +1 -1
  18. package/dist/{index-BbqRTXuU.js → index-BOnqrBfY.js} +1 -1
  19. package/dist/{index-D4GsbUId.mjs → index-Bj0qaL1N.mjs} +1 -1
  20. package/dist/index-CJQQBRLY.js +1 -0
  21. package/dist/{index-D7JBu6iT.mjs → index-CZn2nDLv.mjs} +6 -6
  22. package/dist/index-CsVeM3PA.mjs +24 -0
  23. package/dist/index-DjWuIBxh.js +1 -0
  24. package/dist/index.cjs.js +1 -1
  25. package/dist/index.mjs +102 -81
  26. package/dist/{orders-BRfXlWgV.mjs → orders-BJV5vRQr.mjs} +1 -1
  27. package/dist/{orders-CrCz1WTR.js → orders-C1C5IEIP.js} +1 -1
  28. package/dist/src/googleAnalytics/components/seo-health/SeoClicksChart.vue.d.ts +5 -0
  29. package/dist/src/googleAnalytics/components/seo-health/SeoImpressionsChart.vue.d.ts +5 -0
  30. package/dist/src/googleAnalytics/components/seo-health/SeoKeywordsTab.vue.d.ts +5 -0
  31. package/dist/src/googleAnalytics/components/seo-health/SeoKpiCards.vue.d.ts +10 -0
  32. package/dist/src/googleAnalytics/components/seo-health/SeoMappingTab.vue.d.ts +5 -0
  33. package/dist/src/googleAnalytics/components/seo-health/SeoPagesTab.vue.d.ts +5 -0
  34. package/dist/src/googleAnalytics/components/seo-health/SeoRankingDistribution.vue.d.ts +5 -0
  35. package/dist/src/googleAnalytics/components/seo-health/utils.d.ts +6 -0
  36. package/dist/src/index.d.ts +1 -0
  37. package/dist/src/push-notifications/components/PreviewAndroid.vue.d.ts +28 -0
  38. package/dist/src/push-notifications/components/PreviewIPhone.vue.d.ts +28 -0
  39. package/dist/src/push-notifications/components/PushPreview.vue.d.ts +28 -0
  40. package/dist/src/push-notifications/config.d.ts +13 -0
  41. package/dist/src/push-notifications/index.d.ts +25 -0
  42. package/dist/src/push-notifications/index.vue.d.ts +22 -0
  43. package/dist/src/push-notifications/metadata.d.ts +2 -0
  44. package/dist/src/push-notifications/pages/SendPush.vue.d.ts +14 -0
  45. package/dist/src/push-notifications/permissions.d.ts +5 -0
  46. package/dist/src/push-notifications/routes.d.ts +5 -0
  47. package/dist/src/push-notifications/tools.d.ts +1 -0
  48. package/dist/src/push-notifications/types.d.ts +0 -0
  49. package/package.json +2 -2
  50. package/src/push-notifications/tools.ts +24 -0
  51. package/dist/Acquisition-_-cq972V.js +0 -1
  52. package/dist/Audience-QnFQs93n.js +0 -1
  53. package/dist/Content-C-4Cdniz.js +0 -1
  54. package/dist/Overview-Da0XexiT.js +0 -1
  55. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-COfCOMsz.js +0 -349
  56. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CYXkhhdp.mjs +0 -2383
  57. package/dist/SeoHealth-Bc5chnaa.mjs +0 -523
  58. package/dist/SeoHealth-BkpJ1F2Y.js +0 -1
  59. package/dist/index-DwHYfZl_.js +0 -1
@@ -1,523 +0,0 @@
1
- import { defineComponent as ce, ref as f, computed as b, watch as me, onMounted as xe, resolveComponent as W, openBlock as a, createElementBlock as i, createElementVNode as e, Fragment as $, renderList as N, normalizeClass as v, toDisplayString as r, createVNode as o, withCtx as u, unref as n, createCommentVNode as y, createBlock as H, createTextVNode as d, normalizeStyle as C } from "vue";
2
- import { useModule as pe, useModuleRoute as fe, useModuleBreadcrumbs as ve } from "@oneclick.dev/cms-kit";
3
- import "./index-CMk3uhUt.mjs";
4
- import { componentToString as Y, ChartTooltipContent as Z } from "@oneclick.dev/cms-kit/charts";
5
- import { RefreshCw as ge, AlertTriangle as ye, Loader2 as he, MousePointerClick as U, Eye as V, TrendingUp as _e, Hash as be, Search as ke, FileText as we, ArrowUpRight as Ce } from "lucide-vue-next";
6
- import { S as ee, C as B, A as te, z as se } from "./index-_2lRVt_k.mjs";
7
- import { C as oe, a as le } from "./index-p5Uqu8c2.mjs";
8
- const $e = { class: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, Te = { class: "flex items-center justify-between" }, ze = {
9
- key: 0,
10
- class: "flex items-center gap-2"
11
- }, Se = { class: "flex items-center border rounded-lg overflow-hidden" }, De = ["onClick"], Pe = { class: "text-sm text-destructive font-medium" }, Re = {
12
- key: 3,
13
- class: "flex items-center justify-center py-20"
14
- }, Fe = { class: "grid grid-cols-2 @3xl:grid-cols-4 gap-4" }, Me = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Ae = { class: "text-2xl font-bold tabular-nums" }, Le = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Ne = { class: "text-2xl font-bold tabular-nums" }, Ue = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Be = { class: "text-2xl font-bold tabular-nums" }, je = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Ee = { class: "flex items-center gap-4" }, Ke = { class: "flex items-center gap-2" }, Oe = { class: "text-xs" }, Ie = { class: "flex items-center gap-2" }, He = { class: "text-xs" }, Ve = { class: "flex items-center gap-2" }, Xe = { class: "text-xs" }, qe = { class: "flex items-center gap-2" }, Ge = { class: "text-xs" }, Je = {
15
- key: 0,
16
- class: "flex h-3 rounded-full overflow-hidden mt-3"
17
- }, Qe = { class: "grid grid-cols-1 @3xl:grid-cols-2 gap-4" }, We = {
18
- key: 0,
19
- class: "h-48"
20
- }, Ye = {
21
- key: 1,
22
- class: "text-xs text-muted-foreground text-center py-10"
23
- }, Ze = {
24
- key: 0,
25
- class: "h-48"
26
- }, et = {
27
- key: 1,
28
- class: "text-xs text-muted-foreground text-center py-10"
29
- }, tt = { class: "border-b" }, st = { class: "flex" }, ot = {
30
- key: 0,
31
- class: "divide-y"
32
- }, lt = {
33
- key: 0,
34
- class: "p-8 text-center text-sm text-muted-foreground"
35
- }, nt = { class: "flex items-center gap-3" }, rt = { class: "text-xs font-medium text-muted-foreground w-6 text-right shrink-0" }, at = { class: "flex-1 min-w-0" }, it = { class: "text-sm font-medium truncate" }, dt = { class: "h-1.5 rounded-full bg-muted overflow-hidden mt-1.5 max-w-xs" }, ut = { class: "flex items-center gap-4 text-xs text-muted-foreground shrink-0" }, ct = { class: "flex items-center gap-1 w-16 justify-end" }, mt = { class: "flex items-center gap-1 w-16 justify-end" }, xt = { class: "w-14 text-right" }, pt = {
36
- key: 1,
37
- class: "divide-y"
38
- }, ft = {
39
- key: 0,
40
- class: "p-8 text-center text-sm text-muted-foreground"
41
- }, vt = { class: "flex items-center gap-3" }, gt = { class: "text-xs font-medium text-muted-foreground w-6 text-right shrink-0" }, yt = { class: "flex-1 min-w-0" }, ht = ["title"], _t = { class: "h-1.5 rounded-full bg-muted overflow-hidden mt-1.5 max-w-xs" }, bt = { class: "flex items-center gap-4 text-xs text-muted-foreground shrink-0" }, kt = { class: "flex items-center gap-1 w-16 justify-end" }, wt = { class: "flex items-center gap-1 w-16 justify-end" }, Ct = { class: "w-14 text-right" }, $t = {
42
- key: 2,
43
- class: "divide-y"
44
- }, Tt = {
45
- key: 0,
46
- class: "p-8 text-center text-sm text-muted-foreground"
47
- }, zt = { class: "flex items-start gap-3" }, St = { class: "text-xs font-medium text-muted-foreground w-6 text-right shrink-0 mt-0.5" }, Dt = { class: "flex-1 min-w-0 space-y-0.5" }, Pt = { class: "text-sm font-medium" }, Rt = ["title"], Ft = { class: "flex items-center gap-4 text-xs text-muted-foreground shrink-0" }, Mt = { class: "flex items-center gap-1" }, Ot = /* @__PURE__ */ ce({
48
- __name: "SeoHealth",
49
- setup(At) {
50
- const { config: T } = pe(), { moduleId: ne } = fe();
51
- ve(() => [{ label: "SEO Health" }]);
52
- const k = f(!0), z = f(null), S = f("30"), h = f([]), w = f({
53
- clicks: 0,
54
- impressions: 0,
55
- ctr: 0,
56
- avgPosition: 0
57
- }), c = f([]), D = f([]), j = f([]), P = b(() => !!(T.serviceAccount && T.propertyId && T.siteUrl)), re = b(() => !!T.siteUrl);
58
- function R(s) {
59
- return `/api/v1/modules/${ne}${s}`;
60
- }
61
- const ae = [
62
- { label: "7d", value: "7" },
63
- { label: "14d", value: "14" },
64
- { label: "30d", value: "30" },
65
- { label: "90d", value: "90" }
66
- ], F = (s, t) => t, X = (s) => s.clicks || 0, q = (s) => s.impressions || 0, G = (s) => {
67
- const t = h.value[Math.round(s)];
68
- if (!t) return "";
69
- const g = new Date(t.date);
70
- return `${g.getDate()}/${g.getMonth() + 1}`;
71
- }, J = (s) => {
72
- const t = h.value[Math.round(Number(s))];
73
- return t ? new Date(t.date).toLocaleDateString(void 0, { weekday: "short", month: "short", day: "numeric" }) : "";
74
- };
75
- function _(s) {
76
- return s >= 1e6 ? `${(s / 1e6).toFixed(1)}M` : s >= 1e3 ? `${(s / 1e3).toFixed(1)}K` : Math.round(s).toString();
77
- }
78
- function E(s) {
79
- return `${(s * 100).toFixed(1)}%`;
80
- }
81
- function M(s) {
82
- return s.toFixed(1);
83
- }
84
- function ie(s) {
85
- return s <= 3 ? "text-emerald-600 dark:text-emerald-400" : s <= 10 ? "text-blue-600 dark:text-blue-400" : s <= 20 ? "text-amber-600 dark:text-amber-400" : "text-red-600 dark:text-red-400";
86
- }
87
- function K(s) {
88
- return s <= 3 ? "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : s <= 10 ? "bg-blue-500/10 text-blue-600 dark:text-blue-400" : s <= 20 ? "bg-amber-500/10 text-amber-600 dark:text-amber-400" : "bg-red-500/10 text-red-600 dark:text-red-400";
89
- }
90
- function Q(s) {
91
- try {
92
- return new URL(s).pathname;
93
- } catch {
94
- return s;
95
- }
96
- }
97
- const O = b(() => c.value.filter((s) => s.position <= 3).length), I = b(() => c.value.filter((s) => s.position <= 10).length), A = b(() => c.value.filter((s) => s.position <= 20).length), de = b(() => Math.max(...c.value.map((s) => s.clicks), 1)), ue = b(() => Math.max(...D.value.map((s) => s.clicks), 1));
98
- async function L() {
99
- if (!P.value) return;
100
- k.value = !0, z.value = null;
101
- const s = `${S.value}daysAgo`;
102
- try {
103
- const [t, g, m, l] = await Promise.all([
104
- $fetch(R(`/seo/trends?startDate=${s}&endDate=today`)),
105
- $fetch(R(`/seo/keywords?startDate=${s}&endDate=today&limit=50`)),
106
- $fetch(R(`/seo/pages?startDate=${s}&endDate=today&limit=30`)),
107
- $fetch(R(`/seo/query-pages?startDate=${s}&endDate=today`))
108
- ]);
109
- h.value = t.rows || [], w.value = t.totals || { clicks: 0, impressions: 0, ctr: 0, avgPosition: 0 }, c.value = g.rows || [], D.value = m.rows || [], j.value = l.rows || [];
110
- } catch (t) {
111
- z.value = t?.data?.statusMessage || t?.message || "Failed to load SEO data";
112
- } finally {
113
- k.value = !1;
114
- }
115
- }
116
- me(S, () => L()), xe(() => {
117
- P.value ? L() : k.value = !1;
118
- });
119
- const x = f("keywords");
120
- return (s, t) => {
121
- const g = W("Button"), m = W("Card");
122
- return a(), i("div", $e, [
123
- e("div", Te, [
124
- t[3] || (t[3] = e("div", null, [
125
- e("h1", { class: "text-2xl font-semibold" }, "SEO Health"),
126
- e("p", { class: "text-muted-foreground text-sm mt-1" }, "Search Console performance & keyword rankings")
127
- ], -1)),
128
- P.value ? (a(), i("div", ze, [
129
- e("div", Se, [
130
- (a(), i($, null, N(ae, (l) => e("button", {
131
- key: l.value,
132
- class: v(["px-3 py-1.5 text-xs font-medium transition-colors", S.value === l.value ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted"]),
133
- onClick: (p) => S.value = l.value
134
- }, r(l.label), 11, De)), 64))
135
- ]),
136
- o(g, {
137
- variant: "outline",
138
- size: "icon",
139
- onClick: L,
140
- disabled: k.value
141
- }, {
142
- default: u(() => [
143
- o(n(ge), {
144
- class: v(["size-4", { "animate-spin": k.value }])
145
- }, null, 8, ["class"])
146
- ]),
147
- _: 1
148
- }, 8, ["disabled"])
149
- ])) : y("", !0)
150
- ]),
151
- re.value ? P.value ? z.value ? (a(), H(m, {
152
- key: 2,
153
- class: "p-6 border-destructive/50 bg-destructive/5"
154
- }, {
155
- default: u(() => [
156
- e("p", Pe, r(z.value), 1),
157
- o(g, {
158
- variant: "outline",
159
- size: "sm",
160
- class: "mt-3",
161
- onClick: L
162
- }, {
163
- default: u(() => [...t[7] || (t[7] = [
164
- d("Retry", -1)
165
- ])]),
166
- _: 1
167
- })
168
- ]),
169
- _: 1
170
- })) : k.value ? (a(), i("div", Re, [
171
- o(n(he), { class: "size-8 animate-spin text-muted-foreground" })
172
- ])) : (a(), i($, { key: 4 }, [
173
- e("div", Fe, [
174
- o(m, { class: "p-4 space-y-1" }, {
175
- default: u(() => [
176
- e("div", Me, [
177
- o(n(U), { class: "size-3.5" }),
178
- t[8] || (t[8] = d(" Total Clicks ", -1))
179
- ]),
180
- e("p", Ae, r(_(w.value.clicks)), 1)
181
- ]),
182
- _: 1
183
- }),
184
- o(m, { class: "p-4 space-y-1" }, {
185
- default: u(() => [
186
- e("div", Le, [
187
- o(n(V), { class: "size-3.5" }),
188
- t[9] || (t[9] = d(" Total Impressions ", -1))
189
- ]),
190
- e("p", Ne, r(_(w.value.impressions)), 1)
191
- ]),
192
- _: 1
193
- }),
194
- o(m, { class: "p-4 space-y-1" }, {
195
- default: u(() => [
196
- e("div", Ue, [
197
- o(n(_e), { class: "size-3.5" }),
198
- t[10] || (t[10] = d(" Average CTR ", -1))
199
- ]),
200
- e("p", Be, r(E(w.value.ctr)), 1)
201
- ]),
202
- _: 1
203
- }),
204
- o(m, { class: "p-4 space-y-1" }, {
205
- default: u(() => [
206
- e("div", je, [
207
- o(n(be), { class: "size-3.5" }),
208
- t[11] || (t[11] = d(" Avg Position ", -1))
209
- ]),
210
- e("p", {
211
- class: v(["text-2xl font-bold tabular-nums", ie(w.value.avgPosition)])
212
- }, r(M(w.value.avgPosition)), 3)
213
- ]),
214
- _: 1
215
- })
216
- ]),
217
- o(m, { class: "p-4" }, {
218
- default: u(() => [
219
- t[20] || (t[20] = e("h3", { class: "text-sm font-medium mb-3" }, "Keyword Ranking Distribution", -1)),
220
- e("div", Ee, [
221
- e("div", Ke, [
222
- t[13] || (t[13] = e("span", { class: "inline-block w-3 h-3 rounded-full bg-emerald-500" }, null, -1)),
223
- e("span", Oe, [
224
- t[12] || (t[12] = d("Top 3: ", -1)),
225
- e("strong", null, r(O.value), 1)
226
- ])
227
- ]),
228
- e("div", Ie, [
229
- t[15] || (t[15] = e("span", { class: "inline-block w-3 h-3 rounded-full bg-blue-500" }, null, -1)),
230
- e("span", He, [
231
- t[14] || (t[14] = d("Top 10: ", -1)),
232
- e("strong", null, r(I.value), 1)
233
- ])
234
- ]),
235
- e("div", Ve, [
236
- t[17] || (t[17] = e("span", { class: "inline-block w-3 h-3 rounded-full bg-amber-500" }, null, -1)),
237
- e("span", Xe, [
238
- t[16] || (t[16] = d("Top 20: ", -1)),
239
- e("strong", null, r(A.value), 1)
240
- ])
241
- ]),
242
- e("div", qe, [
243
- t[19] || (t[19] = e("span", { class: "inline-block w-3 h-3 rounded-full bg-red-500" }, null, -1)),
244
- e("span", Ge, [
245
- t[18] || (t[18] = d("20+: ", -1)),
246
- e("strong", null, r(c.value.length - A.value), 1)
247
- ])
248
- ])
249
- ]),
250
- c.value.length > 0 ? (a(), i("div", Je, [
251
- e("div", {
252
- class: "bg-emerald-500 transition-all",
253
- style: C({ width: `${O.value / c.value.length * 100}%` })
254
- }, null, 4),
255
- e("div", {
256
- class: "bg-blue-500 transition-all",
257
- style: C({ width: `${(I.value - O.value) / c.value.length * 100}%` })
258
- }, null, 4),
259
- e("div", {
260
- class: "bg-amber-500 transition-all",
261
- style: C({ width: `${(A.value - I.value) / c.value.length * 100}%` })
262
- }, null, 4),
263
- e("div", {
264
- class: "bg-red-500 transition-all",
265
- style: C({ width: `${(c.value.length - A.value) / c.value.length * 100}%` })
266
- }, null, 4)
267
- ])) : y("", !0)
268
- ]),
269
- _: 1
270
- }),
271
- e("div", Qe, [
272
- o(m, { class: "p-4" }, {
273
- default: u(() => [
274
- t[21] || (t[21] = e("h3", { class: "text-sm font-medium mb-3" }, "Clicks Over Time", -1)),
275
- h.value.length > 1 ? (a(), i("div", We, [
276
- o(n(ee), {
277
- data: h.value,
278
- height: 180
279
- }, {
280
- default: u(() => [
281
- o(n(oe), {
282
- x: F,
283
- y: X,
284
- color: "#3b82f6",
285
- opacity: 0.1,
286
- curveType: "monotoneX"
287
- }),
288
- o(n(le), {
289
- x: F,
290
- y: X,
291
- color: "#3b82f6",
292
- curveType: "monotoneX"
293
- }),
294
- o(n(B), {
295
- type: "x",
296
- tickFormat: G,
297
- numTicks: 5,
298
- gridLine: !1
299
- }),
300
- o(n(B), {
301
- type: "y",
302
- gridLine: !0,
303
- numTicks: 4
304
- }),
305
- o(n(te), {
306
- template: (l) => n(Y)(n(Z), { namePayload: [{ name: "Clicks", value: l.clicks, color: "#3b82f6" }], labelFormatter: J })
307
- }, null, 8, ["template"]),
308
- o(n(se))
309
- ]),
310
- _: 1
311
- }, 8, ["data"])
312
- ])) : (a(), i("p", Ye, "Not enough data for chart"))
313
- ]),
314
- _: 1
315
- }),
316
- o(m, { class: "p-4" }, {
317
- default: u(() => [
318
- t[22] || (t[22] = e("h3", { class: "text-sm font-medium mb-3" }, "Impressions Over Time", -1)),
319
- h.value.length > 1 ? (a(), i("div", Ze, [
320
- o(n(ee), {
321
- data: h.value,
322
- height: 180
323
- }, {
324
- default: u(() => [
325
- o(n(oe), {
326
- x: F,
327
- y: q,
328
- color: "#8b5cf6",
329
- opacity: 0.1,
330
- curveType: "monotoneX"
331
- }),
332
- o(n(le), {
333
- x: F,
334
- y: q,
335
- color: "#8b5cf6",
336
- curveType: "monotoneX"
337
- }),
338
- o(n(B), {
339
- type: "x",
340
- tickFormat: G,
341
- numTicks: 5,
342
- gridLine: !1
343
- }),
344
- o(n(B), {
345
- type: "y",
346
- gridLine: !0,
347
- numTicks: 4
348
- }),
349
- o(n(te), {
350
- template: (l) => n(Y)(n(Z), { namePayload: [{ name: "Impressions", value: l.impressions, color: "#8b5cf6" }], labelFormatter: J })
351
- }, null, 8, ["template"]),
352
- o(n(se))
353
- ]),
354
- _: 1
355
- }, 8, ["data"])
356
- ])) : (a(), i("p", et, "Not enough data for chart"))
357
- ]),
358
- _: 1
359
- })
360
- ]),
361
- o(m, { class: "overflow-hidden" }, {
362
- default: u(() => [
363
- e("div", tt, [
364
- e("div", st, [
365
- e("button", {
366
- class: v(["px-4 py-2.5 text-sm font-medium transition-colors border-b-2", x.value === "keywords" ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground"]),
367
- onClick: t[0] || (t[0] = (l) => x.value = "keywords")
368
- }, [
369
- o(n(ke), { class: "size-3.5 inline mr-1.5" }),
370
- t[23] || (t[23] = d(" Keywords ", -1))
371
- ], 2),
372
- e("button", {
373
- class: v(["px-4 py-2.5 text-sm font-medium transition-colors border-b-2", x.value === "pages" ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground"]),
374
- onClick: t[1] || (t[1] = (l) => x.value = "pages")
375
- }, [
376
- o(n(we), { class: "size-3.5 inline mr-1.5" }),
377
- t[24] || (t[24] = d(" Pages ", -1))
378
- ], 2),
379
- e("button", {
380
- class: v(["px-4 py-2.5 text-sm font-medium transition-colors border-b-2", x.value === "mapping" ? "border-primary text-primary" : "border-transparent text-muted-foreground hover:text-foreground"]),
381
- onClick: t[2] || (t[2] = (l) => x.value = "mapping")
382
- }, [
383
- o(n(Ce), { class: "size-3.5 inline mr-1.5" }),
384
- t[25] || (t[25] = d(" Keyword → Page ", -1))
385
- ], 2)
386
- ])
387
- ]),
388
- x.value === "keywords" ? (a(), i("div", ot, [
389
- c.value.length === 0 ? (a(), i("div", lt, " No keyword data found for this period. ")) : y("", !0),
390
- (a(!0), i($, null, N(c.value, (l, p) => (a(), i("div", {
391
- key: p,
392
- class: "px-4 py-3 hover:bg-muted/30 transition-colors"
393
- }, [
394
- e("div", nt, [
395
- e("span", rt, r(p + 1) + ".", 1),
396
- e("div", at, [
397
- e("p", it, r(l.query), 1),
398
- e("div", dt, [
399
- e("div", {
400
- class: "h-full rounded-full bg-blue-500/70",
401
- style: C({ width: `${l.clicks / de.value * 100}%` })
402
- }, null, 4)
403
- ])
404
- ]),
405
- e("div", ut, [
406
- e("span", ct, [
407
- o(n(U), { class: "size-3" }),
408
- d(" " + r(_(l.clicks)), 1)
409
- ]),
410
- e("span", mt, [
411
- o(n(V), { class: "size-3" }),
412
- d(" " + r(_(l.impressions)), 1)
413
- ]),
414
- e("span", xt, r(E(l.ctr)), 1),
415
- e("span", {
416
- class: v(["inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium w-14 justify-center", K(l.position)])
417
- }, " #" + r(M(l.position)), 3)
418
- ])
419
- ])
420
- ]))), 128))
421
- ])) : y("", !0),
422
- x.value === "pages" ? (a(), i("div", pt, [
423
- D.value.length === 0 ? (a(), i("div", ft, " No page data found for this period. ")) : y("", !0),
424
- (a(!0), i($, null, N(D.value, (l, p) => (a(), i("div", {
425
- key: p,
426
- class: "px-4 py-3 hover:bg-muted/30 transition-colors"
427
- }, [
428
- e("div", vt, [
429
- e("span", gt, r(p + 1) + ".", 1),
430
- e("div", yt, [
431
- e("p", {
432
- class: "text-sm font-medium truncate",
433
- title: l.page
434
- }, r(Q(l.page)), 9, ht),
435
- e("div", _t, [
436
- e("div", {
437
- class: "h-full rounded-full bg-violet-500/70",
438
- style: C({ width: `${l.clicks / ue.value * 100}%` })
439
- }, null, 4)
440
- ])
441
- ]),
442
- e("div", bt, [
443
- e("span", kt, [
444
- o(n(U), { class: "size-3" }),
445
- d(" " + r(_(l.clicks)), 1)
446
- ]),
447
- e("span", wt, [
448
- o(n(V), { class: "size-3" }),
449
- d(" " + r(_(l.impressions)), 1)
450
- ]),
451
- e("span", Ct, r(E(l.ctr)), 1),
452
- e("span", {
453
- class: v(["inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium w-14 justify-center", K(l.position)])
454
- }, " #" + r(M(l.position)), 3)
455
- ])
456
- ])
457
- ]))), 128))
458
- ])) : y("", !0),
459
- x.value === "mapping" ? (a(), i("div", $t, [
460
- j.value.length === 0 ? (a(), i("div", Tt, " No query-page data found for this period. ")) : y("", !0),
461
- (a(!0), i($, null, N(j.value, (l, p) => (a(), i("div", {
462
- key: p,
463
- class: "px-4 py-3 hover:bg-muted/30 transition-colors"
464
- }, [
465
- e("div", zt, [
466
- e("span", St, r(p + 1) + ".", 1),
467
- e("div", Dt, [
468
- e("p", Pt, r(l.query), 1),
469
- e("p", {
470
- class: "text-xs text-muted-foreground truncate",
471
- title: l.page
472
- }, "→ " + r(Q(l.page)), 9, Rt)
473
- ]),
474
- e("div", Ft, [
475
- e("span", Mt, [
476
- o(n(U), { class: "size-3" }),
477
- d(" " + r(_(l.clicks)), 1)
478
- ]),
479
- e("span", {
480
- class: v(["inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium", K(l.position)])
481
- }, " #" + r(M(l.position)), 3)
482
- ])
483
- ])
484
- ]))), 128))
485
- ])) : y("", !0)
486
- ]),
487
- _: 1
488
- })
489
- ], 64)) : (a(), H(m, {
490
- key: 1,
491
- class: "p-8 text-center"
492
- }, {
493
- default: u(() => [...t[6] || (t[6] = [
494
- e("p", { class: "text-lg font-medium" }, "Setup required", -1),
495
- e("p", { class: "text-sm text-muted-foreground mt-1" }, "Configure your service account, property ID, and site URL in module settings.", -1)
496
- ])]),
497
- _: 1
498
- })) : (a(), H(m, {
499
- key: 0,
500
- class: "p-8 text-center space-y-3"
501
- }, {
502
- default: u(() => [
503
- o(n(ye), { class: "size-10 text-amber-500 mx-auto" }),
504
- t[4] || (t[4] = e("p", { class: "text-lg font-medium" }, "Search Console not configured", -1)),
505
- t[5] || (t[5] = e("p", { class: "text-sm text-muted-foreground max-w-md mx-auto" }, [
506
- d(" Add your "),
507
- e("strong", null, "Search Console Site URL"),
508
- d(" in the module settings to enable SEO data. Use the exact format from Google Search Console (e.g. "),
509
- e("code", null, "https://example.com"),
510
- d(" or "),
511
- e("code", null, "sc-domain:example.com"),
512
- d("). ")
513
- ], -1))
514
- ]),
515
- _: 1
516
- }))
517
- ]);
518
- };
519
- }
520
- });
521
- export {
522
- Ot as default
523
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),z=require("@oneclick.dev/cms-kit");require("./index-BuzLn4Km.js");const b=require("@oneclick.dev/cms-kit/charts"),n=require("lucide-vue-next"),a=require("./index-DQYBP8Js.js"),C=require("./index-C4YUVWzJ.js"),O={class:"w-full max-w-7xl mx-auto py-8 px-4 space-y-6"},I={class:"flex items-center justify-between"},H={key:0,class:"flex items-center gap-2"},X={class:"flex items-center border rounded-lg overflow-hidden"},G=["onClick"],J={class:"text-sm text-destructive font-medium"},Q={key:3,class:"flex items-center justify-center py-20"},W={class:"grid grid-cols-2 @3xl:grid-cols-4 gap-4"},Y={class:"flex items-center gap-2 text-xs text-muted-foreground"},Z={class:"text-2xl font-bold tabular-nums"},ee={class:"flex items-center gap-2 text-xs text-muted-foreground"},te={class:"text-2xl font-bold tabular-nums"},oe={class:"flex items-center gap-2 text-xs text-muted-foreground"},se={class:"text-2xl font-bold tabular-nums"},ne={class:"flex items-center gap-2 text-xs text-muted-foreground"},re={class:"flex items-center gap-4"},le={class:"flex items-center gap-2"},ae={class:"text-xs"},ie={class:"flex items-center gap-2"},de={class:"text-xs"},ce={class:"flex items-center gap-2"},ue={class:"text-xs"},me={class:"flex items-center gap-2"},pe={class:"text-xs"},xe={key:0,class:"flex h-3 rounded-full overflow-hidden mt-3"},fe={class:"grid grid-cols-1 @3xl:grid-cols-2 gap-4"},ge={key:0,class:"h-48"},ve={key:1,class:"text-xs text-muted-foreground text-center py-10"},ye={key:0,class:"h-48"},Ne={key:1,class:"text-xs text-muted-foreground text-center py-10"},Ve={class:"border-b"},he={class:"flex"},ke={key:0,class:"divide-y"},Ee={key:0,class:"p-8 text-center text-sm text-muted-foreground"},_e={class:"flex items-center gap-3"},be={class:"text-xs font-medium text-muted-foreground w-6 text-right shrink-0"},Ce={class:"flex-1 min-w-0"},we={class:"text-sm font-medium truncate"},Be={class:"h-1.5 rounded-full bg-muted overflow-hidden mt-1.5 max-w-xs"},Se={class:"flex items-center gap-4 text-xs text-muted-foreground shrink-0"},Te={class:"flex items-center gap-1 w-16 justify-end"},De={class:"flex items-center gap-1 w-16 justify-end"},ze={class:"w-14 text-right"},$e={key:1,class:"divide-y"},Pe={key:0,class:"p-8 text-center text-sm text-muted-foreground"},Fe={class:"flex items-center gap-3"},Me={class:"text-xs font-medium text-muted-foreground w-6 text-right shrink-0"},Le={class:"flex-1 min-w-0"},Re=["title"],Ae={class:"h-1.5 rounded-full bg-muted overflow-hidden mt-1.5 max-w-xs"},Ue={class:"flex items-center gap-4 text-xs text-muted-foreground shrink-0"},je={class:"flex items-center gap-1 w-16 justify-end"},qe={class:"flex items-center gap-1 w-16 justify-end"},Ke={class:"w-14 text-right"},Oe={key:2,class:"divide-y"},Ie={key:0,class:"p-8 text-center text-sm text-muted-foreground"},He={class:"flex items-start gap-3"},Xe={class:"text-xs font-medium text-muted-foreground w-6 text-right shrink-0 mt-0.5"},Ge={class:"flex-1 min-w-0 space-y-0.5"},Je={class:"text-sm font-medium"},Qe=["title"],We={class:"flex items-center gap-4 text-xs text-muted-foreground shrink-0"},Ye={class:"flex items-center gap-1"},Ze=e.defineComponent({__name:"SeoHealth",setup(et){const{config:f}=z.useModule(),{moduleId:R}=z.useModuleRoute();z.useModuleBreadcrumbs(()=>[{label:"SEO Health"}]);const p=e.ref(!0),g=e.ref(null),v=e.ref("30"),u=e.ref([]),x=e.ref({clicks:0,impressions:0,ctr:0,avgPosition:0}),r=e.ref([]),y=e.ref([]),w=e.ref([]),N=e.computed(()=>!!(f.serviceAccount&&f.propertyId&&f.siteUrl)),A=e.computed(()=>!!f.siteUrl);function V(o){return`/api/v1/modules/${R}${o}`}const U=[{label:"7d",value:"7"},{label:"14d",value:"14"},{label:"30d",value:"30"},{label:"90d",value:"90"}],h=(o,t)=>t,$=o=>o.clicks||0,P=o=>o.impressions||0,F=o=>{const t=u.value[Math.round(o)];if(!t)return"";const c=new Date(t.date);return`${c.getDate()}/${c.getMonth()+1}`},M=o=>{const t=u.value[Math.round(Number(o))];return t?new Date(t.date).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"}):""};function m(o){return o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}K`:Math.round(o).toString()}function B(o){return`${(o*100).toFixed(1)}%`}function k(o){return o.toFixed(1)}function j(o){return o<=3?"text-emerald-600 dark:text-emerald-400":o<=10?"text-blue-600 dark:text-blue-400":o<=20?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400"}function S(o){return o<=3?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":o<=10?"bg-blue-500/10 text-blue-600 dark:text-blue-400":o<=20?"bg-amber-500/10 text-amber-600 dark:text-amber-400":"bg-red-500/10 text-red-600 dark:text-red-400"}function L(o){try{return new URL(o).pathname}catch{return o}}const T=e.computed(()=>r.value.filter(o=>o.position<=3).length),D=e.computed(()=>r.value.filter(o=>o.position<=10).length),E=e.computed(()=>r.value.filter(o=>o.position<=20).length),q=e.computed(()=>Math.max(...r.value.map(o=>o.clicks),1)),K=e.computed(()=>Math.max(...y.value.map(o=>o.clicks),1));async function _(){if(!N.value)return;p.value=!0,g.value=null;const o=`${v.value}daysAgo`;try{const[t,c,l,s]=await Promise.all([$fetch(V(`/seo/trends?startDate=${o}&endDate=today`)),$fetch(V(`/seo/keywords?startDate=${o}&endDate=today&limit=50`)),$fetch(V(`/seo/pages?startDate=${o}&endDate=today&limit=30`)),$fetch(V(`/seo/query-pages?startDate=${o}&endDate=today`))]);u.value=t.rows||[],x.value=t.totals||{clicks:0,impressions:0,ctr:0,avgPosition:0},r.value=c.rows||[],y.value=l.rows||[],w.value=s.rows||[]}catch(t){g.value=t?.data?.statusMessage||t?.message||"Failed to load SEO data"}finally{p.value=!1}}e.watch(v,()=>_()),e.onMounted(()=>{N.value?_():p.value=!1});const i=e.ref("keywords");return(o,t)=>{const c=e.resolveComponent("Button"),l=e.resolveComponent("Card");return e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",I,[t[3]||(t[3]=e.createElementVNode("div",null,[e.createElementVNode("h1",{class:"text-2xl font-semibold"},"SEO Health"),e.createElementVNode("p",{class:"text-muted-foreground text-sm mt-1"},"Search Console performance & keyword rankings")],-1)),N.value?(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("div",X,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(U,s=>e.createElementVNode("button",{key:s.value,class:e.normalizeClass(["px-3 py-1.5 text-xs font-medium transition-colors",v.value===s.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:d=>v.value=s.value},e.toDisplayString(s.label),11,G)),64))]),e.createVNode(c,{variant:"outline",size:"icon",onClick:_,disabled:p.value},{default:e.withCtx(()=>[e.createVNode(e.unref(n.RefreshCw),{class:e.normalizeClass(["size-4",{"animate-spin":p.value}])},null,8,["class"])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0)]),A.value?N.value?g.value?(e.openBlock(),e.createBlock(l,{key:2,class:"p-6 border-destructive/50 bg-destructive/5"},{default:e.withCtx(()=>[e.createElementVNode("p",J,e.toDisplayString(g.value),1),e.createVNode(c,{variant:"outline",size:"sm",class:"mt-3",onClick:_},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode("Retry",-1)])]),_:1})]),_:1})):p.value?(e.openBlock(),e.createElementBlock("div",Q,[e.createVNode(e.unref(n.Loader2),{class:"size-8 animate-spin text-muted-foreground"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",W,[e.createVNode(l,{class:"p-4 space-y-1"},{default:e.withCtx(()=>[e.createElementVNode("div",Y,[e.createVNode(e.unref(n.MousePointerClick),{class:"size-3.5"}),t[8]||(t[8]=e.createTextVNode(" Total Clicks ",-1))]),e.createElementVNode("p",Z,e.toDisplayString(m(x.value.clicks)),1)]),_:1}),e.createVNode(l,{class:"p-4 space-y-1"},{default:e.withCtx(()=>[e.createElementVNode("div",ee,[e.createVNode(e.unref(n.Eye),{class:"size-3.5"}),t[9]||(t[9]=e.createTextVNode(" Total Impressions ",-1))]),e.createElementVNode("p",te,e.toDisplayString(m(x.value.impressions)),1)]),_:1}),e.createVNode(l,{class:"p-4 space-y-1"},{default:e.withCtx(()=>[e.createElementVNode("div",oe,[e.createVNode(e.unref(n.TrendingUp),{class:"size-3.5"}),t[10]||(t[10]=e.createTextVNode(" Average CTR ",-1))]),e.createElementVNode("p",se,e.toDisplayString(B(x.value.ctr)),1)]),_:1}),e.createVNode(l,{class:"p-4 space-y-1"},{default:e.withCtx(()=>[e.createElementVNode("div",ne,[e.createVNode(e.unref(n.Hash),{class:"size-3.5"}),t[11]||(t[11]=e.createTextVNode(" Avg Position ",-1))]),e.createElementVNode("p",{class:e.normalizeClass(["text-2xl font-bold tabular-nums",j(x.value.avgPosition)])},e.toDisplayString(k(x.value.avgPosition)),3)]),_:1})]),e.createVNode(l,{class:"p-4"},{default:e.withCtx(()=>[t[20]||(t[20]=e.createElementVNode("h3",{class:"text-sm font-medium mb-3"},"Keyword Ranking Distribution",-1)),e.createElementVNode("div",re,[e.createElementVNode("div",le,[t[13]||(t[13]=e.createElementVNode("span",{class:"inline-block w-3 h-3 rounded-full bg-emerald-500"},null,-1)),e.createElementVNode("span",ae,[t[12]||(t[12]=e.createTextVNode("Top 3: ",-1)),e.createElementVNode("strong",null,e.toDisplayString(T.value),1)])]),e.createElementVNode("div",ie,[t[15]||(t[15]=e.createElementVNode("span",{class:"inline-block w-3 h-3 rounded-full bg-blue-500"},null,-1)),e.createElementVNode("span",de,[t[14]||(t[14]=e.createTextVNode("Top 10: ",-1)),e.createElementVNode("strong",null,e.toDisplayString(D.value),1)])]),e.createElementVNode("div",ce,[t[17]||(t[17]=e.createElementVNode("span",{class:"inline-block w-3 h-3 rounded-full bg-amber-500"},null,-1)),e.createElementVNode("span",ue,[t[16]||(t[16]=e.createTextVNode("Top 20: ",-1)),e.createElementVNode("strong",null,e.toDisplayString(E.value),1)])]),e.createElementVNode("div",me,[t[19]||(t[19]=e.createElementVNode("span",{class:"inline-block w-3 h-3 rounded-full bg-red-500"},null,-1)),e.createElementVNode("span",pe,[t[18]||(t[18]=e.createTextVNode("20+: ",-1)),e.createElementVNode("strong",null,e.toDisplayString(r.value.length-E.value),1)])])]),r.value.length>0?(e.openBlock(),e.createElementBlock("div",xe,[e.createElementVNode("div",{class:"bg-emerald-500 transition-all",style:e.normalizeStyle({width:`${T.value/r.value.length*100}%`})},null,4),e.createElementVNode("div",{class:"bg-blue-500 transition-all",style:e.normalizeStyle({width:`${(D.value-T.value)/r.value.length*100}%`})},null,4),e.createElementVNode("div",{class:"bg-amber-500 transition-all",style:e.normalizeStyle({width:`${(E.value-D.value)/r.value.length*100}%`})},null,4),e.createElementVNode("div",{class:"bg-red-500 transition-all",style:e.normalizeStyle({width:`${(r.value.length-E.value)/r.value.length*100}%`})},null,4)])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",fe,[e.createVNode(l,{class:"p-4"},{default:e.withCtx(()=>[t[21]||(t[21]=e.createElementVNode("h3",{class:"text-sm font-medium mb-3"},"Clicks Over Time",-1)),u.value.length>1?(e.openBlock(),e.createElementBlock("div",ge,[e.createVNode(e.unref(a.S),{data:u.value,height:180},{default:e.withCtx(()=>[e.createVNode(e.unref(C.C),{x:h,y:$,color:"#3b82f6",opacity:.1,curveType:"monotoneX"}),e.createVNode(e.unref(C.C$1),{x:h,y:$,color:"#3b82f6",curveType:"monotoneX"}),e.createVNode(e.unref(a.C),{type:"x",tickFormat:F,numTicks:5,gridLine:!1}),e.createVNode(e.unref(a.C),{type:"y",gridLine:!0,numTicks:4}),e.createVNode(e.unref(a.A),{template:s=>e.unref(b.componentToString)(e.unref(b.ChartTooltipContent),{namePayload:[{name:"Clicks",value:s.clicks,color:"#3b82f6"}],labelFormatter:M})},null,8,["template"]),e.createVNode(e.unref(a.z))]),_:1},8,["data"])])):(e.openBlock(),e.createElementBlock("p",ve,"Not enough data for chart"))]),_:1}),e.createVNode(l,{class:"p-4"},{default:e.withCtx(()=>[t[22]||(t[22]=e.createElementVNode("h3",{class:"text-sm font-medium mb-3"},"Impressions Over Time",-1)),u.value.length>1?(e.openBlock(),e.createElementBlock("div",ye,[e.createVNode(e.unref(a.S),{data:u.value,height:180},{default:e.withCtx(()=>[e.createVNode(e.unref(C.C),{x:h,y:P,color:"#8b5cf6",opacity:.1,curveType:"monotoneX"}),e.createVNode(e.unref(C.C$1),{x:h,y:P,color:"#8b5cf6",curveType:"monotoneX"}),e.createVNode(e.unref(a.C),{type:"x",tickFormat:F,numTicks:5,gridLine:!1}),e.createVNode(e.unref(a.C),{type:"y",gridLine:!0,numTicks:4}),e.createVNode(e.unref(a.A),{template:s=>e.unref(b.componentToString)(e.unref(b.ChartTooltipContent),{namePayload:[{name:"Impressions",value:s.impressions,color:"#8b5cf6"}],labelFormatter:M})},null,8,["template"]),e.createVNode(e.unref(a.z))]),_:1},8,["data"])])):(e.openBlock(),e.createElementBlock("p",Ne,"Not enough data for chart"))]),_:1})]),e.createVNode(l,{class:"overflow-hidden"},{default:e.withCtx(()=>[e.createElementVNode("div",Ve,[e.createElementVNode("div",he,[e.createElementVNode("button",{class:e.normalizeClass(["px-4 py-2.5 text-sm font-medium transition-colors border-b-2",i.value==="keywords"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"]),onClick:t[0]||(t[0]=s=>i.value="keywords")},[e.createVNode(e.unref(n.Search),{class:"size-3.5 inline mr-1.5"}),t[23]||(t[23]=e.createTextVNode(" Keywords ",-1))],2),e.createElementVNode("button",{class:e.normalizeClass(["px-4 py-2.5 text-sm font-medium transition-colors border-b-2",i.value==="pages"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"]),onClick:t[1]||(t[1]=s=>i.value="pages")},[e.createVNode(e.unref(n.FileText),{class:"size-3.5 inline mr-1.5"}),t[24]||(t[24]=e.createTextVNode(" Pages ",-1))],2),e.createElementVNode("button",{class:e.normalizeClass(["px-4 py-2.5 text-sm font-medium transition-colors border-b-2",i.value==="mapping"?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"]),onClick:t[2]||(t[2]=s=>i.value="mapping")},[e.createVNode(e.unref(n.ArrowUpRight),{class:"size-3.5 inline mr-1.5"}),t[25]||(t[25]=e.createTextVNode(" Keyword → Page ",-1))],2)])]),i.value==="keywords"?(e.openBlock(),e.createElementBlock("div",ke,[r.value.length===0?(e.openBlock(),e.createElementBlock("div",Ee," No keyword data found for this period. ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"px-4 py-3 hover:bg-muted/30 transition-colors"},[e.createElementVNode("div",_e,[e.createElementVNode("span",be,e.toDisplayString(d+1)+".",1),e.createElementVNode("div",Ce,[e.createElementVNode("p",we,e.toDisplayString(s.query),1),e.createElementVNode("div",Be,[e.createElementVNode("div",{class:"h-full rounded-full bg-blue-500/70",style:e.normalizeStyle({width:`${s.clicks/q.value*100}%`})},null,4)])]),e.createElementVNode("div",Se,[e.createElementVNode("span",Te,[e.createVNode(e.unref(n.MousePointerClick),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(m(s.clicks)),1)]),e.createElementVNode("span",De,[e.createVNode(e.unref(n.Eye),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(m(s.impressions)),1)]),e.createElementVNode("span",ze,e.toDisplayString(B(s.ctr)),1),e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium w-14 justify-center",S(s.position)])}," #"+e.toDisplayString(k(s.position)),3)])])]))),128))])):e.createCommentVNode("",!0),i.value==="pages"?(e.openBlock(),e.createElementBlock("div",$e,[y.value.length===0?(e.openBlock(),e.createElementBlock("div",Pe," No page data found for this period. ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"px-4 py-3 hover:bg-muted/30 transition-colors"},[e.createElementVNode("div",Fe,[e.createElementVNode("span",Me,e.toDisplayString(d+1)+".",1),e.createElementVNode("div",Le,[e.createElementVNode("p",{class:"text-sm font-medium truncate",title:s.page},e.toDisplayString(L(s.page)),9,Re),e.createElementVNode("div",Ae,[e.createElementVNode("div",{class:"h-full rounded-full bg-violet-500/70",style:e.normalizeStyle({width:`${s.clicks/K.value*100}%`})},null,4)])]),e.createElementVNode("div",Ue,[e.createElementVNode("span",je,[e.createVNode(e.unref(n.MousePointerClick),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(m(s.clicks)),1)]),e.createElementVNode("span",qe,[e.createVNode(e.unref(n.Eye),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(m(s.impressions)),1)]),e.createElementVNode("span",Ke,e.toDisplayString(B(s.ctr)),1),e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium w-14 justify-center",S(s.position)])}," #"+e.toDisplayString(k(s.position)),3)])])]))),128))])):e.createCommentVNode("",!0),i.value==="mapping"?(e.openBlock(),e.createElementBlock("div",Oe,[w.value.length===0?(e.openBlock(),e.createElementBlock("div",Ie," No query-page data found for this period. ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(s,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"px-4 py-3 hover:bg-muted/30 transition-colors"},[e.createElementVNode("div",He,[e.createElementVNode("span",Xe,e.toDisplayString(d+1)+".",1),e.createElementVNode("div",Ge,[e.createElementVNode("p",Je,e.toDisplayString(s.query),1),e.createElementVNode("p",{class:"text-xs text-muted-foreground truncate",title:s.page},"→ "+e.toDisplayString(L(s.page)),9,Qe)]),e.createElementVNode("div",We,[e.createElementVNode("span",Ye,[e.createVNode(e.unref(n.MousePointerClick),{class:"size-3"}),e.createTextVNode(" "+e.toDisplayString(m(s.clicks)),1)]),e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium",S(s.position)])}," #"+e.toDisplayString(k(s.position)),3)])])]))),128))])):e.createCommentVNode("",!0)]),_:1})],64)):(e.openBlock(),e.createBlock(l,{key:1,class:"p-8 text-center"},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createElementVNode("p",{class:"text-lg font-medium"},"Setup required",-1),e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-1"},"Configure your service account, property ID, and site URL in module settings.",-1)])]),_:1})):(e.openBlock(),e.createBlock(l,{key:0,class:"p-8 text-center space-y-3"},{default:e.withCtx(()=>[e.createVNode(e.unref(n.AlertTriangle),{class:"size-10 text-amber-500 mx-auto"}),t[4]||(t[4]=e.createElementVNode("p",{class:"text-lg font-medium"},"Search Console not configured",-1)),t[5]||(t[5]=e.createElementVNode("p",{class:"text-sm text-muted-foreground max-w-md mx-auto"},[e.createTextVNode(" Add your "),e.createElementVNode("strong",null,"Search Console Site URL"),e.createTextVNode(" in the module settings to enable SEO data. Use the exact format from Google Search Console (e.g. "),e.createElementVNode("code",null,"https://example.com"),e.createTextVNode(" or "),e.createElementVNode("code",null,"sc-domain:example.com"),e.createTextVNode("). ")],-1))]),_:1}))])}}});exports.default=Ze;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("@oneclick.dev/cms-kit"),o=require("lucide-vue-next"),r={class:"@container w-full"},a={class:"flex flex-col space-y-4 @5xl:flex-row @5xl:space-x-6 @5xl:space-y-0 w-full"},u={class:"hidden @5xl:block @5xl:w-1/5 @7xl:w-[255px] shrink-0 pt-8"},d={class:"flex flex-col flex-1 min-w-0"},m={class:"@5xl:hidden px-4 pt-4"},p=e.defineComponent({__name:"index",setup(_){const{pageComponent:c,resolvePath:t}=l.useModuleRoute(),n=[{to:t(""),title:"Overview",subtitle:"Key metrics & realtime",icon:o.LayoutDashboard},{to:t("/acquisition"),title:"Acquisition",subtitle:"Where your traffic comes from",icon:o.Megaphone},{to:t("/content"),title:"Content",subtitle:"Page performance & engagement",icon:o.FileText},{to:t("/audience"),title:"Audience",subtitle:"Who visits your site",icon:o.Users},{to:t("/seo"),title:"SEO Health",subtitle:"Search Console & rankings",icon:o.Search}];return(x,v)=>{const i=e.resolveComponent("VerticalNav"),s=e.resolveComponent("DrawerNav");return e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("div",a,[e.createElementVNode("div",u,[e.createVNode(i,{links:n})]),e.createElementVNode("div",d,[e.createElementVNode("div",m,[e.createVNode(s,{links:n})]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c))))])])])}}});exports.default=p;