@oneclick.dev/cms-core-modules 0.0.106 → 0.0.107
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-DypEyPSO.js +1 -0
- package/dist/Acquisition-TCNX-th6.mjs +308 -0
- package/dist/AgendaOpeningHoursCard-BIhm0vpV.js +1 -0
- package/dist/AgendaOpeningHoursCard-BKUdJxRI.mjs +133 -0
- package/dist/AppointmentDetailsCard-C5rQ5jsW.js +1 -0
- package/dist/AppointmentDetailsCard-NRHeNP2L.mjs +111 -0
- package/dist/AppointmentEditor-BcF8CiD-.mjs +150 -0
- package/dist/AppointmentEditor-BlhFtoCm.js +1 -0
- package/dist/AppointmentListTable-B-ReBVtV.js +1 -0
- package/dist/AppointmentListTable-DHmy-iid.mjs +129 -0
- package/dist/Audience-Cq1Gu-Vo.mjs +394 -0
- package/dist/Audience-h5PfXPz4.js +1 -0
- package/dist/Components-BehelN4r.js +1 -0
- package/dist/Components-CR6zukUU.mjs +468 -0
- package/dist/Content-C5Iye3t0.mjs +257 -0
- package/dist/Content-eOfBx52Y.js +1 -0
- package/dist/ContentEditor-BgL4qEeg.mjs +26835 -0
- package/dist/ContentEditor-Tlu3w0Hu.js +462 -0
- package/dist/CountryBreakdownCard-CWVyB8be.mjs +151 -0
- package/dist/CountryBreakdownCard-Db-pMiNe.js +1 -0
- package/dist/Create-B1it8S4m.js +1 -0
- package/dist/Create-DbYi0FAI.mjs +907 -0
- package/dist/DateFormatter-DLrDYkby.mjs +630 -0
- package/dist/DateFormatter-Dni0Oq8r.js +1 -0
- package/dist/Detail-D-eahJGO.mjs +21 -0
- package/dist/Detail-D0kdPPIm.mjs +2757 -0
- package/dist/Detail-DAafePYi.mjs +485 -0
- package/dist/Detail-DYpv4fYg.js +1 -0
- package/dist/Detail-Dc_ui4LM.js +1 -0
- package/dist/Detail-DccUekl_.js +1 -0
- package/dist/Detail-Dhz0V0Vf.js +1 -0
- package/dist/Detail-DjnGY0F8.mjs +282 -0
- package/dist/Detail-DplAitHg.mjs +447 -0
- package/dist/Detail-SugyeSxb.js +1 -0
- package/dist/DeviceBreakdownCard-CzxZT6To.js +1 -0
- package/dist/DeviceBreakdownCard-eEwPjzKl.mjs +115 -0
- package/dist/EditLayout-Bnz9q_jd.js +1 -0
- package/dist/EditLayout-J_DGXb8v.mjs +99 -0
- package/dist/Entries-CgpWg6fE.js +1 -0
- package/dist/Entries-CkGTXcAq.mjs +575 -0
- package/dist/Find-Bz0TNJzk.mjs +164 -0
- package/dist/Find-D-ItTXaZ.js +1 -0
- package/dist/GlobalStyling-CSQPF7o_.mjs +1162 -0
- package/dist/GlobalStyling-DabldMZh.js +15 -0
- package/dist/NewReservationDialog-BhIiY2B9.js +1 -0
- package/dist/NewReservationDialog-CN49aGcM.mjs +1002 -0
- package/dist/OrderDetailDialog-BJ01DZFe.js +1 -0
- package/dist/OrderDetailDialog-CoVQ_rzs.mjs +215 -0
- package/dist/Overview-9FMgn5hT.mjs +492 -0
- package/dist/Overview-BOOwMQ-c.mjs +636 -0
- package/dist/Overview-Biz3h60w.js +1 -0
- package/dist/Overview-C2K2ofdS.js +1 -0
- package/dist/Overview-CFHOXP9N.mjs +123 -0
- package/dist/Overview-CTJe7J5_.js +1 -0
- package/dist/Overview-Cvj2i9eW.js +1 -0
- package/dist/Overview-D2I1F8Dm.mjs +21 -0
- package/dist/Overview-DFOc9emt.mjs +345 -0
- package/dist/Overview-Dmhfb94Y.js +1 -0
- package/dist/Overview-PPzv7weG.mjs +450 -0
- package/dist/Overview-qFKcXHVF.js +1 -0
- package/dist/Overview-xkmYYTae.mjs +133 -0
- package/dist/Overview-yPsLvR2c.js +1 -0
- package/dist/PeakHoursCard-CtgEP-ez.mjs +157 -0
- package/dist/PeakHoursCard-DPeoMyhu.js +1 -0
- package/dist/ProductDetailsCard-B0WhmzO-.mjs +98 -0
- package/dist/ProductDetailsCard-C1ROuH6l.js +1 -0
- package/dist/RealtimeCard-DQno-Okz.js +1 -0
- package/dist/RealtimeCard-dR-g1iDo.mjs +92 -0
- package/dist/ReservationDetailDialog-Cdo6h0RD.mjs +2163 -0
- package/dist/ReservationDetailDialog-DZTFD2xI.js +349 -0
- package/dist/SearchTermsCard-BXJSXz_k.js +1 -0
- package/dist/SearchTermsCard-DsaxLKwP.mjs +146 -0
- package/dist/SendPush-Bssi-OZD.mjs +150 -0
- package/dist/SendPush-BuaYboRH.js +1 -0
- package/dist/SeoHealth-CP-kL0us.js +1 -0
- package/dist/SeoHealth-Cxp_Gb3Y.mjs +459 -0
- package/dist/TableView-7iwBkQ_k.mjs +4757 -0
- package/dist/TableView-BB_oIYYZ.js +4 -0
- package/dist/TemplateList-CNcM_Kgq.mjs +56 -0
- package/dist/TemplateList-VuPcBUJO.js +1 -0
- package/dist/TopPagesCard-CvDECn3_.mjs +117 -0
- package/dist/TopPagesCard-DNdATXJE.js +1 -0
- package/dist/TrafficSourcesCard-BLpBr7u0.mjs +151 -0
- package/dist/TrafficSourcesCard-_3gRUCw3.js +1 -0
- package/dist/View-DSnUHI7h.mjs +30 -0
- package/dist/View-Dbcfpdqh.js +1 -0
- package/dist/VisitorStatsCard-CFEnXSjF.mjs +185 -0
- package/dist/VisitorStatsCard-C_jhQxDW.js +1 -0
- package/dist/_plugin-vue_export-helper-5u7tqpWC.js +1 -0
- package/dist/_plugin-vue_export-helper-BJQSo0im.mjs +8 -0
- package/dist/agenda-CzMRcQTA.mjs +989 -0
- package/dist/agenda-D4zWRYSQ.js +1 -0
- package/dist/appointments-9syR5TZE.js +1 -0
- package/dist/appointments-BBmOJMhM.mjs +23 -0
- package/dist/array-BH1uH7XT.js +1 -0
- package/dist/array-DnDL9cFz.mjs +98 -0
- package/dist/availability-CAXB7Yd6.js +1 -0
- package/dist/availability-Dp7eF-ZK.mjs +215 -0
- package/dist/booking-data-Bysf6e5x.mjs +724 -0
- package/dist/booking-data-C6SGjC2X.js +1 -0
- package/dist/chunk-DQi1bQcV.js +1 -0
- package/dist/cms-core-modules.css +2 -1
- package/dist/contentManager-D7JxXCwE.js +1 -0
- package/dist/contentManager-tfy0x1LD.mjs +22 -0
- package/dist/context-AQKfnJ4t.mjs +3809 -0
- package/dist/context-ubyMq9Xe.js +54 -0
- package/dist/core-Dhgr4ctC.mjs +202 -0
- package/dist/core-_HKfBlaZ.js +1 -0
- package/dist/countries-MXLT3mVe.mjs +4 -0
- package/dist/countries-OCd5qPxG.js +1 -0
- package/dist/create-BfNc2C7N.js +1 -0
- package/dist/create-C7JlIlIh.mjs +95 -0
- package/dist/custom-BwN9-6Mb.js +1 -0
- package/dist/custom-INNwaWla.mjs +13 -0
- package/dist/dist-BCVg7FKM.js +1 -0
- package/dist/dist-DIhK9VWh.mjs +3045 -0
- package/dist/edit-BiI2VG60.js +35 -0
- package/dist/edit-DD3iFBEh.mjs +1097 -0
- package/dist/exceptions-DICMaDcH.mjs +462 -0
- package/dist/exceptions-DpWqMNuG.js +1 -0
- package/dist/google-Bcc4XZnV.mjs +4 -0
- package/dist/google-DTSRmJ51.js +1 -0
- package/dist/googleAnalytics-BSaqRR_L.js +1 -0
- package/dist/googleAnalytics-Cg-iWblZ.mjs +47 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +1095 -806
- package/dist/interpolation-B8OzkMyi.mjs +131 -0
- package/dist/interpolation-DpAqtGOW.js +1 -0
- package/dist/lib-4wSi00Vr.js +1 -0
- package/dist/lib-BZgXUui5.mjs +198 -0
- package/dist/line-DJdnFNI7.js +75 -0
- package/dist/line-tYLnEDGV.mjs +1500 -0
- package/dist/mailTemplates-BNk8fhVS.mjs +23 -0
- package/dist/mailTemplates-DswHzyQe.js +1 -0
- package/dist/orders-CIc0JlKX.mjs +512 -0
- package/dist/orders-DwPSi_pD.js +1 -0
- package/dist/payment-BsNWFaDm.js +1 -0
- package/dist/payment-Ced5_dpa.mjs +718 -0
- package/dist/productCollections-Cuvw_8zC.js +1 -0
- package/dist/productCollections-D0AxRlzr.mjs +23 -0
- package/dist/products-DUD-ZMkR.mjs +22 -0
- package/dist/products-DvX9B-Ul.js +1 -0
- package/dist/promoCodes-BCWqN6w4.mjs +23 -0
- package/dist/promoCodes-CEZ4LYot.js +1 -0
- package/dist/push-notifications-BGp4XWo9.js +1 -0
- package/dist/push-notifications-C7W7KuzR.mjs +23 -0
- package/dist/regular-BCFrS6lK.mjs +908 -0
- package/dist/regular-DBqPgT8C.js +1 -0
- package/dist/resources-DwsMmWgm.mjs +669 -0
- package/dist/resources-Dz81GkHe.js +1 -0
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +1049 -996
- package/dist/shippingOptions-C3NEJff1.mjs +23 -0
- package/dist/shippingOptions-Cy040ZW1.js +1 -0
- package/dist/single-container-BJmmqq65.mjs +468 -0
- package/dist/single-container-Xoo0Xzxv.js +58 -0
- package/dist/src/appointments/index.d.ts +9 -12
- package/dist/src/appointments/metadata.d.ts +1 -1
- package/dist/src/appointments/routes.d.ts +3 -6
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/LockBlocks.d.ts +15 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/TrailingNodeInContainers.d.ts +4 -1
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +12 -132
- package/dist/src/contentManager/index.d.ts +5 -14
- package/dist/src/contentManager/metadata.d.ts +1 -1
- package/dist/src/contentManager/routes.d.ts +3 -12
- package/dist/src/custom/index.d.ts +2 -2
- package/dist/src/custom/routes.d.ts +1 -1
- package/dist/src/googleAnalytics/index.d.ts +10 -10
- package/dist/src/googleAnalytics/routes.d.ts +1 -1
- package/dist/src/mailTemplates/index.d.ts +3 -3
- package/dist/src/mailTemplates/metadata.d.ts +1 -1
- package/dist/src/mailTemplates/routes.d.ts +1 -1
- package/dist/src/productCollections/index.d.ts +3 -3
- package/dist/src/productCollections/metadata.d.ts +1 -1
- package/dist/src/productCollections/routes.d.ts +1 -1
- package/dist/src/products/index.d.ts +4 -4
- package/dist/src/products/metadata.d.ts +1 -1
- package/dist/src/products/routes.d.ts +1 -1
- package/dist/src/promoCodes/index.d.ts +3 -3
- package/dist/src/promoCodes/metadata.d.ts +1 -1
- package/dist/src/promoCodes/routes.d.ts +1 -1
- package/dist/src/push-notifications/index.d.ts +3 -3
- package/dist/src/push-notifications/metadata.d.ts +1 -1
- package/dist/src/push-notifications/routes.d.ts +1 -1
- package/dist/src/shippingOptions/index.d.ts +3 -3
- package/dist/src/shippingOptions/metadata.d.ts +1 -1
- package/dist/src/shippingOptions/routes.d.ts +1 -1
- package/dist/src/table/flow-builder-extensions/row-item.d.ts +3 -17
- package/dist/src/table/index.d.ts +2 -2
- package/dist/src/table/routes.d.ts +1 -1
- package/dist/src/types/index.d.ts +6 -0
- package/dist/src/vue-shim.d.ts +7 -0
- package/dist/table-DWw0fs3S.js +1 -0
- package/dist/table-LXt5DQOL.mjs +23 -0
- package/dist/utils-CVIHqQsU.js +3 -0
- package/dist/utils-h3owcMtS.mjs +37 -0
- package/dist/vee-validate-zod-BmXMJo8W.js +1 -0
- package/dist/vee-validate-zod-D9dZzbWZ.mjs +4985 -0
- package/dist/xy-container-CuQSwrtB.mjs +3180 -0
- package/dist/xy-container-_6YpscZh.js +158 -0
- package/package.json +55 -55
- package/dist/Acquisition-B2pM5vSp.mjs +0 -400
- package/dist/Acquisition-Dt2rREU8.js +0 -1
- package/dist/AgendaOpeningHoursCard-B7ROIPWw.js +0 -1
- package/dist/AgendaOpeningHoursCard-Cp4wxUeK.mjs +0 -172
- package/dist/AppointmentDetailsCard-33WpATpV.mjs +0 -161
- package/dist/AppointmentDetailsCard-DpLM5IrB.js +0 -1
- package/dist/AppointmentEditor-BeOtYV6u.mjs +0 -196
- package/dist/AppointmentEditor-CaTfbkIf.js +0 -1
- package/dist/AppointmentListTable-DZJNmTMb.mjs +0 -177
- package/dist/AppointmentListTable-Dieu9US_.js +0 -1
- package/dist/Audience-Bs7b0TNm.js +0 -1
- package/dist/Audience-VLnUsQvW.mjs +0 -489
- package/dist/Components-C83O-xlF.mjs +0 -623
- package/dist/Components-DXbx0RLV.js +0 -1
- package/dist/Content-BHr_rPVY.js +0 -1
- package/dist/Content-CYOZKvWK.mjs +0 -358
- package/dist/ContentEditor-BNLEv-qJ.mjs +0 -30697
- package/dist/ContentEditor-BUvvqfG1.js +0 -462
- package/dist/CountryBreakdownCard-D7BK3nRD.js +0 -1
- package/dist/CountryBreakdownCard-DVxNz2DJ.mjs +0 -196
- package/dist/Create-89z41K73.js +0 -1
- package/dist/Create-Cn_Eufga.mjs +0 -1251
- package/dist/DateFormatter-Bw-87W31.mjs +0 -734
- package/dist/DateFormatter-CYAD4GBN.js +0 -1
- package/dist/Detail-Byk781b4.mjs +0 -26
- package/dist/Detail-C1Blq61w.mjs +0 -585
- package/dist/Detail-C857g62L.js +0 -1
- package/dist/Detail-C8wQiDcv.js +0 -1
- package/dist/Detail-CPqug27l.js +0 -1
- package/dist/Detail-CjuhjPby.js +0 -1
- package/dist/Detail-CtItxMX4.mjs +0 -649
- package/dist/Detail-CujdFApD.mjs +0 -379
- package/dist/Detail-Dnpnmy4-.mjs +0 -3477
- package/dist/Detail-mvSGbnFU.js +0 -1
- package/dist/DeviceBreakdownCard-DRhQ9ufG.js +0 -1
- package/dist/DeviceBreakdownCard-W1frLe0L.mjs +0 -159
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-DWMqQvHl.mjs +0 -76
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-kpjbVSXg.js +0 -1
- package/dist/Entries-BdhUyJR5.mjs +0 -728
- package/dist/Entries-CEXM_SkO.js +0 -1
- package/dist/Find-B24ZEhYM.mjs +0 -229
- package/dist/Find-D4Qa45qC.js +0 -1
- package/dist/GlobalStyling-C9VthHWK.mjs +0 -1588
- package/dist/GlobalStyling-CnSlXkZc.js +0 -25
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Ceoje52V.js +0 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DMGcRmm-.mjs +0 -1255
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-COrK1j0S.js +0 -1
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-Vb3q8EVv.mjs +0 -330
- package/dist/Overview-3HWhsqaz.mjs +0 -860
- package/dist/Overview-BCpJNiEB.mjs +0 -190
- package/dist/Overview-BDlBCUI_.js +0 -1
- package/dist/Overview-BbvfH1u-.js +0 -1
- package/dist/Overview-Bn1Xx3_j.js +0 -1
- package/dist/Overview-CIa1E-HH.mjs +0 -178
- package/dist/Overview-DAxCu9XC.js +0 -1
- package/dist/Overview-DC9io1bk.js +0 -1
- package/dist/Overview-Di84CsR5.mjs +0 -476
- package/dist/Overview-Su8ZUbMs.mjs +0 -26
- package/dist/Overview-T-lsy3UZ.js +0 -1
- package/dist/Overview-UoZHUMUz.js +0 -1
- package/dist/Overview-ejh4vUMT.mjs +0 -567
- package/dist/Overview-lWAyyenp.mjs +0 -632
- package/dist/PeakHoursCard-9-EZFZLR.mjs +0 -182
- package/dist/PeakHoursCard-BR5zmta4.js +0 -1
- package/dist/ProductDetailsCard-6nHikw4V.mjs +0 -121
- package/dist/ProductDetailsCard-Bn7qrgmc.js +0 -1
- package/dist/RealtimeCard--APfRNc8.js +0 -1
- package/dist/RealtimeCard-fvQlJcM7.mjs +0 -126
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CuwREvXD.js +0 -349
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-GYNZ_yhD.mjs +0 -3077
- package/dist/SearchTermsCard-BsB-63aH.js +0 -1
- package/dist/SearchTermsCard-BzVrHKqQ.mjs +0 -201
- package/dist/SendPush-COns44j7.js +0 -1
- package/dist/SendPush-CPIOjVX4.mjs +0 -184
- package/dist/SeoHealth-DsbVdd2l.mjs +0 -615
- package/dist/SeoHealth-az1YuNF2.js +0 -1
- package/dist/TableView-Bm6HaRHm.mjs +0 -6143
- package/dist/TableView-DQW0A1oG.js +0 -4
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +0 -1
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs +0 -40
- package/dist/TopPagesCard-BDeA997A.js +0 -1
- package/dist/TopPagesCard-CTozhOr_.mjs +0 -159
- package/dist/TrafficSourcesCard-BxtCKsqx.mjs +0 -197
- package/dist/TrafficSourcesCard-C3ziDTUL.js +0 -1
- package/dist/View-CsudjxCE.mjs +0 -30
- package/dist/View-Dw_wA6kK.js +0 -1
- package/dist/VisitorStatsCard-BmByE_Hi.js +0 -1
- package/dist/VisitorStatsCard-CXizEbVK.mjs +0 -174
- package/dist/_plugin-vue_export-helper-BHFhmbuH.js +0 -1
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +0 -9
- package/dist/agenda-IOqtALWf.js +0 -1
- package/dist/agenda-neyeLWv-.mjs +0 -1165
- package/dist/array-CbATeQbk.js +0 -1
- package/dist/array-CvmZXzxF.mjs +0 -108
- package/dist/availability-CMrRa5y2.mjs +0 -269
- package/dist/availability-Cf2YfMwM.js +0 -1
- package/dist/booking-data-DgJd0BcM.mjs +0 -889
- package/dist/booking-data-Di5GmH_8.js +0 -1
- package/dist/countries-BTPvmrsb.mjs +0 -4
- package/dist/countries-CgZ081No.js +0 -1
- package/dist/exceptions-CI0B4xVj.js +0 -1
- package/dist/exceptions-vo8SA5SE.mjs +0 -646
- package/dist/google-CvtuJwgk.mjs +0 -4
- package/dist/google-D4N3gb01.js +0 -1
- package/dist/index-4tjmIans.js +0 -1
- package/dist/index-9HVlmvK3.js +0 -1
- package/dist/index-A2kp8Isi.js +0 -75
- package/dist/index-B5aBwdxY.js +0 -54
- package/dist/index-BRdCrvcz.mjs +0 -1443
- package/dist/index-BWDwEd8D.mjs +0 -24
- package/dist/index-BfBBm9uY.mjs +0 -24
- package/dist/index-BiT55eU0.js +0 -58
- package/dist/index-Bkq58CeQ.mjs +0 -22
- package/dist/index-Bvxc5xv_.mjs +0 -3843
- package/dist/index-CJQQBRLY.js +0 -1
- package/dist/index-CQkOH2_3.mjs +0 -24
- package/dist/index-CSxYBeVA.js +0 -1
- package/dist/index-CU-tbS5W.mjs +0 -24
- package/dist/index-CZn2nDLv.mjs +0 -34
- package/dist/index-CkiNvRzs.js +0 -1
- package/dist/index-Co4ON2Di.js +0 -1
- package/dist/index-Cpnn_Pxd.mjs +0 -24
- package/dist/index-CrgzoTyR.mjs +0 -110
- package/dist/index-CsVeM3PA.mjs +0 -24
- package/dist/index-CwqrAU-H.js +0 -1
- package/dist/index-CxETuRsG.js +0 -1
- package/dist/index-Cz-baGax.js +0 -1
- package/dist/index-DFQGVHTs.js +0 -1
- package/dist/index-DPd3waTN.js +0 -1
- package/dist/index-DRqJOqUR.mjs +0 -3484
- package/dist/index-DjWuIBxh.js +0 -1
- package/dist/index-Dnn2SCSl.js +0 -1
- package/dist/index-Dpl9sU6a.mjs +0 -12
- package/dist/index-DrXxXB2F.mjs +0 -138
- package/dist/index-G7cIlnGN.js +0 -158
- package/dist/index-MYWjg0zi.mjs +0 -176
- package/dist/index-R2oUDsjx.js +0 -1
- package/dist/index-RLz1QPrf.mjs +0 -203
- package/dist/index-UtjLbLw-.js +0 -1
- package/dist/index-X6LV64jK.mjs +0 -442
- package/dist/index-cOnxXTbF.mjs +0 -24
- package/dist/index-hlylYYgy.mjs +0 -24
- package/dist/index-ijdf0d9-.js +0 -1
- package/dist/index-uOkqO74I.mjs +0 -2940
- package/dist/index-unsDfNYv.mjs +0 -1187
- package/dist/index-vHmvbEwa.js +0 -35
- package/dist/interpolation-CHn59tIC.js +0 -1
- package/dist/interpolation-w7IRDJwK.mjs +0 -180
- package/dist/orders-C65SlpJy.mjs +0 -618
- package/dist/orders-XVzWAgG1.js +0 -1
- package/dist/payment-C3ohkehF.mjs +0 -1080
- package/dist/payment-Dfr-Ro-a.js +0 -1
- package/dist/regular-1LXNPviB.js +0 -1
- package/dist/regular-_05oq5Tx.mjs +0 -1101
- package/dist/resources-CxeFd57z.js +0 -1
- package/dist/resources-WI_4SO6T.mjs +0 -811
- package/dist/src/appointments/chat-components/AgendaOpeningHoursCard.vue.d.ts +0 -15
- package/dist/src/appointments/chat-components/AppointmentDetailsCard.vue.d.ts +0 -14
- package/dist/src/appointments/chat-components/AppointmentEditor.vue.d.ts +0 -14
- package/dist/src/appointments/chat-components/AppointmentListTable.vue.d.ts +0 -14
- package/dist/src/appointments/components/create/StepNavigation.vue.d.ts +0 -32
- package/dist/src/appointments/components/create/regular/Step1.vue.d.ts +0 -2
- package/dist/src/appointments/components/create/regular/Step2.vue.d.ts +0 -2
- package/dist/src/appointments/components/create/regular/Step3.vue.d.ts +0 -2
- package/dist/src/appointments/components/create/regular/Step4.vue.d.ts +0 -2
- package/dist/src/appointments/components/edit/CustomerInformationFieldEditorDialog.vue.d.ts +0 -24
- package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +0 -17
- package/dist/src/appointments/components/edit/Event24hSidebar.vue.d.ts +0 -2
- package/dist/src/appointments/components/edit/EventDialog/ApproveReservationDialog.vue.d.ts +0 -8
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +0 -136
- package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +0 -8
- package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +0 -11
- package/dist/src/appointments/components/edit/EventDialog/OrderDetailDialog.vue.d.ts +0 -55
- package/dist/src/appointments/components/edit/EventDialog/RejectReservationDialog.vue.d.ts +0 -8
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +0 -87
- package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +0 -24
- package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +0 -4
- package/dist/src/appointments/components/edit/EventTimeIndicator.vue.d.ts +0 -12
- package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +0 -48
- package/dist/src/appointments/components/edit/EventView.vue.d.ts +0 -9
- package/dist/src/appointments/components/edit/ExceptionDialog.vue.d.ts +0 -29
- package/dist/src/appointments/components/edit/MetadataSchemaEditorDialog.vue.d.ts +0 -12
- package/dist/src/appointments/components/edit/NewReservationDialog/CustomerInformation.vue.d.ts +0 -10
- package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +0 -26
- package/dist/src/appointments/components/edit/NewReservationDialog/QuickReservationAdder.vue.d.ts +0 -26
- package/dist/src/appointments/components/edit/NewReservationDialog/ReservationLines.vue.d.ts +0 -31
- package/dist/src/appointments/components/edit/OrderMetadataDisplay.vue.d.ts +0 -21
- package/dist/src/appointments/components/edit/PaymentAddons/Addon.vue.d.ts +0 -22
- package/dist/src/appointments/components/edit/PaymentAddons/AddonList.vue.d.ts +0 -5
- package/dist/src/appointments/components/edit/PaymentAddons/index.vue.d.ts +0 -15
- package/dist/src/appointments/components/edit/ResourceEditorDialog.vue.d.ts +0 -13
- package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +0 -36
- package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +0 -50
- package/dist/src/appointments/index.vue.d.ts +0 -22
- package/dist/src/appointments/pages/Overview.vue.d.ts +0 -4
- package/dist/src/appointments/pages/create/index.vue.d.ts +0 -2
- package/dist/src/appointments/pages/create/regular.vue.d.ts +0 -6
- package/dist/src/appointments/pages/edit/agenda.vue.d.ts +0 -4
- package/dist/src/appointments/pages/edit/availability.vue.d.ts +0 -2
- package/dist/src/appointments/pages/edit/booking-data.vue.d.ts +0 -65
- package/dist/src/appointments/pages/edit/index.vue.d.ts +0 -2
- package/dist/src/appointments/pages/edit/payment.vue.d.ts +0 -2
- package/dist/src/appointments/pages/edit/resources.vue.d.ts +0 -28
- package/dist/src/contentManager/components/components/ComponentDialog.vue.d.ts +0 -12
- package/dist/src/contentManager/components/components/ComponentGridItem.vue.d.ts +0 -16
- package/dist/src/contentManager/components/content-editor/ApiDocs.vue.d.ts +0 -2
- package/dist/src/contentManager/components/content-editor/ContentLayout.vue.d.ts +0 -49
- package/dist/src/contentManager/components/content-editor/ContentSettings.vue.d.ts +0 -24
- package/dist/src/contentManager/components/content-editor/ContentStructuredContentSections.vue.d.ts +0 -4
- package/dist/src/contentManager/components/content-editor/Header.vue.d.ts +0 -64
- package/dist/src/contentManager/components/content-editor/LivePreviewWrapper.vue.d.ts +0 -53
- package/dist/src/contentManager/components/content-editor/Locales.vue.d.ts +0 -44
- package/dist/src/contentManager/components/content-editor/NewSectionDialog.vue.d.ts +0 -21
- package/dist/src/contentManager/components/content-editor/PageSettings.vue.d.ts +0 -2
- package/dist/src/contentManager/components/content-editor/SEO.vue.d.ts +0 -14
- package/dist/src/contentManager/components/content-editor/SidebarSectionWrapper.vue.d.ts +0 -39
- package/dist/src/contentManager/components/content-editor/Status.vue.d.ts +0 -2
- package/dist/src/contentManager/components/content-editor/Versions.vue.d.ts +0 -63
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Button.vue.d.ts +0 -94
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Card.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Column.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Container.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Divider.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/EmptySpace.vue.d.ts +0 -94
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Heading.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Image.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Map.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Paragraph.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Row.vue.d.ts +0 -115
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Stack.vue.d.ts +0 -115
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Video.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/extension-details/DetailsNodeView.vue.d.ts +0 -92
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/NodeLabel.vue.d.ts +0 -108
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/ResizeHandlers.vue.d.ts +0 -20
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/TopMarginDragger.vue.d.ts +0 -104
- package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuClassBuilder.vue.d.ts +0 -19
- package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuLinkBuilder.vue.d.ts +0 -19
- package/dist/src/contentManager/components/content-editor/tiptap-menus/BubbleMenuToggleButton.vue.d.ts +0 -29
- package/dist/src/contentManager/components/content-editor/tiptap-menus/DefaultBubbleMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/ElementEditorMenu.vue.d.ts +0 -19
- package/dist/src/contentManager/components/content-editor/tiptap-menus/EmojiMenu.vue.d.ts +0 -8
- package/dist/src/contentManager/components/content-editor/tiptap-menus/NewNodeView.vue.d.ts +0 -47
- package/dist/src/contentManager/components/content-editor/tiptap-menus/SlashMenu.vue.d.ts +0 -6
- package/dist/src/contentManager/components/content-editor/tiptap-menus/SlashMenuButton.vue.d.ts +0 -17
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ButtonMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/CardMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ColumnMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/DividerMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/EmptySpaceMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/HeadingMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/ImageMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/MapMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/RowMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/StackMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/TextMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/VideoMenu.vue.d.ts +0 -13
- package/dist/src/contentManager/components/overview/CollectionDialog.vue.d.ts +0 -30
- package/dist/src/contentManager/components/overview/CollectionsGridView.vue.d.ts +0 -18
- package/dist/src/contentManager/components/overview/ContentEntryContextMenu.vue.d.ts +0 -27
- package/dist/src/contentManager/components/overview/FilterPopover.vue.d.ts +0 -2
- package/dist/src/contentManager/components/overview/ListView.vue.d.ts +0 -12
- package/dist/src/contentManager/components/styling/ButtonStyleDialog.vue.d.ts +0 -24
- package/dist/src/contentManager/components/styling/CardStyleDialog.vue.d.ts +0 -24
- package/dist/src/contentManager/components/styling/SectionStyleDialog.vue.d.ts +0 -24
- package/dist/src/contentManager/index.vue.d.ts +0 -22
- package/dist/src/contentManager/pages/Components.vue.d.ts +0 -27
- package/dist/src/contentManager/pages/ContentEditor.vue.d.ts +0 -14
- package/dist/src/contentManager/pages/Entries.vue.d.ts +0 -16
- package/dist/src/contentManager/pages/GlobalStyling.vue.d.ts +0 -117
- package/dist/src/contentManager/pages/Overview.vue.d.ts +0 -57
- package/dist/src/custom/index.vue.d.ts +0 -2
- package/dist/src/custom/pages/View.vue.d.ts +0 -2
- package/dist/src/googleAnalytics/chat-components/CountryBreakdownCard.vue.d.ts +0 -14
- package/dist/src/googleAnalytics/chat-components/DeviceBreakdownCard.vue.d.ts +0 -14
- package/dist/src/googleAnalytics/chat-components/PeakHoursCard.vue.d.ts +0 -14
- package/dist/src/googleAnalytics/chat-components/RealtimeCard.vue.d.ts +0 -14
- package/dist/src/googleAnalytics/chat-components/SearchTermsCard.vue.d.ts +0 -14
- package/dist/src/googleAnalytics/chat-components/TopPagesCard.vue.d.ts +0 -14
- package/dist/src/googleAnalytics/chat-components/TrafficSourcesCard.vue.d.ts +0 -14
- package/dist/src/googleAnalytics/chat-components/VisitorStatsCard.vue.d.ts +0 -14
- package/dist/src/googleAnalytics/components/seo-health/SeoClicksChart.vue.d.ts +0 -5
- package/dist/src/googleAnalytics/components/seo-health/SeoImpressionsChart.vue.d.ts +0 -5
- package/dist/src/googleAnalytics/components/seo-health/SeoKeywordsTab.vue.d.ts +0 -5
- package/dist/src/googleAnalytics/components/seo-health/SeoKpiCards.vue.d.ts +0 -10
- package/dist/src/googleAnalytics/components/seo-health/SeoMappingTab.vue.d.ts +0 -5
- package/dist/src/googleAnalytics/components/seo-health/SeoPagesTab.vue.d.ts +0 -5
- package/dist/src/googleAnalytics/components/seo-health/SeoRankingDistribution.vue.d.ts +0 -5
- package/dist/src/googleAnalytics/index.vue.d.ts +0 -2
- package/dist/src/googleAnalytics/pages/Acquisition.vue.d.ts +0 -2
- package/dist/src/googleAnalytics/pages/Audience.vue.d.ts +0 -2
- package/dist/src/googleAnalytics/pages/Content.vue.d.ts +0 -2
- package/dist/src/googleAnalytics/pages/Overview.vue.d.ts +0 -2
- package/dist/src/googleAnalytics/pages/SeoHealth.vue.d.ts +0 -2
- package/dist/src/mailTemplates/components/TemplateList.vue.d.ts +0 -2
- package/dist/src/mailTemplates/index.vue.d.ts +0 -22
- package/dist/src/mailTemplates/pages/Detail.vue.d.ts +0 -14
- package/dist/src/mailTemplates/pages/Overview.vue.d.ts +0 -14
- package/dist/src/productCollections/components/detail/Main.vue.d.ts +0 -2
- package/dist/src/productCollections/components/detail/SEO.vue.d.ts +0 -2
- package/dist/src/productCollections/components/detail/Status.vue.d.ts +0 -2
- package/dist/src/productCollections/components/overview/ListView.vue.d.ts +0 -12
- package/dist/src/productCollections/index.vue.d.ts +0 -22
- package/dist/src/productCollections/pages/Detail.vue.d.ts +0 -14
- package/dist/src/productCollections/pages/Overview.vue.d.ts +0 -16
- package/dist/src/products/chat-components/ProductDetailsCard.vue.d.ts +0 -14
- package/dist/src/products/components/detail/Collections.vue.d.ts +0 -14
- package/dist/src/products/components/detail/Inventory.vue.d.ts +0 -2
- package/dist/src/products/components/detail/Main.vue.d.ts +0 -2
- package/dist/src/products/components/detail/NewSection.vue.d.ts +0 -2
- package/dist/src/products/components/detail/Price.vue.d.ts +0 -2
- package/dist/src/products/components/detail/SEO.vue.d.ts +0 -2
- package/dist/src/products/components/detail/Shipping.vue.d.ts +0 -2
- package/dist/src/products/components/detail/Status.vue.d.ts +0 -2
- package/dist/src/products/components/detail/price/UnitPriceDialog.vue.d.ts +0 -17
- package/dist/src/products/components/detail/variants/Option.vue.d.ts +0 -33
- package/dist/src/products/components/detail/variants/VariantList.vue.d.ts +0 -38
- package/dist/src/products/components/overview/FilterPopover.vue.d.ts +0 -2
- package/dist/src/products/components/overview/GridView.vue.d.ts +0 -12
- package/dist/src/products/components/overview/ListView.vue.d.ts +0 -12
- package/dist/src/products/components/overview/ProductContextMenu.vue.d.ts +0 -27
- package/dist/src/products/index.vue.d.ts +0 -22
- package/dist/src/products/pages/Detail.vue.d.ts +0 -14
- package/dist/src/products/pages/Overview.vue.d.ts +0 -16
- package/dist/src/promoCodes/components/create/DateRange.vue.d.ts +0 -2
- package/dist/src/promoCodes/components/create/MultiCodes.vue.d.ts +0 -2
- package/dist/src/promoCodes/components/create/Note.vue.d.ts +0 -2
- package/dist/src/promoCodes/components/create/SingleCode.vue.d.ts +0 -2
- package/dist/src/promoCodes/components/create/TypeAndValue/TypeDetailDialog.vue.d.ts +0 -6
- package/dist/src/promoCodes/components/create/TypeAndValue/TypeManageDialog.vue.d.ts +0 -18
- package/dist/src/promoCodes/components/create/TypeAndValue/index.vue.d.ts +0 -2
- package/dist/src/promoCodes/index.vue.d.ts +0 -22
- package/dist/src/promoCodes/pages/Create.vue.d.ts +0 -16
- package/dist/src/promoCodes/pages/Detail.vue.d.ts +0 -14
- package/dist/src/promoCodes/pages/Find.vue.d.ts +0 -16
- package/dist/src/push-notifications/components/PreviewAndroid.vue.d.ts +0 -28
- package/dist/src/push-notifications/components/PreviewIPhone.vue.d.ts +0 -28
- package/dist/src/push-notifications/components/PushPreview.vue.d.ts +0 -28
- package/dist/src/push-notifications/index.vue.d.ts +0 -22
- package/dist/src/push-notifications/pages/SendPush.vue.d.ts +0 -14
- package/dist/src/shared/BrandLogo.vue.d.ts +0 -12
- package/dist/src/shared/DrawerToggle.vue.d.ts +0 -60
- package/dist/src/shared/VerticalToggle.vue.d.ts +0 -60
- package/dist/src/shippingOptions/components/detail/Condition.vue.d.ts +0 -2
- package/dist/src/shippingOptions/components/detail/Countries.vue.d.ts +0 -2
- package/dist/src/shippingOptions/components/detail/Example.vue.d.ts +0 -2
- package/dist/src/shippingOptions/components/detail/Main.vue.d.ts +0 -2
- package/dist/src/shippingOptions/components/overview/ListView.vue.d.ts +0 -12
- package/dist/src/shippingOptions/index.vue.d.ts +0 -22
- package/dist/src/shippingOptions/pages/Detail.vue.d.ts +0 -14
- package/dist/src/shippingOptions/pages/Overview.vue.d.ts +0 -16
- package/dist/src/table/components/DataTable.vue.d.ts +0 -18
- package/dist/src/table/components/DataTableAction.vue.d.ts +0 -14
- package/dist/src/table/components/DataTableMobileRowActionDrawer.vue.d.ts +0 -4
- package/dist/src/table/components/DataTablePagination.vue.d.ts +0 -6
- package/dist/src/table/components/actions/ActionDialog.vue.d.ts +0 -19
- package/dist/src/table/components/actions/CtaActionDialog.vue.d.ts +0 -4
- package/dist/src/table/components/columns/ColumnDropdown.vue.d.ts +0 -2
- package/dist/src/table/components/columns/ColumnEditorDialog.vue.d.ts +0 -34
- package/dist/src/table/components/columns/DialogTableColumnItem.vue.d.ts +0 -12
- package/dist/src/table/components/date-range-filter/DateRangeFilter.vue.d.ts +0 -2
- package/dist/src/table/components/date-range-filter/DateRangeSettingsDialog.vue.d.ts +0 -27
- package/dist/src/table/components/filters/FilterDialog.vue.d.ts +0 -12
- package/dist/src/table/components/filters/Filters.vue.d.ts +0 -27
- package/dist/src/table/components/search/Search.vue.d.ts +0 -2
- package/dist/src/table/components/sort/SortMode.vue.d.ts +0 -2
- package/dist/src/table/components/sort/SortModeSettingsDialog.vue.d.ts +0 -18
- package/dist/src/table/components/stats/StatDialog.vue.d.ts +0 -12
- package/dist/src/table/components/stats/Stats.vue.d.ts +0 -27
- package/dist/src/table/flow-builder-extensions/TableRowEditor.vue.d.ts +0 -16
- package/dist/src/table/index.vue.d.ts +0 -22
- package/dist/src/table/pages/TableView.vue.d.ts +0 -54
- package/dist/utils-CanmrIWO.mjs +0 -47
- package/dist/utils-Yd6F5mea.js +0 -3
- package/dist/vee-validate-zod-ByykgYKJ.js +0 -1
- package/dist/vee-validate-zod-CcOwoF6y.mjs +0 -4402
|
@@ -0,0 +1,151 @@
|
|
|
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 };
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
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;
|