@oneclick.dev/cms-core-modules 0.0.108 → 0.0.110
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-DNCy8nQz.mjs +400 -0
- package/dist/Acquisition-Dt2rREU8.js +1 -0
- package/dist/AgendaOpeningHoursCard-B7ROIPWw.js +1 -0
- package/dist/AgendaOpeningHoursCard-Cp4wxUeK.mjs +172 -0
- package/dist/AppointmentDetailsCard-33WpATpV.mjs +161 -0
- package/dist/AppointmentDetailsCard-DpLM5IrB.js +1 -0
- package/dist/AppointmentEditor-BeOtYV6u.mjs +196 -0
- package/dist/AppointmentEditor-CaTfbkIf.js +1 -0
- package/dist/AppointmentListTable-DZJNmTMb.mjs +177 -0
- package/dist/AppointmentListTable-Dieu9US_.js +1 -0
- package/dist/Audience-Bs7b0TNm.js +1 -0
- package/dist/Audience-CUeMVYRy.mjs +489 -0
- package/dist/Components-C83O-xlF.mjs +623 -0
- package/dist/Components-DXbx0RLV.js +1 -0
- package/dist/Content-BHr_rPVY.js +1 -0
- package/dist/Content-CYOZKvWK.mjs +358 -0
- package/dist/ContentEditor-BprPiHMJ.js +462 -0
- package/dist/ContentEditor-D9-1SJ5F.mjs +30700 -0
- package/dist/CountryBreakdownCard-D7BK3nRD.js +1 -0
- package/dist/CountryBreakdownCard-DVxNz2DJ.mjs +196 -0
- package/dist/Create-89z41K73.js +1 -0
- package/dist/Create-BCklc_T1.mjs +1251 -0
- package/dist/DateFormatter-CYAD4GBN.js +1 -0
- package/dist/DateFormatter-DUxlo8X8.mjs +734 -0
- package/dist/Detail-BCOcP2ql.mjs +585 -0
- package/dist/Detail-Btzwo0Y3.mjs +3477 -0
- package/dist/Detail-Byk781b4.mjs +26 -0
- package/dist/Detail-C857g62L.js +1 -0
- package/dist/Detail-C8wQiDcv.js +1 -0
- package/dist/Detail-CNlljBfH.mjs +379 -0
- package/dist/Detail-CPqug27l.js +1 -0
- package/dist/Detail-CjuhjPby.js +1 -0
- package/dist/Detail-DnX7tsqN.mjs +649 -0
- package/dist/Detail-mvSGbnFU.js +1 -0
- package/dist/DeviceBreakdownCard-DRhQ9ufG.js +1 -0
- package/dist/DeviceBreakdownCard-W1frLe0L.mjs +159 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-DWMqQvHl.mjs +76 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-kpjbVSXg.js +1 -0
- package/dist/Entries-BdhUyJR5.mjs +728 -0
- package/dist/Entries-CEXM_SkO.js +1 -0
- package/dist/Find-D4Qa45qC.js +1 -0
- package/dist/Find-DIISO5GO.mjs +229 -0
- package/dist/GlobalStyling-C9VthHWK.mjs +1588 -0
- package/dist/GlobalStyling-CnSlXkZc.js +25 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Ceoje52V.js +1 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Dh9jzvE0.mjs +1255 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-COrK1j0S.js +1 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-Vb3q8EVv.mjs +330 -0
- package/dist/Overview-BCpJNiEB.mjs +190 -0
- package/dist/Overview-BDlBCUI_.js +1 -0
- package/dist/Overview-BKAti8nc.mjs +567 -0
- package/dist/Overview-BbvfH1u-.js +1 -0
- package/dist/Overview-Bn1Xx3_j.js +1 -0
- package/dist/Overview-C-Jb_BxY.mjs +860 -0
- package/dist/Overview-CIa1E-HH.mjs +178 -0
- package/dist/Overview-DAxCu9XC.js +1 -0
- package/dist/Overview-DC9io1bk.js +1 -0
- package/dist/Overview-Di84CsR5.mjs +476 -0
- package/dist/Overview-Su8ZUbMs.mjs +26 -0
- package/dist/Overview-T-lsy3UZ.js +1 -0
- package/dist/Overview-UoZHUMUz.js +1 -0
- package/dist/Overview-lWAyyenp.mjs +632 -0
- package/dist/PeakHoursCard-9-EZFZLR.mjs +182 -0
- package/dist/PeakHoursCard-BR5zmta4.js +1 -0
- package/dist/ProductDetailsCard-6nHikw4V.mjs +121 -0
- package/dist/ProductDetailsCard-Bn7qrgmc.js +1 -0
- package/dist/RealtimeCard--APfRNc8.js +1 -0
- package/dist/RealtimeCard-fvQlJcM7.mjs +126 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CuwREvXD.js +349 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-GYNZ_yhD.mjs +3077 -0
- package/dist/SearchTermsCard-BsB-63aH.js +1 -0
- package/dist/SearchTermsCard-BzVrHKqQ.mjs +201 -0
- package/dist/SendPush-COns44j7.js +1 -0
- package/dist/SendPush-CPIOjVX4.mjs +184 -0
- package/dist/SeoHealth-MC3lSCOY.mjs +615 -0
- package/dist/SeoHealth-az1YuNF2.js +1 -0
- package/dist/TableView-DQW0A1oG.js +4 -0
- package/dist/TableView-DXHhJ-jm.mjs +6143 -0
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +1 -0
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs +40 -0
- package/dist/TopPagesCard-BDeA997A.js +1 -0
- package/dist/TopPagesCard-CTozhOr_.mjs +159 -0
- package/dist/TrafficSourcesCard-BxtCKsqx.mjs +197 -0
- package/dist/TrafficSourcesCard-C3ziDTUL.js +1 -0
- package/dist/View-CsudjxCE.mjs +30 -0
- package/dist/View-Dw_wA6kK.js +1 -0
- package/dist/VisitorStatsCard-BmByE_Hi.js +1 -0
- package/dist/VisitorStatsCard-CXizEbVK.mjs +174 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/agenda-DcatSSYQ.mjs +1165 -0
- package/dist/agenda-IOqtALWf.js +1 -0
- package/dist/array-CbATeQbk.js +1 -0
- package/dist/array-DT5pE8Gm.mjs +108 -0
- package/dist/availability-CMrRa5y2.mjs +269 -0
- package/dist/availability-Cf2YfMwM.js +1 -0
- package/dist/booking-data-DgJd0BcM.mjs +889 -0
- package/dist/booking-data-Di5GmH_8.js +1 -0
- package/dist/cms-core-modules.css +1 -2
- package/dist/countries-BTPvmrsb.mjs +4 -0
- package/dist/countries-CgZ081No.js +1 -0
- package/dist/exceptions-CI0B4xVj.js +1 -0
- package/dist/exceptions-YCQkHa6a.mjs +646 -0
- package/dist/google-CvtuJwgk.mjs +4 -0
- package/dist/google-D4N3gb01.js +1 -0
- package/dist/index-4tjmIans.js +1 -0
- package/dist/index-9HVlmvK3.js +1 -0
- package/dist/index-A2kp8Isi.js +75 -0
- package/dist/index-B5aBwdxY.js +54 -0
- package/dist/index-BFLV54kw.mjs +3843 -0
- package/dist/index-BWDwEd8D.mjs +24 -0
- package/dist/index-BfBBm9uY.mjs +24 -0
- package/dist/index-BhWvXMOp.mjs +176 -0
- package/dist/index-BiT55eU0.js +58 -0
- package/dist/index-Bkq58CeQ.mjs +22 -0
- package/dist/index-BzWmWCo5.mjs +1187 -0
- package/dist/index-CJQQBRLY.js +1 -0
- package/dist/index-CQkOH2_3.mjs +24 -0
- package/dist/index-CSxYBeVA.js +1 -0
- package/dist/index-CU-tbS5W.mjs +24 -0
- package/dist/index-CZn2nDLv.mjs +34 -0
- package/dist/index-CkiNvRzs.js +1 -0
- package/dist/index-Co4ON2Di.js +1 -0
- package/dist/index-Cpnn_Pxd.mjs +24 -0
- package/dist/index-CpzDEMeC.mjs +1443 -0
- package/dist/index-CsVeM3PA.mjs +24 -0
- package/dist/index-CwqrAU-H.js +1 -0
- package/dist/index-CxETuRsG.js +1 -0
- package/dist/index-Cz-baGax.js +1 -0
- package/dist/index-D30apIn-.mjs +110 -0
- package/dist/index-DFQGVHTs.js +1 -0
- package/dist/index-DPd3waTN.js +1 -0
- package/dist/index-DRqJOqUR.mjs +3484 -0
- package/dist/index-DjWuIBxh.js +1 -0
- package/dist/index-Dnn2SCSl.js +1 -0
- package/dist/index-Dpl9sU6a.mjs +12 -0
- package/dist/index-DrXxXB2F.mjs +138 -0
- package/dist/index-G7cIlnGN.js +158 -0
- package/dist/index-R2oUDsjx.js +1 -0
- package/dist/index-RLz1QPrf.mjs +203 -0
- package/dist/index-UtjLbLw-.js +1 -0
- package/dist/index-V78huaSJ.mjs +442 -0
- package/dist/index-cOnxXTbF.mjs +24 -0
- package/dist/index-hlylYYgy.mjs +24 -0
- package/dist/index-ijdf0d9-.js +1 -0
- package/dist/index-vHmvbEwa.js +35 -0
- package/dist/index-wjkEPsNx.mjs +2940 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +806 -1095
- package/dist/interpolation-CHn59tIC.js +1 -0
- package/dist/interpolation-w7IRDJwK.mjs +180 -0
- package/dist/orders-C65SlpJy.mjs +618 -0
- package/dist/orders-XVzWAgG1.js +1 -0
- package/dist/payment-C3ohkehF.mjs +1080 -0
- package/dist/payment-Dfr-Ro-a.js +1 -0
- package/dist/regular-1LXNPviB.js +1 -0
- package/dist/regular-_05oq5Tx.mjs +1101 -0
- package/dist/resources-CYOb5Bl6.mjs +811 -0
- package/dist/resources-CxeFd57z.js +1 -0
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +996 -1049
- package/dist/src/appointments/chat-components/AgendaOpeningHoursCard.vue.d.ts +15 -0
- 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/components/create/StepNavigation.vue.d.ts +32 -0
- package/dist/src/appointments/components/create/regular/Step1.vue.d.ts +2 -0
- package/dist/src/appointments/components/create/regular/Step2.vue.d.ts +2 -0
- package/dist/src/appointments/components/create/regular/Step3.vue.d.ts +2 -0
- package/dist/src/appointments/components/create/regular/Step4.vue.d.ts +2 -0
- package/dist/src/appointments/components/edit/CustomerInformationFieldEditorDialog.vue.d.ts +24 -0
- package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +17 -0
- package/dist/src/appointments/components/edit/Event24hSidebar.vue.d.ts +2 -0
- package/dist/src/appointments/components/edit/EventDialog/ApproveReservationDialog.vue.d.ts +8 -0
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +136 -0
- package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +8 -0
- package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +11 -0
- package/dist/src/appointments/components/edit/EventDialog/OrderDetailDialog.vue.d.ts +55 -0
- package/dist/src/appointments/components/edit/EventDialog/RejectReservationDialog.vue.d.ts +8 -0
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +87 -0
- package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +24 -0
- package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +4 -0
- package/dist/src/appointments/components/edit/EventTimeIndicator.vue.d.ts +12 -0
- package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +48 -0
- package/dist/src/appointments/components/edit/EventView.vue.d.ts +9 -0
- package/dist/src/appointments/components/edit/ExceptionDialog.vue.d.ts +29 -0
- package/dist/src/appointments/components/edit/MetadataSchemaEditorDialog.vue.d.ts +12 -0
- package/dist/src/appointments/components/edit/NewReservationDialog/CustomerInformation.vue.d.ts +10 -0
- package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +26 -0
- package/dist/src/appointments/components/edit/NewReservationDialog/QuickReservationAdder.vue.d.ts +26 -0
- package/dist/src/appointments/components/edit/NewReservationDialog/ReservationLines.vue.d.ts +31 -0
- package/dist/src/appointments/components/edit/OrderMetadataDisplay.vue.d.ts +21 -0
- package/dist/src/appointments/components/edit/PaymentAddons/Addon.vue.d.ts +22 -0
- package/dist/src/appointments/components/edit/PaymentAddons/AddonList.vue.d.ts +5 -0
- package/dist/src/appointments/components/edit/PaymentAddons/index.vue.d.ts +15 -0
- package/dist/src/appointments/components/edit/ResourceEditorDialog.vue.d.ts +13 -0
- package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +36 -0
- package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +50 -0
- package/dist/src/appointments/index.d.ts +12 -9
- package/dist/src/appointments/index.vue.d.ts +22 -0
- package/dist/src/appointments/metadata.d.ts +1 -1
- package/dist/src/appointments/pages/Overview.vue.d.ts +4 -0
- package/dist/src/appointments/pages/create/index.vue.d.ts +2 -0
- package/dist/src/appointments/pages/create/regular.vue.d.ts +6 -0
- package/dist/src/appointments/pages/edit/agenda.vue.d.ts +4 -0
- package/dist/src/appointments/pages/edit/availability.vue.d.ts +2 -0
- package/dist/src/appointments/pages/edit/booking-data.vue.d.ts +65 -0
- package/dist/src/appointments/pages/edit/index.vue.d.ts +2 -0
- package/dist/src/appointments/pages/edit/payment.vue.d.ts +2 -0
- package/dist/src/appointments/pages/edit/resources.vue.d.ts +28 -0
- package/dist/src/appointments/routes.d.ts +6 -3
- package/dist/src/contentManager/components/components/ComponentDialog.vue.d.ts +12 -0
- package/dist/src/contentManager/components/components/ComponentGridItem.vue.d.ts +16 -0
- package/dist/src/contentManager/components/content-editor/ApiDocs.vue.d.ts +2 -0
- package/dist/src/contentManager/components/content-editor/ContentLayout.vue.d.ts +49 -0
- package/dist/src/contentManager/components/content-editor/ContentSettings.vue.d.ts +24 -0
- package/dist/src/contentManager/components/content-editor/ContentStructuredContentSections.vue.d.ts +4 -0
- package/dist/src/contentManager/components/content-editor/Header.vue.d.ts +64 -0
- package/dist/src/contentManager/components/content-editor/LivePreviewWrapper.vue.d.ts +53 -0
- package/dist/src/contentManager/components/content-editor/Locales.vue.d.ts +44 -0
- package/dist/src/contentManager/components/content-editor/NewSectionDialog.vue.d.ts +21 -0
- package/dist/src/contentManager/components/content-editor/PageSettings.vue.d.ts +2 -0
- package/dist/src/contentManager/components/content-editor/SEO.vue.d.ts +14 -0
- package/dist/src/contentManager/components/content-editor/SidebarSectionWrapper.vue.d.ts +39 -0
- package/dist/src/contentManager/components/content-editor/Status.vue.d.ts +2 -0
- package/dist/src/contentManager/components/content-editor/Versions.vue.d.ts +63 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Button.vue.d.ts +94 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Card.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Column.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Container.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Divider.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/EmptySpace.vue.d.ts +94 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Heading.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Image.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/LockBlocks.d.ts +0 -15
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Map.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Paragraph.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Row.vue.d.ts +115 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Stack.vue.d.ts +115 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/TrailingNodeInContainers.d.ts +1 -4
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Video.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/extension-details/DetailsNodeView.vue.d.ts +92 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/NodeLabel.vue.d.ts +108 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/ResizeHandlers.vue.d.ts +20 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/TopMarginDragger.vue.d.ts +104 -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/contentManager/components/content-editor/tiptap-menus/BubbleMenuToggleButton.vue.d.ts +29 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/DefaultBubbleMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/ElementEditorMenu.vue.d.ts +19 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/EmojiMenu.vue.d.ts +8 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/NewNodeView.vue.d.ts +47 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/SlashMenu.vue.d.ts +6 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/SlashMenuButton.vue.d.ts +17 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ButtonMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/CardMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ColumnMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/DividerMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/EmptySpaceMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/HeadingMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ImageMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/MapMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/RowMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/StackMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/TextMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/VideoMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +132 -12
- package/dist/src/contentManager/components/overview/CollectionDialog.vue.d.ts +30 -0
- package/dist/src/contentManager/components/overview/CollectionsGridView.vue.d.ts +18 -0
- package/dist/src/contentManager/components/overview/ContentEntryContextMenu.vue.d.ts +27 -0
- package/dist/src/contentManager/components/overview/FilterPopover.vue.d.ts +2 -0
- package/dist/src/contentManager/components/overview/ListView.vue.d.ts +12 -0
- package/dist/src/contentManager/components/styling/ButtonStyleDialog.vue.d.ts +24 -0
- package/dist/src/contentManager/components/styling/CardStyleDialog.vue.d.ts +24 -0
- package/dist/src/contentManager/components/styling/SectionStyleDialog.vue.d.ts +24 -0
- package/dist/src/contentManager/index.d.ts +14 -5
- package/dist/src/contentManager/index.vue.d.ts +22 -0
- package/dist/src/contentManager/metadata.d.ts +1 -1
- package/dist/src/contentManager/pages/Components.vue.d.ts +27 -0
- package/dist/src/contentManager/pages/ContentEditor.vue.d.ts +14 -0
- package/dist/src/contentManager/pages/Entries.vue.d.ts +16 -0
- package/dist/src/contentManager/pages/GlobalStyling.vue.d.ts +117 -0
- package/dist/src/contentManager/pages/Overview.vue.d.ts +57 -0
- package/dist/src/contentManager/routes.d.ts +12 -3
- package/dist/src/custom/index.d.ts +2 -2
- package/dist/src/custom/index.vue.d.ts +2 -0
- package/dist/src/custom/pages/View.vue.d.ts +2 -0
- package/dist/src/custom/routes.d.ts +1 -1
- 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/components/seo-health/SeoClicksChart.vue.d.ts +5 -0
- package/dist/src/googleAnalytics/components/seo-health/SeoImpressionsChart.vue.d.ts +5 -0
- package/dist/src/googleAnalytics/components/seo-health/SeoKeywordsTab.vue.d.ts +5 -0
- package/dist/src/googleAnalytics/components/seo-health/SeoKpiCards.vue.d.ts +10 -0
- package/dist/src/googleAnalytics/components/seo-health/SeoMappingTab.vue.d.ts +5 -0
- package/dist/src/googleAnalytics/components/seo-health/SeoPagesTab.vue.d.ts +5 -0
- package/dist/src/googleAnalytics/components/seo-health/SeoRankingDistribution.vue.d.ts +5 -0
- package/dist/src/googleAnalytics/index.d.ts +10 -10
- package/dist/src/googleAnalytics/index.vue.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/routes.d.ts +1 -1
- package/dist/src/mailTemplates/components/TemplateList.vue.d.ts +2 -0
- package/dist/src/mailTemplates/index.d.ts +3 -3
- package/dist/src/mailTemplates/index.vue.d.ts +22 -0
- package/dist/src/mailTemplates/metadata.d.ts +1 -1
- package/dist/src/mailTemplates/pages/Detail.vue.d.ts +14 -0
- package/dist/src/mailTemplates/pages/Overview.vue.d.ts +14 -0
- package/dist/src/mailTemplates/routes.d.ts +1 -1
- package/dist/src/productCollections/components/detail/Main.vue.d.ts +2 -0
- package/dist/src/productCollections/components/detail/SEO.vue.d.ts +2 -0
- package/dist/src/productCollections/components/detail/Status.vue.d.ts +2 -0
- package/dist/src/productCollections/components/overview/ListView.vue.d.ts +12 -0
- package/dist/src/productCollections/index.d.ts +3 -3
- package/dist/src/productCollections/index.vue.d.ts +22 -0
- package/dist/src/productCollections/metadata.d.ts +1 -1
- package/dist/src/productCollections/pages/Detail.vue.d.ts +14 -0
- package/dist/src/productCollections/pages/Overview.vue.d.ts +16 -0
- package/dist/src/productCollections/routes.d.ts +1 -1
- package/dist/src/products/chat-components/ProductDetailsCard.vue.d.ts +14 -0
- package/dist/src/products/components/detail/Collections.vue.d.ts +14 -0
- package/dist/src/products/components/detail/Inventory.vue.d.ts +2 -0
- package/dist/src/products/components/detail/Main.vue.d.ts +2 -0
- package/dist/src/products/components/detail/NewSection.vue.d.ts +2 -0
- package/dist/src/products/components/detail/Price.vue.d.ts +2 -0
- package/dist/src/products/components/detail/SEO.vue.d.ts +2 -0
- package/dist/src/products/components/detail/Shipping.vue.d.ts +2 -0
- package/dist/src/products/components/detail/Status.vue.d.ts +2 -0
- package/dist/src/products/components/detail/price/UnitPriceDialog.vue.d.ts +17 -0
- package/dist/src/products/components/detail/variants/Option.vue.d.ts +33 -0
- package/dist/src/products/components/detail/variants/VariantList.vue.d.ts +38 -0
- package/dist/src/products/components/overview/FilterPopover.vue.d.ts +2 -0
- package/dist/src/products/components/overview/GridView.vue.d.ts +12 -0
- package/dist/src/products/components/overview/ListView.vue.d.ts +12 -0
- package/dist/src/products/components/overview/ProductContextMenu.vue.d.ts +27 -0
- package/dist/src/products/index.d.ts +4 -4
- package/dist/src/products/index.vue.d.ts +22 -0
- package/dist/src/products/metadata.d.ts +1 -1
- package/dist/src/products/pages/Detail.vue.d.ts +14 -0
- package/dist/src/products/pages/Overview.vue.d.ts +16 -0
- package/dist/src/products/routes.d.ts +1 -1
- package/dist/src/promoCodes/components/create/DateRange.vue.d.ts +2 -0
- package/dist/src/promoCodes/components/create/MultiCodes.vue.d.ts +2 -0
- package/dist/src/promoCodes/components/create/Note.vue.d.ts +2 -0
- package/dist/src/promoCodes/components/create/SingleCode.vue.d.ts +2 -0
- package/dist/src/promoCodes/components/create/TypeAndValue/TypeDetailDialog.vue.d.ts +6 -0
- package/dist/src/promoCodes/components/create/TypeAndValue/TypeManageDialog.vue.d.ts +18 -0
- package/dist/src/promoCodes/components/create/TypeAndValue/index.vue.d.ts +2 -0
- package/dist/src/promoCodes/index.d.ts +3 -3
- package/dist/src/promoCodes/index.vue.d.ts +22 -0
- package/dist/src/promoCodes/metadata.d.ts +1 -1
- package/dist/src/promoCodes/pages/Create.vue.d.ts +16 -0
- package/dist/src/promoCodes/pages/Detail.vue.d.ts +14 -0
- package/dist/src/promoCodes/pages/Find.vue.d.ts +16 -0
- package/dist/src/promoCodes/routes.d.ts +1 -1
- package/dist/src/push-notifications/components/PreviewAndroid.vue.d.ts +28 -0
- package/dist/src/push-notifications/components/PreviewIPhone.vue.d.ts +28 -0
- package/dist/src/push-notifications/components/PushPreview.vue.d.ts +28 -0
- package/dist/src/push-notifications/index.d.ts +3 -3
- package/dist/src/push-notifications/index.vue.d.ts +22 -0
- package/dist/src/push-notifications/metadata.d.ts +1 -1
- package/dist/src/push-notifications/pages/SendPush.vue.d.ts +14 -0
- package/dist/src/push-notifications/routes.d.ts +1 -1
- package/dist/src/shared/BrandLogo.vue.d.ts +12 -0
- package/dist/src/shared/DrawerToggle.vue.d.ts +60 -0
- package/dist/src/shared/VerticalToggle.vue.d.ts +60 -0
- package/dist/src/shippingOptions/components/detail/Condition.vue.d.ts +2 -0
- package/dist/src/shippingOptions/components/detail/Countries.vue.d.ts +2 -0
- package/dist/src/shippingOptions/components/detail/Example.vue.d.ts +2 -0
- package/dist/src/shippingOptions/components/detail/Main.vue.d.ts +2 -0
- package/dist/src/shippingOptions/components/overview/ListView.vue.d.ts +12 -0
- package/dist/src/shippingOptions/index.d.ts +3 -3
- package/dist/src/shippingOptions/index.vue.d.ts +22 -0
- package/dist/src/shippingOptions/metadata.d.ts +1 -1
- package/dist/src/shippingOptions/pages/Detail.vue.d.ts +14 -0
- package/dist/src/shippingOptions/pages/Overview.vue.d.ts +16 -0
- package/dist/src/shippingOptions/routes.d.ts +1 -1
- package/dist/src/table/components/DataTable.vue.d.ts +18 -0
- package/dist/src/table/components/DataTableAction.vue.d.ts +14 -0
- package/dist/src/table/components/DataTableMobileRowActionDrawer.vue.d.ts +4 -0
- package/dist/src/table/components/DataTablePagination.vue.d.ts +6 -0
- package/dist/src/table/components/actions/ActionDialog.vue.d.ts +19 -0
- package/dist/src/table/components/actions/CtaActionDialog.vue.d.ts +4 -0
- package/dist/src/table/components/columns/ColumnDropdown.vue.d.ts +2 -0
- package/dist/src/table/components/columns/ColumnEditorDialog.vue.d.ts +34 -0
- package/dist/src/table/components/columns/DialogTableColumnItem.vue.d.ts +12 -0
- package/dist/src/table/components/date-range-filter/DateRangeFilter.vue.d.ts +2 -0
- package/dist/src/table/components/date-range-filter/DateRangeSettingsDialog.vue.d.ts +27 -0
- package/dist/src/table/components/filters/FilterDialog.vue.d.ts +12 -0
- package/dist/src/table/components/filters/Filters.vue.d.ts +27 -0
- package/dist/src/table/components/search/Search.vue.d.ts +2 -0
- package/dist/src/table/components/sort/SortMode.vue.d.ts +2 -0
- package/dist/src/table/components/sort/SortModeSettingsDialog.vue.d.ts +18 -0
- package/dist/src/table/components/stats/StatDialog.vue.d.ts +12 -0
- package/dist/src/table/components/stats/Stats.vue.d.ts +27 -0
- package/dist/src/table/flow-builder-extensions/TableRowEditor.vue.d.ts +16 -0
- package/dist/src/table/flow-builder-extensions/row-item.d.ts +17 -3
- package/dist/src/table/index.d.ts +2 -2
- package/dist/src/table/index.vue.d.ts +22 -0
- package/dist/src/table/pages/TableView.vue.d.ts +54 -0
- package/dist/src/table/routes.d.ts +1 -1
- package/dist/src/types/index.d.ts +0 -6
- package/dist/utils-CanmrIWO.mjs +47 -0
- package/dist/utils-Yd6F5mea.js +3 -0
- package/dist/vee-validate-zod-ByykgYKJ.js +1 -0
- package/dist/vee-validate-zod-DNjTLCgh.mjs +4402 -0
- package/package.json +56 -55
- package/dist/Acquisition-DypEyPSO.js +0 -1
- package/dist/Acquisition-TCNX-th6.mjs +0 -308
- package/dist/AgendaOpeningHoursCard-BIhm0vpV.js +0 -1
- package/dist/AgendaOpeningHoursCard-BKUdJxRI.mjs +0 -133
- package/dist/AppointmentDetailsCard-C5rQ5jsW.js +0 -1
- package/dist/AppointmentDetailsCard-NRHeNP2L.mjs +0 -111
- package/dist/AppointmentEditor-BcF8CiD-.mjs +0 -150
- package/dist/AppointmentEditor-BlhFtoCm.js +0 -1
- package/dist/AppointmentListTable-B-ReBVtV.js +0 -1
- package/dist/AppointmentListTable-DHmy-iid.mjs +0 -129
- package/dist/Audience-CfWHjjg8.mjs +0 -394
- package/dist/Audience-Cj4TyauW.js +0 -1
- package/dist/Components-BehelN4r.js +0 -1
- package/dist/Components-CR6zukUU.mjs +0 -468
- package/dist/Content-C5Iye3t0.mjs +0 -257
- package/dist/Content-eOfBx52Y.js +0 -1
- package/dist/ContentEditor-BgL4qEeg.mjs +0 -26835
- package/dist/ContentEditor-Tlu3w0Hu.js +0 -462
- package/dist/CountryBreakdownCard-CWVyB8be.mjs +0 -151
- package/dist/CountryBreakdownCard-Db-pMiNe.js +0 -1
- package/dist/Create-B1it8S4m.js +0 -1
- package/dist/Create-DbYi0FAI.mjs +0 -907
- package/dist/DateFormatter-DLrDYkby.mjs +0 -630
- package/dist/DateFormatter-Dni0Oq8r.js +0 -1
- package/dist/Detail-D-eahJGO.mjs +0 -21
- package/dist/Detail-D0kdPPIm.mjs +0 -2757
- package/dist/Detail-DAafePYi.mjs +0 -485
- package/dist/Detail-DYpv4fYg.js +0 -1
- package/dist/Detail-Dc_ui4LM.js +0 -1
- package/dist/Detail-DccUekl_.js +0 -1
- package/dist/Detail-Dhz0V0Vf.js +0 -1
- package/dist/Detail-DjnGY0F8.mjs +0 -282
- package/dist/Detail-DplAitHg.mjs +0 -447
- package/dist/Detail-SugyeSxb.js +0 -1
- package/dist/DeviceBreakdownCard-CzxZT6To.js +0 -1
- package/dist/DeviceBreakdownCard-eEwPjzKl.mjs +0 -115
- package/dist/EditLayout-Bnz9q_jd.js +0 -1
- package/dist/EditLayout-J_DGXb8v.mjs +0 -99
- package/dist/Entries-CgpWg6fE.js +0 -1
- package/dist/Entries-CkGTXcAq.mjs +0 -575
- package/dist/Find-Bz0TNJzk.mjs +0 -164
- package/dist/Find-D-ItTXaZ.js +0 -1
- package/dist/GlobalStyling-CSQPF7o_.mjs +0 -1162
- package/dist/GlobalStyling-DabldMZh.js +0 -15
- package/dist/NewReservationDialog-BhIiY2B9.js +0 -1
- package/dist/NewReservationDialog-CN49aGcM.mjs +0 -1002
- package/dist/OrderDetailDialog-BJ01DZFe.js +0 -1
- package/dist/OrderDetailDialog-CoVQ_rzs.mjs +0 -215
- package/dist/Overview-9FMgn5hT.mjs +0 -492
- package/dist/Overview-BOOwMQ-c.mjs +0 -636
- package/dist/Overview-Biz3h60w.js +0 -1
- package/dist/Overview-C2K2ofdS.js +0 -1
- package/dist/Overview-CFHOXP9N.mjs +0 -123
- package/dist/Overview-CTJe7J5_.js +0 -1
- package/dist/Overview-Cvj2i9eW.js +0 -1
- package/dist/Overview-D2I1F8Dm.mjs +0 -21
- package/dist/Overview-DFOc9emt.mjs +0 -345
- package/dist/Overview-Dmhfb94Y.js +0 -1
- package/dist/Overview-PPzv7weG.mjs +0 -450
- package/dist/Overview-qFKcXHVF.js +0 -1
- package/dist/Overview-xkmYYTae.mjs +0 -133
- package/dist/Overview-yPsLvR2c.js +0 -1
- package/dist/PeakHoursCard-CtgEP-ez.mjs +0 -157
- package/dist/PeakHoursCard-DPeoMyhu.js +0 -1
- package/dist/ProductDetailsCard-B0WhmzO-.mjs +0 -98
- package/dist/ProductDetailsCard-C1ROuH6l.js +0 -1
- package/dist/RealtimeCard-DQno-Okz.js +0 -1
- package/dist/RealtimeCard-dR-g1iDo.mjs +0 -92
- package/dist/ReservationDetailDialog-Cdo6h0RD.mjs +0 -2163
- package/dist/ReservationDetailDialog-DZTFD2xI.js +0 -349
- package/dist/SearchTermsCard-BXJSXz_k.js +0 -1
- package/dist/SearchTermsCard-DsaxLKwP.mjs +0 -146
- package/dist/SendPush-Bssi-OZD.mjs +0 -150
- package/dist/SendPush-BuaYboRH.js +0 -1
- package/dist/SeoHealth-CP-kL0us.js +0 -1
- package/dist/SeoHealth-Cxp_Gb3Y.mjs +0 -459
- package/dist/TableView-7iwBkQ_k.mjs +0 -4757
- package/dist/TableView-BB_oIYYZ.js +0 -4
- package/dist/TemplateList-CNcM_Kgq.mjs +0 -56
- package/dist/TemplateList-VuPcBUJO.js +0 -1
- package/dist/TopPagesCard-CvDECn3_.mjs +0 -117
- package/dist/TopPagesCard-DNdATXJE.js +0 -1
- package/dist/TrafficSourcesCard-BLpBr7u0.mjs +0 -151
- package/dist/TrafficSourcesCard-_3gRUCw3.js +0 -1
- package/dist/View-DSnUHI7h.mjs +0 -30
- package/dist/View-Dbcfpdqh.js +0 -1
- package/dist/VisitorStatsCard-CFEnXSjF.mjs +0 -185
- package/dist/VisitorStatsCard-C_jhQxDW.js +0 -1
- package/dist/_plugin-vue_export-helper-5u7tqpWC.js +0 -1
- package/dist/_plugin-vue_export-helper-BJQSo0im.mjs +0 -8
- package/dist/agenda-CzMRcQTA.mjs +0 -989
- package/dist/agenda-D4zWRYSQ.js +0 -1
- package/dist/appointments-9syR5TZE.js +0 -1
- package/dist/appointments-BBmOJMhM.mjs +0 -23
- package/dist/array-BH1uH7XT.js +0 -1
- package/dist/array-DnDL9cFz.mjs +0 -98
- package/dist/availability-CAXB7Yd6.js +0 -1
- package/dist/availability-Dp7eF-ZK.mjs +0 -215
- package/dist/booking-data-Bysf6e5x.mjs +0 -724
- package/dist/booking-data-C6SGjC2X.js +0 -1
- package/dist/chunk-DQi1bQcV.js +0 -1
- package/dist/contentManager-D7JxXCwE.js +0 -1
- package/dist/contentManager-tfy0x1LD.mjs +0 -22
- package/dist/context-AQKfnJ4t.mjs +0 -3809
- package/dist/context-ubyMq9Xe.js +0 -54
- package/dist/core-Dhgr4ctC.mjs +0 -202
- package/dist/core-_HKfBlaZ.js +0 -1
- package/dist/countries-MXLT3mVe.mjs +0 -4
- package/dist/countries-OCd5qPxG.js +0 -1
- package/dist/create-BfNc2C7N.js +0 -1
- package/dist/create-C7JlIlIh.mjs +0 -95
- package/dist/custom-BwN9-6Mb.js +0 -1
- package/dist/custom-INNwaWla.mjs +0 -13
- package/dist/dist-BCVg7FKM.js +0 -1
- package/dist/dist-DIhK9VWh.mjs +0 -3045
- package/dist/edit-BiI2VG60.js +0 -35
- package/dist/edit-DD3iFBEh.mjs +0 -1097
- package/dist/exceptions-DICMaDcH.mjs +0 -462
- package/dist/exceptions-DpWqMNuG.js +0 -1
- package/dist/google-Bcc4XZnV.mjs +0 -4
- package/dist/google-DTSRmJ51.js +0 -1
- package/dist/googleAnalytics-BSaqRR_L.js +0 -1
- package/dist/googleAnalytics-Cg-iWblZ.mjs +0 -47
- package/dist/interpolation-B8OzkMyi.mjs +0 -131
- package/dist/interpolation-DpAqtGOW.js +0 -1
- package/dist/lib-4wSi00Vr.js +0 -1
- package/dist/lib-BZgXUui5.mjs +0 -198
- package/dist/line-DJdnFNI7.js +0 -75
- package/dist/line-tYLnEDGV.mjs +0 -1500
- package/dist/mailTemplates-BNk8fhVS.mjs +0 -23
- package/dist/mailTemplates-DswHzyQe.js +0 -1
- package/dist/orders-CIc0JlKX.mjs +0 -512
- package/dist/orders-DwPSi_pD.js +0 -1
- package/dist/payment-BsNWFaDm.js +0 -1
- package/dist/payment-Ced5_dpa.mjs +0 -718
- package/dist/productCollections-Cuvw_8zC.js +0 -1
- package/dist/productCollections-D0AxRlzr.mjs +0 -23
- package/dist/products-DUD-ZMkR.mjs +0 -22
- package/dist/products-DvX9B-Ul.js +0 -1
- package/dist/promoCodes-BCWqN6w4.mjs +0 -23
- package/dist/promoCodes-CEZ4LYot.js +0 -1
- package/dist/push-notifications-BGp4XWo9.js +0 -1
- package/dist/push-notifications-C7W7KuzR.mjs +0 -23
- package/dist/regular-BCFrS6lK.mjs +0 -908
- package/dist/regular-DBqPgT8C.js +0 -1
- package/dist/resources-DwsMmWgm.mjs +0 -669
- package/dist/resources-Dz81GkHe.js +0 -1
- package/dist/shippingOptions-C3NEJff1.mjs +0 -23
- package/dist/shippingOptions-Cy040ZW1.js +0 -1
- package/dist/single-container-BJmmqq65.mjs +0 -468
- package/dist/single-container-Xoo0Xzxv.js +0 -58
- package/dist/src/vue-shim.d.ts +0 -7
- package/dist/table-DWw0fs3S.js +0 -1
- package/dist/table-LXt5DQOL.mjs +0 -23
- package/dist/utils-CVIHqQsU.js +0 -3
- package/dist/utils-h3owcMtS.mjs +0 -37
- package/dist/vee-validate-zod-BmXMJo8W.js +0 -1
- package/dist/vee-validate-zod-D9dZzbWZ.mjs +0 -4985
- package/dist/xy-container-CuQSwrtB.mjs +0 -3180
- package/dist/xy-container-_6YpscZh.js +0 -158
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, normalizeStyle as c, onMounted as l, openBlock as u, ref as d, renderList as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
2
|
-
import { ExternalLink as _, Globe as v, Loader2 as y, MousePointerClick as b, Users as ee } from "@lucide/vue";
|
|
3
|
-
//#region src/googleAnalytics/chat-components/CountryBreakdownCard.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var te = { class: "w-full" }, x = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "flex items-center gap-2 py-3"
|
|
7
|
-
}, S = {
|
|
8
|
-
key: 1,
|
|
9
|
-
class: "text-xs text-destructive py-2"
|
|
10
|
-
}, C = {
|
|
11
|
-
key: 2,
|
|
12
|
-
class: "rounded-xl border bg-background p-4 text-center space-y-2"
|
|
13
|
-
}, w = {
|
|
14
|
-
key: 3,
|
|
15
|
-
class: "rounded-xl border bg-background overflow-hidden"
|
|
16
|
-
}, T = { class: "px-3 py-2 border-b bg-muted/40 flex items-center justify-between" }, E = { class: "flex items-center gap-2" }, D = { class: "text-[10px] text-muted-foreground" }, O = { class: "divide-y" }, k = { class: "flex items-center gap-2 mb-1.5" }, A = { class: "text-sm shrink-0" }, j = { class: "text-xs font-medium truncate flex-1" }, M = { class: "text-[10px] text-muted-foreground" }, N = { class: "ml-7 space-y-1.5" }, P = { class: "h-1.5 rounded-full bg-muted overflow-hidden" }, F = { class: "flex items-center gap-3 text-[10px] text-muted-foreground" }, I = { class: "flex items-center gap-1" }, L = { class: "flex items-center gap-1" }, R = { class: "px-3 py-2 border-t bg-muted/20 flex items-center justify-between" }, z = { class: "text-[10px] text-muted-foreground" }, B = /* @__PURE__ */ s({
|
|
17
|
-
__name: "CountryBreakdownCard",
|
|
18
|
-
props: {
|
|
19
|
-
toolName: {},
|
|
20
|
-
instanceId: {},
|
|
21
|
-
instanceName: {},
|
|
22
|
-
moduleType: {},
|
|
23
|
-
resolvedArgs: {},
|
|
24
|
-
status: {}
|
|
25
|
-
},
|
|
26
|
-
emits: ["submit"],
|
|
27
|
-
setup(s, { emit: B }) {
|
|
28
|
-
let { $useRoute: ne, $useModuleApi: V } = useNuxtApp(), H = s, U = B, W = ne(), G = t(() => W.params.slug), K = V(H.instanceId), q = d(!0), J = d(null), Y = d([]), X = d(null), Z = (e) => ({
|
|
29
|
-
"United States": "🇺🇸",
|
|
30
|
-
"United Kingdom": "🇬🇧",
|
|
31
|
-
Germany: "🇩🇪",
|
|
32
|
-
France: "🇫🇷",
|
|
33
|
-
Netherlands: "🇳🇱",
|
|
34
|
-
Belgium: "🇧🇪",
|
|
35
|
-
Canada: "🇨🇦",
|
|
36
|
-
Australia: "🇦🇺",
|
|
37
|
-
India: "🇮🇳",
|
|
38
|
-
Brazil: "🇧🇷",
|
|
39
|
-
Spain: "🇪🇸",
|
|
40
|
-
Italy: "🇮🇹",
|
|
41
|
-
Japan: "🇯🇵",
|
|
42
|
-
China: "🇨🇳",
|
|
43
|
-
"South Korea": "🇰🇷",
|
|
44
|
-
Mexico: "🇲🇽",
|
|
45
|
-
Russia: "🇷🇺",
|
|
46
|
-
Sweden: "🇸🇪",
|
|
47
|
-
Norway: "🇳🇴",
|
|
48
|
-
Denmark: "🇩🇰",
|
|
49
|
-
Finland: "🇫🇮",
|
|
50
|
-
Poland: "🇵🇱",
|
|
51
|
-
Switzerland: "🇨🇭",
|
|
52
|
-
Austria: "🇦🇹",
|
|
53
|
-
Portugal: "🇵🇹",
|
|
54
|
-
Ireland: "🇮🇪",
|
|
55
|
-
"New Zealand": "🇳🇿",
|
|
56
|
-
Singapore: "🇸🇬",
|
|
57
|
-
"South Africa": "🇿🇦",
|
|
58
|
-
Turkey: "🇹🇷",
|
|
59
|
-
Indonesia: "🇮🇩",
|
|
60
|
-
Thailand: "🇹🇭",
|
|
61
|
-
Philippines: "🇵🇭",
|
|
62
|
-
Vietnam: "🇻🇳",
|
|
63
|
-
Argentina: "🇦🇷",
|
|
64
|
-
Colombia: "🇨🇴",
|
|
65
|
-
Israel: "🇮🇱",
|
|
66
|
-
UAE: "🇦🇪",
|
|
67
|
-
"United Arab Emirates": "🇦🇪",
|
|
68
|
-
"Czech Republic": "🇨🇿",
|
|
69
|
-
Czechia: "🇨🇿",
|
|
70
|
-
Romania: "🇷🇴",
|
|
71
|
-
Hungary: "🇭🇺",
|
|
72
|
-
Ukraine: "🇺🇦",
|
|
73
|
-
Greece: "🇬🇷",
|
|
74
|
-
Luxembourg: "🇱🇺"
|
|
75
|
-
})[e] || "🌍";
|
|
76
|
-
function re() {
|
|
77
|
-
let e = H.resolvedArgs?._cachedData;
|
|
78
|
-
return e ? (Y.value = (e.countries || []).map((e) => ({
|
|
79
|
-
country: e.country,
|
|
80
|
-
sessions: e.sessions,
|
|
81
|
-
totalUsers: e.users
|
|
82
|
-
})), X.value = H.resolvedArgs._fetchedAt || null, q.value = !1, !0) : !1;
|
|
83
|
-
}
|
|
84
|
-
async function ie() {
|
|
85
|
-
let { startDate: e, endDate: t } = H.resolvedArgs || {};
|
|
86
|
-
q.value = !0, J.value = null;
|
|
87
|
-
try {
|
|
88
|
-
let n = new URLSearchParams();
|
|
89
|
-
e && n.set("startDate", e), t && n.set("endDate", t), Y.value = (await K.get(`/countries?${n.toString()}`)).rows || [], X.value = (/* @__PURE__ */ new Date()).toISOString();
|
|
90
|
-
let r = Y.value.reduce((e, t) => e + (t.sessions || 0), 0);
|
|
91
|
-
Q({
|
|
92
|
-
count: Y.value.length,
|
|
93
|
-
countries: Y.value.map((e) => ({
|
|
94
|
-
country: e.country,
|
|
95
|
-
sessions: e.sessions,
|
|
96
|
-
users: e.totalUsers,
|
|
97
|
-
share: `${(e.sessions / r * 100).toFixed(1)}%`
|
|
98
|
-
})),
|
|
99
|
-
suggestion: Y.value.length === 0 ? "No geographic data found for this period." : `Top countries by traffic: ${Y.value.slice(0, 5).map((e) => `${e.country} (${(e.sessions / r * 100).toFixed(0)}%)`).join(", ")}.`
|
|
100
|
-
});
|
|
101
|
-
} catch (e) {
|
|
102
|
-
J.value = e?.data?.statusMessage || e?.message || "Failed to load country data", Q(`Error loading country data: ${J.value}`);
|
|
103
|
-
} finally {
|
|
104
|
-
q.value = !1;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
l(() => {
|
|
108
|
-
H.status === "completed" && re() || ie();
|
|
109
|
-
});
|
|
110
|
-
function Q(e) {
|
|
111
|
-
H.status !== "completed" && U("submit", e);
|
|
112
|
-
}
|
|
113
|
-
let $ = (e) => e == null ? "0" : Math.round(e).toLocaleString(), ae = (e) => e ? new Date(e).toLocaleString(void 0, {
|
|
114
|
-
month: "short",
|
|
115
|
-
day: "numeric",
|
|
116
|
-
hour: "2-digit",
|
|
117
|
-
minute: "2-digit"
|
|
118
|
-
}) : "", oe = t(() => Y.value.reduce((e, t) => e + (t.sessions || 0), 0) || 1), se = t(() => Math.max(...Y.value.map((e) => e.sessions || 0), 1)), ce = t(() => {
|
|
119
|
-
let { startDate: e, endDate: t } = H.resolvedArgs || {};
|
|
120
|
-
if (!e && !t) return "Last 30 days";
|
|
121
|
-
let n = e || "30daysAgo", r = n.match(/^(\d+)daysAgo$/);
|
|
122
|
-
return r ? `Last ${r[1]} days` : `${n} → ${t || "today"}`;
|
|
123
|
-
});
|
|
124
|
-
return (t, l) => {
|
|
125
|
-
let d = p("NuxtLink");
|
|
126
|
-
return u(), r("div", te, [h(q) ? (u(), r("div", x, [o(h(y), { class: "size-4 animate-spin text-muted-foreground" }), l[0] ||= i("span", { class: "text-xs text-muted-foreground" }, "Loading country data…", -1)])) : h(J) ? (u(), r("div", S, m(h(J)), 1)) : h(Y).length === 0 ? (u(), r("div", C, [o(h(v), { class: "size-8 text-muted-foreground mx-auto" }), l[1] ||= i("p", { class: "text-sm text-muted-foreground" }, "No geographic data found for this period.", -1)])) : (u(), r("div", w, [
|
|
127
|
-
i("div", T, [i("div", E, [o(h(v), { class: "size-3.5 text-primary" }), l[2] ||= i("span", { class: "text-xs font-medium" }, "Visitors by Country", -1)]), i("span", D, m(h(ce)), 1)]),
|
|
128
|
-
i("div", O, [(u(!0), r(e, null, f(h(Y), (e, t) => (u(), r("div", {
|
|
129
|
-
key: t,
|
|
130
|
-
class: "px-3 py-2.5 hover:bg-muted/30 transition-colors"
|
|
131
|
-
}, [i("div", k, [
|
|
132
|
-
i("span", A, m(Z(e.country)), 1),
|
|
133
|
-
i("span", j, m(e.country), 1),
|
|
134
|
-
i("span", M, m((e.sessions / h(oe) * 100).toFixed(1)) + "%", 1)
|
|
135
|
-
]), i("div", N, [i("div", P, [i("div", {
|
|
136
|
-
class: "h-full rounded-full bg-blue-500/70 transition-all",
|
|
137
|
-
style: c({ width: `${e.sessions / h(se) * 100}%` })
|
|
138
|
-
}, null, 4)]), i("div", F, [i("span", I, [o(h(b), { class: "size-2.5" }), a(" " + m($(e.sessions)) + " sessions ", 1)]), i("span", L, [o(h(ee), { class: "size-2.5" }), a(" " + m($(e.totalUsers)) + " users ", 1)])])])]))), 128))]),
|
|
139
|
-
i("div", R, [i("span", z, [a(m(h(Y).length) + " countr" + m(h(Y).length === 1 ? "y" : "ies") + " ", 1), h(X) ? (u(), r(e, { key: 0 }, [a(" · fetched " + m(ae(h(X))), 1)], 64)) : n("", !0)]), o(d, {
|
|
140
|
-
to: `/projects/${h(G)}/modules/${s.instanceId}`,
|
|
141
|
-
class: "inline-flex items-center gap-1.5 text-xs text-primary hover:underline"
|
|
142
|
-
}, {
|
|
143
|
-
default: g(() => [o(h(_), { class: "size-3" }), l[3] ||= a(" View full report ", -1)]),
|
|
144
|
-
_: 1
|
|
145
|
-
}, 8, ["to"])])
|
|
146
|
-
]))]);
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
//#endregion
|
|
151
|
-
export { B as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-DQi1bQcV.js`);let e=require(`vue`),t=require(`@lucide/vue`);var n={class:`w-full`},r={key:0,class:`flex items-center gap-2 py-3`},i={key:1,class:`text-xs text-destructive py-2`},a={key:2,class:`rounded-xl border bg-background p-4 text-center space-y-2`},o={key:3,class:`rounded-xl border bg-background overflow-hidden`},s={class:`px-3 py-2 border-b bg-muted/40 flex items-center justify-between`},c={class:`flex items-center gap-2`},l={class:`text-[10px] text-muted-foreground`},u={class:`divide-y`},d={class:`flex items-center gap-2 mb-1.5`},f={class:`text-sm shrink-0`},p={class:`text-xs font-medium truncate flex-1`},m={class:`text-[10px] text-muted-foreground`},h={class:`ml-7 space-y-1.5`},g={class:`h-1.5 rounded-full bg-muted overflow-hidden`},_={class:`flex items-center gap-3 text-[10px] text-muted-foreground`},v={class:`flex items-center gap-1`},y={class:`flex items-center gap-1`},b={class:`px-3 py-2 border-t bg-muted/20 flex items-center justify-between`},x={class:`text-[10px] text-muted-foreground`},S=(0,e.defineComponent)({__name:`CountryBreakdownCard`,props:{toolName:{},instanceId:{},instanceName:{},moduleType:{},resolvedArgs:{},status:{}},emits:[`submit`],setup(S,{emit:C}){let{$useRoute:w,$useModuleApi:T}=useNuxtApp(),E=S,D=C,O=w(),k=(0,e.computed)(()=>O.params.slug),A=T(E.instanceId),j=(0,e.ref)(!0),M=(0,e.ref)(null),N=(0,e.ref)([]),P=(0,e.ref)(null),F=e=>({"United States":`🇺🇸`,"United Kingdom":`🇬🇧`,Germany:`🇩🇪`,France:`🇫🇷`,Netherlands:`🇳🇱`,Belgium:`🇧🇪`,Canada:`🇨🇦`,Australia:`🇦🇺`,India:`🇮🇳`,Brazil:`🇧🇷`,Spain:`🇪🇸`,Italy:`🇮🇹`,Japan:`🇯🇵`,China:`🇨🇳`,"South Korea":`🇰🇷`,Mexico:`🇲🇽`,Russia:`🇷🇺`,Sweden:`🇸🇪`,Norway:`🇳🇴`,Denmark:`🇩🇰`,Finland:`🇫🇮`,Poland:`🇵🇱`,Switzerland:`🇨🇭`,Austria:`🇦🇹`,Portugal:`🇵🇹`,Ireland:`🇮🇪`,"New Zealand":`🇳🇿`,Singapore:`🇸🇬`,"South Africa":`🇿🇦`,Turkey:`🇹🇷`,Indonesia:`🇮🇩`,Thailand:`🇹🇭`,Philippines:`🇵🇭`,Vietnam:`🇻🇳`,Argentina:`🇦🇷`,Colombia:`🇨🇴`,Israel:`🇮🇱`,UAE:`🇦🇪`,"United Arab Emirates":`🇦🇪`,"Czech Republic":`🇨🇿`,Czechia:`🇨🇿`,Romania:`🇷🇴`,Hungary:`🇭🇺`,Ukraine:`🇺🇦`,Greece:`🇬🇷`,Luxembourg:`🇱🇺`})[e]||`🌍`;function I(){let e=E.resolvedArgs?._cachedData;return e?(N.value=(e.countries||[]).map(e=>({country:e.country,sessions:e.sessions,totalUsers:e.users})),P.value=E.resolvedArgs._fetchedAt||null,j.value=!1,!0):!1}async function L(){let{startDate:e,endDate:t}=E.resolvedArgs||{};j.value=!0,M.value=null;try{let n=new URLSearchParams;e&&n.set(`startDate`,e),t&&n.set(`endDate`,t),N.value=(await A.get(`/countries?${n.toString()}`)).rows||[],P.value=new Date().toISOString();let r=N.value.reduce((e,t)=>e+(t.sessions||0),0);R({count:N.value.length,countries:N.value.map(e=>({country:e.country,sessions:e.sessions,users:e.totalUsers,share:`${(e.sessions/r*100).toFixed(1)}%`})),suggestion:N.value.length===0?`No geographic data found for this period.`:`Top countries by traffic: ${N.value.slice(0,5).map(e=>`${e.country} (${(e.sessions/r*100).toFixed(0)}%)`).join(`, `)}.`})}catch(e){M.value=e?.data?.statusMessage||e?.message||`Failed to load country data`,R(`Error loading country data: ${M.value}`)}finally{j.value=!1}}(0,e.onMounted)(()=>{E.status===`completed`&&I()||L()});function R(e){E.status!==`completed`&&D(`submit`,e)}let z=e=>e==null?`0`:Math.round(e).toLocaleString(),B=e=>e?new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}):``,V=(0,e.computed)(()=>N.value.reduce((e,t)=>e+(t.sessions||0),0)||1),H=(0,e.computed)(()=>Math.max(...N.value.map(e=>e.sessions||0),1)),U=(0,e.computed)(()=>{let{startDate:e,endDate:t}=E.resolvedArgs||{};if(!e&&!t)return`Last 30 days`;let n=e||`30daysAgo`,r=n.match(/^(\d+)daysAgo$/);return r?`Last ${r[1]} days`:`${n} → ${t||`today`}`});return(C,w)=>{let T=(0,e.resolveComponent)(`NuxtLink`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,n,[(0,e.unref)(j)?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,r,[(0,e.createVNode)((0,e.unref)(t.Loader2),{class:`size-4 animate-spin text-muted-foreground`}),w[0]||=(0,e.createElementVNode)(`span`,{class:`text-xs text-muted-foreground`},`Loading country data…`,-1)])):(0,e.unref)(M)?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,i,(0,e.toDisplayString)((0,e.unref)(M)),1)):(0,e.unref)(N).length===0?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,a,[(0,e.createVNode)((0,e.unref)(t.Globe),{class:`size-8 text-muted-foreground mx-auto`}),w[1]||=(0,e.createElementVNode)(`p`,{class:`text-sm text-muted-foreground`},`No geographic data found for this period.`,-1)])):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,o,[(0,e.createElementVNode)(`div`,s,[(0,e.createElementVNode)(`div`,c,[(0,e.createVNode)((0,e.unref)(t.Globe),{class:`size-3.5 text-primary`}),w[2]||=(0,e.createElementVNode)(`span`,{class:`text-xs font-medium`},`Visitors by Country`,-1)]),(0,e.createElementVNode)(`span`,l,(0,e.toDisplayString)((0,e.unref)(U)),1)]),(0,e.createElementVNode)(`div`,u,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)((0,e.unref)(N),(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:r,class:`px-3 py-2.5 hover:bg-muted/30 transition-colors`},[(0,e.createElementVNode)(`div`,d,[(0,e.createElementVNode)(`span`,f,(0,e.toDisplayString)(F(n.country)),1),(0,e.createElementVNode)(`span`,p,(0,e.toDisplayString)(n.country),1),(0,e.createElementVNode)(`span`,m,(0,e.toDisplayString)((n.sessions/(0,e.unref)(V)*100).toFixed(1))+`%`,1)]),(0,e.createElementVNode)(`div`,h,[(0,e.createElementVNode)(`div`,g,[(0,e.createElementVNode)(`div`,{class:`h-full rounded-full bg-blue-500/70 transition-all`,style:(0,e.normalizeStyle)({width:`${n.sessions/(0,e.unref)(H)*100}%`})},null,4)]),(0,e.createElementVNode)(`div`,_,[(0,e.createElementVNode)(`span`,v,[(0,e.createVNode)((0,e.unref)(t.MousePointerClick),{class:`size-2.5`}),(0,e.createTextVNode)(` `+(0,e.toDisplayString)(z(n.sessions))+` sessions `,1)]),(0,e.createElementVNode)(`span`,y,[(0,e.createVNode)((0,e.unref)(t.Users),{class:`size-2.5`}),(0,e.createTextVNode)(` `+(0,e.toDisplayString)(z(n.totalUsers))+` users `,1)])])])]))),128))]),(0,e.createElementVNode)(`div`,b,[(0,e.createElementVNode)(`span`,x,[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(N).length)+` countr`+(0,e.toDisplayString)((0,e.unref)(N).length===1?`y`:`ies`)+` `,1),(0,e.unref)(P)?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[(0,e.createTextVNode)(` · fetched `+(0,e.toDisplayString)(B((0,e.unref)(P))),1)],64)):(0,e.createCommentVNode)(``,!0)]),(0,e.createVNode)(T,{to:`/projects/${(0,e.unref)(k)}/modules/${S.instanceId}`,class:`inline-flex items-center gap-1.5 text-xs text-primary hover:underline`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)((0,e.unref)(t.ExternalLink),{class:`size-3`}),w[3]||=(0,e.createTextVNode)(` View full report `,-1)]),_:1},8,[`to`])])]))])}}});exports.default=S;
|
package/dist/Create-B1it8S4m.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require(`./chunk-DQi1bQcV.js`);const e=require(`./DateFormatter-Dni0Oq8r.js`),t=require(`./lib-4wSi00Vr.js`),n=require(`./utils-CVIHqQsU.js`);let r=require(`@oneclick.dev/cms-kit`),i=require(`vue`),a=require(`@lucide/vue`);var o=(0,i.defineComponent)({__name:`SingleCode`,setup(e){let t=(0,i.inject)(`newCoupon`);return(e,n)=>{let r=(0,i.resolveComponent)(`Label`),a=(0,i.resolveComponent)(`Input`);return(0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[(0,i.createVNode)(r,{class:`text-muted-foreground mb-2`,for:`code`},{default:(0,i.withCtx)(()=>[...n[1]||=[(0,i.createTextVNode)(`Enter the coupon code`,-1)]]),_:1}),(0,i.createVNode)(a,{modelValue:(0,i.unref)(t).code,"onUpdate:modelValue":n[0]||=e=>(0,i.unref)(t).code=e,id:`code`},null,8,[`modelValue`])],64)}}}),s={class:`flex items-center space-x-2`},c={class:`flex items-center space-x-2`},l={key:0,class:`flex items-end w-full gap-4`},u={class:`relative w-full`},d={key:1},f=(0,i.defineComponent)({__name:`MultiCodes`,setup(e){let t=(0,i.inject)(`newCoupon`);return(e,n)=>{let r=(0,i.resolveComponent)(`RadioGroupItem`),a=(0,i.resolveComponent)(`Label`),o=(0,i.resolveComponent)(`RadioGroup`),f=(0,i.resolveComponent)(`NumberFieldDecrement`),p=(0,i.resolveComponent)(`NumberFieldInput`),m=(0,i.resolveComponent)(`NumberFieldIncrement`),h=(0,i.resolveComponent)(`NumberFieldContent`),g=(0,i.resolveComponent)(`NumberField`),_=(0,i.resolveComponent)(`Input`),v=(0,i.resolveComponent)(`Textarea`);return(0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[n[8]||=(0,i.createElementVNode)(`p`,{class:`text-sm text-muted-foreground mb-2`},`How do you want to create the codes?`,-1),(0,i.createVNode)(o,{modelValue:(0,i.unref)(t).generationMode,"onUpdate:modelValue":n[0]||=e=>(0,i.unref)(t).generationMode=e,orientation:`vertical`,class:`mb-6`},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,s,[(0,i.createVNode)(r,{id:`generation_mode_generate`,value:`generate`}),(0,i.createVNode)(a,{for:`generation_mode_generate`},{default:(0,i.withCtx)(()=>[...n[3]||=[(0,i.createTextVNode)(`Generate random codes`,-1)]]),_:1})]),(0,i.createElementVNode)(`div`,c,[(0,i.createVNode)(r,{id:`generation_mode_input`,value:`input`}),(0,i.createVNode)(a,{for:`generation_mode_input`},{default:(0,i.withCtx)(()=>[...n[4]||=[(0,i.createTextVNode)(`Provide specific codes`,-1)]]),_:1})])]),_:1},8,[`modelValue`]),(0,i.unref)(t).generationMode==`generate`?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,l,[(0,i.createVNode)(g,{id:`age`,"default-value":1,min:1,class:`w-full`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(a,{for:`age`,class:`text-muted-foreground mb-2`},{default:(0,i.withCtx)(()=>[...n[5]||=[(0,i.createTextVNode)(`Number of codes to generate`,-1)]]),_:1}),(0,i.createVNode)(h,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(f),(0,i.createVNode)(p),(0,i.createVNode)(m)]),_:1})]),_:1}),(0,i.createElementVNode)(`div`,u,[(0,i.createVNode)(_,{modelValue:(0,i.unref)(t).prefix,"onUpdate:modelValue":n[1]||=e=>(0,i.unref)(t).prefix=e,placeholder:`Prefix`,class:`pr-42`},null,8,[`modelValue`]),n[6]||=(0,i.createElementVNode)(`span`,{class:`absolute right-2 top-1/2 transform -translate-y-1/2 text-muted-foreground/80 pointer-events-none`},`- GENERATED CODE`,-1)])])):((0,i.openBlock)(),(0,i.createElementBlock)(`div`,d,[(0,i.createVNode)(a,{class:`text-muted-foreground mb-2`,for:`codes`},{default:(0,i.withCtx)(()=>[...n[7]||=[(0,i.createTextVNode)(`Enter the codes you want to create (one per line)`,-1)]]),_:1}),(0,i.createVNode)(v,{modelValue:(0,i.unref)(t).codes,"onUpdate:modelValue":n[2]||=e=>(0,i.unref)(t).codes=e,id:`codes`,class:`max-h-48`},null,8,[`modelValue`])]))],64)}}}),p={class:`grid gap-6 py-4`},m={class:`flex items-center`},h={class:`flex items-center gap-2`},g={class:`flex items-center gap-2`},_={class:`flex items-center gap-2`},v={class:`flex items-center gap-2`},y={class:`flex items-center space-x-2 mb-2`},b={key:0,class:`text-xs text-blue-600 bg-blue-500/10 p-2 rounded border border-blue-500 mt-1 flex items-start gap-1`},x={class:`flex items-center space-x-2 mb-2`},S=(0,i.defineComponent)({__name:`TypeDetailDialog`,setup(e,{expose:t}){let{isAdmin:n}=(0,r.useModulePermissions)(),{getModuleData:o,setModuleData:s}=(0,r.useModuleStorage)(),c=(0,i.inject)(`promoTypes`,(0,i.ref)([])),l=(0,i.ref)({id:``,label:``,key:``,allowUnlimitedUses:!1,hasValueField:!1,valueLabel:``,valuePrefix:``,valueSuffix:``}),u=(0,i.ref)(!1),d=(0,i.ref)(`add`),f=(0,i.ref)(!1),S=e=>{u.value=!0,f.value=!1,e?(d.value=`edit`,l.value=JSON.parse(JSON.stringify(e))):(d.value=`add`,l.value={id:crypto.randomUUID(),label:``,key:``,allowUnlimitedUses:!1,hasValueField:!1,valueLabel:``,valuePrefix:``,valueSuffix:``})},C=e=>{u.value=!0,f.value=!1,d.value=`add`,E(e)},w=async()=>{f.value=!0;let e=await o(`promo-types`)||[];e.push(JSON.parse(JSON.stringify(l.value))),s(`promo-types`,e),c.value=JSON.parse(JSON.stringify(e)),u.value=!1},T=async()=>{f.value=!0;let e=await o(`promo-types`)||[];e=e.map(e=>e.id===l.value.id?l.value:e),s(`promo-types`,e),c.value=JSON.parse(JSON.stringify(e)),u.value=!1},E=e=>{switch(e){case`fixed`:l.value={id:crypto.randomUUID(),label:`Fixed Amount`,key:`fixed`,allowUnlimitedUses:!1,hasValueField:!0,valueLabel:`Amount`,valuePrefix:`$`,valueSuffix:``};break;case`percentage`:l.value={id:crypto.randomUUID(),label:`Percentage`,key:`percentage`,allowUnlimitedUses:!1,hasValueField:!0,valueLabel:`Percentage`,valuePrefix:``,valueSuffix:`%`};break;case`free_shipping`:l.value={id:crypto.randomUUID(),label:`Free Shipping`,key:`free_shipping`,allowUnlimitedUses:!1,hasValueField:!1,valueLabel:``,valuePrefix:``,valueSuffix:``};break;default:break}};return t({open:S,openFromTemplate:C}),(e,t)=>{let r=(0,i.resolveComponent)(`DialogTitle`),o=(0,i.resolveComponent)(`DialogHeader`),s=(0,i.resolveComponent)(`Button`),c=(0,i.resolveComponent)(`DropdownMenuTrigger`),S=(0,i.resolveComponent)(`DropdownMenuItem`),C=(0,i.resolveComponent)(`DropdownMenuContent`),D=(0,i.resolveComponent)(`DropdownMenu`),O=(0,i.resolveComponent)(`Label`),k=(0,i.resolveComponent)(`Input`),A=(0,i.resolveComponent)(`Switch`),j=(0,i.resolveComponent)(`DialogFooter`),M=(0,i.resolveComponent)(`DialogScrollContent`),N=(0,i.resolveComponent)(`Dialog`);return(0,i.openBlock)(),(0,i.createBlock)(N,{open:u.value,"onUpdate:open":t[11]||=e=>u.value=e},{default:(0,i.withCtx)(()=>[(0,i.unref)(n)()?((0,i.openBlock)(),(0,i.createBlock)(M,{key:0,class:`sm:max-w-[475px]`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(o,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(r,null,{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(d.value===`add`?`Add Promo Type`:`Edit Promo Type`),1)]),_:1})]),_:1}),(0,i.createElementVNode)(`div`,p,[(0,i.createElementVNode)(`div`,m,[d.value===`add`?((0,i.openBlock)(),(0,i.createBlock)(D,{key:0},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(c,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(s,{variant:`outline`},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,h,[(0,i.createVNode)((0,i.unref)(a.Import),{class:`size-4`}),t[12]||=(0,i.createTextVNode)(` Load pre-defined type `,-1)])]),_:1})]),_:1}),(0,i.createVNode)(C,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(S,{onClick:t[0]||=e=>E(`fixed`)},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,g,[(0,i.createVNode)((0,i.unref)(a.DollarSign),{class:`size-4`}),t[13]||=(0,i.createTextVNode)(` Fixed Amount `,-1)])]),_:1}),(0,i.createVNode)(S,{onClick:t[1]||=e=>E(`percentage`)},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,_,[(0,i.createVNode)((0,i.unref)(a.Percent),{class:`size-4`}),t[14]||=(0,i.createTextVNode)(` Percentage `,-1)])]),_:1}),(0,i.createVNode)(S,{onClick:t[2]||=e=>E(`free_shipping`)},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,v,[(0,i.createVNode)((0,i.unref)(a.Truck),{class:`size-4`}),t[15]||=(0,i.createTextVNode)(` Free Shipping `,-1)])]),_:1})]),_:1})]),_:1})):(0,i.createCommentVNode)(``,!0)]),(0,i.createElementVNode)(`div`,null,[(0,i.createVNode)(O,{for:`label`,class:`mb-2`},{default:(0,i.withCtx)(()=>[...t[16]||=[(0,i.createTextVNode)(`Display Name`,-1)]]),_:1}),(0,i.createVNode)(k,{modelValue:l.value.label,"onUpdate:modelValue":t[3]||=e=>l.value.label=e,id:`label`},null,8,[`modelValue`]),t[17]||=(0,i.createElementVNode)(`p`,{class:`text-xs text-muted-foreground mt-1`},`Shown in the Studio UI. e.g. "VIP Shipping"`,-1)]),(0,i.createElementVNode)(`div`,null,[(0,i.createVNode)(O,{for:`key`,class:`mb-2`},{default:(0,i.withCtx)(()=>[...t[18]||=[(0,i.createTextVNode)(`Internal Key`,-1)]]),_:1}),(0,i.createVNode)(k,{modelValue:l.value.key,"onUpdate:modelValue":t[4]||=e=>l.value.key=e,id:`key`},null,8,[`modelValue`]),t[19]||=(0,i.createElementVNode)(`p`,{class:`text-xs text-muted-foreground mt-1`},[(0,i.createTextVNode)(`Used in logic. Must be unique, lowercase, no spaces. e.g. `),(0,i.createElementVNode)(`span`,{class:`font-mono bg-muted-foreground/20 px-1 py-0.5 rounded`},`vip_shipping`)],-1)]),(0,i.createElementVNode)(`div`,null,[(0,i.createVNode)(O,{for:`allowUnlimitedUses`,class:`mb-4`},{default:(0,i.withCtx)(()=>[...t[20]||=[(0,i.createTextVNode)(`Allow Unlimited Uses`,-1)]]),_:1}),(0,i.createElementVNode)(`div`,y,[(0,i.createVNode)(A,{id:`allowUnlimitedUses`,modelValue:l.value.allowUnlimitedUses,"onUpdate:modelValue":t[5]||=e=>l.value.allowUnlimitedUses=e},null,8,[`modelValue`]),(0,i.createVNode)(O,{for:`allowUnlimitedUses`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(l.value.allowUnlimitedUses?`Yes`:`No`),1)]),_:1})]),t[22]||=(0,i.createElementVNode)(`p`,{class:`text-xs text-muted-foreground mt-1`},`Show the "Unlimited uses" toggle when creating a promo code.`,-1),l.value.allowUnlimitedUses?((0,i.openBlock)(),(0,i.createElementBlock)(`p`,b,[(0,i.createVNode)((0,i.unref)(a.Info),{class:`size-4`}),t[21]||=(0,i.createTextVNode)(` This option is always hidden when generating multiple codes. `,-1)])):(0,i.createCommentVNode)(``,!0)]),(0,i.createElementVNode)(`div`,null,[(0,i.createVNode)(O,{for:`hasValueField`,class:`mb-4`},{default:(0,i.withCtx)(()=>[...t[23]||=[(0,i.createTextVNode)(`Has Value Field`,-1)]]),_:1}),(0,i.createElementVNode)(`div`,x,[(0,i.createVNode)(A,{id:`hasValueField`,modelValue:l.value.hasValueField,"onUpdate:modelValue":t[6]||=e=>l.value.hasValueField=e},null,8,[`modelValue`]),(0,i.createVNode)(O,{for:`hasValueField`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(l.value.hasValueField?`Yes`:`No`),1)]),_:1})]),t[24]||=(0,i.createElementVNode)(`p`,{class:`text-xs text-muted-foreground mt-1`},`Show a numeric value input when using this type.`,-1)]),(0,i.createElementVNode)(`div`,null,[(0,i.createVNode)(O,{for:`valueLabel`,class:`mb-2`},{default:(0,i.withCtx)(()=>[...t[25]||=[(0,i.createTextVNode)(`Value Field Label`,-1)]]),_:1}),(0,i.createVNode)(k,{modelValue:l.value.valueLabel,"onUpdate:modelValue":t[7]||=e=>l.value.valueLabel=e,id:`valueLabel`},null,8,[`modelValue`]),t[26]||=(0,i.createElementVNode)(`p`,{class:`text-xs text-muted-foreground mt-1`},`e.g. "Gift amount", "Shipping cost"`,-1)]),(0,i.createElementVNode)(`div`,null,[(0,i.createVNode)(O,{for:`valuePrefix`,class:`mb-2`},{default:(0,i.withCtx)(()=>[...t[27]||=[(0,i.createTextVNode)(`Value Field Prefix`,-1)]]),_:1}),(0,i.createVNode)(k,{modelValue:l.value.valuePrefix,"onUpdate:modelValue":t[8]||=e=>l.value.valuePrefix=e,id:`valuePrefix`},null,8,[`modelValue`]),t[28]||=(0,i.createElementVNode)(`p`,{class:`text-xs text-muted-foreground mt-1`},`e.g. € or $`,-1)]),(0,i.createElementVNode)(`div`,null,[(0,i.createVNode)(O,{for:`valueSuffix`,class:`mb-2`},{default:(0,i.withCtx)(()=>[...t[29]||=[(0,i.createTextVNode)(`Value Field Suffix`,-1)]]),_:1}),(0,i.createVNode)(k,{modelValue:l.value.valueSuffix,"onUpdate:modelValue":t[9]||=e=>l.value.valueSuffix=e,id:`valueSuffix`},null,8,[`modelValue`]),t[30]||=(0,i.createElementVNode)(`p`,{class:`text-xs text-muted-foreground mt-1`},`e.g. %, credits`,-1)])]),(0,i.createVNode)(j,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(s,{variant:`outline`,onClick:t[10]||=e=>u.value=!1},{default:(0,i.withCtx)(()=>[...t[31]||=[(0,i.createTextVNode)(`Cancel`,-1)]]),_:1}),d.value===`add`?((0,i.openBlock)(),(0,i.createBlock)(s,{key:0,disabled:f.value,onClick:w},{default:(0,i.withCtx)(()=>[f.value?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.Loader2),{key:0,class:`size-4 animate-spin`})):(0,i.createCommentVNode)(``,!0),t[32]||=(0,i.createTextVNode)(` Add Type `,-1)]),_:1},8,[`disabled`])):((0,i.openBlock)(),(0,i.createBlock)(s,{key:1,disabled:f.value,onClick:T},{default:(0,i.withCtx)(()=>[f.value?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.Loader2),{key:0,class:`size-4 animate-spin`})):(0,i.createCommentVNode)(``,!0),t[33]||=(0,i.createTextVNode)(` Save Changes `,-1)]),_:1},8,[`disabled`]))]),_:1})]),_:1})):(0,i.createCommentVNode)(``,!0)]),_:1},8,[`open`])}}}),C={class:`grid gap-4 py-4`},w={key:0,class:`flex flex-col gap-2 items-center text-muted-foreground border rounded p-4`},T={class:`flex gap-2 items-center`},E={key:1},D={class:`flex justify-end w-full mb-2`},O={class:`flex items-center gap-2`},k={class:`flex items-center gap-2`},A={class:`flex items-center gap-2`},j={class:`flex items-center gap-2`},M={class:`flex items-center gap-2`},N={class:`font-mono bg-muted-foreground/20 px-1 py-0.5 rounded`},P=(0,i.defineComponent)({__name:`TypeManageDialog`,setup(e){let{isAdmin:t}=(0,r.useModulePermissions)(),{getModuleData:n,setModuleData:o}=(0,r.useModuleStorage)(),{confirm:s}=(0,r.useConfirmation)(),c=(0,i.inject)(`promoTypes`,(0,i.ref)([])),l=(0,i.useTemplateRef)(`typeDetailDialog`),u=async e=>{if(!await s(`Are you sure you want to delete the type "${e.label}"?`))return;let t=await n(`promo-types`)||[];t=t.filter(t=>t.id!==e.id),o(`promo-types`,t),c.value=JSON.parse(JSON.stringify(t))},d=async()=>{let e=[{id:crypto.randomUUID(),label:`Fixed Amount`,key:`fixed`,allowUnlimitedUses:!1,hasValueField:!0,valueLabel:`Amount`,valuePrefix:`$`,valueSuffix:``},{id:crypto.randomUUID(),label:`Percentage`,key:`percentage`,allowUnlimitedUses:!1,hasValueField:!0,valueLabel:`Percentage`,valuePrefix:``,valueSuffix:`%`},{id:crypto.randomUUID(),label:`Free Shipping`,key:`free_shipping`,allowUnlimitedUses:!1,hasValueField:!1,valueLabel:``,valuePrefix:``,valueSuffix:``}];o(`promo-types`,e),c.value=JSON.parse(JSON.stringify(e))};return(e,n)=>{let r=(0,i.resolveComponent)(`Button`),o=(0,i.resolveComponent)(`DialogTrigger`),s=(0,i.resolveComponent)(`DialogTitle`),f=(0,i.resolveComponent)(`DialogDescription`),p=(0,i.resolveComponent)(`DialogHeader`),m=(0,i.resolveComponent)(`DropdownMenuTrigger`),h=(0,i.resolveComponent)(`DropdownMenuItem`),g=(0,i.resolveComponent)(`DropdownMenuSeparator`),_=(0,i.resolveComponent)(`DropdownMenuContent`),v=(0,i.resolveComponent)(`DropdownMenu`),y=(0,i.resolveComponent)(`TableHead`),b=(0,i.resolveComponent)(`TableRow`),x=(0,i.resolveComponent)(`TableHeader`),P=(0,i.resolveComponent)(`TableCell`),F=(0,i.resolveComponent)(`TableBody`),I=(0,i.resolveComponent)(`Table`),L=(0,i.resolveComponent)(`DialogFooter`),R=(0,i.resolveComponent)(`DialogScrollContent`),z=(0,i.resolveComponent)(`Dialog`);return(0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[(0,i.createVNode)(z,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(o,{"as-child":``},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(r,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(a.UserCog),{class:`size-4`}),n[6]||=(0,i.createTextVNode)(` Edit Promo Types `,-1)]),_:1})]),_:1}),(0,i.unref)(t)()?((0,i.openBlock)(),(0,i.createBlock)(R,{key:0,class:`sm:max-w-2xl`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(p,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(s,null,{default:(0,i.withCtx)(()=>[...n[7]||=[(0,i.createTextVNode)(`Edit Promo Types`,-1)]]),_:1}),(0,i.createVNode)(f,null,{default:(0,i.withCtx)(()=>[...n[8]||=[(0,i.createTextVNode)(` Define reusable custom promo types to use in discount codes. You can configure how they behave and what fields are shown. `,-1)]]),_:1})]),_:1}),(0,i.createElementVNode)(`div`,C,[(0,i.unref)(c).length===0?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,w,[n[12]||=(0,i.createElementVNode)(`p`,null,`You haven't created any custom types yet.`,-1),(0,i.createElementVNode)(`p`,T,[(0,i.createVNode)(r,{variant:`link`,onClick:n[0]||=e=>l.value?.open()},{default:(0,i.withCtx)(()=>[...n[9]||=[(0,i.createTextVNode)(`Create a custom type`,-1)]]),_:1}),n[11]||=(0,i.createTextVNode)(` or `,-1),(0,i.createVNode)(r,{variant:`link`,onClick:n[1]||=e=>d()},{default:(0,i.withCtx)(()=>[...n[10]||=[(0,i.createTextVNode)(`Import Default Types`,-1)]]),_:1})])])):((0,i.openBlock)(),(0,i.createElementBlock)(`div`,E,[(0,i.createElementVNode)(`div`,D,[(0,i.createVNode)(v,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(m,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(r,{variant:`outline`},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,O,[(0,i.createVNode)((0,i.unref)(a.Plus),{class:`size-4`}),n[13]||=(0,i.createTextVNode)(` Create new Promo Type `,-1)])]),_:1})]),_:1}),(0,i.createVNode)(_,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(h,{onClick:n[2]||=e=>l.value?.open()},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,k,[(0,i.createVNode)((0,i.unref)(a.Plus),{class:`size-4`}),n[14]||=(0,i.createTextVNode)(` New Type `,-1)])]),_:1}),(0,i.createVNode)(g),(0,i.createVNode)(h,{onClick:n[3]||=e=>l.value?.openFromTemplate(`fixed`)},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,A,[(0,i.createVNode)((0,i.unref)(a.DollarSign),{class:`size-4`}),n[15]||=(0,i.createTextVNode)(` Fixed Amount `,-1)])]),_:1}),(0,i.createVNode)(h,{onClick:n[4]||=e=>l.value?.openFromTemplate(`percentage`)},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,j,[(0,i.createVNode)((0,i.unref)(a.Percent),{class:`size-4`}),n[16]||=(0,i.createTextVNode)(` Percentage `,-1)])]),_:1}),(0,i.createVNode)(h,{onClick:n[5]||=e=>l.value?.openFromTemplate(`free_shipping`)},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,M,[(0,i.createVNode)((0,i.unref)(a.Truck),{class:`size-4`}),n[17]||=(0,i.createTextVNode)(` Free Shipping `,-1)])]),_:1})]),_:1})]),_:1})]),(0,i.createVNode)(I,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(x,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(b,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(y,null,{default:(0,i.withCtx)(()=>[...n[18]||=[(0,i.createTextVNode)(`Name (label)`,-1)]]),_:1}),(0,i.createVNode)(y,null,{default:(0,i.withCtx)(()=>[...n[19]||=[(0,i.createTextVNode)(`Key`,-1)]]),_:1}),(0,i.createVNode)(y,null,{default:(0,i.withCtx)(()=>[...n[20]||=[(0,i.createTextVNode)(`Value Field`,-1)]]),_:1}),(0,i.createVNode)(y,null,{default:(0,i.withCtx)(()=>[...n[21]||=[(0,i.createTextVNode)(`Unlimited Uses`,-1)]]),_:1}),(0,i.createVNode)(y,{class:`text-right`},{default:(0,i.withCtx)(()=>[...n[22]||=[(0,i.createTextVNode)(`Actions`,-1)]]),_:1})]),_:1})]),_:1}),(0,i.createVNode)(F,null,{default:(0,i.withCtx)(()=>[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)((0,i.unref)(c),e=>((0,i.openBlock)(),(0,i.createBlock)(b,{key:e.key},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(P,null,{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.label),1)]),_:2},1024),(0,i.createVNode)(P,null,{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`span`,N,(0,i.toDisplayString)(e.key),1)]),_:2},1024),(0,i.createVNode)(P,null,{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.hasValueField?`Yes`:`No`),1)]),_:2},1024),(0,i.createVNode)(P,null,{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.allowUnlimitedUses?`Yes`:`No`),1)]),_:2},1024),(0,i.createVNode)(P,{class:`text-right`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(r,{variant:`ghost`,size:`icon`,onClick:t=>l.value?.open(e)},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(a.Pencil),{class:`size-4`})]),_:1},8,[`onClick`]),(0,i.createVNode)(r,{variant:`ghost`,size:`icon`,onClick:t=>u(e)},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(a.Trash2),{class:`size-4 text-red-500`})]),_:1},8,[`onClick`])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]))]),(0,i.createVNode)(L,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(r,{variant:`outline`,disabled:``},{default:(0,i.withCtx)(()=>[...n[23]||=[(0,i.createTextVNode)(` Auto-saved `,-1)]]),_:1})]),_:1})]),_:1})):(0,i.createCommentVNode)(``,!0)]),_:1}),(0,i.createVNode)(S,{ref_key:`typeDetailDialog`,ref:l},null,512)],64)}}}),F={class:`flex justify-between items-center`},I={class:`grid gap-2`},L={class:`flex flex-wrap gap-12`},R={key:0,class:`grid gap-2`},z={class:`flex items-center gap-2`},B={key:1,class:`grid gap-2`},V={class:`flex items-center space-x-2`},H=(0,i.defineComponent)({__name:`index`,setup(e){let t=(0,i.inject)(`newCoupon`),n=(0,i.inject)(`promoTypes`,(0,i.ref)([])),a=(0,i.computed)(()=>n.value.find(e=>e.key===t.value?.type)||null),{isAdmin:o}=(0,r.useModulePermissions)();return(e,r)=>{let s=(0,i.resolveComponent)(`Label`),c=(0,i.resolveComponent)(`SelectValue`),l=(0,i.resolveComponent)(`SelectTrigger`),u=(0,i.resolveComponent)(`SelectItem`),d=(0,i.resolveComponent)(`SelectGroup`),f=(0,i.resolveComponent)(`SelectContent`),p=(0,i.resolveComponent)(`Select`),m=(0,i.resolveComponent)(`Input`),h=(0,i.resolveComponent)(`Switch`),g=(0,i.resolveComponent)(`Card`);return(0,i.openBlock)(),(0,i.createBlock)(g,{class:`p-4`},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,F,[r[3]||=(0,i.createElementVNode)(`h2`,{class:`font-medium`},`Value`,-1),(0,i.unref)(o)()?((0,i.openBlock)(),(0,i.createBlock)(P,{key:0})):(0,i.createCommentVNode)(``,!0)]),(0,i.createElementVNode)(`div`,I,[(0,i.createVNode)(s,{class:`text-muted-foreground`},{default:(0,i.withCtx)(()=>[...r[4]||=[(0,i.createTextVNode)(`Promo Type`,-1)]]),_:1}),(0,i.createVNode)(p,{modelValue:(0,i.unref)(t).type,"onUpdate:modelValue":r[0]||=e=>(0,i.unref)(t).type=e},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(l,{class:`w-[200px]`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(c,{placeholder:`Select a promo type`})]),_:1}),(0,i.createVNode)(f,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(d,null,{default:(0,i.withCtx)(()=>[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)((0,i.unref)(n),e=>((0,i.openBlock)(),(0,i.createBlock)(u,{key:e.key,value:e.key},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`modelValue`])]),(0,i.createElementVNode)(`div`,L,[a.value?.hasValueField?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,R,[(0,i.createVNode)(s,{for:`discountValue`,class:`text-muted-foreground`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(a.value?.valueLabel||`Value`),1)]),_:1}),(0,i.createElementVNode)(`div`,z,[a.value?.valuePrefix?((0,i.openBlock)(),(0,i.createBlock)(s,{key:0,for:`discountValue`,class:`text-lg`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(a.value?.valuePrefix),1)]),_:1})):(0,i.createCommentVNode)(``,!0),(0,i.createVNode)(m,{modelValue:(0,i.unref)(t).value,"onUpdate:modelValue":r[1]||=e=>(0,i.unref)(t).value=e,modelModifiers:{number:!0},id:`discountValue`,type:`number`,class:`no-spinner`,min:`0`},null,8,[`modelValue`]),a.value?.valueSuffix?((0,i.openBlock)(),(0,i.createBlock)(s,{key:1,for:`discountValue`,class:`text-lg`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(a.value?.valueSuffix),1)]),_:1})):(0,i.createCommentVNode)(``,!0)])])):(0,i.createCommentVNode)(``,!0),a.value?.allowUnlimitedUses&&(0,i.unref)(t).creationMode!==`multi`?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,B,[(0,i.createVNode)(s,{for:`unlimitedUses`,class:`text-muted-foreground`},{default:(0,i.withCtx)(()=>[...r[5]||=[(0,i.createTextVNode)(`Unlimited Uses`,-1)]]),_:1}),(0,i.createElementVNode)(`div`,V,[(0,i.createVNode)(h,{id:`unlimitedUses`,modelValue:(0,i.unref)(t).unlimitedUses,"onUpdate:modelValue":r[2]||=e=>(0,i.unref)(t).unlimitedUses=e},null,8,[`modelValue`]),(0,i.createVNode)(s,{for:`unlimitedUses`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(t).unlimitedUses?`Yes`:`No`),1)]),_:1})])])):(0,i.createCommentVNode)(``,!0)])]),_:1})}}}),U={class:`flex gap-4`},W={class:`flex flex-col`},G={key:0,class:`-ml-2`},K={key:1,class:`text-xs text-muted-foreground mt-2`},q={class:`flex flex-col`},J={key:0,class:`-ml-2`},Y={key:1,class:`text-xs text-muted-foreground mt-2`},X=(0,i.defineComponent)({__name:`DateRange`,setup(t){let r=(0,i.inject)(`newCoupon`),o=new e.t(`en-US`,{dateStyle:`long`});return(t,s)=>{let c=(0,i.resolveComponent)(`Label`),l=(0,i.resolveComponent)(`Button`),u=(0,i.resolveComponent)(`PopoverTrigger`),d=(0,i.resolveComponent)(`Calendar`),f=(0,i.resolveComponent)(`PopoverContent`),p=(0,i.resolveComponent)(`Popover`),m=(0,i.resolveComponent)(`Card`);return(0,i.openBlock)(),(0,i.createBlock)(m,{class:`p-4`},{default:(0,i.withCtx)(()=>[s[8]||=(0,i.createElementVNode)(`div`,null,[(0,i.createElementVNode)(`h2`,{class:`font-medium mb-2`},`Availability`),(0,i.createElementVNode)(`p`,{class:`text-muted-foreground`},`When will this code be available?`)],-1),(0,i.createElementVNode)(`div`,U,[(0,i.createElementVNode)(`div`,W,[(0,i.createVNode)(c,{class:`text-muted-foreground mb-2`},{default:(0,i.withCtx)(()=>[...s[4]||=[(0,i.createTextVNode)(`Available from`,-1)]]),_:1}),(0,i.createVNode)(p,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(u,{"as-child":``},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(l,{variant:`outline`,class:(0,i.normalizeClass)((0,i.unref)(n.t)(`w-[280px] justify-start text-left font-normal`,!(0,i.unref)(r).startsAt&&`text-muted-foreground`))},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(a.CalendarIcon),{class:`mr-2 h-4 w-4`}),(0,i.createTextVNode)(` `+(0,i.toDisplayString)((0,i.unref)(r).startsAt?(0,i.unref)(o).format((0,i.unref)(r).startsAt.toDate((0,i.unref)(e.a)())):`Pick a date`),1)]),_:1},8,[`class`])]),_:1}),(0,i.createVNode)(f,{class:`w-auto p-0`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(d,{modelValue:(0,i.unref)(r).startsAt,"onUpdate:modelValue":s[0]||=e=>(0,i.unref)(r).startsAt=e,"initial-focus":``,minValue:(0,i.unref)(e.o)()},null,8,[`modelValue`,`minValue`])]),_:1})]),_:1}),(0,i.unref)(r).startsAt?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,G,[(0,i.createVNode)(l,{onClick:s[1]||=e=>(0,i.unref)(r).startsAt=void 0,variant:`link`},{default:(0,i.withCtx)(()=>[...s[5]||=[(0,i.createTextVNode)(`Clear`,-1)]]),_:1})])):((0,i.openBlock)(),(0,i.createElementBlock)(`p`,K,`Not set - codes will be available immediately`))]),(0,i.createElementVNode)(`div`,q,[(0,i.createVNode)(c,{class:`text-muted-foreground mb-2`},{default:(0,i.withCtx)(()=>[...s[6]||=[(0,i.createTextVNode)(`Until`,-1)]]),_:1}),(0,i.createVNode)(p,null,{default:(0,i.withCtx)(()=>[(0,i.createVNode)(u,{"as-child":``},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(l,{variant:`outline`,class:(0,i.normalizeClass)((0,i.unref)(n.t)(`w-[280px] justify-start text-left font-normal`,!(0,i.unref)(r).expiresAt&&`text-muted-foreground`))},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(a.CalendarIcon),{class:`mr-2 h-4 w-4`}),(0,i.createTextVNode)(` `+(0,i.toDisplayString)((0,i.unref)(r).expiresAt?(0,i.unref)(o).format((0,i.unref)(r).expiresAt.toDate((0,i.unref)(e.a)())):`Pick a date`),1)]),_:1},8,[`class`])]),_:1}),(0,i.createVNode)(f,{class:`w-auto p-0`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)(d,{modelValue:(0,i.unref)(r).expiresAt,"onUpdate:modelValue":s[2]||=e=>(0,i.unref)(r).expiresAt=e,"initial-focus":``,minValue:(0,i.unref)(r).startsAt},null,8,[`modelValue`,`minValue`])]),_:1})]),_:1}),(0,i.unref)(r).expiresAt?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,J,[(0,i.createVNode)(l,{onClick:s[3]||=e=>(0,i.unref)(r).expiresAt=void 0,variant:`link`},{default:(0,i.withCtx)(()=>[...s[7]||=[(0,i.createTextVNode)(`Clear`,-1)]]),_:1})])):((0,i.openBlock)(),(0,i.createElementBlock)(`p`,Y,`Not set - codes will never expire`))])])]),_:1})}}}),Z=(0,i.defineComponent)({__name:`Note`,setup(e){let t=(0,i.inject)(`newCoupon`);return(e,n)=>{let r=(0,i.resolveComponent)(`Textarea`),a=(0,i.resolveComponent)(`Card`);return(0,i.openBlock)(),(0,i.createBlock)(a,{class:`p-4`},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,null,[n[1]||=(0,i.createElementVNode)(`h2`,{class:`font-medium mb-2`},`Note`,-1),n[2]||=(0,i.createElementVNode)(`p`,{class:`text-sm text-muted-foreground mb-2`},`Used internally. It's a good idea to write down why you're creating this promo code.`,-1),(0,i.createVNode)(r,{modelValue:(0,i.unref)(t).note,"onUpdate:modelValue":n[0]||=e=>(0,i.unref)(t).note=e},null,8,[`modelValue`])])]),_:1})}}}),Q={class:`relative`},$={ref:`container`,class:`flex flex-col gap-4 w-full max-w-5xl mx-auto`},ee={class:`flex justify-between items-center mb-4`},te={class:`w-full max-w-2xl`},ne={class:`flex items-center space-x-2`},re={class:`flex items-center space-x-2`},ie={class:`flex justify-end w-full`},ae=(0,i.defineComponent)({__name:`Create`,props:{config:{type:Object,required:!0}},async setup(e){let n,s,c=e,{hasPermission:l}=(0,r.useModulePermissions)(),{navigateTo:u}=(0,r.useModuleRoute)(),{getTimezone:d}=(0,r.useProjectSettings)(),{log:p,logError:m}=(0,r.useLogs)(),{getModuleData:h,setModuleData:g}=(0,r.useModuleStorage)();(0,r.useModuleBreadcrumbs)(()=>[]);let _=(0,r.useFirebaseIntegration)(c.config.project),v=(0,i.ref)(!1),y=(0,i.ref)({creationMode:`single`,generationMode:`generate`,quantity:1,prefix:``,codes:``,code:``,type:void 0,value:void 0,unlimitedUses:!1,startsAt:void 0,expiresAt:void 0,minOrderAmount:0,note:``}),b=(0,i.ref)([]);b.value=([n,s]=(0,i.withAsyncContext)(()=>h(`promo-types`)),n=await n,s(),n)||[],(0,i.provide)(`newCoupon`,y),(0,i.provide)(`promoTypes`,b);let x=()=>{if(y.value.creationMode==`single`){if(y.value.code=y.value.code?.trim().toUpperCase(),!y.value.code)return t.t.error(`Please enter a code`),!1}else if(y.value.generationMode==`generate`){if(y.value.prefix=y.value.prefix?.trim().toUpperCase(),!y.value.prefix)return t.t.error(`Please enter a prefix`),!1;if(!y.value.quantity||y.value.quantity<1)return t.t.error(`Generate at least 1 code`),!1}else if(y.value.generationMode==`input`&&(y.value.codes=y.value.codes?.trim().toUpperCase(),!y.value.codes||y.value.codes.length<1))return t.t.error(`Please enter some codes`),!1;return y.value.type?b.value.find(e=>e.key===y.value.type)?.hasValueField&&!y.value.value?(t.t.error(`Please enter a value`),!1):(y.value.creationMode===`multi`&&(y.value.unlimitedUses=!1),!0):(t.t.error(`Please select a type`),!1)},S=async()=>{try{if(!x())return;if(v.value=!0,y.value.creationMode==`single`){let e={code:y.value.code,type:y.value.type,value:y.value.value,minOrderAmount:y.value.minOrderAmount,usageLimit:+!y.value.unlimitedUses,usageCount:0,lastUsedAt:null,startsAt:y.value.startsAt?y.value.startsAt.toDate(d()):null,expiresAt:y.value.expiresAt?y.value.expiresAt.toDate(d()):null,disabled:!1,note:y.value.note,createdAt:new Date,updatedAt:new Date},n=await _.add(c.config.promoCodeCollection,e);p(`Promo code created`,{id:n.id,code:n.code,note:n.note}),t.t.success(`Promo code created`)}}catch{m(`Failed to create promo code`),t.t.error(`Failed to create promo code`)}finally{v.value=!1}};return(e,t)=>{let n=(0,i.resolveComponent)(`Button`),r=(0,i.resolveComponent)(`RadioGroupItem`),s=(0,i.resolveComponent)(`Label`),c=(0,i.resolveComponent)(`RadioGroup`),l=(0,i.resolveComponent)(`Card`);return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,Q,[(0,i.createElementVNode)(`div`,$,[(0,i.createElementVNode)(`div`,ee,[t[3]||=(0,i.createElementVNode)(`h1`,{class:`text-2xl font-bold`},`New Promo Code`,-1),(0,i.createVNode)(n,{onClick:t[0]||=e=>(0,i.unref)(u)(`promo-codes`),variant:`outline`,disabled:v.value},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(a.List),{class:`size-4`}),t[2]||=(0,i.createTextVNode)(` View Promo Codes `,-1)]),_:1},8,[`disabled`])]),(0,i.createVNode)(l,{class:`p-4`},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,te,[t[6]||=(0,i.createElementVNode)(`h2`,{class:`font-medium mb-4`},`Codes`,-1),(0,i.createVNode)(c,{modelValue:y.value.creationMode,"onUpdate:modelValue":t[1]||=e=>y.value.creationMode=e,orientation:`horizontal`,class:`mb-6`},{default:(0,i.withCtx)(()=>[(0,i.createElementVNode)(`div`,ne,[(0,i.createVNode)(r,{id:`creation_mode_single`,value:`single`}),(0,i.createVNode)(s,{for:`creation_mode_single`},{default:(0,i.withCtx)(()=>[...t[4]||=[(0,i.createTextVNode)(`Create 1 code`,-1)]]),_:1})]),(0,i.createElementVNode)(`div`,re,[(0,i.createVNode)(r,{id:`creation_mode_multi`,value:`multi`}),(0,i.createVNode)(s,{for:`creation_mode_multi`},{default:(0,i.withCtx)(()=>[...t[5]||=[(0,i.createTextVNode)(`Create multiple codes`,-1)]]),_:1})])]),_:1},8,[`modelValue`]),y.value.creationMode==`single`?((0,i.openBlock)(),(0,i.createBlock)(o,{key:0})):((0,i.openBlock)(),(0,i.createBlock)(f,{key:1}))])]),_:1}),(0,i.createVNode)(H),(0,i.createVNode)(X),(0,i.createVNode)(Z),(0,i.createElementVNode)(`div`,ie,[(0,i.createVNode)(n,{disabled:v.value,onClick:S},{default:(0,i.withCtx)(()=>[v.value?((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(a.Loader2),{key:0,class:`size-4 animate-spin`})):(0,i.createCommentVNode)(``,!0),t[7]||=(0,i.createTextVNode)(` Create Promo Code `,-1)]),_:1},8,[`disabled`])])],512)])}}});exports.default=ae;
|