@oneclick.dev/cms-core-modules 0.0.78 → 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.
- package/dist/{AppointmentDetailsCard-SMNXi117.mjs → AppointmentDetailsCard-33WpATpV.mjs} +42 -43
- package/dist/AppointmentDetailsCard-DpLM5IrB.js +1 -0
- package/dist/AppointmentListTable-CQ0WIXtj.js +1 -0
- package/dist/{AppointmentListTable-vMSMt0M5.mjs → AppointmentListTable-aV_UJd6j.mjs} +24 -25
- package/dist/CountryBreakdownCard-D7BK3nRD.js +1 -0
- package/dist/{CountryBreakdownCard-B_VhBsm8.mjs → CountryBreakdownCard-DVxNz2DJ.mjs} +29 -30
- package/dist/DeviceBreakdownCard-DRhQ9ufG.js +1 -0
- package/dist/{DeviceBreakdownCard-CQR65Zr_.mjs → DeviceBreakdownCard-W1frLe0L.mjs} +57 -58
- package/dist/{PeakHoursCard-_1JS0tpZ.mjs → PeakHoursCard-9-EZFZLR.mjs} +27 -28
- package/dist/PeakHoursCard-BR5zmta4.js +1 -0
- package/dist/{ProductDetailsCard-C5gqBJag.mjs → ProductDetailsCard-6nHikw4V.mjs} +22 -23
- package/dist/ProductDetailsCard-Bn7qrgmc.js +1 -0
- package/dist/RealtimeCard--APfRNc8.js +1 -0
- package/dist/{RealtimeCard-CtX6Yyk-.mjs → RealtimeCard-fvQlJcM7.mjs} +35 -36
- package/dist/SearchTermsCard-BsB-63aH.js +1 -0
- package/dist/{SearchTermsCard-DzSu9jzo.mjs → SearchTermsCard-BzVrHKqQ.mjs} +51 -52
- package/dist/TopPagesCard-BDeA997A.js +1 -0
- package/dist/{TopPagesCard-D7lH_QYV.mjs → TopPagesCard-CTozhOr_.mjs} +38 -39
- package/dist/{TrafficSourcesCard-Fng3fVh7.mjs → TrafficSourcesCard-BxtCKsqx.mjs} +57 -58
- package/dist/TrafficSourcesCard-C3ziDTUL.js +1 -0
- package/dist/VisitorStatsCard-BmByE_Hi.js +1 -0
- package/dist/{VisitorStatsCard-CuXXnMBc.mjs → VisitorStatsCard-CXizEbVK.mjs} +37 -38
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +11 -11
- package/package.json +2 -2
- package/dist/AppointmentDetailsCard-BfBwWxTU.js +0 -1
- package/dist/AppointmentListTable-Dk-CnNR6.js +0 -1
- package/dist/CountryBreakdownCard-Ghg0Wz-h.js +0 -1
- package/dist/DeviceBreakdownCard-Cpcj75Rv.js +0 -1
- package/dist/PeakHoursCard-CFIg8dys.js +0 -1
- package/dist/ProductDetailsCard-Ce11f_9r.js +0 -1
- package/dist/RealtimeCard-CatAzdxv.js +0 -1
- package/dist/SearchTermsCard-BPAdRL-r.js +0 -1
- package/dist/TopPagesCard-BA9Are_Z.js +0 -1
- package/dist/TrafficSourcesCard-DV13ZOBq.js +0 -1
- package/dist/VisitorStatsCard-CAzAZtKD.js +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Loader2 as
|
|
3
|
-
import { useRoute as W, useModuleApi as X } from "@oneclick.dev/cms-kit";
|
|
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";
|
|
4
3
|
const Y = { class: "w-full" }, Z = {
|
|
5
4
|
key: 0,
|
|
6
5
|
class: "flex items-center gap-2 py-3"
|
|
@@ -13,7 +12,7 @@ const Y = { class: "w-full" }, Z = {
|
|
|
13
12
|
}, te = {
|
|
14
13
|
key: 3,
|
|
15
14
|
class: "rounded-xl border bg-background overflow-hidden"
|
|
16
|
-
},
|
|
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 = {
|
|
17
16
|
key: 0,
|
|
18
17
|
class: "px-3 pt-3 pb-2"
|
|
19
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 = {
|
|
@@ -22,7 +21,7 @@ const Y = { class: "w-full" }, Z = {
|
|
|
22
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 = {
|
|
23
22
|
key: 0,
|
|
24
23
|
class: "text-[10px] text-muted-foreground"
|
|
25
|
-
},
|
|
24
|
+
}, ke = /* @__PURE__ */ B({
|
|
26
25
|
__name: "TrafficSourcesCard",
|
|
27
26
|
props: {
|
|
28
27
|
toolName: {},
|
|
@@ -34,8 +33,8 @@ const Y = { class: "w-full" }, Z = {
|
|
|
34
33
|
},
|
|
35
34
|
emits: ["submit"],
|
|
36
35
|
setup(D, { emit: G }) {
|
|
37
|
-
const c = D,
|
|
38
|
-
function
|
|
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() {
|
|
39
38
|
const t = c.resolvedArgs?._cachedData;
|
|
40
39
|
return t ? (u.value = (t.topChannels || []).map((e) => ({
|
|
41
40
|
sessionDefaultChannelGroup: e.channel,
|
|
@@ -49,17 +48,17 @@ const Y = { class: "w-full" }, Z = {
|
|
|
49
48
|
totalUsers: e.users
|
|
50
49
|
})), b.value = c.resolvedArgs._fetchedAt || null, h.value = !1, !0) : !1;
|
|
51
50
|
}
|
|
52
|
-
async function
|
|
51
|
+
async function E() {
|
|
53
52
|
const { startDate: t, endDate: e } = c.resolvedArgs || {};
|
|
54
53
|
h.value = !0, g.value = null;
|
|
55
54
|
try {
|
|
56
55
|
const l = new URLSearchParams();
|
|
57
56
|
t && l.set("startDate", t), e && l.set("endDate", e);
|
|
58
|
-
const [
|
|
57
|
+
const [o, f] = await Promise.all([
|
|
59
58
|
C.get(`/top-sources?${l.toString()}`),
|
|
60
59
|
C.get(`/acquisition/channels?${l.toString()}`)
|
|
61
60
|
]);
|
|
62
|
-
p.value =
|
|
61
|
+
p.value = o.rows || [], u.value = f.rows || [], b.value = (/* @__PURE__ */ new Date()).toISOString(), $({
|
|
63
62
|
topChannels: u.value.map((i) => ({
|
|
64
63
|
channel: i.sessionDefaultChannelGroup,
|
|
65
64
|
sessions: i.sessions,
|
|
@@ -79,13 +78,13 @@ const Y = { class: "w-full" }, Z = {
|
|
|
79
78
|
h.value = !1;
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
|
-
|
|
83
|
-
c.status === "completed" &&
|
|
81
|
+
q(() => {
|
|
82
|
+
c.status === "completed" && V() || E();
|
|
84
83
|
});
|
|
85
84
|
function $(t) {
|
|
86
|
-
c.status !== "completed" &&
|
|
85
|
+
c.status !== "completed" && T("submit", t);
|
|
87
86
|
}
|
|
88
|
-
const v = (t) => t == null ? "0" : Math.round(t).toLocaleString(),
|
|
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 = [
|
|
89
88
|
"bg-primary/70",
|
|
90
89
|
"bg-blue-500/70",
|
|
91
90
|
"bg-emerald-500/70",
|
|
@@ -96,7 +95,7 @@ const Y = { class: "w-full" }, Z = {
|
|
|
96
95
|
"bg-orange-500/70",
|
|
97
96
|
"bg-indigo-500/70",
|
|
98
97
|
"bg-rose-500/70"
|
|
99
|
-
],
|
|
98
|
+
], N = [
|
|
100
99
|
"bg-primary",
|
|
101
100
|
"bg-blue-500",
|
|
102
101
|
"bg-emerald-500",
|
|
@@ -107,82 +106,82 @@ const Y = { class: "w-full" }, Z = {
|
|
|
107
106
|
"bg-orange-500",
|
|
108
107
|
"bg-indigo-500",
|
|
109
108
|
"bg-rose-500"
|
|
110
|
-
],
|
|
109
|
+
], P = _(() => {
|
|
111
110
|
const { startDate: t, endDate: e } = c.resolvedArgs || {};
|
|
112
111
|
if (!t && !e) return "Last 30 days";
|
|
113
|
-
const l = t || "30daysAgo",
|
|
114
|
-
return
|
|
112
|
+
const l = t || "30daysAgo", o = l.match(/^(\d+)daysAgo$/);
|
|
113
|
+
return o ? `Last ${o[1]} days` : `${l} → ${e || "today"}`;
|
|
115
114
|
});
|
|
116
115
|
return (t, e) => {
|
|
117
|
-
const l =
|
|
116
|
+
const l = O("NuxtLink");
|
|
118
117
|
return r(), a("div", Y, [
|
|
119
118
|
s(h) ? (r(), a("div", Z, [
|
|
120
|
-
m(s(
|
|
121
|
-
e[0] || (e[0] =
|
|
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))
|
|
122
121
|
])) : s(g) ? (r(), a("div", ee, d(s(g)), 1)) : s(u).length === 0 && s(p).length === 0 ? (r(), a("div", se, [
|
|
123
122
|
m(s(z), { class: "size-8 text-muted-foreground mx-auto mb-2" }),
|
|
124
|
-
e[1] || (e[1] =
|
|
123
|
+
e[1] || (e[1] = n("p", { class: "text-sm text-muted-foreground" }, "No traffic source data found for this period.", -1))
|
|
125
124
|
])) : (r(), a("div", te, [
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
n("div", ne, [
|
|
126
|
+
n("div", oe, [
|
|
128
127
|
m(s(z), { class: "size-3.5 text-primary" }),
|
|
129
|
-
e[2] || (e[2] =
|
|
128
|
+
e[2] || (e[2] = n("span", { class: "text-xs font-medium" }, "Traffic Sources", -1))
|
|
130
129
|
]),
|
|
131
|
-
|
|
130
|
+
n("span", re, d(s(P)), 1)
|
|
132
131
|
]),
|
|
133
132
|
s(u).length > 0 ? (r(), a("div", ae, [
|
|
134
|
-
|
|
135
|
-
(r(!0), a(y, null, k(s(u), (
|
|
136
|
-
key:
|
|
137
|
-
class:
|
|
138
|
-
style:
|
|
139
|
-
title: `${
|
|
133
|
+
n("div", le, [
|
|
134
|
+
(r(!0), a(y, null, k(s(u), (o, f) => (r(), a("div", {
|
|
135
|
+
key: o.sessionDefaultChannelGroup,
|
|
136
|
+
class: U(["h-full first:rounded-l-full last:rounded-r-full", A[f % A.length]]),
|
|
137
|
+
style: H({ width: `${s(L) > 0 ? (o.sessions || 0) / s(L) * 100 : 0}%` }),
|
|
138
|
+
title: `${o.sessionDefaultChannelGroup}: ${v(o.sessions)} sessions`
|
|
140
139
|
}, null, 14, ie))), 128))
|
|
141
140
|
]),
|
|
142
|
-
|
|
143
|
-
(r(!0), a(y, null, k(s(u).slice(0, 6), (
|
|
144
|
-
key:
|
|
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,
|
|
145
144
|
class: "flex items-center gap-1.5"
|
|
146
145
|
}, [
|
|
147
|
-
|
|
148
|
-
class:
|
|
146
|
+
n("span", {
|
|
147
|
+
class: U(["size-2 rounded-full shrink-0", N[f % N.length]])
|
|
149
148
|
}, null, 2),
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
n("span", de, d(o.sessionDefaultChannelGroup), 1),
|
|
150
|
+
n("span", ce, d(v(o.sessions)), 1)
|
|
152
151
|
]))), 128))
|
|
153
152
|
])
|
|
154
153
|
])) : S("", !0),
|
|
155
154
|
s(p).length > 0 ? (r(), a("div", me, [
|
|
156
|
-
e[3] || (e[3] =
|
|
157
|
-
|
|
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")
|
|
158
157
|
], -1)),
|
|
159
|
-
|
|
160
|
-
(r(!0), a(y, null, k(s(p), (
|
|
161
|
-
key:
|
|
158
|
+
n("div", pe, [
|
|
159
|
+
(r(!0), a(y, null, k(s(p), (o) => (r(), a("div", {
|
|
160
|
+
key: o.sessionSource,
|
|
162
161
|
class: "px-3 py-2 flex items-center justify-between hover:bg-muted/30 transition-colors"
|
|
163
162
|
}, [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
m(s(
|
|
168
|
-
w(" " + d(v(
|
|
163
|
+
n("span", ge, d(o.sessionSource), 1),
|
|
164
|
+
n("div", fe, [
|
|
165
|
+
n("span", xe, [
|
|
166
|
+
m(s(Q), { class: "size-2.5" }),
|
|
167
|
+
w(" " + d(v(o.sessions)), 1)
|
|
169
168
|
]),
|
|
170
|
-
|
|
171
|
-
m(s(
|
|
172
|
-
w(" " + d(v(
|
|
169
|
+
n("span", he, [
|
|
170
|
+
m(s(W), { class: "size-2.5" }),
|
|
171
|
+
w(" " + d(v(o.totalUsers)), 1)
|
|
173
172
|
])
|
|
174
173
|
])
|
|
175
174
|
]))), 128))
|
|
176
175
|
])
|
|
177
176
|
])) : S("", !0),
|
|
178
|
-
|
|
179
|
-
s(b) ? (r(), a("span", ve, " Fetched " + d(
|
|
177
|
+
n("div", be, [
|
|
178
|
+
s(b) ? (r(), a("span", ve, " Fetched " + d(I(s(b))), 1)) : S("", !0),
|
|
180
179
|
m(l, {
|
|
181
|
-
to: `/projects/${s(
|
|
180
|
+
to: `/projects/${s(M)}/modules/${D.instanceId}`,
|
|
182
181
|
class: "inline-flex items-center gap-1.5 text-xs text-primary hover:underline"
|
|
183
182
|
}, {
|
|
184
|
-
default:
|
|
185
|
-
m(s(
|
|
183
|
+
default: J(() => [
|
|
184
|
+
m(s(X), { class: "size-3" }),
|
|
186
185
|
e[4] || (e[4] = w(" View full report ", -1))
|
|
187
186
|
]),
|
|
188
187
|
_: 1
|
|
@@ -194,5 +193,5 @@ const Y = { class: "w-full" }, Z = {
|
|
|
194
193
|
}
|
|
195
194
|
});
|
|
196
195
|
export {
|
|
197
|
-
|
|
196
|
+
ke as default
|
|
198
197
|
};
|
|
@@ -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,6 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Users as A, MousePointerClick as
|
|
3
|
-
import { useRoute as ie, useModuleApi as le } from "@oneclick.dev/cms-kit";
|
|
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";
|
|
4
3
|
const ce = { class: "w-full" }, ue = {
|
|
5
4
|
key: 0,
|
|
6
5
|
class: "flex items-center gap-2 py-3"
|
|
@@ -16,7 +15,7 @@ const ce = { class: "w-full" }, ue = {
|
|
|
16
15
|
}, we = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, _e = {
|
|
17
16
|
key: 0,
|
|
18
17
|
class: "text-[10px] text-muted-foreground"
|
|
19
|
-
},
|
|
18
|
+
}, Pe = /* @__PURE__ */ K({
|
|
20
19
|
__name: "VisitorStatsCard",
|
|
21
20
|
props: {
|
|
22
21
|
toolName: {},
|
|
@@ -27,9 +26,9 @@ const ce = { class: "w-full" }, ue = {
|
|
|
27
26
|
status: {}
|
|
28
27
|
},
|
|
29
28
|
emits: ["submit"],
|
|
30
|
-
setup(S, { emit:
|
|
31
|
-
const u = S,
|
|
32
|
-
function
|
|
29
|
+
setup(S, { emit: N }) {
|
|
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
|
+
function O() {
|
|
33
32
|
const e = u.resolvedArgs?._cachedData;
|
|
34
33
|
return e ? (a.value = {
|
|
35
34
|
totalUsers: e.totalUsers || 0,
|
|
@@ -37,31 +36,31 @@ const ce = { class: "w-full" }, ue = {
|
|
|
37
36
|
screenPageViews: e.pageViews || 0,
|
|
38
37
|
newUsers: e.newUsers || 0,
|
|
39
38
|
bounceRate: D(e.bounceRate),
|
|
40
|
-
averageSessionDuration:
|
|
39
|
+
averageSessionDuration: T(e.avgSessionDuration),
|
|
41
40
|
engagementRate: D(e.engagementRate),
|
|
42
41
|
screenPageViewsPerSession: parseFloat(e.pagesPerSession) || 0
|
|
43
42
|
}, i.value = Object.fromEntries(
|
|
44
|
-
Object.entries(e.changes || {}).map(([t, s]) => [t,
|
|
43
|
+
Object.entries(e.changes || {}).map(([t, s]) => [t, Y(s)])
|
|
45
44
|
), p.value = u.resolvedArgs._fetchedAt || null, v.value = !1, !0) : !1;
|
|
46
45
|
}
|
|
47
46
|
function D(e) {
|
|
48
47
|
return e ? parseFloat(e) / 100 : 0;
|
|
49
48
|
}
|
|
50
|
-
function
|
|
49
|
+
function T(e) {
|
|
51
50
|
if (!e) return 0;
|
|
52
51
|
const t = e.match(/(\d+)m/), s = e.match(/(\d+)s/);
|
|
53
52
|
return (t ? parseInt(t[1]) * 60 : 0) + (s ? parseInt(s[1]) : 0);
|
|
54
53
|
}
|
|
55
|
-
function
|
|
54
|
+
function Y(e) {
|
|
56
55
|
return !e || e === "N/A" ? null : parseFloat(e.replace("+", ""));
|
|
57
56
|
}
|
|
58
|
-
async function
|
|
57
|
+
async function q() {
|
|
59
58
|
const { startDate: e, endDate: t } = u.resolvedArgs || {};
|
|
60
59
|
v.value = !0, g.value = null;
|
|
61
60
|
try {
|
|
62
61
|
const s = new URLSearchParams();
|
|
63
62
|
e && s.set("startDate", e), t && s.set("endDate", t);
|
|
64
|
-
const n = await
|
|
63
|
+
const n = await B.get(`/report?${s.toString()}`);
|
|
65
64
|
a.value = n.totals || {}, i.value = n.changes || {}, p.value = (/* @__PURE__ */ new Date()).toISOString(), P({
|
|
66
65
|
period: k.value,
|
|
67
66
|
totalUsers: Math.round(a.value.totalUsers || 0),
|
|
@@ -69,11 +68,11 @@ const ce = { class: "w-full" }, ue = {
|
|
|
69
68
|
pageViews: Math.round(a.value.screenPageViews || 0),
|
|
70
69
|
newUsers: Math.round(a.value.newUsers || 0),
|
|
71
70
|
bounceRate: `${(a.value.bounceRate * 100).toFixed(1)}%`,
|
|
72
|
-
avgSessionDuration:
|
|
71
|
+
avgSessionDuration: $(a.value.averageSessionDuration),
|
|
73
72
|
engagementRate: `${(a.value.engagementRate * 100).toFixed(1)}%`,
|
|
74
73
|
pagesPerSession: (a.value.screenPageViewsPerSession || 0).toFixed(1),
|
|
75
74
|
changes: Object.fromEntries(
|
|
76
|
-
Object.entries(i.value).map(([
|
|
75
|
+
Object.entries(i.value).map(([J, b]) => [J, b !== null ? `${b > 0 ? "+" : ""}${b.toFixed(1)}%` : "N/A"])
|
|
77
76
|
)
|
|
78
77
|
});
|
|
79
78
|
} catch (s) {
|
|
@@ -82,67 +81,67 @@ const ce = { class: "w-full" }, ue = {
|
|
|
82
81
|
v.value = !1;
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
|
-
|
|
86
|
-
u.status === "completed" &&
|
|
84
|
+
Q(() => {
|
|
85
|
+
u.status === "completed" && O() || q();
|
|
87
86
|
});
|
|
88
87
|
function P(e) {
|
|
89
|
-
u.status !== "completed" &&
|
|
88
|
+
u.status !== "completed" && z("submit", e);
|
|
90
89
|
}
|
|
91
90
|
const k = w(() => {
|
|
92
91
|
const { startDate: e, endDate: t } = u.resolvedArgs || {};
|
|
93
92
|
if (!e && !t) return "Last 30 days";
|
|
94
93
|
const s = e || "30daysAgo", n = s.match(/^(\d+)daysAgo$/);
|
|
95
94
|
return s === "yesterday" && (!t || t === "yesterday") ? "Yesterday" : n ? `Last ${n[1]} days` : `${s} → ${t || "today"}`;
|
|
96
|
-
}),
|
|
95
|
+
}), $ = (e) => {
|
|
97
96
|
if (!e) return "0s";
|
|
98
97
|
const t = Math.floor(e / 60), s = Math.round(e % 60);
|
|
99
98
|
return t > 0 ? `${t}m ${s}s` : `${s}s`;
|
|
100
|
-
}, f = (e) => e == null ? "0" : Math.round(e).toLocaleString(),
|
|
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) => {
|
|
101
100
|
if (e == null) return "text-muted-foreground";
|
|
102
101
|
const s = t ? e < 0 : e > 0, n = t ? e > 0 : e < 0;
|
|
103
102
|
return s ? "text-emerald-600 dark:text-emerald-400" : n ? "text-red-600 dark:text-red-400" : "text-muted-foreground";
|
|
104
|
-
}, R = (e) => e == null ? null : `${e > 0 ? "+" : ""}${e.toFixed(1)}%`,
|
|
103
|
+
}, R = (e) => e == null ? null : `${e > 0 ? "+" : ""}${e.toFixed(1)}%`, H = w(() => [
|
|
105
104
|
{ label: "Users", value: f(a.value.totalUsers), change: i.value.totalUsers, icon: A },
|
|
106
|
-
{ label: "Sessions", value: f(a.value.sessions), change: i.value.sessions, icon:
|
|
105
|
+
{ label: "Sessions", value: f(a.value.sessions), change: i.value.sessions, icon: ne },
|
|
107
106
|
{ label: "Page Views", value: f(a.value.screenPageViews), change: i.value.screenPageViews, icon: F },
|
|
108
107
|
{ label: "New Users", value: f(a.value.newUsers), change: i.value.newUsers, icon: A },
|
|
109
|
-
{ label: "Bounce Rate", value:
|
|
110
|
-
{ label: "Engagement", value:
|
|
111
|
-
{ label: "Avg Duration", value:
|
|
108
|
+
{ label: "Bounce Rate", value: V(a.value.bounceRate), change: i.value.bounceRate, inverted: !0, icon: M },
|
|
109
|
+
{ label: "Engagement", value: V(a.value.engagementRate), change: i.value.engagementRate, icon: C },
|
|
110
|
+
{ label: "Avg Duration", value: $(a.value.averageSessionDuration), change: i.value.averageSessionDuration, icon: C },
|
|
112
111
|
{ label: "Pages/Session", value: (a.value.screenPageViewsPerSession || 0).toFixed(1), change: i.value.screenPageViewsPerSession, icon: F }
|
|
113
112
|
]);
|
|
114
113
|
return (e, t) => {
|
|
115
|
-
const s =
|
|
114
|
+
const s = W("NuxtLink");
|
|
116
115
|
return o(), c("div", ce, [
|
|
117
116
|
r(v) ? (o(), c("div", ue, [
|
|
118
|
-
h(r(
|
|
117
|
+
h(r(ae), { class: "size-4 animate-spin text-muted-foreground" }),
|
|
119
118
|
t[0] || (t[0] = l("span", { class: "text-xs text-muted-foreground" }, "Loading visitor statistics…", -1))
|
|
120
119
|
])) : r(g) ? (o(), c("div", de, d(r(g)), 1)) : (o(), c("div", ge, [
|
|
121
120
|
l("div", me, [
|
|
122
121
|
l("div", ve, [
|
|
123
|
-
h(r(
|
|
122
|
+
h(r(re), { class: "size-3.5 text-primary" }),
|
|
124
123
|
t[1] || (t[1] = l("span", { class: "text-xs font-medium" }, "Visitor Statistics", -1))
|
|
125
124
|
]),
|
|
126
125
|
l("span", pe, d(r(k)), 1)
|
|
127
126
|
]),
|
|
128
127
|
l("div", fe, [
|
|
129
|
-
(o(!0), c(
|
|
128
|
+
(o(!0), c(X, null, Z(r(H), (n) => (o(), c("div", {
|
|
130
129
|
key: n.label,
|
|
131
130
|
class: "px-3 py-3 space-y-1"
|
|
132
131
|
}, [
|
|
133
132
|
l("div", he, [
|
|
134
|
-
(o(), x(
|
|
133
|
+
(o(), x(ee(n.icon), { class: "size-3 text-muted-foreground" })),
|
|
135
134
|
l("span", xe, d(n.label), 1)
|
|
136
135
|
]),
|
|
137
136
|
l("p", ye, d(n.value), 1),
|
|
138
137
|
R(n.change) ? (o(), c("div", be, [
|
|
139
|
-
(n.change ?? 0) > 0 ? (o(), x(r(
|
|
138
|
+
(n.change ?? 0) > 0 ? (o(), x(r(oe), {
|
|
140
139
|
key: 0,
|
|
141
140
|
class: _(["size-2.5", y(n.change, n.inverted)])
|
|
142
141
|
}, null, 8, ["class"])) : (n.change ?? 0) < 0 ? (o(), x(r(M), {
|
|
143
142
|
key: 1,
|
|
144
143
|
class: _(["size-2.5", y(n.change, n.inverted)])
|
|
145
|
-
}, null, 8, ["class"])) : (o(), x(r(
|
|
144
|
+
}, null, 8, ["class"])) : (o(), x(r(ie), {
|
|
146
145
|
key: 2,
|
|
147
146
|
class: "size-2.5 text-muted-foreground"
|
|
148
147
|
})),
|
|
@@ -153,14 +152,14 @@ const ce = { class: "w-full" }, ue = {
|
|
|
153
152
|
]))), 128))
|
|
154
153
|
]),
|
|
155
154
|
l("div", we, [
|
|
156
|
-
r(p) ? (o(), c("span", _e, " Fetched " + d(
|
|
155
|
+
r(p) ? (o(), c("span", _e, " Fetched " + d(G(r(p))), 1)) : U("", !0),
|
|
157
156
|
h(s, {
|
|
158
|
-
to: `/projects/${r(
|
|
157
|
+
to: `/projects/${r(I)}/modules/${S.instanceId}`,
|
|
159
158
|
class: "inline-flex items-center gap-1.5 text-xs text-primary hover:underline"
|
|
160
159
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
h(r(
|
|
163
|
-
t[2] || (t[2] =
|
|
160
|
+
default: te(() => [
|
|
161
|
+
h(r(le), { class: "size-3" }),
|
|
162
|
+
t[2] || (t[2] = se(" View full report ", -1))
|
|
164
163
|
]),
|
|
165
164
|
_: 1
|
|
166
165
|
}, 8, ["to"])
|
|
@@ -171,5 +170,5 @@ const ce = { class: "w-full" }, ue = {
|
|
|
171
170
|
}
|
|
172
171
|
});
|
|
173
172
|
export {
|
|
174
|
-
|
|
173
|
+
Pe as default
|
|
175
174
|
};
|
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-Ce11f_9r.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-BA9Are_Z.js")),VisitorStatsCard:()=>Promise.resolve().then(()=>require("./VisitorStatsCard-CAzAZtKD.js")),SearchTermsCard:()=>Promise.resolve().then(()=>require("./SearchTermsCard-BPAdRL-r.js")),TrafficSourcesCard:()=>Promise.resolve().then(()=>require("./TrafficSourcesCard-DV13ZOBq.js")),RealtimeCard:()=>Promise.resolve().then(()=>require("./RealtimeCard-CatAzdxv.js")),CountryBreakdownCard:()=>Promise.resolve().then(()=>require("./CountryBreakdownCard-Ghg0Wz-h.js")),DeviceBreakdownCard:()=>Promise.resolve().then(()=>require("./DeviceBreakdownCard-Cpcj75Rv.js")),PeakHoursCard:()=>Promise.resolve().then(()=>require("./PeakHoursCard-CFIg8dys.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-BfBwWxTU.js")),AppointmentListTable:()=>Promise.resolve().then(()=>require("./AppointmentListTable-Dk-CnNR6.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;
|
package/dist/index.mjs
CHANGED
|
@@ -140,7 +140,7 @@ const t = {
|
|
|
140
140
|
permissions: s,
|
|
141
141
|
tools: c,
|
|
142
142
|
chatComponents: {
|
|
143
|
-
ProductDetailsCard: () => import("./ProductDetailsCard-
|
|
143
|
+
ProductDetailsCard: () => import("./ProductDetailsCard-6nHikw4V.mjs")
|
|
144
144
|
}
|
|
145
145
|
}, d = {
|
|
146
146
|
name: "Custom",
|
|
@@ -454,14 +454,14 @@ const t = {
|
|
|
454
454
|
permissions: T,
|
|
455
455
|
tools: E,
|
|
456
456
|
chatComponents: {
|
|
457
|
-
TopPagesCard: () => import("./TopPagesCard-
|
|
458
|
-
VisitorStatsCard: () => import("./VisitorStatsCard-
|
|
459
|
-
SearchTermsCard: () => import("./SearchTermsCard-
|
|
460
|
-
TrafficSourcesCard: () => import("./TrafficSourcesCard-
|
|
461
|
-
RealtimeCard: () => import("./RealtimeCard-
|
|
462
|
-
CountryBreakdownCard: () => import("./CountryBreakdownCard-
|
|
463
|
-
DeviceBreakdownCard: () => import("./DeviceBreakdownCard-
|
|
464
|
-
PeakHoursCard: () => import("./PeakHoursCard-
|
|
457
|
+
TopPagesCard: () => import("./TopPagesCard-CTozhOr_.mjs"),
|
|
458
|
+
VisitorStatsCard: () => import("./VisitorStatsCard-CXizEbVK.mjs"),
|
|
459
|
+
SearchTermsCard: () => import("./SearchTermsCard-BzVrHKqQ.mjs"),
|
|
460
|
+
TrafficSourcesCard: () => import("./TrafficSourcesCard-BxtCKsqx.mjs"),
|
|
461
|
+
RealtimeCard: () => import("./RealtimeCard-fvQlJcM7.mjs"),
|
|
462
|
+
CountryBreakdownCard: () => import("./CountryBreakdownCard-DVxNz2DJ.mjs"),
|
|
463
|
+
DeviceBreakdownCard: () => import("./DeviceBreakdownCard-W1frLe0L.mjs"),
|
|
464
|
+
PeakHoursCard: () => import("./PeakHoursCard-9-EZFZLR.mjs")
|
|
465
465
|
}
|
|
466
466
|
}, I = {
|
|
467
467
|
name: "Content Manager",
|
|
@@ -680,8 +680,8 @@ const t = {
|
|
|
680
680
|
permissions: F,
|
|
681
681
|
tools: V,
|
|
682
682
|
chatComponents: {
|
|
683
|
-
AppointmentDetailsCard: () => import("./AppointmentDetailsCard-
|
|
684
|
-
AppointmentListTable: () => import("./AppointmentListTable-
|
|
683
|
+
AppointmentDetailsCard: () => import("./AppointmentDetailsCard-33WpATpV.mjs"),
|
|
684
|
+
AppointmentListTable: () => import("./AppointmentListTable-aV_UJd6j.mjs"),
|
|
685
685
|
AppointmentEditor: () => import("./AppointmentEditor-BeOtYV6u.mjs")
|
|
686
686
|
}
|
|
687
687
|
};
|