@oneclick.dev/cms-core-modules 0.0.76 → 0.0.78

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 (38) hide show
  1. package/dist/AppointmentDetailsCard-BfBwWxTU.js +1 -0
  2. package/dist/{AppointmentDetailsCard-i4Ky8WnK.mjs → AppointmentDetailsCard-SMNXi117.mjs} +43 -42
  3. package/dist/AppointmentListTable-Dk-CnNR6.js +1 -0
  4. package/dist/{AppointmentListTable-G5dIeCYj.mjs → AppointmentListTable-vMSMt0M5.mjs} +24 -23
  5. package/dist/{ContentEditor-3JFlC9N1.js → ContentEditor-4e80zFyn.js} +1 -1
  6. package/dist/{ContentEditor-7SDjf5Hk.mjs → ContentEditor-Dk-iDEjl.mjs} +1 -1
  7. package/dist/{CountryBreakdownCard-Dc_vZ9dJ.mjs → CountryBreakdownCard-B_VhBsm8.mjs} +27 -26
  8. package/dist/CountryBreakdownCard-Ghg0Wz-h.js +1 -0
  9. package/dist/{DeviceBreakdownCard-BJcQNo8a.mjs → DeviceBreakdownCard-CQR65Zr_.mjs} +50 -49
  10. package/dist/DeviceBreakdownCard-Cpcj75Rv.js +1 -0
  11. package/dist/PeakHoursCard-CFIg8dys.js +1 -0
  12. package/dist/{PeakHoursCard-hV8PdGsf.mjs → PeakHoursCard-_1JS0tpZ.mjs} +51 -50
  13. package/dist/{ProductDetailsCard-CJBkZSER.mjs → ProductDetailsCard-C5gqBJag.mjs} +20 -19
  14. package/dist/ProductDetailsCard-Ce11f_9r.js +1 -0
  15. package/dist/RealtimeCard-CatAzdxv.js +1 -0
  16. package/dist/{RealtimeCard-CRJHS64l.mjs → RealtimeCard-CtX6Yyk-.mjs} +33 -32
  17. package/dist/SearchTermsCard-BPAdRL-r.js +1 -0
  18. package/dist/{SearchTermsCard-Dwa-P7My.mjs → SearchTermsCard-DzSu9jzo.mjs} +38 -37
  19. package/dist/TopPagesCard-BA9Are_Z.js +1 -0
  20. package/dist/{TopPagesCard-Dv52to_J.mjs → TopPagesCard-D7lH_QYV.mjs} +27 -26
  21. package/dist/TrafficSourcesCard-DV13ZOBq.js +1 -0
  22. package/dist/{TrafficSourcesCard-CMhcj2k2.mjs → TrafficSourcesCard-Fng3fVh7.mjs} +53 -52
  23. package/dist/VisitorStatsCard-CAzAZtKD.js +1 -0
  24. package/dist/{VisitorStatsCard-BHn4oSnt.mjs → VisitorStatsCard-CuXXnMBc.mjs} +22 -21
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.mjs +12 -12
  27. package/package.json +3 -2
  28. package/dist/AppointmentDetailsCard-CtK0Cj_O.js +0 -1
  29. package/dist/AppointmentListTable-CQ3uXfa8.js +0 -1
  30. package/dist/CountryBreakdownCard-BUfJ-umQ.js +0 -1
  31. package/dist/DeviceBreakdownCard-CsoK6JUO.js +0 -1
  32. package/dist/PeakHoursCard-BNl_U1r_.js +0 -1
  33. package/dist/ProductDetailsCard-BwktdlIf.js +0 -1
  34. package/dist/RealtimeCard-CxtqQHee.js +0 -1
  35. package/dist/SearchTermsCard-DGRbo5ZP.js +0 -1
  36. package/dist/TopPagesCard-pZ-nAsaI.js +0 -1
  37. package/dist/TrafficSourcesCard-CBOPV1J1.js +0 -1
  38. package/dist/VisitorStatsCard-tApB_7v8.js +0 -1
@@ -1,18 +1,19 @@
1
1
  import { defineComponent as C, computed as i, ref as m, onMounted as z, resolveComponent as E, openBlock as a, createElementBlock as n, unref as t, createVNode as p, createElementVNode as r, toDisplayString as c, createBlock as L, normalizeClass as M, createCommentVNode as g, withCtx as V, createTextVNode as $ } from "vue";
2
2
  import { Loader2 as j, Package as P, ExternalLink as S } from "lucide-vue-next";
