@solvimon/solvimon-web 0.1.0-alpha.2 → 0.1.0-alpha.20
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/README.md +244 -49
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Ce30EXY5.mjs +240 -0
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-kmam2c7P.js +1 -0
- package/dist/Amount.vue.es-BO5sS1UX.mjs +25 -0
- package/dist/Amount.vue.es-JDVa_3H-.js +1 -0
- package/dist/Avatar.vue.es-BGTZSAqU.js +1 -0
- package/dist/Avatar.vue.es-DJzJiYtv.mjs +91 -0
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DQAp1xwu.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Bq2mTdUs.mjs} +23 -13
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BtNTRSqH.js +1 -0
- package/dist/Button.vue.es-Cm9pLU9i.mjs +421 -0
- package/dist/Button.vue.es-O8mNivLL.js +1 -0
- package/dist/Chip.vue.es-BBmn-qJp.mjs +120 -0
- package/dist/Chip.vue.es-DmCjC1hi.js +1 -0
- package/dist/Comparators.vue.es-CYfxd5H-.mjs +120 -0
- package/dist/Comparators.vue.es-DK8wGjxM.js +1 -0
- package/dist/ContentWithAsideLayout-DHpnJfGA.js +1 -0
- package/dist/ContentWithAsideLayout-Dy9xgxuF.mjs +39 -0
- package/dist/ContextMenu.vue.es-CTc1ktXb.mjs +681 -0
- package/dist/ContextMenu.vue.es-DaW0yp4Y.js +1 -0
- package/dist/CustomerBillingInformation.vue.es-BX0Da7Kr.js +1 -0
- package/dist/CustomerBillingInformation.vue.es-CMZO8oLj.mjs +175 -0
- package/dist/CustomerPaymentMethods.lib-BKgQTCtc.js +1 -0
- package/dist/CustomerPaymentMethods.lib-CcSt0sl1.mjs +4 -0
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bi_dCntQ.js +1 -0
- package/dist/{useCustomerPaymentMethodOptions-BzEquyUV.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CtdFharm.mjs} +43 -62
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BDqBXbJq.mjs +3264 -0
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-ZyN2vlNu.js +1 -0
- package/dist/Divider.vue.es-ClFG8QtG.js +1 -0
- package/dist/Divider.vue.es-wKkIVBgb.mjs +24 -0
- package/dist/DividerText.vue.es-CeAHAe_Y.mjs +72 -0
- package/dist/DividerText.vue.es-DjT4i_YD.js +1 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DLE5-9wz.mjs +562 -0
- package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DkIK-lID.js +1 -0
- package/dist/ErrorNotification.vue.es-CHyVTBGs.mjs +38 -0
- package/dist/ErrorNotification.vue.es-CaEFTi2k.js +1 -0
- package/dist/Expand.vue.es-C-lnbA1v.js +1 -0
- package/dist/Expand.vue.es-C4_XmqbR.mjs +50 -0
- package/dist/FormMessage.vue.es-Bd4_NG9H.js +1 -0
- package/dist/FormMessage.vue.es-C3oxwq_8.mjs +46 -0
- package/dist/IconButton.vue.es-BHdQskx0.js +1 -0
- package/dist/IconButton.vue.es-KywqWWvr.mjs +228 -0
- package/dist/IconTitle.vue.es-BmjBdZb_.mjs +107 -0
- package/dist/IconTitle.vue.es-D9Wc3PIq.js +1 -0
- package/dist/Input.vue.es-DqKJhFTr.js +1 -0
- package/dist/Input.vue.es-WZGF8dfr.mjs +251 -0
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D0ie9Krt.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B6efz7NU.mjs} +21 -9
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-LE6zBLKM.js +1 -0
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-C2aLMfu6.mjs +49 -0
- package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-CtpFzWU3.js +1 -0
- package/dist/InvoiceSummary.vue.es-BI5sD_8F.mjs +2944 -0
- package/dist/InvoiceSummary.vue.es-BWYIHezU.js +1 -0
- package/dist/Modal.vue.es-B_1aqm_m.js +1 -0
- package/dist/Modal.vue.es-qdUHDOnU.mjs +483 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BKKXQbge.js +1 -0
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-Ch1TFO7x.mjs +154 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CsH47WSM.mjs +54 -0
- package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-mKNNYnMU.js +1 -0
- package/dist/PaymentHistoryBlock-CgNUV8Gy.mjs +4 -0
- package/dist/PaymentHistoryBlock-Ci8aSJeb.js +1 -0
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DZwnDzha.js +1 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DVDOsMnT.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Uj1aK-dp.mjs} +34 -23
- package/dist/PaymentIntegrationForm-CLokpXvK.mjs +4 -0
- package/dist/PaymentIntegrationForm-CsuueDE0.js +1 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CRUs7sP4.mjs +167 -0
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-kKkzRi6w.js +1 -0
- package/dist/PaymentIntegrationFormAdyen-C885o8IE.mjs +699 -0
- package/dist/PaymentIntegrationFormAdyen-Co19AgvG.js +1 -0
- package/dist/PaymentIntegrationFormStripe-BjMdJmDC.mjs +547 -0
- package/dist/PaymentIntegrationFormStripe-DWff6wzK.js +1 -0
- package/dist/PaymentMethod.vue.es-CdskNJ3Z.js +1 -0
- package/dist/PaymentMethod.vue.es-rv-pu1CC.mjs +677 -0
- package/dist/PaymentMethodForm-IEuDxEPN.mjs +4 -0
- package/dist/PaymentMethodForm-hZuVHAti.js +1 -0
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-Cj60U90J.js +1 -0
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-gA74Rak9.mjs +172 -0
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-B3H_AWMM.js +1 -0
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-CTn-OxM6.mjs +189 -0
- package/dist/PricingGroupRangeInput.vue.es-ButaePib.mjs +632 -0
- package/dist/PricingGroupRangeInput.vue.es-Cls2lm80.js +1 -0
- package/dist/Section.vue.es-CAJvEDn6.js +1 -0
- package/dist/Section.vue.es-DX_9ueCG.mjs +79 -0
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CQAkPfJz.js +1 -0
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DVtMzgjc.mjs +1044 -0
- package/dist/{Skeleton.vue_vue_type_script_setup_true_lang-C-taYlG4.mjs → Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs} +23 -8
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +1 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BJVXCHny.js +1 -0
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-ByO-L6nm.mjs +6171 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-C5zB3CgZ.mjs +101 -0
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-CabskT-r.js +1 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D-T1wGg7.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Bp5RvQVS.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DKd2DIVb.mjs} +61 -125
- package/dist/TooltipParagraph.vue.es-C5RTcrid.mjs +136 -0
- package/dist/TooltipParagraph.vue.es-H9fI7zzt.js +1 -0
- package/dist/TrialChip.vue.es-B1puKyR-.mjs +56 -0
- package/dist/TrialChip.vue.es-CCs50m02.js +1 -0
- package/dist/accel.svg.es-CE5tIWtm.mjs +4 -0
- package/dist/accel.svg.es-Dt_1wJmV.js +1 -0
- package/dist/ach.svg.es-B4tn0_IV.js +1 -0
- package/dist/ach.svg.es-D4QPcIU-.mjs +4 -0
- package/dist/adyen-51SvcyqV.mjs +4 -0
- package/dist/adyen-BXi_D9TQ.mjs +123 -0
- package/dist/adyen-DZsyEXkw.js +1 -0
- package/dist/adyen-VS2sDW0m.js +1 -0
- package/dist/amazon-pay.svg.es-B428S4f3.js +1 -0
- package/dist/amazon-pay.svg.es-DUScOW15.mjs +4 -0
- package/dist/amex.svg.es-BCXkaVLN.mjs +4 -0
- package/dist/amex.svg.es-Bn9e31C3.js +1 -0
- package/dist/api.es-C5pe8LUl.mjs +62 -0
- package/dist/api.es-Czekkp_X.js +1 -0
- package/dist/apple-pay.svg.es-Cfgn0K28.js +1 -0
- package/dist/apple-pay.svg.es-DlCfkt39.mjs +4 -0
- package/dist/bacs.svg.es-BKsvSeIP.mjs +4 -0
- package/dist/bacs.svg.es-hL7hLPkQ.js +1 -0
- package/dist/bancontact.svg.es-BbRqGgZ9.mjs +4 -0
- package/dist/bancontact.svg.es-DU2ejvNL.js +1 -0
- package/dist/carnet.svg.es-C5SFaOsa.js +1 -0
- package/dist/carnet.svg.es-Db-KEb13.mjs +4 -0
- package/dist/cartes-bancaires.svg.es-ByD-JAAi.mjs +4 -0
- package/dist/cartes-bancaires.svg.es-CbBJQZrk.js +1 -0
- package/dist/cashapp.svg.es-CnS5r_D8.mjs +4 -0
- package/dist/cashapp.svg.es-DE4vMu_p.js +1 -0
- package/dist/cn.es-BEU5D0Wz.mjs +3298 -0
- package/dist/cn.es-DxSeYcoP.js +1 -0
- package/dist/comparators.es-9VsCB-JI.mjs +175 -0
- package/dist/comparators.es-wrKHduVq.js +1 -0
- package/dist/component-BG6DmXcy.mjs +9 -0
- package/dist/component-hDuDTBt5.js +1 -0
- package/dist/components/BillingInformation/BillingInformation.ce.d.ts +1 -3
- package/dist/components/BillingInformation/BillingInformation.cjs +1 -0
- package/dist/components/BillingInformation/{BillingInformation.es.js → BillingInformation.mjs} +26 -34
- package/dist/components/BillingInformationForm/BillingInformationForm.ce.d.ts +1 -3
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -0
- package/dist/components/BillingInformationForm/{BillingInformationForm.es.js → BillingInformationForm.mjs} +68 -154
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.ce.d.ts +1 -3
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -0
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +95 -0
- package/dist/components/Invoice/Invoice.ce.d.ts +1 -3
- package/dist/components/Invoice/Invoice.cjs +1 -0
- package/dist/components/Invoice/{Invoice.es.js → Invoice.mjs} +133 -180
- package/dist/components/InvoiceDetails/InvoiceDetails.ce.d.ts +1 -3
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -0
- package/dist/components/InvoiceDetails/{InvoiceDetails.es.js → InvoiceDetails.mjs} +17 -29
- package/dist/components/InvoiceHeader/InvoiceHeader.ce.d.ts +1 -0
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -0
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +73 -0
- package/dist/components/InvoicesList/InvoicesList.ce.d.ts +1 -3
- package/dist/components/InvoicesList/InvoicesList.cjs +1 -0
- package/dist/components/InvoicesList/{InvoicesList.es.js → InvoicesList.mjs} +21 -29
- package/dist/components/PaymentHistory/PaymentHistory.ce.d.ts +1 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -0
- package/dist/components/PaymentHistory/{PaymentHistory.es.js → PaymentHistory.mjs} +17 -29
- package/dist/components/PaymentMethodForm/PaymentMethodForm.ce.d.ts +1 -3
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -0
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +108 -0
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.ce.d.ts +1 -3
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -0
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +93 -0
- package/dist/components/SubscriptionsList/SubscriptionsList.ce.d.ts +1 -3
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -0
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +103 -0
- package/dist/components/WalletBalances/WalletBalances.ce.d.ts +1 -3
- package/dist/components/WalletBalances/WalletBalances.cjs +1 -0
- package/dist/components/WalletBalances/{WalletBalances.es.js → WalletBalances.mjs} +38 -34
- package/dist/configuration-BjYwV4_B.js +1 -0
- package/dist/configuration-CD8cOXAJ.mjs +15 -0
- package/dist/core/action-request.types.d.ts +1 -58
- package/dist/core/configuration.d.ts +1 -3
- package/dist/core/index.cjs +1 -0
- package/dist/core/index.d.ts +1 -10
- package/dist/core/index.mjs +197 -0
- package/dist/core/registry.ce.d.ts +1 -2
- package/dist/core/registry.d.ts +1 -6
- package/dist/core/types.d.ts +1 -111
- package/dist/countryData.es--zJAd6LA.mjs +252 -0
- package/dist/countryData.es-D3MFzU92.js +1 -0
- package/dist/customElements-B-89a5oH.mjs +6810 -0
- package/dist/customElements-DD7bpqkx.js +1 -0
- package/dist/customer-DozNwS_a.js +1 -0
- package/dist/customer-Dzj1g9lV.mjs +32 -0
- package/dist/customer.es-C_vSWcVA.mjs +30 -0
- package/dist/customer.es-D42Md24r.js +1 -0
- package/dist/dana.svg.es-Bbn6_ktN.mjs +4 -0
- package/dist/dana.svg.es-DKZaseoJ.js +1 -0
- package/dist/dankort.svg.es-D8FgSiFf.js +1 -0
- package/dist/dankort.svg.es-DtAdliQq.mjs +4 -0
- package/dist/de-DE-BeyQVhTv.mjs +299 -0
- package/dist/de-DE-BvHD68Ay.js +1 -0
- package/dist/de-DE-CI2zQkiP.mjs +266 -0
- package/dist/de-DE-_40QfLNJ.js +1 -0
- package/dist/diners.svg.es-DhchsD1D.mjs +4 -0
- package/dist/diners.svg.es-SydF_H-Z.js +1 -0
- package/dist/discover.svg.es-B8vgzVNG.js +1 -0
- package/dist/discover.svg.es-BnqYPvnV.mjs +4 -0
- package/dist/eftpos.svg.es-DO0YPaY1.js +1 -0
- package/dist/eftpos.svg.es-DRLaafYa.mjs +4 -0
- package/dist/elo.svg.es-CTOm1rvj.js +1 -0
- package/dist/elo.svg.es-CgkEOP_O.mjs +4 -0
- package/dist/en-US--NRsi7Hz.js +1 -0
- package/dist/en-US-5YWNEi-V.mjs +299 -0
- package/dist/en-US-DksUWPIu.mjs +266 -0
- package/dist/en-US-dqfKx3GS.js +1 -0
- package/dist/eps.svg.es-CApyGjyU.js +1 -0
- package/dist/eps.svg.es-D6IHsRYP.mjs +4 -0
- package/dist/error-Cg-i7gGl.js +1 -0
- package/dist/error-DY_I2hPx.mjs +13 -0
- package/dist/floating-ui.vue.es-Bv94BfDm.js +1 -0
- package/dist/floating-ui.vue.es-DWY7pdz8.mjs +1573 -0
- package/dist/formatting.es-DBtYnvI5.js +1 -0
- package/dist/formatting.es-eYgXv_AK.mjs +70 -0
- package/dist/gcash.svg.es-BhJ-eA2z.mjs +4 -0
- package/dist/gcash.svg.es-JaL4fpZr.js +1 -0
- package/dist/getComposedString.es-CELkn0I7.mjs +14 -0
- package/dist/getComposedString.es-DvSNX-_z.js +1 -0
- package/dist/getCountryNameByCode.es-fP52nO_7.js +1 -0
- package/dist/getCountryNameByCode.es-ymC9R46j.mjs +8 -0
- package/dist/girocard.svg.es-D_3LML4l.mjs +4 -0
- package/dist/girocard.svg.es-tVgtT23w.js +1 -0
- package/dist/go-pay.svg.es-6UtgwVBA.mjs +4 -0
- package/dist/go-pay.svg.es-fYX6yMzJ.js +1 -0
- package/dist/google-pay.svg.es-BYXX1em8.js +1 -0
- package/dist/google-pay.svg.es-CRxXgFVl.mjs +4 -0
- package/dist/hipercard.svg.es-Ct1-mF9F.mjs +4 -0
- package/dist/hipercard.svg.es-D-nmiFXB.js +1 -0
- package/dist/icon-sprite.svg.es-BpwT0GQ5.js +1 -0
- package/dist/icon-sprite.svg.es-YYqtl2IP.mjs +4 -0
- package/dist/ideal.svg.es-D23EhJJ2.mjs +4 -0
- package/dist/ideal.svg.es-DXtHE0Jb.js +1 -0
- package/dist/index-Cai7laNY.mjs +1069 -0
- package/dist/index-DIFK3mcJ.js +6 -0
- package/dist/index-DyvRdSR7.mjs +9673 -0
- package/dist/index-IZaUTAsE.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -15
- package/dist/index.es-2JWHHSgP.js +1 -0
- package/dist/index.es-D5xOw_SJ.mjs +542 -0
- package/dist/index.mjs +42 -0
- package/dist/invoices-1oYkdQQV.mjs +121 -0
- package/dist/invoices-BAoh6X2a.js +1 -0
- package/dist/it-IT-B6blp8MI.mjs +299 -0
- package/dist/it-IT-CEP3oeWs.js +1 -0
- package/dist/it-IT-CMy1tHKZ.mjs +266 -0
- package/dist/it-IT-aPQY57ht.js +1 -0
- package/dist/jcb.svg.es-Bz6J-c0s.js +1 -0
- package/dist/jcb.svg.es-CcH08OoO.mjs +4 -0
- package/dist/kakao-pay.svg.es-DcgRDAsc.mjs +4 -0
- package/dist/kakao-pay.svg.es-qVTABboW.js +1 -0
- package/dist/klarna.svg.es-Clu-7zkp.js +1 -0
- package/dist/klarna.svg.es-DfIPX0gr.mjs +4 -0
- package/dist/maestro.svg.es-CVmNVokN.mjs +4 -0
- package/dist/maestro.svg.es-e8E_H2QU.js +1 -0
- package/dist/mastercard.svg.es-B8z0ZySS.mjs +4 -0
- package/dist/mastercard.svg.es-YO3_jGD6.js +1 -0
- package/dist/momo.svg.es-BXTQlQRy.js +1 -0
- package/dist/momo.svg.es-Bm5zCTOT.mjs +4 -0
- package/dist/nl-NL-CckNM7R9.mjs +266 -0
- package/dist/nl-NL-CjoW8r_M.mjs +314 -0
- package/dist/nl-NL-e_vf6OuT.js +1 -0
- package/dist/nl-NL-zRUAuEHg.js +1 -0
- package/dist/nyce.svg.es-CgurqLKH.mjs +4 -0
- package/dist/nyce.svg.es-DM6esO47.js +1 -0
- package/dist/object.es-DFXiU9p3.js +1 -0
- package/dist/object.es-jvvnR8Kr.mjs +12 -0
- package/dist/open-banking.svg.es-DUM360xB.js +1 -0
- package/dist/open-banking.svg.es-DzzLCVp_.mjs +4 -0
- package/dist/paymentMethods-CZ3ydybI.js +1 -0
- package/dist/{paymentMethods-CqKUfc3w.mjs → paymentMethods-DIV78w0O.mjs} +31 -18
- package/dist/payments--lkjiwCt.js +1 -0
- package/dist/{payments-CosaPZwo.mjs → payments-Cvqdrprv.mjs} +1 -1
- package/dist/paypal.svg.es-BdkNTf3c.js +1 -0
- package/dist/paypal.svg.es-DltWzW4V.mjs +4 -0
- package/dist/pricing-3W7XLwL6.js +1 -0
- package/dist/pricing-CJxS2hr2.mjs +17 -0
- package/dist/pricingItemConfigs.es-BPIm6S8M.mjs +107 -0
- package/dist/pricingItemConfigs.es-C73cQlxQ.js +1 -0
- package/dist/pricingPlanSchedule-B9HFiXy-.js +1 -0
- package/dist/pricingPlanSchedule-CXG3CQ61.mjs +146 -0
- package/dist/pulse.svg.es-BdpWAuIN.js +1 -0
- package/dist/pulse.svg.es-BecAwT-p.mjs +4 -0
- package/dist/screens/Checkout/Checkout.ce.d.ts +1 -3
- package/dist/screens/Checkout/Checkout.cjs +1 -0
- package/dist/screens/Checkout/{Checkout.es.js → Checkout.mjs} +1531 -1434
- package/dist/screens/CustomerOverview/CustomerOverview.ce.d.ts +1 -3
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -0
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +175 -0
- package/dist/screens/PayInvoice/PayInvoice.ce.d.ts +1 -0
- package/dist/screens/PayInvoice/PayInvoice.cjs +1 -0
- package/dist/screens/PayInvoice/PayInvoice.mjs +582 -0
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.ce.d.ts +1 -0
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -0
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +227 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.ce.d.ts +1 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -0
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +882 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.ce.d.ts +1 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -0
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +707 -0
- package/dist/sepa.svg.es-BF8PYKZg.js +1 -0
- package/dist/sepa.svg.es-cbE9g8gV.mjs +4 -0
- package/dist/slots.es-BpwYO3A3.mjs +18 -0
- package/dist/slots.es-Dq1PTUOv.js +1 -0
- package/dist/sorting.es-CjTrRfSW.mjs +105 -0
- package/dist/sorting.es-RyvcgbSL.js +1 -0
- package/dist/star.svg.es-DsCD-tSp.mjs +4 -0
- package/dist/star.svg.es-Q50IzqXr.js +1 -0
- package/dist/subscription-C41lG-rH.mjs +89 -0
- package/dist/subscription-b0OPx8Du.js +1 -0
- package/dist/subscriptions-300o4ae0.js +1 -0
- package/dist/subscriptions-DcMHBPVJ.mjs +58 -0
- package/dist/trustly.svg.es-C0Ou1HWk.mjs +4 -0
- package/dist/trustly.svg.es-CHojqNqm.js +1 -0
- package/dist/twint.svg.es-CQ-ZDfy8.js +1 -0
- package/dist/twint.svg.es-WrZYquRs.mjs +4 -0
- package/dist/typeGuards.es-C4nR5FkL.js +1 -0
- package/dist/typeGuards.es-fwUoeMCe.mjs +12 -0
- package/dist/types/components/InvoiceTable/InvoiceTable.types.d.ts +19 -0
- package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
- package/dist/types/components/checkout/EmptyStatePlaceholder.types.d.ts +4 -0
- package/dist/types/components/checkout/PromotionCodeSection.types.d.ts +8 -0
- package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +24 -0
- package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +32 -0
- package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +12 -0
- package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +14 -0
- package/dist/types/components/payments/AddPaymentMethodPane/AddPaymentMethodPane.types.d.ts +19 -0
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +74 -0
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +9 -0
- package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +3 -0
- package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +21 -0
- package/dist/types/components/payments/PayButton/PayButton.types.d.ts +10 -0
- package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +5 -0
- package/dist/types/components/payments/PaymentErrorCard/PaymentErrorCard.types.d.ts +4 -0
- package/dist/types/components/payments/PaymentFeedbackCard/PaymentFeedbackCard.types.d.ts +4 -0
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +74 -0
- package/dist/types/components/payments/PaymentIntegrationFormAdyen/PaymentIntegrationFormAdyen.types.d.ts +6 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripe.types.d.ts +7 -0
- package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +61 -0
- package/dist/types/components/payments/PaymentMethodSelector/PaymentMethodSelector.types.d.ts +53 -0
- package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +8 -0
- package/dist/types/components/payments/PaymentMethodsUnavailableCard/PaymentMethodsUnavailableCard.types.d.ts +8 -0
- package/dist/types/components/payments/SubscriptionPaymentCompletedCard/SubscriptionPaymentCompletedCard.types.d.ts +3 -0
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.d.ts +4 -0
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +3 -0
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +17 -0
- package/dist/types/components/providers/ActionDispatchProvider/composables/useActionDispatchProvider.d.ts +3 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +5 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +8 -0
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/AuthProvider/composables/useAuth.d.ts +3 -0
- package/dist/types/components/providers/AuthProvider/index.d.ts +3 -0
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.lib.d.ts +5 -0
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.types.d.ts +9 -0
- package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/ConfigProvider/composables/useConfig.d.ts +3 -0
- package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.types.d.ts +3 -0
- package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +10 -0
- package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +22 -0
- package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +17 -0
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.lib.d.ts +5 -0
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.types.d.ts +4 -0
- package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/ExperimentalFeatureProvider/composables/useExperimentalFeature.d.ts +1 -0
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +12 -0
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.types.d.ts +3 -0
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/HostElementProvider/composables/useHostElementProvider.d.ts +1 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +32 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +70 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +20 -0
- package/dist/types/components/providers/LoggerProvider/composables/useLogger.d.ts +6 -0
- package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +7 -0
- package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +11 -0
- package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +3 -0
- package/dist/types/components/providers/Provider/Provider.types.d.ts +15 -0
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +21 -0
- package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +17 -0
- package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +18 -0
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.lib.d.ts +9 -0
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.types.d.ts +22 -0
- package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +18 -0
- package/dist/types/components/providers/index.d.ts +9 -0
- package/dist/types/components/shared/ScreenTitle/ScreenTitle.types.d.ts +4 -0
- package/dist/types/components/shared/Section/Section.types.d.ts +21 -0
- package/dist/types/components/shared/Skeleton.types.d.ts +5 -0
- package/dist/types/components/shared/SlidingPanes/SlidingPanes.types.d.ts +12 -0
- package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsList.types.d.ts +15 -0
- package/dist/types/components/subscriptions/EnabledPricingsList/EnabledPricingsListItem.types.d.ts +7 -0
- package/dist/types/components/subscriptions/OrderSummary.types.d.ts +65 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/AddonSingleEditor.types.d.ts +5 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +8 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupContent.types.d.ts +4 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/PricingGroupEditorBase.types.d.ts +8 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +6 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +6 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTable.types.d.ts +5 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/TieredTableRow.types.d.ts +7 -0
- package/dist/types/components/subscriptions/SubscriptionCancellationModal/SubscriptionCancellationModal.types.d.ts +12 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +47 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +28 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +7 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +7 -0
- package/dist/types/components/subscriptions/SubscriptionSummary.types.d.ts +33 -0
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +13 -0
- package/dist/types/components/wallets/AutoTopUpCancellationModal/AutoTopUpCancellationModal.types.d.ts +9 -0
- package/dist/types/components/wallets/AutoTopUpConfig/AutoTopUpConfig.types.d.ts +56 -0
- package/dist/types/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +16 -0
- package/dist/types/components/wallets/ConvertedAmountInput/ConvertedAmountInput.types.d.ts +32 -0
- package/dist/types/components/wallets/TopUpModal/TopUpInvoicePreview.types.d.ts +11 -0
- package/dist/types/components/wallets/TopUpModal/TopUpModal.types.d.ts +31 -0
- package/dist/types/components/wallets/TopUpModal/TopUpModalForm.types.d.ts +23 -0
- package/dist/types/components/wallets/TopUpModal/TopUpModalSuccess.types.d.ts +11 -0
- package/dist/types/components/wallets/WalletModalShell.types.d.ts +24 -0
- package/dist/types/composables/useInvoicePreview.types.d.ts +9 -0
- package/dist/types/config/config.beta.d.ts +2 -0
- package/dist/types/config/config.dev.d.ts +2 -0
- package/dist/types/config/config.live.d.ts +2 -0
- package/dist/types/config/internalEnvironments.d.ts +11 -0
- package/dist/types/config/internalEnvironments.published.d.ts +7 -0
- package/dist/types/config/lib.d.ts +6 -0
- package/dist/types/config/types.d.ts +13 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/public/components/BillingInformation/BillingInformation.entry.ce.d.ts +1 -0
- package/dist/types/public/components/BillingInformation/BillingInformation.entry.types.d.ts +4 -0
- package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +12 -0
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.ce.d.ts +1 -0
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +4 -0
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.types.d.ts +10 -0
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.ce.d.ts +1 -0
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.entry.types.d.ts +6 -0
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +22 -0
- package/dist/types/public/components/CustomerWalletBalances/CustomerWalletBalances.types.d.ts +22 -0
- package/dist/types/public/components/Invoice/Invoice.entry.ce.d.ts +1 -0
- package/dist/types/public/components/Invoice/Invoice.entry.types.d.ts +5 -0
- package/dist/types/public/components/Invoice/Invoice.types.d.ts +26 -0
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.ce.d.ts +1 -0
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.entry.types.d.ts +5 -0
- package/dist/types/public/components/InvoiceDetails/InvoiceDetails.types.d.ts +9 -0
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.ce.d.ts +1 -0
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.entry.types.d.ts +5 -0
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +16 -0
- package/dist/types/public/components/InvoicesList/InvoicesList.entry.ce.d.ts +1 -0
- package/dist/types/public/components/InvoicesList/InvoicesList.entry.types.d.ts +5 -0
- package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +37 -0
- package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.ce.d.ts +1 -0
- package/dist/types/public/components/PaymentHistory/PaymentHistory.entry.types.d.ts +5 -0
- package/dist/types/public/components/PaymentHistory/PaymentHistory.types.d.ts +10 -0
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.ce.d.ts +1 -0
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +5 -0
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +38 -0
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.ce.d.ts +1 -0
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.entry.types.d.ts +5 -0
- package/dist/types/public/components/SubscriptionSchedules/SubscriptionSchedules.types.d.ts +9 -0
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.ce.d.ts +1 -0
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.entry.types.d.ts +5 -0
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +16 -0
- package/dist/types/public/components/WalletBalances/WalletBalances.entry.ce.d.ts +1 -0
- package/dist/types/public/components/WalletBalances/WalletBalances.entry.types.d.ts +5 -0
- package/dist/types/public/components/WalletBalances/WalletBalances.types.d.ts +3 -0
- package/dist/types/public/core/action-request.types.d.ts +55 -0
- package/dist/types/public/core/configuration.d.ts +3 -0
- package/dist/types/public/core/index.d.ts +14 -0
- package/dist/types/public/core/registry.ce.d.ts +8 -0
- package/dist/types/public/core/registry.d.ts +6 -0
- package/dist/types/public/core/types.d.ts +120 -0
- package/dist/types/public/screens/Checkout/Checkout.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +18 -0
- package/dist/types/public/screens/Checkout/Checkout.types.d.ts +46 -0
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.entry.types.d.ts +5 -0
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +2 -0
- package/dist/types/public/screens/PayInvoice/PayInvoice.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/PayInvoice/PayInvoice.entry.types.d.ts +4 -0
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +23 -0
- package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.entry.types.d.ts +3 -0
- package/dist/types/public/screens/PaymentMethodsManagement/PaymentMethodsManagement.types.d.ts +7 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +6 -0
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +23 -0
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.entry.types.d.ts +5 -0
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +13 -0
- package/dist/types/public/screens/types.d.ts +4 -0
- package/dist/types/public/types/index.d.ts +23 -0
- package/dist/types/services/invoices.types.d.ts +26 -0
- package/dist/types/services/paymentMethods.types.d.ts +31 -0
- package/dist/types/services/portals.types.d.ts +68 -0
- package/dist/types/services/requests.types.d.ts +24 -0
- package/dist/types/translations/supported.d.ts +1 -0
- package/dist/types/types/EntryBaseProps.d.ts +10 -0
- package/dist/types/types/errors.d.ts +7 -0
- package/dist/types/types/subscription.d.ts +4 -0
- package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +111 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Address.d.ts +17 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Alerts.d.ts +72 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Amount.d.ts +4 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Api.d.ts +50 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApiError.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApiKey.d.ts +21 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApiStatus.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +77 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Attachment.d.ts +14 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Band.d.ts +30 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/BaseResourceStatus.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/BillingEntity.d.ts +45 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/BillingPeriod.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/BillingTime.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +24 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Commitment.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CommitmentItem.d.ts +17 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Comparator.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +12 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ConfiguredMeterValue.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Country.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CreateMeterData.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CreatePricingPlanVersion.d.ts +3 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CreditType.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Currency.d.ts +8 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +39 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/CustomerContact.d.ts +12 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Customers.d.ts +75 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Discount.d.ts +12 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/DiscountItem.d.ts +24 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Document.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/DueDateConfiguration.d.ts +8 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Environment.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/EventTrace.d.ts +23 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceExtended.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLink.d.ts +14 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/EventTraceLinkExtended.d.ts +15 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Features.d.ts +25 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/IdentityProvider.d.ts +40 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/IndexingSettings.d.ts +24 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +367 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +349 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Markup.d.ts +8 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MarkupItem.d.ts +11 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Meter.d.ts +32 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterConditions.d.ts +26 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterData.d.ts +25 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterDataExpanded.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterProperty.d.ts +34 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyValue.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValue.d.ts +16 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueCalculation.d.ts +20 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/MeterValueValue.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ModelType.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Name.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/NotificationPreferences.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Payment.d.ts +124 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +120 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAction.d.ts +74 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethod.d.ts +173 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentMethodOptions.d.ts +45 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentSchedules.d.ts +142 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +118 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +58 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Pricing.d.ts +41 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategory.d.ts +18 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingCategoryExtended.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingExtended.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingGroup.d.ts +29 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItem.d.ts +40 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +130 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +103 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleWithPlanData.d.ts +9 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +80 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscriptionGroup.d.ts +10 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersion.d.ts +71 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanVersionExtended.d.ts +7 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +44 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +22 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ProductCategory.d.ts +10 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +60 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/PromotionCodes.d.ts +14 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +43 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +93 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +65 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ReprocessLog.d.ts +31 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Resource.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +2 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Role.d.ts +19 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/SignatureRequest.d.ts +27 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/TaxCategory.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/TaxIdentifier.d.ts +17 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/TaxSummary.d.ts +21 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/TimePeriod.d.ts +5 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Timestamp.d.ts +4 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Token.d.ts +6 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/User.d.ts +106 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/ValueType.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +44 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/WalletAutoTopUpConfigs.d.ts +28 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/WalletType.d.ts +54 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Webhook.d.ts +48 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/WebhookEvent.d.ts +18 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +95 -0
- package/dist/types/vendor/@solvimon/solvimon-types/types/forms.d.ts +1 -0
- package/dist/types/vendor/@solvimon/solvimon-types/utils.d.ts +17 -0
- package/dist/unionpay.svg.es-DYgo83Hf.mjs +4 -0
- package/dist/unionpay.svg.es-YqJKKFEj.js +1 -0
- package/dist/url-CjULBkjW.js +1 -0
- package/dist/url-CvNDq4wp.mjs +22 -0
- package/dist/{useActionDispatchProvider-CgRcOqv3.mjs → useActionDispatchProvider-BVOBO0Jx.mjs} +1 -1
- package/dist/useActionDispatchProvider-Cv9amjTf.js +1 -0
- package/dist/useCustomer-DLHOs4BR.js +1 -0
- package/dist/useCustomer-EDhref7T.mjs +25 -0
- package/dist/useCustomerFormLabels-B61-4xQ7.mjs +1168 -0
- package/dist/useCustomerFormLabels-C6wW4n2e.js +1 -0
- package/dist/useExperimentalFeature-0yFoaEzV.js +1 -0
- package/dist/useExperimentalFeature-DvxOrFPU.mjs +9 -0
- package/dist/{useIncrementalLoading-C7ToTmZK.mjs → useIncrementalLoading-BK9pRYAU.mjs} +9 -9
- package/dist/useIncrementalLoading-CdtGJm_Y.js +1 -0
- package/dist/useInvoiceData-BSjVeJrI.js +1 -0
- package/dist/{useInvoiceData-CcueV3We.mjs → useInvoiceData-C0Y5WrbT.mjs} +6 -12
- package/dist/useInvoicesList-BRDZqsaB.js +1 -0
- package/dist/useInvoicesList-CYoE7q0u.mjs +580 -0
- package/dist/{useLoadInitialData-Dm48tlSO.mjs → useLoadInitialData-Cp1OA8y6.mjs} +5 -0
- package/dist/useLoadInitialData-u7IyXqb6.js +1 -0
- package/dist/usePaymentMethodAvailability-B3s1lqQ2.js +1 -0
- package/dist/usePaymentMethodAvailability-EuhZPghG.mjs +141 -0
- package/dist/usePaymentMethodOptions--8QpMvNm.js +1 -0
- package/dist/usePaymentMethodOptions-Cljh7HYp.mjs +36 -0
- package/dist/{usePaymentMethods-Db-1R6rI.mjs → usePaymentMethods-BJzoI8dZ.mjs} +2 -2
- package/dist/{usePaymentMethods-DCGVRXA4.js → usePaymentMethods-DvEnJWmB.js} +1 -1
- package/dist/usePayments-CANj0QVc.js +1 -0
- package/dist/usePayments-CaT1CBzE.mjs +362 -0
- package/dist/usePortal-BjGoSeLy.js +1 -0
- package/dist/usePortal-CMPQ0M9R.mjs +12 -0
- package/dist/useService-D73FNBjT.js +1 -0
- package/dist/useService-W3Kxems4.mjs +72 -0
- package/dist/useSubscription-D1UKnZAx.mjs +250 -0
- package/dist/useSubscription-DZfRHbL7.js +1 -0
- package/dist/useViewport-Bu0cyeSi.mjs +38 -0
- package/dist/useViewport-CKRY1CKR.js +1 -0
- package/dist/useWatchDebounced-C_YxgoQ6.js +1 -0
- package/dist/useWatchDebounced-Zmxd6InB.mjs +16 -0
- package/dist/visa.svg.es-B6aU_qRs.mjs +4 -0
- package/dist/visa.svg.es-D6sc4YTE.js +1 -0
- package/dist/vpay.svg.es-4qIqS4aX.mjs +4 -0
- package/dist/vpay.svg.es-CLGTyB09.js +1 -0
- package/dist/zip.svg.es-3PzSBe1E.mjs +4 -0
- package/dist/zip.svg.es-BRsgmur-.js +1 -0
- package/package.json +112 -61
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BD3CrJzj.js +0 -1
- package/dist/ContentWithAsideLayout-CRsFr9TH.mjs +0 -42
- package/dist/ContentWithAsideLayout-DczcgSrt.js +0 -1
- package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BE3I7Oe1.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-sNdlKgdU.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJEZEEwZ.mjs +0 -6568
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-Sn1Jq19s.js +0 -1
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-Bifo4jTH.js +0 -1
- package/dist/PricingGroupContent.vue_vue_type_script_setup_true_lang-DWp42_G4.mjs +0 -75
- package/dist/Skeleton.vue_vue_type_script_setup_true_lang-C_BwMlBE.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-yyhwzYSM.js +0 -1
- package/dist/_Uint8Array-DHE03FZr.mjs +0 -507
- package/dist/_Uint8Array-DxISR7XF.js +0 -1
- package/dist/auto-DzZuCneB.mjs +0 -14387
- package/dist/auto-PpnAChnH.js +0 -6
- package/dist/cloneDeep-DranHQkY.js +0 -1
- package/dist/cloneDeep-sm9cY-u2.mjs +0 -212
- package/dist/component-DEo_ndpK.mjs +0 -58668
- package/dist/component-XHQYFLA_.js +0 -1
- package/dist/components/BillingInformation/BillingInformation.cjs.js +0 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs.js +0 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs.js +0 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.es.js +0 -134
- package/dist/components/Invoice/Invoice.cjs.js +0 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs.js +0 -1
- package/dist/components/InvoicesList/InvoicesList.cjs.js +0 -1
- package/dist/components/PaymentHistory/PaymentHistory.cjs.js +0 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs.js +0 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.es.js +0 -238
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs.js +0 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.es.js +0 -152
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs.js +0 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.es.js +0 -134
- package/dist/components/WalletBalances/WalletBalances.cjs.js +0 -1
- package/dist/core/index.cjs.js +0 -1
- package/dist/core/index.es.js +0 -6
- package/dist/index-2jo9BSPM.js +0 -1
- package/dist/index-BFZ0dPh9.mjs +0 -179
- package/dist/index-CWSXne1Q.js +0 -1
- package/dist/index-CzL1ZcGi.mjs +0 -85
- package/dist/index-D3v7hAtc.mjs +0 -253
- package/dist/index-DRdBmZ2-.js +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.es.js +0 -45
- package/dist/invoices-BW1notiX.js +0 -1
- package/dist/invoices-M5oYVch6.mjs +0 -84
- package/dist/paymentMethods-BX80t2zk.js +0 -1
- package/dist/payments-BHv4hCeJ.js +0 -1
- package/dist/registry-BwKEYOf7.js +0 -1
- package/dist/registry-Cag1Jj7P.mjs +0 -143
- package/dist/screens/Checkout/Checkout.cjs.js +0 -1
- package/dist/screens/CustomerOverview/CustomerOverview.cjs.js +0 -1
- package/dist/screens/CustomerOverview/CustomerOverview.es.js +0 -136
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.ce.d.ts +0 -3
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.cjs.js +0 -1
- package/dist/screens/UpgradeSubscription/UpgradeSubscription.es.js +0 -1012
- package/dist/solvimon-web.css +0 -1
- package/dist/sprite-i5T7eZnk-C55G-dBo.js +0 -1
- package/dist/sprite-i5T7eZnk-i5T7eZnk.mjs +0 -4
- package/dist/subscriptions-Bs4DIE8f.mjs +0 -74
- package/dist/subscriptions-CnxvsBXd.js +0 -1
- package/dist/useActionDispatchProvider-Cru69mAl.js +0 -1
- package/dist/useCustomer-B0NK96dA.js +0 -1
- package/dist/useCustomer-DlcjY3fP.mjs +0 -45
- package/dist/useCustomerPaymentMethodOptions-C-8BLzqb.js +0 -1
- package/dist/useIncrementalLoading-D60Vttil.js +0 -1
- package/dist/useInvoiceData-DstXfI7t.js +0 -1
- package/dist/useInvoicesList-CXng3aUm.mjs +0 -294
- package/dist/useInvoicesList-DmzjgMlW.js +0 -1
- package/dist/useLoadInitialData-BRg7IWqW.js +0 -1
- package/dist/useService-B4qv5N2D.mjs +0 -281
- package/dist/useService-D-CUtlp3.js +0 -1
- package/dist/useWalletBalanceItems-BZyiAhcV.js +0 -1
- package/dist/useWalletBalanceItems-CHkLaccm.mjs +0 -105
|
@@ -1,58 +1,110 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { c as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { a as
|
|
15
|
-
import { _ as _sfc_main$
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { defineComponent, createPropsRestProxy, computed, openBlock, createBlock, unref, mergeProps, withCtx, createTextVNode, toDisplayString, useModel, ref, onMounted, watch, createSlots, createVNode, normalizeClass, createElementVNode, createCommentVNode, renderSlot, mergeModels, inject, createElementBlock, withModifiers, Fragment, renderList, toRef, nextTick, withDirectives, withKeys, vShow, defineAsyncComponent } from "vue";
|
|
2
|
+
import { c as countryData } from "../../countryData.es--zJAd6LA.mjs";
|
|
3
|
+
import { _ as _sfc_main$r, I as I18N_INJECTION_KEY, b as useLogger, u as useIntl, d as _sfc_main$Q, e as createSolvimonElement } from "../../customElements-B-89a5oH.mjs";
|
|
4
|
+
import { u as useTimePeriod } from "../../PricingGroupRangeInput.vue.es-ButaePib.mjs";
|
|
5
|
+
import { b as formatBillingPeriod, f as formatAmount } from "../../formatting.es-eYgXv_AK.mjs";
|
|
6
|
+
import { a as _sfc_main$v, _ as _sfc_main$K } from "../../Button.vue.es-Cm9pLU9i.mjs";
|
|
7
|
+
import { _ as _sfc_main$N } from "../../ErrorNotification.vue.es-CHyVTBGs.mjs";
|
|
8
|
+
import { c as createSubscriptionsService } from "../../subscriptions-DcMHBPVJ.mjs";
|
|
9
|
+
import { A as ApiStatus } from "../../error-DY_I2hPx.mjs";
|
|
10
|
+
import { c as convertDateRangeToTimePeriod, _ as _sfc_main$y } from "../../TrialChip.vue.es-B1puKyR-.mjs";
|
|
11
|
+
import { a as isEqual } from "../../useService-W3Kxems4.mjs";
|
|
12
|
+
import { c as createInvoicesService } from "../../invoices-1oYkdQQV.mjs";
|
|
13
|
+
import { g as getFirstPricingPlanScheduleOfType, b as getScheduleCustomizations, e as getPricingItemConfigMetaById } from "../../pricingPlanSchedule-CXG3CQ61.mjs";
|
|
14
|
+
import { u as useValidation, r as required, e as email, a as requiredIf, _ as _sfc_main$E } from "../../index-Cai7laNY.mjs";
|
|
15
|
+
import { o as objectDiff, u as useCustomerFormLabels, _ as _sfc_main$u, a as _sfc_main$x } from "../../useCustomerFormLabels-B61-4xQ7.mjs";
|
|
16
|
+
import { u as useWatchDebounced } from "../../useWatchDebounced-Zmxd6InB.mjs";
|
|
17
|
+
import { u as usePaymentMethodOptions } from "../../usePaymentMethodOptions-Cljh7HYp.mjs";
|
|
18
|
+
import { c as getPricingGroupsFromExtendedPricingPlanSubscription, a as getSubscriptionName, d as getFallbackTrialAndSubscriptionStartAndEndDates } from "../../subscription-C41lG-rH.mjs";
|
|
19
|
+
import { a as getAllPricingsFromScheduleInfos, b as getPricingsFromScheduleInfo, g as getNameFromPricing } from "../../pricing-CJxS2hr2.mjs";
|
|
20
|
+
import { g as getQueryParam, s as safeUrlRedirect } from "../../url-CvNDq4wp.mjs";
|
|
21
|
+
import { P as PAYMENT_ACCEPTOR_ID_QUERY_STRING, e as getAdyenExpressCheckoutConfiguration, c as transformObjectToAdyenObject, d as createReturnUrl } from "../../adyen-BXi_D9TQ.mjs";
|
|
22
|
+
import { u as usePortal } from "../../usePortal-CMPQ0M9R.mjs";
|
|
23
|
+
import { g as getCountryNameByCode } from "../../getCountryNameByCode.es-ymC9R46j.mjs";
|
|
24
|
+
import { _ as _sfc_main$w } from "../../Expand.vue.es-C4_XmqbR.mjs";
|
|
25
|
+
import { _ as _sfc_main$p } from "../../Input.vue.es-WZGF8dfr.mjs";
|
|
26
|
+
import { _ as _sfc_main$t } from "../../Section.vue.es-DX_9ueCG.mjs";
|
|
27
|
+
import { a as _sfc_main$q, _ as _sfc_main$s } from "../../IconButton.vue.es-KywqWWvr.mjs";
|
|
28
|
+
import { c as createCustomerService } from "../../customer-Dzj1g9lV.mjs";
|
|
29
|
+
import { c as _sfc_main$A, d as _sfc_main$G, b as _sfc_main$H, _ as _sfc_main$P } from "../../EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DLE5-9wz.mjs";
|
|
30
|
+
import { _ as _sfc_main$z, T as TooltipContent, a as _sfc_main$B } from "../../TooltipParagraph.vue.es-C5RTcrid.mjs";
|
|
31
|
+
import { _ as _sfc_main$C } from "../../PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CsH47WSM.mjs";
|
|
32
|
+
import { _ as _sfc_main$o } from "../../Chip.vue.es-BBmn-qJp.mjs";
|
|
33
|
+
import { b as _sfc_main$F, u as usePricingDescription, c as _sfc_main$L, _ as _sfc_main$M, a as _sfc_main$O } from "../../SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DVtMzgjc.mjs";
|
|
34
|
+
import { _ as _sfc_main$D } from "../../SubscriptionSummary.vue_vue_type_script_setup_true_lang-C5zB3CgZ.mjs";
|
|
35
|
+
import { u as useViewport } from "../../useViewport-Bu0cyeSi.mjs";
|
|
36
|
+
import { _ as _sfc_main$I } from "../../Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs";
|
|
37
|
+
import { _ as _sfc_main$J } from "../../DividerText.vue.es-CeAHAe_Y.mjs";
|
|
38
|
+
import { c as createPaymentsService } from "../../payments-Cvqdrprv.mjs";
|
|
39
|
+
import { C as ContentWithAsideLayout } from "../../ContentWithAsideLayout-Dy9xgxuF.mjs";
|
|
40
|
+
import { u as uniqueId } from "../../cn.es-BEU5D0Wz.mjs";
|
|
41
|
+
import { g as getComponentName } from "../../component-BG6DmXcy.mjs";
|
|
42
|
+
const EU_COUNTRIES = {
|
|
43
|
+
AT: "Austria",
|
|
44
|
+
BE: "Belgium",
|
|
45
|
+
BG: "Bulgaria",
|
|
46
|
+
CY: "Cyprus",
|
|
47
|
+
CZ: "Czech Republic",
|
|
48
|
+
DE: "Germany",
|
|
49
|
+
DK: "Denmark",
|
|
50
|
+
EE: "Estonia",
|
|
51
|
+
ES: "Spain",
|
|
52
|
+
FI: "Finland",
|
|
53
|
+
FR: "France",
|
|
54
|
+
GR: "Greece",
|
|
55
|
+
HR: "Croatia",
|
|
56
|
+
HU: "Hungary",
|
|
57
|
+
IE: "Ireland",
|
|
58
|
+
IT: "Italy",
|
|
59
|
+
LT: "Lithuania",
|
|
60
|
+
LU: "Luxembourg",
|
|
61
|
+
LV: "Latvia",
|
|
62
|
+
MT: "Malta",
|
|
63
|
+
NL: "Netherlands",
|
|
64
|
+
PL: "Poland",
|
|
65
|
+
PT: "Portugal",
|
|
66
|
+
RO: "Romania",
|
|
67
|
+
SE: "Sweden",
|
|
68
|
+
SI: "Slovenia",
|
|
69
|
+
SK: "Slovakia"
|
|
70
|
+
};
|
|
71
|
+
function isEUCountry(countryCode) {
|
|
72
|
+
return Object.keys(EU_COUNTRIES).includes(countryCode);
|
|
26
73
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return
|
|
47
|
-
}
|
|
74
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
75
|
+
__name: "DeltaChip",
|
|
76
|
+
props: {
|
|
77
|
+
oldValue: {},
|
|
78
|
+
newValue: {},
|
|
79
|
+
intent: { default: "neutral" },
|
|
80
|
+
content: {},
|
|
81
|
+
removable: { type: Boolean },
|
|
82
|
+
size: {},
|
|
83
|
+
variant: {},
|
|
84
|
+
textClass: {},
|
|
85
|
+
tag: {},
|
|
86
|
+
hasChipBefore: { type: Boolean },
|
|
87
|
+
hasChipAfter: { type: Boolean }
|
|
88
|
+
},
|
|
89
|
+
setup(__props) {
|
|
90
|
+
const chipProps = createPropsRestProxy(__props, ["oldValue", "newValue", "intent"]);
|
|
91
|
+
const delta = computed(() => {
|
|
92
|
+
const calculatedDelta = __props.newValue - __props.oldValue;
|
|
93
|
+
return `${calculatedDelta >= 0 ? "+" : ""}${calculatedDelta}`;
|
|
94
|
+
});
|
|
95
|
+
return (_ctx, _cache) => {
|
|
96
|
+
return openBlock(), createBlock(unref(_sfc_main$o), mergeProps(chipProps, {
|
|
97
|
+
intent: __props.intent,
|
|
98
|
+
class: "pointer-events-none select-none"
|
|
99
|
+
}), {
|
|
100
|
+
default: withCtx(() => [
|
|
101
|
+
createTextVNode(toDisplayString(delta.value), 1)
|
|
102
|
+
]),
|
|
103
|
+
_: 1
|
|
104
|
+
}, 16, ["intent"]);
|
|
105
|
+
};
|
|
48
106
|
}
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
var idCounter = 0;
|
|
52
|
-
function uniqueId(prefix) {
|
|
53
|
-
var id = ++idCounter;
|
|
54
|
-
return toString(prefix) + id;
|
|
55
|
-
}
|
|
107
|
+
});
|
|
56
108
|
function ownKeys(object, enumerableOnly) {
|
|
57
109
|
var keys = Object.keys(object);
|
|
58
110
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -271,6 +323,197 @@ const urlRegex = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127
|
|
|
271
323
|
regex(urlRegex);
|
|
272
324
|
regex(/(^[0-9]*$)|(^-[0-9]+$)/);
|
|
273
325
|
regex(/^[-]?\d*(\.\d+)?$/);
|
|
326
|
+
const _hoisted_1$k = { class: "flex items-center gap-1.5" };
|
|
327
|
+
const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
328
|
+
__name: "StepInput",
|
|
329
|
+
props: /* @__PURE__ */ mergeModels({
|
|
330
|
+
step: { default: 1 },
|
|
331
|
+
min: { default: 0 },
|
|
332
|
+
max: {},
|
|
333
|
+
initialValue: { default: 1 },
|
|
334
|
+
unitName: {},
|
|
335
|
+
showDelta: { type: Boolean, default: false },
|
|
336
|
+
size: { default: "md" },
|
|
337
|
+
name: {},
|
|
338
|
+
required: { type: Boolean },
|
|
339
|
+
label: {},
|
|
340
|
+
error: {},
|
|
341
|
+
disabled: { type: Boolean, default: false }
|
|
342
|
+
}, {
|
|
343
|
+
"modelValue": { required: true },
|
|
344
|
+
"modelModifiers": {}
|
|
345
|
+
}),
|
|
346
|
+
emits: ["update:modelValue"],
|
|
347
|
+
setup(__props) {
|
|
348
|
+
const props = __props;
|
|
349
|
+
const model = useModel(__props, "modelValue");
|
|
350
|
+
const contentEditableRef = ref(null);
|
|
351
|
+
const computedUnitName = computed(() => {
|
|
352
|
+
if (!props.unitName) return void 0;
|
|
353
|
+
return props.unitName[model.value === 1 ? "singular" : "plural"];
|
|
354
|
+
});
|
|
355
|
+
const handleAdd = () => {
|
|
356
|
+
if (props.max && model.value + props.step > props.max) {
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
model.value += props.step;
|
|
360
|
+
};
|
|
361
|
+
const handleSubstract = () => {
|
|
362
|
+
if (model.value - props.step < props.min) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
model.value -= props.step;
|
|
366
|
+
};
|
|
367
|
+
function setContentAndMoveCaretToEnd(content) {
|
|
368
|
+
var _a;
|
|
369
|
+
const el = (_a = contentEditableRef.value) == null ? void 0 : _a.el;
|
|
370
|
+
if (!el) return;
|
|
371
|
+
const value = parseInt(`${content}`);
|
|
372
|
+
model.value = value;
|
|
373
|
+
el.innerText = `${value}`;
|
|
374
|
+
el.focus();
|
|
375
|
+
const range = document.createRange();
|
|
376
|
+
range.selectNodeContents(el);
|
|
377
|
+
range.collapse(false);
|
|
378
|
+
const selection = window.getSelection();
|
|
379
|
+
selection == null ? void 0 : selection.removeAllRanges();
|
|
380
|
+
selection == null ? void 0 : selection.addRange(range);
|
|
381
|
+
}
|
|
382
|
+
const handleInputUpdate = (event) => {
|
|
383
|
+
const target = event.target;
|
|
384
|
+
if (target instanceof HTMLElement) {
|
|
385
|
+
setContentAndMoveCaretToEnd(target.innerText);
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
const isIncreaseButtonEnabled = computed(() => {
|
|
389
|
+
if (props.disabled) {
|
|
390
|
+
return false;
|
|
391
|
+
}
|
|
392
|
+
if (props.max) {
|
|
393
|
+
return model.value + props.step < props.max;
|
|
394
|
+
}
|
|
395
|
+
return true;
|
|
396
|
+
});
|
|
397
|
+
const isDecreaseButtonEnabled = computed(() => {
|
|
398
|
+
return props.disabled ? false : model.value - props.step >= props.min;
|
|
399
|
+
});
|
|
400
|
+
function handleFocusContentEditable() {
|
|
401
|
+
var _a;
|
|
402
|
+
const el = (_a = contentEditableRef.value) == null ? void 0 : _a.el;
|
|
403
|
+
if (!el) return;
|
|
404
|
+
el.focus();
|
|
405
|
+
const range = document.createRange();
|
|
406
|
+
range.selectNodeContents(el);
|
|
407
|
+
const selection = window.getSelection();
|
|
408
|
+
selection == null ? void 0 : selection.removeAllRanges();
|
|
409
|
+
selection == null ? void 0 : selection.addRange(range);
|
|
410
|
+
}
|
|
411
|
+
onMounted(() => {
|
|
412
|
+
var _a;
|
|
413
|
+
const el = (_a = contentEditableRef.value) == null ? void 0 : _a.el;
|
|
414
|
+
if (!el) return;
|
|
415
|
+
el.innerText = `${model.value}`;
|
|
416
|
+
});
|
|
417
|
+
watch(
|
|
418
|
+
() => model.value,
|
|
419
|
+
(value) => {
|
|
420
|
+
setContentAndMoveCaretToEnd(value);
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
return (_ctx, _cache) => {
|
|
424
|
+
return openBlock(), createBlock(_sfc_main$p, {
|
|
425
|
+
modelValue: model.value,
|
|
426
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
427
|
+
type: "number",
|
|
428
|
+
class: "text-transparent [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
429
|
+
"prefix-class": {
|
|
430
|
+
"!px-0 w-5": __props.size === "sm",
|
|
431
|
+
"!px-0 w-6": __props.size === "md",
|
|
432
|
+
"!px-0 w-7": __props.size === "lg"
|
|
433
|
+
},
|
|
434
|
+
"suffix-class": {
|
|
435
|
+
"!px-0 w-5": __props.size === "sm",
|
|
436
|
+
"!px-0 w-6": __props.size === "md",
|
|
437
|
+
"!px-0 w-7": __props.size === "lg"
|
|
438
|
+
},
|
|
439
|
+
size: __props.size,
|
|
440
|
+
label: __props.label,
|
|
441
|
+
disabled: __props.disabled,
|
|
442
|
+
name: __props.name,
|
|
443
|
+
required: __props.required
|
|
444
|
+
}, createSlots({
|
|
445
|
+
prefix: withCtx(() => [
|
|
446
|
+
createElementVNode("div", {
|
|
447
|
+
class: "absolute inset-0 flex items-center justify-center",
|
|
448
|
+
onMousedown: handleFocusContentEditable
|
|
449
|
+
}, [
|
|
450
|
+
createElementVNode("div", _hoisted_1$k, [
|
|
451
|
+
createVNode(_sfc_main$r, {
|
|
452
|
+
ref_key: "contentEditableRef",
|
|
453
|
+
ref: contentEditableRef,
|
|
454
|
+
tag: "span",
|
|
455
|
+
variant: __props.size === "sm" ? "body" : "body-lg",
|
|
456
|
+
contenteditable: !__props.disabled,
|
|
457
|
+
class: normalizeClass(["outline-none", { "pointer-events-none select-none": __props.disabled }]),
|
|
458
|
+
weight: "semibold",
|
|
459
|
+
onInput: handleInputUpdate
|
|
460
|
+
}, null, 8, ["variant", "contenteditable", "class"]),
|
|
461
|
+
computedUnitName.value ? (openBlock(), createBlock(_sfc_main$r, {
|
|
462
|
+
key: 0,
|
|
463
|
+
tag: "span",
|
|
464
|
+
color: "subtle",
|
|
465
|
+
class: "pointer-events-none select-none"
|
|
466
|
+
}, {
|
|
467
|
+
default: withCtx(() => [
|
|
468
|
+
createTextVNode(toDisplayString(" ") + toDisplayString(computedUnitName.value), 1)
|
|
469
|
+
]),
|
|
470
|
+
_: 1
|
|
471
|
+
})) : createCommentVNode("", true),
|
|
472
|
+
__props.showDelta ? (openBlock(), createBlock(_sfc_main$n, {
|
|
473
|
+
key: 1,
|
|
474
|
+
"old-value": props.initialValue,
|
|
475
|
+
"new-value": model.value,
|
|
476
|
+
class: "pointer-events-none ml-0.5 select-none"
|
|
477
|
+
}, null, 8, ["old-value", "new-value"])) : createCommentVNode("", true)
|
|
478
|
+
])
|
|
479
|
+
], 32),
|
|
480
|
+
createVNode(_sfc_main$q, {
|
|
481
|
+
disabled: !isDecreaseButtonEnabled.value,
|
|
482
|
+
type: "button",
|
|
483
|
+
intent: "subtle",
|
|
484
|
+
size: "sm",
|
|
485
|
+
class: normalizeClass(["!h-full select-none rounded-br-none rounded-tr-none", { "!w-7": __props.size === "lg", "!w-5": __props.size === "sm", "!w-6": __props.size === "md" }]),
|
|
486
|
+
icon: "remove",
|
|
487
|
+
onMousedown: handleSubstract
|
|
488
|
+
}, null, 8, ["disabled", "class"])
|
|
489
|
+
]),
|
|
490
|
+
suffix: withCtx(() => [
|
|
491
|
+
createVNode(_sfc_main$q, {
|
|
492
|
+
disabled: !isIncreaseButtonEnabled.value,
|
|
493
|
+
type: "button",
|
|
494
|
+
intent: "subtle",
|
|
495
|
+
size: "sm",
|
|
496
|
+
class: normalizeClass(["!h-full select-none rounded-bl-none rounded-tl-none", { "!w-7": __props.size === "lg", "!w-5": __props.size === "sm", "!w-6": __props.size === "md" }]),
|
|
497
|
+
icon: "add",
|
|
498
|
+
onMousedown: handleAdd
|
|
499
|
+
}, null, 8, ["disabled", "class"])
|
|
500
|
+
]),
|
|
501
|
+
_: 2
|
|
502
|
+
}, [
|
|
503
|
+
_ctx.$slots.helper ? {
|
|
504
|
+
name: "helper",
|
|
505
|
+
fn: withCtx(() => [
|
|
506
|
+
renderSlot(_ctx.$slots, "helper")
|
|
507
|
+
]),
|
|
508
|
+
key: "0"
|
|
509
|
+
} : void 0
|
|
510
|
+
]), 1032, ["modelValue", "prefix-class", "suffix-class", "size", "label", "disabled", "name", "required"]);
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
function isValidCountryCode(code) {
|
|
515
|
+
return !!countryData.find((item) => item.key === code);
|
|
516
|
+
}
|
|
274
517
|
const taxIdMap = {
|
|
275
518
|
AT: {
|
|
276
519
|
regex: /^ATU\d{8}$/,
|
|
@@ -478,94 +721,54 @@ const getTaxIdMessage = ({ $model }) => {
|
|
|
478
721
|
});
|
|
479
722
|
};
|
|
480
723
|
const taxId = common.withMessage(getTaxIdMessage, taxIdValidator);
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
724
|
+
const EMPTY_LEGAL_ENTITY_NAME = "preview";
|
|
725
|
+
const EMPTY_COUNTRY = "NL";
|
|
726
|
+
const getCustomerAddress = (customer) => {
|
|
727
|
+
var _a, _b;
|
|
728
|
+
if ("organization" in customer) {
|
|
729
|
+
return (_a = customer.organization) == null ? void 0 : _a.registered_address;
|
|
730
|
+
}
|
|
731
|
+
if ("individual" in customer) {
|
|
732
|
+
return (_b = customer.individual) == null ? void 0 : _b.residential_address;
|
|
733
|
+
}
|
|
734
|
+
return void 0;
|
|
485
735
|
};
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
)
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
736
|
+
const buildAddress = (customer) => {
|
|
737
|
+
const address = getCustomerAddress(customer);
|
|
738
|
+
return {
|
|
739
|
+
...(address == null ? void 0 : address.line1) && { line1: address.line1 },
|
|
740
|
+
...(address == null ? void 0 : address.line2) && { line2: address.line2 },
|
|
741
|
+
...(address == null ? void 0 : address.city) && { city: address.city },
|
|
742
|
+
...(address == null ? void 0 : address.state) && { state: address.state },
|
|
743
|
+
country: (address == null ? void 0 : address.country) || EMPTY_COUNTRY,
|
|
744
|
+
...(address == null ? void 0 : address.postal_code) && { postal_code: address.postal_code }
|
|
745
|
+
};
|
|
493
746
|
};
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
categories.forEach((category) => {
|
|
512
|
-
var _a;
|
|
513
|
-
(_a = category.pricings) == null ? void 0 : _a.forEach((pricing) => {
|
|
514
|
-
var _a2;
|
|
515
|
-
(_a2 = pricing.items) == null ? void 0 : _a2.forEach((item) => {
|
|
516
|
-
var _a3;
|
|
517
|
-
(_a3 = item.pricing_currency_configs) == null ? void 0 : _a3.forEach((currencyConfig) => {
|
|
518
|
-
var _a4, _b;
|
|
519
|
-
const currency = currencyConfig.currency;
|
|
520
|
-
(_a4 = currencyConfig.billing_period_configs) == null ? void 0 : _a4.forEach((billingConfig) => {
|
|
521
|
-
var _a5;
|
|
522
|
-
(_a5 = billingConfig.configs) == null ? void 0 : _a5.forEach((config) => {
|
|
523
|
-
if (config.id) {
|
|
524
|
-
metaById.set(config.id, {
|
|
525
|
-
currency,
|
|
526
|
-
billingPeriod: billingConfig.billing_period
|
|
527
|
-
});
|
|
528
|
-
}
|
|
529
|
-
});
|
|
530
|
-
});
|
|
531
|
-
(_b = currencyConfig.configs) == null ? void 0 : _b.forEach((config) => {
|
|
532
|
-
if (config.id) {
|
|
533
|
-
metaById.set(config.id, { currency });
|
|
534
|
-
}
|
|
535
|
-
});
|
|
536
|
-
});
|
|
537
|
-
});
|
|
538
|
-
});
|
|
539
|
-
});
|
|
540
|
-
return metaById;
|
|
541
|
-
}
|
|
542
|
-
function getScheduleCustomizations({
|
|
543
|
-
enabledPricings,
|
|
544
|
-
seatsValues,
|
|
545
|
-
pricingPlanScheduleInfos,
|
|
546
|
-
pricingCurrency,
|
|
547
|
-
billingPeriod
|
|
548
|
-
}) {
|
|
549
|
-
const subscriptionSchedule = getFirstPricingPlanScheduleOfType({
|
|
550
|
-
pricingPlanScheduleInfos,
|
|
551
|
-
type: "DEFAULT"
|
|
552
|
-
});
|
|
553
|
-
if (!subscriptionSchedule || !enabledPricings && !seatsValues) {
|
|
554
|
-
return void 0;
|
|
747
|
+
const buildCustomerPayload = (customer) => {
|
|
748
|
+
var _a, _b;
|
|
749
|
+
const address = buildAddress(customer);
|
|
750
|
+
const type = customer.type ?? "INDIVIDUAL";
|
|
751
|
+
if (type === "ORGANIZATION") {
|
|
752
|
+
const organization = "organization" in customer ? customer.organization : void 0;
|
|
753
|
+
const organizationTaxId = (_b = (_a = organization == null ? void 0 : organization.tax_ids) == null ? void 0 : _a[0]) == null ? void 0 : _b.id;
|
|
754
|
+
return {
|
|
755
|
+
type,
|
|
756
|
+
organization: {
|
|
757
|
+
legal_name: (organization == null ? void 0 : organization.legal_name) || EMPTY_LEGAL_ENTITY_NAME,
|
|
758
|
+
registered_address: address,
|
|
759
|
+
...organizationTaxId && {
|
|
760
|
+
tax_id: taxId.$validator(organizationTaxId, {}, {}) ? organizationTaxId : void 0
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
};
|
|
555
764
|
}
|
|
556
|
-
return
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
seats_values: seatsValues == null ? void 0 : seatsValues.map(({ pricing_item_config_id, number }) => ({
|
|
561
|
-
pricing_item_config_id,
|
|
562
|
-
number
|
|
563
|
-
})),
|
|
564
|
-
...pricingCurrency && { pricing_currency: pricingCurrency },
|
|
565
|
-
...billingPeriod && { billing_period: billingPeriod }
|
|
765
|
+
return {
|
|
766
|
+
type,
|
|
767
|
+
individual: {
|
|
768
|
+
residential_address: address
|
|
566
769
|
}
|
|
567
|
-
|
|
568
|
-
}
|
|
770
|
+
};
|
|
771
|
+
};
|
|
569
772
|
const COUNTRY_CURRENCY_MAP = {
|
|
570
773
|
AD: "EUR",
|
|
571
774
|
AE: "AED",
|
|
@@ -833,10 +1036,9 @@ const getPricingCurrencyForCountry = ({
|
|
|
833
1036
|
}
|
|
834
1037
|
return (pricingCurrencySettings == null ? void 0 : pricingCurrencySettings.default_pricing_currency) ?? fallbackCurrency ?? countryCurrency;
|
|
835
1038
|
};
|
|
836
|
-
const EMPTY_LEGAL_ENTITY_NAME = "preview";
|
|
837
|
-
const EMPTY_COUNTRY = "NL";
|
|
838
1039
|
const useInvoicePreview = () => {
|
|
839
1040
|
const { getInvoicePreview } = createInvoicesService();
|
|
1041
|
+
const logger = useLogger();
|
|
840
1042
|
const trialPeriod = ref();
|
|
841
1043
|
const trialInvoicePreview = ref();
|
|
842
1044
|
const invoicePreview = ref();
|
|
@@ -848,19 +1050,13 @@ const useInvoicePreview = () => {
|
|
|
848
1050
|
const loadInvoicePreview = async ({
|
|
849
1051
|
subscription,
|
|
850
1052
|
subscriptionStartAt,
|
|
851
|
-
|
|
1053
|
+
customer = {},
|
|
1054
|
+
seatsValues,
|
|
852
1055
|
enabledPricingIds,
|
|
853
1056
|
promotionCode
|
|
854
1057
|
}) => {
|
|
855
|
-
var _a, _b, _c, _d, _e;
|
|
856
|
-
const
|
|
857
|
-
...checkoutForm.addressLine1 && { line1: checkoutForm.addressLine1 },
|
|
858
|
-
...checkoutForm.addressLine2 && { line2: checkoutForm.addressLine2 },
|
|
859
|
-
...checkoutForm.city && { city: checkoutForm.city },
|
|
860
|
-
...checkoutForm.state && { state: checkoutForm.state },
|
|
861
|
-
...checkoutForm.country ? { country: checkoutForm.country || EMPTY_COUNTRY } : { country: EMPTY_COUNTRY },
|
|
862
|
-
...checkoutForm.postalCode && { postal_code: checkoutForm.postalCode }
|
|
863
|
-
};
|
|
1058
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1059
|
+
const customerPayload = buildCustomerPayload(customer);
|
|
864
1060
|
status.value = ApiStatus.Loading;
|
|
865
1061
|
const scheduleInfo = getFirstPricingPlanScheduleOfType({
|
|
866
1062
|
pricingPlanScheduleInfos: subscription.pricing_plan_schedule_infos,
|
|
@@ -872,11 +1068,14 @@ const useInvoicePreview = () => {
|
|
|
872
1068
|
const hasMultipleBillingPeriods = billingPeriods.length > 1;
|
|
873
1069
|
const periodsForPreview = billingPeriods.length > 0 ? billingPeriods.map(({ period }) => period) : subscription.billing_period ? [subscription.billing_period] : [];
|
|
874
1070
|
const pricingCurrency = getPricingCurrencyForCountry({
|
|
875
|
-
country:
|
|
1071
|
+
country: (_e = getCustomerAddress(customer)) == null ? void 0 : _e.country,
|
|
876
1072
|
pricingCurrencySettings,
|
|
877
1073
|
fallbackCurrency: subscription.billing_currency
|
|
878
1074
|
});
|
|
879
1075
|
if (!periodsForPreview.length) {
|
|
1076
|
+
logger.warn("INVOICE_PREVIEW_SKIPPED", "No billing period to preview an invoice for", {
|
|
1077
|
+
subscriptionId: subscription.id
|
|
1078
|
+
});
|
|
880
1079
|
status.value = ApiStatus.Done;
|
|
881
1080
|
return;
|
|
882
1081
|
}
|
|
@@ -888,7 +1087,7 @@ const useInvoicePreview = () => {
|
|
|
888
1087
|
enabledPricings: enabledPricingIds == null ? void 0 : enabledPricingIds.map((enabledPricingId) => ({
|
|
889
1088
|
pricing_id: enabledPricingId
|
|
890
1089
|
})),
|
|
891
|
-
seatsValues
|
|
1090
|
+
seatsValues,
|
|
892
1091
|
pricingPlanScheduleInfos: subscription.pricing_plan_schedule_infos,
|
|
893
1092
|
pricingCurrency: hasMultiplePricingCurrencies ? pricingCurrency : void 0,
|
|
894
1093
|
billingPeriod: hasMultipleBillingPeriods ? period : void 0
|
|
@@ -915,26 +1114,10 @@ const useInvoicePreview = () => {
|
|
|
915
1114
|
pricingPlanSubscriptionId: subscription.id,
|
|
916
1115
|
startAt: subscriptionStartAt,
|
|
917
1116
|
customizations: scheduleCustomizations,
|
|
918
|
-
customer:
|
|
919
|
-
type: checkoutForm.type || "INDIVIDUAL",
|
|
920
|
-
...checkoutForm.type === "INDIVIDUAL" && {
|
|
921
|
-
individual: {
|
|
922
|
-
residential_address: address
|
|
923
|
-
}
|
|
924
|
-
},
|
|
925
|
-
...checkoutForm.type === "ORGANIZATION" && {
|
|
926
|
-
organization: {
|
|
927
|
-
legal_name: checkoutForm.companyLegalName || EMPTY_LEGAL_ENTITY_NAME,
|
|
928
|
-
registered_address: address,
|
|
929
|
-
...checkoutForm.companyVatNumber && {
|
|
930
|
-
tax_id: taxId.$validator(checkoutForm.companyVatNumber, {}, {}) ? checkoutForm.companyVatNumber : void 0
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
}
|
|
1117
|
+
customer: customerPayload
|
|
935
1118
|
};
|
|
936
1119
|
const cachedPayload = cachedPreviewPayloads.value[periodKey];
|
|
937
|
-
if (cachedPayload &&
|
|
1120
|
+
if (cachedPayload && isEqual(payload, cachedPayload)) {
|
|
938
1121
|
return { periodKey, response: void 0 };
|
|
939
1122
|
}
|
|
940
1123
|
cachedPreviewPayloads.value = {
|
|
@@ -952,9 +1135,9 @@ const useInvoicePreview = () => {
|
|
|
952
1135
|
const trialSchedule = subscription.pricing_plan_schedule_infos.find(
|
|
953
1136
|
({ pricing_plan_schedule }) => pricing_plan_schedule.type === "TRIAL"
|
|
954
1137
|
);
|
|
955
|
-
const invoiceScheduleId = (
|
|
1138
|
+
const invoiceScheduleId = (_f = subscription.pricing_plan_schedule_infos.find(
|
|
956
1139
|
({ pricing_plan_schedule }) => pricing_plan_schedule.type === "DEFAULT"
|
|
957
|
-
)) == null ? void 0 :
|
|
1140
|
+
)) == null ? void 0 : _f.id;
|
|
958
1141
|
results.forEach(({ periodKey, response }) => {
|
|
959
1142
|
var _a2;
|
|
960
1143
|
if (!response) return;
|
|
@@ -980,6 +1163,7 @@ const useInvoicePreview = () => {
|
|
|
980
1163
|
invoicePreview.value = updatedPreviews[selectedPeriodKey];
|
|
981
1164
|
} catch (error) {
|
|
982
1165
|
status.value = ApiStatus.Failed;
|
|
1166
|
+
logger.error("INVOICE_PREVIEW_FAILED", "Failed to load invoice preview", {}, error);
|
|
983
1167
|
throw error;
|
|
984
1168
|
} finally {
|
|
985
1169
|
status.value = ApiStatus.Done;
|
|
@@ -996,6 +1180,7 @@ const useInvoicePreview = () => {
|
|
|
996
1180
|
};
|
|
997
1181
|
};
|
|
998
1182
|
const DEFAULT_REQUIRED_FIELDS = ["email", "country"];
|
|
1183
|
+
const DEFAULT_TAX_IDENTIFIER_TYPE = "GENERIC_TAX_ID";
|
|
999
1184
|
const countrySpecificRequiredFieldsMap = {
|
|
1000
1185
|
US: ["addressLine1", "postalCode"],
|
|
1001
1186
|
CA: ["state"]
|
|
@@ -1006,6 +1191,34 @@ const getRequiredFieldsForCountry = (country) => {
|
|
|
1006
1191
|
}
|
|
1007
1192
|
return [...countrySpecificRequiredFieldsMap[country], ...DEFAULT_REQUIRED_FIELDS];
|
|
1008
1193
|
};
|
|
1194
|
+
const toCustomer = (state) => {
|
|
1195
|
+
const address = {
|
|
1196
|
+
...state.addressLine1 && { line1: state.addressLine1 },
|
|
1197
|
+
...state.addressLine2 && { line2: state.addressLine2 },
|
|
1198
|
+
...state.city && { city: state.city },
|
|
1199
|
+
...state.state && { state: state.state },
|
|
1200
|
+
...state.postalCode && { postal_code: state.postalCode },
|
|
1201
|
+
country: state.country ?? ""
|
|
1202
|
+
};
|
|
1203
|
+
if (state.type === "ORGANIZATION") {
|
|
1204
|
+
return {
|
|
1205
|
+
type: "ORGANIZATION",
|
|
1206
|
+
organization: {
|
|
1207
|
+
legal_name: state.companyLegalName ?? "",
|
|
1208
|
+
registered_address: address,
|
|
1209
|
+
...state.companyVatNumber && {
|
|
1210
|
+
tax_ids: [{ id: state.companyVatNumber, type: DEFAULT_TAX_IDENTIFIER_TYPE }]
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
};
|
|
1214
|
+
}
|
|
1215
|
+
return {
|
|
1216
|
+
type: "INDIVIDUAL",
|
|
1217
|
+
individual: {
|
|
1218
|
+
residential_address: address
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
};
|
|
1009
1222
|
function createGeoLocationService() {
|
|
1010
1223
|
return {
|
|
1011
1224
|
/**
|
|
@@ -1025,7 +1238,7 @@ function useCheckoutForm({
|
|
|
1025
1238
|
const updateInitialState = (state) => {
|
|
1026
1239
|
const newState = getInitialState({ ...form.value, ...state });
|
|
1027
1240
|
form.value = newState;
|
|
1028
|
-
initialFormState.value =
|
|
1241
|
+
initialFormState.value = structuredClone(newState);
|
|
1029
1242
|
};
|
|
1030
1243
|
const requiredFields = computed(
|
|
1031
1244
|
() => getRequiredFieldsForCountry(form.value.country)
|
|
@@ -1076,9 +1289,11 @@ function useCheckoutForm({
|
|
|
1076
1289
|
onMounted(async () => {
|
|
1077
1290
|
await getCountryFromGeoLocationService(initialState == null ? void 0 : initialState.country);
|
|
1078
1291
|
});
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1292
|
+
useWatchDebounced(
|
|
1293
|
+
() => JSON.parse(JSON.stringify(form.value)),
|
|
1294
|
+
handleFormChange,
|
|
1295
|
+
{ debounce: 200 }
|
|
1296
|
+
);
|
|
1082
1297
|
return {
|
|
1083
1298
|
form,
|
|
1084
1299
|
validation,
|
|
@@ -1110,115 +1325,6 @@ const getInitialState = (initialState = {}) => {
|
|
|
1110
1325
|
function isCheckoutFormStateKey(key) {
|
|
1111
1326
|
return key in getInitialState();
|
|
1112
1327
|
}
|
|
1113
|
-
const usePaymentMethodOptions = () => {
|
|
1114
|
-
const cachedPayload = ref();
|
|
1115
|
-
const { getPaymentMethodOptions } = createPaymentMethodsService();
|
|
1116
|
-
const initialValue = [];
|
|
1117
|
-
const { data: paymentMethodOptions, execute, isPending } = useService({
|
|
1118
|
-
initialValue,
|
|
1119
|
-
service: getPaymentMethodOptions
|
|
1120
|
-
});
|
|
1121
|
-
const loadPaymentMethodOptions = async ({
|
|
1122
|
-
subscriptionId,
|
|
1123
|
-
country,
|
|
1124
|
-
amount
|
|
1125
|
-
}) => {
|
|
1126
|
-
const payload = {
|
|
1127
|
-
subscriptionId,
|
|
1128
|
-
country,
|
|
1129
|
-
amount
|
|
1130
|
-
};
|
|
1131
|
-
if (lodashExports.isEqual(payload, cachedPayload.value)) {
|
|
1132
|
-
return;
|
|
1133
|
-
}
|
|
1134
|
-
cachedPayload.value = payload;
|
|
1135
|
-
await execute(payload);
|
|
1136
|
-
};
|
|
1137
|
-
return {
|
|
1138
|
-
loadPaymentMethodOptions,
|
|
1139
|
-
paymentMethodOptions,
|
|
1140
|
-
isPending
|
|
1141
|
-
};
|
|
1142
|
-
};
|
|
1143
|
-
function findPricingsByIds(data, ids) {
|
|
1144
|
-
const results = [];
|
|
1145
|
-
function recurse(obj) {
|
|
1146
|
-
if (Array.isArray(obj)) {
|
|
1147
|
-
obj.forEach(recurse);
|
|
1148
|
-
} else if (obj && typeof obj === "object") {
|
|
1149
|
-
if (obj.object_type === "PRICING" && ids.includes(obj.id)) {
|
|
1150
|
-
results.push(obj);
|
|
1151
|
-
}
|
|
1152
|
-
Object.values(obj).forEach(recurse);
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
recurse(data);
|
|
1156
|
-
return results;
|
|
1157
|
-
}
|
|
1158
|
-
function getPricingGroupsFromExtendedPricingPlanSubscription(subscription) {
|
|
1159
|
-
return subscription.pricing_plan_schedule_infos.flatMap(
|
|
1160
|
-
(info) => {
|
|
1161
|
-
var _a;
|
|
1162
|
-
return ((_a = info.pricing_plan_version.pricing_categories) == null ? void 0 : _a.flatMap(
|
|
1163
|
-
(category) => category.pricing_groups ?? []
|
|
1164
|
-
)) ?? [];
|
|
1165
|
-
}
|
|
1166
|
-
);
|
|
1167
|
-
}
|
|
1168
|
-
function getFallbackTrialAndSubscriptionStartAndEndDates(subscription) {
|
|
1169
|
-
var _a;
|
|
1170
|
-
const result = {
|
|
1171
|
-
trialStartDate: void 0,
|
|
1172
|
-
trialEndDate: void 0,
|
|
1173
|
-
subscriptionStartDate: void 0,
|
|
1174
|
-
subscriptionEndDate: void 0
|
|
1175
|
-
};
|
|
1176
|
-
if (!((_a = subscription == null ? void 0 : subscription.pricing_plan_schedule_infos) == null ? void 0 : _a.length)) {
|
|
1177
|
-
return result;
|
|
1178
|
-
}
|
|
1179
|
-
const now = /* @__PURE__ */ new Date();
|
|
1180
|
-
const trialSchedule = getFirstPricingPlanScheduleOfType({
|
|
1181
|
-
type: "TRIAL",
|
|
1182
|
-
pricingPlanScheduleInfos: subscription.pricing_plan_schedule_infos
|
|
1183
|
-
});
|
|
1184
|
-
if (trialSchedule == null ? void 0 : trialSchedule.start_at) {
|
|
1185
|
-
result.trialStartDate = now;
|
|
1186
|
-
if (trialSchedule.end_at) {
|
|
1187
|
-
const diff = new Date(trialSchedule.end_at).getTime() - new Date(trialSchedule.start_at).getTime();
|
|
1188
|
-
result.trialEndDate = new Date(now.getTime() + diff);
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
const subscriptionSchedule = getFirstPricingPlanScheduleOfType({
|
|
1192
|
-
type: "DEFAULT",
|
|
1193
|
-
pricingPlanScheduleInfos: subscription.pricing_plan_schedule_infos
|
|
1194
|
-
});
|
|
1195
|
-
if (subscriptionSchedule == null ? void 0 : subscriptionSchedule.start_at) {
|
|
1196
|
-
if (result.trialEndDate) {
|
|
1197
|
-
result.subscriptionStartDate = result.trialEndDate;
|
|
1198
|
-
} else {
|
|
1199
|
-
result.subscriptionStartDate = now;
|
|
1200
|
-
}
|
|
1201
|
-
if (subscriptionSchedule.end_at) {
|
|
1202
|
-
const diff = new Date(subscriptionSchedule.end_at).getTime() - new Date(subscriptionSchedule.start_at).getTime();
|
|
1203
|
-
result.subscriptionEndDate = new Date(now.getTime() + diff);
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
return result;
|
|
1207
|
-
}
|
|
1208
|
-
function getAllPricingsFromScheduleInfos(scheduleInfos) {
|
|
1209
|
-
return scheduleInfos.flatMap(
|
|
1210
|
-
(scheduleInfo) => {
|
|
1211
|
-
var _a;
|
|
1212
|
-
return ((_a = scheduleInfo.pricing_plan_version.pricing_categories) == null ? void 0 : _a.flatMap(
|
|
1213
|
-
(category) => category.pricings ?? []
|
|
1214
|
-
)) ?? [];
|
|
1215
|
-
}
|
|
1216
|
-
);
|
|
1217
|
-
}
|
|
1218
|
-
function getNameFromPricing(pricing) {
|
|
1219
|
-
var _a, _b;
|
|
1220
|
-
return !isEmpty(pricing.name) ? pricing.name : (_b = (_a = pricing.products) == null ? void 0 : _a[0]) == null ? void 0 : _b.name;
|
|
1221
|
-
}
|
|
1222
1328
|
function withPreselectedEnabledPricings(subscription, enabledPricingIds = void 0) {
|
|
1223
1329
|
const result = enabledPricingIds ?? [];
|
|
1224
1330
|
const pricingGroups = getPricingGroupsFromExtendedPricingPlanSubscription(subscription);
|
|
@@ -1244,13 +1350,49 @@ function isSubscriptionWithAddonProducts(subscription) {
|
|
|
1244
1350
|
const pricingGroups = getPricingGroupsFromExtendedPricingPlanSubscription(subscription);
|
|
1245
1351
|
return pricings.some((pricing) => pricing.product_type === "ADDON") || pricingGroups.some((pricingGroup) => pricingGroup.object_type === "ADDON");
|
|
1246
1352
|
}
|
|
1247
|
-
const
|
|
1353
|
+
const FALLBACK_SEATS_NUMBER = "1";
|
|
1354
|
+
const getConfigsOfBillingPeriods = (billingPeriodConfigs) => (billingPeriodConfigs ?? []).flatMap(
|
|
1355
|
+
(billingPeriodConfig) => billingPeriodConfig.configs ?? []
|
|
1356
|
+
);
|
|
1357
|
+
const getPricingItemConfigs = (item) => [
|
|
1358
|
+
...item.configs ?? [],
|
|
1359
|
+
...getConfigsOfBillingPeriods(item.billing_period_configs),
|
|
1360
|
+
...(item.pricing_currency_configs ?? []).flatMap((currencyConfig) => [
|
|
1361
|
+
...currencyConfig.configs ?? [],
|
|
1362
|
+
...getConfigsOfBillingPeriods(currencyConfig.billing_period_configs)
|
|
1363
|
+
])
|
|
1364
|
+
];
|
|
1365
|
+
function getDefaultSeatsNumbersById(scheduleInfo) {
|
|
1366
|
+
const configs = getPricingsFromScheduleInfo(scheduleInfo).flatMap((pricing) => pricing.items ?? []).flatMap(getPricingItemConfigs);
|
|
1367
|
+
return new Map(
|
|
1368
|
+
configs.flatMap(
|
|
1369
|
+
(config) => {
|
|
1370
|
+
var _a;
|
|
1371
|
+
return ((_a = config.default_seats_value) == null ? void 0 : _a.number) ? [[config.id, config.default_seats_value.number]] : [];
|
|
1372
|
+
}
|
|
1373
|
+
)
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
function getInitialSeatsValues(scheduleInfo) {
|
|
1377
|
+
var _a;
|
|
1378
|
+
const seatsValues = (_a = scheduleInfo == null ? void 0 : scheduleInfo.pricing_plan_schedule) == null ? void 0 : _a.seats_values;
|
|
1379
|
+
if (!scheduleInfo || !(seatsValues == null ? void 0 : seatsValues.length)) {
|
|
1380
|
+
return void 0;
|
|
1381
|
+
}
|
|
1382
|
+
const defaultNumbers = scheduleInfo.pricing_plan_version ? getDefaultSeatsNumbersById(scheduleInfo) : /* @__PURE__ */ new Map();
|
|
1383
|
+
return seatsValues.map(({ pricing_item_config_id, number }) => ({
|
|
1384
|
+
pricing_item_config_id,
|
|
1385
|
+
number: number || defaultNumbers.get(pricing_item_config_id) || FALLBACK_SEATS_NUMBER
|
|
1386
|
+
}));
|
|
1387
|
+
}
|
|
1388
|
+
const REDIRECT_FORM_STATE_KEY = "solvimon_checkout_redirect_state";
|
|
1248
1389
|
function useCheckoutView({
|
|
1249
1390
|
initialCountry,
|
|
1250
1391
|
initialEmail,
|
|
1251
1392
|
subscriptionId,
|
|
1252
1393
|
enabledPricingIds
|
|
1253
1394
|
}) {
|
|
1395
|
+
const logger = useLogger();
|
|
1254
1396
|
const isPaid = ref(false);
|
|
1255
1397
|
const subscription = ref();
|
|
1256
1398
|
const { getSubscription } = createSubscriptionsService();
|
|
@@ -1260,27 +1402,52 @@ function useCheckoutView({
|
|
|
1260
1402
|
});
|
|
1261
1403
|
const {
|
|
1262
1404
|
paymentMethodOptions,
|
|
1263
|
-
loadPaymentMethodOptions,
|
|
1264
|
-
isPending: isPaymentMethodsPending
|
|
1405
|
+
get: loadPaymentMethodOptions,
|
|
1406
|
+
isPending: isPaymentMethodsPending,
|
|
1407
|
+
error: paymentMethodOptionsError
|
|
1265
1408
|
} = usePaymentMethodOptions();
|
|
1409
|
+
const loadPaymentMethodOptionsFor = async (country, amountValue) => {
|
|
1410
|
+
try {
|
|
1411
|
+
await loadPaymentMethodOptions({
|
|
1412
|
+
subscriptionId: subscription.value.id,
|
|
1413
|
+
country,
|
|
1414
|
+
amount: amountValue
|
|
1415
|
+
});
|
|
1416
|
+
} catch {
|
|
1417
|
+
logger.error(
|
|
1418
|
+
"PAYMENT_METHOD_OPTIONS_LOAD_FAILED",
|
|
1419
|
+
"Failed to load the payment methods the checkout can offer",
|
|
1420
|
+
{},
|
|
1421
|
+
paymentMethodOptionsError.value
|
|
1422
|
+
);
|
|
1423
|
+
}
|
|
1424
|
+
};
|
|
1425
|
+
const hasPaymentMethodOptionsError = computed(() => paymentMethodOptionsError.value !== null);
|
|
1426
|
+
const loadPaymentMethodOptionsIfReady = () => {
|
|
1427
|
+
const { country } = checkoutForm.form.value;
|
|
1428
|
+
if (!subscription.value || !country || !amount.value) {
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
void loadPaymentMethodOptionsFor(country, amount.value);
|
|
1432
|
+
};
|
|
1266
1433
|
const loadInvoicePreview = () => {
|
|
1267
|
-
const
|
|
1434
|
+
const formState = checkoutForm.form.value;
|
|
1435
|
+
return invoicePreview.loadInvoicePreview({
|
|
1268
1436
|
subscription: subscription.value,
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
payload.enabledPricingIds = checkoutForm.form.value.enabledPricingIds;
|
|
1275
|
-
}
|
|
1276
|
-
return invoicePreview.loadInvoicePreview(payload);
|
|
1437
|
+
customer: toCustomer(formState),
|
|
1438
|
+
seatsValues: formState.seatsValues,
|
|
1439
|
+
enabledPricingIds: formState.enabledPricingIds ?? enabledPricingIds,
|
|
1440
|
+
promotionCode: formState.promotionCode
|
|
1441
|
+
});
|
|
1277
1442
|
};
|
|
1278
1443
|
const updateInvoicePreviewOnBillingInformationChange = async (formState) => {
|
|
1279
1444
|
const promotionCode = formState.promotionCode ?? checkoutForm.form.value.promotionCode;
|
|
1280
1445
|
const enabledPricingIds2 = formState.enabledPricingIds ?? checkoutForm.form.value.enabledPricingIds;
|
|
1446
|
+
const mergedState = { ...checkoutForm.form.value, ...formState };
|
|
1281
1447
|
await invoicePreview.loadInvoicePreview({
|
|
1282
1448
|
subscription: subscription.value,
|
|
1283
|
-
|
|
1449
|
+
customer: toCustomer(mergedState),
|
|
1450
|
+
seatsValues: mergedState.seatsValues,
|
|
1284
1451
|
enabledPricingIds: enabledPricingIds2,
|
|
1285
1452
|
promotionCode
|
|
1286
1453
|
});
|
|
@@ -1303,7 +1470,7 @@ function useCheckoutView({
|
|
|
1303
1470
|
}
|
|
1304
1471
|
});
|
|
1305
1472
|
const loadSubscription = async () => {
|
|
1306
|
-
var _a, _b, _c, _d
|
|
1473
|
+
var _a, _b, _c, _d;
|
|
1307
1474
|
const response = await getSubscription({
|
|
1308
1475
|
id: subscriptionId,
|
|
1309
1476
|
expanded: true
|
|
@@ -1317,17 +1484,11 @@ function useCheckoutView({
|
|
|
1317
1484
|
...response,
|
|
1318
1485
|
billing_period: defaultBillingPeriod ?? response.billing_period
|
|
1319
1486
|
};
|
|
1487
|
+
const seatsValues = getInitialSeatsValues(subscriptionSchedule);
|
|
1320
1488
|
checkoutForm.updateInitialState({
|
|
1321
1489
|
...checkoutForm.form.value,
|
|
1322
1490
|
enabledPricingIds: withPreselectedEnabledPricings(response, enabledPricingIds),
|
|
1323
|
-
...
|
|
1324
|
-
seatsValues: (_f = subscriptionSchedule == null ? void 0 : subscriptionSchedule.pricing_plan_schedule) == null ? void 0 : _f.seats_values.map(
|
|
1325
|
-
({ pricing_item_config_id, number }) => ({
|
|
1326
|
-
pricing_item_config_id,
|
|
1327
|
-
number
|
|
1328
|
-
})
|
|
1329
|
-
)
|
|
1330
|
-
} : {}
|
|
1491
|
+
...seatsValues ? { seatsValues } : {}
|
|
1331
1492
|
});
|
|
1332
1493
|
};
|
|
1333
1494
|
const authorizationContext = computed(() => {
|
|
@@ -1442,29 +1603,60 @@ function useCheckoutView({
|
|
|
1442
1603
|
if (!subscription.value || !country || !amountValue) {
|
|
1443
1604
|
return;
|
|
1444
1605
|
}
|
|
1445
|
-
void
|
|
1446
|
-
subscriptionId: subscription.value.id,
|
|
1447
|
-
country,
|
|
1448
|
-
amount: amountValue
|
|
1449
|
-
});
|
|
1606
|
+
void loadPaymentMethodOptionsFor(country, amountValue);
|
|
1450
1607
|
}
|
|
1451
1608
|
);
|
|
1609
|
+
function saveFormStateForRedirect() {
|
|
1610
|
+
sessionStorage.setItem(REDIRECT_FORM_STATE_KEY, JSON.stringify(checkoutForm.form.value));
|
|
1611
|
+
}
|
|
1452
1612
|
onMounted(async () => {
|
|
1453
|
-
|
|
1613
|
+
const redirectStatus = getQueryParam("redirect_status");
|
|
1614
|
+
const hasPaymentAcceptorId = !!getQueryParam(PAYMENT_ACCEPTOR_ID_QUERY_STRING);
|
|
1615
|
+
const hasClientSecret = !!getQueryParam("payment_intent_client_secret") || !!getQueryParam("setup_intent_client_secret");
|
|
1616
|
+
const isSuccessfulRedirect = redirectStatus === "succeeded" && hasPaymentAcceptorId && hasClientSecret;
|
|
1617
|
+
if (isSuccessfulRedirect) {
|
|
1618
|
+
isPaid.value = true;
|
|
1619
|
+
}
|
|
1620
|
+
const raw = sessionStorage.getItem(REDIRECT_FORM_STATE_KEY);
|
|
1621
|
+
let savedFormState = null;
|
|
1622
|
+
if (raw) {
|
|
1623
|
+
try {
|
|
1624
|
+
savedFormState = JSON.parse(raw);
|
|
1625
|
+
} catch {
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
if (savedFormState) {
|
|
1629
|
+
checkoutForm.updateInitialState(savedFormState);
|
|
1630
|
+
}
|
|
1631
|
+
try {
|
|
1632
|
+
await loadSubscription();
|
|
1633
|
+
} catch (error) {
|
|
1634
|
+
logger.error(
|
|
1635
|
+
"SUBSCRIPTION_LOAD_FAILED",
|
|
1636
|
+
"Failed to load the subscription the checkout prices",
|
|
1637
|
+
{},
|
|
1638
|
+
error
|
|
1639
|
+
);
|
|
1640
|
+
throw error;
|
|
1641
|
+
}
|
|
1454
1642
|
try {
|
|
1455
1643
|
await loadInvoicePreview();
|
|
1456
1644
|
} catch {
|
|
1457
1645
|
}
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
void loadPaymentMethodOptions({
|
|
1462
|
-
subscriptionId: subscription.value.id,
|
|
1463
|
-
country: checkoutForm.form.value.country,
|
|
1464
|
-
amount: amount.value
|
|
1465
|
-
});
|
|
1646
|
+
if (savedFormState) {
|
|
1647
|
+
checkoutForm.updateInitialState(savedFormState);
|
|
1648
|
+
sessionStorage.removeItem(REDIRECT_FORM_STATE_KEY);
|
|
1466
1649
|
}
|
|
1467
1650
|
});
|
|
1651
|
+
watch(
|
|
1652
|
+
shouldLoadPaymentMethodOptions,
|
|
1653
|
+
(shouldLoad) => {
|
|
1654
|
+
if (shouldLoad) {
|
|
1655
|
+
loadPaymentMethodOptionsIfReady();
|
|
1656
|
+
}
|
|
1657
|
+
},
|
|
1658
|
+
{ once: true }
|
|
1659
|
+
);
|
|
1468
1660
|
return {
|
|
1469
1661
|
invoicePreview: invoicePreview.invoicePreview,
|
|
1470
1662
|
invoicePreviewByBillingPeriod: invoicePreview.invoicePreviewByBillingPeriod,
|
|
@@ -1474,23 +1666,26 @@ function useCheckoutView({
|
|
|
1474
1666
|
updateInvoicePreviewOnBillingInformationChange,
|
|
1475
1667
|
lastPreviewScheduleId: invoicePreview.lastPreviewScheduleId,
|
|
1476
1668
|
paymentMethodOptions,
|
|
1669
|
+
hasPaymentMethodOptionsError,
|
|
1670
|
+
retryPaymentMethodOptions: loadPaymentMethodOptionsIfReady,
|
|
1477
1671
|
isPaymentMethodsPending,
|
|
1478
1672
|
isInvoicePreviewPending: invoicePreview.isPending,
|
|
1479
1673
|
subscription,
|
|
1480
1674
|
checkoutForm,
|
|
1481
1675
|
authorizationContext,
|
|
1482
1676
|
isPaid,
|
|
1483
|
-
amount
|
|
1677
|
+
amount,
|
|
1678
|
+
saveFormStateForRedirect
|
|
1484
1679
|
};
|
|
1485
1680
|
}
|
|
1486
1681
|
function usePromotionCode({
|
|
1487
1682
|
checkoutForm,
|
|
1488
1683
|
updateInvoicePreviewOnBillingInformationChange,
|
|
1489
|
-
logger,
|
|
1490
1684
|
formatErrorMessage,
|
|
1491
1685
|
onInvalidPromotionCode,
|
|
1492
1686
|
onApplyError
|
|
1493
1687
|
}) {
|
|
1688
|
+
const logger = useLogger();
|
|
1494
1689
|
const isPromotionCodePending = ref(false);
|
|
1495
1690
|
const promotionCodeErrorMessage = ref(null);
|
|
1496
1691
|
const setErrorMessage = (action, error) => {
|
|
@@ -1512,7 +1707,7 @@ function usePromotionCode({
|
|
|
1512
1707
|
promotionCode: normalizedCode
|
|
1513
1708
|
});
|
|
1514
1709
|
} catch (error) {
|
|
1515
|
-
logger
|
|
1710
|
+
logger.capture(error, {
|
|
1516
1711
|
code: "PROMOTION_CODE_APPLY_FAILED",
|
|
1517
1712
|
message: "Failed to apply promotion code"
|
|
1518
1713
|
});
|
|
@@ -1538,7 +1733,7 @@ function usePromotionCode({
|
|
|
1538
1733
|
try {
|
|
1539
1734
|
await updateInvoicePreviewOnBillingInformationChange({});
|
|
1540
1735
|
} catch (error) {
|
|
1541
|
-
logger
|
|
1736
|
+
logger.capture(error, {
|
|
1542
1737
|
code: "PROMOTION_CODE_REMOVE_FAILED",
|
|
1543
1738
|
message: "Failed to remove promotion code"
|
|
1544
1739
|
});
|
|
@@ -1559,30 +1754,143 @@ function usePromotionCode({
|
|
|
1559
1754
|
function isFieldError(error) {
|
|
1560
1755
|
return typeof error === "object" && error !== null && "field" in error;
|
|
1561
1756
|
}
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1757
|
+
function useAutoApplyPromotionCode({
|
|
1758
|
+
subscription,
|
|
1759
|
+
promotionCode,
|
|
1760
|
+
appliedPromotionCode,
|
|
1761
|
+
applyPromotionCode
|
|
1762
|
+
}) {
|
|
1763
|
+
watch(
|
|
1764
|
+
subscription,
|
|
1765
|
+
(loadedSubscription) => {
|
|
1766
|
+
if (loadedSubscription && promotionCode) {
|
|
1767
|
+
appliedPromotionCode.value = promotionCode;
|
|
1768
|
+
void applyPromotionCode(promotionCode);
|
|
1769
|
+
}
|
|
1770
|
+
},
|
|
1771
|
+
{ once: true }
|
|
1772
|
+
);
|
|
1773
|
+
}
|
|
1774
|
+
const _hoisted_1$j = { class: "flex items-center gap-2" };
|
|
1775
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
1776
|
+
__name: "TaxIDCheckNotice",
|
|
1777
|
+
props: {
|
|
1778
|
+
taxIdValidationResult: { type: Object }
|
|
1779
|
+
},
|
|
1780
|
+
setup(__props) {
|
|
1781
|
+
const props = __props;
|
|
1782
|
+
const { formatMessage } = useIntl();
|
|
1783
|
+
const isTaxIdValid = computed(() => {
|
|
1784
|
+
return props.taxIdValidationResult.valid === "VALID";
|
|
1785
|
+
});
|
|
1786
|
+
const taxIdValidationMessage = computed(() => {
|
|
1787
|
+
return isTaxIdValid.value ? formatMessage({
|
|
1788
|
+
defaultMessage: "VAT number is valid.",
|
|
1789
|
+
id: "tax_check.valid_vat_number",
|
|
1790
|
+
description: "The message shown when the VAT number is valid"
|
|
1791
|
+
}) : formatMessage({
|
|
1792
|
+
defaultMessage: "VAT number is invalid.",
|
|
1793
|
+
id: "tax_check.invalid_vat_number",
|
|
1794
|
+
description: "The message shown when the VAT number is invalid"
|
|
1795
|
+
});
|
|
1796
|
+
});
|
|
1797
|
+
return (_ctx, _cache) => {
|
|
1798
|
+
return openBlock(), createBlock(unref(_sfc_main$s), {
|
|
1799
|
+
type: isTaxIdValid.value ? "success" : "danger",
|
|
1800
|
+
icon: false
|
|
1801
|
+
}, {
|
|
1802
|
+
default: withCtx(() => [
|
|
1803
|
+
createElementVNode("div", _hoisted_1$j, [
|
|
1804
|
+
createVNode(unref(_sfc_main$r), { variant: "body-xs" }, {
|
|
1805
|
+
default: withCtx(() => [
|
|
1806
|
+
createTextVNode(toDisplayString(taxIdValidationMessage.value), 1)
|
|
1807
|
+
]),
|
|
1808
|
+
_: 1
|
|
1809
|
+
})
|
|
1810
|
+
])
|
|
1811
|
+
]),
|
|
1812
|
+
_: 1
|
|
1813
|
+
}, 8, ["type"]);
|
|
1814
|
+
};
|
|
1815
|
+
}
|
|
1816
|
+
});
|
|
1817
|
+
function useTaxIDValidationCheck(form) {
|
|
1818
|
+
const { checkTaxID } = createCustomerService();
|
|
1819
|
+
const taxIdValidationData = ref(void 0);
|
|
1820
|
+
const taxId2 = computed(() => {
|
|
1821
|
+
var _a;
|
|
1822
|
+
return ((_a = form.value.companyVatNumber) == null ? void 0 : _a.trim()) ?? "";
|
|
1823
|
+
});
|
|
1824
|
+
const legalName = computed(() => form.value.companyLegalName ?? "");
|
|
1825
|
+
const countryCode = computed(() => form.value.country);
|
|
1826
|
+
const isTaxIDCheckPending = ref(false);
|
|
1827
|
+
const isSelectedCountryEU = computed(() => {
|
|
1828
|
+
return isEUCountry(countryCode.value ?? "");
|
|
1829
|
+
});
|
|
1830
|
+
const isTaxIDCheckEnabled = computed(
|
|
1831
|
+
() => !!(taxId2.value && legalName.value && countryCode.value)
|
|
1832
|
+
);
|
|
1833
|
+
const showViesCheckNotice = computed(() => {
|
|
1834
|
+
return isSelectedCountryEU.value && taxId2.value;
|
|
1835
|
+
});
|
|
1836
|
+
async function runTaxIDCheck() {
|
|
1837
|
+
var _a;
|
|
1838
|
+
if (!isTaxIDCheckEnabled.value || !isSelectedCountryEU.value || !countryCode.value) {
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
isTaxIDCheckPending.value = true;
|
|
1842
|
+
try {
|
|
1843
|
+
const result = await checkTaxID({
|
|
1844
|
+
type: "ORGANIZATION",
|
|
1845
|
+
organization: {
|
|
1846
|
+
legal_name: legalName.value,
|
|
1847
|
+
tax_ids: [{ id: taxId2.value, type: "GENERIC_TAX_ID" }],
|
|
1848
|
+
registered_address: {
|
|
1849
|
+
country: countryCode.value
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
});
|
|
1853
|
+
if ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.length) {
|
|
1854
|
+
taxIdValidationData.value = result.data[0];
|
|
1855
|
+
} else {
|
|
1856
|
+
taxIdValidationData.value = void 0;
|
|
1857
|
+
}
|
|
1858
|
+
} finally {
|
|
1859
|
+
isTaxIDCheckPending.value = false;
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
return {
|
|
1863
|
+
runTaxIDCheck,
|
|
1864
|
+
taxIdValidationData,
|
|
1865
|
+
isTaxIDCheckPending,
|
|
1866
|
+
isTaxIDCheckEnabled,
|
|
1867
|
+
showViesCheckNotice,
|
|
1868
|
+
isSelectedCountryEU
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
const _hoisted_1$i = { class: "grid grid-cols-1 gap-1" };
|
|
1872
|
+
const _hoisted_2$a = { class: "grid grid-cols-1 gap-2" };
|
|
1873
|
+
const _hoisted_3$7 = { key: 0 };
|
|
1874
|
+
const _hoisted_4$6 = { class: "mt-2 flex flex-col gap-3" };
|
|
1875
|
+
const _hoisted_5$4 = { class: "grid grid-cols-3 gap-2" };
|
|
1876
|
+
const _hoisted_6$2 = { key: 0 };
|
|
1877
|
+
const _hoisted_7$1 = { class: "mt-4 grid grid-cols-1 gap-3" };
|
|
1878
|
+
const FORM_ID = "checkout-form";
|
|
1879
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
1880
|
+
__name: "CheckoutForm",
|
|
1881
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1882
|
+
validation: { type: null },
|
|
1883
|
+
initialState: { type: Object },
|
|
1884
|
+
readOnlyEmail: { type: String },
|
|
1885
|
+
showCustomerInfoOnTop: { type: Boolean },
|
|
1886
|
+
isBillingInformationMandatory: { type: Boolean },
|
|
1887
|
+
getIsFieldRequired: { type: Function },
|
|
1888
|
+
readOnly: { type: Boolean }
|
|
1889
|
+
}, {
|
|
1890
|
+
"modelValue": { required: true },
|
|
1891
|
+
"modelModifiers": {}
|
|
1892
|
+
}),
|
|
1893
|
+
emits: /* @__PURE__ */ mergeModels(["submit"], ["update:modelValue"]),
|
|
1586
1894
|
setup(__props) {
|
|
1587
1895
|
const props = __props;
|
|
1588
1896
|
const showBillingDetails = ref(false);
|
|
@@ -1594,8 +1902,16 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1594
1902
|
}
|
|
1595
1903
|
});
|
|
1596
1904
|
const isCompanyPurchase = computed(() => model.value.type === "ORGANIZATION");
|
|
1905
|
+
const country = computed({
|
|
1906
|
+
get: () => model.value.country,
|
|
1907
|
+
set: (value) => {
|
|
1908
|
+
model.value.country = value && isValidCountryCode(value) ? value : void 0;
|
|
1909
|
+
}
|
|
1910
|
+
});
|
|
1597
1911
|
const showVatIdInput = computed(() => model.value.country !== "US");
|
|
1912
|
+
const { isTaxIDCheckEnabled, isTaxIDCheckPending, taxIdValidationData, runTaxIDCheck } = useTaxIDValidationCheck(model);
|
|
1598
1913
|
const { $t } = useIntl();
|
|
1914
|
+
const labels = useCustomerFormLabels();
|
|
1599
1915
|
const getOptionalSuffix = (field) => {
|
|
1600
1916
|
if (props.getIsFieldRequired(field)) {
|
|
1601
1917
|
return "";
|
|
@@ -1614,18 +1930,14 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1614
1930
|
id: FORM_ID,
|
|
1615
1931
|
onSubmit: _cache[12] || (_cache[12] = withModifiers(($event) => _ctx.$emit("submit", model.value), ["prevent"]))
|
|
1616
1932
|
}, [
|
|
1617
|
-
createElementVNode("div", _hoisted_1$
|
|
1618
|
-
createVNode(unref(_sfc_main$
|
|
1619
|
-
title: unref(
|
|
1620
|
-
defaultMessage: "Customer information",
|
|
1621
|
-
id: "checkout.contact_information_block.title",
|
|
1622
|
-
description: "The title of the contact information block in the checkout form"
|
|
1623
|
-
})
|
|
1933
|
+
createElementVNode("div", _hoisted_1$i, [
|
|
1934
|
+
createVNode(unref(_sfc_main$t), {
|
|
1935
|
+
title: unref(labels).contactInformationTitle
|
|
1624
1936
|
}, {
|
|
1625
1937
|
default: withCtx(() => [
|
|
1626
|
-
createElementVNode("div", _hoisted_2$
|
|
1938
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
1627
1939
|
__props.readOnly ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1628
|
-
createVNode(unref(_sfc_main$
|
|
1940
|
+
createVNode(unref(_sfc_main$r), {
|
|
1629
1941
|
variant: "body",
|
|
1630
1942
|
tag: "span",
|
|
1631
1943
|
weight: "semibold",
|
|
@@ -1636,10 +1948,10 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1636
1948
|
]),
|
|
1637
1949
|
_: 1
|
|
1638
1950
|
}),
|
|
1639
|
-
createVNode(unref(_sfc_main$
|
|
1951
|
+
createVNode(unref(_sfc_main$r), {
|
|
1640
1952
|
variant: "body-sm",
|
|
1641
1953
|
tag: "span",
|
|
1642
|
-
|
|
1954
|
+
color: "subtle",
|
|
1643
1955
|
"no-spacing": ""
|
|
1644
1956
|
}, {
|
|
1645
1957
|
default: withCtx(() => [
|
|
@@ -1648,42 +1960,30 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1648
1960
|
_: 1
|
|
1649
1961
|
})
|
|
1650
1962
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1651
|
-
createVNode(unref(_sfc_main$
|
|
1963
|
+
createVNode(unref(_sfc_main$p), {
|
|
1652
1964
|
modelValue: model.value.email,
|
|
1653
1965
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value.email = $event),
|
|
1654
1966
|
required: "",
|
|
1655
1967
|
type: "email",
|
|
1656
1968
|
name: "email",
|
|
1657
1969
|
disabled: !!__props.readOnlyEmail,
|
|
1658
|
-
label: unref(
|
|
1659
|
-
|
|
1660
|
-
id: "checkout.email_address.label",
|
|
1661
|
-
description: "The email address of the customer in the checkout form"
|
|
1662
|
-
}),
|
|
1663
|
-
placeholder: unref($t)({
|
|
1664
|
-
defaultMessage: "Email address...",
|
|
1665
|
-
id: "checkout.email_address.placeholder",
|
|
1666
|
-
description: "The email address of the customer in the checkout form"
|
|
1667
|
-
}) + getOptionalSuffix("email"),
|
|
1970
|
+
label: unref(labels).emailLabel,
|
|
1971
|
+
placeholder: unref(labels).emailPlaceholder + getOptionalSuffix("email"),
|
|
1668
1972
|
error: __props.validation.value.email.$errors
|
|
1669
1973
|
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"]),
|
|
1670
|
-
createVNode(unref(_sfc_main$
|
|
1671
|
-
"single-model-value":
|
|
1672
|
-
"onUpdate:singleModelValue": _cache[3] || (_cache[3] = ($event) =>
|
|
1974
|
+
createVNode(unref(_sfc_main$u), {
|
|
1975
|
+
"single-model-value": country.value,
|
|
1976
|
+
"onUpdate:singleModelValue": _cache[3] || (_cache[3] = ($event) => country.value = $event),
|
|
1673
1977
|
required: "",
|
|
1674
1978
|
name: "country",
|
|
1675
|
-
label: unref(
|
|
1676
|
-
defaultMessage: "Billing country",
|
|
1677
|
-
id: "checkout.country.label",
|
|
1678
|
-
description: "The country of the customer in the checkout form"
|
|
1679
|
-
}) + getOptionalSuffix("country"),
|
|
1979
|
+
label: unref(labels).countryLabel + getOptionalSuffix("country"),
|
|
1680
1980
|
error: __props.validation.value.country.$errors
|
|
1681
1981
|
}, {
|
|
1682
1982
|
"label-suffix": withCtx(() => [
|
|
1683
|
-
!showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1983
|
+
!showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
1684
1984
|
key: 0,
|
|
1685
1985
|
size: "xs",
|
|
1686
|
-
|
|
1986
|
+
intent: "subtle",
|
|
1687
1987
|
"icon-prefix": "add",
|
|
1688
1988
|
class: "py-0.5",
|
|
1689
1989
|
onClick: _cache[1] || (_cache[1] = ($event) => showBillingDetails.value = true)
|
|
@@ -1697,10 +1997,10 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1697
1997
|
]),
|
|
1698
1998
|
_: 1
|
|
1699
1999
|
})) : createCommentVNode("", true),
|
|
1700
|
-
showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2000
|
+
showBillingDetails.value && !__props.isBillingInformationMandatory ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
1701
2001
|
key: 1,
|
|
1702
2002
|
size: "sm",
|
|
1703
|
-
|
|
2003
|
+
intent: "subtle",
|
|
1704
2004
|
"icon-prefix": "close",
|
|
1705
2005
|
class: "py-0.5",
|
|
1706
2006
|
onClick: _cache[2] || (_cache[2] = ($event) => showBillingDetails.value = false)
|
|
@@ -1719,11 +2019,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1719
2019
|
}, 8, ["single-model-value", "label", "error"])
|
|
1720
2020
|
], 64))
|
|
1721
2021
|
]),
|
|
1722
|
-
createVNode(unref(_sfc_main$
|
|
2022
|
+
createVNode(unref(_sfc_main$w), {
|
|
2023
|
+
"is-open": showBillingDetails.value || !!__props.isBillingInformationMandatory
|
|
2024
|
+
}, {
|
|
1723
2025
|
default: withCtx(() => [
|
|
1724
|
-
showBillingDetails.value || __props.isBillingInformationMandatory ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
1725
|
-
createElementVNode("div", _hoisted_4$
|
|
1726
|
-
createVNode(unref(_sfc_main$
|
|
2026
|
+
showBillingDetails.value || __props.isBillingInformationMandatory ? (openBlock(), createElementBlock("div", _hoisted_3$7, [
|
|
2027
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
2028
|
+
createVNode(unref(_sfc_main$p), {
|
|
1727
2029
|
modelValue: model.value.addressLine1,
|
|
1728
2030
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => model.value.addressLine1 = $event),
|
|
1729
2031
|
name: "address_line_1",
|
|
@@ -1740,7 +2042,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1740
2042
|
required: "",
|
|
1741
2043
|
error: __props.validation.value.addressLine1.$errors
|
|
1742
2044
|
}, null, 8, ["modelValue", "label", "placeholder", "error"]),
|
|
1743
|
-
createVNode(unref(_sfc_main$
|
|
2045
|
+
createVNode(unref(_sfc_main$p), {
|
|
1744
2046
|
modelValue: model.value.addressLine2,
|
|
1745
2047
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => model.value.addressLine2 = $event),
|
|
1746
2048
|
name: "address_line_2",
|
|
@@ -1750,37 +2052,25 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1750
2052
|
description: "Address line 2 of the customer address in the checkout form"
|
|
1751
2053
|
}) + getOptionalSuffix("addressLine2")
|
|
1752
2054
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
1753
|
-
createElementVNode("div", _hoisted_5$
|
|
1754
|
-
createVNode(unref(_sfc_main$
|
|
2055
|
+
createElementVNode("div", _hoisted_5$4, [
|
|
2056
|
+
createVNode(unref(_sfc_main$p), {
|
|
1755
2057
|
modelValue: model.value.postalCode,
|
|
1756
2058
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => model.value.postalCode = $event),
|
|
1757
2059
|
name: "postal_code",
|
|
1758
|
-
placeholder: unref(
|
|
1759
|
-
defaultMessage: "Postal code...",
|
|
1760
|
-
id: "checkout.address.portal_code.placeholder",
|
|
1761
|
-
description: "Postal code of the customer address in the checkout form"
|
|
1762
|
-
}) + getOptionalSuffix("postalCode"),
|
|
2060
|
+
placeholder: unref(labels).postalCodePlaceholder + getOptionalSuffix("postalCode"),
|
|
1763
2061
|
error: __props.validation.value.addressLine1.$errors
|
|
1764
2062
|
}, null, 8, ["modelValue", "placeholder", "error"]),
|
|
1765
|
-
createVNode(unref(_sfc_main$
|
|
2063
|
+
createVNode(unref(_sfc_main$p), {
|
|
1766
2064
|
modelValue: model.value.city,
|
|
1767
2065
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => model.value.city = $event),
|
|
1768
2066
|
name: "city",
|
|
1769
|
-
placeholder: unref(
|
|
1770
|
-
defaultMessage: "City...",
|
|
1771
|
-
id: "checkout.address.city.placeholder",
|
|
1772
|
-
description: "City of the customer address in the checkout form"
|
|
1773
|
-
}) + getOptionalSuffix("city")
|
|
2067
|
+
placeholder: unref(labels).cityPlaceholder + getOptionalSuffix("city")
|
|
1774
2068
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
1775
|
-
createVNode(unref(_sfc_main$
|
|
2069
|
+
createVNode(unref(_sfc_main$p), {
|
|
1776
2070
|
modelValue: model.value.state,
|
|
1777
2071
|
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => model.value.state = $event),
|
|
1778
2072
|
name: "state",
|
|
1779
|
-
placeholder: unref(
|
|
1780
|
-
defaultMessage: "State...",
|
|
1781
|
-
id: "checkout.address.state.placeholder",
|
|
1782
|
-
description: "State of the customer address in the checkout form"
|
|
1783
|
-
}) + getOptionalSuffix("state"),
|
|
2073
|
+
placeholder: unref(labels).statePlaceholder + getOptionalSuffix("state"),
|
|
1784
2074
|
error: __props.validation.value.state.$errors
|
|
1785
2075
|
}, null, 8, ["modelValue", "placeholder", "error"])
|
|
1786
2076
|
])
|
|
@@ -1788,91 +2078,75 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1788
2078
|
])) : createCommentVNode("", true)
|
|
1789
2079
|
]),
|
|
1790
2080
|
_: 1
|
|
1791
|
-
})
|
|
2081
|
+
}, 8, ["is-open"])
|
|
1792
2082
|
]),
|
|
1793
2083
|
_: 1
|
|
1794
2084
|
}, 8, ["title"]),
|
|
1795
|
-
!__props.readOnly ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2085
|
+
!__props.readOnly ? (openBlock(), createBlock(unref(_sfc_main$t), { key: 0 }, {
|
|
1796
2086
|
default: withCtx(() => [
|
|
1797
|
-
createVNode(
|
|
2087
|
+
createVNode(_sfc_main$x, {
|
|
1798
2088
|
modelValue: companyPurchaseModel.value,
|
|
1799
2089
|
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => companyPurchaseModel.value = $event),
|
|
1800
2090
|
"no-spacing": "",
|
|
1801
|
-
"label-position": "before",
|
|
1802
2091
|
class: "!flex"
|
|
1803
|
-
},
|
|
1804
|
-
|
|
1805
|
-
createElementVNode("div", _hoisted_6$1, [
|
|
1806
|
-
createVNode(unref(_sfc_main$2$1), { tag: "span" }, {
|
|
1807
|
-
default: withCtx(() => [
|
|
1808
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
1809
|
-
defaultMessage: "Company purchase",
|
|
1810
|
-
id: "checkout.company_purchase_toggle.title",
|
|
1811
|
-
description: "The title of the company purchase toggle in the checkout"
|
|
1812
|
-
})), 1)
|
|
1813
|
-
]),
|
|
1814
|
-
_: 1
|
|
1815
|
-
}),
|
|
1816
|
-
createVNode(unref(_sfc_main$2$1), {
|
|
1817
|
-
tag: "span",
|
|
1818
|
-
variant: "body-xs",
|
|
1819
|
-
shade: "lighter"
|
|
1820
|
-
}, {
|
|
1821
|
-
default: withCtx(() => [
|
|
1822
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
1823
|
-
defaultMessage: "I am purchasing on behalf of a company",
|
|
1824
|
-
id: "checkout.company_purchase_toggle.sub_title",
|
|
1825
|
-
description: "The subtitle of the company purchase toggle in the checkout"
|
|
1826
|
-
})), 1)
|
|
1827
|
-
]),
|
|
1828
|
-
_: 1
|
|
1829
|
-
})
|
|
1830
|
-
])
|
|
1831
|
-
]),
|
|
1832
|
-
_: 1
|
|
1833
|
-
}, 8, ["modelValue"]),
|
|
1834
|
-
createVNode(unref(_sfc_main$2j), null, {
|
|
2092
|
+
}, null, 8, ["modelValue"]),
|
|
2093
|
+
createVNode(unref(_sfc_main$w), { "is-open": isCompanyPurchase.value }, {
|
|
1835
2094
|
default: withCtx(() => [
|
|
1836
|
-
isCompanyPurchase.value ? (openBlock(), createElementBlock("div",
|
|
1837
|
-
createElementVNode("div",
|
|
1838
|
-
|
|
1839
|
-
key: 0,
|
|
1840
|
-
modelValue: model.value.companyVatNumber,
|
|
1841
|
-
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => model.value.companyVatNumber = $event),
|
|
1842
|
-
name: "vat_number",
|
|
1843
|
-
label: unref($t)({
|
|
1844
|
-
defaultMessage: "VAT number",
|
|
1845
|
-
id: "checkout.vat_number.label",
|
|
1846
|
-
description: "The label for the vat number in the checkout form"
|
|
1847
|
-
}),
|
|
1848
|
-
placeholder: unref($t)({
|
|
1849
|
-
defaultMessage: "VAT number...",
|
|
1850
|
-
id: "checkout.vat_number.placeholder",
|
|
1851
|
-
description: "The label for the vat number in the checkout form"
|
|
1852
|
-
}),
|
|
1853
|
-
error: __props.validation.value.companyVatNumber.$errors
|
|
1854
|
-
}, null, 8, ["modelValue", "label", "placeholder", "error"])) : createCommentVNode("", true),
|
|
1855
|
-
createVNode(unref(_sfc_main$2a), {
|
|
2095
|
+
isCompanyPurchase.value ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
|
|
2096
|
+
createElementVNode("div", _hoisted_7$1, [
|
|
2097
|
+
createVNode(unref(_sfc_main$p), {
|
|
1856
2098
|
modelValue: model.value.companyLegalName,
|
|
1857
|
-
"onUpdate:modelValue": _cache[
|
|
2099
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => model.value.companyLegalName = $event),
|
|
1858
2100
|
required: "",
|
|
1859
2101
|
name: "legal_name",
|
|
1860
|
-
label: unref(
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
2102
|
+
label: unref(labels).legalNameLabel,
|
|
2103
|
+
placeholder: unref(labels).legalNamePlaceholder
|
|
2104
|
+
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
2105
|
+
showVatIdInput.value ? (openBlock(), createBlock(unref(_sfc_main$p), {
|
|
2106
|
+
key: 0,
|
|
2107
|
+
modelValue: model.value.companyVatNumber,
|
|
2108
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => model.value.companyVatNumber = $event),
|
|
2109
|
+
name: "vat_number",
|
|
2110
|
+
"input-class": "focus:outline-none focus:ring-0",
|
|
2111
|
+
label: unref(labels).vatNumberLabel,
|
|
2112
|
+
placeholder: unref(labels).vatNumberPlaceholder,
|
|
2113
|
+
error: __props.validation.value.companyVatNumber.$errors,
|
|
2114
|
+
"suffix-class": "px-2 border-l-0"
|
|
2115
|
+
}, createSlots({ _: 2 }, [
|
|
2116
|
+
unref(isEUCountry)(model.value.country ?? "") ? {
|
|
2117
|
+
name: "suffix",
|
|
2118
|
+
fn: withCtx(() => [
|
|
2119
|
+
createVNode(unref(_sfc_main$v), {
|
|
2120
|
+
type: "button",
|
|
2121
|
+
size: "sm",
|
|
2122
|
+
intent: "secondary",
|
|
2123
|
+
disabled: !unref(isTaxIDCheckEnabled) || unref(isTaxIDCheckPending) || __props.validation.value.companyVatNumber.$invalid,
|
|
2124
|
+
onClick: unref(runTaxIDCheck)
|
|
2125
|
+
}, {
|
|
2126
|
+
default: withCtx(() => [
|
|
2127
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
2128
|
+
defaultMessage: "Check",
|
|
2129
|
+
id: "checkout.vat_number.check_button.label",
|
|
2130
|
+
description: "The label for the check button in the checkout form"
|
|
2131
|
+
})), 1)
|
|
2132
|
+
]),
|
|
2133
|
+
_: 1
|
|
2134
|
+
}, 8, ["disabled", "onClick"])
|
|
2135
|
+
]),
|
|
2136
|
+
key: "0"
|
|
2137
|
+
} : void 0
|
|
2138
|
+
]), 1032, ["modelValue", "label", "placeholder", "error"])) : createCommentVNode("", true),
|
|
2139
|
+
unref(taxIdValidationData) ? (openBlock(), createElementBlock("div", {
|
|
2140
|
+
key: 1,
|
|
2141
|
+
class: normalizeClass({ "opacity-75": unref(isTaxIDCheckPending) })
|
|
2142
|
+
}, [
|
|
2143
|
+
createVNode(_sfc_main$l, { "tax-id-validation-result": unref(taxIdValidationData) }, null, 8, ["tax-id-validation-result"])
|
|
2144
|
+
], 2)) : createCommentVNode("", true)
|
|
1871
2145
|
])
|
|
1872
2146
|
])) : createCommentVNode("", true)
|
|
1873
2147
|
]),
|
|
1874
2148
|
_: 1
|
|
1875
|
-
})
|
|
2149
|
+
}, 8, ["is-open"])
|
|
1876
2150
|
]),
|
|
1877
2151
|
_: 1
|
|
1878
2152
|
})) : createCommentVNode("", true)
|
|
@@ -1881,13 +2155,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
1881
2155
|
};
|
|
1882
2156
|
}
|
|
1883
2157
|
});
|
|
1884
|
-
const _hoisted_1$
|
|
2158
|
+
const _hoisted_1$h = {
|
|
1885
2159
|
key: 0,
|
|
1886
2160
|
class: "flex items-center"
|
|
1887
2161
|
};
|
|
1888
|
-
const _hoisted_2$
|
|
1889
|
-
const _hoisted_3$
|
|
1890
|
-
const _sfc_main$
|
|
2162
|
+
const _hoisted_2$9 = ["innerHTML"];
|
|
2163
|
+
const _hoisted_3$6 = ["innerHTML"];
|
|
2164
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
1891
2165
|
__name: "CheckoutTitle",
|
|
1892
2166
|
props: {
|
|
1893
2167
|
trialPeriod: { type: Object },
|
|
@@ -1901,9 +2175,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1901
2175
|
setup(__props) {
|
|
1902
2176
|
const { $t } = useIntl();
|
|
1903
2177
|
return (_ctx, _cache) => {
|
|
1904
|
-
return openBlock(), createElementBlock(
|
|
2178
|
+
return openBlock(), createElementBlock("div", null, [
|
|
1905
2179
|
createElementVNode("div", null, [
|
|
1906
|
-
createVNode(unref(_sfc_main$
|
|
2180
|
+
createVNode(unref(_sfc_main$r), {
|
|
1907
2181
|
variant: "heading-1",
|
|
1908
2182
|
class: "inline-block"
|
|
1909
2183
|
}, {
|
|
@@ -1913,7 +2187,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1913
2187
|
id: "checkout.page_title",
|
|
1914
2188
|
description: "The title of the checkout page"
|
|
1915
2189
|
})) + toDisplayString(" "), 1),
|
|
1916
|
-
__props.trialPeriod ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2190
|
+
__props.trialPeriod ? (openBlock(), createBlock(unref(_sfc_main$y), {
|
|
1917
2191
|
key: 0,
|
|
1918
2192
|
"trial-period": __props.trialPeriod,
|
|
1919
2193
|
size: "lg",
|
|
@@ -1923,18 +2197,18 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1923
2197
|
_: 1
|
|
1924
2198
|
})
|
|
1925
2199
|
]),
|
|
1926
|
-
createVNode(unref(_sfc_main$
|
|
2200
|
+
createVNode(unref(_sfc_main$r), {
|
|
1927
2201
|
variant: "body-sm",
|
|
1928
|
-
|
|
2202
|
+
color: "subtle",
|
|
1929
2203
|
"no-spacing": ""
|
|
1930
2204
|
}, {
|
|
1931
2205
|
default: withCtx(() => [
|
|
1932
|
-
!__props.countryCode ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
1933
|
-
createVNode(unref(_sfc_main$
|
|
2206
|
+
!__props.countryCode ? (openBlock(), createElementBlock("span", _hoisted_1$h, [
|
|
2207
|
+
createVNode(unref(_sfc_main$z), { "is-dark-mode": "" }, {
|
|
1934
2208
|
tooltip: withCtx(() => [
|
|
1935
2209
|
createVNode(unref(TooltipContent), null, {
|
|
1936
2210
|
default: withCtx(() => [
|
|
1937
|
-
createVNode(unref(_sfc_main$
|
|
2211
|
+
createVNode(unref(_sfc_main$B), null, {
|
|
1938
2212
|
default: withCtx(() => [
|
|
1939
2213
|
createTextVNode(toDisplayString(unref($t)({
|
|
1940
2214
|
defaultMessage: "Will be determined by billing information",
|
|
@@ -1949,11 +2223,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1949
2223
|
})
|
|
1950
2224
|
]),
|
|
1951
2225
|
default: withCtx(() => [
|
|
1952
|
-
createVNode(unref(_sfc_main$
|
|
2226
|
+
createVNode(unref(_sfc_main$A), {
|
|
1953
2227
|
"width-class": "w-10",
|
|
1954
2228
|
"height-class": "h-4",
|
|
1955
2229
|
shade: "darker",
|
|
1956
|
-
class: "
|
|
2230
|
+
class: "mr-1.5 inline-block"
|
|
1957
2231
|
})
|
|
1958
2232
|
]),
|
|
1959
2233
|
_: 1
|
|
@@ -1962,8 +2236,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1962
2236
|
innerHTML: __props.trialStartDate ? unref($t)(
|
|
1963
2237
|
{
|
|
1964
2238
|
defaultMessage: "per {period_name} starting, {startDate, date, long}",
|
|
1965
|
-
id: "checkout.
|
|
1966
|
-
description: "The description of the trial period"
|
|
2239
|
+
id: "checkout.trial_period_description_without_price",
|
|
2240
|
+
description: "The description of the trial period, while the price is still being determined"
|
|
1967
2241
|
},
|
|
1968
2242
|
{
|
|
1969
2243
|
// @ts-expect-error formatjs does not support this type yet
|
|
@@ -1976,8 +2250,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1976
2250
|
) : unref($t)(
|
|
1977
2251
|
{
|
|
1978
2252
|
defaultMessage: "per {period_name}, starting today",
|
|
1979
|
-
id: "checkout.
|
|
1980
|
-
description: "The description of the subscription"
|
|
2253
|
+
id: "checkout.subscription_description_without_price",
|
|
2254
|
+
description: "The description of the subscription, while the price is still being determined"
|
|
1981
2255
|
},
|
|
1982
2256
|
{
|
|
1983
2257
|
period_name: unref(formatBillingPeriod)(__props.billingPeriod, {
|
|
@@ -1986,7 +2260,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
1986
2260
|
})
|
|
1987
2261
|
}
|
|
1988
2262
|
)
|
|
1989
|
-
}, null, 8, _hoisted_2$
|
|
2263
|
+
}, null, 8, _hoisted_2$9)
|
|
1990
2264
|
])) : (openBlock(), createElementBlock("span", {
|
|
1991
2265
|
key: 1,
|
|
1992
2266
|
innerHTML: __props.trialStartDate ? unref($t)(
|
|
@@ -2022,11 +2296,11 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2022
2296
|
strong: (text) => `<strong>${text}</strong>`
|
|
2023
2297
|
}
|
|
2024
2298
|
)
|
|
2025
|
-
}, null, 8, _hoisted_3$
|
|
2299
|
+
}, null, 8, _hoisted_3$6))
|
|
2026
2300
|
]),
|
|
2027
2301
|
_: 1
|
|
2028
2302
|
})
|
|
2029
|
-
]
|
|
2303
|
+
]);
|
|
2030
2304
|
};
|
|
2031
2305
|
}
|
|
2032
2306
|
});
|
|
@@ -2045,9 +2319,9 @@ const isInvoiceUsageBased = (invoice) => {
|
|
|
2045
2319
|
)
|
|
2046
2320
|
)) ?? false;
|
|
2047
2321
|
};
|
|
2048
|
-
const _hoisted_1$
|
|
2049
|
-
const _hoisted_2$
|
|
2050
|
-
const _sfc_main$
|
|
2322
|
+
const _hoisted_1$g = { class: "flex min-h-96 w-full items-center justify-center" };
|
|
2323
|
+
const _hoisted_2$8 = { class: "max-w-sm" };
|
|
2324
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
2051
2325
|
__name: "CheckoutNotAvailable",
|
|
2052
2326
|
setup(__props) {
|
|
2053
2327
|
const { $t } = useIntl();
|
|
@@ -2055,9 +2329,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2055
2329
|
window.location.reload();
|
|
2056
2330
|
};
|
|
2057
2331
|
return (_ctx, _cache) => {
|
|
2058
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2059
|
-
createElementVNode("div", _hoisted_2$
|
|
2060
|
-
createVNode(unref(_sfc_main$
|
|
2332
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
2333
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
2334
|
+
createVNode(unref(_sfc_main$r), { variant: "heading-1" }, {
|
|
2061
2335
|
default: withCtx(() => [
|
|
2062
2336
|
createTextVNode(toDisplayString(unref($t)({
|
|
2063
2337
|
defaultMessage: "Checkout not available",
|
|
@@ -2067,9 +2341,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2067
2341
|
]),
|
|
2068
2342
|
_: 1
|
|
2069
2343
|
}),
|
|
2070
|
-
createVNode(unref(_sfc_main$
|
|
2344
|
+
createVNode(unref(_sfc_main$r), {
|
|
2071
2345
|
variant: "body-sm",
|
|
2072
|
-
|
|
2346
|
+
color: "subtle"
|
|
2073
2347
|
}, {
|
|
2074
2348
|
default: withCtx(() => [
|
|
2075
2349
|
createTextVNode(toDisplayString(unref($t)({
|
|
@@ -2099,22 +2373,13 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2099
2373
|
};
|
|
2100
2374
|
}
|
|
2101
2375
|
});
|
|
2102
|
-
const _sfc_main$
|
|
2376
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
2103
2377
|
__name: "SubscriptionPaymentCompletedCard",
|
|
2104
|
-
|
|
2105
|
-
redirectUrl: { type: String }
|
|
2106
|
-
},
|
|
2378
|
+
emits: ["continue-to-merchant"],
|
|
2107
2379
|
setup(__props) {
|
|
2108
|
-
const props = __props;
|
|
2109
2380
|
const { $t } = useIntl();
|
|
2110
|
-
onMounted(() => {
|
|
2111
|
-
if (!props.redirectUrl) {
|
|
2112
|
-
return;
|
|
2113
|
-
}
|
|
2114
|
-
window.location.replace(props.redirectUrl);
|
|
2115
|
-
});
|
|
2116
2381
|
return (_ctx, _cache) => {
|
|
2117
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2382
|
+
return openBlock(), createBlock(_sfc_main$C, {
|
|
2118
2383
|
status: "success",
|
|
2119
2384
|
title: unref($t)({
|
|
2120
2385
|
defaultMessage: "Payment successful",
|
|
@@ -2123,9 +2388,9 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2123
2388
|
})
|
|
2124
2389
|
}, {
|
|
2125
2390
|
default: withCtx(() => [
|
|
2126
|
-
createVNode(unref(_sfc_main$
|
|
2391
|
+
createVNode(unref(_sfc_main$r), {
|
|
2127
2392
|
variant: "body-xs",
|
|
2128
|
-
|
|
2393
|
+
color: "subtle",
|
|
2129
2394
|
tag: "span"
|
|
2130
2395
|
}, {
|
|
2131
2396
|
default: withCtx(() => [
|
|
@@ -2136,132 +2401,67 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2136
2401
|
})), 1)
|
|
2137
2402
|
]),
|
|
2138
2403
|
_: 1
|
|
2139
|
-
})
|
|
2140
|
-
__props.redirectUrl ? (openBlock(), createBlock(unref(_sfc_main$2H), {
|
|
2141
|
-
key: 0,
|
|
2142
|
-
to: __props.redirectUrl,
|
|
2143
|
-
color: "gray",
|
|
2144
|
-
variant: "outline",
|
|
2145
|
-
size: "xs",
|
|
2146
|
-
class: "align-center"
|
|
2147
|
-
}, {
|
|
2148
|
-
default: withCtx(() => [
|
|
2149
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
2150
|
-
defaultMessage: "Continue to merchant",
|
|
2151
|
-
id: "subscription_payment_completed_card.continue",
|
|
2152
|
-
description: "The text for the continue button"
|
|
2153
|
-
})), 1)
|
|
2154
|
-
]),
|
|
2155
|
-
_: 1
|
|
2156
|
-
}, 8, ["to"])) : createCommentVNode("", true)
|
|
2404
|
+
})
|
|
2157
2405
|
]),
|
|
2158
2406
|
_: 1
|
|
2159
2407
|
}, 8, ["title"]);
|
|
2160
2408
|
};
|
|
2161
2409
|
}
|
|
2162
2410
|
});
|
|
2163
|
-
const _hoisted_1$
|
|
2164
|
-
const _hoisted_2$
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2411
|
+
const _hoisted_1$f = { class: "flex items-start" };
|
|
2412
|
+
const _hoisted_2$7 = { class: "flex grow flex-col" };
|
|
2413
|
+
const _hoisted_3$5 = { class: "flex items-center gap-1" };
|
|
2414
|
+
const _hoisted_4$5 = { class: "ml-4 flex items-center self-center" };
|
|
2415
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
2416
|
+
__name: "PricingGroupContent",
|
|
2167
2417
|
props: {
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
loading: { type: Boolean },
|
|
2171
|
-
enabledPricingIds: { type: Array },
|
|
2172
|
-
avatar: { type: String },
|
|
2173
|
-
trialPeriod: { type: Object }
|
|
2418
|
+
name: { type: String },
|
|
2419
|
+
description: { type: String }
|
|
2174
2420
|
},
|
|
2175
2421
|
setup(__props) {
|
|
2176
|
-
const props = __props;
|
|
2177
|
-
const { $t } = useIntl();
|
|
2178
|
-
const mostRecentPricingPlan = computed(
|
|
2179
|
-
() => {
|
|
2180
|
-
var _a, _b;
|
|
2181
|
-
return (_b = (_a = props.subscription.pricing_plan_schedule_infos) == null ? void 0 : _a.at(-1)) == null ? void 0 : _b.pricing_plan_version.pricing_plan;
|
|
2182
|
-
}
|
|
2183
|
-
);
|
|
2184
|
-
const name = computed(
|
|
2185
|
-
() => {
|
|
2186
|
-
var _a;
|
|
2187
|
-
return ((_a = mostRecentPricingPlan.value) == null ? void 0 : _a.name) || props.subscription.name || $t({
|
|
2188
|
-
defaultMessage: "Subscription",
|
|
2189
|
-
description: "The fallback name for when no subscription name can be determined",
|
|
2190
|
-
id: "customer_overview.subscriptions_block.fallback_subscription_name"
|
|
2191
|
-
});
|
|
2192
|
-
}
|
|
2193
|
-
);
|
|
2194
|
-
const description = computed(
|
|
2195
|
-
() => {
|
|
2196
|
-
var _a;
|
|
2197
|
-
return props.subscription.description || ((_a = mostRecentPricingPlan.value) == null ? void 0 : _a.description);
|
|
2198
|
-
}
|
|
2199
|
-
);
|
|
2200
|
-
const selectedPricings = computed(() => {
|
|
2201
|
-
if (!props.subscription || !props.enabledPricingIds) {
|
|
2202
|
-
return void 0;
|
|
2203
|
-
}
|
|
2204
|
-
const pricings = findPricingsByIds(props.subscription, props.enabledPricingIds);
|
|
2205
|
-
const names = pricings == null ? void 0 : pricings.map((pricing) => {
|
|
2206
|
-
var _a, _b;
|
|
2207
|
-
return pricing.name ?? ((_b = (_a = pricing.products) == null ? void 0 : _a[0]) == null ? void 0 : _b.name);
|
|
2208
|
-
}).join(" - ");
|
|
2209
|
-
return names;
|
|
2210
|
-
});
|
|
2211
2422
|
return (_ctx, _cache) => {
|
|
2212
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
}),
|
|
2230
|
-
selectedPricings.value ? (openBlock(), createBlock(unref(_sfc_main$2$1), {
|
|
2231
|
-
key: 0,
|
|
2232
|
-
variant: "body-xs",
|
|
2233
|
-
shade: "lighter",
|
|
2234
|
-
"no-spacing": ""
|
|
2235
|
-
}, {
|
|
2236
|
-
default: withCtx(() => [
|
|
2237
|
-
createTextVNode(toDisplayString(selectedPricings.value), 1)
|
|
2238
|
-
]),
|
|
2239
|
-
_: 1
|
|
2240
|
-
})) : createCommentVNode("", true),
|
|
2241
|
-
description.value ? (openBlock(), createBlock(unref(_sfc_main$2$1), {
|
|
2242
|
-
key: 1,
|
|
2423
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
2424
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
2425
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
2426
|
+
createVNode(unref(_sfc_main$r), {
|
|
2427
|
+
tag: "span",
|
|
2428
|
+
variant: "body-sm",
|
|
2429
|
+
weight: "semibold"
|
|
2430
|
+
}, {
|
|
2431
|
+
default: withCtx(() => [
|
|
2432
|
+
createTextVNode(toDisplayString(__props.name), 1)
|
|
2433
|
+
]),
|
|
2434
|
+
_: 1
|
|
2435
|
+
}),
|
|
2436
|
+
renderSlot(_ctx.$slots, "badge")
|
|
2437
|
+
]),
|
|
2438
|
+
createVNode(unref(_sfc_main$r), {
|
|
2439
|
+
tag: "span",
|
|
2243
2440
|
variant: "body-xs",
|
|
2244
|
-
|
|
2245
|
-
"no-spacing": ""
|
|
2441
|
+
color: "subtle"
|
|
2246
2442
|
}, {
|
|
2247
2443
|
default: withCtx(() => [
|
|
2248
|
-
|
|
2249
|
-
createTextVNode(" • ")
|
|
2250
|
-
], 64)) : createCommentVNode("", true),
|
|
2251
|
-
createTextVNode(" " + toDisplayString(description.value), 1)
|
|
2444
|
+
createTextVNode(toDisplayString(__props.description), 1)
|
|
2252
2445
|
]),
|
|
2253
2446
|
_: 1
|
|
2254
|
-
})
|
|
2447
|
+
})
|
|
2448
|
+
]),
|
|
2449
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
2450
|
+
renderSlot(_ctx.$slots, "default")
|
|
2255
2451
|
])
|
|
2256
2452
|
]);
|
|
2257
2453
|
};
|
|
2258
2454
|
}
|
|
2259
2455
|
});
|
|
2260
|
-
const _hoisted_1$
|
|
2261
|
-
const _hoisted_2$
|
|
2262
|
-
const _hoisted_3$
|
|
2263
|
-
const _hoisted_4$
|
|
2264
|
-
const
|
|
2456
|
+
const _hoisted_1$e = { class: "sv-order-summary__body grid grid-cols-1 gap-1" };
|
|
2457
|
+
const _hoisted_2$6 = { class: "px-3 py-2" };
|
|
2458
|
+
const _hoisted_3$4 = { class: "sv-order-summary__billing-period flex flex-col gap-3" };
|
|
2459
|
+
const _hoisted_4$4 = { class: "px-3 py-2" };
|
|
2460
|
+
const _hoisted_5$3 = {
|
|
2461
|
+
key: 3,
|
|
2462
|
+
class: "sv-order-summary__items"
|
|
2463
|
+
};
|
|
2464
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
2265
2465
|
__name: "OrderSummary",
|
|
2266
2466
|
props: {
|
|
2267
2467
|
subscription: { type: Object },
|
|
@@ -2285,9 +2485,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2285
2485
|
const emit = __emit;
|
|
2286
2486
|
const { $t } = useIntl();
|
|
2287
2487
|
const { map, formatTimePeriod } = useTimePeriod();
|
|
2288
|
-
const
|
|
2289
|
-
const
|
|
2290
|
-
const saveBadgeSize = computed(() => isMobile.value ? "sm" : "xs");
|
|
2488
|
+
const { isMobileViewport } = useViewport();
|
|
2489
|
+
const saveBadgeSize = computed(() => isMobileViewport.value ? "sm" : "xs");
|
|
2291
2490
|
const getBillingPeriodKey = (period) => `${period.type}:${period.value}`;
|
|
2292
2491
|
const BILLING_PERIOD_TYPES = ["DAY", "WEEK", "MONTH", "YEAR"];
|
|
2293
2492
|
const isBillingPeriodType = (value) => BILLING_PERIOD_TYPES.includes(value);
|
|
@@ -2425,15 +2624,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2425
2624
|
const registerPeriodsFromPricing = (pricing) => {
|
|
2426
2625
|
var _a2;
|
|
2427
2626
|
(_a2 = pricing == null ? void 0 : pricing.items) == null ? void 0 : _a2.forEach((item) => {
|
|
2428
|
-
var _a3, _b2
|
|
2429
|
-
(_a3 = item.
|
|
2430
|
-
(_b2 = item.billing_period_configs) == null ? void 0 : _b2.forEach(
|
|
2627
|
+
var _a3, _b2;
|
|
2628
|
+
(_a3 = item.billing_period_configs) == null ? void 0 : _a3.forEach(
|
|
2431
2629
|
(periodConfig) => registerPeriod(periodConfig.billing_period)
|
|
2432
2630
|
);
|
|
2433
|
-
(
|
|
2434
|
-
var _a4
|
|
2435
|
-
(_a4 = currencyConfig.
|
|
2436
|
-
(_b3 = currencyConfig.billing_period_configs) == null ? void 0 : _b3.forEach(
|
|
2631
|
+
(_b2 = item.pricing_currency_configs) == null ? void 0 : _b2.forEach((currencyConfig) => {
|
|
2632
|
+
var _a4;
|
|
2633
|
+
(_a4 = currencyConfig.billing_period_configs) == null ? void 0 : _a4.forEach(
|
|
2437
2634
|
(periodConfig) => registerPeriod(periodConfig.billing_period)
|
|
2438
2635
|
);
|
|
2439
2636
|
});
|
|
@@ -2484,7 +2681,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2484
2681
|
label,
|
|
2485
2682
|
subLabel: getSelectedPeriodAmountLabel(period),
|
|
2486
2683
|
labelSuffixComponent: saveText ? {
|
|
2487
|
-
component: _sfc_main$
|
|
2684
|
+
component: _sfc_main$o,
|
|
2488
2685
|
props: {
|
|
2489
2686
|
color: "primary",
|
|
2490
2687
|
content: saveText,
|
|
@@ -2543,7 +2740,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2543
2740
|
selectedBillingPeriodKey.value = checked ? biggestPeriod : smallestPeriod;
|
|
2544
2741
|
};
|
|
2545
2742
|
return (_ctx, _cache) => {
|
|
2546
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
2743
|
+
return openBlock(), createBlock(unref(_sfc_main$t), {
|
|
2744
|
+
class: "sv-order-summary",
|
|
2547
2745
|
"no-border": "",
|
|
2548
2746
|
"no-spacing": "",
|
|
2549
2747
|
"content-background": "none",
|
|
@@ -2554,10 +2752,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2554
2752
|
})
|
|
2555
2753
|
}, {
|
|
2556
2754
|
default: withCtx(() => [
|
|
2557
|
-
createElementVNode("div", _hoisted_1$
|
|
2558
|
-
createVNode(unref(_sfc_main$
|
|
2755
|
+
createElementVNode("div", _hoisted_1$e, [
|
|
2756
|
+
createVNode(unref(_sfc_main$t), {
|
|
2757
|
+
"no-spacing": "",
|
|
2758
|
+
class: "sv-order-summary__subscription"
|
|
2759
|
+
}, {
|
|
2559
2760
|
default: withCtx(() => [
|
|
2560
|
-
__props.subscription ? (openBlock(), createBlock(_sfc_main$
|
|
2761
|
+
__props.subscription ? (openBlock(), createBlock(_sfc_main$D, {
|
|
2561
2762
|
key: 0,
|
|
2562
2763
|
avatar: __props.avatar,
|
|
2563
2764
|
invoice: __props.invoice,
|
|
@@ -2569,7 +2770,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2569
2770
|
]),
|
|
2570
2771
|
_: 1
|
|
2571
2772
|
}),
|
|
2572
|
-
billingPeriodOptions.value.length === 2 ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2773
|
+
billingPeriodOptions.value.length === 2 ? (openBlock(), createBlock(unref(_sfc_main$t), {
|
|
2573
2774
|
key: 0,
|
|
2574
2775
|
"no-spacing": "",
|
|
2575
2776
|
"content-classes": selectedBillingPeriodKey.value === periodBounds.value.biggestPeriod ? "border-primary-500" : void 0
|
|
@@ -2577,17 +2778,16 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2577
2778
|
default: withCtx(() => {
|
|
2578
2779
|
var _a;
|
|
2579
2780
|
return [
|
|
2580
|
-
createElementVNode("div", _hoisted_2$
|
|
2581
|
-
createElementVNode("div", _hoisted_3$
|
|
2582
|
-
highOption.value ? (openBlock(), createBlock(_sfc_main$
|
|
2781
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
2782
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
2783
|
+
highOption.value ? (openBlock(), createBlock(_sfc_main$g, {
|
|
2583
2784
|
key: 0,
|
|
2584
2785
|
name: highOption.value.label,
|
|
2585
2786
|
description: ((_a = selectedBillingPeriodOption.value) == null ? void 0 : _a.subLabel) ?? ""
|
|
2586
2787
|
}, createSlots({
|
|
2587
2788
|
default: withCtx(() => [
|
|
2588
|
-
createVNode(unref(_sfc_main$
|
|
2789
|
+
createVNode(unref(_sfc_main$E), {
|
|
2589
2790
|
"model-value": selectedBillingPeriodKey.value === periodBounds.value.biggestPeriod,
|
|
2590
|
-
"show-suffix-label-in-input": "",
|
|
2591
2791
|
"onUpdate:modelValue": handleBinaryBillingToggle
|
|
2592
2792
|
}, null, 8, ["model-value"])
|
|
2593
2793
|
]),
|
|
@@ -2596,8 +2796,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2596
2796
|
toggleSaveText.value ? {
|
|
2597
2797
|
name: "badge",
|
|
2598
2798
|
fn: withCtx(() => [
|
|
2599
|
-
createVNode(unref(_sfc_main$
|
|
2600
|
-
|
|
2799
|
+
createVNode(unref(_sfc_main$o), {
|
|
2800
|
+
intent: "brand",
|
|
2601
2801
|
content: toggleSaveText.value,
|
|
2602
2802
|
size: saveBadgeSize.value,
|
|
2603
2803
|
class: "whitespace-nowrap text-left leading-tight"
|
|
@@ -2611,26 +2811,28 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2611
2811
|
];
|
|
2612
2812
|
}),
|
|
2613
2813
|
_: 1
|
|
2614
|
-
}, 8, ["content-classes"])) : billingPeriodOptions.value.length > 2 ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2814
|
+
}, 8, ["content-classes"])) : billingPeriodOptions.value.length > 2 ? (openBlock(), createBlock(unref(_sfc_main$F), {
|
|
2615
2815
|
key: 1,
|
|
2616
2816
|
"single-model-value": selectedBillingPeriodKey.value,
|
|
2617
2817
|
"onUpdate:singleModelValue": _cache[0] || (_cache[0] = ($event) => selectedBillingPeriodKey.value = $event),
|
|
2818
|
+
class: "sv-order-summary__billing-period",
|
|
2618
2819
|
options: billingPeriodOptions.value,
|
|
2619
2820
|
size: "xl",
|
|
2620
2821
|
"has-large-dropdown": "",
|
|
2621
2822
|
"show-sub-label-in-input": "",
|
|
2622
2823
|
"show-suffix-in-closed-input": ""
|
|
2623
2824
|
}, null, 8, ["single-model-value", "options"])) : createCommentVNode("", true),
|
|
2624
|
-
__props.isUsageBased ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2825
|
+
__props.isUsageBased ? (openBlock(), createBlock(unref(_sfc_main$t), {
|
|
2625
2826
|
key: 2,
|
|
2626
|
-
"no-spacing": ""
|
|
2827
|
+
"no-spacing": "",
|
|
2828
|
+
class: "sv-order-summary__usage"
|
|
2627
2829
|
}, {
|
|
2628
2830
|
default: withCtx(() => [
|
|
2629
|
-
createElementVNode("div", _hoisted_4$
|
|
2630
|
-
createVNode(unref(_sfc_main$
|
|
2831
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
2832
|
+
createVNode(unref(_sfc_main$r), {
|
|
2631
2833
|
"no-spacing": "",
|
|
2632
2834
|
variant: "body-sm",
|
|
2633
|
-
|
|
2835
|
+
color: "subtle"
|
|
2634
2836
|
}, {
|
|
2635
2837
|
default: withCtx(() => [
|
|
2636
2838
|
createTextVNode(toDisplayString(unref($t)({
|
|
@@ -2645,15 +2847,17 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2645
2847
|
]),
|
|
2646
2848
|
_: 1
|
|
2647
2849
|
})) : createCommentVNode("", true),
|
|
2648
|
-
__props.invoice && __props.variant !== "products-inline" ? (openBlock(),
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2850
|
+
__props.invoice && __props.variant !== "products-inline" ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
|
|
2851
|
+
createVNode(unref(_sfc_main$G), {
|
|
2852
|
+
invoice: __props.invoice,
|
|
2853
|
+
"wrapper-component": unref(_sfc_main$t)
|
|
2854
|
+
}, null, 8, ["invoice", "wrapper-component"])
|
|
2855
|
+
])) : createCommentVNode("", true),
|
|
2856
|
+
createVNode(unref(_sfc_main$t), { class: "sv-order-summary__totals" }, {
|
|
2654
2857
|
default: withCtx(() => [
|
|
2655
|
-
__props.invoice ? (openBlock(), createBlock(unref(_sfc_main$
|
|
2858
|
+
__props.invoice ? (openBlock(), createBlock(unref(_sfc_main$H), {
|
|
2656
2859
|
key: 0,
|
|
2860
|
+
class: "sv-order-summary__invoice-preview",
|
|
2657
2861
|
variant: __props.variant === "products-inline" ? "default" : "without-products",
|
|
2658
2862
|
invoice: __props.invoice,
|
|
2659
2863
|
"trial-invoice": __props.trialInvoice,
|
|
@@ -2661,10 +2865,11 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2661
2865
|
collapsible: __props.collapsible,
|
|
2662
2866
|
"is-preview-without-taxes": !__props.countryCode,
|
|
2663
2867
|
"is-customer-facing": ""
|
|
2664
|
-
}, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (openBlock(), createBlock(unref(_sfc_main$
|
|
2868
|
+
}, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
2665
2869
|
key: 1,
|
|
2666
2870
|
variant: "body-sm",
|
|
2667
|
-
|
|
2871
|
+
color: "subtle",
|
|
2872
|
+
class: "sv-order-summary__empty"
|
|
2668
2873
|
}, {
|
|
2669
2874
|
default: withCtx(() => [
|
|
2670
2875
|
createTextVNode(toDisplayString(unref($t)({
|
|
@@ -2685,67 +2890,60 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2685
2890
|
};
|
|
2686
2891
|
}
|
|
2687
2892
|
});
|
|
2688
|
-
|
|
2689
|
-
const
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
]),
|
|
2731
|
-
_: 3
|
|
2732
|
-
});
|
|
2733
|
-
};
|
|
2734
|
-
}
|
|
2735
|
-
});
|
|
2736
|
-
const _hoisted_1$e = {
|
|
2893
|
+
async function createExpressCheckout(props, logger) {
|
|
2894
|
+
const { AdyenCheckout: createCheckout } = await import("../../index-DyvRdSR7.mjs");
|
|
2895
|
+
return createCheckout(
|
|
2896
|
+
getAdyenExpressCheckoutConfiguration({
|
|
2897
|
+
locale: props.locale,
|
|
2898
|
+
amount: props.amount,
|
|
2899
|
+
countryCode: props.countryCode,
|
|
2900
|
+
paymentMethodOptionResponse: props.paymentMethodOptionsResponse,
|
|
2901
|
+
logger
|
|
2902
|
+
})
|
|
2903
|
+
);
|
|
2904
|
+
}
|
|
2905
|
+
function useExpressPaymentMethod({
|
|
2906
|
+
props,
|
|
2907
|
+
create,
|
|
2908
|
+
onMissingButton,
|
|
2909
|
+
onMountFailed,
|
|
2910
|
+
afterMount
|
|
2911
|
+
}) {
|
|
2912
|
+
const buttonRef = ref();
|
|
2913
|
+
const logger = useLogger();
|
|
2914
|
+
const mount = async () => {
|
|
2915
|
+
const checkout = await createExpressCheckout(props, logger);
|
|
2916
|
+
const component = await create(checkout);
|
|
2917
|
+
if (!buttonRef.value) {
|
|
2918
|
+
onMissingButton();
|
|
2919
|
+
return;
|
|
2920
|
+
}
|
|
2921
|
+
try {
|
|
2922
|
+
await component.isAvailable();
|
|
2923
|
+
component.mount(buttonRef.value);
|
|
2924
|
+
afterMount == null ? void 0 : afterMount();
|
|
2925
|
+
} catch (error) {
|
|
2926
|
+
onMountFailed(error);
|
|
2927
|
+
}
|
|
2928
|
+
};
|
|
2929
|
+
onMounted(() => {
|
|
2930
|
+
void mount();
|
|
2931
|
+
});
|
|
2932
|
+
return { buttonRef };
|
|
2933
|
+
}
|
|
2934
|
+
const _hoisted_1$d = {
|
|
2737
2935
|
key: 0,
|
|
2738
2936
|
id: "svg-logo",
|
|
2739
2937
|
viewBox: "0 0 35 15",
|
|
2740
2938
|
class: "h-[44px]"
|
|
2741
2939
|
};
|
|
2742
|
-
const _hoisted_2$
|
|
2940
|
+
const _hoisted_2$5 = {
|
|
2743
2941
|
key: 1,
|
|
2744
2942
|
src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",
|
|
2745
2943
|
role: "presentation",
|
|
2746
2944
|
class: "h-[22px]"
|
|
2747
2945
|
};
|
|
2748
|
-
const _sfc_main$
|
|
2946
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
2749
2947
|
__name: "ExpressPaymentMethodButton",
|
|
2750
2948
|
props: {
|
|
2751
2949
|
type: { type: String }
|
|
@@ -2782,14 +2980,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2782
2980
|
emit("click");
|
|
2783
2981
|
}
|
|
2784
2982
|
return (_ctx, _cache) => {
|
|
2785
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
2983
|
+
return openBlock(), createBlock(unref(_sfc_main$v), {
|
|
2786
2984
|
size: "lg",
|
|
2787
2985
|
"aria-label": ariaLabel.value,
|
|
2788
|
-
class: normalizeClass([buttonClasses.value, "!block w-full
|
|
2986
|
+
class: normalizeClass([buttonClasses.value, "!block h-11 w-full bg-center bg-no-repeat"]),
|
|
2789
2987
|
onClick: handleClick
|
|
2790
2988
|
}, {
|
|
2791
2989
|
default: withCtx(() => [
|
|
2792
|
-
props.type === "applepay" ? (openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2990
|
+
props.type === "applepay" ? (openBlock(), createElementBlock("svg", _hoisted_1$d, [..._cache[0] || (_cache[0] = [
|
|
2793
2991
|
createElementVNode("svg", {
|
|
2794
2992
|
id: "svg-logo",
|
|
2795
2993
|
x: "0",
|
|
@@ -2799,8 +2997,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2799
2997
|
class: "logo",
|
|
2800
2998
|
viewBox: "0 0 105 43",
|
|
2801
2999
|
version: "1.1",
|
|
2802
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
2803
|
-
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
3000
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2804
3001
|
}, [
|
|
2805
3002
|
createElementVNode("title", null, "Apple Logo"),
|
|
2806
3003
|
createElementVNode("g", {
|
|
@@ -2818,16 +3015,16 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2818
3015
|
])
|
|
2819
3016
|
])
|
|
2820
3017
|
], -1)
|
|
2821
|
-
])])) : props.type === "paypal" ? (openBlock(), createElementBlock("img", _hoisted_2$
|
|
3018
|
+
])])) : props.type === "paypal" ? (openBlock(), createElementBlock("img", _hoisted_2$5)) : createCommentVNode("", true)
|
|
2822
3019
|
]),
|
|
2823
3020
|
_: 1
|
|
2824
3021
|
}, 8, ["aria-label", "class"]);
|
|
2825
3022
|
};
|
|
2826
3023
|
}
|
|
2827
3024
|
});
|
|
2828
|
-
const _hoisted_1$
|
|
3025
|
+
const _hoisted_1$c = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" };
|
|
2829
3026
|
const PAYMENT_GATEWAY_VARIANT_ADYEN = "ADYEN";
|
|
2830
|
-
const _sfc_main$
|
|
3027
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
2831
3028
|
__name: "ExpressPaymentMethodApplePay",
|
|
2832
3029
|
props: {
|
|
2833
3030
|
onBillingInformationChange: { type: Function },
|
|
@@ -2847,15 +3044,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2847
3044
|
const { authorizePayment } = createPaymentsService();
|
|
2848
3045
|
const paymentAcceptorId = props.paymentMethodOptionsResponse.payment_acceptor.id;
|
|
2849
3046
|
const initApplePay = async () => {
|
|
2850
|
-
const {
|
|
2851
|
-
const checkout = await
|
|
2852
|
-
getAdyenExpressCheckoutConfiguration({
|
|
2853
|
-
amount: props.amount,
|
|
2854
|
-
locale: props.locale,
|
|
2855
|
-
countryCode: props.countryCode,
|
|
2856
|
-
paymentMethodOptionResponse: props.paymentMethodOptionsResponse
|
|
2857
|
-
})
|
|
2858
|
-
);
|
|
3047
|
+
const { ApplePay } = await import("../../index-DyvRdSR7.mjs");
|
|
3048
|
+
const checkout = await createExpressCheckout(props, logger);
|
|
2859
3049
|
const applePay = new ApplePay(checkout, {
|
|
2860
3050
|
isExpress: true,
|
|
2861
3051
|
recurringPaymentRequest: {
|
|
@@ -2999,7 +3189,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
2999
3189
|
}
|
|
3000
3190
|
});
|
|
3001
3191
|
if (!applePayButtonRef.value) {
|
|
3002
|
-
|
|
3192
|
+
logger.error("APPLE_PAY_ERROR", "Apple Pay button ref not found");
|
|
3003
3193
|
return;
|
|
3004
3194
|
}
|
|
3005
3195
|
try {
|
|
@@ -3007,7 +3197,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
3007
3197
|
applePay.mount(applePayButtonRef.value);
|
|
3008
3198
|
emit("ready");
|
|
3009
3199
|
} catch (e) {
|
|
3010
|
-
|
|
3200
|
+
logger.error("APPLE_PAY_ERROR", "Apple Pay not available on this device", {}, e);
|
|
3011
3201
|
}
|
|
3012
3202
|
};
|
|
3013
3203
|
const getAppleIntervalConfigFromTimePeriod = (timePeriod) => {
|
|
@@ -3061,12 +3251,12 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
3061
3251
|
});
|
|
3062
3252
|
return (_ctx, _cache) => {
|
|
3063
3253
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3064
|
-
__props.isVisible ? (openBlock(), createBlock(_sfc_main$
|
|
3254
|
+
__props.isVisible ? (openBlock(), createBlock(_sfc_main$e, {
|
|
3065
3255
|
key: 0,
|
|
3066
3256
|
type: "applepay",
|
|
3067
3257
|
onClick: handleClick
|
|
3068
3258
|
})) : createCommentVNode("", true),
|
|
3069
|
-
createElementVNode("div", _hoisted_1$
|
|
3259
|
+
createElementVNode("div", _hoisted_1$c, [
|
|
3070
3260
|
createElementVNode("div", {
|
|
3071
3261
|
ref_key: "applePayButtonRef",
|
|
3072
3262
|
ref: applePayButtonRef
|
|
@@ -3076,8 +3266,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
3076
3266
|
};
|
|
3077
3267
|
}
|
|
3078
3268
|
});
|
|
3079
|
-
const _hoisted_1$
|
|
3080
|
-
const _sfc_main$
|
|
3269
|
+
const _hoisted_1$b = { class: "relative overflow-hidden" };
|
|
3270
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
3081
3271
|
__name: "ExpressPaymentMethodPaypal",
|
|
3082
3272
|
props: {
|
|
3083
3273
|
amount: { type: Object },
|
|
@@ -3091,52 +3281,35 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
3091
3281
|
setup(__props, { emit: __emit }) {
|
|
3092
3282
|
const props = __props;
|
|
3093
3283
|
const emit = __emit;
|
|
3094
|
-
const paypalButtonRef = ref();
|
|
3095
3284
|
const logger = useLogger();
|
|
3096
|
-
const
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
)
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
if (!paypalButtonRef.value) {
|
|
3119
|
-
logger.error(
|
|
3120
|
-
"EXPRESS_CHECKOUT_PAYPAL_ERROR",
|
|
3121
|
-
"The PayPal button reference is not found and cannot be mounted"
|
|
3122
|
-
);
|
|
3123
|
-
return;
|
|
3124
|
-
}
|
|
3125
|
-
try {
|
|
3126
|
-
await paypal.isAvailable();
|
|
3127
|
-
paypal.mount(paypalButtonRef.value);
|
|
3128
|
-
} catch (error) {
|
|
3129
|
-
logger.error("EXPRESS_CHECKOUT_PAYPAL_ERROR", "Failed mounting PayPal express button", {
|
|
3130
|
-
error
|
|
3285
|
+
const { buttonRef: paypalButtonRef } = useExpressPaymentMethod({
|
|
3286
|
+
props,
|
|
3287
|
+
onMissingButton: () => logger.error(
|
|
3288
|
+
"EXPRESS_CHECKOUT_PAYPAL_ERROR",
|
|
3289
|
+
"The PayPal button reference is not found and cannot be mounted"
|
|
3290
|
+
),
|
|
3291
|
+
onMountFailed: (error) => logger.error("EXPRESS_CHECKOUT_PAYPAL_ERROR", "Failed mounting PayPal express button", {
|
|
3292
|
+
error
|
|
3293
|
+
}),
|
|
3294
|
+
create: async (checkout) => {
|
|
3295
|
+
const { PayPal } = await import("../../index-DyvRdSR7.mjs");
|
|
3296
|
+
return new PayPal(checkout, {
|
|
3297
|
+
isExpress: true,
|
|
3298
|
+
blockPayPalPayLaterButton: true,
|
|
3299
|
+
blockPayPalCreditButton: true,
|
|
3300
|
+
blockPayPalVenmoButton: true,
|
|
3301
|
+
style: {
|
|
3302
|
+
height: 55
|
|
3303
|
+
},
|
|
3304
|
+
onInit: () => {
|
|
3305
|
+
emit("ready");
|
|
3306
|
+
}
|
|
3131
3307
|
});
|
|
3132
3308
|
}
|
|
3133
|
-
};
|
|
3134
|
-
onMounted(() => {
|
|
3135
|
-
void initPaypal();
|
|
3136
3309
|
});
|
|
3137
3310
|
return (_ctx, _cache) => {
|
|
3138
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3139
|
-
__props.isVisible ? (openBlock(), createBlock(_sfc_main$
|
|
3311
|
+
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
3312
|
+
__props.isVisible ? (openBlock(), createBlock(_sfc_main$e, {
|
|
3140
3313
|
key: 0,
|
|
3141
3314
|
type: "paypal",
|
|
3142
3315
|
class: "w-full"
|
|
@@ -3150,8 +3323,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
3150
3323
|
};
|
|
3151
3324
|
}
|
|
3152
3325
|
});
|
|
3153
|
-
const _hoisted_1$
|
|
3154
|
-
const _sfc_main$
|
|
3326
|
+
const _hoisted_1$a = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" };
|
|
3327
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
3155
3328
|
__name: "ExpressPaymentMethodGooglePay",
|
|
3156
3329
|
props: {
|
|
3157
3330
|
amount: { type: Object },
|
|
@@ -3165,38 +3338,24 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3165
3338
|
setup(__props, { emit: __emit }) {
|
|
3166
3339
|
const props = __props;
|
|
3167
3340
|
const emit = __emit;
|
|
3168
|
-
const googlePayButtonRef = ref();
|
|
3169
3341
|
const logger = useLogger();
|
|
3170
|
-
const
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
}
|
|
3188
|
-
try {
|
|
3189
|
-
await googlePay.isAvailable();
|
|
3190
|
-
googlePay.mount(googlePayButtonRef.value);
|
|
3191
|
-
emit("ready");
|
|
3192
|
-
} catch (error) {
|
|
3193
|
-
logger.error(
|
|
3194
|
-
"EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
|
|
3195
|
-
"Failed mounting Google Pay express button",
|
|
3196
|
-
{ error }
|
|
3197
|
-
);
|
|
3198
|
-
}
|
|
3199
|
-
};
|
|
3342
|
+
const { buttonRef: googlePayButtonRef } = useExpressPaymentMethod({
|
|
3343
|
+
props,
|
|
3344
|
+
onMissingButton: () => logger.error(
|
|
3345
|
+
"EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
|
|
3346
|
+
"The Google Pay button reference is not found and cannot be mounted"
|
|
3347
|
+
),
|
|
3348
|
+
onMountFailed: (error) => logger.error(
|
|
3349
|
+
"EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
|
|
3350
|
+
"Failed mounting Google Pay express button",
|
|
3351
|
+
{ error }
|
|
3352
|
+
),
|
|
3353
|
+
create: async (checkout) => {
|
|
3354
|
+
const { GooglePay } = await import("../../index-DyvRdSR7.mjs");
|
|
3355
|
+
return new GooglePay(checkout, { isExpress: true });
|
|
3356
|
+
},
|
|
3357
|
+
afterMount: () => emit("ready")
|
|
3358
|
+
});
|
|
3200
3359
|
const handleClick = () => {
|
|
3201
3360
|
var _a;
|
|
3202
3361
|
const googlePayButton = (_a = googlePayButtonRef.value) == null ? void 0 : _a.querySelector("#gpay-button-online-api-id");
|
|
@@ -3209,17 +3368,14 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3209
3368
|
googlePayButton.dispatchEvent(clickEvent);
|
|
3210
3369
|
}
|
|
3211
3370
|
};
|
|
3212
|
-
onMounted(() => {
|
|
3213
|
-
void initGooglePay();
|
|
3214
|
-
});
|
|
3215
3371
|
return (_ctx, _cache) => {
|
|
3216
3372
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
3217
|
-
__props.isVisible ? (openBlock(), createBlock(_sfc_main$
|
|
3373
|
+
__props.isVisible ? (openBlock(), createBlock(_sfc_main$e, {
|
|
3218
3374
|
key: 0,
|
|
3219
3375
|
type: "googlepay",
|
|
3220
3376
|
onClick: handleClick
|
|
3221
3377
|
})) : createCommentVNode("", true),
|
|
3222
|
-
createElementVNode("div", _hoisted_1$
|
|
3378
|
+
createElementVNode("div", _hoisted_1$a, [
|
|
3223
3379
|
createElementVNode("div", {
|
|
3224
3380
|
ref_key: "googlePayButtonRef",
|
|
3225
3381
|
ref: googlePayButtonRef
|
|
@@ -3229,15 +3385,15 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
3229
3385
|
};
|
|
3230
3386
|
}
|
|
3231
3387
|
});
|
|
3232
|
-
const _hoisted_1$
|
|
3388
|
+
const _hoisted_1$9 = {
|
|
3233
3389
|
key: 0,
|
|
3234
3390
|
class: "mt-4n"
|
|
3235
3391
|
};
|
|
3236
|
-
const _hoisted_2$
|
|
3237
|
-
const _hoisted_3$
|
|
3238
|
-
const _hoisted_4$
|
|
3392
|
+
const _hoisted_2$4 = { class: "mb-2" };
|
|
3393
|
+
const _hoisted_3$3 = { class: "grid grid-cols-6 gap-1 md:gap-2" };
|
|
3394
|
+
const _hoisted_4$3 = { class: "mt-4 h-4" };
|
|
3239
3395
|
const DEFAULT_EXPRESS_PAYMENT_BUTTON_COUNT = 2;
|
|
3240
|
-
const _sfc_main$
|
|
3396
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
3241
3397
|
__name: "ExpressPaymentMethods",
|
|
3242
3398
|
props: {
|
|
3243
3399
|
amount: { type: Object },
|
|
@@ -3263,7 +3419,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3263
3419
|
return (_a = props.paymentMethodsOptionsResponse) == null ? void 0 : _a.find(
|
|
3264
3420
|
(entry) => {
|
|
3265
3421
|
var _a2;
|
|
3266
|
-
return (_a2 = entry.options) == null ? void 0 : _a2.some(
|
|
3422
|
+
return (_a2 = entry.options) == null ? void 0 : _a2.some(
|
|
3423
|
+
(option) => option.name.toLowerCase() === "apple pay" && option.payment_gateway_variant === "ADYEN"
|
|
3424
|
+
);
|
|
3267
3425
|
}
|
|
3268
3426
|
);
|
|
3269
3427
|
});
|
|
@@ -3275,7 +3433,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3275
3433
|
return (_a = props.paymentMethodsOptionsResponse) == null ? void 0 : _a.find(
|
|
3276
3434
|
(entry) => {
|
|
3277
3435
|
var _a2;
|
|
3278
|
-
return (_a2 = entry.options) == null ? void 0 : _a2.some(
|
|
3436
|
+
return (_a2 = entry.options) == null ? void 0 : _a2.some(
|
|
3437
|
+
(option) => option.name.toLowerCase() === "paypal" && option.payment_gateway_variant === "ADYEN"
|
|
3438
|
+
);
|
|
3279
3439
|
}
|
|
3280
3440
|
);
|
|
3281
3441
|
});
|
|
@@ -3287,7 +3447,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3287
3447
|
return (_a = props.paymentMethodsOptionsResponse) == null ? void 0 : _a.find(
|
|
3288
3448
|
(entry) => {
|
|
3289
3449
|
var _a2;
|
|
3290
|
-
return (_a2 = entry.options) == null ? void 0 : _a2.some(
|
|
3450
|
+
return (_a2 = entry.options) == null ? void 0 : _a2.some(
|
|
3451
|
+
(option) => option.name.toLowerCase() === "google pay" && option.payment_gateway_variant === "ADYEN"
|
|
3452
|
+
);
|
|
3291
3453
|
}
|
|
3292
3454
|
);
|
|
3293
3455
|
});
|
|
@@ -3311,12 +3473,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3311
3473
|
return (paymentMethodOptionsResponseEntryIncludingApplePay.value ? 1 : 0) + (paymentMethodOptionsResponseEntryIncludingGooglePay.value ? 1 : 0) + (paymentMethodOptionsResponseEntryIncludingPayPal.value ? 1 : 0);
|
|
3312
3474
|
});
|
|
3313
3475
|
return (_ctx, _cache) => {
|
|
3314
|
-
return hasPaymentMethodOptions.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3315
|
-
createElementVNode("div", _hoisted_2$
|
|
3316
|
-
!isReady.value ? (openBlock(), createBlock(_sfc_main$
|
|
3476
|
+
return hasPaymentMethodOptions.value ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
3477
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
3478
|
+
!isReady.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
3317
3479
|
key: 0,
|
|
3318
3480
|
variant: "title"
|
|
3319
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
3481
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
3320
3482
|
key: 1,
|
|
3321
3483
|
variant: "heading-3",
|
|
3322
3484
|
tag: "h2"
|
|
@@ -3331,10 +3493,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3331
3493
|
_: 1
|
|
3332
3494
|
}))
|
|
3333
3495
|
]),
|
|
3334
|
-
createElementVNode("div", _hoisted_3$
|
|
3496
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
3335
3497
|
!isReady.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
3336
|
-
createVNode(_sfc_main$
|
|
3337
|
-
createVNode(_sfc_main$
|
|
3498
|
+
createVNode(_sfc_main$I, { class: "col-span-3 h-11" }),
|
|
3499
|
+
createVNode(_sfc_main$I, { class: "col-span-3 h-11" })
|
|
3338
3500
|
], 64)) : createCommentVNode("", true),
|
|
3339
3501
|
createElementVNode("div", {
|
|
3340
3502
|
class: normalizeClass(["col-span-3 md:col-span-2", {
|
|
@@ -3344,7 +3506,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3344
3506
|
"!col-span-6 md:!col-span-2": expressPaymentButtonCount.value === 3
|
|
3345
3507
|
}])
|
|
3346
3508
|
}, [
|
|
3347
|
-
paymentMethodOptionsResponseEntryIncludingApplePay.value ? (openBlock(), createBlock(_sfc_main$
|
|
3509
|
+
paymentMethodOptionsResponseEntryIncludingApplePay.value ? (openBlock(), createBlock(_sfc_main$d, {
|
|
3348
3510
|
key: 0,
|
|
3349
3511
|
amount: __props.amount,
|
|
3350
3512
|
"billing-information": __props.billingInformation,
|
|
@@ -3364,7 +3526,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3364
3526
|
"md:!col-span-3": expressPaymentButtonCount.value === 2
|
|
3365
3527
|
}])
|
|
3366
3528
|
}, [
|
|
3367
|
-
paymentMethodOptionsResponseEntryIncludingGooglePay.value ? (openBlock(), createBlock(_sfc_main$
|
|
3529
|
+
paymentMethodOptionsResponseEntryIncludingGooglePay.value ? (openBlock(), createBlock(_sfc_main$b, {
|
|
3368
3530
|
key: 0,
|
|
3369
3531
|
amount: __props.amount,
|
|
3370
3532
|
"billing-information": __props.billingInformation,
|
|
@@ -3382,7 +3544,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3382
3544
|
"md:!col-span-3": expressPaymentButtonCount.value === 2
|
|
3383
3545
|
}])
|
|
3384
3546
|
}, [
|
|
3385
|
-
paymentMethodOptionsResponseEntryIncludingPayPal.value ? (openBlock(), createBlock(_sfc_main$
|
|
3547
|
+
paymentMethodOptionsResponseEntryIncludingPayPal.value ? (openBlock(), createBlock(_sfc_main$c, {
|
|
3386
3548
|
key: 0,
|
|
3387
3549
|
amount: __props.amount,
|
|
3388
3550
|
"billing-information": __props.billingInformation,
|
|
@@ -3394,11 +3556,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3394
3556
|
}, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : createCommentVNode("", true)
|
|
3395
3557
|
], 2)
|
|
3396
3558
|
]),
|
|
3397
|
-
createElementVNode("div", _hoisted_4$
|
|
3398
|
-
!isReady.value ? (openBlock(), createBlock(_sfc_main$
|
|
3559
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
3560
|
+
!isReady.value ? (openBlock(), createBlock(_sfc_main$I, {
|
|
3399
3561
|
key: 0,
|
|
3400
3562
|
variant: "divider-text"
|
|
3401
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
3563
|
+
})) : (openBlock(), createBlock(unref(_sfc_main$J), {
|
|
3402
3564
|
key: 1,
|
|
3403
3565
|
text: unref($t)({
|
|
3404
3566
|
defaultMessage: "Or",
|
|
@@ -3412,8 +3574,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
3412
3574
|
};
|
|
3413
3575
|
}
|
|
3414
3576
|
});
|
|
3415
|
-
const _hoisted_1$
|
|
3416
|
-
const _sfc_main$
|
|
3577
|
+
const _hoisted_1$8 = { class: "grid grid-cols-2 gap-2" };
|
|
3578
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
3417
3579
|
__name: "TieredTableRow",
|
|
3418
3580
|
props: {
|
|
3419
3581
|
band: { type: Object },
|
|
@@ -3442,10 +3604,10 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3442
3604
|
return props.band.tier_top_bound.number;
|
|
3443
3605
|
});
|
|
3444
3606
|
return (_ctx, _cache) => {
|
|
3445
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3446
|
-
createVNode(unref(_sfc_main$
|
|
3607
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
3608
|
+
createVNode(unref(_sfc_main$r), {
|
|
3447
3609
|
variant: "body-xs",
|
|
3448
|
-
|
|
3610
|
+
color: "subtle",
|
|
3449
3611
|
tag: "div"
|
|
3450
3612
|
}, {
|
|
3451
3613
|
default: withCtx(() => [
|
|
@@ -3476,9 +3638,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3476
3638
|
]),
|
|
3477
3639
|
_: 1
|
|
3478
3640
|
}),
|
|
3479
|
-
createVNode(unref(_sfc_main$
|
|
3641
|
+
createVNode(unref(_sfc_main$r), {
|
|
3480
3642
|
variant: "body-xs",
|
|
3481
|
-
|
|
3643
|
+
color: "subtle",
|
|
3482
3644
|
tag: "div",
|
|
3483
3645
|
class: "text-right"
|
|
3484
3646
|
}, {
|
|
@@ -3504,8 +3666,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
3504
3666
|
};
|
|
3505
3667
|
}
|
|
3506
3668
|
});
|
|
3507
|
-
const _hoisted_1$
|
|
3508
|
-
const _sfc_main$
|
|
3669
|
+
const _hoisted_1$7 = { class: "grid grid-cols-1 gap-0.5 pt-1.5" };
|
|
3670
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
3509
3671
|
__name: "TieredTable",
|
|
3510
3672
|
props: {
|
|
3511
3673
|
bands: { type: Array },
|
|
@@ -3513,9 +3675,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
3513
3675
|
},
|
|
3514
3676
|
setup(__props) {
|
|
3515
3677
|
return (_ctx, _cache) => {
|
|
3516
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3678
|
+
return openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
3517
3679
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.bands, (band, index) => {
|
|
3518
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3680
|
+
return openBlock(), createBlock(_sfc_main$9, {
|
|
3519
3681
|
key: index,
|
|
3520
3682
|
band,
|
|
3521
3683
|
"is-first": index === 0,
|
|
@@ -3548,14 +3710,14 @@ function useSeatBasedPricing({
|
|
|
3548
3710
|
pricingItemConfigId
|
|
3549
3711
|
}) {
|
|
3550
3712
|
return computed(() => {
|
|
3551
|
-
var _a, _b;
|
|
3713
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3552
3714
|
const { config, productItem } = getPricingItemByPricingConfigId({
|
|
3553
3715
|
pricings,
|
|
3554
3716
|
pricingItemConfigId
|
|
3555
3717
|
});
|
|
3556
3718
|
return {
|
|
3557
3719
|
billing: {
|
|
3558
|
-
period: config == null ? void 0 : config.billing_period,
|
|
3720
|
+
period: (_b = (_a = config == null ? void 0 : config.billing_period_configs) == null ? void 0 : _a[0]) == null ? void 0 : _b.billing_period,
|
|
3559
3721
|
billedInAdvance: config == null ? void 0 : config.billing_in_advance
|
|
3560
3722
|
},
|
|
3561
3723
|
product: {
|
|
@@ -3563,18 +3725,22 @@ function useSeatBasedPricing({
|
|
|
3563
3725
|
description: productItem == null ? void 0 : productItem.description
|
|
3564
3726
|
},
|
|
3565
3727
|
pricing: {
|
|
3566
|
-
...(config == null ? void 0 : config.
|
|
3567
|
-
|
|
3728
|
+
...((_c = config == null ? void 0 : config.details) == null ? void 0 : _c.pricing_type) === "FLAT" && {
|
|
3729
|
+
amount: (_f = (_e = (_d = config.details) == null ? void 0 : _d.bands) == null ? void 0 : _e[0]) == null ? void 0 : _f.amount
|
|
3730
|
+
},
|
|
3731
|
+
...((_g = config == null ? void 0 : config.details) == null ? void 0 : _g.pricing_type) === "TIERED" && {
|
|
3732
|
+
tiered: { bands: (_h = config.details) == null ? void 0 : _h.bands }
|
|
3733
|
+
}
|
|
3568
3734
|
}
|
|
3569
3735
|
};
|
|
3570
3736
|
});
|
|
3571
3737
|
}
|
|
3572
|
-
const _hoisted_1$
|
|
3573
|
-
const _hoisted_2$
|
|
3574
|
-
const _hoisted_3$
|
|
3575
|
-
const _hoisted_4$
|
|
3576
|
-
const _hoisted_5$
|
|
3577
|
-
const _sfc_main$
|
|
3738
|
+
const _hoisted_1$6 = { class: "flex flex-row-reverse gap-4 md:flex-row" };
|
|
3739
|
+
const _hoisted_2$3 = { class: "w-24 shrink-0 justify-start md:w-32" };
|
|
3740
|
+
const _hoisted_3$2 = ["tabindex"];
|
|
3741
|
+
const _hoisted_4$2 = { key: 0 };
|
|
3742
|
+
const _hoisted_5$2 = { key: 0 };
|
|
3743
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3578
3744
|
__name: "SeatsEditorItem",
|
|
3579
3745
|
props: /* @__PURE__ */ mergeModels({
|
|
3580
3746
|
modelValue: { type: Object },
|
|
@@ -3592,7 +3758,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3592
3758
|
const { formatTimePeriod } = useTimePeriod();
|
|
3593
3759
|
const isExpanded = ref(false);
|
|
3594
3760
|
const seatsNumber = computed({
|
|
3595
|
-
get: () =>
|
|
3761
|
+
get: () => +(model.value.number || FALLBACK_SEATS_NUMBER),
|
|
3596
3762
|
set(number) {
|
|
3597
3763
|
model.value = {
|
|
3598
3764
|
...model.value,
|
|
@@ -3611,9 +3777,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3611
3777
|
return (_ctx, _cache) => {
|
|
3612
3778
|
var _a, _b, _c;
|
|
3613
3779
|
return openBlock(), createElementBlock("div", null, [
|
|
3614
|
-
createElementVNode("div", _hoisted_1$
|
|
3615
|
-
createElementVNode("div", _hoisted_2$
|
|
3616
|
-
createVNode(unref(_sfc_main$
|
|
3780
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
3781
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
3782
|
+
createVNode(unref(_sfc_main$m), {
|
|
3617
3783
|
modelValue: seatsNumber.value,
|
|
3618
3784
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seatsNumber.value = $event),
|
|
3619
3785
|
size: "sm",
|
|
@@ -3621,11 +3787,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3621
3787
|
}, null, 8, ["modelValue", "min"])
|
|
3622
3788
|
]),
|
|
3623
3789
|
createElementVNode("div", {
|
|
3624
|
-
class: normalizeClass(["flex flex-col
|
|
3790
|
+
class: normalizeClass(["flex grow flex-col", { "hover:cursor-pointer": isCollapsible.value }]),
|
|
3625
3791
|
tabindex: isCollapsible.value ? 0 : void 0,
|
|
3626
3792
|
onClick: _cache[1] || (_cache[1] = ($event) => isCollapsible.value ? isExpanded.value = !isExpanded.value : void 0)
|
|
3627
3793
|
}, [
|
|
3628
|
-
createVNode(unref(_sfc_main$
|
|
3794
|
+
createVNode(unref(_sfc_main$r), {
|
|
3629
3795
|
tag: "span",
|
|
3630
3796
|
variant: "body-sm",
|
|
3631
3797
|
weight: "semibold"
|
|
@@ -3639,11 +3805,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3639
3805
|
]),
|
|
3640
3806
|
_: 1
|
|
3641
3807
|
}),
|
|
3642
|
-
unref(seats).pricing.amount ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3808
|
+
unref(seats).pricing.amount ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
3643
3809
|
key: 0,
|
|
3644
3810
|
tag: "span",
|
|
3645
3811
|
variant: "body-xs",
|
|
3646
|
-
|
|
3812
|
+
color: "subtle"
|
|
3647
3813
|
}, {
|
|
3648
3814
|
default: withCtx(() => [
|
|
3649
3815
|
createTextVNode(toDisplayString(unref($t)(
|
|
@@ -3662,11 +3828,11 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3662
3828
|
)), 1)
|
|
3663
3829
|
]),
|
|
3664
3830
|
_: 1
|
|
3665
|
-
})) : unref(seats).pricing.tiered ? (openBlock(), createBlock(unref(_sfc_main$
|
|
3831
|
+
})) : unref(seats).pricing.tiered ? (openBlock(), createBlock(unref(_sfc_main$r), {
|
|
3666
3832
|
key: 1,
|
|
3667
3833
|
tag: "span",
|
|
3668
3834
|
variant: "body-xs",
|
|
3669
|
-
|
|
3835
|
+
color: "subtle"
|
|
3670
3836
|
}, {
|
|
3671
3837
|
default: withCtx(() => [
|
|
3672
3838
|
createTextVNode(toDisplayString(unref($t)({
|
|
@@ -3674,34 +3840,38 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
3674
3840
|
id: "seats.tiered_pricing_label",
|
|
3675
3841
|
description: "The label indicating tiered pricing structure for seats"
|
|
3676
3842
|
})) + " ", 1),
|
|
3677
|
-
createVNode(unref(_sfc_main$
|
|
3843
|
+
createVNode(unref(_sfc_main$K), {
|
|
3678
3844
|
icon: "keyboard_arrow_down",
|
|
3679
3845
|
size: "xs",
|
|
3680
|
-
class: normalizeClass(["absolute transition ease-in-out
|
|
3846
|
+
class: normalizeClass(["absolute text-gray-400 transition ease-in-out", { "rotate-0": !isExpanded.value, "rotate-180": isExpanded.value }])
|
|
3681
3847
|
}, null, 8, ["class"])
|
|
3682
3848
|
]),
|
|
3683
3849
|
_: 1
|
|
3684
3850
|
})) : createCommentVNode("", true)
|
|
3685
|
-
], 10, _hoisted_3$
|
|
3851
|
+
], 10, _hoisted_3$2)
|
|
3686
3852
|
]),
|
|
3687
|
-
((_c = (_b = unref(seats).pricing) == null ? void 0 : _b.tiered) == null ? void 0 : _c.bands) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
3688
|
-
createVNode(unref(_sfc_main$
|
|
3853
|
+
((_c = (_b = unref(seats).pricing) == null ? void 0 : _b.tiered) == null ? void 0 : _c.bands) ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
|
|
3854
|
+
createVNode(unref(_sfc_main$w), { "is-open": isExpanded.value }, {
|
|
3689
3855
|
default: withCtx(() => [
|
|
3690
|
-
isExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
3691
|
-
createVNode(_sfc_main$
|
|
3856
|
+
isExpanded.value ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
3857
|
+
createVNode(_sfc_main$8, {
|
|
3692
3858
|
bands: unref(seats).pricing.tiered.bands,
|
|
3693
3859
|
period: unref(seats).billing.period
|
|
3694
3860
|
}, null, 8, ["bands", "period"])
|
|
3695
3861
|
])) : createCommentVNode("", true)
|
|
3696
3862
|
]),
|
|
3697
3863
|
_: 1
|
|
3698
|
-
})
|
|
3864
|
+
}, 8, ["is-open"])
|
|
3699
3865
|
])) : createCommentVNode("", true)
|
|
3700
3866
|
]);
|
|
3701
3867
|
};
|
|
3702
3868
|
}
|
|
3703
3869
|
});
|
|
3704
|
-
const
|
|
3870
|
+
const _hoisted_1$5 = {
|
|
3871
|
+
key: 0,
|
|
3872
|
+
class: "grid grid-cols-1 gap-1"
|
|
3873
|
+
};
|
|
3874
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
3705
3875
|
__name: "SeatsEditor",
|
|
3706
3876
|
props: /* @__PURE__ */ mergeModels({
|
|
3707
3877
|
modelValue: { type: Array },
|
|
@@ -3723,64 +3893,31 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
3723
3893
|
}
|
|
3724
3894
|
});
|
|
3725
3895
|
return (_ctx, _cache) => {
|
|
3726
|
-
return openBlock(
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
});
|
|
3746
|
-
const _hoisted_1$6 = { class: "flex gap-4 border-l-2 border-primary-600 px-2" };
|
|
3747
|
-
const _hoisted_2$3 = { class: "grow" };
|
|
3748
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
3749
|
-
__name: "PricingGroupTitle",
|
|
3750
|
-
setup(__props) {
|
|
3751
|
-
return (_ctx, _cache) => {
|
|
3752
|
-
return openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
3753
|
-
createElementVNode("div", _hoisted_2$3, [
|
|
3754
|
-
createVNode(unref(_sfc_main$2$1), {
|
|
3755
|
-
tag: "span",
|
|
3756
|
-
variant: "body-sm",
|
|
3757
|
-
weight: "semibold"
|
|
3758
|
-
}, {
|
|
3759
|
-
default: withCtx(() => [
|
|
3760
|
-
renderSlot(_ctx.$slots, "title")
|
|
3761
|
-
]),
|
|
3762
|
-
_: 3
|
|
3763
|
-
})
|
|
3764
|
-
]),
|
|
3765
|
-
createElementVNode("div", null, [
|
|
3766
|
-
createVNode(unref(_sfc_main$2$1), {
|
|
3767
|
-
tag: "span",
|
|
3768
|
-
variant: "body-xs",
|
|
3769
|
-
shade: "lighter"
|
|
3770
|
-
}, {
|
|
3771
|
-
default: withCtx(() => [
|
|
3772
|
-
renderSlot(_ctx.$slots, "description")
|
|
3773
|
-
]),
|
|
3774
|
-
_: 3
|
|
3775
|
-
})
|
|
3776
|
-
])
|
|
3777
|
-
]);
|
|
3896
|
+
return __props.modelValue.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
3897
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.modelValue, (item, index) => {
|
|
3898
|
+
return openBlock(), createBlock(unref(_sfc_main$t), { key: index }, {
|
|
3899
|
+
default: withCtx(() => {
|
|
3900
|
+
var _a;
|
|
3901
|
+
return [
|
|
3902
|
+
item.pricing_item_config_id ? (openBlock(), createBlock(_sfc_main$7, {
|
|
3903
|
+
key: item.pricing_item_config_id,
|
|
3904
|
+
modelValue: itemModel(index).value,
|
|
3905
|
+
"onUpdate:modelValue": ($event) => itemModel(index).value = $event,
|
|
3906
|
+
"default-value": (_a = __props.initialSeatsValues) == null ? void 0 : _a[index],
|
|
3907
|
+
pricings: __props.pricings
|
|
3908
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "default-value", "pricings"])) : createCommentVNode("", true)
|
|
3909
|
+
];
|
|
3910
|
+
}),
|
|
3911
|
+
_: 2
|
|
3912
|
+
}, 1024);
|
|
3913
|
+
}), 128))
|
|
3914
|
+
])) : createCommentVNode("", true);
|
|
3778
3915
|
};
|
|
3779
3916
|
}
|
|
3780
3917
|
});
|
|
3781
|
-
const _hoisted_1$
|
|
3918
|
+
const _hoisted_1$4 = { class: "p-1" };
|
|
3782
3919
|
const _hoisted_2$2 = { class: "grid grid-cols-1 gap-1 pt-1" };
|
|
3783
|
-
const _sfc_main$
|
|
3920
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3784
3921
|
__name: "AddonSingleEditor",
|
|
3785
3922
|
props: /* @__PURE__ */ mergeModels({
|
|
3786
3923
|
constraint: { type: String },
|
|
@@ -3798,7 +3935,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3798
3935
|
const props = __props;
|
|
3799
3936
|
const model = useModel(__props, "modelValue");
|
|
3800
3937
|
const { $t } = useIntl();
|
|
3801
|
-
const {
|
|
3938
|
+
const { describePricing } = usePricingDescription({
|
|
3802
3939
|
currency: toRef(props, "currency"),
|
|
3803
3940
|
billingPeriod: toRef(props, "billingPeriod")
|
|
3804
3941
|
});
|
|
@@ -3839,10 +3976,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3839
3976
|
}
|
|
3840
3977
|
};
|
|
3841
3978
|
return (_ctx, _cache) => {
|
|
3842
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
3979
|
+
return openBlock(), createBlock(unref(_sfc_main$t), { "no-spacing": "" }, {
|
|
3843
3980
|
default: withCtx(() => [
|
|
3844
|
-
createElementVNode("div", _hoisted_1$
|
|
3845
|
-
createVNode(_sfc_main$
|
|
3981
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
3982
|
+
createVNode(_sfc_main$L, null, {
|
|
3846
3983
|
title: withCtx(() => [
|
|
3847
3984
|
createTextVNode(toDisplayString(__props.groupName), 1)
|
|
3848
3985
|
]),
|
|
@@ -3853,34 +3990,25 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3853
3990
|
}),
|
|
3854
3991
|
createElementVNode("div", _hoisted_2$2, [
|
|
3855
3992
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.pricings, (pricing) => {
|
|
3856
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
3993
|
+
return openBlock(), createBlock(unref(_sfc_main$t), {
|
|
3857
3994
|
key: pricing.id,
|
|
3858
3995
|
"content-background": "none",
|
|
3859
3996
|
class: normalizeClass({ "!bg-white": isSelected(pricing.id) })
|
|
3860
3997
|
}, {
|
|
3861
|
-
default: withCtx(() =>
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
createVNode(unref(_sfc_main$20), {
|
|
3876
|
-
"model-value": isSelected(pricing.id),
|
|
3877
|
-
"onUpdate:modelValue": ($event) => handleToggle(pricing.id)
|
|
3878
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
3879
|
-
]),
|
|
3880
|
-
_: 2
|
|
3881
|
-
}, 1032, ["name", "description"])
|
|
3882
|
-
];
|
|
3883
|
-
}),
|
|
3998
|
+
default: withCtx(() => [
|
|
3999
|
+
createVNode(_sfc_main$g, {
|
|
4000
|
+
name: unref(getNameFromPricing)(pricing) ?? "",
|
|
4001
|
+
description: unref(describePricing)(pricing)
|
|
4002
|
+
}, {
|
|
4003
|
+
default: withCtx(() => [
|
|
4004
|
+
createVNode(unref(_sfc_main$E), {
|
|
4005
|
+
"model-value": isSelected(pricing.id),
|
|
4006
|
+
"onUpdate:modelValue": ($event) => handleToggle(pricing.id)
|
|
4007
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
4008
|
+
]),
|
|
4009
|
+
_: 2
|
|
4010
|
+
}, 1032, ["name", "description"])
|
|
4011
|
+
]),
|
|
3884
4012
|
_: 2
|
|
3885
4013
|
}, 1032, ["class"]);
|
|
3886
4014
|
}), 128))
|
|
@@ -3892,8 +4020,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
3892
4020
|
};
|
|
3893
4021
|
}
|
|
3894
4022
|
});
|
|
3895
|
-
const _hoisted_1$
|
|
3896
|
-
const _sfc_main$
|
|
4023
|
+
const _hoisted_1$3 = { class: "grid grid-cols-1 gap-1" };
|
|
4024
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3897
4025
|
__name: "AddonMultipleEditor",
|
|
3898
4026
|
props: /* @__PURE__ */ mergeModels({
|
|
3899
4027
|
modelValue: { type: Array },
|
|
@@ -3910,7 +4038,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3910
4038
|
const props = __props;
|
|
3911
4039
|
const model = useModel(__props, "modelValue");
|
|
3912
4040
|
const { $t } = useIntl();
|
|
3913
|
-
const {
|
|
4041
|
+
const { describePricing } = usePricingDescription({
|
|
3914
4042
|
currency: toRef(props, "currency"),
|
|
3915
4043
|
billingPeriod: toRef(props, "billingPeriod")
|
|
3916
4044
|
});
|
|
@@ -3925,7 +4053,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3925
4053
|
}
|
|
3926
4054
|
};
|
|
3927
4055
|
return (_ctx, _cache) => {
|
|
3928
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
4056
|
+
return openBlock(), createBlock(unref(_sfc_main$t), {
|
|
3929
4057
|
"no-spacing": "",
|
|
3930
4058
|
"no-border": !__props.groupName,
|
|
3931
4059
|
"content-background": __props.groupName ? "gray" : "none"
|
|
@@ -3934,7 +4062,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3934
4062
|
createElementVNode("div", {
|
|
3935
4063
|
class: normalizeClass(["grid grid-cols-1 gap-1", { "p-1": __props.groupName }])
|
|
3936
4064
|
}, [
|
|
3937
|
-
__props.groupName ? (openBlock(), createBlock(_sfc_main$
|
|
4065
|
+
__props.groupName ? (openBlock(), createBlock(_sfc_main$L, { key: 0 }, {
|
|
3938
4066
|
title: withCtx(() => [
|
|
3939
4067
|
createTextVNode(toDisplayString(__props.groupName), 1)
|
|
3940
4068
|
]),
|
|
@@ -3947,56 +4075,46 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
3947
4075
|
]),
|
|
3948
4076
|
_: 1
|
|
3949
4077
|
})) : createCommentVNode("", true),
|
|
3950
|
-
createElementVNode("div", _hoisted_1$
|
|
4078
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
3951
4079
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.pricings, (pricing) => {
|
|
3952
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
4080
|
+
return openBlock(), createBlock(unref(_sfc_main$t), {
|
|
3953
4081
|
key: pricing.id,
|
|
3954
4082
|
"content-background": __props.groupName || isSelected(pricing.id) ? "none" : "gray",
|
|
3955
4083
|
class: normalizeClass({ "!bg-white": isSelected(pricing.id) })
|
|
3956
4084
|
}, {
|
|
3957
|
-
default: withCtx(() =>
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
description: "The button to add a pricing to the subscription"
|
|
3991
|
-
})), 1)
|
|
3992
|
-
]),
|
|
3993
|
-
_: 1
|
|
3994
|
-
}, 8, ["onClick"]))
|
|
3995
|
-
]),
|
|
3996
|
-
_: 2
|
|
3997
|
-
}, 1032, ["name", "description"])
|
|
3998
|
-
];
|
|
3999
|
-
}),
|
|
4085
|
+
default: withCtx(() => [
|
|
4086
|
+
createVNode(_sfc_main$g, {
|
|
4087
|
+
name: unref(getNameFromPricing)(pricing) ?? "",
|
|
4088
|
+
description: unref(describePricing)(pricing)
|
|
4089
|
+
}, {
|
|
4090
|
+
default: withCtx(() => [
|
|
4091
|
+
isSelected(pricing.id) ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
4092
|
+
key: 0,
|
|
4093
|
+
intent: "secondary",
|
|
4094
|
+
square: "",
|
|
4095
|
+
size: "sm",
|
|
4096
|
+
"icon-prefix": "remove_shopping_cart",
|
|
4097
|
+
onClick: ($event) => handleToggle(pricing.id)
|
|
4098
|
+
}, null, 8, ["onClick"])) : (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
4099
|
+
key: 1,
|
|
4100
|
+
intent: "primary",
|
|
4101
|
+
"icon-prefix": "add",
|
|
4102
|
+
size: "sm",
|
|
4103
|
+
onClick: ($event) => handleToggle(pricing.id)
|
|
4104
|
+
}, {
|
|
4105
|
+
default: withCtx(() => [
|
|
4106
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
4107
|
+
defaultMessage: "Add to subscription ",
|
|
4108
|
+
id: "addon_multiple_editor.add_to_subscription_button",
|
|
4109
|
+
description: "The button to add a pricing to the subscription"
|
|
4110
|
+
})), 1)
|
|
4111
|
+
]),
|
|
4112
|
+
_: 1
|
|
4113
|
+
}, 8, ["onClick"]))
|
|
4114
|
+
]),
|
|
4115
|
+
_: 2
|
|
4116
|
+
}, 1032, ["name", "description"])
|
|
4117
|
+
]),
|
|
4000
4118
|
_: 2
|
|
4001
4119
|
}, 1032, ["content-background", "class"]);
|
|
4002
4120
|
}), 128))
|
|
@@ -4008,120 +4126,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4008
4126
|
};
|
|
4009
4127
|
}
|
|
4010
4128
|
});
|
|
4011
|
-
function useViewport() {
|
|
4012
|
-
const breakpoints = useBreakpoints(breakpointsTailwind);
|
|
4013
|
-
const isMobileViewport = breakpoints.smallerOrEqual("sm");
|
|
4014
|
-
return { isMobileViewport };
|
|
4015
|
-
}
|
|
4016
|
-
const _hoisted_1$3 = { class: "p-1" };
|
|
4017
|
-
const _hoisted_2$1 = { class: "pt-1" };
|
|
4018
|
-
const SHOW_RADIO_GROUP_MAX_OPTIONS = 3;
|
|
4019
|
-
const SHOW_SELECT_MAX_OPTIONS = 6;
|
|
4020
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
4021
|
-
__name: "PricingGroupSingleEditor",
|
|
4022
|
-
props: /* @__PURE__ */ mergeModels({
|
|
4023
|
-
modelValue: { type: Array },
|
|
4024
|
-
pricings: { type: Array },
|
|
4025
|
-
billingPeriod: { type: Object },
|
|
4026
|
-
currency: { type: String },
|
|
4027
|
-
groupName: { type: String }
|
|
4028
|
-
}, {
|
|
4029
|
-
"modelValue": {
|
|
4030
|
-
required: true
|
|
4031
|
-
},
|
|
4032
|
-
"modelModifiers": {}
|
|
4033
|
-
}),
|
|
4034
|
-
emits: ["update:modelValue"],
|
|
4035
|
-
setup(__props) {
|
|
4036
|
-
const props = __props;
|
|
4037
|
-
const model = useModel(__props, "modelValue");
|
|
4038
|
-
const { $t } = useIntl();
|
|
4039
|
-
const { renderPricingForPricingItem } = usePricingItem({
|
|
4040
|
-
currency: toRef(props, "currency"),
|
|
4041
|
-
billingPeriod: toRef(props, "billingPeriod")
|
|
4042
|
-
});
|
|
4043
|
-
const { isMobileViewport } = useViewport();
|
|
4044
|
-
const groupPricingIds = computed(() => props.pricings.map((pricing) => pricing.id));
|
|
4045
|
-
const singleModelValue = computed({
|
|
4046
|
-
get: () => {
|
|
4047
|
-
return model.value.find((id) => groupPricingIds.value.includes(id)) ?? void 0;
|
|
4048
|
-
},
|
|
4049
|
-
set: (value) => {
|
|
4050
|
-
const filteredPricingIds = model.value.filter((id) => !groupPricingIds.value.includes(id));
|
|
4051
|
-
model.value = value ? [...filteredPricingIds, value] : filteredPricingIds;
|
|
4052
|
-
}
|
|
4053
|
-
});
|
|
4054
|
-
const options = computed(() => {
|
|
4055
|
-
return props.pricings.map((pricing) => {
|
|
4056
|
-
var _a;
|
|
4057
|
-
const pricingItem = (_a = pricing.items) == null ? void 0 : _a[0];
|
|
4058
|
-
return {
|
|
4059
|
-
label: getNameFromPricing(pricing) ?? "",
|
|
4060
|
-
value: pricing.id,
|
|
4061
|
-
description: pricingItem ? renderPricingForPricingItem({ pricingItem }) : $t({
|
|
4062
|
-
defaultMessage: "Unsupported pricing",
|
|
4063
|
-
id: "pricing_item_pricing.unsupported_pricing_error",
|
|
4064
|
-
description: "Text displayed when the pricing item pricing is unsupported"
|
|
4065
|
-
})
|
|
4066
|
-
};
|
|
4067
|
-
});
|
|
4068
|
-
});
|
|
4069
|
-
const getRadioGroupOptions = () => {
|
|
4070
|
-
return options.value.slice(0, SHOW_RADIO_GROUP_MAX_OPTIONS);
|
|
4071
|
-
};
|
|
4072
|
-
const getSelectOptions = () => {
|
|
4073
|
-
return options.value.map(({ value, label, description: subLabel }) => ({
|
|
4074
|
-
label,
|
|
4075
|
-
subLabel,
|
|
4076
|
-
value
|
|
4077
|
-
}));
|
|
4078
|
-
};
|
|
4079
|
-
return (_ctx, _cache) => {
|
|
4080
|
-
return openBlock(), createBlock(unref(_sfc_main$1g), { "no-spacing": "" }, {
|
|
4081
|
-
default: withCtx(() => [
|
|
4082
|
-
createElementVNode("div", _hoisted_1$3, [
|
|
4083
|
-
createVNode(_sfc_main$7, null, {
|
|
4084
|
-
title: withCtx(() => [
|
|
4085
|
-
createTextVNode(toDisplayString(__props.groupName), 1)
|
|
4086
|
-
]),
|
|
4087
|
-
_: 1
|
|
4088
|
-
}),
|
|
4089
|
-
createElementVNode("div", _hoisted_2$1, [
|
|
4090
|
-
options.value.length <= SHOW_RADIO_GROUP_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$1X), {
|
|
4091
|
-
key: 0,
|
|
4092
|
-
modelValue: singleModelValue.value,
|
|
4093
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => singleModelValue.value = $event),
|
|
4094
|
-
options: getRadioGroupOptions(),
|
|
4095
|
-
direction: unref(isMobileViewport) ? "column" : "row",
|
|
4096
|
-
"show-radio": false
|
|
4097
|
-
}, null, 8, ["modelValue", "options", "direction"])) : options.value.length <= SHOW_SELECT_MAX_OPTIONS ? (openBlock(), createBlock(unref(_sfc_main$1T), {
|
|
4098
|
-
key: 1,
|
|
4099
|
-
"single-model-value": singleModelValue.value,
|
|
4100
|
-
"onUpdate:singleModelValue": _cache[1] || (_cache[1] = ($event) => singleModelValue.value = $event),
|
|
4101
|
-
options: getSelectOptions(),
|
|
4102
|
-
size: "xl",
|
|
4103
|
-
"show-sub-label-in-input": ""
|
|
4104
|
-
}, null, 8, ["single-model-value", "options"])) : (openBlock(), createBlock(unref(_sfc_main$1L), {
|
|
4105
|
-
key: 2,
|
|
4106
|
-
modelValue: singleModelValue.value,
|
|
4107
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => singleModelValue.value = $event),
|
|
4108
|
-
options: options.value,
|
|
4109
|
-
name: `pricing-group-range-input-${__props.groupName}`
|
|
4110
|
-
}, null, 8, ["modelValue", "options", "name"]))
|
|
4111
|
-
])
|
|
4112
|
-
])
|
|
4113
|
-
]),
|
|
4114
|
-
_: 1
|
|
4115
|
-
});
|
|
4116
|
-
};
|
|
4117
|
-
}
|
|
4118
|
-
});
|
|
4119
4129
|
function getAllPricingsFromPricingPlanVersion(pricingPlanVersion) {
|
|
4120
4130
|
var _a;
|
|
4121
4131
|
const pricings = ((_a = pricingPlanVersion.pricing_categories) == null ? void 0 : _a.flatMap((category) => category.pricings ?? [])) ?? [];
|
|
4122
4132
|
return pricings.filter((pricing) => pricing !== null);
|
|
4123
4133
|
}
|
|
4124
|
-
const _hoisted_1$2 = { class: "grid grid-cols-1 gap-1" };
|
|
4134
|
+
const _hoisted_1$2 = { class: "sv-plan-customization__body grid grid-cols-1 gap-1" };
|
|
4125
4135
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
4126
4136
|
__name: "PlanCustomizationEditor",
|
|
4127
4137
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -4162,7 +4172,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4162
4172
|
() => getPricingGroupsFromExtendedPricingPlanSubscription(props.subscription)
|
|
4163
4173
|
);
|
|
4164
4174
|
return (_ctx, _cache) => {
|
|
4165
|
-
return openBlock(), createBlock(unref(_sfc_main$
|
|
4175
|
+
return openBlock(), createBlock(unref(_sfc_main$t), {
|
|
4176
|
+
class: "sv-plan-customization",
|
|
4166
4177
|
title: unref($t)({
|
|
4167
4178
|
defaultMessage: "Customize plan",
|
|
4168
4179
|
id: "checkout.customize_plan_block.title",
|
|
@@ -4174,9 +4185,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4174
4185
|
}, {
|
|
4175
4186
|
default: withCtx(() => [
|
|
4176
4187
|
createElementVNode("div", _hoisted_1$2, [
|
|
4177
|
-
createVNode(_sfc_main$
|
|
4188
|
+
createVNode(_sfc_main$6, {
|
|
4178
4189
|
modelValue: seatsModel.value,
|
|
4179
4190
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => seatsModel.value = $event),
|
|
4191
|
+
class: "sv-plan-customization__seats",
|
|
4180
4192
|
"initial-seats-values": __props.initialSeatsValues,
|
|
4181
4193
|
pricings: pricings.value
|
|
4182
4194
|
}, null, 8, ["modelValue", "initial-seats-values", "pricings"]),
|
|
@@ -4184,27 +4196,30 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4184
4196
|
return openBlock(), createElementBlock(Fragment, {
|
|
4185
4197
|
key: pricingGroup.id
|
|
4186
4198
|
}, [
|
|
4187
|
-
pricingGroup.product_type === "DEFAULT" && pricingGroup.selection_constraint === "EXACTLY_ONE" ? (openBlock(), createBlock(_sfc_main$
|
|
4199
|
+
pricingGroup.product_type === "DEFAULT" && pricingGroup.selection_constraint === "EXACTLY_ONE" ? (openBlock(), createBlock(_sfc_main$M, {
|
|
4188
4200
|
key: 0,
|
|
4189
4201
|
modelValue: enabledPricingIdsModel.value,
|
|
4190
4202
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => enabledPricingIdsModel.value = $event),
|
|
4203
|
+
class: "sv-plan-customization__group",
|
|
4191
4204
|
"group-name": pricingGroup.name,
|
|
4192
4205
|
pricings: pricingGroup.pricings,
|
|
4193
4206
|
"billing-period": __props.billingPeriod,
|
|
4194
4207
|
currency: __props.currency
|
|
4195
|
-
}, null, 8, ["modelValue", "group-name", "pricings", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "AT_MOST_ONE" ? (openBlock(), createBlock(_sfc_main$
|
|
4208
|
+
}, null, 8, ["modelValue", "group-name", "pricings", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "AT_MOST_ONE" ? (openBlock(), createBlock(_sfc_main$5, {
|
|
4196
4209
|
key: 1,
|
|
4197
4210
|
modelValue: enabledPricingIdsModel.value,
|
|
4198
4211
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => enabledPricingIdsModel.value = $event),
|
|
4212
|
+
class: "sv-plan-customization__group",
|
|
4199
4213
|
"group-name": pricingGroup.name,
|
|
4200
4214
|
pricings: pricingGroup.pricings,
|
|
4201
4215
|
constraint: pricingGroup.selection_constraint,
|
|
4202
4216
|
"billing-period": __props.billingPeriod,
|
|
4203
4217
|
currency: __props.currency
|
|
4204
|
-
}, null, 8, ["modelValue", "group-name", "pricings", "constraint", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "ANY" ? (openBlock(), createBlock(_sfc_main$
|
|
4218
|
+
}, null, 8, ["modelValue", "group-name", "pricings", "constraint", "billing-period", "currency"])) : pricingGroup.product_type === "ADDON" && pricingGroup.selection_constraint === "ANY" ? (openBlock(), createBlock(_sfc_main$4, {
|
|
4205
4219
|
key: 2,
|
|
4206
4220
|
modelValue: enabledPricingIdsModel.value,
|
|
4207
4221
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => enabledPricingIdsModel.value = $event),
|
|
4222
|
+
class: "sv-plan-customization__group",
|
|
4208
4223
|
pricings: pricingGroup.pricings,
|
|
4209
4224
|
"group-name": pricingGroup.name,
|
|
4210
4225
|
"billing-period": __props.billingPeriod,
|
|
@@ -4212,9 +4227,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4212
4227
|
}, null, 8, ["modelValue", "pricings", "group-name", "billing-period", "currency"])) : createCommentVNode("", true)
|
|
4213
4228
|
], 64);
|
|
4214
4229
|
}), 128)),
|
|
4215
|
-
createVNode(_sfc_main$
|
|
4230
|
+
createVNode(_sfc_main$4, {
|
|
4216
4231
|
modelValue: enabledPricingIdsModel.value,
|
|
4217
4232
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => enabledPricingIdsModel.value = $event),
|
|
4233
|
+
class: "sv-plan-customization__group",
|
|
4218
4234
|
pricings: addonPricings.value,
|
|
4219
4235
|
"billing-period": __props.billingPeriod,
|
|
4220
4236
|
currency: __props.currency
|
|
@@ -4227,17 +4243,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
4227
4243
|
}
|
|
4228
4244
|
});
|
|
4229
4245
|
const _hoisted_1$1 = ["aria-expanded", "aria-label"];
|
|
4230
|
-
const _hoisted_2 = { class: "flex flex-row items-center justify-between
|
|
4231
|
-
const _hoisted_3 = { class: "flex flex-row gap-2
|
|
4232
|
-
const _hoisted_4 = ["onKeydown"];
|
|
4233
|
-
const _hoisted_5 = ["aria-label"];
|
|
4234
|
-
const _hoisted_6 = { class: "flex flex-row items-center justify-between
|
|
4235
|
-
const _hoisted_7 = { class: "flex flex-row gap-2
|
|
4246
|
+
const _hoisted_2$1 = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" };
|
|
4247
|
+
const _hoisted_3$1 = { class: "flex flex-row items-center gap-2" };
|
|
4248
|
+
const _hoisted_4$1 = ["onKeydown"];
|
|
4249
|
+
const _hoisted_5$1 = ["aria-label"];
|
|
4250
|
+
const _hoisted_6$1 = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" };
|
|
4251
|
+
const _hoisted_7 = { class: "flex flex-row items-center gap-2" };
|
|
4236
4252
|
const _hoisted_8 = {
|
|
4237
4253
|
class: "sr-only",
|
|
4238
4254
|
"aria-live": "polite"
|
|
4239
4255
|
};
|
|
4240
4256
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
4257
|
+
...{ inheritAttrs: false },
|
|
4241
4258
|
__name: "PromotionCodeSection",
|
|
4242
4259
|
props: {
|
|
4243
4260
|
promotionCode: { default: null, type: [String, null] }
|
|
@@ -4265,10 +4282,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4265
4282
|
})
|
|
4266
4283
|
);
|
|
4267
4284
|
const toggleAriaLabel = computed(
|
|
4268
|
-
() => $t({
|
|
4269
|
-
defaultMessage:
|
|
4270
|
-
id:
|
|
4271
|
-
description: "Aria label for the promotion code toggle button in checkout"
|
|
4285
|
+
() => isExpanded.value ? $t({
|
|
4286
|
+
defaultMessage: "Collapse promotion code input",
|
|
4287
|
+
id: "checkout.promotion_code.collapse_aria_label",
|
|
4288
|
+
description: "Aria label for the promotion code toggle button in checkout, while the input is open"
|
|
4289
|
+
}) : $t({
|
|
4290
|
+
defaultMessage: "Expand promotion code input",
|
|
4291
|
+
id: "checkout.promotion_code.expand_aria_label",
|
|
4292
|
+
description: "Aria label for the promotion code toggle button in checkout, while the input is closed"
|
|
4272
4293
|
})
|
|
4273
4294
|
);
|
|
4274
4295
|
const applyAriaLabel = computed(
|
|
@@ -4358,11 +4379,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4358
4379
|
);
|
|
4359
4380
|
return (_ctx, _cache) => {
|
|
4360
4381
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
4361
|
-
!isApplied.value ? (openBlock(), createBlock(unref(_sfc_main$
|
|
4362
|
-
key: 0,
|
|
4382
|
+
!isApplied.value ? (openBlock(), createBlock(unref(_sfc_main$t), mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
4363
4383
|
"no-spacing": "",
|
|
4364
|
-
class: "w-full
|
|
4365
|
-
}, {
|
|
4384
|
+
class: "relative w-full"
|
|
4385
|
+
}), {
|
|
4366
4386
|
default: withCtx(() => [
|
|
4367
4387
|
createElementVNode("button", {
|
|
4368
4388
|
ref_key: "toggleRef",
|
|
@@ -4374,10 +4394,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4374
4394
|
"aria-label": toggleAriaLabel.value,
|
|
4375
4395
|
onClick: toggleExpanded
|
|
4376
4396
|
}, [
|
|
4377
|
-
createElementVNode("div", _hoisted_2, [
|
|
4378
|
-
createElementVNode("div", _hoisted_3, [
|
|
4379
|
-
createVNode(unref(_sfc_main$
|
|
4380
|
-
createVNode(unref(_sfc_main$
|
|
4397
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
4398
|
+
createElementVNode("div", _hoisted_3$1, [
|
|
4399
|
+
createVNode(unref(_sfc_main$K), { icon: "local_activity" }),
|
|
4400
|
+
createVNode(unref(_sfc_main$r), {
|
|
4381
4401
|
id: labelId,
|
|
4382
4402
|
variant: "body-sm"
|
|
4383
4403
|
}, {
|
|
@@ -4391,7 +4411,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4391
4411
|
_: 1
|
|
4392
4412
|
})
|
|
4393
4413
|
]),
|
|
4394
|
-
createVNode(unref(_sfc_main$
|
|
4414
|
+
createVNode(unref(_sfc_main$K), {
|
|
4395
4415
|
icon: isExpanded.value ? "remove" : "add"
|
|
4396
4416
|
}, null, 8, ["icon"])
|
|
4397
4417
|
])
|
|
@@ -4402,10 +4422,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4402
4422
|
ref: panelRef,
|
|
4403
4423
|
role: "region",
|
|
4404
4424
|
"aria-labelledby": labelId,
|
|
4405
|
-
class: "w-full
|
|
4425
|
+
class: "flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",
|
|
4406
4426
|
onKeydown: withKeys(withModifiers(collapseExpanded, ["prevent"]), ["esc"])
|
|
4407
4427
|
}, [
|
|
4408
|
-
createVNode(unref(_sfc_main$
|
|
4428
|
+
createVNode(unref(_sfc_main$p), {
|
|
4409
4429
|
modelValue: inputValue.value,
|
|
4410
4430
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event),
|
|
4411
4431
|
placeholder: unref($t)({
|
|
@@ -4421,7 +4441,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4421
4441
|
class: "w-full",
|
|
4422
4442
|
onKeydown: withKeys(withModifiers(applyCode, ["prevent"]), ["enter"])
|
|
4423
4443
|
}, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
|
|
4424
|
-
createVNode(unref(_sfc_main$
|
|
4444
|
+
createVNode(unref(_sfc_main$v), {
|
|
4425
4445
|
type: "button",
|
|
4426
4446
|
disabled: !canApply.value,
|
|
4427
4447
|
"aria-label": applyAriaLabel.value,
|
|
@@ -4437,29 +4457,28 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4437
4457
|
]),
|
|
4438
4458
|
_: 1
|
|
4439
4459
|
}, 8, ["disabled", "aria-label", "aria-disabled"])
|
|
4440
|
-
], 40, _hoisted_4), [
|
|
4460
|
+
], 40, _hoisted_4$1), [
|
|
4441
4461
|
[vShow, isExpanded.value]
|
|
4442
4462
|
])
|
|
4443
4463
|
]),
|
|
4444
4464
|
_: 1
|
|
4445
|
-
})) : (openBlock(), createBlock(unref(_sfc_main$
|
|
4446
|
-
key: 1,
|
|
4465
|
+
}, 16)) : (openBlock(), createBlock(unref(_sfc_main$t), mergeProps({ key: 1 }, _ctx.$attrs, {
|
|
4447
4466
|
"no-border": "",
|
|
4448
4467
|
"no-spacing": "",
|
|
4449
4468
|
"content-background": "none",
|
|
4450
|
-
class: "w-full
|
|
4451
|
-
}, {
|
|
4469
|
+
class: "relative w-full"
|
|
4470
|
+
}), {
|
|
4452
4471
|
default: withCtx(() => [
|
|
4453
4472
|
createElementVNode("button", {
|
|
4454
4473
|
type: "button",
|
|
4455
|
-
class: "w-full
|
|
4474
|
+
class: "w-full rounded border border-primary-900 bg-white",
|
|
4456
4475
|
"aria-label": removeAriaLabel.value,
|
|
4457
4476
|
onClick: removeCode
|
|
4458
4477
|
}, [
|
|
4459
|
-
createElementVNode("div", _hoisted_6, [
|
|
4478
|
+
createElementVNode("div", _hoisted_6$1, [
|
|
4460
4479
|
createElementVNode("div", _hoisted_7, [
|
|
4461
|
-
createVNode(unref(_sfc_main$
|
|
4462
|
-
createVNode(unref(_sfc_main$
|
|
4480
|
+
createVNode(unref(_sfc_main$K), { icon: "local_activity" }),
|
|
4481
|
+
createVNode(unref(_sfc_main$r), {
|
|
4463
4482
|
variant: "body-sm",
|
|
4464
4483
|
class: "font-semibold"
|
|
4465
4484
|
}, {
|
|
@@ -4469,18 +4488,29 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4469
4488
|
_: 1
|
|
4470
4489
|
})
|
|
4471
4490
|
]),
|
|
4472
|
-
createVNode(unref(_sfc_main$
|
|
4491
|
+
createVNode(unref(_sfc_main$K), { icon: "close" })
|
|
4473
4492
|
])
|
|
4474
|
-
], 8, _hoisted_5)
|
|
4493
|
+
], 8, _hoisted_5$1)
|
|
4475
4494
|
]),
|
|
4476
4495
|
_: 1
|
|
4477
|
-
})),
|
|
4496
|
+
}, 16)),
|
|
4478
4497
|
createElementVNode("span", _hoisted_8, toDisplayString(statusMessage.value), 1)
|
|
4479
4498
|
], 64);
|
|
4480
4499
|
};
|
|
4481
4500
|
}
|
|
4482
4501
|
});
|
|
4483
|
-
const _hoisted_1 = {
|
|
4502
|
+
const _hoisted_1 = { class: "sv-checkout__header" };
|
|
4503
|
+
const _hoisted_2 = { class: "sv-checkout__payment-methods" };
|
|
4504
|
+
const _hoisted_3 = {
|
|
4505
|
+
key: 0,
|
|
4506
|
+
class: "sv-checkout__payment-methods-body"
|
|
4507
|
+
};
|
|
4508
|
+
const _hoisted_4 = {
|
|
4509
|
+
key: 3,
|
|
4510
|
+
class: "sv-checkout__payment-form"
|
|
4511
|
+
};
|
|
4512
|
+
const _hoisted_5 = { class: "sv-checkout__order-summary" };
|
|
4513
|
+
const _hoisted_6 = { class: "flex flex-col gap-2" };
|
|
4484
4514
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
4485
4515
|
__name: "Checkout",
|
|
4486
4516
|
props: {
|
|
@@ -4488,7 +4518,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4488
4518
|
},
|
|
4489
4519
|
emits: ["error", "ready"],
|
|
4490
4520
|
setup(__props, { emit: __emit }) {
|
|
4491
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4521
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
4522
|
+
const PaymentIntegrationForm = defineAsyncComponent(
|
|
4523
|
+
() => import("../../PaymentIntegrationForm-CLokpXvK.mjs")
|
|
4524
|
+
);
|
|
4492
4525
|
const props = __props;
|
|
4493
4526
|
const emit = __emit;
|
|
4494
4527
|
const configuration = computed(() => props.configuration);
|
|
@@ -4515,6 +4548,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4515
4548
|
const successRedirectUrl = (_e = (_d = portal.value) == null ? void 0 : _d.init_pricing_plan_subscription) == null ? void 0 : _e.success_url;
|
|
4516
4549
|
const {
|
|
4517
4550
|
paymentMethodOptions,
|
|
4551
|
+
hasPaymentMethodOptionsError,
|
|
4552
|
+
retryPaymentMethodOptions,
|
|
4518
4553
|
subscription,
|
|
4519
4554
|
isPaymentMethodsPending,
|
|
4520
4555
|
isInvoicePreviewPending,
|
|
@@ -4527,21 +4562,28 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4527
4562
|
isPaid,
|
|
4528
4563
|
amount,
|
|
4529
4564
|
loadInvoicePreview,
|
|
4530
|
-
updateInvoicePreviewOnBillingInformationChange
|
|
4565
|
+
updateInvoicePreviewOnBillingInformationChange,
|
|
4566
|
+
saveFormStateForRedirect
|
|
4531
4567
|
} = useCheckoutView({
|
|
4532
4568
|
initialCountry: (_f = props.configuration) == null ? void 0 : _f.countryCode,
|
|
4533
4569
|
initialEmail: (_g = props.configuration) == null ? void 0 : _g.email,
|
|
4534
4570
|
subscriptionId,
|
|
4535
4571
|
enabledPricingIds: (_h = props.configuration) == null ? void 0 : _h.enabledPricingIds
|
|
4536
4572
|
});
|
|
4573
|
+
const isPaymentPending = ref(false);
|
|
4537
4574
|
const handleSubmit = async () => {
|
|
4538
4575
|
var _a2;
|
|
4539
4576
|
await checkoutForm.validation.value.$validate();
|
|
4540
4577
|
if (checkoutForm.validation.value.$invalid) {
|
|
4541
4578
|
return;
|
|
4542
4579
|
}
|
|
4580
|
+
isPaymentPending.value = true;
|
|
4581
|
+
saveFormStateForRedirect();
|
|
4543
4582
|
(_a2 = paymentIntegrationFormRef.value) == null ? void 0 : _a2.submit();
|
|
4544
4583
|
};
|
|
4584
|
+
const handlePaymentFailed = () => {
|
|
4585
|
+
isPaymentPending.value = false;
|
|
4586
|
+
};
|
|
4545
4587
|
const handleValidateOnSubmit = async () => {
|
|
4546
4588
|
await checkoutForm.validation.value.$validate();
|
|
4547
4589
|
return !checkoutForm.validation.value.$invalid;
|
|
@@ -4669,11 +4711,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4669
4711
|
);
|
|
4670
4712
|
});
|
|
4671
4713
|
const expressPaymentMethodBillingInformation = computed(() => {
|
|
4672
|
-
var _a2
|
|
4714
|
+
var _a2;
|
|
4673
4715
|
if (!invoicePreview.value) {
|
|
4674
4716
|
return void 0;
|
|
4675
4717
|
}
|
|
4676
|
-
const subscriptionName = (
|
|
4718
|
+
const subscriptionName = getSubscriptionName({
|
|
4719
|
+
subscription: subscription.value,
|
|
4720
|
+
fallback: $t({
|
|
4721
|
+
defaultMessage: "Subscription",
|
|
4722
|
+
description: "The fallback name for when no subscription name can be determined",
|
|
4723
|
+
id: "customer_overview.subscriptions_block.fallback_subscription_name"
|
|
4724
|
+
})
|
|
4725
|
+
});
|
|
4677
4726
|
return {
|
|
4678
4727
|
description: subscriptionName,
|
|
4679
4728
|
managementURL: "https://www.solvimon.com/account/billing",
|
|
@@ -4694,7 +4743,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4694
4743
|
label: subscriptionName,
|
|
4695
4744
|
amount: invoicePreview.value.tax_summary.total_amount,
|
|
4696
4745
|
startDate: subscriptionStartDate.value ? new Date(subscriptionStartDate.value) : void 0,
|
|
4697
|
-
interval: ((
|
|
4746
|
+
interval: ((_a2 = subscription.value) == null ? void 0 : _a2.billing_period) ?? { type: "MONTH", value: 1 }
|
|
4698
4747
|
}
|
|
4699
4748
|
};
|
|
4700
4749
|
});
|
|
@@ -4754,18 +4803,15 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4754
4803
|
} = usePromotionCode({
|
|
4755
4804
|
checkoutForm,
|
|
4756
4805
|
updateInvoicePreviewOnBillingInformationChange,
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
description: "Error message when removing a promotion code in checkout failed"
|
|
4767
|
-
}
|
|
4768
|
-
),
|
|
4806
|
+
formatErrorMessage: ({ action }) => action === "apply" ? $t({
|
|
4807
|
+
defaultMessage: "Promotion code could not be applied. Please try again.",
|
|
4808
|
+
id: "checkout.promotion_code.apply_failed",
|
|
4809
|
+
description: "Error message when applying a promotion code in checkout failed"
|
|
4810
|
+
}) : $t({
|
|
4811
|
+
defaultMessage: "Promotion code could not be removed. Please try again.",
|
|
4812
|
+
id: "checkout.promotion_code.remove_failed",
|
|
4813
|
+
description: "Error message when removing a promotion code in checkout failed"
|
|
4814
|
+
}),
|
|
4769
4815
|
onInvalidPromotionCode: () => {
|
|
4770
4816
|
promotionCode.value = null;
|
|
4771
4817
|
},
|
|
@@ -4773,9 +4819,28 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4773
4819
|
promotionCode.value = null;
|
|
4774
4820
|
}
|
|
4775
4821
|
});
|
|
4822
|
+
useAutoApplyPromotionCode({
|
|
4823
|
+
subscription,
|
|
4824
|
+
promotionCode: (_i = props.configuration) == null ? void 0 : _i.couponCode,
|
|
4825
|
+
appliedPromotionCode: promotionCode,
|
|
4826
|
+
applyPromotionCode
|
|
4827
|
+
});
|
|
4828
|
+
const handleRedirect = () => {
|
|
4829
|
+
if (!successRedirectUrl) return;
|
|
4830
|
+
safeUrlRedirect(successRedirectUrl);
|
|
4831
|
+
};
|
|
4776
4832
|
const handlePaymentSuccess = () => {
|
|
4833
|
+
var _a2;
|
|
4777
4834
|
isPaid.value = true;
|
|
4778
4835
|
promotionCodeErrorMessage.value = null;
|
|
4836
|
+
if ((_a2 = props.configuration) == null ? void 0 : _a2.onPaymentSuccess) {
|
|
4837
|
+
props.configuration.onPaymentSuccess();
|
|
4838
|
+
return;
|
|
4839
|
+
}
|
|
4840
|
+
if (successRedirectUrl) {
|
|
4841
|
+
handleRedirect();
|
|
4842
|
+
return;
|
|
4843
|
+
}
|
|
4779
4844
|
};
|
|
4780
4845
|
const handleBillingPeriodChange = (billingPeriod) => {
|
|
4781
4846
|
if (!subscription.value) {
|
|
@@ -4791,252 +4856,293 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4791
4856
|
emit("ready");
|
|
4792
4857
|
});
|
|
4793
4858
|
return (_ctx, _cache) => {
|
|
4794
|
-
return criticalError.value ? (openBlock(), createBlock(_sfc_main$
|
|
4859
|
+
return criticalError.value ? (openBlock(), createBlock(_sfc_main$i, {
|
|
4860
|
+
key: 0,
|
|
4861
|
+
class: "sv-checkout sv-root sv-screen sv-checkout--error"
|
|
4862
|
+
})) : (openBlock(), createBlock(unref(ContentWithAsideLayout), {
|
|
4863
|
+
key: 1,
|
|
4864
|
+
class: normalizeClass(["sv-checkout sv-root sv-screen", { "sv-checkout--paid": unref(isPaid) }])
|
|
4865
|
+
}, {
|
|
4795
4866
|
header: withCtx(() => [
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4867
|
+
createElementVNode("div", _hoisted_1, [
|
|
4868
|
+
createVNode(_sfc_main$I, { class: "min-h-[52px] w-96" }, {
|
|
4869
|
+
default: withCtx(() => {
|
|
4870
|
+
var _a2, _b2, _c2;
|
|
4871
|
+
return [
|
|
4872
|
+
unref(invoicePreview) && unref(subscription) && subscriptionStartDate.value ? (openBlock(), createBlock(_sfc_main$j, {
|
|
4873
|
+
key: 0,
|
|
4874
|
+
class: "sv-checkout__title",
|
|
4875
|
+
"trial-start-date": trialStartDate.value,
|
|
4876
|
+
"trial-period": unref(trialPeriod),
|
|
4877
|
+
"subscription-start-date": subscriptionStartDate.value,
|
|
4878
|
+
"subscription-name": ((_a2 = unref(subscription)) == null ? void 0 : _a2.name) ?? "",
|
|
4879
|
+
amount: (_b2 = unref(invoicePreview)) == null ? void 0 : _b2.invoice_amount_including_tax,
|
|
4880
|
+
"billing-period": (_c2 = unref(subscription)) == null ? void 0 : _c2.billing_period,
|
|
4881
|
+
"country-code": unref(checkoutForm).form.value.country
|
|
4882
|
+
}, null, 8, ["trial-start-date", "trial-period", "subscription-start-date", "subscription-name", "amount", "billing-period", "country-code"])) : createCommentVNode("", true)
|
|
4883
|
+
];
|
|
4884
|
+
}),
|
|
4885
|
+
_: 1
|
|
4886
|
+
})
|
|
4887
|
+
])
|
|
4814
4888
|
]),
|
|
4815
4889
|
content: withCtx(() => {
|
|
4816
4890
|
var _a2, _b2, _c2;
|
|
4817
4891
|
return [
|
|
4818
|
-
unref(
|
|
4892
|
+
unref(isPaid) ? (openBlock(), createBlock(_sfc_main$h, {
|
|
4819
4893
|
key: 0,
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
"
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
"billing-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
"
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4894
|
+
class: "sv-checkout__completed-payment",
|
|
4895
|
+
onContinueToMerchant: handleRedirect
|
|
4896
|
+
})) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4897
|
+
unref(subscription) && unref(isMobileViewport) ? (openBlock(), createBlock(_sfc_main$f, {
|
|
4898
|
+
key: 0,
|
|
4899
|
+
class: "sv-checkout__mobile-order-summary",
|
|
4900
|
+
subscription: unref(subscription),
|
|
4901
|
+
invoice: unref(invoicePreview),
|
|
4902
|
+
"invoice-preview-by-billing-period": unref(invoicePreviewByBillingPeriod),
|
|
4903
|
+
"trial-invoice": unref(trialInvoicePreview),
|
|
4904
|
+
"enabled-pricing-ids": enabledPricingIdsModel.value,
|
|
4905
|
+
"trial-period": unref(trialPeriod),
|
|
4906
|
+
avatar: (_a2 = configuration.value) == null ? void 0 : _a2.avatar,
|
|
4907
|
+
"is-paid": unref(isPaid),
|
|
4908
|
+
"is-usage-based": isUsageBased.value,
|
|
4909
|
+
"is-preview-and-payment-methods-pending": unref(isPaymentMethodsPending) || unref(isInvoicePreviewPending),
|
|
4910
|
+
"country-code": unref(checkoutForm).form.value.country,
|
|
4911
|
+
collapsible: "collapsed",
|
|
4912
|
+
variant: "products-inline",
|
|
4913
|
+
onBillingPeriodChange: handleBillingPeriodChange
|
|
4914
|
+
}, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending", "country-code"])) : createCommentVNode("", true),
|
|
4915
|
+
showPlanCustomizationEditor.value && unref(subscription) ? (openBlock(), createBlock(_sfc_main$3, {
|
|
4916
|
+
key: 1,
|
|
4917
|
+
"seats-values": seatsValuesModel.value,
|
|
4918
|
+
"onUpdate:seatsValues": _cache[0] || (_cache[0] = ($event) => seatsValuesModel.value = $event),
|
|
4919
|
+
"enabled-pricing-ids": enabledPricingIdsModel.value,
|
|
4920
|
+
"onUpdate:enabledPricingIds": _cache[1] || (_cache[1] = ($event) => enabledPricingIdsModel.value = $event),
|
|
4921
|
+
class: "sv-checkout__plan-customization",
|
|
4922
|
+
subscription: unref(subscription),
|
|
4923
|
+
"initial-seats-values": (_b2 = unref(checkoutForm).initialState) == null ? void 0 : _b2.value.seatsValues,
|
|
4924
|
+
"billing-period": unref(subscription).billing_period,
|
|
4925
|
+
currency: activePricingCurrency.value
|
|
4926
|
+
}, null, 8, ["seats-values", "enabled-pricing-ids", "subscription", "initial-seats-values", "billing-period", "currency"])) : createCommentVNode("", true),
|
|
4927
|
+
unref(checkoutForm).form.value.country && unref(amount) && expressPaymentMethodBillingInformation.value ? (openBlock(), createBlock(_sfc_main$a, {
|
|
4928
|
+
key: 2,
|
|
4929
|
+
class: "sv-checkout__express-payment-methods",
|
|
4930
|
+
amount: unref(amount),
|
|
4931
|
+
"country-code": unref(checkoutForm).form.value.country,
|
|
4932
|
+
locale: unref(locale),
|
|
4933
|
+
"payment-methods-options-response": unref(paymentMethodOptions) ?? [],
|
|
4934
|
+
"billing-information": expressPaymentMethodBillingInformation.value,
|
|
4935
|
+
"on-billing-information-change": unref(updateInvoicePreviewOnBillingInformationChange),
|
|
4936
|
+
onUpdateBillingInformation: handleUpdateBillingInformation
|
|
4937
|
+
}, null, 8, ["amount", "country-code", "locale", "payment-methods-options-response", "billing-information", "on-billing-information-change"])) : createCommentVNode("", true),
|
|
4938
|
+
createVNode(_sfc_main$k, {
|
|
4939
|
+
modelValue: unref(checkoutForm).form.value,
|
|
4940
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(checkoutForm).form.value = $event),
|
|
4941
|
+
class: "sv-checkout__customer-form",
|
|
4942
|
+
validation: unref(checkoutForm).validation,
|
|
4943
|
+
"read-only-email": (_c2 = props.configuration) == null ? void 0 : _c2.email,
|
|
4944
|
+
"show-customer-info-on-top": showCustomerInfoOnTop.value || unref(isPaid),
|
|
4945
|
+
"is-billing-information-mandatory": isBillingInformationMandatory.value,
|
|
4946
|
+
"get-is-field-required": unref(checkoutForm).getIsFieldRequired,
|
|
4947
|
+
"read-only": unref(isPaid)
|
|
4948
|
+
}, null, 8, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "read-only"]),
|
|
4949
|
+
createElementVNode("div", _hoisted_2, [
|
|
4950
|
+
createVNode(_sfc_main$I, {
|
|
4951
|
+
variant: "section",
|
|
4952
|
+
class: "min-h-[130px]"
|
|
4953
|
+
}, {
|
|
4954
|
+
default: withCtx(() => [
|
|
4955
|
+
!unref(isPaymentMethodsPending) || unref(isPaymentMethodsPending) && unref(paymentMethodOptions).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
4956
|
+
createVNode(unref(_sfc_main$r), {
|
|
4957
|
+
variant: "heading-3",
|
|
4958
|
+
tag: "h2",
|
|
4959
|
+
class: "sv-checkout__payment-methods-title mb-2"
|
|
4960
|
+
}, {
|
|
4961
|
+
default: withCtx(() => [
|
|
4962
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
4963
|
+
defaultMessage: "Payment method",
|
|
4964
|
+
id: "checkout.payment_method_block.title",
|
|
4965
|
+
description: "The title of the payment method block in the checkout form"
|
|
4966
|
+
})), 1)
|
|
4967
|
+
]),
|
|
4968
|
+
_: 1
|
|
4969
|
+
}),
|
|
4970
|
+
!unref(checkoutForm).form.value.country ? (openBlock(), createBlock(_sfc_main$P, {
|
|
4971
|
+
key: 0,
|
|
4972
|
+
class: "sv-checkout__payment-methods-empty",
|
|
4973
|
+
icon: "captive_portal"
|
|
4974
|
+
}, {
|
|
4975
|
+
title: withCtx(() => [
|
|
4976
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
4977
|
+
defaultMessage: "Select your billing country",
|
|
4978
|
+
id: "checkout.payment_method_block.no_country_selected_title",
|
|
4979
|
+
description: "The title shown when no country is selected"
|
|
4980
|
+
})), 1)
|
|
4981
|
+
]),
|
|
4982
|
+
message: withCtx(() => [
|
|
4983
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
4984
|
+
defaultMessage: "Payment methods will be shown after you select the billing country.",
|
|
4985
|
+
id: "checkout.payment_method_block.no_country_selected_message",
|
|
4986
|
+
description: "The message shown when no country is selected"
|
|
4987
|
+
})), 1)
|
|
4988
|
+
]),
|
|
4989
|
+
_: 1
|
|
4990
|
+
})) : unref(hasPaymentMethodOptionsError) ? (openBlock(), createBlock(_sfc_main$P, {
|
|
4991
|
+
key: 1,
|
|
4992
|
+
class: "sv-checkout__payment-methods-error",
|
|
4993
|
+
icon: "error"
|
|
4994
|
+
}, {
|
|
4995
|
+
title: withCtx(() => [
|
|
4996
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
4997
|
+
defaultMessage: "Could not load payment methods",
|
|
4998
|
+
id: "checkout.payment_method_block.load_failed_title",
|
|
4999
|
+
description: "The title shown when the payment methods failed to load"
|
|
5000
|
+
})), 1)
|
|
5001
|
+
]),
|
|
5002
|
+
message: withCtx(() => [
|
|
5003
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
5004
|
+
defaultMessage: "Check your connection and try again.",
|
|
5005
|
+
id: "checkout.payment_method_block.load_failed_message",
|
|
5006
|
+
description: "The message shown when the payment methods failed to load"
|
|
5007
|
+
})), 1)
|
|
5008
|
+
]),
|
|
5009
|
+
action: withCtx(() => [
|
|
5010
|
+
createVNode(unref(_sfc_main$v), {
|
|
5011
|
+
type: "button",
|
|
5012
|
+
intent: "secondary",
|
|
5013
|
+
size: "sm",
|
|
5014
|
+
class: "sv-action sv-action--secondary sv-checkout__payment-methods-retry",
|
|
5015
|
+
onClick: unref(retryPaymentMethodOptions)
|
|
5016
|
+
}, {
|
|
5017
|
+
default: withCtx(() => [
|
|
5018
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
5019
|
+
defaultMessage: "Try again",
|
|
5020
|
+
id: "checkout.payment_method_block.load_failed_retry_button.label",
|
|
5021
|
+
description: "The label of the button that loads the payment methods again"
|
|
5022
|
+
})), 1)
|
|
5023
|
+
]),
|
|
5024
|
+
_: 1
|
|
5025
|
+
}, 8, ["onClick"])
|
|
5026
|
+
]),
|
|
5027
|
+
_: 1
|
|
5028
|
+
})) : unref(paymentMethodOptions).length === 0 ? (openBlock(), createBlock(_sfc_main$P, {
|
|
5029
|
+
key: 2,
|
|
5030
|
+
class: "sv-checkout__payment-methods-empty",
|
|
5031
|
+
icon: "credit_card_off"
|
|
5032
|
+
}, {
|
|
5033
|
+
title: withCtx(() => [
|
|
5034
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
5035
|
+
defaultMessage: "No payment methods available",
|
|
5036
|
+
id: "checkout.payment_method_block.no_payment_methods_available_title",
|
|
5037
|
+
description: "The title shown when there are no available payment methods"
|
|
5038
|
+
})), 1)
|
|
5039
|
+
]),
|
|
5040
|
+
_: 1
|
|
5041
|
+
})) : unref(amount) && unref(checkoutForm).form.value.country ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
5042
|
+
createElementVNode("div", {
|
|
5043
|
+
class: normalizeClass({ "pointer-events-none opacity-60": isPaymentPending.value })
|
|
5044
|
+
}, [
|
|
5045
|
+
createVNode(unref(PaymentIntegrationForm), {
|
|
5046
|
+
ref_key: "paymentIntegrationFormRef",
|
|
5047
|
+
ref: paymentIntegrationFormRef,
|
|
5048
|
+
"country-code": unref(checkoutForm).form.value.country,
|
|
5049
|
+
context: unref(authorizationContext),
|
|
5050
|
+
amount: unref(amount),
|
|
5051
|
+
email: unref(checkoutForm).form.value.email,
|
|
5052
|
+
variant: "AUTHORIZE",
|
|
5053
|
+
"payment-method-options": unref(paymentMethodOptions) ?? [],
|
|
5054
|
+
"validate-on-submit": handleValidateOnSubmit,
|
|
5055
|
+
"force-store-payment-method": "",
|
|
5056
|
+
onPaymentSuccess: handlePaymentSuccess,
|
|
5057
|
+
onPaymentFailed: handlePaymentFailed,
|
|
5058
|
+
onReady: _cache[3] || (_cache[3] = ($event) => emit("ready"))
|
|
5059
|
+
}, null, 8, ["country-code", "context", "amount", "email", "payment-method-options"])
|
|
5060
|
+
], 2)
|
|
5061
|
+
])) : createCommentVNode("", true)
|
|
5062
|
+
])) : createCommentVNode("", true)
|
|
5063
|
+
]),
|
|
5064
|
+
_: 1
|
|
5065
|
+
})
|
|
5066
|
+
])
|
|
5067
|
+
], 64))
|
|
5068
|
+
];
|
|
5069
|
+
}),
|
|
5070
|
+
aside: withCtx(() => [
|
|
5071
|
+
createElementVNode("div", _hoisted_5, [
|
|
5072
|
+
createVNode(_sfc_main$I, {
|
|
4873
5073
|
variant: "section",
|
|
4874
|
-
class: "min-h-[
|
|
5074
|
+
class: "min-h-[220px]"
|
|
4875
5075
|
}, {
|
|
4876
|
-
default: withCtx(() =>
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
tag: "h2",
|
|
4881
|
-
class: "mb-2"
|
|
4882
|
-
}, {
|
|
4883
|
-
default: withCtx(() => [
|
|
4884
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
4885
|
-
defaultMessage: "Payment method",
|
|
4886
|
-
id: "checkout.payment_method_block.title",
|
|
4887
|
-
description: "The title of the payment method block in the checkout form"
|
|
4888
|
-
})), 1)
|
|
4889
|
-
]),
|
|
4890
|
-
_: 1
|
|
4891
|
-
}),
|
|
4892
|
-
!unref(checkoutForm).form.value.country ? (openBlock(), createBlock(_sfc_main$h, {
|
|
5076
|
+
default: withCtx(() => {
|
|
5077
|
+
var _a2;
|
|
5078
|
+
return [
|
|
5079
|
+
unref(subscription) && unref(invoicePreview) ? (openBlock(), createBlock(_sfc_main$f, {
|
|
4893
5080
|
key: 0,
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
5081
|
+
subscription: unref(subscription),
|
|
5082
|
+
invoice: unref(invoicePreview),
|
|
5083
|
+
"invoice-preview-by-billing-period": unref(invoicePreviewByBillingPeriod),
|
|
5084
|
+
"trial-invoice": unref(trialInvoicePreview),
|
|
5085
|
+
"enabled-pricing-ids": enabledPricingIdsModel.value,
|
|
5086
|
+
"trial-period": unref(trialPeriod),
|
|
5087
|
+
"country-code": unref(checkoutForm).form.value.country,
|
|
5088
|
+
avatar: (_a2 = configuration.value) == null ? void 0 : _a2.avatar,
|
|
5089
|
+
"is-paid": unref(isPaid),
|
|
5090
|
+
"is-usage-based": isUsageBased.value,
|
|
5091
|
+
"is-preview-and-payment-methods-pending": unref(isPaymentMethodsPending) || unref(isInvoicePreviewPending),
|
|
5092
|
+
onBillingPeriodChange: handleBillingPeriodChange
|
|
5093
|
+
}, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "country-code", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending"])) : createCommentVNode("", true)
|
|
5094
|
+
];
|
|
5095
|
+
}),
|
|
5096
|
+
_: 1
|
|
5097
|
+
})
|
|
5098
|
+
]),
|
|
5099
|
+
!unref(isPaid) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
5100
|
+
createVNode(_sfc_main$2, {
|
|
5101
|
+
class: "sv-checkout__promotion-code",
|
|
5102
|
+
"promotion-code": promotionCode.value,
|
|
5103
|
+
"onUpdate:appliedCode": _cache[4] || (_cache[4] = ($event) => promotionCode.value = $event),
|
|
5104
|
+
onRemove: unref(removePromotionCode),
|
|
5105
|
+
onApply: unref(applyPromotionCode)
|
|
5106
|
+
}, null, 8, ["promotion-code", "onRemove", "onApply"]),
|
|
5107
|
+
unref(promotionCodeErrorMessage) ? (openBlock(), createBlock(unref(_sfc_main$N), {
|
|
5108
|
+
key: 0,
|
|
5109
|
+
class: "sv-checkout__promotion-error mt-2",
|
|
5110
|
+
title: unref(promotionCodeErrorMessage)
|
|
5111
|
+
}, null, 8, ["title"])) : createCommentVNode("", true),
|
|
5112
|
+
createElementVNode("div", _hoisted_6, [
|
|
5113
|
+
createVNode(_sfc_main$I, { class: "sv-checkout__submit-skeleton min-h-[44px]" }, {
|
|
5114
|
+
default: withCtx(() => [
|
|
5115
|
+
unref(invoicePreview) ? (openBlock(), createBlock(unref(_sfc_main$v), {
|
|
5116
|
+
key: 0,
|
|
5117
|
+
type: "button",
|
|
5118
|
+
size: "lg",
|
|
5119
|
+
class: "sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",
|
|
5120
|
+
disabled: unref(isPromotionCodePending) || unref(paymentMethodOptions).length === 0 || isPaymentPending.value,
|
|
5121
|
+
loading: isPaymentPending.value,
|
|
5122
|
+
onClick: handleSubmit
|
|
4914
5123
|
}, {
|
|
4915
|
-
|
|
4916
|
-
createTextVNode(toDisplayString(unref($t)({
|
|
4917
|
-
defaultMessage: "
|
|
4918
|
-
id: "checkout.
|
|
4919
|
-
description: "The
|
|
4920
|
-
})
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
defaultMessage: "There are no available payment methods. Please contact support for more information.",
|
|
4925
|
-
id: "checkout.payment_method_block.no_payment_methods_available_message",
|
|
4926
|
-
description: "The message shown when there are no available payment methods"
|
|
5124
|
+
default: withCtx(() => [
|
|
5125
|
+
createTextVNode(toDisplayString(hasTrialPeriod.value ? unref($t)({
|
|
5126
|
+
defaultMessage: "Start trial",
|
|
5127
|
+
id: "checkout.pay_and_subscribe_button_trial.label",
|
|
5128
|
+
description: "The label of the start trial button in the checkout form"
|
|
5129
|
+
}) : unref($t)({
|
|
5130
|
+
defaultMessage: "Pay and subscribe",
|
|
5131
|
+
id: "checkout.pay_and_subscribe_button.label",
|
|
5132
|
+
description: "The label of the pay and subscribe button in the checkout form"
|
|
4927
5133
|
})), 1)
|
|
4928
5134
|
]),
|
|
4929
5135
|
_: 1
|
|
4930
|
-
}
|
|
4931
|
-
key: 2,
|
|
4932
|
-
ref_key: "paymentIntegrationFormRef",
|
|
4933
|
-
ref: paymentIntegrationFormRef,
|
|
4934
|
-
"country-code": unref(checkoutForm).form.value.country,
|
|
4935
|
-
context: unref(authorizationContext),
|
|
4936
|
-
amount: unref(amount),
|
|
4937
|
-
variant: "AUTHORIZE",
|
|
4938
|
-
"payment-method-options": unref(paymentMethodOptions) ?? [],
|
|
4939
|
-
"success-redirect-url": unref(successRedirectUrl),
|
|
4940
|
-
"validate-on-submit": handleValidateOnSubmit,
|
|
4941
|
-
"force-store-payment-method": "",
|
|
4942
|
-
onPaymentSuccess: handlePaymentSuccess,
|
|
4943
|
-
onReady: _cache[3] || (_cache[3] = ($event) => emit("ready"))
|
|
4944
|
-
}, null, 8, ["country-code", "context", "amount", "payment-method-options", "success-redirect-url"])) : createCommentVNode("", true)
|
|
4945
|
-
])) : createCommentVNode("", true)
|
|
4946
|
-
]),
|
|
4947
|
-
_: 1
|
|
4948
|
-
})) : createCommentVNode("", true)
|
|
4949
|
-
];
|
|
4950
|
-
}),
|
|
4951
|
-
aside: withCtx(() => [
|
|
4952
|
-
createVNode(_sfc_main$q, {
|
|
4953
|
-
variant: "section",
|
|
4954
|
-
class: "min-h-[220px]"
|
|
4955
|
-
}, {
|
|
4956
|
-
default: withCtx(() => {
|
|
4957
|
-
var _a2;
|
|
4958
|
-
return [
|
|
4959
|
-
unref(subscription) && unref(invoicePreview) ? (openBlock(), createBlock(_sfc_main$i, {
|
|
4960
|
-
key: 0,
|
|
4961
|
-
subscription: unref(subscription),
|
|
4962
|
-
invoice: unref(invoicePreview),
|
|
4963
|
-
"invoice-preview-by-billing-period": unref(invoicePreviewByBillingPeriod),
|
|
4964
|
-
"trial-invoice": unref(trialInvoicePreview),
|
|
4965
|
-
"enabled-pricing-ids": enabledPricingIdsModel.value,
|
|
4966
|
-
"trial-period": unref(trialPeriod),
|
|
4967
|
-
"country-code": unref(checkoutForm).form.value.country,
|
|
4968
|
-
avatar: (_a2 = configuration.value) == null ? void 0 : _a2.avatar,
|
|
4969
|
-
"is-paid": unref(isPaid),
|
|
4970
|
-
"is-usage-based": isUsageBased.value,
|
|
4971
|
-
"is-preview-and-payment-methods-pending": unref(isPaymentMethodsPending) || unref(isInvoicePreviewPending),
|
|
4972
|
-
onBillingPeriodChange: handleBillingPeriodChange
|
|
4973
|
-
}, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "country-code", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending"])) : createCommentVNode("", true)
|
|
4974
|
-
];
|
|
4975
|
-
}),
|
|
4976
|
-
_: 1
|
|
4977
|
-
}),
|
|
4978
|
-
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$2, {
|
|
4979
|
-
key: 0,
|
|
4980
|
-
"promotion-code": promotionCode.value,
|
|
4981
|
-
"onUpdate:appliedCode": _cache[4] || (_cache[4] = ($event) => promotionCode.value = $event),
|
|
4982
|
-
onRemove: unref(removePromotionCode),
|
|
4983
|
-
onApply: unref(applyPromotionCode)
|
|
4984
|
-
}, null, 8, ["promotion-code", "onRemove", "onApply"])) : createCommentVNode("", true),
|
|
4985
|
-
unref(promotionCodeErrorMessage) ? (openBlock(), createBlock(unref(_sfc_main$16), {
|
|
4986
|
-
key: 1,
|
|
4987
|
-
class: "mt-2",
|
|
4988
|
-
title: unref(promotionCodeErrorMessage)
|
|
4989
|
-
}, null, 8, ["title"])) : createCommentVNode("", true),
|
|
4990
|
-
!unref(isPaid) ? (openBlock(), createBlock(_sfc_main$q, {
|
|
4991
|
-
key: 2,
|
|
4992
|
-
class: "min-h-[44px]"
|
|
4993
|
-
}, {
|
|
4994
|
-
default: withCtx(() => [
|
|
4995
|
-
unref(invoicePreview) ? (openBlock(), createBlock(unref(_sfc_main$2H), {
|
|
4996
|
-
key: 0,
|
|
4997
|
-
type: "button",
|
|
4998
|
-
size: "lg",
|
|
4999
|
-
class: "full-width",
|
|
5000
|
-
disabled: unref(isPromotionCodePending) || unref(paymentMethodOptions).length === 0,
|
|
5001
|
-
onClick: handleSubmit
|
|
5002
|
-
}, {
|
|
5003
|
-
default: withCtx(() => [
|
|
5004
|
-
createTextVNode(toDisplayString(hasTrialPeriod.value ? unref($t)({
|
|
5005
|
-
defaultMessage: "Start trial",
|
|
5006
|
-
id: "checkout.pay_and_subscribe_button_trial.label",
|
|
5007
|
-
description: "The label of the start trial button in the checkout form"
|
|
5008
|
-
}) : unref($t)({
|
|
5009
|
-
defaultMessage: "Pay and subscribe",
|
|
5010
|
-
id: "checkout.pay_and_subscribe_button.label",
|
|
5011
|
-
description: "The label of the pay and subscribe button in the checkout form"
|
|
5012
|
-
})), 1)
|
|
5136
|
+
}, 8, ["disabled", "loading"])) : createCommentVNode("", true)
|
|
5013
5137
|
]),
|
|
5014
5138
|
_: 1
|
|
5015
|
-
}
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
createVNode(unref(_sfc_main$2$1), {
|
|
5020
|
-
tag: "div",
|
|
5021
|
-
variant: "body-sm",
|
|
5022
|
-
shade: "lighter",
|
|
5023
|
-
class: "flex grow justify-center"
|
|
5024
|
-
}, {
|
|
5025
|
-
default: withCtx(() => [
|
|
5026
|
-
createVNode(_sfc_main$r, {
|
|
5027
|
-
icon: "lock",
|
|
5028
|
-
kpi: unref($t)({
|
|
5029
|
-
defaultMessage: "Secure and encrypted payments",
|
|
5030
|
-
id: "checkout.kpi.encrypted_payments.label",
|
|
5031
|
-
description: "The encrypted payments KPI shown in the checkout"
|
|
5032
|
-
})
|
|
5033
|
-
}, null, 8, ["kpi"])
|
|
5034
|
-
]),
|
|
5035
|
-
_: 1
|
|
5036
|
-
})
|
|
5139
|
+
}),
|
|
5140
|
+
createVNode(_sfc_main$O, { "payment-method-options": unref(paymentMethodOptions) }, null, 8, ["payment-method-options"])
|
|
5141
|
+
])
|
|
5142
|
+
], 64)) : createCommentVNode("", true)
|
|
5037
5143
|
]),
|
|
5038
5144
|
_: 1
|
|
5039
|
-
}));
|
|
5145
|
+
}, 8, ["class"]));
|
|
5040
5146
|
};
|
|
5041
5147
|
}
|
|
5042
5148
|
});
|
|
@@ -5047,7 +5153,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5047
5153
|
locale: { type: String },
|
|
5048
5154
|
dateLocale: { type: String },
|
|
5049
5155
|
messages: { type: Object },
|
|
5050
|
-
showTimezones: { type: Boolean },
|
|
5051
5156
|
primaryColor: { type: String },
|
|
5052
5157
|
secondaryColor: { type: String },
|
|
5053
5158
|
isShadowRoot: { type: Boolean },
|
|
@@ -5056,13 +5161,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5056
5161
|
onLog: { type: Function },
|
|
5057
5162
|
allowedPortalTypes: { type: Array },
|
|
5058
5163
|
portalObject: { type: Object },
|
|
5059
|
-
|
|
5164
|
+
cssOverrides: { type: [String, Array] },
|
|
5060
5165
|
branding: { type: Object },
|
|
5061
5166
|
configuration: { type: Object }
|
|
5062
5167
|
},
|
|
5063
5168
|
emits: ["error", "ready"],
|
|
5064
5169
|
setup(__props, { emit: __emit }) {
|
|
5065
|
-
var _a, _b;
|
|
5170
|
+
var _a, _b, _c;
|
|
5171
|
+
const componentName = getComponentName("checkout");
|
|
5066
5172
|
const props = __props;
|
|
5067
5173
|
const emit = __emit;
|
|
5068
5174
|
const logger = useLogger();
|
|
@@ -5088,29 +5194,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5088
5194
|
};
|
|
5089
5195
|
const validCountryCode = getValidCountryCode((_a = props.configuration) == null ? void 0 : _a.countryCode);
|
|
5090
5196
|
const validEmail = getValidEmail((_b = props.configuration) == null ? void 0 : _b.email);
|
|
5197
|
+
const couponCode = ((_c = props.configuration) == null ? void 0 : _c.couponCode) ?? getQueryParam("coupon_code") ?? void 0;
|
|
5091
5198
|
return (_ctx, _cache) => {
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
"
|
|
5095
|
-
environment: __props.environment,
|
|
5096
|
-
locale: __props.locale,
|
|
5097
|
-
"portal-object": __props.portalObject,
|
|
5199
|
+
return openBlock(), createBlock(unref(_sfc_main$Q), {
|
|
5200
|
+
entry: _ctx.$props,
|
|
5201
|
+
"component-name": unref(componentName),
|
|
5098
5202
|
"allowed-portal-types": ["INIT_PRICING_PLAN_SUBSCRIPTION"],
|
|
5099
|
-
"primary-color": (_b2 = (_a2 = __props.branding) == null ? void 0 : _a2.colors) == null ? void 0 : _b2.primary,
|
|
5100
|
-
"secondary-color": (_d = (_c = __props.branding) == null ? void 0 : _c.colors) == null ? void 0 : _d.secondary,
|
|
5101
|
-
"experimental-features": __props.experimentalFeatures,
|
|
5102
|
-
"log-level": __props.logLevel,
|
|
5103
|
-
"on-log": __props.onLog,
|
|
5104
5203
|
onError: _cache[1] || (_cache[1] = (error) => _ctx.$emit("error", error))
|
|
5105
5204
|
}, {
|
|
5106
5205
|
default: withCtx(() => {
|
|
5107
|
-
var
|
|
5206
|
+
var _a2, _b2, _c2;
|
|
5108
5207
|
return [
|
|
5109
5208
|
createVNode(_sfc_main$1, {
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5209
|
+
configuration: {
|
|
5210
|
+
avatar: (_b2 = (_a2 = __props.branding) == null ? void 0 : _a2.emblem) == null ? void 0 : _b2.public_url,
|
|
5211
|
+
email: unref(validEmail),
|
|
5212
|
+
countryCode: unref(validCountryCode),
|
|
5213
|
+
enabledPricingIds: (_c2 = __props.configuration) == null ? void 0 : _c2.enabledPricingIds,
|
|
5214
|
+
couponCode: unref(couponCode)
|
|
5215
|
+
},
|
|
5114
5216
|
onReady: _cache[0] || (_cache[0] = ($event) => emit("ready"))
|
|
5115
5217
|
}, createSlots({ _: 2 }, [
|
|
5116
5218
|
_ctx.$slots["terms-and-conditions"] ? {
|
|
@@ -5120,23 +5222,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5120
5222
|
]),
|
|
5121
5223
|
key: "0"
|
|
5122
5224
|
} : void 0
|
|
5123
|
-
]), 1032, ["
|
|
5225
|
+
]), 1032, ["configuration"])
|
|
5124
5226
|
];
|
|
5125
5227
|
}),
|
|
5126
5228
|
_: 3
|
|
5127
|
-
}, 8, ["
|
|
5229
|
+
}, 8, ["entry", "component-name"]);
|
|
5128
5230
|
};
|
|
5129
5231
|
}
|
|
5130
5232
|
});
|
|
5131
|
-
const
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
customElements.define(COMPONENT_NAME, SolvimonCheckout);
|
|
5136
|
-
}
|
|
5137
|
-
};
|
|
5233
|
+
const { define: defineSolvimonCheckout } = createSolvimonElement(
|
|
5234
|
+
_sfc_main,
|
|
5235
|
+
"checkout"
|
|
5236
|
+
);
|
|
5138
5237
|
export {
|
|
5139
|
-
COMPONENT_NAME,
|
|
5140
|
-
SolvimonCheckout,
|
|
5141
5238
|
defineSolvimonCheckout
|
|
5142
5239
|
};
|