@oneclick.dev/cms-core-modules 0.0.71 → 0.0.72
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/Acquisition-D_Qx7XRY.mjs +400 -0
- package/dist/Acquisition-_-cq972V.js +1 -0
- package/dist/AppointmentDetailsCard-CtK0Cj_O.js +1 -0
- package/dist/AppointmentDetailsCard-i4Ky8WnK.mjs +161 -0
- package/dist/AppointmentEditor-BeOtYV6u.mjs +196 -0
- package/dist/AppointmentEditor-CaTfbkIf.js +1 -0
- package/dist/AppointmentListTable-CQ3uXfa8.js +1 -0
- package/dist/AppointmentListTable-G5dIeCYj.mjs +159 -0
- package/dist/Audience-BdlrWkY-.mjs +489 -0
- package/dist/Audience-QnFQs93n.js +1 -0
- package/dist/Content-C-4Cdniz.js +1 -0
- package/dist/Content-DW6xvbUo.mjs +358 -0
- package/dist/ContentEditor-3JFlC9N1.js +313 -0
- package/dist/{ContentEditor-B7IYLH91.mjs → ContentEditor-7SDjf5Hk.mjs} +16535 -25527
- package/dist/CountryBreakdownCard-BUfJ-umQ.js +1 -0
- package/dist/CountryBreakdownCard-Dc_vZ9dJ.mjs +196 -0
- package/dist/{Create-D8NBEkJU.js → Create-CRn2sMHp.js} +1 -1
- package/dist/{Create-BDiyCtrp.mjs → Create-DtFzwxn_.mjs} +1 -1
- package/dist/DateFormatter-C9qfmQnP.js +1 -0
- package/dist/{DateFormatter-DAZP9a6L.mjs → DateFormatter-DfIwyrnF.mjs} +399 -258
- package/dist/{Detail-Cxd2VMOl.js → Detail-BcboL7NF.js} +1 -1
- package/dist/{Detail-CxUU6BpO.mjs → Detail-BwDnY42G.mjs} +1 -1
- package/dist/{Detail-DTHaYmyl.js → Detail-Bxi7lG9x.js} +1 -1
- package/dist/{Detail-BGD75ul4.mjs → Detail-CVgWHbMC.mjs} +22 -18
- package/dist/DeviceBreakdownCard-BJcQNo8a.mjs +159 -0
- package/dist/DeviceBreakdownCard-CsoK6JUO.js +1 -0
- package/dist/{Find-B4sAEx0B.mjs → Find-XPcJxeRH.mjs} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-B-ZhMrMu.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-C5YczjNb.js} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-CJ7hh7ug.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-Ds7z0qeH.mjs} +1 -1
- package/dist/{Overview-HvlDEgqi.mjs → Overview--XpvBbqz.mjs} +1 -1
- package/dist/Overview-B8OF-JJr.mjs +567 -0
- package/dist/Overview-DSU1Nh7B.js +1 -0
- package/dist/PeakHoursCard-BNl_U1r_.js +1 -0
- package/dist/PeakHoursCard-hV8PdGsf.mjs +182 -0
- package/dist/ProductDetailsCard-BwktdlIf.js +1 -0
- package/dist/ProductDetailsCard-CJBkZSER.mjs +121 -0
- package/dist/RealtimeCard-CRJHS64l.mjs +126 -0
- package/dist/RealtimeCard-CxtqQHee.js +1 -0
- package/dist/SearchTermsCard-DGRbo5ZP.js +1 -0
- package/dist/SearchTermsCard-Dwa-P7My.mjs +201 -0
- package/dist/SeoHealth-BqlYiSCj.js +1 -0
- package/dist/SeoHealth-DG004AsJ.mjs +523 -0
- package/dist/{TableView-C4NNrJpP.js → TableView-CU0a9ih2.js} +162 -199
- package/dist/{TableView-B5OyApnP.mjs → TableView-fYC7kB6j.mjs} +23309 -24320
- package/dist/TopPagesCard-Dv52to_J.mjs +159 -0
- package/dist/TopPagesCard-pZ-nAsaI.js +1 -0
- package/dist/TrafficSourcesCard-CBOPV1J1.js +1 -0
- package/dist/TrafficSourcesCard-CMhcj2k2.mjs +197 -0
- package/dist/VisitorStatsCard-BHn4oSnt.mjs +174 -0
- package/dist/VisitorStatsCard-tApB_7v8.js +1 -0
- package/dist/{agenda-CTG6N_Lt.mjs → agenda-XqvbrU72.mjs} +2 -2
- package/dist/{agenda-OSkAh0Oa.js → agenda-wNFDKn0G.js} +1 -1
- package/dist/array-CbATeQbk.js +1 -0
- package/dist/array-CvmZXzxF.mjs +108 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/{exceptions-CEXIFw47.mjs → exceptions-CLgeeUSy.mjs} +1 -1
- package/dist/{exceptions-BvMTqtof.js → exceptions-wEQEVzIs.js} +1 -1
- package/dist/floating-ui.dom-BO2Hr6mz.mjs +1292 -0
- package/dist/floating-ui.dom-CAr9LGoC.js +1 -0
- package/dist/{index-AmUV8LZQ.mjs → index-B-lVEpFX.mjs} +1 -1
- package/dist/index-BuzLn4Km.js +54 -0
- package/dist/index-C4YUVWzJ.js +75 -0
- package/dist/index-CMk3uhUt.mjs +3837 -0
- package/dist/{index-Uf7TwBuW.mjs → index-CrGjxSwa.mjs} +4 -4
- package/dist/index-D2DYuz8R.mjs +1090 -0
- package/dist/index-D3L8WAJI.js +58 -0
- package/dist/index-D7JBu6iT.mjs +34 -0
- package/dist/index-DQYBP8Js.js +158 -0
- package/dist/index-DjDCYQ_6.mjs +441 -0
- package/dist/index-DwHYfZl_.js +1 -0
- package/dist/{index-Biuv2zTx-DBCin9DT.mjs → index-N6w5-hDF-6k_ELHYC.mjs} +1234 -1234
- package/dist/index-N6w5-hDF-DCuxwPBX.js +88 -0
- package/dist/index-O_QNuTdG.js +35 -0
- package/dist/index-_2lRVt_k.mjs +2942 -0
- package/dist/index-p5Uqu8c2.mjs +1438 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +383 -86
- package/dist/{resources-DgPnEv76.mjs → resources-CFR_s89Z.mjs} +1 -1
- package/dist/src/appointments/chat-components/AppointmentDetailsCard.vue.d.ts +14 -0
- package/dist/src/appointments/chat-components/AppointmentEditor.vue.d.ts +14 -0
- package/dist/src/appointments/chat-components/AppointmentListTable.vue.d.ts +14 -0
- package/dist/src/appointments/index.d.ts +70 -0
- package/dist/src/appointments/server.d.ts +19 -0
- package/dist/src/appointments/tools.d.ts +56 -16
- package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Button.vue.d.ts +3 -1
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/CustomClass.d.ts +14 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/NodeDragPointerEventsFix.d.ts +2 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuClassBuilder.vue.d.ts +19 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuLinkBuilder.vue.d.ts +19 -0
- package/dist/src/googleAnalytics/chat-components/CountryBreakdownCard.vue.d.ts +14 -0
- package/dist/src/googleAnalytics/chat-components/DeviceBreakdownCard.vue.d.ts +14 -0
- package/dist/src/googleAnalytics/chat-components/PeakHoursCard.vue.d.ts +14 -0
- package/dist/src/googleAnalytics/chat-components/RealtimeCard.vue.d.ts +14 -0
- package/dist/src/googleAnalytics/chat-components/SearchTermsCard.vue.d.ts +14 -0
- package/dist/src/googleAnalytics/chat-components/TopPagesCard.vue.d.ts +14 -0
- package/dist/src/googleAnalytics/chat-components/TrafficSourcesCard.vue.d.ts +14 -0
- package/dist/src/googleAnalytics/chat-components/VisitorStatsCard.vue.d.ts +14 -0
- package/dist/src/googleAnalytics/config.d.ts +39 -0
- package/dist/src/googleAnalytics/index.d.ts +116 -0
- package/dist/src/googleAnalytics/metadata.d.ts +2 -0
- package/dist/src/googleAnalytics/pages/Acquisition.vue.d.ts +2 -0
- package/dist/src/googleAnalytics/pages/Audience.vue.d.ts +2 -0
- package/dist/src/googleAnalytics/pages/Content.vue.d.ts +2 -0
- package/dist/src/googleAnalytics/pages/Overview.vue.d.ts +2 -0
- package/dist/src/googleAnalytics/pages/SeoHealth.vue.d.ts +2 -0
- package/dist/src/googleAnalytics/permissions.d.ts +1 -0
- package/dist/src/googleAnalytics/server.d.ts +35 -0
- package/dist/src/googleAnalytics/tools.d.ts +59 -0
- package/dist/src/index.d.ts +6 -5
- package/dist/src/mailTemplates/components/TemplateList.vue.d.ts +2 -0
- package/dist/src/mailTemplates/routes.d.ts +5 -0
- package/dist/src/mailTemplates/tools.d.ts +1 -0
- package/dist/src/productCollections/tools.d.ts +1 -0
- package/dist/src/products/chat-components/ProductDetailsCard.vue.d.ts +14 -0
- package/dist/src/products/index.d.ts +24 -2
- package/dist/src/products/server.d.ts +19 -0
- package/dist/src/products/tools.d.ts +21 -2
- package/dist/src/promoCodes/tools.d.ts +1 -0
- package/dist/src/server-handlers.d.ts +9 -0
- package/dist/src/table/tools.d.ts +1 -25
- package/package.json +23 -21
- package/src/appointments/server.ts +195 -0
- package/src/appointments/tools.ts +61 -21
- package/src/googleAnalytics/server.ts +1188 -0
- package/src/googleAnalytics/tools.ts +158 -0
- package/src/mailTemplates/tools.ts +1 -0
- package/src/productCollections/tools.ts +1 -0
- package/src/products/server.ts +146 -0
- package/src/products/tools.ts +19 -0
- package/src/promoCodes/tools.ts +1 -0
- package/src/table/tools.ts +1 -25
- package/dist/ContentEditor-LOn09n7N.js +0 -307
- package/dist/DateFormatter-Bw-SCfUS.js +0 -1
- package/dist/floating-ui.dom-CBBY0Ism.js +0 -1
- package/dist/floating-ui.dom-xfqXu4GA.mjs +0 -1138
- package/dist/index-Biuv2zTx-DHiVlXFj.js +0 -88
- package/dist/index-HLGxDG-0.mjs +0 -7746
- package/dist/index-n2p9TTRq.js +0 -245
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/DragHandle.d.ts +0 -76
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/NodeDragPointerEventsFix.d.ts +0 -7
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/drag-handle-plugin.d.ts +0 -25
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/drag-handle.d.ts +0 -50
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/cloneElement.d.ts +0 -1
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/dragHandler.d.ts +0 -2
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/findNextElementFromCursor.d.ts +0 -17
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/getComputedStyle.d.ts +0 -1
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/getInnerCoords.d.ts +0 -5
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/getOuterNode.d.ts +0 -3
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/minMax.d.ts +0 -1
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/helpers/removeNode.d.ts +0 -1
- package/dist/src/content-manager/components/content-editor/tiptap-extensions/extension-drag-handle/index.d.ts +0 -4
- package/dist/src/mail-templates/tools.d.ts +0 -25
- package/dist/src/product-collections/tools.d.ts +0 -25
- package/dist/src/promo-codes/tools.d.ts +0 -25
- package/src/mail-templates/tools.ts +0 -25
- package/src/product-collections/tools.ts +0 -25
- package/src/promo-codes/tools.ts +0 -25
- /package/dist/src/{content-manager → contentManager}/components/components/ComponentDialog.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/components/ComponentGridItem.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/ApiDocs.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/ContentLayout.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/ContentSettings.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/ContentStructuredContentSections.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/Header.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/LivePreviewWrapper.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/Locales.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/NewSectionDialog.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/PageSettings.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/SEO.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/SidebarSectionWrapper.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/Status.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/Versions.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/code-examples.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Button.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Card.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Card.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Column.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Column.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/ComponentEditorNode.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Container.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Container.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Divider.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Divider.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/EmptySpace.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/EmptySpace.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Heading.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Heading.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Image.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Image.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/LockBlocks.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Map.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Map.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/OnlyContainerDocument.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Paragraph.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Paragraph.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Row.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Row.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/ScopedSelectAll.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Stack.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Stack.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/TrailingNodeInContainers.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Video.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/Video.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/DetailsNodeView.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/content/details-content.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/content/index.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/details.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/helpers/findClosestVisibleNode.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/helpers/isNodeVisible.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/helpers/setGapCursor.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/index.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/summary/details-summary.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/extension-details/summary/index.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/NodeLabel.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/ResizeHandlers.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/TopMarginDragger.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/useContainerFocus.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-extensions/helpers/useFocus.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/BubbleMenuToggleButton.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/DefaultBubbleMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/ElementEditorMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/EmojiMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/NewNodeView.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/SlashMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/SlashMenuButton.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/ButtonMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/CardMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/ColumnMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/DividerMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/EmptySpaceMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/HeadingMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/ImageMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/MapMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/RowMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/StackMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/TextMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/VideoMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/overview/CollectionDialog.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/overview/CollectionsGridView.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/overview/ContentEntryContextMenu.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/overview/FilterPopover.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/overview/ListView.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/styling/ButtonStyleDialog.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/styling/CardStyleDialog.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/components/styling/SectionStyleDialog.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/config.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/index.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/index.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/metadata.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/pages/Components.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/pages/ContentEditor.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/pages/Entries.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/pages/GlobalStyling.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/pages/Overview.vue.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/permissions.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/routes.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/stores/useTableStore.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/tools.d.ts +0 -0
- /package/dist/src/{content-manager → contentManager}/types.d.ts +0 -0
- /package/dist/src/{mail-templates/components/TemplateList.vue.d.ts → googleAnalytics/index.vue.d.ts} +0 -0
- /package/dist/src/{mail-templates → googleAnalytics}/routes.d.ts +0 -0
- /package/dist/src/{mail-templates → mailTemplates}/config.d.ts +0 -0
- /package/dist/src/{mail-templates → mailTemplates}/index.d.ts +0 -0
- /package/dist/src/{mail-templates → mailTemplates}/index.vue.d.ts +0 -0
- /package/dist/src/{mail-templates → mailTemplates}/metadata.d.ts +0 -0
- /package/dist/src/{mail-templates → mailTemplates}/pages/Detail.vue.d.ts +0 -0
- /package/dist/src/{mail-templates → mailTemplates}/pages/Overview.vue.d.ts +0 -0
- /package/dist/src/{mail-templates → mailTemplates}/permissions.d.ts +0 -0
- /package/dist/src/{mail-templates → mailTemplates}/stores/useTableStore.d.ts +0 -0
- /package/dist/src/{mail-templates → mailTemplates}/types.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/components/detail/Main.vue.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/components/detail/SEO.vue.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/components/detail/Status.vue.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/components/overview/ListView.vue.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/composables/useTable.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/config.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/index.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/index.vue.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/metadata.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/pages/Detail.vue.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/pages/Overview.vue.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/permissions.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/routes.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/stores/useTableStore.d.ts +0 -0
- /package/dist/src/{product-collections → productCollections}/types.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/components/create/DateRange.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/components/create/MultiCodes.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/components/create/Note.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/components/create/SingleCode.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/components/create/TypeAndValue/TypeDetailDialog.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/components/create/TypeAndValue/TypeManageDialog.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/components/create/TypeAndValue/index.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/config.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/index.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/index.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/metadata.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/pages/Create.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/pages/Detail.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/pages/Find.vue.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/permissions.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/routes.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/stores/useTableStore.d.ts +0 -0
- /package/dist/src/{promo-codes → promoCodes}/types.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/components/detail/Condition.vue.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/components/detail/Countries.vue.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/components/detail/Example.vue.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/components/detail/Main.vue.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/components/overview/ListView.vue.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/composables/useTable.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/config.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/index.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/index.vue.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/metadata.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/pages/Detail.vue.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/pages/Overview.vue.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/permissions.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/routes.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/stores/useTableStore.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/tools.d.ts +0 -0
- /package/dist/src/{shipping-options → shippingOptions}/types.d.ts +0 -0
- /package/src/{content-manager → contentManager}/tools.ts +0 -0
- /package/src/{shipping-options → shippingOptions}/tools.ts +0 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { defineComponent as Q, ref as p, computed as U, watch as X, onMounted as Y, resolveComponent as b, openBlock as a, createElementBlock as l, createElementVNode as e, Fragment as g, renderList as v, normalizeClass as L, toDisplayString as o, createVNode as r, withCtx as i, unref as f, createCommentVNode as h, createBlock as E, createTextVNode as z, normalizeStyle as F, resolveDynamicComponent as Z } from "vue";
|
|
2
|
+
import { useModule as ee, useModuleRoute as te, useModuleBreadcrumbs as se } from "@oneclick.dev/cms-kit";
|
|
3
|
+
import "./index-CMk3uhUt.mjs";
|
|
4
|
+
import { RefreshCw as oe, Loader2 as ne, Share2 as ae, ExternalLink as T, Megaphone as V } from "lucide-vue-next";
|
|
5
|
+
import { b as le, E as re } from "./index-DjDCYQ_6.mjs";
|
|
6
|
+
const ie = { class: "w-full max-w-7xl mx-auto py-8 px-4 space-y-6" }, ue = { class: "flex items-center justify-between" }, de = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "flex items-center gap-2"
|
|
9
|
+
}, ce = { class: "flex items-center border rounded-lg overflow-hidden" }, me = ["onClick"], fe = { class: "text-sm text-destructive font-medium" }, xe = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "flex items-center justify-center py-20"
|
|
12
|
+
}, pe = { class: "grid @lg:grid-cols-3 gap-6" }, ge = { class: "relative" }, he = { class: "absolute inset-0 flex items-center justify-center pointer-events-none" }, _e = { class: "text-center" }, ve = { class: "text-2xl font-bold tabular-nums" }, ye = { class: "mt-4 grid grid-cols-2 gap-x-4 gap-y-1.5 w-full" }, be = { class: "text-xs truncate" }, Ce = { class: "text-xs text-muted-foreground ml-auto tabular-nums" }, ke = { class: "overflow-x-auto" }, we = { class: "w-full text-sm" }, De = { class: "divide-y" }, $e = { class: "px-6 py-3" }, Re = { class: "flex items-center gap-2" }, Me = { class: "font-medium" }, Se = { class: "px-4 py-3 text-right tabular-nums" }, Ue = { class: "px-4 py-3 text-right tabular-nums" }, ze = { class: "px-4 py-3 text-right tabular-nums" }, Ne = { class: "px-4 py-3 text-right tabular-nums" }, qe = { class: "px-4 py-3 text-right tabular-nums" }, Ae = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "px-6 py-8 text-center text-muted-foreground text-sm"
|
|
15
|
+
}, Ge = { class: "flex items-center gap-4" }, Be = ["onClick"], Le = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "divide-y"
|
|
18
|
+
}, Ee = { class: "overflow-x-auto" }, je = { class: "w-full text-sm" }, Fe = { class: "divide-y" }, Te = { class: "px-6 py-3 text-muted-foreground" }, Ve = { class: "px-4 py-3 font-mono text-xs" }, Oe = { class: "px-4 py-3 text-right tabular-nums" }, Pe = { class: "px-4 py-3 text-right tabular-nums" }, He = { class: "px-4 py-3 text-right tabular-nums" }, Ie = { class: "px-4 py-3 text-right tabular-nums" }, We = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "px-6 py-8 text-center text-muted-foreground text-sm"
|
|
21
|
+
}, Ke = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "divide-y"
|
|
24
|
+
}, Je = { class: "flex items-center gap-3 min-w-0" }, Qe = { class: "text-muted-foreground w-5 text-right shrink-0" }, Xe = { class: "truncate font-medium" }, Ye = { class: "flex items-center gap-6 shrink-0 tabular-nums text-xs text-muted-foreground" }, Ze = { class: "w-20 text-right" }, et = { class: "w-16 text-right" }, tt = { class: "w-16 text-right" }, st = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "px-6 py-8 text-center text-muted-foreground text-sm"
|
|
27
|
+
}, ot = {
|
|
28
|
+
key: 2,
|
|
29
|
+
class: "divide-y"
|
|
30
|
+
}, nt = { class: "flex items-center gap-3 min-w-0" }, at = { class: "text-muted-foreground w-5 text-right shrink-0" }, lt = { class: "truncate font-medium" }, rt = { class: "flex items-center gap-6 shrink-0 tabular-nums text-xs text-muted-foreground" }, it = { class: "w-20 text-right" }, ut = { class: "w-16 text-right" }, dt = { class: "w-16 text-right" }, ct = {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "px-6 py-8 text-center text-muted-foreground text-sm"
|
|
33
|
+
}, _t = /* @__PURE__ */ Q({
|
|
34
|
+
__name: "Acquisition",
|
|
35
|
+
setup(mt) {
|
|
36
|
+
const { config: j } = ee(), { moduleId: O } = te();
|
|
37
|
+
se(() => [{ label: "Acquisition" }]);
|
|
38
|
+
const y = p(!0), k = p(null), w = p("30"), C = p("sources"), _ = p([]), N = p([]), q = p([]), A = p([]), D = U(() => !!(j.serviceAccount && j.propertyId));
|
|
39
|
+
function $(n) {
|
|
40
|
+
return `/api/v1/modules/${O}${n}`;
|
|
41
|
+
}
|
|
42
|
+
const P = [
|
|
43
|
+
{ label: "7d", value: "7" },
|
|
44
|
+
{ label: "14d", value: "14" },
|
|
45
|
+
{ label: "30d", value: "30" },
|
|
46
|
+
{ label: "90d", value: "90" }
|
|
47
|
+
], x = [
|
|
48
|
+
"#3b82f6",
|
|
49
|
+
"#8b5cf6",
|
|
50
|
+
"#10b981",
|
|
51
|
+
"#f59e0b",
|
|
52
|
+
"#ef4444",
|
|
53
|
+
"#06b6d4",
|
|
54
|
+
"#ec4899",
|
|
55
|
+
"#84cc16",
|
|
56
|
+
"#f97316",
|
|
57
|
+
"#6366f1",
|
|
58
|
+
"#14b8a6",
|
|
59
|
+
"#e11d48",
|
|
60
|
+
"#a855f7",
|
|
61
|
+
"#22c55e",
|
|
62
|
+
"#eab308"
|
|
63
|
+
], H = U(() => {
|
|
64
|
+
const n = {};
|
|
65
|
+
return _.value.forEach((s, c) => {
|
|
66
|
+
const m = (s.sessionDefaultChannelGroup || "other").toLowerCase().replace(/[^a-z0-9]/g, "_");
|
|
67
|
+
n[m] = {
|
|
68
|
+
label: s.sessionDefaultChannelGroup || "Other",
|
|
69
|
+
color: x[c % x.length]
|
|
70
|
+
};
|
|
71
|
+
}), n;
|
|
72
|
+
}), I = U(
|
|
73
|
+
() => _.value.map((n, s) => ({
|
|
74
|
+
key: (n.sessionDefaultChannelGroup || "other").toLowerCase().replace(/[^a-z0-9]/g, "_"),
|
|
75
|
+
label: n.sessionDefaultChannelGroup || "Other",
|
|
76
|
+
sessions: n.sessions || 0,
|
|
77
|
+
fill: x[s % x.length]
|
|
78
|
+
}))
|
|
79
|
+
), W = U(
|
|
80
|
+
() => _.value.reduce((n, s) => n + (s.sessions || 0), 0)
|
|
81
|
+
);
|
|
82
|
+
function u(n) {
|
|
83
|
+
return n >= 1e6 ? `${(n / 1e6).toFixed(1)}M` : n >= 1e3 ? `${(n / 1e3).toFixed(1)}K` : Math.round(n).toString();
|
|
84
|
+
}
|
|
85
|
+
function R(n) {
|
|
86
|
+
return `${(n * 100).toFixed(1)}%`;
|
|
87
|
+
}
|
|
88
|
+
function K(n) {
|
|
89
|
+
const s = Math.floor(n / 60), c = Math.round(n % 60);
|
|
90
|
+
return s > 0 ? `${s}m ${c}s` : `${c}s`;
|
|
91
|
+
}
|
|
92
|
+
async function M() {
|
|
93
|
+
if (!D.value) return;
|
|
94
|
+
y.value = !0, k.value = null;
|
|
95
|
+
const n = `${w.value}daysAgo`;
|
|
96
|
+
try {
|
|
97
|
+
const [s, c, m, S] = await Promise.all([
|
|
98
|
+
$fetch($(`/acquisition/channels?startDate=${n}&endDate=today`)),
|
|
99
|
+
$fetch($(`/acquisition/source-medium?startDate=${n}&endDate=today`)),
|
|
100
|
+
$fetch($(`/acquisition/referrals?startDate=${n}&endDate=today`)).catch(() => ({ rows: [] })),
|
|
101
|
+
$fetch($(`/acquisition/campaigns?startDate=${n}&endDate=today`)).catch(() => ({ rows: [] }))
|
|
102
|
+
]);
|
|
103
|
+
_.value = s.rows || [], N.value = c.rows || [], q.value = m.rows || [], A.value = S.rows || [];
|
|
104
|
+
} catch (s) {
|
|
105
|
+
k.value = s?.data?.statusMessage || s?.message || "Failed to load acquisition data";
|
|
106
|
+
} finally {
|
|
107
|
+
y.value = !1;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return X(w, () => M()), Y(() => {
|
|
111
|
+
D.value ? M() : y.value = !1;
|
|
112
|
+
}), (n, s) => {
|
|
113
|
+
const c = b("Button"), m = b("Card"), S = b("CardTitle"), G = b("CardHeader"), J = b("ChartContainer"), B = b("CardContent");
|
|
114
|
+
return a(), l("div", ie, [
|
|
115
|
+
e("div", ue, [
|
|
116
|
+
s[0] || (s[0] = e("div", null, [
|
|
117
|
+
e("h1", { class: "text-2xl font-semibold" }, "Acquisition"),
|
|
118
|
+
e("p", { class: "text-muted-foreground text-sm mt-1" }, "Where your traffic comes from")
|
|
119
|
+
], -1)),
|
|
120
|
+
D.value ? (a(), l("div", de, [
|
|
121
|
+
e("div", ce, [
|
|
122
|
+
(a(), l(g, null, v(P, (t) => e("button", {
|
|
123
|
+
key: t.value,
|
|
124
|
+
class: L(["px-3 py-1.5 text-xs font-medium transition-colors", w.value === t.value ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground hover:bg-muted"]),
|
|
125
|
+
onClick: (d) => w.value = t.value
|
|
126
|
+
}, o(t.label), 11, me)), 64))
|
|
127
|
+
]),
|
|
128
|
+
r(c, {
|
|
129
|
+
variant: "outline",
|
|
130
|
+
size: "icon",
|
|
131
|
+
onClick: M,
|
|
132
|
+
disabled: y.value
|
|
133
|
+
}, {
|
|
134
|
+
default: i(() => [
|
|
135
|
+
r(f(oe), {
|
|
136
|
+
class: L(["size-4", { "animate-spin": y.value }])
|
|
137
|
+
}, null, 8, ["class"])
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
}, 8, ["disabled"])
|
|
141
|
+
])) : h("", !0)
|
|
142
|
+
]),
|
|
143
|
+
D.value ? k.value ? (a(), E(m, {
|
|
144
|
+
key: 1,
|
|
145
|
+
class: "p-6 border-destructive/50 bg-destructive/5"
|
|
146
|
+
}, {
|
|
147
|
+
default: i(() => [
|
|
148
|
+
e("p", fe, o(k.value), 1),
|
|
149
|
+
r(c, {
|
|
150
|
+
variant: "outline",
|
|
151
|
+
size: "sm",
|
|
152
|
+
class: "mt-3",
|
|
153
|
+
onClick: M
|
|
154
|
+
}, {
|
|
155
|
+
default: i(() => [...s[2] || (s[2] = [
|
|
156
|
+
z("Retry", -1)
|
|
157
|
+
])]),
|
|
158
|
+
_: 1
|
|
159
|
+
})
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
})) : y.value ? (a(), l("div", xe, [
|
|
163
|
+
r(f(ne), { class: "size-8 animate-spin text-muted-foreground" })
|
|
164
|
+
])) : (a(), l(g, { key: 3 }, [
|
|
165
|
+
e("div", pe, [
|
|
166
|
+
r(m, { class: "@lg:col-span-1" }, {
|
|
167
|
+
default: i(() => [
|
|
168
|
+
r(G, { class: "pb-2" }, {
|
|
169
|
+
default: i(() => [
|
|
170
|
+
r(S, { class: "text-base" }, {
|
|
171
|
+
default: i(() => [...s[3] || (s[3] = [
|
|
172
|
+
z("Channel Mix", -1)
|
|
173
|
+
])]),
|
|
174
|
+
_: 1
|
|
175
|
+
})
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
}),
|
|
179
|
+
r(B, { class: "flex flex-col items-center" }, {
|
|
180
|
+
default: i(() => [
|
|
181
|
+
e("div", ge, [
|
|
182
|
+
r(J, {
|
|
183
|
+
config: H.value,
|
|
184
|
+
class: "mx-auto aspect-square max-h-[220px]"
|
|
185
|
+
}, {
|
|
186
|
+
default: i(() => [
|
|
187
|
+
r(f(le), {
|
|
188
|
+
data: I.value,
|
|
189
|
+
margin: { top: 20, bottom: 20, left: 20, right: 20 }
|
|
190
|
+
}, {
|
|
191
|
+
default: i(() => [
|
|
192
|
+
r(f(re), {
|
|
193
|
+
value: (t) => t.sessions,
|
|
194
|
+
color: (t) => t.fill,
|
|
195
|
+
arcWidth: 40,
|
|
196
|
+
padAngle: 0.02,
|
|
197
|
+
cornerRadius: 4
|
|
198
|
+
}, null, 8, ["value", "color"])
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
}, 8, ["data"])
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
}, 8, ["config"]),
|
|
205
|
+
e("div", he, [
|
|
206
|
+
e("div", _e, [
|
|
207
|
+
e("p", ve, o(u(W.value)), 1),
|
|
208
|
+
s[4] || (s[4] = e("p", { class: "text-xs text-muted-foreground" }, "sessions", -1))
|
|
209
|
+
])
|
|
210
|
+
])
|
|
211
|
+
]),
|
|
212
|
+
e("div", ye, [
|
|
213
|
+
(a(!0), l(g, null, v(_.value.slice(0, 8), (t, d) => (a(), l("div", {
|
|
214
|
+
key: t.sessionDefaultChannelGroup,
|
|
215
|
+
class: "flex items-center gap-2"
|
|
216
|
+
}, [
|
|
217
|
+
e("div", {
|
|
218
|
+
class: "size-2.5 rounded-full shrink-0",
|
|
219
|
+
style: F({ backgroundColor: x[d % x.length] })
|
|
220
|
+
}, null, 4),
|
|
221
|
+
e("span", be, o(t.sessionDefaultChannelGroup), 1),
|
|
222
|
+
e("span", Ce, o(u(t.sessions)), 1)
|
|
223
|
+
]))), 128))
|
|
224
|
+
])
|
|
225
|
+
]),
|
|
226
|
+
_: 1
|
|
227
|
+
})
|
|
228
|
+
]),
|
|
229
|
+
_: 1
|
|
230
|
+
}),
|
|
231
|
+
r(m, { class: "@lg:col-span-2" }, {
|
|
232
|
+
default: i(() => [
|
|
233
|
+
r(G, { class: "pb-2" }, {
|
|
234
|
+
default: i(() => [
|
|
235
|
+
r(S, { class: "text-base" }, {
|
|
236
|
+
default: i(() => [...s[5] || (s[5] = [
|
|
237
|
+
z("Channels Performance", -1)
|
|
238
|
+
])]),
|
|
239
|
+
_: 1
|
|
240
|
+
})
|
|
241
|
+
]),
|
|
242
|
+
_: 1
|
|
243
|
+
}),
|
|
244
|
+
r(B, { class: "p-0" }, {
|
|
245
|
+
default: i(() => [
|
|
246
|
+
e("div", ke, [
|
|
247
|
+
e("table", we, [
|
|
248
|
+
s[6] || (s[6] = e("thead", null, [
|
|
249
|
+
e("tr", { class: "border-b text-left" }, [
|
|
250
|
+
e("th", { class: "px-6 py-3 font-medium text-muted-foreground" }, "Channel"),
|
|
251
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground text-right" }, "Sessions"),
|
|
252
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground text-right" }, "Users"),
|
|
253
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground text-right" }, "New Users"),
|
|
254
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground text-right" }, "Engage Rate"),
|
|
255
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground text-right" }, "Avg Duration")
|
|
256
|
+
])
|
|
257
|
+
], -1)),
|
|
258
|
+
e("tbody", De, [
|
|
259
|
+
(a(!0), l(g, null, v(_.value, (t, d) => (a(), l("tr", {
|
|
260
|
+
key: t.sessionDefaultChannelGroup,
|
|
261
|
+
class: "hover:bg-muted/50"
|
|
262
|
+
}, [
|
|
263
|
+
e("td", $e, [
|
|
264
|
+
e("div", Re, [
|
|
265
|
+
e("div", {
|
|
266
|
+
class: "size-2.5 rounded-full shrink-0",
|
|
267
|
+
style: F({ backgroundColor: x[d % x.length] })
|
|
268
|
+
}, null, 4),
|
|
269
|
+
e("span", Me, o(t.sessionDefaultChannelGroup), 1)
|
|
270
|
+
])
|
|
271
|
+
]),
|
|
272
|
+
e("td", Se, o(u(t.sessions)), 1),
|
|
273
|
+
e("td", Ue, o(u(t.totalUsers)), 1),
|
|
274
|
+
e("td", ze, o(u(t.newUsers)), 1),
|
|
275
|
+
e("td", Ne, o(R(t.engagementRate || 0)), 1),
|
|
276
|
+
e("td", qe, o(K(t.averageSessionDuration || 0)), 1)
|
|
277
|
+
]))), 128))
|
|
278
|
+
])
|
|
279
|
+
])
|
|
280
|
+
]),
|
|
281
|
+
_.value.length ? h("", !0) : (a(), l("div", Ae, "No channel data available"))
|
|
282
|
+
]),
|
|
283
|
+
_: 1
|
|
284
|
+
})
|
|
285
|
+
]),
|
|
286
|
+
_: 1
|
|
287
|
+
})
|
|
288
|
+
]),
|
|
289
|
+
r(m, null, {
|
|
290
|
+
default: i(() => [
|
|
291
|
+
r(G, { class: "pb-0" }, {
|
|
292
|
+
default: i(() => [
|
|
293
|
+
e("div", Ge, [
|
|
294
|
+
(a(!0), l(g, null, v([
|
|
295
|
+
{ key: "sources", label: "Source / Medium", icon: f(ae) },
|
|
296
|
+
{ key: "referrals", label: "Referrals", icon: f(T) },
|
|
297
|
+
{ key: "campaigns", label: "Campaigns", icon: f(V) }
|
|
298
|
+
], (t) => (a(), l("button", {
|
|
299
|
+
key: t.key,
|
|
300
|
+
class: L(["flex items-center gap-1.5 px-3 py-2 text-sm font-medium rounded-md transition-colors", C.value === t.key ? "bg-muted text-foreground" : "text-muted-foreground hover:text-foreground"]),
|
|
301
|
+
onClick: (d) => C.value = t.key
|
|
302
|
+
}, [
|
|
303
|
+
(a(), E(Z(t.icon), { class: "size-3.5" })),
|
|
304
|
+
z(" " + o(t.label), 1)
|
|
305
|
+
], 10, Be))), 128))
|
|
306
|
+
])
|
|
307
|
+
]),
|
|
308
|
+
_: 1
|
|
309
|
+
}),
|
|
310
|
+
r(B, { class: "p-0 mt-4" }, {
|
|
311
|
+
default: i(() => [
|
|
312
|
+
C.value === "sources" ? (a(), l("div", Le, [
|
|
313
|
+
e("div", Ee, [
|
|
314
|
+
e("table", je, [
|
|
315
|
+
s[7] || (s[7] = e("thead", null, [
|
|
316
|
+
e("tr", { class: "border-b text-left" }, [
|
|
317
|
+
e("th", { class: "px-6 py-3 font-medium text-muted-foreground" }, "#"),
|
|
318
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground" }, "Source / Medium"),
|
|
319
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground text-right" }, "Sessions"),
|
|
320
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground text-right" }, "Users"),
|
|
321
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground text-right" }, "New Users"),
|
|
322
|
+
e("th", { class: "px-4 py-3 font-medium text-muted-foreground text-right" }, "Bounce Rate")
|
|
323
|
+
])
|
|
324
|
+
], -1)),
|
|
325
|
+
e("tbody", Fe, [
|
|
326
|
+
(a(!0), l(g, null, v(N.value, (t, d) => (a(), l("tr", {
|
|
327
|
+
key: t.sessionSourceMedium,
|
|
328
|
+
class: "hover:bg-muted/50"
|
|
329
|
+
}, [
|
|
330
|
+
e("td", Te, o(d + 1), 1),
|
|
331
|
+
e("td", Ve, o(t.sessionSourceMedium), 1),
|
|
332
|
+
e("td", Oe, o(u(t.sessions)), 1),
|
|
333
|
+
e("td", Pe, o(u(t.totalUsers)), 1),
|
|
334
|
+
e("td", He, o(u(t.newUsers)), 1),
|
|
335
|
+
e("td", Ie, o(R(t.bounceRate || 0)), 1)
|
|
336
|
+
]))), 128))
|
|
337
|
+
])
|
|
338
|
+
])
|
|
339
|
+
]),
|
|
340
|
+
N.value.length ? h("", !0) : (a(), l("div", We, "No data available"))
|
|
341
|
+
])) : h("", !0),
|
|
342
|
+
C.value === "referrals" ? (a(), l("div", Ke, [
|
|
343
|
+
(a(!0), l(g, null, v(q.value, (t, d) => (a(), l("div", {
|
|
344
|
+
key: t.sessionSource,
|
|
345
|
+
class: "flex items-center justify-between px-6 py-3 text-sm hover:bg-muted/50"
|
|
346
|
+
}, [
|
|
347
|
+
e("div", Je, [
|
|
348
|
+
e("span", Qe, o(d + 1), 1),
|
|
349
|
+
r(f(T), { class: "size-3.5 text-muted-foreground shrink-0" }),
|
|
350
|
+
e("span", Xe, o(t.sessionSource), 1)
|
|
351
|
+
]),
|
|
352
|
+
e("div", Ye, [
|
|
353
|
+
e("span", Ze, o(u(t.sessions)) + " sessions", 1),
|
|
354
|
+
e("span", et, o(u(t.totalUsers)) + " users", 1),
|
|
355
|
+
e("span", tt, o(R(t.engagementRate || 0)) + " eng.", 1)
|
|
356
|
+
])
|
|
357
|
+
]))), 128)),
|
|
358
|
+
q.value.length ? h("", !0) : (a(), l("div", st, "No referral data available"))
|
|
359
|
+
])) : h("", !0),
|
|
360
|
+
C.value === "campaigns" ? (a(), l("div", ot, [
|
|
361
|
+
(a(!0), l(g, null, v(A.value, (t, d) => (a(), l("div", {
|
|
362
|
+
key: t.sessionCampaignName,
|
|
363
|
+
class: "flex items-center justify-between px-6 py-3 text-sm hover:bg-muted/50"
|
|
364
|
+
}, [
|
|
365
|
+
e("div", nt, [
|
|
366
|
+
e("span", at, o(d + 1), 1),
|
|
367
|
+
r(f(V), { class: "size-3.5 text-muted-foreground shrink-0" }),
|
|
368
|
+
e("span", lt, o(t.sessionCampaignName), 1)
|
|
369
|
+
]),
|
|
370
|
+
e("div", rt, [
|
|
371
|
+
e("span", it, o(u(t.sessions)) + " sessions", 1),
|
|
372
|
+
e("span", ut, o(u(t.totalUsers)) + " users", 1),
|
|
373
|
+
e("span", dt, o(R(t.engagementRate || 0)) + " eng.", 1)
|
|
374
|
+
])
|
|
375
|
+
]))), 128)),
|
|
376
|
+
A.value.length ? h("", !0) : (a(), l("div", ct, "No campaign data. Use UTM parameters in your URLs to track campaigns."))
|
|
377
|
+
])) : h("", !0)
|
|
378
|
+
]),
|
|
379
|
+
_: 1
|
|
380
|
+
})
|
|
381
|
+
]),
|
|
382
|
+
_: 1
|
|
383
|
+
})
|
|
384
|
+
], 64)) : (a(), E(m, {
|
|
385
|
+
key: 0,
|
|
386
|
+
class: "p-8 text-center"
|
|
387
|
+
}, {
|
|
388
|
+
default: i(() => [...s[1] || (s[1] = [
|
|
389
|
+
e("p", { class: "text-lg font-medium" }, "Setup required", -1),
|
|
390
|
+
e("p", { class: "text-sm text-muted-foreground mt-2" }, "Configure your GA4 property in module settings.", -1)
|
|
391
|
+
])]),
|
|
392
|
+
_: 1
|
|
393
|
+
}))
|
|
394
|
+
]);
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
});
|
|
398
|
+
export {
|
|
399
|
+
_t as default
|
|
400
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("@oneclick.dev/cms-kit");require("./index-BuzLn4Km.js");const d=require("lucide-vue-next"),B=require("./index-D3L8WAJI.js"),q={class:"w-full max-w-7xl mx-auto py-8 px-4 space-y-6"},L={class:"flex items-center justify-between"},U={key:0,class:"flex items-center gap-2"},F={class:"flex items-center border rounded-lg overflow-hidden"},A=["onClick"],G={class:"text-sm text-destructive font-medium"},T={key:2,class:"flex items-center justify-center py-20"},j={class:"grid @lg:grid-cols-3 gap-6"},O={class:"relative"},P={class:"absolute inset-0 flex items-center justify-center pointer-events-none"},H={class:"text-center"},I={class:"text-2xl font-bold tabular-nums"},K={class:"mt-4 grid grid-cols-2 gap-x-4 gap-y-1.5 w-full"},W={class:"text-xs truncate"},J={class:"text-xs text-muted-foreground ml-auto tabular-nums"},Q={class:"overflow-x-auto"},X={class:"w-full text-sm"},Y={class:"divide-y"},Z={class:"px-6 py-3"},ee={class:"flex items-center gap-2"},te={class:"font-medium"},oe={class:"px-4 py-3 text-right tabular-nums"},se={class:"px-4 py-3 text-right tabular-nums"},ne={class:"px-4 py-3 text-right tabular-nums"},ae={class:"px-4 py-3 text-right tabular-nums"},re={class:"px-4 py-3 text-right tabular-nums"},le={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},ce={class:"flex items-center gap-4"},ie=["onClick"],de={key:0,class:"divide-y"},ue={class:"overflow-x-auto"},me={class:"w-full text-sm"},pe={class:"divide-y"},xe={class:"px-6 py-3 text-muted-foreground"},fe={class:"px-4 py-3 font-mono text-xs"},ge={class:"px-4 py-3 text-right tabular-nums"},he={class:"px-4 py-3 text-right tabular-nums"},_e={class:"px-4 py-3 text-right tabular-nums"},ye={class:"px-4 py-3 text-right tabular-nums"},ve={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},Ne={key:1,class:"divide-y"},Ve={class:"flex items-center gap-3 min-w-0"},ke={class:"text-muted-foreground w-5 text-right shrink-0"},Ee={class:"truncate font-medium"},Ce={class:"flex items-center gap-6 shrink-0 tabular-nums text-xs text-muted-foreground"},be={class:"w-20 text-right"},Be={class:"w-16 text-right"},we={class:"w-16 text-right"},De={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},Se={key:2,class:"divide-y"},Me={class:"flex items-center gap-3 min-w-0"},$e={class:"text-muted-foreground w-5 text-right shrink-0"},Re={class:"truncate font-medium"},ze={class:"flex items-center gap-6 shrink-0 tabular-nums text-xs text-muted-foreground"},qe={class:"w-20 text-right"},Le={class:"w-16 text-right"},Ue={class:"w-16 text-right"},Fe={key:0,class:"px-6 py-8 text-center text-muted-foreground text-sm"},Ae=e.defineComponent({__name:"Acquisition",setup(Ge){const{config:b}=C.useModule(),{moduleId:w}=C.useModuleRoute();C.useModuleBreadcrumbs(()=>[{label:"Acquisition"}]);const u=e.ref(!0),p=e.ref(null),x=e.ref("30"),m=e.ref("sources"),i=e.ref([]),v=e.ref([]),N=e.ref([]),V=e.ref([]),f=e.computed(()=>!!(b.serviceAccount&&b.propertyId));function g(s){return`/api/v1/modules/${w}${s}`}const D=[{label:"7d",value:"7"},{label:"14d",value:"14"},{label:"30d",value:"30"},{label:"90d",value:"90"}],c=["#3b82f6","#8b5cf6","#10b981","#f59e0b","#ef4444","#06b6d4","#ec4899","#84cc16","#f97316","#6366f1","#14b8a6","#e11d48","#a855f7","#22c55e","#eab308"],S=e.computed(()=>{const s={};return i.value.forEach((o,r)=>{const l=(o.sessionDefaultChannelGroup||"other").toLowerCase().replace(/[^a-z0-9]/g,"_");s[l]={label:o.sessionDefaultChannelGroup||"Other",color:c[r%c.length]}}),s}),M=e.computed(()=>i.value.map((s,o)=>({key:(s.sessionDefaultChannelGroup||"other").toLowerCase().replace(/[^a-z0-9]/g,"_"),label:s.sessionDefaultChannelGroup||"Other",sessions:s.sessions||0,fill:c[o%c.length]}))),$=e.computed(()=>i.value.reduce((s,o)=>s+(o.sessions||0),0));function n(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:Math.round(s).toString()}function h(s){return`${(s*100).toFixed(1)}%`}function R(s){const o=Math.floor(s/60),r=Math.round(s%60);return o>0?`${o}m ${r}s`:`${r}s`}async function _(){if(!f.value)return;u.value=!0,p.value=null;const s=`${x.value}daysAgo`;try{const[o,r,l,y]=await Promise.all([$fetch(g(`/acquisition/channels?startDate=${s}&endDate=today`)),$fetch(g(`/acquisition/source-medium?startDate=${s}&endDate=today`)),$fetch(g(`/acquisition/referrals?startDate=${s}&endDate=today`)).catch(()=>({rows:[]})),$fetch(g(`/acquisition/campaigns?startDate=${s}&endDate=today`)).catch(()=>({rows:[]}))]);i.value=o.rows||[],v.value=r.rows||[],N.value=l.rows||[],V.value=y.rows||[]}catch(o){p.value=o?.data?.statusMessage||o?.message||"Failed to load acquisition data"}finally{u.value=!1}}return e.watch(x,()=>_()),e.onMounted(()=>{f.value?_():u.value=!1}),(s,o)=>{const r=e.resolveComponent("Button"),l=e.resolveComponent("Card"),y=e.resolveComponent("CardTitle"),k=e.resolveComponent("CardHeader"),z=e.resolveComponent("ChartContainer"),E=e.resolveComponent("CardContent");return e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",L,[o[0]||(o[0]=e.createElementVNode("div",null,[e.createElementVNode("h1",{class:"text-2xl font-semibold"},"Acquisition"),e.createElementVNode("p",{class:"text-muted-foreground text-sm mt-1"},"Where your traffic comes from")],-1)),f.value?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("div",F,[(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",x.value===t.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"]),onClick:a=>x.value=t.value},e.toDisplayString(t.label),11,A)),64))]),e.createVNode(r,{variant:"outline",size:"icon",onClick:_,disabled:u.value},{default:e.withCtx(()=>[e.createVNode(e.unref(d.RefreshCw),{class:e.normalizeClass(["size-4",{"animate-spin":u.value}])},null,8,["class"])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0)]),f.value?p.value?(e.openBlock(),e.createBlock(l,{key:1,class:"p-6 border-destructive/50 bg-destructive/5"},{default:e.withCtx(()=>[e.createElementVNode("p",G,e.toDisplayString(p.value),1),e.createVNode(r,{variant:"outline",size:"sm",class:"mt-3",onClick:_},{default:e.withCtx(()=>[...o[2]||(o[2]=[e.createTextVNode("Retry",-1)])]),_:1})]),_:1})):u.value?(e.openBlock(),e.createElementBlock("div",T,[e.createVNode(e.unref(d.Loader2),{class:"size-8 animate-spin text-muted-foreground"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createElementVNode("div",j,[e.createVNode(l,{class:"@lg:col-span-1"},{default:e.withCtx(()=>[e.createVNode(k,{class:"pb-2"},{default:e.withCtx(()=>[e.createVNode(y,{class:"text-base"},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode("Channel Mix",-1)])]),_:1})]),_:1}),e.createVNode(E,{class:"flex flex-col items-center"},{default:e.withCtx(()=>[e.createElementVNode("div",O,[e.createVNode(z,{config:S.value,class:"mx-auto aspect-square max-h-[220px]"},{default:e.withCtx(()=>[e.createVNode(e.unref(B.b),{data:M.value,margin:{top:20,bottom:20,left:20,right:20}},{default:e.withCtx(()=>[e.createVNode(e.unref(B.E),{value:t=>t.sessions,color:t=>t.fill,arcWidth:40,padAngle:.02,cornerRadius:4},null,8,["value","color"])]),_:1},8,["data"])]),_:1},8,["config"]),e.createElementVNode("div",P,[e.createElementVNode("div",H,[e.createElementVNode("p",I,e.toDisplayString(n($.value)),1),o[4]||(o[4]=e.createElementVNode("p",{class:"text-xs text-muted-foreground"},"sessions",-1))])])]),e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.slice(0,8),(t,a)=>(e.openBlock(),e.createElementBlock("div",{key:t.sessionDefaultChannelGroup,class:"flex items-center gap-2"},[e.createElementVNode("div",{class:"size-2.5 rounded-full shrink-0",style:e.normalizeStyle({backgroundColor:c[a%c.length]})},null,4),e.createElementVNode("span",W,e.toDisplayString(t.sessionDefaultChannelGroup),1),e.createElementVNode("span",J,e.toDisplayString(n(t.sessions)),1)]))),128))])]),_:1})]),_:1}),e.createVNode(l,{class:"@lg:col-span-2"},{default:e.withCtx(()=>[e.createVNode(k,{class:"pb-2"},{default:e.withCtx(()=>[e.createVNode(y,{class:"text-base"},{default:e.withCtx(()=>[...o[5]||(o[5]=[e.createTextVNode("Channels Performance",-1)])]),_:1})]),_:1}),e.createVNode(E,{class:"p-0"},{default:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createElementVNode("table",X,[o[6]||(o[6]=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"},"Channel"),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"},"New Users"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Engage Rate"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Avg Duration")])],-1)),e.createElementVNode("tbody",Y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(t,a)=>(e.openBlock(),e.createElementBlock("tr",{key:t.sessionDefaultChannelGroup,class:"hover:bg-muted/50"},[e.createElementVNode("td",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",{class:"size-2.5 rounded-full shrink-0",style:e.normalizeStyle({backgroundColor:c[a%c.length]})},null,4),e.createElementVNode("span",te,e.toDisplayString(t.sessionDefaultChannelGroup),1)])]),e.createElementVNode("td",oe,e.toDisplayString(n(t.sessions)),1),e.createElementVNode("td",se,e.toDisplayString(n(t.totalUsers)),1),e.createElementVNode("td",ne,e.toDisplayString(n(t.newUsers)),1),e.createElementVNode("td",ae,e.toDisplayString(h(t.engagementRate||0)),1),e.createElementVNode("td",re,e.toDisplayString(R(t.averageSessionDuration||0)),1)]))),128))])])]),i.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",le,"No channel data available"))]),_:1})]),_:1})]),e.createVNode(l,null,{default:e.withCtx(()=>[e.createVNode(k,{class:"pb-0"},{default:e.withCtx(()=>[e.createElementVNode("div",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList([{key:"sources",label:"Source / Medium",icon:e.unref(d.Share2)},{key:"referrals",label:"Referrals",icon:e.unref(d.ExternalLink)},{key:"campaigns",label:"Campaigns",icon:e.unref(d.Megaphone)}],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",m.value===t.key?"bg-muted text-foreground":"text-muted-foreground hover:text-foreground"]),onClick:a=>m.value=t.key},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{class:"size-3.5"})),e.createTextVNode(" "+e.toDisplayString(t.label),1)],10,ie))),128))])]),_:1}),e.createVNode(E,{class:"p-0 mt-4"},{default:e.withCtx(()=>[m.value==="sources"?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("div",ue,[e.createElementVNode("table",me,[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"},"#"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground"},"Source / Medium"),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"},"New Users"),e.createElementVNode("th",{class:"px-4 py-3 font-medium text-muted-foreground text-right"},"Bounce Rate")])],-1)),e.createElementVNode("tbody",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(t,a)=>(e.openBlock(),e.createElementBlock("tr",{key:t.sessionSourceMedium,class:"hover:bg-muted/50"},[e.createElementVNode("td",xe,e.toDisplayString(a+1),1),e.createElementVNode("td",fe,e.toDisplayString(t.sessionSourceMedium),1),e.createElementVNode("td",ge,e.toDisplayString(n(t.sessions)),1),e.createElementVNode("td",he,e.toDisplayString(n(t.totalUsers)),1),e.createElementVNode("td",_e,e.toDisplayString(n(t.newUsers)),1),e.createElementVNode("td",ye,e.toDisplayString(h(t.bounceRate||0)),1)]))),128))])])]),v.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ve,"No data available"))])):e.createCommentVNode("",!0),m.value==="referrals"?(e.openBlock(),e.createElementBlock("div",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{key:t.sessionSource,class:"flex items-center justify-between px-6 py-3 text-sm hover:bg-muted/50"},[e.createElementVNode("div",Ve,[e.createElementVNode("span",ke,e.toDisplayString(a+1),1),e.createVNode(e.unref(d.ExternalLink),{class:"size-3.5 text-muted-foreground shrink-0"}),e.createElementVNode("span",Ee,e.toDisplayString(t.sessionSource),1)]),e.createElementVNode("div",Ce,[e.createElementVNode("span",be,e.toDisplayString(n(t.sessions))+" sessions",1),e.createElementVNode("span",Be,e.toDisplayString(n(t.totalUsers))+" users",1),e.createElementVNode("span",we,e.toDisplayString(h(t.engagementRate||0))+" eng.",1)])]))),128)),N.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",De,"No referral data available"))])):e.createCommentVNode("",!0),m.value==="campaigns"?(e.openBlock(),e.createElementBlock("div",Se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{key:t.sessionCampaignName,class:"flex items-center justify-between px-6 py-3 text-sm hover:bg-muted/50"},[e.createElementVNode("div",Me,[e.createElementVNode("span",$e,e.toDisplayString(a+1),1),e.createVNode(e.unref(d.Megaphone),{class:"size-3.5 text-muted-foreground shrink-0"}),e.createElementVNode("span",Re,e.toDisplayString(t.sessionCampaignName),1)]),e.createElementVNode("div",ze,[e.createElementVNode("span",qe,e.toDisplayString(n(t.sessions))+" sessions",1),e.createElementVNode("span",Le,e.toDisplayString(n(t.totalUsers))+" users",1),e.createElementVNode("span",Ue,e.toDisplayString(h(t.engagementRate||0))+" eng.",1)])]))),128)),V.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Fe,"No campaign data. Use UTM parameters in your URLs to track campaigns."))])):e.createCommentVNode("",!0)]),_:1})]),_:1})],64)):(e.openBlock(),e.createBlock(l,{key:0,class:"p-8 text-center"},{default:e.withCtx(()=>[...o[1]||(o[1]=[e.createElementVNode("p",{class:"text-lg font-medium"},"Setup required",-1),e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-2"},"Configure your GA4 property in module settings.",-1)])]),_:1}))])}}});exports.default=Ae;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("lucide-vue-next"),V={class:"w-full"},E={key:0,class:"flex items-center gap-2 py-3"},h={key:1,class:"text-xs text-destructive py-2"},S={key:2,class:"rounded-xl border bg-background p-4 text-center"},B={key:3,class:"space-y-3"},D={class:"flex items-start gap-3"},I={class:"shrink-0 size-10 rounded-lg bg-primary/10 flex items-center justify-center"},C={class:"flex-1 min-w-0"},z={class:"text-sm font-semibold truncate"},T={class:"flex items-center gap-2 mt-1 flex-wrap"},w={key:0,class:"text-xs font-medium"},j={class:"grid grid-cols-2 gap-2 text-xs text-muted-foreground"},A={class:"flex items-center gap-1.5"},L={class:"truncate"},P={class:"flex items-center gap-1.5"},$={class:"flex items-center gap-1.5"},M={class:"flex items-center gap-1.5"},F=e.defineComponent({__name:"AppointmentDetailsCard",props:{toolName:{},instanceId:{},instanceName:{},moduleType:{},resolvedArgs:{},status:{}},emits:["submit"],setup(u,{emit:p}){const d=u,f=p,g=useRoute(),x=e.computed(()=>g.params.slug),v=useModuleApi(d.instanceId),c=e.ref(!0),a=e.ref(null),l=e.ref([]);async function N(){const{name:s,email:n,date:i}=d.resolvedArgs||{};if(!i){a.value="No date provided",c.value=!1;return}c.value=!0,a.value=null;try{const t=new URLSearchParams;s&&t.set("name",s),n&&t.set("email",n),i&&t.set("date",i);const b=await v.get(`/appointments/find?${t.toString()}`);l.value=b.appointments||[],m({count:l.value.length,appointments:l.value.map(r=>({orderId:r.orderId,reservationId:r.reservationId,customerName:`${r.customerInfo?.firstName||""} ${r.customerInfo?.lastName||""}`.trim(),email:r.customerInfo?.email,date:r.date,startTime:r.startTime,endTime:r.endTime,spots:r.spots,status:r.reservationStatus||r.status,price:r.reservationPrice}))})}catch(t){a.value=t?.data?.statusMessage||t?.message||"Failed to find appointment",m(`Error finding appointment: ${a.value}`)}finally{c.value=!1}}e.onMounted(()=>{N()});function m(s){d.status!=="completed"&&f("submit",s)}const k=s=>{switch(s){case"approved":return"text-emerald-600 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-900/20";case"needs_approval":return"text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20";case"rejected":case"cancelled":return"text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20";default:return"text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20"}},_=s=>{switch(s){case"approved":return"Approved";case"needs_approval":return"Needs Approval";case"rejected":return"Rejected";case"cancelled":return"Cancelled";case"confirmed":return"Confirmed";default:return s||"Pending"}},y=s=>s==null?"":`€${s.toFixed(2)}`;return(s,n)=>{const i=e.resolveComponent("NuxtLink");return e.openBlock(),e.createElementBlock("div",V,[e.unref(c)?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(e.unref(o.Loader2),{class:"size-4 animate-spin text-muted-foreground"}),n[0]||(n[0]=e.createElementVNode("span",{class:"text-xs text-muted-foreground"},"Searching appointments…",-1))])):e.unref(a)?(e.openBlock(),e.createElementBlock("div",h,e.toDisplayString(e.unref(a)),1)):e.unref(l).length===0?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(e.unref(o.CalendarDays),{class:"size-8 text-muted-foreground mx-auto mb-2"}),n[1]||(n[1]=e.createElementVNode("p",{class:"text-sm text-muted-foreground"},"No appointments found for the given criteria.",-1))])):(e.openBlock(),e.createElementBlock("div",B,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),t=>(e.openBlock(),e.createElementBlock("div",{key:t.reservationId||t.orderId,class:"rounded-xl border bg-background p-3 space-y-3"},[e.createElementVNode("div",D,[e.createElementVNode("div",I,[e.createVNode(e.unref(o.CalendarDays),{class:"size-5 text-primary"})]),e.createElementVNode("div",C,[e.createElementVNode("p",z,e.toDisplayString(t.customerInfo?.firstName)+" "+e.toDisplayString(t.customerInfo?.lastName),1),e.createElementVNode("div",T,[e.createElementVNode("span",{class:e.normalizeClass(["text-[10px] font-medium px-1.5 py-0.5 rounded-full uppercase",k(t.reservationStatus||t.status)])},e.toDisplayString(_(t.reservationStatus||t.status)),3),t.reservationPrice!=null?(e.openBlock(),e.createElementBlock("span",w,e.toDisplayString(y(t.reservationPrice)),1)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",j,[e.createElementVNode("div",A,[e.createVNode(e.unref(o.Mail),{class:"size-3"}),e.createElementVNode("span",L,e.toDisplayString(t.customerInfo?.email||"—"),1)]),e.createElementVNode("div",P,[e.createVNode(e.unref(o.CalendarDays),{class:"size-3"}),e.createElementVNode("span",null,e.toDisplayString(t.date),1)]),e.createElementVNode("div",$,[e.createVNode(e.unref(o.Clock),{class:"size-3"}),e.createElementVNode("span",null,e.toDisplayString(t.startTime)+" – "+e.toDisplayString(t.endTime),1)]),e.createElementVNode("div",M,[e.createVNode(e.unref(o.Users),{class:"size-3"}),e.createElementVNode("span",null,e.toDisplayString(t.spots||1)+" "+e.toDisplayString((t.spots||1)===1?"spot":"spots"),1)])]),e.createVNode(i,{to:`/projects/${e.unref(x)}/modules/${u.instanceId}`,class:"inline-flex items-center gap-1.5 text-xs text-primary hover:underline"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ExternalLink),{class:"size-3"}),n[2]||(n[2]=e.createTextVNode(" Open in agenda ",-1))]),_:1},8,["to"])]))),128))]))])}}});exports.default=F;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { defineComponent as T, computed as A, ref as x, onMounted as L, resolveComponent as $, openBlock as d, createElementBlock as l, unref as r, createVNode as i, createElementVNode as t, toDisplayString as a, Fragment as j, renderList as P, normalizeClass as E, createCommentVNode as M, withCtx as V, createTextVNode as D } from "vue";
|
|
2
|
+
import { Loader2 as F, CalendarDays as g, Mail as R, Clock as B, Users as U, ExternalLink as O } from "lucide-vue-next";
|
|
3
|
+
const q = { class: "w-full" }, G = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "flex items-center gap-2 py-3"
|
|
6
|
+
}, H = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "text-xs text-destructive py-2"
|
|
9
|
+
}, J = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "rounded-xl border bg-background p-4 text-center"
|
|
12
|
+
}, K = {
|
|
13
|
+
key: 3,
|
|
14
|
+
class: "space-y-3"
|
|
15
|
+
}, Q = { class: "flex items-start gap-3" }, W = { class: "shrink-0 size-10 rounded-lg bg-primary/10 flex items-center justify-center" }, X = { class: "flex-1 min-w-0" }, Y = { class: "text-sm font-semibold truncate" }, Z = { class: "flex items-center gap-2 mt-1 flex-wrap" }, ee = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "text-xs font-medium"
|
|
18
|
+
}, te = { class: "grid grid-cols-2 gap-2 text-xs text-muted-foreground" }, se = { class: "flex items-center gap-1.5" }, re = { class: "truncate" }, ne = { class: "flex items-center gap-1.5" }, ae = { class: "flex items-center gap-1.5" }, oe = { class: "flex items-center gap-1.5" }, le = /* @__PURE__ */ T({
|
|
19
|
+
__name: "AppointmentDetailsCard",
|
|
20
|
+
props: {
|
|
21
|
+
toolName: {},
|
|
22
|
+
instanceId: {},
|
|
23
|
+
instanceName: {},
|
|
24
|
+
moduleType: {},
|
|
25
|
+
resolvedArgs: {},
|
|
26
|
+
status: {}
|
|
27
|
+
},
|
|
28
|
+
emits: ["submit"],
|
|
29
|
+
setup(v, { emit: b }) {
|
|
30
|
+
const f = v, h = b, k = useRoute(), y = A(() => k.params.slug), N = useModuleApi(f.instanceId), p = x(!0), c = x(null), u = x([]);
|
|
31
|
+
async function I() {
|
|
32
|
+
const { name: s, email: o, date: m } = f.resolvedArgs || {};
|
|
33
|
+
if (!m) {
|
|
34
|
+
c.value = "No date provided", p.value = !1;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
p.value = !0, c.value = null;
|
|
38
|
+
try {
|
|
39
|
+
const e = new URLSearchParams();
|
|
40
|
+
s && e.set("name", s), o && e.set("email", o), m && e.set("date", m);
|
|
41
|
+
const w = await N.get(`/appointments/find?${e.toString()}`);
|
|
42
|
+
u.value = w.appointments || [], _({
|
|
43
|
+
count: u.value.length,
|
|
44
|
+
appointments: u.value.map((n) => ({
|
|
45
|
+
orderId: n.orderId,
|
|
46
|
+
reservationId: n.reservationId,
|
|
47
|
+
customerName: `${n.customerInfo?.firstName || ""} ${n.customerInfo?.lastName || ""}`.trim(),
|
|
48
|
+
email: n.customerInfo?.email,
|
|
49
|
+
date: n.date,
|
|
50
|
+
startTime: n.startTime,
|
|
51
|
+
endTime: n.endTime,
|
|
52
|
+
spots: n.spots,
|
|
53
|
+
status: n.reservationStatus || n.status,
|
|
54
|
+
price: n.reservationPrice
|
|
55
|
+
}))
|
|
56
|
+
});
|
|
57
|
+
} catch (e) {
|
|
58
|
+
c.value = e?.data?.statusMessage || e?.message || "Failed to find appointment", _(`Error finding appointment: ${c.value}`);
|
|
59
|
+
} finally {
|
|
60
|
+
p.value = !1;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
L(() => {
|
|
64
|
+
I();
|
|
65
|
+
});
|
|
66
|
+
function _(s) {
|
|
67
|
+
f.status !== "completed" && h("submit", s);
|
|
68
|
+
}
|
|
69
|
+
const C = (s) => {
|
|
70
|
+
switch (s) {
|
|
71
|
+
case "approved":
|
|
72
|
+
return "text-emerald-600 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-900/20";
|
|
73
|
+
case "needs_approval":
|
|
74
|
+
return "text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20";
|
|
75
|
+
case "rejected":
|
|
76
|
+
case "cancelled":
|
|
77
|
+
return "text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20";
|
|
78
|
+
default:
|
|
79
|
+
return "text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20";
|
|
80
|
+
}
|
|
81
|
+
}, z = (s) => {
|
|
82
|
+
switch (s) {
|
|
83
|
+
case "approved":
|
|
84
|
+
return "Approved";
|
|
85
|
+
case "needs_approval":
|
|
86
|
+
return "Needs Approval";
|
|
87
|
+
case "rejected":
|
|
88
|
+
return "Rejected";
|
|
89
|
+
case "cancelled":
|
|
90
|
+
return "Cancelled";
|
|
91
|
+
case "confirmed":
|
|
92
|
+
return "Confirmed";
|
|
93
|
+
default:
|
|
94
|
+
return s || "Pending";
|
|
95
|
+
}
|
|
96
|
+
}, S = (s) => s == null ? "" : `€${s.toFixed(2)}`;
|
|
97
|
+
return (s, o) => {
|
|
98
|
+
const m = $("NuxtLink");
|
|
99
|
+
return d(), l("div", q, [
|
|
100
|
+
r(p) ? (d(), l("div", G, [
|
|
101
|
+
i(r(F), { class: "size-4 animate-spin text-muted-foreground" }),
|
|
102
|
+
o[0] || (o[0] = t("span", { class: "text-xs text-muted-foreground" }, "Searching appointments…", -1))
|
|
103
|
+
])) : r(c) ? (d(), l("div", H, a(r(c)), 1)) : r(u).length === 0 ? (d(), l("div", J, [
|
|
104
|
+
i(r(g), { class: "size-8 text-muted-foreground mx-auto mb-2" }),
|
|
105
|
+
o[1] || (o[1] = t("p", { class: "text-sm text-muted-foreground" }, "No appointments found for the given criteria.", -1))
|
|
106
|
+
])) : (d(), l("div", K, [
|
|
107
|
+
(d(!0), l(j, null, P(r(u), (e) => (d(), l("div", {
|
|
108
|
+
key: e.reservationId || e.orderId,
|
|
109
|
+
class: "rounded-xl border bg-background p-3 space-y-3"
|
|
110
|
+
}, [
|
|
111
|
+
t("div", Q, [
|
|
112
|
+
t("div", W, [
|
|
113
|
+
i(r(g), { class: "size-5 text-primary" })
|
|
114
|
+
]),
|
|
115
|
+
t("div", X, [
|
|
116
|
+
t("p", Y, a(e.customerInfo?.firstName) + " " + a(e.customerInfo?.lastName), 1),
|
|
117
|
+
t("div", Z, [
|
|
118
|
+
t("span", {
|
|
119
|
+
class: E(["text-[10px] font-medium px-1.5 py-0.5 rounded-full uppercase", C(e.reservationStatus || e.status)])
|
|
120
|
+
}, a(z(e.reservationStatus || e.status)), 3),
|
|
121
|
+
e.reservationPrice != null ? (d(), l("span", ee, a(S(e.reservationPrice)), 1)) : M("", !0)
|
|
122
|
+
])
|
|
123
|
+
])
|
|
124
|
+
]),
|
|
125
|
+
t("div", te, [
|
|
126
|
+
t("div", se, [
|
|
127
|
+
i(r(R), { class: "size-3" }),
|
|
128
|
+
t("span", re, a(e.customerInfo?.email || "—"), 1)
|
|
129
|
+
]),
|
|
130
|
+
t("div", ne, [
|
|
131
|
+
i(r(g), { class: "size-3" }),
|
|
132
|
+
t("span", null, a(e.date), 1)
|
|
133
|
+
]),
|
|
134
|
+
t("div", ae, [
|
|
135
|
+
i(r(B), { class: "size-3" }),
|
|
136
|
+
t("span", null, a(e.startTime) + " – " + a(e.endTime), 1)
|
|
137
|
+
]),
|
|
138
|
+
t("div", oe, [
|
|
139
|
+
i(r(U), { class: "size-3" }),
|
|
140
|
+
t("span", null, a(e.spots || 1) + " " + a((e.spots || 1) === 1 ? "spot" : "spots"), 1)
|
|
141
|
+
])
|
|
142
|
+
]),
|
|
143
|
+
i(m, {
|
|
144
|
+
to: `/projects/${r(y)}/modules/${v.instanceId}`,
|
|
145
|
+
class: "inline-flex items-center gap-1.5 text-xs text-primary hover:underline"
|
|
146
|
+
}, {
|
|
147
|
+
default: V(() => [
|
|
148
|
+
i(r(O), { class: "size-3" }),
|
|
149
|
+
o[2] || (o[2] = D(" Open in agenda ", -1))
|
|
150
|
+
]),
|
|
151
|
+
_: 1
|
|
152
|
+
}, 8, ["to"])
|
|
153
|
+
]))), 128))
|
|
154
|
+
]))
|
|
155
|
+
]);
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
export {
|
|
160
|
+
le as default
|
|
161
|
+
};
|