@oneclick.dev/cms-core-modules 0.0.101 → 0.0.103

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 (117) hide show
  1. package/dist/Acquisition-Br1Pfny3.js +1 -0
  2. package/dist/{Acquisition-BJXNY4ko.mjs → Acquisition-CPlZzUBo.mjs} +40 -40
  3. package/dist/AgendaOpeningHoursCard-B7ROIPWw.js +1 -0
  4. package/dist/AgendaOpeningHoursCard-Cp4wxUeK.mjs +172 -0
  5. package/dist/AppointmentListTable-DZJNmTMb.mjs +177 -0
  6. package/dist/AppointmentListTable-Dieu9US_.js +1 -0
  7. package/dist/Audience-BfkrmBuQ.js +1 -0
  8. package/dist/{Audience-CIzVtUvV.mjs → Audience-DTblSAiL.mjs} +89 -89
  9. package/dist/Content-BHr_rPVY.js +1 -0
  10. package/dist/{Content-CWhjurn_.mjs → Content-CYOZKvWK.mjs} +56 -56
  11. package/dist/{ContentEditor-Cjqgb64R.mjs → ContentEditor-B1nfKG_5.mjs} +706 -677
  12. package/dist/{ContentEditor-YgOS3kxS.js → ContentEditor-DdFU8piH.js} +15 -16
  13. package/dist/{Create-6uT9HWar.mjs → Create-BRBh0xjM.mjs} +2 -2
  14. package/dist/{Create-DuZ5nZrX.js → Create-qPeQxkdl.js} +1 -1
  15. package/dist/{DateFormatter-2B0R-DY4.mjs → DateFormatter-Bw-87W31.mjs} +212 -227
  16. package/dist/DateFormatter-CYAD4GBN.js +1 -0
  17. package/dist/{Detail-BZ-iE9vf.js → Detail-C857g62L.js} +1 -1
  18. package/dist/{Detail-CJVMJDP7.mjs → Detail-CujdFApD.mjs} +2 -2
  19. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-DWMqQvHl.mjs +76 -0
  20. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-kpjbVSXg.js +1 -0
  21. package/dist/{Entries-DkRhOt95.js → Entries-BaS6H6ak.js} +1 -1
  22. package/dist/{Entries-dLlCrXXe.mjs → Entries-C8UJkrVC.mjs} +1 -1
  23. package/dist/{Find-Bd1uLqSa.mjs → Find-B24ZEhYM.mjs} +1 -1
  24. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-Bc946oSc.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-9Q7TMm4u.mjs} +37 -37
  25. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-CqERfyYb.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-DiNzGl-q.js} +1 -1
  26. package/dist/{Overview-DoOASlNz.mjs → Overview-3HWhsqaz.mjs} +2 -2
  27. package/dist/Overview-BrCwozey.js +1 -0
  28. package/dist/{Overview-37nilXzE.js → Overview-CpHhuiaV.js} +1 -1
  29. package/dist/{Overview-DeQQ0FY3.js → Overview-DAxCu9XC.js} +1 -1
  30. package/dist/{Overview-C--dq51X.mjs → Overview-D_T3K6aq.mjs} +1 -1
  31. package/dist/{Overview-CGo4jaaA.mjs → Overview-kaMhsIUq.mjs} +21 -21
  32. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cz_22Oce.mjs +2927 -0
  33. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-DPPNc-Z5.js +349 -0
  34. package/dist/SeoHealth-09sEOu3G.js +1 -0
  35. package/dist/{SeoHealth-DVFDz3em.mjs → SeoHealth-BzcWd_w7.mjs} +29 -29
  36. package/dist/TableView-CPAw3h8g.js +4 -0
  37. package/dist/TableView-DXmEF6pY.mjs +6143 -0
  38. package/dist/agenda-BNG05SAq.js +1 -0
  39. package/dist/agenda-D1RxMxBS.mjs +1152 -0
  40. package/dist/availability-CMrRa5y2.mjs +269 -0
  41. package/dist/availability-Cf2YfMwM.js +1 -0
  42. package/dist/booking-data-DgJd0BcM.mjs +889 -0
  43. package/dist/booking-data-Di5GmH_8.js +1 -0
  44. package/dist/cms-core-modules.css +1 -1
  45. package/dist/{exceptions-Bp5BSvxO.js → exceptions-CI0B4xVj.js} +1 -1
  46. package/dist/{exceptions-C97cNZYl.mjs → exceptions-vo8SA5SE.mjs} +68 -68
  47. package/dist/index-BtujSJeg.js +35 -0
  48. package/dist/{index-CrGjxSwa.mjs → index-CrgzoTyR.mjs} +1 -1
  49. package/dist/{index-D2a6wEPh.js → index-DPd3waTN.js} +1 -1
  50. package/dist/{index-CABh6Qn6.mjs → index-DrXxXB2F.mjs} +15 -15
  51. package/dist/{index-B-lVEpFX.mjs → index-MYWjg0zi.mjs} +3 -3
  52. package/dist/index-dOdMm1pV.mjs +1105 -0
  53. package/dist/index.cjs.js +1 -1
  54. package/dist/index.mjs +201 -148
  55. package/dist/interpolation-DEDSLETn.mjs +128 -0
  56. package/dist/interpolation-DERg6Lwt.js +1 -0
  57. package/dist/orders-CzzcFQha.mjs +559 -0
  58. package/dist/orders-ETtbA4aQ.js +1 -0
  59. package/dist/{payment-Bosr0m3u.mjs → payment-C3ohkehF.mjs} +1 -1
  60. package/dist/{payment-DDnC03jb.js → payment-Dfr-Ro-a.js} +1 -1
  61. package/dist/{resources-BtF5RUUq.js → resources-CxeFd57z.js} +1 -1
  62. package/dist/{resources-B7qDBC91.mjs → resources-WI_4SO6T.mjs} +2 -2
  63. package/dist/server-handlers.cjs.js +1 -1
  64. package/dist/server-handlers.mjs +457 -387
  65. package/dist/src/appointments/chat-components/AgendaOpeningHoursCard.vue.d.ts +15 -0
  66. package/dist/src/appointments/components/edit/CustomerInformationFieldEditorDialog.vue.d.ts +17 -5
  67. package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +8 -3
  68. package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +1 -0
  69. package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +6 -3
  70. package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +3 -0
  71. package/dist/src/appointments/components/edit/EventView.vue.d.ts +6 -1
  72. package/dist/src/appointments/components/edit/MetadataSchemaEditorDialog.vue.d.ts +12 -0
  73. package/dist/src/appointments/components/edit/OrderMetadataDisplay.vue.d.ts +21 -0
  74. package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +8 -3
  75. package/dist/src/appointments/index.d.ts +53 -0
  76. package/dist/src/appointments/pages/edit/agenda.vue.d.ts +3 -1
  77. package/dist/src/appointments/pages/edit/availability.vue.d.ts +1 -26
  78. package/dist/src/appointments/pages/edit/booking-data.vue.d.ts +65 -0
  79. package/dist/src/appointments/pages/edit/orders.vue.d.ts +7 -3
  80. package/dist/src/appointments/tools.d.ts +52 -0
  81. package/dist/src/appointments/types.d.ts +12 -0
  82. package/dist/src/table/config.d.ts +200 -0
  83. package/dist/src/table/get_data_flow-DEFAULT.json.d.ts +129 -0
  84. package/dist/src/table/index.d.ts +200 -0
  85. package/dist/utils-CanmrIWO.mjs +47 -0
  86. package/dist/utils-Yd6F5mea.js +3 -0
  87. package/package.json +2 -2
  88. package/src/appointments/tools.ts +38 -0
  89. package/dist/Acquisition-DPScJD4t.js +0 -1
  90. package/dist/AppointmentListTable-CQ0WIXtj.js +0 -1
  91. package/dist/AppointmentListTable-aV_UJd6j.mjs +0 -159
  92. package/dist/Audience-Csw1QLmw.js +0 -1
  93. package/dist/Content-dYr7kYT0.js +0 -1
  94. package/dist/DateFormatter-DbtOLV0L.js +0 -1
  95. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-DXa-Xxue.mjs +0 -74
  96. package/dist/EditLayout.vue_vue_type_script_setup_true_lang-ozYrxb2g.js +0 -1
  97. package/dist/Overview-DBu86Ikb.js +0 -1
  98. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-COfCOMsz.js +0 -349
  99. package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CYXkhhdp.mjs +0 -2383
  100. package/dist/SeoHealth-DzftZW1m.js +0 -1
  101. package/dist/TableView-CIJs118q.mjs +0 -5929
  102. package/dist/TableView-DzZYf34i.js +0 -4
  103. package/dist/agenda-DMT75Qfo.mjs +0 -1133
  104. package/dist/agenda-DxD4RMsy.js +0 -1
  105. package/dist/availability-B1D4Fyzi.mjs +0 -629
  106. package/dist/availability-DxrUcYbW.js +0 -1
  107. package/dist/index-BbqRTXuU.js +0 -35
  108. package/dist/index-D4GsbUId.mjs +0 -1091
  109. package/dist/interpolation-BBwG_ON6.mjs +0 -65
  110. package/dist/interpolation-CsOrww73.js +0 -1
  111. package/dist/orders-BRfXlWgV.mjs +0 -397
  112. package/dist/orders-CrCz1WTR.js +0 -1
  113. package/dist/regular-slots-Cc1jmKuC.mjs +0 -222
  114. package/dist/regular-slots-DBs1XVeN.js +0 -1
  115. package/dist/src/appointments/pages/edit/regular-slots.vue.d.ts +0 -2
  116. package/dist/utils-BVKy9S2J.mjs +0 -29
  117. package/dist/utils-D6CaKJbp.js +0 -2
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("@oneclick.dev/cms-kit"),i=require("lucide-vue-next"),$={class:"flex flex-col gap-6 w-full max-w-7xl mx-auto py-8"},z={class:"flex justify-between gap-4 flex-col @lg:flex-row @lg:items-center"},T={key:0,class:"flex items-center gap-2"},L={class:"flex items-center border rounded-lg overflow-hidden"},M=["onClick"],F={class:"text-sm text-destructive font-medium"},j={key:2,class:"flex items-center justify-center py-20"},A={class:"flex items-center justify-between gap-4"},U={class:"flex items-center gap-2"},q=["onClick"],H={key:0,class:"relative"},I={class:"overflow-x-auto"},O={class:"w-full text-sm"},Q={class:"divide-y"},K={class:"px-6 py-3 text-muted-foreground"},W={class:"px-4 py-3 max-w-[300px]"},G={class:"truncate font-mono text-xs"},J={key:0,class:"truncate text-xs text-muted-foreground mt-0.5"},X={class:"px-4 py-3 text-right tabular-nums"},Y={class:"px-4 py-3 text-right tabular-nums"},Z={class:"px-4 py-3 text-right tabular-nums"},ee={class:"px-4 py-3 text-right tabular-nums"},te={class:"px-4 py-3 text-right tabular-nums"},oe={class:"px-4 py-3 text-right"},ne={class:"flex items-center justify-end gap-2"},ae={class:"w-12 h-1.5 bg-muted rounded-full overflow-hidden"},re={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},se={class:"overflow-x-auto"},le={class:"w-full text-sm"},de={class:"divide-y"},ce={class:"px-6 py-3 text-muted-foreground"},ie={class:"px-4 py-3 font-mono text-xs truncate max-w-[300px]"},ue={class:"px-4 py-3 text-right tabular-nums"},me={class:"px-4 py-3 text-right tabular-nums"},xe={class:"px-4 py-3 text-right tabular-nums"},ge={class:"px-4 py-3 text-right tabular-nums"},pe={class:"px-4 py-3 text-right tabular-nums"},fe={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},he={class:"overflow-x-auto"},ye={class:"w-full text-sm"},ve={class:"divide-y"},Ve={class:"px-6 py-3 text-muted-foreground"},Ne={class:"px-4 py-3 font-mono text-xs truncate max-w-[300px]"},_e={class:"px-4 py-3 text-right tabular-nums"},Ee={class:"px-4 py-3 text-right tabular-nums"},ke={class:"px-4 py-3 text-right"},be={class:"flex items-center justify-end gap-2"},Ce={class:"w-16 h-1.5 bg-muted rounded-full overflow-hidden"},we={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},Be=e.defineComponent({__name:"Content",setup(Se){const{config:k}=E.useModule(),{moduleId:S}=E.useModuleRoute();E.useModuleBreadcrumbs(()=>[{label:"Content"}]);const l=e.ref(!0),x=e.ref(null),g=e.ref("30"),d=e.ref("all"),u=e.ref(""),y=e.ref([]),v=e.ref([]),V=e.ref([]),p=e.computed(()=>!!(k.serviceAccount&&k.propertyId));function N(n){return`/api/v1/modules/${S}${n}`}const D=[{label:"7d",value:"7"},{label:"14d",value:"14"},{label:"30d",value:"30"},{label:"90d",value:"90"}];function c(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${(n/1e3).toFixed(1)}K`:Math.round(n).toString()}function m(n){return`${(n*100).toFixed(1)}%`}function b(n){const o=Math.floor(n/60),a=Math.round(n%60);return o>0?`${o}m ${a}s`:`${a}s`}function f(n){const o=n.engagementRate||0,a=Math.min((n.averageSessionDuration||0)/300,1),r=Math.min((n.screenPageViews||0)/1e3,1);return(o*.4+a*.35+r*.25)*100}function P(n){return n>=70?"text-emerald-600 dark:text-emerald-400":n>=40?"text-amber-600 dark:text-amber-400":"text-red-500 dark:text-red-400"}function R(n){return n>=70?"bg-emerald-500":n>=40?"bg-amber-500":"bg-red-500"}const C=e.computed(()=>{if(!u.value)return y.value;const n=u.value.toLowerCase();return y.value.filter(o=>(o.pagePath||"").toLowerCase().includes(n)||(o.pageTitle||"").toLowerCase().includes(n))});async function h(){if(!p.value)return;l.value=!0,x.value=null;const n=`${g.value}daysAgo`;try{const[o,a,r]=await Promise.all([$fetch(N(`/content/all-pages?startDate=${n}&endDate=today&limit=50`)),$fetch(N(`/content/landing-pages?startDate=${n}&endDate=today`)),$fetch(N(`/content/exit-pages?startDate=${n}&endDate=today`))]);y.value=o.rows||[],v.value=a.rows||[],V.value=r.rows||[]}catch(o){x.value=o?.data?.statusMessage||o?.message||"Failed to load content data"}finally{l.value=!1}}return e.watch(g,()=>h()),e.onMounted(()=>{p.value?h():l.value=!1}),(n,o)=>{const a=e.resolveComponent("Button"),r=e.resolveComponent("Card"),_=e.resolveComponent("CardContent"),w=e.resolveComponent("CardTitle"),B=e.resolveComponent("CardHeader");return e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("div",z,[o[1]||(o[1]=e.createElementVNode("div",null,[e.createElementVNode("h1",{class:"text-2xl font-semibold"},"Content Performance"),e.createElementVNode("p",{class:"text-muted-foreground text-sm mt-1"},"How your pages perform")],-1)),p.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("div",L,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(D,t=>e.createElementVNode("button",{key:t.value,class:e.normalizeClass(["px-3 py-1.5 text-xs font-medium transition-colors",g.value===t.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:s=>g.value=t.value},e.toDisplayString(t.label),11,M)),64))]),e.createVNode(a,{variant:"outline",size:"icon",onClick:h,disabled:l.value},{default:e.withCtx(()=>[e.createVNode(e.unref(i.RefreshCw),{class:e.normalizeClass(["size-4",{"animate-spin":l.value}])},null,8,["class"])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0)]),p.value?x.value?(e.openBlock(),e.createBlock(r,{key:1,class:"p-6 border-destructive/50 bg-destructive/5"},{default:e.withCtx(()=>[e.createElementVNode("p",F,e.toDisplayString(x.value),1),e.createVNode(a,{variant:"outline",size:"sm",class:"mt-3",onClick:h},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode("Retry",-1)])]),_:1})]),_:1})):l.value?(e.openBlock(),e.createElementBlock("div",j,[e.createVNode(e.unref(i.Loader2),{class:"size-8 animate-spin text-muted-foreground"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",A,[e.createElementVNode("div",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList([{key:"all",label:"All Pages",icon:e.unref(i.FileText)},{key:"landing",label:"Landing Pages",icon:e.unref(i.LogIn)},{key:"exit",label:"Exit Pages",icon:e.unref(i.LogOut)}],t=>(e.openBlock(),e.createElementBlock("button",{key:t.key,class:e.normalizeClass(["flex items-center gap-1.5 px-3 py-2 text-sm font-medium rounded-md transition-colors",d.value===t.key?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"]),onClick:s=>d.value=t.key},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{class:"size-3.5"})),e.createTextVNode(" "+e.toDisplayString(t.label),1)],10,q))),128))]),d.value==="all"?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(e.unref(i.Search),{class:"absolute left-2.5 top-1/2 -translate-y-1/2 size-3.5 text-muted-foreground"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=t=>u.value=t),type:"text",placeholder:"Filter pages...",class:"pl-8 pr-3 py-1.5 text-sm border rounded-md bg-transparent w-48 focus:outline-none focus:ring-1 focus:ring-ring"},null,512),[[e.vModelText,u.value]])])):e.createCommentVNode("",!0)]),d.value==="all"?(e.openBlock(),e.createBlock(r,{key:0},{default:e.withCtx(()=>[e.createVNode(_,{class:"p-0"},{default:e.withCtx(()=>[e.createElementVNode("div",I,[e.createElementVNode("table",O,[o[4]||(o[4]=e.createElementVNode("thead",null,[e.createElementVNode("tr",{class:"border-b text-left"},[e.createElementVNode("th",{class:"px-6 py-3 font-medium text-muted-foreground w-8"},"#"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground"},"Page"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Views"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Users"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Avg Time"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Bounce"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Engagement"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Score")])],-1)),e.createElementVNode("tbody",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(t,s)=>(e.openBlock(),e.createElementBlock("tr",{key:t.pagePath,class:"hover:bg-muted/50 group"},[e.createElementVNode("td",K,e.toDisplayString(s+1),1),e.createElementVNode("td",W,[e.createElementVNode("div",G,e.toDisplayString(t.pagePath),1),t.pageTitle?(e.openBlock(),e.createElementBlock("div",J,e.toDisplayString(t.pageTitle),1)):e.createCommentVNode("",!0)]),e.createElementVNode("td",X,e.toDisplayString(c(t.screenPageViews)),1),e.createElementVNode("td",Y,e.toDisplayString(c(t.totalUsers)),1),e.createElementVNode("td",Z,e.toDisplayString(b(t.averageSessionDuration||0)),1),e.createElementVNode("td",ee,e.toDisplayString(m(t.bounceRate||0)),1),e.createElementVNode("td",te,e.toDisplayString(m(t.engagementRate||0)),1),e.createElementVNode("td",oe,[e.createElementVNode("div",ne,[e.createElementVNode("div",ae,[e.createElementVNode("div",{class:e.normalizeClass(["h-full rounded-full transition-all",R(f(t))]),style:e.normalizeStyle({width:`${Math.min(f(t),100)}%`})},null,6)]),e.createElementVNode("span",{class:e.normalizeClass(["text-xs font-medium tabular-nums w-8 text-right",P(f(t))])},e.toDisplayString(Math.round(f(t))),3)])])]))),128))])])]),C.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",re,e.toDisplayString(u.value?"No pages matching your search":"No page data available"),1))]),_:1})]),_:1})):e.createCommentVNode("",!0),d.value==="landing"?(e.openBlock(),e.createBlock(r,{key:1},{default:e.withCtx(()=>[e.createVNode(B,{class:"pb-2"},{default:e.withCtx(()=>[e.createVNode(w,{class:"text-base"},{default:e.withCtx(()=>[...o[5]||(o[5]=[e.createTextVNode("Top Landing Pages",-1)])]),_:1}),o[6]||(o[6]=e.createElementVNode("p",{class:"text-xs text-muted-foreground mt-1"},"Where users first enter your site. Low bounce + high engagement = great landing page.",-1))]),_:1}),e.createVNode(_,{class:"p-0"},{default:e.withCtx(()=>[e.createElementVNode("div",se,[e.createElementVNode("table",le,[o[7]||(o[7]=e.createElementVNode("thead",null,[e.createElementVNode("tr",{class:"border-b text-left"},[e.createElementVNode("th",{class:"px-6 py-3 font-medium text-muted-foreground w-8"},"#"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground"},"Landing Page"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Sessions"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Users"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Bounce"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Avg Time"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Engagement")])],-1)),e.createElementVNode("tbody",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(t,s)=>(e.openBlock(),e.createElementBlock("tr",{key:t.landingPagePlusQueryString,class:"hover:bg-muted/50"},[e.createElementVNode("td",ce,e.toDisplayString(s+1),1),e.createElementVNode("td",ie,e.toDisplayString(t.landingPagePlusQueryString),1),e.createElementVNode("td",ue,e.toDisplayString(c(t.sessions)),1),e.createElementVNode("td",me,e.toDisplayString(c(t.totalUsers)),1),e.createElementVNode("td",xe,[e.createElementVNode("span",{class:e.normalizeClass((t.bounceRate||0)>.6?"text-red-500":(t.bounceRate||0)<.3?"text-emerald-600 dark:text-emerald-400":"")},e.toDisplayString(m(t.bounceRate||0)),3)]),e.createElementVNode("td",ge,e.toDisplayString(b(t.averageSessionDuration||0)),1),e.createElementVNode("td",pe,[e.createElementVNode("span",{class:e.normalizeClass((t.engagementRate||0)>.6?"text-emerald-600 dark:text-emerald-400":"")},e.toDisplayString(m(t.engagementRate||0)),3)])]))),128))])])]),v.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",fe,"No landing page data"))]),_:1})]),_:1})):e.createCommentVNode("",!0),d.value==="exit"?(e.openBlock(),e.createBlock(r,{key:2},{default:e.withCtx(()=>[e.createVNode(B,{class:"pb-2"},{default:e.withCtx(()=>[e.createVNode(w,{class:"text-base"},{default:e.withCtx(()=>[...o[8]||(o[8]=[e.createTextVNode("Top Exit Pages",-1)])]),_:1}),o[9]||(o[9]=e.createElementVNode("p",{class:"text-xs text-muted-foreground mt-1"},"Where users leave your site. High exit rate might indicate issues.",-1))]),_:1}),e.createVNode(_,{class:"p-0"},{default:e.withCtx(()=>[e.createElementVNode("div",he,[e.createElementVNode("table",ye,[o[10]||(o[10]=e.createElementVNode("thead",null,[e.createElementVNode("tr",{class:"border-b text-left"},[e.createElementVNode("th",{class:"px-6 py-3 font-medium text-muted-foreground w-8"},"#"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground"},"Page"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Sessions"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Page Views"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Bounce Rate")])],-1)),e.createElementVNode("tbody",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(t,s)=>(e.openBlock(),e.createElementBlock("tr",{key:t.pagePath,class:"hover:bg-muted/50"},[e.createElementVNode("td",Ve,e.toDisplayString(s+1),1),e.createElementVNode("td",Ne,e.toDisplayString(t.pagePath),1),e.createElementVNode("td",_e,e.toDisplayString(c(t.sessions)),1),e.createElementVNode("td",Ee,e.toDisplayString(c(t.screenPageViews)),1),e.createElementVNode("td",ke,[e.createElementVNode("div",be,[e.createElementVNode("div",Ce,[e.createElementVNode("div",{class:e.normalizeClass(["h-full rounded-full transition-all",(t.exitRate||0)>.7?"bg-red-500":(t.exitRate||0)>.4?"bg-amber-500":"bg-emerald-500"]),style:e.normalizeStyle({width:`${(t.exitRate||0)*100}%`})},null,6)]),e.createElementVNode("span",{class:e.normalizeClass(["text-xs tabular-nums",(t.exitRate||0)>.7?"text-red-500":""])},e.toDisplayString(m(t.exitRate||0)),3)])])]))),128))])])]),V.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",we,"No exit page data"))]),_:1})]),_:1})):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(r,{key:0,class:"p-8 text-center"},{default:e.withCtx(()=>[...o[2]||(o[2]=[e.createElementVNode("p",{class:"text-lg font-medium"},"Setup required",-1)])]),_:1}))])}}});exports.default=Be;
@@ -1,10 +1,10 @@
1
- import { defineComponent as W, ref as x, computed as j, watch as K, onMounted as G, resolveComponent as k, openBlock as a, createElementBlock as r, createElementVNode as t, Fragment as y, renderList as C, normalizeClass as c, toDisplayString as n, createVNode as d, withCtx as l, unref as _, createCommentVNode as m, createBlock as v, createTextVNode as M, resolveDynamicComponent as J, withDirectives as X, vModelText as Y, normalizeStyle as H } from "vue";
1
+ import { defineComponent as W, ref as m, computed as j, watch as K, onMounted as G, resolveComponent as k, openBlock as n, createElementBlock as r, createElementVNode as t, Fragment as y, renderList as C, normalizeClass as c, toDisplayString as a, createVNode as d, withCtx as l, unref as _, createCommentVNode as x, createBlock as v, createTextVNode as M, resolveDynamicComponent as J, withDirectives as X, vModelText as Y, normalizeStyle as H } from "vue";
2
2
  import { useModule as Z, useModuleRoute as tt, useModuleBreadcrumbs as et } from "@oneclick.dev/cms-kit";
3
- import { RefreshCw as st, Loader2 as ot, FileText as nt, LogIn as at, LogOut as rt, Search as lt } from "lucide-vue-next";
4
- const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut = { class: "flex items-center justify-between" }, it = {
3
+ import { RefreshCw as st, Loader2 as ot, FileText as at, LogIn as nt, LogOut as rt, Search as lt } from "lucide-vue-next";
4
+ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut = { class: "flex justify-between gap-4 flex-col @lg:flex-row @lg:items-center" }, it = {
5
5
  key: 0,
6
6
  class: "flex items-center gap-2"
7
- }, ct = { class: "flex items-center border rounded-lg overflow-hidden" }, mt = ["onClick"], xt = { class: "text-sm text-destructive font-medium" }, gt = {
7
+ }, ct = { class: "flex items-center border rounded-lg overflow-hidden" }, xt = ["onClick"], mt = { class: "text-sm text-destructive font-medium" }, gt = {
8
8
  key: 2,
9
9
  class: "flex items-center justify-center py-20"
10
10
  }, ft = { class: "flex items-center justify-between gap-4" }, pt = { class: "flex items-center gap-2" }, ht = ["onClick"], yt = {
@@ -27,7 +27,7 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
27
27
  setup(oe) {
28
28
  const { config: z } = Z(), { moduleId: I } = tt();
29
29
  et(() => [{ label: "Content" }]);
30
- const f = x(!0), P = x(null), R = x("30"), p = x("all"), b = x(""), T = x([]), L = x([]), B = x([]), $ = j(() => !!(z.serviceAccount && z.propertyId));
30
+ const f = m(!0), P = m(null), R = m("30"), p = m("all"), b = m(""), T = m([]), L = m([]), B = m([]), $ = j(() => !!(z.serviceAccount && z.propertyId));
31
31
  function V(o) {
32
32
  return `/api/v1/modules/${I}${o}`;
33
33
  }
@@ -85,19 +85,19 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
85
85
  $.value ? D() : f.value = !1;
86
86
  }), (o, s) => {
87
87
  const u = k("Button"), i = k("Card"), N = k("CardContent"), E = k("CardTitle"), U = k("CardHeader");
88
- return a(), r("div", dt, [
88
+ return n(), r("div", dt, [
89
89
  t("div", ut, [
90
90
  s[1] || (s[1] = t("div", null, [
91
91
  t("h1", { class: "text-2xl font-semibold" }, "Content Performance"),
92
92
  t("p", { class: "text-muted-foreground text-sm mt-1" }, "How your pages perform")
93
93
  ], -1)),
94
- $.value ? (a(), r("div", it, [
94
+ $.value ? (n(), r("div", it, [
95
95
  t("div", ct, [
96
- (a(), r(y, null, C(Q, (e) => t("button", {
96
+ (n(), r(y, null, C(Q, (e) => t("button", {
97
97
  key: e.value,
98
98
  class: c(["px-3 py-1.5 text-xs font-medium transition-colors", R.value === e.value ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted"]),
99
99
  onClick: (g) => R.value = e.value
100
- }, n(e.label), 11, mt)), 64))
100
+ }, a(e.label), 11, xt)), 64))
101
101
  ]),
102
102
  d(u, {
103
103
  variant: "outline",
@@ -112,14 +112,14 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
112
112
  ]),
113
113
  _: 1
114
114
  }, 8, ["disabled"])
115
- ])) : m("", !0)
115
+ ])) : x("", !0)
116
116
  ]),
117
- $.value ? P.value ? (a(), v(i, {
117
+ $.value ? P.value ? (n(), v(i, {
118
118
  key: 1,
119
119
  class: "p-6 border-destructive/50 bg-destructive/5"
120
120
  }, {
121
121
  default: l(() => [
122
- t("p", xt, n(P.value), 1),
122
+ t("p", mt, a(P.value), 1),
123
123
  d(u, {
124
124
  variant: "outline",
125
125
  size: "sm",
@@ -133,25 +133,25 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
133
133
  })
134
134
  ]),
135
135
  _: 1
136
- })) : f.value ? (a(), r("div", gt, [
136
+ })) : f.value ? (n(), r("div", gt, [
137
137
  d(_(ot), { class: "size-8 animate-spin text-muted-foreground" })
138
- ])) : (a(), r(y, { key: 3 }, [
138
+ ])) : (n(), r(y, { key: 3 }, [
139
139
  t("div", ft, [
140
140
  t("div", pt, [
141
- (a(!0), r(y, null, C([
142
- { key: "all", label: "All Pages", icon: _(nt) },
143
- { key: "landing", label: "Landing Pages", icon: _(at) },
141
+ (n(!0), r(y, null, C([
142
+ { key: "all", label: "All Pages", icon: _(at) },
143
+ { key: "landing", label: "Landing Pages", icon: _(nt) },
144
144
  { key: "exit", label: "Exit Pages", icon: _(rt) }
145
- ], (e) => (a(), r("button", {
145
+ ], (e) => (n(), r("button", {
146
146
  key: e.key,
147
147
  class: c(["flex items-center gap-1.5 px-3 py-2 text-sm font-medium rounded-md transition-colors", p.value === e.key ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"]),
148
148
  onClick: (g) => p.value = e.key
149
149
  }, [
150
- (a(), v(J(e.icon), { class: "size-3.5" })),
151
- M(" " + n(e.label), 1)
150
+ (n(), v(J(e.icon), { class: "size-3.5" })),
151
+ M(" " + a(e.label), 1)
152
152
  ], 10, ht))), 128))
153
153
  ]),
154
- p.value === "all" ? (a(), r("div", yt, [
154
+ p.value === "all" ? (n(), r("div", yt, [
155
155
  d(_(lt), { class: "absolute left-2.5 top-1/2 -translate-y-1/2 size-3.5 text-muted-foreground" }),
156
156
  X(t("input", {
157
157
  "onUpdate:modelValue": s[0] || (s[0] = (e) => b.value = e),
@@ -161,9 +161,9 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
161
161
  }, null, 512), [
162
162
  [Y, b.value]
163
163
  ])
164
- ])) : m("", !0)
164
+ ])) : x("", !0)
165
165
  ]),
166
- p.value === "all" ? (a(), v(i, { key: 0 }, {
166
+ p.value === "all" ? (n(), v(i, { key: 0 }, {
167
167
  default: l(() => [
168
168
  d(N, { class: "p-0" }, {
169
169
  default: l(() => [
@@ -182,20 +182,20 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
182
182
  ])
183
183
  ], -1)),
184
184
  t("tbody", bt, [
185
- (a(!0), r(y, null, C(A.value, (e, g) => (a(), r("tr", {
185
+ (n(!0), r(y, null, C(A.value, (e, g) => (n(), r("tr", {
186
186
  key: e.pagePath,
187
187
  class: "hover:bg-muted/50 group"
188
188
  }, [
189
- t("td", wt, n(g + 1), 1),
189
+ t("td", wt, a(g + 1), 1),
190
190
  t("td", kt, [
191
- t("div", Ct, n(e.pagePath), 1),
192
- e.pageTitle ? (a(), r("div", Pt, n(e.pageTitle), 1)) : m("", !0)
191
+ t("div", Ct, a(e.pagePath), 1),
192
+ e.pageTitle ? (n(), r("div", Pt, a(e.pageTitle), 1)) : x("", !0)
193
193
  ]),
194
- t("td", Rt, n(h(e.screenPageViews)), 1),
195
- t("td", $t, n(h(e.totalUsers)), 1),
196
- t("td", St, n(F(e.averageSessionDuration || 0)), 1),
197
- t("td", Dt, n(w(e.bounceRate || 0)), 1),
198
- t("td", Mt, n(w(e.engagementRate || 0)), 1),
194
+ t("td", Rt, a(h(e.screenPageViews)), 1),
195
+ t("td", $t, a(h(e.totalUsers)), 1),
196
+ t("td", St, a(F(e.averageSessionDuration || 0)), 1),
197
+ t("td", Dt, a(w(e.bounceRate || 0)), 1),
198
+ t("td", Mt, a(w(e.engagementRate || 0)), 1),
199
199
  t("td", Tt, [
200
200
  t("div", Lt, [
201
201
  t("div", Bt, [
@@ -206,21 +206,21 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
206
206
  ]),
207
207
  t("span", {
208
208
  class: c(["text-xs font-medium tabular-nums w-8 text-right", q(S(e))])
209
- }, n(Math.round(S(e))), 3)
209
+ }, a(Math.round(S(e))), 3)
210
210
  ])
211
211
  ])
212
212
  ]))), 128))
213
213
  ])
214
214
  ])
215
215
  ]),
216
- A.value.length ? m("", !0) : (a(), r("div", Vt, n(b.value ? "No pages matching your search" : "No page data available"), 1))
216
+ A.value.length ? x("", !0) : (n(), r("div", Vt, a(b.value ? "No pages matching your search" : "No page data available"), 1))
217
217
  ]),
218
218
  _: 1
219
219
  })
220
220
  ]),
221
221
  _: 1
222
- })) : m("", !0),
223
- p.value === "landing" ? (a(), v(i, { key: 1 }, {
222
+ })) : x("", !0),
223
+ p.value === "landing" ? (n(), v(i, { key: 1 }, {
224
224
  default: l(() => [
225
225
  d(U, { class: "pb-2" }, {
226
226
  default: l(() => [
@@ -250,37 +250,37 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
250
250
  ])
251
251
  ], -1)),
252
252
  t("tbody", Ft, [
253
- (a(!0), r(y, null, C(L.value, (e, g) => (a(), r("tr", {
253
+ (n(!0), r(y, null, C(L.value, (e, g) => (n(), r("tr", {
254
254
  key: e.landingPagePlusQueryString,
255
255
  class: "hover:bg-muted/50"
256
256
  }, [
257
- t("td", At, n(g + 1), 1),
258
- t("td", Et, n(e.landingPagePlusQueryString), 1),
259
- t("td", Ut, n(h(e.sessions)), 1),
260
- t("td", jt, n(h(e.totalUsers)), 1),
257
+ t("td", At, a(g + 1), 1),
258
+ t("td", Et, a(e.landingPagePlusQueryString), 1),
259
+ t("td", Ut, a(h(e.sessions)), 1),
260
+ t("td", jt, a(h(e.totalUsers)), 1),
261
261
  t("td", Ht, [
262
262
  t("span", {
263
263
  class: c((e.bounceRate || 0) > 0.6 ? "text-red-500" : (e.bounceRate || 0) < 0.3 ? "text-emerald-600 dark:text-emerald-400" : "")
264
- }, n(w(e.bounceRate || 0)), 3)
264
+ }, a(w(e.bounceRate || 0)), 3)
265
265
  ]),
266
- t("td", It, n(F(e.averageSessionDuration || 0)), 1),
266
+ t("td", It, a(F(e.averageSessionDuration || 0)), 1),
267
267
  t("td", Qt, [
268
268
  t("span", {
269
269
  class: c((e.engagementRate || 0) > 0.6 ? "text-emerald-600 dark:text-emerald-400" : "")
270
- }, n(w(e.engagementRate || 0)), 3)
270
+ }, a(w(e.engagementRate || 0)), 3)
271
271
  ])
272
272
  ]))), 128))
273
273
  ])
274
274
  ])
275
275
  ]),
276
- L.value.length ? m("", !0) : (a(), r("div", qt, "No landing page data"))
276
+ L.value.length ? x("", !0) : (n(), r("div", qt, "No landing page data"))
277
277
  ]),
278
278
  _: 1
279
279
  })
280
280
  ]),
281
281
  _: 1
282
- })) : m("", !0),
283
- p.value === "exit" ? (a(), v(i, { key: 2 }, {
282
+ })) : x("", !0),
283
+ p.value === "exit" ? (n(), v(i, { key: 2 }, {
284
284
  default: l(() => [
285
285
  d(U, { class: "pb-2" }, {
286
286
  default: l(() => [
@@ -308,14 +308,14 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
308
308
  ])
309
309
  ], -1)),
310
310
  t("tbody", Kt, [
311
- (a(!0), r(y, null, C(B.value, (e, g) => (a(), r("tr", {
311
+ (n(!0), r(y, null, C(B.value, (e, g) => (n(), r("tr", {
312
312
  key: e.pagePath,
313
313
  class: "hover:bg-muted/50"
314
314
  }, [
315
- t("td", Gt, n(g + 1), 1),
316
- t("td", Jt, n(e.pagePath), 1),
317
- t("td", Xt, n(h(e.sessions)), 1),
318
- t("td", Yt, n(h(e.screenPageViews)), 1),
315
+ t("td", Gt, a(g + 1), 1),
316
+ t("td", Jt, a(e.pagePath), 1),
317
+ t("td", Xt, a(h(e.sessions)), 1),
318
+ t("td", Yt, a(h(e.screenPageViews)), 1),
319
319
  t("td", Zt, [
320
320
  t("div", te, [
321
321
  t("div", ee, [
@@ -326,21 +326,21 @@ const dt = { class: "flex flex-col gap-6 w-full max-w-7xl mx-auto py-8" }, ut =
326
326
  ]),
327
327
  t("span", {
328
328
  class: c(["text-xs tabular-nums", (e.exitRate || 0) > 0.7 ? "text-red-500" : ""])
329
- }, n(w(e.exitRate || 0)), 3)
329
+ }, a(w(e.exitRate || 0)), 3)
330
330
  ])
331
331
  ])
332
332
  ]))), 128))
333
333
  ])
334
334
  ])
335
335
  ]),
336
- B.value.length ? m("", !0) : (a(), r("div", se, "No exit page data"))
336
+ B.value.length ? x("", !0) : (n(), r("div", se, "No exit page data"))
337
337
  ]),
338
338
  _: 1
339
339
  })
340
340
  ]),
341
341
  _: 1
342
- })) : m("", !0)
343
- ], 64)) : (a(), v(i, {
342
+ })) : x("", !0)
343
+ ], 64)) : (n(), v(i, {
344
344
  key: 0,
345
345
  class: "p-8 text-center"
346
346
  }, {