@oneclick.dev/cms-core-modules 0.0.79 → 0.0.80

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 (37) hide show
  1. package/dist/{AppointmentDetailsCard-Bu9VzIRx.mjs → AppointmentDetailsCard-33WpATpV.mjs} +43 -43
  2. package/dist/AppointmentDetailsCard-DpLM5IrB.js +1 -0
  3. package/dist/AppointmentListTable-CQ0WIXtj.js +1 -0
  4. package/dist/{AppointmentListTable-B8YLwOfT.mjs → AppointmentListTable-aV_UJd6j.mjs} +42 -42
  5. package/dist/CountryBreakdownCard-D7BK3nRD.js +1 -0
  6. package/dist/{CountryBreakdownCard-oDzmpvAd.mjs → CountryBreakdownCard-DVxNz2DJ.mjs} +48 -48
  7. package/dist/DeviceBreakdownCard-DRhQ9ufG.js +1 -0
  8. package/dist/{DeviceBreakdownCard-Oh_yzipG.mjs → DeviceBreakdownCard-W1frLe0L.mjs} +58 -58
  9. package/dist/{PeakHoursCard-DzNo4SNo.mjs → PeakHoursCard-9-EZFZLR.mjs} +55 -55
  10. package/dist/PeakHoursCard-BR5zmta4.js +1 -0
  11. package/dist/ProductDetailsCard-6nHikw4V.mjs +121 -0
  12. package/dist/ProductDetailsCard-Bn7qrgmc.js +1 -0
  13. package/dist/RealtimeCard--APfRNc8.js +1 -0
  14. package/dist/{RealtimeCard-tNUSIw6B.mjs → RealtimeCard-fvQlJcM7.mjs} +41 -41
  15. package/dist/SearchTermsCard-BsB-63aH.js +1 -0
  16. package/dist/{SearchTermsCard-BVHFHWUZ.mjs → SearchTermsCard-BzVrHKqQ.mjs} +57 -57
  17. package/dist/TopPagesCard-BDeA997A.js +1 -0
  18. package/dist/{TopPagesCard-CRIa3rSZ.mjs → TopPagesCard-CTozhOr_.mjs} +48 -48
  19. package/dist/{TrafficSourcesCard-Ct20QYax.mjs → TrafficSourcesCard-BxtCKsqx.mjs} +65 -65
  20. package/dist/TrafficSourcesCard-C3ziDTUL.js +1 -0
  21. package/dist/VisitorStatsCard-BmByE_Hi.js +1 -0
  22. package/dist/{VisitorStatsCard-DMULybKV.mjs → VisitorStatsCard-CXizEbVK.mjs} +55 -55
  23. package/dist/index.cjs.js +1 -1
  24. package/dist/index.mjs +11 -11
  25. package/package.json +2 -2
  26. package/dist/AppointmentDetailsCard-LL-6PARb.js +0 -1
  27. package/dist/AppointmentListTable-DNvvb4sz.js +0 -1
  28. package/dist/CountryBreakdownCard-BpDXbxwZ.js +0 -1
  29. package/dist/DeviceBreakdownCard-OXiU9Cf0.js +0 -1
  30. package/dist/PeakHoursCard-OkgI1vnd.js +0 -1
  31. package/dist/ProductDetailsCard-BBOorNmB.js +0 -1
  32. package/dist/ProductDetailsCard-CYK9Mtt4.mjs +0 -121
  33. package/dist/RealtimeCard-DESm9Fs_.js +0 -1
  34. package/dist/SearchTermsCard-DmyhGQVM.js +0 -1
  35. package/dist/TopPagesCard-CgtNyhwY.js +0 -1
  36. package/dist/TrafficSourcesCard-CPAxaQTi.js +0 -1
  37. package/dist/VisitorStatsCard-Cs6jPehw.js +0 -1
