@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,22 +1,22 @@
1
- import { defineComponent as oe, ref as f, computed as C, watch as q, onMounted as re, resolveComponent as $, openBlock as o, createElementBlock as r, createElementVNode as e, Fragment as m, renderList as g, normalizeClass as E, toDisplayString as u, createVNode as n, withCtx as l, unref as x, createCommentVNode as R, createBlock as W, createTextVNode as b, normalizeStyle as M, resolveDynamicComponent as K } from "vue";
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 me, UserPlus as fe, 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";
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { class: "flex items-center justify-between" }, Re = {
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" }, nt = { class: "flex-1 grid grid-cols-24 gap-0.5" }, lt = { 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" }, mt = { class: "text-sm flex-1 truncate" }, ft = { 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 = {
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
30
30
  setup(zt) {
31
31
  const { config: I } = ue(), { moduleId: G } = de();
32
32
  ie(() => [{ label: "Audience" }]);
33
- const h = f(!0), S = f(null), D = f("30"), p = f("browser"), A = f([]), U = f([]), N = f([]), H = f([]), V = f([]), T = C(() => !!(I.serviceAccount && I.propertyId));
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
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 ne = [
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
93
93
  h.value = !1;
94
94
  }
95
95
  }
96
- async function le() {
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
101
101
  } catch {
102
102
  }
103
103
  }
104
- return q(D, () => P()), q(p, () => le()), re(() => {
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
113
113
  ], -1)),