3
- const A = { class: "w-full" }, B = {
3
+ import { useRoute as A, useModuleApi as B } from "@oneclick.dev/cms-kit";
4
+ const D = { class: "w-full" }, F = {
4
5
  key: 0,
5
6
  class: "flex items-center gap-2 py-3"
6
- }, D = {
7
+ }, R = {
7
8
  key: 1,
8
9
  class: "text-xs text-destructive py-2"
9
- }, F = {
10
+ }, T = {
10
11
  key: 2,
11
12
  class: "rounded-xl border bg-background p-3 space-y-3"
12
- }, R = { class: "flex items-start gap-3" }, T = { class: "shrink-0 size-16 rounded-lg bg-muted overflow-hidden flex items-center justify-center" }, U = ["src", "alt"], q = { class: "flex-1 min-w-0" }, G = { class: "text-sm font-semibold truncate" }, H = { class: "text-lg font-bold mt-0.5" }, J = { class: "flex items-center gap-2 mt-1" }, K = { class: "text-xs text-muted-foreground" }, O = {
13
+ }, U = { class: "flex items-start gap-3" }, q = { class: "shrink-0 size-16 rounded-lg bg-muted overflow-hidden flex items-center justify-center" }, G = ["src", "alt"], H = { class: "flex-1 min-w-0" }, J = { class: "text-sm font-semibold truncate" }, K = { class: "text-lg font-bold mt-0.5" }, O = { class: "flex items-center gap-2 mt-1" }, Q = { class: "text-xs text-muted-foreground" }, W = {
13
14
  key: 0,
14
15
  class: "text-xs text-muted-foreground line-clamp-2"
15
- }, X = /* @__PURE__ */ C({
16
+ }, ee = /* @__PURE__ */ C({
16
17
  __name: "ProductDetailsCard",
17
18
  props: {
18
19
  toolName: {},
@@ -24,7 +25,7 @@ const A = { class: "w-full" }, B = {
24
25
  },
25
26
  emits: ["submit"],
26
27
  setup(f, { emit: v }) {
27
- const u = f, _ = v, y = useRoute(), b = i(() => y.params.slug), k = useModuleApi(u.instanceId), d = m(!0), o = m(null), e = m(null);
28
+ const u = f, _ = v, y = A(), b = i(() => y.params.slug), k = B(u.instanceId), d = m(!0), o = m(null), e = m(null);
28
29
  async function h() {
29
30
  const l = u.resolvedArgs?.productId;
30
31
  if (!l) {
@@ -72,35 +73,35 @@ const A = { class: "w-full" }, B = {
72
73
  });
73
74
  return (l, s) => {
74
75
  const I = E("NuxtLink");
75
- return a(), n("div", A, [
76
- t(d) ? (a(), n("div", B, [
76
+ return a(), n("div", D, [
77
+ t(d) ? (a(), n("div", F, [
77
78
  p(t(j), { class: "size-4 animate-spin text-muted-foreground" }),
78
79
  s[0] || (s[0] = r("span", { class: "text-xs text-muted-foreground" }, "Loading product…", -1))
79
- ])) : t(o) ? (a(), n("div", D, c(t(o)), 1)) : t(e) ? (a(), n("div", F, [
80
- r("div", R, [
81
- r("div", T, [
80
+ ])) : t(o) ? (a(), n("div", R, c(t(o)), 1)) : t(e) ? (a(), n("div", T, [
81
+ r("div", U, [
82
+ r("div", q, [
82
83
  t(e).featuredMedia ? (a(), n("img", {
83
84
  key: 0,
84
85
  src: t(e).featuredMedia,
85
86
  alt: t(e).title,
86
87
  class: "size-full object-cover"
87
- }, null, 8, U)) : (a(), L(t(P), {
88
+ }, null, 8, G)) : (a(), L(t(P), {
88
89
  key: 1,
89
90
  class: "size-6 text-muted-foreground"
90
91
  }))
91
92
  ]),
92
- r("div", q, [
93
- r("p", G, c(t(e).title), 1),
94
- r("p", H, c(t(N)), 1),
95
- r("div", J, [
93
+ r("div", H, [
94
+ r("p", J, c(t(e).title), 1),
95
+ r("p", K, c(t(N)), 1),
96
+ r("div", O, [
96
97
  r("span", {
97
98
  class: M(["text-[10px] font-medium px-1.5 py-0.5 rounded-full uppercase", t(w)])
98
99
  }, c(t(e).status), 3),
99
- r("span", K, " Stock: " + c(t(e).stock ?? "—"), 1)
100
+ r("span", Q, " Stock: " + c(t(e).stock ?? "—"), 1)
100
101
  ])
101
102
  ])
102
103
  ]),
103
- t(e).description ? (a(), n("p", O, c(t(e).description), 1)) : g("", !0),
104
+ t(e).description ? (a(), n("p", W, c(t(e).description), 1)) : g("", !0),
104
105
  p(I, {
105
106
  to: `/projects/${t(b)}/modules/${f.instanceId}/${t(e).id}`,
106
107
  class: "inline-flex items-center gap-1.5 text-xs text-primary hover:underline"
@@ -117,5 +118,5 @@ const A = { class: "w-full" }, B = {
117
118
  }
118
119
  });
119
120
  export {
120
- X as default
121
+ ee as default
121
122
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("lucide-vue-next"),d=require("@oneclick.dev/cms-kit"),_={class:"w-full"},b={key:0,class:"flex items-center gap-2 py-3"},N={key:1,class:"text-xs text-destructive py-2"},h={key:2,class:"rounded-xl border bg-background p-3 space-y-3"},E={class:"flex items-start gap-3"},V={class:"shrink-0 size-16 rounded-lg bg-muted overflow-hidden flex items-center justify-center"},B=["src","alt"],S={class:"flex-1 min-w-0"},w={class:"text-sm font-semibold truncate"},C={class:"text-lg font-bold mt-0.5"},D={class:"flex items-center gap-2 mt-1"},I={class:"text-xs text-muted-foreground"},z={key:0,class:"text-xs text-muted-foreground line-clamp-2"},M=e.defineComponent({__name:"ProductDetailsCard",props:{toolName:{},instanceId:{},instanceName:{},moduleType:{},resolvedArgs:{},status:{}},emits:["submit"],setup(l,{emit:i}){const n=l,m=i,p=d.useRoute(),f=e.computed(()=>p.params.slug),g=d.useModuleApi(n.instanceId),a=e.ref(!0),o=e.ref(null),t=e.ref(null);async function x(){const s=n.resolvedArgs?.productId;if(!s){o.value="No product ID provided",a.value=!1;return}a.value=!0,o.value=null;try{const r=await g.get(`/products/${s}`);t.value=r,u({productId:t.value.id,title:t.value.title,price:t.value.price,currency:t.value.currency,stock:t.value.stock,status:t.value.status,available:t.value.available})}catch(r){o.value=r?.data?.statusMessage||r?.message||"Failed to load product",u(`Error fetching product: ${o.value}`)}finally{a.value=!1}}e.onMounted(()=>{x()});function u(s){n.status!=="completed"&&m("submit",s)}const v=e.computed(()=>t.value?new Intl.NumberFormat(void 0,{style:"currency",currency:t.value.currency||"EUR"}).format(t.value.price):""),k=e.computed(()=>{switch(t.value?.status){case"published":return"text-emerald-600 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-900/20";case"draft":return"text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20";case"archived":return"text-gray-600 dark:text-gray-400 bg-gray-100 dark:bg-gray-800";default:return"text-muted-foreground bg-muted"}});return(s,r)=>{const y=e.resolveComponent("NuxtLink");return e.openBlock(),e.createElementBlock("div",_,[e.unref(a)?(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(e.unref(c.Loader2),{class:"size-4 animate-spin text-muted-foreground"}),r[0]||(r[0]=e.createElementVNode("span",{class:"text-xs text-muted-foreground"},"Loading product…",-1))])):e.unref(o)?(e.openBlock(),e.createElementBlock("div",N,e.toDisplayString(e.unref(o)),1)):e.unref(t)?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",E,[e.createElementVNode("div",V,[e.unref(t).featuredMedia?(e.openBlock(),e.createElementBlock("img",{key:0,src:e.unref(t).featuredMedia,alt:e.unref(t).title,class:"size-full object-cover"},null,8,B)):(e.openBlock(),e.createBlock(e.unref(c.Package),{key:1,class:"size-6 text-muted-foreground"}))]),e.createElementVNode("div",S,[e.createElementVNode("p",w,e.toDisplayString(e.unref(t).title),1),e.createElementVNode("p",C,e.toDisplayString(e.unref(v)),1),e.createElementVNode("div",D,[e.createElementVNode("span",{class:e.normalizeClass(["text-[10px] font-medium px-1.5 py-0.5 rounded-full uppercase",e.unref(k)])},e.toDisplayString(e.unref(t).status),3),e.createElementVNode("span",I," Stock: "+e.toDisplayString(e.unref(t).stock??"—"),1)])])]),e.unref(t).description?(e.openBlock(),e.createElementBlock("p",z,e.toDisplayString(e.unref(t).description),1)):e.createCommentVNode("",!0),e.createVNode(y,{to:`/projects/${e.unref(f)}/modules/${l.instanceId}/${e.unref(t).id}`,class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.ExternalLink),{class:"size-3"}),r[1]||(r[1]=e.createTextVNode(" View full details ",-1))]),_:1},8,["to"])])):e.createCommentVNode("",!0)])}}});exports.default=M;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("lucide-vue-next"),p=require("@oneclick.dev/cms-kit"),k={class:"w-full"},E={key:0,class:"flex items-center gap-2 py-3"},b={key:1,class:"text-xs text-destructive py-2"},B={key:2,class:"rounded-xl border bg-background overflow-hidden"},w={class:"px-3 py-2 border-b bg-muted/40 flex items-center justify-between"},S={class:"flex items-center gap-2"},U={class:"px-3 py-4 text-center"},A={class:"flex items-center justify-center gap-2 mb-1"},D={class:"text-3xl font-bold"},j={class:"text-xs text-muted-foreground"},z={key:0,class:"border-t"},C={class:"divide-y"},L=["title"],R={class:"flex items-center gap-1 text-[10px] text-muted-foreground shrink-0 ml-2"},P={class:"font-medium"},F={class:"px-3 py-2 border-t bg-muted/20 flex items-center justify-between"},I={key:0,class:"text-[10px] text-muted-foreground"},M=e.defineComponent({__name:"RealtimeCard",props:{toolName:{},instanceId:{},instanceName:{},moduleType:{},resolvedArgs:{},status:{}},emits:["submit"],setup(u,{emit:f}){const n=u,g=f,v=p.useRoute(),x=e.computed(()=>v.params.slug),y=p.useModuleApi(n.instanceId),i=e.ref(!0),o=e.ref(null),a=e.ref(0),r=e.ref([]),c=e.ref(null);function N(){const s=n.resolvedArgs?._cachedData;return s?(a.value=s.activeUsersRightNow||0,r.value=(s.topActivePages||[]).map(t=>({page:t.page,activeUsers:t.activeUsers})),c.value=n.resolvedArgs._fetchedAt||null,i.value=!1,!0):!1}async function _(){i.value=!0,o.value=null;try{const s=await y.get("/realtime");a.value=s.activeUsers||0,r.value=s.activePages||[],c.value=new Date().toISOString(),m({activeUsersRightNow:a.value,topActivePages:r.value.map(t=>({page:t.page,activeUsers:t.activeUsers}))})}catch(s){o.value=s?.data?.statusMessage||s?.message||"Failed to load realtime data",m(`Error loading realtime data: ${o.value}`)}finally{i.value=!1}}e.onMounted(()=>{n.status==="completed"&&N()||_()});function m(s){n.status!=="completed"&&g("submit",s)}const h=s=>s?new Date(s).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"";return(s,t)=>{const V=e.resolveComponent("NuxtLink");return e.openBlock(),e.createElementBlock("div",k,[e.unref(i)?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(e.unref(l.Loader2),{class:"size-4 animate-spin text-muted-foreground"}),t[0]||(t[0]=e.createElementVNode("span",{class:"text-xs text-muted-foreground"},"Loading realtime data…",-1))])):e.unref(o)?(e.openBlock(),e.createElementBlock("div",b,e.toDisplayString(e.unref(o)),1)):(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",w,[e.createElementVNode("div",S,[e.createVNode(e.unref(l.Radio),{class:"size-3.5 text-emerald-500"}),t[1]||(t[1]=e.createElementVNode("span",{class:"text-xs font-medium"},"Realtime",-1))]),t[2]||(t[2]=e.createElementVNode("span",{class:"relative flex size-2"},[e.createElementVNode("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),e.createElementVNode("span",{class:"relative inline-flex rounded-full size-2 bg-emerald-500"})],-1))]),e.createElementVNode("div",U,[e.createElementVNode("div",A,[e.createVNode(e.unref(l.Users),{class:"size-5 text-primary"}),e.createElementVNode("span",D,e.toDisplayString(e.unref(a)),1)]),e.createElementVNode("p",j,"active "+e.toDisplayString(e.unref(a)===1?"user":"users")+" right now",1)]),e.unref(r).length>0?(e.openBlock(),e.createElementBlock("div",z,[t[3]||(t[3]=e.createElementVNode("div",{class:"px-3 py-1.5 bg-muted/20"},[e.createElementVNode("span",{class:"text-[10px] font-medium text-muted-foreground uppercase tracking-wide"},"Active Pages")],-1)),e.createElementVNode("div",C,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),d=>(e.openBlock(),e.createElementBlock("div",{key:d.page,class:"px-3 py-2 flex items-center justify-between hover:bg-muted/30 transition-colors"},[e.createElementVNode("span",{class:"text-xs truncate flex-1",title:d.page},e.toDisplayString(d.page),9,L),e.createElementVNode("div",R,[e.createVNode(e.unref(l.Users),{class:"size-2.5"}),e.createElementVNode("span",P,e.toDisplayString(d.activeUsers),1)])]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",F,[e.unref(c)?(e.openBlock(),e.createElementBlock("span",I," Fetched "+e.toDisplayString(h(e.unref(c))),1)):e.createCommentVNode("",!0),e.createVNode(V,{to:`/projects/${e.unref(x)}/modules/${u.instanceId}`,class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ExternalLink),{class:"size-3"}),t[4]||(t[4]=e.createTextVNode(" View full report ",-1))]),_:1},8,["to"])])]))])}}});exports.default=M;
@@ -1,21 +1,22 @@
1
- import { defineComponent as R, computed as j, ref as m, onMounted as C, resolveComponent as S, openBlock as i, createElementBlock as n, unref as a, createVNode as o, createElementVNode as e, toDisplayString as r, Fragment as P, renderList as V, createCommentVNode as _, withCtx as D, createTextVNode as E } from "vue";
1
+ import { defineComponent as R, computed as j, ref as m, onMounted as C, resolveComponent as S, openBlock as o, createElementBlock as i, unref as a, createVNode as n, createElementVNode as e, toDisplayString as r, Fragment as P, renderList as V, createCommentVNode as _, withCtx as D, createTextVNode as E } from "vue";
2
2
  import { Loader2 as F, Radio as I, Users as h, ExternalLink as M } from "lucide-vue-next";
3
- const T = { class: "w-full" }, $ = {
3
+ import { useRoute as T, useModuleApi as $ } from "@oneclick.dev/cms-kit";
4
+ const B = { class: "w-full" }, O = {
4
5
  key: 0,
5
6
  class: "flex items-center gap-2 py-3"
6
- }, B = {
7
+ }, q = {
7
8
  key: 1,
8
9
  class: "text-xs text-destructive py-2"
9
- }, O = {
10
+ }, G = {
10
11
  key: 2,
11
12
  class: "rounded-xl border bg-background overflow-hidden"
12
- }, q = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, G = { class: "flex items-center gap-2" }, H = { class: "px-3 py-4 text-center" }, J = { class: "flex items-center justify-center gap-2 mb-1" }, K = { class: "text-3xl font-bold" }, Q = { class: "text-xs text-muted-foreground" }, W = {
13
+ }, H = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, J = { class: "flex items-center gap-2" }, K = { class: "px-3 py-4 text-center" }, Q = { class: "flex items-center justify-center gap-2 mb-1" }, W = { class: "text-3xl font-bold" }, X = { class: "text-xs text-muted-foreground" }, Y = {
13
14
  key: 0,
14
15
  class: "border-t"
15
- }, X = { class: "divide-y" }, Y = ["title"], Z = { class: "flex items-center gap-1 text-[10px] text-muted-foreground shrink-0 ml-2" }, ee = { class: "font-medium" }, te = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, se = {
16
+ }, Z = { class: "divide-y" }, ee = ["title"], te = { class: "flex items-center gap-1 text-[10px] text-muted-foreground shrink-0 ml-2" }, se = { class: "font-medium" }, ae = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, oe = {
16
17
  key: 0,
17
18
  class: "text-[10px] text-muted-foreground"
18
- }, ne = /* @__PURE__ */ R({
19
+ }, le = /* @__PURE__ */ R({
19
20
  __name: "RealtimeCard",
20
21
  props: {
21
22
  toolName: {},
@@ -27,7 +28,7 @@ const T = { class: "w-full" }, $ = {
27
28
  },
28
29
  emits: ["submit"],
29
30
  setup(v, { emit: y }) {
30
- const l = v, b = y, w = useRoute(), k = j(() => w.params.slug), N = useModuleApi(l.instanceId), p = m(!0), d = m(null), c = m(0), u = m([]), f = m(null);
31
+ const l = v, b = y, w = T(), k = j(() => w.params.slug), N = $(l.instanceId), p = m(!0), d = m(null), c = m(0), u = m([]), f = m(null);
31
32
  function U() {
32
33
  const s = l.resolvedArgs?._cachedData;
33
34
  return s ? (c.value = s.activeUsersRightNow || 0, u.value = (s.topActivePages || []).map((t) => ({
@@ -61,14 +62,14 @@ const T = { class: "w-full" }, $ = {
61
62
  const z = (s) => s ? new Date(s).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }) : "";
62
63
  return (s, t) => {
63
64
  const L = S("NuxtLink");
64
- return i(), n("div", T, [
65
- a(p) ? (i(), n("div", $, [
66
- o(a(F), { class: "size-4 animate-spin text-muted-foreground" }),
65
+ return o(), i("div", B, [
66
+ a(p) ? (o(), i("div", O, [
67
+ n(a(F), { class: "size-4 animate-spin text-muted-foreground" }),
67
68
  t[0] || (t[0] = e("span", { class: "text-xs text-muted-foreground" }, "Loading realtime data…", -1))
68
- ])) : a(d) ? (i(), n("div", B, r(a(d)), 1)) : (i(), n("div", O, [
69
- e("div", q, [
70
- e("div", G, [
71
- o(a(I), { class: "size-3.5 text-emerald-500" }),
69
+ ])) : a(d) ? (o(), i("div", q, r(a(d)), 1)) : (o(), i("div", G, [
70
+ e("div", H, [
71
+ e("div", J, [
72
+ n(a(I), { class: "size-3.5 text-emerald-500" }),
72
73
  t[1] || (t[1] = e("span", { class: "text-xs font-medium" }, "Realtime", -1))
73
74
  ]),
74
75
  t[2] || (t[2] = e("span", { class: "relative flex size-2" }, [
@@ -76,41 +77,41 @@ const T = { class: "w-full" }, $ = {
76
77
  e("span", { class: "relative inline-flex rounded-full size-2 bg-emerald-500" })
77
78
  ], -1))
78
79
  ]),
79
- e("div", H, [
80
- e("div", J, [
81
- o(a(h), { class: "size-5 text-primary" }),
82
- e("span", K, r(a(c)), 1)
80
+ e("div", K, [
81
+ e("div", Q, [
82
+ n(a(h), { class: "size-5 text-primary" }),
83
+ e("span", W, r(a(c)), 1)
83
84
  ]),
84
- e("p", Q, "active " + r(a(c) === 1 ? "user" : "users") + " right now", 1)
85
+ e("p", X, "active " + r(a(c) === 1 ? "user" : "users") + " right now", 1)
85
86
  ]),
86
- a(u).length > 0 ? (i(), n("div", W, [
87
+ a(u).length > 0 ? (o(), i("div", Y, [
87
88
  t[3] || (t[3] = e("div", { class: "px-3 py-1.5 bg-muted/20" }, [
88
89
  e("span", { class: "text-[10px] font-medium text-muted-foreground uppercase tracking-wide" }, "Active Pages")
89
90
  ], -1)),
90
- e("div", X, [
91
- (i(!0), n(P, null, V(a(u), (x) => (i(), n("div", {
91
+ e("div", Z, [
92
+ (o(!0), i(P, null, V(a(u), (x) => (o(), i("div", {
92
93
  key: x.page,
93
94
  class: "px-3 py-2 flex items-center justify-between hover:bg-muted/30 transition-colors"
94
95
  }, [
95
96
  e("span", {
96
97
  class: "text-xs truncate flex-1",
97
98
  title: x.page
98
- }, r(x.page), 9, Y),
99
- e("div", Z, [
100
- o(a(h), { class: "size-2.5" }),
101
- e("span", ee, r(x.activeUsers), 1)
99
+ }, r(x.page), 9, ee),
100
+ e("div", te, [
101
+ n(a(h), { class: "size-2.5" }),
102
+ e("span", se, r(x.activeUsers), 1)
102
103
  ])
103
104
  ]))), 128))
104
105
  ])
105
106
  ])) : _("", !0),
106
- e("div", te, [
107
- a(f) ? (i(), n("span", se, " Fetched " + r(z(a(f))), 1)) : _("", !0),
108
- o(L, {
107
+ e("div", ae, [
108
+ a(f) ? (o(), i("span", oe, " Fetched " + r(z(a(f))), 1)) : _("", !0),
109
+ n(L, {
109
110
  to: `/projects/${a(k)}/modules/${v.instanceId}`,
110
111
  class: "inline-flex items-center gap-1.5 text-xs text-primary hover:underline"
111
112
  }, {
112
113
  default: D(() => [
113
- o(a(M), { class: "size-3" }),
114
+ n(a(M), { class: "size-3" }),
114
115
  t[4] || (t[4] = E(" View full report ", -1))
115
116
  ]),
116
117
  _: 1
@@ -122,5 +123,5 @@ const T = { class: "w-full" }, $ = {
122
123
  }
123
124
  });
124
125
  export {
125
- ne as default
126
+ le as default
126
127
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("lucide-vue-next"),N=require("@oneclick.dev/cms-kit"),P={class:"w-full"},M={key:0,class:"flex items-center gap-2 py-3"},R={key:1,class:"text-xs text-destructive py-2"},U={key:2,class:"rounded-xl border bg-background p-4 text-center space-y-2"},j={key:3,class:"rounded-xl border bg-background overflow-hidden"},q={class:"px-3 py-2 border-b bg-muted/40 flex items-center justify-between"},G={class:"flex items-center gap-2"},I={class:"text-xs font-medium"},K={class:"text-[10px] text-muted-foreground"},Q={class:"divide-y"},O={class:"flex items-center gap-2 mb-1.5"},H={class:"text-[10px] font-medium text-muted-foreground w-5 text-right shrink-0"},J={class:"text-xs font-medium truncate flex-1"},W={class:"ml-7 space-y-1.5"},X={class:"h-1.5 rounded-full bg-muted overflow-hidden"},Y={key:0,class:"flex items-center gap-3 text-[10px] text-muted-foreground"},Z={class:"flex items-center gap-1"},ee={class:"flex items-center gap-1"},te={class:"flex items-center gap-1"},se={class:"flex items-center gap-1"},oe={key:1,class:"flex items-center gap-3 text-[10px] text-muted-foreground"},ne={class:"flex items-center gap-1"},re={class:"flex items-center gap-1"},ae={class:"flex items-center gap-1"},ce={class:"px-3 py-2 border-t bg-muted/20 flex items-center justify-between"},le={class:"text-[10px] text-muted-foreground"},ie=e.defineComponent({__name:"SearchTermsCard",props:{toolName:{},instanceId:{},instanceName:{},moduleType:{},resolvedArgs:{},status:{}},emits:["submit"],setup(x,{emit:V}){const i=x,k=V,S=N.useRoute(),b=e.computed(()=>S.params.slug),E=N.useModuleApi(i.instanceId),m=e.ref(!0),d=e.ref(null),o=e.ref([]),_=e.ref(0),g=e.ref(null),u=e.ref("google_ads"),T=t=>t.label||t.query||t.sessionGoogleAdsQuery||t.landingPagePlusQueryString||"—";function D(){const t=i.resolvedArgs?._cachedData;return t?(u.value=t.source||"google_ads",t.source==="search_console"?o.value=(t.searchTerms||[]).map(s=>({label:s.term,clicks:s.clicks,impressions:s.impressions,ctr:s.ctr,position:s.position})):o.value=(t.searchTerms||[]).map(s=>({label:s.term,sessions:s.sessions,totalUsers:s.users,engagementRate:parseFloat(s.engagementRate)/100})),_.value=t.count||o.value.length,g.value=i.resolvedArgs._fetchedAt||null,m.value=!1,!0):!1}async function B(){const{startDate:t,endDate:s}=i.resolvedArgs||{};m.value=!0,d.value=null;try{const a=new URLSearchParams;t&&a.set("startDate",t),s&&a.set("endDate",s);const n=await E.get(`/content/search-terms?${a.toString()}`),l=n.source||"google_ads";if(u.value=l,l==="search_console")o.value=(n.rows||[]).map(r=>({...r,label:r.query}));else{const r=l==="organic_landing_pages"?"landingPagePlusQueryString":"sessionGoogleAdsQuery";o.value=(n.rows||[]).map(f=>({...f,label:f[r]}))}_.value=n.rowCount||o.value.length,g.value=new Date().toISOString();const A=()=>{if(o.value.length===0)return"No search data found for this period.";const r=o.value.slice(0,5).map(f=>f.label).join(", ");return l==="search_console"?`Found ${o.value.length} search queries from Google Search Console. The top keywords are: ${r}.`:l==="organic_landing_pages"?`Found ${o.value.length} pages receiving organic search traffic. The top organic landing pages are: ${r}.`:`Found ${o.value.length} search terms. The top keywords driving traffic are: ${r}.`},F=o.value.map(r=>l==="search_console"?{term:r.label,clicks:r.clicks,impressions:r.impressions,ctr:r.ctr,position:r.position}:{term:r.label,sessions:r.sessions,users:r.totalUsers,engagementRate:`${(r.engagementRate*100).toFixed(1)}%`});v({count:o.value.length,source:l,searchTerms:F,suggestion:A()})}catch(a){d.value=a?.data?.statusMessage||a?.message||"Failed to load search data",v(`Error loading search data: ${d.value}`)}finally{m.value=!1}}e.onMounted(()=>{i.status==="completed"&&D()||B()});function v(t){i.status!=="completed"&&k("submit",t)}const p=t=>t==null?"0":Math.round(t).toLocaleString(),y=t=>t==null?"0%":`${(t*100).toFixed(1)}%`,$=t=>t==null?"—":t.toFixed(1),w=t=>t?new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"",h=e.computed(()=>u.value==="search_console"),C=e.computed(()=>o.value.length===0?1:h.value?Math.max(...o.value.map(t=>t.clicks||0)):Math.max(...o.value.map(t=>t.sessions||0))),L=e.computed(()=>u.value==="search_console"?"Search Keywords (Search Console)":u.value==="organic_landing_pages"?"Top Organic Landing Pages":"Search Terms & Keywords"),z=e.computed(()=>{const{startDate:t,endDate:s}=i.resolvedArgs||{};if(!t&&!s)return"Last 30 days";const a=t||"30daysAgo",n=a.match(/^(\d+)daysAgo$/);return n?`Last ${n[1]} days`:`${a} → ${s||"today"}`});return(t,s)=>{const a=e.resolveComponent("NuxtLink");return e.openBlock(),e.createElementBlock("div",P,[e.unref(m)?(e.openBlock(),e.createElementBlock("div",M,[e.createVNode(e.unref(c.Loader2),{class:"size-4 animate-spin text-muted-foreground"}),s[0]||(s[0]=e.createElementVNode("span",{class:"text-xs text-muted-foreground"},"Loading search data…",-1))])):e.unref(d)?(e.openBlock(),e.createElementBlock("div",R,e.toDisplayString(e.unref(d)),1)):e.unref(o).length===0?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(e.unref(c.Search),{class:"size-8 text-muted-foreground mx-auto"}),s[1]||(s[1]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"},"No search data found for this period.",-1))])):(e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",q,[e.createElementVNode("div",G,[e.createVNode(e.unref(c.Search),{class:"size-3.5 text-primary"}),e.createElementVNode("span",I,e.toDisplayString(e.unref(L)),1)]),e.createElementVNode("span",K,e.toDisplayString(e.unref(z)),1)]),e.createElementVNode("div",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(n,l)=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"px-3 py-2.5 hover:bg-muted/30 transition-colors"},[e.createElementVNode("div",O,[e.createElementVNode("span",H,e.toDisplayString(l+1)+".",1),e.createElementVNode("span",J,e.toDisplayString(T(n)),1)]),e.createElementVNode("div",W,[e.createElementVNode("div",X,[e.createElementVNode("div",{class:"h-full rounded-full bg-amber-500/70 transition-all",style:e.normalizeStyle({width:`${((e.unref(h)?n.clicks:n.sessions)||0)/e.unref(C)*100}%`})},null,4)]),e.unref(h)?(e.openBlock(),e.createElementBlock("div",Y,[e.createElementVNode("span",Z,[e.createVNode(e.unref(c.MousePointerClick),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(p(n.clicks))+" clicks ",1)]),e.createElementVNode("span",ee,[e.createVNode(e.unref(c.Eye),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(p(n.impressions))+" impr. ",1)]),e.createElementVNode("span",te,[e.createVNode(e.unref(c.TrendingUp),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(y(n.ctr))+" CTR ",1)]),e.createElementVNode("span",se,[e.createVNode(e.unref(c.Hash),{class:"size-2.5"}),e.createTextVNode(" pos "+e.toDisplayString($(n.position)),1)])])):(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("span",ne,[e.createVNode(e.unref(c.MousePointerClick),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(p(n.sessions))+" sessions ",1)]),e.createElementVNode("span",re,[e.createVNode(e.unref(c.Users),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(p(n.totalUsers))+" users ",1)]),e.createElementVNode("span",ae,[e.createVNode(e.unref(c.TrendingUp),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(y(n.engagementRate))+" engaged ",1)])]))])]))),128))]),e.createElementVNode("div",ce,[e.createElementVNode("span",le,[e.createTextVNode(e.toDisplayString(e.unref(o).length)+" result"+e.toDisplayString(e.unref(o).length===1?"":"s")+" ",1),e.unref(g)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" · fetched "+e.toDisplayString(w(e.unref(g))),1)],64)):e.createCommentVNode("",!0)]),e.createVNode(a,{to:`/projects/${e.unref(b)}/modules/${x.instanceId}`,class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.ExternalLink),{class:"size-3"}),s[2]||(s[2]=e.createTextVNode(" View full report ",-1))]),_:1},8,["to"])])]))])}}});exports.default=ie;
@@ -1,24 +1,25 @@
1
- import { defineComponent as O, computed as _, ref as h, onMounted as H, resolveComponent as J, openBlock as u, createElementBlock as m, unref as s, createVNode as l, createElementVNode as o, toDisplayString as i, Fragment as C, renderList as W, normalizeStyle as X, createTextVNode as g, createCommentVNode as Y, withCtx as Z } from "vue";
1
+ import { defineComponent as O, computed as _, ref as f, onMounted as H, resolveComponent as J, openBlock as u, createElementBlock as m, unref as s, createVNode as l, createElementVNode as o, toDisplayString as i, Fragment as C, renderList as W, normalizeStyle as X, createTextVNode as g, createCommentVNode as Y, withCtx as Z } from "vue";
2
2
  import { Loader2 as ee, Search as z, MousePointerClick as A, Eye as se, TrendingUp as N, Hash as te, Users as oe, ExternalLink as ne } from "lucide-vue-next";
3
- const ae = { class: "w-full" }, re = {
3
+ import { useRoute as ae, useModuleApi as re } from "@oneclick.dev/cms-kit";
4
+ const ie = { class: "w-full" }, le = {
4
5
  key: 0,
5
6
  class: "flex items-center gap-2 py-3"
6
- }, ie = {
7
+ }, ce = {
7
8
  key: 1,
8
9
  class: "text-xs text-destructive py-2"
9
- }, le = {
10
+ }, de = {
10
11
  key: 2,
11
12
  class: "rounded-xl border bg-background p-4 text-center space-y-2"
12
- }, ce = {
13
+ }, ue = {
13
14
  key: 3,
14
15
  class: "rounded-xl border bg-background overflow-hidden"
15
- }, de = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, ue = { class: "flex items-center gap-2" }, me = { class: "text-xs font-medium" }, ge = { class: "text-[10px] text-muted-foreground" }, pe = { class: "divide-y" }, he = { class: "flex items-center gap-2 mb-1.5" }, fe = { class: "text-[10px] font-medium text-muted-foreground w-5 text-right shrink-0" }, xe = { class: "text-xs font-medium truncate flex-1" }, _e = { class: "ml-7 space-y-1.5" }, ve = { class: "h-1.5 rounded-full bg-muted overflow-hidden" }, ye = {
16
+ }, me = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, ge = { class: "flex items-center gap-2" }, pe = { class: "text-xs font-medium" }, fe = { class: "text-[10px] text-muted-foreground" }, he = { class: "divide-y" }, xe = { class: "flex items-center gap-2 mb-1.5" }, _e = { class: "text-[10px] font-medium text-muted-foreground w-5 text-right shrink-0" }, ve = { class: "text-xs font-medium truncate flex-1" }, ye = { class: "ml-7 space-y-1.5" }, be = { class: "h-1.5 rounded-full bg-muted overflow-hidden" }, ke = {
16
17
  key: 0,
17
18
  class: "flex items-center gap-3 text-[10px] text-muted-foreground"
18
- }, be = { class: "flex items-center gap-1" }, ke = { class: "flex items-center gap-1" }, Se = { class: "flex items-center gap-1" }, Te = { class: "flex items-center gap-1" }, $e = {
19
+ }, Se = { class: "flex items-center gap-1" }, Te = { class: "flex items-center gap-1" }, $e = { class: "flex items-center gap-1" }, we = { class: "flex items-center gap-1" }, Le = {
19
20
  key: 1,
20
21
  class: "flex items-center gap-3 text-[10px] text-muted-foreground"
21
- }, we = { class: "flex items-center gap-1" }, Le = { class: "flex items-center gap-1" }, Ce = { class: "flex items-center gap-1" }, ze = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, Ae = { class: "text-[10px] text-muted-foreground" }, Fe = /* @__PURE__ */ O({
22
+ }, Ce = { class: "flex items-center gap-1" }, ze = { class: "flex items-center gap-1" }, Ae = { class: "flex items-center gap-1" }, Ne = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, De = { class: "text-[10px] text-muted-foreground" }, Re = /* @__PURE__ */ O({
22
23
  __name: "SearchTermsCard",
23
24
  props: {
24
25
  toolName: {},
@@ -30,7 +31,7 @@ const ae = { class: "w-full" }, re = {
30
31
  },
31
32
  emits: ["submit"],
32
33
  setup(T, { emit: D }) {
33
- const p = T, F = D, P = useRoute(), M = _(() => P.params.slug), R = useModuleApi(p.instanceId), v = h(!0), f = h(null), n = h([]), $ = h(0), y = h(null), x = h("google_ads"), U = (e) => e.label || e.query || e.sessionGoogleAdsQuery || e.landingPagePlusQueryString || "—";
34
+ const p = T, F = D, P = ae(), M = _(() => P.params.slug), R = re(p.instanceId), v = f(!0), h = f(null), n = f([]), $ = f(0), y = f(null), x = f("google_ads"), U = (e) => e.label || e.query || e.sessionGoogleAdsQuery || e.landingPagePlusQueryString || "—";
34
35
  function j() {
35
36
  const e = p.resolvedArgs?._cachedData;
36
37
  return e ? (x.value = e.source || "google_ads", e.source === "search_console" ? n.value = (e.searchTerms || []).map((t) => ({
@@ -48,7 +49,7 @@ const ae = { class: "w-full" }, re = {
48
49
  }
49
50
  async function E() {
50
51
  const { startDate: e, endDate: t } = p.resolvedArgs || {};
51
- v.value = !0, f.value = null;
52
+ v.value = !0, h.value = null;
52
53
  try {
53
54
  const c = new URLSearchParams();
54
55
  e && c.set("startDate", e), t && c.set("endDate", t);
@@ -89,7 +90,7 @@ const ae = { class: "w-full" }, re = {
89
90
  suggestion: K()
90
91
  });
91
92
  } catch (c) {
92
- f.value = c?.data?.statusMessage || c?.message || "Failed to load search data", w(`Error loading search data: ${f.value}`);
93
+ h.value = c?.data?.statusMessage || c?.message || "Failed to load search data", w(`Error loading search data: ${h.value}`);
93
94
  } finally {
94
95
  v.value = !1;
95
96
  }
@@ -108,64 +109,64 @@ const ae = { class: "w-full" }, re = {
108
109
  });
109
110
  return (e, t) => {
110
111
  const c = J("NuxtLink");
111
- return u(), m("div", ae, [
112
- s(v) ? (u(), m("div", re, [
112
+ return u(), m("div", ie, [
113
+ s(v) ? (u(), m("div", le, [
113
114
  l(s(ee), { class: "size-4 animate-spin text-muted-foreground" }),
114
115
  t[0] || (t[0] = o("span", { class: "text-xs text-muted-foreground" }, "Loading search data…", -1))
115
- ])) : s(f) ? (u(), m("div", ie, i(s(f)), 1)) : s(n).length === 0 ? (u(), m("div", le, [
116
+ ])) : s(h) ? (u(), m("div", ce, i(s(h)), 1)) : s(n).length === 0 ? (u(), m("div", de, [
116
117
  l(s(z), { class: "size-8 text-muted-foreground mx-auto" }),
117
118
  t[1] || (t[1] = o("p", { class: "text-sm text-muted-foreground" }, "No search data found for this period.", -1))
118
- ])) : (u(), m("div", ce, [
119
- o("div", de, [
120
- o("div", ue, [
119
+ ])) : (u(), m("div", ue, [
120
+ o("div", me, [
121
+ o("div", ge, [
121
122
  l(s(z), { class: "size-3.5 text-primary" }),
122
- o("span", me, i(s(Q)), 1)
123
+ o("span", pe, i(s(Q)), 1)
123
124
  ]),
124
- o("span", ge, i(s(q)), 1)
125
+ o("span", fe, i(s(q)), 1)
125
126
  ]),
126
- o("div", pe, [
127
+ o("div", he, [
127
128
  (u(!0), m(C, null, W(s(n), (a, d) => (u(), m("div", {
128
129
  key: d,
129
130
  class: "px-3 py-2.5 hover:bg-muted/30 transition-colors"
130
131
  }, [
131
- o("div", he, [
132
- o("span", fe, i(d + 1) + ".", 1),
133
- o("span", xe, i(U(a)), 1)
132
+ o("div", xe, [
133
+ o("span", _e, i(d + 1) + ".", 1),
134
+ o("span", ve, i(U(a)), 1)
134
135
  ]),
135
- o("div", _e, [
136
- o("div", ve, [
136
+ o("div", ye, [
137
+ o("div", be, [
137
138
  o("div", {
138
139
  class: "h-full rounded-full bg-amber-500/70 transition-all",
139
140
  style: X({ width: `${((s(S) ? a.clicks : a.sessions) || 0) / s(I) * 100}%` })
140
141
  }, null, 4)
141
142
  ]),
142
- s(S) ? (u(), m("div", ye, [
143
- o("span", be, [
143
+ s(S) ? (u(), m("div", ke, [
144
+ o("span", Se, [
144
145
  l(s(A), { class: "size-2.5" }),
145
146
  g(" " + i(b(a.clicks)) + " clicks ", 1)
146
147
  ]),
147
- o("span", ke, [
148
+ o("span", Te, [
148
149
  l(s(se), { class: "size-2.5" }),
149
150
  g(" " + i(b(a.impressions)) + " impr. ", 1)
150
151
  ]),
151
- o("span", Se, [
152
+ o("span", $e, [
152
153
  l(s(N), { class: "size-2.5" }),
153
154
  g(" " + i(L(a.ctr)) + " CTR ", 1)
154
155
  ]),
155
- o("span", Te, [
156
+ o("span", we, [
156
157
  l(s(te), { class: "size-2.5" }),
157
158
  g(" pos " + i(V(a.position)), 1)
158
159
  ])
159
- ])) : (u(), m("div", $e, [
160
- o("span", we, [
160
+ ])) : (u(), m("div", Le, [
161
+ o("span", Ce, [
161
162
  l(s(A), { class: "size-2.5" }),
162
163
  g(" " + i(b(a.sessions)) + " sessions ", 1)
163
164
  ]),
164
- o("span", Le, [
165
+ o("span", ze, [
165
166
  l(s(oe), { class: "size-2.5" }),
166
167
  g(" " + i(b(a.totalUsers)) + " users ", 1)
167
168
  ]),
168
- o("span", Ce, [
169
+ o("span", Ae, [
169
170
  l(s(N), { class: "size-2.5" }),
170
171
  g(" " + i(L(a.engagementRate)) + " engaged ", 1)
171
172
  ])
@@ -173,8 +174,8 @@ const ae = { class: "w-full" }, re = {
173
174
  ])
174
175
  ]))), 128))
175
176
  ]),
176
- o("div", ze, [
177
- o("span", Ae, [
177
+ o("div", Ne, [
178
+ o("span", De, [
178
179
  g(i(s(n).length) + " result" + i(s(n).length === 1 ? "" : "s") + " ", 1),
179
180
  s(y) ? (u(), m(C, { key: 0 }, [
180
181
  g(" · fetched " + i(G(s(y))), 1)
@@ -197,5 +198,5 @@ const ae = { class: "w-full" }, re = {
197
198
  }
198
199
  });
199
200
  export {
200
- Fe as default
201
+ Re as default
201
202
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("lucide-vue-next"),h=require("@oneclick.dev/cms-kit"),B={class:"w-full"},T={key:0,class:"flex items-center gap-2 py-3"},L={key:1,class:"text-xs text-destructive py-2"},$={key:2,class:"rounded-xl border bg-background p-4 text-center"},A={key:3,class:"rounded-xl border bg-background overflow-hidden"},M={class:"px-3 py-2 border-b bg-muted/40 flex items-center justify-between"},C={class:"flex items-center gap-2"},z={class:"text-[10px] text-muted-foreground"},F={class:"divide-y"},I={class:"flex items-center gap-2 mb-1.5"},j={class:"text-[10px] font-medium text-muted-foreground w-5 text-right shrink-0"},U=["title"],q={class:"ml-7 space-y-1.5"},O={class:"h-1.5 rounded-full bg-muted overflow-hidden"},R={class:"flex items-center gap-3 text-[10px] text-muted-foreground"},K={class:"flex items-center gap-1"},G={class:"flex items-center gap-1"},H={class:"flex items-center gap-1"},J={class:"px-3 py-2 border-t bg-muted/20 flex items-center justify-between"},Q={class:"text-[10px] text-muted-foreground"},W=e.defineComponent({__name:"TopPagesCard",props:{toolName:{},instanceId:{},instanceName:{},moduleType:{},resolvedArgs:{},status:{}},emits:["submit"],setup(f,{emit:y}){const l=f,V=y,N=h.useRoute(),_=e.computed(()=>N.params.slug),k=h.useModuleApi(l.instanceId),d=e.ref(!0),i=e.ref(null),r=e.ref([]),u=e.ref(0),m=e.ref(null);function E(){const t=l.resolvedArgs?._cachedData;return t?(r.value=t.pages?.map(s=>({pagePath:s.page,screenPageViews:s.views,totalUsers:s.users,averageSessionDuration:b(s.avgDuration)}))||[],u.value=t.totalPagesTracked||r.value.length,m.value=l.resolvedArgs._fetchedAt||null,d.value=!1,!0):!1}function b(t){if(!t)return 0;const s=t.match(/(\d+)m/),n=t.match(/(\d+)s/);return(s?parseInt(s[1])*60:0)+(n?parseInt(n[1]):0)}async function D(){const{startDate:t,endDate:s,limit:n}=l.resolvedArgs||{};d.value=!0,i.value=null;try{const o=new URLSearchParams;t&&o.set("startDate",t),s&&o.set("endDate",s),n&&o.set("limit",String(n));const a=await k.get(`/top-pages?${o.toString()}`);r.value=a.rows||[],u.value=a.rowCount||r.value.length,m.value=new Date().toISOString(),x({count:r.value.length,totalPagesTracked:u.value,pages:r.value.map(p=>({page:p.pagePath,views:p.screenPageViews,users:p.totalUsers,avgDuration:v(p.averageSessionDuration)}))})}catch(o){i.value=o?.data?.statusMessage||o?.message||"Failed to load top pages",x(`Error loading top pages: ${i.value}`)}finally{d.value=!1}}e.onMounted(()=>{l.status==="completed"&&E()||D()});function x(t){l.status!=="completed"&&V("submit",t)}const v=t=>{if(!t)return"0s";const s=Math.floor(t/60),n=Math.round(t%60);return s>0?`${s}m ${n}s`:`${n}s`},g=t=>t==null?"0":t.toLocaleString(),w=t=>t?new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"",S=e.computed(()=>r.value.length===0?1:Math.max(...r.value.map(t=>t.screenPageViews||0))),P=e.computed(()=>{const{startDate:t,endDate:s}=l.resolvedArgs||{};if(!t&&!s)return"Last 30 days";const n=t||"30daysAgo",o=s||"today",a=n.match(/^(\d+)daysAgo$/);return a?`Last ${a[1]} days`:`${n} → ${o}`});return(t,s)=>{const n=e.resolveComponent("NuxtLink");return e.openBlock(),e.createElementBlock("div",B,[e.unref(d)?(e.openBlock(),e.createElementBlock("div",T,[e.createVNode(e.unref(c.Loader2),{class:"size-4 animate-spin text-muted-foreground"}),s[0]||(s[0]=e.createElementVNode("span",{class:"text-xs text-muted-foreground"},"Loading top pages…",-1))])):e.unref(i)?(e.openBlock(),e.createElementBlock("div",L,e.toDisplayString(e.unref(i)),1)):e.unref(r).length===0?(e.openBlock(),e.createElementBlock("div",$,[e.createVNode(e.unref(c.FileText),{class:"size-8 text-muted-foreground mx-auto mb-2"}),s[1]||(s[1]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"},"No page data found for this period.",-1))])):(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",M,[e.createElementVNode("div",C,[e.createVNode(e.unref(c.FileText),{class:"size-3.5 text-primary"}),s[2]||(s[2]=e.createElementVNode("span",{class:"text-xs font-medium"},"Most Popular Pages",-1))]),e.createElementVNode("span",z,e.toDisplayString(e.unref(P)),1)]),e.createElementVNode("div",F,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(o,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"px-3 py-2.5 hover:bg-muted/30 transition-colors"},[e.createElementVNode("div",I,[e.createElementVNode("span",j,e.toDisplayString(a+1)+".",1),e.createElementVNode("span",{class:"text-xs font-medium truncate flex-1",title:o.pagePath},e.toDisplayString(o.pagePath),9,U)]),e.createElementVNode("div",q,[e.createElementVNode("div",O,[e.createElementVNode("div",{class:"h-full rounded-full bg-primary/70 transition-all",style:e.normalizeStyle({width:`${(o.screenPageViews||0)/e.unref(S)*100}%`})},null,4)]),e.createElementVNode("div",R,[e.createElementVNode("span",K,[e.createVNode(e.unref(c.Eye),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(g(o.screenPageViews))+" views ",1)]),e.createElementVNode("span",G,[e.createVNode(e.unref(c.Users),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(g(o.totalUsers))+" users ",1)]),e.createElementVNode("span",H,[e.createVNode(e.unref(c.Clock),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(v(o.averageSessionDuration)),1)])])])]))),128))]),e.createElementVNode("div",J,[e.createElementVNode("span",Q,[e.createTextVNode(" Top "+e.toDisplayString(e.unref(r).length)+" of "+e.toDisplayString(g(e.unref(u)))+" pages ",1),e.unref(m)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" · fetched "+e.toDisplayString(w(e.unref(m))),1)],64)):e.createCommentVNode("",!0)]),e.createVNode(n,{to:`/projects/${e.unref(_)}/modules/${f.instanceId}`,class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.ExternalLink),{class:"size-3"}),s[3]||(s[3]=e.createTextVNode(" View full report ",-1))]),_:1},8,["to"])])]))])}}});exports.default=W;
@@ -1,18 +1,19 @@
1
1
  import { defineComponent as U, computed as w, ref as f, onMounted as j, resolveComponent as F, openBlock as d, createElementBlock as c, unref as s, createVNode as u, createElementVNode as a, toDisplayString as i, Fragment as P, renderList as B, normalizeStyle as R, createTextVNode as g, createCommentVNode as O, withCtx as q } from "vue";
2
2
  import { Loader2 as G, FileText as S, Eye as H, Users as J, Clock as K, ExternalLink as Q } from "lucide-vue-next";
3
- const W = { class: "w-full" }, X = {
3
+ import { useRoute as W, useModuleApi as X } from "@oneclick.dev/cms-kit";
4
+ const Y = { class: "w-full" }, Z = {
4
5
  key: 0,
5
6
  class: "flex items-center gap-2 py-3"
6
- }, Y = {
7
+ }, ee = {
7
8
  key: 1,
8
9
  class: "text-xs text-destructive py-2"
9
- }, Z = {
10
+ }, te = {
10
11
  key: 2,
11
12
  class: "rounded-xl border bg-background p-4 text-center"
12
- }, ee = {
13
+ }, se = {
13
14
  key: 3,
14
15
  class: "rounded-xl border bg-background overflow-hidden"
15
- }, te = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, se = { class: "flex items-center gap-2" }, ae = { class: "text-[10px] text-muted-foreground" }, oe = { class: "divide-y" }, ne = { class: "flex items-center gap-2 mb-1.5" }, re = { class: "text-[10px] font-medium text-muted-foreground w-5 text-right shrink-0" }, ie = ["title"], le = { class: "ml-7 space-y-1.5" }, de = { class: "h-1.5 rounded-full bg-muted overflow-hidden" }, ce = { class: "flex items-center gap-3 text-[10px] text-muted-foreground" }, ue = { class: "flex items-center gap-1" }, me = { class: "flex items-center gap-1" }, ge = { class: "flex items-center gap-1" }, pe = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, fe = { class: "text-[10px] text-muted-foreground" }, he = /* @__PURE__ */ U({
16
+ }, ae = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, oe = { class: "flex items-center gap-2" }, ne = { class: "text-[10px] text-muted-foreground" }, re = { class: "divide-y" }, ie = { class: "flex items-center gap-2 mb-1.5" }, le = { class: "text-[10px] font-medium text-muted-foreground w-5 text-right shrink-0" }, de = ["title"], ce = { class: "ml-7 space-y-1.5" }, ue = { class: "h-1.5 rounded-full bg-muted overflow-hidden" }, me = { class: "flex items-center gap-3 text-[10px] text-muted-foreground" }, ge = { class: "flex items-center gap-1" }, pe = { class: "flex items-center gap-1" }, fe = { class: "flex items-center gap-1" }, xe = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, ve = { class: "text-[10px] text-muted-foreground" }, we = /* @__PURE__ */ U({
16
17
  __name: "TopPagesCard",
17
18
  props: {
18
19
  toolName: {},
@@ -24,7 +25,7 @@ const W = { class: "w-full" }, X = {
24
25
  },
25
26
  emits: ["submit"],
26
27
  setup(b, { emit: L }) {
27
- const m = b, $ = L, V = useRoute(), A = w(() => V.params.slug), N = useModuleApi(m.instanceId), x = f(!0), p = f(null), r = f([]), v = f(0), h = f(null);
28
+ const m = b, $ = L, V = W(), A = w(() => V.params.slug), N = X(m.instanceId), x = f(!0), p = f(null), r = f([]), v = f(0), h = f(null);
28
29
  function C() {
29
30
  const e = m.resolvedArgs?._cachedData;
30
31
  return e ? (r.value = e.pages?.map((t) => ({
@@ -80,50 +81,50 @@ const W = { class: "w-full" }, X = {
80
81
  });
81
82
  return (e, t) => {
82
83
  const n = F("NuxtLink");
83
- return d(), c("div", W, [
84
- s(x) ? (d(), c("div", X, [
84
+ return d(), c("div", Y, [
85
+ s(x) ? (d(), c("div", Z, [
85
86
  u(s(G), { class: "size-4 animate-spin text-muted-foreground" }),
86
87
  t[0] || (t[0] = a("span", { class: "text-xs text-muted-foreground" }, "Loading top pages…", -1))
87
- ])) : s(p) ? (d(), c("div", Y, i(s(p)), 1)) : s(r).length === 0 ? (d(), c("div", Z, [
88
+ ])) : s(p) ? (d(), c("div", ee, i(s(p)), 1)) : s(r).length === 0 ? (d(), c("div", te, [
88
89
  u(s(S), { class: "size-8 text-muted-foreground mx-auto mb-2" }),
89
90
  t[1] || (t[1] = a("p", { class: "text-sm text-muted-foreground" }, "No page data found for this period.", -1))
90
- ])) : (d(), c("div", ee, [
91
- a("div", te, [
92
- a("div", se, [
91
+ ])) : (d(), c("div", se, [
92
+ a("div", ae, [
93
+ a("div", oe, [
93
94
  u(s(S), { class: "size-3.5 text-primary" }),
94
95
  t[2] || (t[2] = a("span", { class: "text-xs font-medium" }, "Most Popular Pages", -1))
95
96
  ]),
96
- a("span", ae, i(s(E)), 1)
97
+ a("span", ne, i(s(E)), 1)
97
98
  ]),
98
- a("div", oe, [
99
+ a("div", re, [
99
100
  (d(!0), c(P, null, B(s(r), (o, l) => (d(), c("div", {
100
101
  key: l,
101
102
  class: "px-3 py-2.5 hover:bg-muted/30 transition-colors"
102
103
  }, [
103
- a("div", ne, [
104
- a("span", re, i(l + 1) + ".", 1),
104
+ a("div", ie, [
105
+ a("span", le, i(l + 1) + ".", 1),
105
106
  a("span", {
106
107
  class: "text-xs font-medium truncate flex-1",
107
108
  title: o.pagePath
108
- }, i(o.pagePath), 9, ie)
109
+ }, i(o.pagePath), 9, de)
109
110
  ]),
110
- a("div", le, [
111
- a("div", de, [
111
+ a("div", ce, [
112
+ a("div", ue, [
112
113
  a("div", {
113
114
  class: "h-full rounded-full bg-primary/70 transition-all",
114
115
  style: R({ width: `${(o.screenPageViews || 0) / s(I) * 100}%` })
115
116
  }, null, 4)
116
117
  ]),
117
- a("div", ce, [
118
- a("span", ue, [
118
+ a("div", me, [
119
+ a("span", ge, [
119
120
  u(s(H), { class: "size-2.5" }),
120
121
  g(" " + i(y(o.screenPageViews)) + " views ", 1)
121
122
  ]),
122
- a("span", me, [
123
+ a("span", pe, [
123
124
  u(s(J), { class: "size-2.5" }),
124
125
  g(" " + i(y(o.totalUsers)) + " users ", 1)
125
126
  ]),
126
- a("span", ge, [
127
+ a("span", fe, [
127
128
  u(s(K), { class: "size-2.5" }),
128
129
  g(" " + i(D(o.averageSessionDuration)), 1)
129
130
  ])
@@ -131,8 +132,8 @@ const W = { class: "w-full" }, X = {
131
132
  ])
132
133
  ]))), 128))
133
134
  ]),
134
- a("div", pe, [
135
- a("span", fe, [
135
+ a("div", xe, [
136
+ a("span", ve, [
136
137
  g(" Top " + i(s(r).length) + " of " + i(y(s(v))) + " pages ", 1),
137
138
  s(h) ? (d(), c(P, { key: 0 }, [
138
139
  g(" · fetched " + i(z(s(h))), 1)
@@ -155,5 +156,5 @@ const W = { class: "w-full" }, X = {
155
156
  }
156
157
  });
157
158
  export {
158
- he as default
159
+ we as default
159
160
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("lucide-vue-next"),v=require("@oneclick.dev/cms-kit"),C={class:"w-full"},L={key:0,class:"flex items-center gap-2 py-3"},$={key:1,class:"text-xs text-destructive py-2"},U={key:2,class:"rounded-xl border bg-background p-4 text-center"},z={key:3,class:"rounded-xl border bg-background overflow-hidden"},A={class:"px-3 py-2 border-b bg-muted/40 flex items-center justify-between"},T={class:"flex items-center gap-2"},F={class:"text-[10px] text-muted-foreground"},G={key:0,class:"px-3 pt-3 pb-2"},j={class:"h-3 rounded-full bg-muted overflow-hidden flex"},M=["title"],R={class:"flex flex-wrap gap-x-3 gap-y-1 mt-2"},q={class:"text-[10px] text-muted-foreground"},I={class:"text-[10px] font-medium"},P={key:1,class:"border-t"},O={class:"divide-y"},K={class:"text-xs font-medium truncate flex-1"},H={class:"flex items-center gap-3 text-[10px] text-muted-foreground shrink-0"},J={class:"flex items-center gap-1"},Q={class:"flex items-center gap-1"},W={class:"px-3 py-2 border-t bg-muted/20 flex items-center justify-between"},X={key:0,class:"text-[10px] text-muted-foreground"},Y=e.defineComponent({__name:"TrafficSourcesCard",props:{toolName:{},instanceId:{},instanceName:{},moduleType:{},resolvedArgs:{},status:{}},emits:["submit"],setup(g,{emit:_}){const l=g,N=_,E=v.useRoute(),V=e.computed(()=>E.params.slug),x=v.useModuleApi(l.instanceId),m=e.ref(!0),u=e.ref(null),c=e.ref([]),a=e.ref([]),p=e.ref(null);function S(){const s=l.resolvedArgs?._cachedData;return s?(a.value=(s.topChannels||[]).map(t=>({sessionDefaultChannelGroup:t.channel,sessions:t.sessions,totalUsers:t.users,newUsers:t.newUsers,engagementRate:parseFloat(t.engagementRate)/100})),c.value=(s.topSources||[]).map(t=>({sessionSource:t.source,sessions:t.sessions,totalUsers:t.users})),p.value=l.resolvedArgs._fetchedAt||null,m.value=!1,!0):!1}async function B(){const{startDate:s,endDate:t}=l.resolvedArgs||{};m.value=!0,u.value=null;try{const o=new URLSearchParams;s&&o.set("startDate",s),t&&o.set("endDate",t);const[n,d]=await Promise.all([x.get(`/top-sources?${o.toString()}`),x.get(`/acquisition/channels?${o.toString()}`)]);c.value=n.rows||[],a.value=d.rows||[],p.value=new Date().toISOString(),h({topChannels:a.value.map(r=>({channel:r.sessionDefaultChannelGroup,sessions:r.sessions,users:r.totalUsers,newUsers:r.newUsers,engagementRate:`${(r.engagementRate*100).toFixed(1)}%`})),topSources:c.value.map(r=>({source:r.sessionSource,sessions:r.sessions,users:r.totalUsers}))})}catch(o){u.value=o?.data?.statusMessage||o?.message||"Failed to load traffic sources",h(`Error loading traffic sources: ${u.value}`)}finally{m.value=!1}}e.onMounted(()=>{l.status==="completed"&&S()||B()});function h(s){l.status!=="completed"&&N("submit",s)}const f=s=>s==null?"0":Math.round(s).toLocaleString(),D=s=>s?new Date(s).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"",b=e.computed(()=>a.value.reduce((s,t)=>s+(t.sessions||0),0)),y=["bg-primary/70","bg-blue-500/70","bg-emerald-500/70","bg-amber-500/70","bg-purple-500/70","bg-pink-500/70","bg-cyan-500/70","bg-orange-500/70","bg-indigo-500/70","bg-rose-500/70"],k=["bg-primary","bg-blue-500","bg-emerald-500","bg-amber-500","bg-purple-500","bg-pink-500","bg-cyan-500","bg-orange-500","bg-indigo-500","bg-rose-500"],w=e.computed(()=>{const{startDate:s,endDate:t}=l.resolvedArgs||{};if(!s&&!t)return"Last 30 days";const o=s||"30daysAgo",n=o.match(/^(\d+)daysAgo$/);return n?`Last ${n[1]} days`:`${o} → ${t||"today"}`});return(s,t)=>{const o=e.resolveComponent("NuxtLink");return e.openBlock(),e.createElementBlock("div",C,[e.unref(m)?(e.openBlock(),e.createElementBlock("div",L,[e.createVNode(e.unref(i.Loader2),{class:"size-4 animate-spin text-muted-foreground"}),t[0]||(t[0]=e.createElementVNode("span",{class:"text-xs text-muted-foreground"},"Loading traffic sources…",-1))])):e.unref(u)?(e.openBlock(),e.createElementBlock("div",$,e.toDisplayString(e.unref(u)),1)):e.unref(a).length===0&&e.unref(c).length===0?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(e.unref(i.Globe),{class:"size-8 text-muted-foreground mx-auto mb-2"}),t[1]||(t[1]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"},"No traffic source data found for this period.",-1))])):(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",A,[e.createElementVNode("div",T,[e.createVNode(e.unref(i.Globe),{class:"size-3.5 text-primary"}),t[2]||(t[2]=e.createElementVNode("span",{class:"text-xs font-medium"},"Traffic Sources",-1))]),e.createElementVNode("span",F,e.toDisplayString(e.unref(w)),1)]),e.unref(a).length>0?(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",j,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(n,d)=>(e.openBlock(),e.createElementBlock("div",{key:n.sessionDefaultChannelGroup,class:e.normalizeClass(["h-full first:rounded-l-full last:rounded-r-full",y[d%y.length]]),style:e.normalizeStyle({width:`${e.unref(b)>0?(n.sessions||0)/e.unref(b)*100:0}%`}),title:`${n.sessionDefaultChannelGroup}: ${f(n.sessions)} sessions`},null,14,M))),128))]),e.createElementVNode("div",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a).slice(0,6),(n,d)=>(e.openBlock(),e.createElementBlock("div",{key:n.sessionDefaultChannelGroup,class:"flex items-center gap-1.5"},[e.createElementVNode("span",{class:e.normalizeClass(["size-2 rounded-full shrink-0",k[d%k.length]])},null,2),e.createElementVNode("span",q,e.toDisplayString(n.sessionDefaultChannelGroup),1),e.createElementVNode("span",I,e.toDisplayString(f(n.sessions)),1)]))),128))])])):e.createCommentVNode("",!0),e.unref(c).length>0?(e.openBlock(),e.createElementBlock("div",P,[t[3]||(t[3]=e.createElementVNode("div",{class:"px-3 py-1.5 bg-muted/20"},[e.createElementVNode("span",{class:"text-[10px] font-medium text-muted-foreground uppercase tracking-wide"},"Top Sources")],-1)),e.createElementVNode("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),n=>(e.openBlock(),e.createElementBlock("div",{key:n.sessionSource,class:"px-3 py-2 flex items-center justify-between hover:bg-muted/30 transition-colors"},[e.createElementVNode("span",K,e.toDisplayString(n.sessionSource),1),e.createElementVNode("div",H,[e.createElementVNode("span",J,[e.createVNode(e.unref(i.MousePointerClick),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(f(n.sessions)),1)]),e.createElementVNode("span",Q,[e.createVNode(e.unref(i.Users),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(f(n.totalUsers)),1)])])]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("div",W,[e.unref(p)?(e.openBlock(),e.createElementBlock("span",X," Fetched "+e.toDisplayString(D(e.unref(p))),1)):e.createCommentVNode("",!0),e.createVNode(o,{to:`/projects/${e.unref(V)}/modules/${g.instanceId}`,class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ExternalLink),{class:"size-3"}),t[4]||(t[4]=e.createTextVNode(" View full report ",-1))]),_:1},8,["to"])])]))])}}});exports.default=Y;