@@ -1,27 +1,27 @@
1
- import { defineComponent as P, computed as _, ref as x, onMounted as B, resolveComponent as O, openBlock as r, createElementBlock as a, unref as s, createVNode as m, createElementVNode as o, toDisplayString as d, Fragment as y, renderList as k, normalizeStyle as q, normalizeClass as U, createCommentVNode as S, createTextVNode as w, withCtx as H } from "vue";
2
- import { Loader2 as J, Globe as z, MousePointerClick as K, Users as Q, ExternalLink as W } from "lucide-vue-next";
3
- const X = { class: "w-full" }, Y = {
1
+ import { defineComponent as B, computed as _, ref as x, onMounted as q, resolveComponent as O, openBlock as r, createElementBlock as a, unref as s, createVNode as m, createElementVNode as n, toDisplayString as d, Fragment as y, renderList as k, normalizeStyle as H, normalizeClass as U, createCommentVNode as S, createTextVNode as w, withCtx as J } from "vue";
2
+ import { Loader2 as K, Globe as z, MousePointerClick as Q, Users as W, ExternalLink as X } from "lucide-vue-next";
3
+ const Y = { class: "w-full" }, Z = {
4
4
  key: 0,
5
5
  class: "flex items-center gap-2 py-3"
6
- }, Z = {
6
+ }, ee = {
7
7
  key: 1,
8
8
  class: "text-xs text-destructive py-2"
9
- }, ee = {
9
+ }, se = {
10
10
  key: 2,
11
11
  class: "rounded-xl border bg-background p-4 text-center"
12
- }, se = {
12
+ }, te = {
13
13
  key: 3,
14
14
  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" }, oe = { class: "flex items-center gap-2" }, ne = { class: "text-[10px] text-muted-foreground" }, re = {
15
+ }, ne = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, oe = { class: "flex items-center gap-2" }, re = { class: "text-[10px] text-muted-foreground" }, ae = {
16
16
  key: 0,
17
17
  class: "px-3 pt-3 pb-2"
18
- }, ae = { class: "h-3 rounded-full bg-muted overflow-hidden flex" }, le = ["title"], ie = { class: "flex flex-wrap gap-x-3 gap-y-1 mt-2" }, ue = { class: "text-[10px] text-muted-foreground" }, de = { class: "text-[10px] font-medium" }, ce = {
18
+ }, le = { class: "h-3 rounded-full bg-muted overflow-hidden flex" }, ie = ["title"], ue = { class: "flex flex-wrap gap-x-3 gap-y-1 mt-2" }, de = { class: "text-[10px] text-muted-foreground" }, ce = { class: "text-[10px] font-medium" }, me = {
19
19
  key: 1,
20
20
  class: "border-t"
21
- }, me = { class: "divide-y" }, pe = { class: "text-xs font-medium truncate flex-1" }, ge = { class: "flex items-center gap-3 text-[10px] text-muted-foreground shrink-0" }, fe = { class: "flex items-center gap-1" }, xe = { class: "flex items-center gap-1" }, he = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, be = {
21
+ }, pe = { class: "divide-y" }, ge = { class: "text-xs font-medium truncate flex-1" }, fe = { class: "flex items-center gap-3 text-[10px] text-muted-foreground shrink-0" }, xe = { class: "flex items-center gap-1" }, he = { class: "flex items-center gap-1" }, be = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, ve = {
22
22
  key: 0,
23
23
  class: "text-[10px] text-muted-foreground"
24
- }, ke = /* @__PURE__ */ P({
24
+ }, ke = /* @__PURE__ */ B({
25
25
  __name: "TrafficSourcesCard",
26
26
  props: {
27
27
  toolName: {},
@@ -33,8 +33,8 @@ const X = { class: "w-full" }, Y = {
33
33
  },
34
34
  emits: ["submit"],
35
35
  setup(D, { emit: G }) {
36
- const { $useRoute: F, $useModuleOverlay: ve } = useNuxtApp(), c = D, M = G, R = F(), T = _(() => R.params.slug), C = $useModuleApi(c.instanceId), h = x(!0), g = x(null), p = x([]), u = x([]), b = x(null);
37
- function j() {
36
+ const { $useRoute: F, $useModuleApi: R } = useNuxtApp(), c = D, T = G, j = F(), M = _(() => j.params.slug), C = R(c.instanceId), h = x(!0), g = x(null), p = x([]), u = x([]), b = x(null);
37
+ function V() {
38
38
  const t = c.resolvedArgs?._cachedData;
39
39
  return t ? (u.value = (t.topChannels || []).map((e) => ({
40
40
  sessionDefaultChannelGroup: e.channel,
@@ -48,17 +48,17 @@ const X = { class: "w-full" }, Y = {
48
48
  totalUsers: e.users
49
49
  })), b.value = c.resolvedArgs._fetchedAt || null, h.value = !1, !0) : !1;
50
50
  }
51
- async function V() {
51
+ async function E() {
52
52
  const { startDate: t, endDate: e } = c.resolvedArgs || {};
53
53
  h.value = !0, g.value = null;
54
54
  try {
55
55
  const l = new URLSearchParams();
56
56
  t && l.set("startDate", t), e && l.set("endDate", e);
57
- const [n, f] = await Promise.all([
57
+ const [o, f] = await Promise.all([
58
58
  C.get(`/top-sources?${l.toString()}`),
59
59
  C.get(`/acquisition/channels?${l.toString()}`)
60
60
  ]);
61
- p.value = n.rows || [], u.value = f.rows || [], b.value = (/* @__PURE__ */ new Date()).toISOString(), $({
61
+ p.value = o.rows || [], u.value = f.rows || [], b.value = (/* @__PURE__ */ new Date()).toISOString(), $({
62
62
  topChannels: u.value.map((i) => ({
63
63
  channel: i.sessionDefaultChannelGroup,
64
64
  sessions: i.sessions,
@@ -78,13 +78,13 @@ const X = { class: "w-full" }, Y = {
78
78
  h.value = !1;
79
79
  }
80
80
  }
81
- B(() => {
82
- c.status === "completed" && j() || V();
81
+ q(() => {
82
+ c.status === "completed" && V() || E();
83
83
  });
84
84
  function $(t) {
85
- c.status !== "completed" && M("submit", t);
85
+ c.status !== "completed" && T("submit", t);
86
86
  }
87
- const v = (t) => t == null ? "0" : Math.round(t).toLocaleString(), E = (t) => t ? new Date(t).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }) : "", L = _(() => u.value.reduce((t, e) => t + (e.sessions || 0), 0)), A = [
87
+ const v = (t) => t == null ? "0" : Math.round(t).toLocaleString(), I = (t) => t ? new Date(t).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }) : "", L = _(() => u.value.reduce((t, e) => t + (e.sessions || 0), 0)), A = [
88
88
  "bg-primary/70",
89
89
  "bg-blue-500/70",
90
90
  "bg-emerald-500/70",
@@ -106,82 +106,82 @@ const X = { class: "w-full" }, Y = {
106
106
  "bg-orange-500",
107
107
  "bg-indigo-500",
108
108
  "bg-rose-500"
109
- ], I = _(() => {
109
+ ], P = _(() => {
110
110
  const { startDate: t, endDate: e } = c.resolvedArgs || {};
111
111
  if (!t && !e) return "Last 30 days";
112
- const l = t || "30daysAgo", n = l.match(/^(\d+)daysAgo$/);
113
- return n ? `Last ${n[1]} days` : `${l} → ${e || "today"}`;
112
+ const l = t || "30daysAgo", o = l.match(/^(\d+)daysAgo$/);
113
+ return o ? `Last ${o[1]} days` : `${l} → ${e || "today"}`;
114
114
  });
115
115
  return (t, e) => {
116
116
  const l = O("NuxtLink");
117
- return r(), a("div", X, [
118
- s(h) ? (r(), a("div", Y, [
119
- m(s(J), { class: "size-4 animate-spin text-muted-foreground" }),
120
- e[0] || (e[0] = o("span", { class: "text-xs text-muted-foreground" }, "Loading traffic sources…", -1))
121
- ])) : s(g) ? (r(), a("div", Z, d(s(g)), 1)) : s(u).length === 0 && s(p).length === 0 ? (r(), a("div", ee, [
117
+ return r(), a("div", Y, [
118
+ s(h) ? (r(), a("div", Z, [
119
+ m(s(K), { class: "size-4 animate-spin text-muted-foreground" }),
120
+ e[0] || (e[0] = n("span", { class: "text-xs text-muted-foreground" }, "Loading traffic sources…", -1))
121
+ ])) : s(g) ? (r(), a("div", ee, d(s(g)), 1)) : s(u).length === 0 && s(p).length === 0 ? (r(), a("div", se, [
122
122
  m(s(z), { class: "size-8 text-muted-foreground mx-auto mb-2" }),
123
- e[1] || (e[1] = o("p", { class: "text-sm text-muted-foreground" }, "No traffic source data found for this period.", -1))
124
- ])) : (r(), a("div", se, [
125
- o("div", te, [
126
- o("div", oe, [
123
+ e[1] || (e[1] = n("p", { class: "text-sm text-muted-foreground" }, "No traffic source data found for this period.", -1))
124
+ ])) : (r(), a("div", te, [
125
+ n("div", ne, [
126
+ n("div", oe, [
127
127
  m(s(z), { class: "size-3.5 text-primary" }),
128
- e[2] || (e[2] = o("span", { class: "text-xs font-medium" }, "Traffic Sources", -1))
128
+ e[2] || (e[2] = n("span", { class: "text-xs font-medium" }, "Traffic Sources", -1))
129
129
  ]),
130
- o("span", ne, d(s(I)), 1)
130
+ n("span", re, d(s(P)), 1)
131
131
  ]),
132
- s(u).length > 0 ? (r(), a("div", re, [
133
- o("div", ae, [
134
- (r(!0), a(y, null, k(s(u), (n, f) => (r(), a("div", {
135
- key: n.sessionDefaultChannelGroup,
132
+ s(u).length > 0 ? (r(), a("div", ae, [
133
+ n("div", le, [
134
+ (r(!0), a(y, null, k(s(u), (o, f) => (r(), a("div", {
135
+ key: o.sessionDefaultChannelGroup,
136
136
  class: U(["h-full first:rounded-l-full last:rounded-r-full", A[f % A.length]]),
137
- style: q({ width: `${s(L) > 0 ? (n.sessions || 0) / s(L) * 100 : 0}%` }),
138
- title: `${n.sessionDefaultChannelGroup}: ${v(n.sessions)} sessions`
139
- }, null, 14, le))), 128))
137
+ style: H({ width: `${s(L) > 0 ? (o.sessions || 0) / s(L) * 100 : 0}%` }),
138
+ title: `${o.sessionDefaultChannelGroup}: ${v(o.sessions)} sessions`
139
+ }, null, 14, ie))), 128))
140
140
  ]),
141
- o("div", ie, [
142
- (r(!0), a(y, null, k(s(u).slice(0, 6), (n, f) => (r(), a("div", {
143
- key: n.sessionDefaultChannelGroup,
141
+ n("div", ue, [
142
+ (r(!0), a(y, null, k(s(u).slice(0, 6), (o, f) => (r(), a("div", {
143
+ key: o.sessionDefaultChannelGroup,
144
144
  class: "flex items-center gap-1.5"
145
145
  }, [
146
- o("span", {
146
+ n("span", {
147
147
  class: U(["size-2 rounded-full shrink-0", N[f % N.length]])
148
148
  }, null, 2),
149
- o("span", ue, d(n.sessionDefaultChannelGroup), 1),
150
- o("span", de, d(v(n.sessions)), 1)
149
+ n("span", de, d(o.sessionDefaultChannelGroup), 1),
150
+ n("span", ce, d(v(o.sessions)), 1)
151
151
  ]))), 128))
152
152
  ])
153
153
  ])) : S("", !0),
154
- s(p).length > 0 ? (r(), a("div", ce, [
155
- e[3] || (e[3] = o("div", { class: "px-3 py-1.5 bg-muted/20" }, [
156
- o("span", { class: "text-[10px] font-medium text-muted-foreground uppercase tracking-wide" }, "Top Sources")
154
+ s(p).length > 0 ? (r(), a("div", me, [
155
+ e[3] || (e[3] = n("div", { class: "px-3 py-1.5 bg-muted/20" }, [
156
+ n("span", { class: "text-[10px] font-medium text-muted-foreground uppercase tracking-wide" }, "Top Sources")
157
157
  ], -1)),
158
- o("div", me, [
159
- (r(!0), a(y, null, k(s(p), (n) => (r(), a("div", {
160
- key: n.sessionSource,
158
+ n("div", pe, [
159
+ (r(!0), a(y, null, k(s(p), (o) => (r(), a("div", {
160
+ key: o.sessionSource,
161
161
  class: "px-3 py-2 flex items-center justify-between hover:bg-muted/30 transition-colors"
162
162
  }, [
163
- o("span", pe, d(n.sessionSource), 1),
164
- o("div", ge, [
165
- o("span", fe, [
166
- m(s(K), { class: "size-2.5" }),
167
- w(" " + d(v(n.sessions)), 1)
168
- ]),
169
- o("span", xe, [
163
+ n("span", ge, d(o.sessionSource), 1),
164
+ n("div", fe, [
165
+ n("span", xe, [
170
166
  m(s(Q), { class: "size-2.5" }),
171
- w(" " + d(v(n.totalUsers)), 1)
167
+ w(" " + d(v(o.sessions)), 1)
168
+ ]),
169
+ n("span", he, [
170
+ m(s(W), { class: "size-2.5" }),
171
+ w(" " + d(v(o.totalUsers)), 1)
172
172
  ])
173
173
  ])
174
174
  ]))), 128))
175
175
  ])
176
176
  ])) : S("", !0),
177
- o("div", he, [
178
- s(b) ? (r(), a("span", be, " Fetched " + d(E(s(b))), 1)) : S("", !0),
177
+ n("div", be, [
178
+ s(b) ? (r(), a("span", ve, " Fetched " + d(I(s(b))), 1)) : S("", !0),
179
179
  m(l, {
180
- to: `/projects/${s(T)}/modules/${D.instanceId}`,
180
+ to: `/projects/${s(M)}/modules/${D.instanceId}`,
181
181
  class: "inline-flex items-center gap-1.5 text-xs text-primary hover:underline"
182
182
  }, {
183
- default: H(() => [
184
- m(s(W), { class: "size-3" }),
183
+ default: J(() => [
184
+ m(s(X), { class: "size-3" }),
185
185
  e[4] || (e[4] = w(" View full report ", -1))
186
186
  ]),
187
187
  _: 1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("lucide-vue-next"),$={class:"w-full"},L={key:0,class:"flex items-center gap-2 py-3"},A={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"},T={class:"px-3 py-2 border-b bg-muted/40 flex items-center justify-between"},F={class:"flex items-center gap-2"},G={class:"text-[10px] text-muted-foreground"},j={key:0,class:"px-3 pt-3 pb-2"},M={class:"h-3 rounded-full bg-muted overflow-hidden flex"},R=["title"],I={class:"flex flex-wrap gap-x-3 gap-y-1 mt-2"},P={class:"text-[10px] text-muted-foreground"},q={class:"text-[10px] font-medium"},O={key:1,class:"border-t"},H={class:"divide-y"},J={class:"text-xs font-medium truncate flex-1"},K={class:"flex items-center gap-3 text-[10px] text-muted-foreground shrink-0"},Q={class:"flex items-center gap-1"},W={class:"flex items-center gap-1"},X={class:"px-3 py-2 border-t bg-muted/20 flex items-center justify-between"},Y={key:0,class:"text-[10px] text-muted-foreground"},Z=e.defineComponent({__name:"TrafficSourcesCard",props:{toolName:{},instanceId:{},instanceName:{},moduleType:{},resolvedArgs:{},status:{}},emits:["submit"],setup(g,{emit:v}){const{$useRoute:_,$useModuleApi:N}=useNuxtApp(),l=g,E=v,V=_(),S=e.computed(()=>V.params.slug),x=N(l.instanceId),m=e.ref(!0),u=e.ref(null),c=e.ref([]),a=e.ref([]),p=e.ref(null);function B(){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 D(){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"&&B()||D()});function h(s){l.status!=="completed"&&E("submit",s)}const f=s=>s==null?"0":Math.round(s).toLocaleString(),w=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"],C=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",$,[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",A,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",T,[e.createElementVNode("div",F,[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",G,e.toDisplayString(e.unref(C)),1)]),e.unref(a).length>0?(e.openBlock(),e.createElementBlock("div",j,[e.createElementVNode("div",M,[(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,R))),128))]),e.createElementVNode("div",I,[(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",P,e.toDisplayString(n.sessionDefaultChannelGroup),1),e.createElementVNode("span",q,e.toDisplayString(f(n.sessions)),1)]))),128))])])):e.createCommentVNode("",!0),e.unref(c).length>0?(e.openBlock(),e.createElementBlock("div",O,[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",H,[(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",J,e.toDisplayString(n.sessionSource),1),e.createElementVNode("div",K,[e.createElementVNode("span",Q,[e.createVNode(e.unref(i.MousePointerClick),{class:"size-2.5"}),e.createTextVNode(" "+e.toDisplayString(f(n.sessions)),1)]),e.createElementVNode("span",W,[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",X,[e.unref(p)?(e.openBlock(),e.createElementBlock("span",Y," Fetched "+e.toDisplayString(w(e.unref(p))),1)):e.createCommentVNode("",!0),e.createVNode(o,{to:`/projects/${e.unref(S)}/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=Z;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("lucide-vue-next"),M={class:"w-full"},F={key:0,class:"flex items-center gap-2 py-3"},L={key:1,class:"text-xs text-destructive py-2"},z={key:2,class:"rounded-xl border bg-background overflow-hidden"},j={class:"px-3 py-2 border-b bg-muted/40 flex items-center justify-between"},T={class:"flex items-center gap-2"},I={class:"text-[10px] text-muted-foreground"},O={class:"grid grid-cols-2 sm:grid-cols-4 divide-x divide-y"},q={class:"flex items-center gap-1.5"},Y={class:"text-[10px] text-muted-foreground uppercase tracking-wide"},G={class:"text-sm font-semibold"},H={key:0,class:"flex items-center gap-0.5"},J={class:"px-3 py-2 border-t bg-muted/20 flex items-center justify-between"},K={key:0,class:"text-[10px] text-muted-foreground"},Q=e.defineComponent({__name:"VisitorStatsCard",props:{toolName:{},instanceId:{},instanceName:{},moduleType:{},resolvedArgs:{},status:{}},emits:["submit"],setup(f,{emit:w}){const{$useRoute:S,$useModuleApi:V}=useNuxtApp(),l=f,_=w,N=S(),D=e.computed(()=>N.params.slug),B=V(l.instanceId),u=e.ref(!0),c=e.ref(null),r=e.ref({}),i=e.ref({}),d=e.ref(null);function E(){const t=l.resolvedArgs?._cachedData;return t?(r.value={totalUsers:t.totalUsers||0,sessions:t.sessions||0,screenPageViews:t.pageViews||0,newUsers:t.newUsers||0,bounceRate:v(t.bounceRate),averageSessionDuration:P(t.avgSessionDuration),engagementRate:v(t.engagementRate),screenPageViewsPerSession:parseFloat(t.pagesPerSession)||0},i.value=Object.fromEntries(Object.entries(t.changes||{}).map(([s,n])=>[s,$(n)])),d.value=l.resolvedArgs._fetchedAt||null,u.value=!1,!0):!1}function v(t){return t?parseFloat(t)/100:0}function P(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)}function $(t){return!t||t==="N/A"?null:parseFloat(t.replace("+",""))}async function R(){const{startDate:t,endDate:s}=l.resolvedArgs||{};u.value=!0,c.value=null;try{const n=new URLSearchParams;t&&n.set("startDate",t),s&&n.set("endDate",s);const a=await B.get(`/report?${n.toString()}`);r.value=a.totals||{},i.value=a.changes||{},d.value=new Date().toISOString(),h({period:x.value,totalUsers:Math.round(r.value.totalUsers||0),sessions:Math.round(r.value.sessions||0),pageViews:Math.round(r.value.screenPageViews||0),newUsers:Math.round(r.value.newUsers||0),bounceRate:`${(r.value.bounceRate*100).toFixed(1)}%`,avgSessionDuration:y(r.value.averageSessionDuration),engagementRate:`${(r.value.engagementRate*100).toFixed(1)}%`,pagesPerSession:(r.value.screenPageViewsPerSession||0).toFixed(1),changes:Object.fromEntries(Object.entries(i.value).map(([C,p])=>[C,p!==null?`${p>0?"+":""}${p.toFixed(1)}%`:"N/A"]))})}catch(n){c.value=n?.data?.statusMessage||n?.message||"Failed to load visitor stats",h(`Error loading visitor stats: ${c.value}`)}finally{u.value=!1}}e.onMounted(()=>{l.status==="completed"&&E()||R()});function h(t){l.status!=="completed"&&_("submit",t)}const x=e.computed(()=>{const{startDate:t,endDate:s}=l.resolvedArgs||{};if(!t&&!s)return"Last 30 days";const n=t||"30daysAgo",a=n.match(/^(\d+)daysAgo$/);return n==="yesterday"&&(!s||s==="yesterday")?"Yesterday":a?`Last ${a[1]} days`:`${n} → ${s||"today"}`}),y=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`},m=t=>t==null?"0":Math.round(t).toLocaleString(),k=t=>t==null?"0%":`${(t*100).toFixed(1)}%`,U=t=>t?new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"",g=(t,s=!1)=>{if(t==null)return"text-muted-foreground";const n=s?t<0:t>0,a=s?t>0:t<0;return n?"text-emerald-600 dark:text-emerald-400":a?"text-red-600 dark:text-red-400":"text-muted-foreground"},b=t=>t==null?null:`${t>0?"+":""}${t.toFixed(1)}%`,A=e.computed(()=>[{label:"Users",value:m(r.value.totalUsers),change:i.value.totalUsers,icon:o.Users},{label:"Sessions",value:m(r.value.sessions),change:i.value.sessions,icon:o.MousePointerClick},{label:"Page Views",value:m(r.value.screenPageViews),change:i.value.screenPageViews,icon:o.Eye},{label:"New Users",value:m(r.value.newUsers),change:i.value.newUsers,icon:o.Users},{label:"Bounce Rate",value:k(r.value.bounceRate),change:i.value.bounceRate,inverted:!0,icon:o.ArrowDownRight},{label:"Engagement",value:k(r.value.engagementRate),change:i.value.engagementRate,icon:o.Timer},{label:"Avg Duration",value:y(r.value.averageSessionDuration),change:i.value.averageSessionDuration,icon:o.Timer},{label:"Pages/Session",value:(r.value.screenPageViewsPerSession||0).toFixed(1),change:i.value.screenPageViewsPerSession,icon:o.Eye}]);return(t,s)=>{const n=e.resolveComponent("NuxtLink");return e.openBlock(),e.createElementBlock("div",M,[e.unref(u)?(e.openBlock(),e.createElementBlock("div",F,[e.createVNode(e.unref(o.Loader2),{class:"size-4 animate-spin text-muted-foreground"}),s[0]||(s[0]=e.createElementVNode("span",{class:"text-xs text-muted-foreground"},"Loading visitor statistics…",-1))])):e.unref(c)?(e.openBlock(),e.createElementBlock("div",L,e.toDisplayString(e.unref(c)),1)):(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("div",j,[e.createElementVNode("div",T,[e.createVNode(e.unref(o.BarChart3),{class:"size-3.5 text-primary"}),s[1]||(s[1]=e.createElementVNode("span",{class:"text-xs font-medium"},"Visitor Statistics",-1))]),e.createElementVNode("span",I,e.toDisplayString(e.unref(x)),1)]),e.createElementVNode("div",O,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(A),a=>(e.openBlock(),e.createElementBlock("div",{key:a.label,class:"px-3 py-3 space-y-1"},[e.createElementVNode("div",q,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.icon),{class:"size-3 text-muted-foreground"})),e.createElementVNode("span",Y,e.toDisplayString(a.label),1)]),e.createElementVNode("p",G,e.toDisplayString(a.value),1),b(a.change)?(e.openBlock(),e.createElementBlock("div",H,[(a.change??0)>0?(e.openBlock(),e.createBlock(e.unref(o.ArrowUpRight),{key:0,class:e.normalizeClass(["size-2.5",g(a.change,a.inverted)])},null,8,["class"])):(a.change??0)<0?(e.openBlock(),e.createBlock(e.unref(o.ArrowDownRight),{key:1,class:e.normalizeClass(["size-2.5",g(a.change,a.inverted)])},null,8,["class"])):(e.openBlock(),e.createBlock(e.unref(o.Minus),{key:2,class:"size-2.5 text-muted-foreground"})),e.createElementVNode("span",{class:e.normalizeClass(["text-[10px] font-medium",g(a.change,a.inverted)])},e.toDisplayString(b(a.change)),3)])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",J,[e.unref(d)?(e.openBlock(),e.createElementBlock("span",K," Fetched "+e.toDisplayString(U(e.unref(d))),1)):e.createCommentVNode("",!0),e.createVNode(n,{to:`/projects/${e.unref(D)}/modules/${f.instanceId}`,class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ExternalLink),{class:"size-3"}),s[2]||(s[2]=e.createTextVNode(" View full report ",-1))]),_:1},8,["to"])])]))])}}});exports.default=Q;
@@ -1,21 +1,21 @@
1
- import { defineComponent as J, computed as w, ref as m, onMounted as K, resolveComponent as Q, openBlock as o, createElementBlock as c, unref as r, createVNode as h, createElementVNode as l, toDisplayString as d, Fragment as W, renderList as X, createBlock as x, resolveDynamicComponent as Z, normalizeClass as _, createCommentVNode as U, withCtx as ee, createTextVNode as te } from "vue";
2
- import { Users as A, MousePointerClick as se, Eye as M, ArrowDownRight as F, Timer as C, Loader2 as ne, BarChart3 as ae, ArrowUpRight as re, Minus as oe, ExternalLink as ie } from "lucide-vue-next";
3
- const le = { class: "w-full" }, ce = {
1
+ import { defineComponent as K, computed as w, ref as m, onMounted as Q, resolveComponent as W, openBlock as o, createElementBlock as c, unref as r, createVNode as h, createElementVNode as l, toDisplayString as d, Fragment as X, renderList as Z, createBlock as x, resolveDynamicComponent as ee, normalizeClass as _, createCommentVNode as U, withCtx as te, createTextVNode as se } from "vue";
2
+ import { Users as A, MousePointerClick as ne, Eye as F, ArrowDownRight as M, Timer as C, Loader2 as ae, BarChart3 as re, ArrowUpRight as oe, Minus as ie, ExternalLink as le } from "lucide-vue-next";
3
+ const ce = { class: "w-full" }, ue = {
4
4
  key: 0,
5
5
  class: "flex items-center gap-2 py-3"
6
- }, ue = {
6
+ }, de = {
7
7
  key: 1,
8
8
  class: "text-xs text-destructive py-2"
9
- }, de = {
9
+ }, ge = {
10
10
  key: 2,
11
11
  class: "rounded-xl border bg-background overflow-hidden"
12
- }, ge = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, me = { class: "flex items-center gap-2" }, ve = { class: "text-[10px] text-muted-foreground" }, pe = { class: "grid grid-cols-2 sm:grid-cols-4 divide-x divide-y" }, fe = { class: "flex items-center gap-1.5" }, he = { class: "text-[10px] text-muted-foreground uppercase tracking-wide" }, xe = { class: "text-sm font-semibold" }, ye = {
12
+ }, me = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, ve = { class: "flex items-center gap-2" }, pe = { class: "text-[10px] text-muted-foreground" }, fe = { class: "grid grid-cols-2 sm:grid-cols-4 divide-x divide-y" }, he = { class: "flex items-center gap-1.5" }, xe = { class: "text-[10px] text-muted-foreground uppercase tracking-wide" }, ye = { class: "text-sm font-semibold" }, be = {
13
13
  key: 0,
14
14
  class: "flex items-center gap-0.5"
15
- }, be = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, we = {
15
+ }, we = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, _e = {
16
16
  key: 0,
17
17
  class: "text-[10px] text-muted-foreground"
18
- }, Pe = /* @__PURE__ */ J({
18
+ }, Pe = /* @__PURE__ */ K({
19
19
  __name: "VisitorStatsCard",
20
20
  props: {
21
21
  toolName: {},
@@ -27,7 +27,7 @@ const le = { class: "w-full" }, ce = {
27
27
  },
28
28
  emits: ["submit"],
29
29
  setup(S, { emit: N }) {
30
- const { $useRoute: L, $useModuleOverlay: _e } = useNuxtApp(), u = S, j = N, z = L(), E = w(() => z.params.slug), I = $useModuleApi(u.instanceId), v = m(!0), g = m(null), a = m({}), i = m({}), p = m(null);
30
+ const { $useRoute: L, $useModuleApi: j } = useNuxtApp(), u = S, z = N, E = L(), I = w(() => E.params.slug), B = j(u.instanceId), v = m(!0), g = m(null), a = m({}), i = m({}), p = m(null);
31
31
  function O() {
32
32
  const e = u.resolvedArgs?._cachedData;
33
33
  return e ? (a.value = {
@@ -36,43 +36,43 @@ const le = { class: "w-full" }, ce = {
36
36
  screenPageViews: e.pageViews || 0,
37
37
  newUsers: e.newUsers || 0,
38
38
  bounceRate: D(e.bounceRate),
39
- averageSessionDuration: B(e.avgSessionDuration),
39
+ averageSessionDuration: T(e.avgSessionDuration),
40
40
  engagementRate: D(e.engagementRate),
41
41
  screenPageViewsPerSession: parseFloat(e.pagesPerSession) || 0
42
42
  }, i.value = Object.fromEntries(
43
- Object.entries(e.changes || {}).map(([t, s]) => [t, T(s)])
43
+ Object.entries(e.changes || {}).map(([t, s]) => [t, Y(s)])
44
44
  ), p.value = u.resolvedArgs._fetchedAt || null, v.value = !1, !0) : !1;
45
45
  }
46
46
  function D(e) {
47
47
  return e ? parseFloat(e) / 100 : 0;
48
48
  }
49
- function B(e) {
49
+ function T(e) {
50
50
  if (!e) return 0;
51
51
  const t = e.match(/(\d+)m/), s = e.match(/(\d+)s/);
52
52
  return (t ? parseInt(t[1]) * 60 : 0) + (s ? parseInt(s[1]) : 0);
53
53
  }
54
- function T(e) {
54
+ function Y(e) {
55
55
  return !e || e === "N/A" ? null : parseFloat(e.replace("+", ""));
56
56
  }
57
- async function Y() {
57
+ async function q() {
58
58
  const { startDate: e, endDate: t } = u.resolvedArgs || {};
59
59
  v.value = !0, g.value = null;
60
60
  try {
61
61
  const s = new URLSearchParams();
62
62
  e && s.set("startDate", e), t && s.set("endDate", t);
63
- const n = await I.get(`/report?${s.toString()}`);
63
+ const n = await B.get(`/report?${s.toString()}`);
64
64
  a.value = n.totals || {}, i.value = n.changes || {}, p.value = (/* @__PURE__ */ new Date()).toISOString(), P({
65
- period: $.value,
65
+ period: k.value,
66
66
  totalUsers: Math.round(a.value.totalUsers || 0),
67
67
  sessions: Math.round(a.value.sessions || 0),
68
68
  pageViews: Math.round(a.value.screenPageViews || 0),
69
69
  newUsers: Math.round(a.value.newUsers || 0),
70
70
  bounceRate: `${(a.value.bounceRate * 100).toFixed(1)}%`,
71
- avgSessionDuration: k(a.value.averageSessionDuration),
71
+ avgSessionDuration: $(a.value.averageSessionDuration),
72
72
  engagementRate: `${(a.value.engagementRate * 100).toFixed(1)}%`,
73
73
  pagesPerSession: (a.value.screenPageViewsPerSession || 0).toFixed(1),
74
74
  changes: Object.fromEntries(
75
- Object.entries(i.value).map(([H, b]) => [H, b !== null ? `${b > 0 ? "+" : ""}${b.toFixed(1)}%` : "N/A"])
75
+ Object.entries(i.value).map(([J, b]) => [J, b !== null ? `${b > 0 ? "+" : ""}${b.toFixed(1)}%` : "N/A"])
76
76
  )
77
77
  });
78
78
  } catch (s) {
@@ -81,67 +81,67 @@ const le = { class: "w-full" }, ce = {
81
81
  v.value = !1;
82
82
  }
83
83
  }
84
- K(() => {
85
- u.status === "completed" && O() || Y();
84
+ Q(() => {
85
+ u.status === "completed" && O() || q();
86
86
  });
87
87
  function P(e) {
88
- u.status !== "completed" && j("submit", e);
88
+ u.status !== "completed" && z("submit", e);
89
89
  }
90
- const $ = w(() => {
90
+ const k = w(() => {
91
91
  const { startDate: e, endDate: t } = u.resolvedArgs || {};
92
92
  if (!e && !t) return "Last 30 days";
93
93
  const s = e || "30daysAgo", n = s.match(/^(\d+)daysAgo$/);
94
94
  return s === "yesterday" && (!t || t === "yesterday") ? "Yesterday" : n ? `Last ${n[1]} days` : `${s} → ${t || "today"}`;
95
- }), k = (e) => {
95
+ }), $ = (e) => {
96
96
  if (!e) return "0s";
97
97
  const t = Math.floor(e / 60), s = Math.round(e % 60);
98
98
  return t > 0 ? `${t}m ${s}s` : `${s}s`;
99
- }, f = (e) => e == null ? "0" : Math.round(e).toLocaleString(), V = (e) => e == null ? "0%" : `${(e * 100).toFixed(1)}%`, q = (e) => e ? new Date(e).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }) : "", y = (e, t = !1) => {
99
+ }, f = (e) => e == null ? "0" : Math.round(e).toLocaleString(), V = (e) => e == null ? "0%" : `${(e * 100).toFixed(1)}%`, G = (e) => e ? new Date(e).toLocaleString(void 0, { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }) : "", y = (e, t = !1) => {
100
100
  if (e == null) return "text-muted-foreground";
101
101
  const s = t ? e < 0 : e > 0, n = t ? e > 0 : e < 0;
102
102
  return s ? "text-emerald-600 dark:text-emerald-400" : n ? "text-red-600 dark:text-red-400" : "text-muted-foreground";
103
- }, R = (e) => e == null ? null : `${e > 0 ? "+" : ""}${e.toFixed(1)}%`, G = w(() => [
103
+ }, R = (e) => e == null ? null : `${e > 0 ? "+" : ""}${e.toFixed(1)}%`, H = w(() => [
104
104
  { label: "Users", value: f(a.value.totalUsers), change: i.value.totalUsers, icon: A },
105
- { label: "Sessions", value: f(a.value.sessions), change: i.value.sessions, icon: se },
106
- { label: "Page Views", value: f(a.value.screenPageViews), change: i.value.screenPageViews, icon: M },
105
+ { label: "Sessions", value: f(a.value.sessions), change: i.value.sessions, icon: ne },
106
+ { label: "Page Views", value: f(a.value.screenPageViews), change: i.value.screenPageViews, icon: F },
107
107
  { label: "New Users", value: f(a.value.newUsers), change: i.value.newUsers, icon: A },
108
- { label: "Bounce Rate", value: V(a.value.bounceRate), change: i.value.bounceRate, inverted: !0, icon: F },
108
+ { label: "Bounce Rate", value: V(a.value.bounceRate), change: i.value.bounceRate, inverted: !0, icon: M },
109
109
  { label: "Engagement", value: V(a.value.engagementRate), change: i.value.engagementRate, icon: C },
110
- { label: "Avg Duration", value: k(a.value.averageSessionDuration), change: i.value.averageSessionDuration, icon: C },
111
- { label: "Pages/Session", value: (a.value.screenPageViewsPerSession || 0).toFixed(1), change: i.value.screenPageViewsPerSession, icon: M }
110
+ { label: "Avg Duration", value: $(a.value.averageSessionDuration), change: i.value.averageSessionDuration, icon: C },
111
+ { label: "Pages/Session", value: (a.value.screenPageViewsPerSession || 0).toFixed(1), change: i.value.screenPageViewsPerSession, icon: F }
112
112
  ]);
113
113
  return (e, t) => {
114
- const s = Q("NuxtLink");
115
- return o(), c("div", le, [
116
- r(v) ? (o(), c("div", ce, [
117
- h(r(ne), { class: "size-4 animate-spin text-muted-foreground" }),
114
+ const s = W("NuxtLink");
115
+ return o(), c("div", ce, [
116
+ r(v) ? (o(), c("div", ue, [
117
+ h(r(ae), { class: "size-4 animate-spin text-muted-foreground" }),
118
118
  t[0] || (t[0] = l("span", { class: "text-xs text-muted-foreground" }, "Loading visitor statistics…", -1))
119
- ])) : r(g) ? (o(), c("div", ue, d(r(g)), 1)) : (o(), c("div", de, [
120
- l("div", ge, [
121
- l("div", me, [
122
- h(r(ae), { class: "size-3.5 text-primary" }),
119
+ ])) : r(g) ? (o(), c("div", de, d(r(g)), 1)) : (o(), c("div", ge, [
120
+ l("div", me, [
121
+ l("div", ve, [
122
+ h(r(re), { class: "size-3.5 text-primary" }),
123
123
  t[1] || (t[1] = l("span", { class: "text-xs font-medium" }, "Visitor Statistics", -1))
124
124
  ]),
125
- l("span", ve, d(r($)), 1)
125
+ l("span", pe, d(r(k)), 1)
126
126
  ]),
127
- l("div", pe, [
128
- (o(!0), c(W, null, X(r(G), (n) => (o(), c("div", {
127
+ l("div", fe, [
128
+ (o(!0), c(X, null, Z(r(H), (n) => (o(), c("div", {
129
129
  key: n.label,
130
130
  class: "px-3 py-3 space-y-1"
131
131
  }, [
132
- l("div", fe, [
133
- (o(), x(Z(n.icon), { class: "size-3 text-muted-foreground" })),
134
- l("span", he, d(n.label), 1)
132
+ l("div", he, [
133
+ (o(), x(ee(n.icon), { class: "size-3 text-muted-foreground" })),
134
+ l("span", xe, d(n.label), 1)
135
135
  ]),
136
- l("p", xe, d(n.value), 1),
137
- R(n.change) ? (o(), c("div", ye, [
138
- (n.change ?? 0) > 0 ? (o(), x(r(re), {
136
+ l("p", ye, d(n.value), 1),
137
+ R(n.change) ? (o(), c("div", be, [
138
+ (n.change ?? 0) > 0 ? (o(), x(r(oe), {
139
139
  key: 0,
140
140
  class: _(["size-2.5", y(n.change, n.inverted)])
141
- }, null, 8, ["class"])) : (n.change ?? 0) < 0 ? (o(), x(r(F), {
141
+ }, null, 8, ["class"])) : (n.change ?? 0) < 0 ? (o(), x(r(M), {
142
142
  key: 1,
143
143
  class: _(["size-2.5", y(n.change, n.inverted)])
144
- }, null, 8, ["class"])) : (o(), x(r(oe), {
144
+ }, null, 8, ["class"])) : (o(), x(r(ie), {
145
145
  key: 2,
146
146
  class: "size-2.5 text-muted-foreground"
147
147
  })),
@@ -151,15 +151,15 @@ const le = { class: "w-full" }, ce = {
151
151
  ])) : U("", !0)
152
152
  ]))), 128))
153
153
  ]),
154
- l("div", be, [
155
- r(p) ? (o(), c("span", we, " Fetched " + d(q(r(p))), 1)) : U("", !0),
154
+ l("div", we, [
155
+ r(p) ? (o(), c("span", _e, " Fetched " + d(G(r(p))), 1)) : U("", !0),
156
156
  h(s, {
157
- to: `/projects/${r(E)}/modules/${S.instanceId}`,
157
+ to: `/projects/${r(I)}/modules/${S.instanceId}`,
158
158
  class: "inline-flex items-center gap-1.5 text-xs text-primary hover:underline"
159
159
  }, {
160
- default: ee(() => [
161
- h(r(ie), { class: "size-3" }),
162
- t[2] || (t[2] = te(" View full report ", -1))
160
+ default: te(() => [
161
+ h(r(le), { class: "size-3" }),
162
+ t[2] || (t[2] = se(" View full report ", -1))
163
163
  ]),
164
164
  _: 1
165
165
  }, 8, ["to"])
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@oneclick.dev/cms-kit"),t={name:"Table",description:"Manage tables and structured data.",icon:"mdi-table",version:"1.0.0"},o=e.defineModuleConfig({getItems:{label:"Fetch items",type:"flow"},viewable:{label:"Viewable",type:"checkbox",default:!1},editable:{label:"Editable",type:"checkbox",default:!1},deletable:{label:"Deletable",type:"checkbox",default:!1},addable:{label:"Addable",type:"checkbox",default:!1},searchable:{label:"Searchable",type:"checkbox",default:!1},downloadable:{label:"Downloadable",type:"checkbox",default:!1},allowBulkActions:{label:"Allow Bulk Actions",type:"checkbox",default:!1}}),r=[{path:"",component:()=>Promise.resolve().then(()=>require("./TableView-DD3y_PZ3.js"))}],n=[],i={component:()=>Promise.resolve().then(()=>require("./index-DFQGVHTs.js")),metadata:t,config:o,routes:r,permissions:n},a={name:"Products",description:"Manage products",icon:"mdi-table",version:"1.0.0"},s=e.defineModuleConfig({project:{label:"Database",type:"resource",accept:["FIREBASE"]},productCollection:{label:"Product Collection",type:"input",default:"products"},collectionsCollection:{label:"Collections Collection",type:"input",default:"public/e-commerce:collections"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1},previewUrl:{label:"Preview URL",type:"input",default:"https://preview.com/shop/{{slug}}"}}),c=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-B-8TLLjh.js"))},{path:"/:productId",component:()=>Promise.resolve().then(()=>require("./Detail-BcboL7NF.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-BcboL7NF.js"))}],p=[{key:"create-product",name:"Create product",description:"Team member can create a new product"},{key:"edit-product",name:"Edit product",description:"Team member can edit a product"},{key:"delete-product",name:"Delete product",description:"Team member can delete a product"}],l=[{name:"getEmptyStock",description:"Get a list of products with empty stock.",executionMode:"api",parameters:{type:"object",properties:{category:{type:"string",description:"Category of the product"}},required:["category"]}},{name:"viewProductDetails",description:"Show a card in chat with details of a product based on product ID.",executionMode:"component",chatComponent:"ProductDetailsCard",parameters:{type:"object",properties:{productId:{type:"string",description:"ID of the product"}},required:["productId"]}}],d={component:()=>Promise.resolve().then(()=>require("./index-R2oUDsjx.js")),metadata:a,config:s,routes:c,permissions:p,tools:l,chatComponents:{ProductDetailsCard:()=>Promise.resolve().then(()=>require("./ProductDetailsCard-BBOorNmB.js"))}},m={name:"Custom",description:"Custom module",icon:"mdi-table",version:"1.0.0"},u=e.defineModuleConfig({formLayout:{label:"Design View",type:"form"}}),h=[{path:"",component:()=>Promise.resolve().then(()=>require("./View-DfzaVOzS.js"))}],f=[],g={component:()=>Promise.resolve().then(()=>require("./index-CSxYBeVA.js")),metadata:m,config:u,routes:h,permissions:f},y={name:"Promo Codes",description:"Create and manage promo codes",icon:"mdi-table",version:"1.0.0"},b=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},promoCodeCollection:{label:"Promo Code Collection",type:"input",default:"promo-codes"}}),v=[{path:"",component:()=>Promise.resolve().then(()=>require("./Create-CRn2sMHp.js"))},{path:"/promo-codes",component:()=>Promise.resolve().then(()=>require("./Find-Ds6OvuH6.js"))},{path:"/promo-codes/:promoCodeId",component:()=>Promise.resolve().then(()=>require("./Detail-Bxi7lG9x.js"))}],C=[{key:"create-promo-codes",name:"Create promo codes",description:"Team member can create promo codes"},{key:"view-promo-codes",name:"View promo codes",description:"Team member can view promo codes"},{key:"delete-promo-codes",name:"Delete promo codes",description:"Team member can delete promo codes"}],w={component:()=>Promise.resolve().then(()=>require("./index-CkiNvRzs.js")),metadata:y,config:b,routes:v,permissions:C},P={name:"Product Collections",description:"Manage product collections",icon:"mdi-table",version:"1.0.0"},q=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},collectionsCollection:{label:"Collections Collection",type:"input",default:"public/e-commerce:collections"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1}}),D=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-T-lsy3UZ.js"))},{path:"/:collectionId",component:()=>Promise.resolve().then(()=>require("./Detail-CnK-qbhE.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-CnK-qbhE.js"))}],S=[{key:"create-collection",name:"Create product collection",description:"Team member can create a new product collection"},{key:"edit-collection",name:"Edit product collection",description:"Team member can edit a product collection"},{key:"delete-collection",name:"Delete product collection",description:"Team member can delete a product collection"}],k={component:()=>Promise.resolve().then(()=>require("./index-CwqrAU-H.js")),metadata:P,config:q,routes:D,permissions:S},M={name:"Shipping Options",description:"Manage shipping options",icon:"mdi-table",version:"1.0.0"},A=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},shippingOptionsCollection:{label:"Shipping Options Collection",type:"input",default:"public/e-commerce:shipping-options"}}),$=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-BbvfH1u-.js"))},{path:"/:optionId",component:()=>Promise.resolve().then(()=>require("./Detail-BayNaAg9.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-BayNaAg9.js"))}],T=[{key:"create-option",name:"Create shipping option",description:"Team member can create a new shipping option"},{key:"edit-option",name:"Edit shipping option",description:"Team member can edit a shipping option"},{key:"delete-option",name:"Delete shipping option",description:"Team member can delete a shipping option"}],x={component:()=>Promise.resolve().then(()=>require("./index-Co4ON2Di.js")),metadata:M,config:A,routes:$,permissions:T},E={name:"Google Analytics",description:"Configure Google Analytics settings.",icon:"mdi-google-analytics",version:"1.0.0"},I=e.defineModuleConfig({serviceAccount:{label:"Google Service Account",type:"resource",accept:["GOOGLE_SERVICE_ACCOUNT"]},propertyId:{label:"GA4 Property ID",type:"input",default:""},siteUrl:{label:"Search Console Site URL",type:"input",default:"",placeholder:"https://example.com or sc-domain:example.com",description:"Optional. When set, the module will fetch real keyword data from Google Search Console. Use the same site URL format as shown in Search Console."}}),j=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-pCO_47Zt.js"))},{path:"/acquisition",component:()=>Promise.resolve().then(()=>require("./Acquisition-_-cq972V.js"))},{path:"/content",component:()=>Promise.resolve().then(()=>require("./Content-C-4Cdniz.js"))},{path:"/audience",component:()=>Promise.resolve().then(()=>require("./Audience-QnFQs93n.js"))},{path:"/seo",component:()=>Promise.resolve().then(()=>require("./SeoHealth-EZzDmPDM.js"))}],U=[],Y=[{name:"getTopPages",description:"Show a card in chat with the most popular/visited pages on the website for a given period.",executionMode:"component",chatComponent:"TopPagesCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Use relative formats like 'yesterday', '7daysAgo', '30daysAgo', '90daysAgo', '365daysAgo' or exact dates 'YYYY-MM-DD'. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Use 'today', 'yesterday', or exact dates 'YYYY-MM-DD'. Default: 'today'"},limit:{type:"number",description:"Number of pages to show. Default: 10, max: 50",default:10}},required:[]}},{name:"getVisitorStats",description:"Show a card in chat with visitor/traffic statistics (sessions, users, page views, bounce rate, etc.) for a given period. Use this when the user asks about traffic, visitors, how many people visited, etc.",executionMode:"component",chatComponent:"VisitorStatsCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Use 'yesterday' for yesterday, '7daysAgo' for last week, '30daysAgo' for last month, '90daysAgo' for last quarter, '365daysAgo' for last year, or exact 'YYYY-MM-DD'. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Use 'today', 'yesterday', or exact 'YYYY-MM-DD'. Default: 'today'"}},required:[]}},{name:"getSearchTerms",description:"Show a card in chat with search terms/keywords that bring visitors to the website. Use this when the user asks about keywords, SEO terms, what people search for, or search queries.",executionMode:"component",chatComponent:"SearchTermsCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getTrafficSources",description:"Show a card in chat with where website visitors are coming from (traffic sources, channels, referrals). Use this when the user asks about traffic sources, where visitors come from, referrals, channels, etc.",executionMode:"component",chatComponent:"TrafficSourcesCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getRealtimeVisitors",description:"Show a card in chat with the current real-time active visitors on the website right now.",executionMode:"component",chatComponent:"RealtimeCard",parameters:{type:"object",properties:{},required:[]}},{name:"getCountryBreakdown",description:"Show a card in chat with a geographic breakdown of where website visitors are located. Use this when the user asks about visitor countries, geographic distribution, or where their audience is from.",executionMode:"component",chatComponent:"CountryBreakdownCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getDeviceBreakdown",description:"Show a card in chat with a device breakdown (desktop, mobile, tablet) of website visitors. Use this when the user asks about what devices people use, mobile vs desktop traffic, or if their site is mobile-friendly.",executionMode:"component",chatComponent:"DeviceBreakdownCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getPeakHours",description:"Show a card in chat with peak traffic hours and a weekly heatmap showing when visitors are most active. Use this when the user asks about best times to post, peak hours, busiest times, or when their audience is online.",executionMode:"component",chatComponent:"PeakHoursCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}}],R={component:()=>Promise.resolve().then(()=>require("./index-DwHYfZl_.js")),metadata:E,config:I,routes:j,permissions:U,tools:Y,chatComponents:{TopPagesCard:()=>Promise.resolve().then(()=>require("./TopPagesCard-CgtNyhwY.js")),VisitorStatsCard:()=>Promise.resolve().then(()=>require("./VisitorStatsCard-Cs6jPehw.js")),SearchTermsCard:()=>Promise.resolve().then(()=>require("./SearchTermsCard-DmyhGQVM.js")),TrafficSourcesCard:()=>Promise.resolve().then(()=>require("./TrafficSourcesCard-CPAxaQTi.js")),RealtimeCard:()=>Promise.resolve().then(()=>require("./RealtimeCard-DESm9Fs_.js")),CountryBreakdownCard:()=>Promise.resolve().then(()=>require("./CountryBreakdownCard-BpDXbxwZ.js")),DeviceBreakdownCard:()=>Promise.resolve().then(()=>require("./DeviceBreakdownCard-OXiU9Cf0.js")),PeakHoursCard:()=>Promise.resolve().then(()=>require("./PeakHoursCard-OkgI1vnd.js"))}},B={name:"Content Manager",description:"Create and manage content",icon:"mdi-table",version:"1.0.0"},O=e.defineModuleConfig({project:{label:"Database",type:"resource",accept:["FIREBASE"]},domain:{label:"Domain",type:"input",default:"https://domain.com"},collectionsCollection:{label:"Collections Collection",type:"input",default:"content_collections"},contentCollection:{label:"Content Collection",type:"input",default:"content"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1},supportedLanguages:{label:"Supported Languages",type:"select",predefinedOptions:"languages",multiple:!0},defaultLanguage:{label:"Default Language",type:"select",predefinedOptions:"languages"}}),L=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-CwCAeBnX.js"))},{path:"/collections",component:()=>Promise.resolve().then(()=>require("./Overview-CwCAeBnX.js"))},{path:"/collections/:collectionId",component:()=>Promise.resolve().then(()=>require("./Entries-BPkZ7Jg5.js"))},{path:"/collections/:collectionId/:entryId",component:()=>Promise.resolve().then(()=>require("./ContentEditor-4e80zFyn.js"))},{path:"/components",component:()=>Promise.resolve().then(()=>require("./Components-DXbx0RLV.js"))},{path:"/global-styling",component:()=>Promise.resolve().then(()=>require("./GlobalStyling-CnSlXkZc.js"))}],G=[{key:"create-content",name:"Create content",description:"Team member can create content"},{key:"edit-content",name:"Edit content",description:"Team member can edit content"},{key:"delete-content",name:"Delete content",description:"Team member can delete content"}],F={component:()=>Promise.resolve().then(()=>require("./index-UtjLbLw-.js")),metadata:B,config:O,routes:L,permissions:G},V={name:"Mail Templates",description:"Build templates for your transactional emails.",icon:"mdi-table",version:"1.0.0"},N=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},templateCollection:{label:"Mail Templates Collection",type:"input",default:"mail-templates"}}),_=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-BDlBCUI_.js"))},{path:"/:optionId",component:()=>Promise.resolve().then(()=>require("./Detail-mvSGbnFU.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-mvSGbnFU.js"))}],H=[{key:"create-template",name:"Create mail template",description:"Team member can create a new mail template"},{key:"edit-template",name:"Edit mail template",description:"Team member can edit a mail template"},{key:"delete-template",name:"Delete mail template",description:"Team member can delete a mail template"}],K={component:()=>Promise.resolve().then(()=>require("./index-Cz-baGax.js")),metadata:V,config:N,routes:_,permissions:H},W={name:"Appointments",description:"Create and manage agendas for booking appointments.",icon:"mdi-table",version:"1.0.0"},z=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},mailAccount:{label:"Mail account",type:"resource",accept:["GMAIL"]},agendaCollection:{label:"Agenda Collection",type:"input",default:"agendas"},reservationsCollection:{label:"Reservations Collection",type:"input",default:"bookings_orders"},reservedSpotsCollection:{label:"Reserved Spots Collection",type:"input",default:"reserved_spots"}}),J=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-t0pG5xjA.js"))},{path:"/create",component:()=>Promise.resolve().then(()=>require("./index-D2a6wEPh.js"))},{path:"/create/regular",component:()=>Promise.resolve().then(()=>require("./regular-1LXNPviB.js"))},{path:"/edit/:id",component:()=>Promise.resolve().then(()=>require("./index-DTzdHh6g.js"))},{path:"/edit/:id/agenda",component:()=>Promise.resolve().then(()=>require("./agenda-wNFDKn0G.js"))},{path:"/edit/:id/regular-slots",component:()=>Promise.resolve().then(()=>require("./regular-slots-Bs3WJB3U.js"))},{path:"/edit/:id/exceptions",component:()=>Promise.resolve().then(()=>require("./exceptions-wEQEVzIs.js"))},{path:"/edit/:id/availability",component:()=>Promise.resolve().then(()=>require("./availability-BiBbzEIM.js"))},{path:"/edit/:id/payment",component:()=>Promise.resolve().then(()=>require("./payment-BQaAqQ5q.js"))},{path:"/edit/:id/resources",component:()=>Promise.resolve().then(()=>require("./resources-eb0pivDL.js"))},{path:"/edit/:id/orders",component:()=>Promise.resolve().then(()=>require("./orders-D5GJOZXN.js"))}],Q=[{key:"create-agendas",name:"Create agendas",description:"Team member can create agendas"},{key:"edit-agendas",name:"Edit agendas",description:"Team member can edit agendas"},{key:"delete-agendas",name:"Delete agendas",description:"Team member can delete agendas"},{key:"manage-reservations",name:"Manage reservations",description:"Team member can create, edit, and delete reservations"}],X=[{name:"findAppointment",description:"Show a card in chat with details of an appointment/booking/reservation/...",executionMode:"component",chatComponent:"AppointmentDetailsCard",parameters:{type:"object",properties:{name:{type:"string",description:"Name of the booker"},email:{type:"string",description:"Email of the booker"},date:{type:"string",description:"Date of the appointment (YYYY-MM-DD)"}},required:["date"]}},{name:"getRecentAppointments",description:"Show a table in chat with recent appointments, default loading the latest 20 appointments.",executionMode:"component",chatComponent:"AppointmentListTable",parameters:{type:"object",properties:{quantity:{type:"number",description:"Number of appointments to load. default: 20 max: 100",default:20}},required:["quantity"]}},{name:"changeAppointmentDetails",description:"Show a card in chat where user can edit name, email and date of an existing appointment.",executionMode:"component",chatComponent:"AppointmentEditor",parameters:{type:"object",properties:{orderId:{type:"string",description:"ID of the order / appointment. This is NOT the reservation ID."}},required:["orderId"]}}],Z={component:()=>Promise.resolve().then(()=>require("./index-9HVlmvK3.js")),metadata:W,config:z,routes:J,permissions:Q,tools:X,chatComponents:{AppointmentDetailsCard:()=>Promise.resolve().then(()=>require("./AppointmentDetailsCard-LL-6PARb.js")),AppointmentListTable:()=>Promise.resolve().then(()=>require("./AppointmentListTable-DNvvb4sz.js")),AppointmentEditor:()=>Promise.resolve().then(()=>require("./AppointmentEditor-CaTfbkIf.js"))}};exports.appointments=Z;exports.contentManager=F;exports.custom=g;exports.googleAnalytics=R;exports.mailTemplates=K;exports.productCollections=k;exports.products=d;exports.promoCodes=w;exports.shippingOptions=x;exports.table=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@oneclick.dev/cms-kit"),t={name:"Table",description:"Manage tables and structured data.",icon:"mdi-table",version:"1.0.0"},o=e.defineModuleConfig({getItems:{label:"Fetch items",type:"flow"},viewable:{label:"Viewable",type:"checkbox",default:!1},editable:{label:"Editable",type:"checkbox",default:!1},deletable:{label:"Deletable",type:"checkbox",default:!1},addable:{label:"Addable",type:"checkbox",default:!1},searchable:{label:"Searchable",type:"checkbox",default:!1},downloadable:{label:"Downloadable",type:"checkbox",default:!1},allowBulkActions:{label:"Allow Bulk Actions",type:"checkbox",default:!1}}),r=[{path:"",component:()=>Promise.resolve().then(()=>require("./TableView-DD3y_PZ3.js"))}],n=[],i={component:()=>Promise.resolve().then(()=>require("./index-DFQGVHTs.js")),metadata:t,config:o,routes:r,permissions:n},a={name:"Products",description:"Manage products",icon:"mdi-table",version:"1.0.0"},s=e.defineModuleConfig({project:{label:"Database",type:"resource",accept:["FIREBASE"]},productCollection:{label:"Product Collection",type:"input",default:"products"},collectionsCollection:{label:"Collections Collection",type:"input",default:"public/e-commerce:collections"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1},previewUrl:{label:"Preview URL",type:"input",default:"https://preview.com/shop/{{slug}}"}}),c=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-B-8TLLjh.js"))},{path:"/:productId",component:()=>Promise.resolve().then(()=>require("./Detail-BcboL7NF.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-BcboL7NF.js"))}],p=[{key:"create-product",name:"Create product",description:"Team member can create a new product"},{key:"edit-product",name:"Edit product",description:"Team member can edit a product"},{key:"delete-product",name:"Delete product",description:"Team member can delete a product"}],l=[{name:"getEmptyStock",description:"Get a list of products with empty stock.",executionMode:"api",parameters:{type:"object",properties:{category:{type:"string",description:"Category of the product"}},required:["category"]}},{name:"viewProductDetails",description:"Show a card in chat with details of a product based on product ID.",executionMode:"component",chatComponent:"ProductDetailsCard",parameters:{type:"object",properties:{productId:{type:"string",description:"ID of the product"}},required:["productId"]}}],d={component:()=>Promise.resolve().then(()=>require("./index-R2oUDsjx.js")),metadata:a,config:s,routes:c,permissions:p,tools:l,chatComponents:{ProductDetailsCard:()=>Promise.resolve().then(()=>require("./ProductDetailsCard-Bn7qrgmc.js"))}},m={name:"Custom",description:"Custom module",icon:"mdi-table",version:"1.0.0"},u=e.defineModuleConfig({formLayout:{label:"Design View",type:"form"}}),h=[{path:"",component:()=>Promise.resolve().then(()=>require("./View-DfzaVOzS.js"))}],f=[],g={component:()=>Promise.resolve().then(()=>require("./index-CSxYBeVA.js")),metadata:m,config:u,routes:h,permissions:f},y={name:"Promo Codes",description:"Create and manage promo codes",icon:"mdi-table",version:"1.0.0"},b=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},promoCodeCollection:{label:"Promo Code Collection",type:"input",default:"promo-codes"}}),v=[{path:"",component:()=>Promise.resolve().then(()=>require("./Create-CRn2sMHp.js"))},{path:"/promo-codes",component:()=>Promise.resolve().then(()=>require("./Find-Ds6OvuH6.js"))},{path:"/promo-codes/:promoCodeId",component:()=>Promise.resolve().then(()=>require("./Detail-Bxi7lG9x.js"))}],C=[{key:"create-promo-codes",name:"Create promo codes",description:"Team member can create promo codes"},{key:"view-promo-codes",name:"View promo codes",description:"Team member can view promo codes"},{key:"delete-promo-codes",name:"Delete promo codes",description:"Team member can delete promo codes"}],w={component:()=>Promise.resolve().then(()=>require("./index-CkiNvRzs.js")),metadata:y,config:b,routes:v,permissions:C},P={name:"Product Collections",description:"Manage product collections",icon:"mdi-table",version:"1.0.0"},q=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},collectionsCollection:{label:"Collections Collection",type:"input",default:"public/e-commerce:collections"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1}}),D=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-T-lsy3UZ.js"))},{path:"/:collectionId",component:()=>Promise.resolve().then(()=>require("./Detail-CnK-qbhE.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-CnK-qbhE.js"))}],S=[{key:"create-collection",name:"Create product collection",description:"Team member can create a new product collection"},{key:"edit-collection",name:"Edit product collection",description:"Team member can edit a product collection"},{key:"delete-collection",name:"Delete product collection",description:"Team member can delete a product collection"}],k={component:()=>Promise.resolve().then(()=>require("./index-CwqrAU-H.js")),metadata:P,config:q,routes:D,permissions:S},M={name:"Shipping Options",description:"Manage shipping options",icon:"mdi-table",version:"1.0.0"},A=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},shippingOptionsCollection:{label:"Shipping Options Collection",type:"input",default:"public/e-commerce:shipping-options"}}),$=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-BbvfH1u-.js"))},{path:"/:optionId",component:()=>Promise.resolve().then(()=>require("./Detail-BayNaAg9.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-BayNaAg9.js"))}],T=[{key:"create-option",name:"Create shipping option",description:"Team member can create a new shipping option"},{key:"edit-option",name:"Edit shipping option",description:"Team member can edit a shipping option"},{key:"delete-option",name:"Delete shipping option",description:"Team member can delete a shipping option"}],x={component:()=>Promise.resolve().then(()=>require("./index-Co4ON2Di.js")),metadata:M,config:A,routes:$,permissions:T},E={name:"Google Analytics",description:"Configure Google Analytics settings.",icon:"mdi-google-analytics",version:"1.0.0"},I=e.defineModuleConfig({serviceAccount:{label:"Google Service Account",type:"resource",accept:["GOOGLE_SERVICE_ACCOUNT"]},propertyId:{label:"GA4 Property ID",type:"input",default:""},siteUrl:{label:"Search Console Site URL",type:"input",default:"",placeholder:"https://example.com or sc-domain:example.com",description:"Optional. When set, the module will fetch real keyword data from Google Search Console. Use the same site URL format as shown in Search Console."}}),j=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-pCO_47Zt.js"))},{path:"/acquisition",component:()=>Promise.resolve().then(()=>require("./Acquisition-_-cq972V.js"))},{path:"/content",component:()=>Promise.resolve().then(()=>require("./Content-C-4Cdniz.js"))},{path:"/audience",component:()=>Promise.resolve().then(()=>require("./Audience-QnFQs93n.js"))},{path:"/seo",component:()=>Promise.resolve().then(()=>require("./SeoHealth-EZzDmPDM.js"))}],U=[],Y=[{name:"getTopPages",description:"Show a card in chat with the most popular/visited pages on the website for a given period.",executionMode:"component",chatComponent:"TopPagesCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Use relative formats like 'yesterday', '7daysAgo', '30daysAgo', '90daysAgo', '365daysAgo' or exact dates 'YYYY-MM-DD'. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Use 'today', 'yesterday', or exact dates 'YYYY-MM-DD'. Default: 'today'"},limit:{type:"number",description:"Number of pages to show. Default: 10, max: 50",default:10}},required:[]}},{name:"getVisitorStats",description:"Show a card in chat with visitor/traffic statistics (sessions, users, page views, bounce rate, etc.) for a given period. Use this when the user asks about traffic, visitors, how many people visited, etc.",executionMode:"component",chatComponent:"VisitorStatsCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Use 'yesterday' for yesterday, '7daysAgo' for last week, '30daysAgo' for last month, '90daysAgo' for last quarter, '365daysAgo' for last year, or exact 'YYYY-MM-DD'. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Use 'today', 'yesterday', or exact 'YYYY-MM-DD'. Default: 'today'"}},required:[]}},{name:"getSearchTerms",description:"Show a card in chat with search terms/keywords that bring visitors to the website. Use this when the user asks about keywords, SEO terms, what people search for, or search queries.",executionMode:"component",chatComponent:"SearchTermsCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getTrafficSources",description:"Show a card in chat with where website visitors are coming from (traffic sources, channels, referrals). Use this when the user asks about traffic sources, where visitors come from, referrals, channels, etc.",executionMode:"component",chatComponent:"TrafficSourcesCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getRealtimeVisitors",description:"Show a card in chat with the current real-time active visitors on the website right now.",executionMode:"component",chatComponent:"RealtimeCard",parameters:{type:"object",properties:{},required:[]}},{name:"getCountryBreakdown",description:"Show a card in chat with a geographic breakdown of where website visitors are located. Use this when the user asks about visitor countries, geographic distribution, or where their audience is from.",executionMode:"component",chatComponent:"CountryBreakdownCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getDeviceBreakdown",description:"Show a card in chat with a device breakdown (desktop, mobile, tablet) of website visitors. Use this when the user asks about what devices people use, mobile vs desktop traffic, or if their site is mobile-friendly.",executionMode:"component",chatComponent:"DeviceBreakdownCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}},{name:"getPeakHours",description:"Show a card in chat with peak traffic hours and a weekly heatmap showing when visitors are most active. Use this when the user asks about best times to post, peak hours, busiest times, or when their audience is online.",executionMode:"component",chatComponent:"PeakHoursCard",parameters:{type:"object",properties:{startDate:{type:"string",description:"Start date for the report. Default: '30daysAgo'"},endDate:{type:"string",description:"End date for the report. Default: 'today'"}},required:[]}}],R={component:()=>Promise.resolve().then(()=>require("./index-DwHYfZl_.js")),metadata:E,config:I,routes:j,permissions:U,tools:Y,chatComponents:{TopPagesCard:()=>Promise.resolve().then(()=>require("./TopPagesCard-BDeA997A.js")),VisitorStatsCard:()=>Promise.resolve().then(()=>require("./VisitorStatsCard-BmByE_Hi.js")),SearchTermsCard:()=>Promise.resolve().then(()=>require("./SearchTermsCard-BsB-63aH.js")),TrafficSourcesCard:()=>Promise.resolve().then(()=>require("./TrafficSourcesCard-C3ziDTUL.js")),RealtimeCard:()=>Promise.resolve().then(()=>require("./RealtimeCard--APfRNc8.js")),CountryBreakdownCard:()=>Promise.resolve().then(()=>require("./CountryBreakdownCard-D7BK3nRD.js")),DeviceBreakdownCard:()=>Promise.resolve().then(()=>require("./DeviceBreakdownCard-DRhQ9ufG.js")),PeakHoursCard:()=>Promise.resolve().then(()=>require("./PeakHoursCard-BR5zmta4.js"))}},B={name:"Content Manager",description:"Create and manage content",icon:"mdi-table",version:"1.0.0"},O=e.defineModuleConfig({project:{label:"Database",type:"resource",accept:["FIREBASE"]},domain:{label:"Domain",type:"input",default:"https://domain.com"},collectionsCollection:{label:"Collections Collection",type:"input",default:"content_collections"},contentCollection:{label:"Content Collection",type:"input",default:"content"},allowedMediaSources:{label:"Allowed Media Sources",type:"mediaSource",multiple:!0},defaultUploadMediaSource:{label:"Default Upload Media Source",type:"mediaSource",multiple:!1},supportedLanguages:{label:"Supported Languages",type:"select",predefinedOptions:"languages",multiple:!0},defaultLanguage:{label:"Default Language",type:"select",predefinedOptions:"languages"}}),L=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-CwCAeBnX.js"))},{path:"/collections",component:()=>Promise.resolve().then(()=>require("./Overview-CwCAeBnX.js"))},{path:"/collections/:collectionId",component:()=>Promise.resolve().then(()=>require("./Entries-BPkZ7Jg5.js"))},{path:"/collections/:collectionId/:entryId",component:()=>Promise.resolve().then(()=>require("./ContentEditor-4e80zFyn.js"))},{path:"/components",component:()=>Promise.resolve().then(()=>require("./Components-DXbx0RLV.js"))},{path:"/global-styling",component:()=>Promise.resolve().then(()=>require("./GlobalStyling-CnSlXkZc.js"))}],G=[{key:"create-content",name:"Create content",description:"Team member can create content"},{key:"edit-content",name:"Edit content",description:"Team member can edit content"},{key:"delete-content",name:"Delete content",description:"Team member can delete content"}],F={component:()=>Promise.resolve().then(()=>require("./index-UtjLbLw-.js")),metadata:B,config:O,routes:L,permissions:G},V={name:"Mail Templates",description:"Build templates for your transactional emails.",icon:"mdi-table",version:"1.0.0"},N=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},templateCollection:{label:"Mail Templates Collection",type:"input",default:"mail-templates"}}),_=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-BDlBCUI_.js"))},{path:"/:optionId",component:()=>Promise.resolve().then(()=>require("./Detail-mvSGbnFU.js"))},{path:"/new",component:()=>Promise.resolve().then(()=>require("./Detail-mvSGbnFU.js"))}],H=[{key:"create-template",name:"Create mail template",description:"Team member can create a new mail template"},{key:"edit-template",name:"Edit mail template",description:"Team member can edit a mail template"},{key:"delete-template",name:"Delete mail template",description:"Team member can delete a mail template"}],K={component:()=>Promise.resolve().then(()=>require("./index-Cz-baGax.js")),metadata:V,config:N,routes:_,permissions:H},W={name:"Appointments",description:"Create and manage agendas for booking appointments.",icon:"mdi-table",version:"1.0.0"},z=e.defineModuleConfig({project:{label:"Project",type:"resource",accept:["FIREBASE"]},mailAccount:{label:"Mail account",type:"resource",accept:["GMAIL"]},agendaCollection:{label:"Agenda Collection",type:"input",default:"agendas"},reservationsCollection:{label:"Reservations Collection",type:"input",default:"bookings_orders"},reservedSpotsCollection:{label:"Reserved Spots Collection",type:"input",default:"reserved_spots"}}),J=[{path:"",component:()=>Promise.resolve().then(()=>require("./Overview-t0pG5xjA.js"))},{path:"/create",component:()=>Promise.resolve().then(()=>require("./index-D2a6wEPh.js"))},{path:"/create/regular",component:()=>Promise.resolve().then(()=>require("./regular-1LXNPviB.js"))},{path:"/edit/:id",component:()=>Promise.resolve().then(()=>require("./index-DTzdHh6g.js"))},{path:"/edit/:id/agenda",component:()=>Promise.resolve().then(()=>require("./agenda-wNFDKn0G.js"))},{path:"/edit/:id/regular-slots",component:()=>Promise.resolve().then(()=>require("./regular-slots-Bs3WJB3U.js"))},{path:"/edit/:id/exceptions",component:()=>Promise.resolve().then(()=>require("./exceptions-wEQEVzIs.js"))},{path:"/edit/:id/availability",component:()=>Promise.resolve().then(()=>require("./availability-BiBbzEIM.js"))},{path:"/edit/:id/payment",component:()=>Promise.resolve().then(()=>require("./payment-BQaAqQ5q.js"))},{path:"/edit/:id/resources",component:()=>Promise.resolve().then(()=>require("./resources-eb0pivDL.js"))},{path:"/edit/:id/orders",component:()=>Promise.resolve().then(()=>require("./orders-D5GJOZXN.js"))}],Q=[{key:"create-agendas",name:"Create agendas",description:"Team member can create agendas"},{key:"edit-agendas",name:"Edit agendas",description:"Team member can edit agendas"},{key:"delete-agendas",name:"Delete agendas",description:"Team member can delete agendas"},{key:"manage-reservations",name:"Manage reservations",description:"Team member can create, edit, and delete reservations"}],X=[{name:"findAppointment",description:"Show a card in chat with details of an appointment/booking/reservation/...",executionMode:"component",chatComponent:"AppointmentDetailsCard",parameters:{type:"object",properties:{name:{type:"string",description:"Name of the booker"},email:{type:"string",description:"Email of the booker"},date:{type:"string",description:"Date of the appointment (YYYY-MM-DD)"}},required:["date"]}},{name:"getRecentAppointments",description:"Show a table in chat with recent appointments, default loading the latest 20 appointments.",executionMode:"component",chatComponent:"AppointmentListTable",parameters:{type:"object",properties:{quantity:{type:"number",description:"Number of appointments to load. default: 20 max: 100",default:20}},required:["quantity"]}},{name:"changeAppointmentDetails",description:"Show a card in chat where user can edit name, email and date of an existing appointment.",executionMode:"component",chatComponent:"AppointmentEditor",parameters:{type:"object",properties:{orderId:{type:"string",description:"ID of the order / appointment. This is NOT the reservation ID."}},required:["orderId"]}}],Z={component:()=>Promise.resolve().then(()=>require("./index-9HVlmvK3.js")),metadata:W,config:z,routes:J,permissions:Q,tools:X,chatComponents:{AppointmentDetailsCard:()=>Promise.resolve().then(()=>require("./AppointmentDetailsCard-DpLM5IrB.js")),AppointmentListTable:()=>Promise.resolve().then(()=>require("./AppointmentListTable-CQ0WIXtj.js")),AppointmentEditor:()=>Promise.resolve().then(()=>require("./AppointmentEditor-CaTfbkIf.js"))}};exports.appointments=Z;exports.contentManager=F;exports.custom=g;exports.googleAnalytics=R;exports.mailTemplates=K;exports.productCollections=k;exports.products=d;exports.promoCodes=w;exports.shippingOptions=x;exports.table=i;