114
114
  T.value ? (o(), r("div", Re, [
115
115
  e("div", De, [
116
- (o(), r(m, null, g(J, (s) => e("button", {
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
- n(d, {
122
+ l(d, {
123
123
  variant: "outline",
124
124
  size: "icon",
125
125
  onClick: P,
126
126
  disabled: h.value
127
127
  }, {
128
- default: l(() => [
129
- n(x(ce), {
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
138
138
  key: 1,
139
139
  class: "p-6 border-destructive/50 bg-destructive/5"
140
140
  }, {
141
- default: l(() => [
141
+ default: n(() => [
142
142
  e("p", ze, u(S.value), 1),
143
- n(d, {
143
+ l(d, {
144
144
  variant: "outline",
145
145
  size: "sm",
146
146
  class: "mt-3",
147
147
  onClick: P
148
148
  }, {
149
- default: l(() => [...t[2] || (t[2] = [
149
+ default: n(() => [...t[2] || (t[2] = [
150
150
  b("Retry", -1)
151
151
  ])]),
152
152
  _: 1
@@ -154,15 +154,15 @@ const Ce = { class: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
154
154
  ]),
155
155
  _: 1
156
156
  })) : h.value ? (o(), r("div", Me, [
157
- n(x(me), { class: "size-8 animate-spin text-muted-foreground" })
158
- ])) : (o(), r(m, { key: 3 }, [
157
+ l(x(fe), { class: "size-8 animate-spin text-muted-foreground" })
158
+ ])) : (o(), r(f, { key: 3 }, [
159
159
  e("div", Se, [
160
- n(i, null, {
161
- default: l(() => [
162
- n(_, { class: "pb-2" }, {
163
- default: l(() => [
164
- n(c, { class: "text-base" }, {
165
- default: l(() => [...t[3] || (t[3] = [
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
170
170
  ]),
171
171
  _: 1
172
172
  }),
173
- n(w, { class: "flex flex-col items-center" }, {
174
- default: l(() => [
173
+ l(w, { class: "flex flex-col items-center" }, {
174
+ default: n(() => [
175
175
  e("div", Ae, [
176
- n(ae, {
176
+ l(ae, {
177
177
  config: Y,
178
178
  class: "mx-auto aspect-square max-h-[200px]"
179
179
  }, {
180
- default: l(() => [
181
- n(x(ye), {
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: l(() => [
186
- n(x(ke), {
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
229
229
  ]),
230
230
  _: 1
231
231
  }),
232
- n(i, { class: "@lg:col-span-2" }, {
233
- default: l(() => [
234
- n(_, { class: "pb-2" }, {
235
- default: l(() => [
236
- n(c, { class: "text-base" }, {
237
- default: l(() => [...t[7] || (t[7] = [
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
242
242
  ]),
243
243
  _: 1
244
244
  }),
245
- n(w, null, {
246
- default: l(() => [
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
257
257
  ])
258
258
  ], -1)),
259
259
  e("tbody", He, [
260
- (o(!0), r(m, null, g(A.value, (s) => (o(), r("tr", {
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(fe) : x(ge)), { class: "size-4 text-muted-foreground" })),
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
283
283
  _: 1
284
284
  })
285
285
  ]),
286
- n(i, null, {
287
- default: l(() => [
288
- n(_, { class: "pb-2" }, {
289
- default: l(() => [
290
- n(c, { class: "text-base flex items-center gap-2" }, {
291
- default: l(() => [
292
- n(x(xe), { class: "size-4" }),
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
298
298
  ]),
299
299
  _: 1
300
300
  }),
301
- n(w, null, {
302
- default: l(() => [
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", nt, [
308
- (o(), r(m, null, g(24, (s) => e("div", {
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(m, null, g(te, (s, L) => e("div", {
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", lt, u(s), 1),
318
+ e("div", nt, u(s), 1),
319
319
  e("div", at, [
320
- (o(), r(m, null, g(24, (O) => e("div", {
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
342
342
  _: 1
343
343
  }),
344
344
  e("div", rt, [
345
- n(i, null, {
346
- default: l(() => [
347
- n(_, { class: "pb-2" }, {
348
- default: l(() => [
345
+ l(i, null, {
346
+ default: n(() => [
347
+ l(_, { class: "pb-2" }, {
348
+ default: n(() => [
349
349
  e("div", ut, [
350
- n(c, { class: "text-base" }, {
351
- default: l(() => [...t[13] || (t[13] = [
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(m, null, g(ne, (s) => e("button", {
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
367
367
  ]),
368
368
  _: 1
369
369
  }),
370
- n(w, null, {
371
- default: l(() => [
370
+ l(w, null, {
371
+ default: n(() => [
372
372
  e("div", ct, [
373
- (o(!0), r(m, null, g(U.value, (s) => (o(), r("div", {
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", mt, u(s[p.value] || "(not set)"), 1),
378
- e("div", ft, [
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
391
391
  ]),
392
392
  _: 1
393
393
  }),
394
- n(i, null, {
395
- default: l(() => [
396
- n(_, { class: "pb-2" }, {
397
- default: l(() => [
398
- n(c, { class: "text-base flex items-center gap-2" }, {
399
- default: l(() => [
400
- n(x(be), { class: "size-4" }),
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
405
405
  ]),
406
406
  _: 1
407
407
  }),
408
- n(w, null, {
409
- default: l(() => [
408
+ l(w, null, {
409
+ default: n(() => [
410
410
  e("div", vt, [
411
- (o(!0), r(m, null, g(N.value, (s) => (o(), r("div", {
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
429
429
  ]),
430
430
  _: 1
431
431
  }),
432
- n(i, null, {
433
- default: l(() => [
434
- n(_, { class: "pb-2" }, {
435
- default: l(() => [
436
- n(c, { class: "text-base flex items-center gap-2" }, {
437
- default: l(() => [
438
- n(x(he), { class: "size-4" }),
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
443
443
  ]),
444
444
  _: 1
445
445
  }),
446
- n(w, null, {
447
- default: l(() => [
446
+ l(w, null, {
447
+ default: n(() => [
448
448
  e("div", yt, [
449
- (o(!0), r(m, null, g(V.value, (s) => (o(), r("div", {
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
475
475
  key: 0,
476
476
  class: "p-8 text-center"
477
477
  }, {
478
- default: l(() => [...t[1] || (t[1] = [
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: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, $e = { cla
483
483
  ]);
484
484
  };
485
485
  }
486
- }), Bt = /* @__PURE__ */ we(Ut, [["__scopeId", "data-v-6e0addf0"]]);
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;